import { inject as Tt, ref as le, provide as kt, readonly as nO, computed as R, Fragment as He, isVNode as Xi, Comment as U1, Text as X1, defineComponent as ye, reactive as Dn, getCurrentInstance as ui, onMounted as Pt, onUpdated as Ds, onUnmounted as Bo, watch as Ie, unref as M, shallowRef as Pe, watchEffect as Ft, onBeforeUnmount as At, triggerRef as oO, createVNode as v, h as io, Transition as Mi, withDirectives as Qi, resolveDirective as iO, cloneVNode as gl, render as Pr, nextTick as Nt, toRef as Ut, withModifiers as Ro, vShow as va, onBeforeMount as Yd, Teleport as Ud, createTextVNode as Ee, isRef as Q1, toRefs as xd, toRaw as oi, useAttrs as aO, onBeforeUpdate as jh, getCurrentScope as Z1, onScopeDispose as J1, TransitionGroup as Wh, onActivated as rO, openBlock as ee, createElementBlock as ge, normalizeStyle as xt, normalizeClass as ct, renderSlot as Va, createCommentVNode as je, renderList as It, createBlock as Ze, mergeProps as lO, withCtx as ce, useSlots as sO, createElementVNode as N, resolveComponent as Vt, toDisplayString as te, resolveDynamicComponent as ew, toValue as uO } from "vue";
import { merge as cO, isEmpty as tw } from "lodash-es";
import { defineStore as qh } from "pinia";
import nw from "lodash-es/isPlainObject";
import Gh from "lodash-es/isEqual";
import Zf from "lodash-es/uniq";
import Xn from "dayjs";
import dO from "dayjs/plugin/weekday";
import fO from "dayjs/plugin/localeData";
import pO from "dayjs/plugin/weekOfYear";
import gO from "dayjs/plugin/weekYear";
import hO from "dayjs/plugin/quarterOfYear";
import vO from "dayjs/plugin/advancedFormat";
import mO from "dayjs/plugin/customParseFormat";
import ed from "lodash-es/cloneDeep";
import bO from "lodash-es/find";
import yO from "lodash-es/intersection";
import xO from "lodash-es/debounce";
import wO from "lodash-es/omit";
import ow from "lodash-es/pick";
const SO = {
  "common.auto": "Auto",
  "app.tab.dashboard": "Dashboard",
  "app.tab.scene": "Scene View",
  "app.tab.topology": "Topology",
  "app.tab.logs": "Logs",
  "app.tab.traces": "Traces",
  "app.tab.querybuilder": "Query Builder",
  "app.tab.grafana": "Grafana Data",
  "app.tab.zabbix": "Zabbix",
  "app.theme.toDark": "Switch to Dark",
  "app.theme.toLight": "Switch to Light",
  "time.last1h": "Last 1 hour",
  "time.last3h": "Last 3 hours",
  "time.last6h": "Last 6 hours",
  "time.last24h": "Last 24 hours",
  "time.last7d": "Last 7 days",
  "time.last30d": "Last 30 days",
  "panel.menu.edit": "Edit",
  "panel.menu.clone": "Clone",
  "panel.menu.fullscreen": "Fullscreen",
  "panel.menu.refresh": "Refresh",
  "panel.menu.remove": "Remove",
  "panel.remove.title": 'Remove "{title}"?',
  "panel.remove.content": "This action cannot be undone.",
  "panel.remove.ok": "Remove",
  "dashboard.edit": "Edit",
  "dashboard.save": "Save",
  "dashboard.cancel": "Cancel",
  "dashboard.cancelConfirmTitle": "Discard unsaved changes?",
  "dashboard.cancelConfirmOk": "Discard changes",
  "dashboard.cancelConfirmCancel": "Keep editing",
  "dashboard.addPanel": "Add Panel",
  "dashboard.clearPanels": "Clear Panels",
  "dashboard.clearConfirmTitle": "Clear all panels?",
  "dashboard.clearConfirmOk": "Clear all",
  "dashboard.export": "Export",
  "dashboard.import": "Import",
  "dashboard.exportSuccess": "Dashboard exported",
  "dashboard.importSuccess": "Dashboard imported",
  "dashboard.importError": "Invalid dashboard JSON",
  "config.section.general": "General",
  "config.section.value": "Stat Style",
  "config.section.style": "Style",
  "config.section.tooltip": "Tooltip",
  "config.section.format": "Formatting",
  "config.section.thresholds": "Thresholds ({n})",
  "config.section.axes": "Axes",
  "config.section.links": "Links ({n})",
  "config.section.gaugeStyle": "Gauge Style",
  "config.section.pieStyle": "Pie Style",
  "config.section.histStyle": "Histogram Style",
  "config.section.tableStyle": "Table Style",
  "config.section.overrides": "Field Overrides",
  "config.type.timeseries": "Time Series",
  "config.type.bar": "Bar Chart",
  "config.type.histogram": "Histogram",
  "config.type.stat": "Stat / Value",
  "config.type.gauge": "Gauge",
  "config.type.table": "Table",
  "config.type.pie": "Pie Chart",
  "panel.type.desc.timeseries": "Line/area chart with time axis",
  "panel.type.desc.bar": "Grouped or stacked bars",
  "panel.type.desc.histogram": "Distribution buckets",
  "panel.type.desc.stat": "Single value with sparkline",
  "panel.type.desc.gauge": "Circular gauge meter",
  "panel.type.desc.table": "Sortable data table",
  "panel.type.desc.pie": "Pie or donut chart",
  "config.field.title": "Title",
  "config.field.description": "Description",
  "config.field.panelType": "Panel Type",
  "config.field.colorScheme": "Color Scheme",
  "config.field.lineWidth": "Line Width",
  "config.field.fillOpacity": "Fill Opacity",
  "config.field.drawStyle": "Style",
  "config.field.interpolation": "Interpolation",
  "config.field.lineStyle": "Line Style",
  "config.field.showPoints": "Show Points",
  "config.field.legendPosition": "Legend Position",
  "config.field.unit": "Unit",
  "config.field.decimals": "Decimals",
  "config.field.min": "Min",
  "config.field.max": "Max",
  "config.field.reducer": "Calculation",
  "config.field.tooltipMode": "Tooltip Mode",
  "config.field.softMin": "Soft Min",
  "config.field.softMax": "Soft Max",
  "config.field.logScale": "Log Scale",
  "config.field.axisPlacement": "Placement",
  "config.field.showGridLines": "Grid Lines",
  "config.field.scaleDistribution": "Scale",
  "config.field.centeredZero": "Centered Zero",
  "config.field.stacked": "Stacked",
  "config.interp.linear": "Linear",
  "config.interp.smooth": "Smooth",
  "config.interp.step": "Step",
  "config.linestyle.solid": "Solid",
  "config.linestyle.dashed": "Dashed",
  "config.linestyle.dotted": "Dotted",
  "config.legend.bottom": "Bottom",
  "config.legend.right": "Right",
  "config.legend.hidden": "Hidden",
  "config.unit.none": "None",
  "config.unit.ms": "Milliseconds (ms)",
  "config.unit.percent": "Percent (0-100)",
  "config.unit.reqps": "Requests/sec",
  "config.threshold.label": "Label",
  "config.threshold.base": "Base",
  "config.threshold.add": "Add Threshold",
  "config.threshold.mode": "Threshold Mode",
  "config.threshold.modeAbsolute": "Absolute",
  "config.threshold.modePercentage": "Percentage",
  "dashboard.refresh": "Refresh",
  "variable.modal.placeholder": 'Click "Add Variable" on the left to start',
  "variable.custom.title": "Custom Options",
  "variable.custom.add": "Add Option",
  "variable.custom.allValue": "All Value",
  "config.scheme.grafana-classic": "Grafana Classic",
  "config.scheme.green-yellow-red": "Green-Yellow-Red",
  "config.scheme.red-yellow-green": "Red-Yellow-Green",
  "config.scheme.blue-yellow-red": "Blue-Yellow-Red",
  "config.scheme.blue-purple": "Blue-Purple",
  "config.scheme.yellow-blue": "Yellow-Blue",
  "config.scheme.blues": "Blues",
  "config.scheme.reds": "Reds",
  "config.scheme.GrYlRd": "GrYlRd",
  "config.scheme.purple-orange": "Purple-Orange",
  "variable.modal.title": "Variable Config",
  "variable.modal.save": "Save",
  "variable.modal.cancel": "Cancel",
  "variable.modal.delete": "Delete Variable",
  "variable.modal.add": "Add Variable",
  "variable.modal.empty": 'Click "Add Variable" on the left to start',
  "variable.nav.count": "Variables ({n})",
  "variable.nav.unnamed": "(unnamed)",
  "variable.general.title": "General",
  "variable.general.type": "Type",
  "variable.general.name": "Name",
  "variable.general.label": "Label",
  "variable.general.description": "Description",
  "variable.type.custom": "Custom",
  "variable.type.query": "Query",
  "variable.type.textbox": "Text box",
  "variable.type.datasource": "Data source",
  "variable.type.constant": "Constant",
  "variable.query.title": "Query options",
  "variable.query.multi": "Multi-value",
  "variable.query.includeAll": "Include All option",
  "variable.query.refresh": "Refresh",
  "variable.query.refresh.onLoad": "On dashboard load",
  "variable.query.refresh.onTimeChange": "On time range change",
  "qb.datasource": "Data Source",
  "qb.addQuery": "Add Query",
  "qb.queryOptions": "Query options",
  "qb.pattern": "Pattern",
  "qb.pattern.sine": "Sine wave",
  "qb.pattern.spike": "Spike",
  "qb.pattern.step": "Step",
  "qb.pattern.sawtooth": "Sawtooth",
  "qb.pattern.noise": "Random noise",
  "qb.pattern.trendUp": "Trend up",
  "qb.pattern.trendDown": "Trend down",
  "qb.pattern.plateau": "Plateau",
  "qb.pattern.randomWalk": "Random walk",
  "qb.pattern.live": "Live",
  "qb.seriesCount": "Series Count",
  "qb.liveAmplitude": "Amplitude",
  "qb.functions": "Functions",
  "qb.functions.add": "Add",
  "qb.options": "Options",
  "qb.queryOptions.maxDataPoints": "Max data points",
  "qb.queryOptions.minInterval": "Min interval",
  "qb.queryOptions.minIntervalPlaceholder": "No limit",
  "qb.queryOptions.interval": "Interval",
  "qb.queryOptions.intervalHint": "time range / max data points",
  "qb.queryOptions.relativeTime": "Relative time",
  "qb.queryOptions.timeShift": "Time shift",
  "config.scheme.classic": "Classic",
  "config.scheme.tableau10": "Tableau 10",
  "config.scheme.fixed": "Single Color",
  "config.scheme.thresholds": "From Thresholds",
  "config.trend.up": "Up ↑",
  "config.trend.down": "Down ↓",
  "config.trend.flat": "Flat",
  "config.field.pieType": "Pie Type",
  "config.field.pieSliceSorting": "Slice Sorting",
  "config.pieType.pie": "Pie",
  "config.pieType.donut": "Donut",
  "config.sort.desc": "Descending",
  "config.sort.asc": "Ascending",
  "config.sort.none": "None",
  "config.field.pieLabels": "Slice Labels",
  "config.pieLabel.name": "Name",
  "config.pieLabel.percent": "Percent",
  "config.pieLabel.value": "Value",
  "config.field.pieShow": "Show",
  "config.pieShow.calculate": "Calculate (Reducer)",
  "config.pieShow.all": "All Values",
  "config.field.legendMode": "Legend Mode",
  "config.legendMode.list": "List",
  "config.legendMode.table": "Table",
  "config.field.legendValues": "Legend Values",
  "config.legendValue.min": "Min",
  "config.legendValue.max": "Max",
  "config.legendValue.mean": "Mean",
  "config.legendValue.sum": "Sum",
  "config.legendValue.last": "Last",
  "config.legendValue.first": "First",
  "tooltip.pinned": "Pinned",
  "tooltip.datetimeFormat": "MMM DD HH:mm:ss",
  "config.reducer.lastNotNull": "Last *",
  "config.reducer.last": "Last",
  "config.reducer.firstNotNull": "First *",
  "config.reducer.first": "First",
  "config.reducer.min": "Min",
  "config.reducer.max": "Max",
  "config.reducer.mean": "Mean",
  "config.reducer.sum": "Total",
  "config.reducer.count": "Count",
  "config.reducer.range": "Range",
  "config.reducer.median": "Median",
  "config.reducer.stdDev": "Std Dev",
  "config.reducer.variance": "Variance",
  "config.reducer.delta": "Delta",
  "config.reducer.diff": "Difference",
  "config.reducer.diffperc": "Difference %",
  "config.reducer.step": "Step",
  "config.reducer.logmin": "Min (above zero)",
  "config.reducer.countAll": "Count all",
  "config.reducer.changeCount": "Change Count",
  "config.reducer.distinctCount": "Distinct Count",
  "config.reducer.allIsZero": "All Zeros",
  "config.reducer.allIsNull": "All Nulls",
  "config.drawStyle.lines": "Lines",
  "config.drawStyle.bars": "Bars",
  "config.drawStyle.points": "Points",
  "config.tooltip.single": "Single",
  "config.tooltip.multi": "All",
  "config.tooltip.none": "Hidden",
  "config.tooltip.sortNone": "None",
  "config.tooltip.sortAsc": "Ascending",
  "config.tooltip.sortDesc": "Descending",
  "config.axis.placement.left": "Left",
  "config.axis.placement.right": "Right",
  "config.axis.placement.hidden": "Hidden",
  "config.axis.grid.all": "All",
  "config.axis.grid.hidden": "Hidden",
  "config.axis.scale.linear": "Linear",
  "config.axis.scale.logarithmic": "Logarithmic",
  "config.gauge.fillWidth": "Active Arc Width",
  "config.gauge.trackWidth": "Track Width",
  "config.gauge.trackColor": "Track Color",
  "config.gauge.capRound": "Round Caps",
  "config.gauge.valueVisible": "Show Value",
  "config.gauge.thresholdDisplay": "Show Thresholds",
  "config.gauge.thresholdDisplayNone": "Off",
  "config.gauge.thresholdDisplayMarker": "Threshold Markers",
  "config.gauge.thresholdDisplayTrack": "Track Bands",
  "config.gauge.orientation": "Layout",
  "config.gauge.orientationAuto": "Auto Grid",
  "config.gauge.orientationHorizontal": "Horizontal",
  "config.gauge.orientationVertical": "Vertical",
  "config.gauge.valueOffsetY": "Value Y Offset",
  // Style section - gradient, nulls, points, stacking
  "config.field.gradientMode": "Gradient Mode",
  "config.gradient.none": "None",
  "config.gradient.opacity": "Opacity",
  "config.gradient.hue": "Hue",
  "config.gradient.scheme": "Scheme",
  "config.field.spanNulls": "Connect Null Values",
  "config.field.insertNulls": "Disconnect Values",
  "config.nulls.never": "Never",
  "config.nulls.always": "Always",
  "config.nulls.threshold": "Threshold",
  "config.points.auto": "Auto",
  "config.points.always": "Always",
  "config.points.never": "Never",
  "config.field.stackSeries": "Stack Series",
  "config.stack.none": "None",
  "config.stack.normal": "Normal",
  "config.stack.percent": "100%",
  // General section
  "config.field.colorSingle": "Fixed Color",
  "config.field.colorDistribution": "Color Distribution",
  "config.colorDist.sequential": "Sequential",
  "config.colorDist.distributed": "Distributed",
  "config.link.newTab": "Open in new tab",
  "config.link.add": "Add link",
  // Bar style
  "config.field.barShowValues": "Show Values",
  "config.showValues.auto": "Auto",
  "config.showValues.always": "Always",
  "config.showValues.never": "Never",
  "config.field.barGroupWidth": "Group Width",
  "config.field.barWidth": "Bar Width",
  "config.field.xTickRotation": "Rotate X Labels",
  // Stat style
  "config.field.orientation": "Orientation",
  "config.orientation.vertical": "Auto (Vertical)",
  "config.orientation.horizontal": "Horizontal",
  "config.field.textMode": "Text Mode",
  "config.textMode.valueAndName": "Value and name",
  "config.textMode.value": "Value only",
  "config.textMode.name": "Name only",
  "config.textMode.none": "None",
  "config.field.colorMode": "Color mode",
  "config.colorMode.value": "Value",
  "config.colorMode.backgroundSolid": "Background Solid",
  "config.colorMode.background": "Background Gradient",
  "config.field.percentChange": "Percent Change",
  "config.field.value": "Value",
  "config.field.unitLabel": "Unit Label",
  "config.field.trend": "Trend",
  // Histogram style
  "config.field.histBucketCount": "Bucket Count",
  "config.field.histBucketSize": "Bucket Size",
  "config.field.histBucketOffset": "Bucket Offset",
  "config.field.histCombineSeries": "Combine Series",
  "config.hist.bucketSizePlaceholder": "Auto",
  // Table style
  "config.field.tableFooterEnabled": "Footer Row",
  "config.field.tableFooterReducers": "Footer Calculation",
  "config.field.tableFooterFields": "Fields",
  "config.field.tableFooterFieldsPlaceholder": "All Numeric Fields",
  "config.section.tableColumnOverrides": "Column Overrides",
  // Axes section
  "config.field.axisName": "Name",
  "config.field.axisLabel": "Label",
  "config.field.axisWidth": "Width",
  "config.field.gridColor": "Grid Color",
  "config.field.axisLine": "Tick Labels",
  "config.field.axisLineColor": "Tick Label Color",
  "config.field.axisTickShow": "Tick Marks",
  "config.field.axisBorder": "Border",
  "config.field.axisBorderColor": "Border Color",
  "config.axis.label.placeholder": "Axis label",
  "config.axis.name.placeholder": "Axis name",
  "config.axis.grid.x": "X",
  "config.axis.grid.y": "Y",
  "config.axis.scale.symlog": "Symlog",
  // Tooltip section
  "config.field.tooltipSort": "Tooltip Sort",
  "config.field.tooltipMaxHeight": "List Max Height",
  "config.field.axisPointer": "Axis Pointer",
  // Unit options
  "config.unit.s": "Seconds (s)",
  "config.unit.bytes": "Bytes",
  "config.unit.percentunit": "Percent (0-1)",
  "config.unit.ops": "Ops/sec",
  "config.unit.bps": "Bits/sec",
  "config.unit.Bps": "Bytes/sec",
  // Gauge
  "config.gauge.arcSweep": "Arc Sweep",
  "config.gauge.paddingX": "Horizontal Padding",
  "config.gauge.paddingY": "Vertical Padding",
  "config.gauge.valueColor": "Value Color",
  "config.gauge.valueSize": "Value Size",
  "config.gauge.colorFromScheme": "Color from Scheme",
  "config.gauge.thresholdLabelDisplay": "Threshold Labels",
  "config.gauge.thresholdLabelNone": "Hidden",
  "config.gauge.thresholdLabelLabel": "Label",
  "config.gauge.thresholdLabelValue": "Value",
  "config.gauge.thresholdLabelBoth": "Label + Value",
  // Panel no data
  "panel.noData": "No data",
  // Override editor
  "config.override.addRule": "Add field override",
  "config.override.addProp": "Add override property",
  "config.override.matcher.byName": "Fields with name",
  "config.override.matcher.byType": "Fields with type",
  "config.override.matcher.byRegexp": "Fields matching regex",
  "config.override.matcher.byFrameRefID": "Fields returned by query",
  "config.override.prop.unit": "Unit",
  "config.override.prop.decimals": "Decimals",
  "config.override.prop.displayName": "Display name",
  "config.override.prop.min": "Min",
  "config.override.prop.max": "Max",
  "config.override.prop.noValue": "No value",
  "config.override.prop.filterable": "Filterable",
  "config.override.prop.thresholds": "Thresholds",
  "config.override.prop.displayMode": "Display mode",
  "config.override.prop.width": "Column width",
  "config.override.prop.align": "Alignment",
  "config.override.prop.hidden": "Hide column",
  "config.override.prop.wrapText": "Wrap text",
  "config.override.group.basic": "Standard options",
  "config.override.group.thresholds": "Thresholds",
  "config.override.group.table": "Table",
  "config.override.type.time": "Time",
  "config.override.type.number": "Number",
  "config.override.type.string": "String",
  "config.override.type.boolean": "Boolean",
  // Table column overrides
  "config.field.tableColHidden": "Hide",
  "config.field.tableColLabel": "Label",
  "config.field.tableColWidth": "Width",
  "config.field.tableColAlign": "Alignment",
  "config.field.tableColDisplayMode": "Display Mode",
  "config.field.tableColWrapText": "Wrap text",
  "config.field.tableColAddName": "Column name",
  "config.tableAlign.auto": "Auto",
  "config.tableAlign.left": "Left",
  "config.tableAlign.center": "Center",
  "config.tableAlign.right": "Right",
  "config.tableDisplayMode.auto": "Auto",
  "config.tableDisplayMode.colored-text": "Colored Text",
  "config.tableDisplayMode.colored-background": "Colored Background",
  "config.tableDisplayMode.gauge": "Gauge",
  "config.tableDisplayMode.data-links": "Data Links",
  "config.tableDisplayMode.json-view": "JSON View",
  "config.tableDisplayMode.pill": "Pill",
  // StatsPicker
  "config.reducer.group.standard": "Standard",
  "config.reducer.group.extended": "Extended",
  "config.reducer.group.boolean": "Boolean",
  "config.reducer.group.percentile": "Percentile",
  "config.reducer.choose": "Choose",
  // Pie limit
  "config.field.pieLimit": "Limit",
  // Variable datasource section
  "variable.ds.title": "Data source options",
  "variable.ds.type": "Data source type",
  "variable.ds.type.placeholder": "Select data source type",
  "variable.ds.filterRegex": "Instance filter regex",
  "variable.ds.multi": "Multi-value",
  "variable.ds.includeAll": "Include All option",
  // Editor - VizPicker
  "editor.vizPicker.title": "Visualization",
  // Editor - Overrides
  "editor.overrides.matcherValue": "Match value",
  "editor.overrides.propValue": "Property value",
  "editor.overrides.addProperty": "Add override property",
  "editor.overrides.addOverride": "Add field override",
  // Zabbix QueryEditor — query types
  "qb.queryType": "Query type",
  "qb.queryType.metrics": "Metrics",
  "qb.queryType.text": "Text",
  "qb.queryType.services": "IT Services",
  "qb.queryType.itemid": "Item ID",
  "qb.queryType.triggers": "Triggers",
  "qb.queryType.problems": "Problems",
  "qb.queryType.macros": "Macros",
  "qb.queryType.lld": "LLD",
  // Zabbix QueryEditor — host/group/item fields
  "panel.group": "Host group",
  "panel.group.placeholder": "Select host group",
  "panel.host": "Host",
  "panel.host.placeholder": "Select host",
  "panel.itemTag": "Item tag",
  "panel.itemTag.placeholder": "Filter by tag",
  "panel.items": "Items",
  "panel.items.placeholder": "Select item",
  // Zabbix QueryEditor — query fields
  "qb.textFilter": "Text filter",
  "qb.textFilter.placeholder": "Regex pattern",
  "qb.useCaptureGroups": "Use capture groups",
  "qb.itemIds": "Item IDs",
  "qb.itemIds.placeholder": "Comma-separated IDs",
  "qb.triggerFilter": "Trigger filter",
  "qb.triggerFilter.placeholder": "Trigger name",
  "qb.problemName": "Problem name",
  "qb.problemName.placeholder": "Filter by name",
  "qb.tags": "Tags",
  "qb.tags.placeholder": "tag:value",
  "qb.show": "Show",
  "qb.severity": "Severity",
  "qb.itService": "IT Service",
  "qb.itService.placeholder": "Select IT service",
  "qb.slaProperty": "SLA property",
  "qb.slaInterval": "SLA interval",
  "qb.macroFilter": "Macro filter",
  // Zabbix QueryEditor — LLD
  "qb.lld.rule": "Discovery rule",
  "qb.lld.rule.placeholder": "Select discovery rule",
  "qb.lld.itemKeys": "Item prototype keys",
  "qb.lld.itemKeys.placeholder": "Select prototype keys",
  // Zabbix QueryEditor — options
  "qb.ack.all": "All",
  "qb.ack.unack": "Unacknowledged",
  "qb.ack.ack": "Acknowledged",
  "qb.sort.default": "Default",
  "qb.sort.lastchange": "Last change",
  "qb.sort.severity": "Severity",
  "qb.trends.default": "Default",
  "qb.trends.true": "Use trends",
  "qb.trends.false": "No trends",
  "qb.options.trends": "Trends",
  "qb.options.showDisabled": "Show disabled",
  "qb.options.valueMapping": "Use value mapping",
  "qb.options.disableAlignment": "Disable alignment",
  "qb.options.acknowledged": "Acknowledged",
  "qb.options.sortBy": "Sort by",
  "qb.options.useTimeRange": "Use time range",
  "qb.options.hostsInMaintenance": "Hosts in maintenance",
  "qb.options.hostProxy": "Host proxy",
  "qb.options.limit": "Limit"
}, iw = {
  "panel.noData": "暂无数据",
  "common.auto": "自动",
  "app.tab.dashboard": "仪表盘",
  "app.tab.scene": "场景视图",
  "app.tab.topology": "拓扑",
  "app.tab.logs": "日志",
  "app.tab.traces": "链路追踪",
  "app.tab.querybuilder": "查询构建器",
  "app.tab.grafana": "Grafana 数据",
  "app.tab.zabbix": "Zabbix",
  "app.theme.toDark": "切换深色",
  "app.theme.toLight": "切换浅色",
  "time.last1h": "最近 1 小时",
  "time.last3h": "最近 3 小时",
  "time.last6h": "最近 6 小时",
  "time.last24h": "最近 24 小时",
  "time.last7d": "最近 7 天",
  "time.last30d": "最近 30 天",
  "panel.menu.edit": "编辑",
  "panel.menu.clone": "克隆",
  "panel.menu.fullscreen": "全屏",
  "panel.menu.refresh": "刷新",
  "panel.menu.remove": "删除",
  "panel.remove.title": '删除 "{title}"？',
  "panel.remove.content": "此操作不可撤销。",
  "panel.remove.ok": "删除",
  "dashboard.edit": "编辑",
  "dashboard.save": "保存",
  "dashboard.cancel": "取消",
  "dashboard.cancelConfirmTitle": "放弃未保存的更改？",
  "dashboard.cancelConfirmOk": "放弃更改",
  "dashboard.cancelConfirmCancel": "继续编辑",
  "dashboard.addPanel": "添加面板",
  "dashboard.clearPanels": "清空面板",
  "dashboard.clearConfirmTitle": "清空所有面板？",
  "dashboard.clearConfirmOk": "确认清空",
  "dashboard.export": "导出",
  "dashboard.import": "导入",
  "dashboard.exportSuccess": "仪表盘已导出",
  "dashboard.importSuccess": "仪表盘已导入",
  "dashboard.importError": "无效的仪表盘 JSON",
  "config.section.general": "基本信息",
  "config.section.value": "数据设置",
  "config.section.style": "图形样式",
  "config.section.tooltip": "悬浮提示窗",
  "config.section.format": "格式化",
  "config.section.thresholds": "阈值 ({n})",
  "config.section.axes": "坐标轴",
  "config.section.links": "链接 ({n})",
  "config.section.gaugeStyle": "图形样式",
  "config.section.pieStyle": "饼图样式",
  "config.section.histStyle": "直方图样式",
  "config.section.tableStyle": "表格样式",
  "config.section.overrides": "字段覆盖",
  "config.type.timeseries": "时序图",
  "config.type.bar": "柱状图",
  "config.type.histogram": "直方图",
  "config.type.stat": "统计值",
  "config.type.gauge": "仪表盘",
  "config.type.table": "表格",
  "config.type.pie": "饼图",
  "panel.type.desc.timeseries": "带时间轴的折线/面积图",
  "panel.type.desc.bar": "分组或堆叠柱状图",
  "panel.type.desc.histogram": "数值分布直方图",
  "panel.type.desc.stat": "单值统计 + 迷你图",
  "panel.type.desc.gauge": "圆弧仪表盘",
  "panel.type.desc.table": "可排序数据表格",
  "panel.type.desc.pie": "饼图 / 环形图",
  "config.field.title": "标题",
  "config.field.description": "描述",
  "config.field.panelType": "面板类型",
  "config.field.colorScheme": "配色方案",
  "config.field.lineWidth": "线宽",
  "config.field.fillOpacity": "填充透明度",
  "config.field.drawStyle": "图形样式",
  "config.field.interpolation": "插值方式",
  "config.field.lineStyle": "线条样式",
  "config.field.showPoints": "显示数据点",
  "config.field.legendPosition": "图例位置",
  "config.field.unit": "单位",
  "config.field.decimals": "小数位数",
  "config.field.min": "最小值",
  "config.field.max": "最大值",
  "config.field.reducer": "计算方式",
  "config.field.tooltipMode": "浮窗触发模式",
  "config.field.softMin": "软最小值",
  "config.field.softMax": "软最大值",
  "config.field.logScale": "对数刻度",
  "config.field.axisPlacement": "轴位置",
  "config.field.showGridLines": "网格线",
  "config.field.scaleDistribution": "刻度类型",
  "config.field.centeredZero": "零点居中",
  "config.field.stacked": "堆叠",
  "config.interp.linear": "线性",
  "config.interp.smooth": "平滑",
  "config.interp.step": "阶梯",
  "config.linestyle.solid": "实线",
  "config.linestyle.dashed": "虚线",
  "config.linestyle.dotted": "点线",
  "config.legend.bottom": "底部",
  "config.legend.right": "右侧",
  "config.legend.hidden": "隐藏",
  "config.unit.none": "无",
  "config.unit.ms": "毫秒 (ms)",
  "config.unit.percent": "百分比 (0-100)",
  "config.unit.reqps": "请求/秒",
  "config.threshold.label": "标签",
  "config.threshold.base": "基础色",
  "config.threshold.add": "添加阈值",
  "config.threshold.mode": "阈值模式",
  "config.threshold.modeAbsolute": "绝对值",
  "config.threshold.modePercentage": "百分比",
  "dashboard.refresh": "刷新",
  "variable.modal.placeholder": '点击左侧"新增变量"开始配置',
  "variable.custom.title": "自定义选项",
  "variable.custom.add": "添加选项",
  "variable.custom.allValue": "全部值",
  "config.scheme.grafana-classic": "Grafana 经典",
  "config.scheme.green-yellow-red": "绿黄红",
  "config.scheme.red-yellow-green": "红黄绿",
  "config.scheme.blue-yellow-red": "蓝黄红",
  "config.scheme.blue-purple": "蓝紫",
  "config.scheme.yellow-blue": "黄蓝",
  "config.scheme.blues": "蓝色系",
  "config.scheme.reds": "红色系",
  "config.scheme.GrYlRd": "GrYlRd",
  "config.scheme.purple-orange": "紫橙",
  "variable.modal.title": "变量配置",
  "variable.modal.save": "保存",
  "variable.modal.cancel": "取消",
  "variable.modal.delete": "删除变量",
  "variable.modal.add": "新增变量",
  "variable.modal.empty": '点击左侧"新增变量"开始配置',
  "variable.nav.count": "变量 ({n})",
  "variable.nav.unnamed": "(未命名)",
  "variable.general.title": "基本信息",
  "variable.general.type": "类型",
  "variable.general.name": "名称",
  "variable.general.label": "标签",
  "variable.general.description": "描述",
  "variable.type.custom": "自定义",
  "variable.type.query": "查询",
  "variable.type.textbox": "文本框",
  "variable.type.datasource": "数据源",
  "variable.type.constant": "常量",
  "variable.query.title": "查询选项",
  "variable.query.multi": "多选",
  "variable.query.includeAll": "包含全选项",
  "variable.query.refresh": "刷新时机",
  "variable.query.refresh.onLoad": "仪表盘加载时",
  "variable.query.refresh.onTimeChange": "时间范围变化时",
  "qb.datasource": "数据源",
  "qb.addQuery": "添加查询",
  "qb.queryOptions": "查询选项",
  "qb.pattern": "数据模式",
  "qb.pattern.sine": "正弦波",
  "qb.pattern.spike": "尖峰",
  "qb.pattern.step": "阶梯",
  "qb.pattern.sawtooth": "锯齿波",
  "qb.pattern.noise": "随机噪声",
  "qb.pattern.trendUp": "上升趋势",
  "qb.pattern.trendDown": "下降趋势",
  "qb.pattern.plateau": "平台",
  "qb.pattern.randomWalk": "随机游走",
  "qb.pattern.live": "实时",
  "qb.seriesCount": "序列数量",
  "qb.liveAmplitude": "振幅",
  "qb.functions": "函数",
  "qb.functions.add": "添加",
  "qb.options": "选项",
  "qb.queryOptions.maxDataPoints": "最大数据点数",
  "qb.queryOptions.minInterval": "最小间隔",
  "qb.queryOptions.minIntervalPlaceholder": "不限制",
  "qb.queryOptions.interval": "间隔",
  "qb.queryOptions.intervalHint": "时间范围 / 最大数据点数",
  "qb.queryOptions.relativeTime": "相对时间",
  "qb.queryOptions.timeShift": "时间偏移",
  "config.scheme.classic": "经典配色",
  "config.scheme.tableau10": "Tableau配色",
  "config.scheme.fixed": "单色",
  "config.scheme.thresholds": "来自阈值",
  "config.trend.up": "上升 ↑",
  "config.trend.down": "下降 ↓",
  "config.trend.flat": "持平",
  "config.field.pieType": "饼图类型",
  "config.field.pieSliceSorting": "扇区排序",
  "config.pieType.pie": "实心饼",
  "config.pieType.donut": "环形图",
  "config.sort.desc": "降序",
  "config.sort.asc": "升序",
  "config.sort.none": "不排序",
  "config.field.pieLabels": "扇区标签",
  "config.pieLabel.name": "名称",
  "config.pieLabel.percent": "百分比",
  "config.pieLabel.value": "数值",
  "config.field.pieShow": "数据聚合",
  "config.pieShow.calculate": "聚合（Reducer）",
  "config.pieShow.all": "全部值",
  "config.field.legendMode": "图例模式",
  "config.legendMode.list": "列表",
  "config.legendMode.table": "表格",
  "config.field.legendValues": "图例统计值",
  "config.legendValue.min": "最小值",
  "config.legendValue.max": "最大值",
  "config.legendValue.mean": "平均值",
  "config.legendValue.sum": "求和",
  "config.legendValue.last": "最后值",
  "config.legendValue.first": "第一个值",
  "tooltip.pinned": "已固定",
  "tooltip.datetimeFormat": "YYYY-MM-DD HH:mm:ss",
  "config.reducer.lastNotNull": "最后非空值",
  "config.reducer.last": "最后值",
  "config.reducer.firstNotNull": "第一个非空值",
  "config.reducer.first": "第一个值",
  "config.reducer.min": "最小值",
  "config.reducer.max": "最大值",
  "config.reducer.mean": "平均值",
  "config.reducer.sum": "求和",
  "config.reducer.count": "计数",
  "config.reducer.range": "范围",
  "config.reducer.median": "中位数",
  "config.reducer.stdDev": "标准差",
  "config.reducer.variance": "方差",
  "config.reducer.delta": "增量",
  "config.reducer.diff": "差值",
  "config.reducer.diffperc": "差值 %",
  "config.reducer.step": "步长",
  "config.reducer.logmin": "最小正值",
  "config.reducer.countAll": "总计数",
  "config.reducer.changeCount": "变化次数",
  "config.reducer.distinctCount": "唯一值数",
  "config.reducer.allIsZero": "全为零",
  "config.reducer.allIsNull": "全为空",
  "config.drawStyle.lines": "折线",
  "config.drawStyle.bars": "柱状",
  "config.drawStyle.points": "散点",
  "config.tooltip.single": "单系列",
  "config.tooltip.multi": "全部",
  "config.tooltip.none": "隐藏",
  "config.tooltip.sortNone": "默认",
  "config.tooltip.sortAsc": "升序",
  "config.tooltip.sortDesc": "降序",
  "config.axis.placement.left": "左侧",
  "config.axis.placement.right": "右侧",
  "config.axis.placement.hidden": "隐藏",
  "config.axis.grid.all": "开启",
  "config.axis.grid.hidden": "隐藏",
  "config.axis.scale.linear": "线性",
  "config.axis.scale.logarithmic": "对数",
  "config.gauge.fillWidth": "激活弧宽度",
  "config.gauge.trackWidth": "轨道宽度",
  "config.gauge.trackColor": "轨道背景色",
  "config.gauge.capRound": "圆角",
  "config.gauge.valueVisible": "显示数值",
  "config.gauge.thresholdDisplay": "显示阈值方式",
  "config.gauge.thresholdDisplayNone": "不显示",
  "config.gauge.thresholdDisplayMarker": "阈值标记条",
  "config.gauge.thresholdDisplayTrack": "轨道阈值条",
  "config.gauge.orientation": "排列方式",
  "config.gauge.orientationAuto": "自动网格",
  "config.gauge.orientationHorizontal": "水平排列",
  "config.gauge.orientationVertical": "垂直排列",
  "config.gauge.valueOffsetY": "数值 Y 偏移",
  // Style section - gradient, nulls, points, stacking
  "config.field.gradientMode": "渐变模式",
  "config.gradient.none": "无",
  "config.gradient.opacity": "透明度",
  "config.gradient.hue": "色相",
  "config.gradient.scheme": "配色",
  "config.field.spanNulls": "连接空值",
  "config.field.insertNulls": "断开空值",
  "config.nulls.never": "从不",
  "config.nulls.always": "始终",
  "config.nulls.threshold": "阈值",
  "config.points.auto": "自动",
  "config.points.always": "始终",
  "config.points.never": "从不",
  "config.field.stackSeries": "堆叠序列",
  "config.stack.none": "无",
  "config.stack.normal": "普通",
  "config.stack.percent": "100%",
  // General section
  "config.field.colorSingle": "固定颜色",
  "config.field.colorDistribution": "颜色分布",
  "config.colorDist.sequential": "顺序",
  "config.colorDist.distributed": "分散",
  "config.link.newTab": "新标签页打开",
  "config.link.add": "添加链接",
  // Bar style
  "config.field.barShowValues": "显示数值",
  "config.showValues.auto": "自动",
  "config.showValues.always": "始终",
  "config.showValues.never": "从不",
  "config.field.barGroupWidth": "组宽度",
  "config.field.barWidth": "柱宽",
  "config.field.xTickRotation": "旋转 X 标签",
  // Stat style
  "config.field.orientation": "方向",
  "config.orientation.vertical": "自动（垂直）",
  "config.orientation.horizontal": "水平",
  "config.field.textMode": "文本模式",
  "config.textMode.valueAndName": "数值和名称",
  "config.textMode.value": "仅数值",
  "config.textMode.name": "仅名称",
  "config.textMode.none": "无",
  "config.field.colorMode": "颜色模式",
  "config.colorMode.value": "数值",
  "config.colorMode.backgroundSolid": "纯色背景",
  "config.colorMode.background": "渐变背景",
  "config.field.percentChange": "百分比变化",
  "config.field.value": "数值",
  "config.field.unitLabel": "单位标签",
  "config.field.trend": "趋势",
  // Histogram style
  "config.field.histBucketCount": "分桶数",
  "config.field.histBucketSize": "桶大小",
  "config.field.histBucketOffset": "桶偏移",
  "config.field.histCombineSeries": "合并序列",
  "config.hist.bucketSizePlaceholder": "自动",
  // Table style
  "config.field.tableFooterEnabled": "底栏行",
  "config.field.tableFooterReducers": "底栏计算",
  "config.field.tableFooterFields": "字段",
  "config.field.tableFooterFieldsPlaceholder": "所有数值字段",
  "config.section.tableColumnOverrides": "列覆盖",
  // Axes section
  "config.field.axisName": "名称",
  "config.field.axisLabel": "标签",
  "config.field.axisWidth": "宽度",
  "config.field.gridColor": "网格颜色",
  "config.field.axisLine": "刻度标签",
  "config.field.axisLineColor": "刻度标签颜色",
  "config.field.axisTickShow": "刻度线",
  "config.field.axisBorder": "边框",
  "config.field.axisBorderColor": "边框颜色",
  "config.axis.label.placeholder": "坐标轴标签",
  "config.axis.name.placeholder": "坐标轴名称",
  "config.axis.grid.x": "X",
  "config.axis.grid.y": "Y",
  "config.axis.scale.symlog": "对称对数",
  // Tooltip section
  "config.field.tooltipSort": "浮窗排序",
  "config.field.tooltipMaxHeight": "列表最大高度",
  "config.field.axisPointer": "坐标轴指针",
  // Unit options
  "config.unit.s": "秒 (s)",
  "config.unit.bytes": "字节",
  "config.unit.percentunit": "百分比 (0-1)",
  "config.unit.ops": "操作/秒",
  "config.unit.bps": "比特/秒",
  "config.unit.Bps": "字节/秒",
  // Gauge
  "config.gauge.arcSweep": "弧度",
  "config.gauge.paddingX": "水平内边距",
  "config.gauge.paddingY": "垂直内边距",
  "config.gauge.valueColor": "数值颜色",
  "config.gauge.valueSize": "数值大小",
  "config.gauge.colorFromScheme": "来自配色方案",
  "config.gauge.thresholdLabelDisplay": "阈值标签",
  "config.gauge.thresholdLabelNone": "隐藏",
  "config.gauge.thresholdLabelLabel": "标签",
  "config.gauge.thresholdLabelValue": "数值",
  "config.gauge.thresholdLabelBoth": "标签 + 数值",
  // Override editor
  "config.override.addRule": "添加字段覆盖",
  "config.override.addProp": "添加覆盖属性",
  "config.override.matcher.byName": "按名称匹配字段",
  "config.override.matcher.byType": "按类型匹配字段",
  "config.override.matcher.byRegexp": "按正则匹配字段",
  "config.override.matcher.byFrameRefID": "按查询返回匹配",
  "config.override.prop.unit": "单位",
  "config.override.prop.decimals": "小数位",
  "config.override.prop.displayName": "显示名称",
  "config.override.prop.min": "最小值",
  "config.override.prop.max": "最大值",
  "config.override.prop.noValue": "无数据文本",
  "config.override.prop.filterable": "可筛选",
  "config.override.prop.thresholds": "阈值",
  "config.override.prop.displayMode": "显示模式",
  "config.override.prop.width": "列宽",
  "config.override.prop.align": "对齐",
  "config.override.prop.hidden": "隐藏列",
  "config.override.prop.wrapText": "自动换行",
  "config.override.group.basic": "标准选项",
  "config.override.group.thresholds": "阈值",
  "config.override.group.table": "表格",
  "config.override.type.time": "时间",
  "config.override.type.number": "数值",
  "config.override.type.string": "字符串",
  "config.override.type.boolean": "布尔",
  // Table column overrides
  "config.field.tableColHidden": "隐藏",
  "config.field.tableColLabel": "标签",
  "config.field.tableColWidth": "宽度",
  "config.field.tableColAlign": "对齐",
  "config.field.tableColDisplayMode": "显示模式",
  "config.field.tableColWrapText": "自动换行",
  "config.field.tableColAddName": "列名",
  "config.tableAlign.auto": "自动",
  "config.tableAlign.left": "左对齐",
  "config.tableAlign.center": "居中",
  "config.tableAlign.right": "右对齐",
  "config.tableDisplayMode.auto": "自动",
  "config.tableDisplayMode.colored-text": "彩色文字",
  "config.tableDisplayMode.colored-background": "彩色背景",
  "config.tableDisplayMode.gauge": "仪表盘",
  "config.tableDisplayMode.data-links": "数据链接",
  "config.tableDisplayMode.json-view": "JSON 视图",
  "config.tableDisplayMode.pill": "标签",
  // StatsPicker
  "config.reducer.group.standard": "标准",
  "config.reducer.group.extended": "扩展",
  "config.reducer.group.boolean": "布尔",
  "config.reducer.group.percentile": "百分位",
  "config.reducer.choose": "选择",
  // Pie limit
  "config.field.pieLimit": "数量限制",
  // Variable datasource section
  "variable.ds.title": "数据源选项",
  "variable.ds.type": "数据源类型",
  "variable.ds.type.placeholder": "选择数据源类型",
  "variable.ds.filterRegex": "实例过滤正则",
  "variable.ds.multi": "多选",
  "variable.ds.includeAll": "包含全选项",
  // Editor - VizPicker
  "editor.vizPicker.title": "可视化类型",
  // Editor - Overrides
  "editor.overrides.matcherValue": "匹配值",
  "editor.overrides.propValue": "属性值",
  "editor.overrides.addProperty": "添加属性覆盖",
  "editor.overrides.addOverride": "添加字段覆盖",
  // Zabbix QueryEditor — query types
  "qb.queryType": "查询类型",
  "qb.queryType.metrics": "指标",
  "qb.queryType.text": "文本",
  "qb.queryType.services": "IT服务",
  "qb.queryType.itemid": "监控项ID",
  "qb.queryType.triggers": "触发器",
  "qb.queryType.problems": "告警",
  "qb.queryType.macros": "宏变量",
  "qb.queryType.lld": "自动发现",
  // Zabbix QueryEditor — host/group/item fields
  "panel.group": "主机组",
  "panel.group.placeholder": "选择主机组",
  "panel.host": "主机",
  "panel.host.placeholder": "选择主机",
  "panel.itemTag": "监控项标签",
  "panel.itemTag.placeholder": "按标签过滤",
  "panel.items": "监控项",
  "panel.items.placeholder": "选择监控项",
  // Zabbix QueryEditor — query fields
  "qb.textFilter": "文本过滤",
  "qb.textFilter.placeholder": "正则表达式",
  "qb.useCaptureGroups": "使用捕获分组",
  "qb.itemIds": "监控项 ID",
  "qb.itemIds.placeholder": "多个 ID 用逗号分隔",
  "qb.triggerFilter": "触发器过滤",
  "qb.triggerFilter.placeholder": "触发器名称",
  "qb.problemName": "告警名称",
  "qb.problemName.placeholder": "告警名称过滤",
  "qb.tags": "标签",
  "qb.tags.placeholder": "tag:value",
  "qb.show": "显示",
  "qb.severity": "严重程度",
  "qb.itService": "IT服务",
  "qb.itService.placeholder": "选择IT服务",
  "qb.slaProperty": "SLA属性",
  "qb.slaInterval": "SLA时间间隔",
  "qb.macroFilter": "宏过滤",
  // Zabbix QueryEditor — LLD
  "qb.lld.rule": "发现规则",
  "qb.lld.rule.placeholder": "选择发现规则",
  "qb.lld.itemKeys": "监控项原型键",
  "qb.lld.itemKeys.placeholder": "选择原型键",
  // Zabbix QueryEditor — options
  "qb.ack.all": "所有",
  "qb.ack.unack": "未确认",
  "qb.ack.ack": "已确认",
  "qb.sort.default": "默认",
  "qb.sort.lastchange": "最后变更",
  "qb.sort.severity": "严重程度",
  "qb.trends.default": "默认",
  "qb.trends.true": "使用趋势",
  "qb.trends.false": "不使用趋势",
  "qb.options.trends": "趋势数据",
  "qb.options.showDisabled": "显示禁用项",
  "qb.options.valueMapping": "使用 Zabbix 值映射",
  "qb.options.disableAlignment": "禁用数据对齐",
  "qb.options.acknowledged": "确认状态",
  "qb.options.sortBy": "排序",
  "qb.options.useTimeRange": "使用时间范围",
  "qb.options.hostsInMaintenance": "维护中主机",
  "qb.options.hostProxy": "Host Proxy",
  "qb.options.limit": "数量限制"
}, CO = { zh: iw, en: SO }, aw = Symbol("lang");
function $O(e) {
  kt(aw, e);
}
function jt() {
  const e = Tt(aw, le("zh"));
  function t(n, o) {
    let a = CO[e.value][n] ?? iw[n] ?? n;
    if (o)
      for (const [r, l] of Object.entries(o))
        a = a.replace(`{${r}}`, String(l));
    return a;
  }
  return { t, lang: e };
}
const PO = {
  hideHeader: !1,
  canEdit: !0,
  theme: null,
  lang: null,
  isEditing: null,
  initialEditingPanelId: null,
  datasourceConfig: null
}, rw = Symbol("argusBoardConfig");
function lw(e) {
  return { config: nO(le(e)) };
}
function OO(e) {
  const t = lw(e);
  return kt(rw, t), t;
}
function Uu() {
  const e = Tt(rw);
  return e || lw(PO);
}
async function IO(e) {
  const t = await fetch(`${e.url}/v5/metrics`, {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      ...e.token ? { Authorization: `Bearer ${e.token}` } : {}
    }
  });
  if (!t.ok)
    throw new Error(`Argus API HTTP error: ${t.status}`);
  return (await t.json()).data?.metrics ?? [];
}
async function MO(e, t) {
  const n = new URLSearchParams({ signal: t.signal });
  t.metricName && n.set("metricName", t.metricName), t.search && n.set("search", t.search);
  const o = await fetch(`${e.url}/v5/attribute_keys?${n.toString()}`, {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      ...e.token ? { Authorization: `Bearer ${e.token}` } : {}
    }
  });
  if (!o.ok)
    throw new Error(`Argus API HTTP error: ${o.status}`);
  return (await o.json()).data?.attributeKeys ?? [];
}
var hg = /* @__PURE__ */ ((e) => (e.time = "time", e.number = "number", e.string = "string", e.boolean = "boolean", e.trace = "trace", e.geo = "geo", e.enum = "enum", e.other = "other", e.frame = "frame", e.nestedFrames = "nestedFrames", e))(hg || {});
function TO(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function wd(e) {
  "@babel/helpers - typeof";
  return wd = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, wd(e);
}
var kO = /^\s+/, EO = /\s+$/;
function gt(e, t) {
  if (e = e || "", t = t || {}, e instanceof gt)
    return e;
  if (!(this instanceof gt))
    return new gt(e, t);
  var n = _O(e);
  this._originalInput = e, this._r = n.r, this._g = n.g, this._b = n.b, this._a = n.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || n.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = n.ok;
}
gt.prototype = {
  isDark: function() {
    return this.getBrightness() < 128;
  },
  isLight: function() {
    return !this.isDark();
  },
  isValid: function() {
    return this._ok;
  },
  getOriginalInput: function() {
    return this._originalInput;
  },
  getFormat: function() {
    return this._format;
  },
  getAlpha: function() {
    return this._a;
  },
  getBrightness: function() {
    var t = this.toRgb();
    return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
  },
  getLuminance: function() {
    var t = this.toRgb(), n, o, i, a, r, l;
    return n = t.r / 255, o = t.g / 255, i = t.b / 255, n <= 0.03928 ? a = n / 12.92 : a = Math.pow((n + 0.055) / 1.055, 2.4), o <= 0.03928 ? r = o / 12.92 : r = Math.pow((o + 0.055) / 1.055, 2.4), i <= 0.03928 ? l = i / 12.92 : l = Math.pow((i + 0.055) / 1.055, 2.4), 0.2126 * a + 0.7152 * r + 0.0722 * l;
  },
  setAlpha: function(t) {
    return this._a = sw(t), this._roundA = Math.round(100 * this._a) / 100, this;
  },
  toHsv: function() {
    var t = Jm(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      v: t.v,
      a: this._a
    };
  },
  toHsvString: function() {
    var t = Jm(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.v * 100);
    return this._a == 1 ? "hsv(" + n + ", " + o + "%, " + i + "%)" : "hsva(" + n + ", " + o + "%, " + i + "%, " + this._roundA + ")";
  },
  toHsl: function() {
    var t = Zm(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      l: t.l,
      a: this._a
    };
  },
  toHslString: function() {
    var t = Zm(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.l * 100);
    return this._a == 1 ? "hsl(" + n + ", " + o + "%, " + i + "%)" : "hsla(" + n + ", " + o + "%, " + i + "%, " + this._roundA + ")";
  },
  toHex: function(t) {
    return eb(this._r, this._g, this._b, t);
  },
  toHexString: function(t) {
    return "#" + this.toHex(t);
  },
  toHex8: function(t) {
    return RO(this._r, this._g, this._b, this._a, t);
  },
  toHex8String: function(t) {
    return "#" + this.toHex8(t);
  },
  toRgb: function() {
    return {
      r: Math.round(this._r),
      g: Math.round(this._g),
      b: Math.round(this._b),
      a: this._a
    };
  },
  toRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
  },
  toPercentageRgb: function() {
    return {
      r: Math.round(Fn(this._r, 255) * 100) + "%",
      g: Math.round(Fn(this._g, 255) * 100) + "%",
      b: Math.round(Fn(this._b, 255) * 100) + "%",
      a: this._a
    };
  },
  toPercentageRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(Fn(this._r, 255) * 100) + "%, " + Math.round(Fn(this._g, 255) * 100) + "%, " + Math.round(Fn(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(Fn(this._r, 255) * 100) + "%, " + Math.round(Fn(this._g, 255) * 100) + "%, " + Math.round(Fn(this._b, 255) * 100) + "%, " + this._roundA + ")";
  },
  toName: function() {
    return this._a === 0 ? "transparent" : this._a < 1 ? !1 : YO[eb(this._r, this._g, this._b, !0)] || !1;
  },
  toFilter: function(t) {
    var n = "#" + tb(this._r, this._g, this._b, this._a), o = n, i = this._gradientType ? "GradientType = 1, " : "";
    if (t) {
      var a = gt(t);
      o = "#" + tb(a._r, a._g, a._b, a._a);
    }
    return "progid:DXImageTransform.Microsoft.gradient(" + i + "startColorstr=" + n + ",endColorstr=" + o + ")";
  },
  toString: function(t) {
    var n = !!t;
    t = t || this._format;
    var o = !1, i = this._a < 1 && this._a >= 0, a = !n && i && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
    return a ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
  },
  clone: function() {
    return gt(this.toString());
  },
  _applyModification: function(t, n) {
    var o = t.apply(null, [this].concat([].slice.call(n)));
    return this._r = o._r, this._g = o._g, this._b = o._b, this.setAlpha(o._a), this;
  },
  lighten: function() {
    return this._applyModification(LO, arguments);
  },
  brighten: function() {
    return this._applyModification(HO, arguments);
  },
  darken: function() {
    return this._applyModification(VO, arguments);
  },
  desaturate: function() {
    return this._applyModification(NO, arguments);
  },
  saturate: function() {
    return this._applyModification(BO, arguments);
  },
  greyscale: function() {
    return this._applyModification(FO, arguments);
  },
  spin: function() {
    return this._applyModification(jO, arguments);
  },
  _applyCombination: function(t, n) {
    return t.apply(null, [this].concat([].slice.call(n)));
  },
  analogous: function() {
    return this._applyCombination(GO, arguments);
  },
  complement: function() {
    return this._applyCombination(WO, arguments);
  },
  monochromatic: function() {
    return this._applyCombination(KO, arguments);
  },
  splitcomplement: function() {
    return this._applyCombination(qO, arguments);
  },
  // Disabled until https://github.com/bgrins/TinyColor/issues/254
  // polyad: function (number) {
  //   return this._applyCombination(polyad, [number]);
  // },
  triad: function() {
    return this._applyCombination(nb, [3]);
  },
  tetrad: function() {
    return this._applyCombination(nb, [4]);
  }
};
gt.fromRatio = function(e, t) {
  if (wd(e) == "object") {
    var n = {};
    for (var o in e)
      e.hasOwnProperty(o) && (o === "a" ? n[o] = e[o] : n[o] = du(e[o]));
    e = n;
  }
  return gt(e, t);
};
function _O(e) {
  var t = {
    r: 0,
    g: 0,
    b: 0
  }, n = 1, o = null, i = null, a = null, r = !1, l = !1;
  return typeof e == "string" && (e = ZO(e)), wd(e) == "object" && (Ea(e.r) && Ea(e.g) && Ea(e.b) ? (t = AO(e.r, e.g, e.b), r = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Ea(e.h) && Ea(e.s) && Ea(e.v) ? (o = du(e.s), i = du(e.v), t = zO(e.h, o, i), r = !0, l = "hsv") : Ea(e.h) && Ea(e.s) && Ea(e.l) && (o = du(e.s), a = du(e.l), t = DO(e.h, o, a), r = !0, l = "hsl"), e.hasOwnProperty("a") && (n = e.a)), n = sw(n), {
    ok: r,
    format: e.format || l,
    r: Math.min(255, Math.max(t.r, 0)),
    g: Math.min(255, Math.max(t.g, 0)),
    b: Math.min(255, Math.max(t.b, 0)),
    a: n
  };
}
function AO(e, t, n) {
  return {
    r: Fn(e, 255) * 255,
    g: Fn(t, 255) * 255,
    b: Fn(n, 255) * 255
  };
}
function Zm(e, t, n) {
  e = Fn(e, 255), t = Fn(t, 255), n = Fn(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), a, r, l = (o + i) / 2;
  if (o == i)
    a = r = 0;
  else {
    var s = o - i;
    switch (r = l > 0.5 ? s / (2 - o - i) : s / (o + i), o) {
      case e:
        a = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        a = (n - e) / s + 2;
        break;
      case n:
        a = (e - t) / s + 4;
        break;
    }
    a /= 6;
  }
  return {
    h: a,
    s: r,
    l
  };
}
function DO(e, t, n) {
  var o, i, a;
  e = Fn(e, 360), t = Fn(t, 100), n = Fn(n, 100);
  function r(u, c, d) {
    return d < 0 && (d += 1), d > 1 && (d -= 1), d < 1 / 6 ? u + (c - u) * 6 * d : d < 1 / 2 ? c : d < 2 / 3 ? u + (c - u) * (2 / 3 - d) * 6 : u;
  }
  if (t === 0)
    o = i = a = n;
  else {
    var l = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - l;
    o = r(s, l, e + 1 / 3), i = r(s, l, e), a = r(s, l, e - 1 / 3);
  }
  return {
    r: o * 255,
    g: i * 255,
    b: a * 255
  };
}
function Jm(e, t, n) {
  e = Fn(e, 255), t = Fn(t, 255), n = Fn(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), a, r, l = o, s = o - i;
  if (r = o === 0 ? 0 : s / o, o == i)
    a = 0;
  else {
    switch (o) {
      case e:
        a = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        a = (n - e) / s + 2;
        break;
      case n:
        a = (e - t) / s + 4;
        break;
    }
    a /= 6;
  }
  return {
    h: a,
    s: r,
    v: l
  };
}
function zO(e, t, n) {
  e = Fn(e, 360) * 6, t = Fn(t, 100), n = Fn(n, 100);
  var o = Math.floor(e), i = e - o, a = n * (1 - t), r = n * (1 - i * t), l = n * (1 - (1 - i) * t), s = o % 6, u = [n, r, a, a, l, n][s], c = [l, n, n, r, a, a][s], d = [a, a, l, n, n, r][s];
  return {
    r: u * 255,
    g: c * 255,
    b: d * 255
  };
}
function eb(e, t, n, o) {
  var i = [Wi(Math.round(e).toString(16)), Wi(Math.round(t).toString(16)), Wi(Math.round(n).toString(16))];
  return o && i[0].charAt(0) == i[0].charAt(1) && i[1].charAt(0) == i[1].charAt(1) && i[2].charAt(0) == i[2].charAt(1) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function RO(e, t, n, o, i) {
  var a = [Wi(Math.round(e).toString(16)), Wi(Math.round(t).toString(16)), Wi(Math.round(n).toString(16)), Wi(uw(o))];
  return i && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function tb(e, t, n, o) {
  var i = [Wi(uw(o)), Wi(Math.round(e).toString(16)), Wi(Math.round(t).toString(16)), Wi(Math.round(n).toString(16))];
  return i.join("");
}
gt.equals = function(e, t) {
  return !e || !t ? !1 : gt(e).toRgbString() == gt(t).toRgbString();
};
gt.random = function() {
  return gt.fromRatio({
    r: Math.random(),
    g: Math.random(),
    b: Math.random()
  });
};
function NO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.s -= t / 100, n.s = Xd(n.s), gt(n);
}
function BO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.s += t / 100, n.s = Xd(n.s), gt(n);
}
function FO(e) {
  return gt(e).desaturate(100);
}
function LO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.l += t / 100, n.l = Xd(n.l), gt(n);
}
function HO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toRgb();
  return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), gt(n);
}
function VO(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = gt(e).toHsl();
  return n.l -= t / 100, n.l = Xd(n.l), gt(n);
}
function jO(e, t) {
  var n = gt(e).toHsl(), o = (n.h + t) % 360;
  return n.h = o < 0 ? 360 + o : o, gt(n);
}
function WO(e) {
  var t = gt(e).toHsl();
  return t.h = (t.h + 180) % 360, gt(t);
}
function nb(e, t) {
  if (isNaN(t) || t <= 0)
    throw new Error("Argument to polyad must be a positive number");
  for (var n = gt(e).toHsl(), o = [gt(e)], i = 360 / t, a = 1; a < t; a++)
    o.push(gt({
      h: (n.h + a * i) % 360,
      s: n.s,
      l: n.l
    }));
  return o;
}
function qO(e) {
  var t = gt(e).toHsl(), n = t.h;
  return [gt(e), gt({
    h: (n + 72) % 360,
    s: t.s,
    l: t.l
  }), gt({
    h: (n + 216) % 360,
    s: t.s,
    l: t.l
  })];
}
function GO(e, t, n) {
  t = t || 6, n = n || 30;
  var o = gt(e).toHsl(), i = 360 / n, a = [gt(e)];
  for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
    o.h = (o.h + i) % 360, a.push(gt(o));
  return a;
}
function KO(e, t) {
  t = t || 6;
  for (var n = gt(e).toHsv(), o = n.h, i = n.s, a = n.v, r = [], l = 1 / t; t--; )
    r.push(gt({
      h: o,
      s: i,
      v: a
    })), a = (a + l) % 1;
  return r;
}
gt.mix = function(e, t, n) {
  n = n === 0 ? 0 : n || 50;
  var o = gt(e).toRgb(), i = gt(t).toRgb(), a = n / 100, r = {
    r: (i.r - o.r) * a + o.r,
    g: (i.g - o.g) * a + o.g,
    b: (i.b - o.b) * a + o.b,
    a: (i.a - o.a) * a + o.a
  };
  return gt(r);
};
gt.readability = function(e, t) {
  var n = gt(e), o = gt(t);
  return (Math.max(n.getLuminance(), o.getLuminance()) + 0.05) / (Math.min(n.getLuminance(), o.getLuminance()) + 0.05);
};
gt.isReadable = function(e, t, n) {
  var o = gt.readability(e, t), i, a;
  switch (a = !1, i = JO(n), i.level + i.size) {
    case "AAsmall":
    case "AAAlarge":
      a = o >= 4.5;
      break;
    case "AAlarge":
      a = o >= 3;
      break;
    case "AAAsmall":
      a = o >= 7;
      break;
  }
  return a;
};
gt.mostReadable = function(e, t, n) {
  var o = null, i = 0, a, r, l, s;
  n = n || {}, r = n.includeFallbackColors, l = n.level, s = n.size;
  for (var u = 0; u < t.length; u++)
    a = gt.readability(e, t[u]), a > i && (i = a, o = gt(t[u]));
  return gt.isReadable(e, o, {
    level: l,
    size: s
  }) || !r ? o : (n.includeFallbackColors = !1, gt.mostReadable(e, ["#fff", "#000"], n));
};
var vg = gt.names = {
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
}, YO = gt.hexNames = UO(vg);
function UO(e) {
  var t = {};
  for (var n in e)
    e.hasOwnProperty(n) && (t[e[n]] = n);
  return t;
}
function sw(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function Fn(e, t) {
  XO(e) && (e = "100%");
  var n = QO(e);
  return e = Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
}
function Xd(e) {
  return Math.min(1, Math.max(0, e));
}
function Xo(e) {
  return parseInt(e, 16);
}
function XO(e) {
  return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
}
function QO(e) {
  return typeof e == "string" && e.indexOf("%") != -1;
}
function Wi(e) {
  return e.length == 1 ? "0" + e : "" + e;
}
function du(e) {
  return e <= 1 && (e = e * 100 + "%"), e;
}
function uw(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function ob(e) {
  return Xo(e) / 255;
}
var Ni = (function() {
  var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", n = "(?:" + t + ")|(?:" + e + ")", o = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?", i = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?";
  return {
    CSS_UNIT: new RegExp(n),
    rgb: new RegExp("rgb" + o),
    rgba: new RegExp("rgba" + i),
    hsl: new RegExp("hsl" + o),
    hsla: new RegExp("hsla" + i),
    hsv: new RegExp("hsv" + o),
    hsva: new RegExp("hsva" + i),
    hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
    hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
    hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
    hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  };
})();
function Ea(e) {
  return !!Ni.CSS_UNIT.exec(e);
}
function ZO(e) {
  e = e.replace(kO, "").replace(EO, "").toLowerCase();
  var t = !1;
  if (vg[e])
    e = vg[e], t = !0;
  else if (e == "transparent")
    return {
      r: 0,
      g: 0,
      b: 0,
      a: 0,
      format: "name"
    };
  var n;
  return (n = Ni.rgb.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3]
  } : (n = Ni.rgba.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3],
    a: n[4]
  } : (n = Ni.hsl.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3]
  } : (n = Ni.hsla.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3],
    a: n[4]
  } : (n = Ni.hsv.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3]
  } : (n = Ni.hsva.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3],
    a: n[4]
  } : (n = Ni.hex8.exec(e)) ? {
    r: Xo(n[1]),
    g: Xo(n[2]),
    b: Xo(n[3]),
    a: ob(n[4]),
    format: t ? "name" : "hex8"
  } : (n = Ni.hex6.exec(e)) ? {
    r: Xo(n[1]),
    g: Xo(n[2]),
    b: Xo(n[3]),
    format: t ? "name" : "hex"
  } : (n = Ni.hex4.exec(e)) ? {
    r: Xo(n[1] + "" + n[1]),
    g: Xo(n[2] + "" + n[2]),
    b: Xo(n[3] + "" + n[3]),
    a: ob(n[4] + "" + n[4]),
    format: t ? "name" : "hex8"
  } : (n = Ni.hex3.exec(e)) ? {
    r: Xo(n[1] + "" + n[1]),
    g: Xo(n[2] + "" + n[2]),
    b: Xo(n[3] + "" + n[3]),
    format: t ? "name" : "hex"
  } : !1;
}
function JO(e) {
  var t, n;
  return e = e || {
    level: "AA",
    size: "small"
  }, t = (e.level || "AA").toUpperCase(), n = (e.size || "small").toLowerCase(), t !== "AA" && t !== "AAA" && (t = "AA"), n !== "small" && n !== "large" && (n = "small"), {
    level: t,
    size: n
  };
}
function eI(e) {
  return {
    name: e.name ?? "",
    refId: e.refId ?? "",
    fields: e.fields.map((t) => ({
      name: t.name,
      type: t.type,
      values: { toArray: () => t.values },
      config: t.config ?? {},
      state: {}
    }))
  };
}
const cw = /* @__PURE__ */ new Map();
function Jf(e) {
  cw.set(e.type, e);
}
function mg(e) {
  return cw.get(e);
}
const ib = [
  "api-gateway",
  "auth-service",
  "payment-service",
  "user-service",
  "notification-service",
  "order-service",
  "inventory-service",
  "search-service"
];
function ep(e) {
  let t = e;
  return () => (t = (t * 16807 + 0) % 2147483647, t / 2147483647);
}
function tI(e, t, n, o, i) {
  const a = n ^ Math.floor(Date.now() / 5e3) * 2654435761, r = ep(n), l = ep(a);
  if (e === "random-walk") {
    const s = ep((n + Date.now()) % 2147483647), u = i + o * 0.5, c = i * 0.1, d = i + o * 1.8, f = [u];
    for (let g = 1; g < t; g++) {
      const m = f[g - 1], b = (u - m) * 0.05, y = (s() - 0.5) * o * 0.08 + b;
      f.push(Math.max(c, Math.min(d, m + y)));
    }
    return f;
  }
  return Array.from({ length: t }, (s, u) => {
    const c = u / t;
    let d;
    switch (e) {
      case "sine":
        d = i + Math.sin(c * Math.PI * 4 + n) * o + (r() - 0.5) * o * 0.2;
        break;
      case "spike": {
        const g = [0.2, 0.5, 0.8].reduce(
          (m, b) => m + Math.exp(-((c - b) ** 2) / 1e-3) * o * 2,
          0
        );
        d = i + g + (r() - 0.5) * o * 0.15;
        break;
      }
      case "step":
        d = i + Math.floor(c * 5) % 3 * o * 0.5 + (r() - 0.5) * o * 0.1;
        break;
      case "sawtooth":
        d = i + c * 3 % 1 * o + (r() - 0.5) * o * 0.15;
        break;
      case "noise":
        d = i + r() * o;
        break;
      case "trend-up":
        d = i + c * o * 1.5 + Math.sin(c * 10) * o * 0.2 + (r() - 0.5) * o * 0.1;
        break;
      case "trend-down":
        d = i + (1 - c) * o * 1.5 + Math.sin(c * 8) * o * 0.15 + (r() - 0.5) * o * 0.1;
        break;
      case "plateau": {
        const m = c < 0.3 ? c / 0.3 : c > 0.7 ? (1 - c) / 0.30000000000000004 : 1;
        d = i + m * o + (r() - 0.5) * o * 0.1;
        break;
      }
      case "live": {
        if (c < 0.9)
          d = i + Math.sin(c * Math.PI * 4 + n) * o * 0.6 + (r() - 0.5) * o * 0.1;
        else {
          const g = (c - 0.9) / 0.09999999999999998;
          d = i + Math.sin(0.9 * Math.PI * 4 + n) * o * 0.6 + (l() - 0.5) * o * 0.4 * g * 2;
        }
        break;
      }
      default:
        d = i;
    }
    return Math.max(0, d);
  });
}
function Yl(e, t = 15, n = 3, o = "sine", i) {
  const a = [];
  for (let l = e.from; l <= e.to; l += t)
    a.push(l);
  const r = Array.from({ length: n }, (l, s) => {
    const u = 20 + (s * 37 + 13) % 60, c = 10 + (s * 53 + 7) % 40, d = tI(o, a.length, s * 1e3 + 42, u, c);
    return {
      label: i?.[s] ?? ib[s % ib.length],
      values: d
    };
  });
  return { timestamps: a, series: r };
}
function nI(e, t, n, o) {
  const a = ((n + o) / 2 - e) * 0.05, r = (Math.random() - 0.5) * t * 0.08 + a;
  return Math.max(n, Math.min(o, e + r));
}
class oI {
  type = "mock";
  meta = {
    type: "mock",
    displayName: "Mock",
    icon: "🎲"
  };
  defaultQuery = () => ({
    type: "mock",
    metric: "",
    pattern: "sine",
    seriesCount: 3,
    liveAmplitude: 1
  });
  query(t) {
    const { range: n, targets: o } = t, i = o.filter((a) => a).map((a) => {
      const { timestamps: r, series: l } = Yl(
        { from: n.from / 1e3, to: n.to / 1e3 },
        15,
        a.seriesCount,
        a.pattern,
        a.labels
      ), s = r.map((c) => c * 1e3), u = [
        { name: "Time", type: hg.time, values: s, config: {} },
        ...l.map((c) => ({
          name: c.label,
          type: hg.number,
          values: c.values,
          config: { displayNameFromDS: c.label }
        }))
      ];
      return eI({ name: a.metric, refId: "A", fields: u });
    });
    return Promise.resolve({ data: i, state: "Done" });
  }
}
const Sr = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff",
  "#2f54eb",
  "#f5222d",
  "#fadb14",
  "#7cb305",
  "#08979c",
  "#531dab",
  "#c41d7f",
  "#d4380d",
  "#d48806",
  "#389e0d"
];
function _a(e, t) {
  if (e.length < 2 || t < 2)
    return [...e];
  const n = (a) => [
    Number.parseInt(a.slice(1, 3), 16),
    Number.parseInt(a.slice(3, 5), 16),
    Number.parseInt(a.slice(5, 7), 16)
  ], o = (a) => Math.round(Math.max(0, Math.min(255, a))).toString(16).padStart(2, "0"), i = e.length - 1;
  return Array.from({ length: t }, (a, r) => {
    const l = r / (t - 1) * i, s = Math.min(Math.floor(l), i - 1), u = l - s, [c, d, f] = n(e[s]), [g, m, b] = n(e[s + 1]);
    return `#${o(c + (g - c) * u)}${o(d + (m - d) * u)}${o(f + (b - f) * u)}`;
  });
}
const wi = {
  classic: Sr,
  tableau10: [
    "#4e79a7",
    "#f28e2b",
    "#e15759",
    "#76b7b2",
    "#59a14f",
    "#edc948",
    "#b07aa1",
    "#ff9da7",
    "#9c755f",
    "#bab0ac"
  ],
  "grafana-classic": [
    "#7EB26D",
    "#EAB839",
    "#6ED0E0",
    "#EF843C",
    "#E24D42",
    "#1F78C1",
    "#BA43A9",
    "#705DA0",
    "#508642",
    "#CCA300",
    "#447EBC",
    "#C15C17",
    "#890F02",
    "#0A437C",
    "#6D1F62",
    "#584477",
    "#B7DBAB",
    "#F4D598",
    "#70DBED",
    "#F9BA8F"
  ],
  blues: _a(["#cfe2f3", "#9fc5e8", "#3d85c8", "#0b5394", "#041d3a"], 16),
  reds: _a(["#fce5cd", "#f6b26b", "#e06666", "#cc0000", "#660000"], 16),
  GrYlRd: _a(
    ["#37872d", "#96d98d", "#fee520", "#ff780a", "#f2495c", "#8f3bb8"],
    16
  ),
  "purple-orange": _a(
    ["#7b2d8b", "#d45087", "#ff7c43", "#ffa600", "#f0e442", "#b3de69"],
    16
  ),
  "green-yellow-red": _a(
    ["#1a9850", "#a6d96a", "#fee08b", "#fdae61", "#d73027"],
    16
  ),
  "red-yellow-green": _a(
    ["#d73027", "#fdae61", "#fee08b", "#a6d96a", "#1a9850"],
    16
  ),
  "blue-yellow-red": _a(
    ["#2166ac", "#92c5de", "#d1e5f0", "#fddbc7", "#f4a582", "#b2182b"],
    16
  ),
  "blue-purple": _a(
    ["#045a8d", "#74a9cf", "#ccebc5", "#9ebcda", "#8856a7", "#810f7c"],
    16
  ),
  "yellow-blue": _a(["#ffffd9", "#c7e9b4", "#41b6c4", "#225ea8", "#0c2c84"], 16)
};
function iI(e) {
  return !e || e === "classic" ? Sr : wi[e] ?? Sr;
}
function aI(e, t, n = "sequential", o) {
  if (t === 0)
    return [];
  if (e === "fixed") {
    const a = o ?? Sr[0];
    return Array.from({ length: t }, () => a);
  }
  if (e === "thresholds")
    return [];
  const i = iI(e);
  return n === "distributed" && t > 1 ? Array.from({ length: t }, (a, r) => {
    const l = Math.round(r * (i.length - 1) / (t - 1));
    return i[l];
  }) : Array.from({ length: t }, (a, r) => i[r % i.length]);
}
const $n = {
  min: 0,
  max: 100,
  capRound: !0,
  trackWidth: 28,
  fillWidth: 30,
  trackColor: "#F4F5F5",
  sweepAngle: 270,
  valueColor: "#e6e6e6",
  valueSize: 28,
  valueVisible: !0,
  paddingX: 12,
  paddingY: 12,
  thresholdDisplay: "track",
  thresholdLabelDisplay: "none",
  orientation: "auto",
  colorFromScheme: !1,
  valueOffsetY: 18
};
let rI = 0;
function bg() {
  return `panel-${Date.now()}-${++rI}`;
}
function $i(e) {
  return [{ id: "A", enabled: !0, dataSource: e }];
}
const lI = {
  timeseries: {
    queries: $i({
      type: "mock",
      metric: "http_request_duration_seconds",
      pattern: "sine",
      seriesCount: 3
    }),
    lineWidth: 1.5,
    fillOpacity: 1,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    tooltipMode: "multi",
    tooltipSort: "none",
    showAxisPointer: !0,
    unit: "",
    decimals: 1
  },
  bar: {
    queries: $i({
      type: "mock",
      metric: "http_request_duration_seconds",
      pattern: "sine",
      seriesCount: 3,
      labels: ["p50", "p90", "p99"]
    }),
    lineWidth: 1,
    fillOpacity: 80,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    unit: "ms",
    decimals: 0,
    stacked: !1
  },
  histogram: {
    queries: $i({ type: "mock", metric: "request_duration_ms", pattern: "sine", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 60,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "ms",
    decimals: 0
  },
  stat: {
    queries: $i({
      type: "mock",
      metric: "http_requests_total",
      pattern: "trend-up",
      seriesCount: 1
    }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "",
    decimals: 1,
    statValue: 0,
    statUnit: "",
    statTrend: "flat"
  },
  gauge: {
    queries: $i({ type: "mock", metric: "system_cpu_usage", pattern: "sine", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "%",
    decimals: 1,
    min: 0,
    max: 100
  },
  table: {
    queries: $i({ type: "mock", metric: "http_requests", pattern: "noise", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "",
    decimals: 0
  },
  pie: {
    queries: $i({
      type: "mock",
      metric: "http_requests_by_service",
      pattern: "noise",
      seriesCount: 5
    }),
    lineWidth: 1,
    fillOpacity: 80,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    unit: "",
    decimals: 1,
    pieType: "pie",
    pieSliceSorting: "desc",
    pieLabels: ["name", "percent"],
    pieShow: "calculate",
    pieCalculation: "lastNotNull"
  }
};
function dw(e, t) {
  const n = t?.id ?? bg();
  return { ...{
    id: n,
    type: e,
    title: `New ${e} panel`,
    description: "",
    queries: [
      {
        id: "A",
        enabled: !0,
        dataSource: { type: "mock", metric: "", pattern: "sine", seriesCount: 3 }
      }
    ],
    drawStyle: "lines",
    lineWidth: 1.5,
    fillOpacity: 1,
    gradientMode: "none",
    lineInterpolation: "linear",
    lineStyle: "solid",
    spanNulls: !1,
    insertNulls: !1,
    showPoints: !1,
    showPointsMode: "auto",
    stackingMode: "none",
    legendPosition: "bottom",
    unit: "",
    decimals: 1,
    thresholds: [],
    thresholdBaseColor: "#73bf69",
    softMin: null,
    softMax: null,
    logScale: !1,
    stacked: !1,
    min: 0,
    max: 100,
    links: [],
    axisPlacement: "left",
    showGridLines: "all",
    gridColor: "#E8E9EA",
    axisLabel: "all",
    axisLabelColor: "#666666",
    axisTick: "hidden",
    axisBorder: "hidden",
    scaleDistribution: "linear",
    centeredZero: !1
  }, ...lI[e], ...t, id: n };
}
function fw() {
  const e = {}, t = [], n = [
    {
      id: "s1",
      type: "stat",
      title: "Requests/sec",
      x: 0,
      y: 0,
      w: 2,
      h: 4,
      extra: { statValue: 1247, statUnit: "req/s", statTrend: "up", unit: "reqps" }
    },
    {
      id: "s2",
      type: "stat",
      title: "Error Rate",
      x: 2,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 0.32,
        statUnit: "%",
        statTrend: "down",
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 1, color: "#faad14", label: "Warn" },
          { value: 5, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "s3",
      type: "stat",
      title: "P99 Latency",
      x: 4,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 342,
        statUnit: "ms",
        statTrend: "up",
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 200, color: "#faad14", label: "Warn" },
          { value: 500, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "s4",
      type: "stat",
      title: "Uptime",
      x: 6,
      y: 0,
      w: 2,
      h: 4,
      extra: { statValue: 99.97, statUnit: "%", statTrend: "flat" }
    },
    { id: "g1", type: "gauge", title: "CPU", x: 8, y: 0, w: 2, h: 4, extra: { statValue: 67.3 } },
    {
      id: "g2",
      type: "gauge",
      title: "Memory",
      x: 10,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 82.1,
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 70, color: "#faad14", label: "Warn" },
          { value: 90, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "ts1",
      type: "timeseries",
      title: "CPU Usage",
      x: 0,
      y: 4,
      w: 6,
      h: 8,
      extra: {
        description: "by service",
        queries: $i({
          type: "mock",
          metric: "system_cpu_usage",
          pattern: "sine",
          seriesCount: 4,
          labels: ["api-gateway", "auth-service", "payment-service", "user-service"]
        }),
        unit: "percent"
      }
    },
    {
      id: "ts2",
      type: "timeseries",
      title: "Request Latency",
      x: 6,
      y: 4,
      w: 6,
      h: 8,
      extra: {
        description: "percentiles",
        queries: $i({
          type: "mock",
          metric: "http_request_duration_seconds",
          pattern: "spike",
          seriesCount: 3,
          labels: ["p50", "p90", "p99"]
        }),
        unit: "ms",
        thresholds: [
          { value: 100, color: "#faad14", label: "Warning 100ms" },
          { value: 300, color: "#ff4d4f", label: "Critical 300ms" }
        ]
      }
    },
    {
      id: "ts3",
      type: "timeseries",
      title: "Throughput",
      x: 0,
      y: 12,
      w: 4,
      h: 8,
      extra: {
        description: "req/s",
        queries: $i({
          type: "mock",
          metric: "http_requests_total",
          pattern: "trend-up",
          seriesCount: 3,
          labels: ["api-gateway", "auth-service", "payment-service"]
        })
      }
    },
    {
      id: "b1",
      type: "bar",
      title: "Latency Percentiles",
      x: 4,
      y: 12,
      w: 4,
      h: 8,
      extra: { description: "by bucket" }
    },
    { id: "h1", type: "histogram", title: "Duration Distribution", x: 8, y: 12, w: 4, h: 8 },
    {
      id: "ts4",
      type: "timeseries",
      title: "Error Rate",
      x: 0,
      y: 20,
      w: 6,
      h: 8,
      extra: {
        description: "5xx vs 4xx",
        queries: $i({
          type: "mock",
          metric: "http_errors",
          pattern: "noise",
          seriesCount: 2,
          labels: ["5xx", "4xx"]
        }),
        fillOpacity: 3
      }
    },
    {
      id: "ts5",
      type: "timeseries",
      title: "Network I/O",
      x: 6,
      y: 20,
      w: 6,
      h: 8,
      extra: {
        description: "KB/s",
        queries: $i({
          type: "mock",
          metric: "network_io",
          pattern: "sawtooth",
          seriesCount: 4,
          labels: ["eth0-rx", "eth0-tx", "eth1-rx", "eth1-tx"]
        }),
        unit: "bytes"
      }
    },
    {
      id: "t1",
      type: "table",
      title: "Recent Requests",
      x: 0,
      y: 28,
      w: 12,
      h: 10,
      extra: { description: "last 80 requests" }
    }
  ];
  for (const o of n) {
    const i = dw(o.type, { id: o.id, title: o.title, ...o.extra });
    e[o.id] = i, t.push({
      i: o.id,
      x: o.x,
      y: o.y,
      w: o.w,
      h: o.h,
      minH: o.type === "stat" || o.type === "gauge" ? 3 : 6
    });
  }
  return { panels: e, layouts: t };
}
function sI() {
  return JSON.stringify(fw(), null, 2);
}
const pw = /* @__PURE__ */ new Map();
function Wr(e) {
  pw.set(e.meta.type, e);
}
function uI(e) {
  return pw.get(e);
}
const cI = {
  meta: { type: "bar", displayNameKey: "config.type.bar", icon: "📊" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "bar-style", labelKey: "config.section.style", Component: null },
    { key: "axes", labelKey: "config.section.axes", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, dI = {
  meta: { type: "gauge", displayNameKey: "config.type.gauge", icon: "🎯" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "gauge-style", labelKey: "config.section.gaugeStyle", Component: null }
  ]
}, fI = {
  meta: {
    type: "histogram",
    displayNameKey: "config.type.histogram",
    icon: "📉"
  },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "histogram-style", labelKey: "config.section.histStyle", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, pI = {
  meta: { type: "pie", displayNameKey: "config.type.pie", icon: "🥧" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "pie-style", labelKey: "config.section.pieStyle", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, gI = {
  meta: { type: "stat", displayNameKey: "config.type.stat", icon: "#" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "stat-style", labelKey: "config.section.gaugeStyle", Component: null }
  ]
}, hI = {
  meta: { type: "table", displayNameKey: "config.type.table", icon: "📋" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "table-style", labelKey: "config.section.tableStyle", Component: null }
  ]
}, vI = {
  meta: { type: "timeseries", displayNameKey: "config.type.timeseries", icon: "📈" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "style", labelKey: "config.section.style", Component: null },
    { key: "axes", labelKey: "config.section.axes", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
};
function mI() {
  Wr(vI), Wr(cI), Wr(fI), Wr(gI), Wr(dI), Wr(hI), Wr(pI);
}
function fu(e, t = "lastNotNull", n) {
  const o = e.filter((i) => i !== null);
  switch (t) {
    case "lastNotNull":
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
    case "last":
      return e.length > 0 ? e[e.length - 1] ?? 0 : 0;
    case "firstNotNull":
      return o.length > 0 ? o[0] ?? 0 : 0;
    case "first":
      return e.length > 0 ? e[0] ?? 0 : 0;
    case "mean":
      return o.length > 0 ? o.reduce((i, a) => i + a, 0) / o.length : 0;
    case "min":
      return o.length > 0 ? Math.min(...o) : 0;
    case "max":
      return o.length > 0 ? Math.max(...o) : 0;
    case "sum":
      return o.reduce((i, a) => i + a, 0);
    case "count":
      return o.length;
    default:
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
  }
}
function xc(e, t) {
  const n = e.filter((i) => i !== null);
  if (n.length < 2)
    return null;
  const o = n[0];
  return o === 0 ? null : (n[n.length - 1] - o) / o;
}
class Qd {
  constructor(t) {
    this.props = t;
  }
}
var gw = /* @__PURE__ */ ((e) => (e.LOCAL_STORAGE = "LOCAL_STORAGE", e.IN_MEMORY = "IN_MEMORY", e))(gw || {}), is = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Logarithmic = "logarithmic", e.Symlog = "symlog", e))(is || {}), Ul = /* @__PURE__ */ ((e) => (e.Lines = "lines", e.Bars = "bars", e.Points = "points", e.Histogram = "histogram", e))(Ul || {}), td = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Smooth = "smooth", e.StepBefore = "stepBefore", e.StepAfter = "stepAfter", e))(td || {}), yg = /* @__PURE__ */ ((e) => (e.Solid = "solid", e.Dashed = "dashed", e.Dotted = "dotted", e))(yg || {}), xg = /* @__PURE__ */ ((e) => (e.None = "none", e.Solid = "solid", e.Gradient = "gradient", e))(xg || {});
class bI extends Qd {
  getConfig() {
    const {
      scaleKey: t,
      label: n,
      show: o = !0,
      side: i = 2,
      space: a,
      gap: r = 5
    } = this.props, l = this.buildGridConfig(), s = this.buildTicksConfig(), u = this.buildValuesFormatter(), c = this.buildStrokeColor(), d = {
      scale: t,
      show: o,
      side: i
    };
    return n && (d.label = n), c && (d.stroke = c), l && (d.grid = l), s && (d.ticks = s), u && (d.values = u), r !== void 0 && (d.gap = r), a !== void 0 && (d.space = a), d;
  }
  buildGridConfig() {
    const { grid: t, isDarkMode: n, isLogScale: o } = this.props, i = n ? "#444" : "#E8E9EA", a = o ? 0.1 : 0.2;
    return t ? {
      stroke: t.stroke ?? i,
      width: t.width ?? a,
      show: t.show ?? !0
    } : {
      stroke: i,
      width: a,
      show: !0
    };
  }
  buildTicksConfig() {
    const { ticks: t } = this.props;
    return t || { width: 0.3, show: !0 };
  }
  buildValuesFormatter() {
    const { values: t, scaleKey: n, yAxisUnit: o, decimalPrecision: i } = this.props;
    if (t)
      return t;
    if (n === "x")
      return this.props.isTimeAxis === !1 ? void 0 : (a, r) => r.map((l) => {
        if (l == null || Number.isNaN(l))
          return "";
        const s = new Date(l * 1e3);
        return `${s.getHours().toString().padStart(2, "0")}:${s.getMinutes().toString().padStart(2, "0")}`;
      });
    if (n === "y" && o)
      return (a, r) => r.map((l) => l == null || Number.isNaN(l) ? "" : l.toFixed(i ?? 1));
  }
  buildStrokeColor() {
    const { stroke: t, isDarkMode: n } = this.props;
    if (t !== void 0)
      return t;
    if (n !== void 0)
      return n ? "white" : "black";
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
class yI extends Qd {
  softMin;
  softMax;
  min;
  max;
  constructor(t) {
    super(t);
    const n = t.softMin === 0 && t.softMax === 0;
    this.softMin = n ? null : t.softMin ?? null, this.softMax = n ? null : t.softMax ?? null, this.min = t.min ?? null, this.max = t.max ?? null;
  }
  getConfig() {
    const {
      scaleKey: t,
      time: n,
      range: o,
      logBase: i = 10,
      padMinBy: a = 0,
      padMaxBy: r = 0.05
    } = this.props;
    if (n) {
      if (this.min != null && this.max != null) {
        const b = this.min;
        let y = this.max;
        const S = new Date(y * 1e3);
        return S.setSeconds(0), S.setMilliseconds(0), y = Math.floor(S.getTime() / 1e3) + 60, {
          [t]: {
            time: !0,
            auto: !1,
            range: [b, y]
          }
        };
      }
      return {
        [t]: {
          time: !0,
          auto: !0
        }
      };
    }
    const l = this.props.distribution, s = l === is.Logarithmic ? { distr: 2, log: i } : l === is.Symlog ? { distr: 3, log: i } : {}, u = this.min != null || this.max != null, c = this.softMin, d = this.softMax;
    let f;
    u ? f = () => [
      this.min ?? c ?? 0,
      this.max ?? d ?? 100
    ] : f = (m, b, y) => {
      const S = c != null ? Math.min(c, b) : b, C = d != null ? Math.max(d, y) : y, O = (C - S) * r;
      return [S - a * (C - S), C + O];
    };
    let g = this.props.auto;
    return g ??= !n && !u, {
      [t]: {
        time: n,
        auto: g,
        range: o ?? f,
        ...s
      }
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t }, t.softMin !== void 0 && (this.softMin = t.softMin ?? null), t.softMax !== void 0 && (this.softMax = t.softMax ?? null), t.min !== void 0 && (this.min = t.min ?? null), t.max !== void 0 && (this.max = t.max ?? null);
  }
}
const xI = !0, uo = "u-", wI = "uplot", SI = uo + "hz", CI = uo + "vt", $I = uo + "title", PI = uo + "wrap", OI = uo + "under", II = uo + "over", MI = uo + "axis", tl = uo + "off", TI = uo + "select", kI = uo + "cursor-x", EI = uo + "cursor-y", _I = uo + "cursor-pt", AI = uo + "legend", DI = uo + "live", zI = uo + "inline", RI = uo + "series", NI = uo + "marker", ab = uo + "label", BI = uo + "value", pu = "width", gu = "height", eu = "top", rb = "bottom", Bl = "left", tp = "right", Kh = "#000", lb = Kh + "0", sb = "mousemove", ub = "mousedown", np = "mouseup", cb = "mouseenter", db = "mouseleave", fb = "dblclick", FI = "resize", LI = "scroll", pb = "change", Sd = "dppxchange", Yh = "--", zs = typeof window < "u", wg = zs ? document : null, as = zs ? window : null, HI = zs ? navigator : null;
let cn, wc;
function Sg() {
  let e = devicePixelRatio;
  cn != e && (cn = e, wc && $g(pb, wc, Sg), wc = matchMedia(`(min-resolution: ${cn - 1e-3}dppx) and (max-resolution: ${cn + 1e-3}dppx)`), sl(pb, wc, Sg), as.dispatchEvent(new CustomEvent(Sd)));
}
function Zo(e, t) {
  if (t != null) {
    let n = e.classList;
    !n.contains(t) && n.add(t);
  }
}
function Cg(e, t) {
  let n = e.classList;
  n.contains(t) && n.remove(t);
}
function _n(e, t, n) {
  e.style[t] = n + "px";
}
function Bi(e, t, n, o) {
  let i = wg.createElement(e);
  return t != null && Zo(i, t), n?.insertBefore(i, o), i;
}
function Si(e, t) {
  return Bi("div", e, t);
}
const gb = /* @__PURE__ */ new WeakMap();
function ua(e, t, n, o, i) {
  let a = "translate(" + t + "px," + n + "px)", r = gb.get(e);
  a != r && (e.style.transform = a, gb.set(e, a), t < 0 || n < 0 || t > o || n > i ? Zo(e, tl) : Cg(e, tl));
}
const hb = /* @__PURE__ */ new WeakMap();
function vb(e, t, n) {
  let o = t + n, i = hb.get(e);
  o != i && (hb.set(e, o), e.style.background = t, e.style.borderColor = n);
}
const mb = /* @__PURE__ */ new WeakMap();
function bb(e, t, n, o) {
  let i = t + "" + n, a = mb.get(e);
  i != a && (mb.set(e, i), e.style.height = n + "px", e.style.width = t + "px", e.style.marginLeft = o ? -t / 2 + "px" : 0, e.style.marginTop = o ? -n / 2 + "px" : 0);
}
const Uh = { passive: !0 }, VI = { ...Uh, capture: !0 };
function sl(e, t, n, o) {
  t.addEventListener(e, n, o ? VI : Uh);
}
function $g(e, t, n, o) {
  t.removeEventListener(e, n, Uh);
}
zs && Sg();
function Hi(e, t, n, o) {
  let i;
  n = n || 0, o = o || t.length - 1;
  let a = o <= 2147483647;
  for (; o - n > 1; )
    i = a ? n + o >> 1 : ii((n + o) / 2), t[i] < e ? n = i : o = i;
  return e - t[n] <= t[o] - e ? n : o;
}
function hs(e, t, n, o) {
  for (let i = o == 1 ? t : n; i >= t && i <= n; i += o)
    if (e[i] != null)
      return i;
  return -1;
}
function jI(e, t, n, o) {
  let i = qt, a = -qt;
  if (o == 1)
    i = e[t], a = e[n];
  else if (o == -1)
    i = e[n], a = e[t];
  else
    for (let r = t; r <= n; r++) {
      let l = e[r];
      l != null && (l < i && (i = l), l > a && (a = l));
    }
  return [i, a];
}
function WI(e, t, n) {
  let o = qt, i = -qt;
  for (let a = t; a <= n; a++) {
    let r = e[a];
    r != null && r > 0 && (r < o && (o = r), r > i && (i = r));
  }
  return [o, i];
}
function Zd(e, t, n, o) {
  let i = wb(e), a = wb(t);
  e == t && (i == -1 ? (e *= n, t /= n) : (e /= n, t *= n));
  let r = n == 10 ? Fa : hw, l = i == 1 ? ii : Pi, s = a == 1 ? Pi : ii, u = l(r(ao(e))), c = s(r(ao(t))), d = vs(n, u), f = vs(n, c);
  return n == 10 && (u < 0 && (d = Pn(d, -u)), c < 0 && (f = Pn(f, -c))), o || n == 2 ? (e = d * i, t = f * a) : (e = bw(e, d), t = Jd(t, f)), [e, t];
}
function Xh(e, t, n, o) {
  let i = Zd(e, t, n, o);
  return e == 0 && (i[0] = 0), t == 0 && (i[1] = 0), i;
}
const Qh = 0.1, yb = {
  mode: 3,
  pad: Qh
}, wu = {
  pad: 0,
  soft: null,
  mode: 0
}, qI = {
  min: wu,
  max: wu
};
function Cd(e, t, n, o) {
  return ef(n) ? xb(e, t, n) : (wu.pad = n, wu.soft = o ? 0 : null, wu.mode = o ? 3 : 0, xb(e, t, qI));
}
function en(e, t) {
  return e ?? t;
}
function GI(e, t, n) {
  for (t = en(t, 0), n = en(n, e.length - 1); t <= n; ) {
    if (e[t] != null)
      return !0;
    t++;
  }
  return !1;
}
function xb(e, t, n) {
  let o = n.min, i = n.max, a = en(o.pad, 0), r = en(i.pad, 0), l = en(o.hard, -qt), s = en(i.hard, qt), u = en(o.soft, qt), c = en(i.soft, -qt), d = en(o.mode, 0), f = en(i.mode, 0), g = t - e, m = Fa(g), b = Oo(ao(e), ao(t)), y = Fa(b), S = ao(y - m);
  (g < 1e-24 || S > 10) && (g = 0, (e == 0 || t == 0) && (g = 1e-24, d == 2 && u != qt && (a = 0), f == 2 && c != -qt && (r = 0)));
  let C = g || b || 1e3, O = Fa(C), $ = vs(10, ii(O)), P = C * (g == 0 ? e == 0 ? 0.1 : 1 : a), k = Pn(bw(e - P, $ / 10), 24), x = e >= u && (d == 1 || d == 3 && k <= u || d == 2 && k >= u) ? u : qt, E = Oo(l, k < x && e >= x ? x : Oi(x, k)), z = C * (g == 0 ? t == 0 ? 0.1 : 1 : r), B = Pn(Jd(t + z, $ / 10), 24), D = t <= c && (f == 1 || f == 3 && B >= c || f == 2 && B <= c) ? c : -qt, W = Oi(s, B > D && t <= D ? D : Oo(D, B));
  return E == W && E == 0 && (W = 100), [E, W];
}
const KI = new Intl.NumberFormat(zs ? HI.language : "en-US"), Zh = (e) => KI.format(e), ci = Math, nd = ci.PI, ao = ci.abs, ii = ci.floor, oo = ci.round, Pi = ci.ceil, Oi = ci.min, Oo = ci.max, vs = ci.pow, wb = ci.sign, Fa = ci.log10, hw = ci.log2, YI = (e, t = 1) => ci.sinh(e) * t, op = (e, t = 1) => ci.asinh(e / t), qt = 1 / 0;
function Sb(e) {
  return (Fa((e ^ e >> 31) - (e >> 31)) | 0) + 1;
}
function Pg(e, t, n) {
  return Oi(Oo(e, t), n);
}
function Wt(e) {
  return typeof e == "function" ? e : () => e;
}
const UI = () => {
}, vw = (e) => e, mw = (e, t) => t, XI = (e) => null, Cb = (e) => !0, $b = (e, t) => e == t, QI = /\.\d*?(?=9{6,}|0{6,})/gm, hl = (e) => {
  if (xw(e) || Or.has(e))
    return e;
  const t = `${e}`, n = t.match(QI);
  if (n == null)
    return e;
  let o = n[0].length - 1;
  if (t.indexOf("e-") != -1) {
    let [i, a] = t.split("e");
    return +`${hl(i)}e${a}`;
  }
  return Pn(e, o);
};
function Zr(e, t) {
  return hl(Pn(hl(e / t)) * t);
}
function Jd(e, t) {
  return hl(Pi(hl(e / t)) * t);
}
function bw(e, t) {
  return hl(ii(hl(e / t)) * t);
}
function Pn(e, t = 0) {
  if (xw(e))
    return e;
  let n = 10 ** t, o = e * n * (1 + Number.EPSILON);
  return oo(o) / n;
}
const Or = /* @__PURE__ */ new Map();
function yw(e) {
  return (("" + e).split(".")[1] || "").length;
}
function zu(e, t, n, o) {
  let i = [], a = o.map(yw);
  for (let r = t; r < n; r++) {
    let l = ao(r), s = Pn(vs(e, r), l);
    for (let u = 0; u < o.length; u++) {
      let c = e == 10 ? +`${o[u]}e${r}` : o[u] * s, d = (r >= 0 ? 0 : l) + (r >= a[u] ? 0 : a[u]), f = e == 10 ? c : Pn(c, d);
      i.push(f), Or.set(f, d);
    }
  }
  return i;
}
const Su = {}, Jh = [], ms = [null, null], gr = Array.isArray, xw = Number.isInteger, ZI = (e) => e === void 0;
function Pb(e) {
  return typeof e == "string";
}
function ef(e) {
  let t = !1;
  if (e != null) {
    let n = e.constructor;
    t = n == null || n == Object;
  }
  return t;
}
function JI(e) {
  return e != null && typeof e == "object";
}
const eM = Object.getPrototypeOf(Uint8Array), ww = "__proto__";
function bs(e, t = ef) {
  let n;
  if (gr(e)) {
    let o = e.find((i) => i != null);
    if (gr(o) || t(o)) {
      n = Array(e.length);
      for (let i = 0; i < e.length; i++)
        n[i] = bs(e[i], t);
    } else
      n = e.slice();
  } else if (e instanceof eM)
    n = e.slice();
  else if (t(e)) {
    n = {};
    for (let o in e)
      o != ww && (n[o] = bs(e[o], t));
  } else
    n = e;
  return n;
}
function Jn(e) {
  let t = arguments;
  for (let n = 1; n < t.length; n++) {
    let o = t[n];
    for (let i in o)
      i != ww && (ef(e[i]) ? Jn(e[i], bs(o[i])) : e[i] = bs(o[i]));
  }
  return e;
}
const tM = 0, nM = 1, oM = 2;
function iM(e, t, n) {
  for (let o = 0, i, a = -1; o < t.length; o++) {
    let r = t[o];
    if (r > a) {
      for (i = r - 1; i >= 0 && e[i] == null; )
        e[i--] = null;
      for (i = r + 1; i < n && e[i] == null; )
        e[a = i++] = null;
    }
  }
}
function aM(e, t) {
  if (sM(e)) {
    let r = e[0].slice();
    for (let l = 1; l < e.length; l++)
      r.push(...e[l].slice(1));
    return uM(r[0]) || (r = lM(r)), r;
  }
  let n = /* @__PURE__ */ new Set();
  for (let r = 0; r < e.length; r++) {
    let s = e[r][0], u = s.length;
    for (let c = 0; c < u; c++)
      n.add(s[c]);
  }
  let o = [Array.from(n).sort((r, l) => r - l)], i = o[0].length, a = /* @__PURE__ */ new Map();
  for (let r = 0; r < i; r++)
    a.set(o[0][r], r);
  for (let r = 0; r < e.length; r++) {
    let l = e[r], s = l[0];
    for (let u = 1; u < l.length; u++) {
      let c = l[u], d = Array(i).fill(void 0), f = t ? t[r][u] : nM, g = [];
      for (let m = 0; m < c.length; m++) {
        let b = c[m], y = a.get(s[m]);
        b === null ? f != tM && (d[y] = b, f == oM && g.push(y)) : d[y] = b;
      }
      iM(d, g, i), o.push(d);
    }
  }
  return o;
}
const rM = typeof queueMicrotask > "u" ? (e) => Promise.resolve().then(e) : queueMicrotask;
function lM(e) {
  let t = e[0], n = t.length, o = Array(n);
  for (let a = 0; a < o.length; a++)
    o[a] = a;
  o.sort((a, r) => t[a] - t[r]);
  let i = [];
  for (let a = 0; a < e.length; a++) {
    let r = e[a], l = Array(n);
    for (let s = 0; s < n; s++)
      l[s] = r[o[s]];
    i.push(l);
  }
  return i;
}
function sM(e) {
  let t = e[0][0], n = t.length;
  for (let o = 1; o < e.length; o++) {
    let i = e[o][0];
    if (i.length != n)
      return !1;
    if (i != t) {
      for (let a = 0; a < n; a++)
        if (i[a] != t[a])
          return !1;
    }
  }
  return !0;
}
function uM(e, t = 100) {
  const n = e.length;
  if (n <= 1)
    return !0;
  let o = 0, i = n - 1;
  for (; o <= i && e[o] == null; )
    o++;
  for (; i >= o && e[i] == null; )
    i--;
  if (i <= o)
    return !0;
  const a = Oo(1, ii((i - o + 1) / t));
  for (let r = e[o], l = o + a; l <= i; l += a) {
    const s = e[l];
    if (s != null) {
      if (s <= r)
        return !1;
      r = s;
    }
  }
  return !0;
}
const Sw = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], Cw = [
  "Sunday",
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday"
];
function $w(e) {
  return e.slice(0, 3);
}
const cM = Cw.map($w), dM = Sw.map($w), fM = {
  MMMM: Sw,
  MMM: dM,
  WWWW: Cw,
  WWW: cM
};
function tu(e) {
  return (e < 10 ? "0" : "") + e;
}
function pM(e) {
  return (e < 10 ? "00" : e < 100 ? "0" : "") + e;
}
const gM = {
  // 2019
  YYYY: (e) => e.getFullYear(),
  // 19
  YY: (e) => (e.getFullYear() + "").slice(2),
  // July
  MMMM: (e, t) => t.MMMM[e.getMonth()],
  // Jul
  MMM: (e, t) => t.MMM[e.getMonth()],
  // 07
  MM: (e) => tu(e.getMonth() + 1),
  // 7
  M: (e) => e.getMonth() + 1,
  // 09
  DD: (e) => tu(e.getDate()),
  // 9
  D: (e) => e.getDate(),
  // Monday
  WWWW: (e, t) => t.WWWW[e.getDay()],
  // Mon
  WWW: (e, t) => t.WWW[e.getDay()],
  // 03
  HH: (e) => tu(e.getHours()),
  // 3
  H: (e) => e.getHours(),
  // 9 (12hr, unpadded)
  h: (e) => {
    let t = e.getHours();
    return t == 0 ? 12 : t > 12 ? t - 12 : t;
  },
  // AM
  AA: (e) => e.getHours() >= 12 ? "PM" : "AM",
  // am
  aa: (e) => e.getHours() >= 12 ? "pm" : "am",
  // a
  a: (e) => e.getHours() >= 12 ? "p" : "a",
  // 09
  mm: (e) => tu(e.getMinutes()),
  // 9
  m: (e) => e.getMinutes(),
  // 09
  ss: (e) => tu(e.getSeconds()),
  // 9
  s: (e) => e.getSeconds(),
  // 374
  fff: (e) => pM(e.getMilliseconds())
};
function ev(e, t) {
  t = t || fM;
  let n = [], o = /\{([a-z]+)\}|[^{]+/gi, i;
  for (; i = o.exec(e); )
    n.push(i[0][0] == "{" ? gM[i[1]] : i[0]);
  return (a) => {
    let r = "";
    for (let l = 0; l < n.length; l++)
      r += typeof n[l] == "string" ? n[l] : n[l](a, t);
    return r;
  };
}
const hM = new Intl.DateTimeFormat().resolvedOptions().timeZone;
function vM(e, t) {
  let n;
  return t == "UTC" || t == "Etc/UTC" ? n = new Date(+e + e.getTimezoneOffset() * 6e4) : t == hM ? n = e : (n = new Date(e.toLocaleString("en-US", { timeZone: t })), n.setMilliseconds(e.getMilliseconds())), n;
}
const Pw = (e) => e % 1 == 0, $d = [1, 2, 2.5, 5], mM = zu(10, -32, 0, $d), Ow = zu(10, 0, 32, $d), bM = Ow.filter(Pw), Jr = mM.concat(Ow), tv = `
`, Iw = "{YYYY}", Ob = tv + Iw, Mw = "{M}/{D}", hu = tv + Mw, Sc = hu + "/{YY}", Tw = "{aa}", yM = "{h}:{mm}", Xl = yM + Tw, Ib = tv + Xl, Mb = ":{ss}", fn = null;
function kw(e) {
  let t = e * 1e3, n = t * 60, o = n * 60, i = o * 24, a = i * 30, r = i * 365, s = (e == 1 ? zu(10, 0, 3, $d).filter(Pw) : zu(10, -3, 0, $d)).concat([
    // minute divisors (# of secs)
    t,
    t * 5,
    t * 10,
    t * 15,
    t * 30,
    // hour divisors (# of mins)
    n,
    n * 5,
    n * 10,
    n * 15,
    n * 30,
    // day divisors (# of hrs)
    o,
    o * 2,
    o * 3,
    o * 4,
    o * 6,
    o * 8,
    o * 12,
    // month divisors TODO: need more?
    i,
    i * 2,
    i * 3,
    i * 4,
    i * 5,
    i * 6,
    i * 7,
    i * 8,
    i * 9,
    i * 10,
    i * 15,
    // year divisors (# months, approx)
    a,
    a * 2,
    a * 3,
    a * 4,
    a * 6,
    // century divisors
    r,
    r * 2,
    r * 5,
    r * 10,
    r * 25,
    r * 50,
    r * 100
  ]);
  const u = [
    //   tick incr    default          year                    month   day                   hour    min       sec   mode
    [r, Iw, fn, fn, fn, fn, fn, fn, 1],
    [i * 28, "{MMM}", Ob, fn, fn, fn, fn, fn, 1],
    [i, Mw, Ob, fn, fn, fn, fn, fn, 1],
    [o, "{h}" + Tw, Sc, fn, hu, fn, fn, fn, 1],
    [n, Xl, Sc, fn, hu, fn, fn, fn, 1],
    [t, Mb, Sc + " " + Xl, fn, hu + " " + Xl, fn, Ib, fn, 1],
    [e, Mb + ".{fff}", Sc + " " + Xl, fn, hu + " " + Xl, fn, Ib, fn, 1]
  ];
  function c(d) {
    return (f, g, m, b, y, S) => {
      let C = [], O = y >= r, $ = y >= a && y < r, P = d(m), k = Pn(P * e, 3), x = ip(P.getFullYear(), O ? 0 : P.getMonth(), $ || O ? 1 : P.getDate()), E = Pn(x * e, 3);
      if ($ || O) {
        let z = $ ? y / a : 0, B = O ? y / r : 0, D = k == E ? k : Pn(ip(x.getFullYear() + B, x.getMonth() + z, 1) * e, 3), W = new Date(oo(D / e)), H = W.getFullYear(), F = W.getMonth();
        for (let A = 0; D <= b; A++) {
          let U = ip(H + B * A, F + z * A, 1), j = U - d(Pn(U * e, 3));
          D = Pn((+U + j) * e, 3), D <= b && C.push(D);
        }
      } else {
        let z = y >= i ? i : y, B = ii(m) - ii(k), D = E + B + Jd(k - E, z);
        C.push(D);
        let W = d(D), H = W.getHours() + W.getMinutes() / n + W.getSeconds() / o, F = y / o, A = f.axes[g]._space, U = S / A;
        for (; D = Pn(D + y, e == 1 ? 0 : 3), !(D > b); )
          if (F > 1) {
            let j = ii(Pn(H + F, 6)) % 24, Y = d(D).getHours() - j;
            Y > 1 && (Y = -1), D -= Y * o, H = (H + F) % 24;
            let K = C[C.length - 1];
            Pn((D - K) / y, 3) * U >= 0.7 && C.push(D);
          } else
            C.push(D);
      }
      return C;
    };
  }
  return [
    s,
    u,
    c
  ];
}
const [xM, wM, SM] = kw(1), [CM, $M, PM] = kw(1e-3);
zu(2, -53, 53, [1]);
function Tb(e, t) {
  return e.map((n) => n.map(
    (o, i) => i == 0 || i == 8 || o == null ? o : t(i == 1 || n[8] == 0 ? o : n[1] + o)
  ));
}
function kb(e, t) {
  return (n, o, i, a, r) => {
    let l = t.find((m) => r >= m[0]) || t[t.length - 1], s, u, c, d, f, g;
    return o.map((m) => {
      let b = e(m), y = b.getFullYear(), S = b.getMonth(), C = b.getDate(), O = b.getHours(), $ = b.getMinutes(), P = b.getSeconds(), k = y != s && l[2] || S != u && l[3] || C != c && l[4] || O != d && l[5] || $ != f && l[6] || P != g && l[7] || l[1];
      return s = y, u = S, c = C, d = O, f = $, g = P, k(b);
    });
  };
}
function OM(e, t) {
  let n = ev(t);
  return (o, i, a, r, l) => i.map((s) => n(e(s)));
}
function ip(e, t, n) {
  return new Date(e, t, n);
}
function Eb(e, t) {
  return t(e);
}
const IM = "{YYYY}-{MM}-{DD} {h}:{mm}{aa}";
function _b(e, t) {
  return (n, o, i, a) => a == null ? Yh : t(e(o));
}
function MM(e, t) {
  let n = e.series[t];
  return n.width ? n.stroke(e, t) : n.points.width ? n.points.stroke(e, t) : null;
}
function TM(e, t) {
  return e.series[t].fill(e, t);
}
const kM = {
  show: !0,
  live: !0,
  isolate: !1,
  mount: UI,
  markers: {
    show: !0,
    width: 2,
    stroke: MM,
    fill: TM,
    dash: "solid"
  },
  idx: null,
  idxs: null,
  values: []
};
function EM(e, t) {
  let n = e.cursor.points, o = Si(), i = n.size(e, t);
  _n(o, pu, i), _n(o, gu, i);
  let a = i / -2;
  _n(o, "marginLeft", a), _n(o, "marginTop", a);
  let r = n.width(e, t, i);
  return r && _n(o, "borderWidth", r), o;
}
function _M(e, t) {
  let n = e.series[t].points;
  return n._fill || n._stroke;
}
function AM(e, t) {
  let n = e.series[t].points;
  return n._stroke || n._fill;
}
function DM(e, t) {
  return e.series[t].points.size;
}
const ap = [0, 0];
function zM(e, t, n) {
  return ap[0] = t, ap[1] = n, ap;
}
function Cc(e, t, n, o = !0) {
  return (i) => {
    i.button == 0 && (!o || i.target == t) && n(i);
  };
}
function rp(e, t, n, o = !0) {
  return (i) => {
    (!o || i.target == t) && n(i);
  };
}
const RM = {
  show: !0,
  x: !0,
  y: !0,
  lock: !1,
  move: zM,
  points: {
    one: !1,
    show: EM,
    size: DM,
    width: 0,
    stroke: AM,
    fill: _M
  },
  bind: {
    mousedown: Cc,
    mouseup: Cc,
    click: Cc,
    // legend clicks, not .u-over clicks
    dblclick: Cc,
    mousemove: rp,
    mouseleave: rp,
    mouseenter: rp
  },
  drag: {
    setScale: !0,
    x: !0,
    y: !1,
    dist: 0,
    uni: null,
    click: (e, t) => {
      t.stopPropagation(), t.stopImmediatePropagation();
    },
    _x: !1,
    _y: !1
  },
  focus: {
    dist: (e, t, n, o, i) => o - i,
    prox: -1,
    bias: 0
  },
  hover: {
    skip: [void 0],
    prox: null,
    bias: 0
  },
  left: -10,
  top: -10,
  idx: null,
  dataIdx: null,
  idxs: null,
  event: null
}, Ew = {
  show: !0,
  stroke: "rgba(0,0,0,0.07)",
  width: 2
  //	dash: [],
}, nv = Jn({}, Ew, {
  filter: mw
}), _w = Jn({}, nv, {
  size: 10
}), Aw = Jn({}, Ew, {
  show: !1
}), ov = '12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', Dw = "bold " + ov, zw = 1.5, Ab = {
  show: !0,
  scale: "x",
  stroke: Kh,
  space: 50,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: Dw,
  side: 2,
  //	class: "x-vals",
  //	incrs: timeIncrs,
  //	values: timeVals,
  //	filter: retArg1,
  grid: nv,
  ticks: _w,
  border: Aw,
  font: ov,
  lineGap: zw,
  rotate: 0
}, NM = "Value", BM = "Time", Db = {
  show: !0,
  scale: "x",
  auto: !1,
  sorted: 1,
  //	label: "Time",
  //	value: v => stamp(new Date(v * 1e3)),
  // internal caches
  min: qt,
  max: -qt,
  idxs: []
};
function FM(e, t, n, o, i) {
  return t.map((a) => a == null ? "" : Zh(a));
}
function LM(e, t, n, o, i, a, r) {
  let l = [], s = Or.get(i) || 0;
  n = r ? n : Pn(Jd(n, i), s);
  for (let u = n; u <= o; u = Pn(u + i, s))
    l.push(Object.is(u, -0) ? 0 : u);
  return l;
}
function Og(e, t, n, o, i, a, r) {
  const l = [], s = e.scales[e.axes[t].scale].log, u = s == 10 ? Fa : hw, c = ii(u(n));
  i = vs(s, c), s == 10 && (i = Jr[Hi(i, Jr)]);
  let d = n, f = i * s;
  s == 10 && (f = Jr[Hi(f, Jr)]);
  do
    l.push(d), d = d + i, s == 10 && !Or.has(d) && (d = Pn(d, Or.get(i))), d >= f && (i = d, f = i * s, s == 10 && (f = Jr[Hi(f, Jr)]));
  while (d <= o);
  return l;
}
function HM(e, t, n, o, i, a, r) {
  let s = e.scales[e.axes[t].scale].asinh, u = o > s ? Og(e, t, Oo(s, n), o, i) : [s], c = o >= 0 && n <= 0 ? [0] : [];
  return (n < -s ? Og(e, t, Oo(s, -o), -n, i) : [s]).reverse().map((f) => -f).concat(c, u);
}
const Rw = /./, VM = /[12357]/, jM = /[125]/, zb = /1/, Ig = (e, t, n, o) => e.map((i, a) => t == 4 && i == 0 || a % o == 0 && n.test(i.toExponential()[i < 0 ? 1 : 0]) ? i : null);
function WM(e, t, n, o, i) {
  let a = e.axes[n], r = a.scale, l = e.scales[r], s = e.valToPos, u = a._space, c = s(10, r), d = s(9, r) - c >= u ? Rw : s(7, r) - c >= u ? VM : s(5, r) - c >= u ? jM : zb;
  if (d == zb) {
    let f = ao(s(1, r) - c);
    if (f < u)
      return Ig(t.slice().reverse(), l.distr, d, Pi(u / f)).reverse();
  }
  return Ig(t, l.distr, d, 1);
}
function qM(e, t, n, o, i) {
  let a = e.axes[n], r = a.scale, l = a._space, s = e.valToPos, u = ao(s(1, r) - s(2, r));
  return u < l ? Ig(t.slice().reverse(), 3, Rw, Pi(l / u)).reverse() : t;
}
function GM(e, t, n, o) {
  return o == null ? Yh : t == null ? "" : Zh(t);
}
const Rb = {
  show: !0,
  scale: "y",
  stroke: Kh,
  space: 30,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: Dw,
  side: 3,
  //	class: "y-vals",
  //	incrs: numIncrs,
  //	values: (vals, space) => vals,
  //	filter: retArg1,
  grid: nv,
  ticks: _w,
  border: Aw,
  font: ov,
  lineGap: zw,
  rotate: 0
};
function KM(e, t) {
  let n = 3 + (e || 1) * 2;
  return Pn(n * t, 3);
}
function YM(e, t) {
  let { scale: n, idxs: o } = e.series[0], i = e._data[0], a = e.valToPos(i[o[0]], n, !0), r = e.valToPos(i[o[1]], n, !0), l = ao(r - a), s = e.series[t], u = l / (s.points.space * cn);
  return o[1] - o[0] <= u;
}
const Nb = {
  scale: null,
  auto: !0,
  sorted: 0,
  // internal caches
  min: qt,
  max: -qt
}, Nw = (e, t, n, o, i) => i, Bb = {
  show: !0,
  auto: !0,
  sorted: 0,
  gaps: Nw,
  alpha: 1,
  facets: [
    Jn({}, Nb, { scale: "x" }),
    Jn({}, Nb, { scale: "y" })
  ]
}, Fb = {
  scale: "y",
  auto: !0,
  sorted: 0,
  show: !0,
  spanGaps: !1,
  gaps: Nw,
  alpha: 1,
  points: {
    show: YM,
    filter: null
    //  paths:
    //	stroke: "#000",
    //	fill: "#fff",
    //	width: 1,
    //	size: 10,
  },
  //	label: "Value",
  //	value: v => v,
  values: null,
  // internal caches
  min: qt,
  max: -qt,
  idxs: [],
  path: null,
  clip: null
};
function UM(e, t, n, o, i) {
  return n / 10;
}
const Bw = {
  time: xI,
  auto: !0,
  distr: 1,
  log: 10,
  asinh: 1,
  min: null,
  max: null,
  dir: 1,
  ori: 0
}, XM = Jn({}, Bw, {
  time: !1,
  ori: 1
}), Lb = {};
function Fw(e, t) {
  let n = Lb[e];
  return n || (n = {
    key: e,
    plots: [],
    sub(o) {
      n.plots.push(o);
    },
    unsub(o) {
      n.plots = n.plots.filter((i) => i != o);
    },
    pub(o, i, a, r, l, s, u) {
      for (let c = 0; c < n.plots.length; c++)
        n.plots[c] != i && n.plots[c].pub(o, i, a, r, l, s, u);
    }
  }, e != null && (Lb[e] = n)), n;
}
const ys = 1, Mg = 2;
function Sl(e, t, n) {
  const o = e.mode, i = e.series[t], a = o == 2 ? e._data[t] : e._data, r = e.scales, l = e.bbox;
  let s = a[0], u = o == 2 ? a[1] : a[t], c = o == 2 ? r[i.facets[0].scale] : r[e.series[0].scale], d = o == 2 ? r[i.facets[1].scale] : r[i.scale], f = l.left, g = l.top, m = l.width, b = l.height, y = e.valToPosH, S = e.valToPosV;
  return c.ori == 0 ? n(
    i,
    s,
    u,
    c,
    d,
    y,
    S,
    f,
    g,
    m,
    b,
    nf,
    Rs,
    af,
    Hw,
    jw
  ) : n(
    i,
    s,
    u,
    c,
    d,
    S,
    y,
    g,
    f,
    b,
    m,
    of,
    Ns,
    rv,
    Vw,
    Ww
  );
}
function iv(e, t) {
  let n = 0, o = 0, i = en(e.bands, Jh);
  for (let a = 0; a < i.length; a++) {
    let r = i[a];
    r.series[0] == t ? n = r.dir : r.series[1] == t && (r.dir == 1 ? o |= 1 : o |= 2);
  }
  return [
    n,
    o == 1 ? -1 : (
      // neg only
      o == 2 ? 1 : (
        // pos only
        o == 3 ? 2 : (
          // both
          0
        )
      )
    )
  ];
}
function QM(e, t, n, o, i) {
  let a = e.mode, r = e.series[t], l = a == 2 ? r.facets[1].scale : r.scale, s = e.scales[l];
  return i == -1 ? s.min : i == 1 ? s.max : s.distr == 3 ? s.dir == 1 ? s.min : s.max : 0;
}
function La(e, t, n, o, i, a) {
  return Sl(e, t, (r, l, s, u, c, d, f, g, m, b, y) => {
    let S = r.pxRound;
    const C = u.dir * (u.ori == 0 ? 1 : -1), O = u.ori == 0 ? Rs : Ns;
    let $, P;
    C == 1 ? ($ = n, P = o) : ($ = o, P = n);
    let k = S(d(l[$], u, b, g)), x = S(f(s[$], c, y, m)), E = S(d(l[P], u, b, g)), z = S(f(a == 1 ? c.max : c.min, c, y, m)), B = new Path2D(i);
    return O(B, E, z), O(B, k, z), O(B, k, x), B;
  });
}
function tf(e, t, n, o, i, a) {
  let r = null;
  if (e.length > 0) {
    r = new Path2D();
    const l = t == 0 ? af : rv;
    let s = n;
    for (let d = 0; d < e.length; d++) {
      let f = e[d];
      if (f[1] > f[0]) {
        let g = f[0] - s;
        g > 0 && l(r, s, o, g, o + a), s = f[1];
      }
    }
    let u = n + i - s, c = 10;
    u > 0 && l(r, s, o - c / 2, u, o + a + c);
  }
  return r;
}
function ZM(e, t, n) {
  let o = e[e.length - 1];
  o && o[0] == t ? o[1] = n : e.push([t, n]);
}
function av(e, t, n, o, i, a, r) {
  let l = [], s = e.length;
  for (let u = i == 1 ? n : o; u >= n && u <= o; u += i)
    if (t[u] === null) {
      let d = u, f = u;
      if (i == 1)
        for (; ++u <= o && t[u] === null; )
          f = u;
      else
        for (; --u >= n && t[u] === null; )
          f = u;
      let g = a(e[d]), m = f == d ? g : a(e[f]), b = d - i;
      g = r <= 0 && b >= 0 && b < s ? a(e[b]) : g;
      let S = f + i;
      m = r >= 0 && S >= 0 && S < s ? a(e[S]) : m, m >= g && l.push([g, m]);
    }
  return l;
}
function Hb(e) {
  return e == 0 ? vw : e == 1 ? oo : (t) => Zr(t, e);
}
function Lw(e) {
  let t = e == 0 ? nf : of, n = e == 0 ? (i, a, r, l, s, u) => {
    i.arcTo(a, r, l, s, u);
  } : (i, a, r, l, s, u) => {
    i.arcTo(r, a, s, l, u);
  }, o = e == 0 ? (i, a, r, l, s) => {
    i.rect(a, r, l, s);
  } : (i, a, r, l, s) => {
    i.rect(r, a, s, l);
  };
  return (i, a, r, l, s, u = 0, c = 0) => {
    u == 0 && c == 0 ? o(i, a, r, l, s) : (u = Oi(u, l / 2, s / 2), c = Oi(c, l / 2, s / 2), t(i, a + u, r), n(i, a + l, r, a + l, r + s, u), n(i, a + l, r + s, a, r + s, c), n(i, a, r + s, a, r, c), n(i, a, r, a + l, r, u), i.closePath());
  };
}
const nf = (e, t, n) => {
  e.moveTo(t, n);
}, of = (e, t, n) => {
  e.moveTo(n, t);
}, Rs = (e, t, n) => {
  e.lineTo(t, n);
}, Ns = (e, t, n) => {
  e.lineTo(n, t);
}, af = Lw(0), rv = Lw(1), Hw = (e, t, n, o, i, a) => {
  e.arc(t, n, o, i, a);
}, Vw = (e, t, n, o, i, a) => {
  e.arc(n, t, o, i, a);
}, jw = (e, t, n, o, i, a, r) => {
  e.bezierCurveTo(t, n, o, i, a, r);
}, Ww = (e, t, n, o, i, a, r) => {
  e.bezierCurveTo(n, t, i, o, r, a);
};
function qw(e) {
  return (t, n, o, i, a) => Sl(t, n, (r, l, s, u, c, d, f, g, m, b, y) => {
    let { pxRound: S, points: C } = r, O, $;
    u.ori == 0 ? (O = nf, $ = Hw) : (O = of, $ = Vw);
    const P = Pn(C.width * cn, 3);
    let k = (C.size - C.width) / 2 * cn, x = Pn(k * 2, 3), E = new Path2D(), z = new Path2D(), { left: B, top: D, width: W, height: H } = t.bbox;
    af(
      z,
      B - x,
      D - x,
      W + x * 2,
      H + x * 2
    );
    const F = (A) => {
      if (s[A] != null) {
        let U = S(d(l[A], u, b, g)), j = S(f(s[A], c, y, m));
        O(E, U + k, j), $(E, U, j, k, 0, nd * 2);
      }
    };
    if (a)
      a.forEach(F);
    else
      for (let A = o; A <= i; A++)
        F(A);
    return {
      stroke: P > 0 ? E : null,
      fill: E,
      clip: z,
      flags: ys | Mg
    };
  });
}
function Gw(e) {
  return (t, n, o, i, a, r) => {
    o != i && (a != o && r != o && e(t, n, o), a != i && r != i && e(t, n, i), e(t, n, r));
  };
}
const JM = Gw(Rs), eT = Gw(Ns);
function Kw(e) {
  const t = en(e?.alignGaps, 0);
  return (n, o, i, a) => Sl(n, o, (r, l, s, u, c, d, f, g, m, b, y) => {
    let S = r.pxRound, C = (J) => S(d(J, u, b, g)), O = (J) => S(f(J, c, y, m)), $, P;
    u.ori == 0 ? ($ = Rs, P = JM) : ($ = Ns, P = eT);
    const k = u.dir * (u.ori == 0 ? 1 : -1), x = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: ys }, E = x.stroke;
    let z = qt, B = -qt, D, W, H, F = C(l[k == 1 ? i : a]), A = hs(s, i, a, 1 * k), U = hs(s, i, a, -1 * k), j = C(l[A]), ae = C(l[U]), G = !1;
    for (let J = k == 1 ? i : a; J >= i && J <= a; J += k) {
      let be = C(l[J]), xe = s[J];
      be == F ? xe != null ? (W = O(xe), z == qt && ($(E, be, W), D = W), z = Oi(W, z), B = Oo(W, B)) : xe === null && (G = !0) : (z != qt && (P(E, F, z, B, D, W), H = F), xe != null ? (W = O(xe), $(E, be, W), z = B = D = W) : (z = qt, B = -qt, xe === null && (G = !0)), F = be);
    }
    z != qt && z != B && H != F && P(E, F, z, B, D, W);
    let [Y, K] = iv(n, o);
    if (r.fill != null || Y != 0) {
      let J = x.fill = new Path2D(E), be = r.fillTo(n, o, r.min, r.max, Y), xe = O(be);
      $(J, ae, xe), $(J, j, xe);
    }
    if (!r.spanGaps) {
      let J = [];
      G && J.push(...av(l, s, i, a, k, C, t)), x.gaps = J = r.gaps(n, o, i, a, J), x.clip = tf(J, u.ori, g, m, b, y);
    }
    return K != 0 && (x.band = K == 2 ? [
      La(n, o, i, a, E, -1),
      La(n, o, i, a, E, 1)
    ] : La(n, o, i, a, E, K)), x;
  });
}
function tT(e) {
  const t = en(e.align, 1), n = en(e.ascDesc, !1), o = en(e.alignGaps, 0), i = en(e.extend, !1);
  return (a, r, l, s) => Sl(a, r, (u, c, d, f, g, m, b, y, S, C, O) => {
    let $ = u.pxRound, { left: P, width: k } = a.bbox, x = (Y) => $(m(Y, f, C, y)), E = (Y) => $(b(Y, g, O, S)), z = f.ori == 0 ? Rs : Ns;
    const B = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: ys }, D = B.stroke, W = f.dir * (f.ori == 0 ? 1 : -1);
    l = hs(d, l, s, 1), s = hs(d, l, s, -1);
    let H = E(d[W == 1 ? l : s]), F = x(c[W == 1 ? l : s]), A = F, U = F;
    i && t == -1 && (U = P, z(D, U, H)), z(D, F, H);
    for (let Y = W == 1 ? l : s; Y >= l && Y <= s; Y += W) {
      let K = d[Y];
      if (K == null)
        continue;
      let J = x(c[Y]), be = E(K);
      t == 1 ? z(D, J, H) : z(D, A, be), z(D, J, be), H = be, A = J;
    }
    let j = A;
    i && t == 1 && (j = P + k, z(D, j, H));
    let [ae, G] = iv(a, r);
    if (u.fill != null || ae != 0) {
      let Y = B.fill = new Path2D(D), K = u.fillTo(a, r, u.min, u.max, ae), J = E(K);
      z(Y, j, J), z(Y, U, J);
    }
    if (!u.spanGaps) {
      let Y = [];
      Y.push(...av(c, d, l, s, W, x, o));
      let K = u.width * cn / 2, J = n || t == 1 ? K : -K, be = n || t == -1 ? -K : K;
      Y.forEach((xe) => {
        xe[0] += J, xe[1] += be;
      }), B.gaps = Y = u.gaps(a, r, l, s, Y), B.clip = tf(Y, f.ori, y, S, C, O);
    }
    return G != 0 && (B.band = G == 2 ? [
      La(a, r, l, s, D, -1),
      La(a, r, l, s, D, 1)
    ] : La(a, r, l, s, D, G)), B;
  });
}
function Vb(e, t, n, o, i, a, r = qt) {
  if (e.length > 1) {
    let l = null;
    for (let s = 0, u = 1 / 0; s < e.length; s++)
      if (t[s] !== void 0) {
        if (l != null) {
          let c = ao(e[s] - e[l]);
          c < u && (u = c, r = ao(n(e[s], o, i, a) - n(e[l], o, i, a)));
        }
        l = s;
      }
  }
  return r;
}
function nT(e) {
  e = e || Su;
  const t = en(e.size, [0.6, qt, 1]), n = e.align || 0, o = e.gap || 0;
  let i = e.radius;
  i = // [valueRadius, baselineRadius]
  i == null ? [0, 0] : typeof i == "number" ? [i, 0] : i;
  const a = Wt(i), r = 1 - t[0], l = en(t[1], qt), s = en(t[2], 1), u = en(e.disp, Su), c = en(e.each, (g) => {
  }), { fill: d, stroke: f } = u;
  return (g, m, b, y) => Sl(g, m, (S, C, O, $, P, k, x, E, z, B, D) => {
    let W = S.pxRound, H = n, F = o * cn, A = l * cn, U = s * cn, j, ae;
    $.ori == 0 ? [j, ae] = a(g, m) : [ae, j] = a(g, m);
    const G = $.dir * ($.ori == 0 ? 1 : -1);
    let Y = $.ori == 0 ? af : rv, K = $.ori == 0 ? c : (De, Je, wt, lt, qe, at, dt) => {
      c(De, Je, wt, qe, lt, dt, at);
    }, J = en(g.bands, Jh).find((De) => De.series[0] == m), be = J != null ? J.dir : 0, xe = S.fillTo(g, m, S.min, S.max, be), he = W(x(xe, P, D, z)), de, ne, we, re = B, se = W(S.width * cn), ve = !1, Me = null, ke = null, Fe = null, Re = null;
    d != null && (se == 0 || f != null) && (ve = !0, Me = d.values(g, m, b, y), ke = /* @__PURE__ */ new Map(), new Set(Me).forEach((De) => {
      De != null && ke.set(De, new Path2D());
    }), se > 0 && (Fe = f.values(g, m, b, y), Re = /* @__PURE__ */ new Map(), new Set(Fe).forEach((De) => {
      De != null && Re.set(De, new Path2D());
    })));
    let { x0: We, size: et } = u;
    if (We != null && et != null) {
      H = 1, C = We.values(g, m, b, y), We.unit == 2 && (C = C.map((wt) => g.posToVal(E + wt * B, $.key, !0)));
      let De = et.values(g, m, b, y);
      et.unit == 2 ? ne = De[0] * B : ne = k(De[0], $, B, E) - k(0, $, B, E), re = Vb(C, O, k, $, B, E, re), we = re - ne + F;
    } else
      re = Vb(C, O, k, $, B, E, re), we = re * r + F, ne = re - we;
    we < 1 && (we = 0), se >= ne / 2 && (se = 0), we < 5 && (W = vw);
    let Le = we > 0, Ne = re - we - (Le ? se : 0);
    ne = W(Pg(Ne, U, A)), de = (H == 0 ? ne / 2 : H == G ? 0 : ne) - H * G * ((H == 0 ? F / 2 : 0) + (Le ? se / 2 : 0));
    const Ge = { stroke: null, fill: null, clip: null, band: null, gaps: null, flags: 0 }, it = ve ? null : new Path2D();
    let Ke = null;
    if (J != null)
      Ke = g.data[J.series[1]];
    else {
      let { y0: De, y1: Je } = u;
      De != null && Je != null && (O = Je.values(g, m, b, y), Ke = De.values(g, m, b, y));
    }
    let Oe = j * ne, Ve = ae * ne;
    for (let De = G == 1 ? b : y; De >= b && De <= y; De += G) {
      let Je = O[De];
      if (Je == null)
        continue;
      if (Ke != null) {
        let Xt = Ke[De] ?? 0;
        if (Je - Xt == 0)
          continue;
        he = x(Xt, P, D, z);
      }
      let wt = $.distr != 2 || u != null ? C[De] : De, lt = k(wt, $, B, E), qe = x(en(Je, xe), P, D, z), at = W(lt - de), dt = W(Oo(qe, he)), vt = W(Oi(qe, he)), Rt = dt - vt;
      if (Je != null) {
        let Xt = Je < 0 ? Ve : Oe, vn = Je < 0 ? Oe : Ve;
        ve ? (se > 0 && Fe[De] != null && Y(Re.get(Fe[De]), at, vt + ii(se / 2), ne, Oo(0, Rt - se), Xt, vn), Me[De] != null && Y(ke.get(Me[De]), at, vt + ii(se / 2), ne, Oo(0, Rt - se), Xt, vn)) : Y(it, at, vt + ii(se / 2), ne, Oo(0, Rt - se), Xt, vn), K(
          g,
          m,
          De,
          at - se / 2,
          vt,
          ne + se,
          Rt
        );
      }
    }
    return se > 0 ? Ge.stroke = ve ? Re : it : ve || (Ge._fill = S.width == 0 ? S._fill : S._stroke ?? S._fill, Ge.width = 0), Ge.fill = ve ? ke : it, Ge;
  });
}
function oT(e, t) {
  const n = en(t?.alignGaps, 0);
  return (o, i, a, r) => Sl(o, i, (l, s, u, c, d, f, g, m, b, y, S) => {
    let C = l.pxRound, O = (j) => C(f(j, c, y, m)), $ = (j) => C(g(j, d, S, b)), P, k, x;
    c.ori == 0 ? (P = nf, x = Rs, k = jw) : (P = of, x = Ns, k = Ww);
    const E = c.dir * (c.ori == 0 ? 1 : -1);
    a = hs(u, a, r, 1), r = hs(u, a, r, -1);
    let z = O(s[E == 1 ? a : r]), B = z, D = [], W = [];
    for (let j = E == 1 ? a : r; j >= a && j <= r; j += E)
      if (u[j] != null) {
        let G = s[j], Y = O(G);
        D.push(B = Y), W.push($(u[j]));
      }
    const H = { stroke: e(D, W, P, x, k, C), fill: null, clip: null, band: null, gaps: null, flags: ys }, F = H.stroke;
    let [A, U] = iv(o, i);
    if (l.fill != null || A != 0) {
      let j = H.fill = new Path2D(F), ae = l.fillTo(o, i, l.min, l.max, A), G = $(ae);
      x(j, B, G), x(j, z, G);
    }
    if (!l.spanGaps) {
      let j = [];
      j.push(...av(s, u, a, r, E, O, n)), H.gaps = j = l.gaps(o, i, a, r, j), H.clip = tf(j, c.ori, m, b, y, S);
    }
    return U != 0 && (H.band = U == 2 ? [
      La(o, i, a, r, F, -1),
      La(o, i, a, r, F, 1)
    ] : La(o, i, a, r, F, U)), H;
  });
}
function iT(e) {
  return oT(aT, e);
}
function aT(e, t, n, o, i, a) {
  const r = e.length;
  if (r < 2)
    return null;
  const l = new Path2D();
  if (n(l, e[0], t[0]), r == 2)
    o(l, e[1], t[1]);
  else {
    let s = Array(r), u = Array(r - 1), c = Array(r - 1), d = Array(r - 1);
    for (let f = 0; f < r - 1; f++)
      c[f] = t[f + 1] - t[f], d[f] = e[f + 1] - e[f], u[f] = c[f] / d[f];
    s[0] = u[0];
    for (let f = 1; f < r - 1; f++)
      u[f] === 0 || u[f - 1] === 0 || u[f - 1] > 0 != u[f] > 0 ? s[f] = 0 : (s[f] = 3 * (d[f - 1] + d[f]) / ((2 * d[f] + d[f - 1]) / u[f - 1] + (d[f] + 2 * d[f - 1]) / u[f]), isFinite(s[f]) || (s[f] = 0));
    s[r - 1] = u[r - 2];
    for (let f = 0; f < r - 1; f++)
      i(
        l,
        e[f] + d[f] / 3,
        t[f] + s[f] * d[f] / 3,
        e[f + 1] - d[f] / 3,
        t[f + 1] - s[f + 1] * d[f] / 3,
        e[f + 1],
        t[f + 1]
      );
  }
  return l;
}
const Tg = /* @__PURE__ */ new Set();
function jb() {
  for (let e of Tg)
    e.syncRect(!0);
}
zs && (sl(FI, as, jb), sl(LI, as, jb, !0), sl(Sd, as, () => {
  ro.pxRatio = cn;
}));
const rT = Kw(), lT = qw();
function Wb(e, t, n, o) {
  return (o ? [e[0], e[1]].concat(e.slice(2)) : [e[0]].concat(e.slice(1))).map((a, r) => kg(a, r, t, n));
}
function sT(e, t) {
  return e.map((n, o) => o == 0 ? {} : Jn({}, t, n));
}
function kg(e, t, n, o) {
  return Jn({}, t == 0 ? n : o, e);
}
function Yw(e, t, n) {
  return t == null ? ms : [t, n];
}
const uT = Yw;
function cT(e, t, n) {
  return t == null ? ms : Cd(t, n, Qh, !0);
}
function Uw(e, t, n, o) {
  return t == null ? ms : Zd(t, n, e.scales[o].log, !1);
}
const dT = Uw;
function Xw(e, t, n, o) {
  return t == null ? ms : Xh(t, n, e.scales[o].log, !1);
}
const fT = Xw;
function pT(e, t, n, o, i) {
  let a = Oo(Sb(e), Sb(t)), r = t - e, l = Hi(i / o * r, n);
  do {
    let s = n[l], u = o * s / r;
    if (u >= i && a + (s < 5 ? Or.get(s) : 0) <= 17)
      return [s, u];
  } while (++l < n.length);
  return [0, 0];
}
function qb(e) {
  let t, n;
  return e = e.replace(/(\d+)px/, (o, i) => (t = oo((n = +i) * cn)) + "px"), [e, t, n];
}
function gT(e) {
  e.show && [e.font, e.labelFont].forEach((t) => {
    let n = Pn(t[2] * cn, 1);
    t[0] = t[0].replace(/[0-9.]+px/, n + "px"), t[1] = n;
  });
}
function ro(e, t, n) {
  const o = {
    mode: en(e.mode, 1)
  }, i = o.mode;
  function a(V, Q) {
    return ((Q.distr == 3 ? Fa(V > 0 ? V : Q.clamp(o, V, Q.min, Q.max, Q.key)) : Q.distr == 4 ? op(V, Q.asinh) : Q.distr == 100 ? Q.fwd(V) : V) - Q._min) / (Q._max - Q._min);
  }
  function r(V, Q, fe, pe) {
    let Ce = a(V, Q);
    return pe + fe * (Q.dir == -1 ? 1 - Ce : Ce);
  }
  function l(V, Q, fe, pe) {
    let Ce = a(V, Q);
    return pe + fe * (Q.dir == -1 ? Ce : 1 - Ce);
  }
  function s(V, Q, fe, pe) {
    return Q.ori == 0 ? r(V, Q, fe, pe) : l(V, Q, fe, pe);
  }
  o.valToPosH = r, o.valToPosV = l;
  let u = !1;
  o.status = 0;
  const c = o.root = Si(wI);
  if (e.id != null && (c.id = e.id), Zo(c, e.class), e.title) {
    let V = Si($I, c);
    V.textContent = e.title;
  }
  const d = Bi("canvas"), f = o.ctx = d.getContext("2d"), g = Si(PI, c);
  sl("click", g, (V) => {
    V.target === b && (Sn != Ma || yn != ar) && no.click(o, V);
  }, !0);
  const m = o.under = Si(OI, g);
  g.appendChild(d);
  const b = o.over = Si(II, g);
  e = bs(e);
  const y = +en(e.pxAlign, 1), S = Hb(y);
  (e.plugins || []).forEach((V) => {
    V.opts && (e = V.opts(o, e) || e);
  });
  const C = e.ms || 1e-3, O = o.series = i == 1 ? Wb(e.series || [], Db, Fb, !1) : sT(e.series || [null], Bb), $ = o.axes = Wb(e.axes || [], Ab, Rb, !0), P = o.scales = {}, k = o.bands = e.bands || [];
  k.forEach((V) => {
    V.fill = Wt(V.fill || null), V.dir = en(V.dir, -1);
  });
  const x = i == 2 ? O[1].facets[0].scale : O[0].scale, E = {
    axes: uc,
    series: Za
  }, z = (e.drawOrder || ["axes", "series"]).map((V) => E[V]);
  function B(V) {
    let Q = P[V];
    if (Q == null) {
      let fe = (e.scales || Su)[V] || Su;
      if (fe.from != null)
        B(fe.from), P[V] = Jn({}, P[fe.from], fe, { key: V });
      else {
        Q = P[V] = Jn({}, V == x ? Bw : XM, fe), Q.key = V;
        let pe = Q.time, Ce = Q.range, p = gr(Ce);
        if ((V != x || i == 2 && !pe) && (p && (Ce[0] == null || Ce[1] == null) && (Ce = {
          min: Ce[0] == null ? yb : {
            mode: 1,
            hard: Ce[0],
            soft: Ce[0]
          },
          max: Ce[1] == null ? yb : {
            mode: 1,
            hard: Ce[1],
            soft: Ce[1]
          }
        }, p = !1), !p && ef(Ce))) {
          let h = Ce;
          Ce = (w, T, _) => T == null ? ms : Cd(T, _, h);
        }
        Q.range = Wt(Ce || (pe ? uT : V == x ? Q.distr == 3 ? dT : Q.distr == 4 ? fT : Yw : Q.distr == 3 ? Uw : Q.distr == 4 ? Xw : cT)), Q.auto = Wt(p ? !1 : Q.auto), Q.clamp = Wt(Q.clamp || UM), Q._min = Q._max = null;
      }
    }
  }
  B("x"), B("y"), i == 1 && O.forEach((V) => {
    B(V.scale);
  }), $.forEach((V) => {
    B(V.scale);
  });
  for (let V in e.scales)
    B(V);
  const D = P[x], W = D.distr;
  let H, F;
  D.ori == 0 ? (Zo(c, SI), H = r, F = l) : (Zo(c, CI), H = l, F = r);
  const A = {};
  for (let V in P) {
    let Q = P[V];
    (Q.min != null || Q.max != null) && (A[V] = { min: Q.min, max: Q.max }, Q.min = Q.max = null);
  }
  const U = e.tzDate || ((V) => new Date(oo(V / C))), j = e.fmtDate || ev, ae = C == 1 ? SM(U) : PM(U), G = kb(U, Tb(C == 1 ? wM : $M, j)), Y = _b(U, Eb(IM, j)), K = [], J = o.legend = Jn({}, kM, e.legend), be = J.show, xe = J.markers;
  J.idxs = K, xe.width = Wt(xe.width), xe.dash = Wt(xe.dash), xe.stroke = Wt(xe.stroke), xe.fill = Wt(xe.fill);
  let he, de, ne, we = [], re = [], se, ve = !1, Me = {};
  if (J.live) {
    const V = O[1] ? O[1].values : null;
    ve = V != null, se = ve ? V(o, 1, 0) : { _: 0 };
    for (let Q in se)
      Me[Q] = Yh;
  }
  if (be)
    if (he = Bi("table", AI, c), ne = Bi("tbody", null, he), J.mount(o, he), ve) {
      de = Bi("thead", null, he, ne);
      let V = Bi("tr", null, de);
      Bi("th", null, V);
      for (var ke in se)
        Bi("th", ab, V).textContent = ke;
    } else
      Zo(he, zI), J.live && Zo(he, DI);
  const Fe = { show: !0 }, Re = { show: !1 };
  function We(V, Q) {
    if (Q == 0 && (ve || !J.live || i == 2))
      return ms;
    let fe = [], pe = Bi("tr", RI, ne, ne.childNodes[Q]);
    Zo(pe, V.class), V.show || Zo(pe, tl);
    let Ce = Bi("th", null, pe);
    if (xe.show) {
      let w = Si(NI, Ce);
      if (Q > 0) {
        let T = xe.width(o, Q);
        T && (w.style.border = T + "px " + xe.dash(o, Q) + " " + xe.stroke(o, Q)), w.style.background = xe.fill(o, Q);
      }
    }
    let p = Si(ab, Ce);
    p.textContent = V.label, Q > 0 && (xe.show || (p.style.color = V.width > 0 ? xe.stroke(o, Q) : xe.fill(o, Q)), Le("click", Ce, (w) => {
      if (ut._lock)
        return;
      qn(w);
      let T = O.indexOf(V);
      if ((w.ctrlKey || w.metaKey) != J.isolate) {
        let _ = O.some((L, q) => q > 0 && q != T && L.show);
        O.forEach((L, q) => {
          q > 0 && gi(q, _ ? q == T ? Fe : Re : Fe, !0, jn.setSeries);
        });
      } else
        gi(T, { show: !V.show }, !0, jn.setSeries);
    }, !1), Fo && Le(cb, Ce, (w) => {
      ut._lock || (qn(w), gi(O.indexOf(V), lr, !0, jn.setSeries));
    }, !1));
    for (var h in se) {
      let w = Bi("td", BI, pe);
      w.textContent = "--", fe.push(w);
    }
    return [pe, fe];
  }
  const et = /* @__PURE__ */ new Map();
  function Le(V, Q, fe, pe = !0) {
    const Ce = et.get(Q) || {}, p = ut.bind[V](o, Q, fe, pe);
    p && (sl(V, Q, Ce[V] = p), et.set(Q, Ce));
  }
  function Ne(V, Q, fe) {
    const pe = et.get(Q) || {};
    for (let Ce in pe)
      (V == null || Ce == V) && ($g(Ce, Q, pe[Ce]), delete pe[Ce]);
    V == null && et.delete(Q);
  }
  let Ge = 0, it = 0, Ke = 0, Oe = 0, Ve = 0, De = 0, Je = Ve, wt = De, lt = Ke, qe = Oe, at = 0, dt = 0, vt = 0, Rt = 0;
  o.bbox = {};
  let Xt = !1, vn = !1, Dt = !1, zn = !1, on = !1, Qt = !1;
  function mn(V, Q, fe) {
    (fe || V != o.width || Q != o.height) && Kt(V, Q), nr(!1), Dt = !0, vn = !0, ia();
  }
  function Kt(V, Q) {
    o.width = Ge = Ke = V, o.height = it = Oe = Q, Ve = De = 0, Hn(), Co();
    let fe = o.bbox;
    at = fe.left = Zr(Ve * cn, 0.5), dt = fe.top = Zr(De * cn, 0.5), vt = fe.width = Zr(Ke * cn, 0.5), Rt = fe.height = Zr(Oe * cn, 0.5);
  }
  const Mn = 3;
  function an() {
    let V = !1, Q = 0;
    for (; !V; ) {
      Q++;
      let fe = kl(Q), pe = Fr(Q);
      V = Q == Mn || fe && pe, V || (Kt(o.width, o.height), vn = !0);
    }
  }
  function gn({ width: V, height: Q }) {
    mn(V, Q);
  }
  o.setSize = gn;
  function Hn() {
    let V = !1, Q = !1, fe = !1, pe = !1;
    $.forEach((Ce, p) => {
      if (Ce.show && Ce._show) {
        let { side: h, _size: w } = Ce, T = h % 2, _ = Ce.label != null ? Ce.labelSize : 0, L = w + _;
        L > 0 && (T ? (Ke -= L, h == 3 ? (Ve += L, pe = !0) : fe = !0) : (Oe -= L, h == 0 ? (De += L, V = !0) : Q = !0));
      }
    }), Jt[0] = V, Jt[1] = fe, Jt[2] = Q, Jt[3] = pe, Ke -= rn[1] + rn[3], Ve += rn[3], Oe -= rn[2] + rn[0], De += rn[0];
  }
  function Co() {
    let V = Ve + Ke, Q = De + Oe, fe = Ve, pe = De;
    function Ce(p, h) {
      switch (p) {
        case 1:
          return V += h, V - h;
        case 2:
          return Q += h, Q - h;
        case 3:
          return fe -= h, fe + h;
        case 0:
          return pe -= h, pe + h;
      }
    }
    $.forEach((p, h) => {
      if (p.show && p._show) {
        let w = p.side;
        p._pos = Ce(w, p._size), p.label != null && (p._lpos = Ce(w, p.labelSize));
      }
    });
  }
  const ut = o.cursor = Jn({}, RM, { drag: { y: i == 2 } }, e.cursor);
  if (ut.dataIdx == null) {
    let V = ut.hover, Q = V.skip = new Set(V.skip ?? []);
    Q.add(void 0);
    let fe = V.prox = Wt(V.prox), pe = V.bias ??= 0;
    ut.dataIdx = (Ce, p, h, w) => {
      if (p == 0)
        return h;
      let T = h, _ = fe(Ce, p, h, w) ?? qt, L = _ >= 0 && _ < qt, q = D.ori == 0 ? Ke : Oe, X = ut.left, oe = t[0], me = t[p];
      if (Q.has(me[h])) {
        T = null;
        let ie = null, Se = null, $e;
        if (pe == 0 || pe == -1)
          for ($e = h; ie == null && $e-- > 0; )
            Q.has(me[$e]) || (ie = $e);
        if (pe == 0 || pe == 1)
          for ($e = h; Se == null && $e++ < me.length; )
            Q.has(me[$e]) || (Se = $e);
        if (ie != null || Se != null)
          if (L) {
            let _e = ie == null ? -1 / 0 : H(oe[ie], D, q, 0), Ae = Se == null ? 1 / 0 : H(oe[Se], D, q, 0), Be = X - _e, Ye = Ae - X;
            Be <= Ye ? Be <= _ && (T = ie) : Ye <= _ && (T = Se);
          } else
            T = Se == null ? ie : ie == null ? Se : h - ie <= Se - h ? ie : Se;
      } else L && ao(X - H(oe[h], D, q, 0)) > _ && (T = null);
      return T;
    };
  }
  const qn = (V) => {
    ut.event = V;
  };
  ut.idxs = K, ut._lock = !1;
  let bn = ut.points;
  bn.show = Wt(bn.show), bn.size = Wt(bn.size), bn.stroke = Wt(bn.stroke), bn.width = Wt(bn.width), bn.fill = Wt(bn.fill);
  const Gn = o.focus = Jn({}, e.focus || { alpha: 0.3 }, ut.focus), Fo = Gn.prox >= 0, pi = Fo && bn.one;
  let ze = [], nt = [], tt = [];
  function zt(V, Q) {
    let fe = bn.show(o, Q);
    if (fe)
      return Zo(fe, _I), Zo(fe, V.class), ua(fe, -10, -10, Ke, Oe), b.insertBefore(fe, ze[Q]), fe;
  }
  function Vn(V, Q) {
    if (i == 1 || Q > 0) {
      let fe = i == 1 && P[V.scale].time, pe = V.value;
      V.value = fe ? Pb(pe) ? _b(U, Eb(pe, j)) : pe || Y : pe || GM, V.label = V.label || (fe ? BM : NM);
    }
    if (pi || Q > 0) {
      V.width = V.width == null ? 1 : V.width, V.paths = V.paths || rT || XI, V.fillTo = Wt(V.fillTo || QM), V.pxAlign = +en(V.pxAlign, y), V.pxRound = Hb(V.pxAlign), V.stroke = Wt(V.stroke || null), V.fill = Wt(V.fill || null), V._stroke = V._fill = V._paths = V._focus = null;
      let fe = KM(Oo(1, V.width), 1), pe = V.points = Jn({}, {
        size: fe,
        width: Oo(1, fe * 0.2),
        stroke: V.stroke,
        space: fe * 2,
        paths: lT,
        _stroke: null,
        _fill: null
      }, V.points);
      pe.show = Wt(pe.show), pe.filter = Wt(pe.filter), pe.fill = Wt(pe.fill), pe.stroke = Wt(pe.stroke), pe.paths = Wt(pe.paths), pe.pxAlign = V.pxAlign;
    }
    if (be) {
      let fe = We(V, Q);
      we.splice(Q, 0, fe[0]), re.splice(Q, 0, fe[1]), J.values.push(null);
    }
    if (ut.show) {
      K.splice(Q, 0, null);
      let fe = null;
      pi ? Q == 0 && (fe = zt(V, Q)) : Q > 0 && (fe = zt(V, Q)), ze.splice(Q, 0, fe), nt.splice(Q, 0, 0), tt.splice(Q, 0, 0);
    }
    Bn("addSeries", Q);
  }
  function Rn(V, Q) {
    Q = Q ?? O.length, V = i == 1 ? kg(V, Q, Db, Fb) : kg(V, Q, {}, Bb), O.splice(Q, 0, V), Vn(O[Q], Q);
  }
  o.addSeries = Rn;
  function go(V) {
    if (O.splice(V, 1), be) {
      J.values.splice(V, 1), re.splice(V, 1);
      let Q = we.splice(V, 1)[0];
      Ne(null, Q.firstChild), Q.remove();
    }
    ut.show && (K.splice(V, 1), ze.splice(V, 1)[0].remove(), nt.splice(V, 1), tt.splice(V, 1)), Bn("delSeries", V);
  }
  o.delSeries = go;
  const Jt = [!1, !1, !1, !1];
  function ht(V, Q) {
    if (V._show = V.show, V.show) {
      let fe = V.side % 2, pe = P[V.scale];
      pe == null && (V.scale = fe ? O[1].scale : x, pe = P[V.scale]);
      let Ce = pe.time;
      V.size = Wt(V.size), V.space = Wt(V.space), V.rotate = Wt(V.rotate), gr(V.incrs) && V.incrs.forEach((h) => {
        !Or.has(h) && Or.set(h, yw(h));
      }), V.incrs = Wt(V.incrs || (pe.distr == 2 ? bM : Ce ? C == 1 ? xM : CM : Jr)), V.splits = Wt(V.splits || (Ce && pe.distr == 1 ? ae : pe.distr == 3 ? Og : pe.distr == 4 ? HM : LM)), V.stroke = Wt(V.stroke), V.grid.stroke = Wt(V.grid.stroke), V.ticks.stroke = Wt(V.ticks.stroke), V.border.stroke = Wt(V.border.stroke);
      let p = V.values;
      V.values = // static array of tick values
      gr(p) && !gr(p[0]) ? Wt(p) : (
        // temporal
        Ce ? (
          // config array of fmtDate string tpls
          gr(p) ? kb(U, Tb(p, j)) : (
            // fmtDate string tpl
            Pb(p) ? OM(U, p) : p || G
          )
        ) : p || FM
      ), V.filter = Wt(V.filter || (pe.distr >= 3 && pe.log == 10 ? WM : pe.distr == 3 && pe.log == 2 ? qM : mw)), V.font = qb(V.font), V.labelFont = qb(V.labelFont), V._size = V.size(o, null, Q, 0), V._space = V._rotate = V._incrs = V._found = // foundIncrSpace
      V._splits = V._values = null, V._size > 0 && (Jt[Q] = !0, V._el = Si(MI, g));
    }
  }
  function Zn(V, Q, fe, pe) {
    let [Ce, p, h, w] = fe, T = Q % 2, _ = 0;
    return T == 0 && (w || p) && (_ = Q == 0 && !Ce || Q == 2 && !h ? oo(Ab.size / 3) : 0), T == 1 && (Ce || h) && (_ = Q == 1 && !p || Q == 3 && !w ? oo(Rb.size / 2) : 0), _;
  }
  const $o = o.padding = (e.padding || [Zn, Zn, Zn, Zn]).map((V) => Wt(en(V, Zn))), rn = o._padding = $o.map((V, Q) => V(o, Q, Jt, 0));
  let ln, Ht = null, sn = null;
  const Io = i == 1 ? O[0].idxs : null;
  let kn = null, Lo = !1;
  function ho(V, Q) {
    if (t = V ?? [], o.data = o._data = t, i == 2) {
      ln = 0;
      for (let fe = 1; fe < O.length; fe++)
        ln += t[fe][0].length;
    } else {
      t.length == 0 && (o.data = o._data = t = [[]]), kn = t[0], ln = kn.length;
      let fe = t;
      if (W == 2) {
        fe = t.slice();
        let pe = fe[0] = Array(ln);
        for (let Ce = 0; Ce < ln; Ce++)
          pe[Ce] = Ce;
      }
      o._data = t = fe;
    }
    if (nr(!0), Bn("setData"), W == 2 && (Dt = !0), Q !== !1) {
      let fe = D;
      fe.auto(o, Lo) ? Ca() : vo(x, fe.min, fe.max), zn = zn || ut.left >= 0, Qt = !0, ia();
    }
  }
  o.setData = ho;
  function Ca() {
    Lo = !0;
    let V, Q;
    i == 1 && (ln > 0 ? (Ht = Io[0] = 0, sn = Io[1] = ln - 1, V = t[0][Ht], Q = t[0][sn], W == 2 ? (V = Ht, Q = sn) : V == Q && (W == 3 ? [V, Q] = Zd(V, V, D.log, !1) : W == 4 ? [V, Q] = Xh(V, V, D.log, !1) : D.time ? Q = V + oo(86400 / C) : [V, Q] = Cd(V, Q, Qh, !0))) : (Ht = Io[0] = V = null, sn = Io[1] = Q = null)), vo(x, V, Q);
  }
  let $a, Ei, ea, Ya, ta, Ua, _i, na, zr, Mo;
  function Tl(V, Q, fe, pe, Ce, p) {
    V ??= lb, fe ??= Jh, pe ??= "butt", Ce ??= lb, p ??= "round", V != $a && (f.strokeStyle = $a = V), Ce != Ei && (f.fillStyle = Ei = Ce), Q != ea && (f.lineWidth = ea = Q), p != ta && (f.lineJoin = ta = p), pe != Ua && (f.lineCap = Ua = pe), fe != Ya && f.setLineDash(Ya = fe);
  }
  function Rr(V, Q, fe, pe) {
    Q != Ei && (f.fillStyle = Ei = Q), V != _i && (f.font = _i = V), fe != na && (f.textAlign = na = fe), pe != zr && (f.textBaseline = zr = pe);
  }
  function Xa(V, Q, fe, pe, Ce = 0) {
    if (pe.length > 0 && V.auto(o, Lo) && (Q == null || Q.min == null)) {
      let p = en(Ht, 0), h = en(sn, pe.length - 1), w = fe.min == null ? V.distr == 3 ? WI(pe, p, h) : jI(pe, p, h, Ce) : [fe.min, fe.max];
      V.min = Oi(V.min, fe.min = w[0]), V.max = Oo(V.max, fe.max = w[1]);
    }
  }
  const Nr = { min: null, max: null };
  function Br() {
    for (let pe in P) {
      let Ce = P[pe];
      A[pe] == null && // scales that have never been set (on init)
      (Ce.min == null || // or auto scales when the x scale was explicitly set
      A[x] != null && Ce.auto(o, Lo)) && (A[pe] = Nr);
    }
    for (let pe in P) {
      let Ce = P[pe];
      A[pe] == null && Ce.from != null && A[Ce.from] != null && (A[pe] = Nr);
    }
    A[x] != null && nr(!0);
    let V = {};
    for (let pe in A) {
      let Ce = A[pe];
      if (Ce != null) {
        let p = V[pe] = bs(P[pe], JI);
        if (Ce.min != null)
          Jn(p, Ce);
        else if (pe != x || i == 2)
          if (ln == 0 && p.from == null) {
            let h = p.range(o, null, null, pe);
            p.min = h[0], p.max = h[1];
          } else
            p.min = qt, p.max = -qt;
      }
    }
    if (ln > 0) {
      O.forEach((pe, Ce) => {
        if (i == 1) {
          let p = pe.scale, h = A[p];
          if (h == null)
            return;
          let w = V[p];
          if (Ce == 0) {
            let T = w.range(o, w.min, w.max, p);
            w.min = T[0], w.max = T[1], Ht = Hi(w.min, t[0]), sn = Hi(w.max, t[0]), sn - Ht > 1 && (t[0][Ht] < w.min && Ht++, t[0][sn] > w.max && sn--), pe.min = kn[Ht], pe.max = kn[sn];
          } else pe.show && pe.auto && Xa(w, h, pe, t[Ce], pe.sorted);
          pe.idxs[0] = Ht, pe.idxs[1] = sn;
        } else if (Ce > 0 && pe.show && pe.auto) {
          let [p, h] = pe.facets, w = p.scale, T = h.scale, [_, L] = t[Ce], q = V[w], X = V[T];
          q != null && Xa(q, A[w], p, _, p.sorted), X != null && Xa(X, A[T], h, L, h.sorted), pe.min = h.min, pe.max = h.max;
        }
      });
      for (let pe in V) {
        let Ce = V[pe], p = A[pe];
        if (Ce.from == null && (p == null || p.min == null)) {
          let h = Ce.range(
            o,
            Ce.min == qt ? null : Ce.min,
            Ce.max == -qt ? null : Ce.max,
            pe
          );
          Ce.min = h[0], Ce.max = h[1];
        }
      }
    }
    for (let pe in V) {
      let Ce = V[pe];
      if (Ce.from != null) {
        let p = V[Ce.from];
        if (p.min == null)
          Ce.min = Ce.max = null;
        else {
          let h = Ce.range(o, p.min, p.max, pe);
          Ce.min = h[0], Ce.max = h[1];
        }
      }
    }
    let Q = {}, fe = !1;
    for (let pe in V) {
      let Ce = V[pe], p = P[pe];
      if (p.min != Ce.min || p.max != Ce.max) {
        p.min = Ce.min, p.max = Ce.max;
        let h = p.distr;
        p._min = h == 3 ? Fa(p.min) : h == 4 ? op(p.min, p.asinh) : h == 100 ? p.fwd(p.min) : p.min, p._max = h == 3 ? Fa(p.max) : h == 4 ? op(p.max, p.asinh) : h == 100 ? p.fwd(p.max) : p.max, Q[pe] = fe = !0;
      }
    }
    if (fe) {
      O.forEach((pe, Ce) => {
        i == 2 ? Ce > 0 && Q.y && (pe._paths = null) : Q[pe.scale] && (pe._paths = null);
      });
      for (let pe in Q)
        Dt = !0, Bn("setScale", pe);
      ut.show && ut.left >= 0 && (zn = Qt = !0);
    }
    for (let pe in A)
      A[pe] = null;
  }
  function Qa(V) {
    let Q = Pg(Ht - 1, 0, ln - 1), fe = Pg(sn + 1, 0, ln - 1);
    for (; V[Q] == null && Q > 0; )
      Q--;
    for (; V[fe] == null && fe < ln - 1; )
      fe++;
    return [Q, fe];
  }
  function Za() {
    ln > 0 && (O.forEach((V, Q) => {
      if (Q > 0 && V.show && (Nn(Q, !1), Nn(Q, !0), V._paths == null)) {
        Mo != V.alpha && (f.globalAlpha = Mo = V.alpha);
        let fe = i == 2 ? [0, t[Q][0].length - 1] : Qa(t[Q]);
        V._paths = V.paths(o, Q, fe[0], fe[1]), Mo != 1 && (f.globalAlpha = Mo = 1);
      }
    }), O.forEach((V, Q) => {
      if (Q > 0 && V.show) {
        Mo != V.alpha && (f.globalAlpha = Mo = V.alpha), V._paths != null && To(Q, !1);
        {
          let fe = V._paths != null ? V._paths.gaps : null, pe = V.points.show(o, Q, Ht, sn, fe), Ce = V.points.filter(o, Q, pe, fe);
          (pe || Ce) && (V.points._paths = V.points.paths(o, Q, Ht, sn, Ce), To(Q, !0));
        }
        Mo != 1 && (f.globalAlpha = Mo = 1), Bn("drawSeries", Q);
      }
    }));
  }
  function Nn(V, Q) {
    let fe = Q ? O[V].points : O[V];
    fe._stroke = fe.stroke(o, V), fe._fill = fe.fill(o, V);
  }
  function To(V, Q) {
    let fe = Q ? O[V].points : O[V], {
      stroke: pe,
      fill: Ce,
      clip: p,
      flags: h,
      _stroke: w = fe._stroke,
      _fill: T = fe._fill,
      _width: _ = fe.width
    } = fe._paths;
    _ = Pn(_ * cn, 3);
    let L = null, q = _ % 2 / 2;
    Q && T == null && (T = _ > 0 ? "#fff" : w);
    let X = fe.pxAlign == 1 && q > 0;
    if (X && f.translate(q, q), !Q) {
      let oe = at - _ / 2, me = dt - _ / 2, ie = vt + _, Se = Rt + _;
      L = new Path2D(), L.rect(oe, me, ie, Se);
    }
    Q ? co(w, _, fe.dash, fe.cap, T, pe, Ce, h, p) : Pa(V, w, _, fe.dash, fe.cap, T, pe, Ce, h, L, p), X && f.translate(-q, -q);
  }
  function Pa(V, Q, fe, pe, Ce, p, h, w, T, _, L) {
    let q = !1;
    T != 0 && k.forEach((X, oe) => {
      if (X.series[0] == V) {
        let me = O[X.series[1]], ie = t[X.series[1]], Se = (me._paths || Su).band;
        gr(Se) && (Se = X.dir == 1 ? Se[0] : Se[1]);
        let $e, _e = null;
        me.show && Se && GI(ie, Ht, sn) ? (_e = X.fill(o, oe) || p, $e = me._paths.clip) : Se = null, co(Q, fe, pe, Ce, _e, h, w, T, _, L, $e, Se), q = !0;
      }
    }), q || co(Q, fe, pe, Ce, p, h, w, T, _, L);
  }
  const ko = ys | Mg;
  function co(V, Q, fe, pe, Ce, p, h, w, T, _, L, q) {
    Tl(V, Q, fe, pe, Ce), (T || _ || q) && (f.save(), T && f.clip(T), _ && f.clip(_)), q ? (w & ko) == ko ? (f.clip(q), L && f.clip(L), er(Ce, h), Ja(V, p, Q)) : w & Mg ? (er(Ce, h), f.clip(q), Ja(V, p, Q)) : w & ys && (f.save(), f.clip(q), L && f.clip(L), er(Ce, h), f.restore(), Ja(V, p, Q)) : (er(Ce, h), Ja(V, p, Q)), (T || _ || q) && f.restore();
  }
  function Ja(V, Q, fe) {
    fe > 0 && (Q instanceof Map ? Q.forEach((pe, Ce) => {
      f.strokeStyle = $a = Ce, f.stroke(pe);
    }) : Q != null && V && f.stroke(Q));
  }
  function er(V, Q) {
    Q instanceof Map ? Q.forEach((fe, pe) => {
      f.fillStyle = Ei = pe, f.fill(fe);
    }) : Q != null && V && f.fill(Q);
  }
  function tr(V, Q, fe, pe) {
    let Ce = $[V], p;
    if (pe <= 0)
      p = [0, 0];
    else {
      let h = Ce._space = Ce.space(o, V, Q, fe, pe), w = Ce._incrs = Ce.incrs(o, V, Q, fe, pe, h);
      p = pT(Q, fe, w, pe, h);
    }
    return Ce._found = p;
  }
  function oa(V, Q, fe, pe, Ce, p, h, w, T, _) {
    let L = h % 2 / 2;
    y == 1 && f.translate(L, L), Tl(w, h, T, _, w), f.beginPath();
    let q, X, oe, me, ie = Ce + (pe == 0 || pe == 3 ? -p : p);
    fe == 0 ? (X = Ce, me = ie) : (q = Ce, oe = ie);
    for (let Se = 0; Se < V.length; Se++)
      Q[Se] != null && (fe == 0 ? q = oe = V[Se] : X = me = V[Se], f.moveTo(q, X), f.lineTo(oe, me));
    f.stroke(), y == 1 && f.translate(-L, -L);
  }
  function kl(V) {
    let Q = !0;
    return $.forEach((fe, pe) => {
      if (!fe.show)
        return;
      let Ce = P[fe.scale];
      if (Ce.min == null) {
        fe._show && (Q = !1, fe._show = !1, nr(!1));
        return;
      } else
        fe._show || (Q = !1, fe._show = !0, nr(!1));
      let p = fe.side, h = p % 2, { min: w, max: T } = Ce, [_, L] = tr(pe, w, T, h == 0 ? Ke : Oe);
      if (L == 0)
        return;
      let q = Ce.distr == 2, X = fe._splits = fe.splits(o, pe, w, T, _, L, q), oe = Ce.distr == 2 ? X.map(($e) => kn[$e]) : X, me = Ce.distr == 2 ? kn[X[1]] - kn[X[0]] : _, ie = fe._values = fe.values(o, fe.filter(o, oe, pe, L, me), pe, L, me);
      fe._rotate = p == 2 ? fe.rotate(o, ie, pe, L) : 0;
      let Se = fe._size;
      fe._size = Pi(fe.size(o, ie, pe, V)), Se != null && fe._size != Se && (Q = !1);
    }), Q;
  }
  function Fr(V) {
    let Q = !0;
    return $o.forEach((fe, pe) => {
      let Ce = fe(o, pe, Jt, V);
      Ce != rn[pe] && (Q = !1), rn[pe] = Ce;
    }), Q;
  }
  function uc() {
    for (let V = 0; V < $.length; V++) {
      let Q = $[V];
      if (!Q.show || !Q._show)
        continue;
      let fe = Q.side, pe = fe % 2, Ce, p, h = Q.stroke(o, V), w = fe == 0 || fe == 3 ? -1 : 1;
      if (Q.label) {
        let Cn = Q.labelGap * w, Wn = oo((Q._lpos + Cn) * cn);
        Rr(Q.labelFont[0], h, "center", fe == 2 ? eu : rb), f.save(), pe == 1 ? (Ce = p = 0, f.translate(
          Wn,
          oo(dt + Rt / 2)
        ), f.rotate((fe == 3 ? -nd : nd) / 2)) : (Ce = oo(at + vt / 2), p = Wn), f.fillText(Q.label, Ce, p), f.restore();
      }
      let [T, _] = Q._found;
      if (_ == 0)
        continue;
      let L = P[Q.scale], q = pe == 0 ? vt : Rt, X = pe == 0 ? at : dt, oe = oo(Q.gap * cn), me = Q._splits, ie = L.distr == 2 ? me.map((Cn) => kn[Cn]) : me, Se = L.distr == 2 ? kn[me[1]] - kn[me[0]] : T, $e = Q.ticks, _e = Q.border, Ae = $e.show ? oo($e.size * cn) : 0, Be = Q._rotate * -nd / 180, Ye = S(Q._pos * cn), Ue = (Ae + oe) * w, rt = Ye + Ue;
      p = pe == 0 ? rt : 0, Ce = pe == 1 ? rt : 0;
      let mt = Q.font[0], Ot = Q.align == 1 ? Bl : Q.align == 2 ? tp : Be > 0 ? Bl : Be < 0 ? tp : pe == 0 ? "center" : fe == 3 ? tp : Bl, pt = Be || pe == 1 ? "middle" : fe == 2 ? eu : rb;
      Rr(mt, h, Ot, pt);
      let St = Q.font[1] * Q.lineGap, un = me.map((Cn) => S(s(Cn, L, q, X))), Yt = Q._values;
      for (let Cn = 0; Cn < Yt.length; Cn++) {
        let Wn = Yt[Cn];
        if (Wn != null) {
          pe == 0 ? Ce = un[Cn] : p = un[Cn], Wn = "" + Wn;
          let Ri = Wn.indexOf(`
`) == -1 ? [Wn] : Wn.split(/\n/gm);
          for (let Ho = 0; Ho < Ri.length; Ho++) {
            let vi = Ri[Ho];
            Be ? (f.save(), f.translate(Ce, p + Ho * St), f.rotate(Be), f.fillText(vi, 0, 0), f.restore()) : f.fillText(vi, Ce, p + Ho * St);
          }
        }
      }
      $e.show && oa(
        un,
        $e.filter(o, ie, V, _, Se),
        pe,
        fe,
        Ye,
        Ae,
        Pn($e.width * cn, 3),
        $e.stroke(o, V),
        $e.dash,
        $e.cap
      );
      let hn = Q.grid;
      hn.show && oa(
        un,
        hn.filter(o, ie, V, _, Se),
        pe,
        pe == 0 ? 2 : 1,
        pe == 0 ? dt : at,
        pe == 0 ? Rt : vt,
        Pn(hn.width * cn, 3),
        hn.stroke(o, V),
        hn.dash,
        hn.cap
      ), _e.show && oa(
        [Ye],
        [1],
        pe == 0 ? 1 : 0,
        pe == 0 ? 1 : 2,
        pe == 1 ? dt : at,
        pe == 1 ? Rt : vt,
        Pn(_e.width * cn, 3),
        _e.stroke(o, V),
        _e.dash,
        _e.cap
      );
    }
    Bn("drawAxes");
  }
  function nr(V) {
    O.forEach((Q, fe) => {
      fe > 0 && (Q._paths = null, V && (i == 1 ? (Q.min = null, Q.max = null) : Q.facets.forEach((pe) => {
        pe.min = null, pe.max = null;
      })));
    });
  }
  let El = !1, _l = !1, or = [];
  function Hf() {
    _l = !1;
    for (let V = 0; V < or.length; V++)
      Bn(...or[V]);
    or.length = 0;
  }
  function ia() {
    El || (rM(Gs), El = !0);
  }
  function Vf(V, Q = !1) {
    El = !0, _l = Q, V(o), Gs(), Q && or.length > 0 && queueMicrotask(Hf);
  }
  o.batch = Vf;
  function Gs() {
    if (Xt && (Br(), Xt = !1), Dt && (an(), Dt = !1), vn) {
      if (_n(m, Bl, Ve), _n(m, eu, De), _n(m, pu, Ke), _n(m, gu, Oe), _n(b, Bl, Ve), _n(b, eu, De), _n(b, pu, Ke), _n(b, gu, Oe), _n(g, pu, Ge), _n(g, gu, it), d.width = oo(Ge * cn), d.height = oo(it * cn), $.forEach(({ _el: V, _show: Q, _size: fe, _pos: pe, side: Ce }) => {
        if (V != null)
          if (Q) {
            let p = Ce === 3 || Ce === 0 ? fe : 0, h = Ce % 2 == 1;
            _n(V, h ? "left" : "top", pe - p), _n(V, h ? "width" : "height", fe), _n(V, h ? "top" : "left", h ? De : Ve), _n(V, h ? "height" : "width", h ? Oe : Ke), Cg(V, tl);
          } else
            Zo(V, tl);
      }), $a = Ei = ea = ta = Ua = _i = na = zr = Ya = null, Mo = 1, cr(!0), Ve != Je || De != wt || Ke != lt || Oe != qe) {
        nr(!1);
        let V = Ke / lt, Q = Oe / qe;
        if (ut.show && !zn && ut.left >= 0) {
          ut.left *= V, ut.top *= Q, Oa && ua(Oa, oo(ut.left), 0, Ke, Oe), Ia && ua(Ia, 0, oo(ut.top), Ke, Oe);
          for (let fe = 0; fe < ze.length; fe++) {
            let pe = ze[fe];
            pe != null && (nt[fe] *= V, tt[fe] *= Q, ua(pe, Pi(nt[fe]), Pi(tt[fe]), Ke, Oe));
          }
        }
        if (xn.show && !on && xn.left >= 0 && xn.width > 0) {
          xn.left *= V, xn.width *= V, xn.top *= Q, xn.height *= Q;
          for (let fe in Qs)
            _n(aa, fe, xn[fe]);
        }
        Je = Ve, wt = De, lt = Ke, qe = Oe;
      }
      Bn("setSize"), vn = !1;
    }
    Ge > 0 && it > 0 && (f.clearRect(0, 0, d.width, d.height), Bn("drawClear"), z.forEach((V) => V()), Bn("draw")), xn.show && on && (Al(xn), on = !1), ut.show && zn && (sa(null, !0, !1), zn = !1), J.show && J.live && Qt && (ur(), Qt = !1), u || (u = !0, o.status = 1, Bn("ready")), Lo = !1, El = !1;
  }
  o.redraw = (V, Q) => {
    Dt = Q || !1, V !== !1 ? vo(x, D.min, D.max) : ia();
  };
  function Ks(V, Q) {
    let fe = P[V];
    if (fe.from == null) {
      if (ln == 0) {
        let pe = fe.range(o, Q.min, Q.max, V);
        Q.min = pe[0], Q.max = pe[1];
      }
      if (Q.min > Q.max) {
        let pe = Q.min;
        Q.min = Q.max, Q.max = pe;
      }
      if (ln > 1 && Q.min != null && Q.max != null && Q.max - Q.min < 1e-16)
        return;
      V == x && fe.distr == 2 && ln > 0 && (Q.min = Hi(Q.min, t[0]), Q.max = Hi(Q.max, t[0]), Q.min == Q.max && Q.max++), A[V] = Q, Xt = !0, ia();
    }
  }
  o.setScale = Ks;
  let ir, Ys, Oa, Ia, cc, Us, Ma, ar, rr, Lr, Sn, yn, Ai = !1;
  const no = ut.drag;
  let Kn = no.x, Un = no.y;
  ut.show && (ut.x && (ir = Si(kI, b)), ut.y && (Ys = Si(EI, b)), D.ori == 0 ? (Oa = ir, Ia = Ys) : (Oa = Ys, Ia = ir), Sn = ut.left, yn = ut.top);
  const xn = o.select = Jn({
    show: !0,
    over: !0,
    left: 0,
    width: 0,
    top: 0,
    height: 0
  }, e.select), aa = xn.show ? Si(TI, xn.over ? b : m) : null;
  function Al(V, Q) {
    if (xn.show) {
      for (let fe in V)
        xn[fe] = V[fe], fe in Qs && _n(aa, fe, V[fe]);
      Q !== !1 && Bn("setSelect");
    }
  }
  o.setSelect = Al;
  function jf(V, Q) {
    let fe = O[V], pe = be ? we[V] : null;
    if (fe.show)
      pe && Cg(pe, tl);
    else {
      pe && Zo(pe, tl);
      let Ce = pi ? ze[0] : ze[V];
      ua(Ce, -10, -10, Ke, Oe);
    }
  }
  function vo(V, Q, fe) {
    Ks(V, { min: Q, max: fe });
  }
  function gi(V, Q, fe, pe) {
    Q.focus != null && Gf(V), Q.show != null && O.forEach((Ce, p) => {
      p > 0 && (V == p || V == null) && (Ce.show = Q.show, jf(p, Q.show), i == 2 ? (vo(Ce.facets[0].scale, null, null), vo(Ce.facets[1].scale, null, null)) : vo(Ce.scale, null, null), ia());
    }), fe !== !1 && Bn("setSeries", V, Q), pe && jr("setSeries", o, V, Q);
  }
  o.setSeries = gi;
  function Wf(V, Q) {
    Jn(k[V], Q);
  }
  function qf(V, Q) {
    V.fill = Wt(V.fill || null), V.dir = en(V.dir, -1), Q = Q ?? k.length, k.splice(Q, 0, V);
  }
  function dc(V) {
    V == null ? k.length = 0 : k.splice(V, 1);
  }
  o.addBand = qf, o.setBand = Wf, o.delBand = dc;
  function fc(V, Q) {
    O[V].alpha = Q, ut.show && ze[V] && (ze[V].style.opacity = Q), be && we[V] && (we[V].style.opacity = Q);
  }
  let En, ra, Ta;
  const lr = { focus: !0 };
  function Gf(V) {
    if (V != Ta) {
      let Q = V == null, fe = Gn.alpha != 1;
      O.forEach((pe, Ce) => {
        if (i == 1 || Ce > 0) {
          let p = Q || Ce == 0 || Ce == V;
          pe._focus = Q ? null : p, fe && fc(Ce, p ? 1 : Gn.alpha);
        }
      }), Ta = V, fe && ia();
    }
  }
  be && Fo && Le(db, he, (V) => {
    ut._lock || (qn(V), Ta != null && gi(null, lr, !0, jn.setSeries));
  });
  function hi(V, Q, fe) {
    let pe = P[Q];
    fe && (V = V / cn - (pe.ori == 1 ? De : Ve));
    let Ce = Ke;
    pe.ori == 1 && (Ce = Oe, V = Ce - V), pe.dir == -1 && (V = Ce - V);
    let p = pe._min, h = pe._max, w = V / Ce, T = p + (h - p) * w, _ = pe.distr;
    return _ == 3 ? vs(10, T) : _ == 4 ? YI(T, pe.asinh) : _ == 100 ? pe.bwd(T) : T;
  }
  function Kf(V, Q) {
    let fe = hi(V, x, Q);
    return Hi(fe, t[0], Ht, sn);
  }
  o.valToIdx = (V) => Hi(V, t[0]), o.posToIdx = Kf, o.posToVal = hi, o.valToPos = (V, Q, fe) => P[Q].ori == 0 ? r(
    V,
    P[Q],
    fe ? vt : Ke,
    fe ? at : 0
  ) : l(
    V,
    P[Q],
    fe ? Rt : Oe,
    fe ? dt : 0
  ), o.setCursor = (V, Q, fe) => {
    Sn = V.left, yn = V.top, sa(null, Q, fe);
  };
  function pc(V, Q) {
    _n(aa, Bl, xn.left = V), _n(aa, pu, xn.width = Q);
  }
  function gc(V, Q) {
    _n(aa, eu, xn.top = V), _n(aa, gu, xn.height = Q);
  }
  let sr = D.ori == 0 ? pc : gc, la = D.ori == 1 ? pc : gc;
  function ka() {
    if (be && J.live)
      for (let V = i == 2 ? 1 : 0; V < O.length; V++) {
        if (V == 0 && ve)
          continue;
        let Q = J.values[V], fe = 0;
        for (let pe in Q)
          re[V][fe++].firstChild.nodeValue = Q[pe];
      }
  }
  function ur(V, Q) {
    if (V != null && (V.idxs ? V.idxs.forEach((fe, pe) => {
      K[pe] = fe;
    }) : ZI(V.idx) || K.fill(V.idx), J.idx = K[0]), be && J.live) {
      for (let fe = 0; fe < O.length; fe++)
        (fe > 0 || i == 1 && !ve) && Yf(fe, K[fe]);
      ka();
    }
    Qt = !1, Q !== !1 && Bn("setLegend");
  }
  o.setLegend = ur;
  function Yf(V, Q) {
    let fe = O[V], pe = V == 0 && W == 2 ? kn : t[V], Ce;
    ve ? Ce = fe.values(o, V, Q) ?? Me : (Ce = fe.value(o, Q == null ? null : pe[Q], V, Q), Ce = Ce == null ? Me : { _: Ce }), J.values[V] = Ce;
  }
  function sa(V, Q, fe) {
    rr = Sn, Lr = yn, [Sn, yn] = ut.move(o, Sn, yn), ut.left = Sn, ut.top = yn, ut.show && (Oa && ua(Oa, oo(Sn), 0, Ke, Oe), Ia && ua(Ia, 0, oo(yn), Ke, Oe));
    let pe, Ce = Ht > sn;
    En = qt, ra = null;
    let p = D.ori == 0 ? Ke : Oe, h = D.ori == 1 ? Ke : Oe;
    if (Sn < 0 || ln == 0 || Ce) {
      pe = ut.idx = null;
      for (let w = 0; w < O.length; w++) {
        let T = ze[w];
        T != null && ua(T, -10, -10, Ke, Oe);
      }
      Fo && gi(null, lr, !0, V == null && jn.setSeries), J.live && (K.fill(pe), Qt = !0);
    } else {
      let w, T, _;
      i == 1 && (w = D.ori == 0 ? Sn : yn, T = hi(w, x), pe = ut.idx = Hi(T, t[0], Ht, sn), _ = H(t[0][pe], D, p, 0));
      let L = -10, q = -10, X = 0, oe = 0, me = !0, ie = "", Se = "";
      for (let $e = i == 2 ? 1 : 0; $e < O.length; $e++) {
        let _e = O[$e], Ae = K[$e], Be = Ae == null ? null : i == 1 ? t[$e][Ae] : t[$e][1][Ae], Ye = ut.dataIdx(o, $e, pe, T), Ue = Ye == null ? null : i == 1 ? t[$e][Ye] : t[$e][1][Ye];
        Qt = Qt || Ue != Be || Ye != Ae, K[$e] = Ye;
        let rt = Ye == pe ? _ : H(i == 1 ? t[0][Ye] : t[$e][0][Ye], D, p, 0);
        if ($e > 0 && _e.show) {
          let mt = Ue == null ? -10 : F(Ue, i == 1 ? P[_e.scale] : P[_e.facets[1].scale], h, 0);
          if (Fo && Ue != null) {
            let Ot = D.ori == 1 ? Sn : yn, pt = ao(Gn.dist(o, $e, Ye, mt, Ot));
            if (pt < En) {
              let St = Gn.bias;
              if (St != 0) {
                let un = hi(Ot, _e.scale), Yt = Ue >= 0 ? 1 : -1, hn = un >= 0 ? 1 : -1;
                hn == Yt && (hn == 1 ? St == 1 ? Ue >= un : Ue <= un : (
                  // >= 0
                  St == 1 ? Ue <= un : Ue >= un
                )) && (En = pt, ra = $e);
              } else
                En = pt, ra = $e;
            }
          }
          if (Qt || pi) {
            let Ot, pt;
            D.ori == 0 ? (Ot = rt, pt = mt) : (Ot = mt, pt = rt);
            let St, un, Yt, hn, Cn, Wn, Ri = !0, Ho = bn.bbox;
            if (Ho != null) {
              Ri = !1;
              let vi = Ho(o, $e);
              Yt = vi.left, hn = vi.top, St = vi.width, un = vi.height;
            } else
              Yt = Ot, hn = pt, St = un = bn.size(o, $e);
            if (Wn = bn.fill(o, $e), Cn = bn.stroke(o, $e), pi)
              $e == ra && En <= Gn.prox && (L = Yt, q = hn, X = St, oe = un, me = Ri, ie = Wn, Se = Cn);
            else {
              let vi = ze[$e];
              vi != null && (nt[$e] = Yt, tt[$e] = hn, bb(vi, St, un, Ri), vb(vi, Wn, Cn), ua(vi, Pi(Yt), Pi(hn), Ke, Oe));
            }
          }
        }
      }
      if (pi) {
        let $e = Gn.prox, _e = Ta == null ? En <= $e : En > $e || ra != Ta;
        if (Qt || _e) {
          let Ae = ze[0];
          nt[0] = L, tt[0] = q, bb(Ae, X, oe, me), vb(Ae, ie, Se), ua(Ae, Pi(L), Pi(q), Ke, Oe);
        }
      }
    }
    if (xn.show && Ai)
      if (V != null) {
        let [w, T] = jn.scales, [_, L] = jn.match, [q, X] = V.cursor.sync.scales, oe = V.cursor.drag;
        if (Kn = oe._x, Un = oe._y, Kn || Un) {
          let { left: me, top: ie, width: Se, height: $e } = V.select, _e = V.scales[q].ori, Ae = V.posToVal, Be, Ye, Ue, rt, mt, Ot = w != null && _(w, q), pt = T != null && L(T, X);
          Ot && Kn ? (_e == 0 ? (Be = me, Ye = Se) : (Be = ie, Ye = $e), Ue = P[w], rt = H(Ae(Be, q), Ue, p, 0), mt = H(Ae(Be + Ye, q), Ue, p, 0), sr(Oi(rt, mt), ao(mt - rt))) : sr(0, p), pt && Un ? (_e == 1 ? (Be = me, Ye = Se) : (Be = ie, Ye = $e), Ue = P[T], rt = F(Ae(Be, X), Ue, h, 0), mt = F(Ae(Be + Ye, X), Ue, h, 0), la(Oi(rt, mt), ao(mt - rt))) : la(0, h);
        } else
          Dl();
      } else {
        let w = ao(rr - cc), T = ao(Lr - Us);
        if (D.ori == 1) {
          let X = w;
          w = T, T = X;
        }
        Kn = no.x && w >= no.dist, Un = no.y && T >= no.dist;
        let _ = no.uni;
        _ != null ? Kn && Un && (Kn = w >= _, Un = T >= _, !Kn && !Un && (T > w ? Un = !0 : Kn = !0)) : no.x && no.y && (Kn || Un) && (Kn = Un = !0);
        let L, q;
        Kn && (D.ori == 0 ? (L = Ma, q = Sn) : (L = ar, q = yn), sr(Oi(L, q), ao(q - L)), Un || la(0, h)), Un && (D.ori == 1 ? (L = Ma, q = Sn) : (L = ar, q = yn), la(Oi(L, q), ao(q - L)), Kn || sr(0, p)), !Kn && !Un && (sr(0, 0), la(0, 0));
      }
    if (no._x = Kn, no._y = Un, V == null) {
      if (fe) {
        if (Nl != null) {
          let [w, T] = jn.scales;
          jn.values[0] = w != null ? hi(D.ori == 0 ? Sn : yn, w) : null, jn.values[1] = T != null ? hi(D.ori == 1 ? Sn : yn, T) : null;
        }
        jr(sb, o, Sn, yn, Ke, Oe, pe);
      }
      if (Fo) {
        let w = fe && jn.setSeries, T = Gn.prox;
        Ta == null ? En <= T && gi(ra, lr, !0, w) : En > T ? gi(null, lr, !0, w) : ra != Ta && gi(ra, lr, !0, w);
      }
    }
    Qt && (J.idx = pe, ur()), Q !== !1 && Bn("setCursor");
  }
  let Di = null;
  Object.defineProperty(o, "rect", {
    get() {
      return Di == null && cr(!1), Di;
    }
  });
  function cr(V = !1) {
    V ? Di = null : (Di = b.getBoundingClientRect(), Bn("syncRect", Di));
  }
  function dr(V, Q, fe, pe, Ce, p, h) {
    ut._lock || Ai && V != null && V.movementX == 0 && V.movementY == 0 || (Xs(V, Q, fe, pe, Ce, p, h, !1, V != null), V != null ? sa(null, !0, !0) : sa(Q, !0, !1));
  }
  function Xs(V, Q, fe, pe, Ce, p, h, w, T) {
    if (Di == null && cr(!1), qn(V), V != null)
      fe = V.clientX - Di.left, pe = V.clientY - Di.top;
    else {
      if (fe < 0 || pe < 0) {
        Sn = -10, yn = -10;
        return;
      }
      let [_, L] = jn.scales, q = Q.cursor.sync, [X, oe] = q.values, [me, ie] = q.scales, [Se, $e] = jn.match, _e = Q.axes[0].side % 2 == 1, Ae = D.ori == 0 ? Ke : Oe, Be = D.ori == 1 ? Ke : Oe, Ye = _e ? p : Ce, Ue = _e ? Ce : p, rt = _e ? pe : fe, mt = _e ? fe : pe;
      if (me != null ? fe = Se(_, me) ? s(X, P[_], Ae, 0) : -10 : fe = Ae * (rt / Ye), ie != null ? pe = $e(L, ie) ? s(oe, P[L], Be, 0) : -10 : pe = Be * (mt / Ue), D.ori == 1) {
        let Ot = fe;
        fe = pe, pe = Ot;
      }
    }
    T && ((fe <= 1 || fe >= Ke - 1) && (fe = Zr(fe, Ke)), (pe <= 1 || pe >= Oe - 1) && (pe = Zr(pe, Oe))), w ? (cc = fe, Us = pe, [Ma, ar] = ut.move(o, fe, pe)) : (Sn = fe, yn = pe);
  }
  const Qs = {
    width: 0,
    height: 0,
    left: 0,
    top: 0
  };
  function Dl() {
    Al(Qs, !1);
  }
  let hc, vc, mc, zl;
  function bc(V, Q, fe, pe, Ce, p, h) {
    Ai = !0, Kn = Un = no._x = no._y = !1, Xs(V, Q, fe, pe, Ce, p, h, !0, !1), V != null && (Le(np, wg, Hr, !1), jr(ub, o, Ma, ar, Ke, Oe, null));
    let { left: w, top: T, width: _, height: L } = xn;
    hc = w, vc = T, mc = _, zl = L, Dl();
  }
  function Hr(V, Q, fe, pe, Ce, p, h) {
    Ai = no._x = no._y = !1, Xs(V, Q, fe, pe, Ce, p, h, !1, !0);
    let { left: w, top: T, width: _, height: L } = xn, q = _ > 0 || L > 0, X = hc != w || vc != T || mc != _ || zl != L;
    if (q && X && Al(xn), no.setScale && q && X) {
      let oe = w, me = _, ie = T, Se = L;
      if (D.ori == 1 && (oe = T, me = L, ie = w, Se = _), Kn && vo(
        x,
        hi(oe, x),
        hi(oe + me, x)
      ), Un)
        for (let $e in P) {
          let _e = P[$e];
          $e != x && _e.from == null && _e.min != qt && vo(
            $e,
            hi(ie + Se, $e),
            hi(ie, $e)
          );
        }
      Dl();
    } else ut.lock && (ut._lock = !ut._lock, sa(null, !0, !1));
    V != null && (Ne(np, wg), jr(np, o, Sn, yn, Ke, Oe, null));
  }
  function Uf(V, Q, fe, pe, Ce, p, h) {
    if (ut._lock)
      return;
    qn(V);
    let w = Ai;
    if (Ai) {
      let T = !0, _ = !0, L = 10, q, X;
      D.ori == 0 ? (q = Kn, X = Un) : (q = Un, X = Kn), q && X && (T = Sn <= L || Sn >= Ke - L, _ = yn <= L || yn >= Oe - L), q && T && (Sn = Sn < Ma ? 0 : Ke), X && _ && (yn = yn < ar ? 0 : Oe), sa(null, !0, !0), Ai = !1;
    }
    Sn = -10, yn = -10, sa(null, !0, !0), w && (Ai = w);
  }
  function Rl(V, Q, fe, pe, Ce, p, h) {
    ut._lock || (qn(V), Ca(), Dl(), V != null && jr(fb, o, Sn, yn, Ke, Oe, null));
  }
  function yc() {
    $.forEach(gT), mn(o.width, o.height, !0);
  }
  sl(Sd, as, yc);
  const fr = {};
  fr.mousedown = bc, fr.mousemove = dr, fr.mouseup = Hr, fr.dblclick = Rl, fr.setSeries = (V, Q, fe, pe) => {
    let Ce = jn.match[2];
    fe = Ce(o, Q, fe), fe != -1 && gi(fe, pe, !0, !1);
  }, ut.show && (Le(ub, b, bc), Le(sb, b, dr), Le(cb, b, (V) => {
    qn(V), cr(!1);
  }), Le(db, b, Uf), Le(fb, b, Rl), Tg.add(o), o.syncRect = cr);
  const Vr = o.hooks = e.hooks || {};
  function Bn(V, Q, fe) {
    _l ? or.push([V, Q, fe]) : V in Vr && Vr[V].forEach((pe) => {
      pe.call(null, o, Q, fe);
    });
  }
  (e.plugins || []).forEach((V) => {
    for (let Q in V.hooks)
      Vr[Q] = (Vr[Q] || []).concat(V.hooks[Q]);
  });
  const zi = (V, Q, fe) => fe, jn = Jn({
    key: null,
    setSeries: !1,
    filters: {
      pub: Cb,
      sub: Cb
    },
    scales: [x, O[1] ? O[1].scale : null],
    match: [$b, $b, zi],
    values: [null, null]
  }, ut.sync);
  jn.match.length == 2 && jn.match.push(zi), ut.sync = jn;
  const Nl = jn.key, Zs = Fw(Nl);
  function jr(V, Q, fe, pe, Ce, p, h) {
    jn.filters.pub(V, Q, fe, pe, Ce, p, h) && Zs.pub(V, Q, fe, pe, Ce, p, h);
  }
  Zs.sub(o);
  function Xf(V, Q, fe, pe, Ce, p, h) {
    jn.filters.sub(V, Q, fe, pe, Ce, p, h) && fr[V](null, Q, fe, pe, Ce, p, h);
  }
  o.pub = Xf;
  function Qf() {
    Zs.unsub(o), Tg.delete(o), et.clear(), $g(Sd, as, yc), c.remove(), he?.remove(), Bn("destroy");
  }
  o.destroy = Qf;
  function Js() {
    Bn("init", e, t), ho(t || e.data, !1), A[x] ? Ks(x, A[x]) : Ca(), on = xn.show && (xn.width > 0 || xn.height > 0), zn = Qt = !0, mn(e.width, e.height);
  }
  return O.forEach(Vn), $.forEach(ht), n ? n instanceof HTMLElement ? (n.appendChild(c), Js()) : n(o, Js) : Js(), o;
}
ro.assign = Jn;
ro.fmtNum = Zh;
ro.rangeNum = Cd;
ro.rangeLog = Zd;
ro.rangeAsinh = Xh;
ro.orient = Sl;
ro.pxRatio = cn;
ro.join = aM;
ro.fmtDate = ev, ro.tzDate = vM;
ro.sync = Fw;
{
  ro.addGap = ZM, ro.clipGaps = tf;
  let e = ro.paths = {
    points: qw
  };
  e.linear = Kw, e.stepped = tT, e.bars = nT, e.spline = iT;
}
const lp = 2, hT = 2.5;
let qr = null;
class vT extends Qd {
  constructor(t) {
    if (super(t), !qr) {
      const n = ro.paths, o = n.linear, i = n.spline, a = n.stepped;
      o && i && a && (qr = {
        linear: o(),
        spline: i(),
        stepBefore: a({ align: -1 }),
        stepAfter: a({ align: 1 })
      });
    }
  }
  getConfig() {
    const { color: t = "#4096ff", lineColor: n, label: o, lineWidth: i } = this.props, a = n ?? t, r = this.buildLineConfig(a), l = this.buildPathConfig(), s = this.buildPointsConfig(a);
    return {
      stroke: a,
      width: i ?? lp,
      show: !0,
      label: o,
      ...r,
      ...l,
      points: s
    };
  }
  buildLineConfig(t) {
    const { lineWidth: n, lineStyle: o, lineCap: i, fillColor: a, fillMode: r, fillOpacity: l } = this.props, s = {
      stroke: t,
      width: n ?? lp
    }, u = l != null && l > 0 ? Math.round(Math.min(l, 100) / 100 * 255).toString(16).padStart(2, "0") : null;
    o === yg.Dashed && (s.dash = [10, 10]), o === yg.Dotted && (s.dash = [2, 6]), i && (s.cap = i);
    const c = a ?? t;
    return this.props.drawStyle === Ul.Bars ? s.fill = u ? `${c}${u}` : c : this.props.drawStyle === Ul.Histogram ? s.fill = `${c}${u ?? "40"}` : r && r !== xg.None ? r === xg.Solid && (s.fill = u ? `${c}${u}` : c) : u && (s.fill = `${c}${u}`), s;
  }
  buildPathConfig() {
    const { pathBuilder: t, drawStyle: n, lineInterpolation: o, barWidthFactor: i, barMaxWidth: a } = this.props;
    return t ? { paths: t } : n === Ul.Points ? { paths: () => null } : n != null && qr ? {
      paths: (r, l, s, u) => {
        let c = qr.linear;
        if (o === td.Smooth ? c = qr.spline : o === td.StepBefore ? c = qr.stepBefore : o === td.StepAfter && (c = qr.stepAfter), n === Ul.Bars || n === Ul.Histogram) {
          const d = i ?? 0.6, f = a ?? 100, g = ro.paths.bars?.({ size: [d, f] });
          if (g)
            return g(r, l, s, u);
        }
        return c(r, l, s, u);
      }
    } : {};
  }
  buildPointsConfig(t) {
    const { lineWidth: n, pointSize: o, showPoints: i } = this.props, a = o ?? (n ?? lp) * hT;
    return {
      stroke: t,
      fill: t,
      size: a,
      show: !!i
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
class mT extends Qd {
  series = [];
  selectionPreferencesSource = gw.IN_MEMORY;
  shouldSaveSelectionPreference = !1;
  axes = {};
  stepInterval;
  scales = [];
  bands = [];
  cursor;
  hooks = {};
  plugins = [];
  padding;
  legend;
  focus;
  select;
  tzDate;
  id;
  onDragSelect;
  constructor(t) {
    super(t);
    const {
      id: n,
      onDragSelect: o,
      tzDate: i,
      selectionPreferencesSource: a,
      shouldSaveSelectionPreference: r,
      stepInterval: l
    } = t ?? {};
    this.id = n, i && (this.tzDate = i), a && (this.selectionPreferencesSource = a), r && (this.shouldSaveSelectionPreference = r), l && (this.stepInterval = l), this.onDragSelect = () => {
    }, o && (this.onDragSelect = o, this.addHook("setSelect", (s) => {
      const u = s.select;
      if (u && u.width > 0) {
        const c = s.posToVal(u.left, "x"), d = s.posToVal(u.left + u.width, "x");
        this.onDragSelect(c * 1e3, d * 1e3);
      }
    }));
  }
  getShouldSaveSelectionPreference() {
    return this.shouldSaveSelectionPreference;
  }
  getId() {
    return this.id;
  }
  addAxis(t) {
    const { scaleKey: n } = t;
    if (this.axes[n]) {
      this.axes[n].merge?.(t);
      return;
    }
    this.axes[n] = new bI(t);
  }
  addScale(t) {
    const n = this.scales.find((o) => o.props.scaleKey === t.scaleKey);
    if (n) {
      n.merge?.(t);
      return;
    }
    this.scales.push(new yI(t));
  }
  addSeries(t) {
    this.series.push(new vT(t));
  }
  addHook(t, n) {
    return this.hooks[t] || (this.hooks[t] = []), this.hooks[t].push(n), () => {
      const o = this.hooks[t].indexOf(n);
      o !== -1 && this.hooks[t].splice(o, 1);
    };
  }
  addPlugin(t) {
    this.plugins.push(t);
  }
  setBands(t) {
    this.bands = t;
  }
  setCursor(t) {
    this.cursor = cO({}, this.cursor, t);
  }
  setPadding(t) {
    this.padding = t;
  }
  setLegend(t) {
    this.legend = t;
  }
  setFocus(t) {
    this.focus = t;
  }
  setSelect(t) {
    this.select = t;
  }
  setTzDate(t) {
    this.tzDate = t;
  }
  getConfig() {
    const t = Object.values(this.axes).map((a) => a.getConfig()), n = {};
    for (const a of this.scales)
      Object.assign(n, a.getConfig());
    const o = [{}];
    for (const a of this.series)
      o.push(a.getConfig());
    const i = {
      axes: t,
      scales: n,
      series: o
    };
    return this.bands.length > 0 && (i.bands = this.bands), this.cursor && (i.cursor = this.cursor), this.hooks && Object.keys(this.hooks).length > 0 && (i.hooks = this.hooks), this.plugins.length > 0 && (i.plugins = this.plugins), this.padding && (i.padding = this.padding), this.legend && (i.legend = this.legend), this.focus && (i.focus = this.focus), this.select && (i.select = this.select), this.tzDate && (i.tzDate = this.tzDate), i;
  }
  /**
   * Get per-series spanGaps options for data preprocessing
   */
  getSeriesSpanGapsOptions() {
    return this.series.map((t) => {
      const { spanGaps: n } = t.props;
      return { spanGaps: n };
    });
  }
  /**
   * Build legend items from series data
   */
  getLegendItems() {
    return this.series.reduce(
      (t, n, o) => {
        const i = n.getConfig(), a = i.label ?? "", r = o + 1;
        return t[r] = {
          seriesIndex: r,
          color: String(i.stroke ?? "#ccc"),
          label: a,
          show: i.show ?? !0,
          yAxis: 1
        }, t;
      },
      {}
    );
  }
}
function Gb(e, t) {
  return t.some(
    ({ spanGaps: n }) => typeof n == "number" && n > 0 && e > n
  );
}
function bT(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...i] = n;
  if (!Array.isArray(o) || o.length < 2 || i.length === 0)
    return n;
  const a = o, r = a.length;
  let l = 0;
  for (let f = 0; f < r - 1; f += 1)
    Gb(a[f + 1] - a[f], t) && (l += 1);
  if (l === 0)
    return e;
  const s = r + l, u = Array.from({ length: s }), c = i.map(
    () => Array.from({ length: s })
  );
  let d = 0;
  for (let f = 0; f < r; f += 1) {
    u[d] = a[f];
    for (const [g, m] of i.entries())
      c[g][d] = m[f];
    if (d += 1, f < r - 1 && Gb(a[f + 1] - a[f], t)) {
      u[d] = a[f] + Math.max(1, Math.floor((a[f + 1] - a[f]) / 2));
      for (let g = 0; g < i.length; g += 1)
        c[g][d] = null;
      d += 1;
    }
  }
  return [u, ...c];
}
function yT(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...i] = n;
  if (!Array.isArray(o) || i.length === 0)
    return n;
  const r = t.some(({ spanGaps: d }) => typeof d == "number") ? bT(n, t) : n;
  if (!t.some(({ spanGaps: d }) => d === !0))
    return r;
  const [s, ...u] = r, c = u.map((d, f) => {
    const { spanGaps: g } = t[f] ?? {};
    return g !== !0 ? d : d.map(
      (m) => m === null ? void 0 : m
    );
  });
  return [s, ...c];
}
const xT = "series_visibility_";
function wT(e, t) {
  try {
    localStorage.setItem(xT + e, JSON.stringify(t));
  } catch {
  }
}
const ST = /\{\{(\w+)(?::(\w+))?\}\}/g;
function CT(e) {
  const t = /* @__PURE__ */ new Set();
  let n;
  const o = new RegExp(ST.source, "g");
  for (; (n = o.exec(e)) !== null; )
    t.add(n[1]);
  return Array.from(t);
}
class $T {
  nodes = /* @__PURE__ */ new Map();
  ensureNode(t) {
    return this.nodes.has(t) || this.nodes.set(t, { name: t, dependsOn: [], dependents: [] }), this.nodes.get(t);
  }
  addVariable(t) {
    const n = t.name, o = this.ensureNode(n);
    for (const i of o.dependsOn) {
      const a = this.nodes.get(i);
      a && (a.dependents = a.dependents.filter((r) => r !== n));
    }
    o.dependsOn = [], t.query && (o.dependsOn = CT(t.query));
    for (const i of o.dependsOn)
      this.ensureNode(i).dependents.push(n);
  }
  removeVariable(t) {
    const n = this.nodes.get(t);
    if (n) {
      for (const o of n.dependsOn) {
        const i = this.nodes.get(o);
        i && (i.dependents = i.dependents.filter((a) => a !== t));
      }
      for (const o of n.dependents) {
        const i = this.nodes.get(o);
        i && (i.dependsOn = i.dependsOn.filter((a) => a !== t));
      }
      this.nodes.delete(t);
    }
  }
  getDependents(t) {
    return this.nodes.get(t)?.dependents ?? [];
  }
  getAllDependents(t) {
    const n = /* @__PURE__ */ new Set(), o = [], i = (a) => {
      if (n.has(a))
        return;
      n.add(a);
      const r = this.getDependents(a);
      for (const l of r)
        o.push(l), i(l);
    };
    return i(t), o;
  }
  detectCycle() {
    const i = /* @__PURE__ */ new Map(), a = [];
    for (const l of this.nodes.keys())
      i.set(l, 0);
    const r = (l) => {
      i.set(l, 1);
      const s = this.nodes.get(l);
      if (s)
        for (const u of s.dependsOn) {
          const c = i.get(u);
          if (c === 1)
            return a.push(u, l), !0;
          if (c === 0 && r(u))
            return a.push(l), !0;
        }
      return i.set(l, 2), !1;
    };
    for (const l of this.nodes.keys())
      if (i.get(l) === 0 && r(l))
        return a.reverse();
    return null;
  }
  topologicalSort() {
    const t = /* @__PURE__ */ new Set(), n = [], o = (i) => {
      if (t.has(i))
        return;
      t.add(i);
      const a = this.nodes.get(i);
      if (a)
        for (const r of a.dependsOn)
          o(r);
      n.push(i);
    };
    for (const i of this.nodes.keys())
      o(i);
    return n;
  }
  clear() {
    this.nodes.clear();
  }
}
let PT = 1;
async function kr(e, t, n) {
  const { url: o, token: i } = n, a = {
    jsonrpc: "2.0",
    method: e,
    params: t,
    auth: i,
    id: PT++
  }, r = await fetch(`${o}?_m=${e}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(a)
  });
  if (!r.ok)
    throw new Error(`Zabbix API HTTP error: ${r.status}`);
  const l = await r.json();
  if (l.error)
    throw new Error(`Zabbix API error [${l.error.code}]: ${l.error.data}`);
  return l.result;
}
function OT(e) {
  return kr(
    "hostgroup.get",
    {
      output: ["groupid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
function IT(e, t, n) {
  return kr(
    "host.get",
    {
      output: ["hostid", "host", "name"],
      ...e?.length ? { groupids: e } : {},
      sortfield: "name",
      limit: 200
    },
    n
  );
}
function MT(e, t, n, o, i) {
  return kr(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      selectTags: "extend",
      hostids: e,
      filter: { value_type: ["0", "3"] },
      sortfield: "name",
      limit: 500
    },
    o
  );
}
function TT(e) {
  return e.value ? `${e.tag}: ${e.value}` : e.tag;
}
function kT(e, t, n) {
  return kr(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      hostids: e,
      filter: { value_type: ["1", "2", "4"] },
      sortfield: "name",
      limit: 500
    },
    n
  );
}
function ET(e, t) {
  return kr(
    "usermacro.get",
    {
      output: ["hostmacroid", "macro", "value"],
      ...e?.length ? { hostids: e } : {},
      sortfield: "macro",
      limit: 200
    },
    t
  );
}
function _T(e) {
  return kr(
    "service.get",
    {
      output: ["serviceid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
function AT(e, t) {
  return kr(
    "discoveryrule.get",
    {
      output: ["itemid", "hostid", "name", "key_"],
      hostids: e,
      sortfield: "name",
      limit: 200
    },
    t
  );
}
function DT(e, t) {
  return kr(
    "itemprototype.get",
    {
      output: ["itemid", "name", "key_"],
      discoveryids: [e],
      sortfield: "name"
    },
    t
  );
}
const zT = [
  "Transform",
  "Aggregate",
  "Filter",
  "Trends",
  "Time",
  "Alias",
  "Special"
], Kb = [
  // Transform
  { name: "groupBy", category: "Transform", params: [{ name: "interval", type: "string" }, { name: "function", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: ["1m", "avg"] },
  { name: "scale", category: "Transform", params: [{ name: "factor", type: "float", options: [100, 0.01, 10, -1] }], defaultParams: [100] },
  { name: "offset", category: "Transform", params: [{ name: "delta", type: "float", options: [-100, 100] }], defaultParams: [100] },
  { name: "delta", category: "Transform", params: [], defaultParams: [] },
  { name: "rate", category: "Transform", params: [], defaultParams: [] },
  { name: "movingAverage", category: "Transform", params: [{ name: "factor", type: "int", options: [6, 10, 60, 100, 600] }], defaultParams: [10] },
  { name: "exponentialMovingAverage", category: "Transform", params: [{ name: "smoothing", type: "float", options: [6, 10, 60, 100, 600] }], defaultParams: [0.2] },
  { name: "percentile", category: "Transform", params: [{ name: "interval", type: "string" }, { name: "percent", type: "float", options: [25, 50, 75, 90, 95, 99, 99.9] }], defaultParams: ["1m", 95] },
  { name: "removeAboveValue", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  { name: "removeBelowValue", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  { name: "transformNull", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  // Aggregate
  { name: "aggregateBy", category: "Aggregate", params: [{ name: "interval", type: "string" }, { name: "function", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: ["1m", "avg"] },
  { name: "sumSeries", category: "Aggregate", params: [], defaultParams: [] },
  { name: "percentileAgg", category: "Aggregate", params: [{ name: "interval", type: "string" }, { name: "percent", type: "float", options: [25, 50, 75, 90, 95, 99, 99.9] }], defaultParams: ["1m", 95] },
  // Filter
  { name: "top", category: "Filter", params: [{ name: "number", type: "int" }, { name: "value", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: [5, "avg"] },
  { name: "bottom", category: "Filter", params: [{ name: "number", type: "int" }, { name: "value", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: [5, "avg"] },
  { name: "sortSeries", category: "Filter", params: [{ name: "direction", type: "string", options: ["asc", "desc"] }], defaultParams: ["asc"] },
  // Trends
  { name: "trendValue", category: "Trends", params: [{ name: "type", type: "string", options: ["avg", "min", "max", "sum", "count"] }], defaultParams: ["avg"] },
  // Time
  { name: "timeShift", category: "Time", params: [{ name: "interval", type: "string", options: ["24h", "7d", "1M", "+24h", "-24h"] }], defaultParams: ["24h"] },
  // Alias
  { name: "setAlias", category: "Alias", params: [{ name: "alias", type: "string" }], defaultParams: [] },
  { name: "setAliasByRegex", category: "Alias", params: [{ name: "aliasByRegex", type: "string" }], defaultParams: [] },
  { name: "replaceAlias", category: "Alias", params: [{ name: "regexp", type: "string" }, { name: "newAlias", type: "string" }], defaultParams: ["/(.*)/", "$1"] },
  // Special
  { name: "consolidateBy", category: "Special", params: [{ name: "type", type: "string", options: ["avg", "min", "max", "sum", "count"] }], defaultParams: ["avg"] }
], Fl = new $T();
function RT(e) {
  return e.split(",").map((t) => t.trim()).filter(Boolean).map((t) => ({ value: t, label: t }));
}
function NT(e, t, n) {
  if (t) {
    const o = e ?? n[0]?.value ?? "";
    return o ? [o] : [];
  }
  return e ?? n[0]?.value ?? "";
}
function BT(e) {
  return [{ value: "$__all", label: "All" }, ...e];
}
function FT(e, t, n) {
  switch (e.type) {
    case "custom": {
      const o = e.customValues ?? "";
      return Promise.resolve(RT(o));
    }
    case "query": {
      if (!t || !e.query)
        return Promise.resolve([]);
      const o = LT(e.query, n);
      return t(o);
    }
    case "textbox": {
      const o = e.defaultValue ?? "";
      return Promise.resolve(o ? [{ value: o, label: o }] : []);
    }
    case "constant": {
      const o = e.constantValue ?? "";
      return Promise.resolve(o ? [{ value: o, label: o }] : []);
    }
    default:
      return Promise.resolve([]);
  }
}
function LT(e, t) {
  return e.replace(/\{\{(\w+)(?::(\w+))?\}\}/g, (n, o) => {
    const i = t[o];
    return i == null ? n : Array.isArray(i) ? i.join(",") : String(i);
  });
}
const xs = qh("variable", () => {
  const e = le({}), t = le(null);
  function n(g) {
    t.value = g;
  }
  function o(g) {
    e.value[g.id] || (Fl.addVariable(g), e.value[g.id] = {
      config: g,
      options: [],
      current: "",
      loading: !1,
      error: null
    });
  }
  function i(g) {
    const m = e.value[g];
    m && (Fl.removeVariable(m.config.name), delete e.value[g]);
  }
  function a(g, m) {
    const b = e.value[g];
    b && (b.config = { ...b.config, ...m }, ("name" in m || "query" in m) && Fl.addVariable(b.config));
  }
  function r(g, m) {
    const b = e.value[g];
    b && (b.current = m);
  }
  async function l(g) {
    const m = e.value[g];
    if (m) {
      m.loading = !0, m.error = null;
      try {
        const b = u(), y = await FT(m.config, t.value, b);
        m.options = m.config.includeAll ? BT(y) : y;
        const S = Array.isArray(m.current) ? m.current[0] : m.current;
        (!S || !m.options.some((C) => C.value === S)) && (m.current = NT(m.config.defaultValue, m.config.multi, m.options));
      } catch (b) {
        m.error = b?.message ?? String(b);
      } finally {
        m.loading = !1;
      }
    }
  }
  async function s() {
    const g = Fl.topologicalSort();
    for (const m of g) {
      const b = Object.values(e.value).find((y) => y.config.name === m);
      b && await l(b.config.id);
    }
  }
  function u() {
    const g = {};
    for (const m of Object.values(e.value)) {
      const { name: b } = m.config;
      Array.isArray(m.current) ? g[b] = m.current.length === 1 ? m.current[0] : m.current : g[b] = m.current;
    }
    return g;
  }
  function c(g) {
    return Object.values(e.value).find((m) => m.config.name === g);
  }
  function d(g) {
    return Fl.getAllDependents(g);
  }
  function f() {
    return Fl.detectCycle();
  }
  return {
    variables: e,
    optionsResolver: t,
    setOptionsResolver: n,
    addVariable: o,
    removeVariable: i,
    updateVariable: a,
    setValue: r,
    refreshVariable: l,
    refreshAll: s,
    resolveAll: u,
    getVariable: c,
    getDependents: d,
    detectCycle: f
  };
});
function HT() {
  const e = Date.now();
  return { from: e - 3600 * 1e3, to: e };
}
const xa = qh("dashboard", () => {
  const e = fw(), t = le(""), n = le(e.panels), o = le(e.layouts), i = le(!1), a = le(null), r = le(!1), l = le(HT()), s = le(0), u = le(null), c = le(!1), d = le({});
  function f(F) {
    const A = bg(), U = dw(F, { id: A }), j = o.value.reduce((G, Y) => Math.max(G, Y.y + Y.h), 0), ae = {
      i: A,
      x: 0,
      y: j,
      w: F === "stat" || F === "gauge" ? 3 : F === "table" ? 12 : 6,
      h: F === "stat" || F === "gauge" ? 4 : F === "table" ? 10 : 8,
      minH: F === "stat" || F === "gauge" ? 3 : 6
    };
    n.value[A] = U, o.value = [...o.value, ae], a.value = A, r.value = !1, c.value = !0;
  }
  function g(F) {
    const { [F]: A, ...U } = n.value;
    n.value = U, o.value = o.value.filter((j) => j.i !== F), a.value === F && (a.value = null), c.value = !0;
  }
  function m(F) {
    const A = n.value[F];
    if (!A)
      return;
    const U = bg(), j = { ...A, id: U, title: `${A.title} (copy)` }, ae = o.value.find((Y) => Y.i === F), G = o.value.reduce((Y, K) => Math.max(Y, K.y + K.h), 0);
    n.value[U] = j, o.value = [
      ...o.value,
      {
        i: U,
        x: ae?.x ?? 0,
        y: G,
        w: ae?.w ?? 6,
        h: ae?.h ?? 8,
        minH: ae?.minH
      }
    ], c.value = !0;
  }
  function b(F, A) {
    const U = n.value[F];
    U && (n.value[F] = { ...U, ...A }, c.value = !0);
  }
  function y() {
    n.value = {}, o.value = [], a.value = null, c.value = !0;
  }
  function S(F) {
    o.value = F;
  }
  function C() {
    u.value = {
      title: t.value,
      panels: { ...n.value },
      layouts: [...o.value]
    }, i.value = !0, c.value = !1;
  }
  function O(F) {
    F && F(W()), i.value = !1, u.value = null, c.value = !1;
  }
  function $() {
    const F = u.value;
    F && (t.value = F.title, n.value = F.panels, o.value = F.layouts), i.value = !1, u.value = null, c.value = !1;
  }
  function P() {
    i.value ? $() : C();
  }
  function k(F) {
    i.value = F;
  }
  function x(F) {
    a.value = F;
  }
  function E(F) {
    l.value = F;
  }
  function z(F) {
    s.value = F;
  }
  function B() {
    for (const F of Object.keys(n.value))
      d.value[F] = (d.value[F] ?? 0) + 1;
  }
  function D(F) {
    d.value[F] = (d.value[F] ?? 0) + 1;
  }
  function W() {
    const F = xs(), A = Object.values(F.variables).map((j) => j.config), U = {
      title: t.value,
      panels: n.value,
      layouts: o.value,
      variables: A
    };
    return JSON.stringify(U, null, 2);
  }
  function H(F) {
    try {
      const A = JSON.parse(F);
      if (A.panels && A.layouts && (t.value = A.title ?? "", n.value = A.panels, o.value = A.layouts, c.value = !0), A.variables && A.variables.length > 0) {
        const U = xs();
        for (const j of Object.keys(U.variables))
          U.removeVariable(j);
        for (const j of A.variables) {
          const ae = {
            ...j,
            hide: j.showOnDashboard === "nothing" || !!j.hideFromVariableList
          };
          U.addVariable(ae);
        }
      }
      return !!(A.panels && A.layouts);
    } catch {
      return !1;
    }
  }
  return {
    title: t,
    panels: n,
    layouts: o,
    isEditing: i,
    editingPanelId: a,
    addPanelModalOpen: r,
    timeRange: l,
    autoRefresh: s,
    _editSnapshot: u,
    isDirty: c,
    panelRefreshKeys: d,
    addPanel: f,
    removePanel: g,
    clonePanel: m,
    updatePanel: b,
    clearPanels: y,
    setLayouts: S,
    startEditing: C,
    confirmSave: O,
    discardChanges: $,
    setEditingPanel: x,
    toggleEditing: P,
    setEditing: k,
    setTimeRange: E,
    setAutoRefresh: z,
    refresh: B,
    refreshPanel: D,
    exportJSON: W,
    importJSON: H
  };
}), ja = qh("theme", () => {
  const e = le(
    (typeof localStorage < "u" ? localStorage.getItem("argus-theme") : null) || "dark"
  ), t = R(() => e.value === "dark");
  function n() {
    e.value = e.value === "dark" ? "light" : "dark", typeof document < "u" && (document.documentElement.dataset.theme = e.value), typeof localStorage < "u" && localStorage.setItem("argus-theme", e.value);
  }
  function o(i) {
    e.value = i, typeof document < "u" && (document.documentElement.dataset.theme = i), typeof localStorage < "u" && localStorage.setItem("argus-theme", i);
  }
  return { theme: e, isDark: t, toggle: n, setTheme: o };
});
function Ru(e) {
  "@babel/helpers - typeof";
  return Ru = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Ru(e);
}
function VT(e, t) {
  if (Ru(e) != "object" || !e) return e;
  var n = e[Symbol.toPrimitive];
  if (n !== void 0) {
    var o = n.call(e, t);
    if (Ru(o) != "object") return o;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (t === "string" ? String : Number)(e);
}
function jT(e) {
  var t = VT(e, "string");
  return Ru(t) == "symbol" ? t : t + "";
}
function WT(e, t, n) {
  return (t = jT(t)) in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function Yb(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(i) {
      return Object.getOwnPropertyDescriptor(e, i).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function Z(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Yb(Object(n), !0).forEach(function(o) {
      WT(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Yb(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function I() {
  return I = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, I.apply(null, arguments);
}
const qT = (e) => typeof e == "function", GT = Array.isArray, KT = (e) => typeof e == "string", YT = (e) => e !== null && typeof e == "object", UT = /^on[^a-z]/, XT = (e) => UT.test(e), lv = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (n) => t[n] || (t[n] = e(n));
}, QT = /-(\w)/g, sv = lv((e) => e.replace(QT, (t, n) => n ? n.toUpperCase() : "")), ZT = /\B([A-Z])/g, JT = lv((e) => e.replace(ZT, "-$1").toLowerCase()), ek = lv((e) => e.charAt(0).toUpperCase() + e.slice(1)), tk = Object.prototype.hasOwnProperty, Ub = (e, t) => tk.call(e, t);
function nk(e, t, n, o) {
  const i = e[n];
  if (i != null) {
    const a = Ub(i, "default");
    if (a && o === void 0) {
      const r = i.default;
      o = i.type !== Function && qT(r) ? r() : r;
    }
    i.type === Boolean && (!Ub(t, n) && !a ? o = !1 : o === "" && (o = !0));
  }
  return o;
}
function ok(e) {
  return Object.keys(e).reduce((t, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (t[n] = e[n]), t), {});
}
function nu(e) {
  return typeof e == "number" ? `${e}px` : e;
}
function ts(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  return typeof e == "function" ? e(t) : e ?? n;
}
function ik(e) {
  let t;
  const n = new Promise((i) => {
    t = e(() => {
      i(!0);
    });
  }), o = () => {
    t?.();
  };
  return o.then = (i, a) => n.then(i, a), o.promise = n, o;
}
function Te() {
  const e = [];
  for (let t = 0; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    if (n) {
      if (KT(n))
        e.push(n);
      else if (GT(n))
        for (let o = 0; o < n.length; o++) {
          const i = Te(n[o]);
          i && e.push(i);
        }
      else if (YT(n))
        for (const o in n)
          n[o] && e.push(o);
    }
  }
  return e.join(" ");
}
var Qw = (function() {
  if (typeof Map < "u")
    return Map;
  function e(t, n) {
    var o = -1;
    return t.some(function(i, a) {
      return i[0] === n ? (o = a, !0) : !1;
    }), o;
  }
  return (
    /** @class */
    (function() {
      function t() {
        this.__entries__ = [];
      }
      return Object.defineProperty(t.prototype, "size", {
        /**
         * @returns {boolean}
         */
        get: function() {
          return this.__entries__.length;
        },
        enumerable: !0,
        configurable: !0
      }), t.prototype.get = function(n) {
        var o = e(this.__entries__, n), i = this.__entries__[o];
        return i && i[1];
      }, t.prototype.set = function(n, o) {
        var i = e(this.__entries__, n);
        ~i ? this.__entries__[i][1] = o : this.__entries__.push([n, o]);
      }, t.prototype.delete = function(n) {
        var o = this.__entries__, i = e(o, n);
        ~i && o.splice(i, 1);
      }, t.prototype.has = function(n) {
        return !!~e(this.__entries__, n);
      }, t.prototype.clear = function() {
        this.__entries__.splice(0);
      }, t.prototype.forEach = function(n, o) {
        o === void 0 && (o = null);
        for (var i = 0, a = this.__entries__; i < a.length; i++) {
          var r = a[i];
          n.call(o, r[1], r[0]);
        }
      }, t;
    })()
  );
})(), Eg = typeof window < "u" && typeof document < "u" && window.document === document, Pd = (function() {
  return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
})(), ak = (function() {
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Pd) : function(e) {
    return setTimeout(function() {
      return e(Date.now());
    }, 1e3 / 60);
  };
})(), rk = 2;
function lk(e, t) {
  var n = !1, o = !1, i = 0;
  function a() {
    n && (n = !1, e()), o && l();
  }
  function r() {
    ak(a);
  }
  function l() {
    var s = Date.now();
    if (n) {
      if (s - i < rk)
        return;
      o = !0;
    } else
      n = !0, o = !1, setTimeout(r, t);
    i = s;
  }
  return l;
}
var sk = 20, uk = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], ck = typeof MutationObserver < "u", dk = (
  /** @class */
  (function() {
    function e() {
      this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = lk(this.refresh.bind(this), sk);
    }
    return e.prototype.addObserver = function(t) {
      ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
    }, e.prototype.removeObserver = function(t) {
      var n = this.observers_, o = n.indexOf(t);
      ~o && n.splice(o, 1), !n.length && this.connected_ && this.disconnect_();
    }, e.prototype.refresh = function() {
      var t = this.updateObservers_();
      t && this.refresh();
    }, e.prototype.updateObservers_ = function() {
      var t = this.observers_.filter(function(n) {
        return n.gatherActive(), n.hasActive();
      });
      return t.forEach(function(n) {
        return n.broadcastActive();
      }), t.length > 0;
    }, e.prototype.connect_ = function() {
      !Eg || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), ck ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
        attributes: !0,
        childList: !0,
        characterData: !0,
        subtree: !0
      })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
    }, e.prototype.disconnect_ = function() {
      !Eg || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
    }, e.prototype.onTransitionEnd_ = function(t) {
      var n = t.propertyName, o = n === void 0 ? "" : n, i = uk.some(function(a) {
        return !!~o.indexOf(a);
      });
      i && this.refresh();
    }, e.getInstance = function() {
      return this.instance_ || (this.instance_ = new e()), this.instance_;
    }, e.instance_ = null, e;
  })()
), Zw = (function(e, t) {
  for (var n = 0, o = Object.keys(t); n < o.length; n++) {
    var i = o[n];
    Object.defineProperty(e, i, {
      value: t[i],
      enumerable: !1,
      writable: !1,
      configurable: !0
    });
  }
  return e;
}), ws = (function(e) {
  var t = e && e.ownerDocument && e.ownerDocument.defaultView;
  return t || Pd;
}), Jw = rf(0, 0, 0, 0);
function Od(e) {
  return parseFloat(e) || 0;
}
function Xb(e) {
  for (var t = [], n = 1; n < arguments.length; n++)
    t[n - 1] = arguments[n];
  return t.reduce(function(o, i) {
    var a = e["border-" + i + "-width"];
    return o + Od(a);
  }, 0);
}
function fk(e) {
  for (var t = ["top", "right", "bottom", "left"], n = {}, o = 0, i = t; o < i.length; o++) {
    var a = i[o], r = e["padding-" + a];
    n[a] = Od(r);
  }
  return n;
}
function pk(e) {
  var t = e.getBBox();
  return rf(0, 0, t.width, t.height);
}
function gk(e) {
  var t = e.clientWidth, n = e.clientHeight;
  if (!t && !n)
    return Jw;
  var o = ws(e).getComputedStyle(e), i = fk(o), a = i.left + i.right, r = i.top + i.bottom, l = Od(o.width), s = Od(o.height);
  if (o.boxSizing === "border-box" && (Math.round(l + a) !== t && (l -= Xb(o, "left", "right") + a), Math.round(s + r) !== n && (s -= Xb(o, "top", "bottom") + r)), !vk(e)) {
    var u = Math.round(l + a) - t, c = Math.round(s + r) - n;
    Math.abs(u) !== 1 && (l -= u), Math.abs(c) !== 1 && (s -= c);
  }
  return rf(i.left, i.top, l, s);
}
var hk = /* @__PURE__ */ (function() {
  return typeof SVGGraphicsElement < "u" ? function(e) {
    return e instanceof ws(e).SVGGraphicsElement;
  } : function(e) {
    return e instanceof ws(e).SVGElement && typeof e.getBBox == "function";
  };
})();
function vk(e) {
  return e === ws(e).document.documentElement;
}
function mk(e) {
  return Eg ? hk(e) ? pk(e) : gk(e) : Jw;
}
function bk(e) {
  var t = e.x, n = e.y, o = e.width, i = e.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, r = Object.create(a.prototype);
  return Zw(r, {
    x: t,
    y: n,
    width: o,
    height: i,
    top: n,
    right: t + o,
    bottom: i + n,
    left: t
  }), r;
}
function rf(e, t, n, o) {
  return { x: e, y: t, width: n, height: o };
}
var yk = (
  /** @class */
  (function() {
    function e(t) {
      this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = rf(0, 0, 0, 0), this.target = t;
    }
    return e.prototype.isActive = function() {
      var t = mk(this.target);
      return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
    }, e.prototype.broadcastRect = function() {
      var t = this.contentRect_;
      return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
    }, e;
  })()
), xk = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t, n) {
      var o = bk(n);
      Zw(this, { target: t, contentRect: o });
    }
    return e;
  })()
), wk = (
  /** @class */
  (function() {
    function e(t, n, o) {
      if (this.activeObservations_ = [], this.observations_ = new Qw(), typeof t != "function")
        throw new TypeError("The callback provided as parameter 1 is not a function.");
      this.callback_ = t, this.controller_ = n, this.callbackCtx_ = o;
    }
    return e.prototype.observe = function(t) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(t instanceof ws(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) || (n.set(t, new yk(t)), this.controller_.addObserver(this), this.controller_.refresh());
      }
    }, e.prototype.unobserve = function(t) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(t instanceof ws(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) && (n.delete(t), n.size || this.controller_.removeObserver(this));
      }
    }, e.prototype.disconnect = function() {
      this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
    }, e.prototype.gatherActive = function() {
      var t = this;
      this.clearActive(), this.observations_.forEach(function(n) {
        n.isActive() && t.activeObservations_.push(n);
      });
    }, e.prototype.broadcastActive = function() {
      if (this.hasActive()) {
        var t = this.callbackCtx_, n = this.activeObservations_.map(function(o) {
          return new xk(o.target, o.broadcastRect());
        });
        this.callback_.call(t, n, t), this.clearActive();
      }
    }, e.prototype.clearActive = function() {
      this.activeObservations_.splice(0);
    }, e.prototype.hasActive = function() {
      return this.activeObservations_.length > 0;
    }, e;
  })()
), eS = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Qw(), tS = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t) {
      if (!(this instanceof e))
        throw new TypeError("Cannot call a class as a function.");
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      var n = dk.getInstance(), o = new wk(t, n, this);
      eS.set(this, o);
    }
    return e;
  })()
);
[
  "observe",
  "unobserve",
  "disconnect"
].forEach(function(e) {
  tS.prototype[e] = function() {
    var t;
    return (t = eS.get(this))[e].apply(t, arguments);
  };
});
var nS = (function() {
  return typeof Pd.ResizeObserver < "u" ? Pd.ResizeObserver : tS;
})();
const _g = (e) => e != null && e !== "", wn = (e, t) => {
  const n = I({}, e);
  return Object.keys(t).forEach((o) => {
    const i = n[o];
    if (i)
      i.type || i.default ? i.default = t[o] : i.def ? i.def(t[o]) : n[o] = {
        type: i,
        default: t[o]
      };
    else
      throw new Error(`not have ${o} prop`);
  }), n;
}, Sk = (e) => {
  const t = Object.keys(e), n = {}, o = {}, i = {};
  for (let a = 0, r = t.length; a < r; a++) {
    const l = t[a];
    XT(l) ? (n[l[2].toLowerCase() + l.slice(3)] = e[l], o[l] = e[l]) : i[l] = e[l];
  }
  return {
    onEvents: o,
    events: n,
    extraAttrs: i
  };
}, Ck = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = {}, o = /;(?![^(]*\))/g, i = /:(.+)/;
  return typeof e == "object" ? e : (e.split(o).forEach(function(a) {
    if (a) {
      const r = a.split(i);
      if (r.length > 1) {
        const l = t ? sv(r[0].trim()) : r[0].trim();
        n[l] = r[1].trim();
      }
    }
  }), n);
}, Id = (e, t) => e[t] !== void 0, oS = Symbol("skipFlatten"), to = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  const n = Array.isArray(e) ? e : [e], o = [];
  return n.forEach((i) => {
    Array.isArray(i) ? o.push(...to(i, t)) : i && i.type === He ? i.key === oS ? o.push(i) : o.push(...to(i.children, t)) : i && Xi(i) ? t && !lf(i) ? o.push(i) : t || o.push(i) : _g(i) && o.push(i);
  }), o;
}, iS = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  if (Xi(e))
    return e.type === He ? t === "default" ? to(e.children) : [] : e.children && e.children[t] ? to(e.children[t](n)) : [];
  {
    const o = e.$slots[t] && e.$slots[t](n);
    return to(o);
  }
}, Ra = (e) => {
  var t;
  let n = ((t = e?.vnode) === null || t === void 0 ? void 0 : t.el) || e && (e.$el || e);
  for (; n && !n.tagName; )
    n = n.nextSibling;
  return n;
}, $k = (e) => {
  const t = {};
  if (e.$ && e.$.vnode) {
    const n = e.$.vnode.props || {};
    Object.keys(e.$props).forEach((o) => {
      const i = e.$props[o], a = JT(o);
      (i !== void 0 || a in n) && (t[o] = i);
    });
  } else if (Xi(e) && typeof e.type == "object") {
    const n = e.props || {}, o = {};
    Object.keys(n).forEach((a) => {
      o[sv(a)] = n[a];
    });
    const i = e.type.props || {};
    Object.keys(i).forEach((a) => {
      const r = nk(i, o, a, o[a]);
      (r !== void 0 || a in o) && (t[a] = r);
    });
  }
  return t;
}, Pk = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i;
  if (e.$) {
    const a = e[t];
    if (a !== void 0)
      return typeof a == "function" && o ? a(n) : a;
    i = e.$slots[t], i = o && i ? i(n) : i;
  } else if (Xi(e)) {
    const a = e.props && e.props[t];
    if (a !== void 0 && e.props !== null)
      return typeof a == "function" && o ? a(n) : a;
    e.type === He ? i = e.children : e.children && e.children[t] && (i = e.children[t], i = o && i ? i(n) : i);
  }
  return Array.isArray(i) && (i = to(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
};
function Qb() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  return e.$ ? n = I(I({}, n), e.$attrs) : n = I(I({}, n), e.props), Sk(n)[t ? "onEvents" : "events"];
}
function Ok(e, t) {
  let o = ((Xi(e) ? e.props : e.$attrs) || {}).style || {};
  return typeof o == "string" && (o = Ck(o, t)), o;
}
function Ik(e) {
  return e.length === 1 && e[0].type === He;
}
function lf(e) {
  return e && (e.type === U1 || e.type === He && e.children.length === 0 || e.type === X1 && e.children.trim() === "");
}
function Go() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const t = [];
  return e.forEach((n) => {
    Array.isArray(n) ? t.push(...n) : n?.type === He ? t.push(...Go(n.children)) : t.push(n);
  }), t.filter((n) => !lf(n));
}
function ou(e) {
  if (e) {
    const t = Go(e);
    return t.length ? t : void 0;
  } else
    return e;
}
function No(e) {
  return Array.isArray(e) && e.length === 1 && (e = e[0]), e && e.__v_isVNode && typeof e.type != "symbol";
}
function Ii(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  var o, i;
  return (o = t[n]) !== null && o !== void 0 ? o : (i = e[n]) === null || i === void 0 ? void 0 : i.call(e);
}
const Ss = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ResizeObserver",
  props: {
    disabled: Boolean,
    onResize: Function
  },
  emits: ["resize"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Dn({
      width: 0,
      height: 0,
      offsetHeight: 0,
      offsetWidth: 0
    });
    let i = null, a = null;
    const r = () => {
      a && (a.disconnect(), a = null);
    }, l = (c) => {
      const {
        onResize: d
      } = e, f = c[0].target, {
        width: g,
        height: m
      } = f.getBoundingClientRect(), {
        offsetWidth: b,
        offsetHeight: y
      } = f, S = Math.floor(g), C = Math.floor(m);
      if (o.width !== S || o.height !== C || o.offsetWidth !== b || o.offsetHeight !== y) {
        const O = {
          width: S,
          height: C,
          offsetWidth: b,
          offsetHeight: y
        };
        I(o, O), d && Promise.resolve().then(() => {
          d(I(I({}, O), {
            offsetWidth: b,
            offsetHeight: y
          }), f);
        });
      }
    }, s = ui(), u = () => {
      const {
        disabled: c
      } = e;
      if (c) {
        r();
        return;
      }
      const d = Ra(s);
      d !== i && (r(), i = d), !a && d && (a = new nS(l), a.observe(d));
    };
    return Pt(() => {
      u();
    }), Ds(() => {
      u();
    }), Bo(() => {
      r();
    }), Ie(() => e.disabled, () => {
      u();
    }, {
      flush: "post"
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
let aS = (e) => setTimeout(e, 16), rS = (e) => clearTimeout(e);
typeof window < "u" && "requestAnimationFrame" in window && (aS = (e) => window.requestAnimationFrame(e), rS = (e) => window.cancelAnimationFrame(e));
let Zb = 0;
const uv = /* @__PURE__ */ new Map();
function lS(e) {
  uv.delete(e);
}
function Mt(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  Zb += 1;
  const n = Zb;
  function o(i) {
    if (i === 0)
      lS(n), e();
    else {
      const a = aS(() => {
        o(i - 1);
      });
      uv.set(n, a);
    }
  }
  return o(t), n;
}
Mt.cancel = (e) => {
  const t = uv.get(e);
  return lS(t), rS(t);
};
const ri = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
}, Ji = (e) => {
  const t = e;
  return t.install = function(n) {
    n.component(t.displayName || t.name, e);
  }, e;
};
function Cs() {
  return {
    type: [Function, Array]
  };
}
function Ct(e) {
  return {
    type: Object,
    default: e
  };
}
function st(e) {
  return {
    type: Boolean,
    default: e
  };
}
function Qe(e) {
  return {
    type: Function,
    default: e
  };
}
function ti(e, t) {
  return {
    validator: () => !0,
    default: e
  };
}
function sp() {
  return {
    validator: () => !0
  };
}
function Po(e) {
  return {
    type: Array,
    default: e
  };
}
function dn(e) {
  return {
    type: String,
    default: e
  };
}
function tn(e, t) {
  return e ? {
    type: e,
    default: t
  } : ti(t);
}
let bo = !1;
try {
  const e = Object.defineProperty({}, "passive", {
    get() {
      bo = !0;
    }
  });
  window.addEventListener("testPassive", null, e), window.removeEventListener("testPassive", null, e);
} catch {
}
function qi(e, t, n, o) {
  if (e && e.addEventListener) {
    let i = o;
    i === void 0 && bo && (t === "touchstart" || t === "touchmove" || t === "wheel") && (i = {
      passive: !1
    }), e.addEventListener(t, n, i);
  }
  return {
    remove: () => {
      e && e.removeEventListener && e.removeEventListener(t, n);
    }
  };
}
const cv = "anticon", sS = Symbol("GlobalFormContextKey"), Mk = (e) => {
  kt(sS, e);
}, Tk = () => Tt(sS, {
  validateMessages: R(() => {
  })
}), kk = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: Ct(),
  input: Ct(),
  autoInsertSpaceInButton: {
    type: Boolean,
    default: void 0
  },
  locale: Ct(),
  pageHeader: Ct(),
  componentSize: {
    type: String
  },
  componentDisabled: {
    type: Boolean,
    default: void 0
  },
  direction: {
    type: String,
    default: "ltr"
  },
  space: Ct(),
  virtual: {
    type: Boolean,
    default: void 0
  },
  dropdownMatchSelectWidth: {
    type: [Number, Boolean],
    default: !0
  },
  form: Ct(),
  pagination: Ct(),
  theme: Ct(),
  select: Ct(),
  wave: Ct()
}), dv = Symbol("configProvider"), uS = {
  getPrefixCls: (e, t) => t || (e ? `ant-${e}` : "ant"),
  iconPrefixCls: R(() => cv),
  getPopupContainer: R(() => () => document.body),
  direction: R(() => "ltr")
}, sf = () => Tt(dv, uS), Ek = (e) => kt(dv, e), cS = Symbol("DisabledContextKey"), Zi = () => Tt(cS, le(void 0)), dS = (e) => {
  const t = Zi();
  return kt(cS, R(() => {
    var n;
    return (n = e.value) !== null && n !== void 0 ? n : t.value;
  })), e;
}, _k = {
  // Options.jsx
  items_per_page: "/ page",
  jump_to: "Go to",
  jump_to_confirm: "confirm",
  page: "",
  // Pagination.jsx
  prev_page: "Previous Page",
  next_page: "Next Page",
  prev_5: "Previous 5 Pages",
  next_5: "Next 5 Pages",
  prev_3: "Previous 3 Pages",
  next_3: "Next 3 Pages"
}, Ak = {
  locale: "en_US",
  today: "Today",
  now: "Now",
  backToToday: "Back to today",
  ok: "Ok",
  clear: "Clear",
  month: "Month",
  year: "Year",
  timeSelect: "select time",
  dateSelect: "select date",
  weekSelect: "Choose a week",
  monthSelect: "Choose a month",
  yearSelect: "Choose a year",
  decadeSelect: "Choose a decade",
  yearFormat: "YYYY",
  dateFormat: "M/D/YYYY",
  dayFormat: "D",
  dateTimeFormat: "M/D/YYYY HH:mm:ss",
  monthBeforeYear: !0,
  previousMonth: "Previous month (PageUp)",
  nextMonth: "Next month (PageDown)",
  previousYear: "Last year (Control + left)",
  nextYear: "Next year (Control + right)",
  previousDecade: "Last decade",
  nextDecade: "Next decade",
  previousCentury: "Last century",
  nextCentury: "Next century"
}, fS = {
  placeholder: "Select time",
  rangePlaceholder: ["Start time", "End time"]
}, Md = {
  lang: I({
    placeholder: "Select date",
    yearPlaceholder: "Select year",
    quarterPlaceholder: "Select quarter",
    monthPlaceholder: "Select month",
    weekPlaceholder: "Select week",
    rangePlaceholder: ["Start date", "End date"],
    rangeYearPlaceholder: ["Start year", "End year"],
    rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
    rangeMonthPlaceholder: ["Start month", "End month"],
    rangeWeekPlaceholder: ["Start week", "End week"]
  }, Ak),
  timePickerLocale: I({}, fS)
}, Yo = "${label} is not a valid ${type}", Ir = {
  locale: "en",
  Pagination: _k,
  DatePicker: Md,
  TimePicker: fS,
  Calendar: Md,
  global: {
    placeholder: "Please select"
  },
  Table: {
    filterTitle: "Filter menu",
    filterConfirm: "OK",
    filterReset: "Reset",
    filterEmptyText: "No filters",
    filterCheckall: "Select all items",
    filterSearchPlaceholder: "Search in filters",
    emptyText: "No data",
    selectAll: "Select current page",
    selectInvert: "Invert current page",
    selectNone: "Clear all data",
    selectionAll: "Select all data",
    sortTitle: "Sort",
    expand: "Expand row",
    collapse: "Collapse row",
    triggerDesc: "Click to sort descending",
    triggerAsc: "Click to sort ascending",
    cancelSort: "Click to cancel sorting"
  },
  Tour: {
    Next: "Next",
    Previous: "Previous",
    Finish: "Finish"
  },
  Modal: {
    okText: "OK",
    cancelText: "Cancel",
    justOkText: "OK"
  },
  Popconfirm: {
    okText: "OK",
    cancelText: "Cancel"
  },
  Transfer: {
    titles: ["", ""],
    searchPlaceholder: "Search here",
    itemUnit: "item",
    itemsUnit: "items",
    remove: "Remove",
    selectCurrent: "Select current page",
    removeCurrent: "Remove current page",
    selectAll: "Select all data",
    removeAll: "Remove all data",
    selectInvert: "Invert current page"
  },
  Upload: {
    uploading: "Uploading...",
    removeFile: "Remove file",
    uploadError: "Upload error",
    previewFile: "Preview file",
    downloadFile: "Download file"
  },
  Empty: {
    description: "No data"
  },
  Icon: {
    icon: "icon"
  },
  Text: {
    edit: "Edit",
    copy: "Copy",
    copied: "Copied",
    expand: "Expand"
  },
  PageHeader: {
    back: "Back"
  },
  Form: {
    optional: "(optional)",
    defaultValidateMessages: {
      default: "Field validation error for ${label}",
      required: "Please enter ${label}",
      enum: "${label} must be one of [${enum}]",
      whitespace: "${label} cannot be a blank character",
      date: {
        format: "${label} date format is invalid",
        parse: "${label} cannot be converted to a date",
        invalid: "${label} is an invalid date"
      },
      types: {
        string: Yo,
        method: Yo,
        array: Yo,
        object: Yo,
        number: Yo,
        date: Yo,
        boolean: Yo,
        integer: Yo,
        float: Yo,
        regexp: Yo,
        email: Yo,
        url: Yo,
        hex: Yo
      },
      string: {
        len: "${label} must be ${len} characters",
        min: "${label} must be at least ${min} characters",
        max: "${label} must be up to ${max} characters",
        range: "${label} must be between ${min}-${max} characters"
      },
      number: {
        len: "${label} must be equal to ${len}",
        min: "${label} must be minimum ${min}",
        max: "${label} must be maximum ${max}",
        range: "${label} must be between ${min}-${max}"
      },
      array: {
        len: "Must be ${len} ${label}",
        min: "At least ${min} ${label}",
        max: "At most ${max} ${label}",
        range: "The amount of ${label} must be between ${min}-${max}"
      },
      pattern: {
        mismatch: "${label} does not match the pattern ${pattern}"
      }
    }
  },
  Image: {
    preview: "Preview"
  },
  QRCode: {
    expired: "QR code expired",
    refresh: "Refresh",
    scanned: "Scanned"
  }
}, pS = ye({
  compatConfig: {
    MODE: 3
  },
  name: "LocaleReceiver",
  props: {
    componentName: String,
    defaultLocale: {
      type: [Object, Function]
    },
    children: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Tt("localeData", {}), i = R(() => {
      const {
        componentName: r = "global",
        defaultLocale: l
      } = e, s = l || Ir[r || "global"], {
        antLocale: u
      } = o, c = r && u ? u[r] : {};
      return I(I({}, typeof s == "function" ? s() : s), c || {});
    }), a = R(() => {
      const {
        antLocale: r
      } = o, l = r && r.locale;
      return r && r.exist && !l ? Ir.locale : l;
    });
    return () => {
      const r = e.children || n.default, {
        antLocale: l
      } = o;
      return r?.(i.value, a.value, l);
    };
  }
});
function Bs(e, t, n) {
  const o = Tt("localeData", {});
  return [R(() => {
    const {
      antLocale: a
    } = o, r = M(t) || Ir[e || "global"], l = e && a ? a[e] : {};
    return I(I(I({}, typeof r == "function" ? r() : r), l || {}), M(n) || {});
  })];
}
function fv(e) {
  for (var t = 0, n, o = 0, i = e.length; i >= 4; ++o, i -= 4)
    n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, t = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  switch (i) {
    case 3:
      t ^= (e.charCodeAt(o + 2) & 255) << 16;
    case 2:
      t ^= (e.charCodeAt(o + 1) & 255) << 8;
    case 1:
      t ^= e.charCodeAt(o) & 255, t = /* Math.imul(h, m): */
      (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  }
  return t ^= t >>> 13, t = /* Math.imul(h, m): */
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
}
const Jb = "%";
class Dk {
  constructor(t) {
    this.cache = /* @__PURE__ */ new Map(), this.instanceId = t;
  }
  get(t) {
    return this.cache.get(Array.isArray(t) ? t.join(Jb) : t) || null;
  }
  update(t, n) {
    const o = Array.isArray(t) ? t.join(Jb) : t, i = this.cache.get(o), a = n(i);
    a === null ? this.cache.delete(o) : this.cache.set(o, a);
  }
}
const gS = "data-token-hash", ul = "data-css-hash", zk = "data-cache-path", ns = "__cssinjs_instance__";
function Nu() {
  const e = Math.random().toString(12).slice(2);
  if (typeof document < "u" && document.head && document.body) {
    const t = document.body.querySelectorAll(`style[${ul}]`) || [], {
      firstChild: n
    } = document.head;
    Array.from(t).forEach((i) => {
      i[ns] = i[ns] || e, i[ns] === e && document.head.insertBefore(i, n);
    });
    const o = {};
    Array.from(document.querySelectorAll(`style[${ul}]`)).forEach((i) => {
      var a;
      const r = i.getAttribute(ul);
      o[r] ? i[ns] === e && ((a = i.parentNode) === null || a === void 0 || a.removeChild(i)) : o[r] = !0;
    });
  }
  return new Dk(e);
}
const hS = Symbol("StyleContextKey"), Rk = () => {
  var e, t, n;
  const o = ui();
  let i;
  if (o && o.appContext) {
    const a = (n = (t = (e = o.appContext) === null || e === void 0 ? void 0 : e.config) === null || t === void 0 ? void 0 : t.globalProperties) === null || n === void 0 ? void 0 : n.__ANTDV_CSSINJS_CACHE__;
    a ? i = a : (i = Nu(), o.appContext.config.globalProperties && (o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  } else
    i = Nu();
  return i;
}, vS = {
  cache: Nu(),
  defaultCache: !0,
  hashPriority: "low"
}, uf = () => {
  const e = Rk();
  return Tt(hS, Pe(I(I({}, vS), {
    cache: e
  })));
}, Nk = (e) => {
  const t = uf(), n = Pe(I(I({}, vS), {
    cache: Nu()
  }));
  return Ie([() => M(e), t], () => {
    const o = I({}, t.value), i = M(e);
    Object.keys(i).forEach((r) => {
      const l = i[r];
      i[r] !== void 0 && (o[r] = l);
    });
    const {
      cache: a
    } = i;
    o.cache = o.cache || Nu(), o.defaultCache = !a && t.value.defaultCache, n.value = o;
  }, {
    immediate: !0
  }), kt(hS, n), n;
}, Bk = () => ({
  autoClear: st(),
  /** @private Test only. Not work in production. */
  mock: dn(),
  /**
   * Only set when you need ssr to extract style on you own.
   * If not provided, it will auto create <style /> on the end of Provider in server side.
   */
  cache: Ct(),
  /** Tell children that this context is default generated context */
  defaultCache: st(),
  /** Use `:where` selector to reduce hashId css selector priority */
  hashPriority: dn(),
  /** Tell cssinjs where to inject style in */
  container: tn(),
  /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
  ssrInline: st(),
  /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  transformers: Po(),
  /**
   * Linters to lint css before inject in document.
   * Styles will be linted after transforming.
   * Please note that `linters` do not support dynamic update.
   */
  linters: Po()
});
Ji(ye({
  name: "AStyleProvider",
  inheritAttrs: !1,
  props: Bk(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Nk(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}));
function Fk() {
  return !1;
}
let Ag = !1;
function Lk() {
  return Ag;
}
const Hk = process.env.NODE_ENV === "production" ? Fk : Lk;
if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  const e = window;
  if (typeof e.webpackHotUpdate == "function") {
    const t = e.webpackHotUpdate;
    e.webpackHotUpdate = function() {
      return Ag = !0, setTimeout(() => {
        Ag = !1;
      }, 0), t(...arguments);
    };
  }
}
function mS(e, t, n, o) {
  const i = uf(), a = Pe(""), r = Pe();
  Ft(() => {
    a.value = [e, ...t.value].join("%");
  });
  const l = Hk(), s = (u) => {
    i.value.cache.update(u, (c) => {
      const [d = 0, f] = c || [];
      return d - 1 === 0 ? (o?.(f, !1), null) : [d - 1, f];
    });
  };
  return Ie(a, (u, c) => {
    c && s(c), i.value.cache.update(u, (d) => {
      const [f = 0, g] = d || [];
      let m = g;
      process.env.NODE_ENV !== "production" && g && l && (o?.(m, l), m = null);
      const b = m || n();
      return [f + 1, b];
    }), r.value = i.value.cache.get(a.value)[1];
  }, {
    immediate: !0
  }), At(() => {
    s(a.value);
  }), r;
}
function Ti() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function hr(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
const e0 = "data-vc-order", Vk = "vc-util-key", Dg = /* @__PURE__ */ new Map();
function bS() {
  let {
    mark: e
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return e ? e.startsWith("data-") ? e : `data-${e}` : Vk;
}
function cf(e) {
  return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
}
function jk(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function yS(e) {
  return Array.from((Dg.get(e) || e).children).filter((t) => t.tagName === "STYLE");
}
function xS(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!Ti())
    return null;
  const {
    csp: n,
    prepend: o
  } = t, i = document.createElement("style");
  i.setAttribute(e0, jk(o)), n?.nonce && (i.nonce = n?.nonce), i.innerHTML = e;
  const a = cf(t), {
    firstChild: r
  } = a;
  if (o) {
    if (o === "queue") {
      const l = yS(a).filter((s) => ["prepend", "prependQueue"].includes(s.getAttribute(e0)));
      if (l.length)
        return a.insertBefore(i, l[l.length - 1].nextSibling), i;
    }
    a.insertBefore(i, r);
  } else
    a.appendChild(i);
  return i;
}
function wS(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = cf(t);
  return yS(n).find((o) => o.getAttribute(bS(t)) === e);
}
function Td(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = wS(e, t);
  n && cf(t).removeChild(n);
}
function Wk(e, t) {
  const n = Dg.get(e);
  if (!n || !hr(document, n)) {
    const o = xS("", t), {
      parentNode: i
    } = o;
    Dg.set(e, i), e.removeChild(o);
  }
}
function Bu(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  var o, i, a;
  const r = cf(n);
  Wk(r, n);
  const l = wS(t, n);
  if (l)
    return !((o = n.csp) === null || o === void 0) && o.nonce && l.nonce !== ((i = n.csp) === null || i === void 0 ? void 0 : i.nonce) && (l.nonce = (a = n.csp) === null || a === void 0 ? void 0 : a.nonce), l.innerHTML !== e && (l.innerHTML = e), l;
  const s = xS(e, n);
  return s.setAttribute(bS(n), t), s;
}
function qk(e, t) {
  if (e.length !== t.length)
    return !1;
  for (let n = 0; n < e.length; n++)
    if (e[n] !== t[n])
      return !1;
  return !0;
}
class $s {
  constructor() {
    this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  }
  size() {
    return this.keys.length;
  }
  internalGet(t) {
    let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o = {
      map: this.cache
    };
    return t.forEach((i) => {
      var a;
      o ? o = (a = o?.map) === null || a === void 0 ? void 0 : a.get(i) : o = void 0;
    }), o?.value && n && (o.value[1] = this.cacheCallTimes++), o?.value;
  }
  get(t) {
    var n;
    return (n = this.internalGet(t, !0)) === null || n === void 0 ? void 0 : n[0];
  }
  has(t) {
    return !!this.internalGet(t);
  }
  set(t, n) {
    if (!this.has(t)) {
      if (this.size() + 1 > $s.MAX_CACHE_SIZE + $s.MAX_CACHE_OFFSET) {
        const [i] = this.keys.reduce((a, r) => {
          const [, l] = a;
          return this.internalGet(r)[1] < l ? [r, this.internalGet(r)[1]] : a;
        }, [this.keys[0], this.cacheCallTimes]);
        this.delete(i);
      }
      this.keys.push(t);
    }
    let o = this.cache;
    t.forEach((i, a) => {
      if (a === t.length - 1)
        o.set(i, {
          value: [n, this.cacheCallTimes++]
        });
      else {
        const r = o.get(i);
        r ? r.map || (r.map = /* @__PURE__ */ new Map()) : o.set(i, {
          map: /* @__PURE__ */ new Map()
        }), o = o.get(i).map;
      }
    });
  }
  deleteByPath(t, n) {
    var o;
    const i = t.get(n[0]);
    if (n.length === 1)
      return i.map ? t.set(n[0], {
        map: i.map
      }) : t.delete(n[0]), (o = i.value) === null || o === void 0 ? void 0 : o[0];
    const a = this.deleteByPath(i.map, n.slice(1));
    return (!i.map || i.map.size === 0) && !i.value && t.delete(n[0]), a;
  }
  delete(t) {
    if (this.has(t))
      return this.keys = this.keys.filter((n) => !qk(n, t)), this.deleteByPath(this.cache, t);
  }
}
$s.MAX_CACHE_SIZE = 20;
$s.MAX_CACHE_OFFSET = 5;
let zg = {};
function yo(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${t}`);
}
function Gk(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.warn(`Note: ${t}`);
}
function Kk() {
  zg = {};
}
function SS(e, t, n) {
  !t && !zg[n] && (e(!1, n), zg[n] = !0);
}
function Jo(e, t) {
  SS(yo, e, t);
}
function Rg(e, t) {
  SS(Gk, e, t);
}
function Yk() {
}
let Qn = Yk;
process.env.NODE_ENV !== "production" && (Qn = (e, t, n) => {
  Jo(e, `[ant-design-vue: ${t}] ${n}`), process.env.NODE_ENV === "test" && Kk();
});
let t0 = 0;
class CS {
  constructor(t) {
    this.derivatives = Array.isArray(t) ? t : [t], this.id = t0, t.length === 0 && Qn(t.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), t0 += 1;
  }
  getDerivativeToken(t) {
    return this.derivatives.reduce((n, o) => o(t, n), void 0);
  }
}
const up = new $s();
function $S(e) {
  const t = Array.isArray(e) ? e : [e];
  return up.has(t) || up.set(t, new CS(t)), up.get(t);
}
const n0 = /* @__PURE__ */ new WeakMap();
function kd(e) {
  let t = n0.get(e) || "";
  return t || (Object.keys(e).forEach((n) => {
    const o = e[n];
    t += n, o instanceof CS ? t += o.id : o && typeof o == "object" ? t += kd(o) : t += o;
  }), n0.set(e, t)), t;
}
function Uk(e, t) {
  return fv(`${t}_${kd(e)}`);
}
const Cu = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), PS = "_bAmBoO_";
function Xk(e, t, n) {
  var o, i;
  if (Ti()) {
    Bu(e, Cu);
    const a = document.createElement("div");
    a.style.position = "fixed", a.style.left = "0", a.style.top = "0", t?.(a), document.body.appendChild(a), process.env.NODE_ENV !== "production" && (a.innerHTML = "Test", a.style.zIndex = "9999999");
    const r = n ? n(a) : (o = getComputedStyle(a).content) === null || o === void 0 ? void 0 : o.includes(PS);
    return (i = a.parentNode) === null || i === void 0 || i.removeChild(a), Td(Cu), r;
  }
  return !1;
}
let cp;
function Qk() {
  return cp === void 0 && (cp = Xk(`@layer ${Cu} { .${Cu} { content: "${PS}"!important; } }`, (e) => {
    e.className = Cu;
  })), cp;
}
const o0 = {}, Zk = process.env.NODE_ENV === "production", Jk = process.env.NODE_ENV === "prerender", eE = !Zk && !Jk ? "css-dev-only-do-not-override" : "css", nl = /* @__PURE__ */ new Map();
function tE(e) {
  nl.set(e, (nl.get(e) || 0) + 1);
}
function nE(e, t) {
  typeof document < "u" && document.querySelectorAll(`style[${gS}="${e}"]`).forEach((o) => {
    var i;
    o[ns] === t && ((i = o.parentNode) === null || i === void 0 || i.removeChild(o));
  });
}
const oE = 0;
function iE(e, t) {
  nl.set(e, (nl.get(e) || 0) - 1);
  const n = Array.from(nl.keys()), o = n.filter((i) => (nl.get(i) || 0) <= 0);
  n.length - o.length > oE && o.forEach((i) => {
    nE(i, t), nl.delete(i);
  });
}
const aE = (e, t, n, o) => {
  const i = n.getDerivativeToken(e);
  let a = I(I({}, i), t);
  return o && (a = o(a)), a;
};
function rE(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : le({});
  const o = uf(), i = R(() => I({}, ...t.value)), a = R(() => kd(i.value)), r = R(() => kd(n.value.override || o0));
  return mS("token", R(() => [n.value.salt || "", e.value.id, a.value, r.value]), () => {
    const {
      salt: s = "",
      override: u = o0,
      formatToken: c,
      getComputedToken: d
    } = n.value, f = d ? d(i.value, u, e.value) : aE(i.value, u, e.value, c), g = Uk(f, s);
    f._tokenKey = g, tE(g);
    const m = `${eE}-${fv(g)}`;
    return f._hashId = m, [f, m];
  }, (s) => {
    var u;
    iE(s[0]._tokenKey, (u = o.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  });
}
var lE = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
}, OS = "comm", IS = "rule", MS = "decl", sE = "@import", uE = "@namespace", cE = "@keyframes", dE = "@layer", fE = Math.abs, $u = String.fromCharCode;
function TS(e) {
  return e.trim();
}
function Ng(e, t, n) {
  return e.replace(t, n);
}
function rs(e, t) {
  return e.charCodeAt(t) | 0;
}
function Ps(e, t, n) {
  return e.slice(t, n);
}
function pa(e) {
  return e.length;
}
function pE(e) {
  return e.length;
}
function $c(e, t) {
  return t.push(e), e;
}
var df = 1, Os = 1, kS = 0, ki = 0, eo = 0, Fs = "";
function pv(e, t, n, o, i, a, r, l) {
  return { value: e, root: t, parent: n, type: o, props: i, children: a, line: df, column: Os, length: r, return: "", siblings: l };
}
function gE() {
  return eo;
}
function hE() {
  return eo = ki > 0 ? rs(Fs, --ki) : 0, Os--, eo === 10 && (Os = 1, df--), eo;
}
function Gi() {
  return eo = ki < kS ? rs(Fs, ki++) : 0, Os++, eo === 10 && (Os = 1, df++), eo;
}
function br() {
  return rs(Fs, ki);
}
function od() {
  return ki;
}
function ff(e, t) {
  return Ps(Fs, e, t);
}
function Fu(e) {
  switch (e) {
    // \0 \t \n \r \s whitespace token
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    // ! + , / > @ ~ isolate token
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    // ; { } breakpoint token
    case 59:
    case 123:
    case 125:
      return 4;
    // : accompanied token
    case 58:
      return 3;
    // " ' ( [ opening delimit token
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    // ) ] closing delimit token
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function vE(e) {
  return df = Os = 1, kS = pa(Fs = e), ki = 0, [];
}
function mE(e) {
  return Fs = "", e;
}
function dp(e) {
  return TS(ff(ki - 1, Bg(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function bE(e) {
  for (; (eo = br()) && eo < 33; )
    Gi();
  return Fu(e) > 2 || Fu(eo) > 3 ? "" : " ";
}
function yE(e, t) {
  for (; --t && Gi() && !(eo < 48 || eo > 102 || eo > 57 && eo < 65 || eo > 70 && eo < 97); )
    ;
  return ff(e, od() + (t < 6 && br() == 32 && Gi() == 32));
}
function Bg(e) {
  for (; Gi(); )
    switch (eo) {
      // ] ) " '
      case e:
        return ki;
      // " '
      case 34:
      case 39:
        e !== 34 && e !== 39 && Bg(eo);
        break;
      // (
      case 40:
        e === 41 && Bg(e);
        break;
      // \
      case 92:
        Gi();
        break;
    }
  return ki;
}
function xE(e, t) {
  for (; Gi() && e + eo !== 57; )
    if (e + eo === 84 && br() === 47)
      break;
  return "/*" + ff(t, ki - 1) + "*" + $u(e === 47 ? e : Gi());
}
function wE(e) {
  for (; !Fu(br()); )
    Gi();
  return ff(e, ki);
}
function SE(e) {
  return mE(id("", null, null, null, [""], e = vE(e), 0, [0], e));
}
function id(e, t, n, o, i, a, r, l, s) {
  for (var u = 0, c = 0, d = r, f = 0, g = 0, m = 0, b = 1, y = 1, S = 1, C = 0, O = 0, $ = "", P = i, k = a, x = o, E = $; y; )
    switch (m = O, O = Gi()) {
      // (
      case 40:
        m != 108 && rs(E, d - 1) == 58 ? (C++, E += "(") : E += dp(O);
        break;
      // )
      case 41:
        C--, E += ")";
        break;
      // " ' [
      case 34:
      case 39:
      case 91:
        E += dp(O);
        break;
      // \t \n \r \s
      case 9:
      case 10:
      case 13:
      case 32:
        if (C > 0) {
          E += $u(O);
          break;
        }
        E += bE(m);
        break;
      // \
      case 92:
        E += yE(od() - 1, 7);
        continue;
      // /
      case 47:
        switch (br()) {
          case 42:
          case 47:
            $c(CE(xE(Gi(), od()), t, n, s), s), (Fu(m || 1) == 5 || Fu(br() || 1) == 5) && pa(E) && Ps(E, -1, void 0) !== " " && (E += " ");
            break;
          default:
            E += "/";
        }
        break;
      // {
      case 123 * b:
        l[u++] = pa(E) * S;
      // } ; \0
      case 125 * b:
      case 59:
      case 0:
        if (C > 0 && O) {
          E += $u(O);
          break;
        }
        switch (O) {
          // \0 }
          case 0:
          case 125:
            y = 0;
          // ;
          case 59 + c:
            S == -1 && (E = Ng(E, /\f/g, "")), g > 0 && (pa(E) - d || b === 0) && $c(g > 32 ? a0(E + ";", o, n, d - 1, s) : a0(Ng(E, " ", "") + ";", o, n, d - 2, s), s);
            break;
          // @ ;
          case 59:
            E += ";";
          // { rule/at-rule
          default:
            if ($c(x = i0(E, t, n, u, c, i, l, $, P = [], k = [], d, a), a), O === 123)
              if (c === 0)
                id(E, t, x, x, P, a, d, l, k);
              else {
                switch (f) {
                  // c(ontainer)
                  case 99:
                    if (rs(E, 3) === 110) break;
                  // l(ayer)
                  case 108:
                    if (rs(E, 2) === 97) break;
                  default:
                    c = 0;
                  // d(ocument) m(edia) s(upports)
                  case 100:
                  case 109:
                  case 115:
                }
                c ? id(e, x, x, o && $c(i0(e, x, x, 0, 0, i, l, $, i, P = [], d, k), k), i, k, d, l, o ? P : k) : id(E, x, x, x, [""], k, 0, l, k);
              }
        }
        u = c = g = 0, b = S = 1, $ = E = "", d = r;
        break;
      // :
      case 58:
        d = 1 + pa(E), g = m;
      default:
        if (b < 1) {
          if (O == 123)
            --b;
          else if (O == 125 && b++ == 0 && hE() == 125)
            continue;
        }
        switch (E += $u(O), O * b) {
          // &
          case 38:
            S = c > 0 ? 1 : (E += "\f", -1);
            break;
          // ,
          case 44:
            if (C > 0) break;
            l[u++] = (pa(E) - 1) * S, S = 1;
            break;
          // @
          case 64:
            br() === 45 && (E += dp(Gi())), f = br(), c = d = pa($ = E += wE(od())), O++;
            break;
          // -
          case 45:
            m === 45 && pa(E) == 2 && (b = 0);
        }
    }
  return a;
}
function i0(e, t, n, o, i, a, r, l, s, u, c, d) {
  for (var f = i - 1, g = i === 0 ? a : [""], m = pE(g), b = 0, y = 0, S = 0; b < o; ++b)
    for (var C = 0, O = Ps(e, f + 1, f = fE(y = r[b])), $ = e; C < m; ++C)
      ($ = TS(y > 0 ? g[C] + " " + O : Ng(O, /&\f/g, g[C]))) && (s[S++] = $);
  return pv(e, t, n, i === 0 ? IS : l, s, u, c, d);
}
function CE(e, t, n, o) {
  return pv(e, t, n, OS, $u(gE()), Ps(e, 2, -2), 0, o);
}
function a0(e, t, n, o, i) {
  return pv(e, t, n, MS, Ps(e, 0, o), Ps(e, o + 1, -1), o, i);
}
function Fg(e, t) {
  for (var n = "", o = 0; o < e.length; o++)
    n += t(e[o], o, e, t) || "";
  return n;
}
function $E(e, t, n, o) {
  switch (e.type) {
    case dE:
      if (e.children.length) break;
    case sE:
    case uE:
    case MS:
      return e.return = e.return || e.value;
    case OS:
      return "";
    case cE:
      return e.return = e.value + "{" + Fg(e.children, o) + "}";
    case IS:
      if (!pa(e.value = e.props.join(","))) return "";
  }
  return pa(n = Fg(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
}
function ES(e, t) {
  const {
    path: n,
    parentSelectors: o
  } = t;
  Jo(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${e}${o.length ? ` Selector info: ${o.join(" -> ")}` : ""}`);
}
const PE = (e, t, n) => {
  if (e === "content") {
    const o = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
    (typeof t != "string" || ["normal", "none", "initial", "inherit", "unset"].indexOf(t) === -1 && !o.test(t) && (t.charAt(0) !== t.charAt(t.length - 1) || t.charAt(0) !== '"' && t.charAt(0) !== "'")) && ES(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`, n);
  }
}, OE = (e, t, n) => {
  e === "animation" && n.hashId && t !== "none" && ES(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`, n);
}, r0 = "data-ant-cssinjs-cache-path", IE = "_FILE_STYLE__";
let cl, _S = !0;
function ME() {
  var e;
  if (!cl && (cl = {}, Ti())) {
    const t = document.createElement("div");
    t.className = r0, t.style.position = "fixed", t.style.visibility = "hidden", t.style.top = "-9999px", document.body.appendChild(t);
    let n = getComputedStyle(t).content || "";
    n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
      const [a, r] = i.split(":");
      cl[a] = r;
    });
    const o = document.querySelector(`style[${r0}]`);
    o && (_S = !1, (e = o.parentNode) === null || e === void 0 || e.removeChild(o)), document.body.removeChild(t);
  }
}
function TE(e) {
  return ME(), !!cl[e];
}
function kE(e) {
  const t = cl[e];
  let n = null;
  if (t && Ti())
    if (_S)
      n = IE;
    else {
      const o = document.querySelector(`style[${ul}="${cl[e]}"]`);
      o ? n = o.innerHTML : delete cl[e];
    }
  return [n, t];
}
const l0 = Ti(), AS = "_skip_check_", DS = "_multi_value_";
function s0(e) {
  return Fg(SE(e), $E).replace(/\{%%%\:[^;];}/g, ";");
}
function EE(e) {
  return typeof e == "object" && e && (AS in e || DS in e);
}
function _E(e, t, n) {
  if (!t)
    return e;
  const o = `.${t}`, i = n === "low" ? `:where(${o})` : o;
  return e.split(",").map((r) => {
    var l;
    const s = r.trim().split(/\s+/);
    let u = s[0] || "";
    const c = ((l = u.match(/^\w+/)) === null || l === void 0 ? void 0 : l[0]) || "";
    return u = `${c}${i}${u.slice(c.length)}`, [u, ...s.slice(1)].join(" ");
  }).join(",");
}
const Lg = /* @__PURE__ */ new Set();
process.env.NODE_ENV;
const Hg = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
    root: n,
    injectHash: o,
    parentSelectors: i
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
    root: !0,
    parentSelectors: []
  };
  const {
    hashId: a,
    layer: r,
    path: l,
    hashPriority: s,
    transformers: u = [],
    linters: c = []
  } = t;
  let d = "", f = {};
  function g(y) {
    const S = y.getName(a);
    if (!f[S]) {
      const [C] = Hg(y.style, t, {
        root: !1,
        parentSelectors: i
      });
      f[S] = `@keyframes ${y.getName(a)}${C}`;
    }
  }
  function m(y) {
    let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    return y.forEach((C) => {
      Array.isArray(C) ? m(C, S) : C && S.push(C);
    }), S;
  }
  if (m(Array.isArray(e) ? e : [e]).forEach((y) => {
    const S = typeof y == "string" && !n ? {} : y;
    if (typeof S == "string")
      d += `${S}
`;
    else if (S._keyframe)
      g(S);
    else {
      const C = u.reduce((O, $) => {
        var P;
        return ((P = $?.visit) === null || P === void 0 ? void 0 : P.call($, O)) || O;
      }, S);
      Object.keys(C).forEach((O) => {
        var $;
        const P = C[O];
        if (typeof P == "object" && P && (O !== "animationName" || !P._keyframe) && !EE(P)) {
          let k = !1, x = O.trim(), E = !1;
          (n || o) && a ? x.startsWith("@") ? k = !0 : x = _E(O, a, s) : n && !a && (x === "&" || x === "") && (x = "", E = !0);
          const [z, B] = Hg(P, t, {
            root: E,
            injectHash: k,
            parentSelectors: [...i, x]
          });
          f = I(I({}, f), B), d += `${x}${z}`;
        } else {
          let k = function(E, z) {
            process.env.NODE_ENV !== "production" && (typeof P != "object" || !P?.[AS]) && [PE, OE, ...c].forEach((W) => W(E, z, {
              path: l,
              hashId: a,
              parentSelectors: i
            }));
            const B = E.replace(/[A-Z]/g, (W) => `-${W.toLowerCase()}`);
            let D = z;
            !lE[E] && typeof D == "number" && D !== 0 && (D = `${D}px`), E === "animationName" && z?._keyframe && (g(z), D = z.getName(a)), d += `${B}:${D};`;
          };
          const x = ($ = P?.value) !== null && $ !== void 0 ? $ : P;
          typeof P == "object" && P?.[DS] && Array.isArray(x) ? x.forEach((E) => {
            k(O, E);
          }) : k(O, x);
        }
      });
    }
  }), !n)
    d = `{${d}}`;
  else if (r && Qk()) {
    const y = r.split(",");
    d = `@layer ${y[y.length - 1].trim()} {${d}}`, y.length > 1 && (d = `@layer ${r}{%%%:%}${d}`);
  }
  return [d, f];
};
function AE(e, t) {
  return fv(`${e.join("%")}${t}`);
}
function Vg(e, t) {
  const n = uf(), o = R(() => e.value.token._tokenKey), i = R(() => [o.value, ...e.value.path]);
  let a = l0;
  return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (a = n.value.mock === "client"), mS(
    "style",
    i,
    // Create cache if needed
    () => {
      const {
        path: r,
        hashId: l,
        layer: s,
        nonce: u,
        clientOnly: c,
        order: d = 0
      } = e.value, f = i.value.join("|");
      if (TE(f)) {
        const [x, E] = kE(f);
        if (x)
          return [x, o.value, E, {}, c, d];
      }
      const g = t(), {
        hashPriority: m,
        container: b,
        transformers: y,
        linters: S,
        cache: C
      } = n.value, [O, $] = Hg(g, {
        hashId: l,
        hashPriority: m,
        layer: s,
        path: r.join("-"),
        transformers: y,
        linters: S
      }), P = s0(O), k = AE(i.value, P);
      if (a) {
        const x = {
          mark: ul,
          prepend: "queue",
          attachTo: b,
          priority: d
        }, E = typeof u == "function" ? u() : u;
        E && (x.csp = {
          nonce: E
        });
        const z = Bu(P, k, x);
        z[ns] = C.instanceId, z.setAttribute(gS, o.value), process.env.NODE_ENV !== "production" && z.setAttribute(zk, i.value.join("|")), Object.keys($).forEach((B) => {
          Lg.has(B) || (Lg.add(B), Bu(s0($[B]), `_effect-${B}`, {
            mark: ul,
            prepend: "queue",
            attachTo: b
          }));
        });
      }
      return [P, o.value, k, $, c, d];
    },
    // Remove cache if no need
    (r, l) => {
      let [, , s] = r;
      (l || n.value.autoClear) && l0 && Td(s, {
        mark: ul
      });
    }
  ), (r) => r;
}
class Bt {
  constructor(t, n) {
    this._keyframe = !0, this.name = t, this.style = n;
  }
  getName() {
    let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return t ? `${t}-${this.name}` : this.name;
  }
}
const DE = "4.2.6", Lu = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
function So(e, t) {
  zE(e) && (e = "100%");
  var n = RE(e);
  return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
}
function Pc(e) {
  return Math.min(1, Math.max(0, e));
}
function zE(e) {
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function RE(e) {
  return typeof e == "string" && e.indexOf("%") !== -1;
}
function zS(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function Oc(e) {
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function al(e) {
  return e.length === 1 ? "0" + e : String(e);
}
function NE(e, t, n) {
  return {
    r: So(e, 255) * 255,
    g: So(t, 255) * 255,
    b: So(n, 255) * 255
  };
}
function u0(e, t, n) {
  e = So(e, 255), t = So(t, 255), n = So(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, r = 0, l = (o + i) / 2;
  if (o === i)
    r = 0, a = 0;
  else {
    var s = o - i;
    switch (r = l > 0.5 ? s / (2 - o - i) : s / (o + i), o) {
      case e:
        a = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        a = (n - e) / s + 2;
        break;
      case n:
        a = (e - t) / s + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s: r, l };
}
function fp(e, t, n) {
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
function BE(e, t, n) {
  var o, i, a;
  if (e = So(e, 360), t = So(t, 100), n = So(n, 100), t === 0)
    i = n, a = n, o = n;
  else {
    var r = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - r;
    o = fp(l, r, e + 1 / 3), i = fp(l, r, e), a = fp(l, r, e - 1 / 3);
  }
  return { r: o * 255, g: i * 255, b: a * 255 };
}
function jg(e, t, n) {
  e = So(e, 255), t = So(t, 255), n = So(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, r = o, l = o - i, s = o === 0 ? 0 : l / o;
  if (o === i)
    a = 0;
  else {
    switch (o) {
      case e:
        a = (t - n) / l + (t < n ? 6 : 0);
        break;
      case t:
        a = (n - e) / l + 2;
        break;
      case n:
        a = (e - t) / l + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s, v: r };
}
function FE(e, t, n) {
  e = So(e, 360) * 6, t = So(t, 100), n = So(n, 100);
  var o = Math.floor(e), i = e - o, a = n * (1 - t), r = n * (1 - i * t), l = n * (1 - (1 - i) * t), s = o % 6, u = [n, r, a, a, l, n][s], c = [l, n, n, r, a, a][s], d = [a, a, l, n, n, r][s];
  return { r: u * 255, g: c * 255, b: d * 255 };
}
function Wg(e, t, n, o) {
  var i = [
    al(Math.round(e).toString(16)),
    al(Math.round(t).toString(16)),
    al(Math.round(n).toString(16))
  ];
  return o && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function LE(e, t, n, o, i) {
  var a = [
    al(Math.round(e).toString(16)),
    al(Math.round(t).toString(16)),
    al(Math.round(n).toString(16)),
    al(HE(o))
  ];
  return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function HE(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function c0(e) {
  return Qo(e) / 255;
}
function Qo(e) {
  return parseInt(e, 16);
}
function VE(e) {
  return {
    r: e >> 16,
    g: (e & 65280) >> 8,
    b: e & 255
  };
}
var qg = {
  aliceblue: "#f0f8ff",
  antiquewhite: "#faebd7",
  aqua: "#00ffff",
  aquamarine: "#7fffd4",
  azure: "#f0ffff",
  beige: "#f5f5dc",
  bisque: "#ffe4c4",
  black: "#000000",
  blanchedalmond: "#ffebcd",
  blue: "#0000ff",
  blueviolet: "#8a2be2",
  brown: "#a52a2a",
  burlywood: "#deb887",
  cadetblue: "#5f9ea0",
  chartreuse: "#7fff00",
  chocolate: "#d2691e",
  coral: "#ff7f50",
  cornflowerblue: "#6495ed",
  cornsilk: "#fff8dc",
  crimson: "#dc143c",
  cyan: "#00ffff",
  darkblue: "#00008b",
  darkcyan: "#008b8b",
  darkgoldenrod: "#b8860b",
  darkgray: "#a9a9a9",
  darkgreen: "#006400",
  darkgrey: "#a9a9a9",
  darkkhaki: "#bdb76b",
  darkmagenta: "#8b008b",
  darkolivegreen: "#556b2f",
  darkorange: "#ff8c00",
  darkorchid: "#9932cc",
  darkred: "#8b0000",
  darksalmon: "#e9967a",
  darkseagreen: "#8fbc8f",
  darkslateblue: "#483d8b",
  darkslategray: "#2f4f4f",
  darkslategrey: "#2f4f4f",
  darkturquoise: "#00ced1",
  darkviolet: "#9400d3",
  deeppink: "#ff1493",
  deepskyblue: "#00bfff",
  dimgray: "#696969",
  dimgrey: "#696969",
  dodgerblue: "#1e90ff",
  firebrick: "#b22222",
  floralwhite: "#fffaf0",
  forestgreen: "#228b22",
  fuchsia: "#ff00ff",
  gainsboro: "#dcdcdc",
  ghostwhite: "#f8f8ff",
  goldenrod: "#daa520",
  gold: "#ffd700",
  gray: "#808080",
  green: "#008000",
  greenyellow: "#adff2f",
  grey: "#808080",
  honeydew: "#f0fff0",
  hotpink: "#ff69b4",
  indianred: "#cd5c5c",
  indigo: "#4b0082",
  ivory: "#fffff0",
  khaki: "#f0e68c",
  lavenderblush: "#fff0f5",
  lavender: "#e6e6fa",
  lawngreen: "#7cfc00",
  lemonchiffon: "#fffacd",
  lightblue: "#add8e6",
  lightcoral: "#f08080",
  lightcyan: "#e0ffff",
  lightgoldenrodyellow: "#fafad2",
  lightgray: "#d3d3d3",
  lightgreen: "#90ee90",
  lightgrey: "#d3d3d3",
  lightpink: "#ffb6c1",
  lightsalmon: "#ffa07a",
  lightseagreen: "#20b2aa",
  lightskyblue: "#87cefa",
  lightslategray: "#778899",
  lightslategrey: "#778899",
  lightsteelblue: "#b0c4de",
  lightyellow: "#ffffe0",
  lime: "#00ff00",
  limegreen: "#32cd32",
  linen: "#faf0e6",
  magenta: "#ff00ff",
  maroon: "#800000",
  mediumaquamarine: "#66cdaa",
  mediumblue: "#0000cd",
  mediumorchid: "#ba55d3",
  mediumpurple: "#9370db",
  mediumseagreen: "#3cb371",
  mediumslateblue: "#7b68ee",
  mediumspringgreen: "#00fa9a",
  mediumturquoise: "#48d1cc",
  mediumvioletred: "#c71585",
  midnightblue: "#191970",
  mintcream: "#f5fffa",
  mistyrose: "#ffe4e1",
  moccasin: "#ffe4b5",
  navajowhite: "#ffdead",
  navy: "#000080",
  oldlace: "#fdf5e6",
  olive: "#808000",
  olivedrab: "#6b8e23",
  orange: "#ffa500",
  orangered: "#ff4500",
  orchid: "#da70d6",
  palegoldenrod: "#eee8aa",
  palegreen: "#98fb98",
  paleturquoise: "#afeeee",
  palevioletred: "#db7093",
  papayawhip: "#ffefd5",
  peachpuff: "#ffdab9",
  peru: "#cd853f",
  pink: "#ffc0cb",
  plum: "#dda0dd",
  powderblue: "#b0e0e6",
  purple: "#800080",
  rebeccapurple: "#663399",
  red: "#ff0000",
  rosybrown: "#bc8f8f",
  royalblue: "#4169e1",
  saddlebrown: "#8b4513",
  salmon: "#fa8072",
  sandybrown: "#f4a460",
  seagreen: "#2e8b57",
  seashell: "#fff5ee",
  sienna: "#a0522d",
  silver: "#c0c0c0",
  skyblue: "#87ceeb",
  slateblue: "#6a5acd",
  slategray: "#708090",
  slategrey: "#708090",
  snow: "#fffafa",
  springgreen: "#00ff7f",
  steelblue: "#4682b4",
  tan: "#d2b48c",
  teal: "#008080",
  thistle: "#d8bfd8",
  tomato: "#ff6347",
  turquoise: "#40e0d0",
  violet: "#ee82ee",
  wheat: "#f5deb3",
  white: "#ffffff",
  whitesmoke: "#f5f5f5",
  yellow: "#ffff00",
  yellowgreen: "#9acd32"
};
function Ql(e) {
  var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, i = null, a = null, r = !1, l = !1;
  return typeof e == "string" && (e = qE(e)), typeof e == "object" && (Aa(e.r) && Aa(e.g) && Aa(e.b) ? (t = NE(e.r, e.g, e.b), r = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Aa(e.h) && Aa(e.s) && Aa(e.v) ? (o = Oc(e.s), i = Oc(e.v), t = FE(e.h, o, i), r = !0, l = "hsv") : Aa(e.h) && Aa(e.s) && Aa(e.l) && (o = Oc(e.s), a = Oc(e.l), t = BE(e.h, o, a), r = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = zS(n), {
    ok: r,
    format: e.format || l,
    r: Math.min(255, Math.max(t.r, 0)),
    g: Math.min(255, Math.max(t.g, 0)),
    b: Math.min(255, Math.max(t.b, 0)),
    a: n
  };
}
var jE = "[-\\+]?\\d+%?", WE = "[-\\+]?\\d*\\.\\d+%?", yr = "(?:".concat(WE, ")|(?:").concat(jE, ")"), pp = "[\\s|\\(]+(".concat(yr, ")[,|\\s]+(").concat(yr, ")[,|\\s]+(").concat(yr, ")\\s*\\)?"), gp = "[\\s|\\(]+(".concat(yr, ")[,|\\s]+(").concat(yr, ")[,|\\s]+(").concat(yr, ")[,|\\s]+(").concat(yr, ")\\s*\\)?"), Fi = {
  CSS_UNIT: new RegExp(yr),
  rgb: new RegExp("rgb" + pp),
  rgba: new RegExp("rgba" + gp),
  hsl: new RegExp("hsl" + pp),
  hsla: new RegExp("hsla" + gp),
  hsv: new RegExp("hsv" + pp),
  hsva: new RegExp("hsva" + gp),
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function qE(e) {
  if (e = e.trim().toLowerCase(), e.length === 0)
    return !1;
  var t = !1;
  if (qg[e])
    e = qg[e], t = !0;
  else if (e === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = Fi.rgb.exec(e);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = Fi.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Fi.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Fi.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Fi.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Fi.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Fi.hex8.exec(e), n ? {
    r: Qo(n[1]),
    g: Qo(n[2]),
    b: Qo(n[3]),
    a: c0(n[4]),
    format: t ? "name" : "hex8"
  } : (n = Fi.hex6.exec(e), n ? {
    r: Qo(n[1]),
    g: Qo(n[2]),
    b: Qo(n[3]),
    format: t ? "name" : "hex"
  } : (n = Fi.hex4.exec(e), n ? {
    r: Qo(n[1] + n[1]),
    g: Qo(n[2] + n[2]),
    b: Qo(n[3] + n[3]),
    a: c0(n[4] + n[4]),
    format: t ? "name" : "hex8"
  } : (n = Fi.hex3.exec(e), n ? {
    r: Qo(n[1] + n[1]),
    g: Qo(n[2] + n[2]),
    b: Qo(n[3] + n[3]),
    format: t ? "name" : "hex"
  } : !1)))))))));
}
function Aa(e) {
  return !!Fi.CSS_UNIT.exec(String(e));
}
var In = (
  /** @class */
  (function() {
    function e(t, n) {
      t === void 0 && (t = ""), n === void 0 && (n = {});
      var o;
      if (t instanceof e)
        return t;
      typeof t == "number" && (t = VE(t)), this.originalInput = t;
      var i = Ql(t);
      this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
    }
    return e.prototype.isDark = function() {
      return this.getBrightness() < 128;
    }, e.prototype.isLight = function() {
      return !this.isDark();
    }, e.prototype.getBrightness = function() {
      var t = this.toRgb();
      return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
    }, e.prototype.getLuminance = function() {
      var t = this.toRgb(), n, o, i, a = t.r / 255, r = t.g / 255, l = t.b / 255;
      return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), l <= 0.03928 ? i = l / 12.92 : i = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * i;
    }, e.prototype.getAlpha = function() {
      return this.a;
    }, e.prototype.setAlpha = function(t) {
      return this.a = zS(t), this.roundA = Math.round(100 * this.a) / 100, this;
    }, e.prototype.isMonochrome = function() {
      var t = this.toHsl().s;
      return t === 0;
    }, e.prototype.toHsv = function() {
      var t = jg(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
    }, e.prototype.toHsvString = function() {
      var t = jg(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.v * 100);
      return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHsl = function() {
      var t = u0(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
    }, e.prototype.toHslString = function() {
      var t = u0(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.l * 100);
      return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHex = function(t) {
      return t === void 0 && (t = !1), Wg(this.r, this.g, this.b, t);
    }, e.prototype.toHexString = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex(t);
    }, e.prototype.toHex8 = function(t) {
      return t === void 0 && (t = !1), LE(this.r, this.g, this.b, this.a, t);
    }, e.prototype.toHex8String = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex8(t);
    }, e.prototype.toHexShortString = function(t) {
      return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
    }, e.prototype.toRgb = function() {
      return {
        r: Math.round(this.r),
        g: Math.round(this.g),
        b: Math.round(this.b),
        a: this.a
      };
    }, e.prototype.toRgbString = function() {
      var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b);
      return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")");
    }, e.prototype.toPercentageRgb = function() {
      var t = function(n) {
        return "".concat(Math.round(So(n, 255) * 100), "%");
      };
      return {
        r: t(this.r),
        g: t(this.g),
        b: t(this.b),
        a: this.a
      };
    }, e.prototype.toPercentageRgbString = function() {
      var t = function(n) {
        return Math.round(So(n, 255) * 100);
      };
      return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
    }, e.prototype.toName = function() {
      if (this.a === 0)
        return "transparent";
      if (this.a < 1)
        return !1;
      for (var t = "#" + Wg(this.r, this.g, this.b, !1), n = 0, o = Object.entries(qg); n < o.length; n++) {
        var i = o[n], a = i[0], r = i[1];
        if (t === r)
          return a;
      }
      return !1;
    }, e.prototype.toString = function(t) {
      var n = !!t;
      t = t ?? this.format;
      var o = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (t.startsWith("hex") || t === "name");
      return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
    }, e.prototype.toNumber = function() {
      return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
    }, e.prototype.clone = function() {
      return new e(this.toString());
    }, e.prototype.lighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l += t / 100, n.l = Pc(n.l), new e(n);
    }, e.prototype.brighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toRgb();
      return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
    }, e.prototype.darken = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l -= t / 100, n.l = Pc(n.l), new e(n);
    }, e.prototype.tint = function(t) {
      return t === void 0 && (t = 10), this.mix("white", t);
    }, e.prototype.shade = function(t) {
      return t === void 0 && (t = 10), this.mix("black", t);
    }, e.prototype.desaturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s -= t / 100, n.s = Pc(n.s), new e(n);
    }, e.prototype.saturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s += t / 100, n.s = Pc(n.s), new e(n);
    }, e.prototype.greyscale = function() {
      return this.desaturate(100);
    }, e.prototype.spin = function(t) {
      var n = this.toHsl(), o = (n.h + t) % 360;
      return n.h = o < 0 ? 360 + o : o, new e(n);
    }, e.prototype.mix = function(t, n) {
      n === void 0 && (n = 50);
      var o = this.toRgb(), i = new e(t).toRgb(), a = n / 100, r = {
        r: (i.r - o.r) * a + o.r,
        g: (i.g - o.g) * a + o.g,
        b: (i.b - o.b) * a + o.b,
        a: (i.a - o.a) * a + o.a
      };
      return new e(r);
    }, e.prototype.analogous = function(t, n) {
      t === void 0 && (t = 6), n === void 0 && (n = 30);
      var o = this.toHsl(), i = 360 / n, a = [this];
      for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
        o.h = (o.h + i) % 360, a.push(new e(o));
      return a;
    }, e.prototype.complement = function() {
      var t = this.toHsl();
      return t.h = (t.h + 180) % 360, new e(t);
    }, e.prototype.monochromatic = function(t) {
      t === void 0 && (t = 6);
      for (var n = this.toHsv(), o = n.h, i = n.s, a = n.v, r = [], l = 1 / t; t--; )
        r.push(new e({ h: o, s: i, v: a })), a = (a + l) % 1;
      return r;
    }, e.prototype.splitcomplement = function() {
      var t = this.toHsl(), n = t.h;
      return [
        this,
        new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
        new e({ h: (n + 216) % 360, s: t.s, l: t.l })
      ];
    }, e.prototype.onBackground = function(t) {
      var n = this.toRgb(), o = new e(t).toRgb(), i = n.a + o.a * (1 - n.a);
      return new e({
        r: (n.r * n.a + o.r * o.a * (1 - n.a)) / i,
        g: (n.g * n.a + o.g * o.a * (1 - n.a)) / i,
        b: (n.b * n.a + o.b * o.a * (1 - n.a)) / i,
        a: i
      });
    }, e.prototype.triad = function() {
      return this.polyad(3);
    }, e.prototype.tetrad = function() {
      return this.polyad(4);
    }, e.prototype.polyad = function(t) {
      for (var n = this.toHsl(), o = n.h, i = [this], a = 360 / t, r = 1; r < t; r++)
        i.push(new e({ h: (o + r * a) % 360, s: n.s, l: n.l }));
      return i;
    }, e.prototype.equals = function(t) {
      return this.toRgbString() === new e(t).toRgbString();
    }, e;
  })()
), Ic = 2, d0 = 0.16, GE = 0.05, KE = 0.05, YE = 0.15, RS = 5, NS = 4, UE = [{
  index: 7,
  opacity: 0.15
}, {
  index: 6,
  opacity: 0.25
}, {
  index: 5,
  opacity: 0.3
}, {
  index: 5,
  opacity: 0.45
}, {
  index: 5,
  opacity: 0.65
}, {
  index: 5,
  opacity: 0.85
}, {
  index: 4,
  opacity: 0.9
}, {
  index: 3,
  opacity: 0.95
}, {
  index: 2,
  opacity: 0.97
}, {
  index: 1,
  opacity: 0.98
}];
function f0(e) {
  var t = e.r, n = e.g, o = e.b, i = jg(t, n, o);
  return {
    h: i.h * 360,
    s: i.s,
    v: i.v
  };
}
function Mc(e) {
  var t = e.r, n = e.g, o = e.b;
  return "#".concat(Wg(t, n, o, !1));
}
function XE(e, t, n) {
  var o = n / 100, i = {
    r: (t.r - e.r) * o + e.r,
    g: (t.g - e.g) * o + e.g,
    b: (t.b - e.b) * o + e.b
  };
  return i;
}
function p0(e, t, n) {
  var o;
  return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? o = n ? Math.round(e.h) - Ic * t : Math.round(e.h) + Ic * t : o = n ? Math.round(e.h) + Ic * t : Math.round(e.h) - Ic * t, o < 0 ? o += 360 : o >= 360 && (o -= 360), o;
}
function g0(e, t, n) {
  if (e.h === 0 && e.s === 0)
    return e.s;
  var o;
  return n ? o = e.s - d0 * t : t === NS ? o = e.s + d0 : o = e.s + GE * t, o > 1 && (o = 1), n && t === RS && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Number(o.toFixed(2));
}
function h0(e, t, n) {
  var o;
  return n ? o = e.v + KE * t : o = e.v - YE * t, o > 1 && (o = 1), Number(o.toFixed(2));
}
function Wa(e) {
  for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], o = Ql(e), i = RS; i > 0; i -= 1) {
    var a = f0(o), r = Mc(Ql({
      h: p0(a, i, !0),
      s: g0(a, i, !0),
      v: h0(a, i, !0)
    }));
    n.push(r);
  }
  n.push(Mc(o));
  for (var l = 1; l <= NS; l += 1) {
    var s = f0(o), u = Mc(Ql({
      h: p0(s, l),
      s: g0(s, l),
      v: h0(s, l)
    }));
    n.push(u);
  }
  return t.theme === "dark" ? UE.map(function(c) {
    var d = c.index, f = c.opacity, g = Mc(XE(Ql(t.backgroundColor || "#141414"), Ql(n[d]), f * 100));
    return g;
  }) : n;
}
var hp = {
  red: "#F5222D",
  volcano: "#FA541C",
  orange: "#FA8C16",
  gold: "#FAAD14",
  yellow: "#FADB14",
  lime: "#A0D911",
  green: "#52C41A",
  cyan: "#13C2C2",
  blue: "#1890FF",
  geekblue: "#2F54EB",
  purple: "#722ED1",
  magenta: "#EB2F96",
  grey: "#666666"
}, ad = {}, vp = {};
Object.keys(hp).forEach(function(e) {
  ad[e] = Wa(hp[e]), ad[e].primary = ad[e][5], vp[e] = Wa(hp[e], {
    theme: "dark",
    backgroundColor: "#141414"
  }), vp[e].primary = vp[e][5];
});
var QE = ad.blue;
const ZE = (e) => {
  const {
    controlHeight: t
  } = e;
  return {
    controlHeightSM: t * 0.75,
    controlHeightXS: t * 0.5,
    controlHeightLG: t * 1.25
  };
};
function JE(e) {
  const {
    sizeUnit: t,
    sizeStep: n
  } = e;
  return {
    sizeXXL: t * (n + 8),
    sizeXL: t * (n + 4),
    sizeLG: t * (n + 2),
    sizeMD: t * (n + 1),
    sizeMS: t * n,
    size: t * n,
    sizeSM: t * (n - 1),
    sizeXS: t * (n - 2),
    sizeXXS: t * (n - 3)
    // 4
  };
}
const gv = {
  blue: "#1677ff",
  purple: "#722ED1",
  cyan: "#13C2C2",
  green: "#52C41A",
  magenta: "#EB2F96",
  pink: "#eb2f96",
  red: "#F5222D",
  orange: "#FA8C16",
  yellow: "#FADB14",
  volcano: "#FA541C",
  geekblue: "#2F54EB",
  gold: "#FAAD14",
  lime: "#A0D911"
}, pf = I(I({}, gv), {
  // Color
  colorPrimary: "#1677ff",
  colorSuccess: "#52c41a",
  colorWarning: "#faad14",
  colorError: "#ff4d4f",
  colorInfo: "#1677ff",
  colorTextBase: "",
  colorBgBase: "",
  // Font
  fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
  fontSize: 14,
  // Line
  lineWidth: 1,
  lineType: "solid",
  // Motion
  motionUnit: 0.1,
  motionBase: 0,
  motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  // Radius
  borderRadius: 6,
  // Size
  sizeUnit: 4,
  sizeStep: 4,
  sizePopupArrow: 16,
  // Control Base
  controlHeight: 32,
  // zIndex
  zIndexBase: 0,
  zIndexPopupBase: 1e3,
  // Image
  opacityImage: 1,
  // Wireframe
  wireframe: !1
});
function BS(e, t) {
  let {
    generateColorPalettes: n,
    generateNeutralColorPalettes: o
  } = t;
  const {
    colorSuccess: i,
    colorWarning: a,
    colorError: r,
    colorInfo: l,
    colorPrimary: s,
    colorBgBase: u,
    colorTextBase: c
  } = e, d = n(s), f = n(i), g = n(a), m = n(r), b = n(l), y = o(u, c);
  return I(I({}, y), {
    colorPrimaryBg: d[1],
    colorPrimaryBgHover: d[2],
    colorPrimaryBorder: d[3],
    colorPrimaryBorderHover: d[4],
    colorPrimaryHover: d[5],
    colorPrimary: d[6],
    colorPrimaryActive: d[7],
    colorPrimaryTextHover: d[8],
    colorPrimaryText: d[9],
    colorPrimaryTextActive: d[10],
    colorSuccessBg: f[1],
    colorSuccessBgHover: f[2],
    colorSuccessBorder: f[3],
    colorSuccessBorderHover: f[4],
    colorSuccessHover: f[4],
    colorSuccess: f[6],
    colorSuccessActive: f[7],
    colorSuccessTextHover: f[8],
    colorSuccessText: f[9],
    colorSuccessTextActive: f[10],
    colorErrorBg: m[1],
    colorErrorBgHover: m[2],
    colorErrorBorder: m[3],
    colorErrorBorderHover: m[4],
    colorErrorHover: m[5],
    colorError: m[6],
    colorErrorActive: m[7],
    colorErrorTextHover: m[8],
    colorErrorText: m[9],
    colorErrorTextActive: m[10],
    colorWarningBg: g[1],
    colorWarningBgHover: g[2],
    colorWarningBorder: g[3],
    colorWarningBorderHover: g[4],
    colorWarningHover: g[4],
    colorWarning: g[6],
    colorWarningActive: g[7],
    colorWarningTextHover: g[8],
    colorWarningText: g[9],
    colorWarningTextActive: g[10],
    colorInfoBg: b[1],
    colorInfoBgHover: b[2],
    colorInfoBorder: b[3],
    colorInfoBorderHover: b[4],
    colorInfoHover: b[4],
    colorInfo: b[6],
    colorInfoActive: b[7],
    colorInfoTextHover: b[8],
    colorInfoText: b[9],
    colorInfoTextActive: b[10],
    colorBgMask: new In("#000").setAlpha(0.45).toRgbString(),
    colorWhite: "#fff"
  });
}
const e_ = (e) => {
  let t = e, n = e, o = e, i = e;
  return e < 6 && e >= 5 ? t = e + 1 : e < 16 && e >= 6 ? t = e + 2 : e >= 16 && (t = 16), e < 7 && e >= 5 ? n = 4 : e < 8 && e >= 7 ? n = 5 : e < 14 && e >= 8 ? n = 6 : e < 16 && e >= 14 ? n = 7 : e >= 16 && (n = 8), e < 6 && e >= 2 ? o = 1 : e >= 6 && (o = 2), e > 4 && e < 8 ? i = 4 : e >= 8 && (i = 6), {
    borderRadius: e > 16 ? 16 : e,
    borderRadiusXS: o,
    borderRadiusSM: n,
    borderRadiusLG: t,
    borderRadiusOuter: i
  };
};
function t_(e) {
  const {
    motionUnit: t,
    motionBase: n,
    borderRadius: o,
    lineWidth: i
  } = e;
  return I({
    // motion
    motionDurationFast: `${(n + t).toFixed(1)}s`,
    motionDurationMid: `${(n + t * 2).toFixed(1)}s`,
    motionDurationSlow: `${(n + t * 3).toFixed(1)}s`,
    // line
    lineWidthBold: i + 1
  }, e_(o));
}
const Da = (e, t) => new In(e).setAlpha(t).toRgbString(), iu = (e, t) => new In(e).darken(t).toHexString(), n_ = (e) => {
  const t = Wa(e);
  return {
    1: t[0],
    2: t[1],
    3: t[2],
    4: t[3],
    5: t[4],
    6: t[5],
    7: t[6],
    8: t[4],
    9: t[5],
    10: t[6]
    // 8: colors[7],
    // 9: colors[8],
    // 10: colors[9],
  };
}, o_ = (e, t) => {
  const n = e || "#fff", o = t || "#000";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: Da(o, 0.88),
    colorTextSecondary: Da(o, 0.65),
    colorTextTertiary: Da(o, 0.45),
    colorTextQuaternary: Da(o, 0.25),
    colorFill: Da(o, 0.15),
    colorFillSecondary: Da(o, 0.06),
    colorFillTertiary: Da(o, 0.04),
    colorFillQuaternary: Da(o, 0.02),
    colorBgLayout: iu(n, 4),
    colorBgContainer: iu(n, 0),
    colorBgElevated: iu(n, 0),
    colorBgSpotlight: Da(o, 0.85),
    colorBorder: iu(n, 15),
    colorBorderSecondary: iu(n, 6)
  };
};
function i_(e) {
  const t = new Array(10).fill(null).map((n, o) => {
    const i = o - 1, a = e * Math.pow(2.71828, i / 5), r = o > 1 ? Math.floor(a) : Math.ceil(a);
    return Math.floor(r / 2) * 2;
  });
  return t[1] = e, t.map((n) => {
    const o = n + 8;
    return {
      size: n,
      lineHeight: o / n
    };
  });
}
const a_ = (e) => {
  const t = i_(e), n = t.map((i) => i.size), o = t.map((i) => i.lineHeight);
  return {
    fontSizeSM: n[0],
    fontSize: n[1],
    fontSizeLG: n[2],
    fontSizeXL: n[3],
    fontSizeHeading1: n[6],
    fontSizeHeading2: n[5],
    fontSizeHeading3: n[4],
    fontSizeHeading4: n[3],
    fontSizeHeading5: n[2],
    lineHeight: o[1],
    lineHeightLG: o[2],
    lineHeightSM: o[0],
    lineHeightHeading1: o[6],
    lineHeightHeading2: o[5],
    lineHeightHeading3: o[4],
    lineHeightHeading4: o[3],
    lineHeightHeading5: o[2]
  };
};
function hv(e) {
  const t = Object.keys(gv).map((n) => {
    const o = Wa(e[n]);
    return new Array(10).fill(1).reduce((i, a, r) => (i[`${n}-${r + 1}`] = o[r], i), {});
  }).reduce((n, o) => (n = I(I({}, n), o), n), {});
  return I(I(I(I(I(I(I({}, e), t), BS(e, {
    generateColorPalettes: n_,
    generateNeutralColorPalettes: o_
  })), a_(e.fontSize)), JE(e)), ZE(e)), t_(e));
}
function mp(e) {
  return e >= 0 && e <= 255;
}
function Tc(e, t) {
  const {
    r: n,
    g: o,
    b: i,
    a
  } = new In(e).toRgb();
  if (a < 1)
    return e;
  const {
    r,
    g: l,
    b: s
  } = new In(t).toRgb();
  for (let u = 0.01; u <= 1; u += 0.01) {
    const c = Math.round((n - r * (1 - u)) / u), d = Math.round((o - l * (1 - u)) / u), f = Math.round((i - s * (1 - u)) / u);
    if (mp(c) && mp(d) && mp(f))
      return new In({
        r: c,
        g: d,
        b: f,
        a: Math.round(u * 100) / 100
      }).toRgbString();
  }
  return new In({
    r: n,
    g: o,
    b: i,
    a: 1
  }).toRgbString();
}
var r_ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function l_(e) {
  const {
    override: t
  } = e, n = r_(e, ["override"]), o = I({}, t);
  Object.keys(pf).forEach((g) => {
    delete o[g];
  });
  const i = I(I({}, n), o), a = 480, r = 576, l = 768, s = 992, u = 1200, c = 1600, d = 2e3;
  return I(I(I({}, i), {
    colorLink: i.colorInfoText,
    colorLinkHover: i.colorInfoHover,
    colorLinkActive: i.colorInfoActive,
    // ============== Background ============== //
    colorFillContent: i.colorFillSecondary,
    colorFillContentHover: i.colorFill,
    colorFillAlter: i.colorFillQuaternary,
    colorBgContainerDisabled: i.colorFillTertiary,
    // ============== Split ============== //
    colorBorderBg: i.colorBgContainer,
    colorSplit: Tc(i.colorBorderSecondary, i.colorBgContainer),
    // ============== Text ============== //
    colorTextPlaceholder: i.colorTextQuaternary,
    colorTextDisabled: i.colorTextQuaternary,
    colorTextHeading: i.colorText,
    colorTextLabel: i.colorTextSecondary,
    colorTextDescription: i.colorTextTertiary,
    colorTextLightSolid: i.colorWhite,
    colorHighlight: i.colorError,
    colorBgTextHover: i.colorFillSecondary,
    colorBgTextActive: i.colorFill,
    colorIcon: i.colorTextTertiary,
    colorIconHover: i.colorText,
    colorErrorOutline: Tc(i.colorErrorBg, i.colorBgContainer),
    colorWarningOutline: Tc(i.colorWarningBg, i.colorBgContainer),
    // Font
    fontSizeIcon: i.fontSizeSM,
    // Control
    lineWidth: i.lineWidth,
    controlOutlineWidth: i.lineWidth * 2,
    // Checkbox size and expand icon size
    controlInteractiveSize: i.controlHeight / 2,
    controlItemBgHover: i.colorFillTertiary,
    controlItemBgActive: i.colorPrimaryBg,
    controlItemBgActiveHover: i.colorPrimaryBgHover,
    controlItemBgActiveDisabled: i.colorFill,
    controlTmpOutline: i.colorFillQuaternary,
    controlOutline: Tc(i.colorPrimaryBg, i.colorBgContainer),
    lineType: i.lineType,
    borderRadius: i.borderRadius,
    borderRadiusXS: i.borderRadiusXS,
    borderRadiusSM: i.borderRadiusSM,
    borderRadiusLG: i.borderRadiusLG,
    fontWeightStrong: 600,
    opacityLoading: 0.65,
    linkDecoration: "none",
    linkHoverDecoration: "none",
    linkFocusDecoration: "none",
    controlPaddingHorizontal: 12,
    controlPaddingHorizontalSM: 8,
    paddingXXS: i.sizeXXS,
    paddingXS: i.sizeXS,
    paddingSM: i.sizeSM,
    padding: i.size,
    paddingMD: i.sizeMD,
    paddingLG: i.sizeLG,
    paddingXL: i.sizeXL,
    paddingContentHorizontalLG: i.sizeLG,
    paddingContentVerticalLG: i.sizeMS,
    paddingContentHorizontal: i.sizeMS,
    paddingContentVertical: i.sizeSM,
    paddingContentHorizontalSM: i.size,
    paddingContentVerticalSM: i.sizeXS,
    marginXXS: i.sizeXXS,
    marginXS: i.sizeXS,
    marginSM: i.sizeSM,
    margin: i.size,
    marginMD: i.sizeMD,
    marginLG: i.sizeLG,
    marginXL: i.sizeXL,
    marginXXL: i.sizeXXL,
    boxShadow: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    boxShadowSecondary: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTertiary: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    screenXS: a,
    screenXSMin: a,
    screenXSMax: r - 1,
    screenSM: r,
    screenSMMin: r,
    screenSMMax: l - 1,
    screenMD: l,
    screenMDMin: l,
    screenMDMax: s - 1,
    screenLG: s,
    screenLGMin: s,
    screenLGMax: u - 1,
    screenXL: u,
    screenXLMin: u,
    screenXLMax: c - 1,
    screenXXL: c,
    screenXXLMin: c,
    screenXXLMax: d - 1,
    screenXXXL: d,
    screenXXXLMin: d,
    // FIXME: component box-shadow, should be removed
    boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
    boxShadowCard: `
      0 1px 2px -2px ${new In("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new In("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new In("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,
    boxShadowDrawerRight: `
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerLeft: `
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerUp: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerDown: `
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  }), o);
}
const vv = (e, t, n, o, i) => {
  const a = e / 2, r = 0, l = a, s = n * 1 / Math.sqrt(2), u = a - n * (1 - 1 / Math.sqrt(2)), c = a - t * (1 / Math.sqrt(2)), d = n * (Math.sqrt(2) - 1) + t * (1 / Math.sqrt(2)), f = 2 * a - c, g = d, m = 2 * a - s, b = u, y = 2 * a - r, S = l, C = a * Math.sqrt(2) + n * (Math.sqrt(2) - 2), O = n * (Math.sqrt(2) - 1);
  return {
    pointerEvents: "none",
    width: e,
    height: e,
    overflow: "hidden",
    "&::after": {
      content: '""',
      position: "absolute",
      width: C,
      height: C,
      bottom: 0,
      insetInline: 0,
      margin: "auto",
      borderRadius: {
        _skip_check_: !0,
        value: `0 0 ${t}px 0`
      },
      transform: "translateY(50%) rotate(-135deg)",
      boxShadow: i,
      zIndex: 0,
      background: "transparent"
    },
    "&::before": {
      position: "absolute",
      bottom: 0,
      insetInlineStart: 0,
      width: e,
      height: e / 2,
      background: o,
      clipPath: {
        _multi_value_: !0,
        value: [`polygon(${O}px 100%, 50% ${O}px, ${2 * a - O}px 100%, ${O}px 100%)`, `path('M ${r} ${l} A ${n} ${n} 0 0 0 ${s} ${u} L ${c} ${d} A ${t} ${t} 0 0 1 ${f} ${g} L ${m} ${b} A ${n} ${n} 0 0 0 ${y} ${S} Z')`]
      },
      content: '""'
    }
  };
};
function FS(e, t) {
  return Lu.reduce((n, o) => {
    const i = e[`${o}-1`], a = e[`${o}-3`], r = e[`${o}-6`], l = e[`${o}-7`];
    return I(I({}, n), t(o, {
      lightColor: i,
      lightBorderColor: a,
      darkColor: r,
      textColor: l
    }));
  }, {});
}
const Mr = {
  overflow: "hidden",
  whiteSpace: "nowrap",
  textOverflow: "ellipsis"
}, Zt = (e) => ({
  boxSizing: "border-box",
  margin: 0,
  padding: 0,
  color: e.colorText,
  fontSize: e.fontSize,
  // font-variant: @font-variant-base;
  lineHeight: e.lineHeight,
  listStyle: "none",
  // font-feature-settings: @font-feature-settings-base;
  fontFamily: e.fontFamily
}), Ls = () => ({
  display: "inline-flex",
  alignItems: "center",
  color: "inherit",
  fontStyle: "normal",
  lineHeight: 0,
  textAlign: "center",
  textTransform: "none",
  // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  verticalAlign: "-0.125em",
  textRendering: "optimizeLegibility",
  "-webkit-font-smoothing": "antialiased",
  "-moz-osx-font-smoothing": "grayscale",
  "> *": {
    lineHeight: 1
  },
  svg: {
    display: "inline-block"
  }
}), Tr = () => ({
  // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  "&::before": {
    display: "table",
    content: '""'
  },
  "&::after": {
    // https://github.com/ant-design/ant-design/issues/21864
    display: "table",
    clear: "both",
    content: '""'
  }
}), s_ = (e) => ({
  a: {
    color: e.colorLink,
    textDecoration: e.linkDecoration,
    backgroundColor: "transparent",
    outline: "none",
    cursor: "pointer",
    transition: `color ${e.motionDurationSlow}`,
    "-webkit-text-decoration-skip": "objects",
    "&:hover": {
      color: e.colorLinkHover
    },
    "&:active": {
      color: e.colorLinkActive
    },
    "&:active,\n  &:hover": {
      textDecoration: e.linkHoverDecoration,
      outline: 0
    },
    // https://github.com/ant-design/ant-design/issues/22503
    "&:focus": {
      textDecoration: e.linkFocusDecoration,
      outline: 0
    },
    "&[disabled]": {
      color: e.colorTextDisabled,
      cursor: "not-allowed"
    }
  }
}), u_ = (e, t) => {
  const {
    fontFamily: n,
    fontSize: o
  } = e, i = `[class^="${t}"], [class*=" ${t}"]`;
  return {
    [i]: {
      fontFamily: n,
      fontSize: o,
      boxSizing: "border-box",
      "&::before, &::after": {
        boxSizing: "border-box"
      },
      [i]: {
        boxSizing: "border-box",
        "&::before, &::after": {
          boxSizing: "border-box"
        }
      }
    }
  };
}, Xu = (e) => ({
  outline: `${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,
  outlineOffset: 1,
  transition: "outline-offset 0s, outline 0s"
}), vl = (e) => ({
  "&:focus-visible": I({}, Xu(e))
});
function nn(e, t, n) {
  return (o) => {
    const i = R(() => o?.value), [a, r, l] = Hs(), {
      getPrefixCls: s,
      iconPrefixCls: u
    } = sf(), c = R(() => s()), d = R(() => ({
      theme: a.value,
      token: r.value,
      hashId: l.value,
      path: ["Shared", c.value]
    }));
    Vg(d, () => [{
      // Link
      "&": s_(r.value)
    }]);
    const f = R(() => ({
      theme: a.value,
      token: r.value,
      hashId: l.value,
      path: [e, i.value, u.value]
    }));
    return [Vg(f, () => {
      const {
        token: g,
        flush: m
      } = d_(r.value), b = typeof n == "function" ? n(g) : n, y = I(I({}, b), r.value[e]), S = `.${i.value}`, C = _t(g, {
        componentCls: S,
        prefixCls: i.value,
        iconCls: `.${u.value}`,
        antCls: `.${c.value}`
      }, y), O = t(C, {
        hashId: l.value,
        prefixCls: i.value,
        rootPrefixCls: c.value,
        iconPrefixCls: u.value,
        overrideComponentToken: r.value[e]
      });
      return m(e, y), [u_(r.value, i.value), O];
    }), l];
  };
}
const LS = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
let Gg = !0;
function _t() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  if (!LS)
    return I({}, ...t);
  Gg = !1;
  const o = {};
  return t.forEach((i) => {
    Object.keys(i).forEach((r) => {
      Object.defineProperty(o, r, {
        configurable: !0,
        enumerable: !0,
        get: () => i[r]
      });
    });
  }), Gg = !0, o;
}
function c_() {
}
function d_(e) {
  let t, n = e, o = c_;
  return LS && (t = /* @__PURE__ */ new Set(), n = new Proxy(e, {
    get(i, a) {
      return Gg && t.add(a), i[a];
    }
  }), o = (i, a) => {
    Array.from(t);
  }), {
    token: n,
    keys: t,
    flush: o
  };
}
const f_ = $S(hv), mv = {
  token: pf,
  hashed: !0
}, HS = Symbol("DesignTokenContext"), Kg = Pe(), p_ = (e) => {
  kt(HS, e), Ie(e, () => {
    Kg.value = M(e), oO(Kg);
  }, {
    immediate: !0,
    deep: !0
  });
}, g_ = ye({
  props: {
    value: Ct()
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return p_(R(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function Hs() {
  const e = Tt(HS, R(() => Kg.value || mv)), t = R(() => `${DE}-${e.value.hashed || ""}`), n = R(() => e.value.theme || f_), o = rE(n, R(() => [pf, e.value.token]), R(() => ({
    salt: t.value,
    override: I({
      override: e.value.token
    }, e.value.components),
    formatToken: l_
  })));
  return [n, R(() => o.value[0]), R(() => e.value.hashed ? o.value[1] : "")];
}
const bv = ye({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = Hs(), t = R(() => new In(e.value.colorBgBase).toHsl().l < 0.5 ? {
      opacity: 0.65
    } : {});
    return () => v("svg", {
      style: t.value,
      width: "184",
      height: "152",
      viewBox: "0 0 184 152",
      xmlns: "http://www.w3.org/2000/svg"
    }, [v("g", {
      fill: "none",
      "fill-rule": "evenodd"
    }, [v("g", {
      transform: "translate(24 31.67)"
    }, [v("ellipse", {
      "fill-opacity": ".8",
      fill: "#F5F5F7",
      cx: "67.797",
      cy: "106.89",
      rx: "67.797",
      ry: "12.668"
    }, null), v("path", {
      d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
      fill: "#AEB8C2"
    }, null), v("path", {
      d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
      fill: "url(#linearGradient-1)",
      transform: "translate(13.56)"
    }, null), v("path", {
      d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
      fill: "#F5F5F7"
    }, null), v("path", {
      d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
      fill: "#DCE0E6"
    }, null)]), v("path", {
      d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
      fill: "#DCE0E6"
    }, null), v("g", {
      transform: "translate(149.65 15.383)",
      fill: "#FFF"
    }, [v("ellipse", {
      cx: "20.654",
      cy: "3.167",
      rx: "2.849",
      ry: "2.815"
    }, null), v("path", {
      d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
    }, null)])])]);
  }
});
bv.PRESENTED_IMAGE_DEFAULT = !0;
const VS = ye({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = Hs(), t = R(() => {
      const {
        colorFill: n,
        colorFillTertiary: o,
        colorFillQuaternary: i,
        colorBgContainer: a
      } = e.value;
      return {
        borderColor: new In(n).onBackground(a).toHexString(),
        shadowColor: new In(o).onBackground(a).toHexString(),
        contentColor: new In(i).onBackground(a).toHexString()
      };
    });
    return () => v("svg", {
      width: "64",
      height: "41",
      viewBox: "0 0 64 41",
      xmlns: "http://www.w3.org/2000/svg"
    }, [v("g", {
      transform: "translate(0 1)",
      fill: "none",
      "fill-rule": "evenodd"
    }, [v("ellipse", {
      fill: t.value.shadowColor,
      cx: "32",
      cy: "33",
      rx: "32",
      ry: "7"
    }, null), v("g", {
      "fill-rule": "nonzero",
      stroke: t.value.borderColor
    }, [v("path", {
      d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
    }, null), v("path", {
      d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
      fill: t.value.contentColor
    }, null)])])]);
  }
});
VS.PRESENTED_IMAGE_SIMPLE = !0;
const h_ = (e) => {
  const {
    componentCls: t,
    margin: n,
    marginXS: o,
    marginXL: i,
    fontSize: a,
    lineHeight: r
  } = e;
  return {
    [t]: {
      marginInline: o,
      fontSize: a,
      lineHeight: r,
      textAlign: "center",
      // 原来 &-image 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${t}-image`]: {
        height: e.emptyImgHeight,
        marginBottom: o,
        opacity: e.opacityImage,
        img: {
          height: "100%"
        },
        svg: {
          height: "100%",
          margin: "auto"
        }
      },
      // 原来 &-footer 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${t}-footer`]: {
        marginTop: n
      },
      "&-normal": {
        marginBlock: i,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightMD
        }
      },
      "&-small": {
        marginBlock: o,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightSM
        }
      }
    }
  };
}, v_ = nn("Empty", (e) => {
  const {
    componentCls: t,
    controlHeightLG: n
  } = e, o = _t(e, {
    emptyImgCls: `${t}-img`,
    emptyImgHeight: n * 2.5,
    emptyImgHeightMD: n,
    emptyImgHeightSM: n * 0.875
  });
  return [h_(o)];
});
var m_ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const b_ = () => ({
  prefixCls: String,
  imageStyle: Ct(),
  image: ti(),
  description: ti()
}), yv = ye({
  name: "AEmpty",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: b_(),
  setup(e, t) {
    let {
      slots: n = {},
      attrs: o
    } = t;
    const {
      direction: i,
      prefixCls: a
    } = yt("empty", e), [r, l] = v_(a);
    return () => {
      var s, u;
      const c = a.value, d = I(I({}, e), o), {
        image: f = ((s = n.image) === null || s === void 0 ? void 0 : s.call(n)) || io(bv),
        description: g = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
        imageStyle: m,
        class: b = ""
      } = d, y = m_(d, ["image", "description", "imageStyle", "class"]), S = typeof f == "function" ? f() : f, C = typeof S == "object" && "type" in S && S.type.PRESENTED_IMAGE_SIMPLE;
      return r(v(pS, {
        componentName: "Empty",
        children: (O) => {
          const $ = typeof g < "u" ? g : O.description, P = typeof $ == "string" ? $ : "empty";
          let k = null;
          return typeof S == "string" ? k = v("img", {
            alt: P,
            src: S
          }, null) : k = S, v("div", Z({
            class: Te(c, b, l.value, {
              [`${c}-normal`]: C,
              [`${c}-rtl`]: i.value === "rtl"
            })
          }, y), [v("div", {
            class: `${c}-image`,
            style: m
          }, [k]), $ && v("p", {
            class: `${c}-description`
          }, [$]), n.default && v("div", {
            class: `${c}-footer`
          }, [Go(n.default())])]);
        }
      }, null));
    };
  }
});
yv.PRESENTED_IMAGE_DEFAULT = () => io(bv);
yv.PRESENTED_IMAGE_SIMPLE = () => io(VS);
const au = Ji(yv), xv = (e) => {
  const {
    prefixCls: t
  } = yt("empty", e);
  return ((o) => {
    switch (o) {
      case "Table":
      case "List":
        return v(au, {
          image: au.PRESENTED_IMAGE_SIMPLE
        }, null);
      case "Select":
      case "TreeSelect":
      case "Cascader":
      case "Transfer":
      case "Mentions":
        return v(au, {
          image: au.PRESENTED_IMAGE_SIMPLE,
          class: `${t.value}-small`
        }, null);
      default:
        return v(au, null, null);
    }
  })(e.componentName);
};
function y_(e) {
  return v(xv, {
    componentName: e
  }, null);
}
const jS = Symbol("SizeContextKey"), WS = () => Tt(jS, le(void 0)), qS = (e) => {
  const t = WS();
  return kt(jS, R(() => e.value || t.value)), e;
}, yt = ((e, t) => {
  const n = WS(), o = Zi(), i = Tt(dv, I(I({}, uS), {
    renderEmpty: (x) => io(xv, {
      componentName: x
    })
  })), a = R(() => i.getPrefixCls(e, t.prefixCls)), r = R(() => {
    var x, E;
    return (x = t.direction) !== null && x !== void 0 ? x : (E = i.direction) === null || E === void 0 ? void 0 : E.value;
  }), l = R(() => {
    var x;
    return (x = t.iconPrefixCls) !== null && x !== void 0 ? x : i.iconPrefixCls.value;
  }), s = R(() => i.getPrefixCls()), u = R(() => {
    var x;
    return (x = i.autoInsertSpaceInButton) === null || x === void 0 ? void 0 : x.value;
  }), c = i.renderEmpty, d = i.space, f = i.pageHeader, g = i.form, m = R(() => {
    var x, E;
    return (x = t.getTargetContainer) !== null && x !== void 0 ? x : (E = i.getTargetContainer) === null || E === void 0 ? void 0 : E.value;
  }), b = R(() => {
    var x, E, z;
    return (E = (x = t.getContainer) !== null && x !== void 0 ? x : t.getPopupContainer) !== null && E !== void 0 ? E : (z = i.getPopupContainer) === null || z === void 0 ? void 0 : z.value;
  }), y = R(() => {
    var x, E;
    return (x = t.dropdownMatchSelectWidth) !== null && x !== void 0 ? x : (E = i.dropdownMatchSelectWidth) === null || E === void 0 ? void 0 : E.value;
  }), S = R(() => {
    var x;
    return (t.virtual === void 0 ? ((x = i.virtual) === null || x === void 0 ? void 0 : x.value) !== !1 : t.virtual !== !1) && y.value !== !1;
  }), C = R(() => t.size || n.value), O = R(() => {
    var x, E, z;
    return (x = t.autocomplete) !== null && x !== void 0 ? x : (z = (E = i.input) === null || E === void 0 ? void 0 : E.value) === null || z === void 0 ? void 0 : z.autocomplete;
  }), $ = R(() => {
    var x;
    return (x = t.disabled) !== null && x !== void 0 ? x : o.value;
  }), P = R(() => {
    var x;
    return (x = t.csp) !== null && x !== void 0 ? x : i.csp;
  }), k = R(() => {
    var x, E;
    return (x = t.wave) !== null && x !== void 0 ? x : (E = i.wave) === null || E === void 0 ? void 0 : E.value;
  });
  return {
    configProvider: i,
    prefixCls: a,
    direction: r,
    size: C,
    getTargetContainer: m,
    getPopupContainer: b,
    space: d,
    pageHeader: f,
    form: g,
    autoInsertSpaceInButton: u,
    renderEmpty: c,
    virtual: S,
    dropdownMatchSelectWidth: y,
    rootPrefixCls: s,
    getPrefixCls: i.getPrefixCls,
    autocomplete: O,
    csp: P,
    iconPrefixCls: l,
    disabled: $,
    select: i.select,
    wave: k
  };
});
function Tn(e, t) {
  const n = I({}, e);
  for (let o = 0; o < t.length; o += 1) {
    const i = t[o];
    delete n[i];
  }
  return n;
}
function v0(e) {
  return typeof e == "object" && e != null && e.nodeType === 1;
}
function m0(e, t) {
  return (!t || e !== "hidden") && e !== "visible" && e !== "clip";
}
function bp(e, t) {
  if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
    var n = getComputedStyle(e, null);
    return m0(n.overflowY, t) || m0(n.overflowX, t) || (function(o) {
      var i = (function(a) {
        if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
        try {
          return a.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      })(o);
      return !!i && (i.clientHeight < o.scrollHeight || i.clientWidth < o.scrollWidth);
    })(e);
  }
  return !1;
}
function kc(e, t, n, o, i, a, r, l) {
  return a < e && r > t || a > e && r < t ? 0 : a <= e && l <= n || r >= t && l >= n ? a - e - o : r > t && l < n || a < e && l > n ? r - t + i : 0;
}
var b0 = function(e, t) {
  var n = window, o = t.scrollMode, i = t.block, a = t.inline, r = t.boundary, l = t.skipOverflowHiddenElements, s = typeof r == "function" ? r : function(Fe) {
    return Fe !== r;
  };
  if (!v0(e)) throw new TypeError("Invalid target");
  for (var u, c, d = document.scrollingElement || document.documentElement, f = [], g = e; v0(g) && s(g); ) {
    if ((g = (c = (u = g).parentElement) == null ? u.getRootNode().host || null : c) === d) {
      f.push(g);
      break;
    }
    g != null && g === document.body && bp(g) && !bp(document.documentElement) || g != null && bp(g, l) && f.push(g);
  }
  for (var m = n.visualViewport ? n.visualViewport.width : innerWidth, b = n.visualViewport ? n.visualViewport.height : innerHeight, y = window.scrollX || pageXOffset, S = window.scrollY || pageYOffset, C = e.getBoundingClientRect(), O = C.height, $ = C.width, P = C.top, k = C.right, x = C.bottom, E = C.left, z = i === "start" || i === "nearest" ? P : i === "end" ? x : P + O / 2, B = a === "center" ? E + $ / 2 : a === "end" ? k : E, D = [], W = 0; W < f.length; W++) {
    var H = f[W], F = H.getBoundingClientRect(), A = F.height, U = F.width, j = F.top, ae = F.right, G = F.bottom, Y = F.left;
    if (o === "if-needed" && P >= 0 && E >= 0 && x <= b && k <= m && P >= j && x <= G && E >= Y && k <= ae) return D;
    var K = getComputedStyle(H), J = parseInt(K.borderLeftWidth, 10), be = parseInt(K.borderTopWidth, 10), xe = parseInt(K.borderRightWidth, 10), he = parseInt(K.borderBottomWidth, 10), de = 0, ne = 0, we = "offsetWidth" in H ? H.offsetWidth - H.clientWidth - J - xe : 0, re = "offsetHeight" in H ? H.offsetHeight - H.clientHeight - be - he : 0, se = "offsetWidth" in H ? H.offsetWidth === 0 ? 0 : U / H.offsetWidth : 0, ve = "offsetHeight" in H ? H.offsetHeight === 0 ? 0 : A / H.offsetHeight : 0;
    if (d === H) de = i === "start" ? z : i === "end" ? z - b : i === "nearest" ? kc(S, S + b, b, be, he, S + z, S + z + O, O) : z - b / 2, ne = a === "start" ? B : a === "center" ? B - m / 2 : a === "end" ? B - m : kc(y, y + m, m, J, xe, y + B, y + B + $, $), de = Math.max(0, de + S), ne = Math.max(0, ne + y);
    else {
      de = i === "start" ? z - j - be : i === "end" ? z - G + he + re : i === "nearest" ? kc(j, G, A, be, he + re, z, z + O, O) : z - (j + A / 2) + re / 2, ne = a === "start" ? B - Y - J : a === "center" ? B - (Y + U / 2) + we / 2 : a === "end" ? B - ae + xe + we : kc(Y, ae, U, J, xe + we, B, B + $, $);
      var Me = H.scrollLeft, ke = H.scrollTop;
      z += ke - (de = Math.max(0, Math.min(ke + de / ve, H.scrollHeight - A / ve + re))), B += Me - (ne = Math.max(0, Math.min(Me + ne / se, H.scrollWidth - U / se + we)));
    }
    D.push({ el: H, top: de, left: ne });
  }
  return D;
};
function GS(e) {
  return e === Object(e) && Object.keys(e).length !== 0;
}
function x_(e, t) {
  t === void 0 && (t = "auto");
  var n = "scrollBehavior" in document.body.style;
  e.forEach(function(o) {
    var i = o.el, a = o.top, r = o.left;
    i.scroll && n ? i.scroll({
      top: a,
      left: r,
      behavior: t
    }) : (i.scrollTop = a, i.scrollLeft = r);
  });
}
function w_(e) {
  return e === !1 ? {
    block: "end",
    inline: "nearest"
  } : GS(e) ? e : {
    block: "start",
    inline: "nearest"
  };
}
function S_(e, t) {
  var n = e.isConnected || e.ownerDocument.documentElement.contains(e);
  if (GS(t) && typeof t.behavior == "function")
    return t.behavior(n ? b0(e, t) : []);
  if (n) {
    var o = w_(t);
    return x_(b0(e, o), o.behavior);
  }
}
function C_(e, t) {
  for (var n = 0; n < t.length; n++) {
    var o = t[n];
    o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
  }
}
function KS(e, t, n) {
  return n && C_(e, n), e;
}
function rd() {
  return (rd = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }).apply(this, arguments);
}
function YS(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
}
function US(e, t) {
  if (e == null) return {};
  var n, o, i = {}, a = Object.keys(e);
  for (o = 0; o < a.length; o++) t.indexOf(n = a[o]) >= 0 || (i[n] = e[n]);
  return i;
}
function y0(e) {
  return ((t = e) != null && typeof t == "object" && Array.isArray(t) === !1) == 1 && Object.prototype.toString.call(e) === "[object Object]";
  var t;
}
var XS = Object.prototype, QS = XS.toString, $_ = XS.hasOwnProperty, ZS = /^\s*function (\w+)/;
function x0(e) {
  var t, n = (t = e?.type) !== null && t !== void 0 ? t : e;
  if (n) {
    var o = n.toString().match(ZS);
    return o ? o[1] : "";
  }
  return "";
}
var ml = function(e) {
  var t, n;
  return y0(e) !== !1 && typeof (t = e.constructor) == "function" && y0(n = t.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
}, JS = function(e) {
  return e;
}, qo = JS;
if (process.env.NODE_ENV !== "production") {
  var P_ = typeof console < "u";
  qo = P_ ? function(e) {
    console.warn("[VueTypes warn]: " + e);
  } : JS;
}
var Hu = function(e, t) {
  return $_.call(e, t);
}, O_ = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, Is = Array.isArray || function(e) {
  return QS.call(e) === "[object Array]";
}, Ms = function(e) {
  return QS.call(e) === "[object Function]";
}, Ed = function(e) {
  return ml(e) && Hu(e, "_vueTypes_name");
}, eC = function(e) {
  return ml(e) && (Hu(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(t) {
    return Hu(e, t);
  }));
};
function wv(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function Cl(e, t, n) {
  var o, i = !0, a = "";
  o = ml(e) ? e : { type: e };
  var r = Ed(o) ? o._vueTypes_name + " - " : "";
  if (eC(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && t === void 0) return i;
    Is(o.type) ? (i = o.type.some(function(d) {
      return Cl(d, t) === !0;
    }), a = o.type.map(function(d) {
      return x0(d);
    }).join(" or ")) : i = (a = x0(o)) === "Array" ? Is(t) : a === "Object" ? ml(t) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? (function(d) {
      if (d == null) return "";
      var f = d.constructor.toString().match(ZS);
      return f ? f[1] : "";
    })(t) === a : t instanceof o.type;
  }
  if (!i) {
    var l = r + 'value "' + t + '" should be of type "' + a + '"';
    return l;
  }
  if (Hu(o, "validator") && Ms(o.validator)) {
    var s = qo, u = [];
    if (qo = function(d) {
      u.push(d);
    }, i = o.validator(t), qo = s, !i) {
      var c = (u.length > 1 ? "* " : "") + u.join(`
* `);
      return u.length = 0, c;
    }
  }
  return i;
}
function li(e, t) {
  var n = Object.defineProperties(t, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get: function() {
    return this.required = !0, this;
  } }, def: { value: function(i) {
    return i !== void 0 || this.default ? Ms(i) || Cl(this, i) === !0 ? (this.default = Is(i) ? function() {
      return [].concat(i);
    } : ml(i) ? function() {
      return Object.assign({}, i);
    } : i, this) : (qo(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  } } }), o = n.validator;
  return Ms(o) && (n.validator = wv(o, n)), n;
}
function ma(e, t) {
  var n = li(e, t);
  return Object.defineProperty(n, "validate", { value: function(o) {
    return Ms(this.validator) && qo(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
` + JSON.stringify(this)), this.validator = wv(o, this), this;
  } });
}
function w0(e, t, n) {
  var o, i, a = (o = t, i = {}, Object.getOwnPropertyNames(o).forEach(function(d) {
    i[d] = Object.getOwnPropertyDescriptor(o, d);
  }), Object.defineProperties({}, i));
  if (a._vueTypes_name = e, !ml(n)) return a;
  var r, l, s = n.validator, u = US(n, ["validator"]);
  if (Ms(s)) {
    var c = a.validator;
    c && (c = (l = (r = c).__original) !== null && l !== void 0 ? l : r), a.validator = wv(c ? function(d) {
      return c.call(this, d) && s.call(this, d);
    } : s, a);
  }
  return Object.assign(a, u);
}
function gf(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
var I_ = function() {
  return ma("any", {});
}, M_ = function() {
  return ma("function", { type: Function });
}, T_ = function() {
  return ma("boolean", { type: Boolean });
}, k_ = function() {
  return ma("string", { type: String });
}, E_ = function() {
  return ma("number", { type: Number });
}, __ = function() {
  return ma("array", { type: Array });
}, A_ = function() {
  return ma("object", { type: Object });
}, D_ = function() {
  return li("integer", { type: Number, validator: function(e) {
    return O_(e);
  } });
}, z_ = function() {
  return li("symbol", { validator: function(e) {
    return typeof e == "symbol";
  } });
};
function R_(e, t) {
  if (t === void 0 && (t = "custom validation failed"), typeof e != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return li(e.name || "<<anonymous function>>", { validator: function(n) {
    var o = e(n);
    return o || qo(this._vueTypes_name + " - " + t), o;
  } });
}
function N_(e) {
  if (!Is(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  var t = 'oneOf - value should be one of "' + e.join('", "') + '".', n = e.reduce(function(o, i) {
    if (i != null) {
      var a = i.constructor;
      o.indexOf(a) === -1 && o.push(a);
    }
    return o;
  }, []);
  return li("oneOf", { type: n.length > 0 ? n : void 0, validator: function(o) {
    var i = e.indexOf(o) !== -1;
    return i || qo(t), i;
  } });
}
function B_(e) {
  if (!Is(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  for (var t = !1, n = [], o = 0; o < e.length; o += 1) {
    var i = e[o];
    if (eC(i)) {
      if (Ed(i) && i._vueTypes_name === "oneOf") {
        n = n.concat(i.type);
        continue;
      }
      if (Ms(i.validator) && (t = !0), i.type !== !0 && i.type) {
        n = n.concat(i.type);
        continue;
      }
    }
    n.push(i);
  }
  return n = n.filter(function(a, r) {
    return n.indexOf(a) === r;
  }), li("oneOfType", t ? { type: n, validator: function(a) {
    var r = [], l = e.some(function(s) {
      var u = Cl(Ed(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, a);
      return typeof u == "string" && r.push(u), u === !0;
    });
    return l || qo("oneOfType - provided value does not match any of the " + r.length + ` passed-in validators:
` + gf(r.join(`
`))), l;
  } } : { type: n });
}
function F_(e) {
  return li("arrayOf", { type: Array, validator: function(t) {
    var n, o = t.every(function(i) {
      return (n = Cl(e, i)) === !0;
    });
    return o || qo(`arrayOf - value validation error:
` + gf(n)), o;
  } });
}
function L_(e) {
  return li("instanceOf", { type: e });
}
function H_(e) {
  return li("objectOf", { type: Object, validator: function(t) {
    var n, o = Object.keys(t).every(function(i) {
      return (n = Cl(e, t[i])) === !0;
    });
    return o || qo(`objectOf - value validation error:
` + gf(n)), o;
  } });
}
function V_(e) {
  var t = Object.keys(e), n = t.filter(function(i) {
    var a;
    return !!(!((a = e[i]) === null || a === void 0) && a.required);
  }), o = li("shape", { type: Object, validator: function(i) {
    var a = this;
    if (!ml(i)) return !1;
    var r = Object.keys(i);
    if (n.length > 0 && n.some(function(s) {
      return r.indexOf(s) === -1;
    })) {
      var l = n.filter(function(s) {
        return r.indexOf(s) === -1;
      });
      return qo(l.length === 1 ? 'shape - required property "' + l[0] + '" is not defined.' : 'shape - required properties "' + l.join('", "') + '" are not defined.'), !1;
    }
    return r.every(function(s) {
      if (t.indexOf(s) === -1) return a._vueTypes_isLoose === !0 || (qo('shape - shape definition does not include a "' + s + '" property. Allowed keys: "' + t.join('", "') + '".'), !1);
      var u = Cl(e[s], i[s]);
      return typeof u == "string" && qo('shape - "' + s + `" property validation error:
 ` + gf(u)), u === !0;
    });
  } });
  return Object.defineProperty(o, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(o, "loose", { get: function() {
    return this._vueTypes_isLoose = !0, this;
  } }), o;
}
var da = (function() {
  function e() {
  }
  return e.extend = function(t) {
    var n = this;
    if (Is(t)) return t.forEach(function(d) {
      return n.extend(d);
    }), this;
    var o = t.name, i = t.validate, a = i !== void 0 && i, r = t.getter, l = r !== void 0 && r, s = US(t, ["name", "validate", "getter"]);
    if (Hu(this, o)) throw new TypeError('[VueTypes error]: Type "' + o + '" already defined');
    var u, c = s.type;
    return Ed(c) ? (delete s.type, Object.defineProperty(this, o, l ? { get: function() {
      return w0(o, c, s);
    } } : { value: function() {
      var d, f = w0(o, c, s);
      return f.validator && (f.validator = (d = f.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
    } })) : (u = l ? { get: function() {
      var d = Object.assign({}, s);
      return a ? ma(o, d) : li(o, d);
    }, enumerable: !0 } : { value: function() {
      var d, f, g = Object.assign({}, s);
      return d = a ? ma(o, g) : li(o, g), g.validator && (d.validator = (f = g.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
    }, enumerable: !0 }, Object.defineProperty(this, o, u));
  }, KS(e, null, [{ key: "any", get: function() {
    return I_();
  } }, { key: "func", get: function() {
    return M_().def(this.defaults.func);
  } }, { key: "bool", get: function() {
    return T_().def(this.defaults.bool);
  } }, { key: "string", get: function() {
    return k_().def(this.defaults.string);
  } }, { key: "number", get: function() {
    return E_().def(this.defaults.number);
  } }, { key: "array", get: function() {
    return __().def(this.defaults.array);
  } }, { key: "object", get: function() {
    return A_().def(this.defaults.object);
  } }, { key: "integer", get: function() {
    return D_().def(this.defaults.integer);
  } }, { key: "symbol", get: function() {
    return z_();
  } }]), e;
})();
function tC(e) {
  var t;
  return e === void 0 && (e = { func: function() {
  }, bool: !0, string: "", number: 0, array: function() {
    return [];
  }, object: function() {
    return {};
  }, integer: 0 }), (t = (function(n) {
    function o() {
      return n.apply(this, arguments) || this;
    }
    return YS(o, n), KS(o, null, [{ key: "sensibleDefaults", get: function() {
      return rd({}, this.defaults);
    }, set: function(i) {
      this.defaults = i !== !1 ? rd({}, i !== !0 ? i : e) : {};
    } }]), o;
  })(da)).defaults = rd({}, e), t;
}
da.defaults = {}, da.custom = R_, da.oneOf = N_, da.instanceOf = L_, da.oneOfType = B_, da.arrayOf = F_, da.objectOf = H_, da.shape = V_, da.utils = { validate: function(e, t) {
  return Cl(t, e) === !0;
}, toType: function(e, t, n) {
  return n === void 0 && (n = !1), n ? ma(e, t) : li(e, t);
} };
(function(e) {
  function t() {
    return e.apply(this, arguments) || this;
  }
  return YS(t, e), t;
})(tC());
const ue = tC({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  array: void 0,
  object: void 0,
  integer: void 0
});
ue.extend([{
  name: "looseBool",
  getter: !0,
  type: Boolean,
  default: void 0
}, {
  name: "style",
  getter: !0,
  type: [String, Object],
  default: void 0
}, {
  name: "VueNode",
  getter: !0,
  type: null
}]);
function j_(e) {
  return e.default = void 0, e;
}
const Ln = ((e, t, n) => {
  Jo(e, `[ant-design-vue: ${t}] ${n}`);
});
function S0(e, t) {
  const {
    key: n
  } = e;
  let o;
  return "value" in e && ({
    value: o
  } = e), n ?? (o !== void 0 ? o : `rc-index-key-${t}`);
}
function nC(e, t) {
  const {
    label: n,
    value: o,
    options: i
  } = e || {};
  return {
    label: n || (t ? "children" : "label"),
    value: o || "value",
    options: i || "options"
  };
}
function W_(e) {
  let {
    fieldNames: t,
    childrenAsData: n
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const o = [], {
    label: i,
    value: a,
    options: r
  } = nC(t, !1);
  function l(s, u) {
    s.forEach((c) => {
      const d = c[i];
      if (u || !(r in c)) {
        const f = c[a];
        o.push({
          key: S0(c, o.length),
          groupOption: u,
          data: c,
          label: d,
          value: f
        });
      } else {
        let f = d;
        f === void 0 && n && (f = c.label), o.push({
          key: S0(c, o.length),
          group: !0,
          data: c,
          label: f
        }), l(c[r], !0);
      }
    });
  }
  return l(e, !1), o;
}
function Yg(e) {
  const t = I({}, e);
  return "props" in t || Object.defineProperty(t, "props", {
    get() {
      return yo(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
    }
  }), t;
}
function q_(e, t) {
  if (!t || !t.length)
    return null;
  let n = !1;
  function o(a, r) {
    let [l, ...s] = r;
    if (!l)
      return [a];
    const u = a.split(l);
    return n = n || u.length > 1, u.reduce((c, d) => [...c, ...o(d, s)], []).filter((c) => c);
  }
  const i = o(e, t);
  return n ? i : null;
}
function G_() {
  return "";
}
function K_(e) {
  return e ? e.ownerDocument : window.document;
}
function oC() {
}
const Y_ = () => ({
  action: ue.oneOfType([ue.string, ue.arrayOf(ue.string)]).def([]),
  showAction: ue.any.def([]),
  hideAction: ue.any.def([]),
  getPopupClassNameFromAlign: ue.any.def(G_),
  onPopupVisibleChange: Function,
  afterPopupVisibleChange: ue.func.def(oC),
  popup: ue.any,
  arrow: ue.bool.def(!0),
  popupStyle: {
    type: Object,
    default: void 0
  },
  prefixCls: ue.string.def("rc-trigger-popup"),
  popupClassName: ue.string.def(""),
  popupPlacement: String,
  builtinPlacements: ue.object,
  popupTransitionName: String,
  popupAnimation: ue.any,
  mouseEnterDelay: ue.number.def(0),
  mouseLeaveDelay: ue.number.def(0.1),
  zIndex: Number,
  focusDelay: ue.number.def(0),
  blurDelay: ue.number.def(0.15),
  getPopupContainer: Function,
  getDocument: ue.func.def(K_),
  forceRender: {
    type: Boolean,
    default: void 0
  },
  destroyPopupOnHide: {
    type: Boolean,
    default: !1
  },
  mask: {
    type: Boolean,
    default: !1
  },
  maskClosable: {
    type: Boolean,
    default: !0
  },
  // onPopupAlign: PropTypes.func.def(noop),
  popupAlign: ue.object.def(() => ({})),
  popupVisible: {
    type: Boolean,
    default: void 0
  },
  defaultPopupVisible: {
    type: Boolean,
    default: !1
  },
  maskTransitionName: String,
  maskAnimation: String,
  stretch: String,
  alignPoint: {
    type: Boolean,
    default: void 0
  },
  autoDestroy: {
    type: Boolean,
    default: !1
  },
  mobile: Object,
  getTriggerDOMNode: Function
}), Sv = {
  visible: Boolean,
  prefixCls: String,
  zIndex: Number,
  destroyPopupOnHide: Boolean,
  forceRender: Boolean,
  arrow: {
    type: Boolean,
    default: !0
  },
  // Legacy Motion
  animation: [String, Object],
  transitionName: String,
  // Measure
  stretch: {
    type: String
  },
  // Align
  align: {
    type: Object
  },
  point: {
    type: Object
  },
  getRootDomNode: {
    type: Function
  },
  getClassNameFromAlign: {
    type: Function
  },
  onAlign: {
    type: Function
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onTouchstart: {
    type: Function
  }
}, U_ = I(I({}, Sv), {
  mobile: {
    type: Object
  }
}), X_ = I(I({}, Sv), {
  mask: Boolean,
  mobile: {
    type: Object
  },
  maskAnimation: String,
  maskTransitionName: String
});
function Cv(e) {
  let {
    prefixCls: t,
    animation: n,
    transitionName: o
  } = e;
  return n ? {
    name: `${t}-${n}`
  } : o ? {
    name: o
  } : {};
}
function iC(e) {
  const {
    prefixCls: t,
    visible: n,
    zIndex: o,
    mask: i,
    maskAnimation: a,
    maskTransitionName: r
  } = e;
  if (!i)
    return null;
  let l = {};
  return (r || a) && (l = Cv({
    prefixCls: t,
    transitionName: r,
    animation: a
  })), v(Mi, Z({
    appear: !0
  }, l), {
    default: () => [Qi(v("div", {
      style: {
        zIndex: o
      },
      class: `${t}-mask`
    }, null), [[iO("if"), n]])]
  });
}
iC.displayName = "Mask";
const Q_ = ye({
  compatConfig: {
    MODE: 3
  },
  name: "MobilePopupInner",
  inheritAttrs: !1,
  props: U_,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = le();
    return n({
      forceAlign: () => {
      },
      getElement: () => i.value
    }), () => {
      var a;
      const {
        zIndex: r,
        visible: l,
        prefixCls: s,
        mobile: {
          popupClassName: u,
          popupStyle: c,
          popupMotion: d = {},
          popupRender: f
        } = {}
      } = e, g = I({
        zIndex: r
      }, c);
      let m = to((a = o.default) === null || a === void 0 ? void 0 : a.call(o));
      m.length > 1 && (m = v("div", {
        class: `${s}-content`
      }, [m])), f && (m = f(m));
      const b = Te(s, u);
      return v(Mi, Z({
        ref: i
      }, d), {
        default: () => [l ? v("div", {
          class: b,
          style: g
        }, [m]) : null]
      });
    };
  }
});
var Z_ = function(e, t, n, o) {
  function i(a) {
    return a instanceof n ? a : new n(function(r) {
      r(a);
    });
  }
  return new (n || (n = Promise))(function(a, r) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        r(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        r(d);
      }
    }
    function u(c) {
      c.done ? a(c.value) : i(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const C0 = ["measure", "align", null, "motion"], J_ = ((e, t) => {
  const n = Pe(null), o = Pe(), i = Pe(!1);
  function a(s) {
    i.value || (n.value = s);
  }
  function r() {
    Mt.cancel(o.value);
  }
  function l(s) {
    r(), o.value = Mt(() => {
      let u = n.value;
      switch (n.value) {
        case "align":
          u = "motion";
          break;
        case "motion":
          u = "stable";
          break;
      }
      a(u), s?.();
    });
  }
  return Ie(e, () => {
    a("measure");
  }, {
    immediate: !0,
    flush: "post"
  }), Pt(() => {
    Ie(n, () => {
      switch (n.value) {
        case "measure":
          t();
          break;
      }
      n.value && (o.value = Mt(() => Z_(void 0, void 0, void 0, function* () {
        const s = C0.indexOf(n.value), u = C0[s + 1];
        u && s !== -1 && a(u);
      })));
    }, {
      immediate: !0,
      flush: "post"
    });
  }), At(() => {
    i.value = !0, r();
  }), [n, l];
}), eA = ((e) => {
  const t = Pe({
    width: 0,
    height: 0
  });
  function n(i) {
    t.value = {
      width: i.offsetWidth,
      height: i.offsetHeight
    };
  }
  return [R(() => {
    const i = {};
    if (e.value) {
      const {
        width: a,
        height: r
      } = t.value;
      e.value.indexOf("height") !== -1 && r ? i.height = `${r}px` : e.value.indexOf("minHeight") !== -1 && r && (i.minHeight = `${r}px`), e.value.indexOf("width") !== -1 && a ? i.width = `${a}px` : e.value.indexOf("minWidth") !== -1 && a && (i.minWidth = `${a}px`);
    }
    return i;
  }), n];
});
function $0(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(i) {
      return Object.getOwnPropertyDescriptor(e, i).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function P0(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? $0(Object(n), !0).forEach(function(o) {
      tA(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $0(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function Ug(e) {
  "@babel/helpers - typeof";
  return Ug = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Ug(e);
}
function tA(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
var ru, nA = {
  Webkit: "-webkit-",
  Moz: "-moz-",
  // IE did it wrong again ...
  ms: "-ms-",
  O: "-o-"
};
function _d() {
  if (ru !== void 0)
    return ru;
  ru = "";
  var e = document.createElement("p").style, t = "Transform";
  for (var n in nA)
    n + t in e && (ru = n);
  return ru;
}
function aC() {
  return _d() ? "".concat(_d(), "TransitionProperty") : "transitionProperty";
}
function hf() {
  return _d() ? "".concat(_d(), "Transform") : "transform";
}
function O0(e, t) {
  var n = aC();
  n && (e.style[n] = t, n !== "transitionProperty" && (e.style.transitionProperty = t));
}
function yp(e, t) {
  var n = hf();
  n && (e.style[n] = t, n !== "transform" && (e.style.transform = t));
}
function oA(e) {
  return e.style.transitionProperty || e.style[aC()];
}
function iA(e) {
  var t = window.getComputedStyle(e, null), n = t.getPropertyValue("transform") || t.getPropertyValue(hf());
  if (n && n !== "none") {
    var o = n.replace(/[^0-9\-.,]/g, "").split(",");
    return {
      x: parseFloat(o[12] || o[4], 0),
      y: parseFloat(o[13] || o[5], 0)
    };
  }
  return {
    x: 0,
    y: 0
  };
}
var aA = /matrix\((.*)\)/, rA = /matrix3d\((.*)\)/;
function lA(e, t) {
  var n = window.getComputedStyle(e, null), o = n.getPropertyValue("transform") || n.getPropertyValue(hf());
  if (o && o !== "none") {
    var i, a = o.match(aA);
    if (a)
      a = a[1], i = a.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), i[4] = t.x, i[5] = t.y, yp(e, "matrix(".concat(i.join(","), ")"));
    else {
      var r = o.match(rA)[1];
      i = r.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), i[12] = t.x, i[13] = t.y, yp(e, "matrix3d(".concat(i.join(","), ")"));
    }
  } else
    yp(e, "translateX(".concat(t.x, "px) translateY(").concat(t.y, "px) translateZ(0)"));
}
var sA = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, Qu;
function I0(e) {
  var t = e.style.display;
  e.style.display = "none", e.offsetHeight, e.style.display = t;
}
function ls(e, t, n) {
  var o = n;
  if (Ug(t) === "object") {
    for (var i in t)
      t.hasOwnProperty(i) && ls(e, i, t[i]);
    return;
  }
  if (typeof o < "u") {
    typeof o == "number" && (o = "".concat(o, "px")), e.style[t] = o;
    return;
  }
  return Qu(e, t);
}
function uA(e) {
  var t, n, o, i = e.ownerDocument, a = i.body, r = i && i.documentElement;
  return t = e.getBoundingClientRect(), n = Math.floor(t.left), o = Math.floor(t.top), n -= r.clientLeft || a.clientLeft || 0, o -= r.clientTop || a.clientTop || 0, {
    left: n,
    top: o
  };
}
function rC(e, t) {
  var n = e["page".concat(t ? "Y" : "X", "Offset")], o = "scroll".concat(t ? "Top" : "Left");
  if (typeof n != "number") {
    var i = e.document;
    n = i.documentElement[o], typeof n != "number" && (n = i.body[o]);
  }
  return n;
}
function lC(e) {
  return rC(e);
}
function sC(e) {
  return rC(e, !0);
}
function Vu(e) {
  var t = uA(e), n = e.ownerDocument, o = n.defaultView || n.parentWindow;
  return t.left += lC(o), t.top += sC(o), t;
}
function $v(e) {
  return e != null && e == e.window;
}
function uC(e) {
  return $v(e) ? e.document : e.nodeType === 9 ? e : e.ownerDocument;
}
function cA(e, t, n) {
  var o = n, i = "", a = uC(e);
  return o = o || a.defaultView.getComputedStyle(e, null), o && (i = o.getPropertyValue(t) || o[t]), i;
}
var dA = new RegExp("^(".concat(sA, ")(?!px)[a-z%]+$"), "i"), fA = /^(top|right|bottom|left)$/, xp = "currentStyle", wp = "runtimeStyle", Gr = "left", pA = "px";
function gA(e, t) {
  var n = e[xp] && e[xp][t];
  if (dA.test(n) && !fA.test(t)) {
    var o = e.style, i = o[Gr], a = e[wp][Gr];
    e[wp][Gr] = e[xp][Gr], o[Gr] = t === "fontSize" ? "1em" : n || 0, n = o.pixelLeft + pA, o[Gr] = i, e[wp][Gr] = a;
  }
  return n === "" ? "auto" : n;
}
typeof window < "u" && (Qu = window.getComputedStyle ? cA : gA);
function Ec(e, t) {
  return e === "left" ? t.useCssRight ? "right" : e : t.useCssBottom ? "bottom" : e;
}
function M0(e) {
  if (e === "left")
    return "right";
  if (e === "right")
    return "left";
  if (e === "top")
    return "bottom";
  if (e === "bottom")
    return "top";
}
function T0(e, t, n) {
  ls(e, "position") === "static" && (e.style.position = "relative");
  var o = -999, i = -999, a = Ec("left", n), r = Ec("top", n), l = M0(a), s = M0(r);
  a !== "left" && (o = 999), r !== "top" && (i = 999);
  var u = "", c = Vu(e);
  ("left" in t || "top" in t) && (u = oA(e) || "", O0(e, "none")), "left" in t && (e.style[l] = "", e.style[a] = "".concat(o, "px")), "top" in t && (e.style[s] = "", e.style[r] = "".concat(i, "px")), I0(e);
  var d = Vu(e), f = {};
  for (var g in t)
    if (t.hasOwnProperty(g)) {
      var m = Ec(g, n), b = g === "left" ? o : i, y = c[g] - d[g];
      m === g ? f[m] = b + y : f[m] = b - y;
    }
  ls(e, f), I0(e), ("left" in t || "top" in t) && O0(e, u);
  var S = {};
  for (var C in t)
    if (t.hasOwnProperty(C)) {
      var O = Ec(C, n), $ = t[C] - c[C];
      C === O ? S[O] = f[O] + $ : S[O] = f[O] - $;
    }
  ls(e, S);
}
function hA(e, t) {
  var n = Vu(e), o = iA(e), i = {
    x: o.x,
    y: o.y
  };
  "left" in t && (i.x = o.x + t.left - n.left), "top" in t && (i.y = o.y + t.top - n.top), lA(e, i);
}
function vA(e, t, n) {
  if (n.ignoreShake) {
    var o = Vu(e), i = o.left.toFixed(0), a = o.top.toFixed(0), r = t.left.toFixed(0), l = t.top.toFixed(0);
    if (i === r && a === l)
      return;
  }
  n.useCssRight || n.useCssBottom ? T0(e, t, n) : n.useCssTransform && hf() in document.body.style ? hA(e, t) : T0(e, t, n);
}
function Pv(e, t) {
  for (var n = 0; n < e.length; n++)
    t(e[n]);
}
function cC(e) {
  return Qu(e, "boxSizing") === "border-box";
}
var mA = ["margin", "border", "padding"], Xg = -1, bA = 2, Qg = 1, yA = 0;
function xA(e, t, n) {
  var o = {}, i = e.style, a;
  for (a in t)
    t.hasOwnProperty(a) && (o[a] = i[a], i[a] = t[a]);
  n.call(e);
  for (a in t)
    t.hasOwnProperty(a) && (i[a] = o[a]);
}
function vu(e, t, n) {
  var o = 0, i, a, r;
  for (a = 0; a < t.length; a++)
    if (i = t[a], i)
      for (r = 0; r < n.length; r++) {
        var l = void 0;
        i === "border" ? l = "".concat(i).concat(n[r], "Width") : l = i + n[r], o += parseFloat(Qu(e, l)) || 0;
      }
  return o;
}
var ga = {
  getParent: function(t) {
    var n = t;
    do
      n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
    while (n && n.nodeType !== 1 && n.nodeType !== 9);
    return n;
  }
};
Pv(["Width", "Height"], function(e) {
  ga["doc".concat(e)] = function(t) {
    var n = t.document;
    return Math.max(
      // firefox chrome documentElement.scrollHeight< body.scrollHeight
      // ie standard mode : documentElement.scrollHeight> body.scrollHeight
      n.documentElement["scroll".concat(e)],
      // quirks : documentElement.scrollHeight 最大等于可视窗口多一点？
      n.body["scroll".concat(e)],
      ga["viewport".concat(e)](n)
    );
  }, ga["viewport".concat(e)] = function(t) {
    var n = "client".concat(e), o = t.document, i = o.body, a = o.documentElement, r = a[n];
    return o.compatMode === "CSS1Compat" && r || i && i[n] || r;
  };
});
function k0(e, t, n) {
  var o = n;
  if ($v(e))
    return t === "width" ? ga.viewportWidth(e) : ga.viewportHeight(e);
  if (e.nodeType === 9)
    return t === "width" ? ga.docWidth(e) : ga.docHeight(e);
  var i = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"], a = Math.floor(t === "width" ? e.getBoundingClientRect().width : e.getBoundingClientRect().height), r = cC(e), l = 0;
  (a == null || a <= 0) && (a = void 0, l = Qu(e, t), (l == null || Number(l) < 0) && (l = e.style[t] || 0), l = Math.floor(parseFloat(l)) || 0), o === void 0 && (o = r ? Qg : Xg);
  var s = a !== void 0 || r, u = a || l;
  return o === Xg ? s ? u - vu(e, ["border", "padding"], i) : l : s ? o === Qg ? u : u + (o === bA ? -vu(e, ["border"], i) : vu(e, ["margin"], i)) : l + vu(e, mA.slice(o), i);
}
var wA = {
  position: "absolute",
  visibility: "hidden",
  display: "block"
};
function E0() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  var o, i = t[0];
  return i.offsetWidth !== 0 ? o = k0.apply(void 0, t) : xA(i, wA, function() {
    o = k0.apply(void 0, t);
  }), o;
}
Pv(["width", "height"], function(e) {
  var t = e.charAt(0).toUpperCase() + e.slice(1);
  ga["outer".concat(t)] = function(o, i) {
    return o && E0(o, e, i ? yA : Qg);
  };
  var n = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  ga[e] = function(o, i) {
    var a = i;
    if (a !== void 0) {
      if (o) {
        var r = cC(o);
        return r && (a += vu(o, ["padding", "border"], n)), ls(o, e, a);
      }
      return;
    }
    return o && E0(o, e, Xg);
  };
});
function dC(e, t) {
  for (var n in t)
    t.hasOwnProperty(n) && (e[n] = t[n]);
  return e;
}
var Et = {
  getWindow: function(t) {
    if (t && t.document && t.setTimeout)
      return t;
    var n = t.ownerDocument || t;
    return n.defaultView || n.parentWindow;
  },
  getDocument: uC,
  offset: function(t, n, o) {
    if (typeof n < "u")
      vA(t, n, o || {});
    else
      return Vu(t);
  },
  isWindow: $v,
  each: Pv,
  css: ls,
  clone: function(t) {
    var n, o = {};
    for (n in t)
      t.hasOwnProperty(n) && (o[n] = t[n]);
    var i = t.overflow;
    if (i)
      for (n in t)
        t.hasOwnProperty(n) && (o.overflow[n] = t.overflow[n]);
    return o;
  },
  mix: dC,
  getWindowScrollLeft: function(t) {
    return lC(t);
  },
  getWindowScrollTop: function(t) {
    return sC(t);
  },
  merge: function() {
    for (var t = {}, n = 0; n < arguments.length; n++)
      Et.mix(t, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
    return t;
  },
  viewportWidth: 0,
  viewportHeight: 0
};
dC(Et, ga);
var Sp = Et.getParent;
function Zg(e) {
  if (Et.isWindow(e) || e.nodeType === 9)
    return null;
  var t = Et.getDocument(e), n = t.body, o, i = Et.css(e, "position"), a = i === "fixed" || i === "absolute";
  if (!a)
    return e.nodeName.toLowerCase() === "html" ? null : Sp(e);
  for (o = Sp(e); o && o !== n && o.nodeType !== 9; o = Sp(o))
    if (i = Et.css(o, "position"), i !== "static")
      return o;
  return null;
}
var _0 = Et.getParent;
function SA(e) {
  if (Et.isWindow(e) || e.nodeType === 9)
    return !1;
  var t = Et.getDocument(e), n = t.body, o = null;
  for (
    o = _0(e);
    // 修复元素位于 document.documentElement 下导致崩溃问题
    o && o !== n && o !== t;
    o = _0(o)
  ) {
    var i = Et.css(o, "position");
    if (i === "fixed")
      return !0;
  }
  return !1;
}
function Ov(e, t) {
  for (var n = {
    left: 0,
    right: 1 / 0,
    top: 0,
    bottom: 1 / 0
  }, o = Zg(e), i = Et.getDocument(e), a = i.defaultView || i.parentWindow, r = i.body, l = i.documentElement; o; ) {
    if ((navigator.userAgent.indexOf("MSIE") === -1 || o.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
    // viewport. In some browsers, el.offsetParent may be
    // document.documentElement, so check for that too.
    o !== r && o !== l && Et.css(o, "overflow") !== "visible") {
      var s = Et.offset(o);
      s.left += o.clientLeft, s.top += o.clientTop, n.top = Math.max(n.top, s.top), n.right = Math.min(
        n.right,
        // consider area without scrollBar
        s.left + o.clientWidth
      ), n.bottom = Math.min(n.bottom, s.top + o.clientHeight), n.left = Math.max(n.left, s.left);
    } else if (o === r || o === l)
      break;
    o = Zg(o);
  }
  var u = null;
  if (!Et.isWindow(e) && e.nodeType !== 9) {
    u = e.style.position;
    var c = Et.css(e, "position");
    c === "absolute" && (e.style.position = "fixed");
  }
  var d = Et.getWindowScrollLeft(a), f = Et.getWindowScrollTop(a), g = Et.viewportWidth(a), m = Et.viewportHeight(a), b = l.scrollWidth, y = l.scrollHeight, S = window.getComputedStyle(r);
  if (S.overflowX === "hidden" && (b = a.innerWidth), S.overflowY === "hidden" && (y = a.innerHeight), e.style && (e.style.position = u), t || SA(e))
    n.left = Math.max(n.left, d), n.top = Math.max(n.top, f), n.right = Math.min(n.right, d + g), n.bottom = Math.min(n.bottom, f + m);
  else {
    var C = Math.max(b, d + g);
    n.right = Math.min(n.right, C);
    var O = Math.max(y, f + m);
    n.bottom = Math.min(n.bottom, O);
  }
  return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
}
function CA(e, t, n, o) {
  var i = Et.clone(e), a = {
    width: t.width,
    height: t.height
  };
  return o.adjustX && i.left < n.left && (i.left = n.left), o.resizeWidth && i.left >= n.left && i.left + a.width > n.right && (a.width -= i.left + a.width - n.right), o.adjustX && i.left + a.width > n.right && (i.left = Math.max(n.right - a.width, n.left)), o.adjustY && i.top < n.top && (i.top = n.top), o.resizeHeight && i.top >= n.top && i.top + a.height > n.bottom && (a.height -= i.top + a.height - n.bottom), o.adjustY && i.top + a.height > n.bottom && (i.top = Math.max(n.bottom - a.height, n.top)), Et.mix(i, a);
}
function Iv(e) {
  var t, n, o;
  if (!Et.isWindow(e) && e.nodeType !== 9)
    t = Et.offset(e), n = Et.outerWidth(e), o = Et.outerHeight(e);
  else {
    var i = Et.getWindow(e);
    t = {
      left: Et.getWindowScrollLeft(i),
      top: Et.getWindowScrollTop(i)
    }, n = Et.viewportWidth(i), o = Et.viewportHeight(i);
  }
  return t.width = n, t.height = o, t;
}
function A0(e, t) {
  var n = t.charAt(0), o = t.charAt(1), i = e.width, a = e.height, r = e.left, l = e.top;
  return n === "c" ? l += a / 2 : n === "b" && (l += a), o === "c" ? r += i / 2 : o === "r" && (r += i), {
    left: r,
    top: l
  };
}
function _c(e, t, n, o, i) {
  var a = A0(t, n[1]), r = A0(e, n[0]), l = [r.left - a.left, r.top - a.top];
  return {
    left: Math.round(e.left - l[0] + o[0] - i[0]),
    top: Math.round(e.top - l[1] + o[1] - i[1])
  };
}
function D0(e, t, n) {
  return e.left < n.left || e.left + t.width > n.right;
}
function z0(e, t, n) {
  return e.top < n.top || e.top + t.height > n.bottom;
}
function $A(e, t, n) {
  return e.left > n.right || e.left + t.width < n.left;
}
function PA(e, t, n) {
  return e.top > n.bottom || e.top + t.height < n.top;
}
function Ac(e, t, n) {
  var o = [];
  return Et.each(e, function(i) {
    o.push(i.replace(t, function(a) {
      return n[a];
    }));
  }), o;
}
function Dc(e, t) {
  return e[t] = -e[t], e;
}
function R0(e, t) {
  var n;
  return /%$/.test(e) ? n = parseInt(e.substring(0, e.length - 1), 10) / 100 * t : n = parseInt(e, 10), n || 0;
}
function N0(e, t) {
  e[0] = R0(e[0], t.width), e[1] = R0(e[1], t.height);
}
function fC(e, t, n, o) {
  var i = n.points, a = n.offset || [0, 0], r = n.targetOffset || [0, 0], l = n.overflow, s = n.source || e;
  a = [].concat(a), r = [].concat(r), l = l || {};
  var u = {}, c = 0, d = !!(l && l.alwaysByViewport), f = Ov(s, d), g = Iv(s);
  N0(a, g), N0(r, t);
  var m = _c(g, t, i, a, r), b = Et.merge(g, m);
  if (f && (l.adjustX || l.adjustY) && o) {
    if (l.adjustX && D0(m, g, f)) {
      var y = Ac(i, /[lr]/gi, {
        l: "r",
        r: "l"
      }), S = Dc(a, 0), C = Dc(r, 0), O = _c(g, t, y, S, C);
      $A(O, g, f) || (c = 1, i = y, a = S, r = C);
    }
    if (l.adjustY && z0(m, g, f)) {
      var $ = Ac(i, /[tb]/gi, {
        t: "b",
        b: "t"
      }), P = Dc(a, 1), k = Dc(r, 1), x = _c(g, t, $, P, k);
      PA(x, g, f) || (c = 1, i = $, a = P, r = k);
    }
    c && (m = _c(g, t, i, a, r), Et.mix(b, m));
    var E = D0(m, g, f), z = z0(m, g, f);
    if (E || z) {
      var B = i;
      E && (B = Ac(i, /[lr]/gi, {
        l: "r",
        r: "l"
      })), z && (B = Ac(i, /[tb]/gi, {
        t: "b",
        b: "t"
      })), i = B, a = n.offset || [0, 0], r = n.targetOffset || [0, 0];
    }
    u.adjustX = l.adjustX && E, u.adjustY = l.adjustY && z, (u.adjustX || u.adjustY) && (b = CA(m, g, f, u));
  }
  return b.width !== g.width && Et.css(s, "width", Et.width(s) + b.width - g.width), b.height !== g.height && Et.css(s, "height", Et.height(s) + b.height - g.height), Et.offset(s, {
    left: b.left,
    top: b.top
  }, {
    useCssRight: n.useCssRight,
    useCssBottom: n.useCssBottom,
    useCssTransform: n.useCssTransform,
    ignoreShake: n.ignoreShake
  }), {
    points: i,
    offset: a,
    targetOffset: r,
    overflow: u
  };
}
function OA(e, t) {
  var n = Ov(e, t), o = Iv(e);
  return !n || o.left + o.width <= n.left || o.top + o.height <= n.top || o.left >= n.right || o.top >= n.bottom;
}
function Mv(e, t, n) {
  var o = n.target || t, i = Iv(o), a = !OA(o, n.overflow && n.overflow.alwaysByViewport);
  return fC(e, i, n, a);
}
Mv.__getOffsetParent = Zg;
Mv.__getVisibleRectForElement = Ov;
function IA(e, t, n) {
  var o, i, a = Et.getDocument(e), r = a.defaultView || a.parentWindow, l = Et.getWindowScrollLeft(r), s = Et.getWindowScrollTop(r), u = Et.viewportWidth(r), c = Et.viewportHeight(r);
  "pageX" in t ? o = t.pageX : o = l + t.clientX, "pageY" in t ? i = t.pageY : i = s + t.clientY;
  var d = {
    left: o,
    top: i,
    width: 0,
    height: 0
  }, f = o >= 0 && o <= l + u && i >= 0 && i <= s + c, g = [n.points[0], "cc"];
  return fC(e, d, P0(P0({}, n), {}, {
    points: g
  }), f);
}
function An(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, i = e;
  if (Array.isArray(e) && (i = Go(e)[0]), !i)
    return null;
  const a = gl(i, t, o);
  return a.props = n ? I(I({}, a.props), t) : a.props, Qn(typeof a.props.class != "object", "class must be string"), a;
}
function MA(e, t, n) {
  Pr(gl(e, I({}, t)), n);
}
const pC = (e) => (e || []).some((t) => Xi(t) ? !(t.type === U1 || t.type === He && !pC(t.children)) : !0) ? e : null;
function TA(e, t, n, o) {
  var i;
  const a = (i = e[t]) === null || i === void 0 ? void 0 : i.call(e, n);
  return pC(a) ? a : o?.();
}
const Tv = ((e) => {
  if (!e)
    return !1;
  if (e.offsetParent)
    return !0;
  if (e.getBBox) {
    const t = e.getBBox();
    if (t.width || t.height)
      return !0;
  }
  if (e.getBoundingClientRect) {
    const t = e.getBoundingClientRect();
    if (t.width || t.height)
      return !0;
  }
  return !1;
});
function kA(e, t) {
  return e === t ? !0 : !e || !t ? !1 : "pageX" in t && "pageY" in t ? e.pageX === t.pageX && e.pageY === t.pageY : "clientX" in t && "clientY" in t ? e.clientX === t.clientX && e.clientY === t.clientY : !1;
}
function EA(e, t) {
  e !== document.activeElement && hr(t, e) && typeof e.focus == "function" && e.focus();
}
function B0(e, t) {
  let n = null, o = null;
  function i(r) {
    let [{
      target: l
    }] = r;
    if (!document.documentElement.contains(l)) return;
    const {
      width: s,
      height: u
    } = l.getBoundingClientRect(), c = Math.floor(s), d = Math.floor(u);
    (n !== c || o !== d) && Promise.resolve().then(() => {
      t({
        width: c,
        height: d
      });
    }), n = c, o = d;
  }
  const a = new nS(i);
  return e && a.observe(e), () => {
    a.disconnect();
  };
}
const _A = ((e, t) => {
  let n = !1, o = null;
  function i() {
    clearTimeout(o);
  }
  function a(r) {
    if (!n || r === !0) {
      if (e() === !1)
        return;
      n = !0, i(), o = setTimeout(() => {
        n = !1;
      }, t.value);
    } else
      i(), o = setTimeout(() => {
        n = !1, a();
      }, t.value);
  }
  return [a, () => {
    n = !1, i();
  }];
}), AA = {
  align: Object,
  target: [Object, Function],
  onAlign: Function,
  monitorBufferTime: Number,
  monitorWindowResize: Boolean,
  disabled: Boolean
};
function F0(e) {
  return typeof e != "function" ? null : e();
}
function L0(e) {
  return typeof e != "object" || !e ? null : e;
}
const DA = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Align",
  props: AA,
  emits: ["align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = le({}), a = le(), [r, l] = _A(() => {
      const {
        disabled: f,
        target: g,
        align: m,
        onAlign: b
      } = e;
      if (!f && g && a.value) {
        const y = a.value;
        let S;
        const C = F0(g), O = L0(g);
        i.value.element = C, i.value.point = O, i.value.align = m;
        const {
          activeElement: $
        } = document;
        return C && Tv(C) ? S = Mv(y, C, m) : O && (S = IA(y, O, m)), EA($, y), b && S && b(y, S), !0;
      }
      return !1;
    }, R(() => e.monitorBufferTime)), s = le({
      cancel: () => {
      }
    }), u = le({
      cancel: () => {
      }
    }), c = () => {
      const f = e.target, g = F0(f), m = L0(f);
      a.value !== u.value.element && (u.value.cancel(), u.value.element = a.value, u.value.cancel = B0(a.value, r)), (i.value.element !== g || !kA(i.value.point, m) || !Gh(i.value.align, e.align)) && (r(), s.value.element !== g && (s.value.cancel(), s.value.element = g, s.value.cancel = B0(g, r)));
    };
    Pt(() => {
      Nt(() => {
        c();
      });
    }), Ds(() => {
      Nt(() => {
        c();
      });
    }), Ie(() => e.disabled, (f) => {
      f ? l() : r();
    }, {
      immediate: !0,
      flush: "post"
    });
    const d = le(null);
    return Ie(() => e.monitorWindowResize, (f) => {
      f ? d.value || (d.value = qi(window, "resize", r)) : d.value && (d.value.remove(), d.value = null);
    }, {
      flush: "post"
    }), Bo(() => {
      s.value.cancel(), u.value.cancel(), d.value && d.value.remove(), l();
    }), n({
      forceAlign: () => r(!0)
    }), () => {
      const f = o?.default();
      return f ? An(f[0], {
        ref: a
      }, !0, !0) : null;
    };
  }
});
ri("bottomLeft", "bottomRight", "topLeft", "topRight");
const zA = (e) => e !== void 0 && (e === "topLeft" || e === "topRight") ? "slide-down" : "slide-up", bl = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return I(e ? {
    name: e,
    appear: !0,
    // type: 'animation',
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    // appearActiveClass: `antdv-base-transtion`,
    // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
    enterFromClass: `${e}-enter ${e}-enter-prepare ${e}-enter-start`,
    enterActiveClass: `${e}-enter ${e}-enter-prepare`,
    enterToClass: `${e}-enter ${e}-enter-active`,
    leaveFromClass: ` ${e}-leave`,
    leaveActiveClass: `${e}-leave ${e}-leave-active`,
    leaveToClass: `${e}-leave ${e}-leave-active`
  } : {
    css: !1
  }, t);
}, kv = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return I(e ? {
    name: e,
    appear: !0,
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    appearActiveClass: `${e}`,
    appearToClass: `${e}-appear ${e}-appear-active`,
    enterFromClass: `${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,
    enterActiveClass: `${e}`,
    enterToClass: `${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,
    leaveActiveClass: `${e} ${e}-leave`,
    leaveToClass: `${e}-leave-active`
  } : {
    css: !1
  }, t);
}, qa = (e, t, n) => n !== void 0 ? n : `${e}-${t}`, RA = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PopupInner",
  inheritAttrs: !1,
  props: Sv,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: i
    } = t;
    const a = Pe(), r = Pe(), l = Pe(), [s, u] = eA(Ut(e, "stretch")), c = () => {
      e.stretch && u(e.getRootDomNode());
    }, d = Pe(!1);
    let f;
    Ie(() => e.visible, (k) => {
      clearTimeout(f), k ? f = setTimeout(() => {
        d.value = e.visible;
      }) : d.value = !1;
    }, {
      immediate: !0
    });
    const [g, m] = J_(d, c), b = Pe(), y = () => e.point ? e.point : e.getRootDomNode, S = () => {
      var k;
      (k = a.value) === null || k === void 0 || k.forceAlign();
    }, C = (k, x) => {
      var E;
      const z = e.getClassNameFromAlign(x), B = l.value;
      l.value !== z && (l.value = z), g.value === "align" && (B !== z ? Promise.resolve().then(() => {
        S();
      }) : m(() => {
        var D;
        (D = b.value) === null || D === void 0 || D.call(b);
      }), (E = e.onAlign) === null || E === void 0 || E.call(e, k, x));
    }, O = R(() => {
      const k = typeof e.animation == "object" ? e.animation : Cv(e);
      return ["onAfterEnter", "onAfterLeave"].forEach((x) => {
        const E = k[x];
        k[x] = (z) => {
          m(), g.value = "stable", E?.(z);
        };
      }), k;
    }), $ = () => new Promise((k) => {
      b.value = k;
    });
    Ie([O, g], () => {
      !O.value && g.value === "motion" && m();
    }, {
      immediate: !0
    }), n({
      forceAlign: S,
      getElement: () => r.value.$el || r.value
    });
    const P = R(() => {
      var k;
      return !(!((k = e.align) === null || k === void 0) && k.points && (g.value === "align" || g.value === "stable"));
    });
    return () => {
      var k;
      const {
        zIndex: x,
        align: E,
        prefixCls: z,
        destroyPopupOnHide: B,
        onMouseenter: D,
        onMouseleave: W,
        onTouchstart: H = () => {
        },
        onMousedown: F
      } = e, A = g.value, U = [I(I({}, s.value), {
        zIndex: x,
        opacity: A === "motion" || A === "stable" || !d.value ? null : 0,
        // pointerEvents: statusValue === 'stable' ? null : 'none',
        pointerEvents: !d.value && A !== "stable" ? "none" : null
      }), o.style];
      let j = to((k = i.default) === null || k === void 0 ? void 0 : k.call(i, {
        visible: e.visible
      }));
      j.length > 1 && (j = v("div", {
        class: `${z}-content`
      }, [j]));
      const ae = Te(z, o.class, l.value, !e.arrow && `${z}-arrow-hidden`), Y = d.value || !e.visible ? bl(O.value.name, O.value) : {};
      return v(Mi, Z(Z({
        ref: r
      }, Y), {}, {
        onBeforeEnter: $
      }), {
        default: () => !B || e.visible ? Qi(v(DA, {
          target: y(),
          key: "popup",
          ref: a,
          monitorWindowResize: !0,
          disabled: P.value,
          align: E,
          onAlign: C
        }, {
          default: () => v("div", {
            class: ae,
            onMouseenter: D,
            onMouseleave: W,
            onMousedown: Ro(F, ["capture"]),
            [bo ? "onTouchstartPassive" : "onTouchstart"]: Ro(H, ["capture"]),
            style: U
          }, [j])
        }), [[va, d.value]]) : null
      });
    };
  }
}), NA = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Popup",
  inheritAttrs: !1,
  props: X_,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i
    } = t;
    const a = Pe(!1), r = Pe(!1), l = Pe(), s = Pe();
    return Ie([() => e.visible, () => e.mobile], () => {
      a.value = e.visible, e.visible && e.mobile && (r.value = !0);
    }, {
      immediate: !0,
      flush: "post"
    }), i({
      forceAlign: () => {
        var u;
        (u = l.value) === null || u === void 0 || u.forceAlign();
      },
      getElement: () => {
        var u;
        return (u = l.value) === null || u === void 0 ? void 0 : u.getElement();
      }
    }), () => {
      const u = I(I(I({}, e), n), {
        visible: a.value
      }), c = r.value ? v(Q_, Z(Z({}, u), {}, {
        mobile: e.mobile,
        ref: l
      }), {
        default: o.default
      }) : v(RA, Z(Z({}, u), {}, {
        ref: l
      }), {
        default: o.default
      });
      return v("div", {
        ref: s
      }, [v(iC, u, null), c]);
    };
  }
});
function BA(e, t, n) {
  return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
}
function H0(e, t, n) {
  const o = e[t] || {};
  return I(I({}, o), n);
}
function FA(e, t, n, o) {
  const {
    points: i
  } = n, a = Object.keys(e);
  for (let r = 0; r < a.length; r += 1) {
    const l = a[r];
    if (BA(e[l].points, i, o))
      return `${t}-placement-${l}`;
  }
  return "";
}
const vf = {
  methods: {
    setState() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, n = typeof e == "function" ? e(this.$data, this.$props) : e;
      if (this.getDerivedStateFromProps) {
        const o = this.getDerivedStateFromProps($k(this), I(I({}, this.$data), n));
        if (o === null)
          return;
        n = I(I({}, n), o || {});
      }
      I(this.$data, n), this._.isMounted && this.$forceUpdate(), Nt(() => {
        t && t();
      });
    },
    __emit() {
      const e = [].slice.call(arguments, 0);
      let t = e[0];
      t = `on${t[0].toUpperCase()}${t.substring(1)}`;
      const n = this.$props[t] || this.$attrs[t];
      if (e.length && n)
        if (Array.isArray(n))
          for (let o = 0, i = n.length; o < i; o++)
            n[o](...e.slice(1));
        else
          n(...e.slice(1));
    }
  }
}, gC = Symbol("PortalContextKey"), Ev = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    inTriggerContext: !0
  };
  kt(gC, {
    inTriggerContext: t.inTriggerContext,
    shouldRender: R(() => {
      const {
        sPopupVisible: n,
        popupRef: o,
        forceRender: i,
        autoDestroy: a
      } = e || {};
      let r = !1;
      return (n || o || i) && (r = !0), !n && a && (r = !1), r;
    })
  });
}, LA = () => {
  Ev({}, {
    inTriggerContext: !1
  });
  const e = Tt(gC, {
    shouldRender: R(() => !1),
    inTriggerContext: !1
  });
  return {
    shouldRender: R(() => e.shouldRender.value || e.inTriggerContext === !1)
  };
}, hC = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Portal",
  inheritAttrs: !1,
  props: {
    getContainer: ue.func.isRequired,
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t, o = !0, i;
    const {
      shouldRender: a
    } = LA();
    function r() {
      a.value && (i = e.getContainer());
    }
    Yd(() => {
      o = !1, r();
    }), Pt(() => {
      i || r();
    });
    const l = Ie(a, () => {
      a.value && !i && (i = e.getContainer()), i && l();
    });
    return Ds(() => {
      Nt(() => {
        var s;
        a.value && ((s = e.didUpdate) === null || s === void 0 || s.call(e, e));
      });
    }), () => {
      var s;
      return a.value ? o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : i ? v(Ud, {
        to: i
      }, n) : null : null;
    };
  }
});
let Cp;
function HA(e) {
  if (typeof document > "u")
    return 0;
  if (Cp === void 0) {
    const t = document.createElement("div");
    t.style.width = "100%", t.style.height = "200px";
    const n = document.createElement("div"), o = n.style;
    o.position = "absolute", o.top = "0", o.left = "0", o.pointerEvents = "none", o.visibility = "hidden", o.width = "200px", o.height = "150px", o.overflow = "hidden", n.appendChild(t), document.body.appendChild(n);
    const i = t.offsetWidth;
    n.style.overflow = "scroll";
    let a = t.offsetWidth;
    i === a && (a = n.clientWidth), document.body.removeChild(n), Cp = i - a;
  }
  return Cp;
}
const VA = `vc-util-locker-${Date.now()}`;
let V0 = 0;
function jA() {
  return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
function WA(e) {
  const t = R(() => !!e && !!e.value);
  V0 += 1;
  const n = `${VA}_${V0}`;
  Ft((o) => {
    if (Ti()) {
      if (t.value) {
        const i = HA(), a = jA();
        Bu(`
html body {
  overflow-y: hidden;
  ${a ? `width: calc(100% - ${i}px);` : ""}
}`, n);
      } else
        Td(n);
      o(() => {
        Td(n);
      });
    }
  }, {
    flush: "post"
  });
}
let Kr = 0;
const ld = Ti(), j0 = (e) => {
  if (!ld)
    return null;
  if (e) {
    if (typeof e == "string")
      return document.querySelectorAll(e)[0];
    if (typeof e == "function")
      return e();
    if (typeof e == "object" && e instanceof window.HTMLElement)
      return e;
  }
  return document.body;
}, _v = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PortalWrapper",
  inheritAttrs: !1,
  props: {
    wrapperClassName: String,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getContainer: ue.any,
    visible: {
      type: Boolean,
      default: void 0
    },
    autoLock: st(),
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Pe(), i = Pe(), a = Pe(), r = Pe(1), l = Ti() && document.createElement("div"), s = () => {
      var g, m;
      o.value === l && ((m = (g = o.value) === null || g === void 0 ? void 0 : g.parentNode) === null || m === void 0 || m.removeChild(o.value)), o.value = null;
    };
    let u = null;
    const c = function() {
      return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || o.value && !o.value.parentNode ? (u = j0(e.getContainer), u ? (u.appendChild(o.value), !0) : !1) : !0;
    }, d = () => ld ? (o.value || (o.value = l, c(!0)), f(), o.value) : null, f = () => {
      const {
        wrapperClassName: g
      } = e;
      o.value && g && g !== o.value.className && (o.value.className = g);
    };
    return Ds(() => {
      f(), c();
    }), WA(R(() => e.autoLock && e.visible && Ti() && (o.value === document.body || o.value === l))), Pt(() => {
      let g = !1;
      Ie([() => e.visible, () => e.getContainer], (m, b) => {
        let [y, S] = m, [C, O] = b;
        ld && (u = j0(e.getContainer), u === document.body && (y && !C ? Kr += 1 : g && (Kr -= 1))), g && (typeof S == "function" && typeof O == "function" ? S.toString() !== O.toString() : S !== O) && s(), g = !0;
      }, {
        immediate: !0,
        flush: "post"
      }), Nt(() => {
        c() || (a.value = Mt(() => {
          r.value += 1;
        }));
      });
    }), At(() => {
      const {
        visible: g
      } = e;
      ld && u === document.body && (Kr = g && Kr ? Kr - 1 : Kr), s(), Mt.cancel(a.value);
    }), () => {
      const {
        forceRender: g,
        visible: m
      } = e;
      let b = null;
      const y = {
        getOpenCount: () => Kr,
        getContainer: d
      };
      return r.value && (g || m || i.value) && (b = v(hC, {
        getContainer: d,
        ref: i,
        didUpdate: e.didUpdate
      }, {
        default: () => {
          var S;
          return (S = n.default) === null || S === void 0 ? void 0 : S.call(n, y);
        }
      })), b;
    };
  }
}), qA = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], Zu = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Trigger",
  mixins: [vf],
  inheritAttrs: !1,
  props: Y_(),
  setup(e) {
    const t = R(() => {
      const {
        popupPlacement: i,
        popupAlign: a,
        builtinPlacements: r
      } = e;
      return i && r ? H0(r, i, a) : a;
    }), n = Pe(null), o = (i) => {
      n.value = i;
    };
    return {
      vcTriggerContext: Tt("vcTriggerContext", {}),
      popupRef: n,
      setPopupRef: o,
      triggerRef: Pe(null),
      align: t,
      focusTime: null,
      clickOutsideHandler: null,
      contextmenuOutsideHandler1: null,
      contextmenuOutsideHandler2: null,
      touchOutsideHandler: null,
      attachId: null,
      delayTimer: null,
      hasPopupMouseDown: !1,
      preClickTime: null,
      preTouchTime: null,
      mouseDownTimeout: null,
      childOriginEvents: {}
    };
  },
  data() {
    const e = this.$props;
    let t;
    return this.popupVisible !== void 0 ? t = !!e.popupVisible : t = !!e.defaultPopupVisible, qA.forEach((n) => {
      this[`fire${n}`] = (o) => {
        this.fireEvents(n, o);
      };
    }), {
      prevPopupVisible: t,
      sPopupVisible: t,
      point: null
    };
  },
  watch: {
    popupVisible(e) {
      e !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = e);
    }
  },
  created() {
    kt("vcTriggerContext", {
      onPopupMouseDown: this.onPopupMouseDown,
      onPopupMouseenter: this.onPopupMouseenter,
      onPopupMouseleave: this.onPopupMouseleave
    }), Ev(this);
  },
  deactivated() {
    this.setPopupVisible(!1);
  },
  mounted() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  updated() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  beforeUnmount() {
    this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), Mt.cancel(this.attachId);
  },
  methods: {
    updatedCal() {
      const e = this.$props;
      if (this.$data.sPopupVisible) {
        let n;
        !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = e.getDocument(this.getRootDomNode()), this.clickOutsideHandler = qi(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || e.getDocument(this.getRootDomNode()), this.touchOutsideHandler = qi(n, "touchstart", this.onDocumentClick, bo ? {
          passive: !1
        } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || e.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = qi(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = qi(window, "blur", this.onContextmenuClose));
      } else
        this.clearOutsideHandler();
    },
    onMouseenter(e) {
      const {
        mouseEnterDelay: t
      } = this.$props;
      this.fireEvents("onMouseenter", e), this.delaySetPopupVisible(!0, t, t ? null : e);
    },
    onMouseMove(e) {
      this.fireEvents("onMousemove", e), this.setPoint(e);
    },
    onMouseleave(e) {
      this.fireEvents("onMouseleave", e), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
    },
    onPopupMouseenter() {
      const {
        vcTriggerContext: e = {}
      } = this;
      e.onPopupMouseenter && e.onPopupMouseenter(), this.clearDelayTimer();
    },
    onPopupMouseleave(e) {
      var t;
      if (e && e.relatedTarget && !e.relatedTarget.setTimeout && hr((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement(), e.relatedTarget))
        return;
      this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
      const {
        vcTriggerContext: n = {}
      } = this;
      n.onPopupMouseleave && n.onPopupMouseleave(e);
    },
    onFocus(e) {
      this.fireEvents("onFocus", e), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
    },
    onMousedown(e) {
      this.fireEvents("onMousedown", e), this.preClickTime = Date.now();
    },
    onTouchstart(e) {
      this.fireEvents("onTouchstart", e), this.preTouchTime = Date.now();
    },
    onBlur(e) {
      hr(e.target, e.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", e), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
    },
    onContextmenu(e) {
      e.preventDefault(), this.fireEvents("onContextmenu", e), this.setPopupVisible(!0, e);
    },
    onContextmenuClose() {
      this.isContextmenuToShow() && this.close();
    },
    onClick(e) {
      if (this.fireEvents("onClick", e), this.focusTime) {
        let n;
        if (this.preClickTime && this.preTouchTime ? n = Math.min(this.preClickTime, this.preTouchTime) : this.preClickTime ? n = this.preClickTime : this.preTouchTime && (n = this.preTouchTime), Math.abs(n - this.focusTime) < 20)
          return;
        this.focusTime = 0;
      }
      this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && e && e.preventDefault && e.preventDefault(), e && e.domEvent && e.domEvent.preventDefault();
      const t = !this.$data.sPopupVisible;
      (this.isClickToHide() && !t || t && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, e);
    },
    onPopupMouseDown() {
      const {
        vcTriggerContext: e = {}
      } = this;
      this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
        this.hasPopupMouseDown = !1;
      }, 0), e.onPopupMouseDown && e.onPopupMouseDown(...arguments);
    },
    onDocumentClick(e) {
      if (this.$props.mask && !this.$props.maskClosable)
        return;
      const t = e.target, n = this.getRootDomNode(), o = this.getPopupDomNode();
      // mousedown on the target should also close popup when action is contextMenu.
      // https://github.com/ant-design/ant-design/issues/29853
      (!hr(n, t) || this.isContextMenuOnly()) && !hr(o, t) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
    },
    getPopupDomNode() {
      var e;
      return ((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement()) || null;
    },
    getRootDomNode() {
      var e, t, n, o;
      const {
        getTriggerDOMNode: i
      } = this.$props;
      if (i) {
        const a = ((t = (e = this.triggerRef) === null || e === void 0 ? void 0 : e.$el) === null || t === void 0 ? void 0 : t.nodeName) === "#comment" ? null : Ra(this.triggerRef);
        return Ra(i(a));
      }
      try {
        const a = ((o = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || o === void 0 ? void 0 : o.nodeName) === "#comment" ? null : Ra(this.triggerRef);
        if (a)
          return a;
      } catch {
      }
      return Ra(this);
    },
    handleGetPopupClassFromAlign(e) {
      const t = [], n = this.$props, {
        popupPlacement: o,
        builtinPlacements: i,
        prefixCls: a,
        alignPoint: r,
        getPopupClassNameFromAlign: l
      } = n;
      return o && i && t.push(FA(i, a, e, r)), l && t.push(l(e)), t.join(" ");
    },
    getPopupAlign() {
      const e = this.$props, {
        popupPlacement: t,
        popupAlign: n,
        builtinPlacements: o
      } = e;
      return t && o ? H0(o, t, n) : n;
    },
    getComponent() {
      const e = {};
      this.isMouseEnterToShow() && (e.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (e.onMouseleave = this.onPopupMouseleave), e.onMousedown = this.onPopupMouseDown, e[bo ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
      const {
        handleGetPopupClassFromAlign: t,
        getRootDomNode: n,
        $attrs: o
      } = this, {
        prefixCls: i,
        destroyPopupOnHide: a,
        popupClassName: r,
        popupAnimation: l,
        popupTransitionName: s,
        popupStyle: u,
        mask: c,
        maskAnimation: d,
        maskTransitionName: f,
        zIndex: g,
        stretch: m,
        alignPoint: b,
        mobile: y,
        arrow: S,
        forceRender: C
      } = this.$props, {
        sPopupVisible: O,
        point: $
      } = this.$data, P = I(I({
        prefixCls: i,
        arrow: S,
        destroyPopupOnHide: a,
        visible: O,
        point: b ? $ : null,
        align: this.align,
        animation: l,
        getClassNameFromAlign: t,
        stretch: m,
        getRootDomNode: n,
        mask: c,
        zIndex: g,
        transitionName: s,
        maskAnimation: d,
        maskTransitionName: f,
        class: r,
        style: u,
        onAlign: o.onPopupAlign || oC
      }, e), {
        ref: this.setPopupRef,
        mobile: y,
        forceRender: C
      });
      return v(NA, P, {
        default: this.$slots.popup || (() => Pk(this, "popup"))
      });
    },
    attachParent(e) {
      Mt.cancel(this.attachId);
      const {
        getPopupContainer: t,
        getDocument: n
      } = this.$props, o = this.getRootDomNode();
      let i;
      t ? (o || t.length === 0) && (i = t(o)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(e) : this.attachId = Mt(() => {
        this.attachParent(e);
      });
    },
    getContainer() {
      const {
        $props: e
      } = this, {
        getDocument: t
      } = e, n = t(this.getRootDomNode()).createElement("div");
      return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
    },
    setPopupVisible(e, t) {
      const {
        alignPoint: n,
        sPopupVisible: o,
        onPopupVisibleChange: i
      } = this;
      this.clearDelayTimer(), o !== e && (Id(this, "popupVisible") || this.setState({
        sPopupVisible: e,
        prevPopupVisible: o
      }), i && i(e)), n && t && e && this.setPoint(t);
    },
    setPoint(e) {
      const {
        alignPoint: t
      } = this.$props;
      !t || !e || this.setState({
        point: {
          pageX: e.pageX,
          pageY: e.pageY
        }
      });
    },
    handlePortalUpdate() {
      this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
    },
    delaySetPopupVisible(e, t, n) {
      const o = t * 1e3;
      if (this.clearDelayTimer(), o) {
        const i = n ? {
          pageX: n.pageX,
          pageY: n.pageY
        } : null;
        this.delayTimer = setTimeout(() => {
          this.setPopupVisible(e, i), this.clearDelayTimer();
        }, o);
      } else
        this.setPopupVisible(e, n);
    },
    clearDelayTimer() {
      this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
    },
    clearOutsideHandler() {
      this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextmenuOutsideHandler1 && (this.contextmenuOutsideHandler1.remove(), this.contextmenuOutsideHandler1 = null), this.contextmenuOutsideHandler2 && (this.contextmenuOutsideHandler2.remove(), this.contextmenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
    },
    createTwoChains(e) {
      let t = () => {
      };
      const n = Qb(this);
      return this.childOriginEvents[e] && n[e] ? this[`fire${e}`] : (t = this.childOriginEvents[e] || n[e] || t, t);
    },
    isClickToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("click") !== -1 || t.indexOf("click") !== -1;
    },
    isContextMenuOnly() {
      const {
        action: e
      } = this.$props;
      return e === "contextmenu" || e.length === 1 && e[0] === "contextmenu";
    },
    isContextmenuToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("contextmenu") !== -1 || t.indexOf("contextmenu") !== -1;
    },
    isClickToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("click") !== -1 || t.indexOf("click") !== -1;
    },
    isMouseEnterToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("hover") !== -1 || t.indexOf("mouseenter") !== -1;
    },
    isMouseLeaveToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("hover") !== -1 || t.indexOf("mouseleave") !== -1;
    },
    isFocusToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("focus") !== -1 || t.indexOf("focus") !== -1;
    },
    isBlurToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("focus") !== -1 || t.indexOf("blur") !== -1;
    },
    forcePopupAlign() {
      var e;
      this.$data.sPopupVisible && ((e = this.popupRef) === null || e === void 0 || e.forceAlign());
    },
    fireEvents(e, t) {
      this.childOriginEvents[e] && this.childOriginEvents[e](t);
      const n = this.$props[e] || this.$attrs[e];
      n && n(t);
    },
    close() {
      this.setPopupVisible(!1);
    }
  },
  render() {
    const {
      $attrs: e
    } = this, t = Go(iS(this)), {
      alignPoint: n,
      getPopupContainer: o
    } = this.$props, i = t[0];
    this.childOriginEvents = Qb(i);
    const a = {
      key: "trigger"
    };
    this.isContextmenuToShow() ? a.onContextmenu = this.onContextmenu : a.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (a.onClick = this.onClick, a.onMousedown = this.onMousedown, a[bo ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (a.onClick = this.createTwoChains("onClick"), a.onMousedown = this.createTwoChains("onMousedown"), a[bo ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (a.onMouseenter = this.onMouseenter, n && (a.onMousemove = this.onMouseMove)) : a.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? a.onMouseleave = this.onMouseleave : a.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (a.onFocus = this.onFocus, a.onBlur = this.onBlur) : (a.onFocus = this.createTwoChains("onFocus"), a.onBlur = (u) => {
      u && (!u.relatedTarget || !hr(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
    });
    const r = Te(i && i.props && i.props.class, e.class);
    r && (a.class = r);
    const l = An(i, I(I({}, a), {
      ref: "triggerRef"
    }), !0, !0), s = v(_v, {
      key: "portal",
      getContainer: o && (() => o(this.getRootDomNode())),
      didUpdate: this.handlePortalUpdate,
      visible: this.$data.sPopupVisible
    }, {
      default: this.getComponent
    });
    return v(He, null, [l, s]);
  }
});
var GA = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const KA = (e) => {
  const t = e === !0 ? 0 : 1;
  return {
    bottomLeft: {
      points: ["tl", "bl"],
      offset: [0, 4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    bottomRight: {
      points: ["tr", "br"],
      offset: [0, 4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    topLeft: {
      points: ["bl", "tl"],
      offset: [0, -4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    topRight: {
      points: ["br", "tr"],
      offset: [0, -4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    }
  };
}, YA = ye({
  name: "SelectTrigger",
  inheritAttrs: !1,
  props: {
    dropdownAlign: Object,
    visible: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    dropdownClassName: String,
    dropdownStyle: ue.object,
    placement: String,
    empty: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    popupClassName: String,
    animation: String,
    transitionName: String,
    getPopupContainer: Function,
    dropdownRender: Function,
    containerWidth: Number,
    dropdownMatchSelectWidth: ue.oneOfType([Number, Boolean]).def(!0),
    popupElement: ue.any,
    direction: String,
    getTriggerDOMNode: Function,
    onPopupVisibleChange: Function,
    onPopupMouseEnter: Function,
    onPopupFocusin: Function,
    onPopupFocusout: Function
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i
    } = t;
    const a = R(() => {
      const {
        dropdownMatchSelectWidth: l
      } = e;
      return KA(l);
    }), r = le();
    return i({
      getPopupElement: () => r.value
    }), () => {
      const l = I(I({}, e), o), {
        empty: s = !1
      } = l, u = GA(l, ["empty"]), {
        visible: c,
        dropdownAlign: d,
        prefixCls: f,
        popupElement: g,
        dropdownClassName: m,
        dropdownStyle: b,
        direction: y = "ltr",
        placement: S,
        dropdownMatchSelectWidth: C,
        containerWidth: O,
        dropdownRender: $,
        animation: P,
        transitionName: k,
        getPopupContainer: x,
        getTriggerDOMNode: E,
        onPopupVisibleChange: z,
        onPopupMouseEnter: B,
        onPopupFocusin: D,
        onPopupFocusout: W
      } = u, H = `${f}-dropdown`;
      let F = g;
      $ && (F = $({
        menuNode: g,
        props: e
      }));
      const A = P ? `${H}-${P}` : k, U = I({
        minWidth: `${O}px`
      }, b);
      return typeof C == "number" ? U.width = `${C}px` : C && (U.width = `${O}px`), v(Zu, Z(Z({}, e), {}, {
        showAction: z ? ["click"] : [],
        hideAction: z ? ["click"] : [],
        popupPlacement: S || (y === "rtl" ? "bottomRight" : "bottomLeft"),
        builtinPlacements: a.value,
        prefixCls: H,
        popupTransitionName: A,
        popupAlign: d,
        popupVisible: c,
        getPopupContainer: x,
        popupClassName: Te(m, {
          [`${H}-empty`]: s
        }),
        popupStyle: U,
        getTriggerDOMNode: E,
        onPopupVisibleChange: z
      }), {
        default: n.default,
        popup: () => v("div", {
          ref: r,
          onMouseenter: B,
          onFocusin: D,
          onFocusout: W
        }, [F])
      });
    };
  }
}), Xe = {
  /**
   * BACKSPACE
   */
  BACKSPACE: 8,
  /**
   * TAB
   */
  TAB: 9,
  /**
   * ENTER
   */
  ENTER: 13,
  /**
   * SHIFT
   */
  SHIFT: 16,
  /**
   * CTRL
   */
  CTRL: 17,
  /**
   * ALT
   */
  ALT: 18,
  /**
   * CAPS_LOCK
   */
  CAPS_LOCK: 20,
  /**
   * ESC
   */
  ESC: 27,
  /**
   * SPACE
   */
  SPACE: 32,
  /**
   * PAGE_UP
   */
  PAGE_UP: 33,
  /**
   * PAGE_DOWN
   */
  PAGE_DOWN: 34,
  /**
   * END
   */
  END: 35,
  /**
   * HOME
   */
  HOME: 36,
  /**
   * LEFT
   */
  LEFT: 37,
  /**
   * UP
   */
  UP: 38,
  /**
   * RIGHT
   */
  RIGHT: 39,
  /**
   * DOWN
   */
  DOWN: 40,
  /**
   * N
   */
  N: 78,
  /**
   * P
   */
  P: 80,
  /**
   * META
   */
  META: 91,
  /**
   * WIN_KEY_RIGHT
   */
  WIN_KEY_RIGHT: 92,
  /**
   * CONTEXT_MENU
   */
  CONTEXT_MENU: 93,
  /**
   * F1
   */
  F1: 112,
  /**
   * F2
   */
  F2: 113,
  /**
   * F3
   */
  F3: 114,
  /**
   * F4
   */
  F4: 115,
  /**
   * F5
   */
  F5: 116,
  /**
   * F6
   */
  F6: 117,
  /**
   * F7
   */
  F7: 118,
  /**
   * F8
   */
  F8: 119,
  /**
   * F9
   */
  F9: 120,
  /**
   * F10
   */
  F10: 121,
  /**
   * F11
   */
  F11: 122,
  /**
   * F12
   */
  F12: 123,
  /**
   * SEMICOLON
   */
  SEMICOLON: 186,
  /**
   * EQUALS
   */
  EQUALS: 187,
  /**
   * WIN_KEY
   */
  WIN_KEY: 224
}, yl = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  const {
    class: i,
    customizeIcon: a,
    customizeIconProps: r,
    onMousedown: l,
    onClick: s
  } = e;
  let u;
  return typeof a == "function" ? u = a(r) : u = Xi(a) ? gl(a) : a, v("span", {
    class: i,
    onMousedown: (c) => {
      c.preventDefault(), l && l(c);
    },
    style: {
      userSelect: "none",
      WebkitUserSelect: "none"
    },
    unselectable: "on",
    onClick: s,
    "aria-hidden": !0
  }, [u !== void 0 ? u : v("span", {
    class: i.split(/\s+/).map((c) => `${c}-icon`)
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
};
yl.inheritAttrs = !1;
yl.displayName = "TransBtn";
yl.props = {
  class: String,
  customizeIcon: ue.any,
  customizeIconProps: ue.any,
  onMousedown: Function,
  onClick: Function
};
var UA = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const XA = ye({
  compatConfig: {
    MODE: 3
  },
  // inheritAttrs: false,
  props: {
    disabled: ue.looseBool,
    type: ue.string,
    value: ue.any,
    tag: {
      type: String,
      default: "input"
    },
    size: ue.string,
    onChange: Function,
    onInput: Function,
    onBlur: Function,
    onFocus: Function,
    onKeydown: Function,
    onCompositionstart: Function,
    onCompositionend: Function,
    onKeyup: Function,
    onPaste: Function,
    onMousedown: Function
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = Pe(null);
    return n({
      focus: () => {
        o.value && o.value.focus();
      },
      blur: () => {
        o.value && o.value.blur();
      },
      input: o,
      setSelectionRange: (s, u, c) => {
        var d;
        (d = o.value) === null || d === void 0 || d.setSelectionRange(s, u, c);
      },
      select: () => {
        var s;
        (s = o.value) === null || s === void 0 || s.select();
      },
      getSelectionStart: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.selectionStart;
      },
      getSelectionEnd: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.selectionEnd;
      },
      getScrollTop: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.scrollTop;
      }
    }), () => {
      const {
        tag: s,
        value: u
      } = e, c = UA(e, ["tag", "value"]);
      return v(s, Z(Z({}, c), {}, {
        ref: o,
        value: u
      }), null);
    };
  }
});
function QA(e) {
  return Object.keys(e).reduce((t, n) => {
    const o = e[n];
    return typeof o > "u" || o === null || (t += `${n}: ${e[n]};`), t;
  }, "");
}
var ZA = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Av = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: {
    disabled: ue.looseBool,
    type: ue.string,
    value: ue.any,
    lazy: ue.bool.def(!0),
    tag: {
      type: String,
      default: "input"
    },
    size: ue.string,
    style: ue.oneOfType([String, Object]),
    class: ue.string
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      expose: i
    } = t;
    const a = Pe(null), r = le(), l = le(!1);
    Ie([() => e.value, l], () => {
      l.value || (r.value = e.value);
    }, {
      immediate: !0
    });
    const s = (x) => {
      n("change", x);
    }, u = (x) => {
      l.value = !0, x.target.composing = !0, n("compositionstart", x);
    }, c = (x) => {
      l.value = !1, x.target.composing = !1, n("compositionend", x);
      const E = document.createEvent("HTMLEvents");
      E.initEvent("input", !0, !0), x.target.dispatchEvent(E), s(x);
    }, d = (x) => {
      if (l.value && e.lazy) {
        r.value = x.target.value;
        return;
      }
      n("input", x);
    }, f = (x) => {
      n("blur", x);
    }, g = (x) => {
      n("focus", x);
    }, m = () => {
      a.value && a.value.focus();
    }, b = () => {
      a.value && a.value.blur();
    }, y = (x) => {
      n("keydown", x);
    }, S = (x) => {
      n("keyup", x);
    }, C = (x, E, z) => {
      var B;
      (B = a.value) === null || B === void 0 || B.setSelectionRange(x, E, z);
    }, O = () => {
      var x;
      (x = a.value) === null || x === void 0 || x.select();
    };
    i({
      focus: m,
      blur: b,
      input: R(() => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.input;
      }),
      setSelectionRange: C,
      select: O,
      getSelectionStart: () => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionStart();
      },
      getSelectionEnd: () => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionEnd();
      },
      getScrollTop: () => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.getScrollTop();
      }
    });
    const $ = (x) => {
      n("mousedown", x);
    }, P = (x) => {
      n("paste", x);
    }, k = R(() => e.style && typeof e.style != "string" ? QA(e.style) : e.style);
    return () => {
      const {
        style: x,
        lazy: E
      } = e, z = ZA(e, ["style", "lazy"]);
      return v(XA, Z(Z(Z({}, z), o), {}, {
        style: k.value,
        onInput: d,
        onChange: s,
        onBlur: f,
        onFocus: g,
        ref: a,
        value: r.value,
        onCompositionstart: u,
        onCompositionend: c,
        onKeyup: S,
        onKeydown: y,
        onPaste: P,
        onMousedown: $
      }), null);
    };
  }
}), JA = {
  inputRef: ue.any,
  prefixCls: String,
  id: String,
  inputElement: ue.VueNode,
  disabled: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  editable: {
    type: Boolean,
    default: void 0
  },
  activeDescendantId: String,
  value: String,
  open: {
    type: Boolean,
    default: void 0
  },
  tabindex: ue.oneOfType([ue.number, ue.string]),
  /** Pass accessibility props to input */
  attrs: ue.object,
  onKeydown: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onChange: {
    type: Function
  },
  onPaste: {
    type: Function
  },
  onCompositionstart: {
    type: Function
  },
  onCompositionend: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  }
}, vC = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SelectInput",
  inheritAttrs: !1,
  props: JA,
  setup(e) {
    let t = null;
    const n = Tt("VCSelectContainerEvent");
    return () => {
      var o;
      const {
        prefixCls: i,
        id: a,
        inputElement: r,
        disabled: l,
        tabindex: s,
        autofocus: u,
        autocomplete: c,
        editable: d,
        activeDescendantId: f,
        value: g,
        onKeydown: m,
        onMousedown: b,
        onChange: y,
        onPaste: S,
        onCompositionstart: C,
        onCompositionend: O,
        onFocus: $,
        onBlur: P,
        open: k,
        inputRef: x,
        attrs: E
      } = e;
      let z = r || v(Av, null, null);
      const B = z.props || {}, {
        onKeydown: D,
        onInput: W,
        onFocus: H,
        onBlur: F,
        onMousedown: A,
        onCompositionstart: U,
        onCompositionend: j,
        style: ae
      } = B;
      return z = An(z, I(I(I(I(I({
        type: "search"
      }, B), {
        id: a,
        ref: x,
        disabled: l,
        tabindex: s,
        lazy: !1,
        autocomplete: c || "off",
        autofocus: u,
        class: Te(`${i}-selection-search-input`, (o = z?.props) === null || o === void 0 ? void 0 : o.class),
        role: "combobox",
        "aria-expanded": k,
        "aria-haspopup": "listbox",
        "aria-owns": `${a}_list`,
        "aria-autocomplete": "list",
        "aria-controls": `${a}_list`,
        "aria-activedescendant": f
      }), E), {
        value: d ? g : "",
        readonly: !d,
        unselectable: d ? null : "on",
        style: I(I({}, ae), {
          opacity: d ? null : 0
        }),
        onKeydown: (G) => {
          m(G), D && D(G);
        },
        onMousedown: (G) => {
          b(G), A && A(G);
        },
        onInput: (G) => {
          y(G), W && W(G);
        },
        onCompositionstart(G) {
          C(G), U && U(G);
        },
        onCompositionend(G) {
          O(G), j && j(G);
        },
        onPaste: S,
        onFocus: function() {
          clearTimeout(t), H && H(arguments.length <= 0 ? void 0 : arguments[0]), $ && $(arguments.length <= 0 ? void 0 : arguments[0]), n?.focus(arguments.length <= 0 ? void 0 : arguments[0]);
        },
        onBlur: function() {
          for (var G = arguments.length, Y = new Array(G), K = 0; K < G; K++)
            Y[K] = arguments[K];
          t = setTimeout(() => {
            F && F(Y[0]), P && P(Y[0]), n?.blur(Y[0]);
          }, 100);
        }
      }), z.type === "textarea" ? {} : {
        type: "search"
      }), !0, !0), z;
    };
  }
}), eD = `accept acceptcharset accesskey action allowfullscreen allowtransparency
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
charset checked classid classname colspan cols content contenteditable contextmenu
controls coords crossorigin data datetime default defer dir disabled download draggable
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
mediagroup method min minlength multiple muted name novalidate nonce open
optimum pattern placeholder poster preload radiogroup readonly rel required
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellcheck src srcdoc srclang srcset start step style
summary tabindex target title type usemap value width wmode wrap`, tD = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
    onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
    onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
    onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
    onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
    onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
    onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, W0 = `${eD} ${tD}`.split(/[\s\n]+/), nD = "aria-", oD = "data-";
function q0(e, t) {
  return e.indexOf(t) === 0;
}
function mf(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  t === !1 ? n = {
    aria: !0,
    data: !0,
    attr: !0
  } : t === !0 ? n = {
    aria: !0
  } : n = I({}, t);
  const o = {};
  return Object.keys(e).forEach((i) => {
    // Aria
    (n.aria && (i === "role" || q0(i, nD)) || // Data
    n.data && q0(i, oD) || // Attr
    n.attr && (W0.includes(i) || W0.includes(i.toLowerCase()))) && (o[i] = e[i]);
  }), o;
}
const mC = Symbol("OverflowContextProviderKey"), Jg = ye({
  compatConfig: {
    MODE: 3
  },
  name: "OverflowContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return kt(mC, R(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), iD = () => Tt(mC, R(() => null));
var aD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Ll = void 0, sd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Item",
  props: {
    prefixCls: String,
    item: ue.any,
    renderItem: Function,
    responsive: Boolean,
    itemKey: {
      type: [String, Number]
    },
    registerSize: Function,
    display: Boolean,
    order: Number,
    component: ue.any,
    invalidate: Boolean
  },
  setup(e, t) {
    let {
      slots: n,
      expose: o
    } = t;
    const i = R(() => e.responsive && !e.display), a = le();
    o({
      itemNodeRef: a
    });
    function r(l) {
      e.registerSize(e.itemKey, l);
    }
    return Bo(() => {
      r(null);
    }), () => {
      var l;
      const {
        prefixCls: s,
        invalidate: u,
        item: c,
        renderItem: d,
        responsive: f,
        registerSize: g,
        itemKey: m,
        display: b,
        order: y,
        component: S = "div"
      } = e, C = aD(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), O = (l = n.default) === null || l === void 0 ? void 0 : l.call(n), $ = d && c !== Ll ? d(c) : O;
      let P;
      u || (P = {
        opacity: i.value ? 0 : 1,
        height: i.value ? 0 : Ll,
        overflowY: i.value ? "hidden" : Ll,
        order: f ? y : Ll,
        pointerEvents: i.value ? "none" : Ll,
        position: i.value ? "absolute" : Ll
      });
      const k = {};
      return i.value && (k["aria-hidden"] = !0), v(Ss, {
        disabled: !f,
        onResize: (x) => {
          let {
            offsetWidth: E
          } = x;
          r(E);
        }
      }, {
        default: () => v(S, Z(Z(Z({
          class: Te(!u && s),
          style: P
        }, k), C), {}, {
          ref: a
        }), {
          default: () => [$]
        })
      });
    };
  }
});
var $p = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const rD = ye({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: !1,
  props: {
    component: ue.any,
    title: ue.any,
    id: String,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onClick: {
      type: Function
    },
    onKeydown: {
      type: Function
    },
    onFocus: {
      type: Function
    },
    role: String,
    tabindex: Number
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = iD();
    return () => {
      var a;
      if (!i.value) {
        const {
          component: d = "div"
        } = e, f = $p(e, ["component"]);
        return v(d, Z(Z({}, f), o), {
          default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
        });
      }
      const r = i.value, {
        className: l
      } = r, s = $p(r, ["className"]), {
        class: u
      } = o, c = $p(o, ["class"]);
      return v(Jg, {
        value: null
      }, {
        default: () => [v(sd, Z(Z(Z({
          class: Te(l, u)
        }, s), c), e), n)]
      });
    };
  }
});
var lD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const bC = "responsive", yC = "invalidate";
function sD(e) {
  return `+ ${e.length} ...`;
}
const uD = () => ({
  id: String,
  prefixCls: String,
  data: Array,
  itemKey: [String, Number, Function],
  /** Used for `responsive`. It will limit render node to avoid perf issue */
  itemWidth: {
    type: Number,
    default: 10
  },
  renderItem: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawItem: Function,
  maxCount: [Number, String],
  renderRest: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawRest: Function,
  suffix: ue.any,
  component: String,
  itemComponent: ue.any,
  /** @private This API may be refactor since not well design */
  onVisibleChange: Function,
  /** When set to `full`, ssr will render full items by default and remove at client side */
  ssr: String,
  onMousedown: Function,
  role: String
}), Ha = ye({
  name: "Overflow",
  inheritAttrs: !1,
  props: uD(),
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: i
    } = t;
    const a = R(() => e.ssr === "full"), r = Pe(null), l = R(() => r.value || 0), s = Pe(/* @__PURE__ */ new Map()), u = Pe(0), c = Pe(0), d = Pe(0), f = Pe(null), g = Pe(null), m = R(() => g.value === null && a.value ? Number.MAX_SAFE_INTEGER : g.value || 0), b = Pe(!1), y = R(() => `${e.prefixCls}-item`), S = R(() => Math.max(u.value, c.value)), C = R(() => !!(e.data.length && e.maxCount === bC)), O = R(() => e.maxCount === yC), $ = R(() => C.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), P = R(() => {
      let A = e.data;
      return C.value ? r.value === null && a.value ? A = e.data : A = e.data.slice(0, Math.min(e.data.length, l.value / e.itemWidth)) : typeof e.maxCount == "number" && (A = e.data.slice(0, e.maxCount)), A;
    }), k = R(() => C.value ? e.data.slice(m.value + 1) : e.data.slice(P.value.length)), x = (A, U) => {
      var j;
      return typeof e.itemKey == "function" ? e.itemKey(A) : (j = e.itemKey && A?.[e.itemKey]) !== null && j !== void 0 ? j : U;
    }, E = R(() => e.renderItem || ((A) => A)), z = (A, U) => {
      g.value = A, U || (b.value = A < e.data.length - 1, o("visibleChange", A));
    }, B = (A, U) => {
      r.value = U.clientWidth;
    }, D = (A, U) => {
      const j = new Map(s.value);
      U === null ? j.delete(A) : j.set(A, U), s.value = j;
    }, W = (A, U) => {
      u.value = c.value, c.value = U;
    }, H = (A, U) => {
      d.value = U;
    }, F = (A) => s.value.get(x(P.value[A], A));
    return Ie([l, s, c, d, () => e.itemKey, P], () => {
      if (l.value && S.value && P.value) {
        let A = d.value;
        const U = P.value.length, j = U - 1;
        if (!U) {
          z(0), f.value = null;
          return;
        }
        for (let ae = 0; ae < U; ae += 1) {
          const G = F(ae);
          if (G === void 0) {
            z(ae - 1, !0);
            break;
          }
          if (A += G, // Only one means `totalWidth` is the final width
          j === 0 && A <= l.value || // Last two width will be the final width
          ae === j - 1 && A + F(j) <= l.value) {
            z(j), f.value = null;
            break;
          } else if (A + S.value > l.value) {
            z(ae - 1), f.value = A - G - d.value + c.value;
            break;
          }
        }
        e.suffix && F(0) + d.value > l.value && (f.value = null);
      }
    }), () => {
      const A = b.value && !!k.value.length, {
        itemComponent: U,
        renderRawItem: j,
        renderRawRest: ae,
        renderRest: G,
        prefixCls: Y = "rc-overflow",
        suffix: K,
        component: J = "div",
        id: be,
        onMousedown: xe
      } = e, {
        class: he,
        style: de
      } = n, ne = lD(n, ["class", "style"]);
      let we = {};
      f.value !== null && C.value && (we = {
        position: "absolute",
        left: `${f.value}px`,
        top: 0
      });
      const re = {
        prefixCls: y.value,
        responsive: C.value,
        component: U,
        invalidate: O.value
      }, se = j ? (Fe, Re) => {
        const We = x(Fe, Re);
        return v(Jg, {
          key: We,
          value: I(I({}, re), {
            order: Re,
            item: Fe,
            itemKey: We,
            registerSize: D,
            display: Re <= m.value
          })
        }, {
          default: () => [j(Fe, Re)]
        });
      } : (Fe, Re) => {
        const We = x(Fe, Re);
        return v(sd, Z(Z({}, re), {}, {
          order: Re,
          key: We,
          item: Fe,
          renderItem: E.value,
          itemKey: We,
          registerSize: D,
          display: Re <= m.value
        }), null);
      };
      let ve = () => null;
      const Me = {
        order: A ? m.value : Number.MAX_SAFE_INTEGER,
        className: `${y.value} ${y.value}-rest`,
        registerSize: W,
        display: A
      };
      if (ae)
        ae && (ve = () => v(Jg, {
          value: I(I({}, re), Me)
        }, {
          default: () => [ae(k.value)]
        }));
      else {
        const Fe = G || sD;
        ve = () => v(sd, Z(Z({}, re), Me), {
          default: () => typeof Fe == "function" ? Fe(k.value) : Fe
        });
      }
      const ke = () => {
        var Fe;
        return v(J, Z({
          id: be,
          class: Te(!O.value && Y, he),
          style: de,
          onMousedown: xe,
          role: e.role
        }, ne), {
          default: () => [P.value.map(se), $.value ? ve() : null, K && v(sd, Z(Z({}, re), {}, {
            order: m.value,
            class: `${y.value}-suffix`,
            registerSize: H,
            display: !0,
            style: we
          }), {
            default: () => K
          }), (Fe = i.default) === null || Fe === void 0 ? void 0 : Fe.call(i)]
        });
      };
      return v(Ss, {
        disabled: !C.value,
        onResize: B
      }, {
        default: ke
      });
    };
  }
});
Ha.Item = rD;
Ha.RESPONSIVE = bC;
Ha.INVALIDATE = yC;
const cD = Symbol("TreeSelectLegacyContextPropsKey");
function Dv() {
  return Tt(cD, {});
}
const dD = {
  id: String,
  prefixCls: String,
  values: ue.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: ue.any,
  placeholder: ue.any,
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: ue.oneOfType([ue.number, ue.string]),
  compositionStatus: Boolean,
  removeIcon: ue.any,
  choiceTransitionName: String,
  maxTagCount: ue.oneOfType([ue.number, ue.string]),
  maxTagTextLength: Number,
  maxTagPlaceholder: ue.any.def(() => (e) => `+ ${e.length} ...`),
  tagRender: Function,
  onToggleOpen: {
    type: Function
  },
  onRemove: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, G0 = (e) => {
  e.preventDefault(), e.stopPropagation();
}, fD = ye({
  name: "MultipleSelectSelector",
  inheritAttrs: !1,
  props: dD,
  setup(e) {
    const t = Pe(), n = Pe(0), o = Pe(!1), i = Dv(), a = R(() => `${e.prefixCls}-selection`), r = R(() => e.open || e.mode === "tags" ? e.searchValue : ""), l = R(() => e.mode === "tags" || e.showSearch && (e.open || o.value)), s = le("");
    Ft(() => {
      s.value = r.value;
    }), Pt(() => {
      Ie(s, () => {
        n.value = t.value.scrollWidth;
      }, {
        flush: "post",
        immediate: !0
      });
    });
    function u(m, b, y, S, C) {
      return v("span", {
        class: Te(`${a.value}-item`, {
          [`${a.value}-item-disabled`]: y
        }),
        title: typeof m == "string" || typeof m == "number" ? m.toString() : void 0
      }, [v("span", {
        class: `${a.value}-item-content`
      }, [b]), S && v(yl, {
        class: `${a.value}-item-remove`,
        onMousedown: G0,
        onClick: C,
        customizeIcon: e.removeIcon
      }, {
        default: () => [Ee("×")]
      })]);
    }
    function c(m, b, y, S, C, O) {
      var $;
      const P = (x) => {
        G0(x), e.onToggleOpen(!open);
      };
      let k = O;
      return i.keyEntities && (k = (($ = i.keyEntities[m]) === null || $ === void 0 ? void 0 : $.node) || {}), v("span", {
        key: m,
        onMousedown: P
      }, [e.tagRender({
        label: b,
        value: m,
        disabled: y,
        closable: S,
        onClose: C,
        option: k
      })]);
    }
    function d(m) {
      const {
        disabled: b,
        label: y,
        value: S,
        option: C
      } = m, O = !e.disabled && !b;
      let $ = y;
      if (typeof e.maxTagTextLength == "number" && (typeof y == "string" || typeof y == "number")) {
        const k = String($);
        k.length > e.maxTagTextLength && ($ = `${k.slice(0, e.maxTagTextLength)}...`);
      }
      const P = (k) => {
        var x;
        k && k.stopPropagation(), (x = e.onRemove) === null || x === void 0 || x.call(e, m);
      };
      return typeof e.tagRender == "function" ? c(S, $, b, O, P, C) : u(y, $, b, O, P);
    }
    function f(m) {
      const {
        maxTagPlaceholder: b = (S) => `+ ${S.length} ...`
      } = e, y = typeof b == "function" ? b(m) : b;
      return u(y, y, !1);
    }
    const g = (m) => {
      const b = m.target.composing;
      s.value = m.target.value, b || e.onInputChange(m);
    };
    return () => {
      const {
        id: m,
        prefixCls: b,
        values: y,
        open: S,
        inputRef: C,
        placeholder: O,
        disabled: $,
        autofocus: P,
        autocomplete: k,
        activeDescendantId: x,
        tabindex: E,
        compositionStatus: z,
        onInputPaste: B,
        onInputKeyDown: D,
        onInputMouseDown: W,
        onInputCompositionStart: H,
        onInputCompositionEnd: F
      } = e, A = v("div", {
        class: `${a.value}-search`,
        style: {
          width: n.value + "px"
        },
        key: "input"
      }, [v(vC, {
        inputRef: C,
        open: S,
        prefixCls: b,
        id: m,
        inputElement: null,
        disabled: $,
        autofocus: P,
        autocomplete: k,
        editable: l.value,
        activeDescendantId: x,
        value: s.value,
        onKeydown: D,
        onMousedown: W,
        onChange: g,
        onPaste: B,
        onCompositionstart: H,
        onCompositionend: F,
        tabindex: E,
        attrs: mf(e, !0),
        onFocus: () => o.value = !0,
        onBlur: () => o.value = !1
      }, null), v("span", {
        ref: t,
        class: `${a.value}-search-mirror`,
        "aria-hidden": !0
      }, [s.value, Ee(" ")])]), U = v(Ha, {
        prefixCls: `${a.value}-overflow`,
        data: y,
        renderItem: d,
        renderRest: f,
        suffix: A,
        itemKey: "key",
        maxCount: e.maxTagCount,
        key: "overflow"
      }, null);
      return v(He, null, [U, !y.length && !r.value && !z && v("span", {
        class: `${a.value}-placeholder`
      }, [O])]);
    };
  }
}), pD = {
  inputElement: ue.any,
  id: String,
  prefixCls: String,
  values: ue.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: ue.any,
  placeholder: ue.any,
  compositionStatus: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: ue.oneOfType([ue.number, ue.string]),
  activeValue: String,
  backfill: {
    type: Boolean,
    default: void 0
  },
  optionLabelRender: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, zv = ye({
  name: "SingleSelector",
  setup(e) {
    const t = Pe(!1), n = R(() => e.mode === "combobox"), o = R(() => n.value || e.showSearch), i = R(() => {
      let c = e.searchValue || "";
      return n.value && e.activeValue && !t.value && (c = e.activeValue), c;
    }), a = Dv();
    Ie([n, () => e.activeValue], () => {
      n.value && (t.value = !1);
    }, {
      immediate: !0
    });
    const r = R(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!i.value || e.compositionStatus), l = R(() => {
      const c = e.values[0];
      return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
    }), s = () => {
      if (e.values[0])
        return null;
      const c = r.value ? {
        visibility: "hidden"
      } : void 0;
      return v("span", {
        class: `${e.prefixCls}-selection-placeholder`,
        style: c
      }, [e.placeholder]);
    }, u = (c) => {
      c.target.composing || (t.value = !0, e.onInputChange(c));
    };
    return () => {
      var c, d, f, g;
      const {
        inputElement: m,
        prefixCls: b,
        id: y,
        values: S,
        inputRef: C,
        disabled: O,
        autofocus: $,
        autocomplete: P,
        activeDescendantId: k,
        open: x,
        tabindex: E,
        optionLabelRender: z,
        onInputKeyDown: B,
        onInputMouseDown: D,
        onInputPaste: W,
        onInputCompositionStart: H,
        onInputCompositionEnd: F
      } = e, A = S[0];
      let U = null;
      if (A && a.customSlots) {
        const j = (c = A.key) !== null && c !== void 0 ? c : A.value, ae = ((d = a.keyEntities[j]) === null || d === void 0 ? void 0 : d.node) || {};
        U = a.customSlots[(f = ae.slots) === null || f === void 0 ? void 0 : f.title] || a.customSlots.title || A.label, typeof U == "function" && (U = U(ae));
      } else
        U = z && A ? z(A.option) : A?.label;
      return v(He, null, [v("span", {
        class: `${b}-selection-search`
      }, [v(vC, {
        inputRef: C,
        prefixCls: b,
        id: y,
        open: x,
        inputElement: m,
        disabled: O,
        autofocus: $,
        autocomplete: P,
        editable: o.value,
        activeDescendantId: k,
        value: i.value,
        onKeydown: B,
        onMousedown: D,
        onChange: u,
        onPaste: W,
        onCompositionstart: H,
        onCompositionend: F,
        tabindex: E,
        attrs: mf(e, !0)
      }, null)]), !n.value && A && !r.value && v("span", {
        class: `${b}-selection-item`,
        title: l.value
      }, [v(He, {
        key: (g = A.key) !== null && g !== void 0 ? g : A.value
      }, [U])]), s()]);
    };
  }
});
zv.props = pD;
zv.inheritAttrs = !1;
function gD(e) {
  return ![
    // System function button
    Xe.ESC,
    Xe.SHIFT,
    Xe.BACKSPACE,
    Xe.TAB,
    Xe.WIN_KEY,
    Xe.ALT,
    Xe.META,
    Xe.WIN_KEY_RIGHT,
    Xe.CTRL,
    Xe.SEMICOLON,
    Xe.EQUALS,
    Xe.CAPS_LOCK,
    Xe.CONTEXT_MENU,
    // F1-F12
    Xe.F1,
    Xe.F2,
    Xe.F3,
    Xe.F4,
    Xe.F5,
    Xe.F6,
    Xe.F7,
    Xe.F8,
    Xe.F9,
    Xe.F10,
    Xe.F11,
    Xe.F12
  ].includes(e);
}
function xC() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = null, n;
  At(() => {
    clearTimeout(n);
  });
  function o(i) {
    (i || t === null) && (t = i), clearTimeout(n), n = setTimeout(() => {
      t = null;
    }, e);
  }
  return [() => t, o];
}
function ju() {
  const e = (t) => {
    e.current = t;
  };
  return e;
}
const hD = ye({
  name: "Selector",
  inheritAttrs: !1,
  props: {
    id: String,
    prefixCls: String,
    showSearch: {
      type: Boolean,
      default: void 0
    },
    open: {
      type: Boolean,
      default: void 0
    },
    /** Display in the Selector value, it's not same as `value` prop */
    values: ue.array,
    multiple: {
      type: Boolean,
      default: void 0
    },
    mode: String,
    searchValue: String,
    activeValue: String,
    inputElement: ue.any,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    activeDescendantId: String,
    tabindex: ue.oneOfType([ue.number, ue.string]),
    disabled: {
      type: Boolean,
      default: void 0
    },
    placeholder: ue.any,
    removeIcon: ue.any,
    // Tags
    maxTagCount: ue.oneOfType([ue.number, ue.string]),
    maxTagTextLength: Number,
    maxTagPlaceholder: ue.any,
    tagRender: Function,
    optionLabelRender: Function,
    /** Check if `tokenSeparators` contains `\n` or `\r\n` */
    tokenWithEnter: {
      type: Boolean,
      default: void 0
    },
    // Motion
    choiceTransitionName: String,
    onToggleOpen: {
      type: Function
    },
    /** `onSearch` returns go next step boolean to check if need do toggle open */
    onSearch: Function,
    onSearchSubmit: Function,
    onRemove: Function,
    onInputKeyDown: {
      type: Function
    },
    /**
     * @private get real dom for trigger align.
     * This may be removed after React provides replacement of `findDOMNode`
     */
    domRef: Function
  },
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = ju(), i = le(!1), [a, r] = xC(0), l = (S) => {
      const {
        which: C
      } = S;
      (C === Xe.UP || C === Xe.DOWN) && S.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(S), C === Xe.ENTER && e.mode === "tags" && !i.value && !e.open && e.onSearchSubmit(S.target.value), gD(C) && e.onToggleOpen(!0);
    }, s = () => {
      r(!0);
    };
    let u = null;
    const c = (S) => {
      e.onSearch(S, !0, i.value) !== !1 && e.onToggleOpen(!0);
    }, d = () => {
      i.value = !0;
    }, f = (S) => {
      i.value = !1, e.mode !== "combobox" && c(S.target.value);
    }, g = (S) => {
      let {
        target: {
          value: C
        }
      } = S;
      if (e.tokenWithEnter && u && /[\r\n]/.test(u)) {
        const O = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
        C = C.replace(O, u);
      }
      u = null, c(C);
    }, m = (S) => {
      const {
        clipboardData: C
      } = S;
      u = C.getData("text");
    }, b = (S) => {
      let {
        target: C
      } = S;
      C !== o.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
        o.current.focus();
      }) : o.current.focus());
    }, y = (S) => {
      const C = a();
      S.target !== o.current && !C && S.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !C) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
    };
    return n({
      focus: () => {
        o.current.focus();
      },
      blur: () => {
        o.current.blur();
      }
    }), () => {
      const {
        prefixCls: S,
        domRef: C,
        mode: O
      } = e, $ = {
        inputRef: o,
        onInputKeyDown: l,
        onInputMouseDown: s,
        onInputChange: g,
        onInputPaste: m,
        compositionStatus: i.value,
        onInputCompositionStart: d,
        onInputCompositionEnd: f
      }, P = O === "multiple" || O === "tags" ? v(fD, Z(Z({}, e), $), null) : v(zv, Z(Z({}, e), $), null);
      return v("div", {
        ref: C,
        class: `${S}-selector`,
        onClick: b,
        onMousedown: y
      }, [P]);
    };
  }
});
function vD(e, t, n) {
  function o(i) {
    var a, r, l;
    let s = i.target;
    s.shadowRoot && i.composed && (s = i.composedPath()[0] || s);
    const u = [(a = e[0]) === null || a === void 0 ? void 0 : a.value, (l = (r = e[1]) === null || r === void 0 ? void 0 : r.value) === null || l === void 0 ? void 0 : l.getPopupElement()];
    t.value && u.every((c) => c && !c.contains(s) && c !== s) && n(!1);
  }
  Pt(() => {
    window.addEventListener("mousedown", o);
  }), At(() => {
    window.removeEventListener("mousedown", o);
  });
}
function mD() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  const t = Pe(!1);
  let n;
  const o = () => {
    clearTimeout(n);
  };
  return Pt(() => {
    o();
  }), [t, (a, r) => {
    o(), n = setTimeout(() => {
      t.value = a, r && r();
    }, e);
  }, o];
}
const wC = Symbol("BaseSelectContextKey");
function bD(e) {
  return kt(wC, e);
}
function yD() {
  return Tt(wC, {});
}
const Rv = (() => {
  if (typeof navigator > "u" || typeof window > "u")
    return !1;
  const e = navigator.userAgent || navigator.vendor || window.opera;
  return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substring(0, 4));
});
function SC(e) {
  if (!Q1(e)) return Dn(e);
  const t = new Proxy({}, {
    get(n, o, i) {
      return Reflect.get(e.value, o, i);
    },
    set(n, o, i) {
      return e.value[o] = i, !0;
    },
    deleteProperty(n, o) {
      return Reflect.deleteProperty(e.value, o);
    },
    has(n, o) {
      return Reflect.has(e.value, o);
    },
    ownKeys() {
      return Object.keys(e.value);
    },
    getOwnPropertyDescriptor() {
      return {
        enumerable: !0,
        configurable: !0
      };
    }
  });
  return Dn(t);
}
var xD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const wD = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], SD = () => ({
  prefixCls: String,
  id: String,
  omitDomProps: Array,
  // >>> Value
  displayValues: Array,
  onDisplayValuesChange: Function,
  // >>> Active
  /** Current dropdown list active item string value */
  activeValue: String,
  /** Link search input with target element */
  activeDescendantId: String,
  onActiveValueChange: Function,
  // >>> Search
  searchValue: String,
  /** Trigger onSearch, return false to prevent trigger open event */
  onSearch: Function,
  /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  onSearchSplit: Function,
  maxLength: Number,
  OptionList: ue.any,
  /** Tell if provided `options` is empty */
  emptyOptions: Boolean
}), CC = () => ({
  showSearch: {
    type: Boolean,
    default: void 0
  },
  tagRender: {
    type: Function
  },
  optionLabelRender: {
    type: Function
  },
  direction: {
    type: String
  },
  // MISC
  tabindex: Number,
  autofocus: Boolean,
  notFoundContent: ue.any,
  placeholder: ue.any,
  onClear: Function,
  choiceTransitionName: String,
  // >>> Mode
  mode: String,
  // >>> Status
  disabled: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  // >>> Open
  open: {
    type: Boolean,
    default: void 0
  },
  defaultOpen: {
    type: Boolean,
    default: void 0
  },
  onDropdownVisibleChange: {
    type: Function
  },
  // >>> Customize Input
  /** @private Internal usage. Do not use in your production. */
  getInputElement: {
    type: Function
  },
  /** @private Internal usage. Do not use in your production. */
  getRawInputElement: {
    type: Function
  },
  // >>> Selector
  maxTagTextLength: Number,
  maxTagCount: {
    type: [String, Number]
  },
  maxTagPlaceholder: ue.any,
  // >>> Search
  tokenSeparators: {
    type: Array
  },
  // >>> Icons
  allowClear: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: void 0
  },
  inputIcon: ue.any,
  /** Clear all icon */
  clearIcon: ue.any,
  /** Selector remove icon */
  removeIcon: ue.any,
  // >>> Dropdown
  animation: String,
  transitionName: String,
  dropdownStyle: {
    type: Object
  },
  dropdownClassName: String,
  dropdownMatchSelectWidth: {
    type: [Boolean, Number],
    default: void 0
  },
  dropdownRender: {
    type: Function
  },
  dropdownAlign: Object,
  placement: {
    type: String
  },
  getPopupContainer: {
    type: Function
  },
  // >>> Focus
  showAction: {
    type: Array
  },
  onBlur: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  // >>> Rest Events
  onKeyup: Function,
  onKeydown: Function,
  onMousedown: Function,
  onPopupScroll: Function,
  onInputKeyDown: Function,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function
}), CD = () => I(I({}, SD()), CC());
function Nv(e) {
  return e === "tags" || e === "multiple";
}
const $D = ye({
  compatConfig: {
    MODE: 3
  },
  name: "BaseSelect",
  inheritAttrs: !1,
  props: wn(CD(), {
    showAction: [],
    notFoundContent: "Not Found"
  }),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: i
    } = t;
    const a = R(() => Nv(e.mode)), r = R(() => e.showSearch !== void 0 ? e.showSearch : a.value || e.mode === "combobox"), l = Pe(!1);
    Pt(() => {
      l.value = Rv();
    });
    const s = Dv(), u = Pe(null), c = ju(), d = Pe(null), f = Pe(null), g = Pe(null), m = le(!1), [b, y, S] = mD();
    o({
      focus: () => {
        var se;
        (se = f.value) === null || se === void 0 || se.focus();
      },
      blur: () => {
        var se;
        (se = f.value) === null || se === void 0 || se.blur();
      },
      scrollTo: (se) => {
        var ve;
        return (ve = g.value) === null || ve === void 0 ? void 0 : ve.scrollTo(se);
      }
    });
    const $ = R(() => {
      var se;
      if (e.mode !== "combobox")
        return e.searchValue;
      const ve = (se = e.displayValues[0]) === null || se === void 0 ? void 0 : se.value;
      return typeof ve == "string" || typeof ve == "number" ? String(ve) : "";
    }), P = e.open !== void 0 ? e.open : e.defaultOpen, k = Pe(P), x = Pe(P), E = (se) => {
      k.value = e.open !== void 0 ? e.open : se, x.value = k.value;
    };
    Ie(() => e.open, () => {
      E(e.open);
    });
    const z = R(() => !e.notFoundContent && e.emptyOptions);
    Ft(() => {
      x.value = k.value, (e.disabled || z.value && x.value && e.mode === "combobox") && (x.value = !1);
    });
    const B = R(() => z.value ? !1 : x.value), D = (se) => {
      const ve = se !== void 0 ? se : !x.value;
      x.value !== ve && !e.disabled && (E(ve), e.onDropdownVisibleChange && e.onDropdownVisibleChange(ve), !ve && J.value && (J.value = !1, y(!1, () => {
        Y.value = !1, m.value = !1;
      })));
    }, W = R(() => (e.tokenSeparators || []).some((se) => [`
`, `\r
`].includes(se))), H = (se, ve, Me) => {
      var ke, Fe;
      let Re = !0, We = se;
      (ke = e.onActiveValueChange) === null || ke === void 0 || ke.call(e, null);
      const et = Me ? null : q_(se, e.tokenSeparators);
      return e.mode !== "combobox" && et && (We = "", (Fe = e.onSearchSplit) === null || Fe === void 0 || Fe.call(e, et), D(!1), Re = !1), e.onSearch && $.value !== We && e.onSearch(We, {
        source: ve ? "typing" : "effect"
      }), Re;
    }, F = (se) => {
      var ve;
      !se || !se.trim() || (ve = e.onSearch) === null || ve === void 0 || ve.call(e, se, {
        source: "submit"
      });
    };
    Ie(x, () => {
      !x.value && !a.value && e.mode !== "combobox" && H("", !1, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), Ie(() => e.disabled, () => {
      k.value && e.disabled && E(!1), e.disabled && !m.value && y(!1);
    }, {
      immediate: !0
    });
    const [A, U] = xC(), j = function(se) {
      var ve;
      const Me = A(), {
        which: ke
      } = se;
      if (ke === Xe.ENTER && (e.mode !== "combobox" && se.preventDefault(), x.value || D(!0)), U(!!$.value), ke === Xe.BACKSPACE && !Me && a.value && !$.value && e.displayValues.length) {
        const et = [...e.displayValues];
        let Le = null;
        for (let Ne = et.length - 1; Ne >= 0; Ne -= 1) {
          const Ge = et[Ne];
          if (!Ge.disabled) {
            et.splice(Ne, 1), Le = Ge;
            break;
          }
        }
        Le && e.onDisplayValuesChange(et, {
          type: "remove",
          values: [Le]
        });
      }
      for (var Fe = arguments.length, Re = new Array(Fe > 1 ? Fe - 1 : 0), We = 1; We < Fe; We++)
        Re[We - 1] = arguments[We];
      x.value && g.value && g.value.onKeydown(se, ...Re), (ve = e.onKeydown) === null || ve === void 0 || ve.call(e, se, ...Re);
    }, ae = function(se) {
      for (var ve = arguments.length, Me = new Array(ve > 1 ? ve - 1 : 0), ke = 1; ke < ve; ke++)
        Me[ke - 1] = arguments[ke];
      x.value && g.value && g.value.onKeyup(se, ...Me), e.onKeyup && e.onKeyup(se, ...Me);
    }, G = (se) => {
      const ve = e.displayValues.filter((Me) => Me !== se);
      e.onDisplayValuesChange(ve, {
        type: "remove",
        values: [se]
      });
    }, Y = Pe(!1), K = function() {
      y(!0), e.disabled || (e.onFocus && !Y.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && D(!0)), Y.value = !0;
    }, J = le(!1), be = function() {
      if (J.value || (m.value = !0, y(!1, () => {
        Y.value = !1, m.value = !1, D(!1);
      }), e.disabled))
        return;
      const se = $.value;
      se && (e.mode === "tags" ? e.onSearch(se, {
        source: "submit"
      }) : e.mode === "multiple" && e.onSearch("", {
        source: "blur"
      })), e.onBlur && e.onBlur(...arguments);
    }, xe = () => {
      J.value = !0;
    }, he = () => {
      J.value = !1;
    };
    kt("VCSelectContainerEvent", {
      focus: K,
      blur: be
    });
    const de = [];
    Pt(() => {
      de.forEach((se) => clearTimeout(se)), de.splice(0, de.length);
    }), At(() => {
      de.forEach((se) => clearTimeout(se)), de.splice(0, de.length);
    });
    const ne = function(se) {
      var ve, Me;
      const {
        target: ke
      } = se, Fe = (ve = d.value) === null || ve === void 0 ? void 0 : ve.getPopupElement();
      if (Fe && Fe.contains(ke)) {
        const Le = setTimeout(() => {
          var Ne;
          const Ge = de.indexOf(Le);
          Ge !== -1 && de.splice(Ge, 1), S(), !l.value && !Fe.contains(document.activeElement) && ((Ne = f.value) === null || Ne === void 0 || Ne.focus());
        });
        de.push(Le);
      }
      for (var Re = arguments.length, We = new Array(Re > 1 ? Re - 1 : 0), et = 1; et < Re; et++)
        We[et - 1] = arguments[et];
      (Me = e.onMousedown) === null || Me === void 0 || Me.call(e, se, ...We);
    }, we = Pe(null), re = () => {
    };
    return Pt(() => {
      Ie(B, () => {
        var se;
        if (B.value) {
          const ve = Math.ceil((se = u.value) === null || se === void 0 ? void 0 : se.offsetWidth);
          we.value !== ve && !Number.isNaN(ve) && (we.value = ve);
        }
      }, {
        immediate: !0,
        flush: "post"
      });
    }), vD([u, d], B, D), bD(SC(I(I({}, xd(e)), {
      open: x,
      triggerOpen: B,
      showSearch: r,
      multiple: a,
      toggleOpen: D
    }))), () => {
      const se = I(I({}, e), n), {
        prefixCls: ve,
        id: Me,
        open: ke,
        defaultOpen: Fe,
        mode: Re,
        // Search related
        showSearch: We,
        searchValue: et,
        onSearch: Le,
        // Icons
        allowClear: Ne,
        clearIcon: Ge,
        showArrow: it,
        inputIcon: Ke,
        // Others
        disabled: Oe,
        loading: Ve,
        getInputElement: De,
        getPopupContainer: Je,
        placement: wt,
        // Dropdown
        animation: lt,
        transitionName: qe,
        dropdownStyle: at,
        dropdownClassName: dt,
        dropdownMatchSelectWidth: vt,
        dropdownRender: Rt,
        dropdownAlign: Xt,
        showAction: vn,
        direction: Dt,
        // Tags
        tokenSeparators: zn,
        tagRender: on,
        optionLabelRender: Qt,
        // Events
        onPopupScroll: mn,
        onDropdownVisibleChange: Kt,
        onFocus: Mn,
        onBlur: an,
        onKeyup: gn,
        onKeydown: Hn,
        onMousedown: Co,
        onClear: ut,
        omitDomProps: qn,
        getRawInputElement: bn,
        displayValues: Gn,
        onDisplayValuesChange: Fo,
        emptyOptions: pi,
        activeDescendantId: ze,
        activeValue: nt,
        OptionList: tt
      } = se, zt = xD(se, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), Vn = Re === "combobox" && De && De() || null, Rn = typeof bn == "function" && bn(), go = I({}, zt);
      let Jt;
      Rn && (Jt = (kn) => {
        D(kn);
      }), wD.forEach((kn) => {
        delete go[kn];
      }), qn?.forEach((kn) => {
        delete go[kn];
      });
      const ht = it !== void 0 ? it : Ve || !a.value && Re !== "combobox";
      let Zn;
      ht && (Zn = v(yl, {
        class: Te(`${ve}-arrow`, {
          [`${ve}-arrow-loading`]: Ve
        }),
        customizeIcon: Ke,
        customizeIconProps: {
          loading: Ve,
          searchValue: $.value,
          open: x.value,
          focused: b.value,
          showSearch: r.value
        }
      }, null));
      let $o;
      const rn = () => {
        ut?.(), Fo([], {
          type: "clear",
          values: Gn
        }), H("", !1, !1);
      };
      !Oe && Ne && (Gn.length || $.value) && ($o = v(yl, {
        class: `${ve}-clear`,
        onMousedown: rn,
        customizeIcon: Ge
      }, {
        default: () => [Ee("×")]
      }));
      const ln = v(tt, {
        ref: g
      }, I(I({}, s.customSlots), {
        option: i.option
      })), Ht = Te(ve, n.class, {
        [`${ve}-focused`]: b.value,
        [`${ve}-multiple`]: a.value,
        [`${ve}-single`]: !a.value,
        [`${ve}-allow-clear`]: Ne,
        [`${ve}-show-arrow`]: ht,
        [`${ve}-disabled`]: Oe,
        [`${ve}-loading`]: Ve,
        [`${ve}-open`]: x.value,
        [`${ve}-customize-input`]: Vn,
        [`${ve}-show-search`]: r.value
      }), sn = v(YA, {
        ref: d,
        disabled: Oe,
        prefixCls: ve,
        visible: B.value,
        popupElement: ln,
        containerWidth: we.value,
        animation: lt,
        transitionName: qe,
        dropdownStyle: at,
        dropdownClassName: dt,
        direction: Dt,
        dropdownMatchSelectWidth: vt,
        dropdownRender: Rt,
        dropdownAlign: Xt,
        placement: wt,
        getPopupContainer: Je,
        empty: pi,
        getTriggerDOMNode: () => c.current,
        onPopupVisibleChange: Jt,
        onPopupMouseEnter: re,
        onPopupFocusin: xe,
        onPopupFocusout: he
      }, {
        default: () => Rn ? No(Rn) && An(Rn, {
          ref: c
        }, !1, !0) : v(hD, Z(Z({}, e), {}, {
          domRef: c,
          prefixCls: ve,
          inputElement: Vn,
          ref: f,
          id: Me,
          showSearch: r.value,
          mode: Re,
          activeDescendantId: ze,
          tagRender: on,
          optionLabelRender: Qt,
          values: Gn,
          open: x.value,
          onToggleOpen: D,
          activeValue: nt,
          searchValue: $.value,
          onSearch: H,
          onSearchSubmit: F,
          onRemove: G,
          tokenWithEnter: W.value
        }), null)
      });
      let Io;
      return Rn ? Io = sn : Io = v("div", Z(Z({}, go), {}, {
        class: Ht,
        ref: u,
        onMousedown: ne,
        onKeydown: j,
        onKeyup: ae
      }), [b.value && !x.value && v("span", {
        style: {
          width: 0,
          height: 0,
          position: "absolute",
          overflow: "hidden",
          opacity: 0
        },
        "aria-live": "polite"
      }, [`${Gn.map((kn) => {
        let {
          label: Lo,
          value: ho
        } = kn;
        return ["number", "string"].includes(typeof Lo) ? Lo : ho;
      }).join(", ")}`]), sn, Zn, $o]), Io;
    };
  }
}), bf = (e, t) => {
  let {
    height: n,
    offset: o,
    prefixCls: i,
    onInnerResize: a
  } = e, {
    slots: r
  } = t;
  var l;
  let s = {}, u = {
    display: "flex",
    flexDirection: "column"
  };
  return o !== void 0 && (s = {
    height: `${n}px`,
    position: "relative",
    overflow: "hidden"
  }, u = I(I({}, u), {
    transform: `translateY(${o}px)`,
    position: "absolute",
    left: 0,
    right: 0,
    top: 0
  })), v("div", {
    style: s
  }, [v(Ss, {
    onResize: (c) => {
      let {
        offsetHeight: d
      } = c;
      d && a && a();
    }
  }, {
    default: () => [v("div", {
      style: u,
      class: Te({
        [`${i}-holder-inner`]: i
      })
    }, [(l = r.default) === null || l === void 0 ? void 0 : l.call(r)])]
  })]);
};
bf.displayName = "Filter";
bf.inheritAttrs = !1;
bf.props = {
  prefixCls: String,
  /** Virtual filler height. Should be `count * itemMinHeight` */
  height: Number,
  /** Set offset of visible items. Should be the top of start item position */
  offset: Number,
  onInnerResize: Function
};
const $C = (e, t) => {
  let {
    setRef: n
  } = e, {
    slots: o
  } = t;
  var i;
  const a = to((i = o.default) === null || i === void 0 ? void 0 : i.call(o));
  return a && a.length ? gl(a[0], {
    ref: n
  }) : a;
};
$C.props = {
  setRef: {
    type: Function,
    default: () => {
    }
  }
};
const PD = 20;
function K0(e) {
  return "touches" in e ? e.touches[0].pageY : e.pageY;
}
const OD = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ScrollBar",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    scrollTop: Number,
    scrollHeight: Number,
    height: Number,
    count: Number,
    onScroll: {
      type: Function
    },
    onStartMove: {
      type: Function
    },
    onStopMove: {
      type: Function
    }
  },
  setup() {
    return {
      moveRaf: null,
      scrollbarRef: ju(),
      thumbRef: ju(),
      visibleTimeout: null,
      state: Dn({
        dragging: !1,
        pageY: null,
        startTop: null,
        visible: !1
      })
    };
  },
  watch: {
    scrollTop: {
      handler() {
        this.delayHidden();
      },
      flush: "post"
    }
  },
  mounted() {
    var e, t;
    (e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart, bo ? {
      passive: !1
    } : !1), (t = this.thumbRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onMouseDown, bo ? {
      passive: !1
    } : !1);
  },
  beforeUnmount() {
    this.removeEvents(), clearTimeout(this.visibleTimeout);
  },
  methods: {
    delayHidden() {
      clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
        this.state.visible = !1;
      }, 2e3);
    },
    onScrollbarTouchStart(e) {
      e.preventDefault();
    },
    onContainerMouseDown(e) {
      e.stopPropagation(), e.preventDefault();
    },
    // ======================= Clean =======================
    patchEvents() {
      window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, bo ? {
        passive: !1
      } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
    },
    removeEvents() {
      window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, bo ? {
        passive: !1
      } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, bo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, bo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), Mt.cancel(this.moveRaf);
    },
    // ======================= Thumb =======================
    onMouseDown(e) {
      const {
        onStartMove: t
      } = this.$props;
      I(this.state, {
        dragging: !0,
        pageY: K0(e),
        startTop: this.getTop()
      }), t(), this.patchEvents(), e.stopPropagation(), e.preventDefault();
    },
    onMouseMove(e) {
      const {
        dragging: t,
        pageY: n,
        startTop: o
      } = this.state, {
        onScroll: i
      } = this.$props;
      if (Mt.cancel(this.moveRaf), t) {
        const a = K0(e) - n, r = o + a, l = this.getEnableScrollRange(), s = this.getEnableHeightRange(), u = s ? r / s : 0, c = Math.ceil(u * l);
        this.moveRaf = Mt(() => {
          i(c);
        });
      }
    },
    onMouseUp() {
      const {
        onStopMove: e
      } = this.$props;
      this.state.dragging = !1, e(), this.removeEvents();
    },
    // ===================== Calculate =====================
    getSpinHeight() {
      const {
        height: e,
        scrollHeight: t
      } = this.$props;
      let n = e / t * 100;
      return n = Math.max(n, PD), n = Math.min(n, e / 2), Math.floor(n);
    },
    getEnableScrollRange() {
      const {
        scrollHeight: e,
        height: t
      } = this.$props;
      return e - t || 0;
    },
    getEnableHeightRange() {
      const {
        height: e
      } = this.$props, t = this.getSpinHeight();
      return e - t || 0;
    },
    getTop() {
      const {
        scrollTop: e
      } = this.$props, t = this.getEnableScrollRange(), n = this.getEnableHeightRange();
      return e === 0 || t === 0 ? 0 : e / t * n;
    },
    // Not show scrollbar when height is large than scrollHeight
    showScroll() {
      const {
        height: e,
        scrollHeight: t
      } = this.$props;
      return t > e;
    }
  },
  render() {
    const {
      dragging: e,
      visible: t
    } = this.state, {
      prefixCls: n
    } = this.$props, o = this.getSpinHeight() + "px", i = this.getTop() + "px", a = this.showScroll(), r = a && t;
    return v("div", {
      ref: this.scrollbarRef,
      class: Te(`${n}-scrollbar`, {
        [`${n}-scrollbar-show`]: a
      }),
      style: {
        width: "8px",
        top: 0,
        bottom: 0,
        right: 0,
        position: "absolute",
        display: r ? void 0 : "none"
      },
      onMousedown: this.onContainerMouseDown,
      onMousemove: this.delayHidden
    }, [v("div", {
      ref: this.thumbRef,
      class: Te(`${n}-scrollbar-thumb`, {
        [`${n}-scrollbar-thumb-moving`]: e
      }),
      style: {
        width: "100%",
        height: o,
        top: i,
        left: 0,
        position: "absolute",
        background: "rgba(0, 0, 0, 0.5)",
        borderRadius: "99px",
        cursor: "pointer",
        userSelect: "none"
      },
      onMousedown: this.onMouseDown
    }, null)]);
  }
});
function ID(e, t, n, o) {
  const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), r = le(Symbol("update"));
  Ie(e, () => {
    r.value = Symbol("update");
  });
  let l;
  function s() {
    Mt.cancel(l);
  }
  function u() {
    s(), l = Mt(() => {
      i.forEach((d, f) => {
        if (d && d.offsetParent) {
          const {
            offsetHeight: g
          } = d;
          a.get(f) !== g && (r.value = Symbol("update"), a.set(f, d.offsetHeight));
        }
      });
    });
  }
  function c(d, f) {
    const g = t(d);
    i.get(g), f ? (i.set(g, f.$el || f), u()) : i.delete(g);
  }
  return Bo(() => {
    s();
  }), [c, u, a, r];
}
function MD(e, t, n, o, i, a, r, l) {
  let s;
  return (u) => {
    if (u == null) {
      l();
      return;
    }
    Mt.cancel(s);
    const c = t.value, d = o.itemHeight;
    if (typeof u == "number")
      r(u);
    else if (u && typeof u == "object") {
      let f;
      const {
        align: g
      } = u;
      "index" in u ? {
        index: f
      } = u : f = c.findIndex((y) => i(y) === u.key);
      const {
        offset: m = 0
      } = u, b = (y, S) => {
        if (y < 0 || !e.value) return;
        const C = e.value.clientHeight;
        let O = !1, $ = S;
        if (C) {
          const P = S || g;
          let k = 0, x = 0, E = 0;
          const z = Math.min(c.length, f);
          for (let W = 0; W <= z; W += 1) {
            const H = i(c[W]);
            x = k;
            const F = n.get(H);
            E = x + (F === void 0 ? d : F), k = E, W === f && F === void 0 && (O = !0);
          }
          const B = e.value.scrollTop;
          let D = null;
          switch (P) {
            case "top":
              D = x - m;
              break;
            case "bottom":
              D = E - C + m;
              break;
            default: {
              const W = B + C;
              x < B ? $ = "top" : E > W && ($ = "bottom");
            }
          }
          D !== null && D !== B && r(D);
        }
        s = Mt(() => {
          O && a(), b(y - 1, $);
        }, 2);
      };
      b(5);
    }
  };
}
const TD = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), PC = ((e, t) => {
  let n = !1, o = null;
  function i() {
    clearTimeout(o), n = !0, o = setTimeout(() => {
      n = !1;
    }, 50);
  }
  return function(a) {
    let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    const l = (
      // Pass origin wheel when on the top
      a < 0 && e.value || // Pass origin wheel when on the bottom
      a > 0 && t.value
    );
    return r && l ? (clearTimeout(o), n = !1) : (!l || n) && i(), !n && l;
  };
});
function kD(e, t, n, o) {
  let i = 0, a = null, r = null, l = !1;
  const s = PC(t, n);
  function u(d) {
    if (!e.value) return;
    Mt.cancel(a);
    const {
      deltaY: f
    } = d;
    i += f, r = f, !s(f) && (TD || d.preventDefault(), a = Mt(() => {
      o(i * (l ? 10 : 1)), i = 0;
    }));
  }
  function c(d) {
    e.value && (l = d.detail === r);
  }
  return [u, c];
}
const ED = 14 / 15;
function _D(e, t, n) {
  let o = !1, i = 0, a = null, r = null;
  const l = () => {
    a && (a.removeEventListener("touchmove", s), a.removeEventListener("touchend", u));
  }, s = (f) => {
    if (o) {
      const g = Math.ceil(f.touches[0].pageY);
      let m = i - g;
      i = g, n(m) && f.preventDefault(), clearInterval(r), r = setInterval(() => {
        m *= ED, (!n(m, !0) || Math.abs(m) <= 0.1) && clearInterval(r);
      }, 16);
    }
  }, u = () => {
    o = !1, l();
  }, c = (f) => {
    l(), f.touches.length === 1 && !o && (o = !0, i = Math.ceil(f.touches[0].pageY), a = f.target, a.addEventListener("touchmove", s, {
      passive: !1
    }), a.addEventListener("touchend", u));
  }, d = () => {
  };
  Pt(() => {
    document.addEventListener("touchmove", d, {
      passive: !1
    }), Ie(e, (f) => {
      t.value.removeEventListener("touchstart", c), l(), clearInterval(r), f && t.value.addEventListener("touchstart", c, {
        passive: !1
      });
    }, {
      immediate: !0
    });
  }), At(() => {
    document.removeEventListener("touchmove", d);
  });
}
var AD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const DD = [], zD = {
  overflowY: "auto",
  overflowAnchor: "none"
};
function RD(e, t, n, o, i, a) {
  let {
    getKey: r
  } = a;
  return e.slice(t, n + 1).map((l, s) => {
    const u = t + s, c = i(l, u, {
      // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
    }), d = r(l);
    return v($C, {
      key: d,
      setRef: (f) => o(l, f)
    }, {
      default: () => [c]
    });
  });
}
const ND = ye({
  compatConfig: {
    MODE: 3
  },
  name: "List",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    data: ue.array,
    height: Number,
    itemHeight: Number,
    /** If not match virtual scroll condition, Set List still use height of container. */
    fullHeight: {
      type: Boolean,
      default: void 0
    },
    itemKey: {
      type: [String, Number, Function],
      required: !0
    },
    component: {
      type: [String, Object]
    },
    /** Set `false` will always use real scroll instead of virtual one */
    virtual: {
      type: Boolean,
      default: void 0
    },
    children: Function,
    onScroll: Function,
    onMousedown: Function,
    onMouseenter: Function,
    onVisibleChange: Function
  },
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = R(() => {
      const {
        height: G,
        itemHeight: Y,
        virtual: K
      } = e;
      return !!(K !== !1 && G && Y);
    }), i = R(() => {
      const {
        height: G,
        itemHeight: Y,
        data: K
      } = e;
      return o.value && K && Y * K.length > G;
    }), a = Dn({
      scrollTop: 0,
      scrollMoving: !1
    }), r = R(() => e.data || DD), l = Pe([]);
    Ie(r, () => {
      l.value = oi(r.value).slice();
    }, {
      immediate: !0
    });
    const s = Pe((G) => {
    });
    Ie(() => e.itemKey, (G) => {
      typeof G == "function" ? s.value = G : s.value = (Y) => Y?.[G];
    }, {
      immediate: !0
    });
    const u = Pe(), c = Pe(), d = Pe(), f = (G) => s.value(G), g = {
      getKey: f
    };
    function m(G) {
      let Y;
      typeof G == "function" ? Y = G(a.scrollTop) : Y = G;
      const K = k(Y);
      u.value && (u.value.scrollTop = K), a.scrollTop = K;
    }
    const [b, y, S, C] = ID(l, f), O = Dn({
      scrollHeight: void 0,
      start: 0,
      end: 0,
      offset: void 0
    }), $ = Pe(0);
    Pt(() => {
      Nt(() => {
        var G;
        $.value = ((G = c.value) === null || G === void 0 ? void 0 : G.offsetHeight) || 0;
      });
    }), Ds(() => {
      Nt(() => {
        var G;
        $.value = ((G = c.value) === null || G === void 0 ? void 0 : G.offsetHeight) || 0;
      });
    }), Ie([o, l], () => {
      o.value || I(O, {
        scrollHeight: void 0,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      });
    }, {
      immediate: !0
    }), Ie([o, l, $, i], () => {
      o.value && !i.value && I(O, {
        scrollHeight: $.value,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      }), u.value && (a.scrollTop = u.value.scrollTop);
    }, {
      immediate: !0
    }), Ie([i, o, () => a.scrollTop, l, C, () => e.height, $], () => {
      if (!o.value || !i.value)
        return;
      let G = 0, Y, K, J;
      const be = l.value.length, xe = l.value, he = a.scrollTop, {
        itemHeight: de,
        height: ne
      } = e, we = he + ne;
      for (let re = 0; re < be; re += 1) {
        const se = xe[re], ve = f(se);
        let Me = S.get(ve);
        Me === void 0 && (Me = de);
        const ke = G + Me;
        Y === void 0 && ke >= he && (Y = re, K = G), J === void 0 && ke > we && (J = re), G = ke;
      }
      Y === void 0 && (Y = 0, K = 0, J = Math.ceil(ne / de)), J === void 0 && (J = be - 1), J = Math.min(J + 1, be), I(O, {
        scrollHeight: G,
        start: Y,
        end: J,
        offset: K
      });
    }, {
      immediate: !0
    });
    const P = R(() => O.scrollHeight - e.height);
    function k(G) {
      let Y = G;
      return Number.isNaN(P.value) || (Y = Math.min(Y, P.value)), Y = Math.max(Y, 0), Y;
    }
    const x = R(() => a.scrollTop <= 0), E = R(() => a.scrollTop >= P.value), z = PC(x, E);
    function B(G) {
      m(G);
    }
    function D(G) {
      var Y;
      const {
        scrollTop: K
      } = G.currentTarget;
      K !== a.scrollTop && m(K), (Y = e.onScroll) === null || Y === void 0 || Y.call(e, G);
    }
    const [W, H] = kD(o, x, E, (G) => {
      m((Y) => Y + G);
    });
    _D(o, u, (G, Y) => z(G, Y) ? !1 : (W({
      preventDefault() {
      },
      deltaY: G
    }), !0));
    function F(G) {
      o.value && G.preventDefault();
    }
    const A = () => {
      u.value && (u.value.removeEventListener("wheel", W, bo ? {
        passive: !1
      } : !1), u.value.removeEventListener("DOMMouseScroll", H), u.value.removeEventListener("MozMousePixelScroll", F));
    };
    Ft(() => {
      Nt(() => {
        u.value && (A(), u.value.addEventListener("wheel", W, bo ? {
          passive: !1
        } : !1), u.value.addEventListener("DOMMouseScroll", H), u.value.addEventListener("MozMousePixelScroll", F));
      });
    }), At(() => {
      A();
    });
    const U = MD(u, l, S, e, f, y, m, () => {
      var G;
      (G = d.value) === null || G === void 0 || G.delayHidden();
    });
    n({
      scrollTo: U
    });
    const j = R(() => {
      let G = null;
      return e.height && (G = I({
        [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
      }, zD), o.value && (G.overflowY = "hidden", a.scrollMoving && (G.pointerEvents = "none"))), G;
    });
    return Ie([() => O.start, () => O.end, l], () => {
      if (e.onVisibleChange) {
        const G = l.value.slice(O.start, O.end + 1);
        e.onVisibleChange(G, l.value);
      }
    }, {
      flush: "post"
    }), {
      state: a,
      mergedData: l,
      componentStyle: j,
      onFallbackScroll: D,
      onScrollBar: B,
      componentRef: u,
      useVirtual: o,
      calRes: O,
      collectHeight: y,
      setInstance: b,
      sharedConfig: g,
      scrollBarRef: d,
      fillerInnerRef: c,
      delayHideScrollBar: () => {
        var G;
        (G = d.value) === null || G === void 0 || G.delayHidden();
      }
    };
  },
  render() {
    const e = I(I({}, this.$props), this.$attrs), {
      prefixCls: t = "rc-virtual-list",
      height: n,
      itemHeight: o,
      // eslint-disable-next-line no-unused-vars
      fullHeight: i,
      data: a,
      itemKey: r,
      virtual: l,
      component: s = "div",
      onScroll: u,
      children: c = this.$slots.default,
      style: d,
      class: f
    } = e, g = AD(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), m = Te(t, f), {
      scrollTop: b
    } = this.state, {
      scrollHeight: y,
      offset: S,
      start: C,
      end: O
    } = this.calRes, {
      componentStyle: $,
      onFallbackScroll: P,
      onScrollBar: k,
      useVirtual: x,
      collectHeight: E,
      sharedConfig: z,
      setInstance: B,
      mergedData: D,
      delayHideScrollBar: W
    } = this;
    return v("div", Z({
      style: I(I({}, d), {
        position: "relative"
      }),
      class: m
    }, g), [v(s, {
      class: `${t}-holder`,
      style: $,
      ref: "componentRef",
      onScroll: P,
      onMouseenter: W
    }, {
      default: () => [v(bf, {
        prefixCls: t,
        height: y,
        offset: S,
        onInnerResize: E,
        ref: "fillerInnerRef"
      }, {
        default: () => RD(D, C, O, B, c, z)
      })]
    }), x && v(OD, {
      ref: "scrollBarRef",
      prefixCls: t,
      scrollTop: b,
      height: n,
      scrollHeight: y,
      count: D.length,
      onScroll: k,
      onStartMove: () => {
        this.state.scrollMoving = !0;
      },
      onStopMove: () => {
        this.state.scrollMoving = !1;
      }
    }, null)]);
  }
});
function OC(e, t, n) {
  const o = le(e());
  return Ie(t, (i, a) => {
    n ? n(i, a) && (o.value = e()) : o.value = e();
  }), o;
}
function BD() {
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
const IC = Symbol("SelectContextKey");
function FD(e) {
  return kt(IC, e);
}
function LD() {
  return Tt(IC, {});
}
var HD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function Y0(e) {
  return typeof e == "string" || typeof e == "number";
}
const VD = ye({
  compatConfig: {
    MODE: 3
  },
  name: "OptionList",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = yD(), a = LD(), r = R(() => `${i.prefixCls}-item`), l = OC(() => a.flattenOptions, [() => i.open, () => a.flattenOptions], (P) => P[0]), s = ju(), u = (P) => {
      P.preventDefault();
    }, c = (P) => {
      s.current && s.current.scrollTo(typeof P == "number" ? {
        index: P
      } : P);
    }, d = function(P) {
      let k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      const x = l.value.length;
      for (let E = 0; E < x; E += 1) {
        const z = (P + E * k + x) % x, {
          group: B,
          data: D
        } = l.value[z];
        if (!B && !D.disabled)
          return z;
      }
      return -1;
    }, f = Dn({
      activeIndex: d(0)
    }), g = function(P) {
      let k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      f.activeIndex = P;
      const x = {
        source: k ? "keyboard" : "mouse"
      }, E = l.value[P];
      if (!E) {
        a.onActiveValue(null, -1, x);
        return;
      }
      a.onActiveValue(E.value, P, x);
    };
    Ie([() => l.value.length, () => i.searchValue], () => {
      g(a.defaultActiveFirstOption !== !1 ? d(0) : -1);
    }, {
      immediate: !0
    });
    const m = (P) => a.rawValues.has(P) && i.mode !== "combobox";
    Ie([() => i.open, () => i.searchValue], () => {
      if (!i.multiple && i.open && a.rawValues.size === 1) {
        const P = Array.from(a.rawValues)[0], k = oi(l.value).findIndex((x) => {
          let {
            data: E
          } = x;
          return E[a.fieldNames.value] === P;
        });
        k !== -1 && (g(k), Nt(() => {
          c(k);
        }));
      }
      i.open && Nt(() => {
        var P;
        (P = s.current) === null || P === void 0 || P.scrollTo(void 0);
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const b = (P) => {
      P !== void 0 && a.onSelect(P, {
        selected: !a.rawValues.has(P)
      }), i.multiple || i.toggleOpen(!1);
    }, y = (P) => typeof P.label == "function" ? P.label() : P.label;
    function S(P) {
      const k = l.value[P];
      if (!k) return null;
      const x = k.data || {}, {
        value: E
      } = x, {
        group: z
      } = k, B = mf(x, !0), D = y(k);
      return k ? v("div", Z(Z({
        "aria-label": typeof D == "string" && !z ? D : null
      }, B), {}, {
        key: P,
        role: z ? "presentation" : "option",
        id: `${i.id}_list_${P}`,
        "aria-selected": m(E)
      }), [E]) : null;
    }
    return n({
      onKeydown: (P) => {
        const {
          which: k,
          ctrlKey: x
        } = P;
        switch (k) {
          // >>> Arrow keys & ctrl + n/p on Mac
          case Xe.N:
          case Xe.P:
          case Xe.UP:
          case Xe.DOWN: {
            let E = 0;
            if (k === Xe.UP ? E = -1 : k === Xe.DOWN ? E = 1 : BD() && x && (k === Xe.N ? E = 1 : k === Xe.P && (E = -1)), E !== 0) {
              const z = d(f.activeIndex + E, E);
              c(z), g(z, !0);
            }
            break;
          }
          // >>> Select
          case Xe.ENTER: {
            const E = l.value[f.activeIndex];
            E && !E.data.disabled ? b(E.value) : b(void 0), i.open && P.preventDefault();
            break;
          }
          // >>> Close
          case Xe.ESC:
            i.toggleOpen(!1), i.open && P.stopPropagation();
        }
      },
      onKeyup: () => {
      },
      scrollTo: (P) => {
        c(P);
      }
    }), () => {
      const {
        id: P,
        notFoundContent: k,
        onPopupScroll: x
      } = i, {
        menuItemSelectedIcon: E,
        fieldNames: z,
        virtual: B,
        listHeight: D,
        listItemHeight: W
      } = a, H = o.option, {
        activeIndex: F
      } = f, A = Object.keys(z).map((U) => z[U]);
      return l.value.length === 0 ? v("div", {
        role: "listbox",
        id: `${P}_list`,
        class: `${r.value}-empty`,
        onMousedown: u
      }, [k]) : v(He, null, [v("div", {
        role: "listbox",
        id: `${P}_list`,
        style: {
          height: 0,
          width: 0,
          overflow: "hidden"
        }
      }, [S(F - 1), S(F), S(F + 1)]), v(ND, {
        itemKey: "key",
        ref: s,
        data: l.value,
        height: D,
        itemHeight: W,
        fullHeight: !1,
        onMousedown: u,
        onScroll: x,
        virtual: B
      }, {
        default: (U, j) => {
          var ae;
          const {
            group: G,
            groupOption: Y,
            data: K,
            value: J
          } = U, {
            key: be
          } = K, xe = typeof U.label == "function" ? U.label() : U.label;
          if (G) {
            const Ge = (ae = K.title) !== null && ae !== void 0 ? ae : Y0(xe) && xe;
            return v("div", {
              class: Te(r.value, `${r.value}-group`),
              title: Ge
            }, [H ? H(K) : xe !== void 0 ? xe : be]);
          }
          const {
            disabled: he,
            title: de,
            children: ne,
            style: we,
            class: re,
            className: se
          } = K, ve = HD(K, ["disabled", "title", "children", "style", "class", "className"]), Me = Tn(ve, A), ke = m(J), Fe = `${r.value}-option`, Re = Te(r.value, Fe, re, se, {
            [`${Fe}-grouped`]: Y,
            [`${Fe}-active`]: F === j && !he,
            [`${Fe}-disabled`]: he,
            [`${Fe}-selected`]: ke
          }), We = y(U), et = !E || typeof E == "function" || ke, Le = typeof We == "number" ? We : We || J;
          let Ne = Y0(Le) ? Le.toString() : void 0;
          return de !== void 0 && (Ne = de), v("div", Z(Z({}, Me), {}, {
            "aria-selected": ke,
            class: Re,
            title: Ne,
            onMousemove: (Ge) => {
              ve.onMousemove && ve.onMousemove(Ge), !(F === j || he) && g(j);
            },
            onClick: (Ge) => {
              he || b(J), ve.onClick && ve.onClick(Ge);
            },
            style: we
          }), [v("div", {
            class: `${Fe}-content`
          }, [H ? H(K) : Le]), No(E) || ke, et && v(yl, {
            class: `${r.value}-option-state`,
            customizeIcon: E,
            customizeIconProps: {
              isSelected: ke
            }
          }, {
            default: () => [ke ? "✓" : null]
          })]);
        }
      })]);
    };
  }
});
var jD = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function WD(e) {
  const t = e, {
    key: n,
    children: o
  } = t, i = t.props, {
    value: a,
    disabled: r
  } = i, l = jD(i, ["value", "disabled"]), s = o?.default;
  return I({
    key: n,
    value: a !== void 0 ? a : n,
    children: s,
    disabled: r || r === ""
  }, l);
}
function Bv(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return to(e).map((o, i) => {
    var a;
    if (!No(o) || !o.type)
      return null;
    const {
      type: {
        isSelectOptGroup: r
      },
      key: l,
      children: s,
      props: u
    } = o;
    if (t || !r)
      return WD(o);
    const c = s && s.default ? s.default() : void 0, d = u?.label || ((a = s.label) === null || a === void 0 ? void 0 : a.call(s)) || l;
    return I(I({
      key: `__RC_SELECT_GRP__${l === null ? i : String(l)}__`
    }, u), {
      label: d,
      options: Bv(c || [])
    });
  }).filter((o) => o);
}
function qD(e, t, n) {
  const o = Pe(), i = Pe(), a = Pe(), r = Pe([]);
  return Ie([e, t], () => {
    e.value ? r.value = oi(e.value).slice() : r.value = Bv(t.value);
  }, {
    immediate: !0,
    deep: !0
  }), Ft(() => {
    const l = r.value, s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
    function d(f) {
      let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      for (let m = 0; m < f.length; m += 1) {
        const b = f[m];
        !b[c.options] || g ? (s.set(b[c.value], b), u.set(b[c.label], b)) : d(b[c.options], !0);
      }
    }
    d(l), o.value = l, i.value = s, a.value = u;
  }), {
    options: o,
    valueOptions: i,
    labelOptions: a
  };
}
let U0 = 0;
const GD = process.env.NODE_ENV !== "test" && Ti();
function KD() {
  let e;
  return GD ? (e = U0, U0 += 1) : e = "TEST_OR_SSR", e;
}
function YD() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : le("");
  const t = `rc_select_${KD()}`;
  return e.value || t;
}
function Fv(e) {
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
}
const UD = typeof window < "u" && window.document && window.document.documentElement;
process.env.NODE_ENV;
function XD(e) {
  const {
    mode: t,
    options: n,
    children: o,
    backfill: i,
    allowClear: a,
    placeholder: r,
    getInputElement: l,
    showSearch: s,
    onSearch: u,
    defaultOpen: c,
    autofocus: d,
    labelInValue: f,
    value: g,
    inputValue: m,
    optionLabelProp: b
  } = e, y = Nv(t), S = s !== void 0 ? s : y || t === "combobox", C = n || Bv(o);
  if (Jo(t !== "tags" || C.every((O) => !O.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), Jo(t !== "combobox" || !b, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Jo(t === "combobox" || !i, "`backfill` only works with `combobox` mode."), Jo(t === "combobox" || !l, "`getInputElement` only work with `combobox` mode."), Rg(t !== "combobox" || !l || !a || !r, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !S && t !== "combobox" && t !== "tags" && Jo(!1, "`onSearch` should work with `showSearch` instead of use alone."), Rg(!c || d, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), g != null) {
    const O = Fv(g);
    Jo(!f || O.every(($) => typeof $ == "object" && ("key" in $ || "value" in $)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), Jo(!y || Array.isArray(g), "`value` should be array when `mode` is `multiple` or `tags`");
  }
  if (o) {
    let O = null;
    o.some(($) => {
      var P;
      if (!No($) || !$.type)
        return !1;
      const {
        type: k
      } = $;
      return k.isSelectOption ? !1 : k.isSelectOptGroup ? !(((P = $.children) === null || P === void 0 ? void 0 : P.default()) || []).every((z) => !No(z) || !$.type || z.type.isSelectOption ? !0 : (O = z.type, !1)) : (O = k, !0);
    }), O && Jo(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${O.displayName || O.name || O}\`.`), Jo(m === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  }
}
function Pp(e, t) {
  return Fv(e).join("").toUpperCase().includes(t);
}
const QD = ((e, t, n, o, i) => R(() => {
  const a = n.value, r = i?.value, l = o?.value;
  if (!a || l === !1)
    return e.value;
  const {
    options: s,
    label: u,
    value: c
  } = t.value, d = [], f = typeof l == "function", g = a.toUpperCase(), m = f ? l : (y, S) => r ? Pp(S[r], g) : S[s] ? Pp(S[u !== "children" ? u : "label"], g) : Pp(S[c], g), b = f ? (y) => Yg(y) : (y) => y;
  return e.value.forEach((y) => {
    if (y[s]) {
      if (m(a, b(y)))
        d.push(y);
      else {
        const C = y[s].filter((O) => m(a, b(O)));
        C.length && d.push(I(I({}, y), {
          [s]: C
        }));
      }
      return;
    }
    m(a, b(y)) && d.push(y);
  }), d;
})), ZD = ((e, t) => {
  const n = Pe({
    values: /* @__PURE__ */ new Map(),
    options: /* @__PURE__ */ new Map()
  });
  return [R(() => {
    const {
      values: a,
      options: r
    } = n.value, l = e.value.map((c) => {
      var d;
      return c.label === void 0 ? I(I({}, c), {
        label: (d = a.get(c.value)) === null || d === void 0 ? void 0 : d.label
      }) : c;
    }), s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
    return l.forEach((c) => {
      s.set(c.value, c), u.set(c.value, t.value.get(c.value) || r.get(c.value));
    }), n.value.values = s, n.value.options = u, l;
  }), (a) => t.value.get(a) || n.value.options.get(a)];
});
function jo(e, t) {
  const {
    defaultValue: n,
    value: o = le()
  } = t || {};
  let i = typeof e == "function" ? e() : e;
  o.value !== void 0 && (i = M(o)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  const a = le(i), r = le(i);
  Ft(() => {
    let s = o.value !== void 0 ? o.value : a.value;
    t.postState && (s = t.postState(s)), r.value = s;
  });
  function l(s) {
    const u = r.value;
    a.value = s, oi(r.value) !== s && t.onChange && t.onChange(s, u);
  }
  return Ie(o, () => {
    a.value = o.value;
  }), [r, l];
}
function On(e) {
  const t = typeof e == "function" ? e() : e, n = le(t);
  function o(i) {
    n.value = i;
  }
  return [n, o];
}
const JD = ["inputValue"];
function MC() {
  return I(I({}, CC()), {
    prefixCls: String,
    id: String,
    backfill: {
      type: Boolean,
      default: void 0
    },
    // >>> Field Names
    fieldNames: Object,
    // >>> Search
    /** @deprecated Use `searchValue` instead */
    inputValue: String,
    searchValue: String,
    onSearch: Function,
    autoClearSearchValue: {
      type: Boolean,
      default: void 0
    },
    // >>> Select
    onSelect: Function,
    onDeselect: Function,
    // >>> Options
    /**
     * In Select, `false` means do nothing.
     * In TreeSelect, `false` will highlight match item.
     * It's by design.
     */
    filterOption: {
      type: [Boolean, Function],
      default: void 0
    },
    filterSort: Function,
    optionFilterProp: String,
    optionLabelProp: String,
    options: Array,
    defaultActiveFirstOption: {
      type: Boolean,
      default: void 0
    },
    virtual: {
      type: Boolean,
      default: void 0
    },
    listHeight: Number,
    listItemHeight: Number,
    // >>> Icon
    menuItemSelectedIcon: ue.any,
    mode: String,
    labelInValue: {
      type: Boolean,
      default: void 0
    },
    value: ue.any,
    defaultValue: ue.any,
    onChange: Function,
    children: Array
  });
}
function ez(e) {
  return !e || typeof e != "object";
}
const tz = ye({
  compatConfig: {
    MODE: 3
  },
  name: "VcSelect",
  inheritAttrs: !1,
  props: wn(MC(), {
    prefixCls: "vc-select",
    autoClearSearchValue: !0,
    listHeight: 200,
    listItemHeight: 20,
    dropdownMatchSelectWidth: !0
  }),
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: i
    } = t;
    const a = YD(Ut(e, "id")), r = R(() => Nv(e.mode)), l = R(() => !!(!e.options && e.children)), s = R(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), u = R(() => nC(e.fieldNames, l.value)), [c, d] = jo("", {
      value: R(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
      postState: (re) => re || ""
    }), f = qD(Ut(e, "options"), Ut(e, "children"), u), {
      valueOptions: g,
      labelOptions: m,
      options: b
    } = f, y = (re) => Fv(re).map((ve) => {
      var Me, ke;
      let Fe, Re, We, et;
      ez(ve) ? Fe = ve : (We = ve.key, Re = ve.label, Fe = (Me = ve.value) !== null && Me !== void 0 ? Me : We);
      const Le = g.value.get(Fe);
      return Le && (Re === void 0 && (Re = Le?.[e.optionLabelProp || u.value.label]), We === void 0 && (We = (ke = Le?.key) !== null && ke !== void 0 ? ke : Fe), et = Le?.disabled), {
        label: Re,
        value: Fe,
        key: We,
        disabled: et,
        option: Le
      };
    }), [S, C] = jo(e.defaultValue, {
      value: Ut(e, "value")
    }), O = R(() => {
      var re;
      const se = y(S.value);
      return e.mode === "combobox" && !(!((re = se[0]) === null || re === void 0) && re.value) ? [] : se;
    }), [$, P] = ZD(O, g), k = R(() => {
      if (!e.mode && $.value.length === 1) {
        const re = $.value[0];
        if (re.value === null && (re.label === null || re.label === void 0))
          return [];
      }
      return $.value.map((re) => {
        var se;
        return I(I({}, re), {
          label: (se = typeof re.label == "function" ? re.label() : re.label) !== null && se !== void 0 ? se : re.value
        });
      });
    }), x = R(() => new Set($.value.map((re) => re.value)));
    Ft(() => {
      var re;
      if (e.mode === "combobox") {
        const se = (re = $.value[0]) === null || re === void 0 ? void 0 : re.value;
        se != null && d(String(se));
      }
    }, {
      flush: "post"
    });
    const E = (re, se) => {
      const ve = se ?? re;
      return {
        [u.value.value]: re,
        [u.value.label]: ve
      };
    }, z = Pe();
    Ft(() => {
      if (e.mode !== "tags") {
        z.value = b.value;
        return;
      }
      const re = b.value.slice(), se = (ve) => g.value.has(ve);
      [...$.value].sort((ve, Me) => ve.value < Me.value ? -1 : 1).forEach((ve) => {
        const Me = ve.value;
        se(Me) || re.push(E(Me, ve.label));
      }), z.value = re;
    });
    const B = QD(z, u, c, s, Ut(e, "optionFilterProp")), D = R(() => e.mode !== "tags" || !c.value || B.value.some((re) => re[e.optionFilterProp || "value"] === c.value) ? B.value : [E(c.value), ...B.value]), W = R(() => e.filterSort ? [...D.value].sort((re, se) => e.filterSort(re, se)) : D.value), H = R(() => W_(W.value, {
      fieldNames: u.value,
      childrenAsData: l.value
    })), F = (re) => {
      const se = y(re);
      if (C(se), e.onChange && // Trigger event only when value changed
      (se.length !== $.value.length || se.some((ve, Me) => {
        var ke;
        return ((ke = $.value[Me]) === null || ke === void 0 ? void 0 : ke.value) !== ve?.value;
      }))) {
        const ve = e.labelInValue ? se.map((ke) => I(I({}, ke), {
          originLabel: ke.label,
          label: typeof ke.label == "function" ? ke.label() : ke.label
        })) : se.map((ke) => ke.value), Me = se.map((ke) => Yg(P(ke.value)));
        e.onChange(
          // Value
          r.value ? ve : ve[0],
          // Option
          r.value ? Me : Me[0]
        );
      }
    }, [A, U] = On(null), [j, ae] = On(0), G = R(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), Y = function(re, se) {
      let {
        source: ve = "keyboard"
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      ae(se), e.backfill && e.mode === "combobox" && re !== null && ve === "keyboard" && U(String(re));
    }, K = (re, se) => {
      const ve = () => {
        var Me;
        const ke = P(re), Fe = ke?.[u.value.label];
        return [e.labelInValue ? {
          label: typeof Fe == "function" ? Fe() : Fe,
          originLabel: Fe,
          value: re,
          key: (Me = ke?.key) !== null && Me !== void 0 ? Me : re
        } : re, Yg(ke)];
      };
      if (se && e.onSelect) {
        const [Me, ke] = ve();
        e.onSelect(Me, ke);
      } else if (!se && e.onDeselect) {
        const [Me, ke] = ve();
        e.onDeselect(Me, ke);
      }
    }, J = (re, se) => {
      let ve;
      const Me = r.value ? se.selected : !0;
      Me ? ve = r.value ? [...$.value, re] : [re] : ve = $.value.filter((ke) => ke.value !== re), F(ve), K(re, Me), e.mode === "combobox" ? U("") : (!r.value || e.autoClearSearchValue) && (d(""), U(""));
    }, be = (re, se) => {
      F(re), (se.type === "remove" || se.type === "clear") && se.values.forEach((ve) => {
        K(ve.value, !1);
      });
    }, xe = (re, se) => {
      var ve;
      if (d(re), U(null), se.source === "submit") {
        const Me = (re || "").trim();
        if (Me) {
          const ke = Array.from(/* @__PURE__ */ new Set([...x.value, Me]));
          F(ke), K(Me, !0), d("");
        }
        return;
      }
      se.source !== "blur" && (e.mode === "combobox" && F(re), (ve = e.onSearch) === null || ve === void 0 || ve.call(e, re));
    }, he = (re) => {
      let se = re;
      e.mode !== "tags" && (se = re.map((Me) => {
        const ke = m.value.get(Me);
        return ke?.value;
      }).filter((Me) => Me !== void 0));
      const ve = Array.from(/* @__PURE__ */ new Set([...x.value, ...se]));
      F(ve), ve.forEach((Me) => {
        K(Me, !0);
      });
    }, de = R(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
    FD(SC(I(I({}, f), {
      flattenOptions: H,
      onActiveValue: Y,
      defaultActiveFirstOption: G,
      onSelect: J,
      menuItemSelectedIcon: Ut(e, "menuItemSelectedIcon"),
      rawValues: x,
      fieldNames: u,
      virtual: de,
      listHeight: Ut(e, "listHeight"),
      listItemHeight: Ut(e, "listItemHeight"),
      childrenAsData: l
    }))), process.env.NODE_ENV !== "production" && Ft(() => {
      XD(e);
    }, {
      flush: "post"
    });
    const ne = le();
    n({
      focus() {
        var re;
        (re = ne.value) === null || re === void 0 || re.focus();
      },
      blur() {
        var re;
        (re = ne.value) === null || re === void 0 || re.blur();
      },
      scrollTo(re) {
        var se;
        (se = ne.value) === null || se === void 0 || se.scrollTo(re);
      }
    });
    const we = R(() => Tn(e, [
      "id",
      "mode",
      "prefixCls",
      "backfill",
      "fieldNames",
      // Search
      "inputValue",
      "searchValue",
      "onSearch",
      "autoClearSearchValue",
      // Select
      "onSelect",
      "onDeselect",
      "dropdownMatchSelectWidth",
      // Options
      "filterOption",
      "filterSort",
      "optionFilterProp",
      "optionLabelProp",
      "options",
      "children",
      "defaultActiveFirstOption",
      "menuItemSelectedIcon",
      "virtual",
      "listHeight",
      "listItemHeight",
      // Value
      "value",
      "defaultValue",
      "labelInValue",
      "onChange"
    ]));
    return () => v($D, Z(Z(Z({}, we.value), o), {}, {
      id: a,
      prefixCls: e.prefixCls,
      ref: ne,
      omitDomProps: JD,
      mode: e.mode,
      displayValues: k.value,
      onDisplayValuesChange: be,
      searchValue: c.value,
      onSearch: xe,
      onSearchSplit: he,
      dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
      OptionList: VD,
      emptyOptions: !H.value.length,
      activeValue: A.value,
      activeDescendantId: `${a}_list_${j.value}`
    }), i);
  }
}), Lv = () => null;
Lv.isSelectOption = !0;
Lv.displayName = "ASelectOption";
const Hv = () => null;
Hv.isSelectOptGroup = !0;
Hv.displayName = "ASelectOptGroup";
var nz = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, oz = Symbol("iconContext"), TC = function() {
  return Tt(oz, {
    prefixCls: le("anticon"),
    rootClassName: le(""),
    csp: le()
  });
};
function Vv() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function iz(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
var X0 = "data-vc-order", az = "vc-icon-key", eh = /* @__PURE__ */ new Map();
function kC() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mark;
  return t ? t.startsWith("data-") ? t : "data-".concat(t) : az;
}
function jv(e) {
  if (e.attachTo)
    return e.attachTo;
  var t = document.querySelector("head");
  return t || document.body;
}
function rz(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function EC(e) {
  return Array.from((eh.get(e) || e).children).filter(function(t) {
    return t.tagName === "STYLE";
  });
}
function _C(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!Vv())
    return null;
  var n = t.csp, o = t.prepend, i = document.createElement("style");
  i.setAttribute(X0, rz(o)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = e;
  var a = jv(t), r = a.firstChild;
  if (o) {
    if (o === "queue") {
      var l = EC(a).filter(function(s) {
        return ["prepend", "prependQueue"].includes(s.getAttribute(X0));
      });
      if (l.length)
        return a.insertBefore(i, l[l.length - 1].nextSibling), i;
    }
    a.insertBefore(i, r);
  } else
    a.appendChild(i);
  return i;
}
function lz(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = jv(t);
  return EC(n).find(function(o) {
    return o.getAttribute(kC(t)) === e;
  });
}
function sz(e, t) {
  var n = eh.get(e);
  if (!n || !iz(document, n)) {
    var o = _C("", t), i = o.parentNode;
    eh.set(e, i), e.removeChild(o);
  }
}
function uz(e, t) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = jv(n);
  sz(o, n);
  var i = lz(t, n);
  if (i)
    return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== e && (i.innerHTML = e), i;
  var a = _C(e, n);
  return a.setAttribute(kC(n), t), a;
}
function Q0(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      cz(e, i, n[i]);
    });
  }
  return e;
}
function cz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function dz(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
}
function fz(e, t) {
  dz(e, "[@ant-design/icons-vue] ".concat(t));
}
function Z0(e) {
  return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
}
function th(e, t, n) {
  return n ? io(e.tag, Q0({
    key: t
  }, n, e.attrs), (e.children || []).map(function(o, i) {
    return th(o, "".concat(t, "-").concat(e.tag, "-").concat(i));
  })) : io(e.tag, Q0({
    key: t
  }, e.attrs), (e.children || []).map(function(o, i) {
    return th(o, "".concat(t, "-").concat(e.tag, "-").concat(i));
  }));
}
function AC(e) {
  return Wa(e)[0];
}
function DC(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
var pz = `
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`;
function zC(e) {
  return e && e.getRootNode && e.getRootNode();
}
function gz(e) {
  return Vv() ? zC(e) instanceof ShadowRoot : !1;
}
function hz(e) {
  return gz(e) ? zC(e) : null;
}
var vz = function() {
  var t = TC(), n = t.prefixCls, o = t.csp, i = ui(), a = pz;
  n && (a = a.replace(/anticon/g, n.value)), Nt(function() {
    if (Vv()) {
      var r = i.vnode.el, l = hz(r);
      uz(a, "@ant-design-vue-icons", {
        prepend: !0,
        csp: o.value,
        attachTo: l
      });
    }
  });
}, mz = ["icon", "primaryColor", "secondaryColor"];
function bz(e, t) {
  if (e == null) return {};
  var n = yz(e, t), o, i;
  if (Object.getOwnPropertySymbols) {
    var a = Object.getOwnPropertySymbols(e);
    for (i = 0; i < a.length; i++)
      o = a[i], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function yz(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), i, a;
  for (a = 0; a < o.length; a++)
    i = o[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
  return n;
}
function ud(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      xz(e, i, n[i]);
    });
  }
  return e;
}
function xz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Pu = Dn({
  primaryColor: "#333",
  secondaryColor: "#E6E6E6",
  calculated: !1
});
function wz(e) {
  var t = e.primaryColor, n = e.secondaryColor;
  Pu.primaryColor = t, Pu.secondaryColor = n || AC(t), Pu.calculated = !!n;
}
function Sz() {
  return ud({}, Pu);
}
var Er = function(t, n) {
  var o = ud({}, t, n.attrs), i = o.icon, a = o.primaryColor, r = o.secondaryColor, l = bz(o, mz), s = Pu;
  if (a && (s = {
    primaryColor: a,
    secondaryColor: r || AC(a)
  }), fz(Z0(i), "icon should be icon definiton, but got ".concat(i)), !Z0(i))
    return null;
  var u = i;
  return u && typeof u.icon == "function" && (u = ud({}, u, {
    icon: u.icon(s.primaryColor, s.secondaryColor)
  })), th(u.icon, "svg-".concat(u.name), ud({}, l, {
    "data-icon": u.name,
    width: "1em",
    height: "1em",
    fill: "currentColor",
    "aria-hidden": "true"
  }));
};
Er.props = {
  icon: Object,
  primaryColor: String,
  secondaryColor: String,
  focusable: String
};
Er.inheritAttrs = !1;
Er.displayName = "IconBase";
Er.getTwoToneColors = Sz;
Er.setTwoToneColors = wz;
function Cz(e, t) {
  return Iz(e) || Oz(e, t) || Pz(e, t) || $z();
}
function $z() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Pz(e, t) {
  if (e) {
    if (typeof e == "string") return J0(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 J0(e, t);
  }
}
function J0(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, o = new Array(t); n < t; n++)
    o[n] = e[n];
  return o;
}
function Oz(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], i = !0, a = !1, r, l;
    try {
      for (n = n.call(e); !(i = (r = n.next()).done) && (o.push(r.value), !(t && o.length === t)); i = !0)
        ;
    } catch (s) {
      a = !0, l = s;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (a) throw l;
      }
    }
    return o;
  }
}
function Iz(e) {
  if (Array.isArray(e)) return e;
}
function RC(e) {
  var t = DC(e), n = Cz(t, 2), o = n[0], i = n[1];
  return Er.setTwoToneColors({
    primaryColor: o,
    secondaryColor: i
  });
}
function Mz() {
  var e = Er.getTwoToneColors();
  return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
}
var Tz = ye({
  name: "InsertStyles",
  setup: function() {
    return vz(), function() {
      return null;
    };
  }
}), kz = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function Ez(e, t) {
  return zz(e) || Dz(e, t) || Az(e, t) || _z();
}
function _z() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Az(e, t) {
  if (e) {
    if (typeof e == "string") return ey(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 ey(e, t);
  }
}
function ey(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, o = new Array(t); n < t; n++)
    o[n] = e[n];
  return o;
}
function Dz(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], i = !0, a = !1, r, l;
    try {
      for (n = n.call(e); !(i = (r = n.next()).done) && (o.push(r.value), !(t && o.length === t)); i = !0)
        ;
    } catch (s) {
      a = !0, l = s;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (a) throw l;
      }
    }
    return o;
  }
}
function zz(e) {
  if (Array.isArray(e)) return e;
}
function ty(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      mu(e, i, n[i]);
    });
  }
  return e;
}
function mu(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function Rz(e, t) {
  if (e == null) return {};
  var n = Nz(e, t), o, i;
  if (Object.getOwnPropertySymbols) {
    var a = Object.getOwnPropertySymbols(e);
    for (i = 0; i < a.length; i++)
      o = a[i], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function Nz(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), i, a;
  for (a = 0; a < o.length; a++)
    i = o[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
  return n;
}
RC(QE.primary);
var pn = function(t, n) {
  var o, i = ty({}, t, n.attrs), a = i.class, r = i.icon, l = i.spin, s = i.rotate, u = i.tabindex, c = i.twoToneColor, d = i.onClick, f = Rz(i, kz), g = TC(), m = g.prefixCls, b = g.rootClassName, y = (o = {}, mu(o, b.value, !!b.value), mu(o, m.value, !0), mu(o, "".concat(m.value, "-").concat(r.name), !!r.name), mu(o, "".concat(m.value, "-spin"), !!l || r.name === "loading"), o), S = u;
  S === void 0 && d && (S = -1);
  var C = s ? {
    msTransform: "rotate(".concat(s, "deg)"),
    transform: "rotate(".concat(s, "deg)")
  } : void 0, O = DC(c), $ = Ez(O, 2), P = $[0], k = $[1];
  return v("span", ty({
    role: "img",
    "aria-label": r.name
  }, f, {
    onClick: d,
    class: [y, a],
    tabindex: S
  }), [v(Er, {
    icon: r,
    primaryColor: P,
    secondaryColor: k,
    style: C
  }, null), v(Tz, null, null)]);
};
pn.props = {
  spin: Boolean,
  rotate: Number,
  icon: Object,
  twoToneColor: [String, Array]
};
pn.displayName = "AntdIcon";
pn.inheritAttrs = !1;
pn.getTwoToneColor = Mz;
pn.setTwoToneColor = RC;
function ny(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Bz(e, i, n[i]);
    });
  }
  return e;
}
function Bz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var yf = function(t, n) {
  var o = ny({}, t, n.attrs);
  return v(pn, ny({}, o, {
    icon: nz
  }), null);
};
yf.displayName = "DownOutlined";
yf.inheritAttrs = !1;
var Fz = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, name: "loading", theme: "outlined" };
function oy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Lz(e, i, n[i]);
    });
  }
  return e;
}
function Lz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ba = function(t, n) {
  var o = oy({}, t, n.attrs);
  return v(pn, oy({}, o, {
    icon: Fz
  }), null);
};
ba.displayName = "LoadingOutlined";
ba.inheritAttrs = !1;
var Hz = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
function iy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Vz(e, i, n[i]);
    });
  }
  return e;
}
function Vz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Wv = function(t, n) {
  var o = iy({}, t, n.attrs);
  return v(pn, iy({}, o, {
    icon: Hz
  }), null);
};
Wv.displayName = "CheckOutlined";
Wv.inheritAttrs = !1;
var jz = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" };
function ay(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Wz(e, i, n[i]);
    });
  }
  return e;
}
function Wz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var wa = function(t, n) {
  var o = ay({}, t, n.attrs);
  return v(pn, ay({}, o, {
    icon: jz
  }), null);
};
wa.displayName = "CloseOutlined";
wa.inheritAttrs = !1;
var qz = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
function ry(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Gz(e, i, n[i]);
    });
  }
  return e;
}
function Gz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var di = function(t, n) {
  var o = ry({}, t, n.attrs);
  return v(pn, ry({}, o, {
    icon: qz
  }), null);
};
di.displayName = "CloseCircleFilled";
di.inheritAttrs = !1;
var Kz = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, name: "search", theme: "outlined" };
function ly(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      Yz(e, i, n[i]);
    });
  }
  return e;
}
function Yz(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var xf = function(t, n) {
  var o = ly({}, t, n.attrs);
  return v(pn, ly({}, o, {
    icon: Kz
  }), null);
};
xf.displayName = "SearchOutlined";
xf.inheritAttrs = !1;
function Uz(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    loading: n,
    multiple: o,
    prefixCls: i,
    hasFeedback: a,
    feedbackIcon: r,
    showArrow: l
  } = e, s = e.suffixIcon || t.suffixIcon && t.suffixIcon(), u = e.clearIcon || t.clearIcon && t.clearIcon(), c = e.menuItemSelectedIcon || t.menuItemSelectedIcon && t.menuItemSelectedIcon(), d = e.removeIcon || t.removeIcon && t.removeIcon(), f = u ?? v(di, null, null), g = (S) => v(He, null, [l !== !1 && S, a && r]);
  let m = null;
  if (s !== void 0)
    m = g(s);
  else if (n)
    m = g(v(ba, {
      spin: !0
    }, null));
  else {
    const S = `${i}-suffix`;
    m = (C) => {
      let {
        open: O,
        showSearch: $
      } = C;
      return g(O && $ ? v(xf, {
        class: S
      }, null) : v(yf, {
        class: S
      }, null));
    };
  }
  let b = null;
  c !== void 0 ? b = c : o ? b = v(Wv, null, null) : b = null;
  let y = null;
  return d !== void 0 ? y = d : y = v(wa, null, null), {
    clearIcon: f,
    suffixIcon: m,
    itemIcon: b,
    removeIcon: y
  };
}
function qv(e) {
  const t = Symbol("contextKey");
  return {
    useProvide: (i, a) => {
      const r = Dn({});
      return kt(t, r), Ft(() => {
        I(r, i, a || {});
      }), r;
    },
    useInject: () => Tt(t, e) || {}
  };
}
const Ad = Symbol("ContextProps"), Dd = Symbol("InternalContextProps"), Xz = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : R(() => !0);
  const n = le(/* @__PURE__ */ new Map()), o = (r, l) => {
    n.value.set(r, l), n.value = new Map(n.value);
  }, i = (r) => {
    n.value.delete(r), n.value = new Map(n.value);
  }, a = ui();
  Ie([t, n], () => {
    if (process.env.NODE_ENV !== "production" && t.value && n.value.size > 1) {
      Ln(!1, "Form.Item", `FormItem can only collect one field item, you haved set ${[...n.value.values()].map((l) => `\`${l.name}\``).join(", ")} ${n.value.size} field items.
        You can set not need to be collected fields into \`a-form-item-rest\``);
      let r = a;
      for (; r.parent; )
        console.warn("at", r.type), r = r.parent;
    }
  }), kt(Ad, e), kt(Dd, {
    addFormItemField: o,
    removeFormItemField: i
  });
}, nh = {
  id: R(() => {
  }),
  onFieldBlur: () => {
  },
  onFieldChange: () => {
  },
  clearValidate: () => {
  }
}, oh = {
  addFormItemField: () => {
  },
  removeFormItemField: () => {
  }
}, fi = () => {
  const e = Tt(Dd, oh), t = Symbol("FormItemFieldKey"), n = ui();
  return e.addFormItemField(t, n.type), At(() => {
    e.removeFormItemField(t);
  }), kt(Dd, oh), kt(Ad, nh), Tt(Ad, nh);
}, ih = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItemRest",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return kt(Dd, oh), kt(Ad, nh), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), si = qv({}), zd = ye({
  name: "NoFormStatus",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return si.useProvide({}), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function Ki(e, t, n) {
  return Te({
    [`${e}-status-success`]: t === "success",
    [`${e}-status-warning`]: t === "warning",
    [`${e}-status-error`]: t === "error",
    [`${e}-status-validating`]: t === "validating",
    [`${e}-has-feedback`]: n
  });
}
const $l = (e, t) => t || e, Qz = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-block": {
        display: "flex",
        width: "100%"
      },
      "&-vertical": {
        flexDirection: "column"
      }
    }
  };
}, Zz = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-rtl": {
        direction: "rtl"
      },
      "&-vertical": {
        flexDirection: "column"
      },
      "&-align": {
        flexDirection: "column",
        "&-center": {
          alignItems: "center"
        },
        "&-start": {
          alignItems: "flex-start"
        },
        "&-end": {
          alignItems: "flex-end"
        },
        "&-baseline": {
          alignItems: "baseline"
        }
      },
      [`${t}-item`]: {
        "&:empty": {
          display: "none"
        }
      }
    }
  };
}, NC = nn("Space", (e) => [Zz(e), Qz(e)]), Jz = () => ({
  compactSize: String,
  compactDirection: ue.oneOf(ri("horizontal", "vertical")).def("horizontal"),
  isFirstItem: st(),
  isLastItem: st()
}), wf = qv(null), Vs = (e, t) => {
  const n = wf.useInject(), o = R(() => {
    if (!n || tw(n)) return "";
    const {
      compactDirection: i,
      isFirstItem: a,
      isLastItem: r
    } = n, l = i === "vertical" ? "-vertical-" : "-";
    return Te({
      [`${e.value}-compact${l}item`]: !0,
      [`${e.value}-compact${l}first-item`]: a,
      [`${e.value}-compact${l}last-item`]: r,
      [`${e.value}-compact${l}item-rtl`]: t.value === "rtl"
    });
  });
  return {
    compactSize: R(() => n?.compactSize),
    compactDirection: R(() => n?.compactDirection),
    compactItemClassnames: o
  };
}, Wu = ye({
  name: "NoCompactStyle",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return wf.useProvide(null), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), eR = () => ({
  prefixCls: String,
  size: {
    type: String
  },
  direction: ue.oneOf(ri("horizontal", "vertical")).def("horizontal"),
  align: ue.oneOf(ri("start", "end", "center", "baseline")),
  block: {
    type: Boolean,
    default: void 0
  }
}), tR = ye({
  name: "CompactItem",
  props: Jz(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return wf.useProvide(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), ah = ye({
  name: "ASpaceCompact",
  inheritAttrs: !1,
  props: eR(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: i,
      direction: a
    } = yt("space-compact", e), r = wf.useInject(), [l, s] = NC(i), u = R(() => Te(i.value, s.value, {
      [`${i.value}-rtl`]: a.value === "rtl",
      [`${i.value}-block`]: e.block,
      [`${i.value}-vertical`]: e.direction === "vertical"
    }));
    return () => {
      var c;
      const d = to(((c = o.default) === null || c === void 0 ? void 0 : c.call(o)) || []);
      return d.length === 0 ? null : l(v("div", Z(Z({}, n), {}, {
        class: [u.value, n.class]
      }), [d.map((f, g) => {
        var m;
        const b = f && f.key || `${i.value}-item-${g}`, y = !r || tw(r);
        return v(tR, {
          key: b,
          compactSize: (m = e.size) !== null && m !== void 0 ? m : "middle",
          compactDirection: e.direction,
          isFirstItem: g === 0 && (y || r?.isFirstItem),
          isLastItem: g === d.length - 1 && (y || r?.isLastItem)
        }, {
          default: () => [f]
        });
      })]));
    };
  }
}), nR = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), oR = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), Sf = function(e, t, n, o) {
  const a = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  return {
    [`
      ${a}${e}-enter,
      ${a}${e}-appear
    `]: I(I({}, nR(o)), {
      animationPlayState: "paused"
    }),
    [`${a}${e}-leave`]: I(I({}, oR(o)), {
      animationPlayState: "paused"
    }),
    [`
      ${a}${e}-enter${e}-enter-active,
      ${a}${e}-appear${e}-appear-active
    `]: {
      animationName: t,
      animationPlayState: "running"
    },
    [`${a}${e}-leave${e}-leave-active`]: {
      animationName: n,
      animationPlayState: "running",
      pointerEvents: "none"
    }
  };
}, iR = new Bt("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), aR = new Bt("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
}), rR = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const {
    antCls: n
  } = e, o = `${n}-fade`, i = t ? "&" : "";
  return [Sf(o, iR, aR, e.motionDurationMid, t), {
    [`
        ${i}${o}-enter,
        ${i}${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: "linear"
    },
    [`${i}${o}-leave`]: {
      animationTimingFunction: "linear"
    }
  }];
}, lR = new Bt("antMoveDownIn", {
  "0%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), sR = new Bt("antMoveDownOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), uR = new Bt("antMoveLeftIn", {
  "0%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), cR = new Bt("antMoveLeftOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), dR = new Bt("antMoveRightIn", {
  "0%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), fR = new Bt("antMoveRightOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), pR = new Bt("antMoveUpIn", {
  "0%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), gR = new Bt("antMoveUpOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), hR = {
  "move-up": {
    inKeyframes: pR,
    outKeyframes: gR
  },
  "move-down": {
    inKeyframes: lR,
    outKeyframes: sR
  },
  "move-left": {
    inKeyframes: uR,
    outKeyframes: cR
  },
  "move-right": {
    inKeyframes: dR,
    outKeyframes: fR
  }
}, Ts = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: a
  } = hR[t];
  return [Sf(o, i, a, e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, Cf = new Bt("antSlideUpIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), $f = new Bt("antSlideUpOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), Pf = new Bt("antSlideDownIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  }
}), Of = new Bt("antSlideDownOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  }
}), vR = new Bt("antSlideLeftIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), mR = new Bt("antSlideLeftOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), bR = new Bt("antSlideRightIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  }
}), yR = new Bt("antSlideRightOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  }
}), xR = {
  "slide-up": {
    inKeyframes: Cf,
    outKeyframes: $f
  },
  "slide-down": {
    inKeyframes: Pf,
    outKeyframes: Of
  },
  "slide-left": {
    inKeyframes: vR,
    outKeyframes: mR
  },
  "slide-right": {
    inKeyframes: bR,
    outKeyframes: yR
  }
}, ya = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: a
  } = xR[t];
  return [Sf(o, i, a, e.motionDurationMid), {
    [`
      ${o}-enter,
      ${o}-appear
    `]: {
      transform: "scale(0)",
      transformOrigin: "0% 0%",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutQuint
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInQuint
    }
  }];
}, Gv = new Bt("antZoomIn", {
  "0%": {
    transform: "scale(0.2)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), wR = new Bt("antZoomOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.2)",
    opacity: 0
  }
}), sy = new Bt("antZoomBigIn", {
  "0%": {
    transform: "scale(0.8)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), uy = new Bt("antZoomBigOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.8)",
    opacity: 0
  }
}), SR = new Bt("antZoomUpIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  }
}), CR = new Bt("antZoomUpOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  }
}), $R = new Bt("antZoomLeftIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  }
}), PR = new Bt("antZoomLeftOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  }
}), OR = new Bt("antZoomRightIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  }
}), IR = new Bt("antZoomRightOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  }
}), MR = new Bt("antZoomDownIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  }
}), TR = new Bt("antZoomDownOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  }
}), kR = {
  zoom: {
    inKeyframes: Gv,
    outKeyframes: wR
  },
  "zoom-big": {
    inKeyframes: sy,
    outKeyframes: uy
  },
  "zoom-big-fast": {
    inKeyframes: sy,
    outKeyframes: uy
  },
  "zoom-left": {
    inKeyframes: $R,
    outKeyframes: PR
  },
  "zoom-right": {
    inKeyframes: OR,
    outKeyframes: IR
  },
  "zoom-up": {
    inKeyframes: SR,
    outKeyframes: CR
  },
  "zoom-down": {
    inKeyframes: MR,
    outKeyframes: TR
  }
}, Ju = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: a
  } = kR[t];
  return [Sf(o, i, a, t === "zoom-big-fast" ? e.motionDurationFast : e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      transform: "scale(0)",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc,
      "&-prepare": {
        transform: "none"
      }
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, Kv = (e) => ({
  [e.componentCls]: {
    // For common/openAnimation
    [`${e.antCls}-motion-collapse-legacy`]: {
      overflow: "hidden",
      "&-active": {
        transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
        opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
      }
    },
    [`${e.antCls}-motion-collapse`]: {
      overflow: "hidden",
      transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
        opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
    }
  }
}), cy = (e) => {
  const {
    controlPaddingHorizontal: t
  } = e;
  return {
    position: "relative",
    display: "block",
    minHeight: e.controlHeight,
    padding: `${(e.controlHeight - e.fontSize * e.lineHeight) / 2}px ${t}px`,
    color: e.colorText,
    fontWeight: "normal",
    fontSize: e.fontSize,
    lineHeight: e.lineHeight,
    boxSizing: "border-box"
  };
}, ER = (e) => {
  const {
    antCls: t,
    componentCls: n
  } = e, o = `${n}-item`;
  return [
    {
      [`${n}-dropdown`]: I(I({}, Zt(e)), {
        position: "absolute",
        top: -9999,
        zIndex: e.zIndexPopup,
        boxSizing: "border-box",
        padding: e.paddingXXS,
        overflow: "hidden",
        fontSize: e.fontSize,
        // Fix select render lag of long text in chrome
        // https://github.com/ant-design/ant-design/issues/11456
        // https://github.com/ant-design/ant-design/issues/11843
        fontVariant: "initial",
        backgroundColor: e.colorBgElevated,
        borderRadius: e.borderRadiusLG,
        outline: "none",
        boxShadow: e.boxShadowSecondary,
        [`
            &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
            &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
          `]: {
          animationName: Cf
        },
        [`
            &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-topLeft,
            &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-topLeft
          `]: {
          animationName: Pf
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
          animationName: $f
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
          animationName: Of
        },
        "&-hidden": {
          display: "none"
        },
        "&-empty": {
          color: e.colorTextDisabled
        },
        // ========================= Options =========================
        [`${o}-empty`]: I(I({}, cy(e)), {
          color: e.colorTextDisabled
        }),
        [`${o}`]: I(I({}, cy(e)), {
          cursor: "pointer",
          transition: `background ${e.motionDurationSlow} ease`,
          borderRadius: e.borderRadiusSM,
          // =========== Group ============
          "&-group": {
            color: e.colorTextDescription,
            fontSize: e.fontSizeSM,
            cursor: "default"
          },
          // =========== Option ===========
          "&-option": {
            display: "flex",
            "&-content": I({
              flex: "auto"
            }, Mr),
            "&-state": {
              flex: "none"
            },
            [`&-active:not(${o}-option-disabled)`]: {
              backgroundColor: e.controlItemBgHover
            },
            [`&-selected:not(${o}-option-disabled)`]: {
              color: e.colorText,
              fontWeight: e.fontWeightStrong,
              backgroundColor: e.controlItemBgActive,
              [`${o}-option-state`]: {
                color: e.colorPrimary
              }
            },
            "&-disabled": {
              [`&${o}-option-selected`]: {
                backgroundColor: e.colorBgContainerDisabled
              },
              color: e.colorTextDisabled,
              cursor: "not-allowed"
            },
            "&-grouped": {
              paddingInlineStart: e.controlPaddingHorizontal * 2
            }
          }
        }),
        // =========================== RTL ===========================
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Follow code may reuse in other components
    ya(e, "slide-up"),
    ya(e, "slide-down"),
    Ts(e, "move-up"),
    Ts(e, "move-down")
  ];
}, Hl = 2;
function BC(e) {
  let {
    controlHeightSM: t,
    controlHeight: n,
    lineWidth: o
  } = e;
  const i = (n - t) / 2 - o, a = Math.ceil(i / 2);
  return [i, a];
}
function Op(e, t) {
  const {
    componentCls: n,
    iconCls: o
  } = e, i = `${n}-selection-overflow`, a = e.controlHeightSM, [r] = BC(e), l = t ? `${n}-${t}` : "";
  return {
    [`${n}-multiple${l}`]: {
      fontSize: e.fontSize,
      /**
       * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
       * may update to redesign with its align logic.
       */
      // =========================== Overflow ===========================
      [i]: {
        position: "relative",
        display: "flex",
        flex: "auto",
        flexWrap: "wrap",
        maxWidth: "100%",
        "&-item": {
          flex: "none",
          alignSelf: "center",
          maxWidth: "100%",
          display: "inline-flex"
        }
      },
      // ========================= Selector =========================
      [`${n}-selector`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        // Multiple is little different that horizontal is follow the vertical
        padding: `${r - Hl}px ${Hl * 2}px`,
        borderRadius: e.borderRadius,
        [`${n}-show-search&`]: {
          cursor: "text"
        },
        [`${n}-disabled&`]: {
          background: e.colorBgContainerDisabled,
          cursor: "not-allowed"
        },
        "&:after": {
          display: "inline-block",
          width: 0,
          margin: `${Hl}px 0`,
          lineHeight: `${a}px`,
          content: '"\\a0"'
        }
      },
      [`
        &${n}-show-arrow ${n}-selector,
        &${n}-allow-clear ${n}-selector
      `]: {
        paddingInlineEnd: e.fontSizeIcon + e.controlPaddingHorizontal
      },
      // ======================== Selections ========================
      [`${n}-selection-item`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        boxSizing: "border-box",
        maxWidth: "100%",
        height: a,
        marginTop: Hl,
        marginBottom: Hl,
        lineHeight: `${a - e.lineWidth * 2}px`,
        background: e.colorFillSecondary,
        border: `${e.lineWidth}px solid ${e.colorSplit}`,
        borderRadius: e.borderRadiusSM,
        cursor: "default",
        transition: `font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,
        userSelect: "none",
        marginInlineEnd: Hl * 2,
        paddingInlineStart: e.paddingXS,
        paddingInlineEnd: e.paddingXS / 2,
        [`${n}-disabled&`]: {
          color: e.colorTextDisabled,
          borderColor: e.colorBorder,
          cursor: "not-allowed"
        },
        // It's ok not to do this, but 24px makes bottom narrow in view should adjust
        "&-content": {
          display: "inline-block",
          marginInlineEnd: e.paddingXS / 2,
          overflow: "hidden",
          whiteSpace: "pre",
          textOverflow: "ellipsis"
        },
        "&-remove": I(I({}, Ls()), {
          display: "inline-block",
          color: e.colorIcon,
          fontWeight: "bold",
          fontSize: 10,
          lineHeight: "inherit",
          cursor: "pointer",
          [`> ${o}`]: {
            verticalAlign: "-0.2em"
          },
          "&:hover": {
            color: e.colorIconHover
          }
        })
      },
      // ========================== Input ==========================
      [`${i}-item + ${i}-item`]: {
        [`${n}-selection-search`]: {
          marginInlineStart: 0
        }
      },
      [`${n}-selection-search`]: {
        display: "inline-flex",
        position: "relative",
        maxWidth: "100%",
        marginInlineStart: e.inputPaddingHorizontalBase - r,
        "\n          &-input,\n          &-mirror\n        ": {
          height: a,
          fontFamily: e.fontFamily,
          lineHeight: `${a}px`,
          transition: `all ${e.motionDurationSlow}`
        },
        "&-input": {
          width: "100%",
          minWidth: 4.1
          // fix search cursor missing
        },
        "&-mirror": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          insetInlineEnd: "auto",
          zIndex: 999,
          whiteSpace: "pre",
          visibility: "hidden"
        }
      },
      // ======================= Placeholder =======================
      [`${n}-selection-placeholder `]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: e.inputPaddingHorizontalBase,
        insetInlineEnd: e.inputPaddingHorizontalBase,
        transform: "translateY(-50%)",
        transition: `all ${e.motionDurationSlow}`
      }
    }
  };
}
function _R(e) {
  const {
    componentCls: t
  } = e, n = _t(e, {
    controlHeight: e.controlHeightSM,
    controlHeightSM: e.controlHeightXS,
    borderRadius: e.borderRadiusSM,
    borderRadiusSM: e.borderRadiusXS
  }), [, o] = BC(e);
  return [
    Op(e),
    // ======================== Small ========================
    // Shared
    Op(n, "sm"),
    // Padding
    {
      [`${t}-multiple${t}-sm`]: {
        [`${t}-selection-placeholder`]: {
          insetInlineStart: e.controlPaddingHorizontalSM - e.lineWidth,
          insetInlineEnd: "auto"
        },
        // https://github.com/ant-design/ant-design/issues/29559
        [`${t}-selection-search`]: {
          marginInlineStart: o
        }
      }
    },
    // ======================== Large ========================
    // Shared
    Op(_t(e, {
      fontSize: e.fontSizeLG,
      controlHeight: e.controlHeightLG,
      controlHeightSM: e.controlHeight,
      borderRadius: e.borderRadiusLG,
      borderRadiusSM: e.borderRadius
    }), "lg")
  ];
}
function Ip(e, t) {
  const {
    componentCls: n,
    inputPaddingHorizontalBase: o,
    borderRadius: i
  } = e, a = e.controlHeight - e.lineWidth * 2, r = Math.ceil(e.fontSize * 1.25), l = t ? `${n}-${t}` : "";
  return {
    [`${n}-single${l}`]: {
      fontSize: e.fontSize,
      // ========================= Selector =========================
      [`${n}-selector`]: I(I({}, Zt(e)), {
        display: "flex",
        borderRadius: i,
        [`${n}-selection-search`]: {
          position: "absolute",
          top: 0,
          insetInlineStart: o,
          insetInlineEnd: o,
          bottom: 0,
          "&-input": {
            width: "100%"
          }
        },
        [`
          ${n}-selection-item,
          ${n}-selection-placeholder
        `]: {
          padding: 0,
          lineHeight: `${a}px`,
          transition: `all ${e.motionDurationSlow}`,
          // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
          "@supports (-moz-appearance: meterbar)": {
            lineHeight: `${a}px`
          }
        },
        [`${n}-selection-item`]: {
          position: "relative",
          userSelect: "none"
        },
        [`${n}-selection-placeholder`]: {
          transition: "none",
          pointerEvents: "none"
        },
        // For common baseline align
        [[
          "&:after",
          /* For '' value baseline align */
          `${n}-selection-item:after`,
          /* For undefined value baseline align */
          `${n}-selection-placeholder:after`
        ].join(",")]: {
          display: "inline-block",
          width: 0,
          visibility: "hidden",
          content: '"\\a0"'
        }
      }),
      [`
        &${n}-show-arrow ${n}-selection-item,
        &${n}-show-arrow ${n}-selection-placeholder
      `]: {
        paddingInlineEnd: r
      },
      // Opacity selection if open
      [`&${n}-open ${n}-selection-item`]: {
        color: e.colorTextPlaceholder
      },
      // ========================== Input ==========================
      // We only change the style of non-customize input which is only support by `combobox` mode.
      // Not customize
      [`&:not(${n}-customize-input)`]: {
        [`${n}-selector`]: {
          width: "100%",
          height: e.controlHeight,
          padding: `0 ${o}px`,
          [`${n}-selection-search-input`]: {
            height: a
          },
          "&:after": {
            lineHeight: `${a}px`
          }
        }
      },
      [`&${n}-customize-input`]: {
        [`${n}-selector`]: {
          "&:after": {
            display: "none"
          },
          [`${n}-selection-search`]: {
            position: "static",
            width: "100%"
          },
          [`${n}-selection-placeholder`]: {
            position: "absolute",
            insetInlineStart: 0,
            insetInlineEnd: 0,
            padding: `0 ${o}px`,
            "&:after": {
              display: "none"
            }
          }
        }
      }
    }
  };
}
function AR(e) {
  const {
    componentCls: t
  } = e, n = e.controlPaddingHorizontalSM - e.lineWidth;
  return [
    Ip(e),
    // ======================== Small ========================
    // Shared
    Ip(_t(e, {
      controlHeight: e.controlHeightSM,
      borderRadius: e.borderRadiusSM
    }), "sm"),
    // padding
    {
      [`${t}-single${t}-sm`]: {
        [`&:not(${t}-customize-input)`]: {
          [`${t}-selection-search`]: {
            insetInlineStart: n,
            insetInlineEnd: n
          },
          [`${t}-selector`]: {
            padding: `0 ${n}px`
          },
          // With arrow should provides `padding-right` to show the arrow
          [`&${t}-show-arrow ${t}-selection-search`]: {
            insetInlineEnd: n + e.fontSize * 1.5
          },
          [`
            &${t}-show-arrow ${t}-selection-item,
            &${t}-show-arrow ${t}-selection-placeholder
          `]: {
            paddingInlineEnd: e.fontSize * 1.5
          }
        }
      }
    },
    // ======================== Large ========================
    // Shared
    Ip(_t(e, {
      controlHeight: e.controlHeightLG,
      fontSize: e.fontSizeLG,
      borderRadius: e.borderRadiusLG
    }), "lg")
  ];
}
function DR(e, t, n) {
  const {
    focusElCls: o,
    focus: i,
    borderElCls: a
  } = n, r = a ? "> *" : "", l = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((s) => `&:${s} ${r}`).join(",");
  return {
    [`&-item:not(${t}-last-item)`]: {
      marginInlineEnd: -e.lineWidth
    },
    "&-item": I(I({
      [l]: {
        zIndex: 2
      }
    }, o ? {
      [`&${o}`]: {
        zIndex: 2
      }
    } : {}), {
      [`&[disabled] ${r}`]: {
        zIndex: 0
      }
    })
  };
}
function zR(e, t, n) {
  const {
    borderElCls: o
  } = n, i = o ? `> ${o}` : "";
  return {
    [`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]: {
      borderRadius: 0
    },
    [`&-item:not(${t}-last-item)${t}-first-item`]: {
      [`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`&-item:not(${t}-first-item)${t}-last-item`]: {
      [`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    }
  };
}
function ec(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    focus: !0
  };
  const {
    componentCls: n
  } = e, o = `${n}-compact`;
  return {
    [o]: I(I({}, DR(e, o, t)), zR(n, o, t))
  };
}
const RR = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    position: "relative",
    backgroundColor: e.colorBgContainer,
    border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
    transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
    input: {
      cursor: "pointer"
    },
    [`${t}-show-search&`]: {
      cursor: "text",
      input: {
        cursor: "auto",
        color: "inherit"
      }
    },
    [`${t}-disabled&`]: {
      color: e.colorTextDisabled,
      background: e.colorBgContainerDisabled,
      cursor: "not-allowed",
      [`${t}-multiple&`]: {
        background: e.colorBgContainerDisabled
      },
      input: {
        cursor: "not-allowed"
      }
    }
  };
}, Mp = function(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const {
    componentCls: o,
    borderHoverColor: i,
    outlineColor: a,
    antCls: r
  } = t, l = n ? {
    [`${o}-selector`]: {
      borderColor: i
    }
  } : {};
  return {
    [e]: {
      [`&:not(${o}-disabled):not(${o}-customize-input):not(${r}-pagination-size-changer)`]: I(I({}, l), {
        [`${o}-focused& ${o}-selector`]: {
          borderColor: i,
          boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${a}`,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`,
          outline: 0
        },
        [`&:hover ${o}-selector`]: {
          borderColor: i,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`
        }
      })
    }
  };
}, NR = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-selection-search-input`]: {
      margin: 0,
      padding: 0,
      background: "transparent",
      border: "none",
      outline: "none",
      appearance: "none",
      "&::-webkit-search-cancel-button": {
        display: "none",
        "-webkit-appearance": "none"
      }
    }
  };
}, BR = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontalBase: n,
    iconCls: o
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      position: "relative",
      display: "inline-block",
      cursor: "pointer",
      [`&:not(${t}-customize-input) ${t}-selector`]: I(I({}, RR(e)), NR(e)),
      // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
      //   ...genHoverStyle(token),
      // },
      // ======================== Selection ========================
      [`${t}-selection-item`]: I({
        flex: 1,
        fontWeight: "normal"
      }, Mr),
      // ======================= Placeholder =======================
      [`${t}-selection-placeholder`]: I(I({}, Mr), {
        flex: 1,
        color: e.colorTextPlaceholder,
        pointerEvents: "none"
      }),
      // ========================== Arrow ==========================
      [`${t}-arrow`]: I(I({}, Ls()), {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        height: e.fontSizeIcon,
        marginTop: -e.fontSizeIcon / 2,
        color: e.colorTextQuaternary,
        fontSize: e.fontSizeIcon,
        lineHeight: 1,
        textAlign: "center",
        pointerEvents: "none",
        display: "flex",
        alignItems: "center",
        [o]: {
          verticalAlign: "top",
          transition: `transform ${e.motionDurationSlow}`,
          "> svg": {
            verticalAlign: "top"
          },
          [`&:not(${t}-suffix)`]: {
            pointerEvents: "auto"
          }
        },
        [`${t}-disabled &`]: {
          cursor: "not-allowed"
        },
        "> *:not(:last-child)": {
          marginInlineEnd: 8
          // FIXME: magic
        }
      }),
      // ========================== Clear ==========================
      [`${t}-clear`]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        zIndex: 1,
        display: "inline-block",
        width: e.fontSizeIcon,
        height: e.fontSizeIcon,
        marginTop: -e.fontSizeIcon / 2,
        color: e.colorTextQuaternary,
        fontSize: e.fontSizeIcon,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        background: e.colorBgContainer,
        cursor: "pointer",
        opacity: 0,
        transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
        textRendering: "auto",
        "&:before": {
          display: "block"
        },
        "&:hover": {
          color: e.colorTextTertiary
        }
      },
      "&:hover": {
        [`${t}-clear`]: {
          opacity: 1
        }
      }
    }),
    // ========================= Feedback ==========================
    [`${t}-has-feedback`]: {
      [`${t}-clear`]: {
        insetInlineEnd: n + e.fontSize + e.paddingXXS
      }
    }
  };
}, FR = (e) => {
  const {
    componentCls: t
  } = e;
  return [
    {
      [t]: {
        // ==================== BorderLess ====================
        [`&-borderless ${t}-selector`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ==================== In Form ====================
        [`&${t}-in-form-item`]: {
          width: "100%"
        }
      }
    },
    // =====================================================
    // ==                       LTR                       ==
    // =====================================================
    // Base
    BR(e),
    // Single
    AR(e),
    // Multiple
    _R(e),
    // Dropdown
    ER(e),
    // =====================================================
    // ==                       RTL                       ==
    // =====================================================
    {
      [`${t}-rtl`]: {
        direction: "rtl"
      }
    },
    // =====================================================
    // ==                     Status                      ==
    // =====================================================
    Mp(t, _t(e, {
      borderHoverColor: e.colorPrimaryHover,
      outlineColor: e.controlOutline
    })),
    Mp(`${t}-status-error`, _t(e, {
      borderHoverColor: e.colorErrorHover,
      outlineColor: e.colorErrorOutline
    }), !0),
    Mp(`${t}-status-warning`, _t(e, {
      borderHoverColor: e.colorWarningHover,
      outlineColor: e.colorWarningOutline
    }), !0),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(e, {
      borderElCls: `${t}-selector`,
      focusElCls: `${t}-focused`
    })
  ];
}, LR = nn("Select", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = _t(e, {
    rootPrefixCls: n,
    inputPaddingHorizontalBase: e.paddingSM - 1
  });
  return [FR(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
})), HR = () => I(I({}, Tn(MC(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  value: tn([Array, Object, String, Number]),
  defaultValue: tn([Array, Object, String, Number]),
  notFoundContent: ue.any,
  suffixIcon: ue.any,
  itemIcon: ue.any,
  size: dn(),
  mode: dn(),
  bordered: st(!0),
  transitionName: String,
  choiceTransitionName: dn(""),
  popupClassName: String,
  /** @deprecated Please use `popupClassName` instead */
  dropdownClassName: String,
  placement: dn(),
  status: dn(),
  "onUpdate:value": Qe()
}), dy = "SECRET_COMBOBOX_MODE_DO_NOT_USE", bt = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASelect",
  Option: Lv,
  OptGroup: Hv,
  inheritAttrs: !1,
  props: wn(HR(), {
    listHeight: 256,
    listItemHeight: 24
  }),
  SECRET_COMBOBOX_MODE_DO_NOT_USE: dy,
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: i,
      expose: a
    } = t;
    const r = le(), l = fi(), s = si.useInject(), u = R(() => $l(s.status, e.status)), c = () => {
      var K;
      (K = r.value) === null || K === void 0 || K.focus();
    }, d = () => {
      var K;
      (K = r.value) === null || K === void 0 || K.blur();
    }, f = (K) => {
      var J;
      (J = r.value) === null || J === void 0 || J.scrollTo(K);
    }, g = R(() => {
      const {
        mode: K
      } = e;
      if (K !== "combobox")
        return K === dy ? "combobox" : K;
    });
    process.env.NODE_ENV !== "production" && Ln(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
    const {
      prefixCls: m,
      direction: b,
      renderEmpty: y,
      size: S,
      getPrefixCls: C,
      getPopupContainer: O,
      disabled: $,
      select: P
    } = yt("select", e), {
      compactSize: k,
      compactItemClassnames: x
    } = Vs(m, b), E = R(() => k.value || S.value), z = Zi(), B = R(() => {
      var K;
      return (K = $.value) !== null && K !== void 0 ? K : z.value;
    }), [D, W] = LR(m), H = R(() => C()), F = R(() => e.placement !== void 0 ? e.placement : b.value === "rtl" ? "bottomRight" : "bottomLeft"), A = R(() => qa(H.value, zA(F.value), e.transitionName)), U = R(() => Te({
      [`${m.value}-lg`]: E.value === "large",
      [`${m.value}-sm`]: E.value === "small",
      [`${m.value}-rtl`]: b.value === "rtl",
      [`${m.value}-borderless`]: !e.bordered,
      [`${m.value}-in-form-item`]: s.isFormItemInput
    }, Ki(m.value, u.value, s.hasFeedback), x.value, W.value)), j = function() {
      for (var K = arguments.length, J = new Array(K), be = 0; be < K; be++)
        J[be] = arguments[be];
      o("update:value", J[0]), o("change", ...J), l.onFieldChange();
    }, ae = (K) => {
      o("blur", K), l.onFieldBlur();
    };
    a({
      blur: d,
      focus: c,
      scrollTo: f
    });
    const G = R(() => g.value === "multiple" || g.value === "tags"), Y = R(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(G.value || g.value === "combobox"));
    return () => {
      var K, J, be, xe;
      const {
        notFoundContent: he,
        listHeight: de = 256,
        listItemHeight: ne = 24,
        popupClassName: we,
        dropdownClassName: re,
        virtual: se,
        dropdownMatchSelectWidth: ve,
        id: Me = l.id.value,
        placeholder: ke = (K = i.placeholder) === null || K === void 0 ? void 0 : K.call(i),
        showArrow: Fe
      } = e, {
        hasFeedback: Re,
        feedbackIcon: We
      } = s;
      let et;
      he !== void 0 ? et = he : i.notFoundContent ? et = i.notFoundContent() : g.value === "combobox" ? et = null : et = y?.("Select") || v(xv, {
        componentName: "Select"
      }, null);
      const {
        suffixIcon: Le,
        itemIcon: Ne,
        removeIcon: Ge,
        clearIcon: it
      } = Uz(I(I({}, e), {
        multiple: G.value,
        prefixCls: m.value,
        hasFeedback: Re,
        feedbackIcon: We,
        showArrow: Y.value
      }), i), Ke = Tn(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Oe = Te(we || re, {
        [`${m.value}-dropdown-${b.value}`]: b.value === "rtl"
      }, W.value);
      return D(v(tz, Z(Z(Z({
        ref: r,
        virtual: se,
        dropdownMatchSelectWidth: ve
      }, Ke), n), {}, {
        showSearch: (J = e.showSearch) !== null && J !== void 0 ? J : (be = P?.value) === null || be === void 0 ? void 0 : be.showSearch,
        placeholder: ke,
        listHeight: de,
        listItemHeight: ne,
        mode: g.value,
        prefixCls: m.value,
        direction: b.value,
        inputIcon: Le,
        menuItemSelectedIcon: Ne,
        removeIcon: Ge,
        clearIcon: it,
        notFoundContent: et,
        class: [U.value, n.class],
        getPopupContainer: O?.value,
        dropdownClassName: Oe,
        onChange: j,
        onBlur: ae,
        id: Me,
        dropdownRender: Ke.dropdownRender || i.dropdownRender,
        transitionName: A.value,
        children: (xe = i.default) === null || xe === void 0 ? void 0 : xe.call(i),
        tagRender: e.tagRender || i.tagRender,
        optionLabelRender: i.optionLabel,
        maxTagPlaceholder: e.maxTagPlaceholder || i.maxTagPlaceholder,
        showArrow: Re || Fe,
        disabled: B.value
      }), {
        option: i.option
      }));
    };
  }
});
bt.install = function(e) {
  return e.component(bt.name, bt), e.component(bt.Option.displayName, bt.Option), e.component(bt.OptGroup.displayName, bt.OptGroup), e;
};
bt.Option;
bt.OptGroup;
var VR = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, name: "check-circle", theme: "outlined" };
function fy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      jR(e, i, n[i]);
    });
  }
  return e;
}
function jR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Yv = function(t, n) {
  var o = fy({}, t, n.attrs);
  return v(pn, fy({}, o, {
    icon: VR
  }), null);
};
Yv.displayName = "CheckCircleOutlined";
Yv.inheritAttrs = !1;
var WR = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, name: "exclamation-circle", theme: "outlined" };
function py(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      qR(e, i, n[i]);
    });
  }
  return e;
}
function qR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Uv = function(t, n) {
  var o = py({}, t, n.attrs);
  return v(pn, py({}, o, {
    icon: WR
  }), null);
};
Uv.displayName = "ExclamationCircleOutlined";
Uv.inheritAttrs = !1;
var GR = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, name: "info-circle", theme: "outlined" };
function gy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      KR(e, i, n[i]);
    });
  }
  return e;
}
function KR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Xv = function(t, n) {
  var o = gy({}, t, n.attrs);
  return v(pn, gy({}, o, {
    icon: GR
  }), null);
};
Xv.displayName = "InfoCircleOutlined";
Xv.inheritAttrs = !1;
var YR = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, name: "close-circle", theme: "outlined" };
function hy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      UR(e, i, n[i]);
    });
  }
  return e;
}
function UR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Qv = function(t, n) {
  var o = hy({}, t, n.attrs);
  return v(pn, hy({}, o, {
    icon: YR
  }), null);
};
Qv.displayName = "CloseCircleOutlined";
Qv.inheritAttrs = !1;
var XR = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
function vy(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      QR(e, i, n[i]);
    });
  }
  return e;
}
function QR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var _r = function(t, n) {
  var o = vy({}, t, n.attrs);
  return v(pn, vy({}, o, {
    icon: XR
  }), null);
};
_r.displayName = "CheckCircleFilled";
_r.inheritAttrs = !1;
var ZR = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" };
function my(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      JR(e, i, n[i]);
    });
  }
  return e;
}
function JR(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ar = function(t, n) {
  var o = my({}, t, n.attrs);
  return v(pn, my({}, o, {
    icon: ZR
  }), null);
};
Ar.displayName = "ExclamationCircleFilled";
Ar.inheritAttrs = !1;
var eN = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" };
function by(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      tN(e, i, n[i]);
    });
  }
  return e;
}
function tN(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Pl = function(t, n) {
  var o = by({}, t, n.attrs);
  return v(pn, by({}, o, {
    icon: eN
  }), null);
};
Pl.displayName = "InfoCircleFilled";
Pl.inheritAttrs = !1;
const zc = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], nN = (e) => ({
  xs: `(max-width: ${e.screenXSMax}px)`,
  sm: `(min-width: ${e.screenSM}px)`,
  md: `(min-width: ${e.screenMD}px)`,
  lg: `(min-width: ${e.screenLG}px)`,
  xl: `(min-width: ${e.screenXL}px)`,
  xxl: `(min-width: ${e.screenXXL}px)`,
  xxxl: `{min-width: ${e.screenXXXL}px}`
});
function oN() {
  const [, e] = Hs();
  return R(() => {
    const t = nN(e.value), n = /* @__PURE__ */ new Map();
    let o = -1, i = {};
    return {
      matchHandlers: {},
      dispatch(a) {
        return i = a, n.forEach((r) => r(i)), n.size >= 1;
      },
      subscribe(a) {
        return n.size || this.register(), o += 1, n.set(o, a), a(i), o;
      },
      unsubscribe(a) {
        n.delete(a), n.size || this.unregister();
      },
      unregister() {
        Object.keys(t).forEach((a) => {
          const r = t[a], l = this.matchHandlers[r];
          l?.mql.removeListener(l?.listener);
        }), n.clear();
      },
      register() {
        Object.keys(t).forEach((a) => {
          const r = t[a], l = (u) => {
            let {
              matches: c
            } = u;
            this.dispatch(I(I({}, i), {
              [a]: c
            }));
          }, s = window.matchMedia(r);
          s.addListener(l), this.matchHandlers[r] = {
            mql: s,
            listener: l
          }, l(s);
        });
      },
      responsiveMap: t
    };
  });
}
const mi = {
  adjustX: 1,
  adjustY: 1
}, bi = [0, 0], FC = {
  left: {
    points: ["cr", "cl"],
    overflow: mi,
    offset: [-4, 0],
    targetOffset: bi
  },
  right: {
    points: ["cl", "cr"],
    overflow: mi,
    offset: [4, 0],
    targetOffset: bi
  },
  top: {
    points: ["bc", "tc"],
    overflow: mi,
    offset: [0, -4],
    targetOffset: bi
  },
  bottom: {
    points: ["tc", "bc"],
    overflow: mi,
    offset: [0, 4],
    targetOffset: bi
  },
  topLeft: {
    points: ["bl", "tl"],
    overflow: mi,
    offset: [0, -4],
    targetOffset: bi
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: mi,
    offset: [-4, 0],
    targetOffset: bi
  },
  topRight: {
    points: ["br", "tr"],
    overflow: mi,
    offset: [0, -4],
    targetOffset: bi
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: mi,
    offset: [4, 0],
    targetOffset: bi
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: mi,
    offset: [0, 4],
    targetOffset: bi
  },
  rightBottom: {
    points: ["bl", "br"],
    overflow: mi,
    offset: [4, 0],
    targetOffset: bi
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: mi,
    offset: [0, 4],
    targetOffset: bi
  },
  leftBottom: {
    points: ["br", "bl"],
    overflow: mi,
    offset: [-4, 0],
    targetOffset: bi
  }
}, iN = {
  prefixCls: String,
  id: String,
  overlayInnerStyle: ue.any
}, aN = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TooltipContent",
  props: iN,
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return v("div", {
        class: `${e.prefixCls}-inner`,
        id: e.id,
        role: "tooltip",
        style: e.overlayInnerStyle
      }, [(o = n.overlay) === null || o === void 0 ? void 0 : o.call(n)]);
    };
  }
});
var rN = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function yy() {
}
const lN = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Tooltip",
  inheritAttrs: !1,
  props: {
    trigger: ue.any.def(["hover"]),
    defaultVisible: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    placement: ue.string.def("right"),
    transitionName: String,
    animation: ue.any,
    afterVisibleChange: ue.func.def(() => {
    }),
    overlayStyle: {
      type: Object,
      default: void 0
    },
    overlayClassName: String,
    prefixCls: ue.string.def("rc-tooltip"),
    mouseEnterDelay: ue.number.def(0.1),
    mouseLeaveDelay: ue.number.def(0.1),
    getPopupContainer: Function,
    destroyTooltipOnHide: {
      type: Boolean,
      default: !1
    },
    align: ue.object.def(() => ({})),
    arrowContent: ue.any.def(null),
    tipId: String,
    builtinPlacements: ue.object,
    overlayInnerStyle: {
      type: Object,
      default: void 0
    },
    popupVisible: {
      type: Boolean,
      default: void 0
    },
    onVisibleChange: Function,
    onPopupAlign: Function,
    arrow: {
      type: Boolean,
      default: !0
    }
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i
    } = t;
    const a = Pe(), r = () => {
      const {
        prefixCls: c,
        tipId: d,
        overlayInnerStyle: f
      } = e;
      return [e.arrow ? v("div", {
        class: `${c}-arrow`,
        key: "arrow"
      }, [Ii(n, e, "arrowContent")]) : null, v(aN, {
        key: "content",
        prefixCls: c,
        id: d,
        overlayInnerStyle: f
      }, {
        overlay: n.overlay
      })];
    };
    i({
      getPopupDomNode: () => a.value.getPopupDomNode(),
      triggerDOM: a,
      forcePopupAlign: () => {
        var c;
        return (c = a.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
      }
    });
    const s = Pe(!1), u = Pe(!1);
    return Ft(() => {
      const {
        destroyTooltipOnHide: c
      } = e;
      if (typeof c == "boolean")
        s.value = c;
      else if (c && typeof c == "object") {
        const {
          keepParent: d
        } = c;
        s.value = d === !0, u.value = d === !1;
      }
    }), () => {
      const {
        overlayClassName: c,
        trigger: d,
        mouseEnterDelay: f,
        mouseLeaveDelay: g,
        overlayStyle: m,
        prefixCls: b,
        afterVisibleChange: y,
        transitionName: S,
        animation: C,
        placement: O,
        align: $,
        destroyTooltipOnHide: P,
        defaultVisible: k
      } = e, x = rN(e, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), E = I({}, x);
      e.visible !== void 0 && (E.popupVisible = e.visible);
      const z = I(I(I({
        popupClassName: c,
        prefixCls: b,
        action: d,
        builtinPlacements: FC,
        popupPlacement: O,
        popupAlign: $,
        afterPopupVisibleChange: y,
        popupTransitionName: S,
        popupAnimation: C,
        defaultPopupVisible: k,
        destroyPopupOnHide: s.value,
        autoDestroy: u.value,
        mouseLeaveDelay: g,
        popupStyle: m,
        mouseEnterDelay: f
      }, E), o), {
        onPopupVisibleChange: e.onVisibleChange || yy,
        onPopupAlign: e.onPopupAlign || yy,
        ref: a,
        arrow: !!e.arrow,
        popup: r()
      });
      return v(Zu, z, {
        default: n.default
      });
    };
  }
}), LC = (() => ({
  trigger: [String, Array],
  open: {
    type: Boolean,
    default: void 0
  },
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  placement: String,
  color: String,
  transitionName: String,
  overlayStyle: Ct(),
  overlayInnerStyle: Ct(),
  overlayClassName: String,
  openClassName: String,
  prefixCls: String,
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  getPopupContainer: Function,
  /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  arrowPointAtCenter: {
    type: Boolean,
    default: void 0
  },
  arrow: {
    type: [Boolean, Object],
    default: !0
  },
  autoAdjustOverflow: {
    type: [Boolean, Object],
    default: void 0
  },
  destroyTooltipOnHide: {
    type: Boolean,
    default: void 0
  },
  align: Ct(),
  builtinPlacements: Ct(),
  children: Array,
  /** @deprecated Please use `onOpenChange` instead. */
  onVisibleChange: Function,
  /** @deprecated Please use `onUpdate:open` instead. */
  "onUpdate:visible": Function,
  onOpenChange: Function,
  "onUpdate:open": Function
})), sN = {
  adjustX: 1,
  adjustY: 1
}, xy = {
  adjustX: 0,
  adjustY: 0
}, uN = [0, 0];
function wy(e) {
  return typeof e == "boolean" ? e ? sN : xy : I(I({}, xy), e);
}
function HC(e) {
  const {
    arrowWidth: t = 4,
    horizontalArrowShift: n = 16,
    verticalArrowShift: o = 8,
    autoAdjustOverflow: i,
    arrowPointAtCenter: a
  } = e, r = {
    left: {
      points: ["cr", "cl"],
      offset: [-4, 0]
    },
    right: {
      points: ["cl", "cr"],
      offset: [4, 0]
    },
    top: {
      points: ["bc", "tc"],
      offset: [0, -4]
    },
    bottom: {
      points: ["tc", "bc"],
      offset: [0, 4]
    },
    topLeft: {
      points: ["bl", "tc"],
      offset: [-(n + t), -4]
    },
    leftTop: {
      points: ["tr", "cl"],
      offset: [-4, -(o + t)]
    },
    topRight: {
      points: ["br", "tc"],
      offset: [n + t, -4]
    },
    rightTop: {
      points: ["tl", "cr"],
      offset: [4, -(o + t)]
    },
    bottomRight: {
      points: ["tr", "bc"],
      offset: [n + t, 4]
    },
    rightBottom: {
      points: ["bl", "cr"],
      offset: [4, o + t]
    },
    bottomLeft: {
      points: ["tl", "bc"],
      offset: [-(n + t), 4]
    },
    leftBottom: {
      points: ["br", "cl"],
      offset: [-4, o + t]
    }
  };
  return Object.keys(r).forEach((l) => {
    r[l] = a ? I(I({}, r[l]), {
      overflow: wy(i),
      targetOffset: uN
    }) : I(I({}, FC[l]), {
      overflow: wy(i)
    }), r[l].ignoreShake = !0;
  }), r;
}
function VC() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  for (let t = 0, n = e.length; t < n; t++)
    if (e[t] !== void 0)
      return e[t];
}
const cN = Lu.map((e) => `${e}-inverse`), dN = ["success", "processing", "error", "default", "warning"];
function jC(e) {
  return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...cN, ...Lu].includes(e) : Lu.includes(e);
}
function fN(e) {
  return dN.includes(e);
}
function pN(e, t) {
  const n = jC(t), o = Te({
    [`${e}-${t}`]: t && n
  }), i = {}, a = {};
  return t && !n && (i.background = t, a["--antd-arrow-background-color"] = t), {
    className: o,
    overlayStyle: i,
    arrowStyle: a
  };
}
function Rc(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return e.map((n) => `${t}${n}`).join(",");
}
const WC = 8;
function qC(e) {
  const t = WC, {
    sizePopupArrow: n,
    contentRadius: o,
    borderRadiusOuter: i,
    limitVerticalRadius: a
  } = e, r = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), l = (o > 12 ? o + 2 : 12) - r, s = a ? t - r : l;
  return {
    dropdownArrowOffset: l,
    dropdownArrowOffsetVertical: s
  };
}
function GC(e, t) {
  const {
    componentCls: n,
    sizePopupArrow: o,
    marginXXS: i,
    borderRadiusXS: a,
    borderRadiusOuter: r,
    boxShadowPopoverArrow: l
  } = e, {
    colorBg: s,
    showArrowCls: u,
    contentRadius: c = e.borderRadiusLG,
    limitVerticalRadius: d
  } = t, {
    dropdownArrowOffsetVertical: f,
    dropdownArrowOffset: g
  } = qC({
    sizePopupArrow: o,
    contentRadius: c,
    borderRadiusOuter: r,
    limitVerticalRadius: d
  }), m = o / 2 + i;
  return {
    [n]: {
      // ============================ Basic ============================
      [`${n}-arrow`]: [I(I({
        position: "absolute",
        zIndex: 1,
        display: "block"
      }, vv(o, a, r, s, l)), {
        "&:before": {
          background: s
        }
      })],
      // ========================== Placement ==========================
      // Here handle the arrow position and rotate stuff
      // >>>>> Top
      [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
        bottom: 0,
        transform: "translateY(100%) rotate(180deg)"
      },
      [`&-placement-top ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(100%) rotate(180deg)"
      },
      [`&-placement-topLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: g
        }
      },
      [`&-placement-topRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: g
        }
      },
      // >>>>> Bottom
      [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
        top: 0,
        transform: "translateY(-100%)"
      },
      [`&-placement-bottom ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(-100%)"
      },
      [`&-placement-bottomLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: g
        }
      },
      [`&-placement-bottomRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: g
        }
      },
      // >>>>> Left
      [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
        right: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(100%) rotate(90deg)"
      },
      [`&-placement-left ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(100%) rotate(90deg)"
      },
      [`&-placement-leftTop ${n}-arrow`]: {
        top: f
      },
      [`&-placement-leftBottom ${n}-arrow`]: {
        bottom: f
      },
      // >>>>> Right
      [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
        left: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-right ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-rightTop ${n}-arrow`]: {
        top: f
      },
      [`&-placement-rightBottom ${n}-arrow`]: {
        bottom: f
      },
      // =========================== Offset ============================
      // Offset the popover to account for the dropdown arrow
      // >>>>> Top
      [Rc(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingBottom: m
      },
      // >>>>> Bottom
      [Rc(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingTop: m
      },
      // >>>>> Left
      [Rc(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingRight: {
          _skip_check_: !0,
          value: m
        }
      },
      // >>>>> Right
      [Rc(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((b) => b += ":not(&-arrow-hidden)"), u)]: {
        paddingLeft: {
          _skip_check_: !0,
          value: m
        }
      }
    }
  };
}
const gN = (e) => {
  const {
    componentCls: t,
    // ant-tooltip
    tooltipMaxWidth: n,
    tooltipColor: o,
    tooltipBg: i,
    tooltipBorderRadius: a,
    zIndexPopup: r,
    controlHeight: l,
    boxShadowSecondary: s,
    paddingSM: u,
    paddingXS: c,
    tooltipRadiusOuter: d
  } = e;
  return [
    {
      [t]: I(I(I(I({}, Zt(e)), {
        position: "absolute",
        zIndex: r,
        display: "block",
        "&": [{
          width: "max-content"
        }, {
          width: "intrinsic"
        }],
        maxWidth: n,
        visibility: "visible",
        "&-hidden": {
          display: "none"
        },
        "--antd-arrow-background-color": i,
        // Wrapper for the tooltip content
        [`${t}-inner`]: {
          minWidth: l,
          minHeight: l,
          padding: `${u / 2}px ${c}px`,
          color: o,
          textAlign: "start",
          textDecoration: "none",
          wordWrap: "break-word",
          backgroundColor: i,
          borderRadius: a,
          boxShadow: s
        },
        // Limit left and right placement radius
        [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
          [`${t}-inner`]: {
            borderRadius: Math.min(a, WC)
          }
        },
        [`${t}-content`]: {
          position: "relative"
        }
      }), FS(e, (f, g) => {
        let {
          darkColor: m
        } = g;
        return {
          [`&${t}-${f}`]: {
            [`${t}-inner`]: {
              backgroundColor: m
            },
            [`${t}-arrow`]: {
              "--antd-arrow-background-color": m
            }
          }
        };
      })), {
        // RTL
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Arrow Style
    GC(_t(e, {
      borderRadiusOuter: d
    }), {
      colorBg: "var(--antd-arrow-background-color)",
      showArrowCls: "",
      contentRadius: a,
      limitVerticalRadius: !0
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none"
      }
    }
  ];
}, hN = ((e, t) => nn("Tooltip", (o) => {
  if (t?.value === !1)
    return [];
  const {
    borderRadius: i,
    colorTextLightSolid: a,
    colorBgDefault: r,
    borderRadiusOuter: l
  } = o, s = _t(o, {
    // default variables
    tooltipMaxWidth: 250,
    tooltipColor: a,
    tooltipBorderRadius: i,
    tooltipBg: r,
    tooltipRadiusOuter: l > 4 ? 4 : l
  });
  return [gN(s), Ju(o, "zoom-big-fast")];
}, (o) => {
  let {
    zIndexPopupBase: i,
    colorBgSpotlight: a
  } = o;
  return {
    zIndexPopup: i + 70,
    colorBgDefault: a
  };
})(e)), vN = (e, t) => {
  const n = {}, o = I({}, e);
  return t.forEach((i) => {
    e && i in e && (n[i] = e[i], delete o[i]);
  }), {
    picked: n,
    omitted: o
  };
}, KC = () => I(I({}, LC()), {
  title: ue.any
}), mN = () => ({
  trigger: "hover",
  align: {},
  placement: "top",
  mouseEnterDelay: 0.1,
  mouseLeaveDelay: 0.1,
  arrowPointAtCenter: !1,
  autoAdjustOverflow: !0
}), bN = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATooltip",
  inheritAttrs: !1,
  props: wn(KC(), {
    trigger: "hover",
    align: {},
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1,
    arrowPointAtCenter: !1,
    autoAdjustOverflow: !0
  }),
  slots: Object,
  // emits: ['update:visible', 'visibleChange'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i,
      expose: a
    } = t;
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((B) => {
      let [D, W] = B;
      Qn(e[D] === void 0, "Tooltip", `\`${D}\` is deprecated, please use \`${W}\` instead.`);
    });
    const {
      prefixCls: r,
      getPopupContainer: l,
      direction: s,
      rootPrefixCls: u
    } = yt("tooltip", e), c = R(() => {
      var B;
      return (B = e.open) !== null && B !== void 0 ? B : e.visible;
    }), d = le(VC([e.open, e.visible])), f = le();
    let g;
    Ie(c, (B) => {
      Mt.cancel(g), g = Mt(() => {
        d.value = !!B;
      });
    });
    const m = () => {
      var B;
      const D = (B = e.title) !== null && B !== void 0 ? B : n.title;
      return !D && D !== 0;
    }, b = (B) => {
      const D = m();
      c.value === void 0 && (d.value = D ? !1 : B), D || (o("update:visible", B), o("visibleChange", B), o("update:open", B), o("openChange", B));
    };
    a({
      getPopupDomNode: () => f.value.getPopupDomNode(),
      open: d,
      forcePopupAlign: () => {
        var B;
        return (B = f.value) === null || B === void 0 ? void 0 : B.forcePopupAlign();
      }
    });
    const S = R(() => {
      var B;
      const {
        builtinPlacements: D,
        autoAdjustOverflow: W,
        arrow: H,
        arrowPointAtCenter: F
      } = e;
      let A = F;
      return typeof H == "object" && (A = (B = H.pointAtCenter) !== null && B !== void 0 ? B : F), D || HC({
        arrowPointAtCenter: A,
        autoAdjustOverflow: W
      });
    }), C = (B) => B || B === "", O = (B) => {
      const D = B.type;
      if (typeof D == "object" && B.props && ((D.__ANT_BUTTON === !0 || D === "button") && C(B.props.disabled) || D.__ANT_SWITCH === !0 && (C(B.props.disabled) || C(B.props.loading)) || D.__ANT_RADIO === !0 && C(B.props.disabled))) {
        const {
          picked: W,
          omitted: H
        } = vN(Ok(B), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), F = I(I({
          display: "inline-block"
        }, W), {
          cursor: "not-allowed",
          lineHeight: 1,
          width: B.props && B.props.block ? "100%" : void 0
        }), A = I(I({}, H), {
          pointerEvents: "none"
        }), U = An(B, {
          style: A
        }, !0);
        return v("span", {
          style: F,
          class: `${r.value}-disabled-compatible-wrapper`
        }, [U]);
      }
      return B;
    }, $ = () => {
      var B, D;
      return (B = e.title) !== null && B !== void 0 ? B : (D = n.title) === null || D === void 0 ? void 0 : D.call(n);
    }, P = (B, D) => {
      const W = S.value, H = Object.keys(W).find((F) => {
        var A, U;
        return W[F].points[0] === ((A = D.points) === null || A === void 0 ? void 0 : A[0]) && W[F].points[1] === ((U = D.points) === null || U === void 0 ? void 0 : U[1]);
      });
      if (H) {
        const F = B.getBoundingClientRect(), A = {
          top: "50%",
          left: "50%"
        };
        H.indexOf("top") >= 0 || H.indexOf("Bottom") >= 0 ? A.top = `${F.height - D.offset[1]}px` : (H.indexOf("Top") >= 0 || H.indexOf("bottom") >= 0) && (A.top = `${-D.offset[1]}px`), H.indexOf("left") >= 0 || H.indexOf("Right") >= 0 ? A.left = `${F.width - D.offset[0]}px` : (H.indexOf("right") >= 0 || H.indexOf("Left") >= 0) && (A.left = `${-D.offset[0]}px`), B.style.transformOrigin = `${A.left} ${A.top}`;
      }
    }, k = R(() => pN(r.value, e.color)), x = R(() => i["data-popover-inject"]), [E, z] = hN(r, R(() => !x.value));
    return () => {
      var B, D;
      const {
        openClassName: W,
        overlayClassName: H,
        overlayStyle: F,
        overlayInnerStyle: A
      } = e;
      let U = (D = Go((B = n.default) === null || B === void 0 ? void 0 : B.call(n))) !== null && D !== void 0 ? D : null;
      U = U.length === 1 ? U[0] : U;
      let j = d.value;
      if (c.value === void 0 && m() && (j = !1), !U)
        return null;
      const ae = O(No(U) && !Ik(U) ? U : v("span", null, [U])), G = Te({
        [W || `${r.value}-open`]: !0,
        [ae.props && ae.props.class]: ae.props && ae.props.class
      }), Y = Te(H, {
        [`${r.value}-rtl`]: s.value === "rtl"
      }, k.value.className, z.value), K = I(I({}, k.value.overlayStyle), A), J = k.value.arrowStyle, be = I(I(I({}, i), e), {
        prefixCls: r.value,
        arrow: !!e.arrow,
        getPopupContainer: l?.value,
        builtinPlacements: S.value,
        visible: j,
        ref: f,
        overlayClassName: Y,
        overlayStyle: I(I({}, J), F),
        overlayInnerStyle: K,
        onVisibleChange: b,
        onPopupAlign: P,
        transitionName: qa(u.value, "zoom-big-fast", e.transitionName)
      });
      return E(v(lN, be, {
        default: () => [d.value ? An(ae, {
          class: G
        }) : ae],
        arrowContent: () => v("span", {
          class: `${r.value}-arrow-content`
        }, null),
        overlay: $
      }));
    };
  }
}), xo = Ji(bN), yN = (e) => {
  const {
    componentCls: t,
    popoverBg: n,
    popoverColor: o,
    width: i,
    fontWeightStrong: a,
    popoverPadding: r,
    boxShadowSecondary: l,
    colorTextHeading: s,
    borderRadiusLG: u,
    zIndexPopup: c,
    marginXS: d,
    colorBgElevated: f
  } = e;
  return [
    {
      [t]: I(I({}, Zt(e)), {
        position: "absolute",
        top: 0,
        // use `left` to fix https://github.com/ant-design/ant-design/issues/39195
        left: {
          _skip_check_: !0,
          value: 0
        },
        zIndex: c,
        fontWeight: "normal",
        whiteSpace: "normal",
        textAlign: "start",
        cursor: "auto",
        userSelect: "text",
        "--antd-arrow-background-color": f,
        "&-rtl": {
          direction: "rtl"
        },
        "&-hidden": {
          display: "none"
        },
        [`${t}-content`]: {
          position: "relative"
        },
        [`${t}-inner`]: {
          backgroundColor: n,
          backgroundClip: "padding-box",
          borderRadius: u,
          boxShadow: l,
          padding: r
        },
        [`${t}-title`]: {
          minWidth: i,
          marginBottom: d,
          color: s,
          fontWeight: a
        },
        [`${t}-inner-content`]: {
          color: o
        }
      })
    },
    // Arrow Style
    GC(e, {
      colorBg: "var(--antd-arrow-background-color)"
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none",
        [`${t}-content`]: {
          display: "inline-block"
        }
      }
    }
  ];
}, xN = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: Lu.map((n) => {
      const o = e[`${n}-6`];
      return {
        [`&${t}-${n}`]: {
          "--antd-arrow-background-color": o,
          [`${t}-inner`]: {
            backgroundColor: o
          },
          [`${t}-arrow`]: {
            background: "transparent"
          }
        }
      };
    })
  };
}, wN = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorSplit: i,
    paddingSM: a,
    controlHeight: r,
    fontSize: l,
    lineHeight: s,
    padding: u
  } = e, c = r - Math.round(l * s), d = c / 2, f = c / 2 - n, g = u;
  return {
    [t]: {
      [`${t}-inner`]: {
        padding: 0
      },
      [`${t}-title`]: {
        margin: 0,
        padding: `${d}px ${g}px ${f}px`,
        borderBottom: `${n}px ${o} ${i}`
      },
      [`${t}-inner-content`]: {
        padding: `${a}px ${g}px`
      }
    }
  };
}, SN = nn("Popover", (e) => {
  const {
    colorBgElevated: t,
    colorText: n,
    wireframe: o
  } = e, i = _t(e, {
    popoverBg: t,
    popoverColor: n,
    popoverPadding: 12
    // Fixed Value
  });
  return [yN(i), xN(i), o && wN(i), Ju(i, "zoom-big")];
}, (e) => {
  let {
    zIndexPopupBase: t
  } = e;
  return {
    zIndexPopup: t + 30,
    width: 177
  };
}), CN = () => I(I({}, LC()), {
  content: ti(),
  title: ti()
}), $N = ye({
  compatConfig: {
    MODE: 3
  },
  name: "APopover",
  inheritAttrs: !1,
  props: wn(CN(), I(I({}, mN()), {
    trigger: "hover",
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1
  })),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: i
    } = t;
    const a = le();
    Qn(e.visible === void 0, "popover", "`visible` will be removed in next major version, please use `open` instead."), n({
      getPopupDomNode: () => {
        var f, g;
        return (g = (f = a.value) === null || f === void 0 ? void 0 : f.getPopupDomNode) === null || g === void 0 ? void 0 : g.call(f);
      }
    });
    const {
      prefixCls: r,
      configProvider: l
    } = yt("popover", e), [s, u] = SN(r), c = R(() => l.getPrefixCls()), d = () => {
      var f, g;
      const {
        title: m = Go((f = o.title) === null || f === void 0 ? void 0 : f.call(o)),
        content: b = Go((g = o.content) === null || g === void 0 ? void 0 : g.call(o))
      } = e, y = !!(Array.isArray(m) ? m.length : m), S = !!(Array.isArray(b) ? b.length : m);
      return !y && !S ? null : v(He, null, [y && v("div", {
        class: `${r.value}-title`
      }, [m]), v("div", {
        class: `${r.value}-inner-content`
      }, [b])]);
    };
    return () => {
      const f = Te(e.overlayClassName, u.value);
      return s(v(xo, Z(Z(Z({}, Tn(e, ["title", "content"])), i), {}, {
        prefixCls: r.value,
        ref: a,
        overlayClassName: f,
        transitionName: qa(c.value, "zoom-big", e.transitionName),
        "data-popover-inject": !0
      }), {
        title: d,
        default: o.default
      }));
    };
  }
}), PN = Ji($N), rh = (e) => !isNaN(parseFloat(e)) && isFinite(e), Vl = {
  adjustX: 1,
  adjustY: 1
}, jl = [0, 0], ON = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Vl,
    offset: [0, -4],
    targetOffset: jl
  },
  topCenter: {
    points: ["bc", "tc"],
    overflow: Vl,
    offset: [0, -4],
    targetOffset: jl
  },
  topRight: {
    points: ["br", "tr"],
    overflow: Vl,
    offset: [0, -4],
    targetOffset: jl
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Vl,
    offset: [0, 4],
    targetOffset: jl
  },
  bottomCenter: {
    points: ["tc", "bc"],
    overflow: Vl,
    offset: [0, 4],
    targetOffset: jl
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: Vl,
    offset: [0, 4],
    targetOffset: jl
  }
};
var IN = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const YC = ye({
  compatConfig: {
    MODE: 3
  },
  props: {
    minOverlayWidthMatchTrigger: {
      type: Boolean,
      default: void 0
    },
    arrow: {
      type: Boolean,
      default: !1
    },
    prefixCls: ue.string.def("rc-dropdown"),
    transitionName: String,
    overlayClassName: ue.string.def(""),
    openClassName: String,
    animation: ue.any,
    align: ue.object,
    overlayStyle: {
      type: Object,
      default: void 0
    },
    placement: ue.string.def("bottomLeft"),
    overlay: ue.any,
    trigger: ue.oneOfType([ue.string, ue.arrayOf(ue.string)]).def("hover"),
    alignPoint: {
      type: Boolean,
      default: void 0
    },
    showAction: ue.array,
    hideAction: ue.array,
    getPopupContainer: Function,
    visible: {
      type: Boolean,
      default: void 0
    },
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    mouseEnterDelay: ue.number.def(0.15),
    mouseLeaveDelay: ue.number.def(0.1)
  },
  emits: ["visibleChange", "overlayClick"],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      expose: i
    } = t;
    const a = le(!!e.visible);
    Ie(() => e.visible, (g) => {
      g !== void 0 && (a.value = g);
    });
    const r = le();
    i({
      triggerRef: r
    });
    const l = (g) => {
      e.visible === void 0 && (a.value = !1), o("overlayClick", g);
    }, s = (g) => {
      e.visible === void 0 && (a.value = g), o("visibleChange", g);
    }, u = () => {
      var g;
      const m = (g = n.overlay) === null || g === void 0 ? void 0 : g.call(n), b = {
        prefixCls: `${e.prefixCls}-menu`,
        onClick: l
      };
      return v(He, {
        key: oS
      }, [e.arrow && v("div", {
        class: `${e.prefixCls}-arrow`
      }, null), An(m, b, !1)]);
    }, c = R(() => {
      const {
        minOverlayWidthMatchTrigger: g = !e.alignPoint
      } = e;
      return g;
    }), d = () => {
      var g;
      const m = (g = n.default) === null || g === void 0 ? void 0 : g.call(n);
      return a.value && m ? An(m[0], {
        class: e.openClassName || `${e.prefixCls}-open`
      }, !1) : m;
    }, f = R(() => !e.hideAction && e.trigger.indexOf("contextmenu") !== -1 ? ["click"] : e.hideAction);
    return () => {
      const {
        prefixCls: g,
        arrow: m,
        showAction: b,
        overlayStyle: y,
        trigger: S,
        placement: C,
        align: O,
        getPopupContainer: $,
        transitionName: P,
        animation: k,
        overlayClassName: x
      } = e, E = IN(e, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
      return v(Zu, Z(Z({}, E), {}, {
        prefixCls: g,
        ref: r,
        popupClassName: Te(x, {
          [`${g}-show-arrow`]: m
        }),
        popupStyle: y,
        builtinPlacements: ON,
        action: S,
        showAction: b,
        hideAction: f.value || [],
        popupPlacement: C,
        popupAlign: O,
        popupTransitionName: P,
        popupAnimation: k,
        popupVisible: a.value,
        stretch: c.value ? "minWidth" : "",
        onPopupVisibleChange: s,
        getPopupContainer: $
      }), {
        popup: u,
        default: d
      });
    };
  }
}), MN = (e) => {
  const {
    componentCls: t,
    colorPrimary: n
  } = e;
  return {
    [t]: {
      position: "absolute",
      background: "transparent",
      pointerEvents: "none",
      boxSizing: "border-box",
      color: `var(--wave-color, ${n})`,
      boxShadow: "0 0 0 0 currentcolor",
      opacity: 0.2,
      // =================== Motion ===================
      "&.wave-motion-appear": {
        transition: [`box-shadow 0.4s ${e.motionEaseOutCirc}`, `opacity 2s ${e.motionEaseOutCirc}`].join(","),
        "&-active": {
          boxShadow: "0 0 0 6px currentcolor",
          opacity: 0
        }
      }
    }
  };
}, TN = nn("Wave", (e) => [MN(e)]);
function kN(e) {
  const t = (e || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  return t && t[1] && t[2] && t[3] ? !(t[1] === t[2] && t[2] === t[3]) : !0;
}
function Tp(e) {
  return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && kN(e) && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
  e !== "transparent";
}
function EN(e) {
  const {
    borderTopColor: t,
    borderColor: n,
    backgroundColor: o
  } = getComputedStyle(e);
  return Tp(t) ? t : Tp(n) ? n : Tp(o) ? o : null;
}
function kp(e) {
  return Number.isNaN(e) ? 0 : e;
}
const _N = ye({
  props: {
    target: Ct(),
    className: String
  },
  setup(e) {
    const t = Pe(null), [n, o] = On(null), [i, a] = On([]), [r, l] = On(0), [s, u] = On(0), [c, d] = On(0), [f, g] = On(0), [m, b] = On(!1);
    function y() {
      const {
        target: x
      } = e, E = getComputedStyle(x);
      o(EN(x));
      const z = E.position === "static", {
        borderLeftWidth: B,
        borderTopWidth: D
      } = E;
      l(z ? x.offsetLeft : kp(-parseFloat(B))), u(z ? x.offsetTop : kp(-parseFloat(D))), d(x.offsetWidth), g(x.offsetHeight);
      const {
        borderTopLeftRadius: W,
        borderTopRightRadius: H,
        borderBottomLeftRadius: F,
        borderBottomRightRadius: A
      } = E;
      a([W, H, A, F].map((U) => kp(parseFloat(U))));
    }
    let S, C, O;
    const $ = () => {
      clearTimeout(O), Mt.cancel(C), S?.disconnect();
    }, P = () => {
      var x;
      const E = (x = t.value) === null || x === void 0 ? void 0 : x.parentElement;
      E && (Pr(null, E), E.parentElement && E.parentElement.removeChild(E));
    };
    Pt(() => {
      $(), O = setTimeout(() => {
        P();
      }, 5e3);
      const {
        target: x
      } = e;
      x && (C = Mt(() => {
        y(), b(!0);
      }), typeof ResizeObserver < "u" && (S = new ResizeObserver(y), S.observe(x)));
    }), At(() => {
      $();
    });
    const k = (x) => {
      x.propertyName === "opacity" && P();
    };
    return () => {
      if (!m.value)
        return null;
      const x = {
        left: `${r.value}px`,
        top: `${s.value}px`,
        width: `${c.value}px`,
        height: `${f.value}px`,
        borderRadius: i.value.map((E) => `${E}px`).join(" ")
      };
      return n && (x["--wave-color"] = n.value), v(Mi, {
        appear: !0,
        name: "wave-motion",
        appearFromClass: "wave-motion-appear",
        appearActiveClass: "wave-motion-appear",
        appearToClass: "wave-motion-appear wave-motion-appear-active"
      }, {
        default: () => [v("div", {
          ref: t,
          class: e.className,
          style: x,
          onTransitionend: k
        }, null)]
      });
    };
  }
});
function AN(e, t) {
  const n = document.createElement("div");
  return n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", e?.insertBefore(n, e?.firstChild), Pr(v(_N, {
    target: e,
    className: t
  }, null), n), () => {
    Pr(null, n), n.parentElement && n.parentElement.removeChild(n);
  };
}
function DN(e, t) {
  const n = ui();
  let o;
  function i() {
    var a;
    const r = Ra(n);
    o?.(), !(!((a = t?.value) === null || a === void 0) && a.disabled || !r) && (o = AN(r, e.value));
  }
  return At(() => {
    o?.();
  }), i;
}
const Zv = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Wave",
  props: {
    disabled: Boolean
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = ui(), {
      prefixCls: i,
      wave: a
    } = yt("wave", e), [, r] = TN(i), l = DN(R(() => Te(i.value, r.value)), a);
    let s;
    const u = () => {
      Ra(o).removeEventListener("click", s, !0);
    };
    return Pt(() => {
      Ie(() => e.disabled, () => {
        u(), Nt(() => {
          const c = Ra(o);
          c?.removeEventListener("click", s, !0), !(!c || c.nodeType !== 1 || e.disabled) && (s = (d) => {
            d.target.tagName === "INPUT" || !Tv(d.target) || // No need wave
            !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || l();
          }, c.addEventListener("click", s, !0));
        });
      }, {
        immediate: !0,
        flush: "post"
      });
    }), At(() => {
      u();
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
function UC(e) {
  return e === "danger" ? {
    danger: !0
  } : {
    type: e
  };
}
const XC = () => ({
  prefixCls: String,
  type: String,
  htmlType: {
    type: String,
    default: "button"
  },
  shape: {
    type: String
  },
  size: {
    type: String
  },
  loading: {
    type: [Boolean, Object],
    default: () => !1
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  ghost: {
    type: Boolean,
    default: void 0
  },
  block: {
    type: Boolean,
    default: void 0
  },
  danger: {
    type: Boolean,
    default: void 0
  },
  icon: ue.any,
  href: String,
  target: String,
  title: String,
  onClick: Cs(),
  onMousedown: Cs()
}), Sy = (e) => {
  e && (e.style.width = "0px", e.style.opacity = "0", e.style.transform = "scale(0)");
}, Cy = (e) => {
  Nt(() => {
    e && (e.style.width = `${e.scrollWidth}px`, e.style.opacity = "1", e.style.transform = "scale(1)");
  });
}, $y = (e) => {
  e && e.style && (e.style.width = null, e.style.opacity = null, e.style.transform = null);
}, zN = ye({
  compatConfig: {
    MODE: 3
  },
  name: "LoadingIcon",
  props: {
    prefixCls: String,
    loading: [Boolean, Object],
    existIcon: Boolean
  },
  setup(e) {
    return () => {
      const {
        existIcon: t,
        prefixCls: n,
        loading: o
      } = e;
      if (t)
        return v("span", {
          class: `${n}-loading-icon`
        }, [v(ba, null, null)]);
      const i = !!o;
      return v(Mi, {
        name: `${n}-loading-icon-motion`,
        onBeforeEnter: Sy,
        onEnter: Cy,
        onAfterEnter: $y,
        onBeforeLeave: Cy,
        onLeave: (a) => {
          setTimeout(() => {
            Sy(a);
          });
        },
        onAfterLeave: $y
      }, {
        default: () => [i ? v("span", {
          class: `${n}-loading-icon`
        }, [v(ba, null, null)]) : null]
      });
    };
  }
}), Py = (e, t) => ({
  // Border
  [`> span, > ${e}`]: {
    "&:not(:last-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: t
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: t
        }
      }
    }
  }
}), RN = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    lineWidth: o,
    colorPrimaryHover: i,
    colorErrorHover: a
  } = e;
  return {
    [`${t}-group`]: [
      {
        position: "relative",
        display: "inline-flex",
        // Border
        [`> span, > ${t}`]: {
          "&:not(:last-child)": {
            [`&, & > ${t}`]: {
              borderStartEndRadius: 0,
              borderEndEndRadius: 0
            }
          },
          "&:not(:first-child)": {
            marginInlineStart: -o,
            [`&, & > ${t}`]: {
              borderStartStartRadius: 0,
              borderEndStartRadius: 0
            }
          }
        },
        [t]: {
          position: "relative",
          zIndex: 1,
          "&:hover,\n          &:focus,\n          &:active": {
            zIndex: 2
          },
          "&[disabled]": {
            zIndex: 0
          }
        },
        [`${t}-icon-only`]: {
          fontSize: n
        }
      },
      // Border Color
      Py(`${t}-primary`, i),
      Py(`${t}-danger`, a)
    ]
  };
};
function NN(e, t) {
  return {
    // border collapse
    [`&-item:not(${t}-last-item)`]: {
      marginBottom: -e.lineWidth
    },
    "&-item": {
      "&:hover,&:focus,&:active": {
        zIndex: 2
      },
      "&[disabled]": {
        zIndex: 0
      }
    }
  };
}
function BN(e, t) {
  return {
    [`&-item:not(${t}-first-item):not(${t}-last-item)`]: {
      borderRadius: 0
    },
    [`&-item${t}-first-item:not(${t}-last-item)`]: {
      [`&, &${e}-sm, &${e}-lg`]: {
        borderEndEndRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&-item${t}-last-item:not(${t}-first-item)`]: {
      [`&, &${e}-sm, &${e}-lg`]: {
        borderStartStartRadius: 0,
        borderStartEndRadius: 0
      }
    }
  };
}
function FN(e) {
  const t = `${e.componentCls}-compact-vertical`;
  return {
    [t]: I(I({}, NN(e, t)), BN(e.componentCls, t))
  };
}
const LN = (e) => {
  const {
    componentCls: t,
    iconCls: n
  } = e;
  return {
    [t]: {
      outline: "none",
      position: "relative",
      display: "inline-block",
      fontWeight: 400,
      whiteSpace: "nowrap",
      textAlign: "center",
      backgroundImage: "none",
      backgroundColor: "transparent",
      border: `${e.lineWidth}px ${e.lineType} transparent`,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
      userSelect: "none",
      touchAction: "manipulation",
      lineHeight: e.lineHeight,
      color: e.colorText,
      "> span": {
        display: "inline-block"
      },
      // Leave a space between icon and text.
      [`> ${n} + span, > span + ${n}`]: {
        marginInlineStart: e.marginXS
      },
      "> a": {
        color: "currentColor"
      },
      "&:not(:disabled)": I({}, vl(e)),
      // make `btn-icon-only` not too narrow
      [`&-icon-only${t}-compact-item`]: {
        flex: "none"
      },
      // Special styles for Primary Button
      [`&-compact-item${t}-primary`]: {
        [`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]: {
          position: "relative",
          "&:before": {
            position: "absolute",
            top: -e.lineWidth,
            insetInlineStart: -e.lineWidth,
            display: "inline-block",
            width: e.lineWidth,
            height: `calc(100% + ${e.lineWidth * 2}px)`,
            backgroundColor: e.colorPrimaryHover,
            content: '""'
          }
        }
      },
      // Special styles for Primary Button
      "&-compact-vertical-item": {
        [`&${t}-primary`]: {
          [`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]: {
            position: "relative",
            "&:before": {
              position: "absolute",
              top: -e.lineWidth,
              insetInlineStart: -e.lineWidth,
              display: "inline-block",
              width: `calc(100% + ${e.lineWidth * 2}px)`,
              height: e.lineWidth,
              backgroundColor: e.colorPrimaryHover,
              content: '""'
            }
          }
        }
      }
    }
  };
}, Ga = (e, t) => ({
  "&:not(:disabled)": {
    "&:hover": e,
    "&:active": t
  }
}), HN = (e) => ({
  minWidth: e.controlHeight,
  paddingInlineStart: 0,
  paddingInlineEnd: 0,
  borderRadius: "50%"
}), VN = (e) => ({
  borderRadius: e.controlHeight,
  paddingInlineStart: e.controlHeight / 2,
  paddingInlineEnd: e.controlHeight / 2
}), lh = (e) => ({
  cursor: "not-allowed",
  borderColor: e.colorBorder,
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  boxShadow: "none"
}), Rd = (e, t, n, o, i, a, r) => ({
  [`&${e}-background-ghost`]: I(I({
    color: t || void 0,
    backgroundColor: "transparent",
    borderColor: n || void 0,
    boxShadow: "none"
  }, Ga(I({
    backgroundColor: "transparent"
  }, a), I({
    backgroundColor: "transparent"
  }, r))), {
    "&:disabled": {
      cursor: "not-allowed",
      color: o || void 0,
      borderColor: i || void 0
    }
  })
}), Jv = (e) => ({
  "&:disabled": I({}, lh(e))
}), QC = (e) => I({}, Jv(e)), Nd = (e) => ({
  "&:disabled": {
    cursor: "not-allowed",
    color: e.colorTextDisabled
  }
}), ZC = (e) => I(I(I(I(I({}, QC(e)), {
  backgroundColor: e.colorBgContainer,
  borderColor: e.colorBorder,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`
}), Ga({
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), Rd(e.componentCls, e.colorBgContainer, e.colorBgContainer, e.colorTextDisabled, e.colorBorder)), {
  [`&${e.componentCls}-dangerous`]: I(I(I({
    color: e.colorError,
    borderColor: e.colorError
  }, Ga({
    color: e.colorErrorHover,
    borderColor: e.colorErrorBorderHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), Rd(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder)), Jv(e))
}), jN = (e) => I(I(I(I(I({}, QC(e)), {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimary,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`
}), Ga({
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryHover
}, {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryActive
})), Rd(e.componentCls, e.colorPrimary, e.colorPrimary, e.colorTextDisabled, e.colorBorder, {
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), {
  [`&${e.componentCls}-dangerous`]: I(I(I({
    backgroundColor: e.colorError,
    boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`
  }, Ga({
    backgroundColor: e.colorErrorHover
  }, {
    backgroundColor: e.colorErrorActive
  })), Rd(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
    color: e.colorErrorHover,
    borderColor: e.colorErrorHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), Jv(e))
}), WN = (e) => I(I({}, ZC(e)), {
  borderStyle: "dashed"
}), qN = (e) => I(I(I({
  color: e.colorLink
}, Ga({
  color: e.colorLinkHover
}, {
  color: e.colorLinkActive
})), Nd(e)), {
  [`&${e.componentCls}-dangerous`]: I(I({
    color: e.colorError
  }, Ga({
    color: e.colorErrorHover
  }, {
    color: e.colorErrorActive
  })), Nd(e))
}), GN = (e) => I(I(I({}, Ga({
  color: e.colorText,
  backgroundColor: e.colorBgTextHover
}, {
  color: e.colorText,
  backgroundColor: e.colorBgTextActive
})), Nd(e)), {
  [`&${e.componentCls}-dangerous`]: I(I({
    color: e.colorError
  }, Nd(e)), Ga({
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }, {
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }))
}), KN = (e) => I(I({}, lh(e)), {
  [`&${e.componentCls}:hover`]: I({}, lh(e))
}), YN = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-default`]: ZC(e),
    [`${t}-primary`]: jN(e),
    [`${t}-dashed`]: WN(e),
    [`${t}-link`]: qN(e),
    [`${t}-text`]: GN(e),
    [`${t}-disabled`]: KN(e)
  };
}, em = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  const {
    componentCls: n,
    iconCls: o,
    controlHeight: i,
    fontSize: a,
    lineHeight: r,
    lineWidth: l,
    borderRadius: s,
    buttonPaddingHorizontal: u
  } = e, c = Math.max(0, (i - a * r) / 2 - l), d = u - l, f = `${n}-icon-only`;
  return [
    // Size
    {
      [`${n}${t}`]: {
        fontSize: a,
        height: i,
        padding: `${c}px ${d}px`,
        borderRadius: s,
        [`&${f}`]: {
          width: i,
          paddingInlineStart: 0,
          paddingInlineEnd: 0,
          [`&${n}-round`]: {
            width: "auto"
          },
          "> span": {
            transform: "scale(1.143)"
            // 14px -> 16px
          }
        },
        // Loading
        [`&${n}-loading`]: {
          opacity: e.opacityLoading,
          cursor: "default"
        },
        [`${n}-loading-icon`]: {
          transition: `width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`
        },
        [`&:not(${f}) ${n}-loading-icon > ${o}`]: {
          marginInlineEnd: e.marginXS
        }
      }
    },
    // Shape - patch prefixCls again to override solid border radius style
    {
      [`${n}${n}-circle${t}`]: HN(e)
    },
    {
      [`${n}${n}-round${t}`]: VN(e)
    }
  ];
}, UN = (e) => em(e), XN = (e) => {
  const t = _t(e, {
    controlHeight: e.controlHeightSM,
    padding: e.paddingXS,
    buttonPaddingHorizontal: 8,
    borderRadius: e.borderRadiusSM
  });
  return em(t, `${e.componentCls}-sm`);
}, QN = (e) => {
  const t = _t(e, {
    controlHeight: e.controlHeightLG,
    fontSize: e.fontSizeLG,
    borderRadius: e.borderRadiusLG
  });
  return em(t, `${e.componentCls}-lg`);
}, ZN = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`&${t}-block`]: {
        width: "100%"
      }
    }
  };
}, JN = nn("Button", (e) => {
  const {
    controlTmpOutline: t,
    paddingContentHorizontal: n
  } = e, o = _t(e, {
    colorOutlineDefault: t,
    buttonPaddingHorizontal: n
  });
  return [
    // Shared
    LN(o),
    // Size
    XN(o),
    UN(o),
    QN(o),
    // Block
    ZN(o),
    // Group (type, ghost, danger, disabled, loading)
    YN(o),
    // Button Group
    RN(o),
    // Space Compact
    ec(e, {
      focus: !1
    }),
    FN(e)
  ];
}), e4 = () => ({
  prefixCls: String,
  size: {
    type: String
  }
}), JC = qv(), sh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AButtonGroup",
  props: e4(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: i
    } = yt("btn-group", e), [, , a] = Hs();
    JC.useProvide(Dn({
      size: R(() => e.size)
    }));
    const r = R(() => {
      const {
        size: l
      } = e;
      let s = "";
      switch (l) {
        case "large":
          s = "lg";
          break;
        case "small":
          s = "sm";
          break;
        case "middle":
        case void 0:
          break;
        default:
          Ln(!l, "Button.Group", "Invalid prop `size`.");
      }
      return {
        [`${o.value}`]: !0,
        [`${o.value}-${s}`]: s,
        [`${o.value}-rtl`]: i.value === "rtl",
        [a.value]: !0
      };
    });
    return () => {
      var l;
      return v("div", {
        class: r.value
      }, [to((l = n.default) === null || l === void 0 ? void 0 : l.call(n))]);
    };
  }
}), Oy = /^[\u4e00-\u9fa5]{2}$/, Iy = Oy.test.bind(Oy);
function Nc(e) {
  return e === "text" || e === "link";
}
const $t = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: wn(XC(), {
    type: "default"
  }),
  slots: Object,
  // emits: ['click', 'mousedown'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i,
      expose: a
    } = t;
    const {
      prefixCls: r,
      autoInsertSpaceInButton: l,
      direction: s,
      size: u
    } = yt("btn", e), [c, d] = JN(r), f = JC.useInject(), g = Zi(), m = R(() => {
      var A;
      return (A = e.disabled) !== null && A !== void 0 ? A : g.value;
    }), b = Pe(null), y = Pe(void 0);
    let S = !1;
    const C = Pe(!1), O = Pe(!1), $ = R(() => l.value !== !1), {
      compactSize: P,
      compactItemClassnames: k
    } = Vs(r, s), x = R(() => typeof e.loading == "object" && e.loading.delay ? e.loading.delay || !0 : !!e.loading);
    Ie(x, (A) => {
      clearTimeout(y.value), typeof x.value == "number" ? y.value = setTimeout(() => {
        C.value = A;
      }, x.value) : C.value = A;
    }, {
      immediate: !0
    });
    const E = R(() => {
      const {
        type: A,
        shape: U = "default",
        ghost: j,
        block: ae,
        danger: G
      } = e, Y = r.value, K = {
        large: "lg",
        small: "sm",
        middle: void 0
      }, J = P.value || f?.size || u.value, be = J && K[J] || "";
      return [k.value, {
        [d.value]: !0,
        [`${Y}`]: !0,
        [`${Y}-${U}`]: U !== "default" && U,
        [`${Y}-${A}`]: A,
        [`${Y}-${be}`]: be,
        [`${Y}-loading`]: C.value,
        [`${Y}-background-ghost`]: j && !Nc(A),
        [`${Y}-two-chinese-chars`]: O.value && $.value,
        [`${Y}-block`]: ae,
        [`${Y}-dangerous`]: !!G,
        [`${Y}-rtl`]: s.value === "rtl"
      }];
    }), z = () => {
      const A = b.value;
      if (!A || l.value === !1)
        return;
      const U = A.textContent;
      S && Iy(U) ? O.value || (O.value = !0) : O.value && (O.value = !1);
    }, B = (A) => {
      if (C.value || m.value) {
        A.preventDefault();
        return;
      }
      i("click", A);
    }, D = (A) => {
      i("mousedown", A);
    }, W = (A, U) => {
      const j = U ? " " : "";
      if (A.type === X1) {
        let ae = A.children.trim();
        return Iy(ae) && (ae = ae.split("").join(j)), v("span", null, [ae]);
      }
      return A;
    };
    return Ft(() => {
      Ln(!(e.ghost && Nc(e.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
    }), Pt(z), Ds(z), At(() => {
      y.value && clearTimeout(y.value);
    }), a({
      focus: () => {
        var A;
        (A = b.value) === null || A === void 0 || A.focus();
      },
      blur: () => {
        var A;
        (A = b.value) === null || A === void 0 || A.blur();
      }
    }), () => {
      var A, U;
      const {
        icon: j = (A = n.icon) === null || A === void 0 ? void 0 : A.call(n)
      } = e, ae = to((U = n.default) === null || U === void 0 ? void 0 : U.call(n));
      S = ae.length === 1 && !j && !Nc(e.type);
      const {
        type: G,
        htmlType: Y,
        href: K,
        title: J,
        target: be
      } = e, xe = C.value ? "loading" : j, he = I(I({}, o), {
        title: J,
        disabled: m.value,
        class: [E.value, o.class, {
          [`${r.value}-icon-only`]: ae.length === 0 && !!xe
        }],
        onClick: B,
        onMousedown: D
      });
      m.value || delete he.disabled;
      const de = j && !C.value ? j : v(zN, {
        existIcon: !!j,
        prefixCls: r.value,
        loading: !!C.value
      }, null), ne = ae.map((re) => W(re, S && $.value));
      if (K !== void 0)
        return c(v("a", Z(Z({}, he), {}, {
          href: K,
          target: be,
          ref: b
        }), [de, ne]));
      let we = v("button", Z(Z({}, he), {}, {
        ref: b,
        type: Y
      }), [de, ne]);
      if (!Nc(G)) {
        const re = /* @__PURE__ */ (function() {
          return we;
        })();
        we = v(Zv, {
          ref: "wave",
          disabled: !!C.value
        }, {
          default: () => [re]
        });
      }
      return c(we);
    };
  }
});
$t.Group = sh;
$t.install = function(e) {
  return e.component($t.name, $t), e.component(sh.name, sh), e;
};
const e$ = () => ({
  arrow: tn([Boolean, Object]),
  trigger: {
    type: [Array, String]
  },
  menu: Ct(),
  overlay: ue.any,
  /** @deprecated Please use `open` instead */
  visible: st(),
  open: st(),
  disabled: st(),
  danger: st(),
  autofocus: st(),
  align: Ct(),
  getPopupContainer: Function,
  prefixCls: String,
  transitionName: String,
  placement: String,
  overlayClassName: String,
  overlayStyle: Ct(),
  forceRender: st(),
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  openClassName: String,
  minOverlayWidthMatchTrigger: st(),
  destroyPopupOnHide: st(),
  /** @deprecated Please use `onOpenChange` instead */
  onVisibleChange: {
    type: Function
  },
  /** @deprecated Please use `onUpdate:open` instead */
  "onUpdate:visible": {
    type: Function
  },
  onOpenChange: {
    type: Function
  },
  "onUpdate:open": {
    type: Function
  }
}), Ep = XC(), t4 = () => I(I({}, e$()), {
  type: Ep.type,
  size: String,
  htmlType: Ep.htmlType,
  href: String,
  disabled: st(),
  prefixCls: String,
  icon: ue.any,
  title: String,
  loading: Ep.loading,
  onClick: Cs()
});
var n4 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
function My(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      o4(e, i, n[i]);
    });
  }
  return e;
}
function o4(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var tc = function(t, n) {
  var o = My({}, t, n.attrs);
  return v(pn, My({}, o, {
    icon: n4
  }), null);
};
tc.displayName = "EllipsisOutlined";
tc.inheritAttrs = !1;
const i4 = (e) => {
  const {
    componentCls: t,
    antCls: n,
    paddingXS: o,
    opacityLoading: i
  } = e;
  return {
    [`${t}-button`]: {
      whiteSpace: "nowrap",
      [`&${n}-btn-group > ${n}-btn`]: {
        [`&-loading, &-loading + ${n}-btn`]: {
          cursor: "default",
          pointerEvents: "none",
          opacity: i
        },
        [`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]: {
          paddingInline: o
        }
      }
    }
  };
}, a4 = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    colorError: o,
    colorTextLightSolid: i
  } = e, a = `${n}-item`;
  return {
    [`${t}, ${t}-menu-submenu`]: {
      [`${n} ${a}`]: {
        [`&${a}-danger:not(${a}-disabled)`]: {
          color: o,
          "&:hover": {
            color: i,
            backgroundColor: o
          }
        }
      }
    }
  };
}, r4 = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    zIndexPopup: o,
    dropdownArrowDistance: i,
    dropdownArrowOffset: a,
    sizePopupArrow: r,
    antCls: l,
    iconCls: s,
    motionDurationMid: u,
    dropdownPaddingVertical: c,
    fontSize: d,
    dropdownEdgeChildPadding: f,
    colorTextDisabled: g,
    fontSizeIcon: m,
    controlPaddingHorizontal: b,
    colorBgElevated: y,
    boxShadowPopoverArrow: S
  } = e;
  return [
    {
      [t]: I(I({}, Zt(e)), {
        position: "absolute",
        top: -9999,
        left: {
          _skip_check_: !0,
          value: -9999
        },
        zIndex: o,
        display: "block",
        // A placeholder out of dropdown visible range to avoid close when user moving
        "&::before": {
          position: "absolute",
          insetBlock: -i + r / 2,
          // insetInlineStart: -7, // FIXME: Seems not work for hidden element
          zIndex: -9999,
          opacity: 1e-4,
          content: '""'
        },
        [`${t}-wrap`]: {
          position: "relative",
          [`${l}-btn > ${s}-down`]: {
            fontSize: m
          },
          [`${s}-down::before`]: {
            transition: `transform ${u}`
          }
        },
        [`${t}-wrap-open`]: {
          [`${s}-down::before`]: {
            transform: "rotate(180deg)"
          }
        },
        "\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ": {
          display: "none"
        },
        // =============================================================
        // ==                          Arrow                          ==
        // =============================================================
        // Offset the popover to account for the dropdown arrow
        [`
        &-show-arrow${t}-placement-topLeft,
        &-show-arrow${t}-placement-top,
        &-show-arrow${t}-placement-topRight
      `]: {
          paddingBottom: i
        },
        [`
        &-show-arrow${t}-placement-bottomLeft,
        &-show-arrow${t}-placement-bottom,
        &-show-arrow${t}-placement-bottomRight
      `]: {
          paddingTop: i
        },
        // Note: .popover-arrow is outer, .popover-arrow:after is inner
        [`${t}-arrow`]: I({
          position: "absolute",
          zIndex: 1,
          display: "block"
        }, vv(r, e.borderRadiusXS, e.borderRadiusOuter, y, S)),
        [`
        &-placement-top > ${t}-arrow,
        &-placement-topLeft > ${t}-arrow,
        &-placement-topRight > ${t}-arrow
      `]: {
          bottom: i,
          transform: "translateY(100%) rotate(180deg)"
        },
        [`&-placement-top > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: "50%"
          },
          transform: "translateX(-50%) translateY(100%) rotate(180deg)"
        },
        [`&-placement-topLeft > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: a
          }
        },
        [`&-placement-topRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: a
          }
        },
        [`
          &-placement-bottom > ${t}-arrow,
          &-placement-bottomLeft > ${t}-arrow,
          &-placement-bottomRight > ${t}-arrow
        `]: {
          top: i,
          transform: "translateY(-100%)"
        },
        [`&-placement-bottom > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: "50%"
          },
          transform: "translateY(-100%) translateX(-50%)"
        },
        [`&-placement-bottomLeft > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: a
          }
        },
        [`&-placement-bottomRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: a
          }
        },
        // =============================================================
        // ==                         Motion                          ==
        // =============================================================
        // When position is not enough for dropdown, the placement will revert.
        // We will handle this with revert motion name.
        [`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
          &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
          &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]: {
          animationName: Cf
        },
        [`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
          &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
          &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]: {
          animationName: Pf
        },
        [`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
          &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
          &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]: {
          animationName: $f
        },
        [`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
          &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
          &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]: {
          animationName: Of
        }
      })
    },
    {
      // =============================================================
      // ==                          Menu                           ==
      // =============================================================
      [`${t} ${n}`]: {
        position: "relative",
        margin: 0
      },
      [`${n}-submenu-popup`]: {
        position: "absolute",
        zIndex: o,
        background: "transparent",
        boxShadow: "none",
        transformOrigin: "0 0",
        "ul,li": {
          listStyle: "none"
        },
        ul: {
          marginInline: "0.3em"
        }
      },
      [`${t}, ${t}-menu-submenu`]: {
        [n]: I(I({
          padding: f,
          listStyleType: "none",
          backgroundColor: y,
          backgroundClip: "padding-box",
          borderRadius: e.borderRadiusLG,
          outline: "none",
          boxShadow: e.boxShadowSecondary
        }, vl(e)), {
          [`${n}-item-group-title`]: {
            padding: `${c}px ${b}px`,
            color: e.colorTextDescription,
            transition: `all ${u}`
          },
          // ======================= Item Content =======================
          [`${n}-item`]: {
            position: "relative",
            display: "flex",
            alignItems: "center",
            borderRadius: e.borderRadiusSM
          },
          [`${n}-item-icon`]: {
            minWidth: d,
            marginInlineEnd: e.marginXS,
            fontSize: e.fontSizeSM
          },
          [`${n}-title-content`]: {
            flex: "auto",
            "> a": {
              color: "inherit",
              transition: `all ${u}`,
              "&:hover": {
                color: "inherit"
              },
              "&::after": {
                position: "absolute",
                inset: 0,
                content: '""'
              }
            }
          },
          // =========================== Item ===========================
          [`${n}-item, ${n}-submenu-title`]: I(I({
            clear: "both",
            margin: 0,
            padding: `${c}px ${b}px`,
            color: e.colorText,
            fontWeight: "normal",
            fontSize: d,
            lineHeight: e.lineHeight,
            cursor: "pointer",
            transition: `all ${u}`,
            "&:hover, &-active": {
              backgroundColor: e.controlItemBgHover
            }
          }, vl(e)), {
            "&-selected": {
              color: e.colorPrimary,
              backgroundColor: e.controlItemBgActive,
              "&:hover, &-active": {
                backgroundColor: e.controlItemBgActiveHover
              }
            },
            "&-disabled": {
              color: g,
              cursor: "not-allowed",
              "&:hover": {
                color: g,
                backgroundColor: y,
                cursor: "not-allowed"
              },
              a: {
                pointerEvents: "none"
              }
            },
            "&-divider": {
              height: 1,
              margin: `${e.marginXXS}px 0`,
              overflow: "hidden",
              lineHeight: 0,
              backgroundColor: e.colorSplit
            },
            [`${t}-menu-submenu-expand-icon`]: {
              position: "absolute",
              insetInlineEnd: e.paddingXS,
              [`${t}-menu-submenu-arrow-icon`]: {
                marginInlineEnd: "0 !important",
                color: e.colorTextDescription,
                fontSize: m,
                fontStyle: "normal"
              }
            }
          }),
          [`${n}-item-group-list`]: {
            margin: `0 ${e.marginXS}px`,
            padding: 0,
            listStyle: "none"
          },
          [`${n}-submenu-title`]: {
            paddingInlineEnd: b + e.fontSizeSM
          },
          [`${n}-submenu-vertical`]: {
            position: "relative"
          },
          [`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]: {
            [`&, ${t}-menu-submenu-arrow-icon`]: {
              color: g,
              backgroundColor: y,
              cursor: "not-allowed"
            }
          },
          // https://github.com/ant-design/ant-design/issues/19264
          [`${n}-submenu-selected ${t}-menu-submenu-title`]: {
            color: e.colorPrimary
          }
        })
      }
    },
    // Follow code may reuse in other components
    [ya(e, "slide-up"), ya(e, "slide-down"), Ts(e, "move-up"), Ts(e, "move-down"), Ju(e, "zoom-big")]
  ];
}, t$ = nn("Dropdown", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const {
    marginXXS: o,
    sizePopupArrow: i,
    controlHeight: a,
    fontSize: r,
    lineHeight: l,
    paddingXXS: s,
    componentCls: u,
    borderRadiusOuter: c,
    borderRadiusLG: d
  } = e, f = (a - r * l) / 2, {
    dropdownArrowOffset: g
  } = qC({
    sizePopupArrow: i,
    contentRadius: d,
    borderRadiusOuter: c
  }), m = _t(e, {
    menuCls: `${u}-menu`,
    rootPrefixCls: n,
    dropdownArrowDistance: i / 2 + o,
    dropdownArrowOffset: g,
    dropdownPaddingVertical: f,
    dropdownEdgeChildPadding: s
  });
  return [r4(m), i4(m), a4(m)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
var l4 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const s4 = $t.Group, Bd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdownButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: wn(t4(), {
    trigger: "hover",
    placement: "bottomRight",
    type: "default"
  }),
  // emits: ['click', 'visibleChange', 'update:visible'],s
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i
    } = t;
    const a = (f) => {
      i("update:visible", f), i("visibleChange", f), i("update:open", f), i("openChange", f);
    }, {
      prefixCls: r,
      direction: l,
      getPopupContainer: s
    } = yt("dropdown", e), u = R(() => `${r.value}-button`), [c, d] = t$(r);
    return () => {
      var f, g;
      const m = I(I({}, e), o), {
        type: b = "default",
        disabled: y,
        danger: S,
        loading: C,
        htmlType: O,
        class: $ = "",
        overlay: P = (f = n.overlay) === null || f === void 0 ? void 0 : f.call(n),
        trigger: k,
        align: x,
        open: E,
        visible: z,
        onVisibleChange: B,
        placement: D = l.value === "rtl" ? "bottomLeft" : "bottomRight",
        href: W,
        title: H,
        icon: F = ((g = n.icon) === null || g === void 0 ? void 0 : g.call(n)) || v(tc, null, null),
        mouseEnterDelay: A,
        mouseLeaveDelay: U,
        overlayClassName: j,
        overlayStyle: ae,
        destroyPopupOnHide: G,
        onClick: Y,
        "onUpdate:open": K
      } = m, J = l4(m, ["type", "disabled", "danger", "loading", "htmlType", "class", "overlay", "trigger", "align", "open", "visible", "onVisibleChange", "placement", "href", "title", "icon", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "onClick", "onUpdate:open"]), be = {
        align: x,
        disabled: y,
        trigger: y ? [] : k,
        placement: D,
        getPopupContainer: s?.value,
        onOpenChange: a,
        mouseEnterDelay: A,
        mouseLeaveDelay: U,
        open: E ?? z,
        overlayClassName: j,
        overlayStyle: ae,
        destroyPopupOnHide: G
      }, xe = v($t, {
        danger: S,
        type: b,
        disabled: y,
        loading: C,
        onClick: Y,
        htmlType: O,
        href: W,
        title: H
      }, {
        default: n.default
      }), he = v($t, {
        danger: S,
        type: b,
        icon: F
      }, null);
      return c(v(s4, Z(Z({}, J), {}, {
        class: Te(u.value, $, d.value)
      }), {
        default: () => [n.leftButton ? n.leftButton({
          button: xe
        }) : xe, v(Yi, be, {
          default: () => [n.rightButton ? n.rightButton({
            button: he
          }) : he],
          overlay: () => P
        })]
      }));
    };
  }
});
var u4 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
function Ty(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      c4(e, i, n[i]);
    });
  }
  return e;
}
function c4(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var xl = function(t, n) {
  var o = Ty({}, t, n.attrs);
  return v(pn, Ty({}, o, {
    icon: u4
  }), null);
};
xl.displayName = "RightOutlined";
xl.inheritAttrs = !1;
const n$ = Symbol("OverrideContextKey"), o$ = () => Tt(n$, void 0), i$ = (e) => {
  var t, n, o;
  const {
    prefixCls: i,
    mode: a,
    selectable: r,
    validator: l,
    onClick: s,
    expandIcon: u
  } = o$() || {};
  kt(n$, {
    prefixCls: R(() => {
      var c, d;
      return (d = (c = e.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : i?.value;
    }),
    mode: R(() => {
      var c, d;
      return (d = (c = e.mode) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : a?.value;
    }),
    selectable: R(() => {
      var c, d;
      return (d = (c = e.selectable) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : r?.value;
    }),
    validator: (t = e.validator) !== null && t !== void 0 ? t : l,
    onClick: (n = e.onClick) !== null && n !== void 0 ? n : s,
    expandIcon: (o = e.expandIcon) !== null && o !== void 0 ? o : u?.value
  });
}, Yi = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdown",
  inheritAttrs: !1,
  props: wn(e$(), {
    mouseEnterDelay: 0.15,
    mouseLeaveDelay: 0.1,
    placement: "bottomLeft",
    trigger: "hover"
  }),
  // emits: ['visibleChange', 'update:visible'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i
    } = t;
    const {
      prefixCls: a,
      rootPrefixCls: r,
      direction: l,
      getPopupContainer: s
    } = yt("dropdown", e), [u, c] = t$(a);
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"], ["onUpdate:visible", "onUpdate:open"]].forEach((y) => {
      let [S, C] = y;
      Qn(e[S] === void 0, "Dropdown", `\`${S}\` is deprecated which will be removed in next major version, please use \`${C}\` instead.`);
    });
    const d = R(() => {
      const {
        placement: y = "",
        transitionName: S
      } = e;
      return S !== void 0 ? S : y.includes("top") ? `${r.value}-slide-down` : `${r.value}-slide-up`;
    });
    i$({
      prefixCls: R(() => `${a.value}-menu`),
      expandIcon: R(() => v("span", {
        class: `${a.value}-menu-submenu-arrow`
      }, [v(xl, {
        class: `${a.value}-menu-submenu-arrow-icon`
      }, null)])),
      mode: R(() => "vertical"),
      selectable: R(() => !1),
      onClick: () => {
      },
      validator: (y) => {
        let {
          mode: S
        } = y;
        Qn(!S || S === "vertical", "Dropdown", `mode="${S}" is not supported for Dropdown's Menu.`);
      }
    });
    const f = () => {
      var y, S, C;
      const O = e.overlay || ((y = n.overlay) === null || y === void 0 ? void 0 : y.call(n)), $ = Array.isArray(O) ? O[0] : O;
      if (!$) return null;
      const P = $.props || {};
      Ln(!P.mode || P.mode === "vertical", "Dropdown", `mode="${P.mode}" is not supported for Dropdown's Menu.`);
      const {
        selectable: k = !1,
        expandIcon: x = (C = (S = $.children) === null || S === void 0 ? void 0 : S.expandIcon) === null || C === void 0 ? void 0 : C.call(S)
      } = P, E = typeof x < "u" && No(x) ? x : v("span", {
        class: `${a.value}-menu-submenu-arrow`
      }, [v(xl, {
        class: `${a.value}-menu-submenu-arrow-icon`
      }, null)]);
      return No($) ? An($, {
        mode: "vertical",
        selectable: k,
        expandIcon: () => E
      }) : $;
    }, g = R(() => {
      const y = e.placement;
      if (!y)
        return l.value === "rtl" ? "bottomRight" : "bottomLeft";
      if (y.includes("Center")) {
        const S = y.slice(0, y.indexOf("Center"));
        return Ln(!y.includes("Center"), "Dropdown", `You are using '${y}' placement in Dropdown, which is deprecated. Try to use '${S}' instead.`), S;
      }
      return y;
    }), m = R(() => typeof e.visible == "boolean" ? e.visible : e.open), b = (y) => {
      i("update:visible", y), i("visibleChange", y), i("update:open", y), i("openChange", y);
    };
    return () => {
      var y, S;
      const {
        arrow: C,
        trigger: O,
        disabled: $,
        overlayClassName: P
      } = e, k = (y = n.default) === null || y === void 0 ? void 0 : y.call(n)[0], x = An(k, I({
        class: Te((S = k?.props) === null || S === void 0 ? void 0 : S.class, {
          [`${a.value}-rtl`]: l.value === "rtl"
        }, `${a.value}-trigger`)
      }, $ ? {
        disabled: $
      } : {})), E = Te(P, c.value, {
        [`${a.value}-rtl`]: l.value === "rtl"
      }), z = $ ? [] : O;
      let B;
      z && z.includes("contextmenu") && (B = !0);
      const D = HC({
        arrowPointAtCenter: typeof C == "object" && C.pointAtCenter,
        autoAdjustOverflow: !0
      }), W = Tn(I(I(I({}, e), o), {
        visible: m.value,
        builtinPlacements: D,
        overlayClassName: E,
        arrow: !!C,
        alignPoint: B,
        prefixCls: a.value,
        getPopupContainer: s?.value,
        transitionName: d.value,
        trigger: z,
        onVisibleChange: b,
        placement: g.value
      }), ["overlay", "onUpdate:visible"]);
      return u(v(YC, W, {
        default: () => [x],
        overlay: f
      }));
    };
  }
});
Yi.Button = Bd;
function d4(e, t, n, o) {
  let i;
  if (i !== void 0)
    return !!i;
  if (e === t)
    return !0;
  if (typeof e != "object" || !e || typeof t != "object" || !t)
    return !1;
  const a = Object.keys(e), r = Object.keys(t);
  if (a.length !== r.length)
    return !1;
  const l = Object.prototype.hasOwnProperty.bind(t);
  for (let s = 0; s < a.length; s++) {
    const u = a[s];
    if (!l(u))
      return !1;
    const c = e[u], d = t[u];
    if (i = void 0, i === !1 || i === void 0 && c !== d)
      return !1;
  }
  return !0;
}
function Zl(e, t) {
  return d4(oi(e), oi(t));
}
const a$ = Symbol("menuContextKey"), r$ = (e) => {
  kt(a$, e);
}, Ka = () => Tt(a$), l$ = Symbol("ForceRenderKey"), f4 = (e) => {
  kt(l$, e);
}, s$ = () => Tt(l$, !1), u$ = Symbol("menuFirstLevelContextKey"), c$ = (e) => {
  kt(u$, e);
}, p4 = () => Tt(u$, !0), Fd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "MenuContextProvider",
  inheritAttrs: !1,
  props: {
    mode: {
      type: String,
      default: void 0
    },
    overflowDisabled: {
      type: Boolean,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Ka(), i = I({}, o);
    return e.mode !== void 0 && (i.mode = Ut(e, "mode")), e.overflowDisabled !== void 0 && (i.overflowDisabled = Ut(e, "overflowDisabled")), r$(i), () => {
      var a;
      return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
    };
  }
}), d$ = Symbol("siderCollapsed"), f$ = Symbol("siderHookProvider"), Bc = "$$__vc-menu-more__key", p$ = Symbol("KeyPathContext"), tm = () => Tt(p$, {
  parentEventKeys: R(() => []),
  parentKeys: R(() => []),
  parentInfo: {}
}), g4 = (e, t, n) => {
  const {
    parentEventKeys: o,
    parentKeys: i
  } = tm(), a = R(() => [...o.value, e]), r = R(() => [...i.value, t]);
  return kt(p$, {
    parentEventKeys: a,
    parentKeys: r,
    parentInfo: n
  }), r;
}, g$ = Symbol("measure"), ky = ye({
  compatConfig: {
    MODE: 3
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return kt(g$, !0), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), nm = () => Tt(g$, !1);
function h$(e) {
  const {
    mode: t,
    rtl: n,
    inlineIndent: o
  } = Ka();
  return R(() => t.value !== "inline" ? null : n.value ? {
    paddingRight: `${e.value * o.value}px`
  } : {
    paddingLeft: `${e.value * o.value}px`
  });
}
let h4 = 0;
const v4 = () => ({
  id: String,
  role: String,
  disabled: Boolean,
  danger: Boolean,
  title: {
    type: [String, Boolean],
    default: void 0
  },
  icon: ue.any,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function,
  onKeydown: Function,
  onFocus: Function,
  // Internal user prop
  originItemValue: Ct()
}), ks = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItem",
  inheritAttrs: !1,
  props: v4(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const a = ui(), r = nm(), l = typeof a.vnode.key == "symbol" ? String(a.vnode.key) : a.vnode.key;
    Ln(typeof a.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(l)}"\` not support Symbol type`);
    const s = `menu_item_${++h4}_$$_${l}`, {
      parentEventKeys: u,
      parentKeys: c
    } = tm(), {
      prefixCls: d,
      activeKeys: f,
      disabled: g,
      changeActiveKeys: m,
      rtl: b,
      inlineCollapsed: y,
      siderCollapsed: S,
      onItemClick: C,
      selectedKeys: O,
      registerMenuInfo: $,
      unRegisterMenuInfo: P
    } = Ka(), k = p4(), x = Pe(!1), E = R(() => [...c.value, l]);
    $(s, {
      eventKey: s,
      key: l,
      parentEventKeys: u,
      parentKeys: c,
      isLeaf: !0
    }), At(() => {
      P(s);
    }), Ie(f, () => {
      x.value = !!f.value.find((K) => K === l);
    }, {
      immediate: !0
    });
    const B = R(() => g.value || e.disabled), D = R(() => O.value.includes(l)), W = R(() => {
      const K = `${d.value}-item`;
      return {
        [`${K}`]: !0,
        [`${K}-danger`]: e.danger,
        [`${K}-active`]: x.value,
        [`${K}-selected`]: D.value,
        [`${K}-disabled`]: B.value
      };
    }), H = (K) => ({
      key: l,
      eventKey: s,
      keyPath: E.value,
      eventKeyPath: [...u.value, s],
      domEvent: K,
      item: I(I({}, e), i)
    }), F = (K) => {
      if (B.value)
        return;
      const J = H(K);
      o("click", K), C(J);
    }, A = (K) => {
      B.value || (m(E.value), o("mouseenter", K));
    }, U = (K) => {
      B.value || (m([]), o("mouseleave", K));
    }, j = (K) => {
      if (o("keydown", K), K.which === Xe.ENTER) {
        const J = H(K);
        o("click", K), C(J);
      }
    }, ae = (K) => {
      m(E.value), o("focus", K);
    }, G = (K, J) => {
      const be = v("span", {
        class: `${d.value}-title-content`
      }, [J]);
      return (!K || No(J) && J.type === "span") && J && y.value && k && typeof J == "string" ? v("div", {
        class: `${d.value}-inline-collapsed-noicon`
      }, [J.charAt(0)]) : be;
    }, Y = h$(R(() => E.value.length));
    return () => {
      var K, J, be, xe, he;
      if (r) return null;
      const de = (K = e.title) !== null && K !== void 0 ? K : (J = n.title) === null || J === void 0 ? void 0 : J.call(n), ne = to((be = n.default) === null || be === void 0 ? void 0 : be.call(n)), we = ne.length;
      let re = de;
      typeof de > "u" ? re = k && we ? ne : "" : de === !1 && (re = "");
      const se = {
        title: re
      };
      !S.value && !y.value && (se.title = null, se.open = !1);
      const ve = {};
      e.role === "option" && (ve["aria-selected"] = D.value);
      const Me = (xe = e.icon) !== null && xe !== void 0 ? xe : (he = n.icon) === null || he === void 0 ? void 0 : he.call(n, e);
      return v(xo, Z(Z({}, se), {}, {
        placement: b.value ? "left" : "right",
        overlayClassName: `${d.value}-inline-collapsed-tooltip`
      }), {
        default: () => [v(Ha.Item, Z(Z(Z({
          component: "li"
        }, i), {}, {
          id: e.id,
          style: I(I({}, i.style || {}), Y.value),
          class: [W.value, {
            [`${i.class}`]: !!i.class,
            [`${d.value}-item-only-child`]: (Me ? we + 1 : we) === 1
          }],
          role: e.role || "menuitem",
          tabindex: e.disabled ? null : -1,
          "data-menu-id": l,
          "aria-disabled": e.disabled
        }, ve), {}, {
          onMouseenter: A,
          onMouseleave: U,
          onClick: F,
          onKeydown: j,
          onFocus: ae,
          title: typeof de == "string" ? de : void 0
        }), {
          default: () => [An(typeof Me == "function" ? Me(e.originItemValue) : Me, {
            class: `${d.value}-item-icon`
          }, !1), G(Me, ne)]
        })]
      });
    };
  }
}), xr = {
  adjustX: 1,
  adjustY: 1
}, m4 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: xr,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: xr,
    offset: [0, 7]
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: xr,
    offset: [-4, 0]
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: xr,
    offset: [4, 0]
  }
}, b4 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: xr,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: xr,
    offset: [0, 7]
  },
  rightTop: {
    points: ["tr", "tl"],
    overflow: xr,
    offset: [-4, 0]
  },
  leftTop: {
    points: ["tl", "tr"],
    overflow: xr,
    offset: [4, 0]
  }
}, y4 = {
  horizontal: "bottomLeft",
  vertical: "rightTop",
  "vertical-left": "rightTop",
  "vertical-right": "leftTop"
}, Ey = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PopupTrigger",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    mode: String,
    visible: Boolean,
    // popup: React.ReactNode;
    popupClassName: String,
    popupOffset: Array,
    disabled: Boolean,
    onVisibleChange: Function
  },
  slots: Object,
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const i = Pe(!1), {
      getPopupContainer: a,
      rtl: r,
      subMenuOpenDelay: l,
      subMenuCloseDelay: s,
      builtinPlacements: u,
      triggerSubMenuAction: c,
      forceSubMenuRender: d,
      motion: f,
      defaultMotions: g,
      rootClassName: m
    } = Ka(), b = s$(), y = R(() => r.value ? I(I({}, b4), u.value) : I(I({}, m4), u.value)), S = R(() => y4[e.mode]), C = Pe();
    Ie(() => e.visible, (P) => {
      Mt.cancel(C.value), C.value = Mt(() => {
        i.value = P;
      });
    }, {
      immediate: !0
    }), At(() => {
      Mt.cancel(C.value);
    });
    const O = (P) => {
      o("visibleChange", P);
    }, $ = R(() => {
      var P, k;
      const x = f.value || ((P = g.value) === null || P === void 0 ? void 0 : P[e.mode]) || ((k = g.value) === null || k === void 0 ? void 0 : k.other), E = typeof x == "function" ? x() : x;
      return E ? bl(E.name, {
        css: !0
      }) : void 0;
    });
    return () => {
      const {
        prefixCls: P,
        popupClassName: k,
        mode: x,
        popupOffset: E,
        disabled: z
      } = e;
      return v(Zu, {
        prefixCls: P,
        popupClassName: Te(`${P}-popup`, {
          [`${P}-rtl`]: r.value
        }, k, m.value),
        stretch: x === "horizontal" ? "minWidth" : null,
        getPopupContainer: a.value,
        builtinPlacements: y.value,
        popupPlacement: S.value,
        popupVisible: i.value,
        popupAlign: E && {
          offset: E
        },
        action: z ? [] : [c.value],
        mouseEnterDelay: l.value,
        mouseLeaveDelay: s.value,
        onPopupVisibleChange: O,
        forceRender: b || d.value,
        popupAnimation: $.value
      }, {
        popup: n.popup,
        default: n.default
      });
    };
  }
}), om = (e, t) => {
  let {
    slots: n,
    attrs: o
  } = t;
  var i;
  const {
    prefixCls: a,
    mode: r
  } = Ka();
  return v("ul", Z(Z({}, o), {}, {
    class: Te(a.value, `${a.value}-sub`, `${a.value}-${r.value === "inline" ? "inline" : "vertical"}`),
    "data-menu-list": !0
  }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
};
om.displayName = "SubMenuList";
const x4 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "InlineSubMenuList",
  inheritAttrs: !1,
  props: {
    id: String,
    open: Boolean,
    keyPath: Array
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = R(() => "inline"), {
      motion: i,
      mode: a,
      defaultMotions: r
    } = Ka(), l = R(() => a.value === o.value), s = le(!l.value), u = R(() => l.value ? e.open : !1);
    Ie(a, () => {
      l.value && (s.value = !1);
    }, {
      flush: "post"
    });
    const c = R(() => {
      var d, f;
      const g = i.value || ((d = r.value) === null || d === void 0 ? void 0 : d[o.value]) || ((f = r.value) === null || f === void 0 ? void 0 : f.other), m = typeof g == "function" ? g() : g;
      return I(I({}, m), {
        appear: e.keyPath.length <= 1
      });
    });
    return () => {
      var d;
      return s.value ? null : v(Fd, {
        mode: o.value
      }, {
        default: () => [v(Mi, c.value, {
          default: () => [Qi(v(om, {
            id: e.id
          }, {
            default: () => [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]
          }), [[va, u.value]])]
        })]
      });
    };
  }
});
let _y = 0;
const w4 = () => ({
  icon: ue.any,
  title: ue.any,
  disabled: Boolean,
  level: Number,
  popupClassName: String,
  popupOffset: Array,
  internalPopupClose: Boolean,
  eventKey: String,
  expandIcon: Function,
  theme: String,
  onMouseenter: Function,
  onMouseleave: Function,
  onTitleClick: Function,
  // Internal user prop
  originItemValue: Ct()
}), Es = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASubMenu",
  inheritAttrs: !1,
  props: w4(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i
    } = t;
    var a, r;
    c$(!1);
    const l = nm(), s = ui(), u = typeof s.vnode.key == "symbol" ? String(s.vnode.key) : s.vnode.key;
    Ln(typeof s.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
    const c = _g(u) ? u : `sub_menu_${++_y}_$$_not_set_key`, d = (a = e.eventKey) !== null && a !== void 0 ? a : _g(u) ? `sub_menu_${++_y}_$$_${u}` : c, {
      parentEventKeys: f,
      parentInfo: g,
      parentKeys: m
    } = tm(), b = R(() => [...m.value, c]), y = Pe([]), S = {
      eventKey: d,
      key: c,
      parentEventKeys: f,
      childrenEventKeys: y,
      parentKeys: m
    };
    (r = g.childrenEventKeys) === null || r === void 0 || r.value.push(d), At(() => {
      var Ne;
      g.childrenEventKeys && (g.childrenEventKeys.value = (Ne = g.childrenEventKeys) === null || Ne === void 0 ? void 0 : Ne.value.filter((Ge) => Ge != d));
    }), g4(d, c, S);
    const {
      prefixCls: C,
      activeKeys: O,
      disabled: $,
      changeActiveKeys: P,
      mode: k,
      inlineCollapsed: x,
      openKeys: E,
      overflowDisabled: z,
      onOpenChange: B,
      registerMenuInfo: D,
      unRegisterMenuInfo: W,
      selectedSubMenuKeys: H,
      expandIcon: F,
      theme: A
    } = Ka(), U = u != null, j = !l && (s$() || !U);
    f4(j), (l && U || !l && !U || j) && (D(d, S), At(() => {
      W(d);
    }));
    const ae = R(() => `${C.value}-submenu`), G = R(() => $.value || e.disabled), Y = Pe(), K = Pe(), J = R(() => E.value.includes(c)), be = R(() => !z.value && J.value), xe = R(() => H.value.includes(c)), he = Pe(!1);
    Ie(O, () => {
      he.value = !!O.value.find((Ne) => Ne === c);
    }, {
      immediate: !0
    });
    const de = (Ne) => {
      G.value || (i("titleClick", Ne, c), k.value === "inline" && B(c, !J.value));
    }, ne = (Ne) => {
      G.value || (P(b.value), i("mouseenter", Ne));
    }, we = (Ne) => {
      G.value || (P([]), i("mouseleave", Ne));
    }, re = h$(R(() => b.value.length)), se = (Ne) => {
      k.value !== "inline" && B(c, Ne);
    }, ve = () => {
      P(b.value);
    }, Me = d && `${d}-popup`, ke = R(() => Te(C.value, `${C.value}-${e.theme || A.value}`, e.popupClassName)), Fe = (Ne, Ge) => {
      if (!Ge)
        return x.value && !m.value.length && Ne && typeof Ne == "string" ? v("div", {
          class: `${C.value}-inline-collapsed-noicon`
        }, [Ne.charAt(0)]) : v("span", {
          class: `${C.value}-title-content`
        }, [Ne]);
      const it = No(Ne) && Ne.type === "span";
      return v(He, null, [An(typeof Ge == "function" ? Ge(e.originItemValue) : Ge, {
        class: `${C.value}-item-icon`
      }, !1), it ? Ne : v("span", {
        class: `${C.value}-title-content`
      }, [Ne])]);
    }, Re = R(() => k.value !== "inline" && b.value.length > 1 ? "vertical" : k.value), We = R(() => k.value === "horizontal" ? "vertical" : k.value), et = R(() => Re.value === "horizontal" ? "vertical" : Re.value), Le = () => {
      var Ne, Ge;
      const it = ae.value, Ke = (Ne = e.icon) !== null && Ne !== void 0 ? Ne : (Ge = n.icon) === null || Ge === void 0 ? void 0 : Ge.call(n, e), Oe = e.expandIcon || n.expandIcon || F.value, Ve = Fe(Ii(n, e, "title"), Ke);
      return v("div", {
        style: re.value,
        class: `${it}-title`,
        tabindex: G.value ? null : -1,
        ref: Y,
        title: typeof Ve == "string" ? Ve : null,
        "data-menu-id": c,
        "aria-expanded": be.value,
        "aria-haspopup": !0,
        "aria-controls": Me,
        "aria-disabled": G.value,
        onClick: de,
        onFocus: ve
      }, [Ve, k.value !== "horizontal" && Oe ? Oe(I(I({}, e), {
        isOpen: be.value
      })) : v("i", {
        class: `${it}-arrow`
      }, null)]);
    };
    return () => {
      var Ne;
      if (l)
        return U ? (Ne = n.default) === null || Ne === void 0 ? void 0 : Ne.call(n) : null;
      const Ge = ae.value;
      let it = () => null;
      if (!z.value && k.value !== "inline") {
        const Ke = k.value === "horizontal" ? [0, 8] : [10, 0];
        it = () => v(Ey, {
          mode: Re.value,
          prefixCls: Ge,
          visible: !e.internalPopupClose && be.value,
          popupClassName: ke.value,
          popupOffset: e.popupOffset || Ke,
          disabled: G.value,
          onVisibleChange: se
        }, {
          default: () => [Le()],
          popup: () => v(Fd, {
            mode: et.value
          }, {
            default: () => [v(om, {
              id: Me,
              ref: K
            }, {
              default: n.default
            })]
          })
        });
      } else
        it = () => v(Ey, null, {
          default: Le
        });
      return v(Fd, {
        mode: We.value
      }, {
        default: () => [v(Ha.Item, Z(Z({
          component: "li"
        }, o), {}, {
          role: "none",
          class: Te(Ge, `${Ge}-${k.value}`, o.class, {
            [`${Ge}-open`]: be.value,
            [`${Ge}-active`]: he.value,
            [`${Ge}-selected`]: xe.value,
            [`${Ge}-disabled`]: G.value
          }),
          onMouseenter: ne,
          onMouseleave: we,
          "data-submenu-id": c
        }), {
          default: () => v(He, null, [it(), !z.value && v(x4, {
            id: Me,
            open: be.value,
            keyPath: b.value
          }, {
            default: n.default
          })])
        })]
      });
    };
  }
});
function v$(e, t) {
  return e.classList ? e.classList.contains(t) : ` ${e.className} `.indexOf(` ${t} `) > -1;
}
function Ay(e, t) {
  e.classList ? e.classList.add(t) : v$(e, t) || (e.className = `${e.className} ${t}`);
}
function Dy(e, t) {
  if (e.classList)
    e.classList.remove(t);
  else if (v$(e, t)) {
    const n = e.className;
    e.className = ` ${n} `.replace(` ${t} `, " ");
  }
}
const im = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return {
    name: e,
    appear: t,
    css: !0,
    onBeforeEnter: (n) => {
      n.style.height = "0px", n.style.opacity = "0", Ay(n, e);
    },
    onEnter: (n) => {
      Nt(() => {
        n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
      });
    },
    onAfterEnter: (n) => {
      n && (Dy(n, e), n.style.height = null, n.style.opacity = null);
    },
    onBeforeLeave: (n) => {
      Ay(n, e), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
    },
    onLeave: (n) => {
      setTimeout(() => {
        n.style.height = "0px", n.style.opacity = "0";
      });
    },
    onAfterLeave: (n) => {
      n && (Dy(n, e), n.style && (n.style.height = null, n.style.opacity = null));
    }
  };
}, S4 = () => ({
  title: ue.any,
  // Internal user prop
  originItemValue: Ct()
}), Ld = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: !1,
  props: S4(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i
    } = Ka(), a = R(() => `${i.value}-item-group`), r = nm();
    return () => {
      var l, s;
      return r ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : v("li", Z(Z({}, o), {}, {
        onClick: (u) => u.stopPropagation(),
        class: a.value
      }), [v("div", {
        title: typeof e.title == "string" ? e.title : void 0,
        class: `${a.value}-title`
      }, [Ii(n, e, "title")]), v("ul", {
        class: `${a.value}-list`
      }, [(s = n.default) === null || s === void 0 ? void 0 : s.call(n)])]);
    };
  }
}), C4 = () => ({
  prefixCls: String,
  dashed: Boolean
}), Hd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuDivider",
  props: C4(),
  setup(e) {
    const {
      prefixCls: t
    } = Ka(), n = R(() => ({
      [`${t.value}-item-divider`]: !0,
      [`${t.value}-item-divider-dashed`]: !!e.dashed
    }));
    return () => v("li", {
      class: n.value
    }, null);
  }
});
var $4 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function uh(e, t, n) {
  return (e || []).map((o, i) => {
    if (o && typeof o == "object") {
      const a = o, {
        label: r,
        children: l,
        key: s,
        type: u
      } = a, c = $4(a, ["label", "children", "key", "type"]), d = s ?? `tmp-${i}`, f = n ? n.parentKeys.slice() : [], g = [], m = {
        eventKey: d,
        key: d,
        parentEventKeys: le(f),
        parentKeys: le(f),
        childrenEventKeys: le(g),
        isLeaf: !1
      };
      if (l || u === "group") {
        if (u === "group") {
          const y = uh(l, t, n);
          return v(Ld, Z(Z({
            key: d
          }, c), {}, {
            title: r,
            originItemValue: o
          }), {
            default: () => [y]
          });
        }
        t.set(d, m), n && n.childrenEventKeys.push(d);
        const b = uh(l, t, {
          childrenEventKeys: g,
          parentKeys: [].concat(f, d)
        });
        return v(Es, Z(Z({
          key: d
        }, c), {}, {
          title: r,
          originItemValue: o
        }), {
          default: () => [b]
        });
      }
      return u === "divider" ? v(Hd, Z({
        key: d
      }, c), null) : (m.isLeaf = !0, t.set(d, m), v(ks, Z(Z({
        key: d
      }, c), {}, {
        originItemValue: o
      }), {
        default: () => [r]
      }));
    }
    return null;
  }).filter((o) => o);
}
function P4(e) {
  const t = Pe([]), n = Pe(!1), o = Pe(/* @__PURE__ */ new Map());
  return Ie(() => e.items, () => {
    const i = /* @__PURE__ */ new Map();
    n.value = !1, e.items ? (n.value = !0, t.value = uh(e.items, i)) : t.value = void 0, o.value = i;
  }, {
    immediate: !0,
    deep: !0
  }), {
    itemsNodes: t,
    store: o,
    hasItmes: n
  };
}
const O4 = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    menuHorizontalHeight: o,
    colorSplit: i,
    lineWidth: a,
    lineType: r,
    menuItemPaddingInline: l
  } = e;
  return {
    [`${t}-horizontal`]: {
      lineHeight: `${o}px`,
      border: 0,
      borderBottom: `${a}px ${r} ${i}`,
      boxShadow: "none",
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        content: '"\\20"'
      },
      // ======================= Item =======================
      [`${t}-item, ${t}-submenu`]: {
        position: "relative",
        display: "inline-block",
        verticalAlign: "bottom",
        paddingInline: l
      },
      [`> ${t}-item:hover,
        > ${t}-item-active,
        > ${t}-submenu ${t}-submenu-title:hover`]: {
        backgroundColor: "transparent"
      },
      [`${t}-item, ${t}-submenu-title`]: {
        transition: [`border-color ${n}`, `background ${n}`].join(",")
      },
      // ===================== Sub Menu =====================
      [`${t}-submenu-arrow`]: {
        display: "none"
      }
    }
  };
}, I4 = (e) => {
  let {
    componentCls: t,
    menuArrowOffset: n
  } = e;
  return {
    [`${t}-rtl`]: {
      direction: "rtl"
    },
    [`${t}-submenu-rtl`]: {
      transformOrigin: "100% 0"
    },
    // Vertical Arrow
    [`${t}-rtl${t}-vertical,
    ${t}-submenu-rtl ${t}-vertical`]: {
      [`${t}-submenu-arrow`]: {
        "&::before": {
          transform: `rotate(-45deg) translateY(-${n})`
        },
        "&::after": {
          transform: `rotate(45deg) translateY(${n})`
        }
      }
    }
  };
}, zy = (e) => I({}, Xu(e)), Ry = (e, t) => {
  const {
    componentCls: n,
    colorItemText: o,
    colorItemTextSelected: i,
    colorGroupTitle: a,
    colorItemBg: r,
    colorSubItemBg: l,
    colorItemBgSelected: s,
    colorActiveBarHeight: u,
    colorActiveBarWidth: c,
    colorActiveBarBorderSize: d,
    motionDurationSlow: f,
    motionEaseInOut: g,
    motionEaseOut: m,
    menuItemPaddingInline: b,
    motionDurationMid: y,
    colorItemTextHover: S,
    lineType: C,
    colorSplit: O,
    // Disabled
    colorItemTextDisabled: $,
    // Danger
    colorDangerItemText: P,
    colorDangerItemTextHover: k,
    colorDangerItemTextSelected: x,
    colorDangerItemBgActive: E,
    colorDangerItemBgSelected: z,
    colorItemBgHover: B,
    menuSubMenuBg: D,
    // Horizontal
    colorItemTextSelectedHorizontal: W,
    colorItemBgSelectedHorizontal: H
  } = e;
  return {
    [`${n}-${t}`]: {
      color: o,
      background: r,
      [`&${n}-root:focus-visible`]: I({}, zy(e)),
      // ======================== Item ========================
      [`${n}-item-group-title`]: {
        color: a
      },
      [`${n}-submenu-selected`]: {
        [`> ${n}-submenu-title`]: {
          color: i
        }
      },
      // Disabled
      [`${n}-item-disabled, ${n}-submenu-disabled`]: {
        color: `${$} !important`
      },
      // Hover
      [`${n}-item:hover, ${n}-submenu-title:hover`]: {
        [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
          color: S
        }
      },
      [`&:not(${n}-horizontal)`]: {
        [`${n}-item:not(${n}-item-selected)`]: {
          "&:hover": {
            backgroundColor: B
          },
          "&:active": {
            backgroundColor: s
          }
        },
        [`${n}-submenu-title`]: {
          "&:hover": {
            backgroundColor: B
          },
          "&:active": {
            backgroundColor: s
          }
        }
      },
      // Danger - only Item has
      [`${n}-item-danger`]: {
        color: P,
        [`&${n}-item:hover`]: {
          [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
            color: k
          }
        },
        [`&${n}-item:active`]: {
          background: E
        }
      },
      [`${n}-item a`]: {
        "&, &:hover": {
          color: "inherit"
        }
      },
      [`${n}-item-selected`]: {
        color: i,
        // Danger
        [`&${n}-item-danger`]: {
          color: x
        },
        "a, a:hover": {
          color: "inherit"
        }
      },
      [`& ${n}-item-selected`]: {
        backgroundColor: s,
        // Danger
        [`&${n}-item-danger`]: {
          backgroundColor: z
        }
      },
      [`${n}-item, ${n}-submenu-title`]: {
        [`&:not(${n}-item-disabled):focus-visible`]: I({}, zy(e))
      },
      [`&${n}-submenu > ${n}`]: {
        backgroundColor: D
      },
      [`&${n}-popup > ${n}`]: {
        backgroundColor: r
      },
      // ====================== Horizontal ======================
      [`&${n}-horizontal`]: I(I({}, t === "dark" ? {
        borderBottom: 0
      } : {}), {
        [`> ${n}-item, > ${n}-submenu`]: {
          top: d,
          marginTop: -d,
          marginBottom: 0,
          borderRadius: 0,
          "&::after": {
            position: "absolute",
            insetInline: b,
            bottom: 0,
            borderBottom: `${u}px solid transparent`,
            transition: `border-color ${f} ${g}`,
            content: '""'
          },
          "&:hover, &-active, &-open": {
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: W
            }
          },
          "&-selected": {
            color: W,
            backgroundColor: H,
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: W
            }
          }
        }
      }),
      // ================== Inline & Vertical ===================
      //
      [`&${n}-root`]: {
        [`&${n}-inline, &${n}-vertical`]: {
          borderInlineEnd: `${d}px ${C} ${O}`
        }
      },
      // ======================== Inline ========================
      [`&${n}-inline`]: {
        // Sub
        [`${n}-sub${n}-inline`]: {
          background: l
        },
        // Item
        [`${n}-item, ${n}-submenu-title`]: d && c ? {
          width: `calc(100% + ${d}px)`
        } : {},
        [`${n}-item`]: {
          position: "relative",
          "&::after": {
            position: "absolute",
            insetBlock: 0,
            insetInlineEnd: 0,
            borderInlineEnd: `${c}px solid ${i}`,
            transform: "scaleY(0.0001)",
            opacity: 0,
            transition: [`transform ${y} ${m}`, `opacity ${y} ${m}`].join(","),
            content: '""'
          },
          // Danger
          [`&${n}-item-danger`]: {
            "&::after": {
              borderInlineEndColor: x
            }
          }
        },
        [`${n}-selected, ${n}-item-selected`]: {
          "&::after": {
            transform: "scaleY(1)",
            opacity: 1,
            transition: [`transform ${y} ${g}`, `opacity ${y} ${g}`].join(",")
          }
        }
      }
    }
  };
}, Ny = (e) => {
  const {
    componentCls: t,
    menuItemHeight: n,
    itemMarginInline: o,
    padding: i,
    menuArrowSize: a,
    marginXS: r,
    marginXXS: l
  } = e, s = i + a + r;
  return {
    [`${t}-item`]: {
      position: "relative"
    },
    [`${t}-item, ${t}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`,
      paddingInline: i,
      overflow: "hidden",
      textOverflow: "ellipsis",
      marginInline: o,
      marginBlock: l,
      width: `calc(100% - ${o * 2}px)`
    },
    // disable margin collapsed
    [`${t}-submenu`]: {
      paddingBottom: 0.02
    },
    [`> ${t}-item,
            > ${t}-submenu > ${t}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`
    },
    [`${t}-item-group-list ${t}-submenu-title,
            ${t}-submenu-title`]: {
      paddingInlineEnd: s
    }
  };
}, M4 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    menuItemHeight: o,
    colorTextLightSolid: i,
    dropdownWidth: a,
    controlHeightLG: r,
    motionDurationMid: l,
    motionEaseOut: s,
    paddingXL: u,
    fontSizeSM: c,
    fontSizeLG: d,
    motionDurationSlow: f,
    paddingXS: g,
    boxShadowSecondary: m
  } = e, b = {
    height: o,
    lineHeight: `${o}px`,
    listStylePosition: "inside",
    listStyleType: "disc"
  };
  return [
    {
      [t]: {
        "&-inline, &-vertical": I({
          [`&${t}-root`]: {
            boxShadow: "none"
          }
        }, Ny(e))
      },
      [`${t}-submenu-popup`]: {
        [`${t}-vertical`]: I(I({}, Ny(e)), {
          boxShadow: m
        })
      }
    },
    // Vertical only
    {
      [`${t}-submenu-popup ${t}-vertical${t}-sub`]: {
        minWidth: a,
        maxHeight: `calc(100vh - ${r * 2.5}px)`,
        padding: "0",
        overflow: "hidden",
        borderInlineEnd: 0,
        // https://github.com/ant-design/ant-design/issues/22244
        // https://github.com/ant-design/ant-design/issues/26812
        "&:not([class*='-active'])": {
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    },
    // Inline Only
    {
      [`${t}-inline`]: {
        width: "100%",
        // Motion enhance for first level
        [`&${t}-root`]: {
          [`${t}-item, ${t}-submenu-title`]: {
            display: "flex",
            alignItems: "center",
            transition: [`border-color ${f}`, `background ${f}`, `padding ${l} ${s}`].join(","),
            [`> ${t}-title-content`]: {
              flex: "auto",
              minWidth: 0,
              overflow: "hidden",
              textOverflow: "ellipsis"
            },
            "> *": {
              flex: "none"
            }
          }
        },
        // >>>>> Sub
        [`${t}-sub${t}-inline`]: {
          padding: 0,
          border: 0,
          borderRadius: 0,
          boxShadow: "none",
          [`& > ${t}-submenu > ${t}-submenu-title`]: b,
          [`& ${t}-item-group-title`]: {
            paddingInlineStart: u
          }
        },
        // >>>>> Item
        [`${t}-item`]: b
      }
    },
    // Inline Collapse Only
    {
      [`${t}-inline-collapsed`]: {
        width: o * 2,
        [`&${t}-root`]: {
          [`${t}-item, ${t}-submenu ${t}-submenu-title`]: {
            [`> ${t}-inline-collapsed-noicon`]: {
              fontSize: d,
              textAlign: "center"
            }
          }
        },
        [`> ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
          > ${t}-submenu > ${t}-submenu-title`]: {
          insetInlineStart: 0,
          paddingInline: `calc(50% - ${c}px)`,
          textOverflow: "clip",
          [`
            ${t}-submenu-arrow,
            ${t}-submenu-expand-icon
          `]: {
            opacity: 0
          },
          [`${t}-item-icon, ${n}`]: {
            margin: 0,
            fontSize: d,
            lineHeight: `${o}px`,
            "+ span": {
              display: "inline-block",
              opacity: 0
            }
          }
        },
        [`${t}-item-icon, ${n}`]: {
          display: "inline-block"
        },
        "&-tooltip": {
          pointerEvents: "none",
          [`${t}-item-icon, ${n}`]: {
            display: "none"
          },
          "a, a:hover": {
            color: i
          }
        },
        [`${t}-item-group-title`]: I(I({}, Mr), {
          paddingInline: g
        })
      }
    }
  ];
}, By = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    motionDurationSlow: o,
    motionDurationMid: i,
    motionEaseInOut: a,
    motionEaseOut: r,
    iconCls: l,
    controlHeightSM: s
  } = e;
  return {
    // >>>>> Item
    [`${t}-item, ${t}-submenu-title`]: {
      position: "relative",
      display: "block",
      margin: 0,
      whiteSpace: "nowrap",
      cursor: "pointer",
      transition: [`border-color ${o}`, `background ${o}`, `padding ${o} ${a}`].join(","),
      [`${t}-item-icon, ${l}`]: {
        minWidth: n,
        fontSize: n,
        transition: [`font-size ${i} ${r}`, `margin ${o} ${a}`, `color ${o}`].join(","),
        "+ span": {
          marginInlineStart: s - n,
          opacity: 1,
          transition: [`opacity ${o} ${a}`, `margin ${o}`, `color ${o}`].join(",")
        }
      },
      [`${t}-item-icon`]: I({}, Ls()),
      [`&${t}-item-only-child`]: {
        [`> ${l}, > ${t}-item-icon`]: {
          marginInlineEnd: 0
        }
      }
    },
    // Disabled state sets text to gray and nukes hover/tab effects
    [`${t}-item-disabled, ${t}-submenu-disabled`]: {
      background: "none !important",
      cursor: "not-allowed",
      "&::after": {
        borderColor: "transparent !important"
      },
      a: {
        color: "inherit !important"
      },
      [`> ${t}-submenu-title`]: {
        color: "inherit !important",
        cursor: "not-allowed"
      }
    }
  };
}, Fy = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    motionEaseInOut: o,
    borderRadius: i,
    menuArrowSize: a,
    menuArrowOffset: r
  } = e;
  return {
    [`${t}-submenu`]: {
      "&-expand-icon, &-arrow": {
        position: "absolute",
        top: "50%",
        insetInlineEnd: e.margin,
        width: a,
        color: "currentcolor",
        transform: "translateY(-50%)",
        transition: `transform ${n} ${o}, opacity ${n}`
      },
      "&-arrow": {
        // →
        "&::before, &::after": {
          position: "absolute",
          width: a * 0.6,
          height: a * 0.15,
          backgroundColor: "currentcolor",
          borderRadius: i,
          transition: [`background ${n} ${o}`, `transform ${n} ${o}`, `top ${n} ${o}`, `color ${n} ${o}`].join(","),
          content: '""'
        },
        "&::before": {
          transform: `rotate(45deg) translateY(-${r})`
        },
        "&::after": {
          transform: `rotate(-45deg) translateY(${r})`
        }
      }
    }
  };
}, T4 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    fontSize: o,
    motionDurationSlow: i,
    motionDurationMid: a,
    motionEaseInOut: r,
    lineHeight: l,
    paddingXS: s,
    padding: u,
    colorSplit: c,
    lineWidth: d,
    zIndexPopup: f,
    borderRadiusLG: g,
    radiusSubMenuItem: m,
    menuArrowSize: b,
    menuArrowOffset: y,
    lineType: S,
    menuPanelMaskInset: C
  } = e;
  return [
    // Misc
    {
      "": {
        [`${n}`]: I(I({}, Tr()), {
          // Hidden
          "&-hidden": {
            display: "none"
          }
        })
      },
      [`${n}-submenu-hidden`]: {
        display: "none"
      }
    },
    {
      [n]: I(I(I(I(I(I(I({}, Zt(e)), Tr()), {
        marginBottom: 0,
        paddingInlineStart: 0,
        // Override default ul/ol
        fontSize: o,
        lineHeight: 0,
        listStyle: "none",
        outline: "none",
        transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
        "ul, ol": {
          margin: 0,
          padding: 0,
          listStyle: "none"
        },
        // Overflow ellipsis
        "&-overflow": {
          display: "flex",
          [`${n}-item`]: {
            flex: "none"
          }
        },
        [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
          borderRadius: e.radiusItem
        },
        [`${n}-item-group-title`]: {
          padding: `${s}px ${u}px`,
          fontSize: o,
          lineHeight: l,
          transition: `all ${i}`
        },
        [`&-horizontal ${n}-submenu`]: {
          transition: [`border-color ${i} ${r}`, `background ${i} ${r}`].join(",")
        },
        [`${n}-submenu, ${n}-submenu-inline`]: {
          transition: [`border-color ${i} ${r}`, `background ${i} ${r}`, `padding ${a} ${r}`].join(",")
        },
        [`${n}-submenu ${n}-sub`]: {
          cursor: "initial",
          transition: [`background ${i} ${r}`, `padding ${i} ${r}`].join(",")
        },
        [`${n}-title-content`]: {
          transition: `color ${i}`
        },
        [`${n}-item a`]: {
          "&::before": {
            position: "absolute",
            inset: 0,
            backgroundColor: "transparent",
            content: '""'
          }
        },
        // Removed a Badge related style seems it's safe
        // https://github.com/ant-design/ant-design/issues/19809
        // >>>>> Divider
        [`${n}-item-divider`]: {
          overflow: "hidden",
          lineHeight: 0,
          borderColor: c,
          borderStyle: S,
          borderWidth: 0,
          borderTopWidth: d,
          marginBlock: d,
          padding: 0,
          "&-dashed": {
            borderStyle: "dashed"
          }
        }
      }), By(e)), {
        [`${n}-item-group`]: {
          [`${n}-item-group-list`]: {
            margin: 0,
            padding: 0,
            [`${n}-item, ${n}-submenu-title`]: {
              paddingInline: `${o * 2}px ${u}px`
            }
          }
        },
        // ======================= Sub Menu =======================
        "&-submenu": {
          "&-popup": {
            position: "absolute",
            zIndex: f,
            background: "transparent",
            borderRadius: g,
            boxShadow: "none",
            transformOrigin: "0 0",
            // https://github.com/ant-design/ant-design/issues/13955
            "&::before": {
              position: "absolute",
              inset: `${C}px 0 0`,
              zIndex: -1,
              width: "100%",
              height: "100%",
              opacity: 0,
              content: '""'
            }
          },
          // https://github.com/ant-design/ant-design/issues/13955
          "&-placement-rightTop::before": {
            top: 0,
            insetInlineStart: C
          },
          [`> ${n}`]: I(I(I({
            borderRadius: g
          }, By(e)), Fy(e)), {
            [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
              borderRadius: m
            },
            [`${n}-submenu-title::after`]: {
              transition: `transform ${i} ${r}`
            }
          })
        }
      }), Fy(e)), {
        [`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]: {
          // ↓
          "&::before": {
            transform: `rotate(-45deg) translateX(${y})`
          },
          "&::after": {
            transform: `rotate(45deg) translateX(-${y})`
          }
        },
        [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
          // ↑
          transform: `translateY(-${b * 0.2}px)`,
          "&::after": {
            transform: `rotate(-45deg) translateX(-${y})`
          },
          "&::before": {
            transform: `rotate(45deg) translateX(${y})`
          }
        }
      })
    },
    // Integration with header element so menu items have the same height
    {
      [`${t}-layout-header`]: {
        [n]: {
          lineHeight: "inherit"
        }
      }
    }
  ];
}, k4 = ((e, t) => nn("Menu", (o, i) => {
  let {
    overrideComponentToken: a
  } = i;
  if (t?.value === !1)
    return [];
  const {
    colorBgElevated: r,
    colorPrimary: l,
    colorError: s,
    colorErrorHover: u,
    colorTextLightSolid: c
  } = o, {
    controlHeightLG: d,
    fontSize: f
  } = o, g = f / 7 * 5, m = _t(o, {
    menuItemHeight: d,
    menuItemPaddingInline: o.margin,
    menuArrowSize: g,
    menuHorizontalHeight: d * 1.15,
    menuArrowOffset: `${g * 0.25}px`,
    menuPanelMaskInset: -7,
    menuSubMenuBg: r
  }), b = new In(c).setAlpha(0.65).toRgbString(), y = _t(m, {
    colorItemText: b,
    colorItemTextHover: c,
    colorGroupTitle: b,
    colorItemTextSelected: c,
    colorItemBg: "#001529",
    colorSubItemBg: "#000c17",
    colorItemBgActive: "transparent",
    colorItemBgSelected: l,
    colorActiveBarWidth: 0,
    colorActiveBarHeight: 0,
    colorActiveBarBorderSize: 0,
    // Disabled
    colorItemTextDisabled: new In(c).setAlpha(0.25).toRgbString(),
    // Danger
    colorDangerItemText: s,
    colorDangerItemTextHover: u,
    colorDangerItemTextSelected: c,
    colorDangerItemBgActive: s,
    colorDangerItemBgSelected: s,
    menuSubMenuBg: "#001529",
    // Horizontal
    colorItemTextSelectedHorizontal: c,
    colorItemBgSelectedHorizontal: l
  }, I({}, a));
  return [
    // Basic
    T4(m),
    // Horizontal
    O4(m),
    // Vertical
    M4(m),
    // Theme
    Ry(m, "light"),
    Ry(y, "dark"),
    // RTL
    I4(m),
    // Motion
    Kv(m),
    ya(m, "slide-up"),
    ya(m, "slide-down"),
    Ju(m, "zoom-big")
  ];
}, (o) => {
  const {
    colorPrimary: i,
    colorError: a,
    colorTextDisabled: r,
    colorErrorBg: l,
    colorText: s,
    colorTextDescription: u,
    colorBgContainer: c,
    colorFillAlter: d,
    colorFillContent: f,
    lineWidth: g,
    lineWidthBold: m,
    controlItemBgActive: b,
    colorBgTextHover: y
  } = o;
  return {
    dropdownWidth: 160,
    zIndexPopup: o.zIndexPopupBase + 50,
    radiusItem: o.borderRadiusLG,
    radiusSubMenuItem: o.borderRadiusSM,
    colorItemText: s,
    colorItemTextHover: s,
    colorItemTextHoverHorizontal: i,
    colorGroupTitle: u,
    colorItemTextSelected: i,
    colorItemTextSelectedHorizontal: i,
    colorItemBg: c,
    colorItemBgHover: y,
    colorItemBgActive: f,
    colorSubItemBg: d,
    colorItemBgSelected: b,
    colorItemBgSelectedHorizontal: "transparent",
    colorActiveBarWidth: 0,
    colorActiveBarHeight: m,
    colorActiveBarBorderSize: g,
    // Disabled
    colorItemTextDisabled: r,
    // Danger
    colorDangerItemText: a,
    colorDangerItemTextHover: a,
    colorDangerItemTextSelected: a,
    colorDangerItemBgActive: l,
    colorDangerItemBgSelected: l,
    itemMarginInline: o.marginXXS
  };
})(e)), E4 = () => ({
  id: String,
  prefixCls: String,
  // donot use items, now only support inner use
  items: Array,
  disabled: Boolean,
  inlineCollapsed: Boolean,
  disabledOverflow: Boolean,
  forceSubMenuRender: Boolean,
  openKeys: Array,
  selectedKeys: Array,
  activeKey: String,
  selectable: {
    type: Boolean,
    default: !0
  },
  multiple: {
    type: Boolean,
    default: !1
  },
  tabindex: {
    type: [Number, String]
  },
  motion: Object,
  role: String,
  theme: {
    type: String,
    default: "light"
  },
  mode: {
    type: String,
    default: "vertical"
  },
  inlineIndent: {
    type: Number,
    default: 24
  },
  subMenuOpenDelay: {
    type: Number,
    default: 0
  },
  subMenuCloseDelay: {
    type: Number,
    default: 0.1
  },
  builtinPlacements: {
    type: Object
  },
  triggerSubMenuAction: {
    type: String,
    default: "hover"
  },
  getPopupContainer: Function,
  expandIcon: Function,
  onOpenChange: Function,
  onSelect: Function,
  onDeselect: Function,
  onClick: [Function, Array],
  onFocus: Function,
  onBlur: Function,
  onMousedown: Function,
  "onUpdate:openKeys": Function,
  "onUpdate:selectedKeys": Function,
  "onUpdate:activeKey": Function
}), Ly = [], lo = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AMenu",
  inheritAttrs: !1,
  props: E4(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      direction: a,
      getPrefixCls: r
    } = yt("menu", e), l = o$(), s = R(() => {
      var ne;
      return r("menu", e.prefixCls || ((ne = l?.prefixCls) === null || ne === void 0 ? void 0 : ne.value));
    }), [u, c] = k4(s, R(() => !l)), d = Pe(/* @__PURE__ */ new Map()), f = Tt(d$, le(void 0)), g = R(() => f.value !== void 0 ? f.value : e.inlineCollapsed), {
      itemsNodes: m
    } = P4(e), b = Pe(!1);
    Pt(() => {
      b.value = !0;
    }), Ft(() => {
      Ln(!(e.inlineCollapsed === !0 && e.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), Ln(!(f.value !== void 0 && e.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
    });
    const y = le([]), S = le([]), C = le({});
    Ie(d, () => {
      const ne = {};
      for (const we of d.value.values())
        ne[we.key] = we;
      C.value = ne;
    }, {
      flush: "post"
    }), Ft(() => {
      if (e.activeKey !== void 0) {
        let ne = [];
        const we = e.activeKey ? C.value[e.activeKey] : void 0;
        we && e.activeKey !== void 0 ? ne = Zf([].concat(M(we.parentKeys), e.activeKey)) : ne = [], Zl(y.value, ne) || (y.value = ne);
      }
    }), Ie(() => e.selectedKeys, (ne) => {
      ne && (S.value = ne.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    const O = le([]);
    Ie([C, S], () => {
      let ne = [];
      S.value.forEach((we) => {
        const re = C.value[we];
        re && (ne = ne.concat(M(re.parentKeys)));
      }), ne = Zf(ne), Zl(O.value, ne) || (O.value = ne);
    }, {
      immediate: !0
    });
    const $ = (ne) => {
      if (e.selectable) {
        const {
          key: we
        } = ne, re = S.value.includes(we);
        let se;
        e.multiple ? re ? se = S.value.filter((Me) => Me !== we) : se = [...S.value, we] : se = [we];
        const ve = I(I({}, ne), {
          selectedKeys: se
        });
        Zl(se, S.value) || (e.selectedKeys === void 0 && (S.value = se), o("update:selectedKeys", se), re && e.multiple ? o("deselect", ve) : o("select", ve));
      }
      B.value !== "inline" && !e.multiple && P.value.length && H(Ly);
    }, P = le([]);
    Ie(() => e.openKeys, function() {
      let ne = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : P.value;
      Zl(P.value, ne) || (P.value = ne.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    let k;
    const x = (ne) => {
      clearTimeout(k), k = setTimeout(() => {
        e.activeKey === void 0 && (y.value = ne), o("update:activeKey", ne[ne.length - 1]);
      });
    }, E = R(() => !!e.disabled), z = R(() => a.value === "rtl"), B = le("vertical"), D = Pe(!1);
    Ft(() => {
      var ne;
      (e.mode === "inline" || e.mode === "vertical") && g.value ? (B.value = "vertical", D.value = g.value) : (B.value = e.mode, D.value = !1), !((ne = l?.mode) === null || ne === void 0) && ne.value && (B.value = l.mode.value);
    });
    const W = R(() => B.value === "inline"), H = (ne) => {
      P.value = ne, o("update:openKeys", ne), o("openChange", ne);
    }, F = le(P.value), A = Pe(!1);
    Ie(P, () => {
      W.value && (F.value = P.value);
    }, {
      immediate: !0
    }), Ie(W, () => {
      if (!A.value) {
        A.value = !0;
        return;
      }
      W.value ? P.value = F.value : H(Ly);
    }, {
      immediate: !0
    });
    const U = R(() => ({
      [`${s.value}`]: !0,
      [`${s.value}-root`]: !0,
      [`${s.value}-${B.value}`]: !0,
      [`${s.value}-inline-collapsed`]: D.value,
      [`${s.value}-rtl`]: z.value,
      [`${s.value}-${e.theme}`]: !0
    })), j = R(() => r()), ae = R(() => ({
      horizontal: {
        name: `${j.value}-slide-up`
      },
      inline: im(`${j.value}-motion-collapse`),
      other: {
        name: `${j.value}-zoom-big`
      }
    }));
    c$(!0);
    const G = function() {
      let ne = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const we = [], re = d.value;
      return ne.forEach((se) => {
        const {
          key: ve,
          childrenEventKeys: Me
        } = re.get(se);
        we.push(ve, ...G(M(Me)));
      }), we;
    }, Y = (ne) => {
      var we;
      o("click", ne), $(ne), (we = l?.onClick) === null || we === void 0 || we.call(l);
    }, K = (ne, we) => {
      var re;
      const se = ((re = C.value[ne]) === null || re === void 0 ? void 0 : re.childrenEventKeys) || [];
      let ve = P.value.filter((Me) => Me !== ne);
      if (we)
        ve.push(ne);
      else if (B.value !== "inline") {
        const Me = G(M(se));
        ve = Zf(ve.filter((ke) => !Me.includes(ke)));
      }
      Zl(P, ve) || H(ve);
    }, J = (ne, we) => {
      d.value.set(ne, we), d.value = new Map(d.value);
    }, be = (ne) => {
      d.value.delete(ne), d.value = new Map(d.value);
    }, xe = le(0), he = R(() => {
      var ne;
      return e.expandIcon || n.expandIcon || !((ne = l?.expandIcon) === null || ne === void 0) && ne.value ? (we) => {
        let re = e.expandIcon || n.expandIcon;
        return re = typeof re == "function" ? re(we) : re, An(re, {
          class: `${s.value}-submenu-expand-icon`
        }, !1);
      } : null;
    });
    r$({
      prefixCls: s,
      activeKeys: y,
      openKeys: P,
      selectedKeys: S,
      changeActiveKeys: x,
      disabled: E,
      rtl: z,
      mode: B,
      inlineIndent: R(() => e.inlineIndent),
      subMenuCloseDelay: R(() => e.subMenuCloseDelay),
      subMenuOpenDelay: R(() => e.subMenuOpenDelay),
      builtinPlacements: R(() => e.builtinPlacements),
      triggerSubMenuAction: R(() => e.triggerSubMenuAction),
      getPopupContainer: R(() => e.getPopupContainer),
      inlineCollapsed: D,
      theme: R(() => e.theme),
      siderCollapsed: f,
      defaultMotions: R(() => b.value ? ae.value : null),
      motion: R(() => b.value ? e.motion : null),
      overflowDisabled: Pe(void 0),
      onOpenChange: K,
      onItemClick: Y,
      registerMenuInfo: J,
      unRegisterMenuInfo: be,
      selectedSubMenuKeys: O,
      expandIcon: he,
      forceSubMenuRender: R(() => e.forceSubMenuRender),
      rootClassName: c
    });
    const de = () => {
      var ne;
      return m.value || to((ne = n.default) === null || ne === void 0 ? void 0 : ne.call(n));
    };
    return () => {
      var ne;
      const we = de(), re = xe.value >= we.length - 1 || B.value !== "horizontal" || e.disabledOverflow, se = (Me) => B.value !== "horizontal" || e.disabledOverflow ? Me : (
        // Need wrap for overflow dropdown that do not response for open
        Me.map((ke, Fe) => (
          // Always wrap provider to avoid sub node re-mount
          v(Fd, {
            key: ke.key,
            overflowDisabled: Fe > xe.value
          }, {
            default: () => ke
          })
        ))
      ), ve = ((ne = n.overflowedIndicator) === null || ne === void 0 ? void 0 : ne.call(n)) || v(tc, null, null);
      return u(v(Ha, Z(Z({}, i), {}, {
        onMousedown: e.onMousedown,
        prefixCls: `${s.value}-overflow`,
        component: "ul",
        itemComponent: ks,
        class: [U.value, i.class, c.value],
        role: "menu",
        id: e.id,
        data: se(we),
        renderRawItem: (Me) => Me,
        renderRawRest: (Me) => {
          const ke = Me.length, Fe = ke ? we.slice(-ke) : null;
          return v(He, null, [v(Es, {
            eventKey: Bc,
            key: Bc,
            title: ve,
            disabled: re,
            internalPopupClose: ke === 0
          }, {
            default: () => Fe
          }), v(ky, null, {
            default: () => [v(Es, {
              eventKey: Bc,
              key: Bc,
              title: ve,
              disabled: re,
              internalPopupClose: ke === 0
            }, {
              default: () => Fe
            })]
          })]);
        },
        maxCount: B.value !== "horizontal" || e.disabledOverflow ? Ha.INVALIDATE : Ha.RESPONSIVE,
        ssr: "full",
        "data-menu-list": !0,
        onVisibleChange: (Me) => {
          xe.value = Me;
        }
      }), {
        default: () => [v(Ud, {
          to: "body"
        }, {
          default: () => [v("div", {
            style: {
              display: "none"
            },
            "aria-hidden": !0
          }, [v(ky, null, {
            default: () => [se(de())]
          })])]
        })]
      }));
    };
  }
});
lo.install = function(e) {
  return e.component(lo.name, lo), e.component(ks.name, ks), e.component(Es.name, Es), e.component(Hd.name, Hd), e.component(Ld.name, Ld), e;
};
lo.Item = ks;
lo.Divider = Hd;
lo.SubMenu = Es;
lo.ItemGroup = Ld;
Xn.extend(mO);
Xn.extend(vO);
Xn.extend(dO);
Xn.extend(fO);
Xn.extend(pO);
Xn.extend(gO);
Xn.extend(hO);
Xn.extend((e, t) => {
  const n = t.prototype, o = n.format;
  n.format = function(a) {
    const r = (a || "").replace("Wo", "wo");
    return o.bind(this)(r);
  };
});
const _4 = {
  // ar_EG:
  // az_AZ:
  // bg_BG:
  bn_BD: "bn-bd",
  by_BY: "be",
  // ca_ES:
  // cs_CZ:
  // da_DK:
  // de_DE:
  // el_GR:
  en_GB: "en-gb",
  en_US: "en",
  // es_ES:
  // et_EE:
  // fa_IR:
  // fi_FI:
  fr_BE: "fr",
  fr_CA: "fr-ca",
  // fr_FR:
  // ga_IE:
  // gl_ES:
  // he_IL:
  // hi_IN:
  // hr_HR:
  // hu_HU:
  hy_AM: "hy-am",
  // id_ID:
  // is_IS:
  // it_IT:
  // ja_JP:
  // ka_GE:
  // kk_KZ:
  // km_KH:
  kmr_IQ: "ku",
  // kn_IN:
  // ko_KR:
  // ku_IQ: // previous ku in antd
  // lt_LT:
  // lv_LV:
  // mk_MK:
  // ml_IN:
  // mn_MN:
  // ms_MY:
  // nb_NO:
  // ne_NP:
  nl_BE: "nl-be",
  // nl_NL:
  // pl_PL:
  pt_BR: "pt-br",
  // pt_PT:
  // ro_RO:
  // ru_RU:
  // sk_SK:
  // sl_SI:
  // sr_RS:
  // sv_SE:
  // ta_IN:
  // th_TH:
  // tr_TR:
  // uk_UA:
  // ur_PK:
  // vi_VN:
  zh_CN: "zh-cn",
  zh_HK: "zh-hk",
  zh_TW: "zh-tw"
}, Yr = (e) => _4[e] || e.split("_")[0], Hy = () => {
  Rg(!1, "Not match any format. Please help to fire a issue about this.");
}, A4 = /\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;
function Vy(e, t, n) {
  const o = [...new Set(e.split(n))];
  let i = 0;
  for (let a = 0; a < o.length; a++) {
    const r = o[a];
    if (i += r.length, i > t)
      return r;
    i += n.length;
  }
}
const jy = (e, t) => {
  if (!e) return null;
  if (Xn.isDayjs(e))
    return e;
  const n = t.matchAll(A4);
  let o = Xn(e, t);
  if (n === null)
    return o;
  for (const i of n) {
    const a = i[0], r = i.index;
    if (a === "Q") {
      const l = e.slice(r - 1, r), s = Vy(e, r, l).match(/\d+/)[0];
      o = o.quarter(parseInt(s));
    }
    if (a.toLowerCase() === "wo") {
      const l = e.slice(r - 1, r), s = Vy(e, r, l).match(/\d+/)[0];
      o = o.week(parseInt(s));
    }
    a.toLowerCase() === "ww" && (o = o.week(parseInt(e.slice(r, r + a.length)))), a.toLowerCase() === "w" && (o = o.week(parseInt(e.slice(r, r + a.length + 1))));
  }
  return o;
}, D4 = {
  // get
  getNow: () => Xn(),
  getFixedDate: (e) => Xn(e, ["YYYY-M-DD", "YYYY-MM-DD"]),
  getEndDate: (e) => e.endOf("month"),
  getWeekDay: (e) => {
    const t = e.locale("en");
    return t.weekday() + t.localeData().firstDayOfWeek();
  },
  getYear: (e) => e.year(),
  getMonth: (e) => e.month(),
  getDate: (e) => e.date(),
  getHour: (e) => e.hour(),
  getMinute: (e) => e.minute(),
  getSecond: (e) => e.second(),
  // set
  addYear: (e, t) => e.add(t, "year"),
  addMonth: (e, t) => e.add(t, "month"),
  addDate: (e, t) => e.add(t, "day"),
  setYear: (e, t) => e.year(t),
  setMonth: (e, t) => e.month(t),
  setDate: (e, t) => e.date(t),
  setHour: (e, t) => e.hour(t),
  setMinute: (e, t) => e.minute(t),
  setSecond: (e, t) => e.second(t),
  // Compare
  isAfter: (e, t) => e.isAfter(t),
  isValidate: (e) => e.isValid(),
  locale: {
    getWeekFirstDay: (e) => Xn().locale(Yr(e)).localeData().firstDayOfWeek(),
    getWeekFirstDate: (e, t) => t.locale(Yr(e)).weekday(0),
    getWeek: (e, t) => t.locale(Yr(e)).week(),
    getShortWeekDays: (e) => Xn().locale(Yr(e)).localeData().weekdaysMin(),
    getShortMonths: (e) => Xn().locale(Yr(e)).localeData().monthsShort(),
    format: (e, t, n) => t.locale(Yr(e)).format(n),
    parse: (e, t, n) => {
      const o = Yr(e);
      for (let i = 0; i < n.length; i += 1) {
        const a = n[i], r = t;
        if (a.includes("wo") || a.includes("Wo")) {
          const s = r.split("-")[0], u = r.split("-")[1], c = Xn(s, "YYYY").startOf("year").locale(o);
          for (let d = 0; d <= 52; d += 1) {
            const f = c.add(d, "week");
            if (f.format("Wo") === u)
              return f;
          }
          return Hy(), null;
        }
        const l = Xn(r, a, !0).locale(o);
        if (l.isValid())
          return l;
      }
      return t || Hy(), null;
    }
  },
  toDate: (e, t) => Array.isArray(e) ? e.map((n) => jy(n, t)) : jy(e, t),
  toString: (e, t) => Array.isArray(e) ? e.map((n) => Xn.isDayjs(n) ? n.format(t) : n) : Xn.isDayjs(e) ? e.format(t) : e
};
function Yn(e) {
  const t = aO();
  return I(I({}, e), t);
}
const m$ = Symbol("PanelContextProps"), am = (e) => {
  kt(m$, e);
}, Sa = () => Tt(m$, {}), Fc = {
  visibility: "hidden"
};
function Dr(e, t) {
  let {
    slots: n
  } = t;
  var o;
  const i = Yn(e), {
    prefixCls: a,
    prevIcon: r = "‹",
    nextIcon: l = "›",
    superPrevIcon: s = "«",
    superNextIcon: u = "»",
    onSuperPrev: c,
    onSuperNext: d,
    onPrev: f,
    onNext: g
  } = i, {
    hideNextBtn: m,
    hidePrevBtn: b
  } = Sa();
  return v("div", {
    class: a
  }, [c && v("button", {
    type: "button",
    onClick: c,
    tabindex: -1,
    class: `${a}-super-prev-btn`,
    style: b.value ? Fc : {}
  }, [s]), f && v("button", {
    type: "button",
    onClick: f,
    tabindex: -1,
    class: `${a}-prev-btn`,
    style: b.value ? Fc : {}
  }, [r]), v("div", {
    class: `${a}-view`
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]), g && v("button", {
    type: "button",
    onClick: g,
    tabindex: -1,
    class: `${a}-next-btn`,
    style: m.value ? Fc : {}
  }, [l]), d && v("button", {
    type: "button",
    onClick: d,
    tabindex: -1,
    class: `${a}-super-next-btn`,
    style: m.value ? Fc : {}
  }, [u])]);
}
Dr.displayName = "Header";
Dr.inheritAttrs = !1;
function rm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: i,
    onPrevDecades: a,
    onNextDecades: r
  } = t, {
    hideHeader: l
  } = Sa();
  if (l)
    return null;
  const s = `${n}-header`, u = o.getYear(i), c = Math.floor(u / Na) * Na, d = c + Na - 1;
  return v(Dr, Z(Z({}, t), {}, {
    prefixCls: s,
    onSuperPrev: a,
    onSuperNext: r
  }), {
    default: () => [c, Ee("-"), d]
  });
}
rm.displayName = "DecadeHeader";
rm.inheritAttrs = !1;
function b$(e, t, n, o, i) {
  let a = e.setHour(t, n);
  return a = e.setMinute(a, o), a = e.setSecond(a, i), a;
}
function cd(e, t, n) {
  if (!n)
    return t;
  let o = t;
  return o = e.setHour(o, e.getHour(n)), o = e.setMinute(o, e.getMinute(n)), o = e.setSecond(o, e.getSecond(n)), o;
}
function z4(e, t, n, o, i, a) {
  const r = Math.floor(e / o) * o;
  if (r < e)
    return [r, 60 - i, 60 - a];
  const l = Math.floor(t / i) * i;
  if (l < t)
    return [r, l, 60 - a];
  const s = Math.floor(n / a) * a;
  return [r, l, s];
}
function R4(e, t) {
  const n = e.getYear(t), o = e.getMonth(t) + 1, i = e.getEndDate(e.getFixedDate(`${n}-${o}-01`)), a = e.getDate(i), r = o < 10 ? `0${o}` : `${o}`;
  return `${n}-${r}-${a}`;
}
function Ol(e) {
  const {
    prefixCls: t,
    disabledDate: n,
    onSelect: o,
    picker: i,
    rowNum: a,
    colNum: r,
    prefixColumn: l,
    rowClassName: s,
    baseDate: u,
    getCellClassName: c,
    getCellText: d,
    getCellNode: f,
    getCellDate: g,
    generateConfig: m,
    titleCell: b,
    headerCells: y
  } = Yn(e), {
    onDateMouseenter: S,
    onDateMouseleave: C,
    mode: O
  } = Sa(), $ = `${t}-cell`, P = [];
  for (let k = 0; k < a; k += 1) {
    const x = [];
    let E;
    for (let z = 0; z < r; z += 1) {
      const B = k * r + z, D = g(u, B), W = ph({
        cellDate: D,
        mode: O.value,
        disabledDate: n,
        generateConfig: m
      });
      z === 0 && (E = D, l && x.push(l(E)));
      const H = b && b(D);
      x.push(v("td", {
        key: z,
        title: H,
        class: Te($, I({
          [`${$}-disabled`]: W,
          [`${$}-start`]: d(D) === 1 || i === "year" && Number(H) % 10 === 0,
          [`${$}-end`]: H === R4(m, D) || i === "year" && Number(H) % 10 === 9
        }, c(D))),
        onClick: (F) => {
          F.stopPropagation(), W || o(D);
        },
        onMouseenter: () => {
          !W && S && S(D);
        },
        onMouseleave: () => {
          !W && C && C(D);
        }
      }, [f ? f(D) : v("div", {
        class: `${$}-inner`
      }, [d(D)])]));
    }
    P.push(v("tr", {
      key: k,
      class: s && s(E)
    }, [x]));
  }
  return v("div", {
    class: `${t}-body`
  }, [v("table", {
    class: `${t}-content`
  }, [y && v("thead", null, [v("tr", null, [y])]), v("tbody", null, [P])])]);
}
Ol.displayName = "PanelBody";
Ol.inheritAttrs = !1;
const ch = 3, Wy = 4;
function lm(e) {
  const t = Yn(e), n = ji - 1, {
    prefixCls: o,
    viewDate: i,
    generateConfig: a
  } = t, r = `${o}-cell`, l = a.getYear(i), s = Math.floor(l / ji) * ji, u = Math.floor(l / Na) * Na, c = u + Na - 1, d = a.setYear(i, u - Math.ceil((ch * Wy * ji - Na) / 2)), f = (g) => {
    const m = a.getYear(g), b = m + n;
    return {
      [`${r}-in-view`]: u <= m && b <= c,
      [`${r}-selected`]: m === s
    };
  };
  return v(Ol, Z(Z({}, t), {}, {
    rowNum: Wy,
    colNum: ch,
    baseDate: d,
    getCellText: (g) => {
      const m = a.getYear(g);
      return `${m}-${m + n}`;
    },
    getCellClassName: f,
    getCellDate: (g, m) => a.addYear(g, m * ji)
  }), null);
}
lm.displayName = "DecadeBody";
lm.inheritAttrs = !1;
const Lc = /* @__PURE__ */ new Map();
function N4(e, t) {
  let n;
  function o() {
    Tv(e) ? t() : n = Mt(() => {
      o();
    });
  }
  return o(), () => {
    Mt.cancel(n);
  };
}
function dh(e, t, n) {
  if (Lc.get(e) && Mt.cancel(Lc.get(e)), n <= 0) {
    Lc.set(e, Mt(() => {
      e.scrollTop = t;
    }));
    return;
  }
  const i = (t - e.scrollTop) / n * 10;
  Lc.set(e, Mt(() => {
    e.scrollTop += i, e.scrollTop !== t && dh(e, t, n - 10);
  }));
}
function js(e, t) {
  let {
    onLeftRight: n,
    onCtrlLeftRight: o,
    onUpDown: i,
    onPageUpDown: a,
    onEnter: r
  } = t;
  const {
    which: l,
    ctrlKey: s,
    metaKey: u
  } = e;
  switch (l) {
    case Xe.LEFT:
      if (s || u) {
        if (o)
          return o(-1), !0;
      } else if (n)
        return n(-1), !0;
      break;
    case Xe.RIGHT:
      if (s || u) {
        if (o)
          return o(1), !0;
      } else if (n)
        return n(1), !0;
      break;
    case Xe.UP:
      if (i)
        return i(-1), !0;
      break;
    case Xe.DOWN:
      if (i)
        return i(1), !0;
      break;
    case Xe.PAGE_UP:
      if (a)
        return a(-1), !0;
      break;
    case Xe.PAGE_DOWN:
      if (a)
        return a(1), !0;
      break;
    case Xe.ENTER:
      if (r)
        return r(), !0;
      break;
  }
  return !1;
}
function y$(e, t, n, o) {
  let i = e;
  if (!i)
    switch (t) {
      case "time":
        i = o ? "hh:mm:ss a" : "HH:mm:ss";
        break;
      case "week":
        i = "gggg-wo";
        break;
      case "month":
        i = "YYYY-MM";
        break;
      case "quarter":
        i = "YYYY-[Q]Q";
        break;
      case "year":
        i = "YYYY";
        break;
      default:
        i = n ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
    }
  return i;
}
function x$(e, t, n) {
  const o = e === "time" ? 8 : 10, i = typeof t == "function" ? t(n.getNow()).length : t.length;
  return Math.max(o, i) + 2;
}
let lu = null;
const Hc = /* @__PURE__ */ new Set();
function B4(e) {
  return !lu && typeof window < "u" && window.addEventListener && (lu = (t) => {
    [...Hc].forEach((n) => {
      n(t);
    });
  }, window.addEventListener("mousedown", lu)), Hc.add(e), () => {
    Hc.delete(e), Hc.size === 0 && (window.removeEventListener("mousedown", lu), lu = null);
  };
}
function F4(e) {
  var t;
  const n = e.target;
  return e.composed && n.shadowRoot && ((t = e.composedPath) === null || t === void 0 ? void 0 : t.call(e)[0]) || n;
}
const L4 = (e) => e === "month" || e === "date" ? "year" : e, H4 = (e) => e === "date" ? "month" : e, V4 = (e) => e === "month" || e === "date" ? "quarter" : e, j4 = (e) => e === "date" ? "week" : e, W4 = {
  year: L4,
  month: H4,
  quarter: V4,
  week: j4,
  time: null,
  date: null
};
function w$(e, t) {
  return process.env.NODE_ENV === "test" ? !1 : e.some((n) => n && n.contains(t));
}
const ji = 10, Na = ji * 10;
function sm(e) {
  const t = Yn(e), {
    prefixCls: n,
    onViewDateChange: o,
    generateConfig: i,
    viewDate: a,
    operationRef: r,
    onSelect: l,
    onPanelChange: s
  } = t, u = `${n}-decade-panel`;
  r.value = {
    onKeydown: (f) => js(f, {
      onLeftRight: (g) => {
        l(i.addYear(a, g * ji), "key");
      },
      onCtrlLeftRight: (g) => {
        l(i.addYear(a, g * Na), "key");
      },
      onUpDown: (g) => {
        l(i.addYear(a, g * ji * ch), "key");
      },
      onEnter: () => {
        s("year", a);
      }
    })
  };
  const c = (f) => {
    const g = i.addYear(a, f * Na);
    o(g), s(null, g);
  }, d = (f) => {
    l(f, "mouse"), s("year", f);
  };
  return v("div", {
    class: u
  }, [v(rm, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevDecades: () => {
      c(-1);
    },
    onNextDecades: () => {
      c(1);
    }
  }), null), v(lm, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: d
  }), null)]);
}
sm.displayName = "DecadePanel";
sm.inheritAttrs = !1;
const dd = 7;
function Il(e, t) {
  if (!e && !t)
    return !0;
  if (!e || !t)
    return !1;
}
function q4(e, t, n) {
  const o = Il(t, n);
  if (typeof o == "boolean")
    return o;
  const i = Math.floor(e.getYear(t) / 10), a = Math.floor(e.getYear(n) / 10);
  return i === a;
}
function If(e, t, n) {
  const o = Il(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n);
}
function fh(e, t) {
  return Math.floor(e.getMonth(t) / 3) + 1;
}
function S$(e, t, n) {
  const o = Il(t, n);
  return typeof o == "boolean" ? o : If(e, t, n) && fh(e, t) === fh(e, n);
}
function um(e, t, n) {
  const o = Il(t, n);
  return typeof o == "boolean" ? o : If(e, t, n) && e.getMonth(t) === e.getMonth(n);
}
function Ba(e, t, n) {
  const o = Il(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n) && e.getMonth(t) === e.getMonth(n) && e.getDate(t) === e.getDate(n);
}
function G4(e, t, n) {
  const o = Il(t, n);
  return typeof o == "boolean" ? o : e.getHour(t) === e.getHour(n) && e.getMinute(t) === e.getMinute(n) && e.getSecond(t) === e.getSecond(n);
}
function C$(e, t, n, o) {
  const i = Il(n, o);
  return typeof i == "boolean" ? i : e.locale.getWeek(t, n) === e.locale.getWeek(t, o);
}
function ss(e, t, n) {
  return Ba(e, t, n) && G4(e, t, n);
}
function Vc(e, t, n, o) {
  return !t || !n || !o ? !1 : !Ba(e, t, o) && !Ba(e, n, o) && e.isAfter(o, t) && e.isAfter(n, o);
}
function K4(e, t, n) {
  const o = t.locale.getWeekFirstDay(e), i = t.setDate(n, 1), a = t.getWeekDay(i);
  let r = t.addDate(i, o - a);
  return t.getMonth(r) === t.getMonth(n) && t.getDate(r) > 1 && (r = t.addDate(r, -7)), r;
}
function Ou(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
  switch (t) {
    case "year":
      return n.addYear(e, o * 10);
    case "quarter":
    case "month":
      return n.addYear(e, o);
    default:
      return n.addMonth(e, o);
  }
}
function wo(e, t) {
  let {
    generateConfig: n,
    locale: o,
    format: i
  } = t;
  return typeof i == "function" ? i(e) : n.locale.format(o.locale, e, i);
}
function $$(e, t) {
  let {
    generateConfig: n,
    locale: o,
    formatList: i
  } = t;
  return !e || typeof i[0] == "function" ? null : n.locale.parse(o.locale, e, i);
}
function ph(e) {
  let {
    cellDate: t,
    mode: n,
    disabledDate: o,
    generateConfig: i
  } = e;
  if (!o) return !1;
  const a = (r, l, s) => {
    let u = l;
    for (; u <= s; ) {
      let c;
      switch (r) {
        case "date": {
          if (c = i.setDate(t, u), !o(c))
            return !1;
          break;
        }
        case "month": {
          if (c = i.setMonth(t, u), !ph({
            cellDate: c,
            mode: "month",
            generateConfig: i,
            disabledDate: o
          }))
            return !1;
          break;
        }
        case "year": {
          if (c = i.setYear(t, u), !ph({
            cellDate: c,
            mode: "year",
            generateConfig: i,
            disabledDate: o
          }))
            return !1;
          break;
        }
      }
      u += 1;
    }
    return !0;
  };
  switch (n) {
    case "date":
    case "week":
      return o(t);
    case "month": {
      const l = i.getDate(i.getEndDate(t));
      return a("date", 1, l);
    }
    case "quarter": {
      const r = Math.floor(i.getMonth(t) / 3) * 3, l = r + 2;
      return a("month", r, l);
    }
    case "year":
      return a("month", 0, 11);
    case "decade": {
      const r = i.getYear(t), l = Math.floor(r / ji) * ji, s = l + ji - 1;
      return a("year", l, s);
    }
  }
}
function cm(e) {
  const t = Yn(e), {
    hideHeader: n
  } = Sa();
  if (n.value)
    return null;
  const {
    prefixCls: o,
    generateConfig: i,
    locale: a,
    value: r,
    format: l
  } = t, s = `${o}-header`;
  return v(Dr, {
    prefixCls: s
  }, {
    default: () => [r ? wo(r, {
      locale: a,
      format: l,
      generateConfig: i
    }) : " "]
  });
}
cm.displayName = "TimeHeader";
cm.inheritAttrs = !1;
const jc = ye({
  name: "TimeUnitColumn",
  props: ["prefixCls", "units", "onSelect", "value", "active", "hideDisabledOptions"],
  setup(e) {
    const {
      open: t
    } = Sa(), n = Pe(null), o = le(/* @__PURE__ */ new Map()), i = le();
    return Ie(() => e.value, () => {
      const a = o.value.get(e.value);
      a && t.value !== !1 && dh(n.value, a.offsetTop, 120);
    }), At(() => {
      var a;
      (a = i.value) === null || a === void 0 || a.call(i);
    }), Ie(t, () => {
      var a;
      (a = i.value) === null || a === void 0 || a.call(i), Nt(() => {
        if (t.value) {
          const r = o.value.get(e.value);
          r && (i.value = N4(r, () => {
            dh(n.value, r.offsetTop, 0);
          }));
        }
      });
    }, {
      immediate: !0,
      flush: "post"
    }), () => {
      const {
        prefixCls: a,
        units: r,
        onSelect: l,
        value: s,
        active: u,
        hideDisabledOptions: c
      } = e, d = `${a}-cell`;
      return v("ul", {
        class: Te(`${a}-column`, {
          [`${a}-column-active`]: u
        }),
        ref: n,
        style: {
          position: "relative"
        }
      }, [r.map((f) => c && f.disabled ? null : v("li", {
        key: f.value,
        ref: (g) => {
          o.value.set(f.value, g);
        },
        class: Te(d, {
          [`${d}-disabled`]: f.disabled,
          [`${d}-selected`]: s === f.value
        }),
        onClick: () => {
          f.disabled || l(f.value);
        }
      }, [v("div", {
        class: `${d}-inner`
      }, [f.label])]))]);
    };
  }
});
function P$(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0", o = String(e);
  for (; o.length < t; )
    o = `${n}${e}`;
  return o;
}
const Y4 = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
};
function O$(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function I$(e) {
  const t = {};
  return Object.keys(e).forEach((n) => {
    (n.startsWith("data-") || n.startsWith("aria-") || n === "role" || n === "name") && !n.startsWith("data-__") && (t[n] = e[n]);
  }), t;
}
function Lt(e, t) {
  return e ? e[t] : null;
}
function Ci(e, t, n) {
  const o = [Lt(e, 0), Lt(e, 1)];
  return o[n] = typeof t == "function" ? t(o[n]) : t, !o[0] && !o[1] ? null : o;
}
function _p(e, t, n, o) {
  const i = [];
  for (let a = e; a <= t; a += n)
    i.push({
      label: P$(a, 2),
      value: a,
      disabled: (o || []).includes(a)
    });
  return i;
}
const U4 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TimeBody",
  inheritAttrs: !1,
  props: ["generateConfig", "prefixCls", "operationRef", "activeColumnIndex", "value", "showHour", "showMinute", "showSecond", "use12Hours", "hourStep", "minuteStep", "secondStep", "disabledHours", "disabledMinutes", "disabledSeconds", "disabledTime", "hideDisabledOptions", "onSelect"],
  setup(e) {
    const t = R(() => e.value ? e.generateConfig.getHour(e.value) : -1), n = R(() => e.use12Hours ? t.value >= 12 : !1), o = R(() => e.use12Hours ? t.value % 12 : t.value), i = R(() => e.value ? e.generateConfig.getMinute(e.value) : -1), a = R(() => e.value ? e.generateConfig.getSecond(e.value) : -1), r = le(e.generateConfig.getNow()), l = le(), s = le(), u = le();
    jh(() => {
      r.value = e.generateConfig.getNow();
    }), Ft(() => {
      if (e.disabledTime) {
        const y = e.disabledTime(r);
        [l.value, s.value, u.value] = [y.disabledHours, y.disabledMinutes, y.disabledSeconds];
      } else
        [l.value, s.value, u.value] = [e.disabledHours, e.disabledMinutes, e.disabledSeconds];
    });
    const c = (y, S, C, O) => {
      let $ = e.value || e.generateConfig.getNow();
      const P = Math.max(0, S), k = Math.max(0, C), x = Math.max(0, O);
      return $ = b$(e.generateConfig, $, !e.use12Hours || !y ? P : P + 12, k, x), $;
    }, d = R(() => {
      var y;
      return _p(0, 23, (y = e.hourStep) !== null && y !== void 0 ? y : 1, l.value && l.value());
    }), f = R(() => {
      if (!e.use12Hours)
        return [!1, !1];
      const y = [!0, !0];
      return d.value.forEach((S) => {
        let {
          disabled: C,
          value: O
        } = S;
        C || (O >= 12 ? y[1] = !1 : y[0] = !1);
      }), y;
    }), g = R(() => e.use12Hours ? d.value.filter(n.value ? (y) => y.value >= 12 : (y) => y.value < 12).map((y) => {
      const S = y.value % 12, C = S === 0 ? "12" : P$(S, 2);
      return I(I({}, y), {
        label: C,
        value: S
      });
    }) : d.value), m = R(() => {
      var y;
      return _p(0, 59, (y = e.minuteStep) !== null && y !== void 0 ? y : 1, s.value && s.value(t.value));
    }), b = R(() => {
      var y;
      return _p(0, 59, (y = e.secondStep) !== null && y !== void 0 ? y : 1, u.value && u.value(t.value, i.value));
    });
    return () => {
      const {
        prefixCls: y,
        operationRef: S,
        activeColumnIndex: C,
        showHour: O,
        showMinute: $,
        showSecond: P,
        use12Hours: k,
        hideDisabledOptions: x,
        onSelect: E
      } = e, z = [], B = `${y}-content`, D = `${y}-time-panel`;
      S.value = {
        onUpDown: (F) => {
          const A = z[C];
          if (A) {
            const U = A.units.findIndex((ae) => ae.value === A.value), j = A.units.length;
            for (let ae = 1; ae < j; ae += 1) {
              const G = A.units[(U + F * ae + j) % j];
              if (G.disabled !== !0) {
                A.onSelect(G.value);
                break;
              }
            }
          }
        }
      };
      function W(F, A, U, j, ae) {
        F !== !1 && z.push({
          node: An(A, {
            prefixCls: D,
            value: U,
            active: C === z.length,
            onSelect: ae,
            units: j,
            hideDisabledOptions: x
          }),
          onSelect: ae,
          value: U,
          units: j
        });
      }
      W(O, v(jc, {
        key: "hour"
      }, null), o.value, g.value, (F) => {
        E(c(n.value, F, i.value, a.value), "mouse");
      }), W($, v(jc, {
        key: "minute"
      }, null), i.value, m.value, (F) => {
        E(c(n.value, o.value, F, a.value), "mouse");
      }), W(P, v(jc, {
        key: "second"
      }, null), a.value, b.value, (F) => {
        E(c(n.value, o.value, i.value, F), "mouse");
      });
      let H = -1;
      return typeof n.value == "boolean" && (H = n.value ? 1 : 0), W(k === !0, v(jc, {
        key: "12hours"
      }, null), H, [{
        label: "AM",
        value: 0,
        disabled: f.value[0]
      }, {
        label: "PM",
        value: 1,
        disabled: f.value[1]
      }], (F) => {
        E(c(!!F, o.value, i.value, a.value), "mouse");
      }), v("div", {
        class: B
      }, [z.map((F) => {
        let {
          node: A
        } = F;
        return A;
      })]);
    };
  }
}), X4 = (e) => e.filter((t) => t !== !1).length;
function Mf(e) {
  const t = Yn(e), {
    generateConfig: n,
    format: o = "HH:mm:ss",
    prefixCls: i,
    active: a,
    operationRef: r,
    showHour: l,
    showMinute: s,
    showSecond: u,
    use12Hours: c = !1,
    onSelect: d,
    value: f
  } = t, g = `${i}-time-panel`, m = le(), b = le(-1), y = X4([l, s, u, c]);
  return r.value = {
    onKeydown: (S) => js(S, {
      onLeftRight: (C) => {
        b.value = (b.value + C + y) % y;
      },
      onUpDown: (C) => {
        b.value === -1 ? b.value = 0 : m.value && m.value.onUpDown(C);
      },
      onEnter: () => {
        d(f || n.getNow(), "key"), b.value = -1;
      }
    }),
    onBlur: () => {
      b.value = -1;
    }
  }, v("div", {
    class: Te(g, {
      [`${g}-active`]: a
    })
  }, [v(cm, Z(Z({}, t), {}, {
    format: o,
    prefixCls: i
  }), null), v(U4, Z(Z({}, t), {}, {
    prefixCls: i,
    activeColumnIndex: b.value,
    operationRef: m
  }), null)]);
}
Mf.displayName = "TimePanel";
Mf.inheritAttrs = !1;
function Tf(e) {
  let {
    cellPrefixCls: t,
    generateConfig: n,
    rangedValue: o,
    hoverRangedValue: i,
    isInView: a,
    isSameCell: r,
    offsetCell: l,
    today: s,
    value: u
  } = e;
  function c(d) {
    const f = l(d, -1), g = l(d, 1), m = Lt(o, 0), b = Lt(o, 1), y = Lt(i, 0), S = Lt(i, 1), C = Vc(n, y, S, d);
    function O(z) {
      return r(m, z);
    }
    function $(z) {
      return r(b, z);
    }
    const P = r(y, d), k = r(S, d), x = (C || k) && (!a(f) || $(f)), E = (C || P) && (!a(g) || O(g));
    return {
      // In view
      [`${t}-in-view`]: a(d),
      // Range
      [`${t}-in-range`]: Vc(n, m, b, d),
      [`${t}-range-start`]: O(d),
      [`${t}-range-end`]: $(d),
      [`${t}-range-start-single`]: O(d) && !b,
      [`${t}-range-end-single`]: $(d) && !m,
      [`${t}-range-start-near-hover`]: O(d) && (r(f, y) || Vc(n, y, S, f)),
      [`${t}-range-end-near-hover`]: $(d) && (r(g, S) || Vc(n, y, S, g)),
      // Range Hover
      [`${t}-range-hover`]: C,
      [`${t}-range-hover-start`]: P,
      [`${t}-range-hover-end`]: k,
      // Range Edge
      [`${t}-range-hover-edge-start`]: x,
      [`${t}-range-hover-edge-end`]: E,
      [`${t}-range-hover-edge-start-near-range`]: x && r(f, b),
      [`${t}-range-hover-edge-end-near-range`]: E && r(g, m),
      // Others
      [`${t}-today`]: r(s, d),
      [`${t}-selected`]: r(u, d)
    };
  }
  return c;
}
const M$ = Symbol("RangeContextProps"), Q4 = (e) => {
  kt(M$, e);
}, nc = () => Tt(M$, {
  rangedValue: le(),
  hoverRangedValue: le(),
  inRange: le(),
  panelPosition: le()
}), Z4 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = {
      rangedValue: le(e.value.rangedValue),
      hoverRangedValue: le(e.value.hoverRangedValue),
      inRange: le(e.value.inRange),
      panelPosition: le(e.value.panelPosition)
    };
    return Q4(o), Ie(() => e.value, () => {
      Object.keys(e.value).forEach((i) => {
        o[i] && (o[i].value = e.value[i]);
      });
    }), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
});
function kf(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    prefixColumn: i,
    locale: a,
    rowCount: r,
    viewDate: l,
    value: s,
    dateRender: u
  } = t, {
    rangedValue: c,
    hoverRangedValue: d
  } = nc(), f = K4(a.locale, o, l), g = `${n}-cell`, m = o.locale.getWeekFirstDay(a.locale), b = o.getNow(), y = [], S = a.shortWeekDays || (o.locale.getShortWeekDays ? o.locale.getShortWeekDays(a.locale) : []);
  i && y.push(v("th", {
    key: "empty",
    "aria-label": "empty cell"
  }, null));
  for (let $ = 0; $ < dd; $ += 1)
    y.push(v("th", {
      key: $
    }, [S[($ + m) % dd]]));
  const C = Tf({
    cellPrefixCls: g,
    today: b,
    value: s,
    generateConfig: o,
    rangedValue: i ? null : c.value,
    hoverRangedValue: i ? null : d.value,
    isSameCell: ($, P) => Ba(o, $, P),
    isInView: ($) => um(o, $, l),
    offsetCell: ($, P) => o.addDate($, P)
  }), O = u ? ($) => u({
    current: $,
    today: b
  }) : void 0;
  return v(Ol, Z(Z({}, t), {}, {
    rowNum: r,
    colNum: dd,
    baseDate: f,
    getCellNode: O,
    getCellText: o.getDate,
    getCellClassName: C,
    getCellDate: o.addDate,
    titleCell: ($) => wo($, {
      locale: a,
      format: "YYYY-MM-DD",
      generateConfig: o
    }),
    headerCells: y
  }), null);
}
kf.displayName = "DateBody";
kf.inheritAttrs = !1;
kf.props = [
  "prefixCls",
  "generateConfig",
  "value?",
  "viewDate",
  "locale",
  "rowCount",
  "onSelect",
  "dateRender?",
  "disabledDate?",
  // Used for week panel
  "prefixColumn?",
  "rowClassName?"
];
function dm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: a,
    onNextMonth: r,
    onPrevMonth: l,
    onNextYear: s,
    onPrevYear: u,
    onYearClick: c,
    onMonthClick: d
  } = t, {
    hideHeader: f
  } = Sa();
  if (f.value)
    return null;
  const g = `${n}-header`, m = i.shortMonths || (o.locale.getShortMonths ? o.locale.getShortMonths(i.locale) : []), b = o.getMonth(a), y = v("button", {
    type: "button",
    key: "year",
    onClick: c,
    tabindex: -1,
    class: `${n}-year-btn`
  }, [wo(a, {
    locale: i,
    format: i.yearFormat,
    generateConfig: o
  })]), S = v("button", {
    type: "button",
    key: "month",
    onClick: d,
    tabindex: -1,
    class: `${n}-month-btn`
  }, [i.monthFormat ? wo(a, {
    locale: i,
    format: i.monthFormat,
    generateConfig: o
  }) : m[b]]), C = i.monthBeforeYear ? [S, y] : [y, S];
  return v(Dr, Z(Z({}, t), {}, {
    prefixCls: g,
    onSuperPrev: u,
    onPrev: l,
    onNext: r,
    onSuperNext: s
  }), {
    default: () => [C]
  });
}
dm.displayName = "DateHeader";
dm.inheritAttrs = !1;
const J4 = 6;
function oc(e) {
  const t = Yn(e), {
    prefixCls: n,
    panelName: o = "date",
    keyboardConfig: i,
    active: a,
    operationRef: r,
    generateConfig: l,
    value: s,
    viewDate: u,
    onViewDateChange: c,
    onPanelChange: d,
    onSelect: f
  } = t, g = `${n}-${o}-panel`;
  r.value = {
    onKeydown: (y) => js(y, I({
      onLeftRight: (S) => {
        f(l.addDate(s || u, S), "key");
      },
      onCtrlLeftRight: (S) => {
        f(l.addYear(s || u, S), "key");
      },
      onUpDown: (S) => {
        f(l.addDate(s || u, S * dd), "key");
      },
      onPageUpDown: (S) => {
        f(l.addMonth(s || u, S), "key");
      }
    }, i))
  };
  const m = (y) => {
    const S = l.addYear(u, y);
    c(S), d(null, S);
  }, b = (y) => {
    const S = l.addMonth(u, y);
    c(S), d(null, S);
  };
  return v("div", {
    class: Te(g, {
      [`${g}-active`]: a
    })
  }, [v(dm, Z(Z({}, t), {}, {
    prefixCls: n,
    value: s,
    viewDate: u,
    onPrevYear: () => {
      m(-1);
    },
    onNextYear: () => {
      m(1);
    },
    onPrevMonth: () => {
      b(-1);
    },
    onNextMonth: () => {
      b(1);
    },
    onMonthClick: () => {
      d("month", u);
    },
    onYearClick: () => {
      d("year", u);
    }
  }), null), v(kf, Z(Z({}, t), {}, {
    onSelect: (y) => f(y, "mouse"),
    prefixCls: n,
    value: s,
    viewDate: u,
    rowCount: J4
  }), null)]);
}
oc.displayName = "DatePanel";
oc.inheritAttrs = !1;
const qy = Y4("date", "time");
function fm(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    generateConfig: i,
    value: a,
    defaultValue: r,
    disabledTime: l,
    showTime: s,
    onSelect: u
  } = t, c = `${n}-datetime-panel`, d = le(null), f = le({}), g = le({}), m = typeof s == "object" ? I({}, s) : {};
  function b(O) {
    const $ = qy.indexOf(d.value) + O;
    return qy[$] || null;
  }
  const y = (O) => {
    g.value.onBlur && g.value.onBlur(O), d.value = null;
  };
  o.value = {
    onKeydown: (O) => {
      if (O.which === Xe.TAB) {
        const $ = b(O.shiftKey ? -1 : 1);
        return d.value = $, $ && O.preventDefault(), !0;
      }
      if (d.value) {
        const $ = d.value === "date" ? f : g;
        return $.value && $.value.onKeydown && $.value.onKeydown(O), !0;
      }
      return [Xe.LEFT, Xe.RIGHT, Xe.UP, Xe.DOWN].includes(O.which) ? (d.value = "date", !0) : !1;
    },
    onBlur: y,
    onClose: y
  };
  const S = (O, $) => {
    let P = O;
    $ === "date" && !a && m.defaultValue ? (P = i.setHour(P, i.getHour(m.defaultValue)), P = i.setMinute(P, i.getMinute(m.defaultValue)), P = i.setSecond(P, i.getSecond(m.defaultValue))) : $ === "time" && !a && r && (P = i.setYear(P, i.getYear(r)), P = i.setMonth(P, i.getMonth(r)), P = i.setDate(P, i.getDate(r))), u && u(P, "mouse");
  }, C = l ? l(a || null) : {};
  return v("div", {
    class: Te(c, {
      [`${c}-active`]: d.value
    })
  }, [v(oc, Z(Z({}, t), {}, {
    operationRef: f,
    active: d.value === "date",
    onSelect: (O) => {
      S(cd(i, O, !a && typeof s == "object" ? s.defaultValue : null), "date");
    }
  }), null), v(Mf, Z(Z(Z(Z({}, t), {}, {
    format: void 0
  }, m), C), {}, {
    disabledTime: null,
    defaultValue: void 0,
    operationRef: g,
    active: d.value === "time",
    onSelect: (O) => {
      S(O, "time");
    }
  }), null)]);
}
fm.displayName = "DatetimePanel";
fm.inheritAttrs = !1;
function pm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    value: a
  } = t, r = `${n}-cell`, l = (c) => v("td", {
    key: "week",
    class: Te(r, `${r}-week`)
  }, [o.locale.getWeek(i.locale, c)]), s = `${n}-week-panel-row`, u = (c) => Te(s, {
    [`${s}-selected`]: C$(o, i.locale, a, c)
  });
  return v(oc, Z(Z({}, t), {}, {
    panelName: "week",
    prefixColumn: l,
    rowClassName: u,
    keyboardConfig: {
      onLeftRight: null
    }
  }), null);
}
pm.displayName = "WeekPanel";
pm.inheritAttrs = !1;
function gm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: a,
    onNextYear: r,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = Sa();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return v(Dr, Z(Z({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: r
  }), {
    default: () => [v("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [wo(a, {
      locale: i,
      format: i.yearFormat,
      generateConfig: o
    })])]
  });
}
gm.displayName = "MonthHeader";
gm.inheritAttrs = !1;
const T$ = 3, e5 = 4;
function hm(e) {
  const t = Yn(e), {
    prefixCls: n,
    locale: o,
    value: i,
    viewDate: a,
    generateConfig: r,
    monthCellRender: l
  } = t, {
    rangedValue: s,
    hoverRangedValue: u
  } = nc(), c = `${n}-cell`, d = Tf({
    cellPrefixCls: c,
    value: i,
    generateConfig: r,
    rangedValue: s.value,
    hoverRangedValue: u.value,
    isSameCell: (b, y) => um(r, b, y),
    isInView: () => !0,
    offsetCell: (b, y) => r.addMonth(b, y)
  }), f = o.shortMonths || (r.locale.getShortMonths ? r.locale.getShortMonths(o.locale) : []), g = r.setMonth(a, 0), m = l ? (b) => l({
    current: b,
    locale: o
  }) : void 0;
  return v(Ol, Z(Z({}, t), {}, {
    rowNum: e5,
    colNum: T$,
    baseDate: g,
    getCellNode: m,
    getCellText: (b) => o.monthFormat ? wo(b, {
      locale: o,
      format: o.monthFormat,
      generateConfig: r
    }) : f[r.getMonth(b)],
    getCellClassName: d,
    getCellDate: r.addMonth,
    titleCell: (b) => wo(b, {
      locale: o,
      format: "YYYY-MM",
      generateConfig: r
    })
  }), null);
}
hm.displayName = "MonthBody";
hm.inheritAttrs = !1;
function vm(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: a,
    value: r,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-month-panel`;
  o.value = {
    onKeydown: (f) => js(f, {
      onLeftRight: (g) => {
        u(a.addMonth(r || l, g), "key");
      },
      onCtrlLeftRight: (g) => {
        u(a.addYear(r || l, g), "key");
      },
      onUpDown: (g) => {
        u(a.addMonth(r || l, g * T$), "key");
      },
      onEnter: () => {
        s("date", r || l);
      }
    })
  };
  const d = (f) => {
    const g = a.addYear(l, f);
    i(g), s(null, g);
  };
  return v("div", {
    class: c
  }, [v(gm, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), v(hm, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse"), s("date", f);
    }
  }), null)]);
}
vm.displayName = "MonthPanel";
vm.inheritAttrs = !1;
function mm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: a,
    onNextYear: r,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = Sa();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return v(Dr, Z(Z({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: r
  }), {
    default: () => [v("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [wo(a, {
      locale: i,
      format: i.yearFormat,
      generateConfig: o
    })])]
  });
}
mm.displayName = "QuarterHeader";
mm.inheritAttrs = !1;
const t5 = 4, n5 = 1;
function bm(e) {
  const t = Yn(e), {
    prefixCls: n,
    locale: o,
    value: i,
    viewDate: a,
    generateConfig: r
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = nc(), u = `${n}-cell`, c = Tf({
    cellPrefixCls: u,
    value: i,
    generateConfig: r,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (f, g) => S$(r, f, g),
    isInView: () => !0,
    offsetCell: (f, g) => r.addMonth(f, g * 3)
  }), d = r.setDate(r.setMonth(a, 0), 1);
  return v(Ol, Z(Z({}, t), {}, {
    rowNum: n5,
    colNum: t5,
    baseDate: d,
    getCellText: (f) => wo(f, {
      locale: o,
      format: o.quarterFormat || "[Q]Q",
      generateConfig: r
    }),
    getCellClassName: c,
    getCellDate: (f, g) => r.addMonth(f, g * 3),
    titleCell: (f) => wo(f, {
      locale: o,
      format: "YYYY-[Q]Q",
      generateConfig: r
    })
  }), null);
}
bm.displayName = "QuarterBody";
bm.inheritAttrs = !1;
function ym(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: a,
    value: r,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-quarter-panel`;
  o.value = {
    onKeydown: (f) => js(f, {
      onLeftRight: (g) => {
        u(a.addMonth(r || l, g * 3), "key");
      },
      onCtrlLeftRight: (g) => {
        u(a.addYear(r || l, g), "key");
      },
      onUpDown: (g) => {
        u(a.addYear(r || l, g), "key");
      }
    })
  };
  const d = (f) => {
    const g = a.addYear(l, f);
    i(g), s(null, g);
  };
  return v("div", {
    class: c
  }, [v(mm, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), v(bm, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse");
    }
  }), null)]);
}
ym.displayName = "QuarterPanel";
ym.inheritAttrs = !1;
function xm(e) {
  const t = Yn(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: i,
    onPrevDecade: a,
    onNextDecade: r,
    onDecadeClick: l
  } = t, {
    hideHeader: s
  } = Sa();
  if (s.value)
    return null;
  const u = `${n}-header`, c = o.getYear(i), d = Math.floor(c / wr) * wr, f = d + wr - 1;
  return v(Dr, Z(Z({}, t), {}, {
    prefixCls: u,
    onSuperPrev: a,
    onSuperNext: r
  }), {
    default: () => [v("button", {
      type: "button",
      onClick: l,
      class: `${n}-decade-btn`
    }, [d, Ee("-"), f])]
  });
}
xm.displayName = "YearHeader";
xm.inheritAttrs = !1;
const gh = 3, Gy = 4;
function wm(e) {
  const t = Yn(e), {
    prefixCls: n,
    value: o,
    viewDate: i,
    locale: a,
    generateConfig: r
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = nc(), u = `${n}-cell`, c = r.getYear(i), d = Math.floor(c / wr) * wr, f = d + wr - 1, g = r.setYear(i, d - Math.ceil((gh * Gy - wr) / 2)), m = (y) => {
    const S = r.getYear(y);
    return d <= S && S <= f;
  }, b = Tf({
    cellPrefixCls: u,
    value: o,
    generateConfig: r,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (y, S) => If(r, y, S),
    isInView: m,
    offsetCell: (y, S) => r.addYear(y, S)
  });
  return v(Ol, Z(Z({}, t), {}, {
    rowNum: Gy,
    colNum: gh,
    baseDate: g,
    getCellText: r.getYear,
    getCellClassName: b,
    getCellDate: r.addYear,
    titleCell: (y) => wo(y, {
      locale: a,
      format: "YYYY",
      generateConfig: r
    })
  }), null);
}
wm.displayName = "YearBody";
wm.inheritAttrs = !1;
const wr = 10;
function Sm(e) {
  const t = Yn(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: a,
    value: r,
    viewDate: l,
    sourceMode: s,
    onSelect: u,
    onPanelChange: c
  } = t, d = `${n}-year-panel`;
  o.value = {
    onKeydown: (g) => js(g, {
      onLeftRight: (m) => {
        u(a.addYear(r || l, m), "key");
      },
      onCtrlLeftRight: (m) => {
        u(a.addYear(r || l, m * wr), "key");
      },
      onUpDown: (m) => {
        u(a.addYear(r || l, m * gh), "key");
      },
      onEnter: () => {
        c(s === "date" ? "date" : "month", r || l);
      }
    })
  };
  const f = (g) => {
    const m = a.addYear(l, g * 10);
    i(m), c(null, m);
  };
  return v("div", {
    class: d
  }, [v(xm, Z(Z({}, t), {}, {
    prefixCls: n,
    onPrevDecade: () => {
      f(-1);
    },
    onNextDecade: () => {
      f(1);
    },
    onDecadeClick: () => {
      c("decade", l);
    }
  }), null), v(wm, Z(Z({}, t), {}, {
    prefixCls: n,
    onSelect: (g) => {
      c(s === "date" ? "date" : "month", g), u(g, "mouse");
    }
  }), null)]);
}
Sm.displayName = "YearPanel";
Sm.inheritAttrs = !1;
function k$(e, t, n) {
  return n ? v("div", {
    class: `${e}-footer-extra`
  }, [n(t)]) : null;
}
function E$(e) {
  let {
    prefixCls: t,
    components: n = {},
    needConfirmButton: o,
    onNow: i,
    onOk: a,
    okDisabled: r,
    showNow: l,
    locale: s
  } = e, u, c;
  if (o) {
    const d = n.button || "button";
    i && l !== !1 && (u = v("li", {
      class: `${t}-now`
    }, [v("a", {
      class: `${t}-now-btn`,
      onClick: i
    }, [s.now])])), c = o && v("li", {
      class: `${t}-ok`
    }, [v(d, {
      disabled: r,
      onClick: (f) => {
        f.stopPropagation(), a && a();
      }
    }, {
      default: () => [s.ok]
    })]);
  }
  return !u && !c ? null : v("ul", {
    class: `${t}-ranges`
  }, [u, c]);
}
function o5() {
  return ye({
    name: "PickerPanel",
    inheritAttrs: !1,
    props: {
      prefixCls: String,
      locale: Object,
      generateConfig: Object,
      value: Object,
      defaultValue: Object,
      pickerValue: Object,
      defaultPickerValue: Object,
      disabledDate: Function,
      mode: String,
      picker: {
        type: String,
        default: "date"
      },
      tabindex: {
        type: [Number, String],
        default: 0
      },
      showNow: {
        type: Boolean,
        default: void 0
      },
      showTime: [Boolean, Object],
      showToday: Boolean,
      renderExtraFooter: Function,
      dateRender: Function,
      hideHeader: {
        type: Boolean,
        default: void 0
      },
      onSelect: Function,
      onChange: Function,
      onPanelChange: Function,
      onMousedown: Function,
      onPickerValueChange: Function,
      onOk: Function,
      components: Object,
      direction: String,
      hourStep: {
        type: Number,
        default: 1
      },
      minuteStep: {
        type: Number,
        default: 1
      },
      secondStep: {
        type: Number,
        default: 1
      }
    },
    setup(e, t) {
      let {
        attrs: n
      } = t;
      const o = R(() => e.picker === "date" && !!e.showTime || e.picker === "time"), i = R(() => 24 % e.hourStep === 0), a = R(() => 60 % e.minuteStep === 0), r = R(() => 60 % e.secondStep === 0);
      process.env.NODE_ENV !== "production" && Ft(() => {
        const {
          generateConfig: j,
          value: ae,
          hourStep: G = 1,
          minuteStep: Y = 1,
          secondStep: K = 1
        } = e;
        yo(!ae || j.isValidate(ae), "Invalidate date pass to `value`."), yo(!ae || j.isValidate(ae), "Invalidate date pass to `defaultValue`."), yo(i.value, `\`hourStep\` ${G} is invalid. It should be a factor of 24.`), yo(a.value, `\`minuteStep\` ${Y} is invalid. It should be a factor of 60.`), yo(r.value, `\`secondStep\` ${K} is invalid. It should be a factor of 60.`);
      });
      const l = Sa(), {
        operationRef: s,
        onSelect: u,
        hideRanges: c,
        defaultOpenValue: d
      } = l, {
        inRange: f,
        panelPosition: g,
        rangedValue: m,
        hoverRangedValue: b
      } = nc(), y = le({}), [S, C] = jo(null, {
        value: Ut(e, "value"),
        defaultValue: e.defaultValue,
        postState: (j) => !j && d?.value && e.picker === "time" ? d.value : j
      }), [O, $] = jo(null, {
        value: Ut(e, "pickerValue"),
        defaultValue: e.defaultPickerValue || S.value,
        postState: (j) => {
          const {
            generateConfig: ae,
            showTime: G,
            defaultValue: Y
          } = e, K = ae.getNow();
          return j ? !S.value && e.showTime ? typeof G == "object" ? cd(ae, Array.isArray(j) ? j[0] : j, G.defaultValue || K) : Y ? cd(ae, Array.isArray(j) ? j[0] : j, Y) : cd(ae, Array.isArray(j) ? j[0] : j, K) : j : K;
        }
      }), P = (j) => {
        $(j), e.onPickerValueChange && e.onPickerValueChange(j);
      }, k = (j) => {
        const ae = W4[e.picker];
        return ae ? ae(j) : j;
      }, [x, E] = jo(() => e.picker === "time" ? "time" : k("date"), {
        value: Ut(e, "mode")
      });
      Ie(() => e.picker, () => {
        E(e.picker);
      });
      const z = le(x.value), B = (j) => {
        z.value = j;
      }, D = (j, ae) => {
        const {
          onPanelChange: G,
          generateConfig: Y
        } = e, K = k(j || x.value);
        B(x.value), E(K), G && (x.value !== K || ss(Y, O.value, O.value)) && G(ae, K);
      }, W = function(j, ae) {
        let G = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
        const {
          picker: Y,
          generateConfig: K,
          onSelect: J,
          onChange: be,
          disabledDate: xe
        } = e;
        (x.value === Y || G) && (C(j), J && J(j), u && u(j, ae), be && !ss(K, j, S.value) && !xe?.(j) && be(j));
      }, H = (j) => y.value && y.value.onKeydown ? ([Xe.LEFT, Xe.RIGHT, Xe.UP, Xe.DOWN, Xe.PAGE_UP, Xe.PAGE_DOWN, Xe.ENTER].includes(j.which) && j.preventDefault(), y.value.onKeydown(j)) : (yo(!1, "Panel not correct handle keyDown event. Please help to fire issue about this."), !1), F = (j) => {
        y.value && y.value.onBlur && y.value.onBlur(j);
      }, A = () => {
        const {
          generateConfig: j,
          hourStep: ae,
          minuteStep: G,
          secondStep: Y
        } = e, K = j.getNow(), J = z4(j.getHour(K), j.getMinute(K), j.getSecond(K), i.value ? ae : 1, a.value ? G : 1, r.value ? Y : 1), be = b$(
          j,
          K,
          J[0],
          // hour
          J[1],
          // minute
          J[2]
        );
        W(be, "submit");
      }, U = R(() => {
        const {
          prefixCls: j,
          direction: ae
        } = e;
        return Te(`${j}-panel`, {
          [`${j}-panel-has-range`]: m && m.value && m.value[0] && m.value[1],
          [`${j}-panel-has-range-hover`]: b && b.value && b.value[0] && b.value[1],
          [`${j}-panel-rtl`]: ae === "rtl"
        });
      });
      return am(I(I({}, l), {
        mode: x,
        hideHeader: R(() => {
          var j;
          return e.hideHeader !== void 0 ? e.hideHeader : (j = l.hideHeader) === null || j === void 0 ? void 0 : j.value;
        }),
        hidePrevBtn: R(() => f.value && g.value === "right"),
        hideNextBtn: R(() => f.value && g.value === "left")
      })), Ie(() => e.value, () => {
        e.value && $(e.value);
      }), () => {
        const {
          prefixCls: j = "ant-picker",
          locale: ae,
          generateConfig: G,
          disabledDate: Y,
          picker: K = "date",
          tabindex: J = 0,
          showNow: be,
          showTime: xe,
          showToday: he,
          renderExtraFooter: de,
          onMousedown: ne,
          onOk: we,
          components: re
        } = e;
        s && g.value !== "right" && (s.value = {
          onKeydown: H,
          onClose: () => {
            y.value && y.value.onClose && y.value.onClose();
          }
        });
        let se;
        const ve = I(I(I({}, n), e), {
          operationRef: y,
          prefixCls: j,
          viewDate: O.value,
          value: S.value,
          onViewDateChange: P,
          sourceMode: z.value,
          onPanelChange: D,
          disabledDate: Y
        });
        switch (delete ve.onChange, delete ve.onSelect, x.value) {
          case "decade":
            se = v(sm, Z(Z({}, ve), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "year":
            se = v(Sm, Z(Z({}, ve), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "month":
            se = v(vm, Z(Z({}, ve), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "quarter":
            se = v(ym, Z(Z({}, ve), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "week":
            se = v(pm, Z(Z({}, ve), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          case "time":
            delete ve.showTime, se = v(Mf, Z(Z(Z({}, ve), typeof xe == "object" ? xe : null), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
            break;
          default:
            xe ? se = v(fm, Z(Z({}, ve), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null) : se = v(oc, Z(Z({}, ve), {}, {
              onSelect: (Re, We) => {
                P(Re), W(Re, We);
              }
            }), null);
        }
        let Me, ke;
        c?.value || (Me = k$(j, x.value, de), ke = E$({
          prefixCls: j,
          components: re,
          needConfirmButton: o.value,
          okDisabled: !S.value || Y && Y(S.value),
          locale: ae,
          showNow: be,
          onNow: o.value && A,
          onOk: () => {
            S.value && (W(S.value, "submit", !0), we && we(S.value));
          }
        }));
        let Fe;
        if (he && x.value === "date" && K === "date" && !xe) {
          const Re = G.getNow(), We = `${j}-today-btn`, et = Y && Y(Re);
          Fe = v("a", {
            class: Te(We, et && `${We}-disabled`),
            "aria-disabled": et,
            onClick: () => {
              et || W(Re, "mouse", !0);
            }
          }, [ae.today]);
        }
        return v("div", {
          tabindex: J,
          class: Te(U.value, n.class),
          style: n.style,
          onKeydown: H,
          onBlur: F,
          onMousedown: ne
        }, [se, Me || ke || Fe ? v("div", {
          class: `${j}-footer`
        }, [Me, ke, Fe]) : null]);
      };
    }
  });
}
const i5 = o5(), _$ = ((e) => v(i5, e)), a5 = {
  bottomLeft: {
    points: ["tl", "bl"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  bottomRight: {
    points: ["tr", "br"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  topLeft: {
    points: ["bl", "tl"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  },
  topRight: {
    points: ["br", "tr"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  }
};
function A$(e, t) {
  let {
    slots: n
  } = t;
  const {
    prefixCls: o,
    popupStyle: i,
    visible: a,
    dropdownClassName: r,
    dropdownAlign: l,
    transitionName: s,
    getPopupContainer: u,
    range: c,
    popupPlacement: d,
    direction: f
  } = Yn(e), g = `${o}-dropdown`;
  return v(Zu, {
    showAction: [],
    hideAction: [],
    popupPlacement: d !== void 0 ? d : f === "rtl" ? "bottomRight" : "bottomLeft",
    builtinPlacements: a5,
    prefixCls: g,
    popupTransitionName: s,
    popupAlign: l,
    popupVisible: a,
    popupClassName: Te(r, {
      [`${g}-range`]: c,
      [`${g}-rtl`]: f === "rtl"
    }),
    popupStyle: i,
    getPopupContainer: u
  }, {
    default: n.default,
    popup: n.popupElement
  });
}
const D$ = ye({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(e) {
    return () => e.presets.length ? v("div", {
      class: `${e.prefixCls}-presets`
    }, [v("ul", null, [e.presets.map((t, n) => {
      let {
        label: o,
        value: i
      } = t;
      return v("li", {
        key: n,
        onClick: (a) => {
          a.stopPropagation(), e.onClick(i);
        },
        onMouseenter: () => {
          var a;
          (a = e.onHover) === null || a === void 0 || a.call(e, i);
        },
        onMouseleave: () => {
          var a;
          (a = e.onHover) === null || a === void 0 || a.call(e, null);
        }
      }, [o]);
    })])]) : null;
  }
});
function hh(e) {
  let {
    open: t,
    value: n,
    isClickOutside: o,
    triggerOpen: i,
    forwardKeydown: a,
    onKeydown: r,
    blurToCancel: l,
    onSubmit: s,
    onCancel: u,
    onFocus: c,
    onBlur: d
  } = e;
  const f = Pe(!1), g = Pe(!1), m = Pe(!1), b = Pe(!1), y = Pe(!1), S = R(() => ({
    onMousedown: () => {
      f.value = !0, i(!0);
    },
    onKeydown: (O) => {
      if (r(O, () => {
        y.value = !0;
      }), !y.value) {
        switch (O.which) {
          case Xe.ENTER: {
            t.value ? s() !== !1 && (f.value = !0) : i(!0), O.preventDefault();
            return;
          }
          case Xe.TAB: {
            f.value && t.value && !O.shiftKey ? (f.value = !1, O.preventDefault()) : !f.value && t.value && !a(O) && O.shiftKey && (f.value = !0, O.preventDefault());
            return;
          }
          case Xe.ESC: {
            f.value = !0, u();
            return;
          }
        }
        !t.value && ![Xe.SHIFT].includes(O.which) ? i(!0) : f.value || a(O);
      }
    },
    onFocus: (O) => {
      f.value = !0, g.value = !0, c && c(O);
    },
    onBlur: (O) => {
      if (m.value || !o(document.activeElement)) {
        m.value = !1;
        return;
      }
      l.value ? setTimeout(() => {
        let {
          activeElement: $
        } = document;
        for (; $ && $.shadowRoot; )
          $ = $.shadowRoot.activeElement;
        o($) && u();
      }, 0) : t.value && (i(!1), b.value && s()), g.value = !1, d && d(O);
    }
  }));
  Ie(t, () => {
    b.value = !1;
  }), Ie(n, () => {
    b.value = !0;
  });
  const C = Pe();
  return Pt(() => {
    C.value = B4((O) => {
      const $ = F4(O);
      if (t.value) {
        const P = o($);
        P ? (!g.value || P) && i(!1) : (m.value = !0, Mt(() => {
          m.value = !1;
        }));
      }
    });
  }), At(() => {
    C.value && C.value();
  }), [S, {
    focused: g,
    typing: f
  }];
}
function vh(e) {
  let {
    valueTexts: t,
    onTextChange: n
  } = e;
  const o = le("");
  function i(r) {
    o.value = r, n(r);
  }
  function a() {
    o.value = t.value[0];
  }
  return Ie(() => [...t.value], function(r) {
    let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    r.join("||") !== l.join("||") && t.value.every((s) => s !== o.value) && a();
  }, {
    immediate: !0
  }), [o, i, a];
}
function Vd(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: i
  } = t;
  const a = OC(() => {
    if (!e.value)
      return [[""], ""];
    let s = "";
    const u = [];
    for (let c = 0; c < n.value.length; c += 1) {
      const d = n.value[c], f = wo(e.value, {
        generateConfig: o.value,
        locale: i.value,
        format: d
      });
      u.push(f), c === 0 && (s = f);
    }
    return [u, s];
  }, [e, n], (s, u) => u[0] !== s[0] || !Zl(u[1], s[1])), r = R(() => a.value[0]), l = R(() => a.value[1]);
  return [r, l];
}
function mh(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: i
  } = t;
  const a = le(null);
  let r;
  function l(d) {
    let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    if (Mt.cancel(r), f) {
      a.value = d;
      return;
    }
    r = Mt(() => {
      a.value = d;
    });
  }
  const [, s] = Vd(a, {
    formatList: n,
    generateConfig: o,
    locale: i
  });
  function u(d) {
    l(d);
  }
  function c() {
    let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
    l(null, d);
  }
  return Ie(e, () => {
    c(!0);
  }), At(() => {
    Mt.cancel(r);
  }), [s, u, c];
}
function z$(e, t) {
  return R(() => e?.value ? e.value : t?.value ? (Jo(!1, "`ranges` is deprecated. Please use `presets` instead."), Object.keys(t.value).map((o) => {
    const i = t.value[o], a = typeof i == "function" ? i() : i;
    return {
      label: o,
      value: a
    };
  })) : []);
}
function R$(e) {
  const {
    picker: t,
    disabledHours: n,
    disabledMinutes: o,
    disabledSeconds: i
  } = e;
  t === "time" && (n || o || i) && yo(!1, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
}
function r5() {
  return ye({
    name: "Picker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "tabindex", "dropdownClassName", "dropdownAlign", "popupStyle", "transitionName", "generateConfig", "locale", "inputReadOnly", "allowClear", "autofocus", "showTime", "showNow", "showHour", "showMinute", "showSecond", "picker", "format", "use12Hours", "value", "defaultValue", "open", "defaultOpen", "defaultOpenValue", "suffixIcon", "presets", "clearIcon", "disabled", "disabledDate", "placeholder", "getPopupContainer", "panelRender", "inputRender", "onChange", "onOpenChange", "onPanelChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onContextmenu", "onClick", "onKeydown", "onSelect", "direction", "autocomplete", "showToday", "renderExtraFooter", "dateRender", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions"],
    setup(e, t) {
      let {
        attrs: n,
        expose: o
      } = t;
      const i = le(null), a = R(() => e.presets), r = z$(a), l = R(() => {
        var Y;
        return (Y = e.picker) !== null && Y !== void 0 ? Y : "date";
      }), s = R(() => l.value === "date" && !!e.showTime || l.value === "time");
      process.env.NODE_ENV !== "production" && R$(e);
      const u = R(() => O$(y$(e.format, l.value, e.showTime, e.use12Hours))), c = le(null), d = le(null), f = le(null), [g, m] = jo(null, {
        value: Ut(e, "value"),
        defaultValue: e.defaultValue
      }), b = le(g.value), y = (Y) => {
        b.value = Y;
      }, S = le(null), [C, O] = jo(!1, {
        value: Ut(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (Y) => e.disabled ? !1 : Y,
        onChange: (Y) => {
          e.onOpenChange && e.onOpenChange(Y), !Y && S.value && S.value.onClose && S.value.onClose();
        }
      }), [$, P] = Vd(b, {
        formatList: u,
        generateConfig: Ut(e, "generateConfig"),
        locale: Ut(e, "locale")
      }), [k, x, E] = vh({
        valueTexts: $,
        onTextChange: (Y) => {
          const K = $$(Y, {
            locale: e.locale,
            formatList: u.value,
            generateConfig: e.generateConfig
          });
          K && (!e.disabledDate || !e.disabledDate(K)) && y(K);
        }
      }), z = (Y) => {
        const {
          onChange: K,
          generateConfig: J,
          locale: be
        } = e;
        y(Y), m(Y), K && !ss(J, g.value, Y) && K(Y, Y ? wo(Y, {
          generateConfig: J,
          locale: be,
          format: u.value[0]
        }) : "");
      }, B = (Y) => {
        e.disabled && Y || O(Y);
      }, D = (Y) => C.value && S.value && S.value.onKeydown ? S.value.onKeydown(Y) : (yo(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), W = function() {
        e.onMouseup && e.onMouseup(...arguments), i.value && (i.value.focus(), B(!0));
      }, [H, {
        focused: F,
        typing: A
      }] = hh({
        blurToCancel: s,
        open: C,
        value: k,
        triggerOpen: B,
        forwardKeydown: D,
        isClickOutside: (Y) => !w$([c.value, d.value, f.value], Y),
        onSubmit: () => (
          // When user typing disabledDate with keyboard and enter, this value will be empty
          !b.value || // Normal disabled check
          e.disabledDate && e.disabledDate(b.value) ? !1 : (z(b.value), B(!1), E(), !0)
        ),
        onCancel: () => {
          B(!1), y(g.value), E();
        },
        onKeydown: (Y, K) => {
          var J;
          (J = e.onKeydown) === null || J === void 0 || J.call(e, Y, K);
        },
        onFocus: (Y) => {
          var K;
          (K = e.onFocus) === null || K === void 0 || K.call(e, Y);
        },
        onBlur: (Y) => {
          var K;
          (K = e.onBlur) === null || K === void 0 || K.call(e, Y);
        }
      });
      Ie([C, $], () => {
        C.value || (y(g.value), !$.value.length || $.value[0] === "" ? x("") : P.value !== k.value && E());
      }), Ie(l, () => {
        C.value || E();
      }), Ie(g, () => {
        y(g.value);
      });
      const [U, j, ae] = mh(k, {
        formatList: u,
        generateConfig: Ut(e, "generateConfig"),
        locale: Ut(e, "locale")
      }), G = (Y, K) => {
        (K === "submit" || K !== "key" && !s.value) && (z(Y), B(!1));
      };
      return am({
        operationRef: S,
        hideHeader: R(() => l.value === "time"),
        onSelect: G,
        open: C,
        defaultOpenValue: Ut(e, "defaultOpenValue"),
        onDateMouseenter: j,
        onDateMouseleave: ae
      }), o({
        focus: () => {
          i.value && i.value.focus();
        },
        blur: () => {
          i.value && i.value.blur();
        }
      }), () => {
        const {
          prefixCls: Y = "rc-picker",
          id: K,
          tabindex: J,
          dropdownClassName: be,
          dropdownAlign: xe,
          popupStyle: he,
          transitionName: de,
          generateConfig: ne,
          locale: we,
          inputReadOnly: re,
          allowClear: se,
          autofocus: ve,
          picker: Me = "date",
          defaultOpenValue: ke,
          suffixIcon: Fe,
          clearIcon: Re,
          disabled: We,
          placeholder: et,
          getPopupContainer: Le,
          panelRender: Ne,
          onMousedown: Ge,
          onMouseenter: it,
          onMouseleave: Ke,
          onContextmenu: Oe,
          onClick: Ve,
          onSelect: De,
          direction: Je,
          autocomplete: wt = "off"
        } = e, lt = I(I(I({}, e), n), {
          class: Te({
            [`${Y}-panel-focused`]: !A.value
          }),
          style: void 0,
          pickerValue: void 0,
          onPickerValueChange: void 0,
          onChange: null
        });
        let qe = v("div", {
          class: `${Y}-panel-layout`
        }, [v(D$, {
          prefixCls: Y,
          presets: r.value,
          onClick: (Dt) => {
            z(Dt), B(!1);
          }
        }, null), v(_$, Z(Z({}, lt), {}, {
          generateConfig: ne,
          value: b.value,
          locale: we,
          tabindex: -1,
          onSelect: (Dt) => {
            De?.(Dt), y(Dt);
          },
          direction: Je,
          onPanelChange: (Dt, zn) => {
            const {
              onPanelChange: on
            } = e;
            ae(!0), on?.(Dt, zn);
          }
        }), null)]);
        Ne && (qe = Ne(qe));
        const at = v("div", {
          class: `${Y}-panel-container`,
          ref: c,
          onMousedown: (Dt) => {
            Dt.preventDefault();
          }
        }, [qe]);
        let dt;
        Fe && (dt = v("span", {
          class: `${Y}-suffix`
        }, [Fe]));
        let vt;
        se && g.value && !We && (vt = v("span", {
          onMousedown: (Dt) => {
            Dt.preventDefault(), Dt.stopPropagation();
          },
          onMouseup: (Dt) => {
            Dt.preventDefault(), Dt.stopPropagation(), z(null), B(!1);
          },
          class: `${Y}-clear`,
          role: "button"
        }, [Re || v("span", {
          class: `${Y}-clear-btn`
        }, null)]));
        const Rt = I(I(I(I({
          id: K,
          tabindex: J,
          disabled: We,
          readonly: re || typeof u.value[0] == "function" || !A.value,
          value: U.value || k.value,
          onInput: (Dt) => {
            x(Dt.target.value);
          },
          autofocus: ve,
          placeholder: et,
          ref: i,
          title: k.value
        }, H.value), {
          size: x$(Me, u.value[0], ne)
        }), I$(e)), {
          autocomplete: wt
        }), Xt = e.inputRender ? e.inputRender(Rt) : v("input", Rt, null);
        process.env.NODE_ENV !== "production" && yo(!ke, "`defaultOpenValue` may confuse user for the current value status. Please use `defaultValue` instead.");
        const vn = Je === "rtl" ? "bottomRight" : "bottomLeft";
        return v("div", {
          ref: f,
          class: Te(Y, n.class, {
            [`${Y}-disabled`]: We,
            [`${Y}-focused`]: F.value,
            [`${Y}-rtl`]: Je === "rtl"
          }),
          style: n.style,
          onMousedown: Ge,
          onMouseup: W,
          onMouseenter: it,
          onMouseleave: Ke,
          onContextmenu: Oe,
          onClick: Ve
        }, [v("div", {
          class: Te(`${Y}-input`, {
            [`${Y}-input-placeholder`]: !!U.value
          }),
          ref: d
        }, [Xt, dt, vt]), v(A$, {
          visible: C.value,
          popupStyle: he,
          prefixCls: Y,
          dropdownClassName: be,
          dropdownAlign: xe,
          getPopupContainer: Le,
          transitionName: de,
          popupPlacement: vn,
          direction: Je
        }, {
          default: () => [v("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => at
        })]);
      };
    }
  });
}
const l5 = r5();
function s5(e, t) {
  let {
    picker: n,
    locale: o,
    selectedValue: i,
    disabledDate: a,
    disabled: r,
    generateConfig: l
  } = e;
  const s = R(() => Lt(i.value, 0)), u = R(() => Lt(i.value, 1));
  function c(b) {
    return l.value.locale.getWeekFirstDate(o.value.locale, b);
  }
  function d(b) {
    const y = l.value.getYear(b), S = l.value.getMonth(b);
    return y * 100 + S;
  }
  function f(b) {
    const y = l.value.getYear(b), S = fh(l.value, b);
    return y * 10 + S;
  }
  return [(b) => {
    var y;
    if (a && (!((y = a?.value) === null || y === void 0) && y.call(a, b)))
      return !0;
    if (r[1] && u)
      return !Ba(l.value, b, u.value) && l.value.isAfter(b, u.value);
    if (t.value[1] && u.value)
      switch (n.value) {
        case "quarter":
          return f(b) > f(u.value);
        case "month":
          return d(b) > d(u.value);
        case "week":
          return c(b) > c(u.value);
        default:
          return !Ba(l.value, b, u.value) && l.value.isAfter(b, u.value);
      }
    return !1;
  }, (b) => {
    var y;
    if (!((y = a.value) === null || y === void 0) && y.call(a, b))
      return !0;
    if (r[0] && s)
      return !Ba(l.value, b, u.value) && l.value.isAfter(s.value, b);
    if (t.value[0] && s.value)
      switch (n.value) {
        case "quarter":
          return f(b) < f(s.value);
        case "month":
          return d(b) < d(s.value);
        case "week":
          return c(b) < c(s.value);
        default:
          return !Ba(l.value, b, s.value) && l.value.isAfter(s.value, b);
      }
    return !1;
  }];
}
function u5(e, t, n, o) {
  const i = Ou(e, n, o, 1);
  function a(r) {
    return r(e, t) ? "same" : r(i, t) ? "closing" : "far";
  }
  switch (n) {
    case "year":
      return a((r, l) => q4(o, r, l));
    case "quarter":
    case "month":
      return a((r, l) => If(o, r, l));
    default:
      return a((r, l) => um(o, r, l));
  }
}
function c5(e, t, n, o) {
  const i = Lt(e, 0), a = Lt(e, 1);
  if (t === 0)
    return i;
  if (i && a)
    switch (u5(i, a, n, o)) {
      case "same":
        return i;
      case "closing":
        return i;
      default:
        return Ou(a, n, o, -1);
    }
  return i;
}
function d5(e) {
  let {
    values: t,
    picker: n,
    defaultDates: o,
    generateConfig: i
  } = e;
  const a = le([Lt(o, 0), Lt(o, 1)]), r = le(null), l = R(() => Lt(t.value, 0)), s = R(() => Lt(t.value, 1)), u = (g) => a.value[g] ? a.value[g] : Lt(r.value, g) || c5(t.value, g, n.value, i.value) || l.value || s.value || i.value.getNow(), c = le(null), d = le(null);
  Ft(() => {
    c.value = u(0), d.value = u(1);
  });
  function f(g, m) {
    if (g) {
      let b = Ci(r.value, g, m);
      a.value = Ci(a.value, null, m) || [null, null];
      const y = (m + 1) % 2;
      Lt(t.value, y) || (b = Ci(b, g, y)), r.value = b;
    } else (l.value || s.value) && (r.value = null);
  }
  return [c, d, f];
}
function f5(e) {
  return Z1() ? (J1(e), !0) : !1;
}
function p5(e) {
  return typeof e == "function" ? e() : M(e);
}
function N$(e) {
  var t;
  const n = p5(e);
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
}
function g5(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  ui() ? Pt(e) : t ? e() : Nt(e);
}
function h5(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = Pe(), o = () => n.value = !!e();
  return o(), g5(o, t), n;
}
var Ap;
const B$ = typeof window < "u";
B$ && (!((Ap = window?.navigator) === null || Ap === void 0) && Ap.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
const v5 = B$ ? window : void 0;
var m5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function b5(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    window: o = v5
  } = n, i = m5(n, ["window"]);
  let a;
  const r = h5(() => o && "ResizeObserver" in o), l = () => {
    a && (a.disconnect(), a = void 0);
  }, s = Ie(() => N$(e), (c) => {
    l(), r.value && o && c && (a = new ResizeObserver(t), a.observe(c, i));
  }, {
    immediate: !0,
    flush: "post"
  }), u = () => {
    l(), s();
  };
  return f5(u), {
    isSupported: r,
    stop: u
  };
}
function su(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    width: 0,
    height: 0
  }, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    box: o = "content-box"
  } = n, i = Pe(t.width), a = Pe(t.height);
  return b5(e, (r) => {
    let [l] = r;
    const s = o === "border-box" ? l.borderBoxSize : o === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
    s ? (i.value = s.reduce((u, c) => {
      let {
        inlineSize: d
      } = c;
      return u + d;
    }, 0), a.value = s.reduce((u, c) => {
      let {
        blockSize: d
      } = c;
      return u + d;
    }, 0)) : (i.value = l.contentRect.width, a.value = l.contentRect.height);
  }, n), Ie(() => N$(e), (r) => {
    i.value = r ? t.width : 0, a.value = r ? t.height : 0;
  }), {
    width: i,
    height: a
  };
}
function Ky(e, t) {
  return e && e[0] && e[1] && t.isAfter(e[0], e[1]) ? [e[1], e[0]] : e;
}
function Yy(e, t, n, o) {
  return !!(e || o && o[t] || n[(t + 1) % 2]);
}
function y5() {
  return ye({
    name: "RangerPicker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "popupStyle", "dropdownClassName", "transitionName", "dropdownAlign", "getPopupContainer", "generateConfig", "locale", "placeholder", "autofocus", "disabled", "format", "picker", "showTime", "showNow", "showHour", "showMinute", "showSecond", "use12Hours", "separator", "value", "defaultValue", "defaultPickerValue", "open", "defaultOpen", "disabledDate", "disabledTime", "dateRender", "panelRender", "ranges", "allowEmpty", "allowClear", "suffixIcon", "clearIcon", "pickerRef", "inputReadOnly", "mode", "renderExtraFooter", "onChange", "onOpenChange", "onPanelChange", "onCalendarChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onClick", "onOk", "onKeydown", "components", "order", "direction", "activePickerIndex", "autocomplete", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions", "disabledMinutes", "presets", "prevIcon", "nextIcon", "superPrevIcon", "superNextIcon"],
    setup(e, t) {
      let {
        attrs: n,
        expose: o
      } = t;
      const i = R(() => e.picker === "date" && !!e.showTime || e.picker === "time"), a = R(() => e.presets), r = R(() => e.ranges), l = z$(a, r), s = le({}), u = le(null), c = le(null), d = le(null), f = le(null), g = le(null), m = le(null), b = le(null), y = le(null);
      process.env.NODE_ENV !== "production" && R$(e);
      const S = R(() => O$(y$(e.format, e.picker, e.showTime, e.use12Hours))), [C, O] = jo(0, {
        value: Ut(e, "activePickerIndex")
      }), $ = le(null), P = R(() => {
        const {
          disabled: ze
        } = e;
        return Array.isArray(ze) ? ze : [ze || !1, ze || !1];
      }), [k, x] = jo(null, {
        value: Ut(e, "value"),
        defaultValue: e.defaultValue,
        postState: (ze) => e.picker === "time" && !e.order ? ze : Ky(ze, e.generateConfig)
      }), [E, z, B] = d5({
        values: k,
        picker: Ut(e, "picker"),
        defaultDates: e.defaultPickerValue,
        generateConfig: Ut(e, "generateConfig")
      }), [D, W] = jo(k.value, {
        postState: (ze) => {
          let nt = ze;
          if (P.value[0] && P.value[1])
            return nt;
          for (let tt = 0; tt < 2; tt += 1)
            P.value[tt] && !Lt(nt, tt) && !Lt(e.allowEmpty, tt) && (nt = Ci(nt, e.generateConfig.getNow(), tt));
          return nt;
        }
      }), [H, F] = jo([e.picker, e.picker], {
        value: Ut(e, "mode")
      });
      Ie(() => e.picker, () => {
        F([e.picker, e.picker]);
      });
      const A = (ze, nt) => {
        var tt;
        F(ze), (tt = e.onPanelChange) === null || tt === void 0 || tt.call(e, nt, ze);
      }, [U, j] = s5({
        picker: Ut(e, "picker"),
        selectedValue: D,
        locale: Ut(e, "locale"),
        disabled: P,
        disabledDate: Ut(e, "disabledDate"),
        generateConfig: Ut(e, "generateConfig")
      }, s), [ae, G] = jo(!1, {
        value: Ut(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (ze) => P.value[C.value] ? !1 : ze,
        onChange: (ze) => {
          var nt;
          (nt = e.onOpenChange) === null || nt === void 0 || nt.call(e, ze), !ze && $.value && $.value.onClose && $.value.onClose();
        }
      }), Y = R(() => ae.value && C.value === 0), K = R(() => ae.value && C.value === 1), J = le(0), be = le(0), xe = le(0), {
        width: he
      } = su(u);
      Ie([ae, he], () => {
        !ae.value && u.value && (xe.value = he.value);
      });
      const {
        width: de
      } = su(c), {
        width: ne
      } = su(y), {
        width: we
      } = su(d), {
        width: re
      } = su(g);
      Ie([C, ae, de, ne, we, re, () => e.direction], () => {
        be.value = 0, C.value ? d.value && g.value && (be.value = we.value + re.value, de.value && ne.value && be.value > de.value - ne.value - (e.direction === "rtl" || y.value.offsetLeft > be.value ? 0 : y.value.offsetLeft) && (J.value = be.value)) : C.value === 0 && (J.value = 0);
      }, {
        immediate: !0
      });
      const se = le();
      function ve(ze, nt) {
        if (ze)
          clearTimeout(se.value), s.value[nt] = !0, O(nt), G(ze), ae.value || B(null, nt);
        else if (C.value === nt) {
          G(ze);
          const tt = s.value;
          se.value = setTimeout(() => {
            tt === s.value && (s.value = {});
          });
        }
      }
      function Me(ze) {
        ve(!0, ze), setTimeout(() => {
          const nt = [m, b][ze];
          nt.value && nt.value.focus();
        }, 0);
      }
      function ke(ze, nt) {
        let tt = ze, zt = Lt(tt, 0), Vn = Lt(tt, 1);
        const {
          generateConfig: Rn,
          locale: go,
          picker: Jt,
          order: ht,
          onCalendarChange: Zn,
          allowEmpty: $o,
          onChange: rn,
          showTime: ln
        } = e;
        zt && Vn && Rn.isAfter(zt, Vn) && (// WeekPicker only compare week
        Jt === "week" && !C$(Rn, go.locale, zt, Vn) || // QuotaPicker only compare week
        Jt === "quarter" && !S$(Rn, zt, Vn) || // Other non-TimePicker compare date
        Jt !== "week" && Jt !== "quarter" && Jt !== "time" && !(ln ? ss(Rn, zt, Vn) : Ba(Rn, zt, Vn)) ? (nt === 0 ? (tt = [zt, null], Vn = null) : (zt = null, tt = [null, Vn]), s.value = {
          [nt]: !0
        }) : (Jt !== "time" || ht !== !1) && (tt = Ky(tt, Rn))), W(tt);
        const Ht = tt && tt[0] ? wo(tt[0], {
          generateConfig: Rn,
          locale: go,
          format: S.value[0]
        }) : "", sn = tt && tt[1] ? wo(tt[1], {
          generateConfig: Rn,
          locale: go,
          format: S.value[0]
        }) : "";
        Zn && Zn(tt, [Ht, sn], {
          range: nt === 0 ? "start" : "end"
        });
        const Io = Yy(zt, 0, P.value, $o), kn = Yy(Vn, 1, P.value, $o);
        (tt === null || Io && kn) && (x(tt), rn && (!ss(Rn, Lt(k.value, 0), zt) || !ss(Rn, Lt(k.value, 1), Vn)) && rn(tt, [Ht, sn]));
        let ho = null;
        nt === 0 && !P.value[1] ? ho = 1 : nt === 1 && !P.value[0] && (ho = 0), ho !== null && ho !== C.value && (!s.value[ho] || !Lt(tt, ho)) && Lt(tt, nt) ? Me(ho) : ve(!1, nt);
      }
      const Fe = (ze) => ae && $.value && $.value.onKeydown ? $.value.onKeydown(ze) : (yo(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), Re = {
        formatList: S,
        generateConfig: Ut(e, "generateConfig"),
        locale: Ut(e, "locale")
      }, [We, et] = Vd(R(() => Lt(D.value, 0)), Re), [Le, Ne] = Vd(R(() => Lt(D.value, 1)), Re), Ge = (ze, nt) => {
        const tt = $$(ze, {
          locale: e.locale,
          formatList: S.value,
          generateConfig: e.generateConfig
        });
        tt && !(nt === 0 ? U : j)(tt) && (W(Ci(D.value, tt, nt)), B(tt, nt));
      }, [it, Ke, Oe] = vh({
        valueTexts: We,
        onTextChange: (ze) => Ge(ze, 0)
      }), [Ve, De, Je] = vh({
        valueTexts: Le,
        onTextChange: (ze) => Ge(ze, 1)
      }), [wt, lt] = On(null), [qe, at] = On(null), [dt, vt, Rt] = mh(it, Re), [Xt, vn, Dt] = mh(Ve, Re), zn = (ze) => {
        at(Ci(D.value, ze, C.value)), C.value === 0 ? vt(ze) : vn(ze);
      }, on = () => {
        at(Ci(D.value, null, C.value)), C.value === 0 ? Rt() : Dt();
      }, Qt = (ze, nt) => ({
        forwardKeydown: Fe,
        onBlur: (tt) => {
          var zt;
          (zt = e.onBlur) === null || zt === void 0 || zt.call(e, tt);
        },
        isClickOutside: (tt) => !w$([c.value, d.value, f.value, u.value], tt),
        onFocus: (tt) => {
          var zt;
          O(ze), (zt = e.onFocus) === null || zt === void 0 || zt.call(e, tt);
        },
        triggerOpen: (tt) => {
          ve(tt, ze);
        },
        onSubmit: () => {
          if (
            // When user typing disabledDate with keyboard and enter, this value will be empty
            !D.value || // Normal disabled check
            e.disabledDate && e.disabledDate(D.value[ze])
          )
            return !1;
          ke(D.value, ze), nt();
        },
        onCancel: () => {
          ve(!1, ze), W(k.value), nt();
        }
      }), [mn, {
        focused: Kt,
        typing: Mn
      }] = hh(I(I({}, Qt(0, Oe)), {
        blurToCancel: i,
        open: Y,
        value: it,
        onKeydown: (ze, nt) => {
          var tt;
          (tt = e.onKeydown) === null || tt === void 0 || tt.call(e, ze, nt);
        }
      })), [an, {
        focused: gn,
        typing: Hn
      }] = hh(I(I({}, Qt(1, Je)), {
        blurToCancel: i,
        open: K,
        value: Ve,
        onKeydown: (ze, nt) => {
          var tt;
          (tt = e.onKeydown) === null || tt === void 0 || tt.call(e, ze, nt);
        }
      })), Co = (ze) => {
        var nt;
        (nt = e.onClick) === null || nt === void 0 || nt.call(e, ze), !ae.value && !m.value.contains(ze.target) && !b.value.contains(ze.target) && (P.value[0] ? P.value[1] || Me(1) : Me(0));
      }, ut = (ze) => {
        var nt;
        (nt = e.onMousedown) === null || nt === void 0 || nt.call(e, ze), ae.value && (Kt.value || gn.value) && !m.value.contains(ze.target) && !b.value.contains(ze.target) && ze.preventDefault();
      }, qn = R(() => {
        var ze;
        return !((ze = k.value) === null || ze === void 0) && ze[0] ? wo(k.value[0], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      }), bn = R(() => {
        var ze;
        return !((ze = k.value) === null || ze === void 0) && ze[1] ? wo(k.value[1], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      });
      Ie([ae, We, Le], () => {
        ae.value || (W(k.value), !We.value.length || We.value[0] === "" ? Ke("") : et.value !== it.value && Oe(), !Le.value.length || Le.value[0] === "" ? De("") : Ne.value !== Ve.value && Je());
      }), Ie([qn, bn], () => {
        W(k.value);
      }), process.env.NODE_ENV !== "production" && Ft(() => {
        const {
          value: ze,
          disabled: nt
        } = e;
        ze && Array.isArray(nt) && (Lt(nt, 0) && !Lt(ze, 0) || Lt(nt, 1) && !Lt(ze, 1)) && yo(!1, "`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.");
      }), o({
        focus: () => {
          m.value && m.value.focus();
        },
        blur: () => {
          m.value && m.value.blur(), b.value && b.value.blur();
        }
      });
      const Gn = R(() => ae.value && qe.value && qe.value[0] && qe.value[1] && e.generateConfig.isAfter(qe.value[1], qe.value[0]) ? qe.value : null);
      function Fo() {
        let ze = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, nt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        const {
          generateConfig: tt,
          showTime: zt,
          dateRender: Vn,
          direction: Rn,
          disabledTime: go,
          prefixCls: Jt,
          locale: ht
        } = e;
        let Zn = zt;
        if (zt && typeof zt == "object" && zt.defaultValue) {
          const rn = zt.defaultValue;
          Zn = I(I({}, zt), {
            defaultValue: Lt(rn, C.value) || void 0
          });
        }
        let $o = null;
        return Vn && ($o = (rn) => {
          let {
            current: ln,
            today: Ht
          } = rn;
          return Vn({
            current: ln,
            today: Ht,
            info: {
              range: C.value ? "end" : "start"
            }
          });
        }), v(Z4, {
          value: {
            inRange: !0,
            panelPosition: ze,
            rangedValue: wt.value || D.value,
            hoverRangedValue: Gn.value
          }
        }, {
          default: () => [v(_$, Z(Z(Z({}, e), nt), {}, {
            dateRender: $o,
            showTime: Zn,
            mode: H.value[C.value],
            generateConfig: tt,
            style: void 0,
            direction: Rn,
            disabledDate: C.value === 0 ? U : j,
            disabledTime: (rn) => go ? go(rn, C.value === 0 ? "start" : "end") : !1,
            class: Te({
              [`${Jt}-panel-focused`]: C.value === 0 ? !Mn.value : !Hn.value
            }),
            value: Lt(D.value, C.value),
            locale: ht,
            tabIndex: -1,
            onPanelChange: (rn, ln) => {
              C.value === 0 && Rt(!0), C.value === 1 && Dt(!0), A(Ci(H.value, ln, C.value), Ci(D.value, rn, C.value));
              let Ht = rn;
              ze === "right" && H.value[C.value] === ln && (Ht = Ou(Ht, ln, tt, -1)), B(Ht, C.value);
            },
            onOk: null,
            onSelect: void 0,
            onChange: void 0,
            defaultValue: C.value === 0 ? Lt(D.value, 1) : Lt(D.value, 0)
          }), null)]
        });
      }
      const pi = (ze, nt) => {
        const tt = Ci(D.value, ze, C.value);
        nt === "submit" || nt !== "key" && !i.value ? (ke(tt, C.value), C.value === 0 ? Rt() : Dt()) : W(tt);
      };
      return am({
        operationRef: $,
        hideHeader: R(() => e.picker === "time"),
        onDateMouseenter: zn,
        onDateMouseleave: on,
        hideRanges: R(() => !0),
        onSelect: pi,
        open: ae
      }), () => {
        const {
          prefixCls: ze = "rc-picker",
          id: nt,
          popupStyle: tt,
          dropdownClassName: zt,
          transitionName: Vn,
          dropdownAlign: Rn,
          getPopupContainer: go,
          generateConfig: Jt,
          locale: ht,
          placeholder: Zn,
          autofocus: $o,
          picker: rn = "date",
          showTime: ln,
          separator: Ht = "~",
          disabledDate: sn,
          panelRender: Io,
          allowClear: kn,
          suffixIcon: Lo,
          clearIcon: ho,
          inputReadOnly: Ca,
          renderExtraFooter: $a,
          onMouseenter: Ei,
          onMouseleave: ea,
          onMouseup: Ya,
          onOk: ta,
          components: Ua,
          direction: _i,
          autocomplete: na = "off"
        } = e, zr = _i === "rtl" ? {
          right: `${be.value}px`
        } : {
          left: `${be.value}px`
        };
        function Mo() {
          let Nn;
          const To = k$(ze, H.value[C.value], $a), Pa = E$({
            prefixCls: ze,
            components: Ua,
            needConfirmButton: i.value,
            okDisabled: !Lt(D.value, C.value) || sn && sn(D.value[C.value]),
            locale: ht,
            onOk: () => {
              Lt(D.value, C.value) && (ke(D.value, C.value), ta && ta(D.value));
            }
          });
          if (rn !== "time" && !ln) {
            const co = C.value === 0 ? E.value : z.value, Ja = Ou(co, rn, Jt), tr = H.value[C.value] === rn, oa = Fo(tr ? "left" : !1, {
              pickerValue: co,
              onPickerValueChange: (Fr) => {
                B(Fr, C.value);
              }
            }), kl = Fo("right", {
              pickerValue: Ja,
              onPickerValueChange: (Fr) => {
                B(Ou(Fr, rn, Jt, -1), C.value);
              }
            });
            _i === "rtl" ? Nn = v(He, null, [kl, tr && oa]) : Nn = v(He, null, [oa, tr && kl]);
          } else
            Nn = Fo();
          let ko = v("div", {
            class: `${ze}-panel-layout`
          }, [v(D$, {
            prefixCls: ze,
            presets: l.value,
            onClick: (co) => {
              ke(co, null), ve(!1, C.value);
            },
            onHover: (co) => {
              lt(co);
            }
          }, null), v("div", null, [v("div", {
            class: `${ze}-panels`
          }, [Nn]), (To || Pa) && v("div", {
            class: `${ze}-footer`
          }, [To, Pa])])]);
          return Io && (ko = Io(ko)), v("div", {
            class: `${ze}-panel-container`,
            style: {
              marginLeft: `${J.value}px`
            },
            ref: c,
            onMousedown: (co) => {
              co.preventDefault();
            }
          }, [ko]);
        }
        const Tl = v("div", {
          class: Te(`${ze}-range-wrapper`, `${ze}-${rn}-range-wrapper`),
          style: {
            minWidth: `${xe.value}px`
          }
        }, [v("div", {
          ref: y,
          class: `${ze}-range-arrow`,
          style: zr
        }, null), Mo()]);
        let Rr;
        Lo && (Rr = v("span", {
          class: `${ze}-suffix`
        }, [Lo]));
        let Xa;
        kn && (Lt(k.value, 0) && !P.value[0] || Lt(k.value, 1) && !P.value[1]) && (Xa = v("span", {
          onMousedown: (Nn) => {
            Nn.preventDefault(), Nn.stopPropagation();
          },
          onMouseup: (Nn) => {
            Nn.preventDefault(), Nn.stopPropagation();
            let To = k.value;
            P.value[0] || (To = Ci(To, null, 0)), P.value[1] || (To = Ci(To, null, 1)), ke(To, null), ve(!1, C.value);
          },
          class: `${ze}-clear`
        }, [ho || v("span", {
          class: `${ze}-clear-btn`
        }, null)]));
        const Nr = {
          size: x$(rn, S.value[0], Jt)
        };
        let Br = 0, Qa = 0;
        d.value && f.value && g.value && (C.value === 0 ? Qa = d.value.offsetWidth : (Br = be.value, Qa = f.value.offsetWidth));
        const Za = _i === "rtl" ? {
          right: `${Br}px`
        } : {
          left: `${Br}px`
        };
        return v("div", Z({
          ref: u,
          class: Te(ze, `${ze}-range`, n.class, {
            [`${ze}-disabled`]: P.value[0] && P.value[1],
            [`${ze}-focused`]: C.value === 0 ? Kt.value : gn.value,
            [`${ze}-rtl`]: _i === "rtl"
          }),
          style: n.style,
          onClick: Co,
          onMouseenter: Ei,
          onMouseleave: ea,
          onMousedown: ut,
          onMouseup: Ya
        }, I$(e)), [v("div", {
          class: Te(`${ze}-input`, {
            [`${ze}-input-active`]: C.value === 0,
            [`${ze}-input-placeholder`]: !!dt.value
          }),
          ref: d
        }, [v("input", Z(Z(Z({
          id: nt,
          disabled: P.value[0],
          readonly: Ca || typeof S.value[0] == "function" || !Mn.value,
          value: dt.value || it.value,
          onInput: (Nn) => {
            Ke(Nn.target.value);
          },
          autofocus: $o,
          placeholder: Lt(Zn, 0) || "",
          ref: m
        }, mn.value), Nr), {}, {
          autocomplete: na
        }), null)]), v("div", {
          class: `${ze}-range-separator`,
          ref: g
        }, [Ht]), v("div", {
          class: Te(`${ze}-input`, {
            [`${ze}-input-active`]: C.value === 1,
            [`${ze}-input-placeholder`]: !!Xt.value
          }),
          ref: f
        }, [v("input", Z(Z(Z({
          disabled: P.value[1],
          readonly: Ca || typeof S.value[0] == "function" || !Hn.value,
          value: Xt.value || Ve.value,
          onInput: (Nn) => {
            De(Nn.target.value);
          },
          placeholder: Lt(Zn, 1) || "",
          ref: b
        }, an.value), Nr), {}, {
          autocomplete: na
        }), null)]), v("div", {
          class: `${ze}-active-bar`,
          style: I(I({}, Za), {
            width: `${Qa}px`,
            position: "absolute"
          })
        }, null), Rr, Xa, v(A$, {
          visible: ae.value,
          popupStyle: tt,
          prefixCls: ze,
          dropdownClassName: zt,
          dropdownAlign: Rn,
          getPopupContainer: go,
          transitionName: Vn,
          range: !0,
          direction: _i
        }, {
          default: () => [v("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => Tl
        })]);
      };
    }
  });
}
const x5 = y5();
var w5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const S5 = {
  prefixCls: String,
  name: String,
  id: String,
  type: String,
  defaultChecked: {
    type: [Boolean, Number],
    default: void 0
  },
  checked: {
    type: [Boolean, Number],
    default: void 0
  },
  disabled: Boolean,
  tabindex: {
    type: [Number, String]
  },
  readonly: Boolean,
  autofocus: Boolean,
  value: ue.any,
  required: Boolean
}, F$ = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Checkbox",
  inheritAttrs: !1,
  props: wn(S5, {
    prefixCls: "rc-checkbox",
    type: "checkbox",
    defaultChecked: !1
  }),
  emits: ["click", "change"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t;
    const a = le(e.checked === void 0 ? e.defaultChecked : e.checked), r = le();
    Ie(() => e.checked, () => {
      a.value = e.checked;
    }), i({
      focus() {
        var c;
        (c = r.value) === null || c === void 0 || c.focus();
      },
      blur() {
        var c;
        (c = r.value) === null || c === void 0 || c.blur();
      }
    });
    const l = le(), s = (c) => {
      if (e.disabled)
        return;
      e.checked === void 0 && (a.value = c.target.checked), c.shiftKey = l.value;
      const d = {
        target: I(I({}, e), {
          checked: c.target.checked
        }),
        stopPropagation() {
          c.stopPropagation();
        },
        preventDefault() {
          c.preventDefault();
        },
        nativeEvent: c
      };
      e.checked !== void 0 && (r.value.checked = !!e.checked), o("change", d), l.value = !1;
    }, u = (c) => {
      o("click", c), l.value = c.shiftKey;
    };
    return () => {
      const {
        prefixCls: c,
        name: d,
        id: f,
        type: g,
        disabled: m,
        readonly: b,
        tabindex: y,
        autofocus: S,
        value: C,
        required: O
      } = e, $ = w5(e, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
        class: P,
        onFocus: k,
        onBlur: x,
        onKeydown: E,
        onKeypress: z,
        onKeyup: B
      } = n, D = I(I({}, $), n), W = Object.keys(D).reduce((A, U) => ((U.startsWith("data-") || U.startsWith("aria-") || U === "role") && (A[U] = D[U]), A), {}), H = Te(c, P, {
        [`${c}-checked`]: a.value,
        [`${c}-disabled`]: m
      }), F = I(I({
        name: d,
        id: f,
        type: g,
        readonly: b,
        disabled: m,
        tabindex: y,
        class: `${c}-input`,
        checked: !!a.value,
        autofocus: S,
        value: C
      }, W), {
        onChange: s,
        onClick: u,
        onFocus: k,
        onBlur: x,
        onKeydown: E,
        onKeypress: z,
        onKeyup: B,
        required: O
      });
      return v("span", {
        class: H
      }, [v("input", Z({
        ref: r
      }, F), null), v("span", {
        class: `${c}-inner`
      }, null)]);
    };
  }
}), L$ = Symbol("radioGroupContextKey"), C5 = (e) => {
  kt(L$, e);
}, $5 = () => Tt(L$, void 0), H$ = Symbol("radioOptionTypeContextKey"), P5 = (e) => {
  kt(H$, e);
}, O5 = () => Tt(H$, void 0), I5 = new Bt("antRadioEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), M5 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-group`;
  return {
    [o]: I(I({}, Zt(e)), {
      display: "inline-block",
      fontSize: 0,
      // RTL
      [`&${o}-rtl`]: {
        direction: "rtl"
      },
      [`${n}-badge ${n}-badge-count`]: {
        zIndex: 1
      },
      [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
        borderInlineStart: "none"
      }
    })
  };
}, T5 = (e) => {
  const {
    componentCls: t,
    radioWrapperMarginRight: n,
    radioCheckedColor: o,
    radioSize: i,
    motionDurationSlow: a,
    motionDurationMid: r,
    motionEaseInOut: l,
    motionEaseInOutCirc: s,
    radioButtonBg: u,
    colorBorder: c,
    lineWidth: d,
    radioDotSize: f,
    colorBgContainerDisabled: g,
    colorTextDisabled: m,
    paddingXS: b,
    radioDotDisabledColor: y,
    lineType: S,
    radioDotDisabledSize: C,
    wireframe: O,
    colorWhite: $
  } = e, P = `${t}-inner`;
  return {
    [`${t}-wrapper`]: I(I({}, Zt(e)), {
      position: "relative",
      display: "inline-flex",
      alignItems: "baseline",
      marginInlineStart: 0,
      marginInlineEnd: n,
      cursor: "pointer",
      // RTL
      [`&${t}-wrapper-rtl`]: {
        direction: "rtl"
      },
      "&-disabled": {
        cursor: "not-allowed",
        color: e.colorTextDisabled
      },
      "&::after": {
        display: "inline-block",
        width: 0,
        overflow: "hidden",
        content: '"\\a0"'
      },
      // hashId 在 wrapper 上，只能铺平
      [`${t}-checked::after`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        width: "100%",
        height: "100%",
        border: `${d}px ${S} ${o}`,
        borderRadius: "50%",
        visibility: "hidden",
        animationName: I5,
        animationDuration: a,
        animationTimingFunction: l,
        animationFillMode: "both",
        content: '""'
      },
      [t]: I(I({}, Zt(e)), {
        position: "relative",
        display: "inline-block",
        outline: "none",
        cursor: "pointer",
        alignSelf: "center"
      }),
      [`${t}-wrapper:hover &,
        &:hover ${P}`]: {
        borderColor: o
      },
      [`${t}-input:focus-visible + ${P}`]: I({}, Xu(e)),
      [`${t}:hover::after, ${t}-wrapper:hover &::after`]: {
        visibility: "visible"
      },
      [`${t}-inner`]: {
        "&::after": {
          boxSizing: "border-box",
          position: "absolute",
          insetBlockStart: "50%",
          insetInlineStart: "50%",
          display: "block",
          width: i,
          height: i,
          marginBlockStart: i / -2,
          marginInlineStart: i / -2,
          backgroundColor: O ? o : $,
          borderBlockStart: 0,
          borderInlineStart: 0,
          borderRadius: i,
          transform: "scale(0)",
          opacity: 0,
          transition: `all ${a} ${s}`,
          content: '""'
        },
        boxSizing: "border-box",
        position: "relative",
        insetBlockStart: 0,
        insetInlineStart: 0,
        display: "block",
        width: i,
        height: i,
        backgroundColor: u,
        borderColor: c,
        borderStyle: "solid",
        borderWidth: d,
        borderRadius: "50%",
        transition: `all ${r}`
      },
      [`${t}-input`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        insetBlockEnd: 0,
        insetInlineStart: 0,
        zIndex: 1,
        cursor: "pointer",
        opacity: 0
      },
      // 选中状态
      [`${t}-checked`]: {
        [P]: {
          borderColor: o,
          backgroundColor: O ? u : o,
          "&::after": {
            transform: `scale(${f / i})`,
            opacity: 1,
            transition: `all ${a} ${s}`
          }
        }
      },
      [`${t}-disabled`]: {
        cursor: "not-allowed",
        [P]: {
          backgroundColor: g,
          borderColor: c,
          cursor: "not-allowed",
          "&::after": {
            backgroundColor: y
          }
        },
        [`${t}-input`]: {
          cursor: "not-allowed"
        },
        [`${t}-disabled + span`]: {
          color: m,
          cursor: "not-allowed"
        },
        [`&${t}-checked`]: {
          [P]: {
            "&::after": {
              transform: `scale(${C / i})`
            }
          }
        }
      },
      [`span${t} + *`]: {
        paddingInlineStart: b,
        paddingInlineEnd: b
      }
    })
  };
}, k5 = (e) => {
  const {
    radioButtonColor: t,
    controlHeight: n,
    componentCls: o,
    lineWidth: i,
    lineType: a,
    colorBorder: r,
    motionDurationSlow: l,
    motionDurationMid: s,
    radioButtonPaddingHorizontal: u,
    fontSize: c,
    radioButtonBg: d,
    fontSizeLG: f,
    controlHeightLG: g,
    controlHeightSM: m,
    paddingXS: b,
    borderRadius: y,
    borderRadiusSM: S,
    borderRadiusLG: C,
    radioCheckedColor: O,
    radioButtonCheckedBg: $,
    radioButtonHoverColor: P,
    radioButtonActiveColor: k,
    radioSolidCheckedColor: x,
    colorTextDisabled: E,
    colorBgContainerDisabled: z,
    radioDisabledButtonCheckedColor: B,
    radioDisabledButtonCheckedBg: D
  } = e;
  return {
    [`${o}-button-wrapper`]: {
      position: "relative",
      display: "inline-block",
      height: n,
      margin: 0,
      paddingInline: u,
      paddingBlock: 0,
      color: t,
      fontSize: c,
      lineHeight: `${n - i * 2}px`,
      background: d,
      border: `${i}px ${a} ${r}`,
      // strange align fix for chrome but works
      // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
      borderBlockStartWidth: i + 0.02,
      borderInlineStartWidth: 0,
      borderInlineEndWidth: i,
      cursor: "pointer",
      transition: [`color ${s}`, `background ${s}`, `border-color ${s}`, `box-shadow ${s}`].join(","),
      a: {
        color: t
      },
      [`> ${o}-button`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        zIndex: -1,
        width: "100%",
        height: "100%"
      },
      "&:not(:first-child)": {
        "&::before": {
          position: "absolute",
          insetBlockStart: -i,
          insetInlineStart: -i,
          display: "block",
          boxSizing: "content-box",
          width: 1,
          height: "100%",
          paddingBlock: i,
          paddingInline: 0,
          backgroundColor: r,
          transition: `background-color ${l}`,
          content: '""'
        }
      },
      "&:first-child": {
        borderInlineStart: `${i}px ${a} ${r}`,
        borderStartStartRadius: y,
        borderEndStartRadius: y
      },
      "&:last-child": {
        borderStartEndRadius: y,
        borderEndEndRadius: y
      },
      "&:first-child:last-child": {
        borderRadius: y
      },
      [`${o}-group-large &`]: {
        height: g,
        fontSize: f,
        lineHeight: `${g - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: C,
          borderEndStartRadius: C
        },
        "&:last-child": {
          borderStartEndRadius: C,
          borderEndEndRadius: C
        }
      },
      [`${o}-group-small &`]: {
        height: m,
        paddingInline: b - i,
        paddingBlock: 0,
        lineHeight: `${m - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: S,
          borderEndStartRadius: S
        },
        "&:last-child": {
          borderStartEndRadius: S,
          borderEndEndRadius: S
        }
      },
      "&:hover": {
        position: "relative",
        color: O
      },
      "&:has(:focus-visible)": I({}, Xu(e)),
      [`${o}-inner, input[type='checkbox'], input[type='radio']`]: {
        width: 0,
        height: 0,
        opacity: 0,
        pointerEvents: "none"
      },
      [`&-checked:not(${o}-button-wrapper-disabled)`]: {
        zIndex: 1,
        color: O,
        background: $,
        borderColor: O,
        "&::before": {
          backgroundColor: O
        },
        "&:first-child": {
          borderColor: O
        },
        "&:hover": {
          color: P,
          borderColor: P,
          "&::before": {
            backgroundColor: P
          }
        },
        "&:active": {
          color: k,
          borderColor: k,
          "&::before": {
            backgroundColor: k
          }
        }
      },
      [`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]: {
        color: x,
        background: O,
        borderColor: O,
        "&:hover": {
          color: x,
          background: P,
          borderColor: P
        },
        "&:active": {
          color: x,
          background: k,
          borderColor: k
        }
      },
      "&-disabled": {
        color: E,
        backgroundColor: z,
        borderColor: r,
        cursor: "not-allowed",
        "&:first-child, &:hover": {
          color: E,
          backgroundColor: z,
          borderColor: r
        }
      },
      [`&-disabled${o}-button-wrapper-checked`]: {
        color: B,
        backgroundColor: D,
        borderColor: r,
        boxShadow: "none"
      }
    }
  };
}, V$ = nn("Radio", (e) => {
  const {
    padding: t,
    lineWidth: n,
    controlItemBgActiveDisabled: o,
    colorTextDisabled: i,
    colorBgContainer: a,
    fontSizeLG: r,
    controlOutline: l,
    colorPrimaryHover: s,
    colorPrimaryActive: u,
    colorText: c,
    colorPrimary: d,
    marginXS: f,
    controlOutlineWidth: g,
    colorTextLightSolid: m,
    wireframe: b
  } = e, y = `0 0 0 ${g}px ${l}`, S = y, C = r, O = 4, $ = C - O * 2, P = b ? $ : C - (O + n) * 2, k = d, x = c, E = s, z = u, B = t - n, H = _t(e, {
    radioFocusShadow: y,
    radioButtonFocusShadow: S,
    radioSize: C,
    radioDotSize: P,
    radioDotDisabledSize: $,
    radioCheckedColor: k,
    radioDotDisabledColor: i,
    radioSolidCheckedColor: m,
    radioButtonBg: a,
    radioButtonCheckedBg: a,
    radioButtonColor: x,
    radioButtonHoverColor: E,
    radioButtonActiveColor: z,
    radioButtonPaddingHorizontal: B,
    radioDisabledButtonCheckedBg: o,
    radioDisabledButtonCheckedColor: i,
    radioWrapperMarginRight: f
  });
  return [M5(H), T5(H), k5(H)];
});
var E5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const j$ = () => ({
  prefixCls: String,
  checked: st(),
  disabled: st(),
  isGroup: st(),
  value: ue.any,
  name: String,
  id: String,
  autofocus: st(),
  onChange: Qe(),
  onFocus: Qe(),
  onBlur: Qe(),
  onClick: Qe(),
  "onUpdate:checked": Qe(),
  "onUpdate:value": Qe()
}), Do = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARadio",
  inheritAttrs: !1,
  props: j$(),
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      slots: i,
      attrs: a
    } = t;
    const r = fi(), l = si.useInject(), s = O5(), u = $5(), c = Zi(), d = R(() => {
      var E;
      return (E = b.value) !== null && E !== void 0 ? E : c.value;
    }), f = le(), {
      prefixCls: g,
      direction: m,
      disabled: b
    } = yt("radio", e), y = R(() => u?.optionType.value === "button" || s === "button" ? `${g.value}-button` : g.value), S = Zi(), [C, O] = V$(g);
    o({
      focus: () => {
        f.value.focus();
      },
      blur: () => {
        f.value.blur();
      }
    });
    const k = (E) => {
      const z = E.target.checked;
      n("update:checked", z), n("update:value", z), n("change", E), r.onFieldChange();
    }, x = (E) => {
      n("change", E), u && u.onChange && u.onChange(E);
    };
    return () => {
      var E;
      const z = u, {
        prefixCls: B,
        id: D = r.id.value
      } = e, W = E5(e, ["prefixCls", "id"]), H = I(I({
        prefixCls: y.value,
        id: D
      }, Tn(W, ["onUpdate:checked", "onUpdate:value"])), {
        disabled: (E = b.value) !== null && E !== void 0 ? E : S.value
      });
      z ? (H.name = z.name.value, H.onChange = x, H.checked = e.value === z.value.value, H.disabled = d.value || z.disabled.value) : H.onChange = k;
      const F = Te({
        [`${y.value}-wrapper`]: !0,
        [`${y.value}-wrapper-checked`]: H.checked,
        [`${y.value}-wrapper-disabled`]: H.disabled,
        [`${y.value}-wrapper-rtl`]: m.value === "rtl",
        [`${y.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, a.class, O.value);
      return C(v("label", Z(Z({}, a), {}, {
        class: F
      }), [v(F$, Z(Z({}, H), {}, {
        type: "radio",
        ref: f
      }), null), i.default && v("span", null, [i.default()])]));
    };
  }
}), _5 = () => ({
  prefixCls: String,
  value: ue.any,
  size: dn(),
  options: Po(),
  disabled: st(),
  name: String,
  buttonStyle: dn("outline"),
  id: String,
  optionType: dn("default"),
  onChange: Qe(),
  "onUpdate:value": Qe()
}), A5 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioGroup",
  inheritAttrs: !1,
  props: _5(),
  // emits: ['update:value', 'change'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const a = fi(), {
      prefixCls: r,
      direction: l,
      size: s
    } = yt("radio", e), [u, c] = V$(r), d = le(e.value), f = le(!1);
    return Ie(() => e.value, (m) => {
      d.value = m, f.value = !1;
    }), C5({
      onChange: (m) => {
        const b = d.value, {
          value: y
        } = m.target;
        "value" in e || (d.value = y), !f.value && y !== b && (f.value = !0, o("update:value", y), o("change", m), a.onFieldChange()), Nt(() => {
          f.value = !1;
        });
      },
      value: d,
      disabled: R(() => e.disabled),
      name: R(() => e.name),
      optionType: R(() => e.optionType)
    }), () => {
      var m;
      const {
        options: b,
        buttonStyle: y,
        id: S = a.id.value
      } = e, C = `${r.value}-group`, O = Te(C, `${C}-${y}`, {
        [`${C}-${s.value}`]: s.value,
        [`${C}-rtl`]: l.value === "rtl"
      }, i.class, c.value);
      let $ = null;
      return b && b.length > 0 ? $ = b.map((P) => {
        if (typeof P == "string" || typeof P == "number")
          return v(Do, {
            key: P,
            prefixCls: r.value,
            disabled: e.disabled,
            value: P,
            checked: d.value === P
          }, {
            default: () => [P]
          });
        const {
          value: k,
          disabled: x,
          label: E
        } = P;
        return v(Do, {
          key: `radio-group-value-options-${k}`,
          prefixCls: r.value,
          disabled: x || e.disabled,
          value: k,
          checked: d.value === k
        }, {
          default: () => [E]
        });
      }) : $ = (m = n.default) === null || m === void 0 ? void 0 : m.call(n), u(v("div", Z(Z({}, i), {}, {
        class: O,
        id: S
      }), [$]));
    };
  }
}), D5 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioButton",
  inheritAttrs: !1,
  props: j$(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i
    } = yt("radio", e);
    return P5("button"), () => {
      var a;
      return v(Do, Z(Z(Z({}, o), e), {}, {
        prefixCls: i.value
      }), {
        default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
      });
    };
  }
});
Do.Group = A5;
Do.Button = D5;
Do.install = function(e) {
  return e.component(Do.name, Do), e.component(Do.Group.name, Do.Group), e.component(Do.Button.name, Do.Button), e;
};
const W$ = (e) => ({
  // Firefox
  "&::-moz-placeholder": {
    opacity: 1
  },
  "&::placeholder": {
    color: e,
    userSelect: "none"
    // https://github.com/ant-design/ant-design/pull/32639
  },
  "&:placeholder-shown": {
    textOverflow: "ellipsis"
  }
}), Ws = (e) => ({
  borderColor: e.inputBorderHoverColor,
  borderInlineEndWidth: e.lineWidth
}), wl = (e) => ({
  borderColor: e.inputBorderHoverColor,
  boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,
  borderInlineEndWidth: e.lineWidth,
  outline: 0
}), q$ = (e) => ({
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  borderColor: e.colorBorder,
  boxShadow: "none",
  cursor: "not-allowed",
  opacity: 1,
  "&:hover": I({}, Ws(_t(e, {
    inputBorderHoverColor: e.colorBorder
  })))
}), G$ = (e) => {
  const {
    inputPaddingVerticalLG: t,
    fontSizeLG: n,
    lineHeightLG: o,
    borderRadiusLG: i,
    inputPaddingHorizontalLG: a
  } = e;
  return {
    padding: `${t}px ${a}px`,
    fontSize: n,
    lineHeight: o,
    borderRadius: i
  };
}, K$ = (e) => ({
  padding: `${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM - 1}px`,
  borderRadius: e.borderRadiusSM
}), Ef = (e, t) => {
  const {
    componentCls: n,
    colorError: o,
    colorWarning: i,
    colorErrorOutline: a,
    colorWarningOutline: r,
    colorErrorBorderHover: l,
    colorWarningBorderHover: s
  } = e;
  return {
    [`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: o,
      "&:hover": {
        borderColor: l
      },
      "&:focus, &-focused": I({}, wl(_t(e, {
        inputBorderActiveColor: o,
        inputBorderHoverColor: o,
        controlOutline: a
      }))),
      [`${n}-prefix`]: {
        color: o
      }
    },
    [`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: i,
      "&:hover": {
        borderColor: s
      },
      "&:focus, &-focused": I({}, wl(_t(e, {
        inputBorderActiveColor: i,
        inputBorderHoverColor: i,
        controlOutline: r
      }))),
      [`${n}-prefix`]: {
        color: i
      }
    }
  };
}, ic = (e) => I(I({
  position: "relative",
  display: "inline-block",
  width: "100%",
  minWidth: 0,
  padding: `${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,
  color: e.colorText,
  fontSize: e.fontSize,
  lineHeight: e.lineHeight,
  backgroundColor: e.colorBgContainer,
  backgroundImage: "none",
  borderWidth: e.lineWidth,
  borderStyle: e.lineType,
  borderColor: e.colorBorder,
  borderRadius: e.borderRadius,
  transition: `all ${e.motionDurationMid}`
}, W$(e.colorTextPlaceholder)), {
  "&:hover": I({}, Ws(e)),
  "&:focus, &-focused": I({}, wl(e)),
  "&-disabled, &[disabled]": I({}, q$(e)),
  "&-borderless": {
    "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
      backgroundColor: "transparent",
      border: "none",
      boxShadow: "none"
    }
  },
  // Reset height for `textarea`s
  "textarea&": {
    maxWidth: "100%",
    height: "auto",
    minHeight: e.controlHeight,
    lineHeight: e.lineHeight,
    verticalAlign: "bottom",
    transition: `all ${e.motionDurationSlow}, height 0s`,
    resize: "vertical"
  },
  // Size
  "&-lg": I({}, G$(e)),
  "&-sm": I({}, K$(e)),
  // RTL
  "&-rtl": {
    direction: "rtl"
  },
  "&-textarea-rtl": {
    direction: "rtl"
  }
}), Y$ = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e;
  return {
    position: "relative",
    display: "table",
    width: "100%",
    borderCollapse: "separate",
    borderSpacing: 0,
    // Undo padding and float of grid classes
    "&[class*='col-']": {
      paddingInlineEnd: e.paddingXS,
      "&:last-child": {
        paddingInlineEnd: 0
      }
    },
    // Sizing options
    [`&-lg ${t}, &-lg > ${t}-group-addon`]: I({}, G$(e)),
    [`&-sm ${t}, &-sm > ${t}-group-addon`]: I({}, K$(e)),
    [`> ${t}`]: {
      display: "table-cell",
      "&:not(:first-child):not(:last-child)": {
        borderRadius: 0
      }
    },
    [`${t}-group`]: {
      "&-addon, &-wrap": {
        display: "table-cell",
        width: 1,
        whiteSpace: "nowrap",
        verticalAlign: "middle",
        "&:not(:first-child):not(:last-child)": {
          borderRadius: 0
        }
      },
      "&-wrap > *": {
        display: "block !important"
      },
      "&-addon": {
        position: "relative",
        padding: `0 ${e.inputPaddingHorizontal}px`,
        color: e.colorText,
        fontWeight: "normal",
        fontSize: e.fontSize,
        textAlign: "center",
        backgroundColor: e.colorFillAlter,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        borderRadius: e.borderRadius,
        transition: `all ${e.motionDurationSlow}`,
        lineHeight: 1,
        // Reset Select's style in addon
        [`${n}-select`]: {
          margin: `-${e.inputPaddingVertical + 1}px -${e.inputPaddingHorizontal}px`,
          [`&${n}-select-single:not(${n}-select-customize-input)`]: {
            [`${n}-select-selector`]: {
              backgroundColor: "inherit",
              border: `${e.lineWidth}px ${e.lineType} transparent`,
              boxShadow: "none"
            }
          },
          "&-open, &-focused": {
            [`${n}-select-selector`]: {
              color: e.colorPrimary
            }
          }
        },
        // https://github.com/ant-design/ant-design/issues/31333
        [`${n}-cascader-picker`]: {
          margin: `-9px -${e.inputPaddingHorizontal}px`,
          backgroundColor: "transparent",
          [`${n}-cascader-input`]: {
            textAlign: "start",
            border: 0,
            boxShadow: "none"
          }
        }
      },
      "&-addon:first-child": {
        borderInlineEnd: 0
      },
      "&-addon:last-child": {
        borderInlineStart: 0
      }
    },
    [`${t}`]: {
      float: "inline-start",
      width: "100%",
      marginBottom: 0,
      textAlign: "inherit",
      "&:focus": {
        zIndex: 1,
        borderInlineEndWidth: 1
      },
      "&:hover": {
        zIndex: 1,
        borderInlineEndWidth: 1,
        [`${t}-search-with-button &`]: {
          zIndex: 0
        }
      }
    },
    // Reset rounded corners
    [`> ${t}:first-child, ${t}-group-addon:first-child`]: {
      borderStartEndRadius: 0,
      borderEndEndRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${t}-affix-wrapper`]: {
      [`&:not(:first-child) ${t}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      },
      [`&:not(:last-child) ${t}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${t}:last-child, ${t}-group-addon:last-child`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`${t}-affix-wrapper`]: {
      "&:not(:last-child)": {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0,
        [`${t}-search &`]: {
          borderStartStartRadius: e.borderRadius,
          borderEndStartRadius: e.borderRadius
        }
      },
      [`&:not(:first-child), ${t}-search &:not(:first-child)`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&${t}-group-compact`]: I(I({
      display: "block"
    }, Tr()), {
      [`${t}-group-addon, ${t}-group-wrap, > ${t}`]: {
        "&:not(:first-child):not(:last-child)": {
          borderInlineEndWidth: e.lineWidth,
          "&:hover": {
            zIndex: 1
          },
          "&:focus": {
            zIndex: 1
          }
        }
      },
      "& > *": {
        display: "inline-block",
        float: "none",
        verticalAlign: "top",
        borderRadius: 0
      },
      [`& > ${t}-affix-wrapper`]: {
        display: "inline-flex"
      },
      [`& > ${n}-picker-range`]: {
        display: "inline-flex"
      },
      "& > *:not(:last-child)": {
        marginInlineEnd: -e.lineWidth,
        borderInlineEndWidth: e.lineWidth
      },
      // Undo float for .ant-input-group .ant-input
      [`${t}`]: {
        float: "none"
      },
      // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
      [`& > ${n}-select > ${n}-select-selector,
      & > ${n}-select-auto-complete ${t},
      & > ${n}-cascader-picker ${t},
      & > ${t}-group-wrapper ${t}`]: {
        borderInlineEndWidth: e.lineWidth,
        borderRadius: 0,
        "&:hover": {
          zIndex: 1
        },
        "&:focus": {
          zIndex: 1
        }
      },
      [`& > ${n}-select-focused`]: {
        zIndex: 1
      },
      // update z-index for arrow icon
      [`& > ${n}-select > ${n}-select-arrow`]: {
        zIndex: 1
        // https://github.com/ant-design/ant-design/issues/20371
      },
      [`& > *:first-child,
      & > ${n}-select:first-child > ${n}-select-selector,
      & > ${n}-select-auto-complete:first-child ${t},
      & > ${n}-cascader-picker:first-child ${t}`]: {
        borderStartStartRadius: e.borderRadius,
        borderEndStartRadius: e.borderRadius
      },
      [`& > *:last-child,
      & > ${n}-select:last-child > ${n}-select-selector,
      & > ${n}-cascader-picker:last-child ${t},
      & > ${n}-cascader-picker-focused:last-child ${t}`]: {
        borderInlineEndWidth: e.lineWidth,
        borderStartEndRadius: e.borderRadius,
        borderEndEndRadius: e.borderRadius
      },
      // https://github.com/ant-design/ant-design/issues/12493
      [`& > ${n}-select-auto-complete ${t}`]: {
        verticalAlign: "top"
      },
      [`${t}-group-wrapper + ${t}-group-wrapper`]: {
        marginInlineStart: -e.lineWidth,
        [`${t}-affix-wrapper`]: {
          borderRadius: 0
        }
      },
      [`${t}-group-wrapper:not(:last-child)`]: {
        [`&${t}-search > ${t}-group`]: {
          [`& > ${t}-group-addon > ${t}-search-button`]: {
            borderRadius: 0
          },
          [`& > ${t}`]: {
            borderStartStartRadius: e.borderRadius,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0,
            borderEndStartRadius: e.borderRadius
          }
        }
      }
    }),
    [`&&-sm ${n}-btn`]: {
      fontSize: e.fontSizeSM,
      height: e.controlHeightSM,
      lineHeight: "normal"
    },
    [`&&-lg ${n}-btn`]: {
      fontSize: e.fontSizeLG,
      height: e.controlHeightLG,
      lineHeight: "normal"
    },
    // Fix https://github.com/ant-design/ant-design/issues/5754
    [`&&-lg ${n}-select-single ${n}-select-selector`]: {
      height: `${e.controlHeightLG}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${e.controlHeightLG - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${e.controlHeightLG}px`
      }
    },
    [`&&-sm ${n}-select-single ${n}-select-selector`]: {
      height: `${e.controlHeightSM}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${e.controlHeightSM - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${e.controlHeightSM}px`
      }
    }
  };
}, z5 = (e) => {
  const {
    componentCls: t,
    controlHeightSM: n,
    lineWidth: o
  } = e, a = (n - o * 2 - 16) / 2;
  return {
    [t]: I(I(I(I({}, Zt(e)), ic(e)), Ef(e, t)), {
      '&[type="color"]': {
        height: e.controlHeight,
        [`&${t}-lg`]: {
          height: e.controlHeightLG
        },
        [`&${t}-sm`]: {
          height: n,
          paddingTop: a,
          paddingBottom: a
        }
      }
    })
  };
}, R5 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // ========================= Input =========================
    [`${t}-clear-icon`]: {
      margin: 0,
      color: e.colorTextQuaternary,
      fontSize: e.fontSizeIcon,
      verticalAlign: -1,
      // https://github.com/ant-design/ant-design/pull/18151
      // https://codesandbox.io/s/wizardly-sun-u10br
      cursor: "pointer",
      transition: `color ${e.motionDurationSlow}`,
      "&:hover": {
        color: e.colorTextTertiary
      },
      "&:active": {
        color: e.colorText
      },
      "&-hidden": {
        visibility: "hidden"
      },
      "&-has-suffix": {
        margin: `0 ${e.inputAffixPadding}px`
      }
    },
    // ======================= TextArea ========================
    "&-textarea-with-clear-btn": {
      padding: "0 !important",
      border: "0 !important",
      [`${t}-clear-icon`]: {
        position: "absolute",
        insetBlockStart: e.paddingXS,
        insetInlineEnd: e.paddingXS,
        zIndex: 1
      }
    }
  };
}, N5 = (e) => {
  const {
    componentCls: t,
    inputAffixPadding: n,
    colorTextDescription: o,
    motionDurationSlow: i,
    colorIcon: a,
    colorIconHover: r,
    iconCls: l
  } = e;
  return {
    [`${t}-affix-wrapper`]: I(I(I(I(I({}, ic(e)), {
      display: "inline-flex",
      [`&:not(${t}-affix-wrapper-disabled):hover`]: I(I({}, Ws(e)), {
        zIndex: 1,
        [`${t}-search-with-button &`]: {
          zIndex: 0
        }
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${t}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> input${t}`]: {
        padding: 0,
        fontSize: "inherit",
        border: "none",
        borderRadius: 0,
        outline: "none",
        "&:focus": {
          boxShadow: "none !important"
        }
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${t}`]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          "> *:not(:last-child)": {
            marginInlineEnd: e.paddingXS
          }
        },
        "&-show-count-suffix": {
          color: o
        },
        "&-show-count-has-suffix": {
          marginInlineEnd: e.paddingXXS
        },
        "&-prefix": {
          marginInlineEnd: n
        },
        "&-suffix": {
          marginInlineStart: n
        }
      }
    }), R5(e)), {
      // password
      [`${l}${t}-password-icon`]: {
        color: a,
        cursor: "pointer",
        transition: `all ${i}`,
        "&:hover": {
          color: r
        }
      }
    }), Ef(e, `${t}-affix-wrapper`))
  };
}, B5 = (e) => {
  const {
    componentCls: t,
    colorError: n,
    colorSuccess: o,
    borderRadiusLG: i,
    borderRadiusSM: a
  } = e;
  return {
    [`${t}-group`]: I(I(I({}, Zt(e)), Y$(e)), {
      "&-rtl": {
        direction: "rtl"
      },
      "&-wrapper": {
        display: "inline-block",
        width: "100%",
        textAlign: "start",
        verticalAlign: "top",
        "&-rtl": {
          direction: "rtl"
        },
        // Size
        "&-lg": {
          [`${t}-group-addon`]: {
            borderRadius: i
          }
        },
        "&-sm": {
          [`${t}-group-addon`]: {
            borderRadius: a
          }
        },
        // Status
        "&-status-error": {
          [`${t}-group-addon`]: {
            color: n,
            borderColor: n
          }
        },
        "&-status-warning": {
          [`${t}-group-addon:last-child`]: {
            color: o,
            borderColor: o
          }
        }
      }
    })
  };
}, F5 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-search`;
  return {
    [o]: {
      [`${t}`]: {
        "&:hover, &:focus": {
          borderColor: e.colorPrimaryHover,
          [`+ ${t}-group-addon ${o}-button:not(${n}-btn-primary)`]: {
            borderInlineStartColor: e.colorPrimaryHover
          }
        }
      },
      [`${t}-affix-wrapper`]: {
        borderRadius: 0
      },
      // fix slight height diff in Firefox:
      // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
      [`${t}-lg`]: {
        lineHeight: e.lineHeightLG - 2e-4
      },
      [`> ${t}-group`]: {
        [`> ${t}-group-addon:last-child`]: {
          insetInlineStart: -1,
          padding: 0,
          border: 0,
          [`${o}-button`]: {
            paddingTop: 0,
            paddingBottom: 0,
            borderStartStartRadius: 0,
            borderStartEndRadius: e.borderRadius,
            borderEndEndRadius: e.borderRadius,
            borderEndStartRadius: 0
          },
          [`${o}-button:not(${n}-btn-primary)`]: {
            color: e.colorTextDescription,
            "&:hover": {
              color: e.colorPrimaryHover
            },
            "&:active": {
              color: e.colorPrimaryActive
            },
            [`&${n}-btn-loading::before`]: {
              insetInlineStart: 0,
              insetInlineEnd: 0,
              insetBlockStart: 0,
              insetBlockEnd: 0
            }
          }
        }
      },
      [`${o}-button`]: {
        height: e.controlHeight,
        "&:hover, &:focus": {
          zIndex: 1
        }
      },
      [`&-large ${o}-button`]: {
        height: e.controlHeightLG
      },
      [`&-small ${o}-button`]: {
        height: e.controlHeightSM
      },
      "&-rtl": {
        direction: "rtl"
      },
      // ===================== Compact Item Customized Styles =====================
      [`&${t}-compact-item`]: {
        [`&:not(${t}-compact-last-item)`]: {
          [`${t}-group-addon`]: {
            [`${t}-search-button`]: {
              marginInlineEnd: -e.lineWidth,
              borderRadius: 0
            }
          }
        },
        [`&:not(${t}-compact-first-item)`]: {
          [`${t},${t}-affix-wrapper`]: {
            borderRadius: 0
          }
        },
        [`> ${t}-group-addon ${t}-search-button,
        > ${t},
        ${t}-affix-wrapper`]: {
          "&:hover,&:focus,&:active": {
            zIndex: 2
          }
        },
        [`> ${t}-affix-wrapper-focused`]: {
          zIndex: 2
        }
      }
    }
  };
};
function Cm(e) {
  return _t(e, {
    inputAffixPadding: e.paddingXXS,
    inputPaddingVertical: Math.max(Math.round((e.controlHeight - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 3),
    inputPaddingVerticalLG: Math.ceil((e.controlHeightLG - e.fontSizeLG * e.lineHeightLG) / 2 * 10) / 10 - e.lineWidth,
    inputPaddingVerticalSM: Math.max(Math.round((e.controlHeightSM - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 0),
    inputPaddingHorizontal: e.paddingSM - e.lineWidth,
    inputPaddingHorizontalSM: e.paddingXS - e.lineWidth,
    inputPaddingHorizontalLG: e.controlPaddingHorizontal - e.lineWidth,
    inputBorderHoverColor: e.colorPrimaryHover,
    inputBorderActiveColor: e.colorPrimaryHover
  });
}
const L5 = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    paddingLG: o
  } = e, i = `${t}-textarea`;
  return {
    [i]: {
      position: "relative",
      [`${i}-suffix`]: {
        position: "absolute",
        top: 0,
        insetInlineEnd: n,
        bottom: 0,
        zIndex: 1,
        display: "inline-flex",
        alignItems: "center",
        margin: "auto"
      },
      "&-status-error,\n        &-status-warning,\n        &-status-success,\n        &-status-validating": {
        [`&${i}-has-feedback`]: {
          [`${t}`]: {
            paddingInlineEnd: o
          }
        }
      },
      "&-show-count": {
        // https://github.com/ant-design/ant-design/issues/33049
        [`> ${t}`]: {
          height: "100%"
        },
        "&::after": {
          color: e.colorTextDescription,
          whiteSpace: "nowrap",
          content: "attr(data-count)",
          pointerEvents: "none",
          float: "right"
        }
      },
      "&-rtl": {
        "&::after": {
          float: "left"
        }
      }
    }
  };
}, $m = nn("Input", (e) => {
  const t = Cm(e);
  return [
    z5(t),
    L5(t),
    N5(t),
    B5(t),
    F5(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(t)
  ];
}), Dp = (e, t, n, o) => {
  const {
    lineHeight: i
  } = e, a = Math.floor(n * i) + 2, r = Math.max((t - a) / 2, 0), l = Math.max(t - a - r, 0);
  return {
    padding: `${r}px ${o}px ${l}px`
  };
}, H5 = (e) => {
  const {
    componentCls: t,
    pickerCellCls: n,
    pickerCellInnerCls: o,
    pickerPanelCellHeight: i,
    motionDurationSlow: a,
    borderRadiusSM: r,
    motionDurationMid: l,
    controlItemBgHover: s,
    lineWidth: u,
    lineType: c,
    colorPrimary: d,
    controlItemBgActive: f,
    colorTextLightSolid: g,
    controlHeightSM: m,
    pickerDateHoverRangeBorderColor: b,
    pickerCellBorderGap: y,
    pickerBasicCellHoverWithRangeColor: S,
    pickerPanelCellWidth: C,
    colorTextDisabled: O,
    colorBgContainerDisabled: $
  } = e;
  return {
    "&::before": {
      position: "absolute",
      top: "50%",
      insetInlineStart: 0,
      insetInlineEnd: 0,
      zIndex: 1,
      height: i,
      transform: "translateY(-50%)",
      transition: `all ${a}`,
      content: '""'
    },
    // >>> Default
    [o]: {
      position: "relative",
      zIndex: 2,
      display: "inline-block",
      minWidth: i,
      height: i,
      lineHeight: `${i}px`,
      borderRadius: r,
      transition: `background ${l}, border ${l}`
    },
    // >>> Hover
    [`&:hover:not(${n}-in-view),
    &:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]: {
      [o]: {
        background: s
      }
    },
    // >>> Today
    [`&-in-view${n}-today ${o}`]: {
      "&::before": {
        position: "absolute",
        top: 0,
        insetInlineEnd: 0,
        bottom: 0,
        insetInlineStart: 0,
        zIndex: 1,
        border: `${u}px ${c} ${d}`,
        borderRadius: r,
        content: '""'
      }
    },
    // >>> In Range
    [`&-in-view${n}-in-range`]: {
      position: "relative",
      "&::before": {
        background: f
      }
    },
    // >>> Selected
    [`&-in-view${n}-selected ${o},
      &-in-view${n}-range-start ${o},
      &-in-view${n}-range-end ${o}`]: {
      color: g,
      background: d
    },
    [`&-in-view${n}-range-start:not(${n}-range-start-single),
      &-in-view${n}-range-end:not(${n}-range-end-single)`]: {
      "&::before": {
        background: f
      }
    },
    [`&-in-view${n}-range-start::before`]: {
      insetInlineStart: "50%"
    },
    [`&-in-view${n}-range-end::before`]: {
      insetInlineEnd: "50%"
    },
    // >>> Range Hover
    [`&-in-view${n}-range-hover-start:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-end:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-start${n}-range-start-single,
      &-in-view${n}-range-hover-start${n}-range-start${n}-range-end${n}-range-end-near-hover,
      &-in-view${n}-range-hover-end${n}-range-start${n}-range-end${n}-range-start-near-hover,
      &-in-view${n}-range-hover-end${n}-range-end-single,
      &-in-view${n}-range-hover:not(${n}-in-range)`]: {
      "&::after": {
        position: "absolute",
        top: "50%",
        zIndex: 0,
        height: m,
        borderTop: `${u}px dashed ${b}`,
        borderBottom: `${u}px dashed ${b}`,
        transform: "translateY(-50%)",
        transition: `all ${a}`,
        content: '""'
      }
    },
    // Add space for stash
    "&-range-hover-start::after,\n      &-range-hover-end::after,\n      &-range-hover::after": {
      insetInlineEnd: 0,
      insetInlineStart: y
    },
    // Hover with in range
    [`&-in-view${n}-in-range${n}-range-hover::before,
      &-in-view${n}-range-start${n}-range-hover::before,
      &-in-view${n}-range-end${n}-range-hover::before,
      &-in-view${n}-range-start:not(${n}-range-start-single)${n}-range-hover-start::before,
      &-in-view${n}-range-end:not(${n}-range-end-single)${n}-range-hover-end::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-start::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-end::before`]: {
      background: S
    },
    // range start border-radius
    [`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${o}`]: {
      borderStartStartRadius: r,
      borderEndStartRadius: r,
      borderStartEndRadius: 0,
      borderEndEndRadius: 0
    },
    // range end border-radius
    [`&-in-view${n}-range-end:not(${n}-range-end-single):not(${n}-range-start) ${o}`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      borderStartEndRadius: r,
      borderEndEndRadius: r
    },
    [`&-range-hover${n}-range-end::after`]: {
      insetInlineStart: "50%"
    },
    // Edge start
    [`tr > &-in-view${n}-range-hover:first-child::after,
      tr > &-in-view${n}-range-hover-end:first-child::after,
      &-in-view${n}-start${n}-range-hover-edge-start${n}-range-hover-edge-start-near-range::after,
      &-in-view${n}-range-hover-edge-start:not(${n}-range-hover-edge-start-near-range)::after,
      &-in-view${n}-range-hover-start::after`]: {
      insetInlineStart: (C - i) / 2,
      borderInlineStart: `${u}px dashed ${b}`,
      borderStartStartRadius: u,
      borderEndStartRadius: u
    },
    // Edge end
    [`tr > &-in-view${n}-range-hover:last-child::after,
      tr > &-in-view${n}-range-hover-start:last-child::after,
      &-in-view${n}-end${n}-range-hover-edge-end${n}-range-hover-edge-end-near-range::after,
      &-in-view${n}-range-hover-edge-end:not(${n}-range-hover-edge-end-near-range)::after,
      &-in-view${n}-range-hover-end::after`]: {
      insetInlineEnd: (C - i) / 2,
      borderInlineEnd: `${u}px dashed ${b}`,
      borderStartEndRadius: u,
      borderEndEndRadius: u
    },
    // >>> Disabled
    "&-disabled": {
      color: O,
      pointerEvents: "none",
      [o]: {
        background: "transparent"
      },
      "&::before": {
        background: $
      }
    },
    [`&-disabled${n}-today ${o}::before`]: {
      borderColor: O
    }
  };
}, V5 = (e) => {
  const {
    componentCls: t,
    pickerCellInnerCls: n,
    pickerYearMonthCellWidth: o,
    pickerControlIconSize: i,
    pickerPanelCellWidth: a,
    paddingSM: r,
    paddingXS: l,
    paddingXXS: s,
    colorBgContainer: u,
    lineWidth: c,
    lineType: d,
    borderRadiusLG: f,
    colorPrimary: g,
    colorTextHeading: m,
    colorSplit: b,
    pickerControlIconBorderWidth: y,
    colorIcon: S,
    pickerTextHeight: C,
    motionDurationMid: O,
    colorIconHover: $,
    fontWeightStrong: P,
    pickerPanelCellHeight: k,
    pickerCellPaddingVertical: x,
    colorTextDisabled: E,
    colorText: z,
    fontSize: B,
    pickerBasicCellHoverWithRangeColor: D,
    motionDurationSlow: W,
    pickerPanelWithoutTimeCellHeight: H,
    pickerQuarterPanelContentHeight: F,
    colorLink: A,
    colorLinkActive: U,
    colorLinkHover: j,
    pickerDateHoverRangeBorderColor: ae,
    borderRadiusSM: G,
    colorTextLightSolid: Y,
    borderRadius: K,
    controlItemBgHover: J,
    pickerTimePanelColumnHeight: be,
    pickerTimePanelColumnWidth: xe,
    pickerTimePanelCellHeight: he,
    controlItemBgActive: de,
    marginXXS: ne
  } = e, we = a * 7 + r * 2 + 4, re = (we - l * 2) / 3 - o - r;
  return {
    [t]: {
      "&-panel": {
        display: "inline-flex",
        flexDirection: "column",
        textAlign: "center",
        background: u,
        border: `${c}px ${d} ${b}`,
        borderRadius: f,
        outline: "none",
        "&-focused": {
          borderColor: g
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-prev-icon,
              ${t}-super-prev-icon`]: {
            transform: "rotate(45deg)"
          },
          [`${t}-next-icon,
              ${t}-super-next-icon`]: {
            transform: "rotate(-135deg)"
          }
        }
      },
      // ========================================================
      // =                     Shared Panel                     =
      // ========================================================
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel,\n        &-week-panel,\n        &-date-panel,\n        &-time-panel": {
        display: "flex",
        flexDirection: "column",
        width: we
      },
      // ======================= Header =======================
      "&-header": {
        display: "flex",
        padding: `0 ${l}px`,
        color: m,
        borderBottom: `${c}px ${d} ${b}`,
        "> *": {
          flex: "none"
        },
        button: {
          padding: 0,
          color: S,
          lineHeight: `${C}px`,
          background: "transparent",
          border: 0,
          cursor: "pointer",
          transition: `color ${O}`
        },
        "> button": {
          minWidth: "1.6em",
          fontSize: B,
          "&:hover": {
            color: $
          }
        },
        "&-view": {
          flex: "auto",
          fontWeight: P,
          lineHeight: `${C}px`,
          button: {
            color: "inherit",
            fontWeight: "inherit",
            verticalAlign: "top",
            "&:not(:first-child)": {
              marginInlineStart: l
            },
            "&:hover": {
              color: g
            }
          }
        }
      },
      // Arrow button
      "&-prev-icon,\n        &-next-icon,\n        &-super-prev-icon,\n        &-super-next-icon": {
        position: "relative",
        display: "inline-block",
        width: i,
        height: i,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          display: "inline-block",
          width: i,
          height: i,
          border: "0 solid currentcolor",
          borderBlockStartWidth: y,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: y,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-super-prev-icon,\n        &-super-next-icon": {
        "&::after": {
          position: "absolute",
          top: Math.ceil(i / 2),
          insetInlineStart: Math.ceil(i / 2),
          display: "inline-block",
          width: i,
          height: i,
          border: "0 solid currentcolor",
          borderBlockStartWidth: y,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: y,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-prev-icon,\n        &-super-prev-icon": {
        transform: "rotate(-45deg)"
      },
      "&-next-icon,\n        &-super-next-icon": {
        transform: "rotate(135deg)"
      },
      // ======================== Body ========================
      "&-content": {
        width: "100%",
        tableLayout: "fixed",
        borderCollapse: "collapse",
        "th, td": {
          position: "relative",
          minWidth: k,
          fontWeight: "normal"
        },
        th: {
          height: k + x * 2,
          color: z,
          verticalAlign: "middle"
        }
      },
      "&-cell": I({
        padding: `${x}px 0`,
        color: E,
        cursor: "pointer",
        // In view
        "&-in-view": {
          color: z
        }
      }, H5(e)),
      // DatePanel only
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start ${n},
        &-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}`]: {
        "&::after": {
          position: "absolute",
          top: 0,
          bottom: 0,
          zIndex: -1,
          background: D,
          transition: `all ${W}`,
          content: '""'
        }
      },
      [`&-date-panel
        ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start
        ${n}::after`]: {
        insetInlineEnd: -(a - k) / 2,
        insetInlineStart: 0
      },
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]: {
        insetInlineEnd: 0,
        insetInlineStart: -(a - k) / 2
      },
      // Hover with range start & end
      [`&-range-hover${t}-range-start::after`]: {
        insetInlineEnd: "50%"
      },
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-content`]: {
          height: H * 4
        },
        [n]: {
          padding: `0 ${l}px`
        }
      },
      "&-quarter-panel": {
        [`${t}-content`]: {
          height: F
        }
      },
      // ======================== Footer ========================
      [`&-panel ${t}-footer`]: {
        borderTop: `${c}px ${d} ${b}`
      },
      "&-footer": {
        width: "min-content",
        minWidth: "100%",
        lineHeight: `${C - 2 * c}px`,
        textAlign: "center",
        "&-extra": {
          padding: `0 ${r}`,
          lineHeight: `${C - 2 * c}px`,
          textAlign: "start",
          "&:not(:last-child)": {
            borderBottom: `${c}px ${d} ${b}`
          }
        }
      },
      "&-now": {
        textAlign: "start"
      },
      "&-today-btn": {
        color: A,
        "&:hover": {
          color: j
        },
        "&:active": {
          color: U
        },
        [`&${t}-today-btn-disabled`]: {
          color: E,
          cursor: "not-allowed"
        }
      },
      // ========================================================
      // =                       Special                        =
      // ========================================================
      // ===================== Decade Panel =====================
      "&-decade-panel": {
        [n]: {
          padding: `0 ${l / 2}px`
        },
        [`${t}-cell::before`]: {
          display: "none"
        }
      },
      // ============= Year & Quarter & Month Panel =============
      "&-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-body`]: {
          padding: `0 ${l}px`
        },
        [n]: {
          width: o
        },
        [`${t}-cell-range-hover-start::after`]: {
          insetInlineStart: re,
          borderInlineStart: `${c}px dashed ${ae}`,
          borderStartStartRadius: G,
          borderBottomStartRadius: G,
          borderStartEndRadius: 0,
          borderBottomEndRadius: 0,
          [`${t}-panel-rtl &`]: {
            insetInlineEnd: re,
            borderInlineEnd: `${c}px dashed ${ae}`,
            borderStartStartRadius: 0,
            borderBottomStartRadius: 0,
            borderStartEndRadius: G,
            borderBottomEndRadius: G
          }
        },
        [`${t}-cell-range-hover-end::after`]: {
          insetInlineEnd: re,
          borderInlineEnd: `${c}px dashed ${ae}`,
          borderStartStartRadius: 0,
          borderEndStartRadius: 0,
          borderStartEndRadius: K,
          borderEndEndRadius: K,
          [`${t}-panel-rtl &`]: {
            insetInlineStart: re,
            borderInlineStart: `${c}px dashed ${ae}`,
            borderStartStartRadius: K,
            borderEndStartRadius: K,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0
          }
        }
      },
      // ====================== Week Panel ======================
      "&-week-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${r}px`
        },
        // Clear cell style
        [`${t}-cell`]: {
          [`&:hover ${n},
            &-selected ${n},
            ${n}`]: {
            background: "transparent !important"
          }
        },
        "&-row": {
          td: {
            transition: `background ${O}`,
            "&:first-child": {
              borderStartStartRadius: G,
              borderEndStartRadius: G
            },
            "&:last-child": {
              borderStartEndRadius: G,
              borderEndEndRadius: G
            }
          },
          "&:hover td": {
            background: J
          },
          "&-selected td,\n            &-selected:hover td": {
            background: g,
            [`&${t}-cell-week`]: {
              color: new In(Y).setAlpha(0.5).toHexString()
            },
            [`&${t}-cell-today ${n}::before`]: {
              borderColor: Y
            },
            [n]: {
              color: Y
            }
          }
        }
      },
      // ====================== Date Panel ======================
      "&-date-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${r}px`
        },
        [`${t}-content`]: {
          width: a * 7,
          th: {
            width: a
          }
        }
      },
      // ==================== Datetime Panel ====================
      "&-datetime-panel": {
        display: "flex",
        [`${t}-time-panel`]: {
          borderInlineStart: `${c}px ${d} ${b}`
        },
        [`${t}-date-panel,
          ${t}-time-panel`]: {
          transition: `opacity ${W}`
        },
        // Keyboard
        "&-active": {
          [`${t}-date-panel,
            ${t}-time-panel`]: {
            opacity: 0.3,
            "&-active": {
              opacity: 1
            }
          }
        }
      },
      // ====================== Time Panel ======================
      "&-time-panel": {
        width: "auto",
        minWidth: "auto",
        direction: "ltr",
        [`${t}-content`]: {
          display: "flex",
          flex: "auto",
          height: be
        },
        "&-column": {
          flex: "1 0 auto",
          width: xe,
          margin: `${s}px 0`,
          padding: 0,
          overflowY: "hidden",
          textAlign: "start",
          listStyle: "none",
          transition: `background ${O}`,
          overflowX: "hidden",
          "&::after": {
            display: "block",
            height: be - he,
            content: '""'
          },
          "&:not(:first-child)": {
            borderInlineStart: `${c}px ${d} ${b}`
          },
          "&-active": {
            background: new In(de).setAlpha(0.2).toHexString()
          },
          "&:hover": {
            overflowY: "auto"
          },
          "> li": {
            margin: 0,
            padding: 0,
            [`&${t}-time-panel-cell`]: {
              marginInline: ne,
              [`${t}-time-panel-cell-inner`]: {
                display: "block",
                width: xe - 2 * ne,
                height: he,
                margin: 0,
                paddingBlock: 0,
                paddingInlineEnd: 0,
                paddingInlineStart: (xe - he) / 2,
                color: z,
                lineHeight: `${he}px`,
                borderRadius: G,
                cursor: "pointer",
                transition: `background ${O}`,
                "&:hover": {
                  background: J
                }
              },
              "&-selected": {
                [`${t}-time-panel-cell-inner`]: {
                  background: de
                }
              },
              "&-disabled": {
                [`${t}-time-panel-cell-inner`]: {
                  color: E,
                  background: "transparent",
                  cursor: "not-allowed"
                }
              }
            }
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/39227
      [`&-datetime-panel ${t}-time-panel-column:after`]: {
        height: be - he + s * 2
      }
    }
  };
}, j5 = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorError: o,
    colorErrorOutline: i,
    colorWarning: a,
    colorWarningOutline: r
  } = e;
  return {
    [t]: {
      [`&-status-error${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: o
        },
        "&-focused, &:focus": I({}, wl(_t(e, {
          inputBorderActiveColor: o,
          inputBorderHoverColor: o,
          controlOutline: i
        }))),
        [`${t}-active-bar`]: {
          background: o
        }
      },
      [`&-status-warning${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: a
        },
        "&-focused, &:focus": I({}, wl(_t(e, {
          inputBorderActiveColor: a,
          inputBorderHoverColor: a,
          controlOutline: r
        }))),
        [`${t}-active-bar`]: {
          background: a
        }
      }
    }
  };
}, W5 = (e) => {
  const {
    componentCls: t,
    antCls: n,
    boxShadowPopoverArrow: o,
    controlHeight: i,
    fontSize: a,
    inputPaddingHorizontal: r,
    colorBgContainer: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    borderRadius: d,
    motionDurationMid: f,
    colorBgContainerDisabled: g,
    colorTextDisabled: m,
    colorTextPlaceholder: b,
    controlHeightLG: y,
    fontSizeLG: S,
    controlHeightSM: C,
    inputPaddingHorizontalSM: O,
    paddingXS: $,
    marginXS: P,
    colorTextDescription: k,
    lineWidthBold: x,
    lineHeight: E,
    colorPrimary: z,
    motionDurationSlow: B,
    zIndexPopup: D,
    paddingXXS: W,
    paddingSM: H,
    pickerTextHeight: F,
    controlItemBgActive: A,
    colorPrimaryBorder: U,
    sizePopupArrow: j,
    borderRadiusXS: ae,
    borderRadiusOuter: G,
    colorBgElevated: Y,
    borderRadiusLG: K,
    boxShadowSecondary: J,
    borderRadiusSM: be,
    colorSplit: xe,
    controlItemBgHover: he,
    presetsWidth: de,
    presetsMaxWidth: ne
  } = e;
  return [
    {
      [t]: I(I(I({}, Zt(e)), Dp(e, i, a, r)), {
        position: "relative",
        display: "inline-flex",
        alignItems: "center",
        background: l,
        lineHeight: 1,
        border: `${s}px ${u} ${c}`,
        borderRadius: d,
        transition: `border ${f}, box-shadow ${f}`,
        "&:hover, &-focused": I({}, Ws(e)),
        "&-focused": I({}, wl(e)),
        [`&${t}-disabled`]: {
          background: g,
          borderColor: c,
          cursor: "not-allowed",
          [`${t}-suffix`]: {
            color: m
          }
        },
        [`&${t}-borderless`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ======================== Input =========================
        [`${t}-input`]: {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          width: "100%",
          "> input": I(I({}, ic(e)), {
            flex: "auto",
            // Fix Firefox flex not correct:
            // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
            minWidth: 1,
            height: "auto",
            padding: 0,
            background: "transparent",
            border: 0,
            "&:focus": {
              boxShadow: "none"
            },
            "&[disabled]": {
              background: "transparent"
            }
          }),
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          "&-placeholder": {
            "> input": {
              color: b
            }
          }
        },
        // Size
        "&-large": I(I({}, Dp(e, y, S, r)), {
          [`${t}-input > input`]: {
            fontSize: S
          }
        }),
        "&-small": I({}, Dp(e, C, a, O)),
        [`${t}-suffix`]: {
          display: "flex",
          flex: "none",
          alignSelf: "center",
          marginInlineStart: $ / 2,
          color: m,
          lineHeight: 1,
          pointerEvents: "none",
          "> *": {
            verticalAlign: "top",
            "&:not(:last-child)": {
              marginInlineEnd: P
            }
          }
        },
        [`${t}-clear`]: {
          position: "absolute",
          top: "50%",
          insetInlineEnd: 0,
          color: m,
          lineHeight: 1,
          background: l,
          transform: "translateY(-50%)",
          cursor: "pointer",
          opacity: 0,
          transition: `opacity ${f}, color ${f}`,
          "> *": {
            verticalAlign: "top"
          },
          "&:hover": {
            color: k
          }
        },
        [`${t}-separator`]: {
          position: "relative",
          display: "inline-block",
          width: "1em",
          height: S,
          color: m,
          fontSize: S,
          verticalAlign: "top",
          cursor: "default",
          [`${t}-focused &`]: {
            color: k
          },
          [`${t}-range-separator &`]: {
            [`${t}-disabled &`]: {
              cursor: "not-allowed"
            }
          }
        },
        // ======================== Range =========================
        "&-range": {
          position: "relative",
          display: "inline-flex",
          // Clear
          [`${t}-clear`]: {
            insetInlineEnd: r
          },
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          // Active bar
          [`${t}-active-bar`]: {
            bottom: -s,
            height: x,
            marginInlineStart: r,
            background: z,
            opacity: 0,
            transition: `all ${B} ease-out`,
            pointerEvents: "none"
          },
          [`&${t}-focused`]: {
            [`${t}-active-bar`]: {
              opacity: 1
            }
          },
          [`${t}-range-separator`]: {
            alignItems: "center",
            padding: `0 ${$}px`,
            lineHeight: 1
          },
          [`&${t}-small`]: {
            [`${t}-clear`]: {
              insetInlineEnd: O
            },
            [`${t}-active-bar`]: {
              marginInlineStart: O
            }
          }
        },
        // ======================= Dropdown =======================
        "&-dropdown": I(I(I({}, Zt(e)), V5(e)), {
          position: "absolute",
          // Fix incorrect position of picker popup
          // https://github.com/ant-design/ant-design/issues/35590
          top: -9999,
          left: {
            _skip_check_: !0,
            value: -9999
          },
          zIndex: D,
          [`&${t}-dropdown-hidden`]: {
            display: "none"
          },
          [`&${t}-dropdown-placement-bottomLeft`]: {
            [`${t}-range-arrow`]: {
              top: 0,
              display: "block",
              transform: "translateY(-100%)"
            }
          },
          [`&${t}-dropdown-placement-topLeft`]: {
            [`${t}-range-arrow`]: {
              bottom: 0,
              display: "block",
              transform: "translateY(100%) rotate(180deg)"
            }
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]: {
            animationName: Pf
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]: {
            animationName: Cf
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]: {
            animationName: Of
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]: {
            animationName: $f
          },
          // Time picker with additional style
          [`${t}-panel > ${t}-time-panel`]: {
            paddingTop: W
          },
          // ======================== Ranges ========================
          [`${t}-ranges`]: {
            marginBottom: 0,
            padding: `${W}px ${H}px`,
            overflow: "hidden",
            lineHeight: `${F - 2 * s - $ / 2}px`,
            textAlign: "start",
            listStyle: "none",
            display: "flex",
            justifyContent: "space-between",
            "> li": {
              display: "inline-block"
            },
            // https://github.com/ant-design/ant-design/issues/23687
            [`${t}-preset > ${n}-tag-blue`]: {
              color: z,
              background: A,
              borderColor: U,
              cursor: "pointer"
            },
            [`${t}-ok`]: {
              marginInlineStart: "auto"
            }
          },
          [`${t}-range-wrapper`]: {
            display: "flex",
            position: "relative"
          },
          [`${t}-range-arrow`]: I({
            position: "absolute",
            zIndex: 1,
            display: "none",
            marginInlineStart: r * 1.5,
            transition: `left ${B} ease-out`
          }, vv(j, ae, G, Y, o)),
          [`${t}-panel-container`]: {
            overflow: "hidden",
            verticalAlign: "top",
            background: Y,
            borderRadius: K,
            boxShadow: J,
            transition: `margin ${B}`,
            // ======================== Layout ========================
            [`${t}-panel-layout`]: {
              display: "flex",
              flexWrap: "nowrap",
              alignItems: "stretch"
            },
            // ======================== Preset ========================
            [`${t}-presets`]: {
              display: "flex",
              flexDirection: "column",
              minWidth: de,
              maxWidth: ne,
              ul: {
                height: 0,
                flex: "auto",
                listStyle: "none",
                overflow: "auto",
                margin: 0,
                padding: $,
                borderInlineEnd: `${s}px ${u} ${xe}`,
                li: I(I({}, Mr), {
                  borderRadius: be,
                  paddingInline: $,
                  paddingBlock: (C - Math.round(a * E)) / 2,
                  cursor: "pointer",
                  transition: `all ${B}`,
                  "+ li": {
                    marginTop: P
                  },
                  "&:hover": {
                    background: he
                  }
                })
              }
            },
            // ======================== Panels ========================
            [`${t}-panels`]: {
              display: "inline-flex",
              flexWrap: "nowrap",
              direction: "ltr",
              [`${t}-panel`]: {
                borderWidth: `0 0 ${s}px`
              },
              "&:last-child": {
                [`${t}-panel`]: {
                  borderWidth: 0
                }
              }
            },
            [`${t}-panel`]: {
              verticalAlign: "top",
              background: "transparent",
              borderRadius: 0,
              borderWidth: 0,
              [`${t}-content,
            table`]: {
                textAlign: "center"
              },
              "&-focused": {
                borderColor: c
              }
            }
          }
        }),
        "&-dropdown-range": {
          padding: `${j * 2 / 3}px 0`,
          "&-hidden": {
            display: "none"
          }
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-separator`]: {
            transform: "rotate(180deg)"
          },
          [`${t}-footer`]: {
            "&-extra": {
              direction: "rtl"
            }
          }
        }
      })
    },
    // Follow code may reuse in other components
    ya(e, "slide-up"),
    ya(e, "slide-down"),
    Ts(e, "move-up"),
    Ts(e, "move-down")
  ];
}, q5 = (e) => {
  const {
    componentCls: n,
    controlHeightLG: o,
    controlHeightSM: i,
    colorPrimary: a,
    paddingXXS: r
  } = e;
  return {
    pickerCellCls: `${n}-cell`,
    pickerCellInnerCls: `${n}-cell-inner`,
    pickerTextHeight: o,
    pickerPanelCellWidth: i * 1.5,
    pickerPanelCellHeight: i,
    pickerDateHoverRangeBorderColor: new In(a).lighten(20).toHexString(),
    pickerBasicCellHoverWithRangeColor: new In(a).lighten(35).toHexString(),
    pickerPanelWithoutTimeCellHeight: o * 1.65,
    pickerYearMonthCellWidth: o * 1.5,
    pickerTimePanelColumnHeight: 224,
    pickerTimePanelColumnWidth: o * 1.4,
    pickerTimePanelCellHeight: 28,
    pickerQuarterPanelContentHeight: o * 1.4,
    pickerCellPaddingVertical: r,
    pickerCellBorderGap: 2,
    pickerControlIconSize: 7,
    pickerControlIconBorderWidth: 1.5
  };
}, U$ = nn("DatePicker", (e) => {
  const t = _t(Cm(e), q5(e));
  return [
    W5(t),
    j5(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(e, {
      focusElCls: `${e.componentCls}-focused`
    })
  ];
}, (e) => ({
  presetsWidth: 120,
  presetsMaxWidth: 200,
  zIndexPopup: e.zIndexPopupBase + 50
}));
function G5(e) {
  const t = Pe(), n = Pe(!1);
  function o() {
    for (var i = arguments.length, a = new Array(i), r = 0; r < i; r++)
      a[r] = arguments[r];
    n.value || (Mt.cancel(t.value), t.value = Mt(() => {
      e(...a);
    }));
  }
  return At(() => {
    n.value = !0, Mt.cancel(t.value);
  }), o;
}
function K5(e) {
  const t = Pe([]), n = Pe(typeof e == "function" ? e() : e), o = G5(() => {
    let a = n.value;
    t.value.forEach((r) => {
      a = r(a);
    }), t.value = [], n.value = a;
  });
  function i(a) {
    t.value.push(a), o();
  }
  return [n, i];
}
const Y5 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabNode",
  props: {
    id: {
      type: String
    },
    prefixCls: {
      type: String
    },
    tab: {
      type: Object
    },
    active: {
      type: Boolean
    },
    closable: {
      type: Boolean
    },
    editable: {
      type: Object
    },
    onClick: {
      type: Function
    },
    onResize: {
      type: Function
    },
    renderWrapper: {
      type: Function
    },
    removeAriaLabel: {
      type: String
    },
    // onRemove: { type: Function as PropType<() => void> },
    onFocus: {
      type: Function
    }
  },
  emits: ["click", "resize", "remove", "focus"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const i = le();
    function a(s) {
      var u;
      !((u = e.tab) === null || u === void 0) && u.disabled || e.onClick(s);
    }
    n({
      domRef: i
    });
    function r(s) {
      var u;
      s.preventDefault(), s.stopPropagation(), e.editable.onEdit("remove", {
        key: (u = e.tab) === null || u === void 0 ? void 0 : u.key,
        event: s
      });
    }
    const l = R(() => {
      var s;
      return e.editable && e.closable !== !1 && !(!((s = e.tab) === null || s === void 0) && s.disabled);
    });
    return () => {
      var s;
      const {
        prefixCls: u,
        id: c,
        active: d,
        tab: {
          key: f,
          tab: g,
          disabled: m,
          closeIcon: b
        },
        renderWrapper: y,
        removeAriaLabel: S,
        editable: C,
        onFocus: O
      } = e, $ = `${u}-tab`, P = v("div", {
        key: f,
        ref: i,
        class: Te($, {
          [`${$}-with-remove`]: l.value,
          [`${$}-active`]: d,
          [`${$}-disabled`]: m
        }),
        style: o.style,
        onClick: a
      }, [v("div", {
        role: "tab",
        "aria-selected": d,
        id: c && `${c}-tab-${f}`,
        class: `${$}-btn`,
        "aria-controls": c && `${c}-panel-${f}`,
        "aria-disabled": m,
        tabindex: m ? null : 0,
        onClick: (k) => {
          k.stopPropagation(), a(k);
        },
        onKeydown: (k) => {
          [Xe.SPACE, Xe.ENTER].includes(k.which) && (k.preventDefault(), a(k));
        },
        onFocus: O
      }, [typeof g == "function" ? g() : g]), l.value && v("button", {
        type: "button",
        "aria-label": S || "remove",
        tabindex: 0,
        class: `${$}-remove`,
        onClick: (k) => {
          k.stopPropagation(), r(k);
        }
      }, [b?.() || ((s = C.removeIcon) === null || s === void 0 ? void 0 : s.call(C)) || "×"])]);
      return y ? y(P) : P;
    };
  }
}), Uy = {
  width: 0,
  height: 0,
  left: 0,
  top: 0
};
function U5(e, t) {
  const n = le(/* @__PURE__ */ new Map());
  return Ft(() => {
    var o, i;
    const a = /* @__PURE__ */ new Map(), r = e.value, l = t.value.get((o = r[0]) === null || o === void 0 ? void 0 : o.key) || Uy, s = l.left + l.width;
    for (let u = 0; u < r.length; u += 1) {
      const {
        key: c
      } = r[u];
      let d = t.value.get(c);
      d || (d = t.value.get((i = r[u - 1]) === null || i === void 0 ? void 0 : i.key) || Uy);
      const f = a.get(c) || I({}, d);
      f.right = s - f.left - f.width, a.set(c, f);
    }
    n.value = new Map(a);
  }), n;
}
const X$ = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AddButton",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    editable: {
      type: Object
    },
    locale: {
      type: Object,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const i = le();
    return n({
      domRef: i
    }), () => {
      const {
        prefixCls: a,
        editable: r,
        locale: l
      } = e;
      return !r || r.showAdd === !1 ? null : v("button", {
        ref: i,
        type: "button",
        class: `${a}-nav-add`,
        style: o.style,
        "aria-label": l?.addAriaLabel || "Add tab",
        onClick: (s) => {
          r.onEdit("add", {
            event: s
          });
        }
      }, [r.addIcon ? r.addIcon() : "+"]);
    };
  }
}), X5 = {
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  tabs: {
    type: Object
  },
  rtl: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  activeKey: {
    type: [String, Number]
  },
  mobile: {
    type: Boolean
  },
  moreIcon: ue.any,
  moreTransitionName: {
    type: String
  },
  editable: {
    type: Object
  },
  locale: {
    type: Object,
    default: void 0
  },
  removeAriaLabel: String,
  onTabClick: {
    type: Function
  },
  popupClassName: String,
  getPopupContainer: Qe()
}, Q5 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "OperationNode",
  inheritAttrs: !1,
  props: X5,
  emits: ["tabClick"],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const [i, a] = On(!1), [r, l] = On(null), s = (g) => {
      const m = e.tabs.filter((S) => !S.disabled);
      let b = m.findIndex((S) => S.key === r.value) || 0;
      const y = m.length;
      for (let S = 0; S < y; S += 1) {
        b = (b + g + y) % y;
        const C = m[b];
        if (!C.disabled) {
          l(C.key);
          return;
        }
      }
    }, u = (g) => {
      const {
        which: m
      } = g;
      if (!i.value) {
        [Xe.DOWN, Xe.SPACE, Xe.ENTER].includes(m) && (a(!0), g.preventDefault());
        return;
      }
      switch (m) {
        case Xe.UP:
          s(-1), g.preventDefault();
          break;
        case Xe.DOWN:
          s(1), g.preventDefault();
          break;
        case Xe.ESC:
          a(!1);
          break;
        case Xe.SPACE:
        case Xe.ENTER:
          r.value !== null && e.onTabClick(r.value, g);
          break;
      }
    }, c = R(() => `${e.id}-more-popup`), d = R(() => r.value !== null ? `${c.value}-${r.value}` : null), f = (g, m) => {
      g.preventDefault(), g.stopPropagation(), e.editable.onEdit("remove", {
        key: m,
        event: g
      });
    };
    return Pt(() => {
      Ie(r, () => {
        const g = document.getElementById(d.value);
        g && g.scrollIntoView && g.scrollIntoView(!1);
      }, {
        flush: "post",
        immediate: !0
      });
    }), Ie(i, () => {
      i.value || l(null);
    }), i$({}), () => {
      var g;
      const {
        prefixCls: m,
        id: b,
        tabs: y,
        locale: S,
        mobile: C,
        moreIcon: O = ((g = o.moreIcon) === null || g === void 0 ? void 0 : g.call(o)) || v(tc, null, null),
        moreTransitionName: $,
        editable: P,
        tabBarGutter: k,
        rtl: x,
        onTabClick: E,
        popupClassName: z
      } = e;
      if (!y.length) return null;
      const B = `${m}-dropdown`, D = S?.dropdownAriaLabel, W = {
        [x ? "marginRight" : "marginLeft"]: k
      };
      y.length || (W.visibility = "hidden", W.order = 1);
      const H = Te({
        [`${B}-rtl`]: x,
        [`${z}`]: !0
      }), F = C ? null : v(YC, {
        prefixCls: B,
        trigger: ["hover"],
        visible: i.value,
        transitionName: $,
        onVisibleChange: a,
        overlayClassName: H,
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        getPopupContainer: e.getPopupContainer
      }, {
        overlay: () => v(lo, {
          onClick: (A) => {
            let {
              key: U,
              domEvent: j
            } = A;
            E(U, j), a(!1);
          },
          id: c.value,
          tabindex: -1,
          role: "listbox",
          "aria-activedescendant": d.value,
          selectedKeys: [r.value],
          "aria-label": D !== void 0 ? D : "expanded dropdown"
        }, {
          default: () => [y.map((A) => {
            var U, j;
            const ae = P && A.closable !== !1 && !A.disabled;
            return v(ks, {
              key: A.key,
              id: `${c.value}-${A.key}`,
              role: "option",
              "aria-controls": b && `${b}-panel-${A.key}`,
              disabled: A.disabled
            }, {
              default: () => [v("span", null, [typeof A.tab == "function" ? A.tab() : A.tab]), ae && v("button", {
                type: "button",
                "aria-label": e.removeAriaLabel || "remove",
                tabindex: 0,
                class: `${B}-menu-item-remove`,
                onClick: (G) => {
                  G.stopPropagation(), f(G, A.key);
                }
              }, [((U = A.closeIcon) === null || U === void 0 ? void 0 : U.call(A)) || ((j = P.removeIcon) === null || j === void 0 ? void 0 : j.call(P)) || "×"])]
            });
          })]
        }),
        default: () => v("button", {
          type: "button",
          class: `${m}-nav-more`,
          style: W,
          tabindex: -1,
          "aria-hidden": "true",
          "aria-haspopup": "listbox",
          "aria-controls": c.value,
          id: `${b}-more`,
          "aria-expanded": i.value,
          onKeydown: u
        }, [O])
      });
      return v("div", {
        class: Te(`${m}-nav-operations`, n.class),
        style: n.style
      }, [F, v(X$, {
        prefixCls: m,
        locale: S,
        editable: P
      }, null)]);
    };
  }
}), Q$ = Symbol("tabsContextKey"), Z$ = (e) => {
  kt(Q$, e);
}, J$ = () => Tt(Q$, {
  tabs: le([]),
  prefixCls: le()
});
ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabsContextProvider",
  inheritAttrs: !1,
  props: {
    tabs: {
      type: Object,
      default: void 0
    },
    prefixCls: {
      type: String,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Z$(xd(e)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
const Z5 = 0.1, Xy = 0.01, fd = 20, Qy = Math.pow(0.995, fd);
function J5(e, t) {
  const [n, o] = On(), [i, a] = On(0), [r, l] = On(0), [s, u] = On(), c = le();
  function d(P) {
    const {
      screenX: k,
      screenY: x
    } = P.touches[0];
    o({
      x: k,
      y: x
    }), clearInterval(c.value);
  }
  function f(P) {
    if (!n.value) return;
    P.preventDefault();
    const {
      screenX: k,
      screenY: x
    } = P.touches[0], E = k - n.value.x, z = x - n.value.y;
    t(E, z), o({
      x: k,
      y: x
    });
    const B = Date.now();
    l(B - i.value), a(B), u({
      x: E,
      y: z
    });
  }
  function g() {
    if (!n.value) return;
    const P = s.value;
    if (o(null), u(null), P) {
      const k = P.x / r.value, x = P.y / r.value, E = Math.abs(k), z = Math.abs(x);
      if (Math.max(E, z) < Z5) return;
      let B = k, D = x;
      c.value = setInterval(() => {
        if (Math.abs(B) < Xy && Math.abs(D) < Xy) {
          clearInterval(c.value);
          return;
        }
        B *= Qy, D *= Qy, t(B * fd, D * fd);
      }, fd);
    }
  }
  const m = le();
  function b(P) {
    const {
      deltaX: k,
      deltaY: x
    } = P;
    let E = 0;
    const z = Math.abs(k), B = Math.abs(x);
    z === B ? E = m.value === "x" ? k : x : z > B ? (E = k, m.value = "x") : (E = x, m.value = "y"), t(-E, -E) && P.preventDefault();
  }
  const y = le({
    onTouchStart: d,
    onTouchMove: f,
    onTouchEnd: g,
    onWheel: b
  });
  function S(P) {
    y.value.onTouchStart(P);
  }
  function C(P) {
    y.value.onTouchMove(P);
  }
  function O(P) {
    y.value.onTouchEnd(P);
  }
  function $(P) {
    y.value.onWheel(P);
  }
  Pt(() => {
    var P, k;
    document.addEventListener("touchmove", C, {
      passive: !1
    }), document.addEventListener("touchend", O, {
      passive: !1
    }), (P = e.value) === null || P === void 0 || P.addEventListener("touchstart", S, {
      passive: !1
    }), (k = e.value) === null || k === void 0 || k.addEventListener("wheel", $, {
      passive: !1
    });
  }), At(() => {
    document.removeEventListener("touchmove", C), document.removeEventListener("touchend", O);
  });
}
function Zy(e, t) {
  const n = le(e);
  function o(i) {
    const a = typeof i == "function" ? i(n.value) : i;
    a !== n.value && t(a, n.value), n.value = a;
  }
  return [n, o];
}
const e8 = () => {
  const e = le(/* @__PURE__ */ new Map()), t = (n) => (o) => {
    e.value.set(n, o);
  };
  return jh(() => {
    e.value = /* @__PURE__ */ new Map();
  }), [t, e];
}, Jy = {
  width: 0,
  height: 0,
  left: 0,
  top: 0,
  right: 0
}, t8 = () => ({
  id: {
    type: String
  },
  tabPosition: {
    type: String
  },
  activeKey: {
    type: [String, Number]
  },
  rtl: {
    type: Boolean
  },
  animated: Ct(),
  editable: Ct(),
  moreIcon: ue.any,
  moreTransitionName: {
    type: String
  },
  mobile: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  renderTabBar: {
    type: Function
  },
  locale: Ct(),
  popupClassName: String,
  getPopupContainer: Qe(),
  onTabClick: {
    type: Function
  },
  onTabScroll: {
    type: Function
  }
}), n8 = (e, t) => {
  const {
    offsetWidth: n,
    offsetHeight: o,
    offsetTop: i,
    offsetLeft: a
  } = e, {
    width: r,
    height: l,
    x: s,
    y: u
  } = e.getBoundingClientRect();
  return Math.abs(r - n) < 1 ? [r, l, s - t.x, u - t.y] : [n, o, a, i];
}, ex = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabNavList",
  inheritAttrs: !1,
  props: t8(),
  slots: Object,
  emits: ["tabClick", "tabScroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      tabs: i,
      prefixCls: a
    } = J$(), r = Pe(), l = Pe(), s = Pe(), u = Pe(), [c, d] = e8(), f = R(() => e.tabPosition === "top" || e.tabPosition === "bottom"), [g, m] = Zy(0, (Le, Ne) => {
      f.value && e.onTabScroll && e.onTabScroll({
        direction: Le > Ne ? "left" : "right"
      });
    }), [b, y] = Zy(0, (Le, Ne) => {
      !f.value && e.onTabScroll && e.onTabScroll({
        direction: Le > Ne ? "top" : "bottom"
      });
    }), [S, C] = On(0), [O, $] = On(0), [P, k] = On(null), [x, E] = On(null), [z, B] = On(0), [D, W] = On(0), [H, F] = K5(/* @__PURE__ */ new Map()), A = U5(i, H), U = R(() => `${a.value}-nav-operations-hidden`), j = Pe(0), ae = Pe(0);
    Ft(() => {
      f.value ? e.rtl ? (j.value = 0, ae.value = Math.max(0, S.value - P.value)) : (j.value = Math.min(0, P.value - S.value), ae.value = 0) : (j.value = Math.min(0, x.value - O.value), ae.value = 0);
    });
    const G = (Le) => Le < j.value ? j.value : Le > ae.value ? ae.value : Le, Y = Pe(), [K, J] = On(), be = () => {
      J(Date.now());
    }, xe = () => {
      clearTimeout(Y.value);
    }, he = (Le, Ne) => {
      Le((Ge) => G(Ge + Ne));
    };
    J5(r, (Le, Ne) => {
      if (f.value) {
        if (P.value >= S.value)
          return !1;
        he(m, Le);
      } else {
        if (x.value >= O.value)
          return !1;
        he(y, Ne);
      }
      return xe(), be(), !0;
    }), Ie(K, () => {
      xe(), K.value && (Y.value = setTimeout(() => {
        J(0);
      }, 100));
    });
    const de = function() {
      let Le = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activeKey;
      const Ne = A.value.get(Le) || {
        width: 0,
        height: 0,
        left: 0,
        right: 0,
        top: 0
      };
      if (f.value) {
        let Ge = g.value;
        e.rtl ? Ne.right < g.value ? Ge = Ne.right : Ne.right + Ne.width > g.value + P.value && (Ge = Ne.right + Ne.width - P.value) : Ne.left < -g.value ? Ge = -Ne.left : Ne.left + Ne.width > -g.value + P.value && (Ge = -(Ne.left + Ne.width - P.value)), y(0), m(G(Ge));
      } else {
        let Ge = b.value;
        Ne.top < -b.value ? Ge = -Ne.top : Ne.top + Ne.height > -b.value + x.value && (Ge = -(Ne.top + Ne.height - x.value)), m(0), y(G(Ge));
      }
    }, ne = Pe(0), we = Pe(0);
    Ft(() => {
      let Le, Ne, Ge, it, Ke, Oe;
      const Ve = A.value;
      ["top", "bottom"].includes(e.tabPosition) ? (Le = "width", it = P.value, Ke = S.value, Oe = z.value, Ne = e.rtl ? "right" : "left", Ge = Math.abs(g.value)) : (Le = "height", it = x.value, Ke = S.value, Oe = D.value, Ne = "top", Ge = -b.value);
      let De = it;
      Ke + Oe > it && Ke < it && (De = it - Oe);
      const Je = i.value;
      if (!Je.length)
        return [ne.value, we.value] = [0, 0];
      const wt = Je.length;
      let lt = wt;
      for (let at = 0; at < wt; at += 1) {
        const dt = Ve.get(Je[at].key) || Jy;
        if (dt[Ne] + dt[Le] > Ge + De) {
          lt = at - 1;
          break;
        }
      }
      let qe = 0;
      for (let at = wt - 1; at >= 0; at -= 1)
        if ((Ve.get(Je[at].key) || Jy)[Ne] < Ge) {
          qe = at + 1;
          break;
        }
      return [ne.value, we.value] = [qe, lt];
    });
    const re = () => {
      F(() => {
        var Le;
        const Ne = /* @__PURE__ */ new Map(), Ge = (Le = l.value) === null || Le === void 0 ? void 0 : Le.getBoundingClientRect();
        return i.value.forEach((it) => {
          let {
            key: Ke
          } = it;
          const Oe = d.value.get(Ke), Ve = Oe?.$el || Oe;
          if (Ve) {
            const [De, Je, wt, lt] = n8(Ve, Ge);
            Ne.set(Ke, {
              width: De,
              height: Je,
              left: wt,
              top: lt
            });
          }
        }), Ne;
      });
    };
    Ie(() => i.value.map((Le) => Le.key).join("%%"), () => {
      re();
    }, {
      flush: "post"
    });
    const se = () => {
      var Le, Ne, Ge, it, Ke;
      const Oe = ((Le = r.value) === null || Le === void 0 ? void 0 : Le.offsetWidth) || 0, Ve = ((Ne = r.value) === null || Ne === void 0 ? void 0 : Ne.offsetHeight) || 0, De = ((Ge = u.value) === null || Ge === void 0 ? void 0 : Ge.$el) || {}, Je = De.offsetWidth || 0, wt = De.offsetHeight || 0;
      k(Oe), E(Ve), B(Je), W(wt);
      const lt = (((it = l.value) === null || it === void 0 ? void 0 : it.offsetWidth) || 0) - Je, qe = (((Ke = l.value) === null || Ke === void 0 ? void 0 : Ke.offsetHeight) || 0) - wt;
      C(lt), $(qe), re();
    }, ve = R(() => [...i.value.slice(0, ne.value), ...i.value.slice(we.value + 1)]), [Me, ke] = On(), Fe = R(() => A.value.get(e.activeKey)), Re = Pe(), We = () => {
      Mt.cancel(Re.value);
    };
    Ie([Fe, f, () => e.rtl], () => {
      const Le = {};
      Fe.value && (f.value ? (e.rtl ? Le.right = nu(Fe.value.right) : Le.left = nu(Fe.value.left), Le.width = nu(Fe.value.width)) : (Le.top = nu(Fe.value.top), Le.height = nu(Fe.value.height))), We(), Re.value = Mt(() => {
        ke(Le);
      });
    }), Ie([() => e.activeKey, Fe, A, f], () => {
      de();
    }, {
      flush: "post"
    }), Ie([() => e.rtl, () => e.tabBarGutter, () => e.activeKey, () => i.value], () => {
      se();
    }, {
      flush: "post"
    });
    const et = (Le) => {
      let {
        position: Ne,
        prefixCls: Ge,
        extra: it
      } = Le;
      if (!it) return null;
      const Ke = it?.({
        position: Ne
      });
      return Ke ? v("div", {
        class: `${Ge}-extra-content`
      }, [Ke]) : null;
    };
    return At(() => {
      xe(), We();
    }), () => {
      const {
        id: Le,
        animated: Ne,
        activeKey: Ge,
        rtl: it,
        editable: Ke,
        locale: Oe,
        tabPosition: Ve,
        tabBarGutter: De,
        onTabClick: Je
      } = e, {
        class: wt,
        style: lt
      } = n, qe = a.value, at = !!ve.value.length, dt = `${qe}-nav-wrap`;
      let vt, Rt, Xt, vn;
      f.value ? it ? (Rt = g.value > 0, vt = g.value + P.value < S.value) : (vt = g.value < 0, Rt = -g.value + P.value < S.value) : (Xt = b.value < 0, vn = -b.value + x.value < O.value);
      const Dt = {};
      Ve === "top" || Ve === "bottom" ? Dt[it ? "marginRight" : "marginLeft"] = typeof De == "number" ? `${De}px` : De : Dt.marginTop = typeof De == "number" ? `${De}px` : De;
      const zn = i.value.map((on, Qt) => {
        const {
          key: mn
        } = on;
        return v(Y5, {
          id: Le,
          prefixCls: qe,
          key: mn,
          tab: on,
          style: Qt === 0 ? void 0 : Dt,
          closable: on.closable,
          editable: Ke,
          active: mn === Ge,
          removeAriaLabel: Oe?.removeAriaLabel,
          ref: c(mn),
          onClick: (Kt) => {
            Je(mn, Kt);
          },
          onFocus: () => {
            de(mn), be(), r.value && (it || (r.value.scrollLeft = 0), r.value.scrollTop = 0);
          }
        }, o);
      });
      return v("div", {
        role: "tablist",
        class: Te(`${qe}-nav`, wt),
        style: lt,
        onKeydown: () => {
          be();
        }
      }, [v(et, {
        position: "left",
        prefixCls: qe,
        extra: o.leftExtra
      }, null), v(Ss, {
        onResize: se
      }, {
        default: () => [v("div", {
          class: Te(dt, {
            [`${dt}-ping-left`]: vt,
            [`${dt}-ping-right`]: Rt,
            [`${dt}-ping-top`]: Xt,
            [`${dt}-ping-bottom`]: vn
          }),
          ref: r
        }, [v(Ss, {
          onResize: se
        }, {
          default: () => [v("div", {
            ref: l,
            class: `${qe}-nav-list`,
            style: {
              transform: `translate(${g.value}px, ${b.value}px)`,
              transition: K.value ? "none" : void 0
            }
          }, [zn, v(X$, {
            ref: u,
            prefixCls: qe,
            locale: Oe,
            editable: Ke,
            style: I(I({}, zn.length === 0 ? void 0 : Dt), {
              visibility: at ? "hidden" : null
            })
          }, null), v("div", {
            class: Te(`${qe}-ink-bar`, {
              [`${qe}-ink-bar-animated`]: Ne.inkBar
            }),
            style: Me.value
          }, null)])]
        })])]
      }), v(Q5, Z(Z({}, e), {}, {
        removeAriaLabel: Oe?.removeAriaLabel,
        ref: s,
        prefixCls: qe,
        tabs: ve.value,
        class: !at && U.value
      }), ow(o, ["moreIcon"])), v(et, {
        position: "right",
        prefixCls: qe,
        extra: o.rightExtra
      }, null), v(et, {
        position: "right",
        prefixCls: qe,
        extra: o.tabBarExtraContent
      }, null)]);
    };
  }
}), o8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "TabPanelList",
  inheritAttrs: !1,
  props: {
    activeKey: {
      type: [String, Number]
    },
    id: {
      type: String
    },
    rtl: {
      type: Boolean
    },
    animated: {
      type: Object,
      default: void 0
    },
    tabPosition: {
      type: String
    },
    destroyInactiveTabPane: {
      type: Boolean
    }
  },
  setup(e) {
    const {
      tabs: t,
      prefixCls: n
    } = J$();
    return () => {
      const {
        id: o,
        activeKey: i,
        animated: a,
        tabPosition: r,
        rtl: l,
        destroyInactiveTabPane: s
      } = e, u = a.tabPane, c = n.value, d = t.value.findIndex((f) => f.key === i);
      return v("div", {
        class: `${c}-content-holder`
      }, [v("div", {
        class: [`${c}-content`, `${c}-content-${r}`, {
          [`${c}-content-animated`]: u
        }],
        style: d && u ? {
          [l ? "marginRight" : "marginLeft"]: `-${d}00%`
        } : null
      }, [t.value.map((f) => An(f.node, {
        key: f.key,
        prefixCls: c,
        tabKey: f.key,
        id: o,
        animated: u,
        active: f.key === i,
        destroyInactiveTabPane: s
      }))])]);
    };
  }
});
var i8 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" };
function tx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      a8(e, i, n[i]);
    });
  }
  return e;
}
function a8(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Pm = function(t, n) {
  var o = tx({}, t, n.attrs);
  return v(pn, tx({}, o, {
    icon: i8
  }), null);
};
Pm.displayName = "PlusOutlined";
Pm.inheritAttrs = !1;
const r8 = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n
  } = e;
  return [
    {
      [t]: {
        [`${t}-switch`]: {
          "&-appear, &-enter": {
            transition: "none",
            "&-start": {
              opacity: 0
            },
            "&-active": {
              opacity: 1,
              transition: `opacity ${n}`
            }
          },
          "&-leave": {
            position: "absolute",
            transition: "none",
            inset: 0,
            "&-start": {
              opacity: 1
            },
            "&-active": {
              opacity: 0,
              transition: `opacity ${n}`
            }
          }
        }
      }
    },
    // Follow code may reuse in other components
    [ya(e, "slide-up"), ya(e, "slide-down")]
  ];
}, l8 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeadBackground: o,
    tabsCardGutter: i,
    colorSplit: a
  } = e;
  return {
    [`${t}-card`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-tab`]: {
          margin: 0,
          padding: n,
          background: o,
          border: `${e.lineWidth}px ${e.lineType} ${a}`,
          transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`
        },
        [`${t}-tab-active`]: {
          color: e.colorPrimary,
          background: e.colorBgContainer
        },
        [`${t}-ink-bar`]: {
          visibility: "hidden"
        }
      },
      // ========================== Top & Bottom ==========================
      [`&${t}-top, &${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginLeft: {
              _skip_check_: !0,
              value: `${i}px`
            }
          }
        }
      },
      [`&${t}-top`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
          },
          [`${t}-tab-active`]: {
            borderBottomColor: e.colorBgContainer
          }
        }
      },
      [`&${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
          },
          [`${t}-tab-active`]: {
            borderTopColor: e.colorBgContainer
          }
        }
      },
      // ========================== Left & Right ==========================
      [`&${t}-left, &${t}-right`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginTop: `${i}px`
          }
        }
      },
      [`&${t}-left`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`
            }
          },
          [`${t}-tab-active`]: {
            borderRightColor: {
              _skip_check_: !0,
              value: e.colorBgContainer
            }
          }
        }
      },
      [`&${t}-right`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`
            }
          },
          [`${t}-tab-active`]: {
            borderLeftColor: {
              _skip_check_: !0,
              value: e.colorBgContainer
            }
          }
        }
      }
    }
  };
}, s8 = (e) => {
  const {
    componentCls: t,
    tabsHoverColor: n,
    dropdownEdgeChildVerticalPadding: o
  } = e;
  return {
    [`${t}-dropdown`]: I(I({}, Zt(e)), {
      position: "absolute",
      top: -9999,
      left: {
        _skip_check_: !0,
        value: -9999
      },
      zIndex: e.zIndexPopup,
      display: "block",
      "&-hidden": {
        display: "none"
      },
      [`${t}-dropdown-menu`]: {
        maxHeight: e.tabsDropdownHeight,
        margin: 0,
        padding: `${o}px 0`,
        overflowX: "hidden",
        overflowY: "auto",
        textAlign: {
          _skip_check_: !0,
          value: "left"
        },
        listStyleType: "none",
        backgroundColor: e.colorBgContainer,
        backgroundClip: "padding-box",
        borderRadius: e.borderRadiusLG,
        outline: "none",
        boxShadow: e.boxShadowSecondary,
        "&-item": I(I({}, Mr), {
          display: "flex",
          alignItems: "center",
          minWidth: e.tabsDropdownWidth,
          margin: 0,
          padding: `${e.paddingXXS}px ${e.paddingSM}px`,
          color: e.colorText,
          fontWeight: "normal",
          fontSize: e.fontSize,
          lineHeight: e.lineHeight,
          cursor: "pointer",
          transition: `all ${e.motionDurationSlow}`,
          "> span": {
            flex: 1,
            whiteSpace: "nowrap"
          },
          "&-remove": {
            flex: "none",
            marginLeft: {
              _skip_check_: !0,
              value: e.marginSM
            },
            color: e.colorTextDescription,
            fontSize: e.fontSizeSM,
            background: "transparent",
            border: 0,
            cursor: "pointer",
            "&:hover": {
              color: n
            }
          },
          "&:hover": {
            background: e.controlItemBgHover
          },
          "&-disabled": {
            "&, &:hover": {
              color: e.colorTextDisabled,
              background: "transparent",
              cursor: "not-allowed"
            }
          }
        })
      }
    })
  };
}, u8 = (e) => {
  const {
    componentCls: t,
    margin: n,
    colorSplit: o
  } = e;
  return {
    // ========================== Top & Bottom ==========================
    [`${t}-top, ${t}-bottom`]: {
      flexDirection: "column",
      [`> ${t}-nav, > div > ${t}-nav`]: {
        margin: `0 0 ${n}px 0`,
        "&::before": {
          position: "absolute",
          right: {
            _skip_check_: !0,
            value: 0
          },
          left: {
            _skip_check_: !0,
            value: 0
          },
          borderBottom: `${e.lineWidth}px ${e.lineType} ${o}`,
          content: "''"
        },
        [`${t}-ink-bar`]: {
          height: e.lineWidthBold,
          "&-animated": {
            transition: `width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
            right ${e.motionDurationSlow}`
          }
        },
        [`${t}-nav-wrap`]: {
          "&::before, &::after": {
            top: 0,
            bottom: 0,
            width: e.controlHeight
          },
          "&::before": {
            left: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: e.boxShadowTabsOverflowLeft
          },
          "&::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: e.boxShadowTabsOverflowRight
          },
          [`&${t}-nav-wrap-ping-left::before`]: {
            opacity: 1
          },
          [`&${t}-nav-wrap-ping-right::after`]: {
            opacity: 1
          }
        }
      }
    },
    [`${t}-top`]: {
      [`> ${t}-nav,
        > div > ${t}-nav`]: {
        "&::before": {
          bottom: 0
        },
        [`${t}-ink-bar`]: {
          bottom: 0
        }
      }
    },
    [`${t}-bottom`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        order: 1,
        marginTop: `${n}px`,
        marginBottom: 0,
        "&::before": {
          top: 0
        },
        [`${t}-ink-bar`]: {
          top: 0
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        order: 0
      }
    },
    // ========================== Left & Right ==========================
    [`${t}-left, ${t}-right`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        flexDirection: "column",
        minWidth: e.controlHeight * 1.25,
        // >>>>>>>>>>> Tab
        [`${t}-tab`]: {
          padding: `${e.paddingXS}px ${e.paddingLG}px`,
          textAlign: "center"
        },
        [`${t}-tab + ${t}-tab`]: {
          margin: `${e.margin}px 0 0 0`
        },
        // >>>>>>>>>>> Nav
        [`${t}-nav-wrap`]: {
          flexDirection: "column",
          "&::before, &::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: e.controlHeight
          },
          "&::before": {
            top: 0,
            boxShadow: e.boxShadowTabsOverflowTop
          },
          "&::after": {
            bottom: 0,
            boxShadow: e.boxShadowTabsOverflowBottom
          },
          [`&${t}-nav-wrap-ping-top::before`]: {
            opacity: 1
          },
          [`&${t}-nav-wrap-ping-bottom::after`]: {
            opacity: 1
          }
        },
        // >>>>>>>>>>> Ink Bar
        [`${t}-ink-bar`]: {
          width: e.lineWidthBold,
          "&-animated": {
            transition: `height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`
          }
        },
        [`${t}-nav-list, ${t}-nav-operations`]: {
          flex: "1 0 auto",
          flexDirection: "column"
        }
      }
    },
    [`${t}-left`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-ink-bar`]: {
          right: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        marginLeft: {
          _skip_check_: !0,
          value: `-${e.lineWidth}px`
        },
        borderLeft: {
          _skip_check_: !0,
          value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
        },
        [`> ${t}-content > ${t}-tabpane`]: {
          paddingLeft: {
            _skip_check_: !0,
            value: e.paddingLG
          }
        }
      }
    },
    [`${t}-right`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        order: 1,
        [`${t}-ink-bar`]: {
          left: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        order: 0,
        marginRight: {
          _skip_check_: !0,
          value: -e.lineWidth
        },
        borderRight: {
          _skip_check_: !0,
          value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
        },
        [`> ${t}-content > ${t}-tabpane`]: {
          paddingRight: {
            _skip_check_: !0,
            value: e.paddingLG
          }
        }
      }
    }
  };
}, c8 = (e) => {
  const {
    componentCls: t,
    padding: n
  } = e;
  return {
    [t]: {
      "&-small": {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXS}px 0`,
            fontSize: e.fontSize
          }
        }
      },
      "&-large": {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${n}px 0`,
            fontSize: e.fontSizeLG
          }
        }
      }
    },
    [`${t}-card`]: {
      [`&${t}-small`]: {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXXS * 1.5}px ${n}px`
          }
        },
        [`&${t}-bottom`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: `0 0 ${e.borderRadius}px ${e.borderRadius}px`
          }
        },
        [`&${t}-top`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: `${e.borderRadius}px ${e.borderRadius}px 0 0`
          }
        },
        [`&${t}-right`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${e.borderRadius}px ${e.borderRadius}px 0`
            }
          }
        },
        [`&${t}-left`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${e.borderRadius}px 0 0 ${e.borderRadius}px`
            }
          }
        }
      },
      [`&${t}-large`]: {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXS}px ${n}px ${e.paddingXXS * 1.5}px`
          }
        }
      }
    }
  };
}, d8 = (e) => {
  const {
    componentCls: t,
    tabsActiveColor: n,
    tabsHoverColor: o,
    iconCls: i,
    tabsHorizontalGutter: a
  } = e, r = `${t}-tab`;
  return {
    [r]: {
      position: "relative",
      display: "inline-flex",
      alignItems: "center",
      padding: `${e.paddingSM}px 0`,
      fontSize: `${e.fontSize}px`,
      background: "transparent",
      border: 0,
      outline: "none",
      cursor: "pointer",
      "&-btn, &-remove": I({
        "&:focus:not(:focus-visible), &:active": {
          color: n
        }
      }, vl(e)),
      "&-btn": {
        outline: "none",
        transition: "all 0.3s"
      },
      "&-remove": {
        flex: "none",
        marginRight: {
          _skip_check_: !0,
          value: -e.marginXXS
        },
        marginLeft: {
          _skip_check_: !0,
          value: e.marginXS
        },
        color: e.colorTextDescription,
        fontSize: e.fontSizeSM,
        background: "transparent",
        border: "none",
        outline: "none",
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      "&:hover": {
        color: o
      },
      [`&${r}-active ${r}-btn`]: {
        color: e.colorPrimary,
        textShadow: e.tabsActiveTextShadow
      },
      [`&${r}-disabled`]: {
        color: e.colorTextDisabled,
        cursor: "not-allowed"
      },
      [`&${r}-disabled ${r}-btn, &${r}-disabled ${t}-remove`]: {
        "&:focus, &:active": {
          color: e.colorTextDisabled
        }
      },
      [`& ${r}-remove ${i}`]: {
        margin: 0
      },
      [i]: {
        marginRight: {
          _skip_check_: !0,
          value: e.marginSM
        }
      }
    },
    [`${r} + ${r}`]: {
      margin: {
        _skip_check_: !0,
        value: `0 0 0 ${a}px`
      }
    }
  };
}, f8 = (e) => {
  const {
    componentCls: t,
    tabsHorizontalGutter: n,
    iconCls: o,
    tabsCardGutter: i
  } = e;
  return {
    [`${t}-rtl`]: {
      direction: "rtl",
      [`${t}-nav`]: {
        [`${t}-tab`]: {
          margin: {
            _skip_check_: !0,
            value: `0 0 0 ${n}px`
          },
          [`${t}-tab:last-of-type`]: {
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          },
          [o]: {
            marginRight: {
              _skip_check_: !0,
              value: 0
            },
            marginLeft: {
              _skip_check_: !0,
              value: `${e.marginSM}px`
            }
          },
          [`${t}-tab-remove`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${e.marginXS}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: `-${e.marginXXS}px`
            },
            [o]: {
              margin: 0
            }
          }
        }
      },
      [`&${t}-left`]: {
        [`> ${t}-nav`]: {
          order: 1
        },
        [`> ${t}-content-holder`]: {
          order: 0
        }
      },
      [`&${t}-right`]: {
        [`> ${t}-nav`]: {
          order: 0
        },
        [`> ${t}-content-holder`]: {
          order: 1
        }
      },
      // ====================== Card ======================
      [`&${t}-card${t}-top, &${t}-card${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${i}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          }
        }
      }
    },
    [`${t}-dropdown-rtl`]: {
      direction: "rtl"
    },
    [`${t}-menu-item`]: {
      [`${t}-dropdown-rtl`]: {
        textAlign: {
          _skip_check_: !0,
          value: "right"
        }
      }
    }
  };
}, p8 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeight: o,
    tabsCardGutter: i,
    tabsHoverColor: a,
    tabsActiveColor: r,
    colorSplit: l
  } = e;
  return {
    [t]: I(I(I(I({}, Zt(e)), {
      display: "flex",
      // ========================== Navigation ==========================
      [`> ${t}-nav, > div > ${t}-nav`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        alignItems: "center",
        [`${t}-nav-wrap`]: {
          position: "relative",
          display: "flex",
          flex: "auto",
          alignSelf: "stretch",
          overflow: "hidden",
          whiteSpace: "nowrap",
          transform: "translate(0)",
          // >>>>> Ping shadow
          "&::before, &::after": {
            position: "absolute",
            zIndex: 1,
            opacity: 0,
            transition: `opacity ${e.motionDurationSlow}`,
            content: "''",
            pointerEvents: "none"
          }
        },
        [`${t}-nav-list`]: {
          position: "relative",
          display: "flex",
          transition: `opacity ${e.motionDurationSlow}`
        },
        // >>>>>>>> Operations
        [`${t}-nav-operations`]: {
          display: "flex",
          alignSelf: "stretch"
        },
        [`${t}-nav-operations-hidden`]: {
          position: "absolute",
          visibility: "hidden",
          pointerEvents: "none"
        },
        [`${t}-nav-more`]: {
          position: "relative",
          padding: n,
          background: "transparent",
          border: 0,
          "&::after": {
            position: "absolute",
            right: {
              _skip_check_: !0,
              value: 0
            },
            bottom: 0,
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: e.controlHeightLG / 8,
            transform: "translateY(100%)",
            content: "''"
          }
        },
        [`${t}-nav-add`]: I({
          minWidth: `${o}px`,
          marginLeft: {
            _skip_check_: !0,
            value: `${i}px`
          },
          padding: `0 ${e.paddingXS}px`,
          background: "transparent",
          border: `${e.lineWidth}px ${e.lineType} ${l}`,
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
          outline: "none",
          cursor: "pointer",
          color: e.colorText,
          transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`,
          "&:hover": {
            color: a
          },
          "&:active, &:focus:not(:focus-visible)": {
            color: r
          }
        }, vl(e))
      },
      [`${t}-extra-content`]: {
        flex: "none"
      },
      // ============================ InkBar ============================
      [`${t}-ink-bar`]: {
        position: "absolute",
        background: e.colorPrimary,
        pointerEvents: "none"
      }
    }), d8(e)), {
      // =========================== TabPanes ===========================
      [`${t}-content`]: {
        position: "relative",
        display: "flex",
        width: "100%",
        "&-animated": {
          transition: "margin 0.3s"
        }
      },
      [`${t}-content-holder`]: {
        flex: "auto",
        minWidth: 0,
        minHeight: 0
      },
      [`${t}-tabpane`]: {
        outline: "none",
        flex: "none",
        width: "100%"
      }
    }),
    [`${t}-centered`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-nav-wrap`]: {
          [`&:not([class*='${t}-nav-wrap-ping'])`]: {
            justifyContent: "center"
          }
        }
      }
    }
  };
}, g8 = nn("Tabs", (e) => {
  const t = e.controlHeightLG, n = _t(e, {
    tabsHoverColor: e.colorPrimaryHover,
    tabsActiveColor: e.colorPrimaryActive,
    tabsCardHorizontalPadding: `${(t - Math.round(e.fontSize * e.lineHeight)) / 2 - e.lineWidth}px ${e.padding}px`,
    tabsCardHeight: t,
    tabsCardGutter: e.marginXXS / 2,
    tabsHorizontalGutter: 32,
    tabsCardHeadBackground: e.colorFillAlter,
    dropdownEdgeChildVerticalPadding: e.paddingXXS,
    tabsActiveTextShadow: "0 0 0.25px currentcolor",
    tabsDropdownHeight: 200,
    tabsDropdownWidth: 120
  });
  return [c8(n), f8(n), u8(n), s8(n), l8(n), p8(n), r8(n)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
let nx = 0;
const eP = () => ({
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  popupClassName: String,
  getPopupContainer: Qe(),
  activeKey: {
    type: [String, Number]
  },
  defaultActiveKey: {
    type: [String, Number]
  },
  direction: dn(),
  animated: tn([Boolean, Object]),
  renderTabBar: Qe(),
  tabBarGutter: {
    type: Number
  },
  tabBarStyle: Ct(),
  tabPosition: dn(),
  destroyInactiveTabPane: st(),
  hideAdd: Boolean,
  type: dn(),
  size: dn(),
  centered: Boolean,
  onEdit: Qe(),
  onChange: Qe(),
  onTabClick: Qe(),
  onTabScroll: Qe(),
  "onUpdate:activeKey": Qe(),
  // Accessibility
  locale: Ct(),
  onPrevClick: Qe(),
  onNextClick: Qe(),
  tabBarExtraContent: ue.any
});
function h8(e) {
  return e.map((t) => {
    if (No(t)) {
      const n = I({}, t.props || {});
      for (const [f, g] of Object.entries(n))
        delete n[f], n[sv(f)] = g;
      const o = t.children || {}, i = t.key !== void 0 ? t.key : void 0, {
        tab: a = o.tab,
        disabled: r,
        forceRender: l,
        closable: s,
        animated: u,
        active: c,
        destroyInactiveTabPane: d
      } = n;
      return I(I({
        key: i
      }, n), {
        node: t,
        closeIcon: o.closeIcon,
        tab: a,
        disabled: r === "" || r,
        forceRender: l === "" || l,
        closable: s === "" || s,
        animated: u === "" || u,
        active: c === "" || c,
        destroyInactiveTabPane: d === "" || d
      });
    }
    return null;
  }).filter((t) => t);
}
const v8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "InternalTabs",
  inheritAttrs: !1,
  props: I(I({}, wn(eP(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  })), {
    tabs: Po()
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    Ln(e.onPrevClick === void 0 && e.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), Ln(e.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), Ln(o.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
    const {
      prefixCls: i,
      direction: a,
      size: r,
      rootPrefixCls: l,
      getPopupContainer: s
    } = yt("tabs", e), [u, c] = g8(i), d = R(() => a.value === "rtl"), f = R(() => {
      const {
        animated: x,
        tabPosition: E
      } = e;
      return x === !1 || ["left", "right"].includes(E) ? {
        inkBar: !1,
        tabPane: !1
      } : x === !0 ? {
        inkBar: !0,
        tabPane: !0
      } : I({
        inkBar: !0,
        tabPane: !1
      }, typeof x == "object" ? x : {});
    }), [g, m] = On(!1);
    Pt(() => {
      m(Rv());
    });
    const [b, y] = jo(() => {
      var x;
      return (x = e.tabs[0]) === null || x === void 0 ? void 0 : x.key;
    }, {
      value: R(() => e.activeKey),
      defaultValue: e.defaultActiveKey
    }), [S, C] = On(() => e.tabs.findIndex((x) => x.key === b.value));
    Ft(() => {
      var x;
      let E = e.tabs.findIndex((z) => z.key === b.value);
      E === -1 && (E = Math.max(0, Math.min(S.value, e.tabs.length - 1)), y((x = e.tabs[E]) === null || x === void 0 ? void 0 : x.key)), C(E);
    });
    const [O, $] = jo(null, {
      value: R(() => e.id)
    }), P = R(() => g.value && !["left", "right"].includes(e.tabPosition) ? "top" : e.tabPosition);
    Pt(() => {
      e.id || ($(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : nx}`), nx += 1);
    });
    const k = (x, E) => {
      var z, B;
      (z = e.onTabClick) === null || z === void 0 || z.call(e, x, E);
      const D = x !== b.value;
      y(x), D && ((B = e.onChange) === null || B === void 0 || B.call(e, x));
    };
    return Z$({
      tabs: R(() => e.tabs),
      prefixCls: i
    }), () => {
      const {
        id: x,
        type: E,
        tabBarGutter: z,
        tabBarStyle: B,
        locale: D,
        destroyInactiveTabPane: W,
        renderTabBar: H = o.renderTabBar,
        onTabScroll: F,
        hideAdd: A,
        centered: U
      } = e, j = {
        id: O.value,
        activeKey: b.value,
        animated: f.value,
        tabPosition: P.value,
        rtl: d.value,
        mobile: g.value
      };
      let ae;
      E === "editable-card" && (ae = {
        onEdit: (J, be) => {
          let {
            key: xe,
            event: he
          } = be;
          var de;
          (de = e.onEdit) === null || de === void 0 || de.call(e, J === "add" ? he : xe, J);
        },
        removeIcon: () => v(wa, null, null),
        addIcon: o.addIcon ? o.addIcon : () => v(Pm, null, null),
        showAdd: A !== !0
      });
      let G;
      const Y = I(I({}, j), {
        moreTransitionName: `${l.value}-slide-up`,
        editable: ae,
        locale: D,
        tabBarGutter: z,
        onTabClick: k,
        onTabScroll: F,
        style: B,
        getPopupContainer: s.value,
        popupClassName: Te(e.popupClassName, c.value)
      });
      H ? G = H(I(I({}, Y), {
        DefaultTabBar: ex
      })) : G = v(ex, Y, ow(o, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
      const K = i.value;
      return u(v("div", Z(Z({}, n), {}, {
        id: x,
        class: Te(K, `${K}-${P.value}`, {
          [c.value]: !0,
          [`${K}-${r.value}`]: r.value,
          [`${K}-card`]: ["card", "editable-card"].includes(E),
          [`${K}-editable-card`]: E === "editable-card",
          [`${K}-centered`]: U,
          [`${K}-mobile`]: g.value,
          [`${K}-editable`]: E === "editable-card",
          [`${K}-rtl`]: d.value
        }, n.class)
      }), [G, v(o8, Z(Z({
        destroyInactiveTabPane: W
      }, j), {}, {
        animated: f.value
      }), null)]));
    };
  }
}), us = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATabs",
  inheritAttrs: !1,
  props: wn(eP(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i
    } = t;
    const a = (r) => {
      i("update:activeKey", r), i("change", r);
    };
    return () => {
      var r;
      const l = h8(to((r = o.default) === null || r === void 0 ? void 0 : r.call(o)));
      return v(v8, Z(Z(Z({}, Tn(e, ["onUpdate:activeKey"])), n), {}, {
        onChange: a,
        tabs: l
      }), o);
    };
  }
}), m8 = () => ({
  tab: ue.any,
  disabled: {
    type: Boolean
  },
  forceRender: {
    type: Boolean
  },
  closable: {
    type: Boolean
  },
  animated: {
    type: Boolean
  },
  active: {
    type: Boolean
  },
  destroyInactiveTabPane: {
    type: Boolean
  },
  // Pass by TabPaneList
  prefixCls: {
    type: String
  },
  tabKey: {
    type: [String, Number]
  },
  id: {
    type: String
  }
  // closeIcon: PropTypes.any,
}), bh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATabPane",
  inheritAttrs: !1,
  __ANT_TAB_PANE: !0,
  props: m8(),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(e.forceRender);
    Ie([() => e.active, () => e.destroyInactiveTabPane], () => {
      e.active ? i.value = !0 : e.destroyInactiveTabPane && (i.value = !1);
    }, {
      immediate: !0
    });
    const a = R(() => e.active ? {} : e.animated ? {
      visibility: "hidden",
      height: 0,
      overflowY: "hidden"
    } : {
      display: "none"
    });
    return () => {
      var r;
      const {
        prefixCls: l,
        forceRender: s,
        id: u,
        active: c,
        tabKey: d
      } = e;
      return v("div", {
        id: u && `${u}-panel-${d}`,
        role: "tabpanel",
        tabindex: c ? 0 : -1,
        "aria-labelledby": u && `${u}-tab-${d}`,
        "aria-hidden": !c,
        style: [a.value, n.style],
        class: [`${l}-tabpane`, c && `${l}-tabpane-active`, n.class]
      }, [(c || i.value || s) && ((r = o.default) === null || r === void 0 ? void 0 : r.call(o))]);
    };
  }
});
us.TabPane = bh;
us.install = function(e) {
  return e.component(us.name, us), e.component(bh.name, bh), e;
};
const b8 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    cardHeadHeight: o,
    cardPaddingBase: i,
    cardHeadTabsMarginBottom: a
  } = e;
  return I(I({
    display: "flex",
    justifyContent: "center",
    flexDirection: "column",
    minHeight: o,
    marginBottom: -1,
    padding: `0 ${i}px`,
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG,
    background: "transparent",
    borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,
    borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
  }, Tr()), {
    "&-wrapper": {
      width: "100%",
      display: "flex",
      alignItems: "center"
    },
    "&-title": I(I({
      display: "inline-block",
      flex: 1
    }, Mr), {
      [`
          > ${n}-typography,
          > ${n}-typography-edit-content
        `]: {
        insetInlineStart: 0,
        marginTop: 0,
        marginBottom: 0
      }
    }),
    [`${t}-tabs-top`]: {
      clear: "both",
      marginBottom: a,
      color: e.colorText,
      fontWeight: "normal",
      fontSize: e.fontSize,
      "&-bar": {
        borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`
      }
    }
  });
}, y8 = (e) => {
  const {
    cardPaddingBase: t,
    colorBorderSecondary: n,
    cardShadow: o,
    lineWidth: i
  } = e;
  return {
    width: "33.33%",
    padding: t,
    border: 0,
    borderRadius: 0,
    boxShadow: `
      ${i}px 0 0 0 ${n},
      0 ${i}px 0 0 ${n},
      ${i}px ${i}px 0 0 ${n},
      ${i}px 0 0 0 ${n} inset,
      0 ${i}px 0 0 ${n} inset;
    `,
    transition: `all ${e.motionDurationMid}`,
    "&-hoverable:hover": {
      position: "relative",
      zIndex: 1,
      boxShadow: o
    }
  };
}, x8 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    cardActionsLiMargin: o,
    cardActionsIconSize: i,
    colorBorderSecondary: a
  } = e;
  return I(I({
    margin: 0,
    padding: 0,
    listStyle: "none",
    background: e.colorBgContainer,
    borderTop: `${e.lineWidth}px ${e.lineType} ${a}`,
    display: "flex",
    borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `
  }, Tr()), {
    "& > li": {
      margin: o,
      color: e.colorTextDescription,
      textAlign: "center",
      "> span": {
        position: "relative",
        display: "block",
        minWidth: e.cardActionsIconSize * 2,
        fontSize: e.fontSize,
        lineHeight: e.lineHeight,
        cursor: "pointer",
        "&:hover": {
          color: e.colorPrimary,
          transition: `color ${e.motionDurationMid}`
        },
        [`a:not(${t}-btn), > ${n}`]: {
          display: "inline-block",
          width: "100%",
          color: e.colorTextDescription,
          lineHeight: `${e.fontSize * e.lineHeight}px`,
          transition: `color ${e.motionDurationMid}`,
          "&:hover": {
            color: e.colorPrimary
          }
        },
        [`> ${n}`]: {
          fontSize: i,
          lineHeight: `${i * e.lineHeight}px`
        }
      },
      "&:not(:last-child)": {
        borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${a}`
      }
    }
  });
}, w8 = (e) => I(I({
  margin: `-${e.marginXXS}px 0`,
  display: "flex"
}, Tr()), {
  "&-avatar": {
    paddingInlineEnd: e.padding
  },
  "&-detail": {
    overflow: "hidden",
    flex: 1,
    "> div:not(:last-child)": {
      marginBottom: e.marginXS
    }
  },
  "&-title": I({
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG
  }, Mr),
  "&-description": {
    color: e.colorTextDescription
  }
}), S8 = (e) => {
  const {
    componentCls: t,
    cardPaddingBase: n,
    colorFillAlter: o
  } = e;
  return {
    [`${t}-head`]: {
      padding: `0 ${n}px`,
      background: o,
      "&-title": {
        fontSize: e.fontSize
      }
    },
    [`${t}-body`]: {
      padding: `${e.padding}px ${n}px`
    }
  };
}, C8 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    overflow: "hidden",
    [`${t}-body`]: {
      userSelect: "none"
    }
  };
}, $8 = (e) => {
  const {
    componentCls: t,
    cardShadow: n,
    cardHeadPadding: o,
    colorBorderSecondary: i,
    boxShadow: a,
    cardPaddingBase: r
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      position: "relative",
      background: e.colorBgContainer,
      borderRadius: e.borderRadiusLG,
      [`&:not(${t}-bordered)`]: {
        boxShadow: a
      },
      [`${t}-head`]: b8(e),
      [`${t}-extra`]: {
        // https://stackoverflow.com/a/22429853/3040605
        marginInlineStart: "auto",
        color: "",
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`${t}-body`]: I({
        padding: r,
        borderRadius: ` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
      }, Tr()),
      [`${t}-grid`]: y8(e),
      [`${t}-cover`]: {
        "> *": {
          display: "block",
          width: "100%"
        },
        img: {
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
        }
      },
      [`${t}-actions`]: x8(e),
      [`${t}-meta`]: w8(e)
    }),
    [`${t}-bordered`]: {
      border: `${e.lineWidth}px ${e.lineType} ${i}`,
      [`${t}-cover`]: {
        marginTop: -1,
        marginInlineStart: -1,
        marginInlineEnd: -1
      }
    },
    [`${t}-hoverable`]: {
      cursor: "pointer",
      transition: `box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,
      "&:hover": {
        borderColor: "transparent",
        boxShadow: n
      }
    },
    [`${t}-contain-grid`]: {
      [`${t}-body`]: {
        display: "flex",
        flexWrap: "wrap"
      },
      [`&:not(${t}-loading) ${t}-body`]: {
        marginBlockStart: -e.lineWidth,
        marginInlineStart: -e.lineWidth,
        padding: 0
      }
    },
    [`${t}-contain-tabs`]: {
      [`> ${t}-head`]: {
        [`${t}-head-title, ${t}-extra`]: {
          paddingTop: o
        }
      }
    },
    [`${t}-type-inner`]: S8(e),
    [`${t}-loading`]: C8(e),
    [`${t}-rtl`]: {
      direction: "rtl"
    }
  };
}, P8 = (e) => {
  const {
    componentCls: t,
    cardPaddingSM: n,
    cardHeadHeightSM: o
  } = e;
  return {
    [`${t}-small`]: {
      [`> ${t}-head`]: {
        minHeight: o,
        padding: `0 ${n}px`,
        fontSize: e.fontSize,
        [`> ${t}-head-wrapper`]: {
          [`> ${t}-extra`]: {
            fontSize: e.fontSize
          }
        }
      },
      [`> ${t}-body`]: {
        padding: n
      }
    },
    [`${t}-small${t}-contain-tabs`]: {
      [`> ${t}-head`]: {
        [`${t}-head-title, ${t}-extra`]: {
          minHeight: o,
          paddingTop: 0,
          display: "flex",
          alignItems: "center"
        }
      }
    }
  };
}, O8 = nn("Card", (e) => {
  const t = _t(e, {
    cardShadow: e.boxShadowCard,
    cardHeadHeight: e.fontSizeLG * e.lineHeightLG + e.padding * 2,
    cardHeadHeightSM: e.fontSize * e.lineHeight + e.paddingXS * 2,
    cardHeadPadding: e.padding,
    cardPaddingBase: e.paddingLG,
    cardHeadTabsMarginBottom: -e.padding - e.lineWidth,
    cardActionsLiMargin: `${e.paddingSM}px 0`,
    cardActionsIconSize: e.fontSize,
    cardPaddingSM: 12
    // Fixed padding.
  });
  return [
    // Style
    $8(t),
    // Size
    P8(t)
  ];
}), I8 = () => ({
  prefixCls: String,
  width: {
    type: [Number, String]
  }
}), Om = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonTitle",
  props: I8(),
  setup(e) {
    return () => {
      const {
        prefixCls: t,
        width: n
      } = e, o = typeof n == "number" ? `${n}px` : n;
      return v("h3", {
        class: t,
        style: {
          width: o
        }
      }, null);
    };
  }
}), M8 = () => ({
  prefixCls: String,
  width: {
    type: [Number, String, Array]
  },
  rows: Number
}), T8 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonParagraph",
  props: M8(),
  setup(e) {
    const t = (n) => {
      const {
        width: o,
        rows: i = 2
      } = e;
      if (Array.isArray(o))
        return o[n];
      if (i - 1 === n)
        return o;
    };
    return () => {
      const {
        prefixCls: n,
        rows: o
      } = e, i = [...Array(o)].map((a, r) => {
        const l = t(r);
        return v("li", {
          key: r,
          style: {
            width: typeof l == "number" ? `${l}px` : l
          }
        }, null);
      });
      return v("ul", {
        class: n
      }, [i]);
    };
  }
}), _f = () => ({
  prefixCls: String,
  size: [String, Number],
  shape: String,
  active: {
    type: Boolean,
    default: void 0
  }
}), ac = (e) => {
  const {
    prefixCls: t,
    size: n,
    shape: o
  } = e, i = Te({
    [`${t}-lg`]: n === "large",
    [`${t}-sm`]: n === "small"
  }), a = Te({
    [`${t}-circle`]: o === "circle",
    [`${t}-square`]: o === "square",
    [`${t}-round`]: o === "round"
  }), r = typeof n == "number" ? {
    width: `${n}px`,
    height: `${n}px`,
    lineHeight: `${n}px`
  } : {};
  return v("span", {
    class: Te(t, i, a),
    style: r
  }, null);
};
ac.displayName = "SkeletonElement";
const k8 = new Bt("ant-skeleton-loading", {
  "0%": {
    transform: "translateX(-37.5%)"
  },
  "100%": {
    transform: "translateX(37.5%)"
  }
}), Af = (e) => ({
  height: e,
  lineHeight: `${e}px`
}), cs = (e) => I({
  width: e
}, Af(e)), E8 = (e) => ({
  position: "relative",
  // fix https://github.com/ant-design/ant-design/issues/36444
  // https://monshin.github.io/202109/css/safari-border-radius-overflow-hidden/
  /* stylelint-disable-next-line property-no-vendor-prefix,value-no-vendor-prefix */
  zIndex: 0,
  overflow: "hidden",
  background: "transparent",
  "&::after": {
    position: "absolute",
    top: 0,
    insetInlineEnd: "-150%",
    bottom: 0,
    insetInlineStart: "-150%",
    background: e.skeletonLoadingBackground,
    animationName: k8,
    animationDuration: e.skeletonLoadingMotionDuration,
    animationTimingFunction: "ease",
    animationIterationCount: "infinite",
    content: '""'
  }
}), zp = (e) => I({
  width: e * 5,
  minWidth: e * 5
}, Af(e)), _8 = (e) => {
  const {
    skeletonAvatarCls: t,
    color: n,
    controlHeight: o,
    controlHeightLG: i,
    controlHeightSM: a
  } = e;
  return {
    [`${t}`]: I({
      display: "inline-block",
      verticalAlign: "top",
      background: n
    }, cs(o)),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    },
    [`${t}${t}-lg`]: I({}, cs(i)),
    [`${t}${t}-sm`]: I({}, cs(a))
  };
}, A8 = (e) => {
  const {
    controlHeight: t,
    borderRadiusSM: n,
    skeletonInputCls: o,
    controlHeightLG: i,
    controlHeightSM: a,
    color: r
  } = e;
  return {
    [`${o}`]: I({
      display: "inline-block",
      verticalAlign: "top",
      background: r,
      borderRadius: n
    }, zp(t)),
    [`${o}-lg`]: I({}, zp(i)),
    [`${o}-sm`]: I({}, zp(a))
  };
}, ox = (e) => I({
  width: e
}, Af(e)), D8 = (e) => {
  const {
    skeletonImageCls: t,
    imageSizeBase: n,
    color: o,
    borderRadiusSM: i
  } = e;
  return {
    [`${t}`]: I(I({
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      verticalAlign: "top",
      background: o,
      borderRadius: i
    }, ox(n * 2)), {
      [`${t}-path`]: {
        fill: "#bfbfbf"
      },
      [`${t}-svg`]: I(I({}, ox(n)), {
        maxWidth: n * 4,
        maxHeight: n * 4
      }),
      [`${t}-svg${t}-svg-circle`]: {
        borderRadius: "50%"
      }
    }),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    }
  };
}, Rp = (e, t, n) => {
  const {
    skeletonButtonCls: o
  } = e;
  return {
    [`${n}${o}-circle`]: {
      width: t,
      minWidth: t,
      borderRadius: "50%"
    },
    [`${n}${o}-round`]: {
      borderRadius: t
    }
  };
}, Np = (e) => I({
  width: e * 2,
  minWidth: e * 2
}, Af(e)), z8 = (e) => {
  const {
    borderRadiusSM: t,
    skeletonButtonCls: n,
    controlHeight: o,
    controlHeightLG: i,
    controlHeightSM: a,
    color: r
  } = e;
  return I(I(I(I(I({
    [`${n}`]: I({
      display: "inline-block",
      verticalAlign: "top",
      background: r,
      borderRadius: t,
      width: o * 2,
      minWidth: o * 2
    }, Np(o))
  }, Rp(e, o, n)), {
    [`${n}-lg`]: I({}, Np(i))
  }), Rp(e, i, `${n}-lg`)), {
    [`${n}-sm`]: I({}, Np(a))
  }), Rp(e, a, `${n}-sm`));
}, R8 = (e) => {
  const {
    componentCls: t,
    skeletonAvatarCls: n,
    skeletonTitleCls: o,
    skeletonParagraphCls: i,
    skeletonButtonCls: a,
    skeletonInputCls: r,
    skeletonImageCls: l,
    controlHeight: s,
    controlHeightLG: u,
    controlHeightSM: c,
    color: d,
    padding: f,
    marginSM: g,
    borderRadius: m,
    skeletonTitleHeight: b,
    skeletonBlockRadius: y,
    skeletonParagraphLineHeight: S,
    controlHeightXS: C,
    skeletonParagraphMarginTop: O
  } = e;
  return {
    [`${t}`]: {
      display: "table",
      width: "100%",
      [`${t}-header`]: {
        display: "table-cell",
        paddingInlineEnd: f,
        verticalAlign: "top",
        // Avatar
        [`${n}`]: I({
          display: "inline-block",
          verticalAlign: "top",
          background: d
        }, cs(s)),
        [`${n}-circle`]: {
          borderRadius: "50%"
        },
        [`${n}-lg`]: I({}, cs(u)),
        [`${n}-sm`]: I({}, cs(c))
      },
      [`${t}-content`]: {
        display: "table-cell",
        width: "100%",
        verticalAlign: "top",
        // Title
        [`${o}`]: {
          width: "100%",
          height: b,
          background: d,
          borderRadius: y,
          [`+ ${i}`]: {
            marginBlockStart: c
          }
        },
        // paragraph
        [`${i}`]: {
          padding: 0,
          "> li": {
            width: "100%",
            height: S,
            listStyle: "none",
            background: d,
            borderRadius: y,
            "+ li": {
              marginBlockStart: C
            }
          }
        },
        [`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
          width: "61%"
        }
      },
      [`&-round ${t}-content`]: {
        [`${o}, ${i} > li`]: {
          borderRadius: m
        }
      }
    },
    [`${t}-with-avatar ${t}-content`]: {
      // Title
      [`${o}`]: {
        marginBlockStart: g,
        [`+ ${i}`]: {
          marginBlockStart: O
        }
      }
    },
    // Skeleton element
    [`${t}${t}-element`]: I(I(I(I({
      display: "inline-block",
      width: "auto"
    }, z8(e)), _8(e)), A8(e)), D8(e)),
    // Skeleton Block Button, Input
    [`${t}${t}-block`]: {
      width: "100%",
      [`${a}`]: {
        width: "100%"
      },
      [`${r}`]: {
        width: "100%"
      }
    },
    // With active animation
    [`${t}${t}-active`]: {
      [`
        ${o},
        ${i} > li,
        ${n},
        ${a},
        ${r},
        ${l}
      `]: I({}, E8(e))
    }
  };
}, rc = nn("Skeleton", (e) => {
  const {
    componentCls: t
  } = e, n = _t(e, {
    skeletonAvatarCls: `${t}-avatar`,
    skeletonTitleCls: `${t}-title`,
    skeletonParagraphCls: `${t}-paragraph`,
    skeletonButtonCls: `${t}-button`,
    skeletonInputCls: `${t}-input`,
    skeletonImageCls: `${t}-image`,
    imageSizeBase: e.controlHeight * 1.5,
    skeletonTitleHeight: e.controlHeight / 2,
    skeletonBlockRadius: e.borderRadiusSM,
    skeletonParagraphLineHeight: e.controlHeight / 2,
    skeletonParagraphMarginTop: e.marginLG + e.marginXXS,
    borderRadius: 100,
    skeletonLoadingBackground: `linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,
    skeletonLoadingMotionDuration: "1.4s"
  });
  return [R8(n)];
}, (e) => {
  const {
    colorFillContent: t,
    colorFill: n
  } = e;
  return {
    color: t,
    colorGradientEnd: n
  };
}), N8 = () => ({
  active: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  prefixCls: String,
  avatar: {
    type: [Boolean, Object],
    default: void 0
  },
  title: {
    type: [Boolean, Object],
    default: void 0
  },
  paragraph: {
    type: [Boolean, Object],
    default: void 0
  },
  round: {
    type: Boolean,
    default: void 0
  }
});
function Bp(e) {
  return e && typeof e == "object" ? e : {};
}
function B8(e, t) {
  return e && !t ? {
    size: "large",
    shape: "square"
  } : {
    size: "large",
    shape: "circle"
  };
}
function F8(e, t) {
  return !e && t ? {
    width: "38%"
  } : e && t ? {
    width: "50%"
  } : {};
}
function L8(e, t) {
  const n = {};
  return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
}
const Vo = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeleton",
  props: wn(N8(), {
    avatar: !1,
    title: !0,
    paragraph: !0
  }),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: i
    } = yt("skeleton", e), [a, r] = rc(o);
    return () => {
      var l;
      const {
        loading: s,
        avatar: u,
        title: c,
        paragraph: d,
        active: f,
        round: g
      } = e, m = o.value;
      if (s || e.loading === void 0) {
        const b = !!u || u === "", y = !!c || c === "", S = !!d || d === "";
        let C;
        if (b) {
          const P = I(I({
            prefixCls: `${m}-avatar`
          }, B8(y, S)), Bp(u));
          C = v("div", {
            class: `${m}-header`
          }, [v(ac, P, null)]);
        }
        let O;
        if (y || S) {
          let P;
          if (y) {
            const x = I(I({
              prefixCls: `${m}-title`
            }, F8(b, S)), Bp(c));
            P = v(Om, x, null);
          }
          let k;
          if (S) {
            const x = I(I({
              prefixCls: `${m}-paragraph`
            }, L8(b, y)), Bp(d));
            k = v(T8, x, null);
          }
          O = v("div", {
            class: `${m}-content`
          }, [P, k]);
        }
        const $ = Te(m, {
          [`${m}-with-avatar`]: b,
          [`${m}-active`]: f,
          [`${m}-rtl`]: i.value === "rtl",
          [`${m}-round`]: g,
          [r.value]: !0
        });
        return a(v("div", {
          class: $
        }, [C, O]));
      }
      return (l = n.default) === null || l === void 0 ? void 0 : l.call(n);
    };
  }
}), H8 = () => I(I({}, _f()), {
  size: String,
  block: Boolean
}), tP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonButton",
  props: wn(H8(), {
    size: "default"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = rc(t), i = R(() => Te(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v(ac, Z(Z({}, e), {}, {
      prefixCls: `${t.value}-button`
    }), null)]));
  }
}), nP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonInput",
  props: I(I({}, Tn(_f(), ["shape"])), {
    size: String,
    block: Boolean
  }),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = rc(t), i = R(() => Te(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v(ac, Z(Z({}, e), {}, {
      prefixCls: `${t.value}-input`
    }), null)]));
  }
}), V8 = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", oP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonImage",
  props: Tn(_f(), ["size", "shape", "active"]),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = rc(t), i = R(() => Te(t.value, `${t.value}-element`, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v("div", {
      class: `${t.value}-image`
    }, [v("svg", {
      viewBox: "0 0 1098 1024",
      xmlns: "http://www.w3.org/2000/svg",
      class: `${t.value}-image-svg`
    }, [v("path", {
      d: V8,
      class: `${t.value}-image-path`
    }, null)])])]));
  }
}), j8 = () => I(I({}, _f()), {
  shape: String
}), iP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonAvatar",
  props: wn(j8(), {
    size: "default",
    shape: "circle"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = yt("skeleton", e), [n, o] = rc(t), i = R(() => Te(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active
    }, o.value));
    return () => n(v("div", {
      class: i.value
    }, [v(ac, Z(Z({}, e), {}, {
      prefixCls: `${t.value}-avatar`
    }), null)]));
  }
});
Vo.Button = tP;
Vo.Avatar = iP;
Vo.Input = nP;
Vo.Image = oP;
Vo.Title = Om;
Vo.install = function(e) {
  return e.component(Vo.name, Vo), e.component(Vo.Button.name, tP), e.component(Vo.Avatar.name, iP), e.component(Vo.Input.name, nP), e.component(Vo.Image.name, oP), e.component(Vo.Title.name, Om), e;
};
const {
  TabPane: W8
} = us, q8 = () => ({
  prefixCls: String,
  title: ue.any,
  extra: ue.any,
  bordered: {
    type: Boolean,
    default: !0
  },
  bodyStyle: {
    type: Object,
    default: void 0
  },
  headStyle: {
    type: Object,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: !1
  },
  hoverable: {
    type: Boolean,
    default: !1
  },
  type: {
    type: String
  },
  size: {
    type: String
  },
  actions: ue.any,
  tabList: {
    type: Array
  },
  tabBarExtraContent: ue.any,
  activeTabKey: String,
  defaultActiveTabKey: String,
  cover: ue.any,
  onTabChange: {
    type: Function
  }
}), ds = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACard",
  inheritAttrs: !1,
  props: q8(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: a,
      size: r
    } = yt("card", e), [l, s] = O8(i), u = (f) => f.map((m, b) => Xi(m) && !lf(m) || !Xi(m) ? v("li", {
      style: {
        width: `${100 / f.length}%`
      },
      key: `action-${b}`
    }, [v("span", null, [m])]) : null), c = (f) => {
      var g;
      (g = e.onTabChange) === null || g === void 0 || g.call(e, f);
    }, d = function() {
      let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], g;
      return f.forEach((m) => {
        m && nw(m.type) && m.type.__ANT_CARD_GRID && (g = !0);
      }), g;
    };
    return () => {
      var f, g, m, b, y, S;
      const {
        headStyle: C = {},
        bodyStyle: O = {},
        loading: $,
        bordered: P = !0,
        type: k,
        tabList: x,
        hoverable: E,
        activeTabKey: z,
        defaultActiveTabKey: B,
        tabBarExtraContent: D = ou((f = n.tabBarExtraContent) === null || f === void 0 ? void 0 : f.call(n)),
        title: W = ou((g = n.title) === null || g === void 0 ? void 0 : g.call(n)),
        extra: H = ou((m = n.extra) === null || m === void 0 ? void 0 : m.call(n)),
        actions: F = ou((b = n.actions) === null || b === void 0 ? void 0 : b.call(n)),
        cover: A = ou((y = n.cover) === null || y === void 0 ? void 0 : y.call(n))
      } = e, U = to((S = n.default) === null || S === void 0 ? void 0 : S.call(n)), j = i.value, ae = {
        [`${j}`]: !0,
        [s.value]: !0,
        [`${j}-loading`]: $,
        [`${j}-bordered`]: P,
        [`${j}-hoverable`]: !!E,
        [`${j}-contain-grid`]: d(U),
        [`${j}-contain-tabs`]: x && x.length,
        [`${j}-${r.value}`]: r.value,
        [`${j}-type-${k}`]: !!k,
        [`${j}-rtl`]: a.value === "rtl"
      }, G = v(Vo, {
        loading: !0,
        active: !0,
        paragraph: {
          rows: 4
        },
        title: !1
      }, {
        default: () => [U]
      }), Y = z !== void 0, K = {
        size: "large",
        [Y ? "activeKey" : "defaultActiveKey"]: Y ? z : B,
        onChange: c,
        class: `${j}-head-tabs`
      };
      let J;
      const be = x && x.length ? v(us, K, {
        default: () => [x.map((ne) => {
          const {
            tab: we,
            slots: re
          } = ne, se = re?.tab;
          Ln(!re, "Card", "tabList slots is deprecated, Please use `customTab` instead.");
          let ve = we !== void 0 ? we : n[se] ? n[se](ne) : null;
          return ve = TA(n, "customTab", ne, () => [ve]), v(W8, {
            tab: ve,
            key: ne.key,
            disabled: ne.disabled
          }, null);
        })],
        rightExtra: D ? () => D : null
      }) : null;
      (W || H || be) && (J = v("div", {
        class: `${j}-head`,
        style: C
      }, [v("div", {
        class: `${j}-head-wrapper`
      }, [W && v("div", {
        class: `${j}-head-title`
      }, [W]), H && v("div", {
        class: `${j}-extra`
      }, [H])]), be]));
      const xe = A ? v("div", {
        class: `${j}-cover`
      }, [A]) : null, he = v("div", {
        class: `${j}-body`,
        style: O
      }, [$ ? G : U]), de = F && F.length ? v("ul", {
        class: `${j}-actions`
      }, [u(F)]) : null;
      return l(v("div", Z(Z({
        ref: "cardContainerRef"
      }, o), {}, {
        class: [ae, o.class]
      }), [J, xe, U && U.length ? he : null, de]));
    };
  }
}), G8 = () => ({
  prefixCls: String,
  title: sp(),
  description: sp(),
  avatar: sp()
}), yh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACardMeta",
  props: G8(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = yt("card", e);
    return () => {
      const i = {
        [`${o.value}-meta`]: !0
      }, a = Ii(n, e, "avatar"), r = Ii(n, e, "title"), l = Ii(n, e, "description"), s = a ? v("div", {
        class: `${o.value}-meta-avatar`
      }, [a]) : null, u = r ? v("div", {
        class: `${o.value}-meta-title`
      }, [r]) : null, c = l ? v("div", {
        class: `${o.value}-meta-description`
      }, [l]) : null, d = u || c ? v("div", {
        class: `${o.value}-meta-detail`
      }, [u, c]) : null;
      return v("div", {
        class: i
      }, [s, d]);
    };
  }
}), K8 = () => ({
  prefixCls: String,
  hoverable: {
    type: Boolean,
    default: !0
  }
}), xh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACardGrid",
  __ANT_CARD_GRID: !0,
  props: K8(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = yt("card", e), i = R(() => ({
      [`${o.value}-grid`]: !0,
      [`${o.value}-grid-hoverable`]: e.hoverable
    }));
    return () => {
      var a;
      return v("div", {
        class: i.value
      }, [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]);
    };
  }
});
ds.Meta = yh;
ds.Grid = xh;
ds.install = function(e) {
  return e.component(ds.name, ds), e.component(yh.name, yh), e.component(xh.name, xh), e;
};
const Y8 = () => ({
  prefixCls: String,
  activeKey: tn([Array, Number, String]),
  defaultActiveKey: tn([Array, Number, String]),
  accordion: st(),
  destroyInactivePanel: st(),
  bordered: st(),
  expandIcon: Qe(),
  openAnimation: ue.object,
  expandIconPosition: dn(),
  collapsible: dn(),
  ghost: st(),
  onChange: Qe(),
  "onUpdate:activeKey": Qe()
}), aP = () => ({
  openAnimation: ue.object,
  prefixCls: String,
  header: ue.any,
  headerClass: String,
  showArrow: st(),
  isActive: st(),
  destroyInactivePanel: st(),
  /** @deprecated Use `collapsible="disabled"` instead */
  disabled: st(),
  accordion: st(),
  forceRender: st(),
  expandIcon: Qe(),
  extra: ue.any,
  panelKey: tn(),
  collapsible: dn(),
  role: String,
  onItemClick: Qe()
}), U8 = (e) => {
  const {
    componentCls: t,
    collapseContentBg: n,
    padding: o,
    collapseContentPaddingHorizontal: i,
    collapseHeaderBg: a,
    collapseHeaderPadding: r,
    collapsePanelBorderRadius: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    colorText: d,
    colorTextHeading: f,
    colorTextDisabled: g,
    fontSize: m,
    lineHeight: b,
    marginSM: y,
    paddingSM: S,
    motionDurationSlow: C,
    fontSizeIcon: O
  } = e, $ = `${s}px ${u} ${c}`;
  return {
    [t]: I(I({}, Zt(e)), {
      backgroundColor: a,
      border: $,
      borderBottom: 0,
      borderRadius: `${l}px`,
      "&-rtl": {
        direction: "rtl"
      },
      [`& > ${t}-item`]: {
        borderBottom: $,
        "&:last-child": {
          [`
            &,
            & > ${t}-header`]: {
            borderRadius: `0 0 ${l}px ${l}px`
          }
        },
        [`> ${t}-header`]: {
          position: "relative",
          display: "flex",
          flexWrap: "nowrap",
          alignItems: "flex-start",
          padding: r,
          color: f,
          lineHeight: b,
          cursor: "pointer",
          transition: `all ${C}, visibility 0s`,
          [`> ${t}-header-text`]: {
            flex: "auto"
          },
          "&:focus": {
            outline: "none"
          },
          // >>>>> Arrow
          [`${t}-expand-icon`]: {
            height: m * b,
            display: "flex",
            alignItems: "center",
            paddingInlineEnd: y
          },
          [`${t}-arrow`]: I(I({}, Ls()), {
            fontSize: O,
            svg: {
              transition: `transform ${C}`
            }
          }),
          // >>>>> Text
          [`${t}-header-text`]: {
            marginInlineEnd: "auto"
          }
        },
        [`${t}-header-collapsible-only`]: {
          cursor: "default",
          [`${t}-header-text`]: {
            flex: "none",
            cursor: "pointer"
          },
          [`${t}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`${t}-icon-collapsible-only`]: {
          cursor: "default",
          [`${t}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`&${t}-no-arrow`]: {
          [`> ${t}-header`]: {
            paddingInlineStart: S
          }
        }
      },
      [`${t}-content`]: {
        color: d,
        backgroundColor: n,
        borderTop: $,
        [`& > ${t}-content-box`]: {
          padding: `${o}px ${i}px`
        },
        "&-hidden": {
          display: "none"
        }
      },
      [`${t}-item:last-child`]: {
        [`> ${t}-content`]: {
          borderRadius: `0 0 ${l}px ${l}px`
        }
      },
      [`& ${t}-item-disabled > ${t}-header`]: {
        "\n          &,\n          & > .arrow\n        ": {
          color: g,
          cursor: "not-allowed"
        }
      },
      // ========================== Icon Position ==========================
      [`&${t}-icon-position-end`]: {
        [`& > ${t}-item`]: {
          [`> ${t}-header`]: {
            [`${t}-expand-icon`]: {
              order: 1,
              paddingInlineEnd: 0,
              paddingInlineStart: y
            }
          }
        }
      }
    })
  };
}, X8 = (e) => {
  const {
    componentCls: t
  } = e, n = `> ${t}-item > ${t}-header ${t}-arrow svg`;
  return {
    [`${t}-rtl`]: {
      [n]: {
        transform: "rotate(180deg)"
      }
    }
  };
}, Q8 = (e) => {
  const {
    componentCls: t,
    collapseHeaderBg: n,
    paddingXXS: o,
    colorBorder: i
  } = e;
  return {
    [`${t}-borderless`]: {
      backgroundColor: n,
      border: 0,
      [`> ${t}-item`]: {
        borderBottom: `1px solid ${i}`
      },
      [`
        > ${t}-item:last-child,
        > ${t}-item:last-child ${t}-header
      `]: {
        borderRadius: 0
      },
      [`> ${t}-item:last-child`]: {
        borderBottom: 0
      },
      [`> ${t}-item > ${t}-content`]: {
        backgroundColor: "transparent",
        borderTop: 0
      },
      [`> ${t}-item > ${t}-content > ${t}-content-box`]: {
        paddingTop: o
      }
    }
  };
}, Z8 = (e) => {
  const {
    componentCls: t,
    paddingSM: n
  } = e;
  return {
    [`${t}-ghost`]: {
      backgroundColor: "transparent",
      border: 0,
      [`> ${t}-item`]: {
        borderBottom: 0,
        [`> ${t}-content`]: {
          backgroundColor: "transparent",
          border: 0,
          [`> ${t}-content-box`]: {
            paddingBlock: n
          }
        }
      }
    }
  };
}, J8 = nn("Collapse", (e) => {
  const t = _t(e, {
    collapseContentBg: e.colorBgContainer,
    collapseHeaderBg: e.colorFillAlter,
    collapseHeaderPadding: `${e.paddingSM}px ${e.padding}px`,
    collapsePanelBorderRadius: e.borderRadiusLG,
    collapseContentPaddingHorizontal: 16
    // Fixed value
  });
  return [U8(t), Q8(t), Z8(t), X8(t), Kv(t)];
});
function ix(e) {
  let t = e;
  if (!Array.isArray(t)) {
    const n = typeof t;
    t = n === "number" || n === "string" ? [t] : [];
  }
  return t.map((n) => String(n));
}
const Cr = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapse",
  inheritAttrs: !1,
  props: wn(Y8(), {
    accordion: !1,
    destroyInactivePanel: !1,
    bordered: !0,
    expandIconPosition: "start"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i
    } = t;
    const a = le(ix(VC([e.activeKey, e.defaultActiveKey])));
    Ie(() => e.activeKey, () => {
      a.value = ix(e.activeKey);
    }, {
      deep: !0
    });
    const {
      prefixCls: r,
      direction: l,
      rootPrefixCls: s
    } = yt("collapse", e), [u, c] = J8(r), d = R(() => {
      const {
        expandIconPosition: S
      } = e;
      return S !== void 0 ? S : l.value === "rtl" ? "end" : "start";
    }), f = (S) => {
      const {
        expandIcon: C = o.expandIcon
      } = e, O = C ? C(S) : v(xl, {
        rotate: S.isActive ? 90 : void 0
      }, null);
      return v("div", {
        class: [`${r.value}-expand-icon`, c.value],
        onClick: () => ["header", "icon"].includes(e.collapsible) && m(S.panelKey)
      }, [No(Array.isArray(C) ? O[0] : O) ? An(O, {
        class: `${r.value}-arrow`
      }, !1) : O]);
    }, g = (S) => {
      e.activeKey === void 0 && (a.value = S);
      const C = e.accordion ? S[0] : S;
      i("update:activeKey", C), i("change", C);
    }, m = (S) => {
      let C = a.value;
      if (e.accordion)
        C = C[0] === S ? [] : [S];
      else {
        C = [...C];
        const O = C.indexOf(S);
        O > -1 ? C.splice(O, 1) : C.push(S);
      }
      g(C);
    }, b = (S, C) => {
      var O, $, P;
      if (lf(S)) return;
      const k = a.value, {
        accordion: x,
        destroyInactivePanel: E,
        collapsible: z,
        openAnimation: B
      } = e, D = B || im(`${s.value}-motion-collapse`), W = String((O = S.key) !== null && O !== void 0 ? O : C), {
        header: H = (P = ($ = S.children) === null || $ === void 0 ? void 0 : $.header) === null || P === void 0 ? void 0 : P.call($),
        headerClass: F,
        collapsible: A,
        disabled: U
      } = S.props || {};
      let j = !1;
      x ? j = k[0] === W : j = k.indexOf(W) > -1;
      let ae = A ?? z;
      (U || U === "") && (ae = "disabled");
      const G = {
        key: W,
        panelKey: W,
        header: H,
        headerClass: F,
        isActive: j,
        prefixCls: r.value,
        destroyInactivePanel: E,
        openAnimation: D,
        accordion: x,
        onItemClick: ae === "disabled" ? null : m,
        expandIcon: f,
        collapsible: ae
      };
      return An(S, G);
    }, y = () => {
      var S;
      return to((S = o.default) === null || S === void 0 ? void 0 : S.call(o)).map(b);
    };
    return () => {
      const {
        accordion: S,
        bordered: C,
        ghost: O
      } = e, $ = Te(r.value, {
        [`${r.value}-borderless`]: !C,
        [`${r.value}-icon-position-${d.value}`]: !0,
        [`${r.value}-rtl`]: l.value === "rtl",
        [`${r.value}-ghost`]: !!O,
        [n.class]: !!n.class
      }, c.value);
      return u(v("div", Z(Z({
        class: $
      }, ok(n)), {}, {
        style: n.style,
        role: S ? "tablist" : null
      }), [y()]));
    };
  }
}), e3 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: aP(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Pe(!1);
    return Ft(() => {
      (e.isActive || e.forceRender) && (o.value = !0);
    }), () => {
      var i;
      if (!o.value) return null;
      const {
        prefixCls: a,
        isActive: r,
        role: l
      } = e;
      return v("div", {
        class: Te(`${a}-content`, {
          [`${a}-content-active`]: r,
          [`${a}-content-inactive`]: !r
        }),
        role: l
      }, [v("div", {
        class: `${a}-content-box`
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
    };
  }
}), wh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapsePanel",
  inheritAttrs: !1,
  props: wn(aP(), {
    showArrow: !0,
    isActive: !1,
    onItemClick() {
    },
    headerClass: "",
    forceRender: !1
  }),
  slots: Object,
  // emits: ['itemClick'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    Ln(e.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
    const {
      prefixCls: a
    } = yt("collapse", e), r = () => {
      o("itemClick", e.panelKey);
    }, l = (s) => {
      (s.key === "Enter" || s.keyCode === 13 || s.which === 13) && r();
    };
    return () => {
      var s, u;
      const {
        header: c = (s = n.header) === null || s === void 0 ? void 0 : s.call(n),
        headerClass: d,
        isActive: f,
        showArrow: g,
        destroyInactivePanel: m,
        accordion: b,
        forceRender: y,
        openAnimation: S,
        expandIcon: C = n.expandIcon,
        extra: O = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
        collapsible: $
      } = e, P = $ === "disabled", k = a.value, x = Te(`${k}-header`, {
        [d]: d,
        [`${k}-header-collapsible-only`]: $ === "header",
        [`${k}-icon-collapsible-only`]: $ === "icon"
      }), E = Te({
        [`${k}-item`]: !0,
        [`${k}-item-active`]: f,
        [`${k}-item-disabled`]: P,
        [`${k}-no-arrow`]: !g,
        [`${i.class}`]: !!i.class
      });
      let z = v("i", {
        class: "arrow"
      }, null);
      g && typeof C == "function" && (z = C(e));
      const B = Qi(v(e3, {
        prefixCls: k,
        isActive: f,
        forceRender: y,
        role: b ? "tabpanel" : null
      }, {
        default: n.default
      }), [[va, f]]), D = I({
        appear: !1,
        css: !1
      }, S);
      return v("div", Z(Z({}, i), {}, {
        class: E
      }), [v("div", {
        class: x,
        onClick: () => !["header", "icon"].includes($) && r(),
        role: b ? "tab" : "button",
        tabindex: P ? -1 : 0,
        "aria-expanded": f,
        onKeypress: l
      }, [g && z, v("span", {
        onClick: () => $ === "header" && r(),
        class: `${k}-header-text`
      }, [c]), O && v("div", {
        class: `${k}-extra`
      }, [O])]), v(Mi, D, {
        default: () => [!m || f ? B : null]
      })]);
    };
  }
});
Cr.Panel = wh;
Cr.install = function(e) {
  return e.component(Cr.name, Cr), e.component(wh.name, wh), e;
};
var t3 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
function ax(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      n3(e, i, n[i]);
    });
  }
  return e;
}
function n3(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var jd = function(t, n) {
  var o = ax({}, t, n.attrs);
  return v(pn, ax({}, o, {
    icon: t3
  }), null);
};
jd.displayName = "LeftOutlined";
jd.inheritAttrs = !1;
const rP = () => Ti() && window.document.documentElement;
let Wc;
const o3 = () => {
  if (!rP())
    return !1;
  if (Wc !== void 0)
    return Wc;
  const e = document.createElement("div");
  return e.style.display = "flex", e.style.flexDirection = "column", e.style.rowGap = "1px", e.appendChild(document.createElement("div")), e.appendChild(document.createElement("div")), document.body.appendChild(e), Wc = e.scrollHeight === 1, document.body.removeChild(e), Wc;
}, lP = (() => {
  const e = Pe(!1);
  return Pt(() => {
    e.value = o3();
  }), e;
}), sP = Symbol("rowContextKey"), i3 = (e) => {
  kt(sP, e);
}, a3 = () => Tt(sP, {
  gutter: R(() => {
  }),
  wrap: R(() => {
  }),
  supportFlexGap: R(() => {
  })
}), r3 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      display: "flex",
      flexFlow: "row wrap",
      minWidth: 0,
      "&::before, &::after": {
        display: "flex"
      },
      "&-no-wrap": {
        flexWrap: "nowrap"
      },
      // The origin of the X-axis
      "&-start": {
        justifyContent: "flex-start"
      },
      // The center of the X-axis
      "&-center": {
        justifyContent: "center"
      },
      // The opposite of the X-axis
      "&-end": {
        justifyContent: "flex-end"
      },
      "&-space-between": {
        justifyContent: "space-between"
      },
      "&-space-around ": {
        justifyContent: "space-around"
      },
      "&-space-evenly ": {
        justifyContent: "space-evenly"
      },
      // Align at the top
      "&-top": {
        alignItems: "flex-start"
      },
      // Align at the center
      "&-middle": {
        alignItems: "center"
      },
      "&-bottom": {
        alignItems: "flex-end"
      }
    }
  };
}, l3 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      position: "relative",
      maxWidth: "100%",
      // Prevent columns from collapsing when empty
      minHeight: 1
    }
  };
}, s3 = (e, t) => {
  const {
    componentCls: n,
    gridColumns: o
  } = e, i = {};
  for (let a = o; a >= 0; a--)
    a === 0 ? (i[`${n}${t}-${a}`] = {
      display: "none"
    }, i[`${n}-push-${a}`] = {
      insetInlineStart: "auto"
    }, i[`${n}-pull-${a}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${t}-push-${a}`] = {
      insetInlineStart: "auto"
    }, i[`${n}${t}-pull-${a}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${t}-offset-${a}`] = {
      marginInlineEnd: 0
    }, i[`${n}${t}-order-${a}`] = {
      order: 0
    }) : (i[`${n}${t}-${a}`] = {
      display: "block",
      flex: `0 0 ${a / o * 100}%`,
      maxWidth: `${a / o * 100}%`
    }, i[`${n}${t}-push-${a}`] = {
      insetInlineStart: `${a / o * 100}%`
    }, i[`${n}${t}-pull-${a}`] = {
      insetInlineEnd: `${a / o * 100}%`
    }, i[`${n}${t}-offset-${a}`] = {
      marginInlineStart: `${a / o * 100}%`
    }, i[`${n}${t}-order-${a}`] = {
      order: a
    });
  return i;
}, Sh = (e, t) => s3(e, t), u3 = (e, t, n) => ({
  [`@media (min-width: ${t}px)`]: I({}, Sh(e, n))
}), c3 = nn("Grid", (e) => [r3(e)]), d3 = nn("Grid", (e) => {
  const t = _t(e, {
    gridColumns: 24
    // Row is divided into 24 parts in Grid
  }), n = {
    "-sm": t.screenSMMin,
    "-md": t.screenMDMin,
    "-lg": t.screenLGMin,
    "-xl": t.screenXLMin,
    "-xxl": t.screenXXLMin
  };
  return [l3(t), Sh(t, ""), Sh(t, "-xs"), Object.keys(n).map((o) => u3(t, n[o], o)).reduce((o, i) => I(I({}, o), i), {})];
}), f3 = () => ({
  align: tn([String, Object]),
  justify: tn([String, Object]),
  prefixCls: String,
  gutter: tn([Number, Array, Object], 0),
  wrap: {
    type: Boolean,
    default: void 0
  }
}), uP = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ARow",
  inheritAttrs: !1,
  props: f3(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: a
    } = yt("row", e), [r, l] = c3(i);
    let s;
    const u = oN(), c = le({
      xs: !0,
      sm: !0,
      md: !0,
      lg: !0,
      xl: !0,
      xxl: !0
    }), d = le({
      xs: !1,
      sm: !1,
      md: !1,
      lg: !1,
      xl: !1,
      xxl: !1
    }), f = (O) => R(() => {
      if (typeof e[O] == "string")
        return e[O];
      if (typeof e[O] != "object")
        return "";
      for (let $ = 0; $ < zc.length; $++) {
        const P = zc[$];
        if (!d.value[P]) continue;
        const k = e[O][P];
        if (k !== void 0)
          return k;
      }
      return "";
    }), g = f("align"), m = f("justify"), b = lP();
    Pt(() => {
      s = u.value.subscribe((O) => {
        d.value = O;
        const $ = e.gutter || 0;
        (!Array.isArray($) && typeof $ == "object" || Array.isArray($) && (typeof $[0] == "object" || typeof $[1] == "object")) && (c.value = O);
      });
    }), At(() => {
      u.value.unsubscribe(s);
    });
    const y = R(() => {
      const O = [void 0, void 0], {
        gutter: $ = 0
      } = e;
      return (Array.isArray($) ? $ : [$, void 0]).forEach((k, x) => {
        if (typeof k == "object")
          for (let E = 0; E < zc.length; E++) {
            const z = zc[E];
            if (c.value[z] && k[z] !== void 0) {
              O[x] = k[z];
              break;
            }
          }
        else
          O[x] = k;
      }), O;
    });
    i3({
      gutter: y,
      supportFlexGap: b,
      wrap: R(() => e.wrap)
    });
    const S = R(() => Te(i.value, {
      [`${i.value}-no-wrap`]: e.wrap === !1,
      [`${i.value}-${m.value}`]: m.value,
      [`${i.value}-${g.value}`]: g.value,
      [`${i.value}-rtl`]: a.value === "rtl"
    }, o.class, l.value)), C = R(() => {
      const O = y.value, $ = {}, P = O[0] != null && O[0] > 0 ? `${O[0] / -2}px` : void 0, k = O[1] != null && O[1] > 0 ? `${O[1] / -2}px` : void 0;
      return P && ($.marginLeft = P, $.marginRight = P), b.value ? $.rowGap = `${O[1]}px` : k && ($.marginTop = k, $.marginBottom = k), $;
    });
    return () => {
      var O;
      return r(v("div", Z(Z({}, o), {}, {
        class: S.value,
        style: I(I({}, C.value), o.style)
      }), [(O = n.default) === null || O === void 0 ? void 0 : O.call(n)]));
    };
  }
});
function rl() {
  return rl = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n)
        Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, rl.apply(this, arguments);
}
function p3(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, qu(e, t);
}
function Ch(e) {
  return Ch = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, Ch(e);
}
function qu(e, t) {
  return qu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, i) {
    return o.__proto__ = i, o;
  }, qu(e, t);
}
function g3() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function pd(e, t, n) {
  return g3() ? pd = Reflect.construct.bind() : pd = function(i, a, r) {
    var l = [null];
    l.push.apply(l, a);
    var s = Function.bind.apply(i, l), u = new s();
    return r && qu(u, r.prototype), u;
  }, pd.apply(null, arguments);
}
function h3(e) {
  return Function.toString.call(e).indexOf("[native code]") !== -1;
}
function $h(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return $h = function(o) {
    if (o === null || !h3(o)) return o;
    if (typeof o != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof t < "u") {
      if (t.has(o)) return t.get(o);
      t.set(o, i);
    }
    function i() {
      return pd(o, arguments, Ch(this).constructor);
    }
    return i.prototype = Object.create(o.prototype, {
      constructor: {
        value: i,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), qu(i, o);
  }, $h(e);
}
var v3 = /%[sdj%]/g, cP = function() {
};
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (cP = function(t, n) {
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(o) {
    return typeof o == "string";
  }) && console.warn(t, n);
});
function Ph(e) {
  if (!e || !e.length) return null;
  var t = {};
  return e.forEach(function(n) {
    var o = n.field;
    t[o] = t[o] || [], t[o].push(n);
  }), t;
}
function ni(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
    n[o - 1] = arguments[o];
  var i = 0, a = n.length;
  if (typeof e == "function")
    return e.apply(null, n);
  if (typeof e == "string") {
    var r = e.replace(v3, function(l) {
      if (l === "%%")
        return "%";
      if (i >= a)
        return l;
      switch (l) {
        case "%s":
          return String(n[i++]);
        case "%d":
          return Number(n[i++]);
        case "%j":
          try {
            return JSON.stringify(n[i++]);
          } catch {
            return "[Circular]";
          }
          break;
        default:
          return l;
      }
    });
    return r;
  }
  return e;
}
function m3(e) {
  return e === "string" || e === "url" || e === "hex" || e === "email" || e === "date" || e === "pattern";
}
function so(e, t) {
  return !!(e == null || t === "array" && Array.isArray(e) && !e.length || m3(t) && typeof e == "string" && !e);
}
function b3(e, t, n) {
  var o = [], i = 0, a = e.length;
  function r(l) {
    o.push.apply(o, l || []), i++, i === a && n(o);
  }
  e.forEach(function(l) {
    t(l, r);
  });
}
function rx(e, t, n) {
  var o = 0, i = e.length;
  function a(r) {
    if (r && r.length) {
      n(r);
      return;
    }
    var l = o;
    o = o + 1, l < i ? t(e[l], a) : n([]);
  }
  a([]);
}
function y3(e) {
  var t = [];
  return Object.keys(e).forEach(function(n) {
    t.push.apply(t, e[n] || []);
  }), t;
}
var lx = /* @__PURE__ */ (function(e) {
  p3(t, e);
  function t(n, o) {
    var i;
    return i = e.call(this, "Async Validation Error") || this, i.errors = n, i.fields = o, i;
  }
  return t;
})(/* @__PURE__ */ $h(Error));
function x3(e, t, n, o, i) {
  if (t.first) {
    var a = new Promise(function(f, g) {
      var m = function(S) {
        return o(S), S.length ? g(new lx(S, Ph(S))) : f(i);
      }, b = y3(e);
      rx(b, n, m);
    });
    return a.catch(function(f) {
      return f;
    }), a;
  }
  var r = t.firstFields === !0 ? Object.keys(e) : t.firstFields || [], l = Object.keys(e), s = l.length, u = 0, c = [], d = new Promise(function(f, g) {
    var m = function(y) {
      if (c.push.apply(c, y), u++, u === s)
        return o(c), c.length ? g(new lx(c, Ph(c))) : f(i);
    };
    l.length || (o(c), f(i)), l.forEach(function(b) {
      var y = e[b];
      r.indexOf(b) !== -1 ? rx(y, n, m) : b3(y, n, m);
    });
  });
  return d.catch(function(f) {
    return f;
  }), d;
}
function w3(e) {
  return !!(e && e.message !== void 0);
}
function S3(e, t) {
  for (var n = e, o = 0; o < t.length; o++) {
    if (n == null)
      return n;
    n = n[t[o]];
  }
  return n;
}
function sx(e, t) {
  return function(n) {
    var o;
    return e.fullFields ? o = S3(t, e.fullFields) : o = t[n.field || e.fullField], w3(n) ? (n.field = n.field || e.fullField, n.fieldValue = o, n) : {
      message: typeof n == "function" ? n() : n,
      fieldValue: o,
      field: n.field || e.fullField
    };
  };
}
function ux(e, t) {
  if (t) {
    for (var n in t)
      if (t.hasOwnProperty(n)) {
        var o = t[n];
        typeof o == "object" && typeof e[n] == "object" ? e[n] = rl({}, e[n], o) : e[n] = o;
      }
  }
  return e;
}
var dP = function(t, n, o, i, a, r) {
  t.required && (!o.hasOwnProperty(t.field) || so(n, r || t.type)) && i.push(ni(a.messages.required, t.fullField));
}, C3 = function(t, n, o, i, a) {
  (/^\s+$/.test(n) || n === "") && i.push(ni(a.messages.whitespace, t.fullField));
}, qc, $3 = (function() {
  if (qc)
    return qc;
  var e = "[a-fA-F\\d:]", t = function($) {
    return $ && $.includeBoundaries ? "(?:(?<=\\s|^)(?=" + e + ")|(?<=" + e + ")(?=\\s|$))" : "";
  }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", o = "[a-fA-F\\d]{1,4}", i = (`
(?:
(?:` + o + ":){7}(?:" + o + `|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:` + o + ":){6}(?:" + n + "|:" + o + `|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:` + o + ":){5}(?::" + n + "|(?::" + o + `){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:` + o + ":){4}(?:(?::" + o + "){0,1}:" + n + "|(?::" + o + `){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:` + o + ":){3}(?:(?::" + o + "){0,2}:" + n + "|(?::" + o + `){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:` + o + ":){2}(?:(?::" + o + "){0,3}:" + n + "|(?::" + o + `){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:` + o + ":){1}(?:(?::" + o + "){0,4}:" + n + "|(?::" + o + `){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::` + o + "){0,5}:" + n + "|(?::" + o + `){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), r = new RegExp("^" + n + "$"), l = new RegExp("^" + i + "$"), s = function($) {
    return $ && $.exact ? a : new RegExp("(?:" + t($) + n + t($) + ")|(?:" + t($) + i + t($) + ")", "g");
  };
  s.v4 = function(O) {
    return O && O.exact ? r : new RegExp("" + t(O) + n + t(O), "g");
  }, s.v6 = function(O) {
    return O && O.exact ? l : new RegExp("" + t(O) + i + t(O), "g");
  };
  var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", d = s.v4().source, f = s.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", b = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", y = "(?::\\d{2,5})?", S = '(?:[/?#][^\\s"]*)?', C = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + d + "|" + f + "|" + g + m + b + ")" + y + S;
  return qc = new RegExp("(?:^" + C + "$)", "i"), qc;
}), cx = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  // url: new RegExp(
  //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  //   'i',
  // ),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
}, bu = {
  integer: function(t) {
    return bu.number(t) && parseInt(t, 10) === t;
  },
  float: function(t) {
    return bu.number(t) && !bu.integer(t);
  },
  array: function(t) {
    return Array.isArray(t);
  },
  regexp: function(t) {
    if (t instanceof RegExp)
      return !0;
    try {
      return !!new RegExp(t);
    } catch {
      return !1;
    }
  },
  date: function(t) {
    return typeof t.getTime == "function" && typeof t.getMonth == "function" && typeof t.getYear == "function" && !isNaN(t.getTime());
  },
  number: function(t) {
    return isNaN(t) ? !1 : typeof t == "number";
  },
  object: function(t) {
    return typeof t == "object" && !bu.array(t);
  },
  method: function(t) {
    return typeof t == "function";
  },
  email: function(t) {
    return typeof t == "string" && t.length <= 320 && !!t.match(cx.email);
  },
  url: function(t) {
    return typeof t == "string" && t.length <= 2048 && !!t.match($3());
  },
  hex: function(t) {
    return typeof t == "string" && !!t.match(cx.hex);
  }
}, P3 = function(t, n, o, i, a) {
  if (t.required && n === void 0) {
    dP(t, n, o, i, a);
    return;
  }
  var r = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
  r.indexOf(l) > -1 ? bu[l](n) || i.push(ni(a.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && i.push(ni(a.messages.types[l], t.fullField, t.type));
}, O3 = function(t, n, o, i, a) {
  var r = typeof t.len == "number", l = typeof t.min == "number", s = typeof t.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, d = null, f = typeof n == "number", g = typeof n == "string", m = Array.isArray(n);
  if (f ? d = "number" : g ? d = "string" : m && (d = "array"), !d)
    return !1;
  m && (c = n.length), g && (c = n.replace(u, "_").length), r ? c !== t.len && i.push(ni(a.messages[d].len, t.fullField, t.len)) : l && !s && c < t.min ? i.push(ni(a.messages[d].min, t.fullField, t.min)) : s && !l && c > t.max ? i.push(ni(a.messages[d].max, t.fullField, t.max)) : l && s && (c < t.min || c > t.max) && i.push(ni(a.messages[d].range, t.fullField, t.min, t.max));
}, Wl = "enum", I3 = function(t, n, o, i, a) {
  t[Wl] = Array.isArray(t[Wl]) ? t[Wl] : [], t[Wl].indexOf(n) === -1 && i.push(ni(a.messages[Wl], t.fullField, t[Wl].join(", ")));
}, M3 = function(t, n, o, i, a) {
  if (t.pattern) {
    if (t.pattern instanceof RegExp)
      t.pattern.lastIndex = 0, t.pattern.test(n) || i.push(ni(a.messages.pattern.mismatch, t.fullField, n, t.pattern));
    else if (typeof t.pattern == "string") {
      var r = new RegExp(t.pattern);
      r.test(n) || i.push(ni(a.messages.pattern.mismatch, t.fullField, n, t.pattern));
    }
  }
}, Gt = {
  required: dP,
  whitespace: C3,
  type: P3,
  range: O3,
  enum: I3,
  pattern: M3
}, T3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n, "string") && !t.required)
      return o();
    Gt.required(t, n, i, r, a, "string"), so(n, "string") || (Gt.type(t, n, i, r, a), Gt.range(t, n, i, r, a), Gt.pattern(t, n, i, r, a), t.whitespace === !0 && Gt.whitespace(t, n, i, r, a));
  }
  o(r);
}, k3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), n !== void 0 && Gt.type(t, n, i, r, a);
  }
  o(r);
}, E3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (n === "" && (n = void 0), so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), n !== void 0 && (Gt.type(t, n, i, r, a), Gt.range(t, n, i, r, a));
  }
  o(r);
}, _3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), n !== void 0 && Gt.type(t, n, i, r, a);
  }
  o(r);
}, A3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), so(n) || Gt.type(t, n, i, r, a);
  }
  o(r);
}, D3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), n !== void 0 && (Gt.type(t, n, i, r, a), Gt.range(t, n, i, r, a));
  }
  o(r);
}, z3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), n !== void 0 && (Gt.type(t, n, i, r, a), Gt.range(t, n, i, r, a));
  }
  o(r);
}, R3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (n == null && !t.required)
      return o();
    Gt.required(t, n, i, r, a, "array"), n != null && (Gt.type(t, n, i, r, a), Gt.range(t, n, i, r, a));
  }
  o(r);
}, N3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), n !== void 0 && Gt.type(t, n, i, r, a);
  }
  o(r);
}, B3 = "enum", F3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a), n !== void 0 && Gt[B3](t, n, i, r, a);
  }
  o(r);
}, L3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n, "string") && !t.required)
      return o();
    Gt.required(t, n, i, r, a), so(n, "string") || Gt.pattern(t, n, i, r, a);
  }
  o(r);
}, H3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n, "date") && !t.required)
      return o();
    if (Gt.required(t, n, i, r, a), !so(n, "date")) {
      var s;
      n instanceof Date ? s = n : s = new Date(n), Gt.type(t, s, i, r, a), s && Gt.range(t, s.getTime(), i, r, a);
    }
  }
  o(r);
}, V3 = function(t, n, o, i, a) {
  var r = [], l = Array.isArray(n) ? "array" : typeof n;
  Gt.required(t, n, i, r, a, l), o(r);
}, Fp = function(t, n, o, i, a) {
  var r = t.type, l = [], s = t.required || !t.required && i.hasOwnProperty(t.field);
  if (s) {
    if (so(n, r) && !t.required)
      return o();
    Gt.required(t, n, i, l, a, r), so(n, r) || Gt.type(t, n, i, l, a);
  }
  o(l);
}, j3 = function(t, n, o, i, a) {
  var r = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (so(n) && !t.required)
      return o();
    Gt.required(t, n, i, r, a);
  }
  o(r);
}, Iu = {
  string: T3,
  method: k3,
  number: E3,
  boolean: _3,
  regexp: A3,
  integer: D3,
  float: z3,
  array: R3,
  object: N3,
  enum: F3,
  pattern: L3,
  date: H3,
  url: Fp,
  hex: Fp,
  email: Fp,
  required: V3,
  any: j3
};
function Oh() {
  return {
    default: "Validation error on field %s",
    required: "%s is required",
    enum: "%s must be one of %s",
    whitespace: "%s cannot be empty",
    date: {
      format: "%s date %s is invalid for format %s",
      parse: "%s date could not be parsed, %s is invalid ",
      invalid: "%s date %s is invalid"
    },
    types: {
      string: "%s is not a %s",
      method: "%s is not a %s (function)",
      array: "%s is not an %s",
      object: "%s is not an %s",
      number: "%s is not a %s",
      date: "%s is not a %s",
      boolean: "%s is not a %s",
      integer: "%s is not an %s",
      float: "%s is not a %s",
      regexp: "%s is not a valid %s",
      email: "%s is not a valid %s",
      url: "%s is not a valid %s",
      hex: "%s is not a valid %s"
    },
    string: {
      len: "%s must be exactly %s characters",
      min: "%s must be at least %s characters",
      max: "%s cannot be longer than %s characters",
      range: "%s must be between %s and %s characters"
    },
    number: {
      len: "%s must equal %s",
      min: "%s cannot be less than %s",
      max: "%s cannot be greater than %s",
      range: "%s must be between %s and %s"
    },
    array: {
      len: "%s must be exactly %s in length",
      min: "%s cannot be less than %s in length",
      max: "%s cannot be greater than %s in length",
      range: "%s must be between %s and %s in length"
    },
    pattern: {
      mismatch: "%s value %s does not match pattern %s"
    },
    clone: function() {
      var t = JSON.parse(JSON.stringify(this));
      return t.clone = this.clone, t;
    }
  };
}
var Ih = Oh(), lc = /* @__PURE__ */ (function() {
  function e(n) {
    this.rules = null, this._messages = Ih, this.define(n);
  }
  var t = e.prototype;
  return t.define = function(o) {
    var i = this;
    if (!o)
      throw new Error("Cannot configure a schema with no rules");
    if (typeof o != "object" || Array.isArray(o))
      throw new Error("Rules must be an object");
    this.rules = {}, Object.keys(o).forEach(function(a) {
      var r = o[a];
      i.rules[a] = Array.isArray(r) ? r : [r];
    });
  }, t.messages = function(o) {
    return o && (this._messages = ux(Oh(), o)), this._messages;
  }, t.validate = function(o, i, a) {
    var r = this;
    i === void 0 && (i = {}), a === void 0 && (a = function() {
    });
    var l = o, s = i, u = a;
    if (typeof s == "function" && (u = s, s = {}), !this.rules || Object.keys(this.rules).length === 0)
      return u && u(null, l), Promise.resolve(l);
    function c(b) {
      var y = [], S = {};
      function C($) {
        if (Array.isArray($)) {
          var P;
          y = (P = y).concat.apply(P, $);
        } else
          y.push($);
      }
      for (var O = 0; O < b.length; O++)
        C(b[O]);
      y.length ? (S = Ph(y), u(y, S)) : u(null, l);
    }
    if (s.messages) {
      var d = this.messages();
      d === Ih && (d = Oh()), ux(d, s.messages), s.messages = d;
    } else
      s.messages = this.messages();
    var f = {}, g = s.keys || Object.keys(this.rules);
    g.forEach(function(b) {
      var y = r.rules[b], S = l[b];
      y.forEach(function(C) {
        var O = C;
        typeof O.transform == "function" && (l === o && (l = rl({}, l)), S = l[b] = O.transform(S)), typeof O == "function" ? O = {
          validator: O
        } : O = rl({}, O), O.validator = r.getValidationMethod(O), O.validator && (O.field = b, O.fullField = O.fullField || b, O.type = r.getType(O), f[b] = f[b] || [], f[b].push({
          rule: O,
          value: S,
          source: l,
          field: b
        }));
      });
    });
    var m = {};
    return x3(f, s, function(b, y) {
      var S = b.rule, C = (S.type === "object" || S.type === "array") && (typeof S.fields == "object" || typeof S.defaultField == "object");
      C = C && (S.required || !S.required && b.value), S.field = b.field;
      function O(k, x) {
        return rl({}, x, {
          fullField: S.fullField + "." + k,
          fullFields: S.fullFields ? [].concat(S.fullFields, [k]) : [k]
        });
      }
      function $(k) {
        k === void 0 && (k = []);
        var x = Array.isArray(k) ? k : [k];
        !s.suppressWarning && x.length && e.warning("async-validator:", x), x.length && S.message !== void 0 && (x = [].concat(S.message));
        var E = x.map(sx(S, l));
        if (s.first && E.length)
          return m[S.field] = 1, y(E);
        if (!C)
          y(E);
        else {
          if (S.required && !b.value)
            return S.message !== void 0 ? E = [].concat(S.message).map(sx(S, l)) : s.error && (E = [s.error(S, ni(s.messages.required, S.field))]), y(E);
          var z = {};
          S.defaultField && Object.keys(b.value).map(function(W) {
            z[W] = S.defaultField;
          }), z = rl({}, z, b.rule.fields);
          var B = {};
          Object.keys(z).forEach(function(W) {
            var H = z[W], F = Array.isArray(H) ? H : [H];
            B[W] = F.map(O.bind(null, W));
          });
          var D = new e(B);
          D.messages(s.messages), b.rule.options && (b.rule.options.messages = s.messages, b.rule.options.error = s.error), D.validate(b.value, b.rule.options || s, function(W) {
            var H = [];
            E && E.length && H.push.apply(H, E), W && W.length && H.push.apply(H, W), y(H.length ? H : null);
          });
        }
      }
      var P;
      if (S.asyncValidator)
        P = S.asyncValidator(S, b.value, $, b.source, s);
      else if (S.validator) {
        try {
          P = S.validator(S, b.value, $, b.source, s);
        } catch (k) {
          console.error?.(k), s.suppressValidatorError || setTimeout(function() {
            throw k;
          }, 0), $(k.message);
        }
        P === !0 ? $() : P === !1 ? $(typeof S.message == "function" ? S.message(S.fullField || S.field) : S.message || (S.fullField || S.field) + " fails") : P instanceof Array ? $(P) : P instanceof Error && $(P.message);
      }
      P && P.then && P.then(function() {
        return $();
      }, function(k) {
        return $(k);
      });
    }, function(b) {
      c(b);
    }, l);
  }, t.getType = function(o) {
    if (o.type === void 0 && o.pattern instanceof RegExp && (o.type = "pattern"), typeof o.validator != "function" && o.type && !Iu.hasOwnProperty(o.type))
      throw new Error(ni("Unknown rule type %s", o.type));
    return o.type || "string";
  }, t.getValidationMethod = function(o) {
    if (typeof o.validator == "function")
      return o.validator;
    var i = Object.keys(o), a = i.indexOf("message");
    return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? Iu.required : Iu[this.getType(o)] || void 0;
  }, e;
})();
lc.register = function(t, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  Iu[t] = n;
};
lc.warning = cP;
lc.messages = Ih;
lc.validators = Iu;
function $r(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function fP(e, t) {
  let n = e;
  for (let o = 0; o < t.length; o += 1) {
    if (n == null)
      return;
    n = n[t[o]];
  }
  return n;
}
function pP(e, t, n, o) {
  if (!t.length)
    return n;
  const [i, ...a] = t;
  let r;
  return !e && typeof i == "number" ? r = [] : Array.isArray(e) ? r = [...e] : r = I({}, e), o && n === void 0 && a.length === 1 ? delete r[i][a[0]] : r[i] = pP(r[i], a, n, o), r;
}
function W3(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return t.length && o && n === void 0 && !fP(e, t.slice(0, -1)) ? e : pP(e, t, n, o);
}
function Mh(e) {
  return $r(e);
}
function q3(e, t) {
  return fP(e, t);
}
function G3(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return W3(e, t, n, o);
}
function K3(e, t) {
  return e && e.some((n) => U3(n, t));
}
function dx(e) {
  return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
}
function gP(e, t) {
  const n = Array.isArray(e) ? [...e] : I({}, e);
  return t && Object.keys(t).forEach((o) => {
    const i = n[o], a = t[o], r = dx(i) && dx(a);
    n[o] = r ? gP(i, a || {}) : a;
  }), n;
}
function Y3(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
    n[o - 1] = arguments[o];
  return n.reduce((i, a) => gP(i, a), e);
}
function fx(e, t) {
  let n = {};
  return t.forEach((o) => {
    const i = q3(e, o);
    n = G3(n, o, i);
  }), n;
}
function U3(e, t) {
  return !e || !t || e.length !== t.length ? !1 : e.every((n, o) => t[o] === n);
}
const Uo = "'${name}' is not a valid ${type}", Df = {
  default: "Validation error on field '${name}'",
  required: "'${name}' is required",
  enum: "'${name}' must be one of [${enum}]",
  whitespace: "'${name}' cannot be empty",
  date: {
    format: "'${name}' is invalid for format date",
    parse: "'${name}' could not be parsed as date",
    invalid: "'${name}' is invalid date"
  },
  types: {
    string: Uo,
    method: Uo,
    array: Uo,
    object: Uo,
    number: Uo,
    date: Uo,
    boolean: Uo,
    integer: Uo,
    float: Uo,
    regexp: Uo,
    email: Uo,
    url: Uo,
    hex: Uo
  },
  string: {
    len: "'${name}' must be exactly ${len} characters",
    min: "'${name}' must be at least ${min} characters",
    max: "'${name}' cannot be longer than ${max} characters",
    range: "'${name}' must be between ${min} and ${max} characters"
  },
  number: {
    len: "'${name}' must equal ${len}",
    min: "'${name}' cannot be less than ${min}",
    max: "'${name}' cannot be greater than ${max}",
    range: "'${name}' must be between ${min} and ${max}"
  },
  array: {
    len: "'${name}' must be exactly ${len} in length",
    min: "'${name}' cannot be less than ${min} in length",
    max: "'${name}' cannot be greater than ${max} in length",
    range: "'${name}' must be between ${min} and ${max} in length"
  },
  pattern: {
    mismatch: "'${name}' does not match pattern ${pattern}"
  }
};
var zf = function(e, t, n, o) {
  function i(a) {
    return a instanceof n ? a : new n(function(r) {
      r(a);
    });
  }
  return new (n || (n = Promise))(function(a, r) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        r(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        r(d);
      }
    }
    function u(c) {
      c.done ? a(c.value) : i(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const X3 = lc;
function Q3(e, t) {
  return e.replace(/\$\{\w+\}/g, (n) => {
    const o = n.slice(2, -1);
    return t[o];
  });
}
function Th(e, t, n, o, i) {
  return zf(this, void 0, void 0, function* () {
    const a = I({}, n);
    delete a.ruleIndex, delete a.trigger;
    let r = null;
    a && a.type === "array" && a.defaultField && (r = a.defaultField, delete a.defaultField);
    const l = new X3({
      [e]: [a]
    }), s = Y3({}, Df, o.validateMessages);
    l.messages(s);
    let u = [];
    try {
      yield Promise.resolve(l.validate({
        [e]: t
      }, I({}, o)));
    } catch (f) {
      f.errors ? u = f.errors.map((g, m) => {
        let {
          message: b
        } = g;
        return (
          // Wrap VueNode with `key`
          No(b) ? gl(b, {
            key: `error_${m}`
          }) : b
        );
      }) : (console.error(f), u = [s.default()]);
    }
    if (!u.length && r)
      return (yield Promise.all(t.map((g, m) => Th(`${e}.${m}`, g, r, o, i)))).reduce((g, m) => [...g, ...m], []);
    const c = I(I(I({}, n), {
      name: e,
      enum: (n.enum || []).join(", ")
    }), i);
    return u.map((f) => typeof f == "string" ? Q3(f, c) : f);
  });
}
function hP(e, t, n, o, i, a) {
  const r = e.join("."), l = n.map((u, c) => {
    const d = u.validator, f = I(I({}, u), {
      ruleIndex: c
    });
    return d && (f.validator = (g, m, b) => {
      let y = !1;
      const C = d(g, m, function() {
        for (var O = arguments.length, $ = new Array(O), P = 0; P < O; P++)
          $[P] = arguments[P];
        Promise.resolve().then(() => {
          yo(!y, "Your validator function has already return a promise. `callback` will be ignored."), y || b(...$);
        });
      });
      y = C && typeof C.then == "function" && typeof C.catch == "function", yo(y, "`callback` is deprecated. Please return a promise instead."), y && C.then(() => {
        b();
      }).catch((O) => {
        b(O || " ");
      });
    }), f;
  }).sort((u, c) => {
    let {
      warningOnly: d,
      ruleIndex: f
    } = u, {
      warningOnly: g,
      ruleIndex: m
    } = c;
    return !!d == !!g ? f - m : d ? 1 : -1;
  });
  let s;
  if (i === !0)
    s = new Promise((u, c) => zf(this, void 0, void 0, function* () {
      for (let d = 0; d < l.length; d += 1) {
        const f = l[d], g = yield Th(r, t, f, o, a);
        if (g.length) {
          c([{
            errors: g,
            rule: f
          }]);
          return;
        }
      }
      u([]);
    }));
  else {
    const u = l.map((c) => Th(r, t, c, o, a).then((d) => ({
      errors: d,
      rule: c
    })));
    s = (i ? J3(u) : Z3(u)).then((c) => Promise.reject(c));
  }
  return s.catch((u) => u), s;
}
function Z3(e) {
  return zf(this, void 0, void 0, function* () {
    return Promise.all(e).then((t) => [].concat(...t));
  });
}
function J3(e) {
  return zf(this, void 0, void 0, function* () {
    let t = 0;
    return new Promise((n) => {
      e.forEach((o) => {
        o.then((i) => {
          i.errors.length && n([i]), t += 1, t === e.length && n([]);
        });
      });
    });
  });
}
const vP = Symbol("formContextKey"), mP = (e) => {
  kt(vP, e);
}, Im = () => Tt(vP, {
  name: R(() => {
  }),
  labelAlign: R(() => "right"),
  vertical: R(() => !1),
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  addField: (e, t) => {
  },
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  removeField: (e) => {
  },
  model: R(() => {
  }),
  rules: R(() => {
  }),
  colon: R(() => {
  }),
  labelWrap: R(() => {
  }),
  labelCol: R(() => {
  }),
  requiredMark: R(() => !1),
  validateTrigger: R(() => {
  }),
  onValidate: () => {
  },
  validateMessages: R(() => Df)
}), bP = Symbol("formItemPrefixContextKey"), eB = (e) => {
  kt(bP, e);
}, tB = () => Tt(bP, {
  prefixCls: R(() => "")
});
function nB(e) {
  return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
}
const oB = () => ({
  span: [String, Number],
  order: [String, Number],
  offset: [String, Number],
  push: [String, Number],
  pull: [String, Number],
  xs: {
    type: [String, Number, Object],
    default: void 0
  },
  sm: {
    type: [String, Number, Object],
    default: void 0
  },
  md: {
    type: [String, Number, Object],
    default: void 0
  },
  lg: {
    type: [String, Number, Object],
    default: void 0
  },
  xl: {
    type: [String, Number, Object],
    default: void 0
  },
  xxl: {
    type: [String, Number, Object],
    default: void 0
  },
  prefixCls: String,
  flex: [String, Number]
}), iB = ["xs", "sm", "md", "lg", "xl", "xxl"], Mm = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACol",
  inheritAttrs: !1,
  props: oB(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      gutter: i,
      supportFlexGap: a,
      wrap: r
    } = a3(), {
      prefixCls: l,
      direction: s
    } = yt("col", e), [u, c] = d3(l), d = R(() => {
      const {
        span: g,
        order: m,
        offset: b,
        push: y,
        pull: S
      } = e, C = l.value;
      let O = {};
      return iB.forEach(($) => {
        let P = {};
        const k = e[$];
        typeof k == "number" ? P.span = k : typeof k == "object" && (P = k || {}), O = I(I({}, O), {
          [`${C}-${$}-${P.span}`]: P.span !== void 0,
          [`${C}-${$}-order-${P.order}`]: P.order || P.order === 0,
          [`${C}-${$}-offset-${P.offset}`]: P.offset || P.offset === 0,
          [`${C}-${$}-push-${P.push}`]: P.push || P.push === 0,
          [`${C}-${$}-pull-${P.pull}`]: P.pull || P.pull === 0,
          [`${C}-rtl`]: s.value === "rtl"
        });
      }), Te(C, {
        [`${C}-${g}`]: g !== void 0,
        [`${C}-order-${m}`]: m,
        [`${C}-offset-${b}`]: b,
        [`${C}-push-${y}`]: y,
        [`${C}-pull-${S}`]: S
      }, O, o.class, c.value);
    }), f = R(() => {
      const {
        flex: g
      } = e, m = i.value, b = {};
      if (m && m[0] > 0) {
        const y = `${m[0] / 2}px`;
        b.paddingLeft = y, b.paddingRight = y;
      }
      if (m && m[1] > 0 && !a.value) {
        const y = `${m[1] / 2}px`;
        b.paddingTop = y, b.paddingBottom = y;
      }
      return g && (b.flex = nB(g), r.value === !1 && !b.minWidth && (b.minWidth = 0)), b;
    });
    return () => {
      var g;
      return u(v("div", Z(Z({}, o), {}, {
        class: d.value,
        style: [f.value, o.style]
      }), [(g = n.default) === null || g === void 0 ? void 0 : g.call(n)]));
    };
  }
});
var aB = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
function px(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      rB(e, i, n[i]);
    });
  }
  return e;
}
function rB(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Tm = function(t, n) {
  var o = px({}, t, n.attrs);
  return v(pn, px({}, o, {
    icon: aB
  }), null);
};
Tm.displayName = "QuestionCircleOutlined";
Tm.inheritAttrs = !1;
const km = (e, t) => {
  let {
    slots: n,
    emit: o,
    attrs: i
  } = t;
  var a, r, l, s, u;
  const {
    prefixCls: c,
    htmlFor: d,
    labelCol: f,
    labelAlign: g,
    colon: m,
    required: b,
    requiredMark: y
  } = I(I({}, e), i), [S] = Bs("Form"), C = (a = e.label) !== null && a !== void 0 ? a : (r = n.label) === null || r === void 0 ? void 0 : r.call(n);
  if (!C) return null;
  const {
    vertical: O,
    labelAlign: $,
    labelCol: P,
    labelWrap: k,
    colon: x
  } = Im(), E = f || P?.value || {}, z = g || $?.value, B = `${c}-item-label`, D = Te(B, z === "left" && `${B}-left`, E.class, {
    [`${B}-wrap`]: !!k.value
  });
  let W = C;
  const H = m === !0 || x?.value !== !1 && m !== !1;
  if (H && !O.value && typeof C == "string" && C.trim() !== "" && (W = C.replace(/[:|：]\s*$/, "")), e.tooltip || n.tooltip) {
    const U = v("span", {
      class: `${c}-item-tooltip`
    }, [v(xo, {
      title: e.tooltip
    }, {
      default: () => [v(Tm, null, null)]
    })]);
    W = v(He, null, [W, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
      class: `${c}-item-tooltip`
    }) : U]);
  }
  y === "optional" && !b && (W = v(He, null, [W, v("span", {
    class: `${c}-item-optional`
  }, [((s = S.value) === null || s === void 0 ? void 0 : s.optional) || ((u = Ir.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  const A = Te({
    [`${c}-item-required`]: b,
    [`${c}-item-required-mark-optional`]: y === "optional",
    [`${c}-item-no-colon`]: !H
  });
  return v(Mm, Z(Z({}, E), {}, {
    class: D
  }), {
    default: () => [v("label", {
      for: d,
      class: A,
      title: typeof C == "string" ? C : "",
      onClick: (U) => o("click", U)
    }, [W])]
  });
};
km.displayName = "FormItemLabel";
km.inheritAttrs = !1;
const lB = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-show-help`, o = `${t}-show-help-item`;
  return {
    [n]: {
      // Explain holder
      transition: `opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,
      "&-appear, &-enter": {
        opacity: 0,
        "&-active": {
          opacity: 1
        }
      },
      "&-leave": {
        opacity: 1,
        "&-active": {
          opacity: 0
        }
      },
      // Explain
      [o]: {
        overflow: "hidden",
        transition: `height ${e.motionDurationSlow} ${e.motionEaseInOut},
                     opacity ${e.motionDurationSlow} ${e.motionEaseInOut},
                     transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,
        [`&${o}-appear, &${o}-enter`]: {
          transform: "translateY(-5px)",
          opacity: 0,
          "&-active": {
            transform: "translateY(0)",
            opacity: 1
          }
        },
        [`&${o}-leave-active`]: {
          transform: "translateY(-5px)"
        }
      }
    }
  };
}, sB = (e) => ({
  legend: {
    display: "block",
    width: "100%",
    marginBottom: e.marginLG,
    padding: 0,
    color: e.colorTextDescription,
    fontSize: e.fontSizeLG,
    lineHeight: "inherit",
    border: 0,
    borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
  },
  label: {
    fontSize: e.fontSize
  },
  'input[type="search"]': {
    boxSizing: "border-box"
  },
  // Position radios and checkboxes better
  'input[type="radio"], input[type="checkbox"]': {
    lineHeight: "normal"
  },
  'input[type="file"]': {
    display: "block"
  },
  // Make range inputs behave like textual form controls
  'input[type="range"]': {
    display: "block",
    width: "100%"
  },
  // Make multiple select elements height not fixed
  "select[multiple], select[size]": {
    height: "auto"
  },
  // Focus for file, radio, and checkbox
  "input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus": {
    outline: 0,
    boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
  },
  // Adjust output element
  output: {
    display: "block",
    paddingTop: 15,
    color: e.colorText,
    fontSize: e.fontSize,
    lineHeight: e.lineHeight
  }
}), gx = (e, t) => {
  const {
    formItemCls: n
  } = e;
  return {
    [n]: {
      [`${n}-label > label`]: {
        height: t
      },
      [`${n}-control-input`]: {
        minHeight: t
      }
    }
  };
}, uB = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [e.componentCls]: I(I(I({}, Zt(e)), sB(e)), {
      [`${t}-text`]: {
        display: "inline-block",
        paddingInlineEnd: e.paddingSM
      },
      // ================================================================
      // =                             Size                             =
      // ================================================================
      "&-small": I({}, gx(e, e.controlHeightSM)),
      "&-large": I({}, gx(e, e.controlHeightLG))
    })
  };
}, cB = (e) => {
  const {
    formItemCls: t,
    iconCls: n,
    componentCls: o,
    rootPrefixCls: i
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      marginBottom: e.marginLG,
      verticalAlign: "top",
      "&-with-help": {
        transition: "none"
      },
      [`&-hidden,
        &-hidden.${i}-row`]: {
        // https://github.com/ant-design/ant-design/issues/26141
        display: "none"
      },
      "&-has-warning": {
        [`${t}-split`]: {
          color: e.colorError
        }
      },
      "&-has-error": {
        [`${t}-split`]: {
          color: e.colorWarning
        }
      },
      // ==============================================================
      // =                            Label                           =
      // ==============================================================
      [`${t}-label`]: {
        display: "inline-block",
        flexGrow: 0,
        overflow: "hidden",
        whiteSpace: "nowrap",
        textAlign: "end",
        verticalAlign: "middle",
        "&-left": {
          textAlign: "start"
        },
        "&-wrap": {
          overflow: "unset",
          lineHeight: `${e.lineHeight} - 0.25em`,
          whiteSpace: "unset"
        },
        "> label": {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          maxWidth: "100%",
          height: e.controlHeight,
          color: e.colorTextHeading,
          fontSize: e.fontSize,
          [`> ${n}`]: {
            fontSize: e.fontSize,
            verticalAlign: "top"
          },
          // Required mark
          [`&${t}-required:not(${t}-required-mark-optional)::before`]: {
            display: "inline-block",
            marginInlineEnd: e.marginXXS,
            color: e.colorError,
            fontSize: e.fontSize,
            fontFamily: "SimSun, sans-serif",
            lineHeight: 1,
            content: '"*"',
            [`${o}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${t}-optional`]: {
            display: "inline-block",
            marginInlineStart: e.marginXXS,
            color: e.colorTextDescription,
            [`${o}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${t}-tooltip`]: {
            color: e.colorTextDescription,
            cursor: "help",
            writingMode: "horizontal-tb",
            marginInlineStart: e.marginXXS
          },
          "&::after": {
            content: '":"',
            position: "relative",
            marginBlock: 0,
            marginInlineStart: e.marginXXS / 2,
            marginInlineEnd: e.marginXS
          },
          [`&${t}-no-colon::after`]: {
            content: '" "'
          }
        }
      },
      // ==============================================================
      // =                            Input                           =
      // ==============================================================
      [`${t}-control`]: {
        display: "flex",
        flexDirection: "column",
        flexGrow: 1,
        [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
          width: "100%"
        },
        "&-input": {
          position: "relative",
          display: "flex",
          alignItems: "center",
          minHeight: e.controlHeight,
          "&-content": {
            flex: "auto",
            maxWidth: "100%"
          }
        }
      },
      // ==============================================================
      // =                           Explain                          =
      // ==============================================================
      [t]: {
        "&-explain, &-extra": {
          clear: "both",
          color: e.colorTextDescription,
          fontSize: e.fontSize,
          lineHeight: e.lineHeight
        },
        "&-explain-connected": {
          width: "100%"
        },
        "&-extra": {
          minHeight: e.controlHeightSM,
          transition: `color ${e.motionDurationMid} ${e.motionEaseOut}`
          // sync input color transition
        },
        "&-explain": {
          "&-error": {
            color: e.colorError
          },
          "&-warning": {
            color: e.colorWarning
          }
        }
      },
      [`&-with-help ${t}-explain`]: {
        height: "auto",
        opacity: 1
      },
      // ==============================================================
      // =                        Feedback Icon                       =
      // ==============================================================
      [`${t}-feedback-icon`]: {
        fontSize: e.fontSize,
        textAlign: "center",
        visibility: "visible",
        animationName: Gv,
        animationDuration: e.motionDurationMid,
        animationTimingFunction: e.motionEaseOutBack,
        pointerEvents: "none",
        "&-success": {
          color: e.colorSuccess
        },
        "&-error": {
          color: e.colorError
        },
        "&-warning": {
          color: e.colorWarning
        },
        "&-validating": {
          color: e.colorPrimary
        }
      }
    })
  };
}, dB = (e) => {
  const {
    componentCls: t,
    formItemCls: n,
    rootPrefixCls: o
  } = e;
  return {
    [`${t}-horizontal`]: {
      [`${n}-label`]: {
        flexGrow: 0
      },
      [`${n}-control`]: {
        flex: "1 1 0",
        // https://github.com/ant-design/ant-design/issues/32777
        // https://github.com/ant-design/ant-design/issues/33773
        minWidth: 0
      },
      // https://github.com/ant-design/ant-design/issues/32980
      [`${n}-label.${o}-col-24 + ${n}-control`]: {
        minWidth: "unset"
      }
    }
  };
}, fB = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${t}-inline`]: {
      display: "flex",
      flexWrap: "wrap",
      [n]: {
        flex: "none",
        flexWrap: "nowrap",
        marginInlineEnd: e.margin,
        marginBottom: 0,
        "&-with-help": {
          marginBottom: e.marginLG
        },
        [`> ${n}-label,
        > ${n}-control`]: {
          display: "inline-block",
          verticalAlign: "top"
        },
        [`> ${n}-label`]: {
          flex: "none"
        },
        [`${t}-text`]: {
          display: "inline-block"
        },
        [`${n}-has-feedback`]: {
          display: "inline-block"
        }
      }
    }
  };
}, Jl = (e) => ({
  margin: 0,
  padding: `0 0 ${e.paddingXS}px`,
  whiteSpace: "initial",
  textAlign: "start",
  "> label": {
    margin: 0,
    "&::after": {
      display: "none"
    }
  }
}), pB = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${n} ${n}-label`]: Jl(e),
    [t]: {
      [n]: {
        flexWrap: "wrap",
        [`${n}-label,
          ${n}-control`]: {
          flex: "0 0 100%",
          maxWidth: "100%"
        }
      }
    }
  };
}, gB = (e) => {
  const {
    componentCls: t,
    formItemCls: n,
    rootPrefixCls: o
  } = e;
  return {
    [`${t}-vertical`]: {
      [n]: {
        "&-row": {
          flexDirection: "column"
        },
        "&-label > label": {
          height: "auto"
        },
        [`${t}-item-control`]: {
          width: "100%"
        }
      }
    },
    [`${t}-vertical ${n}-label,
      .${o}-col-24${n}-label,
      .${o}-col-xl-24${n}-label`]: Jl(e),
    [`@media (max-width: ${e.screenXSMax}px)`]: [pB(e), {
      [t]: {
        [`.${o}-col-xs-24${n}-label`]: Jl(e)
      }
    }],
    [`@media (max-width: ${e.screenSMMax}px)`]: {
      [t]: {
        [`.${o}-col-sm-24${n}-label`]: Jl(e)
      }
    },
    [`@media (max-width: ${e.screenMDMax}px)`]: {
      [t]: {
        [`.${o}-col-md-24${n}-label`]: Jl(e)
      }
    },
    [`@media (max-width: ${e.screenLGMax}px)`]: {
      [t]: {
        [`.${o}-col-lg-24${n}-label`]: Jl(e)
      }
    }
  };
}, Em = nn("Form", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = _t(e, {
    formItemCls: `${e.componentCls}-item`,
    rootPrefixCls: n
  });
  return [uB(o), cB(o), lB(o), dB(o), fB(o), gB(o), Kv(o), Gv];
}), hB = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ErrorList",
  inheritAttrs: !1,
  props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const {
      prefixCls: o,
      status: i
    } = tB(), a = R(() => `${o.value}-item-explain`), r = R(() => !!(e.errors && e.errors.length)), l = le(i.value), [, s] = Em(o);
    return Ie([r, i], () => {
      r.value && (l.value = i.value);
    }), () => {
      var u, c;
      const d = im(`${o.value}-show-help-item`), f = kv(`${o.value}-show-help-item`, d);
      return f.role = "alert", f.class = [s.value, a.value, n.class, `${o.value}-show-help`], v(Mi, Z(Z({}, bl(`${o.value}-show-help`)), {}, {
        onAfterEnter: () => e.onErrorVisibleChanged(!0),
        onAfterLeave: () => e.onErrorVisibleChanged(!1)
      }), {
        default: () => [Qi(v(Wh, Z(Z({}, f), {}, {
          tag: "div"
        }), {
          default: () => [(c = e.errors) === null || c === void 0 ? void 0 : c.map((g, m) => v("div", {
            key: m,
            class: l.value ? `${a.value}-${l.value}` : ""
          }, [g]))]
        }), [[va, !!(!((u = e.errors) === null || u === void 0) && u.length)]])]
      });
    };
  }
}), vB = ye({
  compatConfig: {
    MODE: 3
  },
  slots: Object,
  inheritAttrs: !1,
  props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Im(), {
      wrapperCol: i
    } = o, a = I({}, o);
    return delete a.labelCol, delete a.wrapperCol, mP(a), eB({
      prefixCls: R(() => e.prefixCls),
      status: R(() => e.status)
    }), () => {
      var r, l, s;
      const {
        prefixCls: u,
        wrapperCol: c,
        marginBottom: d,
        onErrorVisibleChanged: f,
        help: g = (r = n.help) === null || r === void 0 ? void 0 : r.call(n),
        errors: m = Go((l = n.errors) === null || l === void 0 ? void 0 : l.call(n)),
        // hasFeedback,
        // status,
        extra: b = (s = n.extra) === null || s === void 0 ? void 0 : s.call(n)
      } = e, y = `${u}-item`, S = c || i?.value || {}, C = Te(`${y}-control`, S.class);
      return v(Mm, Z(Z({}, S), {}, {
        class: C
      }), {
        default: () => {
          var O;
          return v(He, null, [v("div", {
            class: `${y}-control-input`
          }, [v("div", {
            class: `${y}-control-input-content`
          }, [(O = n.default) === null || O === void 0 ? void 0 : O.call(n)])]), d !== null || m.length ? v("div", {
            style: {
              display: "flex",
              flexWrap: "nowrap"
            }
          }, [v(hB, {
            errors: m,
            help: g,
            class: `${y}-explain-connected`,
            onErrorVisibleChanged: f
          }, null), !!d && v("div", {
            style: {
              width: 0,
              height: `${d}px`
            }
          }, null)]) : null, b ? v("div", {
            class: `${y}-extra`
          }, [b]) : null]);
        }
      });
    };
  }
});
function mB(e) {
  const t = Pe(e.value.slice());
  let n = null;
  return Ft(() => {
    clearTimeout(n), n = setTimeout(() => {
      t.value = e.value;
    }, e.value.length ? 0 : 10);
  }), t;
}
ri("success", "warning", "error", "validating", "");
const bB = {
  success: _r,
  warning: Ar,
  error: di,
  validating: ba
};
function Lp(e, t, n) {
  let o = e;
  const i = t;
  let a = 0;
  try {
    for (let r = i.length; a < r - 1 && !(!o && !n); ++a) {
      const l = i[a];
      if (l in o)
        o = o[l];
      else {
        if (n)
          throw Error("please transfer a valid name path to form item!");
        break;
      }
    }
    if (n && !o)
      throw Error("please transfer a valid name path to form item!");
  } catch {
    console.error("please transfer a valid name path to form item!");
  }
  return {
    o,
    k: i[a],
    v: o ? o[i[a]] : void 0
  };
}
const yB = () => ({
  htmlFor: String,
  prefixCls: String,
  label: ue.any,
  help: ue.any,
  extra: ue.any,
  labelCol: {
    type: Object
  },
  wrapperCol: {
    type: Object
  },
  hasFeedback: {
    type: Boolean,
    default: !1
  },
  colon: {
    type: Boolean,
    default: void 0
  },
  labelAlign: String,
  prop: {
    type: [String, Number, Array]
  },
  name: {
    type: [String, Number, Array]
  },
  rules: [Array, Object],
  autoLink: {
    type: Boolean,
    default: !0
  },
  required: {
    type: Boolean,
    default: void 0
  },
  validateFirst: {
    type: Boolean,
    default: void 0
  },
  validateStatus: ue.oneOf(ri("", "success", "warning", "error", "validating")),
  validateTrigger: {
    type: [String, Array]
  },
  messageVariables: {
    type: Object
  },
  hidden: Boolean,
  noStyle: Boolean,
  tooltip: String
});
let xB = 0;
const wB = "form_item", SB = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItem",
  inheritAttrs: !1,
  __ANT_NEW_FORM_ITEM: !0,
  props: yB(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i
    } = t;
    yo(e.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
    const a = `form-item-${++xB}`, {
      prefixCls: r
    } = yt("form", e), [l, s] = Em(r), u = Pe(), c = Im(), d = R(() => e.name || e.prop), f = Pe([]), g = Pe(!1), m = Pe(), b = R(() => {
      const he = d.value;
      return Mh(he);
    }), y = R(() => {
      if (b.value.length) {
        const he = c.name.value, de = b.value.join("_");
        return he ? `${he}_${de}` : `${wB}_${de}`;
      } else
        return;
    }), S = () => {
      const he = c.model.value;
      if (!(!he || !d.value))
        return Lp(he, b.value, !0).v;
    }, C = R(() => S()), O = Pe(ed(C.value)), $ = R(() => {
      let he = e.validateTrigger !== void 0 ? e.validateTrigger : c.validateTrigger.value;
      return he = he === void 0 ? "change" : he, $r(he);
    }), P = R(() => {
      let he = c.rules.value;
      const de = e.rules, ne = e.required !== void 0 ? {
        required: !!e.required,
        trigger: $.value
      } : [], we = Lp(he, b.value);
      he = he ? we.o[we.k] || we.v : [];
      const re = [].concat(de || he || []);
      return bO(re, (se) => se.required) ? re : re.concat(ne);
    }), k = R(() => {
      const he = P.value;
      let de = !1;
      return he && he.length && he.every((ne) => ne.required ? (de = !0, !1) : !0), de || e.required;
    }), x = Pe();
    Ft(() => {
      x.value = e.validateStatus;
    });
    const E = R(() => {
      let he = {};
      return typeof e.label == "string" ? he.label = e.label : e.name && (he.label = String(e.name)), e.messageVariables && (he = I(I({}, he), e.messageVariables)), he;
    }), z = (he) => {
      if (b.value.length === 0)
        return;
      const {
        validateFirst: de = !1
      } = e, {
        triggerName: ne
      } = he || {};
      let we = P.value;
      if (ne && (we = we.filter((se) => {
        const {
          trigger: ve
        } = se;
        return !ve && !$.value.length ? !0 : $r(ve || $.value).includes(ne);
      })), !we.length)
        return Promise.resolve();
      const re = hP(b.value, C.value, we, I({
        validateMessages: c.validateMessages.value
      }, he), de, E.value);
      return x.value = "validating", f.value = [], re.catch((se) => se).then(function() {
        let se = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        if (x.value === "validating") {
          const ve = se.filter((Me) => Me && Me.errors.length);
          x.value = ve.length ? "error" : "success", f.value = ve.map((Me) => Me.errors), c.onValidate(d.value, !f.value.length, f.value.length ? oi(f.value[0]) : null);
        }
      }), re;
    }, B = () => {
      z({
        triggerName: "blur"
      });
    }, D = () => {
      if (g.value) {
        g.value = !1;
        return;
      }
      z({
        triggerName: "change"
      });
    }, W = () => {
      x.value = e.validateStatus, g.value = !1, f.value = [];
    }, H = () => {
      var he;
      x.value = e.validateStatus, g.value = !0, f.value = [];
      const de = c.model.value || {}, ne = C.value, we = Lp(de, b.value, !0);
      Array.isArray(ne) ? we.o[we.k] = [].concat((he = O.value) !== null && he !== void 0 ? he : []) : we.o[we.k] = O.value, Nt(() => {
        g.value = !1;
      });
    }, F = R(() => e.htmlFor === void 0 ? y.value : e.htmlFor), A = () => {
      const he = F.value;
      if (!he || !m.value)
        return;
      const de = m.value.$el.querySelector(`[id="${he}"]`);
      de && de.focus && de.focus();
    };
    i({
      onFieldBlur: B,
      onFieldChange: D,
      clearValidate: W,
      resetField: H
    }), Xz({
      id: y,
      onFieldBlur: () => {
        e.autoLink && B();
      },
      onFieldChange: () => {
        e.autoLink && D();
      },
      clearValidate: W
    }, R(() => !!(e.autoLink && c.model.value && d.value)));
    let U = !1;
    Ie(d, (he) => {
      he ? U || (U = !0, c.addField(a, {
        fieldValue: C,
        fieldId: y,
        fieldName: d,
        resetField: H,
        clearValidate: W,
        namePath: b,
        validateRules: z,
        rules: P
      })) : (U = !1, c.removeField(a));
    }, {
      immediate: !0
    }), At(() => {
      c.removeField(a);
    });
    const j = mB(f), ae = R(() => e.validateStatus !== void 0 ? e.validateStatus : j.value.length ? "error" : x.value), G = R(() => ({
      [`${r.value}-item`]: !0,
      [s.value]: !0,
      // Status
      [`${r.value}-item-has-feedback`]: ae.value && e.hasFeedback,
      [`${r.value}-item-has-success`]: ae.value === "success",
      [`${r.value}-item-has-warning`]: ae.value === "warning",
      [`${r.value}-item-has-error`]: ae.value === "error",
      [`${r.value}-item-is-validating`]: ae.value === "validating",
      [`${r.value}-item-hidden`]: e.hidden
    })), Y = Dn({});
    si.useProvide(Y), Ft(() => {
      let he;
      if (e.hasFeedback) {
        const de = ae.value && bB[ae.value];
        he = de ? v("span", {
          class: Te(`${r.value}-item-feedback-icon`, `${r.value}-item-feedback-icon-${ae.value}`)
        }, [v(de, null, null)]) : null;
      }
      I(Y, {
        status: ae.value,
        hasFeedback: e.hasFeedback,
        feedbackIcon: he,
        isFormItemInput: !0
      });
    });
    const K = Pe(null), J = Pe(!1), be = () => {
      if (u.value) {
        const he = getComputedStyle(u.value);
        K.value = parseInt(he.marginBottom, 10);
      }
    };
    Pt(() => {
      Ie(J, () => {
        J.value && be();
      }, {
        flush: "post",
        immediate: !0
      });
    });
    const xe = (he) => {
      he || (K.value = null);
    };
    return () => {
      var he, de;
      if (e.noStyle) return (he = n.default) === null || he === void 0 ? void 0 : he.call(n);
      const ne = (de = e.help) !== null && de !== void 0 ? de : n.help ? Go(n.help()) : null, we = !!(ne != null && Array.isArray(ne) && ne.length || j.value.length);
      return J.value = we, l(v("div", {
        class: [G.value, we ? `${r.value}-item-with-help` : "", o.class],
        ref: u
      }, [v(uP, Z(Z({}, o), {}, {
        class: `${r.value}-item-row`,
        key: "row"
      }), {
        default: () => {
          var re, se;
          return v(He, null, [v(km, Z(Z({}, e), {}, {
            htmlFor: F.value,
            required: k.value,
            requiredMark: c.requiredMark.value,
            prefixCls: r.value,
            onClick: A,
            label: e.label
          }), {
            label: n.label,
            tooltip: n.tooltip
          }), v(vB, Z(Z({}, e), {}, {
            errors: ne != null ? $r(ne) : j.value,
            marginBottom: K.value,
            prefixCls: r.value,
            status: ae.value,
            ref: m,
            help: ne,
            extra: (re = e.extra) !== null && re !== void 0 ? re : (se = n.extra) === null || se === void 0 ? void 0 : se.call(n),
            onErrorVisibleChanged: xe
          }), {
            default: n.default
          })]);
        }
      }), !!K.value && v("div", {
        class: `${r.value}-margin-offset`,
        style: {
          marginBottom: `-${K.value}px`
        }
      }, null)]));
    };
  }
});
function yP(e) {
  let t = !1, n = e.length;
  const o = [];
  return e.length ? new Promise((i, a) => {
    e.forEach((r, l) => {
      r.catch((s) => (t = !0, s)).then((s) => {
        n -= 1, o[l] = s, !(n > 0) && (t && a(o), i(o));
      });
    });
  }) : Promise.resolve([]);
}
function hx(e) {
  let t = !1;
  return e && e.length && e.every((n) => n.required ? (t = !0, !1) : !0), t;
}
function vx(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function Hp(e, t, n) {
  let o = e;
  t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
  const i = t.split(".");
  let a = 0;
  for (let r = i.length; a < r - 1 && !(!o && !n); ++a) {
    const l = i[a];
    if (l in o)
      o = o[l];
    else {
      if (n)
        throw new Error("please transfer a valid name path to validate!");
      break;
    }
  }
  return {
    o,
    k: i[a],
    v: o ? o[i[a]] : null,
    isValid: o && i[a] in o
  };
}
function CB(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : le({}), n = arguments.length > 2 ? arguments[2] : void 0;
  const o = ed(M(e)), i = Dn({}), a = Pe([]), r = (O) => {
    I(M(e), I(I({}, ed(o)), O)), Nt(() => {
      Object.keys(i).forEach(($) => {
        i[$] = {
          autoLink: !1,
          required: hx(M(t)[$])
        };
      });
    });
  }, l = function() {
    let O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], $ = arguments.length > 1 ? arguments[1] : void 0;
    return $.length ? O.filter((P) => {
      const k = vx(P.trigger || "change");
      return yO(k, $).length;
    }) : O;
  };
  let s = null;
  const u = function(O) {
    let $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, P = arguments.length > 2 ? arguments[2] : void 0;
    const k = [], x = {};
    for (let B = 0; B < O.length; B++) {
      const D = O[B], W = Hp(M(e), D, P);
      if (!W.isValid) continue;
      x[D] = W.v;
      const H = l(M(t)[D], vx($ && $.trigger));
      H.length && k.push(c(D, W.v, H, $ || {}).then(() => ({
        name: D,
        errors: [],
        warnings: []
      })).catch((F) => {
        const A = [], U = [];
        return F.forEach((j) => {
          let {
            rule: {
              warningOnly: ae
            },
            errors: G
          } = j;
          ae ? U.push(...G) : A.push(...G);
        }), A.length ? Promise.reject({
          name: D,
          errors: A,
          warnings: U
        }) : {
          name: D,
          errors: A,
          warnings: U
        };
      }));
    }
    const E = yP(k);
    s = E;
    const z = E.then(() => s === E ? Promise.resolve(x) : Promise.reject([])).catch((B) => {
      const D = B.filter((W) => W && W.errors.length);
      return D.length ? Promise.reject({
        values: x,
        errorFields: D,
        outOfDate: s !== E
      }) : Promise.resolve(x);
    });
    return z.catch((B) => B), z;
  }, c = function(O, $, P) {
    let k = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    const x = hP([O], $, P, I({
      validateMessages: Df
    }, k), !!k.validateFirst);
    return i[O] ? (i[O].validateStatus = "validating", x.catch((E) => E).then(function() {
      let E = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      var z;
      if (i[O].validateStatus === "validating") {
        const B = E.filter((D) => D && D.errors.length);
        i[O].validateStatus = B.length ? "error" : "success", i[O].help = B.length ? B.map((D) => D.errors) : null, (z = n?.onValidate) === null || z === void 0 || z.call(n, O, !B.length, B.length ? oi(i[O].help[0]) : null);
      }
    }), x) : x.catch((E) => E);
  }, d = (O, $) => {
    let P = [], k = !0;
    O ? Array.isArray(O) ? P = O : P = [O] : (k = !1, P = a.value);
    const x = u(P, $ || {}, k);
    return x.catch((E) => E), x;
  }, f = (O) => {
    let $ = [];
    O ? Array.isArray(O) ? $ = O : $ = [O] : $ = a.value, $.forEach((P) => {
      i[P] && I(i[P], {
        validateStatus: "",
        help: null
      });
    });
  }, g = (O) => {
    const $ = {
      autoLink: !1
    }, P = [], k = Array.isArray(O) ? O : [O];
    for (let x = 0; x < k.length; x++) {
      const E = k[x];
      E?.validateStatus === "error" && ($.validateStatus = "error", E.help && P.push(E.help)), $.required = $.required || E?.required;
    }
    return $.help = P, $;
  };
  let m = o, b = !0;
  const y = (O) => {
    const $ = [];
    a.value.forEach((P) => {
      const k = Hp(O, P, !1), x = Hp(m, P, !1);
      (b && n?.immediate && k.isValid || !Gh(k.v, x.v)) && $.push(P);
    }), d($, {
      trigger: "change"
    }), b = !1, m = ed(oi(O));
  }, S = n?.debounce;
  let C = !0;
  return Ie(t, () => {
    a.value = t ? Object.keys(M(t)) : [], !C && n && n.validateOnRuleChange && d(), C = !1;
  }, {
    deep: !0,
    immediate: !0
  }), Ie(a, () => {
    const O = {};
    a.value.forEach(($) => {
      O[$] = I({}, i[$], {
        autoLink: !1,
        required: hx(M(t)[$])
      }), delete i[$];
    });
    for (const $ in i)
      Object.prototype.hasOwnProperty.call(i, $) && delete i[$];
    I(i, O);
  }, {
    immediate: !0
  }), Ie(e, S && S.wait ? xO(y, S.wait, wO(S, ["wait"])) : y, {
    immediate: n && !!n.immediate,
    deep: !0
  }), {
    modelRef: e,
    rulesRef: t,
    initialModel: o,
    validateInfos: i,
    resetFields: r,
    validate: d,
    validateField: c,
    mergeValidateInfo: g,
    clearValidate: f
  };
}
const $B = () => ({
  layout: ue.oneOf(ri("horizontal", "inline", "vertical")),
  labelCol: Ct(),
  wrapperCol: Ct(),
  colon: st(),
  labelAlign: dn(),
  labelWrap: st(),
  prefixCls: String,
  requiredMark: tn([String, Boolean]),
  /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  hideRequiredMark: st(),
  model: ue.object,
  rules: Ct(),
  validateMessages: Ct(),
  validateOnRuleChange: st(),
  // 提交失败自动滚动到第一个错误字段
  scrollToFirstError: ti(),
  onSubmit: Qe(),
  name: String,
  validateTrigger: tn([String, Array]),
  size: dn(),
  disabled: st(),
  onValuesChange: Qe(),
  onFieldsChange: Qe(),
  onFinish: Qe(),
  onFinishFailed: Qe(),
  onValidate: Qe()
});
function PB(e, t) {
  return Gh($r(e), $r(t));
}
const vr = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AForm",
  inheritAttrs: !1,
  props: wn($B(), {
    layout: "horizontal",
    hideRequiredMark: !1,
    colon: !0
  }),
  Item: SB,
  useForm: CB,
  // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      expose: i,
      attrs: a
    } = t;
    const {
      prefixCls: r,
      direction: l,
      form: s,
      size: u,
      disabled: c
    } = yt("form", e), d = R(() => e.requiredMark === "" || e.requiredMark), f = R(() => {
      var j;
      return d.value !== void 0 ? d.value : s && ((j = s.value) === null || j === void 0 ? void 0 : j.requiredMark) !== void 0 ? s.value.requiredMark : !e.hideRequiredMark;
    });
    qS(u), dS(c);
    const g = R(() => {
      var j, ae;
      return (j = e.colon) !== null && j !== void 0 ? j : (ae = s.value) === null || ae === void 0 ? void 0 : ae.colon;
    }), {
      validateMessages: m
    } = Tk(), b = R(() => I(I(I({}, Df), m.value), e.validateMessages)), [y, S] = Em(r), C = R(() => Te(r.value, {
      [`${r.value}-${e.layout}`]: !0,
      [`${r.value}-hide-required-mark`]: f.value === !1,
      [`${r.value}-rtl`]: l.value === "rtl",
      [`${r.value}-${u.value}`]: u.value
    }, S.value)), O = le(), $ = {}, P = (j, ae) => {
      $[j] = ae;
    }, k = (j) => {
      delete $[j];
    }, x = (j) => {
      const ae = !!j, G = ae ? $r(j).map(Mh) : [];
      return ae ? Object.values($).filter((Y) => G.findIndex((K) => PB(K, Y.fieldName.value)) > -1) : Object.values($);
    }, E = (j) => {
      if (!e.model) {
        Qn(!1, "Form", "model is required for resetFields to work.");
        return;
      }
      x(j).forEach((ae) => {
        ae.resetField();
      });
    }, z = (j) => {
      x(j).forEach((ae) => {
        ae.clearValidate();
      });
    }, B = (j) => {
      const {
        scrollToFirstError: ae
      } = e;
      if (n("finishFailed", j), ae && j.errorFields.length) {
        let G = {};
        typeof ae == "object" && (G = ae), W(j.errorFields[0].name, G);
      }
    }, D = function() {
      return A(...arguments);
    }, W = function(j) {
      let ae = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const G = x(j ? [j] : void 0);
      if (G.length) {
        const Y = G[0].fieldId.value, K = Y ? document.getElementById(Y) : null;
        K && S_(K, I({
          scrollMode: "if-needed",
          block: "nearest"
        }, ae));
      }
    }, H = function() {
      let j = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
      if (j === !0) {
        const ae = [];
        return Object.values($).forEach((G) => {
          let {
            namePath: Y
          } = G;
          ae.push(Y.value);
        }), fx(e.model, ae);
      } else
        return fx(e.model, j);
    }, F = (j, ae) => {
      if (Qn(!(j instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
        return Qn(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
      const G = !!j, Y = G ? $r(j).map(Mh) : [], K = [];
      Object.values($).forEach((xe) => {
        var he;
        if (G || Y.push(xe.namePath.value), !(!((he = xe.rules) === null || he === void 0) && he.value.length))
          return;
        const de = xe.namePath.value;
        if (!G || K3(Y, de)) {
          const ne = xe.validateRules(I({
            validateMessages: b.value
          }, ae));
          K.push(ne.then(() => ({
            name: de,
            errors: [],
            warnings: []
          })).catch((we) => {
            const re = [], se = [];
            return we.forEach((ve) => {
              let {
                rule: {
                  warningOnly: Me
                },
                errors: ke
              } = ve;
              Me ? se.push(...ke) : re.push(...ke);
            }), re.length ? Promise.reject({
              name: de,
              errors: re,
              warnings: se
            }) : {
              name: de,
              errors: re,
              warnings: se
            };
          }));
        }
      });
      const J = yP(K);
      O.value = J;
      const be = J.then(() => O.value === J ? Promise.resolve(H(Y)) : Promise.reject([])).catch((xe) => {
        const he = xe.filter((de) => de && de.errors.length);
        return Promise.reject({
          values: H(Y),
          errorFields: he,
          outOfDate: O.value !== J
        });
      });
      return be.catch((xe) => xe), be;
    }, A = function() {
      return F(...arguments);
    }, U = (j) => {
      j.preventDefault(), j.stopPropagation(), n("submit", j), e.model && F().then((G) => {
        n("finish", G);
      }).catch((G) => {
        B(G);
      });
    };
    return i({
      resetFields: E,
      clearValidate: z,
      validateFields: F,
      getFieldsValue: H,
      validate: D,
      scrollToField: W
    }), mP({
      model: R(() => e.model),
      name: R(() => e.name),
      labelAlign: R(() => e.labelAlign),
      labelCol: R(() => e.labelCol),
      labelWrap: R(() => e.labelWrap),
      wrapperCol: R(() => e.wrapperCol),
      vertical: R(() => e.layout === "vertical"),
      colon: g,
      requiredMark: f,
      validateTrigger: R(() => e.validateTrigger),
      rules: R(() => e.rules),
      addField: P,
      removeField: k,
      onValidate: (j, ae, G) => {
        n("validate", j, ae, G);
      },
      validateMessages: b
    }), Ie(() => e.rules, () => {
      e.validateOnRuleChange && F();
    }), () => {
      var j;
      return y(v("form", Z(Z({}, a), {}, {
        onSubmit: U,
        class: [C.value, a.class]
      }), [(j = o.default) === null || j === void 0 ? void 0 : j.call(o)]));
    };
  }
});
vr.useInjectFormItemContext = fi;
vr.ItemRest = ih;
vr.install = function(e) {
  return e.component(vr.name, vr), e.component(vr.Item.name, vr.Item), e.component(ih.name, ih), e;
};
const OB = new Bt("antCheckboxEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), IB = (e) => {
  const {
    checkboxCls: t
  } = e, n = `${t}-wrapper`;
  return [
    // ===================== Basic =====================
    {
      // Group
      [`${t}-group`]: I(I({}, Zt(e)), {
        display: "inline-flex",
        flexWrap: "wrap",
        columnGap: e.marginXS,
        // Group > Grid
        [`> ${e.antCls}-row`]: {
          flex: 1
        }
      }),
      // Wrapper
      [n]: I(I({}, Zt(e)), {
        display: "inline-flex",
        alignItems: "baseline",
        cursor: "pointer",
        // Fix checkbox & radio in flex align #30260
        "&:after": {
          display: "inline-block",
          width: 0,
          overflow: "hidden",
          content: "'\\a0'"
        },
        // Checkbox near checkbox
        [`& + ${n}`]: {
          marginInlineStart: 0
        },
        [`&${n}-in-form-item`]: {
          'input[type="checkbox"]': {
            width: 14,
            height: 14
            // FIXME: magic
          }
        }
      }),
      // Wrapper > Checkbox
      [t]: I(I({}, Zt(e)), {
        position: "relative",
        whiteSpace: "nowrap",
        lineHeight: 1,
        cursor: "pointer",
        // To make alignment right when `controlHeight` is changed
        // Ref: https://github.com/ant-design/ant-design/issues/41564
        alignSelf: "center",
        // Wrapper > Checkbox > input
        [`${t}-input`]: {
          position: "absolute",
          // Since baseline align will get additional space offset,
          // we need to move input to top to make it align with text.
          // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
          inset: 0,
          zIndex: 1,
          cursor: "pointer",
          opacity: 0,
          margin: 0,
          [`&:focus-visible + ${t}-inner`]: I({}, Xu(e))
        },
        // Wrapper > Checkbox > inner
        [`${t}-inner`]: {
          boxSizing: "border-box",
          position: "relative",
          top: 0,
          insetInlineStart: 0,
          display: "block",
          width: e.checkboxSize,
          height: e.checkboxSize,
          direction: "ltr",
          backgroundColor: e.colorBgContainer,
          border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
          borderRadius: e.borderRadiusSM,
          borderCollapse: "separate",
          transition: `all ${e.motionDurationSlow}`,
          "&:after": {
            boxSizing: "border-box",
            position: "absolute",
            top: "50%",
            insetInlineStart: "21.5%",
            display: "table",
            width: e.checkboxSize / 14 * 5,
            height: e.checkboxSize / 14 * 8,
            border: `${e.lineWidthBold}px solid ${e.colorWhite}`,
            borderTop: 0,
            borderInlineStart: 0,
            transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
            opacity: 0,
            content: '""',
            transition: `all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`
          }
        },
        // Wrapper > Checkbox + Text
        "& + span": {
          paddingInlineStart: e.paddingXS,
          paddingInlineEnd: e.paddingXS
        }
      })
    },
    // ================= Indeterminate =================
    {
      [t]: {
        "&-indeterminate": {
          // Wrapper > Checkbox > inner
          [`${t}-inner`]: {
            "&:after": {
              top: "50%",
              insetInlineStart: "50%",
              width: e.fontSizeLG / 2,
              height: e.fontSizeLG / 2,
              backgroundColor: e.colorPrimary,
              border: 0,
              transform: "translate(-50%, -50%) scale(1)",
              opacity: 1,
              content: '""'
            }
          }
        }
      }
    },
    // ===================== Hover =====================
    {
      // Wrapper
      [`${n}:hover ${t}:after`]: {
        visibility: "visible"
      },
      // Wrapper & Wrapper > Checkbox
      [`
        ${n}:not(${n}-disabled),
        ${t}:not(${t}-disabled)
      `]: {
        [`&:hover ${t}-inner`]: {
          borderColor: e.colorPrimary
        }
      },
      [`${n}:not(${n}-disabled)`]: {
        [`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]: {
          backgroundColor: e.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${t}-checked:not(${t}-disabled):after`]: {
          borderColor: e.colorPrimaryHover
        }
      }
    },
    // ==================== Checked ====================
    {
      // Wrapper > Checkbox
      [`${t}-checked`]: {
        [`${t}-inner`]: {
          backgroundColor: e.colorPrimary,
          borderColor: e.colorPrimary,
          "&:after": {
            opacity: 1,
            transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
            transition: `all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`
          }
        },
        // Checked Effect
        "&:after": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          width: "100%",
          height: "100%",
          borderRadius: e.borderRadiusSM,
          visibility: "hidden",
          border: `${e.lineWidthBold}px solid ${e.colorPrimary}`,
          animationName: OB,
          animationDuration: e.motionDurationSlow,
          animationTimingFunction: "ease-in-out",
          animationFillMode: "backwards",
          content: '""',
          transition: `all ${e.motionDurationSlow}`
        }
      },
      [`
        ${n}-checked:not(${n}-disabled),
        ${t}-checked:not(${t}-disabled)
      `]: {
        [`&:hover ${t}-inner`]: {
          backgroundColor: e.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${t}:after`]: {
          borderColor: e.colorPrimaryHover
        }
      }
    },
    // ==================== Disable ====================
    {
      // Wrapper
      [`${n}-disabled`]: {
        cursor: "not-allowed"
      },
      // Wrapper > Checkbox
      [`${t}-disabled`]: {
        // Wrapper > Checkbox > input
        [`&, ${t}-input`]: {
          cursor: "not-allowed",
          // Disabled for native input to enable Tooltip event handler
          // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
          pointerEvents: "none"
        },
        // Wrapper > Checkbox > inner
        [`${t}-inner`]: {
          background: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          "&:after": {
            borderColor: e.colorTextDisabled
          }
        },
        "&:after": {
          display: "none"
        },
        "& + span": {
          color: e.colorTextDisabled
        },
        [`&${t}-indeterminate ${t}-inner::after`]: {
          background: e.colorTextDisabled
        }
      }
    }
  ];
};
function MB(e, t) {
  const n = _t(t, {
    checkboxCls: `.${e}`,
    checkboxSize: t.controlInteractiveSize
  });
  return [IB(n)];
}
const xP = nn("Checkbox", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [MB(n, e)];
}), TB = () => ({
  name: String,
  prefixCls: String,
  options: Po([]),
  disabled: Boolean,
  id: String
}), kB = () => I(I({}, TB()), {
  defaultValue: Po(),
  value: Po(),
  onChange: Qe(),
  "onUpdate:value": Qe()
}), EB = () => ({
  prefixCls: String,
  defaultChecked: st(),
  checked: st(),
  disabled: st(),
  isGroup: st(),
  value: ue.any,
  name: String,
  id: String,
  indeterminate: st(),
  type: dn("checkbox"),
  autofocus: st(),
  onChange: Qe(),
  "onUpdate:checked": Qe(),
  onClick: Qe(),
  skipGroup: st(!1)
}), _B = () => I(I({}, EB()), {
  indeterminate: st(!1)
}), wP = Symbol("CheckboxGroupContext");
var mx = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const ai = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckbox",
  inheritAttrs: !1,
  __ANT_CHECKBOX: !0,
  props: _B(),
  // emits: ['change', 'update:checked'],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: i,
      expose: a
    } = t;
    const r = fi(), l = si.useInject(), {
      prefixCls: s,
      direction: u,
      disabled: c
    } = yt("checkbox", e), d = Zi(), [f, g] = xP(s), m = Tt(wP, void 0), b = Symbol("checkboxUniId"), y = R(() => m?.disabled.value || c.value);
    Ft(() => {
      !e.skipGroup && m && m.registerValue(b, e.value);
    }), At(() => {
      m && m.cancelValue(b);
    }), Pt(() => {
      Qn(!!(e.checked !== void 0 || m || e.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
    });
    const S = (P) => {
      const k = P.target.checked;
      n("update:checked", k), n("change", P), r.onFieldChange();
    }, C = le();
    return a({
      focus: () => {
        var P;
        (P = C.value) === null || P === void 0 || P.focus();
      },
      blur: () => {
        var P;
        (P = C.value) === null || P === void 0 || P.blur();
      }
    }), () => {
      var P;
      const k = to((P = i.default) === null || P === void 0 ? void 0 : P.call(i)), {
        indeterminate: x,
        skipGroup: E,
        id: z = r.id.value
      } = e, B = mx(e, ["indeterminate", "skipGroup", "id"]), {
        onMouseenter: D,
        onMouseleave: W,
        onInput: H,
        class: F,
        style: A
      } = o, U = mx(o, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), j = I(I(I(I({}, B), {
        id: z,
        prefixCls: s.value
      }), U), {
        disabled: y.value
      });
      m && !E ? (j.onChange = function() {
        for (var K = arguments.length, J = new Array(K), be = 0; be < K; be++)
          J[be] = arguments[be];
        n("change", ...J), m.toggleOption({
          label: k,
          value: e.value
        });
      }, j.name = m.name.value, j.checked = m.mergedValue.value.includes(e.value), j.disabled = y.value || d.value, j.indeterminate = x) : j.onChange = S;
      const ae = Te({
        [`${s.value}-wrapper`]: !0,
        [`${s.value}-rtl`]: u.value === "rtl",
        [`${s.value}-wrapper-checked`]: j.checked,
        [`${s.value}-wrapper-disabled`]: j.disabled,
        [`${s.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, F, g.value), G = Te({
        [`${s.value}-indeterminate`]: x
      }, g.value);
      return f(v("label", {
        class: ae,
        style: A,
        onMouseenter: D,
        onMouseleave: W
      }, [v(F$, Z(Z({
        "aria-checked": x ? "mixed" : void 0
      }, j), {}, {
        class: G,
        ref: C
      }), null), k.length ? v("span", null, [k]) : null]));
    };
  }
}), kh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckboxGroup",
  inheritAttrs: !1,
  props: kB(),
  // emits: ['change', 'update:value'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i,
      expose: a
    } = t;
    const r = fi(), {
      prefixCls: l,
      direction: s
    } = yt("checkbox", e), u = R(() => `${l.value}-group`), [c, d] = xP(u), f = le((e.value === void 0 ? e.defaultValue : e.value) || []);
    Ie(() => e.value, () => {
      f.value = e.value || [];
    });
    const g = R(() => e.options.map(($) => typeof $ == "string" || typeof $ == "number" ? {
      label: $,
      value: $
    } : $)), m = le(Symbol()), b = le(/* @__PURE__ */ new Map()), y = ($) => {
      b.value.delete($), m.value = Symbol();
    }, S = ($, P) => {
      b.value.set($, P), m.value = Symbol();
    }, C = le(/* @__PURE__ */ new Map());
    return Ie(m, () => {
      const $ = /* @__PURE__ */ new Map();
      for (const P of b.value.values())
        $.set(P, !0);
      C.value = $;
    }), kt(wP, {
      cancelValue: y,
      registerValue: S,
      toggleOption: ($) => {
        const P = f.value.indexOf($.value), k = [...f.value];
        P === -1 ? k.push($.value) : k.splice(P, 1), e.value === void 0 && (f.value = k);
        const x = k.filter((E) => C.value.has(E)).sort((E, z) => {
          const B = g.value.findIndex((W) => W.value === E), D = g.value.findIndex((W) => W.value === z);
          return B - D;
        });
        i("update:value", x), i("change", x), r.onFieldChange();
      },
      mergedValue: f,
      name: R(() => e.name),
      disabled: R(() => e.disabled)
    }), a({
      mergedValue: f
    }), () => {
      var $;
      const {
        id: P = r.id.value
      } = e;
      let k = null;
      return g.value && g.value.length > 0 && (k = g.value.map((x) => {
        var E;
        return v(ai, {
          prefixCls: l.value,
          key: x.value.toString(),
          disabled: "disabled" in x ? x.disabled : e.disabled,
          indeterminate: x.indeterminate,
          value: x.value,
          checked: f.value.indexOf(x.value) !== -1,
          onChange: x.onChange,
          class: `${u.value}-item`
        }, {
          default: () => [n.label !== void 0 ? (E = n.label) === null || E === void 0 ? void 0 : E.call(n, x) : x.label]
        });
      })), c(v("div", Z(Z({}, o), {}, {
        class: [u.value, {
          [`${u.value}-rtl`]: s.value === "rtl"
        }, o.class, d.value],
        id: P
      }), [k || (($ = n.default) === null || $ === void 0 ? void 0 : $.call(n))]));
    };
  }
});
ai.Group = kh;
ai.install = function(e) {
  return e.component(ai.name, ai), e.component(kh.name, kh), e;
};
const AB = Ji(Mm);
let gd = I({}, Ir.Modal);
function DB(e) {
  e ? gd = I(I({}, gd), e) : gd = I({}, Ir.Modal);
}
function zB() {
  return gd;
}
const Eh = "internalMark", hd = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    Qn(e.ANT_MARK__ === Eh, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const o = Dn({
      antLocale: I(I({}, e.locale), {
        exist: !0
      }),
      ANT_MARK__: Eh
    });
    return kt("localeData", o), Ie(() => e.locale, (i) => {
      DB(i && i.Modal), o.antLocale = I(I({}, i), {
        exist: !0
      });
    }, {
      immediate: !0
    }), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
});
hd.install = function(e) {
  return e.component(hd.name, hd), e;
};
const RB = Ji(hd), Rf = ye({
  name: "Notice",
  inheritAttrs: !1,
  props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t, i, a = !1;
    const r = R(() => e.duration === void 0 ? 4.5 : e.duration), l = () => {
      r.value && !a && (i = setTimeout(() => {
        u();
      }, r.value * 1e3));
    }, s = () => {
      i && (clearTimeout(i), i = null);
    }, u = (d) => {
      d && d.stopPropagation(), s();
      const {
        onClose: f,
        noticeKey: g
      } = e;
      f && f(g);
    }, c = () => {
      s(), l();
    };
    return Pt(() => {
      l();
    }), Bo(() => {
      a = !0, s();
    }), Ie([r, () => e.updateMark, () => e.visible], (d, f) => {
      let [g, m, b] = d, [y, S, C] = f;
      (g !== y || m !== S || b !== C && C) && c();
    }, {
      flush: "post"
    }), () => {
      var d, f;
      const {
        prefixCls: g,
        closable: m,
        closeIcon: b = (d = o.closeIcon) === null || d === void 0 ? void 0 : d.call(o),
        onClick: y,
        holder: S
      } = e, {
        class: C,
        style: O
      } = n, $ = `${g}-notice`, P = Object.keys(n).reduce((x, E) => ((E.startsWith("data-") || E.startsWith("aria-") || E === "role") && (x[E] = n[E]), x), {}), k = v("div", Z({
        class: Te($, C, {
          [`${$}-closable`]: m
        }),
        style: O,
        onMouseenter: s,
        onMouseleave: l,
        onClick: y
      }, P), [v("div", {
        class: `${$}-content`
      }, [(f = o.default) === null || f === void 0 ? void 0 : f.call(o)]), m ? v("a", {
        tabindex: 0,
        onClick: u,
        class: `${$}-close`
      }, [b || v("span", {
        class: `${$}-close-x`
      }, null)]) : null]);
      return S ? v(Ud, {
        to: S
      }, {
        default: () => k
      }) : k;
    };
  }
});
var NB = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
let bx = 0;
const BB = Date.now();
function yx() {
  const e = bx;
  return bx += 1, `rcNotification_${BB}_${e}`;
}
const Wd = ye({
  name: "Notification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: i
    } = t;
    const a = /* @__PURE__ */ new Map(), r = le([]), l = R(() => {
      const {
        prefixCls: c,
        animation: d = "fade"
      } = e;
      let f = e.transitionName;
      return !f && d && (f = `${c}-${d}`), kv(f);
    }), s = (c, d) => {
      const f = c.key || yx(), g = I(I({}, c), {
        key: f
      }), {
        maxCount: m
      } = e, b = r.value.map((S) => S.notice.key).indexOf(f), y = r.value.concat();
      b !== -1 ? y.splice(b, 1, {
        notice: g,
        holderCallback: d
      }) : (m && r.value.length >= m && (g.key = y[0].notice.key, g.updateMark = yx(), g.userPassKey = f, y.shift()), y.push({
        notice: g,
        holderCallback: d
      })), r.value = y;
    }, u = (c) => {
      r.value = oi(r.value).filter((d) => {
        let {
          notice: {
            key: f,
            userPassKey: g
          }
        } = d;
        return (g || f) !== c;
      });
    };
    return o({
      add: s,
      remove: u,
      notices: r
    }), () => {
      var c;
      const {
        prefixCls: d,
        closeIcon: f = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
          prefixCls: d
        })
      } = e, g = r.value.map((b, y) => {
        let {
          notice: S,
          holderCallback: C
        } = b;
        const O = y === r.value.length - 1 ? S.updateMark : void 0, {
          key: $,
          userPassKey: P
        } = S, {
          content: k
        } = S, x = I(I(I({
          prefixCls: d,
          closeIcon: typeof f == "function" ? f({
            prefixCls: d
          }) : f
        }, S), S.props), {
          key: $,
          noticeKey: P || $,
          updateMark: O,
          onClose: (E) => {
            var z;
            u(E), (z = S.onClose) === null || z === void 0 || z.call(S);
          },
          onClick: S.onClick
        });
        return C ? v("div", {
          key: $,
          class: `${d}-hook-holder`,
          ref: (E) => {
            typeof $ > "u" || (E ? (a.set($, E), C(E, x)) : a.delete($));
          }
        }, null) : v(Rf, Z(Z({}, x), {}, {
          class: Te(x.class, e.hashId)
        }), {
          default: () => [typeof k == "function" ? k({
            prefixCls: d
          }) : k]
        });
      }), m = {
        [d]: 1,
        [n.class]: !!n.class,
        [e.hashId]: !0
      };
      return v("div", {
        class: m,
        style: n.style || {
          top: "65px",
          left: "50%"
        }
      }, [v(Wh, Z({
        tag: "div"
      }, l.value), {
        default: () => [g]
      })]);
    };
  }
});
Wd.newInstance = function(t, n) {
  const o = t || {}, {
    name: i = "notification",
    getContainer: a,
    appContext: r,
    prefixCls: l,
    rootPrefixCls: s,
    transitionName: u,
    hasTransitionName: c,
    useStyle: d
  } = o, f = NB(o, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), g = document.createElement("div");
  a ? a().appendChild(g) : document.body.appendChild(g);
  const m = ye({
    compatConfig: {
      MODE: 3
    },
    name: "NotificationWrapper",
    setup(y, S) {
      let {
        attrs: C
      } = S;
      const O = Pe(), $ = R(() => mo.getPrefixCls(i, l)), [, P] = d($);
      return Pt(() => {
        n({
          notice(k) {
            var x;
            (x = O.value) === null || x === void 0 || x.add(k);
          },
          removeNotice(k) {
            var x;
            (x = O.value) === null || x === void 0 || x.remove(k);
          },
          destroy() {
            Pr(null, g), g.parentNode && g.parentNode.removeChild(g);
          },
          component: O
        });
      }), () => {
        const k = mo, x = k.getRootPrefixCls(s, $.value), E = c ? u : `${$.value}-${u}`;
        return v(dl, Z(Z({}, k), {}, {
          prefixCls: x
        }), {
          default: () => [v(Wd, Z(Z({
            ref: O
          }, C), {}, {
            prefixCls: $.value,
            transitionName: E,
            hashId: P.value
          }), null)]
        });
      };
    }
  }), b = v(m, f);
  b.appContext = r || b.appContext, Pr(b, g);
};
let xx = 0;
const FB = Date.now();
function wx() {
  const e = xx;
  return xx += 1, `rcNotification_${FB}_${e}`;
}
const LB = ye({
  name: "HookNotification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = /* @__PURE__ */ new Map(), a = R(() => e.notices), r = R(() => {
      let c = e.transitionName;
      if (!c && e.animation)
        switch (typeof e.animation) {
          case "string":
            c = e.animation;
            break;
          case "function":
            c = e.animation().name;
            break;
          case "object":
            c = e.animation.name;
            break;
          default:
            c = `${e.prefixCls}-fade`;
            break;
        }
      return kv(c);
    }), l = (c) => e.remove(c), s = le({});
    Ie(a, () => {
      const c = {};
      Object.keys(s.value).forEach((d) => {
        c[d] = [];
      }), e.notices.forEach((d) => {
        const {
          placement: f = "topRight"
        } = d.notice;
        f && (c[f] = c[f] || [], c[f].push(d));
      }), s.value = c;
    });
    const u = R(() => Object.keys(s.value));
    return () => {
      var c;
      const {
        prefixCls: d,
        closeIcon: f = (c = o.closeIcon) === null || c === void 0 ? void 0 : c.call(o, {
          prefixCls: d
        })
      } = e, g = u.value.map((m) => {
        var b, y;
        const S = s.value[m], C = (b = e.getClassName) === null || b === void 0 ? void 0 : b.call(e, m), O = (y = e.getStyles) === null || y === void 0 ? void 0 : y.call(e, m), $ = S.map((x, E) => {
          let {
            notice: z,
            holderCallback: B
          } = x;
          const D = E === a.value.length - 1 ? z.updateMark : void 0, {
            key: W,
            userPassKey: H
          } = z, {
            content: F
          } = z, A = I(I(I({
            prefixCls: d,
            closeIcon: typeof f == "function" ? f({
              prefixCls: d
            }) : f
          }, z), z.props), {
            key: W,
            noticeKey: H || W,
            updateMark: D,
            onClose: (U) => {
              var j;
              l(U), (j = z.onClose) === null || j === void 0 || j.call(z);
            },
            onClick: z.onClick
          });
          return B ? v("div", {
            key: W,
            class: `${d}-hook-holder`,
            ref: (U) => {
              typeof W > "u" || (U ? (i.set(W, U), B(U, A)) : i.delete(W));
            }
          }, null) : v(Rf, Z(Z({}, A), {}, {
            class: Te(A.class, e.hashId)
          }), {
            default: () => [typeof F == "function" ? F({
              prefixCls: d
            }) : F]
          });
        }), P = {
          [d]: 1,
          [`${d}-${m}`]: 1,
          [n.class]: !!n.class,
          [e.hashId]: !0,
          [C]: !!C
        };
        function k() {
          var x;
          S.length > 0 || (Reflect.deleteProperty(s.value, m), (x = e.onAllRemoved) === null || x === void 0 || x.call(e));
        }
        return v("div", {
          key: m,
          class: P,
          style: n.style || O || {
            top: "65px",
            left: "50%"
          }
        }, [v(Wh, Z(Z({
          tag: "div"
        }, r.value), {}, {
          onAfterLeave: k
        }), {
          default: () => [$]
        })]);
      });
      return v(hC, {
        getContainer: e.getContainer
      }, {
        default: () => [g]
      });
    };
  }
});
var HB = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const VB = () => document.body;
let Sx = 0;
function jB() {
  const e = {};
  for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
    n[o] = arguments[o];
  return n.forEach((i) => {
    i && Object.keys(i).forEach((a) => {
      const r = i[a];
      r !== void 0 && (e[a] = r);
    });
  }), e;
}
function SP() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  const {
    getContainer: t = VB,
    motion: n,
    prefixCls: o,
    maxCount: i,
    getClassName: a,
    getStyles: r,
    onAllRemoved: l
  } = e, s = HB(e, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = Pe([]), c = Pe(), d = (S, C) => {
    const O = S.key || wx(), $ = I(I({}, S), {
      key: O
    }), P = u.value.map((x) => x.notice.key).indexOf(O), k = u.value.concat();
    P !== -1 ? k.splice(P, 1, {
      notice: $,
      holderCallback: C
    }) : (i && u.value.length >= i && ($.key = k[0].notice.key, $.updateMark = wx(), $.userPassKey = O, k.shift()), k.push({
      notice: $,
      holderCallback: C
    })), u.value = k;
  }, f = (S) => {
    u.value = u.value.filter((C) => {
      let {
        notice: {
          key: O,
          userPassKey: $
        }
      } = C;
      return ($ || O) !== S;
    });
  }, g = () => {
    u.value = [];
  }, m = () => v(LB, {
    ref: c,
    prefixCls: o,
    maxCount: i,
    notices: u.value,
    remove: f,
    getClassName: a,
    getStyles: r,
    animation: n,
    hashId: e.hashId,
    onAllRemoved: l,
    getContainer: t
  }, null), b = Pe([]), y = {
    open: (S) => {
      const C = jB(s, S);
      (C.key === null || C.key === void 0) && (C.key = `vc-notification-${Sx}`, Sx += 1), b.value = [...b.value, {
        type: "open",
        config: C
      }];
    },
    close: (S) => {
      b.value = [...b.value, {
        type: "close",
        key: S
      }];
    },
    destroy: () => {
      b.value = [...b.value, {
        type: "destroy"
      }];
    }
  };
  return Ie(b, () => {
    b.value.length && (b.value.forEach((S) => {
      switch (S.type) {
        case "open":
          d(S.config);
          break;
        case "close":
          f(S.key);
          break;
        case "destroy":
          g();
          break;
      }
    }), b.value = []);
  }), [y, m];
}
const WB = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    boxShadowSecondary: o,
    colorBgElevated: i,
    colorSuccess: a,
    colorError: r,
    colorWarning: l,
    colorInfo: s,
    fontSizeLG: u,
    motionEaseInOutCirc: c,
    motionDurationSlow: d,
    marginXS: f,
    paddingXS: g,
    borderRadiusLG: m,
    zIndexPopup: b,
    // Custom token
    messageNoticeContentPadding: y
  } = e, S = new Bt("MessageMoveIn", {
    "0%": {
      padding: 0,
      transform: "translateY(-100%)",
      opacity: 0
    },
    "100%": {
      padding: g,
      transform: "translateY(0)",
      opacity: 1
    }
  }), C = new Bt("MessageMoveOut", {
    "0%": {
      maxHeight: e.height,
      padding: g,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      padding: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [t]: I(I({}, Zt(e)), {
        position: "fixed",
        top: f,
        left: "50%",
        transform: "translateX(-50%)",
        width: "100%",
        pointerEvents: "none",
        zIndex: b,
        [`${t}-move-up`]: {
          animationFillMode: "forwards"
        },
        [`
        ${t}-move-up-appear,
        ${t}-move-up-enter
      `]: {
          animationName: S,
          animationDuration: d,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`
        ${t}-move-up-appear${t}-move-up-appear-active,
        ${t}-move-up-enter${t}-move-up-enter-active
      `]: {
          animationPlayState: "running"
        },
        [`${t}-move-up-leave`]: {
          animationName: C,
          animationDuration: d,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`${t}-move-up-leave${t}-move-up-leave-active`]: {
          animationPlayState: "running"
        },
        "&-rtl": {
          direction: "rtl",
          span: {
            direction: "rtl"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [`${t}-notice`]: {
        padding: g,
        textAlign: "center",
        [n]: {
          verticalAlign: "text-bottom",
          marginInlineEnd: f,
          fontSize: u
        },
        [`${t}-notice-content`]: {
          display: "inline-block",
          padding: y,
          background: i,
          borderRadius: m,
          boxShadow: o,
          pointerEvents: "all"
        },
        [`${t}-success ${n}`]: {
          color: a
        },
        [`${t}-error ${n}`]: {
          color: r
        },
        [`${t}-warning ${n}`]: {
          color: l
        },
        [`
        ${t}-info ${n},
        ${t}-loading ${n}`]: {
          color: s
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${t}-notice-pure-panel`]: {
        padding: 0,
        textAlign: "start"
      }
    }
  ];
}, _m = nn("Message", (e) => {
  const t = _t(e, {
    messageNoticeContentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
  });
  return [WB(t)];
}, (e) => ({
  height: 150,
  zIndexPopup: e.zIndexPopupBase + 10
})), qB = {
  info: v(Pl, null, null),
  success: v(_r, null, null),
  error: v(di, null, null),
  warning: v(Ar, null, null),
  loading: v(ba, null, null)
}, CP = ye({
  name: "PureContent",
  inheritAttrs: !1,
  props: ["prefixCls", "type", "icon"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return v("div", {
        class: Te(`${e.prefixCls}-custom-content`, `${e.prefixCls}-${e.type}`)
      }, [e.icon || qB[e.type], v("span", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
    };
  }
});
ye({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    var i;
    const {
      getPrefixCls: a
    } = sf(), r = R(() => e.prefixCls || a("message")), [, l] = _m(r);
    return v(Rf, Z(Z({}, o), {}, {
      prefixCls: r.value,
      class: Te(l.value, `${r.value}-notice-pure-panel`),
      noticeKey: "pure",
      duration: null
    }), {
      default: () => [v(CP, {
        prefixCls: r.value,
        type: e.type,
        icon: e.icon
      }, {
        default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
      })]
    });
  }
});
var GB = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const KB = 8, YB = 3, UB = ye({
  name: "Holder",
  inheritAttrs: !1,
  props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved", "animation", "staticGetContainer"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o, i;
    const {
      getPrefixCls: a,
      getPopupContainer: r
    } = yt("message", e), l = R(() => a("message", e.prefixCls)), [, s] = _m(l), u = () => {
      var b;
      const y = (b = e.top) !== null && b !== void 0 ? b : KB;
      return {
        left: "50%",
        transform: "translateX(-50%)",
        top: typeof y == "number" ? `${y}px` : y
      };
    }, c = () => Te(s.value, e.rtl ? `${l.value}-rtl` : ""), d = () => {
      var b;
      return Cv({
        prefixCls: l.value,
        animation: (b = e.animation) !== null && b !== void 0 ? b : "move-up",
        transitionName: e.transitionName
      });
    }, f = v("span", {
      class: `${l.value}-close-x`
    }, [v(wa, {
      class: `${l.value}-close-icon`
    }, null)]), [g, m] = SP({
      //@ts-ignore
      getStyles: u,
      prefixCls: l.value,
      getClassName: c,
      motion: d,
      closable: !1,
      closeIcon: f,
      duration: (o = e.duration) !== null && o !== void 0 ? o : YB,
      getContainer: (i = e.staticGetContainer) !== null && i !== void 0 ? i : r.value,
      maxCount: e.maxCount,
      onAllRemoved: e.onAllRemoved
    });
    return n(I(I({}, g), {
      prefixCls: l,
      hashId: s
    })), m;
  }
});
let Cx = 0;
function XB(e) {
  const t = Pe(null), n = Symbol("messageHolderKey"), o = (s) => {
    var u;
    (u = t.value) === null || u === void 0 || u.close(s);
  }, i = (s) => {
    if (!t.value) {
      const P = () => {
      };
      return P.then = () => {
      }, P;
    }
    const {
      open: u,
      prefixCls: c,
      hashId: d
    } = t.value, f = `${c}-notice`, {
      content: g,
      icon: m,
      type: b,
      key: y,
      class: S,
      onClose: C
    } = s, O = GB(s, ["content", "icon", "type", "key", "class", "onClose"]);
    let $ = y;
    return $ == null && (Cx += 1, $ = `antd-message-${Cx}`), ik((P) => (u(I(I({}, O), {
      key: $,
      content: () => v(CP, {
        prefixCls: c,
        type: b,
        icon: typeof m == "function" ? m() : m
      }, {
        default: () => [typeof g == "function" ? g() : g]
      }),
      placement: "top",
      // @ts-ignore
      class: Te(b && `${f}-${b}`, d, S),
      onClose: () => {
        C?.(), P();
      }
    })), () => {
      o($);
    }));
  }, r = {
    open: i,
    destroy: (s) => {
      var u;
      s !== void 0 ? o(s) : (u = t.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["info", "success", "warning", "error", "loading"].forEach((s) => {
    const u = (c, d, f) => {
      let g;
      c && typeof c == "object" && "content" in c ? g = c : g = {
        content: c
      };
      let m, b;
      typeof d == "function" ? b = d : (m = d, b = f);
      const y = I(I({
        onClose: b,
        duration: m
      }, g), {
        type: s
      });
      return i(y);
    };
    r[s] = u;
  }), [r, () => v(UB, Z(Z({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function $P(e) {
  return XB(e);
}
let PP = 3, OP, zo, QB = 1, IP = "", MP = "move-up", TP = !1, kP = () => document.body, EP, _P = !1;
function ZB() {
  return QB++;
}
function JB(e) {
  e.top !== void 0 && (OP = e.top, zo = null), e.duration !== void 0 && (PP = e.duration), e.prefixCls !== void 0 && (IP = e.prefixCls), e.getContainer !== void 0 && (kP = e.getContainer, zo = null), e.transitionName !== void 0 && (MP = e.transitionName, zo = null, TP = !0), e.maxCount !== void 0 && (EP = e.maxCount, zo = null), e.rtl !== void 0 && (_P = e.rtl);
}
function e6(e, t) {
  if (zo) {
    t(zo);
    return;
  }
  Wd.newInstance({
    appContext: e.appContext,
    prefixCls: e.prefixCls || IP,
    rootPrefixCls: e.rootPrefixCls,
    transitionName: MP,
    hasTransitionName: TP,
    style: {
      top: OP
    },
    getContainer: kP || e.getPopupContainer,
    maxCount: EP,
    name: "message",
    useStyle: _m
  }, (n) => {
    if (zo) {
      t(zo);
      return;
    }
    zo = n, t(n);
  });
}
const AP = {
  info: Pl,
  success: _r,
  error: di,
  warning: Ar,
  loading: ba
}, t6 = Object.keys(AP);
function n6(e) {
  const t = e.duration !== void 0 ? e.duration : PP, n = e.key || ZB(), o = new Promise((a) => {
    const r = () => (typeof e.onClose == "function" && e.onClose(), a(!0));
    e6(e, (l) => {
      l.notice({
        key: n,
        duration: t,
        style: e.style || {},
        class: e.class,
        content: (s) => {
          let {
            prefixCls: u
          } = s;
          const c = AP[e.type], d = c ? v(c, null, null) : "", f = Te(`${u}-custom-content`, {
            [`${u}-${e.type}`]: e.type,
            [`${u}-rtl`]: _P === !0
          });
          return v("div", {
            class: f
          }, [typeof e.icon == "function" ? e.icon() : e.icon || d, v("span", null, [typeof e.content == "function" ? e.content() : e.content])]);
        },
        onClose: r,
        onClick: e.onClick
      });
    });
  }), i = () => {
    zo && zo.removeNotice(n);
  };
  return i.then = (a, r) => o.then(a, r), i.promise = o, i;
}
function o6(e) {
  return Object.prototype.toString.call(e) === "[object Object]" && !!e.content;
}
const Gu = {
  open: n6,
  config: JB,
  destroy(e) {
    if (zo)
      if (e) {
        const {
          removeNotice: t
        } = zo;
        t(e);
      } else {
        const {
          destroy: t
        } = zo;
        t(), zo = null;
      }
  }
};
function i6(e, t) {
  e[t] = (n, o, i) => o6(n) ? e.open(I(I({}, n), {
    type: t
  })) : (typeof o == "function" && (i = o, o = void 0), e.open({
    content: n,
    duration: o,
    type: t,
    onClose: i
  }));
}
t6.forEach((e) => i6(Gu, e));
Gu.warn = Gu.warning;
Gu.useMessage = $P;
const a6 = (e) => {
  const {
    componentCls: t,
    width: n,
    notificationMarginEdge: o
  } = e, i = new Bt("antNotificationTopFadeIn", {
    "0%": {
      marginTop: "-100%",
      opacity: 0
    },
    "100%": {
      marginTop: 0,
      opacity: 1
    }
  }), a = new Bt("antNotificationBottomFadeIn", {
    "0%": {
      marginBottom: "-100%",
      opacity: 0
    },
    "100%": {
      marginBottom: 0,
      opacity: 1
    }
  }), r = new Bt("antNotificationLeftFadeIn", {
    "0%": {
      right: {
        _skip_check_: !0,
        value: n
      },
      opacity: 0
    },
    "100%": {
      right: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  });
  return {
    [`&${t}-top, &${t}-bottom`]: {
      marginInline: 0
    },
    [`&${t}-top`]: {
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: i
      }
    },
    [`&${t}-bottom`]: {
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: a
      }
    },
    [`&${t}-topLeft, &${t}-bottomLeft`]: {
      marginInlineEnd: 0,
      marginInlineStart: o,
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: r
      }
    }
  };
}, r6 = (e) => {
  const {
    iconCls: t,
    componentCls: n,
    // .ant-notification
    boxShadowSecondary: o,
    fontSizeLG: i,
    notificationMarginBottom: a,
    borderRadiusLG: r,
    colorSuccess: l,
    colorInfo: s,
    colorWarning: u,
    colorError: c,
    colorTextHeading: d,
    notificationBg: f,
    notificationPadding: g,
    notificationMarginEdge: m,
    motionDurationMid: b,
    motionEaseInOut: y,
    fontSize: S,
    lineHeight: C,
    width: O,
    notificationIconSize: $
  } = e, P = `${n}-notice`, k = new Bt("antNotificationFadeIn", {
    "0%": {
      left: {
        _skip_check_: !0,
        value: O
      },
      opacity: 0
    },
    "100%": {
      left: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  }), x = new Bt("antNotificationFadeOut", {
    "0%": {
      maxHeight: e.animationMaxHeight,
      marginBottom: a,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      marginBottom: 0,
      paddingTop: 0,
      paddingBottom: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [n]: I(I(I(I({}, Zt(e)), {
        position: "fixed",
        zIndex: e.zIndexPopup,
        marginInlineEnd: m,
        [`${n}-hook-holder`]: {
          position: "relative"
        },
        [`&${n}-top, &${n}-bottom`]: {
          [`${n}-notice`]: {
            marginInline: "auto auto"
          }
        },
        [`&${n}-topLeft, &${n}-bottomLeft`]: {
          [`${n}-notice`]: {
            marginInlineEnd: "auto",
            marginInlineStart: 0
          }
        },
        //  animation
        [`${n}-fade-enter, ${n}-fade-appear`]: {
          animationDuration: e.motionDurationMid,
          animationTimingFunction: y,
          animationFillMode: "both",
          opacity: 0,
          animationPlayState: "paused"
        },
        [`${n}-fade-leave`]: {
          animationTimingFunction: y,
          animationFillMode: "both",
          animationDuration: b,
          animationPlayState: "paused"
        },
        [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
          animationName: k,
          animationPlayState: "running"
        },
        [`${n}-fade-leave${n}-fade-leave-active`]: {
          animationName: x,
          animationPlayState: "running"
        }
      }), a6(e)), {
        // RTL
        "&-rtl": {
          direction: "rtl",
          [`${n}-notice-btn`]: {
            float: "left"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [P]: {
        position: "relative",
        width: O,
        maxWidth: `calc(100vw - ${m * 2}px)`,
        marginBottom: a,
        marginInlineStart: "auto",
        padding: g,
        overflow: "hidden",
        lineHeight: C,
        wordWrap: "break-word",
        background: f,
        borderRadius: r,
        boxShadow: o,
        [`${n}-close-icon`]: {
          fontSize: S,
          cursor: "pointer"
        },
        [`${P}-message`]: {
          marginBottom: e.marginXS,
          color: d,
          fontSize: i,
          lineHeight: e.lineHeightLG
        },
        [`${P}-description`]: {
          fontSize: S
        },
        [`&${P}-closable ${P}-message`]: {
          paddingInlineEnd: e.paddingLG
        },
        [`${P}-with-icon ${P}-message`]: {
          marginBottom: e.marginXS,
          marginInlineStart: e.marginSM + $,
          fontSize: i
        },
        [`${P}-with-icon ${P}-description`]: {
          marginInlineStart: e.marginSM + $,
          fontSize: S
        },
        // Icon & color style in different selector level
        // https://github.com/ant-design/ant-design/issues/16503
        // https://github.com/ant-design/ant-design/issues/15512
        [`${P}-icon`]: {
          position: "absolute",
          fontSize: $,
          lineHeight: 0,
          // icon-font
          [`&-success${t}`]: {
            color: l
          },
          [`&-info${t}`]: {
            color: s
          },
          [`&-warning${t}`]: {
            color: u
          },
          [`&-error${t}`]: {
            color: c
          }
        },
        [`${P}-close`]: {
          position: "absolute",
          top: e.notificationPaddingVertical,
          insetInlineEnd: e.notificationPaddingHorizontal,
          color: e.colorIcon,
          outline: "none",
          width: e.notificationCloseButtonSize,
          height: e.notificationCloseButtonSize,
          borderRadius: e.borderRadiusSM,
          transition: `background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          "&:hover": {
            color: e.colorIconHover,
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContent
          }
        },
        [`${P}-btn`]: {
          float: "right",
          marginTop: e.marginSM
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${P}-pure-panel`]: {
        margin: 0
      }
    }
  ];
}, Am = nn("Notification", (e) => {
  const t = e.paddingMD, n = e.paddingLG, o = _t(e, {
    // default.less variables
    notificationBg: e.colorBgElevated,
    notificationPaddingVertical: t,
    notificationPaddingHorizontal: n,
    // index.less variables
    notificationPadding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,
    notificationMarginBottom: e.margin,
    notificationMarginEdge: e.marginLG,
    animationMaxHeight: 150,
    notificationIconSize: e.fontSizeLG * e.lineHeightLG,
    notificationCloseButtonSize: e.controlHeightLG * 0.55
  });
  return [r6(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50,
  width: 384
}));
function DP(e, t) {
  return t || v("span", {
    class: `${e}-close-x`
  }, [v(wa, {
    class: `${e}-close-icon`
  }, null)]);
}
v(Pl, null, null), v(_r, null, null), v(di, null, null), v(Ar, null, null), v(ba, null, null);
const l6 = {
  success: _r,
  info: Pl,
  error: di,
  warning: Ar
};
function zP(e) {
  let {
    prefixCls: t,
    icon: n,
    type: o,
    message: i,
    description: a,
    btn: r
  } = e, l = null;
  if (n)
    l = v("span", {
      class: `${t}-icon`
    }, [ts(n)]);
  else if (o) {
    const s = l6[o];
    l = v(s, {
      class: `${t}-icon ${t}-icon-${o}`
    }, null);
  }
  return v("div", {
    class: Te({
      [`${t}-with-icon`]: l
    }),
    role: "alert"
  }, [l, v("div", {
    class: `${t}-message`
  }, [i]), v("div", {
    class: `${t}-description`
  }, [a]), r && v("div", {
    class: `${t}-btn`
  }, [r])]);
}
ye({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  setup(e) {
    const {
      getPrefixCls: t
    } = yt("notification", e), n = R(() => e.prefixCls || t("notification")), o = R(() => `${n.value}-notice`), [, i] = Am(n);
    return () => v(Rf, Z(Z({}, e), {}, {
      prefixCls: n.value,
      class: Te(i.value, `${o.value}-pure-panel`),
      noticeKey: "pure",
      duration: null,
      closable: e.closable,
      closeIcon: DP(n.value, e.closeIcon)
    }), {
      default: () => [v(zP, {
        prefixCls: o.value,
        icon: e.icon,
        type: e.type,
        message: e.message,
        description: e.description,
        btn: e.btn
      }, null)]
    });
  }
});
function RP(e, t, n) {
  let o;
  switch (t = typeof t == "number" ? `${t}px` : t, n = typeof n == "number" ? `${n}px` : n, e) {
    case "top":
      o = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: t,
        bottom: "auto"
      };
      break;
    case "topLeft":
      o = {
        left: 0,
        top: t,
        bottom: "auto"
      };
      break;
    case "topRight":
      o = {
        right: 0,
        top: t,
        bottom: "auto"
      };
      break;
    case "bottom":
      o = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: "auto",
        bottom: n
      };
      break;
    case "bottomLeft":
      o = {
        left: 0,
        top: "auto",
        bottom: n
      };
      break;
    default:
      o = {
        right: 0,
        top: "auto",
        bottom: n
      };
      break;
  }
  return o;
}
function s6(e) {
  return {
    name: `${e}-fade`
  };
}
var u6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const $x = 24, c6 = 4.5, d6 = ye({
  name: "Holder",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const {
      getPrefixCls: o,
      getPopupContainer: i
    } = yt("notification", e), a = R(() => e.prefixCls || o("notification")), r = (f) => {
      var g, m;
      return RP(f, (g = e.top) !== null && g !== void 0 ? g : $x, (m = e.bottom) !== null && m !== void 0 ? m : $x);
    }, [, l] = Am(a), s = () => Te(l.value, {
      [`${a.value}-rtl`]: e.rtl
    }), u = () => s6(a.value), [c, d] = SP({
      prefixCls: a.value,
      getStyles: r,
      getClassName: s,
      motion: u,
      closable: !0,
      closeIcon: DP(a.value),
      duration: c6,
      getContainer: () => {
        var f, g;
        return ((f = e.getPopupContainer) === null || f === void 0 ? void 0 : f.call(e)) || ((g = i.value) === null || g === void 0 ? void 0 : g.call(i)) || document.body;
      },
      maxCount: e.maxCount,
      hashId: l.value,
      onAllRemoved: e.onAllRemoved
    });
    return n(I(I({}, c), {
      prefixCls: a.value,
      hashId: l
    })), d;
  }
});
function f6(e) {
  const t = Pe(null), n = Symbol("notificationHolderKey"), o = (l) => {
    if (!t.value)
      return;
    const {
      open: s,
      prefixCls: u,
      hashId: c
    } = t.value, d = `${u}-notice`, {
      message: f,
      description: g,
      icon: m,
      type: b,
      btn: y,
      class: S
    } = l, C = u6(l, ["message", "description", "icon", "type", "btn", "class"]);
    return s(I(I({
      placement: "topRight"
    }, C), {
      content: () => v(zP, {
        prefixCls: d,
        icon: typeof m == "function" ? m() : m,
        type: b,
        message: typeof f == "function" ? f() : f,
        description: typeof g == "function" ? g() : g,
        btn: typeof y == "function" ? y() : y
      }, null),
      // @ts-ignore
      class: Te(b && `${d}-${b}`, c, S)
    }));
  }, a = {
    open: o,
    destroy: (l) => {
      var s, u;
      l !== void 0 ? (s = t.value) === null || s === void 0 || s.close(l) : (u = t.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["success", "info", "warning", "error"].forEach((l) => {
    a[l] = (s) => o(I(I({}, s), {
      type: l
    }));
  }), [a, () => v(d6, Z(Z({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function NP(e) {
  return f6(e);
}
const ol = {};
let BP = 4.5, FP = "24px", LP = "24px", _h = "", HP = "topRight", VP = () => document.body, jP = null, Ah = !1, WP;
function p6(e) {
  const {
    duration: t,
    placement: n,
    bottom: o,
    top: i,
    getContainer: a,
    closeIcon: r,
    prefixCls: l
  } = e;
  l !== void 0 && (_h = l), t !== void 0 && (BP = t), n !== void 0 && (HP = n), o !== void 0 && (LP = typeof o == "number" ? `${o}px` : o), i !== void 0 && (FP = typeof i == "number" ? `${i}px` : i), a !== void 0 && (VP = a), r !== void 0 && (jP = r), e.rtl !== void 0 && (Ah = e.rtl), e.maxCount !== void 0 && (WP = e.maxCount);
}
function g6(e, t) {
  let {
    prefixCls: n,
    placement: o = HP,
    getContainer: i = VP,
    top: a,
    bottom: r,
    closeIcon: l = jP,
    appContext: s
  } = e;
  const {
    getPrefixCls: u
  } = O6(), c = u("notification", n || _h), d = `${c}-${o}-${Ah}`, f = ol[d];
  if (f) {
    Promise.resolve(f).then((m) => {
      t(m);
    });
    return;
  }
  const g = Te(`${c}-${o}`, {
    [`${c}-rtl`]: Ah === !0
  });
  Wd.newInstance({
    name: "notification",
    prefixCls: n || _h,
    useStyle: Am,
    class: g,
    style: RP(o, a ?? FP, r ?? LP),
    appContext: s,
    getContainer: i,
    closeIcon: (m) => {
      let {
        prefixCls: b
      } = m;
      return v("span", {
        class: `${b}-close-x`
      }, [ts(l, {}, v(wa, {
        class: `${b}-close-icon`
      }, null))]);
    },
    maxCount: WP,
    hasTransitionName: !0
  }, (m) => {
    ol[d] = m, t(m);
  });
}
const h6 = {
  success: Yv,
  info: Xv,
  error: Qv,
  warning: Uv
};
function v6(e) {
  const {
    icon: t,
    type: n,
    description: o,
    message: i,
    btn: a
  } = e, r = e.duration === void 0 ? BP : e.duration;
  g6(e, (l) => {
    l.notice({
      content: (s) => {
        let {
          prefixCls: u
        } = s;
        const c = `${u}-notice`;
        let d = null;
        if (t)
          d = () => v("span", {
            class: `${c}-icon`
          }, [ts(t)]);
        else if (n) {
          const f = h6[n];
          d = () => v(f, {
            class: `${c}-icon ${c}-icon-${n}`
          }, null);
        }
        return v("div", {
          class: d ? `${c}-with-icon` : ""
        }, [d && d(), v("div", {
          class: `${c}-message`
        }, [!o && d ? v("span", {
          class: `${c}-message-single-line-auto-margin`
        }, null) : null, ts(i)]), v("div", {
          class: `${c}-description`
        }, [ts(o)]), a ? v("span", {
          class: `${c}-btn`
        }, [ts(a)]) : null]);
      },
      duration: r,
      closable: !0,
      onClose: e.onClose,
      onClick: e.onClick,
      key: e.key,
      style: e.style || {},
      class: e.class
    });
  });
}
const _s = {
  open: v6,
  close(e) {
    Object.keys(ol).forEach((t) => Promise.resolve(ol[t]).then((n) => {
      n.removeNotice(e);
    }));
  },
  config: p6,
  destroy() {
    Object.keys(ol).forEach((e) => {
      Promise.resolve(ol[e]).then((t) => {
        t.destroy();
      }), delete ol[e];
    });
  }
}, m6 = ["success", "info", "warning", "error"];
m6.forEach((e) => {
  _s[e] = (t) => _s.open(I(I({}, t), {
    type: e
  }));
});
_s.warn = _s.warning;
_s.useNotification = NP;
const b6 = `-ant-${Date.now()}-${Math.random()}`;
function y6(e, t) {
  const n = {}, o = (r, l) => {
    let s = r.clone();
    return s = l?.(s) || s, s.toRgbString();
  }, i = (r, l) => {
    const s = new In(r), u = Wa(s.toRgbString());
    n[`${l}-color`] = o(s), n[`${l}-color-disabled`] = u[1], n[`${l}-color-hover`] = u[4], n[`${l}-color-active`] = u[6], n[`${l}-color-outline`] = s.clone().setAlpha(0.2).toRgbString(), n[`${l}-color-deprecated-bg`] = u[0], n[`${l}-color-deprecated-border`] = u[2];
  };
  if (t.primaryColor) {
    i(t.primaryColor, "primary");
    const r = new In(t.primaryColor), l = Wa(r.toRgbString());
    l.forEach((u, c) => {
      n[`primary-${c + 1}`] = u;
    }), n["primary-color-deprecated-l-35"] = o(r, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = o(r, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = o(r, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = o(r, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = o(r, (u) => u.setAlpha(u.getAlpha() * 0.12));
    const s = new In(l[0]);
    n["primary-color-active-deprecated-f-30"] = o(s, (u) => u.setAlpha(u.getAlpha() * 0.3)), n["primary-color-active-deprecated-d-02"] = o(s, (u) => u.darken(2));
  }
  return t.successColor && i(t.successColor, "success"), t.warningColor && i(t.warningColor, "warning"), t.errorColor && i(t.errorColor, "error"), t.infoColor && i(t.infoColor, "info"), `
  :root {
    ${Object.keys(n).map((r) => `--${e}-${r}: ${n[r]};`).join(`
`)}
  }
  `.trim();
}
function x6(e, t) {
  const n = y6(e, t);
  Ti() ? Bu(n, `${b6}-dynamic-theme`) : Qn(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
}
const w6 = (e) => {
  const [t, n] = Hs();
  return Vg(R(() => ({
    theme: t.value,
    token: n.value,
    hashId: "",
    path: ["ant-design-icons", e.value]
  })), () => [{
    [`.${e.value}`]: I(I({}, Ls()), {
      [`.${e.value} .${e.value}-icon`]: {
        display: "block"
      }
    })
  }]);
};
function S6(e, t) {
  const n = R(() => e?.value || {}), o = R(() => n.value.inherit === !1 || !t?.value ? mv : t.value);
  return R(() => {
    if (!e?.value)
      return t?.value;
    const a = I({}, o.value.components);
    return Object.keys(e.value.components || {}).forEach((r) => {
      a[r] = I(I({}, a[r]), e.value.components[r]);
    }), I(I(I({}, o.value), n.value), {
      token: I(I({}, o.value.token), n.value.token),
      components: a
    });
  });
}
var C6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const $6 = "ant";
function fs() {
  return mo.prefixCls || $6;
}
function qP() {
  return mo.iconPrefixCls || cv;
}
const Dm = Dn({}), mo = Dn({});
Ft(() => {
  I(mo, Dm), mo.prefixCls = fs(), mo.iconPrefixCls = qP(), mo.getPrefixCls = (e, t) => t || (e ? `${mo.prefixCls}-${e}` : mo.prefixCls), mo.getRootPrefixCls = () => mo.prefixCls ? mo.prefixCls : fs();
});
let Vp;
const P6 = (e) => {
  Vp && Vp(), Vp = Ft(() => {
    I(Dm, Dn(e)), I(mo, Dn(e));
  }), e.theme && x6(fs(), e.theme);
}, O6 = () => ({
  getPrefixCls: (e, t) => t || (e ? `${fs()}-${e}` : fs()),
  getIconPrefixCls: qP,
  getRootPrefixCls: () => mo.prefixCls ? mo.prefixCls : fs()
}), dl = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AConfigProvider",
  inheritAttrs: !1,
  props: kk(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = sf(), i = (A, U) => {
      const {
        prefixCls: j = "ant"
      } = e;
      if (U) return U;
      const ae = j || o.getPrefixCls("");
      return A ? `${ae}-${A}` : ae;
    }, a = R(() => e.iconPrefixCls || o.iconPrefixCls.value || cv), r = R(() => a.value !== o.iconPrefixCls.value), l = R(() => {
      var A;
      return e.csp || ((A = o.csp) === null || A === void 0 ? void 0 : A.value);
    }), s = w6(a), u = S6(R(() => e.theme), R(() => {
      var A;
      return (A = o.theme) === null || A === void 0 ? void 0 : A.value;
    })), c = (A) => (e.renderEmpty || n.renderEmpty || o.renderEmpty || y_)(A), d = R(() => {
      var A, U;
      return (A = e.autoInsertSpaceInButton) !== null && A !== void 0 ? A : (U = o.autoInsertSpaceInButton) === null || U === void 0 ? void 0 : U.value;
    }), f = R(() => {
      var A;
      return e.locale || ((A = o.locale) === null || A === void 0 ? void 0 : A.value);
    });
    Ie(f, () => {
      Dm.locale = f.value;
    }, {
      immediate: !0
    });
    const g = R(() => {
      var A;
      return e.direction || ((A = o.direction) === null || A === void 0 ? void 0 : A.value);
    }), m = R(() => {
      var A, U;
      return (A = e.space) !== null && A !== void 0 ? A : (U = o.space) === null || U === void 0 ? void 0 : U.value;
    }), b = R(() => {
      var A, U;
      return (A = e.virtual) !== null && A !== void 0 ? A : (U = o.virtual) === null || U === void 0 ? void 0 : U.value;
    }), y = R(() => {
      var A, U;
      return (A = e.dropdownMatchSelectWidth) !== null && A !== void 0 ? A : (U = o.dropdownMatchSelectWidth) === null || U === void 0 ? void 0 : U.value;
    }), S = R(() => {
      var A;
      return e.getTargetContainer !== void 0 ? e.getTargetContainer : (A = o.getTargetContainer) === null || A === void 0 ? void 0 : A.value;
    }), C = R(() => {
      var A;
      return e.getPopupContainer !== void 0 ? e.getPopupContainer : (A = o.getPopupContainer) === null || A === void 0 ? void 0 : A.value;
    }), O = R(() => {
      var A;
      return e.pageHeader !== void 0 ? e.pageHeader : (A = o.pageHeader) === null || A === void 0 ? void 0 : A.value;
    }), $ = R(() => {
      var A;
      return e.input !== void 0 ? e.input : (A = o.input) === null || A === void 0 ? void 0 : A.value;
    }), P = R(() => {
      var A;
      return e.pagination !== void 0 ? e.pagination : (A = o.pagination) === null || A === void 0 ? void 0 : A.value;
    }), k = R(() => {
      var A;
      return e.form !== void 0 ? e.form : (A = o.form) === null || A === void 0 ? void 0 : A.value;
    }), x = R(() => {
      var A;
      return e.select !== void 0 ? e.select : (A = o.select) === null || A === void 0 ? void 0 : A.value;
    }), E = R(() => e.componentSize), z = R(() => e.componentDisabled), B = R(() => {
      var A, U;
      return (A = e.wave) !== null && A !== void 0 ? A : (U = o.wave) === null || U === void 0 ? void 0 : U.value;
    }), D = {
      csp: l,
      autoInsertSpaceInButton: d,
      locale: f,
      direction: g,
      space: m,
      virtual: b,
      dropdownMatchSelectWidth: y,
      getPrefixCls: i,
      iconPrefixCls: a,
      theme: R(() => {
        var A, U;
        return (A = u.value) !== null && A !== void 0 ? A : (U = o.theme) === null || U === void 0 ? void 0 : U.value;
      }),
      renderEmpty: c,
      getTargetContainer: S,
      getPopupContainer: C,
      pageHeader: O,
      input: $,
      pagination: P,
      form: k,
      select: x,
      componentSize: E,
      componentDisabled: z,
      transformCellText: R(() => e.transformCellText),
      wave: B
    }, W = R(() => {
      const A = u.value || {}, {
        algorithm: U,
        token: j
      } = A, ae = C6(A, ["algorithm", "token"]), G = U && (!Array.isArray(U) || U.length > 0) ? $S(U) : void 0;
      return I(I({}, ae), {
        theme: G,
        token: I(I({}, pf), j)
      });
    }), H = R(() => {
      var A, U;
      let j = {};
      return f.value && (j = ((A = f.value.Form) === null || A === void 0 ? void 0 : A.defaultValidateMessages) || ((U = Ir.Form) === null || U === void 0 ? void 0 : U.defaultValidateMessages) || {}), e.form && e.form.validateMessages && (j = I(I({}, j), e.form.validateMessages)), j;
    });
    Ek(D), Mk({
      validateMessages: H
    }), qS(E), dS(z);
    const F = (A) => {
      var U, j;
      let ae = r.value ? s((U = n.default) === null || U === void 0 ? void 0 : U.call(n)) : (j = n.default) === null || j === void 0 ? void 0 : j.call(n);
      if (e.theme) {
        const G = /* @__PURE__ */ (function() {
          return ae;
        })();
        ae = v(g_, {
          value: W.value
        }, {
          default: () => [G]
        });
      }
      return v(RB, {
        locale: f.value || A,
        ANT_MARK__: Eh
      }, {
        default: () => [ae]
      });
    };
    return Ft(() => {
      g.value && (Gu.config({
        rtl: g.value === "rtl"
      }), _s.config({
        rtl: g.value === "rtl"
      }));
    }), () => v(pS, {
      children: (A, U, j) => F(j)
    }, null);
  }
});
dl.config = P6;
dl.install = function(e) {
  e.component(dl.name, dl);
};
const I6 = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  return v($t, Z(Z({
    size: "small",
    type: "primary"
  }, e), n), o);
}, Gc = (e, t, n) => {
  const o = ek(n);
  return {
    [`${e.componentCls}-${t}`]: {
      color: e[`color${n}`],
      background: e[`color${o}Bg`],
      borderColor: e[`color${o}Border`],
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}, M6 = (e) => FS(e, (t, n) => {
  let {
    textColor: o,
    lightBorderColor: i,
    lightColor: a,
    darkColor: r
  } = n;
  return {
    [`${e.componentCls}-${t}`]: {
      color: o,
      background: a,
      borderColor: i,
      // Inverse color
      "&-inverse": {
        color: e.colorTextLightSolid,
        background: r,
        borderColor: r
      },
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}), T6 = (e) => {
  const {
    paddingXXS: t,
    lineWidth: n,
    tagPaddingHorizontal: o,
    componentCls: i
  } = e, a = o - n, r = t - n;
  return {
    // Result
    [i]: I(I({}, Zt(e)), {
      display: "inline-block",
      height: "auto",
      marginInlineEnd: e.marginXS,
      paddingInline: a,
      fontSize: e.tagFontSize,
      lineHeight: `${e.tagLineHeight}px`,
      whiteSpace: "nowrap",
      background: e.tagDefaultBg,
      border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
      borderRadius: e.borderRadiusSM,
      opacity: 1,
      transition: `all ${e.motionDurationMid}`,
      textAlign: "start",
      // RTL
      [`&${i}-rtl`]: {
        direction: "rtl"
      },
      "&, a, a:hover": {
        color: e.tagDefaultColor
      },
      [`${i}-close-icon`]: {
        marginInlineStart: r,
        color: e.colorTextDescription,
        fontSize: e.tagIconSize,
        cursor: "pointer",
        transition: `all ${e.motionDurationMid}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      [`&${i}-has-color`]: {
        borderColor: "transparent",
        [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
          color: e.colorTextLightSolid
        }
      },
      "&-checkable": {
        backgroundColor: "transparent",
        borderColor: "transparent",
        cursor: "pointer",
        [`&:not(${i}-checkable-checked):hover`]: {
          color: e.colorPrimary,
          backgroundColor: e.colorFillSecondary
        },
        "&:active, &-checked": {
          color: e.colorTextLightSolid
        },
        "&-checked": {
          backgroundColor: e.colorPrimary,
          "&:hover": {
            backgroundColor: e.colorPrimaryHover
          }
        },
        "&:active": {
          backgroundColor: e.colorPrimaryActive
        }
      },
      "&-hidden": {
        display: "none"
      },
      // To ensure that a space will be placed between character and `Icon`.
      [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
        marginInlineStart: a
      }
    }),
    [`${i}-borderless`]: {
      borderColor: "transparent",
      background: e.tagBorderlessBg
    }
  };
}, GP = nn("Tag", (e) => {
  const {
    fontSize: t,
    lineHeight: n,
    lineWidth: o,
    fontSizeIcon: i
  } = e, a = Math.round(t * n), r = e.fontSizeSM, l = a - o * 2, s = e.colorFillAlter, u = e.colorText, c = _t(e, {
    tagFontSize: r,
    tagLineHeight: l,
    tagDefaultBg: s,
    tagDefaultColor: u,
    tagIconSize: i - 2 * o,
    tagPaddingHorizontal: 8,
    tagBorderlessBg: e.colorFillTertiary
  });
  return [T6(c), M6(c), Gc(c, "success", "Success"), Gc(c, "processing", "Info"), Gc(c, "error", "Error"), Gc(c, "warning", "Warning")];
}), k6 = () => ({
  prefixCls: String,
  checked: {
    type: Boolean,
    default: void 0
  },
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  "onUpdate:checked": Function
}), Dh = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckableTag",
  inheritAttrs: !1,
  props: k6(),
  // emits: ['update:checked', 'change', 'click'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      prefixCls: a
    } = yt("tag", e), [r, l] = GP(a), s = (c) => {
      const {
        checked: d
      } = e;
      o("update:checked", !d), o("change", !d), o("click", c);
    }, u = R(() => Te(a.value, l.value, {
      [`${a.value}-checkable`]: !0,
      [`${a.value}-checkable-checked`]: e.checked
    }));
    return () => {
      var c;
      return r(v("span", Z(Z({}, i), {}, {
        class: [u.value, i.class],
        onClick: s
      }), [(c = n.default) === null || c === void 0 ? void 0 : c.call(n)]));
    };
  }
}), E6 = () => ({
  prefixCls: String,
  color: {
    type: String
  },
  closable: {
    type: Boolean,
    default: !1
  },
  closeIcon: ue.any,
  /** @deprecated `visible` will be removed in next major version. */
  visible: {
    type: Boolean,
    default: void 0
  },
  onClose: {
    type: Function
  },
  onClick: Cs(),
  "onUpdate:visible": Function,
  icon: ue.any,
  bordered: {
    type: Boolean,
    default: !0
  }
}), Ui = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATag",
  inheritAttrs: !1,
  props: E6(),
  // emits: ['update:visible', 'close'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      prefixCls: a,
      direction: r
    } = yt("tag", e), [l, s] = GP(a), u = Pe(!0);
    process.env.NODE_ENV !== "production" && Qn(e.visible === void 0, "Tag", '`visible` is deprecated, please use `<Tag v-show="visible" />` instead.'), Ft(() => {
      e.visible !== void 0 && (u.value = e.visible);
    });
    const c = (m) => {
      m.stopPropagation(), o("update:visible", !1), o("close", m), !m.defaultPrevented && e.visible === void 0 && (u.value = !1);
    }, d = R(() => jC(e.color) || fN(e.color)), f = R(() => Te(a.value, s.value, {
      [`${a.value}-${e.color}`]: d.value,
      [`${a.value}-has-color`]: e.color && !d.value,
      [`${a.value}-hidden`]: !u.value,
      [`${a.value}-rtl`]: r.value === "rtl",
      [`${a.value}-borderless`]: !e.bordered
    })), g = (m) => {
      o("click", m);
    };
    return () => {
      var m, b, y;
      const {
        icon: S = (m = n.icon) === null || m === void 0 ? void 0 : m.call(n),
        color: C,
        closeIcon: O = (b = n.closeIcon) === null || b === void 0 ? void 0 : b.call(n),
        closable: $ = !1
      } = e, P = () => $ ? O ? v("span", {
        class: `${a.value}-close-icon`,
        onClick: c
      }, [O]) : v(wa, {
        class: `${a.value}-close-icon`,
        onClick: c
      }, null) : null, k = {
        backgroundColor: C && !d.value ? C : void 0
      }, x = S || null, E = (y = n.default) === null || y === void 0 ? void 0 : y.call(n), z = x ? v(He, null, [x, v("span", null, [E])]) : E, B = e.onClick !== void 0, D = v("span", Z(Z({}, i), {}, {
        onClick: g,
        class: [f.value, i.class],
        style: [k, i.style]
      }), [z, P()]);
      return l(B ? v(Zv, null, {
        default: () => [D]
      }) : D);
    };
  }
});
Ui.CheckableTag = Dh;
Ui.install = function(e) {
  return e.component(Ui.name, Ui), e.component(Dh.name, Dh), e;
};
function _6(e, t) {
  let {
    slots: n,
    attrs: o
  } = t;
  return v(Ui, Z(Z({
    color: "blue"
  }, e), o), n);
}
var A6 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, name: "calendar", theme: "outlined" };
function Px(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      D6(e, i, n[i]);
    });
  }
  return e;
}
function D6(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Nf = function(t, n) {
  var o = Px({}, t, n.attrs);
  return v(pn, Px({}, o, {
    icon: A6
  }), null);
};
Nf.displayName = "CalendarOutlined";
Nf.inheritAttrs = !1;
var z6 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" } }] }, name: "clock-circle", theme: "outlined" };
function Ox(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      R6(e, i, n[i]);
    });
  }
  return e;
}
function R6(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bf = function(t, n) {
  var o = Ox({}, t, n.attrs);
  return v(pn, Ox({}, o, {
    icon: z6
  }), null);
};
Bf.displayName = "ClockCircleOutlined";
Bf.inheritAttrs = !1;
function N6(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.yearPlaceholder : t === "quarter" && e.lang.quarterPlaceholder ? e.lang.quarterPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.monthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.weekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.placeholder : e.lang.placeholder;
}
function B6(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.rangeYearPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.rangeMonthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.rangeWeekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.rangePlaceholder : e.lang.rangePlaceholder;
}
function KP(e, t) {
  const n = {
    adjustX: 1,
    adjustY: 1
  };
  switch (t) {
    case "bottomLeft":
      return {
        points: ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
    case "bottomRight":
      return {
        points: ["tr", "br"],
        offset: [0, 4],
        overflow: n
      };
    case "topLeft":
      return {
        points: ["bl", "tl"],
        offset: [0, -4],
        overflow: n
      };
    case "topRight":
      return {
        points: ["br", "tr"],
        offset: [0, -4],
        overflow: n
      };
    default:
      return {
        points: e === "rtl" ? ["tr", "br"] : ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
  }
}
function YP() {
  return {
    id: String,
    /**
     * @deprecated `dropdownClassName` is deprecated which will be removed in next major
     *   version.Please use `popupClassName` instead.
     */
    dropdownClassName: String,
    popupClassName: String,
    popupStyle: Ct(),
    transitionName: String,
    placeholder: String,
    allowClear: st(),
    autofocus: st(),
    disabled: st(),
    tabindex: Number,
    open: st(),
    defaultOpen: st(),
    /** Make input readOnly to avoid popup keyboard in mobile */
    inputReadOnly: st(),
    format: tn([String, Function, Array]),
    // Value
    // format:  string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
    // Render
    // suffixIcon?: VueNode;
    // clearIcon?: VueNode;
    // prevIcon?: VueNode;
    // nextIcon?: VueNode;
    // superPrevIcon?: VueNode;
    // superNextIcon?: VueNode;
    getPopupContainer: Qe(),
    panelRender: Qe(),
    // // Events
    onChange: Qe(),
    "onUpdate:value": Qe(),
    onOk: Qe(),
    onOpenChange: Qe(),
    "onUpdate:open": Qe(),
    onFocus: Qe(),
    onBlur: Qe(),
    onMousedown: Qe(),
    onMouseup: Qe(),
    onMouseenter: Qe(),
    onMouseleave: Qe(),
    onClick: Qe(),
    onContextmenu: Qe(),
    onKeydown: Qe(),
    // WAI-ARIA
    role: String,
    name: String,
    autocomplete: String,
    direction: dn(),
    showToday: st(),
    showTime: tn([Boolean, Object]),
    locale: Ct(),
    size: dn(),
    bordered: st(),
    dateRender: Qe(),
    disabledDate: Qe(),
    mode: dn(),
    picker: dn(),
    valueFormat: String,
    placement: dn(),
    status: dn(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledHours: Qe(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledMinutes: Qe(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledSeconds: Qe()
  };
}
function F6() {
  return {
    defaultPickerValue: tn([Object, String]),
    defaultValue: tn([Object, String]),
    value: tn([Object, String]),
    presets: Po(),
    disabledTime: Qe(),
    renderExtraFooter: Qe(),
    showNow: st(),
    monthCellRender: Qe(),
    // deprecated  Please use `monthCellRender"` instead.',
    monthCellContentRender: Qe()
  };
}
function L6() {
  return {
    allowEmpty: Po(),
    dateRender: Qe(),
    defaultPickerValue: Po(),
    defaultValue: Po(),
    value: Po(),
    presets: Po(),
    disabledTime: Qe(),
    disabled: tn([Boolean, Array]),
    renderExtraFooter: Qe(),
    separator: {
      type: String
    },
    showTime: tn([Boolean, Object]),
    ranges: Ct(),
    placeholder: Po(),
    mode: Po(),
    onChange: Qe(),
    "onUpdate:value": Qe(),
    onCalendarChange: Qe(),
    onPanelChange: Qe(),
    onOk: Qe()
  };
}
var H6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function V6(e, t) {
  function n(u, c) {
    const d = I(I(I({}, YP()), F6()), t);
    return ye({
      compatConfig: {
        MODE: 3
      },
      name: c,
      inheritAttrs: !1,
      props: d,
      slots: Object,
      setup(f, g) {
        let {
          slots: m,
          expose: b,
          attrs: y,
          emit: S
        } = g;
        const C = f, O = fi(), $ = si.useInject();
        process.env.NODE_ENV !== "production" && (Ln(u !== "quarter", c || "DatePicker", `DatePicker.${c} is legacy usage. Please use DatePicker[picker='${u}'] directly.`), Ln(!C.dropdownClassName, c || "DatePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), Ln(!(C.monthCellContentRender || m.monthCellContentRender), c || "DatePicker", '`monthCellContentRender` is deprecated. Please use `monthCellRender"` instead.'), Ln(!y.getCalendarContainer, c || "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
        const {
          prefixCls: P,
          direction: k,
          getPopupContainer: x,
          size: E,
          rootPrefixCls: z,
          disabled: B
        } = yt("picker", C), {
          compactSize: D,
          compactItemClassnames: W
        } = Vs(P, k), H = R(() => D.value || E.value), [F, A] = U$(P), U = le();
        b({
          focus: () => {
            var we;
            (we = U.value) === null || we === void 0 || we.focus();
          },
          blur: () => {
            var we;
            (we = U.value) === null || we === void 0 || we.blur();
          }
        });
        const j = (we) => C.valueFormat ? e.toString(we, C.valueFormat) : we, ae = (we, re) => {
          const se = j(we);
          S("update:value", se), S("change", se, re), O.onFieldChange();
        }, G = (we) => {
          S("update:open", we), S("openChange", we);
        }, Y = (we) => {
          S("focus", we);
        }, K = (we) => {
          S("blur", we), O.onFieldBlur();
        }, J = (we, re) => {
          const se = j(we);
          S("panelChange", se, re);
        }, be = (we) => {
          const re = j(we);
          S("ok", re);
        }, [xe] = Bs("DatePicker", Md), he = R(() => C.value ? C.valueFormat ? e.toDate(C.value, C.valueFormat) : C.value : C.value === "" ? void 0 : C.value), de = R(() => C.defaultValue ? C.valueFormat ? e.toDate(C.defaultValue, C.valueFormat) : C.defaultValue : C.defaultValue === "" ? void 0 : C.defaultValue), ne = R(() => C.defaultPickerValue ? C.valueFormat ? e.toDate(C.defaultPickerValue, C.valueFormat) : C.defaultPickerValue : C.defaultPickerValue === "" ? void 0 : C.defaultPickerValue);
        return () => {
          var we, re, se, ve, Me, ke;
          const Fe = I(I({}, xe.value), C.locale), Re = I(I({}, C), y), {
            bordered: We = !0,
            placeholder: et,
            suffixIcon: Le = (we = m.suffixIcon) === null || we === void 0 ? void 0 : we.call(m),
            showToday: Ne = !0,
            transitionName: Ge,
            allowClear: it = !0,
            dateRender: Ke = m.dateRender,
            renderExtraFooter: Oe = m.renderExtraFooter,
            monthCellRender: Ve = m.monthCellRender || C.monthCellContentRender || m.monthCellContentRender,
            clearIcon: De = (re = m.clearIcon) === null || re === void 0 ? void 0 : re.call(m),
            id: Je = O.id.value
          } = Re, wt = H6(Re, ["bordered", "placeholder", "suffixIcon", "showToday", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "monthCellRender", "clearIcon", "id"]), lt = Re.showTime === "" ? !0 : Re.showTime, {
            format: qe
          } = Re;
          let at = {};
          u && (at.picker = u);
          const dt = u || Re.picker || "date";
          at = I(I(I({}, at), lt ? qd(I({
            format: qe,
            picker: dt
          }, typeof lt == "object" ? lt : {})) : {}), dt === "time" ? qd(I(I({
            format: qe
          }, wt), {
            picker: dt
          })) : {});
          const vt = P.value, Rt = v(He, null, [Le || (u === "time" ? v(Bf, null, null) : v(Nf, null, null)), $.hasFeedback && $.feedbackIcon]);
          return F(v(l5, Z(Z(Z({
            monthCellRender: Ve,
            dateRender: Ke,
            renderExtraFooter: Oe,
            ref: U,
            placeholder: N6(Fe, dt, et),
            suffixIcon: Rt,
            dropdownAlign: KP(k.value, C.placement),
            clearIcon: De || v(di, null, null),
            allowClear: it,
            transitionName: Ge || `${z.value}-slide-up`
          }, wt), at), {}, {
            id: Je,
            picker: dt,
            value: he.value,
            defaultValue: de.value,
            defaultPickerValue: ne.value,
            showToday: Ne,
            locale: Fe.lang,
            class: Te({
              [`${vt}-${H.value}`]: H.value,
              [`${vt}-borderless`]: !We
            }, Ki(vt, $l($.status, C.status), $.hasFeedback), y.class, A.value, W.value),
            disabled: B.value,
            prefixCls: vt,
            getPopupContainer: y.getCalendarContainer || x.value,
            generateConfig: e,
            prevIcon: ((se = m.prevIcon) === null || se === void 0 ? void 0 : se.call(m)) || v("span", {
              class: `${vt}-prev-icon`
            }, null),
            nextIcon: ((ve = m.nextIcon) === null || ve === void 0 ? void 0 : ve.call(m)) || v("span", {
              class: `${vt}-next-icon`
            }, null),
            superPrevIcon: ((Me = m.superPrevIcon) === null || Me === void 0 ? void 0 : Me.call(m)) || v("span", {
              class: `${vt}-super-prev-icon`
            }, null),
            superNextIcon: ((ke = m.superNextIcon) === null || ke === void 0 ? void 0 : ke.call(m)) || v("span", {
              class: `${vt}-super-next-icon`
            }, null),
            components: UP,
            direction: k.value,
            dropdownClassName: Te(A.value, C.popupClassName, C.dropdownClassName),
            onChange: ae,
            onOpenChange: G,
            onFocus: Y,
            onBlur: K,
            onPanelChange: J,
            onOk: be
          }), null));
        };
      }
    });
  }
  const o = n(void 0, "ADatePicker"), i = n("week", "AWeekPicker"), a = n("month", "AMonthPicker"), r = n("year", "AYearPicker"), l = n("time", "TimePicker"), s = n("quarter", "AQuarterPicker");
  return {
    DatePicker: o,
    WeekPicker: i,
    MonthPicker: a,
    YearPicker: r,
    TimePicker: l,
    QuarterPicker: s
  };
}
var j6 = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" } }] }, name: "swap-right", theme: "outlined" };
function Ix(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      W6(e, i, n[i]);
    });
  }
  return e;
}
function W6(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var zm = function(t, n) {
  var o = Ix({}, t, n.attrs);
  return v(pn, Ix({}, o, {
    icon: j6
  }), null);
};
zm.displayName = "SwapRightOutlined";
zm.inheritAttrs = !1;
var q6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function G6(e, t) {
  return ye({
    compatConfig: {
      MODE: 3
    },
    name: "ARangePicker",
    inheritAttrs: !1,
    props: I(I(I({}, YP()), L6()), t),
    slots: Object,
    setup(o, i) {
      let {
        expose: a,
        slots: r,
        attrs: l,
        emit: s
      } = i;
      const u = o, c = fi(), d = si.useInject();
      process.env.NODE_ENV !== "production" && (Ln(!u.dropdownClassName, "RangePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), Ln(!l.getCalendarContainer, "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
      const {
        prefixCls: f,
        direction: g,
        getPopupContainer: m,
        size: b,
        rootPrefixCls: y,
        disabled: S
      } = yt("picker", u), {
        compactSize: C,
        compactItemClassnames: O
      } = Vs(f, g), $ = R(() => C.value || b.value), [P, k] = U$(f), x = le();
      a({
        focus: () => {
          var Y;
          (Y = x.value) === null || Y === void 0 || Y.focus();
        },
        blur: () => {
          var Y;
          (Y = x.value) === null || Y === void 0 || Y.blur();
        }
      });
      const E = (Y) => u.valueFormat ? e.toString(Y, u.valueFormat) : Y, z = (Y, K) => {
        const J = E(Y);
        s("update:value", J), s("change", J, K), c.onFieldChange();
      }, B = (Y) => {
        s("update:open", Y), s("openChange", Y);
      }, D = (Y) => {
        s("focus", Y);
      }, W = (Y) => {
        s("blur", Y), c.onFieldBlur();
      }, H = (Y, K) => {
        const J = E(Y);
        s("panelChange", J, K);
      }, F = (Y) => {
        const K = E(Y);
        s("ok", K);
      }, A = (Y, K, J) => {
        const be = E(Y);
        s("calendarChange", be, K, J);
      }, [U] = Bs("DatePicker", Md), j = R(() => u.value && u.valueFormat ? e.toDate(u.value, u.valueFormat) : u.value), ae = R(() => u.defaultValue && u.valueFormat ? e.toDate(u.defaultValue, u.valueFormat) : u.defaultValue), G = R(() => u.defaultPickerValue && u.valueFormat ? e.toDate(u.defaultPickerValue, u.valueFormat) : u.defaultPickerValue);
      return () => {
        var Y, K, J, be, xe, he, de;
        const ne = I(I({}, U.value), u.locale), we = I(I({}, u), l), {
          prefixCls: re,
          bordered: se = !0,
          placeholder: ve,
          suffixIcon: Me = (Y = r.suffixIcon) === null || Y === void 0 ? void 0 : Y.call(r),
          picker: ke = "date",
          transitionName: Fe,
          allowClear: Re = !0,
          dateRender: We = r.dateRender,
          renderExtraFooter: et = r.renderExtraFooter,
          separator: Le = (K = r.separator) === null || K === void 0 ? void 0 : K.call(r),
          clearIcon: Ne = (J = r.clearIcon) === null || J === void 0 ? void 0 : J.call(r),
          id: Ge = c.id.value
        } = we, it = q6(we, ["prefixCls", "bordered", "placeholder", "suffixIcon", "picker", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "separator", "clearIcon", "id"]);
        delete it["onUpdate:value"], delete it["onUpdate:open"];
        const {
          format: Ke,
          showTime: Oe
        } = we;
        let Ve = {};
        Ve = I(I(I({}, Ve), Oe ? qd(I({
          format: Ke,
          picker: ke
        }, Oe)) : {}), ke === "time" ? qd(I(I({
          format: Ke
        }, Tn(it, ["disabledTime"])), {
          picker: ke
        })) : {});
        const De = f.value, Je = v(He, null, [Me || (ke === "time" ? v(Bf, null, null) : v(Nf, null, null)), d.hasFeedback && d.feedbackIcon]);
        return P(v(x5, Z(Z(Z({
          dateRender: We,
          renderExtraFooter: et,
          separator: Le || v("span", {
            "aria-label": "to",
            class: `${De}-separator`
          }, [v(zm, null, null)]),
          ref: x,
          dropdownAlign: KP(g.value, u.placement),
          placeholder: B6(ne, ke, ve),
          suffixIcon: Je,
          clearIcon: Ne || v(di, null, null),
          allowClear: Re,
          transitionName: Fe || `${y.value}-slide-up`
        }, it), Ve), {}, {
          disabled: S.value,
          id: Ge,
          value: j.value,
          defaultValue: ae.value,
          defaultPickerValue: G.value,
          picker: ke,
          class: Te({
            [`${De}-${$.value}`]: $.value,
            [`${De}-borderless`]: !se
          }, Ki(De, $l(d.status, u.status), d.hasFeedback), l.class, k.value, O.value),
          locale: ne.lang,
          prefixCls: De,
          getPopupContainer: l.getCalendarContainer || m.value,
          generateConfig: e,
          prevIcon: ((be = r.prevIcon) === null || be === void 0 ? void 0 : be.call(r)) || v("span", {
            class: `${De}-prev-icon`
          }, null),
          nextIcon: ((xe = r.nextIcon) === null || xe === void 0 ? void 0 : xe.call(r)) || v("span", {
            class: `${De}-next-icon`
          }, null),
          superPrevIcon: ((he = r.superPrevIcon) === null || he === void 0 ? void 0 : he.call(r)) || v("span", {
            class: `${De}-super-prev-icon`
          }, null),
          superNextIcon: ((de = r.superNextIcon) === null || de === void 0 ? void 0 : de.call(r)) || v("span", {
            class: `${De}-super-next-icon`
          }, null),
          components: UP,
          direction: g.value,
          dropdownClassName: Te(k.value, u.popupClassName, u.dropdownClassName),
          onChange: z,
          onOpenChange: B,
          onFocus: D,
          onBlur: W,
          onPanelChange: H,
          onOk: F,
          onCalendarChange: A
        }), null));
      };
    }
  });
}
const UP = {
  button: I6,
  rangeItem: _6
};
function K6(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function qd(e) {
  const {
    format: t,
    picker: n,
    showHour: o,
    showMinute: i,
    showSecond: a,
    use12Hours: r
  } = e, l = K6(t)[0], s = I({}, e);
  return l && typeof l == "string" && (!l.includes("s") && a === void 0 && (s.showSecond = !1), !l.includes("m") && i === void 0 && (s.showMinute = !1), !l.includes("H") && !l.includes("h") && o === void 0 && (s.showHour = !1), (l.includes("a") || l.includes("A")) && r === void 0 && (s.use12Hours = !0)), n === "time" ? s : (typeof l == "function" && delete s.format, {
    showTime: s
  });
}
function Y6(e, t) {
  const {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: i,
    YearPicker: a,
    TimePicker: r,
    QuarterPicker: l
  } = V6(e, t), s = G6(e, t);
  return {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: i,
    YearPicker: a,
    TimePicker: r,
    QuarterPicker: l,
    RangePicker: s
  };
}
const {
  DatePicker: jp,
  WeekPicker: Wp,
  MonthPicker: qp,
  YearPicker: U6,
  TimePicker: X6,
  QuarterPicker: Gp,
  RangePicker: Kp
} = Y6(D4), Q6 = I(jp, {
  WeekPicker: Wp,
  MonthPicker: qp,
  YearPicker: U6,
  RangePicker: Kp,
  TimePicker: X6,
  QuarterPicker: Gp,
  install: (e) => (e.component(jp.name, jp), e.component(Kp.name, Kp), e.component(qp.name, qp), e.component(Wp.name, Wp), e.component(Gp.name, Gp), e)
}), Z6 = (e) => {
  const {
    componentCls: t,
    sizePaddingEdgeHorizontal: n,
    colorSplit: o,
    lineWidth: i
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      borderBlockStart: `${i}px solid ${o}`,
      // vertical
      "&-vertical": {
        position: "relative",
        top: "-0.06em",
        display: "inline-block",
        height: "0.9em",
        margin: `0 ${e.dividerVerticalGutterMargin}px`,
        verticalAlign: "middle",
        borderTop: 0,
        borderInlineStart: `${i}px solid ${o}`
      },
      "&-horizontal": {
        display: "flex",
        clear: "both",
        width: "100%",
        minWidth: "100%",
        margin: `${e.dividerHorizontalGutterMargin}px 0`
      },
      [`&-horizontal${t}-with-text`]: {
        display: "flex",
        alignItems: "center",
        margin: `${e.dividerHorizontalWithTextGutterMargin}px 0`,
        color: e.colorTextHeading,
        fontWeight: 500,
        fontSize: e.fontSizeLG,
        whiteSpace: "nowrap",
        textAlign: "center",
        borderBlockStart: `0 ${o}`,
        "&::before, &::after": {
          position: "relative",
          width: "50%",
          borderBlockStart: `${i}px solid transparent`,
          // Chrome not accept `inherit` in `border-top`
          borderBlockStartColor: "inherit",
          borderBlockEnd: 0,
          transform: "translateY(50%)",
          content: "''"
        }
      },
      [`&-horizontal${t}-with-text-left`]: {
        "&::before": {
          width: "5%"
        },
        "&::after": {
          width: "95%"
        }
      },
      [`&-horizontal${t}-with-text-right`]: {
        "&::before": {
          width: "95%"
        },
        "&::after": {
          width: "5%"
        }
      },
      [`${t}-inner-text`]: {
        display: "inline-block",
        padding: "0 1em"
      },
      "&-dashed": {
        background: "none",
        borderColor: o,
        borderStyle: "dashed",
        borderWidth: `${i}px 0 0`
      },
      [`&-horizontal${t}-with-text${t}-dashed`]: {
        "&::before, &::after": {
          borderStyle: "dashed none none"
        }
      },
      [`&-vertical${t}-dashed`]: {
        borderInlineStartWidth: i,
        borderInlineEnd: 0,
        borderBlockStart: 0,
        borderBlockEnd: 0
      },
      [`&-plain${t}-with-text`]: {
        color: e.colorText,
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]: {
        "&::before": {
          width: 0
        },
        "&::after": {
          width: "100%"
        },
        [`${t}-inner-text`]: {
          paddingInlineStart: n
        }
      },
      [`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]: {
        "&::before": {
          width: "100%"
        },
        "&::after": {
          width: 0
        },
        [`${t}-inner-text`]: {
          paddingInlineEnd: n
        }
      }
    })
  };
}, J6 = nn("Divider", (e) => {
  const t = _t(e, {
    dividerVerticalGutterMargin: e.marginXS,
    dividerHorizontalWithTextGutterMargin: e.margin,
    dividerHorizontalGutterMargin: e.marginLG
  });
  return [Z6(t)];
}, {
  sizePaddingEdgeHorizontal: 0
}), eF = () => ({
  prefixCls: String,
  type: {
    type: String,
    default: "horizontal"
  },
  dashed: {
    type: Boolean,
    default: !1
  },
  orientation: {
    type: String,
    default: "center"
  },
  plain: {
    type: Boolean,
    default: !1
  },
  orientationMargin: [String, Number]
}), tF = ye({
  name: "ADivider",
  inheritAttrs: !1,
  compatConfig: {
    MODE: 3
  },
  props: eF(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: a
    } = yt("divider", e), [r, l] = J6(i), s = R(() => e.orientation === "left" && e.orientationMargin != null), u = R(() => e.orientation === "right" && e.orientationMargin != null), c = R(() => {
      const {
        type: g,
        dashed: m,
        plain: b
      } = e, y = i.value;
      return {
        [y]: !0,
        [l.value]: !!l.value,
        [`${y}-${g}`]: !0,
        [`${y}-dashed`]: !!m,
        [`${y}-plain`]: !!b,
        [`${y}-rtl`]: a.value === "rtl",
        [`${y}-no-default-orientation-margin-left`]: s.value,
        [`${y}-no-default-orientation-margin-right`]: u.value
      };
    }), d = R(() => {
      const g = typeof e.orientationMargin == "number" ? `${e.orientationMargin}px` : e.orientationMargin;
      return I(I({}, s.value && {
        marginLeft: g
      }), u.value && {
        marginRight: g
      });
    }), f = R(() => e.orientation.length > 0 ? "-" + e.orientation : e.orientation);
    return () => {
      var g;
      const m = to((g = n.default) === null || g === void 0 ? void 0 : g.call(n));
      return r(v("div", Z(Z({}, o), {}, {
        class: [c.value, m.length ? `${i.value}-with-text ${i.value}-with-text${f.value}` : "", o.class],
        role: "separator"
      }), [m.length ? v("span", {
        class: `${i.value}-inner-text`,
        style: d.value
      }, [m]) : null]));
    };
  }
}), nF = Ji(tF);
Yi.Button = Bd;
Yi.install = function(e) {
  return e.component(Yi.name, Yi), e.component(Bd.name, Bd), e;
};
const XP = () => ({
  prefixCls: String,
  width: ue.oneOfType([ue.string, ue.number]),
  height: ue.oneOfType([ue.string, ue.number]),
  style: {
    type: Object,
    default: void 0
  },
  class: String,
  rootClassName: String,
  rootStyle: Ct(),
  placement: {
    type: String
  },
  wrapperClassName: String,
  level: {
    type: [String, Array]
  },
  levelMove: {
    type: [Number, Function, Array]
  },
  duration: String,
  ease: String,
  showMask: {
    type: Boolean,
    default: void 0
  },
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  maskStyle: {
    type: Object,
    default: void 0
  },
  afterVisibleChange: Function,
  keyboard: {
    type: Boolean,
    default: void 0
  },
  contentWrapperStyle: Po(),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  // Motion
  motion: Qe(),
  maskMotion: Ct()
}), oF = () => I(I({}, XP()), {
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: ue.oneOfType([ue.string, ue.func, ue.object, ue.looseBool])
}), iF = () => I(I({}, XP()), {
  getContainer: Function,
  getOpenCount: Function,
  scrollLocker: ue.any,
  inline: Boolean
});
function aF(e) {
  return Array.isArray(e) ? e : [e];
}
const rF = {
  transition: "transitionend",
  WebkitTransition: "webkitTransitionEnd",
  MozTransition: "transitionend",
  OTransition: "oTransitionEnd otransitionend"
};
Object.keys(rF).filter((e) => {
  if (typeof document > "u")
    return !1;
  const t = document.getElementsByTagName("html")[0];
  return e in (t ? t.style : {});
})[0];
const lF = !(typeof window < "u" && window.document && window.document.createElement);
var sF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Mx = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: iF(),
  emits: ["close", "handleClick", "change"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const i = Pe(), a = Pe(), r = Pe(), l = Pe(), s = Pe();
    let u = [];
    `${Number((Date.now() + Math.random()).toString().replace(".", Math.round(Math.random() * 9).toString())).toString(16)}`, Pt(() => {
      Nt(() => {
        var S;
        const {
          open: C,
          getContainer: O,
          showMask: $,
          autofocus: P
        } = e, k = O?.();
        m(e), C && (k && (k.parentNode, document.body), Nt(() => {
          P && c();
        }), $ && ((S = e.scrollLocker) === null || S === void 0 || S.lock()));
      });
    }), Ie(() => e.level, () => {
      m(e);
    }, {
      flush: "post"
    }), Ie(() => e.open, () => {
      const {
        open: S,
        getContainer: C,
        scrollLocker: O,
        showMask: $,
        autofocus: P
      } = e, k = C?.();
      k && (k.parentNode, document.body), S ? (P && c(), $ && O?.lock()) : O?.unLock();
    }, {
      flush: "post"
    }), Bo(() => {
      var S;
      const {
        open: C
      } = e;
      C && (document.body.style.touchAction = ""), (S = e.scrollLocker) === null || S === void 0 || S.unLock();
    }), Ie(() => e.placement, (S) => {
      S && (s.value = null);
    });
    const c = () => {
      var S, C;
      (C = (S = a.value) === null || S === void 0 ? void 0 : S.focus) === null || C === void 0 || C.call(S);
    }, d = (S) => {
      n("close", S);
    }, f = (S) => {
      S.keyCode === Xe.ESC && (S.stopPropagation(), d(S));
    }, g = () => {
      const {
        open: S,
        afterVisibleChange: C
      } = e;
      C && C(!!S);
    }, m = (S) => {
      let {
        level: C,
        getContainer: O
      } = S;
      if (lF)
        return;
      const $ = O?.(), P = $ ? $.parentNode : null;
      u = [], C === "all" ? (P ? Array.prototype.slice.call(P.children) : []).forEach((x) => {
        x.nodeName !== "SCRIPT" && x.nodeName !== "STYLE" && x.nodeName !== "LINK" && x !== $ && u.push(x);
      }) : C && aF(C).forEach((k) => {
        document.querySelectorAll(k).forEach((x) => {
          u.push(x);
        });
      });
    }, b = (S) => {
      n("handleClick", S);
    }, y = Pe(!1);
    return Ie(a, () => {
      Nt(() => {
        y.value = !0;
      });
    }), () => {
      var S, C;
      const {
        width: O,
        height: $,
        open: P,
        prefixCls: k,
        placement: x,
        level: E,
        levelMove: z,
        ease: B,
        duration: D,
        getContainer: W,
        onChange: H,
        afterVisibleChange: F,
        showMask: A,
        maskClosable: U,
        maskStyle: j,
        keyboard: ae,
        getOpenCount: G,
        scrollLocker: Y,
        contentWrapperStyle: K,
        style: J,
        class: be,
        rootClassName: xe,
        rootStyle: he,
        maskMotion: de,
        motion: ne,
        inline: we
      } = e, re = sF(e, ["width", "height", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "keyboard", "getOpenCount", "scrollLocker", "contentWrapperStyle", "style", "class", "rootClassName", "rootStyle", "maskMotion", "motion", "inline"]), se = P && y.value, ve = Te(k, {
        [`${k}-${x}`]: !0,
        [`${k}-open`]: se,
        [`${k}-inline`]: we,
        "no-mask": !A,
        [xe]: !0
      }), Me = typeof ne == "function" ? ne(x) : ne;
      return v("div", Z(Z({}, Tn(re, ["autofocus"])), {}, {
        tabindex: -1,
        class: ve,
        style: he,
        ref: a,
        onKeydown: se && ae ? f : void 0
      }), [v(Mi, de, {
        default: () => [A && Qi(v("div", {
          class: `${k}-mask`,
          onClick: U ? d : void 0,
          style: j,
          ref: r
        }, null), [[va, se]])]
      }), v(Mi, Z(Z({}, Me), {}, {
        onAfterEnter: g,
        onAfterLeave: g
      }), {
        default: () => [Qi(v("div", {
          class: `${k}-content-wrapper`,
          style: [K],
          ref: i
        }, [v("div", {
          class: [`${k}-content`, be],
          style: J,
          ref: s
        }, [(S = o.default) === null || S === void 0 ? void 0 : S.call(o)]), o.handler ? v("div", {
          onClick: b,
          ref: l
        }, [(C = o.handler) === null || C === void 0 ? void 0 : C.call(o)]) : null]), [[va, se]])]
      })]);
    };
  }
});
var Tx = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const uF = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: wn(oF(), {
    prefixCls: "drawer",
    placement: "left",
    getContainer: "body",
    level: "all",
    duration: ".3s",
    ease: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
    afterVisibleChange: () => {
    },
    showMask: !0,
    maskClosable: !0,
    maskStyle: {},
    wrapperClassName: "",
    keyboard: !0,
    forceRender: !1,
    autofocus: !0
  }),
  emits: ["handleClick", "close"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const i = le(null), a = (l) => {
      n("handleClick", l);
    }, r = (l) => {
      n("close", l);
    };
    return () => {
      const {
        getContainer: l,
        wrapperClassName: s,
        rootClassName: u,
        rootStyle: c,
        forceRender: d
      } = e, f = Tx(e, ["getContainer", "wrapperClassName", "rootClassName", "rootStyle", "forceRender"]);
      let g = null;
      if (!l)
        return v(Mx, Z(Z({}, f), {}, {
          rootClassName: u,
          rootStyle: c,
          open: e.open,
          onClose: r,
          onHandleClick: a,
          inline: !0
        }), o);
      const m = !!o.handler || d;
      return (m || e.open || i.value) && (g = v(_v, {
        autoLock: !0,
        visible: e.open,
        forceRender: m,
        getContainer: l,
        wrapperClassName: s
      }, {
        default: (b) => {
          var {
            visible: y,
            afterClose: S
          } = b, C = Tx(b, ["visible", "afterClose"]);
          return v(Mx, Z(Z(Z({
            ref: i
          }, f), C), {}, {
            rootClassName: u,
            rootStyle: c,
            open: y !== void 0 ? y : e.open,
            afterVisibleChange: S !== void 0 ? S : e.afterVisibleChange,
            onClose: r,
            onHandleClick: a
          }), o);
        }
      })), g;
    };
  }
}), cF = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n
  } = e, o = {
    "&-enter, &-appear, &-leave": {
      "&-start": {
        transition: "none"
      },
      "&-active": {
        transition: `all ${n}`
      }
    }
  };
  return {
    [t]: {
      // ======================== Mask ========================
      [`${t}-mask-motion`]: {
        "&-enter, &-appear, &-leave": {
          "&-active": {
            transition: `all ${n}`
          }
        },
        "&-enter, &-appear": {
          opacity: 0,
          "&-active": {
            opacity: 1
          }
        },
        "&-leave": {
          opacity: 1,
          "&-active": {
            opacity: 0
          }
        }
      },
      // ======================= Panel ========================
      [`${t}-panel-motion`]: {
        // Left
        "&-left": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateX(-100%) !important"
            },
            "&-active": {
              transform: "translateX(0)"
            }
          },
          "&-leave": {
            transform: "translateX(0)",
            "&-active": {
              transform: "translateX(-100%)"
            }
          }
        }],
        // Right
        "&-right": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateX(100%) !important"
            },
            "&-active": {
              transform: "translateX(0)"
            }
          },
          "&-leave": {
            transform: "translateX(0)",
            "&-active": {
              transform: "translateX(100%)"
            }
          }
        }],
        // Top
        "&-top": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateY(-100%) !important"
            },
            "&-active": {
              transform: "translateY(0)"
            }
          },
          "&-leave": {
            transform: "translateY(0)",
            "&-active": {
              transform: "translateY(-100%)"
            }
          }
        }],
        // Bottom
        "&-bottom": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateY(100%) !important"
            },
            "&-active": {
              transform: "translateY(0)"
            }
          },
          "&-leave": {
            transform: "translateY(0)",
            "&-active": {
              transform: "translateY(100%)"
            }
          }
        }]
      }
    }
  };
}, dF = (e) => {
  const {
    componentCls: t,
    zIndexPopup: n,
    colorBgMask: o,
    colorBgElevated: i,
    motionDurationSlow: a,
    motionDurationMid: r,
    padding: l,
    paddingLG: s,
    fontSizeLG: u,
    lineHeightLG: c,
    lineWidth: d,
    lineType: f,
    colorSplit: g,
    marginSM: m,
    colorIcon: b,
    colorIconHover: y,
    colorText: S,
    fontWeightStrong: C,
    drawerFooterPaddingVertical: O,
    drawerFooterPaddingHorizontal: $
  } = e, P = `${t}-content-wrapper`;
  return {
    [t]: {
      position: "fixed",
      inset: 0,
      zIndex: n,
      pointerEvents: "none",
      "&-pure": {
        position: "relative",
        background: i,
        [`&${t}-left`]: {
          boxShadow: e.boxShadowDrawerLeft
        },
        [`&${t}-right`]: {
          boxShadow: e.boxShadowDrawerRight
        },
        [`&${t}-top`]: {
          boxShadow: e.boxShadowDrawerUp
        },
        [`&${t}-bottom`]: {
          boxShadow: e.boxShadowDrawerDown
        }
      },
      "&-inline": {
        position: "absolute"
      },
      // ====================== Mask ======================
      [`${t}-mask`]: {
        position: "absolute",
        inset: 0,
        zIndex: n,
        background: o,
        pointerEvents: "auto"
      },
      // ==================== Content =====================
      [P]: {
        position: "absolute",
        zIndex: n,
        transition: `all ${a}`,
        "&-hidden": {
          display: "none"
        }
      },
      // Placement
      [`&-left > ${P}`]: {
        top: 0,
        bottom: 0,
        left: {
          _skip_check_: !0,
          value: 0
        },
        boxShadow: e.boxShadowDrawerLeft
      },
      [`&-right > ${P}`]: {
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: 0,
        boxShadow: e.boxShadowDrawerRight
      },
      [`&-top > ${P}`]: {
        top: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerUp
      },
      [`&-bottom > ${P}`]: {
        bottom: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerDown
      },
      [`${t}-content`]: {
        width: "100%",
        height: "100%",
        overflow: "auto",
        background: i,
        pointerEvents: "auto"
      },
      // ===================== Panel ======================
      [`${t}-wrapper-body`]: {
        display: "flex",
        flexDirection: "column",
        width: "100%",
        height: "100%"
      },
      // Header
      [`${t}-header`]: {
        display: "flex",
        flex: 0,
        alignItems: "center",
        padding: `${l}px ${s}px`,
        fontSize: u,
        lineHeight: c,
        borderBottom: `${d}px ${f} ${g}`,
        "&-title": {
          display: "flex",
          flex: 1,
          alignItems: "center",
          minWidth: 0,
          minHeight: 0
        }
      },
      [`${t}-extra`]: {
        flex: "none"
      },
      [`${t}-close`]: {
        display: "inline-block",
        marginInlineEnd: m,
        color: b,
        fontWeight: C,
        fontSize: u,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        textDecoration: "none",
        background: "transparent",
        border: 0,
        outline: 0,
        cursor: "pointer",
        transition: `color ${r}`,
        textRendering: "auto",
        "&:focus, &:hover": {
          color: y,
          textDecoration: "none"
        }
      },
      [`${t}-title`]: {
        flex: 1,
        margin: 0,
        color: S,
        fontWeight: e.fontWeightStrong,
        fontSize: u,
        lineHeight: c
      },
      // Body
      [`${t}-body`]: {
        flex: 1,
        minWidth: 0,
        minHeight: 0,
        padding: s,
        overflow: "auto"
      },
      // Footer
      [`${t}-footer`]: {
        flexShrink: 0,
        padding: `${O}px ${$}px`,
        borderTop: `${d}px ${f} ${g}`
      },
      // ====================== RTL =======================
      "&-rtl": {
        direction: "rtl"
      }
    }
  };
}, fF = nn("Drawer", (e) => {
  const t = _t(e, {
    drawerFooterPaddingVertical: e.paddingXS,
    drawerFooterPaddingHorizontal: e.padding
  });
  return [dF(t), cF(t)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase
}));
var pF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const gF = ["top", "right", "bottom", "left"], kx = {
  distance: 180
}, hF = () => ({
  autofocus: {
    type: Boolean,
    default: void 0
  },
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: ue.any,
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  mask: {
    type: Boolean,
    default: void 0
  },
  maskStyle: Ct(),
  rootClassName: String,
  rootStyle: Ct(),
  size: {
    type: String
  },
  drawerStyle: Ct(),
  headerStyle: Ct(),
  bodyStyle: Ct(),
  contentWrapperStyle: {
    type: Object,
    default: void 0
  },
  title: ue.any,
  /** @deprecated Please use `open` instead */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  width: ue.oneOfType([ue.string, ue.number]),
  height: ue.oneOfType([ue.string, ue.number]),
  zIndex: Number,
  prefixCls: String,
  push: ue.oneOfType([ue.looseBool, {
    type: Object
  }]),
  placement: ue.oneOf(gF),
  keyboard: {
    type: Boolean,
    default: void 0
  },
  extra: ue.any,
  footer: ue.any,
  footerStyle: Ct(),
  level: ue.any,
  levelMove: {
    type: [Number, Array, Function]
  },
  handle: ue.any,
  /** @deprecated Use `@afterVisibleChange` instead */
  afterVisibleChange: Function,
  /** @deprecated Please use `@afterOpenChange` instead */
  onAfterVisibleChange: Function,
  onAfterOpenChange: Function,
  /** @deprecated Please use `onUpdate:open` instead */
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onClose: Function
}), vF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ADrawer",
  inheritAttrs: !1,
  props: wn(hF(), {
    closable: !0,
    placement: "right",
    maskClosable: !0,
    mask: !0,
    level: null,
    keyboard: !0,
    push: kx
  }),
  slots: Object,
  // emits: ['update:visible', 'close', 'afterVisibleChange'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: i
    } = t;
    const a = Pe(!1), r = Pe(!1), l = Pe(null), s = Pe(!1), u = Pe(!1), c = R(() => {
      var G;
      return (G = e.open) !== null && G !== void 0 ? G : e.visible;
    });
    Ie(c, () => {
      c.value ? s.value = !0 : u.value = !1;
    }, {
      immediate: !0
    }), Ie([c, s], () => {
      c.value && s.value && (u.value = !0);
    }, {
      immediate: !0
    });
    const d = Tt("parentDrawerOpts", null), {
      prefixCls: f,
      getPopupContainer: g,
      direction: m
    } = yt("drawer", e), [b, y] = fF(f), S = R(() => (
      // 有可能为 false，所以不能直接判断
      e.getContainer === void 0 && g?.value ? () => g.value(document.body) : e.getContainer
    ));
    Ln(!e.afterVisibleChange, "Drawer", "`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"), process.env.NODE_ENV !== "production" && [["visible", "open"], ["onUpdate:visible", "onUpdate:open"], ["onAfterVisibleChange", "onAfterOpenChange"]].forEach((G) => {
      let [Y, K] = G;
      Ln(!e[Y], "Drawer", `\`${Y}\` is deprecated, please use \`${K}\` instead.`);
    }), kt("parentDrawerOpts", {
      setPush: () => {
        a.value = !0;
      },
      setPull: () => {
        a.value = !1, Nt(() => {
          $();
        });
      }
    }), Pt(() => {
      c.value && d && d.setPush();
    }), Bo(() => {
      d && d.setPull();
    }), Ie(u, () => {
      d && (u.value ? d.setPush() : d.setPull());
    }, {
      flush: "post"
    });
    const $ = () => {
      var G, Y;
      (Y = (G = l.value) === null || G === void 0 ? void 0 : G.domFocus) === null || Y === void 0 || Y.call(G);
    }, P = (G) => {
      n("update:visible", !1), n("update:open", !1), n("close", G);
    }, k = (G) => {
      var Y;
      G || (r.value === !1 && (r.value = !0), e.destroyOnClose && (s.value = !1)), (Y = e.afterVisibleChange) === null || Y === void 0 || Y.call(e, G), n("afterVisibleChange", G), n("afterOpenChange", G);
    }, x = R(() => {
      const {
        push: G,
        placement: Y
      } = e;
      let K;
      return typeof G == "boolean" ? K = G ? kx.distance : 0 : K = G.distance, K = parseFloat(String(K || 0)), Y === "left" || Y === "right" ? `translateX(${Y === "left" ? K : -K}px)` : Y === "top" || Y === "bottom" ? `translateY(${Y === "top" ? K : -K}px)` : null;
    }), E = R(() => {
      var G;
      return (G = e.width) !== null && G !== void 0 ? G : e.size === "large" ? 736 : 378;
    }), z = R(() => {
      var G;
      return (G = e.height) !== null && G !== void 0 ? G : e.size === "large" ? 736 : 378;
    }), B = R(() => {
      const {
        mask: G,
        placement: Y
      } = e;
      if (!u.value && !G)
        return {};
      const K = {};
      return Y === "left" || Y === "right" ? K.width = rh(E.value) ? `${E.value}px` : E.value : K.height = rh(z.value) ? `${z.value}px` : z.value, K;
    }), D = R(() => {
      const {
        zIndex: G,
        contentWrapperStyle: Y
      } = e, K = B.value;
      return [{
        zIndex: G,
        transform: a.value ? x.value : void 0
      }, I({}, Y), K];
    }), W = (G) => {
      const {
        closable: Y,
        headerStyle: K
      } = e, J = Ii(o, e, "extra"), be = Ii(o, e, "title");
      return !be && !Y ? null : v("div", {
        class: Te(`${G}-header`, {
          [`${G}-header-close-only`]: Y && !be && !J
        }),
        style: K
      }, [v("div", {
        class: `${G}-header-title`
      }, [H(G), be && v("div", {
        class: `${G}-title`
      }, [be])]), J && v("div", {
        class: `${G}-extra`
      }, [J])]);
    }, H = (G) => {
      var Y;
      const {
        closable: K
      } = e, J = o.closeIcon ? (Y = o.closeIcon) === null || Y === void 0 ? void 0 : Y.call(o) : e.closeIcon;
      return K && v("button", {
        key: "closer",
        onClick: P,
        "aria-label": "Close",
        class: `${G}-close`
      }, [J === void 0 ? v(wa, null, null) : J]);
    }, F = (G) => {
      var Y;
      if (r.value && !e.forceRender && !s.value)
        return null;
      const {
        bodyStyle: K,
        drawerStyle: J
      } = e;
      return v("div", {
        class: `${G}-wrapper-body`,
        style: J
      }, [W(G), v("div", {
        key: "body",
        class: `${G}-body`,
        style: K
      }, [(Y = o.default) === null || Y === void 0 ? void 0 : Y.call(o)]), A(G)]);
    }, A = (G) => {
      const Y = Ii(o, e, "footer");
      if (!Y)
        return null;
      const K = `${G}-footer`;
      return v("div", {
        class: K,
        style: e.footerStyle
      }, [Y]);
    }, U = R(() => Te({
      "no-mask": !e.mask,
      [`${f.value}-rtl`]: m.value === "rtl"
    }, e.rootClassName, y.value)), j = R(() => bl(qa(f.value, "mask-motion"))), ae = (G) => bl(qa(f.value, `panel-motion-${G}`));
    return () => {
      const {
        width: G,
        height: Y,
        placement: K,
        mask: J,
        forceRender: be
      } = e, xe = pF(e, ["width", "height", "placement", "mask", "forceRender"]), he = I(I(I({}, i), Tn(xe, ["size", "closeIcon", "closable", "destroyOnClose", "drawerStyle", "headerStyle", "bodyStyle", "title", "push", "onAfterVisibleChange", "onClose", "onUpdate:visible", "onUpdate:open", "visible"])), {
        forceRender: be,
        onClose: P,
        afterVisibleChange: k,
        handler: !1,
        prefixCls: f.value,
        open: u.value,
        showMask: J,
        placement: K,
        ref: l
      });
      return b(v(Wu, null, {
        default: () => [v(uF, Z(Z({}, he), {}, {
          maskMotion: j.value,
          motion: ae,
          width: E.value,
          height: z.value,
          getContainer: S.value,
          rootClassName: U.value,
          rootStyle: e.rootStyle,
          contentWrapperStyle: D.value
        }), {
          handler: e.handle ? () => e.handle : o.handle,
          default: () => F(f.value)
        })]
      }));
    };
  }
}), mF = Ji(vF), Mu = (e) => e != null && (Array.isArray(e) ? Go(e).length : !0);
function Rm(e) {
  return Mu(e.prefix) || Mu(e.suffix) || Mu(e.allowClear);
}
function vd(e) {
  return Mu(e.addonBefore) || Mu(e.addonAfter);
}
function zh(e) {
  return typeof e > "u" || e === null ? "" : String(e);
}
function Tu(e, t, n, o) {
  if (!n)
    return;
  const i = t;
  if (t.type === "click") {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    });
    const a = e.cloneNode(!0);
    i.target = a, i.currentTarget = a, a.value = "", n(i);
    return;
  }
  if (o !== void 0) {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    }), i.target = e, i.currentTarget = e, e.value = o, n(i);
    return;
  }
  n(i);
}
function QP(e, t) {
  if (!e) return;
  e.focus(t);
  const {
    cursor: n
  } = t || {};
  if (n) {
    const o = e.value.length;
    switch (n) {
      case "start":
        e.setSelectionRange(0, 0);
        break;
      case "end":
        e.setSelectionRange(o, o);
        break;
      default:
        e.setSelectionRange(0, o);
    }
  }
}
const bF = () => ({
  addonBefore: ue.any,
  addonAfter: ue.any,
  prefix: ue.any,
  suffix: ue.any,
  clearIcon: ue.any,
  affixWrapperClassName: String,
  groupClassName: String,
  wrapperClassName: String,
  inputClassName: String,
  allowClear: {
    type: Boolean,
    default: void 0
  }
}), ZP = () => I(I({}, bF()), {
  value: {
    type: [String, Number, Symbol],
    default: void 0
  },
  defaultValue: {
    type: [String, Number, Symbol],
    default: void 0
  },
  inputElement: ue.any,
  prefixCls: String,
  disabled: {
    type: Boolean,
    default: void 0
  },
  focused: {
    type: Boolean,
    default: void 0
  },
  triggerFocus: Function,
  readonly: {
    type: Boolean,
    default: void 0
  },
  handleReset: Function,
  hidden: {
    type: Boolean,
    default: void 0
  }
}), JP = () => I(I({}, ZP()), {
  id: String,
  placeholder: {
    type: [String, Number]
  },
  autocomplete: String,
  type: dn("text"),
  name: String,
  size: {
    type: String
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  lazy: {
    type: Boolean,
    default: !0
  },
  maxlength: Number,
  loading: {
    type: Boolean,
    default: void 0
  },
  bordered: {
    type: Boolean,
    default: void 0
  },
  showCount: {
    type: [Boolean, Object]
  },
  htmlSize: Number,
  onPressEnter: Function,
  onKeydown: Function,
  onKeyup: Function,
  onFocus: Function,
  onBlur: Function,
  onChange: Function,
  onInput: Function,
  "onUpdate:value": Function,
  onCompositionstart: Function,
  onCompositionend: Function,
  valueModifiers: Object,
  hidden: {
    type: Boolean,
    default: void 0
  },
  status: String
}), yF = ye({
  name: "BaseInput",
  inheritAttrs: !1,
  props: ZP(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = le(), a = (l) => {
      var s;
      if (!((s = i.value) === null || s === void 0) && s.contains(l.target)) {
        const {
          triggerFocus: u
        } = e;
        u?.();
      }
    }, r = () => {
      var l;
      const {
        allowClear: s,
        value: u,
        disabled: c,
        readonly: d,
        handleReset: f,
        suffix: g = n.suffix,
        prefixCls: m
      } = e;
      if (!s)
        return null;
      const b = !c && !d && u, y = `${m}-clear-icon`, S = ((l = n.clearIcon) === null || l === void 0 ? void 0 : l.call(n)) || "*";
      return v("span", {
        onClick: f,
        onMousedown: (C) => C.preventDefault(),
        class: Te({
          [`${y}-hidden`]: !b,
          [`${y}-has-suffix`]: !!g
        }, y),
        role: "button",
        tabindex: -1
      }, [S]);
    };
    return () => {
      var l, s;
      const {
        focused: u,
        value: c,
        disabled: d,
        allowClear: f,
        readonly: g,
        hidden: m,
        prefixCls: b,
        prefix: y = (l = n.prefix) === null || l === void 0 ? void 0 : l.call(n),
        suffix: S = (s = n.suffix) === null || s === void 0 ? void 0 : s.call(n),
        addonAfter: C = n.addonAfter,
        addonBefore: O = n.addonBefore,
        inputElement: $,
        affixWrapperClassName: P,
        wrapperClassName: k,
        groupClassName: x
      } = e;
      let E = An($, {
        value: c,
        hidden: m
      });
      if (Rm({
        prefix: y,
        suffix: S,
        allowClear: f
      })) {
        const z = `${b}-affix-wrapper`, B = Te(z, {
          [`${z}-disabled`]: d,
          [`${z}-focused`]: u,
          [`${z}-readonly`]: g,
          [`${z}-input-with-clear-btn`]: S && f && c
        }, !vd({
          addonAfter: C,
          addonBefore: O
        }) && o.class, P), D = (S || f) && v("span", {
          class: `${b}-suffix`
        }, [r(), S]);
        E = v("span", {
          class: B,
          style: o.style,
          hidden: !vd({
            addonAfter: C,
            addonBefore: O
          }) && m,
          onMousedown: a,
          ref: i
        }, [y && v("span", {
          class: `${b}-prefix`
        }, [y]), An($, {
          style: null,
          value: c,
          hidden: null
        }), D]);
      }
      if (vd({
        addonAfter: C,
        addonBefore: O
      })) {
        const z = `${b}-group`, B = `${z}-addon`, D = Te(`${b}-wrapper`, z, k), W = Te(`${b}-group-wrapper`, o.class, x);
        return v("span", {
          class: W,
          style: o.style,
          hidden: m
        }, [v("span", {
          class: D
        }, [O && v("span", {
          class: B
        }, [O]), An(E, {
          style: null,
          hidden: null
        }), C && v("span", {
          class: B
        }, [C])])]);
      }
      return E;
    };
  }
});
var xF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const wF = ye({
  name: "VCInput",
  inheritAttrs: !1,
  props: JP(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: a
    } = t;
    const r = Pe(e.value === void 0 ? e.defaultValue : e.value), l = Pe(!1), s = Pe(), u = Pe();
    Ie(() => e.value, () => {
      r.value = e.value;
    }), Ie(() => e.disabled, () => {
      e.disabled && (l.value = !1);
    });
    const c = (x) => {
      s.value && QP(s.value.input, x);
    }, d = () => {
      var x;
      (x = s.value.input) === null || x === void 0 || x.blur();
    }, f = (x, E, z) => {
      var B;
      (B = s.value.input) === null || B === void 0 || B.setSelectionRange(x, E, z);
    }, g = () => {
      var x;
      (x = s.value.input) === null || x === void 0 || x.select();
    };
    i({
      focus: c,
      blur: d,
      input: R(() => {
        var x;
        return (x = s.value.input) === null || x === void 0 ? void 0 : x.input;
      }),
      stateValue: r,
      setSelectionRange: f,
      select: g
    });
    const m = (x) => {
      a("change", x);
    }, b = (x, E) => {
      r.value !== x && (e.value === void 0 ? r.value = x : Nt(() => {
        var z;
        s.value.input.value !== r.value && ((z = u.value) === null || z === void 0 || z.$forceUpdate());
      }), Nt(() => {
        E && E();
      }));
    }, y = (x) => {
      const {
        value: E
      } = x.target;
      if (r.value === E) return;
      const z = x.target.value;
      Tu(s.value.input, x, m), b(z);
    }, S = (x) => {
      x.keyCode === 13 && a("pressEnter", x), a("keydown", x);
    }, C = (x) => {
      l.value = !0, a("focus", x);
    }, O = (x) => {
      l.value = !1, a("blur", x);
    }, $ = (x) => {
      Tu(s.value.input, x, m), b("", () => {
        c();
      });
    }, P = () => {
      var x, E;
      const {
        addonBefore: z = n.addonBefore,
        addonAfter: B = n.addonAfter,
        disabled: D,
        valueModifiers: W = {},
        htmlSize: H,
        autocomplete: F,
        prefixCls: A,
        inputClassName: U,
        prefix: j = (x = n.prefix) === null || x === void 0 ? void 0 : x.call(n),
        suffix: ae = (E = n.suffix) === null || E === void 0 ? void 0 : E.call(n),
        allowClear: G,
        type: Y = "text"
      } = e, K = Tn(e, [
        "prefixCls",
        "onPressEnter",
        "addonBefore",
        "addonAfter",
        "prefix",
        "suffix",
        "allowClear",
        // Input elements must be either controlled or uncontrolled,
        // specify either the value prop, or the defaultValue prop, but not both.
        "defaultValue",
        "size",
        "bordered",
        "htmlSize",
        "lazy",
        "showCount",
        "valueModifiers",
        "showCount",
        "affixWrapperClassName",
        "groupClassName",
        "inputClassName",
        "wrapperClassName"
      ]), J = I(I(I({}, K), o), {
        autocomplete: F,
        onChange: y,
        onInput: y,
        onFocus: C,
        onBlur: O,
        onKeydown: S,
        class: Te(A, {
          [`${A}-disabled`]: D
        }, U, !vd({
          addonAfter: B,
          addonBefore: z
        }) && !Rm({
          prefix: j,
          suffix: ae,
          allowClear: G
        }) && o.class),
        ref: s,
        key: "ant-input",
        size: H,
        type: Y,
        lazy: e.lazy
      });
      return W.lazy && delete J.onInput, J.autofocus || delete J.autofocus, v(Av, Tn(J, ["size"]), null);
    }, k = () => {
      var x;
      const {
        maxlength: E,
        suffix: z = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n),
        showCount: B,
        prefixCls: D
      } = e, W = Number(E) > 0;
      if (z || B) {
        const H = [...zh(r.value)].length, F = typeof B == "object" ? B.formatter({
          count: H,
          maxlength: E
        }) : `${H}${W ? ` / ${E}` : ""}`;
        return v(He, null, [!!B && v("span", {
          class: Te(`${D}-show-count-suffix`, {
            [`${D}-show-count-has-suffix`]: !!z
          })
        }, [F]), z]);
      }
      return null;
    };
    return Pt(() => {
      process.env.NODE_ENV === "test" && e.autofocus && c();
    }), () => {
      const {
        prefixCls: x,
        disabled: E
      } = e, z = xF(e, ["prefixCls", "disabled"]);
      return v(yF, Z(Z(Z({}, z), o), {}, {
        ref: u,
        prefixCls: x,
        inputElement: P(),
        handleReset: $,
        value: zh(r.value),
        focused: l.value,
        triggerFocus: c,
        suffix: k(),
        disabled: E
      }), n);
    };
  }
}), Ff = () => Tn(JP(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), e2 = () => I(I({}, Tn(Ff(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  rows: Number,
  autosize: {
    type: [Boolean, Object],
    default: void 0
  },
  autoSize: {
    type: [Boolean, Object],
    default: void 0
  },
  onResize: {
    type: Function
  },
  onCompositionstart: Cs(),
  onCompositionend: Cs(),
  valueModifiers: Object
});
var SF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const ft = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInput",
  inheritAttrs: !1,
  props: Ff(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: a
    } = t;
    const r = le(), l = fi(), s = si.useInject(), u = R(() => $l(s.status, e.status)), {
      direction: c,
      prefixCls: d,
      size: f,
      autocomplete: g
    } = yt("input", e), {
      compactSize: m,
      compactItemClassnames: b
    } = Vs(d, c), y = R(() => m.value || f.value), [S, C] = $m(d), O = Zi();
    i({
      focus: (H) => {
        var F;
        (F = r.value) === null || F === void 0 || F.focus(H);
      },
      blur: () => {
        var H;
        (H = r.value) === null || H === void 0 || H.blur();
      },
      input: r,
      setSelectionRange: (H, F, A) => {
        var U;
        (U = r.value) === null || U === void 0 || U.setSelectionRange(H, F, A);
      },
      select: () => {
        var H;
        (H = r.value) === null || H === void 0 || H.select();
      }
    });
    const E = le([]), z = () => {
      E.value.push(setTimeout(() => {
        var H, F, A, U;
        !((H = r.value) === null || H === void 0) && H.input && ((F = r.value) === null || F === void 0 ? void 0 : F.input.getAttribute("type")) === "password" && (!((A = r.value) === null || A === void 0) && A.input.hasAttribute("value")) && ((U = r.value) === null || U === void 0 || U.input.removeAttribute("value"));
      }));
    };
    Pt(() => {
      z();
    }), jh(() => {
      E.value.forEach((H) => clearTimeout(H));
    }), At(() => {
      E.value.forEach((H) => clearTimeout(H));
    });
    const B = (H) => {
      z(), a("blur", H), l.onFieldBlur();
    }, D = (H) => {
      z(), a("focus", H);
    }, W = (H) => {
      a("update:value", H.target.value), a("change", H), a("input", H), l.onFieldChange();
    };
    return () => {
      var H, F, A, U, j, ae;
      const {
        hasFeedback: G,
        feedbackIcon: Y
      } = s, {
        allowClear: K,
        bordered: J = !0,
        prefix: be = (H = n.prefix) === null || H === void 0 ? void 0 : H.call(n),
        suffix: xe = (F = n.suffix) === null || F === void 0 ? void 0 : F.call(n),
        addonAfter: he = (A = n.addonAfter) === null || A === void 0 ? void 0 : A.call(n),
        addonBefore: de = (U = n.addonBefore) === null || U === void 0 ? void 0 : U.call(n),
        id: ne = (j = l.id) === null || j === void 0 ? void 0 : j.value
      } = e, we = SF(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), re = (G || xe) && v(He, null, [xe, G && Y]), se = d.value, ve = Rm({
        prefix: be,
        suffix: xe
      }) || !!G, Me = n.clearIcon || (() => v(di, null, null));
      return S(v(wF, Z(Z(Z({}, o), Tn(we, ["onUpdate:value", "onChange", "onInput"])), {}, {
        onChange: W,
        id: ne,
        disabled: (ae = e.disabled) !== null && ae !== void 0 ? ae : O.value,
        ref: r,
        prefixCls: se,
        autocomplete: g.value,
        onBlur: B,
        onFocus: D,
        prefix: be,
        suffix: re,
        allowClear: K,
        addonAfter: he && v(Wu, null, {
          default: () => [v(zd, null, {
            default: () => [he]
          })]
        }),
        addonBefore: de && v(Wu, null, {
          default: () => [v(zd, null, {
            default: () => [de]
          })]
        }),
        class: [o.class, b.value],
        inputClassName: Te({
          [`${se}-sm`]: y.value === "small",
          [`${se}-lg`]: y.value === "large",
          [`${se}-rtl`]: c.value === "rtl",
          [`${se}-borderless`]: !J
        }, !ve && Ki(se, u.value), C.value),
        affixWrapperClassName: Te({
          [`${se}-affix-wrapper-sm`]: y.value === "small",
          [`${se}-affix-wrapper-lg`]: y.value === "large",
          [`${se}-affix-wrapper-rtl`]: c.value === "rtl",
          [`${se}-affix-wrapper-borderless`]: !J
        }, Ki(`${se}-affix-wrapper`, u.value, G), C.value),
        wrapperClassName: Te({
          [`${se}-group-rtl`]: c.value === "rtl"
        }, C.value),
        groupClassName: Te({
          [`${se}-group-wrapper-sm`]: y.value === "small",
          [`${se}-group-wrapper-lg`]: y.value === "large",
          [`${se}-group-wrapper-rtl`]: c.value === "rtl"
        }, Ki(`${se}-group-wrapper`, u.value, G), C.value)
      }), I(I({}, n), {
        clearIcon: Me
      })));
    };
  }
}), CF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputGroup",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    size: {
      type: String
    },
    compact: {
      type: Boolean,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: a,
      getPrefixCls: r
    } = yt("input-group", e), l = si.useInject();
    si.useProvide(l, {
      isFormItemInput: !1
    });
    const s = R(() => r("input")), [u, c] = $m(s), d = R(() => {
      const f = i.value;
      return {
        [`${f}`]: !0,
        [c.value]: !0,
        [`${f}-lg`]: e.size === "large",
        [`${f}-sm`]: e.size === "small",
        [`${f}-compact`]: e.compact,
        [`${f}-rtl`]: a.value === "rtl"
      };
    });
    return () => {
      var f;
      return u(v("span", Z(Z({}, o), {}, {
        class: Te(d.value, o.class)
      }), [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]));
    };
  }
});
var $F = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const PF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputSearch",
  inheritAttrs: !1,
  props: I(I({}, Ff()), {
    inputPrefixCls: String,
    // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
    enterButton: ue.any,
    onSearch: {
      type: Function
    }
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: a
    } = t;
    const r = Pe(), l = Pe(!1);
    i({
      focus: () => {
        var P;
        (P = r.value) === null || P === void 0 || P.focus();
      },
      blur: () => {
        var P;
        (P = r.value) === null || P === void 0 || P.blur();
      }
    });
    const c = (P) => {
      a("update:value", P.target.value), P && P.target && P.type === "click" && a("search", P.target.value, P), a("change", P);
    }, d = (P) => {
      var k;
      document.activeElement === ((k = r.value) === null || k === void 0 ? void 0 : k.input) && P.preventDefault();
    }, f = (P) => {
      var k, x;
      a("search", (x = (k = r.value) === null || k === void 0 ? void 0 : k.input) === null || x === void 0 ? void 0 : x.stateValue, P);
    }, g = (P) => {
      l.value || e.loading || f(P);
    }, m = (P) => {
      l.value = !0, a("compositionstart", P);
    }, b = (P) => {
      l.value = !1, a("compositionend", P);
    }, {
      prefixCls: y,
      getPrefixCls: S,
      direction: C,
      size: O
    } = yt("input-search", e), $ = R(() => S("input", e.inputPrefixCls));
    return () => {
      var P, k, x, E;
      const {
        disabled: z,
        loading: B,
        addonAfter: D = (P = n.addonAfter) === null || P === void 0 ? void 0 : P.call(n),
        suffix: W = (k = n.suffix) === null || k === void 0 ? void 0 : k.call(n)
      } = e, H = $F(e, ["disabled", "loading", "addonAfter", "suffix"]);
      let {
        enterButton: F = (E = (x = n.enterButton) === null || x === void 0 ? void 0 : x.call(n)) !== null && E !== void 0 ? E : !1
      } = e;
      F = F || F === "";
      const A = typeof F == "boolean" ? v(xf, null, null) : null, U = `${y.value}-button`, j = Array.isArray(F) ? F[0] : F;
      let ae;
      const G = j.type && nw(j.type) && j.type.__ANT_BUTTON;
      if (G || j.tagName === "button")
        ae = An(j, I({
          onMousedown: d,
          onClick: f,
          key: "enterButton"
        }, G ? {
          class: U,
          size: O.value
        } : {}), !1);
      else {
        const K = A && !F;
        ae = v($t, {
          class: U,
          type: F ? "primary" : void 0,
          size: O.value,
          disabled: z,
          key: "enterButton",
          onMousedown: d,
          onClick: f,
          loading: B,
          icon: K ? A : null
        }, {
          default: () => [K ? null : A || F]
        });
      }
      D && (ae = [ae, D]);
      const Y = Te(y.value, {
        [`${y.value}-rtl`]: C.value === "rtl",
        [`${y.value}-${O.value}`]: !!O.value,
        [`${y.value}-with-button`]: !!F
      }, o.class);
      return v(ft, Z(Z(Z({
        ref: r
      }, Tn(H, ["onUpdate:value", "onSearch", "enterButton"])), o), {}, {
        onPressEnter: g,
        onCompositionstart: m,
        onCompositionend: b,
        size: O.value,
        prefixCls: $.value,
        addonAfter: ae,
        suffix: W,
        onChange: c,
        class: Y,
        disabled: z
      }), n);
    };
  }
}), Ex = (e) => e != null && (Array.isArray(e) ? Go(e).length : !0);
function OF(e) {
  return Ex(e.addonBefore) || Ex(e.addonAfter);
}
const IF = ["text", "input"], MF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ClearableLabeledInput",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    inputType: ue.oneOf(ri("text", "input")),
    value: ti(),
    defaultValue: ti(),
    allowClear: {
      type: Boolean,
      default: void 0
    },
    element: ti(),
    handleReset: Function,
    disabled: {
      type: Boolean,
      default: void 0
    },
    direction: {
      type: String
    },
    size: {
      type: String
    },
    suffix: ti(),
    prefix: ti(),
    addonBefore: ti(),
    addonAfter: ti(),
    readonly: {
      type: Boolean,
      default: void 0
    },
    focused: {
      type: Boolean,
      default: void 0
    },
    bordered: {
      type: Boolean,
      default: !0
    },
    triggerFocus: {
      type: Function
    },
    hidden: Boolean,
    status: String,
    hashId: String
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = si.useInject(), a = (l) => {
      const {
        value: s,
        disabled: u,
        readonly: c,
        handleReset: d,
        suffix: f = n.suffix
      } = e, g = !u && !c && s, m = `${l}-clear-icon`;
      return v(di, {
        onClick: d,
        onMousedown: (b) => b.preventDefault(),
        class: Te({
          [`${m}-hidden`]: !g,
          [`${m}-has-suffix`]: !!f
        }, m),
        role: "button"
      }, null);
    }, r = (l, s) => {
      const {
        value: u,
        allowClear: c,
        direction: d,
        bordered: f,
        hidden: g,
        status: m,
        addonAfter: b = n.addonAfter,
        addonBefore: y = n.addonBefore,
        hashId: S
      } = e, {
        status: C,
        hasFeedback: O
      } = i;
      if (!c)
        return An(s, {
          value: u,
          disabled: e.disabled
        });
      const $ = Te(`${l}-affix-wrapper`, `${l}-affix-wrapper-textarea-with-clear-btn`, Ki(`${l}-affix-wrapper`, $l(C, m), O), {
        [`${l}-affix-wrapper-rtl`]: d === "rtl",
        [`${l}-affix-wrapper-borderless`]: !f,
        // className will go to addon wrapper
        [`${o.class}`]: !OF({
          addonAfter: b,
          addonBefore: y
        }) && o.class
      }, S);
      return v("span", {
        class: $,
        style: o.style,
        hidden: g
      }, [An(s, {
        style: null,
        value: u,
        disabled: e.disabled
      }), a(l)]);
    };
    return () => {
      var l;
      const {
        prefixCls: s,
        inputType: u,
        element: c = (l = n.element) === null || l === void 0 ? void 0 : l.call(n)
      } = e;
      return u === IF[0] ? r(s, c) : null;
    };
  }
}), TF = `
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`, kF = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], Yp = {};
let yi;
function EF(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = e.getAttribute("id") || e.getAttribute("data-reactid") || e.getAttribute("name");
  if (t && Yp[n])
    return Yp[n];
  const o = window.getComputedStyle(e), i = o.getPropertyValue("box-sizing") || o.getPropertyValue("-moz-box-sizing") || o.getPropertyValue("-webkit-box-sizing"), a = parseFloat(o.getPropertyValue("padding-bottom")) + parseFloat(o.getPropertyValue("padding-top")), r = parseFloat(o.getPropertyValue("border-bottom-width")) + parseFloat(o.getPropertyValue("border-top-width")), s = {
    sizingStyle: kF.map((u) => `${u}:${o.getPropertyValue(u)}`).join(";"),
    paddingSize: a,
    borderSize: r,
    boxSizing: i
  };
  return t && n && (Yp[n] = s), s;
}
function _F(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
  yi || (yi = document.createElement("textarea"), yi.setAttribute("tab-index", "-1"), yi.setAttribute("aria-hidden", "true"), document.body.appendChild(yi)), e.getAttribute("wrap") ? yi.setAttribute("wrap", e.getAttribute("wrap")) : yi.removeAttribute("wrap");
  const {
    paddingSize: i,
    borderSize: a,
    boxSizing: r,
    sizingStyle: l
  } = EF(e, t);
  yi.setAttribute("style", `${l};${TF}`), yi.value = e.value || e.placeholder || "";
  let s, u, c, d = yi.scrollHeight;
  if (r === "border-box" ? d += a : r === "content-box" && (d -= i), n !== null || o !== null) {
    yi.value = " ";
    const g = yi.scrollHeight - i;
    n !== null && (s = g * n, r === "border-box" && (s = s + i + a), d = Math.max(s, d)), o !== null && (u = g * o, r === "border-box" && (u = u + i + a), c = d > u ? "" : "hidden", d = Math.min(u, d));
  }
  const f = {
    height: `${d}px`,
    overflowY: c,
    resize: "none"
  };
  return s && (f.minHeight = `${s}px`), u && (f.maxHeight = `${u}px`), f;
}
const Up = 0, Xp = 1, Qp = 2, AF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ResizableTextArea",
  inheritAttrs: !1,
  props: e2(),
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t, a, r;
    const l = le(), s = le({}), u = le(Qp);
    At(() => {
      Mt.cancel(a), Mt.cancel(r);
    });
    const c = () => {
      try {
        if (l.value && document.activeElement === l.value.input) {
          const k = l.value.getSelectionStart(), x = l.value.getSelectionEnd(), E = l.value.getScrollTop();
          l.value.setSelectionRange(k, x), l.value.setScrollTop(E);
        }
      } catch {
      }
    }, d = le(), f = le();
    Ft(() => {
      const k = e.autoSize || e.autosize;
      k ? (d.value = k.minRows, f.value = k.maxRows) : (d.value = void 0, f.value = void 0);
    });
    const g = R(() => !!(e.autoSize || e.autosize)), m = () => {
      u.value = Up;
    };
    Ie([() => e.value, d, f, g], () => {
      g.value && m();
    }, {
      immediate: !0
    });
    const b = le();
    Ie([u, l], () => {
      if (l.value)
        if (u.value === Up)
          u.value = Xp;
        else if (u.value === Xp) {
          const k = _F(l.value.input, !1, d.value, f.value);
          u.value = Qp, b.value = k;
        } else
          c();
    }, {
      immediate: !0,
      flush: "post"
    });
    const y = ui(), S = le(), C = () => {
      Mt.cancel(S.value);
    }, O = (k) => {
      u.value === Qp && (o("resize", k), g.value && (C(), S.value = Mt(() => {
        m();
      })));
    };
    At(() => {
      C();
    }), i({
      resizeTextarea: () => {
        m();
      },
      textArea: R(() => {
        var k;
        return (k = l.value) === null || k === void 0 ? void 0 : k.input;
      }),
      instance: y
    }), Qn(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
    const P = () => {
      const {
        prefixCls: k,
        disabled: x
      } = e, E = Tn(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), z = Te(k, n.class, {
        [`${k}-disabled`]: x
      }), B = g.value ? b.value : null, D = [n.style, s.value, B], W = I(I(I({}, E), n), {
        style: D,
        class: z
      });
      return (u.value === Up || u.value === Xp) && D.push({
        overflowX: "hidden",
        overflowY: "hidden"
      }), W.autofocus || delete W.autofocus, W.rows === 0 && delete W.rows, v(Ss, {
        onResize: O,
        disabled: !g.value
      }, {
        default: () => [v(Av, Z(Z({}, W), {}, {
          ref: l,
          tag: "textarea"
        }), null)]
      });
    };
    return () => P();
  }
});
function t2(e, t) {
  return [...e || ""].slice(0, t).join("");
}
function _x(e, t, n, o) {
  let i = n;
  return e ? i = t2(n, o) : [...t || ""].length < n.length && [...n || ""].length > o && (i = t), i;
}
const DF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ATextarea",
  inheritAttrs: !1,
  props: e2(),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: i
    } = t;
    var a;
    const r = fi(), l = si.useInject(), s = R(() => $l(l.status, e.status)), u = Pe((a = e.value) !== null && a !== void 0 ? a : e.defaultValue), c = Pe(), d = Pe(""), {
      prefixCls: f,
      size: g,
      direction: m
    } = yt("input", e), [b, y] = $m(f), S = Zi(), C = R(() => e.showCount === "" || e.showCount || !1), O = R(() => Number(e.maxlength) > 0), $ = Pe(!1), P = Pe(), k = Pe(0), x = (G) => {
      $.value = !0, P.value = d.value, k.value = G.currentTarget.selectionStart, i("compositionstart", G);
    }, E = (G) => {
      var Y;
      $.value = !1;
      let K = G.currentTarget.value;
      if (O.value) {
        const J = k.value >= e.maxlength + 1 || k.value === ((Y = P.value) === null || Y === void 0 ? void 0 : Y.length);
        K = _x(J, P.value, K, e.maxlength);
      }
      K !== d.value && (W(K), Tu(G.currentTarget, G, A, K)), i("compositionend", G);
    }, z = ui();
    Ie(() => e.value, () => {
      var G;
      "value" in z.vnode.props, u.value = (G = e.value) !== null && G !== void 0 ? G : "";
    });
    const B = (G) => {
      var Y;
      QP((Y = c.value) === null || Y === void 0 ? void 0 : Y.textArea, G);
    }, D = () => {
      var G, Y;
      (Y = (G = c.value) === null || G === void 0 ? void 0 : G.textArea) === null || Y === void 0 || Y.blur();
    }, W = (G, Y) => {
      u.value !== G && (e.value === void 0 ? u.value = G : Nt(() => {
        var K, J, be;
        c.value.textArea.value !== d.value && ((be = (K = c.value) === null || K === void 0 ? void 0 : (J = K.instance).update) === null || be === void 0 || be.call(J));
      }), Nt(() => {
        Y && Y();
      }));
    }, H = (G) => {
      G.keyCode === 13 && i("pressEnter", G), i("keydown", G);
    }, F = (G) => {
      const {
        onBlur: Y
      } = e;
      Y?.(G), r.onFieldBlur();
    }, A = (G) => {
      i("update:value", G.target.value), i("change", G), i("input", G), r.onFieldChange();
    }, U = (G) => {
      Tu(c.value.textArea, G, A), W("", () => {
        B();
      });
    }, j = (G) => {
      let Y = G.target.value;
      if (u.value !== Y) {
        if (O.value) {
          const K = G.target, J = K.selectionStart >= e.maxlength + 1 || K.selectionStart === Y.length || !K.selectionStart;
          Y = _x(J, d.value, Y, e.maxlength);
        }
        Tu(G.currentTarget, G, A, Y), W(Y);
      }
    }, ae = () => {
      var G, Y;
      const {
        class: K
      } = n, {
        bordered: J = !0
      } = e, be = I(I(I({}, Tn(e, ["allowClear"])), n), {
        class: [{
          [`${f.value}-borderless`]: !J,
          [`${K}`]: K && !C.value,
          [`${f.value}-sm`]: g.value === "small",
          [`${f.value}-lg`]: g.value === "large"
        }, Ki(f.value, s.value), y.value],
        disabled: S.value,
        showCount: null,
        prefixCls: f.value,
        onInput: j,
        onChange: j,
        onBlur: F,
        onKeydown: H,
        onCompositionstart: x,
        onCompositionend: E
      });
      return !((G = e.valueModifiers) === null || G === void 0) && G.lazy && delete be.onInput, v(AF, Z(Z({}, be), {}, {
        id: (Y = be?.id) !== null && Y !== void 0 ? Y : r.id.value,
        ref: c,
        maxlength: e.maxlength,
        lazy: e.lazy
      }), null);
    };
    return o({
      focus: B,
      blur: D,
      resizableTextArea: c
    }), Ft(() => {
      let G = zh(u.value);
      !$.value && O.value && (e.value === null || e.value === void 0) && (G = t2(G, e.maxlength)), d.value = G;
    }), () => {
      var G;
      const {
        maxlength: Y,
        bordered: K = !0,
        hidden: J
      } = e, {
        style: be,
        class: xe
      } = n, he = I(I(I({}, e), n), {
        prefixCls: f.value,
        inputType: "text",
        handleReset: U,
        direction: m.value,
        bordered: K,
        style: C.value ? void 0 : be,
        hashId: y.value,
        disabled: (G = e.disabled) !== null && G !== void 0 ? G : S.value
      });
      let de = v(MF, Z(Z({}, he), {}, {
        value: d.value,
        status: e.status
      }), {
        element: ae
      });
      if (C.value || l.hasFeedback) {
        const ne = [...d.value].length;
        let we = "";
        typeof C.value == "object" ? we = C.value.formatter({
          value: d.value,
          count: ne,
          maxlength: Y
        }) : we = `${ne}${O.value ? ` / ${Y}` : ""}`, de = v("div", {
          hidden: J,
          class: Te(`${f.value}-textarea`, {
            [`${f.value}-textarea-rtl`]: m.value === "rtl",
            [`${f.value}-textarea-show-count`]: C.value,
            [`${f.value}-textarea-in-form-item`]: l.isFormItemInput
          }, `${f.value}-textarea-show-count`, xe, y.value),
          style: be,
          "data-count": typeof we != "object" ? we : void 0
        }, [de, l.hasFeedback && v("span", {
          class: `${f.value}-textarea-suffix`
        }, [l.feedbackIcon])]);
      }
      return b(de);
    };
  }
});
var zF = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
function Ax(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      RF(e, i, n[i]);
    });
  }
  return e;
}
function RF(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Nm = function(t, n) {
  var o = Ax({}, t, n.attrs);
  return v(pn, Ax({}, o, {
    icon: zF
  }), null);
};
Nm.displayName = "EyeOutlined";
Nm.inheritAttrs = !1;
var NF = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
function Dx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      BF(e, i, n[i]);
    });
  }
  return e;
}
function BF(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bm = function(t, n) {
  var o = Dx({}, t, n.attrs);
  return v(pn, Dx({}, o, {
    icon: NF
  }), null);
};
Bm.displayName = "EyeInvisibleOutlined";
Bm.inheritAttrs = !1;
var FF = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const LF = {
  click: "onClick",
  hover: "onMouseover"
}, HF = (e) => e ? v(Nm, null, null) : v(Bm, null, null), VF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputPassword",
  inheritAttrs: !1,
  props: I(I({}, Ff()), {
    prefixCls: String,
    inputPrefixCls: String,
    action: {
      type: String,
      default: "click"
    },
    visibilityToggle: {
      type: Boolean,
      default: !0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    "onUpdate:visible": Function,
    iconRender: Function
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: a
    } = t;
    const r = Pe(!1), l = () => {
      const {
        disabled: y
      } = e;
      y || (r.value = !r.value, a("update:visible", r.value));
    };
    Ft(() => {
      e.visible !== void 0 && (r.value = !!e.visible);
    });
    const s = Pe();
    i({
      focus: () => {
        var y;
        (y = s.value) === null || y === void 0 || y.focus();
      },
      blur: () => {
        var y;
        (y = s.value) === null || y === void 0 || y.blur();
      }
    });
    const d = (y) => {
      const {
        action: S,
        iconRender: C = n.iconRender || HF
      } = e, O = LF[S] || "", $ = C(r.value), P = {
        [O]: l,
        class: `${y}-icon`,
        key: "passwordIcon",
        onMousedown: (k) => {
          k.preventDefault();
        },
        onMouseup: (k) => {
          k.preventDefault();
        }
      };
      return An(No($) ? $ : v("span", null, [$]), P);
    }, {
      prefixCls: f,
      getPrefixCls: g
    } = yt("input-password", e), m = R(() => g("input", e.inputPrefixCls)), b = () => {
      const {
        size: y,
        visibilityToggle: S
      } = e, C = FF(e, ["size", "visibilityToggle"]), O = S && d(f.value), $ = Te(f.value, o.class, {
        [`${f.value}-${y}`]: !!y
      }), P = I(I(I({}, Tn(C, ["suffix", "iconRender", "action"])), o), {
        type: r.value ? "text" : "password",
        class: $,
        prefixCls: m.value,
        suffix: O
      });
      return y && (P.size = y), v(ft, Z({
        ref: s
      }, P), n);
    };
    return () => b();
  }
});
ft.Group = CF;
ft.Search = PF;
ft.TextArea = DF;
ft.Password = VF;
ft.install = function(e) {
  return e.component(ft.name, ft), e.component(ft.Group.name, ft.Group), e.component(ft.Search.name, ft.Search), e.component(ft.TextArea.name, ft.TextArea), e.component(ft.Password.name, ft.Password), e;
};
function Fm() {
  return {
    keyboard: {
      type: Boolean,
      default: void 0
    },
    mask: {
      type: Boolean,
      default: void 0
    },
    afterClose: Function,
    closable: {
      type: Boolean,
      default: void 0
    },
    maskClosable: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    destroyOnClose: {
      type: Boolean,
      default: void 0
    },
    mousePosition: ue.shape({
      x: Number,
      y: Number
    }).loose,
    title: ue.any,
    footer: ue.any,
    transitionName: String,
    maskTransitionName: String,
    animation: ue.any,
    maskAnimation: ue.any,
    wrapStyle: {
      type: Object,
      default: void 0
    },
    bodyStyle: {
      type: Object,
      default: void 0
    },
    maskStyle: {
      type: Object,
      default: void 0
    },
    prefixCls: String,
    wrapClassName: String,
    rootClassName: String,
    width: [String, Number],
    height: [String, Number],
    zIndex: Number,
    bodyProps: ue.any,
    maskProps: ue.any,
    wrapProps: ue.any,
    getContainer: ue.any,
    dialogStyle: {
      type: Object,
      default: void 0
    },
    dialogClass: String,
    closeIcon: ue.any,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getOpenCount: Function,
    // https://github.com/ant-design/ant-design/issues/19771
    // https://github.com/react-component/dialog/issues/95
    focusTriggerAfterClose: {
      type: Boolean,
      default: void 0
    },
    onClose: Function,
    modalRender: Function
  };
}
function zx(e, t, n) {
  let o = t;
  return !o && n && (o = `${e}-${n}`), o;
}
let Rx = -1;
function jF() {
  return Rx += 1, Rx;
}
function Nx(e, t) {
  let n = e[`page${t ? "Y" : "X"}Offset`];
  const o = `scroll${t ? "Top" : "Left"}`;
  if (typeof n != "number") {
    const i = e.document;
    n = i.documentElement[o], typeof n != "number" && (n = i.body[o]);
  }
  return n;
}
function WF(e) {
  const t = e.getBoundingClientRect(), n = {
    left: t.left,
    top: t.top
  }, o = e.ownerDocument, i = o.defaultView || o.parentWindow;
  return n.left += Nx(i), n.top += Nx(i, !0), n;
}
const qF = {
  width: 0,
  height: 0,
  overflow: "hidden",
  outline: "none"
}, GF = {
  outline: "none"
}, KF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "DialogContent",
  inheritAttrs: !1,
  props: I(I({}, Fm()), {
    motionName: String,
    ariaId: String,
    onVisibleChanged: Function,
    onMousedown: Function,
    onMouseup: Function
  }),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: i
    } = t;
    const a = le(), r = le(), l = le();
    n({
      focus: () => {
        var f;
        (f = a.value) === null || f === void 0 || f.focus({
          preventScroll: !0
        });
      },
      changeActive: (f) => {
        const {
          activeElement: g
        } = document;
        f && g === r.value ? a.value.focus({
          preventScroll: !0
        }) : !f && g === a.value && r.value.focus({
          preventScroll: !0
        });
      }
    });
    const s = le(), u = R(() => {
      const {
        width: f,
        height: g
      } = e, m = {};
      return f !== void 0 && (m.width = typeof f == "number" ? `${f}px` : f), g !== void 0 && (m.height = typeof g == "number" ? `${g}px` : g), s.value && (m.transformOrigin = s.value), m;
    }), c = () => {
      Nt(() => {
        if (l.value) {
          const f = WF(l.value);
          s.value = e.mousePosition ? `${e.mousePosition.x - f.left}px ${e.mousePosition.y - f.top}px` : "";
        }
      });
    }, d = (f) => {
      e.onVisibleChanged(f);
    };
    return () => {
      var f, g, m, b;
      const {
        prefixCls: y,
        footer: S = (f = o.footer) === null || f === void 0 ? void 0 : f.call(o),
        title: C = (g = o.title) === null || g === void 0 ? void 0 : g.call(o),
        ariaId: O,
        closable: $,
        closeIcon: P = (m = o.closeIcon) === null || m === void 0 ? void 0 : m.call(o),
        onClose: k,
        bodyStyle: x,
        bodyProps: E,
        onMousedown: z,
        onMouseup: B,
        visible: D,
        modalRender: W = o.modalRender,
        destroyOnClose: H,
        motionName: F
      } = e;
      let A;
      S && (A = v("div", {
        class: `${y}-footer`
      }, [S]));
      let U;
      C && (U = v("div", {
        class: `${y}-header`
      }, [v("div", {
        class: `${y}-title`,
        id: O
      }, [C])]));
      let j;
      $ && (j = v("button", {
        type: "button",
        onClick: k,
        "aria-label": "Close",
        class: `${y}-close`
      }, [P || v("span", {
        class: `${y}-close-x`
      }, null)]));
      const ae = v("div", {
        class: `${y}-content`
      }, [j, U, v("div", Z({
        class: `${y}-body`,
        style: x
      }, E), [(b = o.default) === null || b === void 0 ? void 0 : b.call(o)]), A]), G = bl(F);
      return v(Mi, Z(Z({}, G), {}, {
        onBeforeEnter: c,
        onAfterEnter: () => d(!0),
        onAfterLeave: () => d(!1)
      }), {
        default: () => [D || !H ? Qi(v("div", Z(Z({}, i), {}, {
          ref: l,
          key: "dialog-element",
          role: "document",
          style: [u.value, i.style],
          class: [y, i.class],
          onMousedown: z,
          onMouseup: B
        }), [v("div", {
          tabindex: 0,
          ref: a,
          style: GF
        }, [W ? W({
          originVNode: ae
        }) : ae]), v("div", {
          tabindex: 0,
          ref: r,
          style: qF
        }, null)]), [[va, D]]) : null]
      });
    };
  }
}), YF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "DialogMask",
  props: {
    prefixCls: String,
    visible: Boolean,
    motionName: String,
    maskProps: Object
  },
  setup(e, t) {
    return () => {
      const {
        prefixCls: n,
        visible: o,
        maskProps: i,
        motionName: a
      } = e, r = bl(a);
      return v(Mi, r, {
        default: () => [Qi(v("div", Z({
          class: `${n}-mask`
        }, i), null), [[va, o]])]
      });
    };
  }
}), Bx = ye({
  compatConfig: {
    MODE: 3
  },
  name: "VcDialog",
  inheritAttrs: !1,
  props: wn(I(I({}, Fm()), {
    getOpenCount: Function,
    scrollLocker: Object
  }), {
    mask: !0,
    visible: !1,
    keyboard: !0,
    closable: !0,
    maskClosable: !0,
    destroyOnClose: !1,
    prefixCls: "rc-dialog",
    getOpenCount: () => null,
    focusTriggerAfterClose: !0
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = Pe(), a = Pe(), r = Pe(), l = Pe(e.visible), s = Pe(`vcDialogTitle${jF()}`), u = (S) => {
      var C, O;
      if (S)
        hr(a.value, document.activeElement) || (i.value = document.activeElement, (C = r.value) === null || C === void 0 || C.focus());
      else {
        const $ = l.value;
        if (l.value = !1, e.mask && i.value && e.focusTriggerAfterClose) {
          try {
            i.value.focus({
              preventScroll: !0
            });
          } catch {
          }
          i.value = null;
        }
        $ && ((O = e.afterClose) === null || O === void 0 || O.call(e));
      }
    }, c = (S) => {
      var C;
      (C = e.onClose) === null || C === void 0 || C.call(e, S);
    }, d = Pe(!1), f = Pe(), g = () => {
      clearTimeout(f.value), d.value = !0;
    }, m = () => {
      f.value = setTimeout(() => {
        d.value = !1;
      });
    }, b = (S) => {
      if (!e.maskClosable) return null;
      d.value ? d.value = !1 : a.value === S.target && c(S);
    }, y = (S) => {
      if (e.keyboard && S.keyCode === Xe.ESC) {
        S.stopPropagation(), c(S);
        return;
      }
      e.visible && S.keyCode === Xe.TAB && r.value.changeActive(!S.shiftKey);
    };
    return Ie(() => e.visible, () => {
      e.visible && (l.value = !0);
    }, {
      flush: "post"
    }), At(() => {
      var S;
      clearTimeout(f.value), (S = e.scrollLocker) === null || S === void 0 || S.unLock();
    }), Ft(() => {
      var S, C;
      (S = e.scrollLocker) === null || S === void 0 || S.unLock(), l.value && ((C = e.scrollLocker) === null || C === void 0 || C.lock());
    }), () => {
      const {
        prefixCls: S,
        mask: C,
        visible: O,
        maskTransitionName: $,
        maskAnimation: P,
        zIndex: k,
        wrapClassName: x,
        rootClassName: E,
        wrapStyle: z,
        closable: B,
        maskProps: D,
        maskStyle: W,
        transitionName: H,
        animation: F,
        wrapProps: A,
        title: U = o.title
      } = e, {
        style: j,
        class: ae
      } = n;
      return v("div", Z({
        class: [`${S}-root`, E]
      }, mf(e, {
        data: !0
      })), [v(YF, {
        prefixCls: S,
        visible: C && O,
        motionName: zx(S, $, P),
        style: I({
          zIndex: k
        }, W),
        maskProps: D
      }, null), v("div", Z({
        tabIndex: -1,
        onKeydown: y,
        class: Te(`${S}-wrap`, x),
        ref: a,
        onClick: b,
        role: "dialog",
        "aria-labelledby": U ? s.value : null,
        style: I(I({
          zIndex: k
        }, z), {
          display: l.value ? null : "none"
        })
      }, A), [v(KF, Z(Z({}, Tn(e, ["scrollLocker"])), {}, {
        style: j,
        class: ae,
        onMousedown: g,
        onMouseup: m,
        ref: r,
        closable: B,
        ariaId: s.value,
        prefixCls: S,
        visible: O,
        onClose: c,
        onVisibleChanged: u,
        motionName: zx(S, H, F)
      }), o)])]);
    };
  }
}), UF = Fm(), XF = ye({
  compatConfig: {
    MODE: 3
  },
  name: "DialogWrap",
  inheritAttrs: !1,
  props: wn(UF, {
    visible: !1
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(e.visible);
    return Ev({}, {
      inTriggerContext: !1
    }), Ie(() => e.visible, () => {
      e.visible && (i.value = !0);
    }, {
      flush: "post"
    }), () => {
      const {
        visible: a,
        getContainer: r,
        forceRender: l,
        destroyOnClose: s = !1,
        afterClose: u
      } = e;
      let c = I(I(I({}, e), n), {
        ref: "_component",
        key: "dialog"
      });
      return r === !1 ? v(Bx, Z(Z({}, c), {}, {
        getOpenCount: () => 2
      }), o) : !l && s && !i.value ? null : v(_v, {
        autoLock: !0,
        visible: a,
        forceRender: l,
        getContainer: r
      }, {
        default: (d) => (c = I(I(I({}, c), d), {
          afterClose: () => {
            u?.(), i.value = !1;
          }
        }), v(Bx, c, o))
      });
    };
  }
});
function Fx(e) {
  return {
    position: e,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  };
}
const QF = (e) => {
  const {
    componentCls: t
  } = e;
  return [{
    [`${t}-root`]: {
      [`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]: {
        // reset scale avoid mousePosition bug
        transform: "none",
        opacity: 0,
        animationDuration: e.motionDurationSlow,
        // https://github.com/ant-design/ant-design/issues/11777
        userSelect: "none"
      },
      [`${t}${e.antCls}-zoom-leave ${t}-content`]: {
        pointerEvents: "none"
      },
      [`${t}-mask`]: I(I({}, Fx("fixed")), {
        zIndex: e.zIndexPopupBase,
        height: "100%",
        backgroundColor: e.colorBgMask,
        [`${t}-hidden`]: {
          display: "none"
        }
      }),
      [`${t}-wrap`]: I(I({}, Fx("fixed")), {
        overflow: "auto",
        outline: 0,
        WebkitOverflowScrolling: "touch"
      })
    }
  }, {
    [`${t}-root`]: rR(e)
  }];
}, ZF = (e) => {
  const {
    componentCls: t
  } = e;
  return [
    // ======================== Root =========================
    {
      [`${t}-root`]: {
        [`${t}-wrap`]: {
          zIndex: e.zIndexPopupBase,
          position: "fixed",
          inset: 0,
          overflow: "auto",
          outline: 0,
          WebkitOverflowScrolling: "touch"
        },
        [`${t}-wrap-rtl`]: {
          direction: "rtl"
        },
        [`${t}-centered`]: {
          textAlign: "center",
          "&::before": {
            display: "inline-block",
            width: 0,
            height: "100%",
            verticalAlign: "middle",
            content: '""'
          },
          [t]: {
            top: 0,
            display: "inline-block",
            paddingBottom: 0,
            textAlign: "start",
            verticalAlign: "middle"
          }
        },
        [`@media (max-width: ${e.screenSMMax})`]: {
          [t]: {
            maxWidth: "calc(100vw - 16px)",
            margin: `${e.marginXS} auto`
          },
          [`${t}-centered`]: {
            [t]: {
              flex: 1
            }
          }
        }
      }
    },
    // ======================== Modal ========================
    {
      [t]: I(I({}, Zt(e)), {
        pointerEvents: "none",
        position: "relative",
        top: 100,
        width: "auto",
        maxWidth: `calc(100vw - ${e.margin * 2}px)`,
        margin: "0 auto",
        paddingBottom: e.paddingLG,
        [`${t}-title`]: {
          margin: 0,
          color: e.modalHeadingColor,
          fontWeight: e.fontWeightStrong,
          fontSize: e.modalHeaderTitleFontSize,
          lineHeight: e.modalHeaderTitleLineHeight,
          wordWrap: "break-word"
        },
        [`${t}-content`]: {
          position: "relative",
          backgroundColor: e.modalContentBg,
          backgroundClip: "padding-box",
          border: 0,
          borderRadius: e.borderRadiusLG,
          boxShadow: e.boxShadowSecondary,
          pointerEvents: "auto",
          padding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
        },
        [`${t}-close`]: I({
          position: "absolute",
          top: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
          insetInlineEnd: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
          zIndex: e.zIndexPopupBase + 10,
          padding: 0,
          color: e.modalCloseColor,
          fontWeight: e.fontWeightStrong,
          lineHeight: 1,
          textDecoration: "none",
          background: "transparent",
          borderRadius: e.borderRadiusSM,
          width: e.modalConfirmIconSize,
          height: e.modalConfirmIconSize,
          border: 0,
          outline: 0,
          cursor: "pointer",
          transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
          "&-x": {
            display: "block",
            fontSize: e.fontSizeLG,
            fontStyle: "normal",
            lineHeight: `${e.modalCloseBtnSize}px`,
            textAlign: "center",
            textTransform: "none",
            textRendering: "auto"
          },
          "&:hover": {
            color: e.modalIconHoverColor,
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContent,
            textDecoration: "none"
          },
          "&:active": {
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContentHover
          }
        }, vl(e)),
        [`${t}-header`]: {
          color: e.colorText,
          background: e.modalHeaderBg,
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
          marginBottom: e.marginXS
        },
        [`${t}-body`]: {
          fontSize: e.fontSize,
          lineHeight: e.lineHeight,
          wordWrap: "break-word"
        },
        [`${t}-footer`]: {
          textAlign: "end",
          background: e.modalFooterBg,
          marginTop: e.marginSM,
          [`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]: {
            marginBottom: 0,
            marginInlineStart: e.marginXS
          }
        },
        [`${t}-open`]: {
          overflow: "hidden"
        }
      })
    },
    // ======================== Pure =========================
    {
      [`${t}-pure-panel`]: {
        top: "auto",
        padding: 0,
        display: "flex",
        flexDirection: "column",
        [`${t}-content,
          ${t}-body,
          ${t}-confirm-body-wrapper`]: {
          display: "flex",
          flexDirection: "column",
          flex: "auto"
        },
        [`${t}-confirm-body`]: {
          marginBottom: "auto"
        }
      }
    }
  ];
}, JF = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-confirm`;
  return {
    [n]: {
      "&-rtl": {
        direction: "rtl"
      },
      [`${e.antCls}-modal-header`]: {
        display: "none"
      },
      [`${n}-body-wrapper`]: I({}, Tr()),
      [`${n}-body`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        [`${n}-title`]: {
          flex: "0 0 100%",
          display: "block",
          // create BFC to avoid
          // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
          overflow: "hidden",
          color: e.colorTextHeading,
          fontWeight: e.fontWeightStrong,
          fontSize: e.modalHeaderTitleFontSize,
          lineHeight: e.modalHeaderTitleLineHeight,
          [`+ ${n}-content`]: {
            marginBlockStart: e.marginXS,
            flexBasis: "100%",
            maxWidth: `calc(100% - ${e.modalConfirmIconSize + e.marginSM}px)`
          }
        },
        [`${n}-content`]: {
          color: e.colorText,
          fontSize: e.fontSize
        },
        [`> ${e.iconCls}`]: {
          flex: "none",
          marginInlineEnd: e.marginSM,
          fontSize: e.modalConfirmIconSize,
          [`+ ${n}-title`]: {
            flex: 1
          },
          // `content` after `icon` should set marginLeft
          [`+ ${n}-title + ${n}-content`]: {
            marginInlineStart: e.modalConfirmIconSize + e.marginSM
          }
        }
      },
      [`${n}-btns`]: {
        textAlign: "end",
        marginTop: e.marginSM,
        [`${e.antCls}-btn + ${e.antCls}-btn`]: {
          marginBottom: 0,
          marginInlineStart: e.marginXS
        }
      }
    },
    [`${n}-error ${n}-body > ${e.iconCls}`]: {
      color: e.colorError
    },
    [`${n}-warning ${n}-body > ${e.iconCls},
        ${n}-confirm ${n}-body > ${e.iconCls}`]: {
      color: e.colorWarning
    },
    [`${n}-info ${n}-body > ${e.iconCls}`]: {
      color: e.colorInfo
    },
    [`${n}-success ${n}-body > ${e.iconCls}`]: {
      color: e.colorSuccess
    },
    // https://github.com/ant-design/ant-design/issues/37329
    [`${t}-zoom-leave ${t}-btns`]: {
      pointerEvents: "none"
    }
  };
}, eL = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-root`]: {
      [`${t}-wrap-rtl`]: {
        direction: "rtl",
        [`${t}-confirm-body`]: {
          direction: "rtl"
        }
      }
    }
  };
}, tL = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-confirm`;
  return {
    [t]: {
      [`${t}-content`]: {
        padding: 0
      },
      [`${t}-header`]: {
        padding: e.modalHeaderPadding,
        borderBottom: `${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,
        marginBottom: 0
      },
      [`${t}-body`]: {
        padding: e.modalBodyPadding
      },
      [`${t}-footer`]: {
        padding: `${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,
        borderTop: `${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,
        borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,
        marginTop: 0
      }
    },
    [o]: {
      [`${n}-modal-body`]: {
        padding: `${e.padding * 2}px ${e.padding * 2}px ${e.paddingLG}px`
      },
      [`${o}-body`]: {
        [`> ${e.iconCls}`]: {
          marginInlineEnd: e.margin,
          // `content` after `icon` should set marginLeft
          [`+ ${o}-title + ${o}-content`]: {
            marginInlineStart: e.modalConfirmIconSize + e.margin
          }
        }
      },
      [`${o}-btns`]: {
        marginTop: e.marginLG
      }
    }
  };
}, nL = nn("Modal", (e) => {
  const t = e.padding, n = e.fontSizeHeading5, o = e.lineHeightHeading5, i = _t(e, {
    modalBodyPadding: e.paddingLG,
    modalHeaderBg: e.colorBgElevated,
    modalHeaderPadding: `${t}px ${e.paddingLG}px`,
    modalHeaderBorderWidth: e.lineWidth,
    modalHeaderBorderStyle: e.lineType,
    modalHeaderTitleLineHeight: o,
    modalHeaderTitleFontSize: n,
    modalHeaderBorderColorSplit: e.colorSplit,
    modalHeaderCloseSize: o * n + t * 2,
    modalContentBg: e.colorBgElevated,
    modalHeadingColor: e.colorTextHeading,
    modalCloseColor: e.colorTextDescription,
    modalFooterBg: "transparent",
    modalFooterBorderColorSplit: e.colorSplit,
    modalFooterBorderStyle: e.lineType,
    modalFooterPaddingVertical: e.paddingXS,
    modalFooterPaddingHorizontal: e.padding,
    modalFooterBorderWidth: e.lineWidth,
    modalConfirmTitleFontSize: e.fontSizeLG,
    modalIconHoverColor: e.colorIconHover,
    modalConfirmIconSize: e.fontSize * e.lineHeight,
    modalCloseBtnSize: e.controlHeightLG * 0.55
  });
  return [ZF(i), JF(i), eL(i), QF(i), e.wireframe && tL(i), Ju(i, "zoom")];
});
var oL = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
function Lx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      iL(e, i, n[i]);
    });
  }
  return e;
}
function iL(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Lm = function(t, n) {
  var o = Lx({}, t, n.attrs);
  return v(pn, Lx({}, o, {
    icon: oL
  }), null);
};
Lm.displayName = "UpOutlined";
Lm.inheritAttrs = !1;
function Rh() {
  return typeof BigInt == "function";
}
function ku(e) {
  let t = e.trim(), n = t.startsWith("-");
  n && (t = t.slice(1)), t = t.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), t.startsWith(".") && (t = `0${t}`);
  const o = t || "0", i = o.split("."), a = i[0] || "0", r = i[1] || "0";
  a === "0" && r === "0" && (n = !1);
  const l = n ? "-" : "";
  return {
    negative: n,
    negativeStr: l,
    trimStr: o,
    integerStr: a,
    decimalStr: r,
    fullStr: `${l}${o}`
  };
}
function Hm(e) {
  const t = String(e);
  return !Number.isNaN(Number(t)) && t.includes("e");
}
function Ku(e) {
  const t = String(e);
  if (Hm(e)) {
    let n = Number(t.slice(t.indexOf("e-") + 2));
    const o = t.match(/\.(\d+)/);
    return o?.[1] && (n += o[1].length), n;
  }
  return t.includes(".") && jm(t) ? t.length - t.indexOf(".") - 1 : 0;
}
function Vm(e) {
  let t = String(e);
  if (Hm(e)) {
    if (e > Number.MAX_SAFE_INTEGER)
      return String(Rh() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
    if (e < Number.MIN_SAFE_INTEGER)
      return String(Rh() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER);
    t = e.toFixed(Ku(t));
  }
  return ku(t).fullStr;
}
function jm(e) {
  return typeof e == "number" ? !Number.isNaN(e) : e ? (
    // Normal type: 11.28
    /^\s*-?\d+(\.\d+)?\s*$/.test(e) || // Pre-number: 1.
    /^\s*-?\d+\.\s*$/.test(e) || // Post-number: .1
    /^\s*-?\.\d+\s*$/.test(e)
  ) : !1;
}
function n2(e) {
  return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
}
class il {
  constructor(t) {
    if (this.origin = "", n2(t)) {
      this.empty = !0;
      return;
    }
    this.origin = String(t), this.number = Number(t);
  }
  negate() {
    return new il(-this.toNumber());
  }
  add(t) {
    if (this.isInvalidate())
      return new il(t);
    const n = Number(t);
    if (Number.isNaN(n))
      return this;
    const o = this.number + n;
    if (o > Number.MAX_SAFE_INTEGER)
      return new il(Number.MAX_SAFE_INTEGER);
    if (o < Number.MIN_SAFE_INTEGER)
      return new il(Number.MIN_SAFE_INTEGER);
    const i = Math.max(Ku(this.number), Ku(n));
    return new il(o.toFixed(i));
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return Number.isNaN(this.number);
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(t) {
    return this.toNumber() === t?.toNumber();
  }
  lessEquals(t) {
    return this.add(t.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.number;
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : Vm(this.number) : this.origin;
  }
}
class os {
  constructor(t) {
    if (this.origin = "", n2(t)) {
      this.empty = !0;
      return;
    }
    if (this.origin = String(t), t === "-" || Number.isNaN(t)) {
      this.nan = !0;
      return;
    }
    let n = t;
    if (Hm(n) && (n = Number(n)), n = typeof n == "string" ? n : Vm(n), jm(n)) {
      const o = ku(n);
      this.negative = o.negative;
      const i = o.trimStr.split(".");
      this.integer = BigInt(i[0]);
      const a = i[1] || "0";
      this.decimal = BigInt(a), this.decimalLen = a.length;
    } else
      this.nan = !0;
  }
  getMark() {
    return this.negative ? "-" : "";
  }
  getIntegerStr() {
    return this.integer.toString();
  }
  getDecimalStr() {
    return this.decimal.toString().padStart(this.decimalLen, "0");
  }
  /**
   * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
   * This is used for add function only.
   */
  alignDecimal(t) {
    const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t, "0")}`;
    return BigInt(n);
  }
  negate() {
    const t = new os(this.toString());
    return t.negative = !t.negative, t;
  }
  add(t) {
    if (this.isInvalidate())
      return new os(t);
    const n = new os(t);
    if (n.isInvalidate())
      return this;
    const o = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(o), a = n.alignDecimal(o), r = (i + a).toString(), {
      negativeStr: l,
      trimStr: s
    } = ku(r), u = `${l}${s.padStart(o + 1, "0")}`;
    return new os(`${u.slice(0, -o)}.${u.slice(-o)}`);
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return this.nan;
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(t) {
    return this.toString() === t?.toString();
  }
  lessEquals(t) {
    return this.add(t.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.isNaN() ? NaN : Number(this.toString());
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : ku(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  }
}
function fa(e) {
  return Rh() ? new os(e) : new il(e);
}
function Nh(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  if (e === "")
    return "";
  const {
    negativeStr: i,
    integerStr: a,
    decimalStr: r
  } = ku(e), l = `${t}${r}`, s = `${i}${a}`;
  if (n >= 0) {
    const u = Number(r[n]);
    if (u >= 5 && !o) {
      const c = fa(e).add(`${i}0.${"0".repeat(n)}${10 - u}`);
      return Nh(c.toString(), t, n, o);
    }
    return n === 0 ? s : `${s}${t}${r.padEnd(n, "0").slice(0, n)}`;
  }
  return l === ".0" ? s : `${s}${l}`;
}
const aL = 200, rL = 600, lL = ye({
  compatConfig: {
    MODE: 3
  },
  name: "StepHandler",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    upDisabled: Boolean,
    downDisabled: Boolean,
    onStep: Qe()
  },
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const i = le(), a = (l, s) => {
      l.preventDefault(), o("step", s);
      function u() {
        o("step", s), i.value = setTimeout(u, aL);
      }
      i.value = setTimeout(u, rL);
    }, r = () => {
      clearTimeout(i.value);
    };
    return At(() => {
      r();
    }), () => {
      if (Rv())
        return null;
      const {
        prefixCls: l,
        upDisabled: s,
        downDisabled: u
      } = e, c = `${l}-handler`, d = Te(c, `${c}-up`, {
        [`${c}-up-disabled`]: s
      }), f = Te(c, `${c}-down`, {
        [`${c}-down-disabled`]: u
      }), g = {
        unselectable: "on",
        role: "button",
        onMouseup: r,
        onMouseleave: r
      }, {
        upNode: m,
        downNode: b
      } = n;
      return v("div", {
        class: `${c}-wrap`
      }, [v("span", Z(Z({}, g), {}, {
        onMousedown: (y) => {
          a(y, !0);
        },
        "aria-label": "Increase Value",
        "aria-disabled": s,
        class: d
      }), [m?.() || v("span", {
        unselectable: "on",
        class: `${l}-handler-up-inner`
      }, null)]), v("span", Z(Z({}, g), {}, {
        onMousedown: (y) => {
          a(y, !1);
        },
        "aria-label": "Decrease Value",
        "aria-disabled": u,
        class: f
      }), [b?.() || v("span", {
        unselectable: "on",
        class: `${l}-handler-down-inner`
      }, null)])]);
    };
  }
});
function sL(e, t) {
  const n = le(null);
  function o() {
    try {
      const {
        selectionStart: a,
        selectionEnd: r,
        value: l
      } = e.value, s = l.substring(0, a), u = l.substring(r);
      n.value = {
        start: a,
        end: r,
        value: l,
        beforeTxt: s,
        afterTxt: u
      };
    } catch {
    }
  }
  function i() {
    if (e.value && n.value && t.value)
      try {
        const {
          value: a
        } = e.value, {
          beforeTxt: r,
          afterTxt: l,
          start: s
        } = n.value;
        let u = a.length;
        if (a.endsWith(l))
          u = a.length - n.value.afterTxt.length;
        else if (a.startsWith(r))
          u = r.length;
        else {
          const c = r[s - 1], d = a.indexOf(c, s - 1);
          d !== -1 && (u = d + 1);
        }
        e.value.setSelectionRange(u, u);
      } catch (a) {
        yo(!1, `Something warning of cursor restore. Please fire issue about this: ${a.message}`);
      }
  }
  return [o, i];
}
const uL = (() => {
  const e = Pe(0), t = () => {
    Mt.cancel(e.value);
  };
  return At(() => {
    t();
  }), (n) => {
    t(), e.value = Mt(() => {
      n();
    });
  };
});
var cL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const Hx = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), Vx = (e) => {
  const t = fa(e);
  return t.isInvalidate() ? null : t;
}, o2 = () => ({
  /** value will show as string */
  stringMode: st(),
  defaultValue: tn([String, Number]),
  value: tn([String, Number]),
  prefixCls: dn(),
  min: tn([String, Number]),
  max: tn([String, Number]),
  step: tn([String, Number], 1),
  tabindex: Number,
  controls: st(!0),
  readonly: st(),
  disabled: st(),
  autofocus: st(),
  keyboard: st(!0),
  /** Parse display value to validate number */
  parser: Qe(),
  /** Transform `value` to display value show in input */
  formatter: Qe(),
  /** Syntactic sugar of `formatter`. Config precision of display. */
  precision: Number,
  /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  decimalSeparator: String,
  onInput: Qe(),
  onChange: Qe(),
  onPressEnter: Qe(),
  onStep: Qe(),
  onBlur: Qe(),
  onFocus: Qe()
}), dL = ye({
  compatConfig: {
    MODE: 3
  },
  name: "InnerInputNumber",
  inheritAttrs: !1,
  props: I(I({}, o2()), {
    lazy: Boolean
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i,
      expose: a
    } = t;
    const r = Pe(), l = Pe(!1), s = Pe(!1), u = Pe(!1), c = Pe(fa(e.value));
    function d(J) {
      e.value === void 0 && (c.value = J);
    }
    const f = (J, be) => {
      if (!be)
        return e.precision >= 0 ? e.precision : Math.max(Ku(J), Ku(e.step));
    }, g = (J) => {
      const be = String(J);
      if (e.parser)
        return e.parser(be);
      let xe = be;
      return e.decimalSeparator && (xe = xe.replace(e.decimalSeparator, ".")), xe.replace(/[^\w.-]+/g, "");
    }, m = Pe(""), b = (J, be) => {
      if (e.formatter)
        return e.formatter(J, {
          userTyping: be,
          input: String(m.value)
        });
      let xe = typeof J == "number" ? Vm(J) : J;
      if (!be) {
        const he = f(xe, be);
        if (jm(xe) && (e.decimalSeparator || he >= 0)) {
          const de = e.decimalSeparator || ".";
          xe = Nh(xe, de, he);
        }
      }
      return xe;
    }, y = (() => {
      const J = e.value;
      return c.value.isInvalidate() && ["string", "number"].includes(typeof J) ? Number.isNaN(J) ? "" : J : b(c.value.toString(), !1);
    })();
    m.value = y;
    function S(J, be) {
      m.value = b(
        // Invalidate number is sometime passed by external control, we should let it go
        // Otherwise is controlled by internal interactive logic which check by userTyping
        // You can ref 'show limited value when input is not focused' test for more info.
        J.isInvalidate() ? J.toString(!1) : J.toString(!be),
        be
      );
    }
    const C = R(() => Vx(e.max)), O = R(() => Vx(e.min)), $ = R(() => !C.value || !c.value || c.value.isInvalidate() ? !1 : C.value.lessEquals(c.value)), P = R(() => !O.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(O.value)), [k, x] = sL(r, l), E = (J) => C.value && !J.lessEquals(C.value) ? C.value : O.value && !O.value.lessEquals(J) ? O.value : null, z = (J) => !E(J), B = (J, be) => {
      var xe;
      let he = J, de = z(he) || he.isEmpty();
      if (!he.isEmpty() && !be && (he = E(he) || he, de = !0), !e.readonly && !e.disabled && de) {
        const ne = he.toString(), we = f(ne, be);
        return we >= 0 && (he = fa(Nh(ne, ".", we))), he.equals(c.value) || (d(he), (xe = e.onChange) === null || xe === void 0 || xe.call(e, he.isEmpty() ? null : Hx(e.stringMode, he)), e.value === void 0 && S(he, be)), he;
      }
      return c.value;
    }, D = uL(), W = (J) => {
      var be;
      if (k(), m.value = J, !u.value) {
        const xe = g(J), he = fa(xe);
        he.isNaN() || B(he, !0);
      }
      (be = e.onInput) === null || be === void 0 || be.call(e, J), D(() => {
        let xe = J;
        e.parser || (xe = J.replace(/。/g, ".")), xe !== J && W(xe);
      });
    }, H = () => {
      u.value = !0;
    }, F = () => {
      u.value = !1, W(r.value.value);
    }, A = (J) => {
      W(J.target.value);
    }, U = (J) => {
      var be, xe;
      if (J && $.value || !J && P.value)
        return;
      s.value = !1;
      let he = fa(e.step);
      J || (he = he.negate());
      const de = (c.value || fa(0)).add(he.toString()), ne = B(de, !1);
      (be = e.onStep) === null || be === void 0 || be.call(e, Hx(e.stringMode, ne), {
        offset: e.step,
        type: J ? "up" : "down"
      }), (xe = r.value) === null || xe === void 0 || xe.focus();
    }, j = (J) => {
      const be = fa(g(m.value));
      let xe = be;
      be.isNaN() ? xe = c.value : xe = B(be, J), e.value !== void 0 ? S(c.value, !1) : xe.isNaN() || S(xe, !1);
    }, ae = () => {
      s.value = !0;
    }, G = (J) => {
      var be;
      const {
        which: xe
      } = J;
      s.value = !0, xe === Xe.ENTER && (u.value || (s.value = !1), j(!1), (be = e.onPressEnter) === null || be === void 0 || be.call(e, J)), e.keyboard !== !1 && !u.value && [Xe.UP, Xe.DOWN].includes(xe) && (U(Xe.UP === xe), J.preventDefault());
    }, Y = () => {
      s.value = !1;
    }, K = (J) => {
      j(!1), l.value = !1, s.value = !1, i("blur", J);
    };
    return Ie(() => e.precision, () => {
      c.value.isInvalidate() || S(c.value, !1);
    }, {
      flush: "post"
    }), Ie(() => e.value, () => {
      const J = fa(e.value);
      c.value = J;
      const be = fa(g(m.value));
      (!J.equals(be) || !s.value || e.formatter) && S(J, s.value);
    }, {
      flush: "post"
    }), Ie(m, () => {
      e.formatter && x();
    }, {
      flush: "post"
    }), Ie(() => e.disabled, (J) => {
      J && (l.value = !1);
    }), a({
      focus: () => {
        var J;
        (J = r.value) === null || J === void 0 || J.focus();
      },
      blur: () => {
        var J;
        (J = r.value) === null || J === void 0 || J.blur();
      }
    }), () => {
      const J = I(I({}, n), e), {
        prefixCls: be = "rc-input-number",
        min: xe,
        max: he,
        step: de = 1,
        defaultValue: ne,
        value: we,
        disabled: re,
        readonly: se,
        keyboard: ve,
        controls: Me = !0,
        autofocus: ke,
        stringMode: Fe,
        parser: Re,
        formatter: We,
        precision: et,
        decimalSeparator: Le,
        onChange: Ne,
        onInput: Ge,
        onPressEnter: it,
        onStep: Ke,
        lazy: Oe,
        class: Ve,
        style: De
      } = J, Je = cL(J, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
        upHandler: wt,
        downHandler: lt
      } = o, qe = `${be}-input`, at = {};
      return Oe ? at.onChange = A : at.onInput = A, v("div", {
        class: Te(be, Ve, {
          [`${be}-focused`]: l.value,
          [`${be}-disabled`]: re,
          [`${be}-readonly`]: se,
          [`${be}-not-a-number`]: c.value.isNaN(),
          [`${be}-out-of-range`]: !c.value.isInvalidate() && !z(c.value)
        }),
        style: De,
        onKeydown: G,
        onKeyup: Y
      }, [Me && v(lL, {
        prefixCls: be,
        upDisabled: $.value,
        downDisabled: P.value,
        onStep: U
      }, {
        upNode: wt,
        downNode: lt
      }), v("div", {
        class: `${qe}-wrap`
      }, [v("input", Z(Z(Z({
        autofocus: ke,
        autocomplete: "off",
        role: "spinbutton",
        "aria-valuemin": xe,
        "aria-valuemax": he,
        "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
        step: de
      }, Je), {}, {
        ref: r,
        class: qe,
        value: m.value,
        disabled: re,
        readonly: se,
        onFocus: (dt) => {
          l.value = !0, i("focus", dt);
        }
      }, at), {}, {
        onBlur: K,
        onCompositionstart: H,
        onCompositionend: F,
        onBeforeinput: ae
      }), null)])]);
    };
  }
});
function Zp(e) {
  return e != null;
}
const fL = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorBorder: i,
    borderRadius: a,
    fontSizeLG: r,
    controlHeightLG: l,
    controlHeightSM: s,
    colorError: u,
    inputPaddingHorizontalSM: c,
    colorTextDescription: d,
    motionDurationMid: f,
    colorPrimary: g,
    controlHeight: m,
    inputPaddingHorizontal: b,
    colorBgContainer: y,
    colorTextDisabled: S,
    borderRadiusSM: C,
    borderRadiusLG: O,
    controlWidth: $,
    handleVisible: P
  } = e;
  return [
    {
      [t]: I(I(I(I({}, Zt(e)), ic(e)), Ef(e, t)), {
        display: "inline-block",
        width: $,
        margin: 0,
        padding: 0,
        border: `${n}px ${o} ${i}`,
        borderRadius: a,
        "&-rtl": {
          direction: "rtl",
          [`${t}-input`]: {
            direction: "rtl"
          }
        },
        "&-lg": {
          padding: 0,
          fontSize: r,
          borderRadius: O,
          [`input${t}-input`]: {
            height: l - 2 * n
          }
        },
        "&-sm": {
          padding: 0,
          borderRadius: C,
          [`input${t}-input`]: {
            height: s - 2 * n,
            padding: `0 ${c}px`
          }
        },
        "&:hover": I({}, Ws(e)),
        "&-focused": I({}, wl(e)),
        "&-disabled": I(I({}, q$(e)), {
          [`${t}-input`]: {
            cursor: "not-allowed"
          }
        }),
        // ===================== Out Of Range =====================
        "&-out-of-range": {
          input: {
            color: u
          }
        },
        // Style for input-group: input with label, with button or dropdown...
        "&-group": I(I(I({}, Zt(e)), Y$(e)), {
          "&-wrapper": {
            display: "inline-block",
            textAlign: "start",
            verticalAlign: "top",
            [`${t}-affix-wrapper`]: {
              width: "100%"
            },
            // Size
            "&-lg": {
              [`${t}-group-addon`]: {
                borderRadius: O
              }
            },
            "&-sm": {
              [`${t}-group-addon`]: {
                borderRadius: C
              }
            }
          }
        }),
        [t]: {
          "&-input": I(I({
            width: "100%",
            height: m - 2 * n,
            padding: `0 ${b}px`,
            textAlign: "start",
            backgroundColor: "transparent",
            border: 0,
            borderRadius: a,
            outline: 0,
            transition: `all ${f} linear`,
            appearance: "textfield",
            color: e.colorText,
            fontSize: "inherit",
            verticalAlign: "top"
          }, W$(e.colorTextPlaceholder)), {
            '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
              margin: 0,
              /* stylelint-disable-next-line property-no-vendor-prefix */
              webkitAppearance: "none",
              appearance: "none"
            }
          })
        }
      })
    },
    // Handler
    {
      [t]: {
        [`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]: {
          opacity: 1
        },
        [`${t}-handler-wrap`]: {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          width: e.handleWidth,
          height: "100%",
          background: y,
          borderStartStartRadius: 0,
          borderStartEndRadius: a,
          borderEndEndRadius: a,
          borderEndStartRadius: 0,
          opacity: P === !0 ? 1 : 0,
          display: "flex",
          flexDirection: "column",
          alignItems: "stretch",
          transition: `opacity ${f} linear ${f}`,
          // Fix input number inside Menu makes icon too large
          // We arise the selector priority by nest selector here
          // https://github.com/ant-design/ant-design/issues/14367
          [`${t}-handler`]: {
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            flex: "auto",
            height: "40%",
            [`
              ${t}-handler-up-inner,
              ${t}-handler-down-inner
            `]: {
              marginInlineEnd: 0,
              fontSize: e.handleFontSize
            }
          }
        },
        [`${t}-handler`]: {
          height: "50%",
          overflow: "hidden",
          color: d,
          fontWeight: "bold",
          lineHeight: 0,
          textAlign: "center",
          cursor: "pointer",
          borderInlineStart: `${n}px ${o} ${i}`,
          transition: `all ${f} linear`,
          "&:active": {
            background: e.colorFillAlter
          },
          // Hover
          "&:hover": {
            height: "60%",
            [`
              ${t}-handler-up-inner,
              ${t}-handler-down-inner
            `]: {
              color: g
            }
          },
          "&-up-inner, &-down-inner": I(I({}, Ls()), {
            color: d,
            transition: `all ${f} linear`,
            userSelect: "none"
          })
        },
        [`${t}-handler-up`]: {
          borderStartEndRadius: a
        },
        [`${t}-handler-down`]: {
          borderBlockStart: `${n}px ${o} ${i}`,
          borderEndEndRadius: a
        },
        // Disabled
        "&-disabled, &-readonly": {
          [`${t}-handler-wrap`]: {
            display: "none"
          },
          [`${t}-input`]: {
            color: "inherit"
          }
        },
        [`
          ${t}-handler-up-disabled,
          ${t}-handler-down-disabled
        `]: {
          cursor: "not-allowed"
        },
        [`
          ${t}-handler-up-disabled:hover &-handler-up-inner,
          ${t}-handler-down-disabled:hover &-handler-down-inner
        `]: {
          color: S
        }
      }
    },
    // Border-less
    {
      [`${t}-borderless`]: {
        borderColor: "transparent",
        boxShadow: "none",
        [`${t}-handler-down`]: {
          borderBlockStartWidth: 0
        }
      }
    }
  ];
}, pL = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    inputAffixPadding: o,
    controlWidth: i,
    borderRadiusLG: a,
    borderRadiusSM: r
  } = e;
  return {
    [`${t}-affix-wrapper`]: I(I(I({}, ic(e)), Ef(e, `${t}-affix-wrapper`)), {
      // or number handler will cover form status
      position: "relative",
      display: "inline-flex",
      width: i,
      padding: 0,
      paddingInlineStart: n,
      "&-lg": {
        borderRadius: a
      },
      "&-sm": {
        borderRadius: r
      },
      [`&:not(${t}-affix-wrapper-disabled):hover`]: I(I({}, Ws(e)), {
        zIndex: 1
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${t}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> div${t}`]: {
        width: "100%",
        border: "none",
        outline: "none",
        [`&${t}-focused`]: {
          boxShadow: "none !important"
        }
      },
      [`input${t}-input`]: {
        padding: 0
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${t}-handler-wrap`]: {
        zIndex: 2
      },
      [t]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          pointerEvents: "none"
        },
        "&-prefix": {
          marginInlineEnd: o
        },
        "&-suffix": {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          zIndex: 1,
          height: "100%",
          marginInlineEnd: n,
          marginInlineStart: o
        }
      }
    })
  };
}, gL = nn("InputNumber", (e) => {
  const t = Cm(e);
  return [
    fL(t),
    pL(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    ec(t)
  ];
}, (e) => ({
  controlWidth: 90,
  handleWidth: e.controlHeightSM - e.lineWidth * 2,
  handleFontSize: e.fontSize / 2,
  handleVisible: "auto"
}));
var hL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const jx = o2(), vL = () => I(I({}, jx), {
  size: dn(),
  bordered: st(!0),
  placeholder: String,
  name: String,
  id: String,
  type: String,
  addonBefore: ue.any,
  addonAfter: ue.any,
  prefix: ue.any,
  "onUpdate:value": jx.onChange,
  valueModifiers: Object,
  status: dn()
}), Jp = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AInputNumber",
  inheritAttrs: !1,
  props: vL(),
  // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  slots: Object,
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      attrs: i,
      slots: a
    } = t;
    var r;
    const l = fi(), s = si.useInject(), u = R(() => $l(s.status, e.status)), {
      prefixCls: c,
      size: d,
      direction: f,
      disabled: g
    } = yt("input-number", e), {
      compactSize: m,
      compactItemClassnames: b
    } = Vs(c, f), y = Zi(), S = R(() => {
      var H;
      return (H = g.value) !== null && H !== void 0 ? H : y.value;
    }), [C, O] = gL(c), $ = R(() => m.value || d.value), P = Pe((r = e.value) !== null && r !== void 0 ? r : e.defaultValue), k = Pe(!1);
    Ie(() => e.value, () => {
      P.value = e.value;
    });
    const x = Pe(null), E = () => {
      var H;
      (H = x.value) === null || H === void 0 || H.focus();
    };
    o({
      focus: E,
      blur: () => {
        var H;
        (H = x.value) === null || H === void 0 || H.blur();
      }
    });
    const B = (H) => {
      e.value === void 0 && (P.value = H), n("update:value", H), n("change", H), l.onFieldChange();
    }, D = (H) => {
      k.value = !1, n("blur", H), l.onFieldBlur();
    }, W = (H) => {
      k.value = !0, n("focus", H);
    };
    return () => {
      var H, F, A, U;
      const {
        hasFeedback: j,
        isFormItemInput: ae,
        feedbackIcon: G
      } = s, Y = (H = e.id) !== null && H !== void 0 ? H : l.id.value, K = I(I(I({}, i), e), {
        id: Y,
        disabled: S.value
      }), {
        class: J,
        bordered: be,
        readonly: xe,
        style: he,
        addonBefore: de = (F = a.addonBefore) === null || F === void 0 ? void 0 : F.call(a),
        addonAfter: ne = (A = a.addonAfter) === null || A === void 0 ? void 0 : A.call(a),
        prefix: we = (U = a.prefix) === null || U === void 0 ? void 0 : U.call(a),
        valueModifiers: re = {}
      } = K, se = hL(K, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), ve = c.value, Me = Te({
        [`${ve}-lg`]: $.value === "large",
        [`${ve}-sm`]: $.value === "small",
        [`${ve}-rtl`]: f.value === "rtl",
        [`${ve}-readonly`]: xe,
        [`${ve}-borderless`]: !be,
        [`${ve}-in-form-item`]: ae
      }, Ki(ve, u.value), J, b.value, O.value);
      let ke = v(dL, Z(Z({}, Tn(se, ["size", "defaultValue"])), {}, {
        ref: x,
        lazy: !!re.lazy,
        value: P.value,
        class: Me,
        prefixCls: ve,
        readonly: xe,
        onChange: B,
        onBlur: D,
        onFocus: W
      }), {
        upHandler: a.upIcon ? () => v("span", {
          class: `${ve}-handler-up-inner`
        }, [a.upIcon()]) : () => v(Lm, {
          class: `${ve}-handler-up-inner`
        }, null),
        downHandler: a.downIcon ? () => v("span", {
          class: `${ve}-handler-down-inner`
        }, [a.downIcon()]) : () => v(yf, {
          class: `${ve}-handler-down-inner`
        }, null)
      });
      const Fe = Zp(de) || Zp(ne), Re = Zp(we);
      if (Re || j) {
        const We = Te(`${ve}-affix-wrapper`, Ki(`${ve}-affix-wrapper`, u.value, j), {
          [`${ve}-affix-wrapper-focused`]: k.value,
          [`${ve}-affix-wrapper-disabled`]: S.value,
          [`${ve}-affix-wrapper-sm`]: $.value === "small",
          [`${ve}-affix-wrapper-lg`]: $.value === "large",
          [`${ve}-affix-wrapper-rtl`]: f.value === "rtl",
          [`${ve}-affix-wrapper-readonly`]: xe,
          [`${ve}-affix-wrapper-borderless`]: !be,
          // className will go to addon wrapper
          [`${J}`]: !Fe && J
        }, O.value);
        ke = v("div", {
          class: We,
          style: he,
          onClick: E
        }, [Re && v("span", {
          class: `${ve}-prefix`
        }, [we]), ke, j && v("span", {
          class: `${ve}-suffix`
        }, [G])]);
      }
      if (Fe) {
        const We = `${ve}-group`, et = `${We}-addon`, Le = de ? v("div", {
          class: et
        }, [de]) : null, Ne = ne ? v("div", {
          class: et
        }, [ne]) : null, Ge = Te(`${ve}-wrapper`, We, {
          [`${We}-rtl`]: f.value === "rtl"
        }, O.value), it = Te(`${ve}-group-wrapper`, {
          [`${ve}-group-wrapper-sm`]: $.value === "small",
          [`${ve}-group-wrapper-lg`]: $.value === "large",
          [`${ve}-group-wrapper-rtl`]: f.value === "rtl"
        }, Ki(`${c}-group-wrapper`, u.value, j), J, O.value);
        ke = v("div", {
          class: it,
          style: he
        }, [v("div", {
          class: Ge
        }, [Le && v(Wu, null, {
          default: () => [v(zd, null, {
            default: () => [Le]
          })]
        }), ke, Ne && v(Wu, null, {
          default: () => [v(zd, null, {
            default: () => [Ne]
          })]
        })])]);
      }
      return C(An(ke, {
        style: he
      }));
    };
  }
}), fo = I(Jp, {
  install: (e) => (e.component(Jp.name, Jp), e)
}), mL = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorBgBody: o,
    colorText: i
  } = e;
  return {
    [`${t}-sider-light`]: {
      background: n,
      [`${t}-sider-trigger`]: {
        color: i,
        background: n
      },
      [`${t}-sider-zero-width-trigger`]: {
        color: i,
        background: n,
        border: `1px solid ${o}`,
        borderInlineStart: 0
      }
    }
  };
}, bL = (e) => {
  const {
    antCls: t,
    // .ant
    componentCls: n,
    // .ant-layout
    colorText: o,
    colorTextLightSolid: i,
    colorBgHeader: a,
    colorBgBody: r,
    colorBgTrigger: l,
    layoutHeaderHeight: s,
    layoutHeaderPaddingInline: u,
    layoutHeaderColor: c,
    layoutFooterPadding: d,
    layoutTriggerHeight: f,
    layoutZeroTriggerSize: g,
    motionDurationMid: m,
    motionDurationSlow: b,
    fontSize: y,
    borderRadius: S
  } = e;
  return {
    [n]: I(I({
      display: "flex",
      flex: "auto",
      flexDirection: "column",
      color: o,
      /* fix firefox can't set height smaller than content on flex item */
      minHeight: 0,
      background: r,
      "&, *": {
        boxSizing: "border-box"
      },
      [`&${n}-has-sider`]: {
        flexDirection: "row",
        [`> ${n}, > ${n}-content`]: {
          // https://segmentfault.com/a/1190000019498300
          width: 0
        }
      },
      [`${n}-header, &${n}-footer`]: {
        flex: "0 0 auto"
      },
      [`${n}-header`]: {
        height: s,
        paddingInline: u,
        color: c,
        lineHeight: `${s}px`,
        background: a,
        // Other components/menu/style/index.less line:686
        // Integration with header element so menu items have the same height
        [`${t}-menu`]: {
          lineHeight: "inherit"
        }
      },
      [`${n}-footer`]: {
        padding: d,
        color: o,
        fontSize: y,
        background: r
      },
      [`${n}-content`]: {
        flex: "auto",
        // fix firefox can't set height smaller than content on flex item
        minHeight: 0
      },
      [`${n}-sider`]: {
        position: "relative",
        // fix firefox can't set width smaller than content on flex item
        minWidth: 0,
        background: a,
        transition: `all ${m}, background 0s`,
        "&-children": {
          height: "100%",
          // Hack for fixing margin collapse bug
          // https://github.com/ant-design/ant-design/issues/7967
          // solution from https://stackoverflow.com/a/33132624/3040605
          marginTop: -0.1,
          paddingTop: 0.1,
          [`${t}-menu${t}-menu-inline-collapsed`]: {
            width: "auto"
          }
        },
        "&-has-trigger": {
          paddingBottom: f
        },
        "&-right": {
          order: 1
        },
        "&-trigger": {
          position: "fixed",
          bottom: 0,
          zIndex: 1,
          height: f,
          color: i,
          lineHeight: `${f}px`,
          textAlign: "center",
          background: l,
          cursor: "pointer",
          transition: `all ${m}`
        },
        "&-zero-width": {
          "> *": {
            overflow: "hidden"
          },
          "&-trigger": {
            position: "absolute",
            top: s,
            insetInlineEnd: -g,
            zIndex: 1,
            width: g,
            height: g,
            color: i,
            fontSize: e.fontSizeXL,
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            background: a,
            borderStartStartRadius: 0,
            borderStartEndRadius: S,
            borderEndEndRadius: S,
            borderEndStartRadius: 0,
            cursor: "pointer",
            transition: `background ${b} ease`,
            "&::after": {
              position: "absolute",
              inset: 0,
              background: "transparent",
              transition: `all ${b}`,
              content: '""'
            },
            "&:hover::after": {
              // FIXME: Hardcode, but seems no need to create a token for this
              background: "rgba(255, 255, 255, 0.2)"
            },
            "&-right": {
              insetInlineStart: -g,
              borderStartStartRadius: S,
              borderStartEndRadius: 0,
              borderEndEndRadius: 0,
              borderEndStartRadius: S
            }
          }
        }
      }
    }, mL(e)), {
      // RTL
      "&-rtl": {
        direction: "rtl"
      }
    })
  };
}, yL = nn("Layout", (e) => {
  const {
    colorText: t,
    controlHeightSM: n,
    controlHeight: o,
    controlHeightLG: i,
    marginXXS: a
  } = e, r = i * 1.25, l = _t(e, {
    // Layout
    layoutHeaderHeight: o * 2,
    layoutHeaderPaddingInline: r,
    layoutHeaderColor: t,
    layoutFooterPadding: `${n}px ${r}px`,
    layoutTriggerHeight: i + a * 2,
    layoutZeroTriggerSize: i
  });
  return [bL(l)];
}, (e) => {
  const {
    colorBgLayout: t
  } = e;
  return {
    colorBgHeader: "#001529",
    colorBgBody: t,
    colorBgTrigger: "#002140"
  };
}), Wm = () => ({
  prefixCls: String,
  hasSider: {
    type: Boolean,
    default: void 0
  },
  tagName: String
});
function Lf(e) {
  let {
    suffixCls: t,
    tagName: n,
    name: o
  } = e;
  return (i) => ye({
    compatConfig: {
      MODE: 3
    },
    name: o,
    props: Wm(),
    setup(r, l) {
      let {
        slots: s
      } = l;
      const {
        prefixCls: u
      } = yt(t, r);
      return () => {
        const c = I(I({}, r), {
          prefixCls: u.value,
          tagName: n
        });
        return v(i, c, s);
      };
    }
  });
}
const qm = ye({
  compatConfig: {
    MODE: 3
  },
  props: Wm(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => v(e.tagName, {
      class: e.prefixCls
    }, n);
  }
}), xL = ye({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: Wm(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: a
    } = yt("", e), [r, l] = yL(i), s = le([]);
    kt(f$, {
      addSider: (d) => {
        s.value = [...s.value, d];
      },
      removeSider: (d) => {
        s.value = s.value.filter((f) => f !== d);
      }
    });
    const c = R(() => {
      const {
        prefixCls: d,
        hasSider: f
      } = e;
      return {
        [l.value]: !0,
        [`${d}`]: !0,
        [`${d}-has-sider`]: typeof f == "boolean" ? f : s.value.length > 0,
        [`${d}-rtl`]: a.value === "rtl"
      };
    });
    return () => {
      const {
        tagName: d
      } = e;
      return r(v(d, I(I({}, o), {
        class: [c.value, o.class]
      }), n));
    };
  }
}), eg = Lf({
  suffixCls: "layout",
  tagName: "section",
  name: "ALayout"
})(xL), tg = Lf({
  suffixCls: "layout-header",
  tagName: "header",
  name: "ALayoutHeader"
})(qm), ng = Lf({
  suffixCls: "layout-footer",
  tagName: "footer",
  name: "ALayoutFooter"
})(qm), og = Lf({
  suffixCls: "layout-content",
  tagName: "main",
  name: "ALayoutContent"
})(qm);
var wL = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "bars", theme: "outlined" };
function Wx(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), o.forEach(function(i) {
      SL(e, i, n[i]);
    });
  }
  return e;
}
function SL(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Gm = function(t, n) {
  var o = Wx({}, t, n.attrs);
  return v(pn, Wx({}, o, {
    icon: wL
  }), null);
};
Gm.displayName = "BarsOutlined";
Gm.inheritAttrs = !1;
const qx = {
  xs: "479.98px",
  sm: "575.98px",
  md: "767.98px",
  lg: "991.98px",
  xl: "1199.98px",
  xxl: "1599.98px",
  xxxl: "1999.98px"
}, CL = () => ({
  prefixCls: String,
  collapsible: {
    type: Boolean,
    default: void 0
  },
  collapsed: {
    type: Boolean,
    default: void 0
  },
  defaultCollapsed: {
    type: Boolean,
    default: void 0
  },
  reverseArrow: {
    type: Boolean,
    default: void 0
  },
  zeroWidthTriggerStyle: {
    type: Object,
    default: void 0
  },
  trigger: ue.any,
  width: ue.oneOfType([ue.number, ue.string]),
  collapsedWidth: ue.oneOfType([ue.number, ue.string]),
  breakpoint: ue.oneOf(ri("xs", "sm", "md", "lg", "xl", "xxl", "xxxl")),
  theme: ue.oneOf(ri("light", "dark")).def("dark"),
  onBreakpoint: Function,
  onCollapse: Function
}), $L = /* @__PURE__ */ (() => {
  let e = 0;
  return function() {
    let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return e += 1, `${t}${e}`;
  };
})(), ig = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ALayoutSider",
  inheritAttrs: !1,
  props: wn(CL(), {
    collapsible: !1,
    defaultCollapsed: !1,
    reverseArrow: !1,
    width: 200,
    collapsedWidth: 80
  }),
  emits: ["breakpoint", "update:collapsed", "collapse"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: i
    } = t;
    const {
      prefixCls: a
    } = yt("layout-sider", e), r = Tt(f$, void 0), l = Pe(!!(e.collapsed !== void 0 ? e.collapsed : e.defaultCollapsed)), s = Pe(!1);
    Ie(() => e.collapsed, () => {
      l.value = !!e.collapsed;
    }), kt(d$, l);
    const u = (b, y) => {
      e.collapsed === void 0 && (l.value = b), n("update:collapsed", b), n("collapse", b, y);
    }, c = Pe((b) => {
      s.value = b.matches, n("breakpoint", b.matches), l.value !== b.matches && u(b.matches, "responsive");
    });
    let d;
    function f(b) {
      return c.value(b);
    }
    const g = $L("ant-sider-");
    r && r.addSider(g), Pt(() => {
      Ie(() => e.breakpoint, () => {
        try {
          d?.removeEventListener("change", f);
        } catch {
          d?.removeListener(f);
        }
        if (typeof window < "u") {
          const {
            matchMedia: b
          } = window;
          if (b && e.breakpoint && e.breakpoint in qx) {
            d = b(`(max-width: ${qx[e.breakpoint]})`);
            try {
              d.addEventListener("change", f);
            } catch {
              d.addListener(f);
            }
            f(d);
          }
        }
      }, {
        immediate: !0
      });
    }), At(() => {
      try {
        d?.removeEventListener("change", f);
      } catch {
        d?.removeListener(f);
      }
      r && r.removeSider(g);
    });
    const m = () => {
      u(!l.value, "clickTrigger");
    };
    return () => {
      var b, y;
      const S = a.value, {
        collapsedWidth: C,
        width: O,
        reverseArrow: $,
        zeroWidthTriggerStyle: P,
        trigger: k = (b = i.trigger) === null || b === void 0 ? void 0 : b.call(i),
        collapsible: x,
        theme: E
      } = e, z = l.value ? C : O, B = rh(z) ? `${z}px` : String(z), D = parseFloat(String(C || 0)) === 0 ? v("span", {
        onClick: m,
        class: Te(`${S}-zero-width-trigger`, `${S}-zero-width-trigger-${$ ? "right" : "left"}`),
        style: P
      }, [k || v(Gm, null, null)]) : null, W = {
        expanded: $ ? v(xl, null, null) : v(jd, null, null),
        collapsed: $ ? v(jd, null, null) : v(xl, null, null)
      }, H = l.value ? "collapsed" : "expanded", F = W[H], A = k !== null ? D || v("div", {
        class: `${S}-trigger`,
        onClick: m,
        style: {
          width: B
        }
      }, [k || F]) : null, U = [o.style, {
        flex: `0 0 ${B}`,
        maxWidth: B,
        minWidth: B,
        width: B
      }], j = Te(S, `${S}-${E}`, {
        [`${S}-collapsed`]: !!l.value,
        [`${S}-has-trigger`]: x && k !== null && !D,
        [`${S}-below`]: !!s.value,
        [`${S}-zero-width`]: parseFloat(B) === 0
      }, o.class);
      return v("aside", Z(Z({}, o), {}, {
        class: j,
        style: U
      }), [v("div", {
        class: `${S}-children`
      }, [(y = i.default) === null || y === void 0 ? void 0 : y.call(i)]), x || s.value && D ? A : null]);
    };
  }
}), Gx = I(eg, {
  Header: tg,
  Footer: ng,
  Content: og,
  Sider: ig,
  install: (e) => (e.component(eg.name, eg), e.component(tg.name, tg), e.component(ng.name, ng), e.component(ig.name, ig), e.component(og.name, og), e)
});
function PL(e, t, n) {
  var o = n || {}, i = o.noTrailing, a = i === void 0 ? !1 : i, r = o.noLeading, l = r === void 0 ? !1 : r, s = o.debounceMode, u = s === void 0 ? void 0 : s, c, d = !1, f = 0;
  function g() {
    c && clearTimeout(c);
  }
  function m(y) {
    var S = y || {}, C = S.upcomingOnly, O = C === void 0 ? !1 : C;
    g(), d = !O;
  }
  function b() {
    for (var y = arguments.length, S = new Array(y), C = 0; C < y; C++)
      S[C] = arguments[C];
    var O = this, $ = Date.now() - f;
    if (d)
      return;
    function P() {
      f = Date.now(), t.apply(O, S);
    }
    function k() {
      c = void 0;
    }
    !l && u && !c && P(), g(), u === void 0 && $ > e ? l ? (f = Date.now(), a || (c = setTimeout(u ? k : P, e))) : P() : a !== !0 && (c = setTimeout(u ? k : P, u === void 0 ? e - $ : e));
  }
  return b.cancel = m, b;
}
function OL(e, t, n) {
  var o = {}, i = o.atBegin, a = i === void 0 ? !1 : i;
  return PL(e, t, {
    debounceMode: a !== !1
  });
}
const IL = new Bt("antSpinMove", {
  to: {
    opacity: 1
  }
}), ML = new Bt("antRotate", {
  to: {
    transform: "rotate(405deg)"
  }
}), TL = (e) => ({
  [`${e.componentCls}`]: I(I({}, Zt(e)), {
    position: "absolute",
    display: "none",
    color: e.colorPrimary,
    textAlign: "center",
    verticalAlign: "middle",
    opacity: 0,
    transition: `transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,
    "&-spinning": {
      position: "static",
      display: "inline-block",
      opacity: 1
    },
    "&-nested-loading": {
      position: "relative",
      [`> div > ${e.componentCls}`]: {
        position: "absolute",
        top: 0,
        insetInlineStart: 0,
        zIndex: 4,
        display: "block",
        width: "100%",
        height: "100%",
        maxHeight: e.contentHeight,
        [`${e.componentCls}-dot`]: {
          position: "absolute",
          top: "50%",
          insetInlineStart: "50%",
          margin: -e.spinDotSize / 2
        },
        [`${e.componentCls}-text`]: {
          position: "absolute",
          top: "50%",
          width: "100%",
          paddingTop: (e.spinDotSize - e.fontSize) / 2 + 2,
          textShadow: `0 1px 2px ${e.colorBgContainer}`
          // FIXME: shadow
        },
        [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
          marginTop: -(e.spinDotSize / 2) - 10
        },
        "&-sm": {
          [`${e.componentCls}-dot`]: {
            margin: -e.spinDotSizeSM / 2
          },
          [`${e.componentCls}-text`]: {
            paddingTop: (e.spinDotSizeSM - e.fontSize) / 2 + 2
          },
          [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
            marginTop: -(e.spinDotSizeSM / 2) - 10
          }
        },
        "&-lg": {
          [`${e.componentCls}-dot`]: {
            margin: -(e.spinDotSizeLG / 2)
          },
          [`${e.componentCls}-text`]: {
            paddingTop: (e.spinDotSizeLG - e.fontSize) / 2 + 2
          },
          [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
            marginTop: -(e.spinDotSizeLG / 2) - 10
          }
        }
      },
      [`${e.componentCls}-container`]: {
        position: "relative",
        transition: `opacity ${e.motionDurationSlow}`,
        "&::after": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          zIndex: 10,
          width: "100%",
          height: "100%",
          background: e.colorBgContainer,
          opacity: 0,
          transition: `all ${e.motionDurationSlow}`,
          content: '""',
          pointerEvents: "none"
        }
      },
      [`${e.componentCls}-blur`]: {
        clear: "both",
        opacity: 0.5,
        userSelect: "none",
        pointerEvents: "none",
        "&::after": {
          opacity: 0.4,
          pointerEvents: "auto"
        }
      }
    },
    // tip
    // ------------------------------
    "&-tip": {
      color: e.spinDotDefault
    },
    // dots
    // ------------------------------
    [`${e.componentCls}-dot`]: {
      position: "relative",
      display: "inline-block",
      fontSize: e.spinDotSize,
      width: "1em",
      height: "1em",
      "&-item": {
        position: "absolute",
        display: "block",
        width: (e.spinDotSize - e.marginXXS / 2) / 2,
        height: (e.spinDotSize - e.marginXXS / 2) / 2,
        backgroundColor: e.colorPrimary,
        borderRadius: "100%",
        transform: "scale(0.75)",
        transformOrigin: "50% 50%",
        opacity: 0.3,
        animationName: IL,
        animationDuration: "1s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear",
        animationDirection: "alternate",
        "&:nth-child(1)": {
          top: 0,
          insetInlineStart: 0
        },
        "&:nth-child(2)": {
          top: 0,
          insetInlineEnd: 0,
          animationDelay: "0.4s"
        },
        "&:nth-child(3)": {
          insetInlineEnd: 0,
          bottom: 0,
          animationDelay: "0.8s"
        },
        "&:nth-child(4)": {
          bottom: 0,
          insetInlineStart: 0,
          animationDelay: "1.2s"
        }
      },
      "&-spin": {
        transform: "rotate(45deg)",
        animationName: ML,
        animationDuration: "1.2s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear"
      }
    },
    // Sizes
    // ------------------------------
    // small
    [`&-sm ${e.componentCls}-dot`]: {
      fontSize: e.spinDotSizeSM,
      i: {
        width: (e.spinDotSizeSM - e.marginXXS / 2) / 2,
        height: (e.spinDotSizeSM - e.marginXXS / 2) / 2
      }
    },
    // large
    [`&-lg ${e.componentCls}-dot`]: {
      fontSize: e.spinDotSizeLG,
      i: {
        width: (e.spinDotSizeLG - e.marginXXS) / 2,
        height: (e.spinDotSizeLG - e.marginXXS) / 2
      }
    },
    [`&${e.componentCls}-show-text ${e.componentCls}-text`]: {
      display: "block"
    }
  })
}), kL = nn("Spin", (e) => {
  const t = _t(e, {
    spinDotDefault: e.colorTextDescription,
    spinDotSize: e.controlHeightLG / 2,
    spinDotSizeSM: e.controlHeightLG * 0.35,
    spinDotSizeLG: e.controlHeight
  });
  return [TL(t)];
}, {
  contentHeight: 400
});
var EL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const _L = () => ({
  prefixCls: String,
  spinning: {
    type: Boolean,
    default: void 0
  },
  size: String,
  wrapperClassName: String,
  tip: ue.any,
  delay: Number,
  indicator: ue.any
});
let md = null;
function AL(e, t) {
  return !!e && !!t && !isNaN(Number(t));
}
function DL(e) {
  const t = e.indicator;
  md = typeof t == "function" ? t : () => v(t, null, null);
}
const Ao = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASpin",
  inheritAttrs: !1,
  props: wn(_L(), {
    size: "default",
    spinning: !0,
    wrapperClassName: ""
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: i,
      size: a,
      direction: r
    } = yt("spin", e), [l, s] = kL(i), u = Pe(e.spinning && !AL(e.spinning, e.delay));
    let c;
    return Ie([() => e.spinning, () => e.delay], () => {
      c?.cancel(), c = OL(e.delay, () => {
        u.value = e.spinning;
      }), c?.();
    }, {
      immediate: !0,
      flush: "post"
    }), At(() => {
      c?.cancel();
    }), () => {
      var d, f;
      const {
        class: g
      } = n, m = EL(n, ["class"]), {
        tip: b = (d = o.tip) === null || d === void 0 ? void 0 : d.call(o)
      } = e, y = (f = o.default) === null || f === void 0 ? void 0 : f.call(o), S = {
        [s.value]: !0,
        [i.value]: !0,
        [`${i.value}-sm`]: a.value === "small",
        [`${i.value}-lg`]: a.value === "large",
        [`${i.value}-spinning`]: u.value,
        [`${i.value}-show-text`]: !!b,
        [`${i.value}-rtl`]: r.value === "rtl",
        [g]: !!g
      };
      function C($) {
        const P = `${$}-dot`;
        let k = Ii(o, e, "indicator");
        return k === null ? null : (Array.isArray(k) && (k = k.length === 1 ? k[0] : k), Xi(k) ? gl(k, {
          class: P
        }) : md && Xi(md()) ? gl(md(), {
          class: P
        }) : v("span", {
          class: `${P} ${$}-dot-spin`
        }, [v("i", {
          class: `${$}-dot-item`
        }, null), v("i", {
          class: `${$}-dot-item`
        }, null), v("i", {
          class: `${$}-dot-item`
        }, null), v("i", {
          class: `${$}-dot-item`
        }, null)]));
      }
      const O = v("div", Z(Z({}, m), {}, {
        class: S,
        "aria-live": "polite",
        "aria-busy": u.value
      }), [C(i.value), b ? v("div", {
        class: `${i.value}-text`
      }, [b]) : null]);
      if (y && Go(y).length) {
        const $ = {
          [`${i.value}-container`]: !0,
          [`${i.value}-blur`]: u.value
        };
        return l(v("div", {
          class: [`${i.value}-nested-loading`, e.wrapperClassName, s.value]
        }, [u.value && v("div", {
          key: "loading"
        }, [O]), v("div", {
          class: $,
          key: "container"
        }, [y])]));
      }
      return l(O);
    };
  }
});
Ao.setDefaultIndicator = DL;
Ao.install = function(e) {
  return e.component(Ao.name, Ao), e;
};
var zL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
let Bh;
const RL = (e) => {
  Bh = {
    x: e.pageX,
    y: e.pageY
  }, setTimeout(() => Bh = null, 100);
};
rP() && qi(document.documentElement, "click", RL, !0);
const NL = () => ({
  prefixCls: String,
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  confirmLoading: {
    type: Boolean,
    default: void 0
  },
  title: ue.any,
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: ue.any,
  onOk: Function,
  onCancel: Function,
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onChange: Function,
  afterClose: Function,
  centered: {
    type: Boolean,
    default: void 0
  },
  width: [String, Number],
  footer: ue.any,
  okText: ue.any,
  okType: String,
  cancelText: ue.any,
  icon: ue.any,
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  okButtonProps: Ct(),
  cancelButtonProps: Ct(),
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  wrapClassName: String,
  maskTransitionName: String,
  transitionName: String,
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  zIndex: Number,
  bodyStyle: Ct(),
  maskStyle: Ct(),
  mask: {
    type: Boolean,
    default: void 0
  },
  keyboard: {
    type: Boolean,
    default: void 0
  },
  wrapProps: Object,
  focusTriggerAfterClose: {
    type: Boolean,
    default: void 0
  },
  modalRender: Function,
  mousePosition: Ct()
}), po = ye({
  compatConfig: {
    MODE: 3
  },
  name: "AModal",
  inheritAttrs: !1,
  props: wn(NL(), {
    width: 520,
    confirmLoading: !1,
    okType: "primary"
  }),
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: i
    } = t;
    const [a] = Bs("Modal"), {
      prefixCls: r,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u
    } = yt("modal", e), [c, d] = nL(r);
    Qn(e.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
    const f = (b) => {
      n("update:visible", !1), n("update:open", !1), n("cancel", b), n("change", !1);
    }, g = (b) => {
      n("ok", b);
    }, m = () => {
      var b, y;
      const {
        okText: S = (b = o.okText) === null || b === void 0 ? void 0 : b.call(o),
        okType: C,
        cancelText: O = (y = o.cancelText) === null || y === void 0 ? void 0 : y.call(o),
        confirmLoading: $
      } = e;
      return v(He, null, [v($t, Z({
        onClick: f
      }, e.cancelButtonProps), {
        default: () => [O || a.value.cancelText]
      }), v($t, Z(Z({}, UC(C)), {}, {
        loading: $,
        onClick: g
      }, e.okButtonProps), {
        default: () => [S || a.value.okText]
      })]);
    };
    return () => {
      var b, y;
      const {
        prefixCls: S,
        visible: C,
        open: O,
        wrapClassName: $,
        centered: P,
        getContainer: k,
        closeIcon: x = (b = o.closeIcon) === null || b === void 0 ? void 0 : b.call(o),
        focusTriggerAfterClose: E = !0
      } = e, z = zL(e, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), B = Te($, {
        [`${r.value}-centered`]: !!P,
        [`${r.value}-wrap-rtl`]: s.value === "rtl"
      });
      return c(v(XF, Z(Z(Z({}, z), i), {}, {
        rootClassName: d.value,
        class: Te(d.value, i.class),
        getContainer: k || u?.value,
        prefixCls: r.value,
        wrapClassName: B,
        visible: O ?? C,
        onClose: f,
        focusTriggerAfterClose: E,
        transitionName: qa(l.value, "zoom", e.transitionName),
        maskTransitionName: qa(l.value, "fade", e.maskTransitionName),
        mousePosition: (y = z.mousePosition) !== null && y !== void 0 ? y : Bh
      }), I(I({}, o), {
        footer: o.footer || m,
        closeIcon: () => v("span", {
          class: `${r.value}-close-x`
        }, [x || v(wa, {
          class: `${r.value}-close-icon`
        }, null)])
      })));
    };
  }
}), BL = () => {
  const e = Pe(!1);
  return At(() => {
    e.value = !0;
  }), e;
}, FL = {
  type: {
    type: String
  },
  actionFn: Function,
  close: Function,
  autofocus: Boolean,
  prefixCls: String,
  buttonProps: Ct(),
  emitEvent: Boolean,
  quitOnNullishReturnValue: Boolean
};
function Kx(e) {
  return !!(e && e.then);
}
const Yx = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ActionButton",
  props: FL,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Pe(!1), i = Pe(), a = Pe(!1);
    let r;
    const l = BL();
    Pt(() => {
      e.autofocus && (r = setTimeout(() => {
        var d, f;
        return (f = (d = Ra(i.value)) === null || d === void 0 ? void 0 : d.focus) === null || f === void 0 ? void 0 : f.call(d);
      }));
    }), At(() => {
      clearTimeout(r);
    });
    const s = function() {
      for (var d, f = arguments.length, g = new Array(f), m = 0; m < f; m++)
        g[m] = arguments[m];
      (d = e.close) === null || d === void 0 || d.call(e, ...g);
    }, u = (d) => {
      Kx(d) && (a.value = !0, d.then(function() {
        l.value || (a.value = !1), s(...arguments), o.value = !1;
      }, (f) => (l.value || (a.value = !1), o.value = !1, Promise.reject(f))));
    }, c = (d) => {
      const {
        actionFn: f
      } = e;
      if (o.value)
        return;
      if (o.value = !0, !f) {
        s();
        return;
      }
      let g;
      if (e.emitEvent) {
        if (g = f(d), e.quitOnNullishReturnValue && !Kx(g)) {
          o.value = !1, s(d);
          return;
        }
      } else if (f.length)
        g = f(e.close), o.value = !1;
      else if (g = f(), !g) {
        s();
        return;
      }
      u(g);
    };
    return () => {
      const {
        type: d,
        prefixCls: f,
        buttonProps: g
      } = e;
      return v($t, Z(Z(Z({}, UC(d)), {}, {
        onClick: c,
        loading: a.value,
        prefixCls: f
      }, g), {}, {
        ref: i
      }), n);
    };
  }
});
function ql(e) {
  return typeof e == "function" ? e() : e;
}
const i2 = ye({
  name: "ConfirmDialog",
  inheritAttrs: !1,
  props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const [o] = Bs("Modal");
    return process.env.NODE_ENV !== "production" && Qn(e.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
      const {
        icon: i,
        onCancel: a,
        onOk: r,
        close: l,
        okText: s,
        closable: u = !1,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: g,
        getContainer: m,
        maskStyle: b,
        okButtonProps: y,
        cancelButtonProps: S,
        okCancel: C,
        width: O = 416,
        mask: $ = !0,
        maskClosable: P = !1,
        type: k,
        open: x,
        title: E,
        content: z,
        direction: B,
        closeIcon: D,
        modalRender: W,
        focusTriggerAfterClose: H,
        rootPrefixCls: F,
        bodyStyle: A,
        wrapClassName: U,
        footer: j
      } = e;
      let ae = i;
      if (!i && i !== null)
        switch (k) {
          case "info":
            ae = v(Pl, null, null);
            break;
          case "success":
            ae = v(_r, null, null);
            break;
          case "error":
            ae = v(di, null, null);
            break;
          default:
            ae = v(Ar, null, null);
        }
      const G = e.okType || "primary", Y = e.prefixCls || "ant-modal", K = `${Y}-confirm`, J = n.style || {}, be = C ?? k === "confirm", xe = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", he = `${Y}-confirm`, de = Te(he, `${he}-${e.type}`, {
        [`${he}-rtl`]: B === "rtl"
      }, n.class), ne = o.value, we = be && v(Yx, {
        actionFn: a,
        close: l,
        autofocus: xe === "cancel",
        buttonProps: S,
        prefixCls: `${F}-btn`
      }, {
        default: () => [ql(e.cancelText) || ne.cancelText]
      });
      return v(po, {
        prefixCls: Y,
        class: de,
        wrapClassName: Te({
          [`${he}-centered`]: !!g
        }, U),
        onCancel: (re) => l?.({
          triggerCancel: !0
        }, re),
        open: x,
        title: "",
        footer: "",
        transitionName: qa(F, "zoom", e.transitionName),
        maskTransitionName: qa(F, "fade", e.maskTransitionName),
        mask: $,
        maskClosable: P,
        maskStyle: b,
        style: J,
        bodyStyle: A,
        width: O,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: g,
        getContainer: m,
        closable: u,
        closeIcon: D,
        modalRender: W,
        focusTriggerAfterClose: H
      }, {
        default: () => [v("div", {
          class: `${K}-body-wrapper`
        }, [v("div", {
          class: `${K}-body`
        }, [ql(ae), E === void 0 ? null : v("span", {
          class: `${K}-title`
        }, [ql(E)]), v("div", {
          class: `${K}-content`
        }, [ql(z)])]), j !== void 0 ? ql(j) : v("div", {
          class: `${K}-btns`
        }, [we, v(Yx, {
          type: G,
          actionFn: r,
          close: l,
          autofocus: xe === "ok",
          buttonProps: y,
          prefixCls: `${F}-btn`
        }, {
          default: () => [ql(s) || (be ? ne.okText : ne.justOkText)]
        })])])]
      });
    };
  }
}), ll = [], sc = (e) => {
  const t = document.createDocumentFragment();
  let n = I(I({}, Tn(e, ["parentContext", "appContext"])), {
    close: a,
    open: !0
  }), o = null;
  function i() {
    o && (Pr(null, t), o = null);
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    const f = c.some((g) => g && g.triggerCancel);
    e.onCancel && f && e.onCancel(() => {
    }, ...c.slice(1));
    for (let g = 0; g < ll.length; g++)
      if (ll[g] === a) {
        ll.splice(g, 1);
        break;
      }
  }
  function a() {
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    n = I(I({}, n), {
      open: !1,
      afterClose: () => {
        typeof e.afterClose == "function" && e.afterClose(), i.apply(this, c);
      }
    }), n.visible && delete n.visible, r(n);
  }
  function r(u) {
    typeof u == "function" ? n = u(n) : n = I(I({}, n), u), o && MA(o, n, t);
  }
  const l = (u) => {
    const c = mo, d = c.prefixCls, f = u.prefixCls || `${d}-modal`, g = c.iconPrefixCls, m = zB();
    return v(dl, Z(Z({}, c), {}, {
      prefixCls: d
    }), {
      default: () => [v(i2, Z(Z({}, u), {}, {
        rootPrefixCls: d,
        prefixCls: f,
        iconPrefixCls: g,
        locale: m,
        cancelText: u.cancelText || m.cancelText
      }), null)]
    });
  };
  function s(u) {
    const c = v(l, I({}, u));
    return c.appContext = e.parentContext || e.appContext || c.appContext, Pr(c, t), c;
  }
  return o = s(n), ll.push(a), {
    destroy: a,
    update: r
  };
};
function a2(e) {
  return I(I({}, e), {
    type: "warning"
  });
}
function r2(e) {
  return I(I({}, e), {
    type: "info"
  });
}
function l2(e) {
  return I(I({}, e), {
    type: "success"
  });
}
function s2(e) {
  return I(I({}, e), {
    type: "error"
  });
}
function u2(e) {
  return I(I({}, e), {
    type: "confirm"
  });
}
const LL = () => ({
  config: Object,
  afterClose: Function,
  destroyAction: Function,
  open: Boolean
}), HL = ye({
  name: "HookModal",
  inheritAttrs: !1,
  props: wn(LL(), {
    config: {
      width: 520,
      okType: "primary"
    }
  }),
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o;
    const i = R(() => e.open), a = R(() => e.config), {
      direction: r,
      getPrefixCls: l
    } = sf(), s = l("modal"), u = l(), c = () => {
      var m, b;
      e?.afterClose(), (b = (m = a.value).afterClose) === null || b === void 0 || b.call(m);
    }, d = function() {
      e.destroyAction(...arguments);
    };
    n({
      destroy: d
    });
    const f = (o = a.value.okCancel) !== null && o !== void 0 ? o : a.value.type === "confirm", [g] = Bs("Modal", Ir.Modal);
    return () => v(i2, Z(Z({
      prefixCls: s,
      rootPrefixCls: u
    }, a.value), {}, {
      close: d,
      open: i.value,
      afterClose: c,
      okText: a.value.okText || (f ? g?.value.okText : g?.value.justOkText),
      direction: a.value.direction || r.value,
      cancelText: a.value.cancelText || g?.value.cancelText
    }), null);
  }
});
let Ux = 0;
const VL = ye({
  name: "ElementsHolder",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = Pe([]);
    return n({
      addModal: (a) => (o.value.push(a), o.value = o.value.slice(), () => {
        o.value = o.value.filter((r) => r !== a);
      })
    }), () => o.value.map((a) => a());
  }
});
function c2() {
  const e = Pe(null), t = Pe([]);
  Ie(t, () => {
    t.value.length && ([...t.value].forEach((r) => {
      r();
    }), t.value = []);
  }, {
    immediate: !0
  });
  const n = (a) => function(l) {
    var s;
    Ux += 1;
    const u = Pe(!0), c = Pe(null), d = Pe(M(l)), f = Pe({});
    Ie(() => l, (O) => {
      y(I(I({}, Q1(O) ? O.value : O), f.value));
    });
    const g = function() {
      u.value = !1;
      for (var O = arguments.length, $ = new Array(O), P = 0; P < O; P++)
        $[P] = arguments[P];
      const k = $.some((x) => x && x.triggerCancel);
      d.value.onCancel && k && d.value.onCancel(() => {
      }, ...$.slice(1));
    };
    let m;
    const b = () => v(HL, {
      key: `modal-${Ux}`,
      config: a(d.value),
      ref: c,
      open: u.value,
      destroyAction: g,
      afterClose: () => {
        m?.();
      }
    }, null);
    m = (s = e.value) === null || s === void 0 ? void 0 : s.addModal(b), m && ll.push(m);
    const y = (O) => {
      d.value = I(I({}, d.value), O);
    };
    return {
      destroy: () => {
        c.value ? g() : t.value = [...t.value, g];
      },
      update: (O) => {
        f.value = O, c.value ? y(O) : t.value = [...t.value, () => y(O)];
      }
    };
  }, o = R(() => ({
    info: n(r2),
    success: n(l2),
    error: n(s2),
    warning: n(a2),
    confirm: n(u2)
  })), i = Symbol("modalHolderKey");
  return [o.value, () => v(VL, {
    key: i,
    ref: e
  }, null)];
}
function d2(e) {
  return sc(a2(e));
}
po.useModal = c2;
po.info = function(t) {
  return sc(r2(t));
};
po.success = function(t) {
  return sc(l2(t));
};
po.error = function(t) {
  return sc(s2(t));
};
po.warning = d2;
po.warn = d2;
po.confirm = function(t) {
  return sc(u2(t));
};
po.destroyAll = function() {
  for (; ll.length; ) {
    const t = ll.pop();
    t && t();
  }
};
po.install = function(e) {
  return e.component(po.name, po), e;
};
const jL = {
  small: 8,
  middle: 16,
  large: 24
}, WL = () => ({
  prefixCls: String,
  size: {
    type: [String, Number, Array]
  },
  direction: ue.oneOf(ri("horizontal", "vertical")).def("horizontal"),
  align: ue.oneOf(ri("start", "end", "center", "baseline")),
  wrap: st()
});
function qL(e) {
  return typeof e == "string" ? jL[e] : e || 0;
}
const ha = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASpace",
  inheritAttrs: !1,
  props: WL(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      space: a,
      direction: r
    } = yt("space", e), [l, s] = NC(i), u = lP(), c = R(() => {
      var S, C, O;
      return (O = (S = e.size) !== null && S !== void 0 ? S : (C = a?.value) === null || C === void 0 ? void 0 : C.size) !== null && O !== void 0 ? O : "small";
    }), d = le(), f = le();
    Ie(c, () => {
      [d.value, f.value] = (Array.isArray(c.value) ? c.value : [c.value, c.value]).map((S) => qL(S));
    }, {
      immediate: !0
    });
    const g = R(() => e.align === void 0 && e.direction === "horizontal" ? "center" : e.align), m = R(() => Te(i.value, s.value, `${i.value}-${e.direction}`, {
      [`${i.value}-rtl`]: r.value === "rtl",
      [`${i.value}-align-${g.value}`]: g.value
    })), b = R(() => r.value === "rtl" ? "marginLeft" : "marginRight"), y = R(() => {
      const S = {};
      return u.value && (S.columnGap = `${d.value}px`, S.rowGap = `${f.value}px`), I(I({}, S), e.wrap && {
        flexWrap: "wrap",
        marginBottom: `${-f.value}px`
      });
    });
    return () => {
      var S, C;
      const {
        wrap: O,
        direction: $ = "horizontal"
      } = e, P = (S = n.default) === null || S === void 0 ? void 0 : S.call(n), k = Go(P), x = k.length;
      if (x === 0)
        return null;
      const E = (C = n.split) === null || C === void 0 ? void 0 : C.call(n), z = `${i.value}-item`, B = d.value, D = x - 1;
      return v("div", Z(Z({}, o), {}, {
        class: [m.value, o.class],
        style: [y.value, o.style]
      }), [k.map((W, H) => {
        let F = P.indexOf(W);
        F === -1 && (F = `$$space-${H}`);
        let A = {};
        return u.value || ($ === "vertical" ? H < D && (A = {
          marginBottom: `${B / (E ? 2 : 1)}px`
        }) : A = I(I({}, H < D && {
          [b.value]: `${B / (E ? 2 : 1)}px`
        }), O && {
          paddingBottom: `${f.value}px`
        })), l(v(He, {
          key: F
        }, [v("div", {
          class: z,
          style: A
        }, [W]), H < D && E && v("span", {
          class: `${z}-split`,
          style: A
        }, [E])]));
      })]);
    };
  }
});
ha.Compact = ah;
ha.install = function(e) {
  return e.component(ha.name, ha), e.component(ah.name, ah), e;
};
const GL = Ji(uP), Km = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    included: o,
    vertical: i,
    style: a,
    class: r
  } = n;
  let {
    length: l,
    offset: s,
    reverse: u
  } = n;
  l < 0 && (u = !u, l = Math.abs(l), s = 100 - s);
  const c = i ? {
    [u ? "top" : "bottom"]: `${s}%`,
    [u ? "bottom" : "top"]: "auto",
    height: `${l}%`
  } : {
    [u ? "right" : "left"]: `${s}%`,
    [u ? "left" : "right"]: "auto",
    width: `${l}%`
  }, d = I(I({}, a), c);
  return o ? v("div", {
    class: r,
    style: d
  }, null) : null;
};
Km.inheritAttrs = !1;
const KL = (e, t, n, o, i, a) => {
  Qn(n ? o > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  const r = Object.keys(t).map(parseFloat).sort((l, s) => l - s);
  if (n && o)
    for (let l = i; l <= a; l += o)
      r.indexOf(l) === -1 && r.push(l);
  return r;
}, f2 = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    prefixCls: o,
    vertical: i,
    reverse: a,
    marks: r,
    dots: l,
    step: s,
    included: u,
    lowerBound: c,
    upperBound: d,
    max: f,
    min: g,
    dotStyle: m,
    activeDotStyle: b
  } = n, y = f - g, S = KL(i, r, l, s, g, f).map((C) => {
    const O = `${Math.abs(C - g) / y * 100}%`, $ = !u && C === d || u && C <= d && C >= c;
    let P = i ? I(I({}, m), {
      [a ? "top" : "bottom"]: O
    }) : I(I({}, m), {
      [a ? "right" : "left"]: O
    });
    $ && (P = I(I({}, P), b));
    const k = Te({
      [`${o}-dot`]: !0,
      [`${o}-dot-active`]: $,
      [`${o}-dot-reverse`]: a
    });
    return v("span", {
      class: k,
      style: P,
      key: C
    }, null);
  });
  return v("div", {
    class: `${o}-step`
  }, [S]);
};
f2.inheritAttrs = !1;
const p2 = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  const {
    class: i,
    vertical: a,
    reverse: r,
    marks: l,
    included: s,
    upperBound: u,
    lowerBound: c,
    max: d,
    min: f,
    onClickLabel: g
  } = n, m = Object.keys(l), b = o.mark, y = d - f, S = m.map(parseFloat).sort((C, O) => C - O).map((C) => {
    const O = typeof l[C] == "function" ? l[C]() : l[C], $ = typeof O == "object" && !No(O);
    let P = $ ? O.label : O;
    if (!P && P !== 0)
      return null;
    b && (P = b({
      point: C,
      label: P
    }));
    const k = !s && C === u || s && C <= u && C >= c, x = Te({
      [`${i}-text`]: !0,
      [`${i}-text-active`]: k
    }), E = {
      marginBottom: "-50%",
      [r ? "top" : "bottom"]: `${(C - f) / y * 100}%`
    }, z = {
      transform: `translateX(${r ? "50%" : "-50%"})`,
      msTransform: `translateX(${r ? "50%" : "-50%"})`,
      [r ? "right" : "left"]: `${(C - f) / y * 100}%`
    }, B = a ? E : z, D = $ ? I(I({}, B), O.style) : B, W = {
      [bo ? "onTouchstartPassive" : "onTouchstart"]: (H) => g(H, C)
    };
    return v("span", Z({
      class: x,
      style: D,
      key: C,
      onMousedown: (H) => g(H, C)
    }, W), [P]);
  });
  return v("div", {
    class: i
  }, [S]);
};
p2.inheritAttrs = !1;
const g2 = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Handle",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    vertical: {
      type: Boolean,
      default: void 0
    },
    offset: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    value: Number,
    tabindex: ue.oneOfType([ue.number, ue.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    ariaLabel: String,
    ariaLabelledBy: String,
    ariaValueTextFormatter: Function,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onMousedown: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t;
    const a = Pe(!1), r = Pe(), l = () => {
      document.activeElement === r.value && (a.value = !0);
    }, s = (y) => {
      a.value = !1, o("blur", y);
    }, u = () => {
      a.value = !1;
    }, c = () => {
      var y;
      (y = r.value) === null || y === void 0 || y.focus();
    }, d = () => {
      var y;
      (y = r.value) === null || y === void 0 || y.blur();
    }, f = () => {
      a.value = !0, c();
    }, g = (y) => {
      y.preventDefault(), c(), o("mousedown", y);
    };
    i({
      focus: c,
      blur: d,
      clickFocus: f,
      ref: r
    });
    let m = null;
    Pt(() => {
      m = qi(document, "mouseup", l);
    }), At(() => {
      m?.remove();
    });
    const b = R(() => {
      const {
        vertical: y,
        offset: S,
        reverse: C
      } = e;
      return y ? {
        [C ? "top" : "bottom"]: `${S}%`,
        [C ? "bottom" : "top"]: "auto",
        transform: C ? null : "translateY(+50%)"
      } : {
        [C ? "right" : "left"]: `${S}%`,
        [C ? "left" : "right"]: "auto",
        transform: `translateX(${C ? "+" : "-"}50%)`
      };
    });
    return () => {
      const {
        prefixCls: y,
        disabled: S,
        min: C,
        max: O,
        value: $,
        tabindex: P,
        ariaLabel: k,
        ariaLabelledBy: x,
        ariaValueTextFormatter: E,
        onMouseenter: z,
        onMouseleave: B
      } = e, D = Te(n.class, {
        [`${y}-handle-click-focused`]: a.value
      }), W = {
        "aria-valuemin": C,
        "aria-valuemax": O,
        "aria-valuenow": $,
        "aria-disabled": !!S
      }, H = [n.style, b.value];
      let F = P || 0;
      (S || P === null) && (F = null);
      let A;
      E && (A = E($));
      const U = I(I(I(I({}, n), {
        role: "slider",
        tabindex: F
      }), W), {
        class: D,
        onBlur: s,
        onKeydown: u,
        onMousedown: g,
        onMouseenter: z,
        onMouseleave: B,
        ref: r,
        style: H
      });
      return v("div", Z(Z({}, U), {}, {
        "aria-label": k,
        "aria-labelledby": x,
        "aria-valuetext": A
      }), null);
    };
  }
});
function ag(e, t) {
  try {
    return Object.keys(t).some((n) => e.target === t[n].ref);
  } catch {
    return !1;
  }
}
function h2(e, t) {
  let {
    min: n,
    max: o
  } = t;
  return e < n || e > o;
}
function Xx(e) {
  return e.touches.length > 1 || e.type.toLowerCase() === "touchend" && e.touches.length > 0;
}
function Qx(e, t) {
  let {
    marks: n,
    step: o,
    min: i,
    max: a
  } = t;
  const r = Object.keys(n).map(parseFloat);
  if (o !== null) {
    const s = Math.pow(10, v2(o)), u = Math.floor((a * s - i * s) / (o * s)), c = Math.min((e - i) / o, u), d = Math.round(c) * o + i;
    r.push(d);
  }
  const l = r.map((s) => Math.abs(e - s));
  return r[l.indexOf(Math.min(...l))];
}
function v2(e) {
  const t = e.toString();
  let n = 0;
  return t.indexOf(".") >= 0 && (n = t.length - t.indexOf(".") - 1), n;
}
function Zx(e, t) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (e ? t.clientY : t.pageX) / n;
}
function Jx(e, t) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (e ? t.touches[0].clientY : t.touches[0].pageX) / n;
}
function e1(e, t) {
  const n = t.getBoundingClientRect();
  return e ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
}
function Ym(e, t) {
  let {
    max: n,
    min: o
  } = t;
  return e <= o ? o : e >= n ? n : e;
}
function m2(e, t) {
  const {
    step: n
  } = t, o = isFinite(Qx(e, t)) ? Qx(e, t) : 0;
  return n === null ? o : parseFloat(o.toFixed(v2(n)));
}
function As(e) {
  e.stopPropagation(), e.preventDefault();
}
function YL(e, t, n) {
  const o = {
    increase: (r, l) => r + l,
    decrease: (r, l) => r - l
  }, i = o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)), 1), a = Object.keys(n.marks)[i];
  return n.step ? o[e](t, n.step) : Object.keys(n.marks).length && n.marks[a] ? n.marks[a] : t;
}
function b2(e, t, n) {
  const o = "increase", i = "decrease";
  let a = o;
  switch (e.keyCode) {
    case Xe.UP:
      a = t && n ? i : o;
      break;
    case Xe.RIGHT:
      a = !t && n ? i : o;
      break;
    case Xe.DOWN:
      a = t && n ? o : i;
      break;
    case Xe.LEFT:
      a = !t && n ? o : i;
      break;
    case Xe.END:
      return (r, l) => l.max;
    case Xe.HOME:
      return (r, l) => l.min;
    case Xe.PAGE_UP:
      return (r, l) => r + l.step * 2;
    case Xe.PAGE_DOWN:
      return (r, l) => r - l.step * 2;
    default:
      return;
  }
  return (r, l) => YL(a, r, l);
}
var UL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
function Ur() {
}
function y2(e) {
  const t = {
    id: String,
    min: Number,
    max: Number,
    step: Number,
    marks: ue.object,
    included: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    disabled: {
      type: Boolean,
      default: void 0
    },
    handle: Function,
    dots: {
      type: Boolean,
      default: void 0
    },
    vertical: {
      type: Boolean,
      default: void 0
    },
    reverse: {
      type: Boolean,
      default: void 0
    },
    minimumTrackStyle: ue.object,
    maximumTrackStyle: ue.object,
    handleStyle: ue.oneOfType([ue.object, ue.arrayOf(ue.object)]),
    trackStyle: ue.oneOfType([ue.object, ue.arrayOf(ue.object)]),
    railStyle: ue.object,
    dotStyle: ue.object,
    activeDotStyle: ue.object,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    draggableTrack: {
      type: Boolean,
      default: void 0
    }
  };
  return ye({
    compatConfig: {
      MODE: 3
    },
    name: "CreateSlider",
    mixins: [vf, e],
    inheritAttrs: !1,
    props: wn(t, {
      prefixCls: "rc-slider",
      min: 0,
      max: 100,
      step: 1,
      marks: {},
      included: !0,
      disabled: !1,
      dots: !1,
      vertical: !1,
      reverse: !1,
      trackStyle: [{}],
      handleStyle: [{}],
      railStyle: {},
      dotStyle: {},
      activeDotStyle: {}
    }),
    emits: ["change", "blur", "focus"],
    data() {
      const {
        step: n,
        max: o,
        min: i
      } = this, a = isFinite(o - i) ? (o - i) % n === 0 : !0;
      return Qn(n && Math.floor(n) === n ? a : !0, `Slider[max] - Slider[min] (${o - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
    },
    mounted() {
      this.$nextTick(() => {
        this.document = this.sliderRef && this.sliderRef.ownerDocument;
        const {
          autofocus: n,
          disabled: o
        } = this;
        n && !o && this.focus();
      });
    },
    beforeUnmount() {
      this.$nextTick(() => {
        this.removeDocumentEvents();
      });
    },
    methods: {
      defaultHandle(n) {
        var {
          index: o,
          directives: i,
          className: a,
          style: r
        } = n, l = UL(n, ["index", "directives", "className", "style"]);
        if (delete l.dragging, l.value === null)
          return null;
        const s = I(I({}, l), {
          class: a,
          style: r,
          key: o
        });
        return v(g2, s, null);
      },
      onDown(n, o) {
        let i = o;
        const {
          draggableTrack: a,
          vertical: r
        } = this.$props, {
          bounds: l
        } = this.$data, s = a && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = ag(n, this.handlesRefs);
        if (this.dragTrack = a && l.length >= 2 && !u && !s.map((c, d) => {
          const f = d ? !0 : c >= l[d];
          return d === s.length - 1 ? c <= l[d] : f;
        }).some((c) => !c), this.dragTrack)
          this.dragOffset = i, this.startBounds = [...l];
        else {
          if (!u)
            this.dragOffset = 0;
          else {
            const c = e1(r, n.target);
            this.dragOffset = i - c, i = c;
          }
          this.onStart(i);
        }
      },
      onMouseDown(n) {
        if (n.button !== 0)
          return;
        this.removeDocumentEvents();
        const o = this.$props.vertical, i = Zx(o, n);
        this.onDown(n, i), this.addDocumentMouseEvents();
      },
      onTouchStart(n) {
        if (Xx(n)) return;
        const o = this.vertical, i = Jx(o, n);
        this.onDown(n, i), this.addDocumentTouchEvents(), As(n);
      },
      onFocus(n) {
        const {
          vertical: o
        } = this;
        if (ag(n, this.handlesRefs) && !this.dragTrack) {
          const i = e1(o, n.target);
          this.dragOffset = 0, this.onStart(i), As(n), this.$emit("focus", n);
        }
      },
      onBlur(n) {
        this.dragTrack || this.onEnd(), this.$emit("blur", n);
      },
      onMouseUp() {
        this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
      },
      onMouseMove(n) {
        if (!this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = Zx(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onTouchMove(n) {
        if (Xx(n) || !this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = Jx(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onKeyDown(n) {
        this.sliderRef && ag(n, this.handlesRefs) && this.onKeyboard(n);
      },
      onClickMarkLabel(n, o) {
        n.stopPropagation(), this.onChange({
          sValue: o
        }), this.setState({
          sValue: o
        }, () => this.onEnd(!0));
      },
      getSliderStart() {
        const n = this.sliderRef, {
          vertical: o,
          reverse: i
        } = this, a = n.getBoundingClientRect();
        return o ? i ? a.bottom : a.top : window.scrollX + (i ? a.right : a.left);
      },
      getSliderLength() {
        const n = this.sliderRef;
        if (!n)
          return 0;
        const o = n.getBoundingClientRect();
        return this.vertical ? o.height : o.width;
      },
      addDocumentTouchEvents() {
        this.onTouchMoveListener = qi(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = qi(this.document, "touchend", this.onEnd);
      },
      addDocumentMouseEvents() {
        this.onMouseMoveListener = qi(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = qi(this.document, "mouseup", this.onEnd);
      },
      removeDocumentEvents() {
        this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
      },
      focus() {
        var n;
        this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
      },
      blur() {
        this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
          var o, i;
          (i = (o = this.handlesRefs[n]) === null || o === void 0 ? void 0 : o.blur) === null || i === void 0 || i.call(o);
        });
      },
      calcValue(n) {
        const {
          vertical: o,
          min: i,
          max: a
        } = this, r = Math.abs(Math.max(n, 0) / this.getSliderLength());
        return o ? (1 - r) * (a - i) + i : r * (a - i) + i;
      },
      calcValueByPos(n) {
        const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
        return this.trimAlignValue(this.calcValue(i));
      },
      calcOffset(n) {
        const {
          min: o,
          max: i
        } = this, a = (n - o) / (i - o);
        return Math.max(0, a * 100);
      },
      saveSlider(n) {
        this.sliderRef = n;
      },
      saveHandle(n, o) {
        this.handlesRefs[n] = o;
      }
    },
    render() {
      const {
        prefixCls: n,
        marks: o,
        dots: i,
        step: a,
        included: r,
        disabled: l,
        vertical: s,
        reverse: u,
        min: c,
        max: d,
        maximumTrackStyle: f,
        railStyle: g,
        dotStyle: m,
        activeDotStyle: b,
        id: y
      } = this, {
        class: S,
        style: C
      } = this.$attrs, {
        tracks: O,
        handles: $
      } = this.renderSlider(), P = Te(n, S, {
        [`${n}-with-marks`]: Object.keys(o).length,
        [`${n}-disabled`]: l,
        [`${n}-vertical`]: s,
        [`${n}-horizontal`]: !s
      }), k = {
        vertical: s,
        marks: o,
        included: r,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        reverse: u,
        class: `${n}-mark`,
        onClickLabel: l ? Ur : this.onClickMarkLabel
      }, x = {
        [bo ? "onTouchstartPassive" : "onTouchstart"]: l ? Ur : this.onTouchStart
      };
      return v("div", Z(Z({
        id: y,
        ref: this.saveSlider,
        tabindex: "-1",
        class: P
      }, x), {}, {
        onMousedown: l ? Ur : this.onMouseDown,
        onMouseup: l ? Ur : this.onMouseUp,
        onKeydown: l ? Ur : this.onKeyDown,
        onFocus: l ? Ur : this.onFocus,
        onBlur: l ? Ur : this.onBlur,
        style: C
      }), [v("div", {
        class: `${n}-rail`,
        style: I(I({}, f), g)
      }, null), O, v(f2, {
        prefixCls: n,
        vertical: s,
        reverse: u,
        marks: o,
        dots: i,
        step: a,
        included: r,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        dotStyle: m,
        activeDotStyle: b
      }, null), $, v(p2, k, {
        mark: this.$slots.mark
      }), iS(this)]);
    }
  });
}
const XL = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Slider",
  mixins: [vf],
  inheritAttrs: !1,
  props: {
    defaultValue: Number,
    value: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    autofocus: {
      type: Boolean,
      default: void 0
    },
    tabindex: ue.oneOfType([ue.number, ue.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    ariaLabelForHandle: String,
    ariaLabelledByForHandle: String,
    ariaValueTextFormatterForHandle: String,
    startPoint: Number
  },
  emits: ["beforeChange", "afterChange", "change"],
  data() {
    const e = this.defaultValue !== void 0 ? this.defaultValue : this.min, t = this.value !== void 0 ? this.value : e;
    return {
      sValue: this.trimAlignValue(t),
      dragging: !1
    };
  },
  watch: {
    value: {
      handler(e) {
        this.setChangeValue(e);
      },
      deep: !0
    },
    min() {
      const {
        sValue: e
      } = this;
      this.setChangeValue(e);
    },
    max() {
      const {
        sValue: e
      } = this;
      this.setChangeValue(e);
    }
  },
  methods: {
    setChangeValue(e) {
      const t = e !== void 0 ? e : this.sValue, n = this.trimAlignValue(t, this.$props);
      n !== this.sValue && (this.setState({
        sValue: n
      }), h2(t, this.$props) && this.$emit("change", n));
    },
    onChange(e) {
      const t = !Id(this, "value"), n = e.sValue > this.max ? I(I({}, e), {
        sValue: this.max
      }) : e;
      t && this.setState(n);
      const o = n.sValue;
      this.$emit("change", o);
    },
    onStart(e) {
      this.setState({
        dragging: !0
      });
      const {
        sValue: t
      } = this;
      this.$emit("beforeChange", t);
      const n = this.calcValueByPos(e);
      this.startValue = n, this.startPosition = e, n !== t && (this.prevMovedHandleIndex = 0, this.onChange({
        sValue: n
      }));
    },
    onEnd(e) {
      const {
        dragging: t
      } = this;
      this.removeDocumentEvents(), (t || e) && this.$emit("afterChange", this.sValue), this.setState({
        dragging: !1
      });
    },
    onMove(e, t) {
      As(e);
      const {
        sValue: n
      } = this, o = this.calcValueByPos(t);
      o !== n && this.onChange({
        sValue: o
      });
    },
    onKeyboard(e) {
      const {
        reverse: t,
        vertical: n
      } = this.$props, o = b2(e, n, t);
      if (o) {
        As(e);
        const {
          sValue: i
        } = this, a = o(i, this.$props), r = this.trimAlignValue(a);
        if (r === i) return;
        this.onChange({
          sValue: r
        }), this.$emit("afterChange", r), this.onEnd();
      }
    },
    getLowerBound() {
      const e = this.$props.startPoint || this.$props.min;
      return this.$data.sValue > e ? e : this.$data.sValue;
    },
    getUpperBound() {
      return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
    },
    trimAlignValue(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (e === null)
        return null;
      const n = I(I({}, this.$props), t), o = Ym(e, n);
      return m2(o, n);
    },
    getTrack(e) {
      let {
        prefixCls: t,
        reverse: n,
        vertical: o,
        included: i,
        minimumTrackStyle: a,
        mergedTrackStyle: r,
        length: l,
        offset: s
      } = e;
      return v(Km, {
        class: `${t}-track`,
        vertical: o,
        included: i,
        offset: s,
        reverse: n,
        length: l,
        style: I(I({}, a), r)
      }, null);
    },
    renderSlider() {
      const {
        prefixCls: e,
        vertical: t,
        included: n,
        disabled: o,
        minimumTrackStyle: i,
        trackStyle: a,
        handleStyle: r,
        tabindex: l,
        ariaLabelForHandle: s,
        ariaLabelledByForHandle: u,
        ariaValueTextFormatterForHandle: c,
        min: d,
        max: f,
        startPoint: g,
        reverse: m,
        handle: b,
        defaultHandle: y
      } = this, S = b || y, {
        sValue: C,
        dragging: O
      } = this, $ = this.calcOffset(C), P = S({
        class: `${e}-handle`,
        prefixCls: e,
        vertical: t,
        offset: $,
        value: C,
        dragging: O,
        disabled: o,
        min: d,
        max: f,
        reverse: m,
        index: 0,
        tabindex: l,
        ariaLabel: s,
        ariaLabelledBy: u,
        ariaValueTextFormatter: c,
        style: r[0] || r,
        ref: (E) => this.saveHandle(0, E),
        onFocus: this.onFocus,
        onBlur: this.onBlur
      }), k = g !== void 0 ? this.calcOffset(g) : 0, x = a[0] || a;
      return {
        tracks: this.getTrack({
          prefixCls: e,
          reverse: m,
          vertical: t,
          included: n,
          offset: k,
          minimumTrackStyle: i,
          mergedTrackStyle: x,
          length: $ - k
        }),
        handles: P
      };
    }
  }
}), QL = y2(XL), uu = (e) => {
  let {
    value: t,
    handle: n,
    bounds: o,
    props: i
  } = e;
  const {
    allowCross: a,
    pushable: r
  } = i, l = Number(r), s = Ym(t, i);
  let u = s;
  return !a && n != null && o !== void 0 && (n > 0 && s <= o[n - 1] + l && (u = o[n - 1] + l), n < o.length - 1 && s >= o[n + 1] - l && (u = o[n + 1] - l)), m2(u, i);
}, ZL = {
  defaultValue: ue.arrayOf(ue.number),
  value: ue.arrayOf(ue.number),
  count: Number,
  pushable: j_(ue.oneOfType([ue.looseBool, ue.number])),
  allowCross: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  reverse: {
    type: Boolean,
    default: void 0
  },
  tabindex: ue.arrayOf(ue.number),
  prefixCls: String,
  min: Number,
  max: Number,
  autofocus: {
    type: Boolean,
    default: void 0
  },
  ariaLabelGroupForHandles: Array,
  ariaLabelledByGroupForHandles: Array,
  ariaValueTextFormatterGroupForHandles: Array,
  draggableTrack: {
    type: Boolean,
    default: void 0
  }
}, JL = ye({
  compatConfig: {
    MODE: 3
  },
  name: "Range",
  mixins: [vf],
  inheritAttrs: !1,
  props: wn(ZL, {
    count: 1,
    allowCross: !0,
    pushable: !1,
    tabindex: [],
    draggableTrack: !1,
    ariaLabelGroupForHandles: [],
    ariaLabelledByGroupForHandles: [],
    ariaValueTextFormatterGroupForHandles: []
  }),
  emits: ["beforeChange", "afterChange", "change"],
  displayName: "Range",
  data() {
    const {
      count: e,
      min: t,
      max: n
    } = this, o = Array(...Array(e + 1)).map(() => t), i = Id(this, "defaultValue") ? this.defaultValue : o;
    let {
      value: a
    } = this;
    a === void 0 && (a = i);
    const r = a.map((s, u) => uu({
      value: s,
      handle: u,
      props: this.$props
    }));
    return {
      sHandle: null,
      recent: r[0] === n ? 0 : r.length - 1,
      bounds: r
    };
  },
  watch: {
    value: {
      handler(e) {
        const {
          bounds: t
        } = this;
        this.setChangeValue(e || t);
      },
      deep: !0
    },
    min() {
      const {
        value: e
      } = this;
      this.setChangeValue(e || this.bounds);
    },
    max() {
      const {
        value: e
      } = this;
      this.setChangeValue(e || this.bounds);
    }
  },
  methods: {
    setChangeValue(e) {
      const {
        bounds: t
      } = this;
      let n = e.map((o, i) => uu({
        value: o,
        handle: i,
        bounds: t,
        props: this.$props
      }));
      if (t.length === n.length) {
        if (n.every((o, i) => o === t[i]))
          return null;
      } else
        n = e.map((o, i) => uu({
          value: o,
          handle: i,
          props: this.$props
        }));
      if (this.setState({
        bounds: n
      }), e.some((o) => h2(o, this.$props))) {
        const o = e.map((i) => Ym(i, this.$props));
        this.$emit("change", o);
      }
    },
    onChange(e) {
      if (!Id(this, "value"))
        this.setState(e);
      else {
        const i = {};
        ["sHandle", "recent"].forEach((a) => {
          e[a] !== void 0 && (i[a] = e[a]);
        }), Object.keys(i).length && this.setState(i);
      }
      const o = I(I({}, this.$data), e).bounds;
      this.$emit("change", o);
    },
    positionGetValue(e) {
      const t = this.getValue(), n = this.calcValueByPos(e), o = this.getClosestBound(n), i = this.getBoundNeedMoving(n, o), a = t[i];
      if (n === a) return null;
      const r = [...t];
      return r[i] = n, r;
    },
    onStart(e) {
      const {
        bounds: t
      } = this;
      this.$emit("beforeChange", t);
      const n = this.calcValueByPos(e);
      this.startValue = n, this.startPosition = e;
      const o = this.getClosestBound(n);
      this.prevMovedHandleIndex = this.getBoundNeedMoving(n, o), this.setState({
        sHandle: this.prevMovedHandleIndex,
        recent: this.prevMovedHandleIndex
      });
      const i = t[this.prevMovedHandleIndex];
      if (n === i) return;
      const a = [...t];
      a[this.prevMovedHandleIndex] = n, this.onChange({
        bounds: a
      });
    },
    onEnd(e) {
      const {
        sHandle: t
      } = this;
      this.removeDocumentEvents(), t || (this.dragTrack = !1), (t !== null || e) && this.$emit("afterChange", this.bounds), this.setState({
        sHandle: null
      });
    },
    onMove(e, t, n, o) {
      As(e);
      const {
        $data: i,
        $props: a
      } = this, r = a.max || 100, l = a.min || 0;
      if (n) {
        let f = a.vertical ? -t : t;
        f = a.reverse ? -f : f;
        const g = r - Math.max(...o), m = l - Math.min(...o), b = Math.min(Math.max(f / (this.getSliderLength() / 100), m), g), y = o.map((S) => Math.floor(Math.max(Math.min(S + b, r), l)));
        i.bounds.map((S, C) => S === y[C]).some((S) => !S) && this.onChange({
          bounds: y
        });
        return;
      }
      const {
        bounds: s,
        sHandle: u
      } = this, c = this.calcValueByPos(t), d = s[u];
      c !== d && this.moveTo(c);
    },
    onKeyboard(e) {
      const {
        reverse: t,
        vertical: n
      } = this.$props, o = b2(e, n, t);
      if (o) {
        As(e);
        const {
          bounds: i,
          sHandle: a
        } = this, r = i[a === null ? this.recent : a], l = o(r, this.$props), s = uu({
          value: l,
          handle: a,
          bounds: i,
          props: this.$props
        });
        if (s === r) return;
        this.moveTo(s, !0);
      }
    },
    getClosestBound(e) {
      const {
        bounds: t
      } = this;
      let n = 0;
      for (let o = 1; o < t.length - 1; o += 1)
        e >= t[o] && (n = o);
      return Math.abs(t[n + 1] - e) < Math.abs(t[n] - e) && (n += 1), n;
    },
    getBoundNeedMoving(e, t) {
      const {
        bounds: n,
        recent: o
      } = this;
      let i = t;
      const a = n[t + 1] === n[t];
      return a && n[o] === n[t] && (i = o), a && e !== n[t + 1] && (i = e < n[t + 1] ? t : t + 1), i;
    },
    getLowerBound() {
      return this.bounds[0];
    },
    getUpperBound() {
      const {
        bounds: e
      } = this;
      return e[e.length - 1];
    },
    /**
     * Returns an array of possible slider points, taking into account both
     * `marks` and `step`. The result is cached.
     */
    getPoints() {
      const {
        marks: e,
        step: t,
        min: n,
        max: o
      } = this, i = this.internalPointsCache;
      if (!i || i.marks !== e || i.step !== t) {
        const a = I({}, e);
        if (t !== null)
          for (let l = n; l <= o; l += t)
            a[l] = l;
        const r = Object.keys(a).map(parseFloat);
        r.sort((l, s) => l - s), this.internalPointsCache = {
          marks: e,
          step: t,
          points: r
        };
      }
      return this.internalPointsCache.points;
    },
    moveTo(e, t) {
      const n = [...this.bounds], {
        sHandle: o,
        recent: i
      } = this, a = o === null ? i : o;
      n[a] = e;
      let r = a;
      this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, r) : this.$props.allowCross && (n.sort((l, s) => l - s), r = n.indexOf(e)), this.onChange({
        recent: r,
        sHandle: r,
        bounds: n
      }), t && (this.$emit("afterChange", n), this.setState({}, () => {
        this.handlesRefs[r].focus();
      }), this.onEnd());
    },
    pushSurroundingHandles(e, t) {
      const n = e[t], {
        pushable: o
      } = this, i = Number(o);
      let a = 0;
      if (e[t + 1] - n < i && (a = 1), n - e[t - 1] < i && (a = -1), a === 0)
        return;
      const r = t + a, l = a * (e[r] - n);
      this.pushHandle(e, r, a, i - l) || (e[t] = e[r] - a * i);
    },
    pushHandle(e, t, n, o) {
      const i = e[t];
      let a = e[t];
      for (; n * (a - i) < o; ) {
        if (!this.pushHandleOnePoint(e, t, n))
          return e[t] = i, !1;
        a = e[t];
      }
      return !0;
    },
    pushHandleOnePoint(e, t, n) {
      const o = this.getPoints(), a = o.indexOf(e[t]) + n;
      if (a >= o.length || a < 0)
        return !1;
      const r = t + n, l = o[a], {
        pushable: s
      } = this, u = Number(s), c = n * (e[r] - l);
      return this.pushHandle(e, r, n, u - c) ? (e[t] = l, !0) : !1;
    },
    trimAlignValue(e) {
      const {
        sHandle: t,
        bounds: n
      } = this;
      return uu({
        value: e,
        handle: t,
        bounds: n,
        props: this.$props
      });
    },
    ensureValueNotConflict(e, t, n) {
      let {
        allowCross: o,
        pushable: i
      } = n;
      const a = this.$data || {}, {
        bounds: r
      } = a;
      if (e = e === void 0 ? a.sHandle : e, i = Number(i), !o && e != null && r !== void 0) {
        if (e > 0 && t <= r[e - 1] + i)
          return r[e - 1] + i;
        if (e < r.length - 1 && t >= r[e + 1] - i)
          return r[e + 1] - i;
      }
      return t;
    },
    getTrack(e) {
      let {
        bounds: t,
        prefixCls: n,
        reverse: o,
        vertical: i,
        included: a,
        offsets: r,
        trackStyle: l
      } = e;
      return t.slice(0, -1).map((s, u) => {
        const c = u + 1, d = Te({
          [`${n}-track`]: !0,
          [`${n}-track-${c}`]: !0
        });
        return v(Km, {
          class: d,
          vertical: i,
          reverse: o,
          included: a,
          offset: r[c - 1],
          length: r[c] - r[c - 1],
          style: l[u],
          key: c
        }, null);
      });
    },
    renderSlider() {
      const {
        sHandle: e,
        bounds: t,
        prefixCls: n,
        vertical: o,
        included: i,
        disabled: a,
        min: r,
        max: l,
        reverse: s,
        handle: u,
        defaultHandle: c,
        trackStyle: d,
        handleStyle: f,
        tabindex: g,
        ariaLabelGroupForHandles: m,
        ariaLabelledByGroupForHandles: b,
        ariaValueTextFormatterGroupForHandles: y
      } = this, S = u || c, C = t.map((P) => this.calcOffset(P)), O = `${n}-handle`, $ = t.map((P, k) => {
        let x = g[k] || 0;
        (a || g[k] === null) && (x = null);
        const E = e === k;
        return S({
          class: Te({
            [O]: !0,
            [`${O}-${k + 1}`]: !0,
            [`${O}-dragging`]: E
          }),
          prefixCls: n,
          vertical: o,
          dragging: E,
          offset: C[k],
          value: P,
          index: k,
          tabindex: x,
          min: r,
          max: l,
          reverse: s,
          disabled: a,
          style: f[k],
          ref: (z) => this.saveHandle(k, z),
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          ariaLabel: m[k],
          ariaLabelledBy: b[k],
          ariaValueTextFormatter: y[k]
        });
      });
      return {
        tracks: this.getTrack({
          bounds: t,
          prefixCls: n,
          reverse: s,
          vertical: o,
          included: i,
          offsets: C,
          trackStyle: d
        }),
        handles: $
      };
    }
  }
}), eH = y2(JL), tH = ye({
  compatConfig: {
    MODE: 3
  },
  name: "SliderTooltip",
  inheritAttrs: !1,
  props: KC(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(null), a = le(null);
    function r() {
      Mt.cancel(a.value), a.value = null;
    }
    function l() {
      a.value = Mt(() => {
        var u;
        (u = i.value) === null || u === void 0 || u.forcePopupAlign(), a.value = null;
      });
    }
    const s = () => {
      r(), e.open && l();
    };
    return Ie([() => e.open, () => e.title], () => {
      s();
    }, {
      flush: "post",
      immediate: !0
    }), rO(() => {
      s();
    }), At(() => {
      r();
    }), () => v(xo, Z(Z({
      ref: i
    }, e), n), o);
  }
}), nH = (e) => {
  const {
    componentCls: t,
    controlSize: n,
    dotSize: o,
    marginFull: i,
    marginPart: a,
    colorFillContentHover: r
  } = e;
  return {
    [t]: I(I({}, Zt(e)), {
      position: "relative",
      height: n,
      margin: `${a}px ${i}px`,
      padding: 0,
      cursor: "pointer",
      touchAction: "none",
      "&-vertical": {
        margin: `${i}px ${a}px`
      },
      [`${t}-rail`]: {
        position: "absolute",
        backgroundColor: e.colorFillTertiary,
        borderRadius: e.borderRadiusXS,
        transition: `background-color ${e.motionDurationMid}`
      },
      [`${t}-track`]: {
        position: "absolute",
        backgroundColor: e.colorPrimaryBorder,
        borderRadius: e.borderRadiusXS,
        transition: `background-color ${e.motionDurationMid}`
      },
      "&:hover": {
        [`${t}-rail`]: {
          backgroundColor: e.colorFillSecondary
        },
        [`${t}-track`]: {
          backgroundColor: e.colorPrimaryBorderHover
        },
        [`${t}-dot`]: {
          borderColor: r
        },
        [`${t}-handle::after`]: {
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`
        },
        [`${t}-dot-active`]: {
          borderColor: e.colorPrimary
        }
      },
      [`${t}-handle`]: {
        position: "absolute",
        width: e.handleSize,
        height: e.handleSize,
        outline: "none",
        [`${t}-dragging`]: {
          zIndex: 1
        },
        // 扩大选区
        "&::before": {
          content: '""',
          position: "absolute",
          insetInlineStart: -e.handleLineWidth,
          insetBlockStart: -e.handleLineWidth,
          width: e.handleSize + e.handleLineWidth * 2,
          height: e.handleSize + e.handleLineWidth * 2,
          backgroundColor: "transparent"
        },
        "&::after": {
          content: '""',
          position: "absolute",
          insetBlockStart: 0,
          insetInlineStart: 0,
          width: e.handleSize,
          height: e.handleSize,
          backgroundColor: e.colorBgElevated,
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,
          borderRadius: "50%",
          cursor: "pointer",
          transition: `
            inset-inline-start ${e.motionDurationMid},
            inset-block-start ${e.motionDurationMid},
            width ${e.motionDurationMid},
            height ${e.motionDurationMid},
            box-shadow ${e.motionDurationMid}
          `
        },
        "&:hover, &:active, &:focus": {
          "&::before": {
            insetInlineStart: -((e.handleSizeHover - e.handleSize) / 2 + e.handleLineWidthHover),
            insetBlockStart: -((e.handleSizeHover - e.handleSize) / 2 + e.handleLineWidthHover),
            width: e.handleSizeHover + e.handleLineWidthHover * 2,
            height: e.handleSizeHover + e.handleLineWidthHover * 2
          },
          "&::after": {
            boxShadow: `0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,
            width: e.handleSizeHover,
            height: e.handleSizeHover,
            insetInlineStart: (e.handleSize - e.handleSizeHover) / 2,
            insetBlockStart: (e.handleSize - e.handleSizeHover) / 2
          }
        }
      },
      [`${t}-mark`]: {
        position: "absolute",
        fontSize: e.fontSize
      },
      [`${t}-mark-text`]: {
        position: "absolute",
        display: "inline-block",
        color: e.colorTextDescription,
        textAlign: "center",
        wordBreak: "keep-all",
        cursor: "pointer",
        userSelect: "none",
        "&-active": {
          color: e.colorText
        }
      },
      [`${t}-step`]: {
        position: "absolute",
        background: "transparent",
        pointerEvents: "none"
      },
      [`${t}-dot`]: {
        position: "absolute",
        width: o,
        height: o,
        backgroundColor: e.colorBgElevated,
        border: `${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,
        borderRadius: "50%",
        cursor: "pointer",
        transition: `border-color ${e.motionDurationSlow}`,
        "&-active": {
          borderColor: e.colorPrimaryBorder
        }
      },
      [`&${t}-disabled`]: {
        cursor: "not-allowed",
        [`${t}-rail`]: {
          backgroundColor: `${e.colorFillSecondary} !important`
        },
        [`${t}-track`]: {
          backgroundColor: `${e.colorTextDisabled} !important`
        },
        [`
          ${t}-dot
        `]: {
          backgroundColor: e.colorBgElevated,
          borderColor: e.colorTextDisabled,
          boxShadow: "none",
          cursor: "not-allowed"
        },
        [`${t}-handle::after`]: {
          backgroundColor: e.colorBgElevated,
          cursor: "not-allowed",
          width: e.handleSize,
          height: e.handleSize,
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${new In(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,
          insetInlineStart: 0,
          insetBlockStart: 0
        },
        [`
          ${t}-mark-text,
          ${t}-dot
        `]: {
          cursor: "not-allowed !important"
        }
      }
    })
  };
}, x2 = (e, t) => {
  const {
    componentCls: n,
    railSize: o,
    handleSize: i,
    dotSize: a
  } = e, r = t ? "paddingBlock" : "paddingInline", l = t ? "width" : "height", s = t ? "height" : "width", u = t ? "insetBlockStart" : "insetInlineStart", c = t ? "top" : "insetInlineStart";
  return {
    [r]: o,
    [s]: o * 3,
    [`${n}-rail`]: {
      [l]: "100%",
      [s]: o
    },
    [`${n}-track`]: {
      [s]: o
    },
    [`${n}-handle`]: {
      [u]: (o * 3 - i) / 2
    },
    [`${n}-mark`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: i,
      [l]: "100%"
    },
    [`${n}-step`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: o,
      [l]: "100%",
      [s]: o
    },
    [`${n}-dot`]: {
      position: "absolute",
      [u]: (o - a) / 2
    }
  };
}, oH = (e) => {
  const {
    componentCls: t,
    marginPartWithMark: n
  } = e;
  return {
    [`${t}-horizontal`]: I(I({}, x2(e, !0)), {
      [`&${t}-with-marks`]: {
        marginBottom: n
      }
    })
  };
}, iH = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-vertical`]: I(I({}, x2(e, !1)), {
      height: "100%"
    })
  };
}, aH = nn("Slider", (e) => {
  const t = _t(e, {
    marginPart: (e.controlHeight - e.controlSize) / 2,
    marginFull: e.controlSize / 2,
    marginPartWithMark: e.controlHeightLG - e.controlSize
  });
  return [nH(t), oH(t), iH(t)];
}, (e) => {
  const n = e.controlHeightLG / 4, o = e.controlHeightSM / 2, i = e.lineWidth + 1, a = e.lineWidth + 3;
  return {
    controlSize: n,
    railSize: 4,
    handleSize: n,
    handleSizeHover: o,
    dotSize: 8,
    handleLineWidth: i,
    handleLineWidthHover: a
  };
});
var t1 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
    t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (n[o[i]] = e[o[i]]);
  return n;
};
const rH = (e) => typeof e == "number" ? e.toString() : "", lH = () => ({
  id: String,
  prefixCls: String,
  tooltipPrefixCls: String,
  range: tn([Boolean, Object]),
  reverse: st(),
  min: Number,
  max: Number,
  step: tn([Object, Number]),
  marks: Ct(),
  dots: st(),
  value: tn([Array, Number]),
  defaultValue: tn([Array, Number]),
  included: st(),
  disabled: st(),
  vertical: st(),
  tipFormatter: tn([Function, Object], () => rH),
  tooltipOpen: st(),
  /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  tooltipVisible: st(),
  tooltipPlacement: dn(),
  getTooltipPopupContainer: Qe(),
  autofocus: st(),
  handleStyle: tn([Array, Object]),
  trackStyle: tn([Array, Object]),
  onChange: Qe(),
  onAfterChange: Qe(),
  onFocus: Qe(),
  onBlur: Qe(),
  "onUpdate:value": Qe()
}), sH = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASlider",
  inheritAttrs: !1,
  props: lH(),
  // emits: ['update:value', 'change', 'afterChange', 'blur'],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i,
      expose: a
    } = t;
    process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((x) => {
      let [E, z] = x;
      Ln(e.tooltipVisible === void 0, "Slider", `\`${E}\` is deprecated, please use \`${z}\` instead.`);
    });
    const {
      prefixCls: r,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u,
      configProvider: c
    } = yt("slider", e), [d, f] = aH(r), g = fi(), m = le(), b = le({}), y = (x, E) => {
      b.value[x] = E;
    }, S = R(() => e.tooltipPlacement ? e.tooltipPlacement : e.vertical ? s.value === "rtl" ? "left" : "right" : "top"), C = () => {
      var x;
      (x = m.value) === null || x === void 0 || x.focus();
    }, O = () => {
      var x;
      (x = m.value) === null || x === void 0 || x.blur();
    }, $ = (x) => {
      i("update:value", x), i("change", x), g.onFieldChange();
    }, P = (x) => {
      i("blur", x);
    };
    a({
      focus: C,
      blur: O
    });
    const k = (x) => {
      var {
        tooltipPrefixCls: E
      } = x, z = x.info, {
        value: B,
        dragging: D,
        index: W
      } = z, H = t1(z, ["value", "dragging", "index"]);
      const {
        tipFormatter: F,
        tooltipOpen: A = e.tooltipVisible,
        getTooltipPopupContainer: U
      } = e, j = F ? b.value[W] || D : !1, ae = A || A === void 0 && j;
      return v(tH, {
        prefixCls: E,
        title: F ? F(B) : "",
        open: ae,
        placement: S.value,
        transitionName: `${l.value}-zoom-down`,
        key: W,
        overlayClassName: `${r.value}-tooltip`,
        getPopupContainer: U || u?.value
      }, {
        default: () => [v(g2, Z(Z({}, H), {}, {
          value: B,
          onMouseenter: () => y(W, !0),
          onMouseleave: () => y(W, !1)
        }), null)]
      });
    };
    return () => {
      const {
        tooltipPrefixCls: x,
        range: E,
        id: z = g.id.value
      } = e, B = t1(e, ["tooltipPrefixCls", "range", "id"]), D = c.getPrefixCls("tooltip", x), W = Te(n.class, {
        [`${r.value}-rtl`]: s.value === "rtl"
      }, f.value);
      s.value === "rtl" && !B.vertical && (B.reverse = !B.reverse);
      let H;
      return typeof E == "object" && (H = E.draggableTrack), d(E ? v(eH, Z(Z(Z({}, n), B), {}, {
        step: B.step,
        draggableTrack: H,
        class: W,
        ref: m,
        handle: (F) => k({
          tooltipPrefixCls: D,
          prefixCls: r.value,
          info: F
        }),
        prefixCls: r.value,
        onChange: $,
        onBlur: P
      }), {
        mark: o.mark
      }) : v(QL, Z(Z(Z({}, n), B), {}, {
        id: z,
        step: B.step,
        class: W,
        ref: m,
        handle: (F) => k({
          tooltipPrefixCls: D,
          prefixCls: r.value,
          info: F
        }),
        prefixCls: r.value,
        onChange: $,
        onBlur: P
      }), {
        mark: o.mark
      }));
    };
  }
}), Wo = Ji(sH), uH = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-inner`;
  return {
    [t]: {
      [`&${t}-small`]: {
        minWidth: e.switchMinWidthSM,
        height: e.switchHeightSM,
        lineHeight: `${e.switchHeightSM}px`,
        [`${t}-inner`]: {
          paddingInlineStart: e.switchInnerMarginMaxSM,
          paddingInlineEnd: e.switchInnerMarginMinSM,
          [`${n}-checked`]: {
            marginInlineStart: `calc(-100% + ${e.switchPinSizeSM + e.switchPadding * 2}px - ${e.switchInnerMarginMaxSM * 2}px)`,
            marginInlineEnd: `calc(100% - ${e.switchPinSizeSM + e.switchPadding * 2}px + ${e.switchInnerMarginMaxSM * 2}px)`
          },
          [`${n}-unchecked`]: {
            marginTop: -e.switchHeightSM,
            marginInlineStart: 0,
            marginInlineEnd: 0
          }
        },
        [`${t}-handle`]: {
          width: e.switchPinSizeSM,
          height: e.switchPinSizeSM
        },
        [`${t}-loading-icon`]: {
          top: (e.switchPinSizeSM - e.switchLoadingIconSize) / 2,
          fontSize: e.switchLoadingIconSize
        },
        [`&${t}-checked`]: {
          [`${t}-inner`]: {
            paddingInlineStart: e.switchInnerMarginMinSM,
            paddingInlineEnd: e.switchInnerMarginMaxSM,
            [`${n}-checked`]: {
              marginInlineStart: 0,
              marginInlineEnd: 0
            },
            [`${n}-unchecked`]: {
              marginInlineStart: `calc(100% - ${e.switchPinSizeSM + e.switchPadding * 2}px + ${e.switchInnerMarginMaxSM * 2}px)`,
              marginInlineEnd: `calc(-100% + ${e.switchPinSizeSM + e.switchPadding * 2}px - ${e.switchInnerMarginMaxSM * 2}px)`
            }
          },
          [`${t}-handle`]: {
            insetInlineStart: `calc(100% - ${e.switchPinSizeSM + e.switchPadding}px)`
          }
        },
        [`&:not(${t}-disabled):active`]: {
          [`&:not(${t}-checked) ${n}`]: {
            [`${n}-unchecked`]: {
              marginInlineStart: e.marginXXS / 2,
              marginInlineEnd: -e.marginXXS / 2
            }
          },
          [`&${t}-checked ${n}`]: {
            [`${n}-checked`]: {
              marginInlineStart: -e.marginXXS / 2,
              marginInlineEnd: e.marginXXS / 2
            }
          }
        }
      }
    }
  };
}, cH = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`${t}-loading-icon${e.iconCls}`]: {
        position: "relative",
        top: (e.switchPinSize - e.fontSize) / 2,
        color: e.switchLoadingIconColor,
        verticalAlign: "top"
      },
      [`&${t}-checked ${t}-loading-icon`]: {
        color: e.switchColor
      }
    }
  };
}, dH = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-handle`;
  return {
    [t]: {
      [n]: {
        position: "absolute",
        top: e.switchPadding,
        insetInlineStart: e.switchPadding,
        width: e.switchPinSize,
        height: e.switchPinSize,
        transition: `all ${e.switchDuration} ease-in-out`,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          backgroundColor: e.colorWhite,
          borderRadius: e.switchPinSize / 2,
          boxShadow: e.switchHandleShadow,
          transition: `all ${e.switchDuration} ease-in-out`,
          content: '""'
        }
      },
      [`&${t}-checked ${n}`]: {
        insetInlineStart: `calc(100% - ${e.switchPinSize + e.switchPadding}px)`
      },
      [`&:not(${t}-disabled):active`]: {
        [`${n}::before`]: {
          insetInlineEnd: e.switchHandleActiveInset,
          insetInlineStart: 0
        },
        [`&${t}-checked ${n}::before`]: {
          insetInlineEnd: 0,
          insetInlineStart: e.switchHandleActiveInset
        }
      }
    }
  };
}, fH = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-inner`;
  return {
    [t]: {
      [n]: {
        display: "block",
        overflow: "hidden",
        borderRadius: 100,
        height: "100%",
        paddingInlineStart: e.switchInnerMarginMax,
        paddingInlineEnd: e.switchInnerMarginMin,
        transition: `padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,
        [`${n}-checked, ${n}-unchecked`]: {
          display: "block",
          color: e.colorTextLightSolid,
          fontSize: e.fontSizeSM,
          transition: `margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,
          pointerEvents: "none"
        },
        [`${n}-checked`]: {
          marginInlineStart: `calc(-100% + ${e.switchPinSize + e.switchPadding * 2}px - ${e.switchInnerMarginMax * 2}px)`,
          marginInlineEnd: `calc(100% - ${e.switchPinSize + e.switchPadding * 2}px + ${e.switchInnerMarginMax * 2}px)`
        },
        [`${n}-unchecked`]: {
          marginTop: -e.switchHeight,
          marginInlineStart: 0,
          marginInlineEnd: 0
        }
      },
      [`&${t}-checked ${n}`]: {
        paddingInlineStart: e.switchInnerMarginMin,
        paddingInlineEnd: e.switchInnerMarginMax,
        [`${n}-checked`]: {
          marginInlineStart: 0,
          marginInlineEnd: 0
        },
        [`${n}-unchecked`]: {
          marginInlineStart: `calc(100% - ${e.switchPinSize + e.switchPadding * 2}px + ${e.switchInnerMarginMax * 2}px)`,
          marginInlineEnd: `calc(-100% + ${e.switchPinSize + e.switchPadding * 2}px - ${e.switchInnerMarginMax * 2}px)`
        }
      },
      [`&:not(${t}-disabled):active`]: {
        [`&:not(${t}-checked) ${n}`]: {
          [`${n}-unchecked`]: {
            marginInlineStart: e.switchPadding * 2,
            marginInlineEnd: -e.switchPadding * 2
          }
        },
        [`&${t}-checked ${n}`]: {
          [`${n}-checked`]: {
            marginInlineStart: -e.switchPadding * 2,
            marginInlineEnd: e.switchPadding * 2
          }
        }
      }
    }
  };
}, pH = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: I(I(I(I({}, Zt(e)), {
      position: "relative",
      display: "inline-block",
      boxSizing: "border-box",
      minWidth: e.switchMinWidth,
      height: e.switchHeight,
      lineHeight: `${e.switchHeight}px`,
      verticalAlign: "middle",
      background: e.colorTextQuaternary,
      border: "0",
      borderRadius: 100,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid}`,
      userSelect: "none",
      [`&:hover:not(${t}-disabled)`]: {
        background: e.colorTextTertiary
      }
    }), vl(e)), {
      [`&${t}-checked`]: {
        background: e.switchColor,
        [`&:hover:not(${t}-disabled)`]: {
          background: e.colorPrimaryHover
        }
      },
      [`&${t}-loading, &${t}-disabled`]: {
        cursor: "not-allowed",
        opacity: e.switchDisabledOpacity,
        "*": {
          boxShadow: "none",
          cursor: "not-allowed"
        }
      },
      // rtl style
      [`&${t}-rtl`]: {
        direction: "rtl"
      }
    })
  };
}, gH = nn("Switch", (e) => {
  const t = e.fontSize * e.lineHeight, n = e.controlHeight / 2, o = 2, i = t - o * 2, a = n - o * 2, r = _t(e, {
    switchMinWidth: i * 2 + o * 4,
    switchHeight: t,
    switchDuration: e.motionDurationMid,
    switchColor: e.colorPrimary,
    switchDisabledOpacity: e.opacityLoading,
    switchInnerMarginMin: i / 2,
    switchInnerMarginMax: i + o + o * 2,
    switchPadding: o,
    switchPinSize: i,
    switchBg: e.colorBgContainer,
    switchMinWidthSM: a * 2 + o * 2,
    switchHeightSM: n,
    switchInnerMarginMinSM: a / 2,
    switchInnerMarginMaxSM: a + o + o * 2,
    switchPinSizeSM: a,
    switchHandleShadow: `0 2px 4px 0 ${new In("#00230b").setAlpha(0.2).toRgbString()}`,
    switchLoadingIconSize: e.fontSizeIcon * 0.75,
    switchLoadingIconColor: `rgba(0, 0, 0, ${e.opacityLoading})`,
    switchHandleActiveInset: "-30%"
  });
  return [
    pH(r),
    // inner style
    fH(r),
    // handle style
    dH(r),
    // loading style
    cH(r),
    // small style
    uH(r)
  ];
}), hH = ri("small", "default"), vH = () => ({
  id: String,
  prefixCls: String,
  size: ue.oneOf(hH),
  disabled: {
    type: Boolean,
    default: void 0
  },
  checkedChildren: ue.any,
  unCheckedChildren: ue.any,
  tabindex: ue.oneOfType([ue.string, ue.number]),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  checked: ue.oneOfType([ue.string, ue.number, ue.looseBool]),
  checkedValue: ue.oneOfType([ue.string, ue.number, ue.looseBool]).def(!0),
  unCheckedValue: ue.oneOfType([ue.string, ue.number, ue.looseBool]).def(!1),
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onMouseup: {
    type: Function
  },
  "onUpdate:checked": {
    type: Function
  },
  onBlur: Function,
  onFocus: Function
}), mH = ye({
  compatConfig: {
    MODE: 3
  },
  name: "ASwitch",
  __ANT_SWITCH: !0,
  inheritAttrs: !1,
  props: vH(),
  slots: Object,
  // emits: ['update:checked', 'mouseup', 'change', 'click', 'keydown', 'blur'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i,
      emit: a
    } = t;
    const r = fi(), l = Zi(), s = R(() => {
      var z;
      return (z = e.disabled) !== null && z !== void 0 ? z : l.value;
    });
    Yd(() => {
      Qn(!("defaultChecked" in n), "Switch", "'defaultChecked' is deprecated, please use 'v-model:checked'"), Qn(!("value" in n), "Switch", "`value` is not validate prop, do you mean `checked`?");
    });
    const u = le(e.checked !== void 0 ? e.checked : n.defaultChecked), c = R(() => u.value === e.checkedValue);
    Ie(() => e.checked, () => {
      u.value = e.checked;
    });
    const {
      prefixCls: d,
      direction: f,
      size: g
    } = yt("switch", e), [m, b] = gH(d), y = le(), S = () => {
      var z;
      (z = y.value) === null || z === void 0 || z.focus();
    };
    i({
      focus: S,
      blur: () => {
        var z;
        (z = y.value) === null || z === void 0 || z.blur();
      }
    }), Pt(() => {
      Nt(() => {
        e.autofocus && !s.value && y.value.focus();
      });
    });
    const O = (z, B) => {
      s.value || (a("update:checked", z), a("change", z, B), r.onFieldChange());
    }, $ = (z) => {
      a("blur", z);
    }, P = (z) => {
      S();
      const B = c.value ? e.unCheckedValue : e.checkedValue;
      O(B, z), a("click", B, z);
    }, k = (z) => {
      z.keyCode === Xe.LEFT ? O(e.unCheckedValue, z) : z.keyCode === Xe.RIGHT && O(e.checkedValue, z), a("keydown", z);
    }, x = (z) => {
      var B;
      (B = y.value) === null || B === void 0 || B.blur(), a("mouseup", z);
    }, E = R(() => ({
      [`${d.value}-small`]: g.value === "small",
      [`${d.value}-loading`]: e.loading,
      [`${d.value}-checked`]: c.value,
      [`${d.value}-disabled`]: s.value,
      [d.value]: !0,
      [`${d.value}-rtl`]: f.value === "rtl",
      [b.value]: !0
    }));
    return () => {
      var z;
      return m(v(Zv, null, {
        default: () => [v("button", Z(Z(Z({}, Tn(e, ["prefixCls", "checkedChildren", "unCheckedChildren", "checked", "autofocus", "checkedValue", "unCheckedValue", "id", "onChange", "onUpdate:checked"])), n), {}, {
          id: (z = e.id) !== null && z !== void 0 ? z : r.id.value,
          onKeydown: k,
          onClick: P,
          onBlur: $,
          onMouseup: x,
          type: "button",
          role: "switch",
          "aria-checked": u.value,
          disabled: s.value || e.loading,
          class: [n.class, E.value],
          ref: y
        }), [v("div", {
          class: `${d.value}-handle`
        }, [e.loading ? v(ba, {
          class: `${d.value}-loading-icon`
        }, null) : null]), v("span", {
          class: `${d.value}-inner`
        }, [v("span", {
          class: `${d.value}-inner-checked`
        }, [Ii(o, e, "checkedChildren")]), v("span", {
          class: `${d.value}-inner-unchecked`
        }, [Ii(o, e, "unCheckedChildren")])])])]
      }));
    };
  }
}), za = Ji(mH), w2 = Symbol("appConfigContext"), bH = (e) => kt(w2, e), yH = () => Tt(w2, {}), S2 = Symbol("appContext"), xH = (e) => kt(S2, e), wH = Dn({
  message: {},
  notification: {},
  modal: {}
}), SH = () => Tt(S2, wH), CH = (e) => {
  const {
    componentCls: t,
    colorText: n,
    fontSize: o,
    lineHeight: i,
    fontFamily: a
  } = e;
  return {
    [t]: {
      color: n,
      fontSize: o,
      lineHeight: i,
      fontFamily: a
    }
  };
}, $H = nn("App", (e) => [CH(e)]), PH = () => ({
  rootClassName: String,
  message: Ct(),
  notification: Ct()
}), OH = () => SH(), ps = ye({
  name: "AApp",
  props: wn(PH(), {}),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = yt("app", e), [i, a] = $H(o), r = R(() => Te(a.value, o.value, e.rootClassName)), l = yH(), s = R(() => ({
      message: I(I({}, l.message), e.message),
      notification: I(I({}, l.notification), e.notification)
    }));
    bH(s.value);
    const [u, c] = $P(s.value.message), [d, f] = NP(s.value.notification), [g, m] = c2(), b = R(() => ({
      message: u,
      notification: d,
      modal: g
    }));
    return xH(b.value), () => {
      var y;
      return i(v("div", {
        class: r.value
      }, [m(), c(), f(), (y = n.default) === null || y === void 0 ? void 0 : y.call(n)]));
    };
  }
});
ps.useApp = OH;
ps.install = function(e) {
  e.component(ps.name, ps);
};
const pr = (e, t) => new In(e).setAlpha(t).toRgbString(), Gl = (e, t) => new In(e).lighten(t).toHexString(), IH = (e) => {
  const t = Wa(e, {
    theme: "dark"
  });
  return {
    1: t[0],
    2: t[1],
    3: t[2],
    4: t[3],
    5: t[6],
    6: t[5],
    7: t[4],
    8: t[6],
    9: t[5],
    10: t[4]
    // 8: colors[9],
    // 9: colors[8],
    // 10: colors[7],
  };
}, MH = (e, t) => {
  const n = e || "#000", o = t || "#fff";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: pr(o, 0.85),
    colorTextSecondary: pr(o, 0.65),
    colorTextTertiary: pr(o, 0.45),
    colorTextQuaternary: pr(o, 0.25),
    colorFill: pr(o, 0.18),
    colorFillSecondary: pr(o, 0.12),
    colorFillTertiary: pr(o, 0.08),
    colorFillQuaternary: pr(o, 0.04),
    colorBgElevated: Gl(n, 12),
    colorBgContainer: Gl(n, 8),
    colorBgLayout: Gl(n, 0),
    colorBgSpotlight: Gl(n, 26),
    colorBorder: Gl(n, 26),
    colorBorderSecondary: Gl(n, 19)
  };
}, TH = (e, t) => {
  const n = Object.keys(gv).map((i) => {
    const a = Wa(e[i], {
      theme: "dark"
    });
    return new Array(10).fill(1).reduce((r, l, s) => (r[`${i}-${s + 1}`] = a[s], r), {});
  }).reduce((i, a) => (i = I(I({}, i), a), i), {}), o = t ?? hv(e);
  return I(I(I({}, o), n), BS(e, {
    generateColorPalettes: IH,
    generateNeutralColorPalettes: MH
  }));
}, n1 = {
  /** Default seedToken */
  defaultSeed: mv.token,
  defaultAlgorithm: hv,
  darkAlgorithm: TH
}, kH = typeof window < "u";
var o1;
kH && ((o1 = window?.navigator) != null && o1.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function ei(e) {
  return e == null;
}
function C2() {
}
const EH = Object.freeze({
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
});
Object.freeze(new Set(Object.keys(EH)));
function _H() {
  const e = /* @__PURE__ */ new Map();
  return {
    on(t, n) {
      const o = e.get(t);
      o?.add(n) || e.set(t, /* @__PURE__ */ new Set([n]));
    },
    off(t, n) {
      const o = e.get(t);
      o && o.delete(n);
    },
    clear(t) {
      const n = e.get(t);
      n && n.clear();
    },
    clearAll() {
      e.clear();
    },
    emit(t, ...n) {
      const o = e.get(t);
      o && o.forEach((i) => {
        i(...n);
      });
    }
  };
}
function i1(e, t = 16) {
  if (typeof e != "function")
    return C2;
  const n = (...a) => {
    e(...a);
  };
  if (t <= 0)
    return $2(n);
  let o = 0, i;
  return function(...a) {
    const r = Date.now(), l = r - o;
    clearTimeout(i), l >= t ? (o = r, n(...a)) : i = setTimeout(
      () => {
        o = Date.now(), n(...a);
      },
      Math.max(0, t - l)
    );
  };
}
function AH(e, t = 100) {
  if (typeof e != "function")
    return C2;
  const n = (...i) => {
    e(...i);
  };
  if (t <= 0)
    return $2(n);
  let o;
  return function(...i) {
    clearTimeout(o), o = setTimeout(() => {
      n(...i);
    }, t);
  };
}
function $2(e) {
  if (typeof e != "function")
    return e;
  let t = !1, n, o;
  return function(...i) {
    return n = i, t || (t = !0, o = Promise.resolve().then(() => (t = !1, o = void 0, e(...n)))), o;
  };
}
const Eu = /* @__PURE__ */ new Set(), P2 = /* @__PURE__ */ new WeakMap();
function DH() {
  Eu.forEach((e) => {
    e(...P2.get(e));
  }), Eu.clear();
}
function Eo(e, ...t) {
  if (typeof e != "function")
    return e;
  P2.set(e, t), !Eu.has(e) && (Eu.add(e), Eu.size === 1 && Promise.resolve().then(DH));
}
const O2 = Symbol("LAYOUT_KEY"), I2 = Symbol("EMITTER_KEY");
function zH(e) {
  let t = 0, n;
  for (let o = 0, i = e.length; o < i; o++)
    n = e[o].y + e[o].h, n > t && (t = n);
  return t;
}
function Fh(e) {
  const t = Array(e.length);
  for (let n = 0, o = e.length; n < o; n++)
    t[n] = RH(e[n]);
  return t;
}
function RH(e) {
  return { ...e };
}
function M2(e, t) {
  return !(e === t || e.x + e.w <= t.x || e.x >= t.x + t.w || e.y + e.h <= t.y || e.y >= t.y + t.h);
}
function es(e, t, n) {
  const o = k2(e), i = E2(e), a = Array(e.length);
  for (let r = 0, l = i.length; r < l; r++) {
    let s = i[r];
    s.static || (s = NH(o, s, t, n), o.push(s)), a[e.findIndex((u) => u.i === s.i)] = s, s.moved = !1;
  }
  return a;
}
function NH(e, t, n, o) {
  if (n)
    for (; t.y > 0 && !_u(e, t); )
      t.y--;
  else if (o) {
    const a = o[t.i].y;
    for (; t.y > a && !_u(e, t); )
      t.y--;
  }
  let i;
  for (; i = _u(e, t); )
    t.y = i.y + i.h;
  return t;
}
function BH(e, t) {
  const n = k2(e);
  for (let o = 0, i = e.length; o < i; o++) {
    const a = e[o];
    if (a.x + a.w > t.cols && (a.x = t.cols - a.w), a.x < 0 && (a.x = 0, a.w = t.cols), !a.static) n.push(a);
    else
      for (; _u(n, a); )
        a.y++;
  }
  return e;
}
function a1(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (e[n].i === t) return e[n];
}
function _u(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (M2(e[n], t)) return e[n];
}
function T2(e, t) {
  return e.filter((n) => M2(n, t));
}
function k2(e) {
  return e.filter((t) => t.static);
}
function Lh(e, t, n, o, i = !1, a = !1) {
  if (t.static) return e;
  const r = t.x, l = t.y, s = o && t.y > o;
  typeof n == "number" && (t.x = n), typeof o == "number" && (t.y = o), t.moved = !0;
  let u = E2(e);
  s && (u = u.reverse());
  const c = T2(u, t);
  if (a && c.length)
    return t.x = r, t.y = l, t.moved = !1, e;
  for (let d = 0, f = c.length; d < f; d++) {
    const g = c[d];
    g.moved || t.y > g.y && t.y - g.y > g.h / 4 || (g.static ? e = r1(e, g, t, i) : e = r1(e, t, g, i));
  }
  return e;
}
function r1(e, t, n, o) {
  if (o) {
    const i = {
      x: n.x,
      y: n.y,
      w: n.w,
      h: n.h
    };
    if (i.y = Math.max(t.y - n.h, 0), !_u(e, i))
      return Lh(e, n, void 0, i.y, !1);
  }
  return Lh(e, n, void 0, n.y + 1, !1);
}
function FH(e, t, n, o) {
  const i = "translate3d(" + t + "px," + e + "px, 0)";
  return {
    transform: i,
    WebkitTransform: i,
    MozTransform: i,
    msTransform: i,
    OTransform: i,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function LH(e, t, n, o) {
  const i = "translate3d(" + t * -1 + "px," + e + "px, 0)";
  return {
    transform: i,
    WebkitTransform: i,
    MozTransform: i,
    msTransform: i,
    OTransform: i,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function HH(e, t, n, o) {
  return {
    top: e + "px",
    left: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function VH(e, t, n, o) {
  return {
    top: e + "px",
    right: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function E2(e) {
  return Array.from(e).sort(function(t, n) {
    return t.y === n.y && t.x === n.x ? 0 : t.y > n.y || t.y === n.y && t.x > n.x ? 1 : -1;
  });
}
function jH(e, t) {
  t = t || "Layout";
  const n = ["x", "y", "w", "h"], o = [];
  if (!Array.isArray(e)) throw new Error(t + " must be an array!");
  for (let i = 0, a = e.length; i < a; i++) {
    const r = e[i];
    for (let l = 0; l < n.length; l++)
      if (typeof r[n[l]] != "number")
        throw new Error(
          "VueGridLayout: " + t + "[" + i + "]." + n[l] + " must be a number!"
        );
    if (r.i === void 0 || r.i === null)
      throw new Error("VueGridLayout: " + t + "[" + i + "].i cannot be null!");
    if (typeof r.i != "number" && typeof r.i != "string")
      throw new Error("VueGridLayout: " + t + "[" + i + "].i must be a string or number!");
    if (o.indexOf(r.i) >= 0)
      throw new Error("VueGridLayout: " + t + "[" + i + "].i must be unique!");
    if (o.push(r.i), r.static !== void 0 && typeof r.static != "boolean")
      throw new Error("VueGridLayout: " + t + "[" + i + "].static must be a boolean!");
  }
}
function WH(e, t = "vgl") {
  const n = () => `${t}-${e}`;
  return {
    b: n,
    be: (o) => `${n()}__${o}`,
    bm: (o) => `${n()}--${o}`,
    bem: (o, i) => `${n()}__${o}--${i}`
  };
}
function l1(e) {
  return qH(e);
}
function qH(e) {
  var t;
  const n = ((t = e.target) == null ? void 0 : t.offsetParent) || document.body, o = e.offsetParent === document.body ? { left: 0, top: 0 } : n.getBoundingClientRect(), i = e.clientX + n.scrollLeft - o.left, a = e.clientY + n.scrollTop - o.top;
  return { x: i, y: a };
}
function s1(e, t, n, o) {
  return GH(e) ? {
    deltaX: n - e,
    deltaY: o - t,
    lastX: e,
    lastY: t,
    x: n,
    y: o
  } : {
    deltaX: 0,
    deltaY: 0,
    lastX: n,
    lastY: o,
    x: n,
    y: o
  };
}
function GH(e) {
  return typeof e == "number" && !Number.isNaN(e);
}
function KH(e, t) {
  const n = A2(e);
  let o = n[0];
  for (let i = 1, a = n.length; i < a; i++) {
    const r = n[i];
    t > e[r] && (o = r);
  }
  return o;
}
function _2(e, t) {
  if (!t[e])
    throw new Error(
      "ResponsiveGridLayout: `cols` entry for breakpoint " + e + " is missing!"
    );
  return t[e];
}
function YH(e, t, n, o, i, a, r) {
  if (t[o]) return Fh(t[o]);
  let l = e;
  const s = A2(n), u = s.slice(s.indexOf(o));
  for (let c = 0, d = u.length; c < d; c++) {
    const f = u[c];
    if (t[f]) {
      l = t[f];
      break;
    }
  }
  return l = Fh(l || []), es(BH(l, { cols: a }), r);
}
function A2(e) {
  return Object.keys(e).sort((t, n) => e[t] - e[n]);
}
let UH = "auto";
function XH() {
  return typeof document < "u";
}
function u1() {
  return XH() ? typeof document.dir < "u" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir") : UH;
}
var yu = { exports: {} }, QH = yu.exports, c1;
function ZH() {
  return c1 || (c1 = 1, (function(e, t) {
    (function(n, o) {
      e.exports = o();
    })(QH, (function() {
      function n(p, h) {
        var w = Object.keys(p);
        if (Object.getOwnPropertySymbols) {
          var T = Object.getOwnPropertySymbols(p);
          h && (T = T.filter((function(_) {
            return Object.getOwnPropertyDescriptor(p, _).enumerable;
          }))), w.push.apply(w, T);
        }
        return w;
      }
      function o(p) {
        for (var h = 1; h < arguments.length; h++) {
          var w = arguments[h] != null ? arguments[h] : {};
          h % 2 ? n(Object(w), !0).forEach((function(T) {
            s(p, T, w[T]);
          })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(p, Object.getOwnPropertyDescriptors(w)) : n(Object(w)).forEach((function(T) {
            Object.defineProperty(p, T, Object.getOwnPropertyDescriptor(w, T));
          }));
        }
        return p;
      }
      function i(p) {
        return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(h) {
          return typeof h;
        } : function(h) {
          return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h;
        }, i(p);
      }
      function a(p, h) {
        if (!(p instanceof h)) throw new TypeError("Cannot call a class as a function");
      }
      function r(p, h) {
        for (var w = 0; w < h.length; w++) {
          var T = h[w];
          T.enumerable = T.enumerable || !1, T.configurable = !0, "value" in T && (T.writable = !0), Object.defineProperty(p, b(T.key), T);
        }
      }
      function l(p, h, w) {
        return h && r(p.prototype, h), Object.defineProperty(p, "prototype", { writable: !1 }), p;
      }
      function s(p, h, w) {
        return (h = b(h)) in p ? Object.defineProperty(p, h, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : p[h] = w, p;
      }
      function u(p, h) {
        if (typeof h != "function" && h !== null) throw new TypeError("Super expression must either be null or a function");
        p.prototype = Object.create(h && h.prototype, { constructor: { value: p, writable: !0, configurable: !0 } }), Object.defineProperty(p, "prototype", { writable: !1 }), h && d(p, h);
      }
      function c(p) {
        return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(h) {
          return h.__proto__ || Object.getPrototypeOf(h);
        }, c(p);
      }
      function d(p, h) {
        return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(w, T) {
          return w.__proto__ = T, w;
        }, d(p, h);
      }
      function f(p) {
        if (p === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return p;
      }
      function g(p) {
        var h = (function() {
          if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
          if (typeof Proxy == "function") return !0;
          try {
            return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
            }))), !0;
          } catch {
            return !1;
          }
        })();
        return function() {
          var w, T = c(p);
          if (h) {
            var _ = c(this).constructor;
            w = Reflect.construct(T, arguments, _);
          } else w = T.apply(this, arguments);
          return (function(L, q) {
            if (q && (typeof q == "object" || typeof q == "function")) return q;
            if (q !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
            return f(L);
          })(this, w);
        };
      }
      function m() {
        return m = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(p, h, w) {
          var T = (function(L, q) {
            for (; !Object.prototype.hasOwnProperty.call(L, q) && (L = c(L)) !== null; ) ;
            return L;
          })(p, h);
          if (T) {
            var _ = Object.getOwnPropertyDescriptor(T, h);
            return _.get ? _.get.call(arguments.length < 3 ? p : w) : _.value;
          }
        }, m.apply(this, arguments);
      }
      function b(p) {
        var h = (function(w, T) {
          if (typeof w != "object" || w === null) return w;
          var _ = w[Symbol.toPrimitive];
          if (_ !== void 0) {
            var L = _.call(w, T);
            if (typeof L != "object") return L;
            throw new TypeError("@@toPrimitive must return a primitive value.");
          }
          return String(w);
        })(p, "string");
        return typeof h == "symbol" ? h : h + "";
      }
      var y = function(p) {
        return !(!p || !p.Window) && p instanceof p.Window;
      }, S = void 0, C = void 0;
      function O(p) {
        S = p;
        var h = p.document.createTextNode("");
        h.ownerDocument !== p.document && typeof p.wrap == "function" && p.wrap(h) === h && (p = p.wrap(p)), C = p;
      }
      function $(p) {
        return y(p) ? p : (p.ownerDocument || p).defaultView || C.window;
      }
      typeof window < "u" && window && O(window);
      var P = function(p) {
        return !!p && i(p) === "object";
      }, k = function(p) {
        return typeof p == "function";
      }, x = { window: function(p) {
        return p === C || y(p);
      }, docFrag: function(p) {
        return P(p) && p.nodeType === 11;
      }, object: P, func: k, number: function(p) {
        return typeof p == "number";
      }, bool: function(p) {
        return typeof p == "boolean";
      }, string: function(p) {
        return typeof p == "string";
      }, element: function(p) {
        if (!p || i(p) !== "object") return !1;
        var h = $(p) || C;
        return /object|function/.test(typeof Element > "u" ? "undefined" : i(Element)) ? p instanceof Element || p instanceof h.Element : p.nodeType === 1 && typeof p.nodeName == "string";
      }, plainObject: function(p) {
        return P(p) && !!p.constructor && /function Object\b/.test(p.constructor.toString());
      }, array: function(p) {
        return P(p) && p.length !== void 0 && k(p.splice);
      } };
      function E(p) {
        var h = p.interaction;
        if (h.prepared.name === "drag") {
          var w = h.prepared.axis;
          w === "x" ? (h.coords.cur.page.y = h.coords.start.page.y, h.coords.cur.client.y = h.coords.start.client.y, h.coords.velocity.client.y = 0, h.coords.velocity.page.y = 0) : w === "y" && (h.coords.cur.page.x = h.coords.start.page.x, h.coords.cur.client.x = h.coords.start.client.x, h.coords.velocity.client.x = 0, h.coords.velocity.page.x = 0);
        }
      }
      function z(p) {
        var h = p.iEvent, w = p.interaction;
        if (w.prepared.name === "drag") {
          var T = w.prepared.axis;
          if (T === "x" || T === "y") {
            var _ = T === "x" ? "y" : "x";
            h.page[_] = w.coords.start.page[_], h.client[_] = w.coords.start.client[_], h.delta[_] = 0;
          }
        }
      }
      var B = { id: "actions/drag", install: function(p) {
        var h = p.actions, w = p.Interactable, T = p.defaults;
        w.prototype.draggable = B.draggable, h.map.drag = B, h.methodDict.drag = "draggable", T.actions.drag = B.defaults;
      }, listeners: { "interactions:before-action-move": E, "interactions:action-resume": E, "interactions:action-move": z, "auto-start:check": function(p) {
        var h = p.interaction, w = p.interactable, T = p.buttons, _ = w.options.drag;
        if (_ && _.enabled && (!h.pointerIsDown || !/mouse|pointer/.test(h.pointerType) || (T & w.options.drag.mouseButtons) != 0)) return p.action = { name: "drag", axis: _.lockAxis === "start" ? _.startAxis : _.lockAxis }, !1;
      } }, draggable: function(p) {
        return x.object(p) ? (this.options.drag.enabled = p.enabled !== !1, this.setPerAction("drag", p), this.setOnEvents("drag", p), /^(xy|x|y|start)$/.test(p.lockAxis) && (this.options.drag.lockAxis = p.lockAxis), /^(xy|x|y)$/.test(p.startAxis) && (this.options.drag.startAxis = p.startAxis), this) : x.bool(p) ? (this.options.drag.enabled = p, this) : this.options.drag;
      }, beforeMove: E, move: z, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
        return "move";
      }, filterEventType: function(p) {
        return p.search("drag") === 0;
      } }, D = B, W = { init: function(p) {
        var h = p;
        W.document = h.document, W.DocumentFragment = h.DocumentFragment || H, W.SVGElement = h.SVGElement || H, W.SVGSVGElement = h.SVGSVGElement || H, W.SVGElementInstance = h.SVGElementInstance || H, W.Element = h.Element || H, W.HTMLElement = h.HTMLElement || W.Element, W.Event = h.Event, W.Touch = h.Touch || H, W.PointerEvent = h.PointerEvent || h.MSPointerEvent;
      }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
      function H() {
      }
      var F = W, A = { init: function(p) {
        var h = F.Element, w = p.navigator || {};
        A.supportsTouch = "ontouchstart" in p || x.func(p.DocumentTouch) && F.document instanceof p.DocumentTouch, A.supportsPointerEvent = w.pointerEnabled !== !1 && !!F.PointerEvent, A.isIOS = /iP(hone|od|ad)/.test(w.platform), A.isIOS7 = /iP(hone|od|ad)/.test(w.platform) && /OS 7[^\d]/.test(w.appVersion), A.isIe9 = /MSIE 9/.test(w.userAgent), A.isOperaMobile = w.appName === "Opera" && A.supportsTouch && /Presto/.test(w.userAgent), A.prefixedMatchesSelector = "matches" in h.prototype ? "matches" : "webkitMatchesSelector" in h.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in h.prototype ? "mozMatchesSelector" : "oMatchesSelector" in h.prototype ? "oMatchesSelector" : "msMatchesSelector", A.pEventTypes = A.supportsPointerEvent ? F.PointerEvent === p.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, A.wheelEvent = F.document && "onmousewheel" in F.document ? "mousewheel" : "wheel";
      }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, U = A;
      function j(p, h) {
        if (p.contains) return p.contains(h);
        for (; h; ) {
          if (h === p) return !0;
          h = h.parentNode;
        }
        return !1;
      }
      function ae(p, h) {
        for (; x.element(p); ) {
          if (Y(p, h)) return p;
          p = G(p);
        }
        return null;
      }
      function G(p) {
        var h = p.parentNode;
        if (x.docFrag(h)) {
          for (; (h = h.host) && x.docFrag(h); ) ;
          return h;
        }
        return h;
      }
      function Y(p, h) {
        return C !== S && (h = h.replace(/\/deep\//g, " ")), p[U.prefixedMatchesSelector](h);
      }
      var K = function(p) {
        return p.parentNode || p.host;
      };
      function J(p, h) {
        for (var w, T = [], _ = p; (w = K(_)) && _ !== h && w !== _.ownerDocument; ) T.unshift(_), _ = w;
        return T;
      }
      function be(p, h, w) {
        for (; x.element(p); ) {
          if (Y(p, h)) return !0;
          if ((p = G(p)) === w) return Y(p, h);
        }
        return !1;
      }
      function xe(p) {
        return p.correspondingUseElement || p;
      }
      function he(p) {
        var h = p instanceof F.SVGElement ? p.getBoundingClientRect() : p.getClientRects()[0];
        return h && { left: h.left, right: h.right, top: h.top, bottom: h.bottom, width: h.width || h.right - h.left, height: h.height || h.bottom - h.top };
      }
      function de(p) {
        var h, w = he(p);
        if (!U.isIOS7 && w) {
          var T = { x: (h = (h = $(p)) || C).scrollX || h.document.documentElement.scrollLeft, y: h.scrollY || h.document.documentElement.scrollTop };
          w.left += T.x, w.right += T.x, w.top += T.y, w.bottom += T.y;
        }
        return w;
      }
      function ne(p) {
        for (var h = []; p; ) h.push(p), p = G(p);
        return h;
      }
      function we(p) {
        return !!x.string(p) && (F.document.querySelector(p), !0);
      }
      function re(p, h) {
        for (var w in h) p[w] = h[w];
        return p;
      }
      function se(p, h, w) {
        return p === "parent" ? G(w) : p === "self" ? h.getRect(w) : ae(w, p);
      }
      function ve(p, h, w, T) {
        var _ = p;
        return x.string(_) ? _ = se(_, h, w) : x.func(_) && (_ = _.apply(void 0, T)), x.element(_) && (_ = de(_)), _;
      }
      function Me(p) {
        return p && { x: "x" in p ? p.x : p.left, y: "y" in p ? p.y : p.top };
      }
      function ke(p) {
        return !p || "x" in p && "y" in p || ((p = re({}, p)).x = p.left || 0, p.y = p.top || 0, p.width = p.width || (p.right || 0) - p.x, p.height = p.height || (p.bottom || 0) - p.y), p;
      }
      function Fe(p, h, w) {
        p.left && (h.left += w.x), p.right && (h.right += w.x), p.top && (h.top += w.y), p.bottom && (h.bottom += w.y), h.width = h.right - h.left, h.height = h.bottom - h.top;
      }
      function Re(p, h, w) {
        var T = w && p.options[w];
        return Me(ve(T && T.origin || p.options.origin, p, h, [p && h])) || { x: 0, y: 0 };
      }
      function We(p, h) {
        var w = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(oe) {
          return !0;
        }, T = arguments.length > 3 ? arguments[3] : void 0;
        if (T = T || {}, x.string(p) && p.search(" ") !== -1 && (p = et(p)), x.array(p)) return p.forEach((function(oe) {
          return We(oe, h, w, T);
        })), T;
        if (x.object(p) && (h = p, p = ""), x.func(h) && w(p)) T[p] = T[p] || [], T[p].push(h);
        else if (x.array(h)) for (var _ = 0, L = h; _ < L.length; _++) {
          var q = L[_];
          We(p, q, w, T);
        }
        else if (x.object(h)) for (var X in h)
          We(et(X).map((function(oe) {
            return "".concat(p).concat(oe);
          })), h[X], w, T);
        return T;
      }
      function et(p) {
        return p.trim().split(/ +/);
      }
      var Le = function(p, h) {
        return Math.sqrt(p * p + h * h);
      }, Ne = ["webkit", "moz"];
      function Ge(p, h) {
        p.__set || (p.__set = {});
        var w = function(_) {
          if (Ne.some((function(L) {
            return _.indexOf(L) === 0;
          }))) return 1;
          typeof p[_] != "function" && _ !== "__set" && Object.defineProperty(p, _, { get: function() {
            return _ in p.__set ? p.__set[_] : p.__set[_] = h[_];
          }, set: function(L) {
            p.__set[_] = L;
          }, configurable: !0 });
        };
        for (var T in h) w(T);
        return p;
      }
      function it(p, h) {
        p.page = p.page || {}, p.page.x = h.page.x, p.page.y = h.page.y, p.client = p.client || {}, p.client.x = h.client.x, p.client.y = h.client.y, p.timeStamp = h.timeStamp;
      }
      function Ke(p) {
        p.page.x = 0, p.page.y = 0, p.client.x = 0, p.client.y = 0;
      }
      function Oe(p) {
        return p instanceof F.Event || p instanceof F.Touch;
      }
      function Ve(p, h, w) {
        return p = p || "page", (w = w || {}).x = h[p + "X"], w.y = h[p + "Y"], w;
      }
      function De(p, h) {
        return h = h || { x: 0, y: 0 }, U.isOperaMobile && Oe(p) ? (Ve("screen", p, h), h.x += window.scrollX, h.y += window.scrollY) : Ve("page", p, h), h;
      }
      function Je(p) {
        return x.number(p.pointerId) ? p.pointerId : p.identifier;
      }
      function wt(p, h, w) {
        var T = h.length > 1 ? qe(h) : h[0];
        De(T, p.page), (function(_, L) {
          L = L || {}, U.isOperaMobile && Oe(_) ? Ve("screen", _, L) : Ve("client", _, L);
        })(T, p.client), p.timeStamp = w;
      }
      function lt(p) {
        var h = [];
        return x.array(p) ? (h[0] = p[0], h[1] = p[1]) : p.type === "touchend" ? p.touches.length === 1 ? (h[0] = p.touches[0], h[1] = p.changedTouches[0]) : p.touches.length === 0 && (h[0] = p.changedTouches[0], h[1] = p.changedTouches[1]) : (h[0] = p.touches[0], h[1] = p.touches[1]), h;
      }
      function qe(p) {
        for (var h = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, w = 0; w < p.length; w++) {
          var T = p[w];
          for (var _ in h) h[_] += T[_];
        }
        for (var L in h) h[L] /= p.length;
        return h;
      }
      function at(p) {
        if (!p.length) return null;
        var h = lt(p), w = Math.min(h[0].pageX, h[1].pageX), T = Math.min(h[0].pageY, h[1].pageY), _ = Math.max(h[0].pageX, h[1].pageX), L = Math.max(h[0].pageY, h[1].pageY);
        return { x: w, y: T, left: w, top: T, right: _, bottom: L, width: _ - w, height: L - T };
      }
      function dt(p, h) {
        var w = h + "X", T = h + "Y", _ = lt(p), L = _[0][w] - _[1][w], q = _[0][T] - _[1][T];
        return Le(L, q);
      }
      function vt(p, h) {
        var w = h + "X", T = h + "Y", _ = lt(p), L = _[1][w] - _[0][w], q = _[1][T] - _[0][T];
        return 180 * Math.atan2(q, L) / Math.PI;
      }
      function Rt(p) {
        return x.string(p.pointerType) ? p.pointerType : x.number(p.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][p.pointerType] : /touch/.test(p.type || "") || p instanceof F.Touch ? "touch" : "mouse";
      }
      function Xt(p) {
        var h = x.func(p.composedPath) ? p.composedPath() : p.path;
        return [xe(h ? h[0] : p.target), xe(p.currentTarget)];
      }
      var vn = (function() {
        function p(h) {
          a(this, p), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = h;
        }
        return l(p, [{ key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), p;
      })();
      Object.defineProperty(vn.prototype, "interaction", { get: function() {
        return this._interaction._proxy;
      }, set: function() {
      } });
      var Dt = function(p, h) {
        for (var w = 0; w < h.length; w++) {
          var T = h[w];
          p.push(T);
        }
        return p;
      }, zn = function(p) {
        return Dt([], p);
      }, on = function(p, h) {
        for (var w = 0; w < p.length; w++) if (h(p[w], w, p)) return w;
        return -1;
      }, Qt = function(p, h) {
        return p[on(p, h)];
      }, mn = (function(p) {
        u(w, p);
        var h = g(w);
        function w(T, _, L) {
          var q;
          a(this, w), (q = h.call(this, _._interaction)).dropzone = void 0, q.dragEvent = void 0, q.relatedTarget = void 0, q.draggable = void 0, q.propagationStopped = !1, q.immediatePropagationStopped = !1;
          var X = L === "dragleave" ? T.prev : T.cur, oe = X.element, me = X.dropzone;
          return q.type = L, q.target = oe, q.currentTarget = oe, q.dropzone = me, q.dragEvent = _, q.relatedTarget = _.target, q.draggable = _.interactable, q.timeStamp = _.timeStamp, q;
        }
        return l(w, [{ key: "reject", value: function() {
          var T = this, _ = this._interaction.dropState;
          if (this.type === "dropactivate" || this.dropzone && _.cur.dropzone === this.dropzone && _.cur.element === this.target) if (_.prev.dropzone = this.dropzone, _.prev.element = this.target, _.rejected = !0, _.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
            var L = _.activeDrops, q = on(L, (function(oe) {
              var me = oe.dropzone, ie = oe.element;
              return me === T.dropzone && ie === T.target;
            }));
            _.activeDrops.splice(q, 1);
            var X = new w(_, this.dragEvent, "dropdeactivate");
            X.dropzone = this.dropzone, X.target = this.target, this.dropzone.fire(X);
          } else this.dropzone.fire(new w(_, this.dragEvent, "dragleave"));
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), w;
      })(vn);
      function Kt(p, h) {
        for (var w = 0, T = p.slice(); w < T.length; w++) {
          var _ = T[w], L = _.dropzone, q = _.element;
          h.dropzone = L, h.target = q, L.fire(h), h.propagationStopped = h.immediatePropagationStopped = !1;
        }
      }
      function Mn(p, h) {
        for (var w = (function(L, q) {
          for (var X = [], oe = 0, me = L.interactables.list; oe < me.length; oe++) {
            var ie = me[oe];
            if (ie.options.drop.enabled) {
              var Se = ie.options.drop.accept;
              if (!(x.element(Se) && Se !== q || x.string(Se) && !Y(q, Se) || x.func(Se) && !Se({ dropzone: ie, draggableElement: q }))) for (var $e = 0, _e = ie.getAllElements(); $e < _e.length; $e++) {
                var Ae = _e[$e];
                Ae !== q && X.push({ dropzone: ie, element: Ae, rect: ie.getRect(Ae) });
              }
            }
          }
          return X;
        })(p, h), T = 0; T < w.length; T++) {
          var _ = w[T];
          _.rect = _.dropzone.getRect(_.element);
        }
        return w;
      }
      function an(p, h, w) {
        for (var T = p.dropState, _ = p.interactable, L = p.element, q = [], X = 0, oe = T.activeDrops; X < oe.length; X++) {
          var me = oe[X], ie = me.dropzone, Se = me.element, $e = me.rect, _e = ie.dropCheck(h, w, _, L, Se, $e);
          q.push(_e ? Se : null);
        }
        var Ae = (function(Be) {
          for (var Ye, Ue, rt, mt = [], Ot = 0; Ot < Be.length; Ot++) {
            var pt = Be[Ot], St = Be[Ye];
            if (pt && Ot !== Ye) if (St) {
              var un = K(pt), Yt = K(St);
              if (un !== pt.ownerDocument) if (Yt !== pt.ownerDocument) if (un !== Yt) {
                mt = mt.length ? mt : J(St);
                var hn = void 0;
                if (St instanceof F.HTMLElement && pt instanceof F.SVGElement && !(pt instanceof F.SVGSVGElement)) {
                  if (pt === Yt) continue;
                  hn = pt.ownerSVGElement;
                } else hn = pt;
                for (var Cn = J(hn, St.ownerDocument), Wn = 0; Cn[Wn] && Cn[Wn] === mt[Wn]; ) Wn++;
                var Ri = [Cn[Wn - 1], Cn[Wn], mt[Wn]];
                if (Ri[0]) for (var Ho = Ri[0].lastChild; Ho; ) {
                  if (Ho === Ri[1]) {
                    Ye = Ot, mt = Cn;
                    break;
                  }
                  if (Ho === Ri[2]) break;
                  Ho = Ho.previousSibling;
                }
              } else rt = St, (parseInt($(Ue = pt).getComputedStyle(Ue).zIndex, 10) || 0) >= (parseInt($(rt).getComputedStyle(rt).zIndex, 10) || 0) && (Ye = Ot);
              else Ye = Ot;
            } else Ye = Ot;
          }
          return Ye;
        })(q);
        return T.activeDrops[Ae] || null;
      }
      function gn(p, h, w) {
        var T = p.dropState, _ = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
        return w.type === "dragstart" && (_.activate = new mn(T, w, "dropactivate"), _.activate.target = null, _.activate.dropzone = null), w.type === "dragend" && (_.deactivate = new mn(T, w, "dropdeactivate"), _.deactivate.target = null, _.deactivate.dropzone = null), T.rejected || (T.cur.element !== T.prev.element && (T.prev.dropzone && (_.leave = new mn(T, w, "dragleave"), w.dragLeave = _.leave.target = T.prev.element, w.prevDropzone = _.leave.dropzone = T.prev.dropzone), T.cur.dropzone && (_.enter = new mn(T, w, "dragenter"), w.dragEnter = T.cur.element, w.dropzone = T.cur.dropzone)), w.type === "dragend" && T.cur.dropzone && (_.drop = new mn(T, w, "drop"), w.dropzone = T.cur.dropzone, w.relatedTarget = T.cur.element), w.type === "dragmove" && T.cur.dropzone && (_.move = new mn(T, w, "dropmove"), w.dropzone = T.cur.dropzone)), _;
      }
      function Hn(p, h) {
        var w = p.dropState, T = w.activeDrops, _ = w.cur, L = w.prev;
        h.leave && L.dropzone.fire(h.leave), h.enter && _.dropzone.fire(h.enter), h.move && _.dropzone.fire(h.move), h.drop && _.dropzone.fire(h.drop), h.deactivate && Kt(T, h.deactivate), w.prev.dropzone = _.dropzone, w.prev.element = _.element;
      }
      function Co(p, h) {
        var w = p.interaction, T = p.iEvent, _ = p.event;
        if (T.type === "dragmove" || T.type === "dragend") {
          var L = w.dropState;
          h.dynamicDrop && (L.activeDrops = Mn(h, w.element));
          var q = T, X = an(w, q, _);
          L.rejected = L.rejected && !!X && X.dropzone === L.cur.dropzone && X.element === L.cur.element, L.cur.dropzone = X && X.dropzone, L.cur.element = X && X.element, L.events = gn(w, 0, q);
        }
      }
      var ut = { id: "actions/drop", install: function(p) {
        var h = p.actions, w = p.interactStatic, T = p.Interactable, _ = p.defaults;
        p.usePlugin(D), T.prototype.dropzone = function(L) {
          return (function(q, X) {
            if (x.object(X)) {
              if (q.options.drop.enabled = X.enabled !== !1, X.listeners) {
                var oe = We(X.listeners), me = Object.keys(oe).reduce((function(Se, $e) {
                  return Se[/^(enter|leave)/.test($e) ? "drag".concat($e) : /^(activate|deactivate|move)/.test($e) ? "drop".concat($e) : $e] = oe[$e], Se;
                }), {}), ie = q.options.drop.listeners;
                ie && q.off(ie), q.on(me), q.options.drop.listeners = me;
              }
              return x.func(X.ondrop) && q.on("drop", X.ondrop), x.func(X.ondropactivate) && q.on("dropactivate", X.ondropactivate), x.func(X.ondropdeactivate) && q.on("dropdeactivate", X.ondropdeactivate), x.func(X.ondragenter) && q.on("dragenter", X.ondragenter), x.func(X.ondragleave) && q.on("dragleave", X.ondragleave), x.func(X.ondropmove) && q.on("dropmove", X.ondropmove), /^(pointer|center)$/.test(X.overlap) ? q.options.drop.overlap = X.overlap : x.number(X.overlap) && (q.options.drop.overlap = Math.max(Math.min(1, X.overlap), 0)), "accept" in X && (q.options.drop.accept = X.accept), "checker" in X && (q.options.drop.checker = X.checker), q;
            }
            return x.bool(X) ? (q.options.drop.enabled = X, q) : q.options.drop;
          })(this, L);
        }, T.prototype.dropCheck = function(L, q, X, oe, me, ie) {
          return (function(Se, $e, _e, Ae, Be, Ye, Ue) {
            var rt = !1;
            if (!(Ue = Ue || Se.getRect(Ye))) return !!Se.options.drop.checker && Se.options.drop.checker($e, _e, rt, Se, Ye, Ae, Be);
            var mt = Se.options.drop.overlap;
            if (mt === "pointer") {
              var Ot = Re(Ae, Be, "drag"), pt = De($e);
              pt.x += Ot.x, pt.y += Ot.y;
              var St = pt.x > Ue.left && pt.x < Ue.right, un = pt.y > Ue.top && pt.y < Ue.bottom;
              rt = St && un;
            }
            var Yt = Ae.getRect(Be);
            if (Yt && mt === "center") {
              var hn = Yt.left + Yt.width / 2, Cn = Yt.top + Yt.height / 2;
              rt = hn >= Ue.left && hn <= Ue.right && Cn >= Ue.top && Cn <= Ue.bottom;
            }
            return Yt && x.number(mt) && (rt = Math.max(0, Math.min(Ue.right, Yt.right) - Math.max(Ue.left, Yt.left)) * Math.max(0, Math.min(Ue.bottom, Yt.bottom) - Math.max(Ue.top, Yt.top)) / (Yt.width * Yt.height) >= mt), Se.options.drop.checker && (rt = Se.options.drop.checker($e, _e, rt, Se, Ye, Ae, Be)), rt;
          })(this, L, q, X, oe, me, ie);
        }, w.dynamicDrop = function(L) {
          return x.bool(L) ? (p.dynamicDrop = L, w) : p.dynamicDrop;
        }, re(h.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), h.methodDict.drop = "dropzone", p.dynamicDrop = !1, _.actions.drop = ut.defaults;
      }, listeners: { "interactions:before-action-start": function(p) {
        var h = p.interaction;
        h.prepared.name === "drag" && (h.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
      }, "interactions:after-action-start": function(p, h) {
        var w = p.interaction, T = (p.event, p.iEvent);
        if (w.prepared.name === "drag") {
          var _ = w.dropState;
          _.activeDrops = [], _.events = {}, _.activeDrops = Mn(h, w.element), _.events = gn(w, 0, T), _.events.activate && (Kt(_.activeDrops, _.events.activate), h.fire("actions/drop:start", { interaction: w, dragEvent: T }));
        }
      }, "interactions:action-move": Co, "interactions:after-action-move": function(p, h) {
        var w = p.interaction, T = p.iEvent;
        if (w.prepared.name === "drag") {
          var _ = w.dropState;
          Hn(w, _.events), h.fire("actions/drop:move", { interaction: w, dragEvent: T }), _.events = {};
        }
      }, "interactions:action-end": function(p, h) {
        if (p.interaction.prepared.name === "drag") {
          var w = p.interaction, T = p.iEvent;
          Co(p, h), Hn(w, w.dropState.events), h.fire("actions/drop:end", { interaction: w, dragEvent: T });
        }
      }, "interactions:stop": function(p) {
        var h = p.interaction;
        if (h.prepared.name === "drag") {
          var w = h.dropState;
          w && (w.activeDrops = null, w.events = null, w.cur.dropzone = null, w.cur.element = null, w.prev.dropzone = null, w.prev.element = null, w.rejected = !1);
        }
      } }, getActiveDrops: Mn, getDrop: an, getDropEvents: gn, fireDropEvents: Hn, filterEventType: function(p) {
        return p.search("drag") === 0 || p.search("drop") === 0;
      }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, qn = ut;
      function bn(p) {
        var h = p.interaction, w = p.iEvent, T = p.phase;
        if (h.prepared.name === "gesture") {
          var _ = h.pointers.map((function(me) {
            return me.pointer;
          })), L = T === "start", q = T === "end", X = h.interactable.options.deltaSource;
          if (w.touches = [_[0], _[1]], L) w.distance = dt(_, X), w.box = at(_), w.scale = 1, w.ds = 0, w.angle = vt(_, X), w.da = 0, h.gesture.startDistance = w.distance, h.gesture.startAngle = w.angle;
          else if (q || h.pointers.length < 2) {
            var oe = h.prevEvent;
            w.distance = oe.distance, w.box = oe.box, w.scale = oe.scale, w.ds = 0, w.angle = oe.angle, w.da = 0;
          } else w.distance = dt(_, X), w.box = at(_), w.scale = w.distance / h.gesture.startDistance, w.angle = vt(_, X), w.ds = w.scale - h.gesture.scale, w.da = w.angle - h.gesture.angle;
          h.gesture.distance = w.distance, h.gesture.angle = w.angle, x.number(w.scale) && w.scale !== 1 / 0 && !isNaN(w.scale) && (h.gesture.scale = w.scale);
        }
      }
      var Gn = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(p) {
        var h = p.actions, w = p.Interactable, T = p.defaults;
        w.prototype.gesturable = function(_) {
          return x.object(_) ? (this.options.gesture.enabled = _.enabled !== !1, this.setPerAction("gesture", _), this.setOnEvents("gesture", _), this) : x.bool(_) ? (this.options.gesture.enabled = _, this) : this.options.gesture;
        }, h.map.gesture = Gn, h.methodDict.gesture = "gesturable", T.actions.gesture = Gn.defaults;
      }, listeners: { "interactions:action-start": bn, "interactions:action-move": bn, "interactions:action-end": bn, "interactions:new": function(p) {
        p.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
      }, "auto-start:check": function(p) {
        if (!(p.interaction.pointers.length < 2)) {
          var h = p.interactable.options.gesture;
          if (h && h.enabled) return p.action = { name: "gesture" }, !1;
        }
      } }, defaults: {}, getCursor: function() {
        return "";
      }, filterEventType: function(p) {
        return p.search("gesture") === 0;
      } }, Fo = Gn;
      function pi(p, h, w, T, _, L, q) {
        if (!h) return !1;
        if (h === !0) {
          var X = x.number(L.width) ? L.width : L.right - L.left, oe = x.number(L.height) ? L.height : L.bottom - L.top;
          if (q = Math.min(q, Math.abs((p === "left" || p === "right" ? X : oe) / 2)), X < 0 && (p === "left" ? p = "right" : p === "right" && (p = "left")), oe < 0 && (p === "top" ? p = "bottom" : p === "bottom" && (p = "top")), p === "left") {
            var me = X >= 0 ? L.left : L.right;
            return w.x < me + q;
          }
          if (p === "top") {
            var ie = oe >= 0 ? L.top : L.bottom;
            return w.y < ie + q;
          }
          if (p === "right") return w.x > (X >= 0 ? L.right : L.left) - q;
          if (p === "bottom") return w.y > (oe >= 0 ? L.bottom : L.top) - q;
        }
        return !!x.element(T) && (x.element(h) ? h === T : be(T, h, _));
      }
      function ze(p) {
        var h = p.iEvent, w = p.interaction;
        if (w.prepared.name === "resize" && w.resizeAxes) {
          var T = h;
          w.interactable.options.resize.square ? (w.resizeAxes === "y" ? T.delta.x = T.delta.y : T.delta.y = T.delta.x, T.axes = "xy") : (T.axes = w.resizeAxes, w.resizeAxes === "x" ? T.delta.y = 0 : w.resizeAxes === "y" && (T.delta.x = 0));
        }
      }
      var nt, tt, zt = { id: "actions/resize", before: ["actions/drag"], install: function(p) {
        var h = p.actions, w = p.browser, T = p.Interactable, _ = p.defaults;
        zt.cursors = (function(L) {
          return L.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
        })(w), zt.defaultMargin = w.supportsTouch || w.supportsPointerEvent ? 20 : 10, T.prototype.resizable = function(L) {
          return (function(q, X, oe) {
            return x.object(X) ? (q.options.resize.enabled = X.enabled !== !1, q.setPerAction("resize", X), q.setOnEvents("resize", X), x.string(X.axis) && /^x$|^y$|^xy$/.test(X.axis) ? q.options.resize.axis = X.axis : X.axis === null && (q.options.resize.axis = oe.defaults.actions.resize.axis), x.bool(X.preserveAspectRatio) ? q.options.resize.preserveAspectRatio = X.preserveAspectRatio : x.bool(X.square) && (q.options.resize.square = X.square), q) : x.bool(X) ? (q.options.resize.enabled = X, q) : q.options.resize;
          })(this, L, p);
        }, h.map.resize = zt, h.methodDict.resize = "resizable", _.actions.resize = zt.defaults;
      }, listeners: { "interactions:new": function(p) {
        p.interaction.resizeAxes = "xy";
      }, "interactions:action-start": function(p) {
        (function(h) {
          var w = h.iEvent, T = h.interaction;
          if (T.prepared.name === "resize" && T.prepared.edges) {
            var _ = w, L = T.rect;
            T._rects = { start: re({}, L), corrected: re({}, L), previous: re({}, L), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, _.edges = T.prepared.edges, _.rect = T._rects.corrected, _.deltaRect = T._rects.delta;
          }
        })(p), ze(p);
      }, "interactions:action-move": function(p) {
        (function(h) {
          var w = h.iEvent, T = h.interaction;
          if (T.prepared.name === "resize" && T.prepared.edges) {
            var _ = w, L = T.interactable.options.resize.invert, q = L === "reposition" || L === "negate", X = T.rect, oe = T._rects, me = oe.start, ie = oe.corrected, Se = oe.delta, $e = oe.previous;
            if (re($e, ie), q) {
              if (re(ie, X), L === "reposition") {
                if (ie.top > ie.bottom) {
                  var _e = ie.top;
                  ie.top = ie.bottom, ie.bottom = _e;
                }
                if (ie.left > ie.right) {
                  var Ae = ie.left;
                  ie.left = ie.right, ie.right = Ae;
                }
              }
            } else ie.top = Math.min(X.top, me.bottom), ie.bottom = Math.max(X.bottom, me.top), ie.left = Math.min(X.left, me.right), ie.right = Math.max(X.right, me.left);
            for (var Be in ie.width = ie.right - ie.left, ie.height = ie.bottom - ie.top, ie) Se[Be] = ie[Be] - $e[Be];
            _.edges = T.prepared.edges, _.rect = ie, _.deltaRect = Se;
          }
        })(p), ze(p);
      }, "interactions:action-end": function(p) {
        var h = p.iEvent, w = p.interaction;
        if (w.prepared.name === "resize" && w.prepared.edges) {
          var T = h;
          T.edges = w.prepared.edges, T.rect = w._rects.corrected, T.deltaRect = w._rects.delta;
        }
      }, "auto-start:check": function(p) {
        var h = p.interaction, w = p.interactable, T = p.element, _ = p.rect, L = p.buttons;
        if (_) {
          var q = re({}, h.coords.cur.page), X = w.options.resize;
          if (X && X.enabled && (!h.pointerIsDown || !/mouse|pointer/.test(h.pointerType) || (L & X.mouseButtons) != 0)) {
            if (x.object(X.edges)) {
              var oe = { left: !1, right: !1, top: !1, bottom: !1 };
              for (var me in oe) oe[me] = pi(me, X.edges[me], q, h._latestPointer.eventTarget, T, _, X.margin || zt.defaultMargin);
              oe.left = oe.left && !oe.right, oe.top = oe.top && !oe.bottom, (oe.left || oe.right || oe.top || oe.bottom) && (p.action = { name: "resize", edges: oe });
            } else {
              var ie = X.axis !== "y" && q.x > _.right - zt.defaultMargin, Se = X.axis !== "x" && q.y > _.bottom - zt.defaultMargin;
              (ie || Se) && (p.action = { name: "resize", axes: (ie ? "x" : "") + (Se ? "y" : "") });
            }
            return !p.action && void 0;
          }
        }
      } }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(p) {
        var h = p.edges, w = p.axis, T = p.name, _ = zt.cursors, L = null;
        if (w) L = _[T + w];
        else if (h) {
          for (var q = "", X = 0, oe = ["top", "bottom", "left", "right"]; X < oe.length; X++) {
            var me = oe[X];
            h[me] && (q += me);
          }
          L = _[q];
        }
        return L;
      }, filterEventType: function(p) {
        return p.search("resize") === 0;
      }, defaultMargin: null }, Vn = zt, Rn = { id: "actions", install: function(p) {
        p.usePlugin(Fo), p.usePlugin(Vn), p.usePlugin(D), p.usePlugin(qn);
      } }, go = 0, Jt = { request: function(p) {
        return nt(p);
      }, cancel: function(p) {
        return tt(p);
      }, init: function(p) {
        if (nt = p.requestAnimationFrame, tt = p.cancelAnimationFrame, !nt) for (var h = ["ms", "moz", "webkit", "o"], w = 0; w < h.length; w++) {
          var T = h[w];
          nt = p["".concat(T, "RequestAnimationFrame")], tt = p["".concat(T, "CancelAnimationFrame")] || p["".concat(T, "CancelRequestAnimationFrame")];
        }
        nt = nt && nt.bind(p), tt = tt && tt.bind(p), nt || (nt = function(_) {
          var L = Date.now(), q = Math.max(0, 16 - (L - go)), X = p.setTimeout((function() {
            _(L + q);
          }), q);
          return go = L + q, X;
        }, tt = function(_) {
          return clearTimeout(_);
        });
      } }, ht = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(p) {
        ht.isScrolling = !0, Jt.cancel(ht.i), p.autoScroll = ht, ht.interaction = p, ht.prevTime = ht.now(), ht.i = Jt.request(ht.scroll);
      }, stop: function() {
        ht.isScrolling = !1, ht.interaction && (ht.interaction.autoScroll = null), Jt.cancel(ht.i);
      }, scroll: function() {
        var p = ht.interaction, h = p.interactable, w = p.element, T = p.prepared.name, _ = h.options[T].autoScroll, L = Zn(_.container, h, w), q = ht.now(), X = (q - ht.prevTime) / 1e3, oe = _.speed * X;
        if (oe >= 1) {
          var me = { x: ht.x * oe, y: ht.y * oe };
          if (me.x || me.y) {
            var ie = $o(L);
            x.window(L) ? L.scrollBy(me.x, me.y) : L && (L.scrollLeft += me.x, L.scrollTop += me.y);
            var Se = $o(L), $e = { x: Se.x - ie.x, y: Se.y - ie.y };
            ($e.x || $e.y) && h.fire({ type: "autoscroll", target: w, interactable: h, delta: $e, interaction: p, container: L });
          }
          ht.prevTime = q;
        }
        ht.isScrolling && (Jt.cancel(ht.i), ht.i = Jt.request(ht.scroll));
      }, check: function(p, h) {
        var w;
        return (w = p.options[h].autoScroll) == null ? void 0 : w.enabled;
      }, onInteractionMove: function(p) {
        var h = p.interaction, w = p.pointer;
        if (h.interacting() && ht.check(h.interactable, h.prepared.name)) if (h.simulation) ht.x = ht.y = 0;
        else {
          var T, _, L, q, X = h.interactable, oe = h.element, me = h.prepared.name, ie = X.options[me].autoScroll, Se = Zn(ie.container, X, oe);
          if (x.window(Se)) q = w.clientX < ht.margin, T = w.clientY < ht.margin, _ = w.clientX > Se.innerWidth - ht.margin, L = w.clientY > Se.innerHeight - ht.margin;
          else {
            var $e = he(Se);
            q = w.clientX < $e.left + ht.margin, T = w.clientY < $e.top + ht.margin, _ = w.clientX > $e.right - ht.margin, L = w.clientY > $e.bottom - ht.margin;
          }
          ht.x = _ ? 1 : q ? -1 : 0, ht.y = L ? 1 : T ? -1 : 0, ht.isScrolling || (ht.margin = ie.margin, ht.speed = ie.speed, ht.start(h));
        }
      } };
      function Zn(p, h, w) {
        return (x.string(p) ? se(p, h, w) : p) || $(w);
      }
      function $o(p) {
        return x.window(p) && (p = window.document.body), { x: p.scrollLeft, y: p.scrollTop };
      }
      var rn = { id: "auto-scroll", install: function(p) {
        var h = p.defaults, w = p.actions;
        p.autoScroll = ht, ht.now = function() {
          return p.now();
        }, w.phaselessTypes.autoscroll = !0, h.perAction.autoScroll = ht.defaults;
      }, listeners: { "interactions:new": function(p) {
        p.interaction.autoScroll = null;
      }, "interactions:destroy": function(p) {
        p.interaction.autoScroll = null, ht.stop(), ht.interaction && (ht.interaction = null);
      }, "interactions:stop": ht.stop, "interactions:action-move": function(p) {
        return ht.onInteractionMove(p);
      } } }, ln = rn;
      function Ht(p, h) {
        var w = !1;
        return function() {
          return w || (C.console.warn(h), w = !0), p.apply(this, arguments);
        };
      }
      function sn(p, h) {
        return p.name = h.name, p.axis = h.axis, p.edges = h.edges, p;
      }
      function Io(p) {
        return x.bool(p) ? (this.options.styleCursor = p, this) : p === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
      }
      function kn(p) {
        return x.func(p) ? (this.options.actionChecker = p, this) : p === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
      }
      var Lo = { id: "auto-start/interactableMethods", install: function(p) {
        var h = p.Interactable;
        h.prototype.getAction = function(w, T, _, L) {
          var q = (function(X, oe, me, ie, Se) {
            var $e = X.getRect(ie), _e = oe.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[oe.button], Ae = { action: null, interactable: X, interaction: me, element: ie, rect: $e, buttons: _e };
            return Se.fire("auto-start:check", Ae), Ae.action;
          })(this, T, _, L, p);
          return this.options.actionChecker ? this.options.actionChecker(w, T, q, this, L, _) : q;
        }, h.prototype.ignoreFrom = Ht((function(w) {
          return this._backCompatOption("ignoreFrom", w);
        }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), h.prototype.allowFrom = Ht((function(w) {
          return this._backCompatOption("allowFrom", w);
        }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), h.prototype.actionChecker = kn, h.prototype.styleCursor = Io;
      } };
      function ho(p, h, w, T, _) {
        return h.testIgnoreAllow(h.options[p.name], w, T) && h.options[p.name].enabled && ea(h, w, p, _) ? p : null;
      }
      function Ca(p, h, w, T, _, L, q) {
        for (var X = 0, oe = T.length; X < oe; X++) {
          var me = T[X], ie = _[X], Se = me.getAction(h, w, p, ie);
          if (Se) {
            var $e = ho(Se, me, ie, L, q);
            if ($e) return { action: $e, interactable: me, element: ie };
          }
        }
        return { action: null, interactable: null, element: null };
      }
      function $a(p, h, w, T, _) {
        var L = [], q = [], X = T;
        function oe(ie) {
          L.push(ie), q.push(X);
        }
        for (; x.element(X); ) {
          L = [], q = [], _.interactables.forEachMatch(X, oe);
          var me = Ca(p, h, w, L, q, T, _);
          if (me.action && !me.interactable.options[me.action.name].manualStart) return me;
          X = G(X);
        }
        return { action: null, interactable: null, element: null };
      }
      function Ei(p, h, w) {
        var T = h.action, _ = h.interactable, L = h.element;
        T = T || { name: null }, p.interactable = _, p.element = L, sn(p.prepared, T), p.rect = _ && T.name ? _.getRect(L) : null, Ua(p, w), w.fire("autoStart:prepared", { interaction: p });
      }
      function ea(p, h, w, T) {
        var _ = p.options, L = _[w.name].max, q = _[w.name].maxPerElement, X = T.autoStart.maxInteractions, oe = 0, me = 0, ie = 0;
        if (!(L && q && X)) return !1;
        for (var Se = 0, $e = T.interactions.list; Se < $e.length; Se++) {
          var _e = $e[Se], Ae = _e.prepared.name;
          if (_e.interacting() && (++oe >= X || _e.interactable === p && ((me += Ae === w.name ? 1 : 0) >= L || _e.element === h && (ie++, Ae === w.name && ie >= q))))
            return !1;
        }
        return X > 0;
      }
      function Ya(p, h) {
        return x.number(p) ? (h.autoStart.maxInteractions = p, this) : h.autoStart.maxInteractions;
      }
      function ta(p, h, w) {
        var T = w.autoStart.cursorElement;
        T && T !== p && (T.style.cursor = ""), p.ownerDocument.documentElement.style.cursor = h, p.style.cursor = h, w.autoStart.cursorElement = h ? p : null;
      }
      function Ua(p, h) {
        var w = p.interactable, T = p.element, _ = p.prepared;
        if (p.pointerType === "mouse" && w && w.options.styleCursor) {
          var L = "";
          if (_.name) {
            var q = w.options[_.name].cursorChecker;
            L = x.func(q) ? q(_, w, T, p._interacting) : h.actions.map[_.name].getCursor(_);
          }
          ta(p.element, L || "", h);
        } else h.autoStart.cursorElement && ta(h.autoStart.cursorElement, "", h);
      }
      var _i = { id: "auto-start/base", before: ["actions"], install: function(p) {
        var h = p.interactStatic, w = p.defaults;
        p.usePlugin(Lo), w.base.actionChecker = null, w.base.styleCursor = !0, re(w.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), h.maxInteractions = function(T) {
          return Ya(T, p);
        }, p.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: ea, cursorElement: null };
      }, listeners: { "interactions:down": function(p, h) {
        var w = p.interaction, T = p.pointer, _ = p.event, L = p.eventTarget;
        w.interacting() || Ei(w, $a(w, T, _, L, h), h);
      }, "interactions:move": function(p, h) {
        (function(w, T) {
          var _ = w.interaction, L = w.pointer, q = w.event, X = w.eventTarget;
          _.pointerType !== "mouse" || _.pointerIsDown || _.interacting() || Ei(_, $a(_, L, q, X, T), T);
        })(p, h), (function(w, T) {
          var _ = w.interaction;
          if (_.pointerIsDown && !_.interacting() && _.pointerWasMoved && _.prepared.name) {
            T.fire("autoStart:before-start", w);
            var L = _.interactable, q = _.prepared.name;
            q && L && (L.options[q].manualStart || !ea(L, _.element, _.prepared, T) ? _.stop() : (_.start(_.prepared, L, _.element), Ua(_, T)));
          }
        })(p, h);
      }, "interactions:stop": function(p, h) {
        var w = p.interaction, T = w.interactable;
        T && T.options.styleCursor && ta(w.element, "", h);
      } }, maxInteractions: Ya, withinInteractionLimit: ea, validateAction: ho }, na = _i, zr = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(p, h) {
        var w = p.interaction, T = p.eventTarget, _ = p.dx, L = p.dy;
        if (w.prepared.name === "drag") {
          var q = Math.abs(_), X = Math.abs(L), oe = w.interactable.options.drag, me = oe.startAxis, ie = q > X ? "x" : q < X ? "y" : "xy";
          if (w.prepared.axis = oe.lockAxis === "start" ? ie[0] : oe.lockAxis, ie !== "xy" && me !== "xy" && me !== ie) {
            w.prepared.name = null;
            for (var Se = T, $e = function(Ae) {
              if (Ae !== w.interactable) {
                var Be = w.interactable.options.drag;
                if (!Be.manualStart && Ae.testIgnoreAllow(Be, Se, T)) {
                  var Ye = Ae.getAction(w.downPointer, w.downEvent, w, Se);
                  if (Ye && Ye.name === "drag" && (function(Ue, rt) {
                    if (!rt) return !1;
                    var mt = rt.options.drag.startAxis;
                    return Ue === "xy" || mt === "xy" || mt === Ue;
                  })(ie, Ae) && na.validateAction(Ye, Ae, Se, T, h)) return Ae;
                }
              }
            }; x.element(Se); ) {
              var _e = h.interactables.forEachMatch(Se, $e);
              if (_e) {
                w.prepared.name = "drag", w.interactable = _e, w.element = Se;
                break;
              }
              Se = G(Se);
            }
          }
        }
      } } };
      function Mo(p) {
        var h = p.prepared && p.prepared.name;
        if (!h) return null;
        var w = p.interactable.options;
        return w[h].hold || w[h].delay;
      }
      var Tl = { id: "auto-start/hold", install: function(p) {
        var h = p.defaults;
        p.usePlugin(na), h.perAction.hold = 0, h.perAction.delay = 0;
      }, listeners: { "interactions:new": function(p) {
        p.interaction.autoStartHoldTimer = null;
      }, "autoStart:prepared": function(p) {
        var h = p.interaction, w = Mo(h);
        w > 0 && (h.autoStartHoldTimer = setTimeout((function() {
          h.start(h.prepared, h.interactable, h.element);
        }), w));
      }, "interactions:move": function(p) {
        var h = p.interaction, w = p.duplicate;
        h.autoStartHoldTimer && h.pointerWasMoved && !w && (clearTimeout(h.autoStartHoldTimer), h.autoStartHoldTimer = null);
      }, "autoStart:before-start": function(p) {
        var h = p.interaction;
        Mo(h) > 0 && (h.prepared.name = null);
      } }, getHoldDuration: Mo }, Rr = Tl, Xa = { id: "auto-start", install: function(p) {
        p.usePlugin(na), p.usePlugin(Rr), p.usePlugin(zr);
      } }, Nr = function(p) {
        return /^(always|never|auto)$/.test(p) ? (this.options.preventDefault = p, this) : x.bool(p) ? (this.options.preventDefault = p ? "always" : "never", this) : this.options.preventDefault;
      };
      function Br(p) {
        var h = p.interaction, w = p.event;
        h.interactable && h.interactable.checkAndPreventDefault(w);
      }
      var Qa = { id: "core/interactablePreventDefault", install: function(p) {
        var h = p.Interactable;
        h.prototype.preventDefault = Nr, h.prototype.checkAndPreventDefault = function(w) {
          return (function(T, _, L) {
            var q = T.options.preventDefault;
            if (q !== "never") if (q !== "always") {
              if (_.events.supportsPassive && /^touch(start|move)$/.test(L.type)) {
                var X = $(L.target).document, oe = _.getDocOptions(X);
                if (!oe || !oe.events || oe.events.passive !== !1) return;
              }
              /^(mouse|pointer|touch)*(down|start)/i.test(L.type) || x.element(L.target) && Y(L.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || L.preventDefault();
            } else L.preventDefault();
          })(this, p, w);
        }, p.interactions.docEvents.push({ type: "dragstart", listener: function(w) {
          for (var T = 0, _ = p.interactions.list; T < _.length; T++) {
            var L = _[T];
            if (L.element && (L.element === w.target || j(L.element, w.target))) return void L.interactable.checkAndPreventDefault(w);
          }
        } });
      }, listeners: ["down", "move", "up", "cancel"].reduce((function(p, h) {
        return p["interactions:".concat(h)] = Br, p;
      }), {}) };
      function Za(p, h) {
        if (h.phaselessTypes[p]) return !0;
        for (var w in h.map) if (p.indexOf(w) === 0 && p.substr(w.length) in h.phases) return !0;
        return !1;
      }
      function Nn(p) {
        var h = {};
        for (var w in p) {
          var T = p[w];
          x.plainObject(T) ? h[w] = Nn(T) : x.array(T) ? h[w] = zn(T) : h[w] = T;
        }
        return h;
      }
      var To = (function() {
        function p(h) {
          a(this, p), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = h, this.result = Pa(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
        }
        return l(p, [{ key: "start", value: function(h, w) {
          var T, _, L = h.phase, q = this.interaction, X = (function(me) {
            var ie = me.interactable.options[me.prepared.name], Se = ie.modifiers;
            return Se && Se.length ? Se : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function($e) {
              var _e = ie[$e];
              return _e && _e.enabled && { options: _e, methods: _e._methods };
            })).filter((function($e) {
              return !!$e;
            }));
          })(q);
          this.prepareStates(X), this.startEdges = re({}, q.edges), this.edges = re({}, this.startEdges), this.startOffset = (T = q.rect, _ = w, T ? { left: _.x - T.left, top: _.y - T.top, right: T.right - _.x, bottom: T.bottom - _.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
          var oe = this.fillArg({ phase: L, pageCoords: w, preEnd: !1 });
          return this.result = Pa(), this.startAll(oe), this.result = this.setAll(oe);
        } }, { key: "fillArg", value: function(h) {
          var w = this.interaction;
          return h.interaction = w, h.interactable = w.interactable, h.element = w.element, h.rect || (h.rect = w.rect), h.edges || (h.edges = this.startEdges), h.startOffset = this.startOffset, h;
        } }, { key: "startAll", value: function(h) {
          for (var w = 0, T = this.states; w < T.length; w++) {
            var _ = T[w];
            _.methods.start && (h.state = _, _.methods.start(h));
          }
        } }, { key: "setAll", value: function(h) {
          var w = h.phase, T = h.preEnd, _ = h.skipModifiers, L = h.rect, q = h.edges;
          h.coords = re({}, h.pageCoords), h.rect = re({}, L), h.edges = re({}, q);
          for (var X = _ ? this.states.slice(_) : this.states, oe = Pa(h.coords, h.rect), me = 0; me < X.length; me++) {
            var ie, Se = X[me], $e = Se.options, _e = re({}, h.coords), Ae = null;
            (ie = Se.methods) != null && ie.set && this.shouldDo($e, T, w) && (h.state = Se, Ae = Se.methods.set(h), Fe(h.edges, h.rect, { x: h.coords.x - _e.x, y: h.coords.y - _e.y })), oe.eventProps.push(Ae);
          }
          re(this.edges, h.edges), oe.delta.x = h.coords.x - h.pageCoords.x, oe.delta.y = h.coords.y - h.pageCoords.y, oe.rectDelta.left = h.rect.left - L.left, oe.rectDelta.right = h.rect.right - L.right, oe.rectDelta.top = h.rect.top - L.top, oe.rectDelta.bottom = h.rect.bottom - L.bottom;
          var Be = this.result.coords, Ye = this.result.rect;
          if (Be && Ye) {
            var Ue = oe.rect.left !== Ye.left || oe.rect.right !== Ye.right || oe.rect.top !== Ye.top || oe.rect.bottom !== Ye.bottom;
            oe.changed = Ue || Be.x !== oe.coords.x || Be.y !== oe.coords.y;
          }
          return oe;
        } }, { key: "applyToInteraction", value: function(h) {
          var w = this.interaction, T = h.phase, _ = w.coords.cur, L = w.coords.start, q = this.result, X = this.startDelta, oe = q.delta;
          T === "start" && re(this.startDelta, q.delta);
          for (var me = 0, ie = [[L, X], [_, oe]]; me < ie.length; me++) {
            var Se = ie[me], $e = Se[0], _e = Se[1];
            $e.page.x += _e.x, $e.page.y += _e.y, $e.client.x += _e.x, $e.client.y += _e.y;
          }
          var Ae = this.result.rectDelta, Be = h.rect || w.rect;
          Be.left += Ae.left, Be.right += Ae.right, Be.top += Ae.top, Be.bottom += Ae.bottom, Be.width = Be.right - Be.left, Be.height = Be.bottom - Be.top;
        } }, { key: "setAndApply", value: function(h) {
          var w = this.interaction, T = h.phase, _ = h.preEnd, L = h.skipModifiers, q = this.setAll(this.fillArg({ preEnd: _, phase: T, pageCoords: h.modifiedCoords || w.coords.cur.page }));
          if (this.result = q, !q.changed && (!L || L < this.states.length) && w.interacting()) return !1;
          if (h.modifiedCoords) {
            var X = w.coords.cur.page, oe = { x: h.modifiedCoords.x - X.x, y: h.modifiedCoords.y - X.y };
            q.coords.x += oe.x, q.coords.y += oe.y, q.delta.x += oe.x, q.delta.y += oe.y;
          }
          this.applyToInteraction(h);
        } }, { key: "beforeEnd", value: function(h) {
          var w = h.interaction, T = h.event, _ = this.states;
          if (_ && _.length) {
            for (var L = !1, q = 0; q < _.length; q++) {
              var X = _[q];
              h.state = X;
              var oe = X.options, me = X.methods, ie = me.beforeEnd && me.beforeEnd(h);
              if (ie) return this.endResult = ie, !1;
              L = L || !L && this.shouldDo(oe, !0, h.phase, !0);
            }
            L && w.move({ event: T, preEnd: !0 });
          }
        } }, { key: "stop", value: function(h) {
          var w = h.interaction;
          if (this.states && this.states.length) {
            var T = re({ states: this.states, interactable: w.interactable, element: w.element, rect: null }, h);
            this.fillArg(T);
            for (var _ = 0, L = this.states; _ < L.length; _++) {
              var q = L[_];
              T.state = q, q.methods.stop && q.methods.stop(T);
            }
            this.states = null, this.endResult = null;
          }
        } }, { key: "prepareStates", value: function(h) {
          this.states = [];
          for (var w = 0; w < h.length; w++) {
            var T = h[w], _ = T.options, L = T.methods, q = T.name;
            this.states.push({ options: _, methods: L, index: w, name: q });
          }
          return this.states;
        } }, { key: "restoreInteractionCoords", value: function(h) {
          var w = h.interaction, T = w.coords, _ = w.rect, L = w.modification;
          if (L.result) {
            for (var q = L.startDelta, X = L.result, oe = X.delta, me = X.rectDelta, ie = 0, Se = [[T.start, q], [T.cur, oe]]; ie < Se.length; ie++) {
              var $e = Se[ie], _e = $e[0], Ae = $e[1];
              _e.page.x -= Ae.x, _e.page.y -= Ae.y, _e.client.x -= Ae.x, _e.client.y -= Ae.y;
            }
            _.left -= me.left, _.right -= me.right, _.top -= me.top, _.bottom -= me.bottom;
          }
        } }, { key: "shouldDo", value: function(h, w, T, _) {
          return !(!h || h.enabled === !1 || _ && !h.endOnly || h.endOnly && !w || T === "start" && !h.setStart);
        } }, { key: "copyFrom", value: function(h) {
          this.startOffset = h.startOffset, this.startDelta = h.startDelta, this.startEdges = h.startEdges, this.edges = h.edges, this.states = h.states.map((function(w) {
            return Nn(w);
          })), this.result = Pa(re({}, h.result.coords), re({}, h.result.rect));
        } }, { key: "destroy", value: function() {
          for (var h in this) this[h] = null;
        } }]), p;
      })();
      function Pa(p, h) {
        return { rect: h, coords: p, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
      }
      function ko(p, h) {
        var w = p.defaults, T = { start: p.start, set: p.set, beforeEnd: p.beforeEnd, stop: p.stop }, _ = function(L) {
          var q = L || {};
          for (var X in q.enabled = q.enabled !== !1, w) X in q || (q[X] = w[X]);
          var oe = { options: q, methods: T, name: h, enable: function() {
            return q.enabled = !0, oe;
          }, disable: function() {
            return q.enabled = !1, oe;
          } };
          return oe;
        };
        return h && typeof h == "string" && (_._defaults = w, _._methods = T), _;
      }
      function co(p) {
        var h = p.iEvent, w = p.interaction.modification.result;
        w && (h.modifiers = w.eventProps);
      }
      var Ja = { id: "modifiers/base", before: ["actions"], install: function(p) {
        p.defaults.perAction.modifiers = [];
      }, listeners: { "interactions:new": function(p) {
        var h = p.interaction;
        h.modification = new To(h);
      }, "interactions:before-action-start": function(p) {
        var h = p.interaction, w = p.interaction.modification;
        w.start(p, h.coords.start.page), h.edges = w.edges, w.applyToInteraction(p);
      }, "interactions:before-action-move": function(p) {
        var h = p.interaction, w = h.modification, T = w.setAndApply(p);
        return h.edges = w.edges, T;
      }, "interactions:before-action-end": function(p) {
        var h = p.interaction, w = h.modification, T = w.beforeEnd(p);
        return h.edges = w.startEdges, T;
      }, "interactions:action-start": co, "interactions:action-move": co, "interactions:action-end": co, "interactions:after-action-start": function(p) {
        return p.interaction.modification.restoreInteractionCoords(p);
      }, "interactions:after-action-move": function(p) {
        return p.interaction.modification.restoreInteractionCoords(p);
      }, "interactions:stop": function(p) {
        return p.interaction.modification.stop(p);
      } } }, er = Ja, tr = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, oa = (function(p) {
        u(w, p);
        var h = g(w);
        function w(T, _, L, q, X, oe, me) {
          var ie;
          a(this, w), (ie = h.call(this, T)).relatedTarget = null, ie.screenX = void 0, ie.screenY = void 0, ie.button = void 0, ie.buttons = void 0, ie.ctrlKey = void 0, ie.shiftKey = void 0, ie.altKey = void 0, ie.metaKey = void 0, ie.page = void 0, ie.client = void 0, ie.delta = void 0, ie.rect = void 0, ie.x0 = void 0, ie.y0 = void 0, ie.t0 = void 0, ie.dt = void 0, ie.duration = void 0, ie.clientX0 = void 0, ie.clientY0 = void 0, ie.velocity = void 0, ie.speed = void 0, ie.swipe = void 0, ie.axes = void 0, ie.preEnd = void 0, X = X || T.element;
          var Se = T.interactable, $e = (Se && Se.options || tr).deltaSource, _e = Re(Se, X, L), Ae = q === "start", Be = q === "end", Ye = Ae ? f(ie) : T.prevEvent, Ue = Ae ? T.coords.start : Be ? { page: Ye.page, client: Ye.client, timeStamp: T.coords.cur.timeStamp } : T.coords.cur;
          return ie.page = re({}, Ue.page), ie.client = re({}, Ue.client), ie.rect = re({}, T.rect), ie.timeStamp = Ue.timeStamp, Be || (ie.page.x -= _e.x, ie.page.y -= _e.y, ie.client.x -= _e.x, ie.client.y -= _e.y), ie.ctrlKey = _.ctrlKey, ie.altKey = _.altKey, ie.shiftKey = _.shiftKey, ie.metaKey = _.metaKey, ie.button = _.button, ie.buttons = _.buttons, ie.target = X, ie.currentTarget = X, ie.preEnd = oe, ie.type = me || L + (q || ""), ie.interactable = Se, ie.t0 = Ae ? T.pointers[T.pointers.length - 1].downTime : Ye.t0, ie.x0 = T.coords.start.page.x - _e.x, ie.y0 = T.coords.start.page.y - _e.y, ie.clientX0 = T.coords.start.client.x - _e.x, ie.clientY0 = T.coords.start.client.y - _e.y, ie.delta = Ae || Be ? { x: 0, y: 0 } : { x: ie[$e].x - Ye[$e].x, y: ie[$e].y - Ye[$e].y }, ie.dt = T.coords.delta.timeStamp, ie.duration = ie.timeStamp - ie.t0, ie.velocity = re({}, T.coords.velocity[$e]), ie.speed = Le(ie.velocity.x, ie.velocity.y), ie.swipe = Be || q === "inertiastart" ? ie.getSwipe() : null, ie;
        }
        return l(w, [{ key: "getSwipe", value: function() {
          var T = this._interaction;
          if (T.prevEvent.speed < 600 || this.timeStamp - T.prevEvent.timeStamp > 150) return null;
          var _ = 180 * Math.atan2(T.prevEvent.velocityY, T.prevEvent.velocityX) / Math.PI;
          _ < 0 && (_ += 360);
          var L = 112.5 <= _ && _ < 247.5, q = 202.5 <= _ && _ < 337.5;
          return { up: q, down: !q && 22.5 <= _ && _ < 157.5, left: L, right: !L && (292.5 <= _ || _ < 67.5), angle: _, speed: T.prevEvent.speed, velocity: { x: T.prevEvent.velocityX, y: T.prevEvent.velocityY } };
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }]), w;
      })(vn);
      Object.defineProperties(oa.prototype, { pageX: { get: function() {
        return this.page.x;
      }, set: function(p) {
        this.page.x = p;
      } }, pageY: { get: function() {
        return this.page.y;
      }, set: function(p) {
        this.page.y = p;
      } }, clientX: { get: function() {
        return this.client.x;
      }, set: function(p) {
        this.client.x = p;
      } }, clientY: { get: function() {
        return this.client.y;
      }, set: function(p) {
        this.client.y = p;
      } }, dx: { get: function() {
        return this.delta.x;
      }, set: function(p) {
        this.delta.x = p;
      } }, dy: { get: function() {
        return this.delta.y;
      }, set: function(p) {
        this.delta.y = p;
      } }, velocityX: { get: function() {
        return this.velocity.x;
      }, set: function(p) {
        this.velocity.x = p;
      } }, velocityY: { get: function() {
        return this.velocity.y;
      }, set: function(p) {
        this.velocity.y = p;
      } } });
      var kl = l((function p(h, w, T, _, L) {
        a(this, p), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = h, this.pointer = w, this.event = T, this.downTime = _, this.downTarget = L;
      })), Fr = (function(p) {
        return p.interactable = "", p.element = "", p.prepared = "", p.pointerIsDown = "", p.pointerWasMoved = "", p._proxy = "", p;
      })({}), uc = (function(p) {
        return p.start = "", p.move = "", p.end = "", p.stop = "", p.interacting = "", p;
      })({}), nr = 0, El = (function() {
        function p(h) {
          var w = this, T = h.pointerType, _ = h.scopeFire;
          a(this, p), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = Ht((function(ie) {
            this.move(ie);
          }), "The interaction.doMove() method has been renamed to interaction.move()"), this.coords = { start: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, prev: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, cur: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, delta: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, velocity: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 } }, this._id = nr++, this._scopeFire = _, this.pointerType = T;
          var L = this;
          this._proxy = {};
          var q = function(ie) {
            Object.defineProperty(w._proxy, ie, { get: function() {
              return L[ie];
            } });
          };
          for (var X in Fr) q(X);
          var oe = function(ie) {
            Object.defineProperty(w._proxy, ie, { value: function() {
              return L[ie].apply(L, arguments);
            } });
          };
          for (var me in uc) oe(me);
          this._scopeFire("interactions:new", { interaction: this });
        }
        return l(p, [{ key: "pointerMoveTolerance", get: function() {
          return 1;
        } }, { key: "pointerDown", value: function(h, w, T) {
          var _ = this.updatePointer(h, w, T, !0), L = this.pointers[_];
          this._scopeFire("interactions:down", { pointer: h, event: w, eventTarget: T, pointerIndex: _, pointerInfo: L, type: "down", interaction: this });
        } }, { key: "start", value: function(h, w, T) {
          return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (h.name === "gesture" ? 2 : 1) || !w.options[h.name].enabled) && (sn(this.prepared, h), this.interactable = w, this.element = T, this.rect = w.getRect(T), this.edges = this.prepared.edges ? re({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
        } }, { key: "pointerMove", value: function(h, w, T) {
          this.simulation || this.modification && this.modification.endResult || this.updatePointer(h, w, T, !1);
          var _, L, q = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
          this.pointerIsDown && !this.pointerWasMoved && (_ = this.coords.cur.client.x - this.coords.start.client.x, L = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = Le(_, L) > this.pointerMoveTolerance);
          var X, oe, me, ie = this.getPointerIndex(h), Se = { pointer: h, pointerIndex: ie, pointerInfo: this.pointers[ie], event: w, type: "move", eventTarget: T, dx: _, dy: L, duplicate: q, interaction: this };
          q || (X = this.coords.velocity, oe = this.coords.delta, me = Math.max(oe.timeStamp / 1e3, 1e-3), X.page.x = oe.page.x / me, X.page.y = oe.page.y / me, X.client.x = oe.client.x / me, X.client.y = oe.client.y / me, X.timeStamp = me), this._scopeFire("interactions:move", Se), q || this.simulation || (this.interacting() && (Se.type = null, this.move(Se)), this.pointerWasMoved && it(this.coords.prev, this.coords.cur));
        } }, { key: "move", value: function(h) {
          h && h.event || Ke(this.coords.delta), (h = re({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, h || {})).phase = "move", this._doPhase(h);
        } }, { key: "pointerUp", value: function(h, w, T, _) {
          var L = this.getPointerIndex(h);
          L === -1 && (L = this.updatePointer(h, w, T, !1));
          var q = /cancel$/i.test(w.type) ? "cancel" : "up";
          this._scopeFire("interactions:".concat(q), { pointer: h, pointerIndex: L, pointerInfo: this.pointers[L], event: w, eventTarget: T, type: q, curEventTarget: _, interaction: this }), this.simulation || this.end(w), this.removePointer(h, w);
        } }, { key: "documentBlur", value: function(h) {
          this.end(h), this._scopeFire("interactions:blur", { event: h, type: "blur", interaction: this });
        } }, { key: "end", value: function(h) {
          var w;
          this._ending = !0, h = h || this._latestPointer.event, this.interacting() && (w = this._doPhase({ event: h, interaction: this, phase: "end" })), this._ending = !1, w === !0 && this.stop();
        } }, { key: "currentAction", value: function() {
          return this._interacting ? this.prepared.name : null;
        } }, { key: "interacting", value: function() {
          return this._interacting;
        } }, { key: "stop", value: function() {
          this._scopeFire("interactions:stop", { interaction: this }), this.interactable = this.element = null, this._interacting = !1, this._stopped = !0, this.prepared.name = this.prevEvent = null;
        } }, { key: "getPointerIndex", value: function(h) {
          var w = Je(h);
          return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : on(this.pointers, (function(T) {
            return T.id === w;
          }));
        } }, { key: "getPointerInfo", value: function(h) {
          return this.pointers[this.getPointerIndex(h)];
        } }, { key: "updatePointer", value: function(h, w, T, _) {
          var L, q, X, oe = Je(h), me = this.getPointerIndex(h), ie = this.pointers[me];
          return _ = _ !== !1 && (_ || /(down|start)$/i.test(w.type)), ie ? ie.pointer = h : (ie = new kl(oe, h, w, null, null), me = this.pointers.length, this.pointers.push(ie)), wt(this.coords.cur, this.pointers.map((function(Se) {
            return Se.pointer;
          })), this._now()), L = this.coords.delta, q = this.coords.prev, X = this.coords.cur, L.page.x = X.page.x - q.page.x, L.page.y = X.page.y - q.page.y, L.client.x = X.client.x - q.client.x, L.client.y = X.client.y - q.client.y, L.timeStamp = X.timeStamp - q.timeStamp, _ && (this.pointerIsDown = !0, ie.downTime = this.coords.cur.timeStamp, ie.downTarget = T, Ge(this.downPointer, h), this.interacting() || (it(this.coords.start, this.coords.cur), it(this.coords.prev, this.coords.cur), this.downEvent = w, this.pointerWasMoved = !1)), this._updateLatestPointer(h, w, T), this._scopeFire("interactions:update-pointer", { pointer: h, event: w, eventTarget: T, down: _, pointerInfo: ie, pointerIndex: me, interaction: this }), me;
        } }, { key: "removePointer", value: function(h, w) {
          var T = this.getPointerIndex(h);
          if (T !== -1) {
            var _ = this.pointers[T];
            this._scopeFire("interactions:remove-pointer", { pointer: h, event: w, eventTarget: null, pointerIndex: T, pointerInfo: _, interaction: this }), this.pointers.splice(T, 1), this.pointerIsDown = !1;
          }
        } }, { key: "_updateLatestPointer", value: function(h, w, T) {
          this._latestPointer.pointer = h, this._latestPointer.event = w, this._latestPointer.eventTarget = T;
        } }, { key: "destroy", value: function() {
          this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
        } }, { key: "_createPreparedEvent", value: function(h, w, T, _) {
          return new oa(this, h, this.prepared.name, w, this.element, T, _);
        } }, { key: "_fireEvent", value: function(h) {
          var w;
          (w = this.interactable) == null || w.fire(h), (!this.prevEvent || h.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = h);
        } }, { key: "_doPhase", value: function(h) {
          var w = h.event, T = h.phase, _ = h.preEnd, L = h.type, q = this.rect;
          if (q && T === "move" && (Fe(this.edges, q, this.coords.delta[this.interactable.options.deltaSource]), q.width = q.right - q.left, q.height = q.bottom - q.top), this._scopeFire("interactions:before-action-".concat(T), h) === !1) return !1;
          var X = h.iEvent = this._createPreparedEvent(w, T, _, L);
          return this._scopeFire("interactions:action-".concat(T), h), T === "start" && (this.prevEvent = X), this._fireEvent(X), this._scopeFire("interactions:after-action-".concat(T), h), !0;
        } }, { key: "_now", value: function() {
          return Date.now();
        } }]), p;
      })();
      function _l(p) {
        or(p.interaction);
      }
      function or(p) {
        if (!(function(w) {
          return !(!w.offset.pending.x && !w.offset.pending.y);
        })(p)) return !1;
        var h = p.offset.pending;
        return ia(p.coords.cur, h), ia(p.coords.delta, h), Fe(p.edges, p.rect, h), h.x = 0, h.y = 0, !0;
      }
      function Hf(p) {
        var h = p.x, w = p.y;
        this.offset.pending.x += h, this.offset.pending.y += w, this.offset.total.x += h, this.offset.total.y += w;
      }
      function ia(p, h) {
        var w = p.page, T = p.client, _ = h.x, L = h.y;
        w.x += _, w.y += L, T.x += _, T.y += L;
      }
      uc.offsetBy = "";
      var Vf = { id: "offset", before: ["modifiers", "pointer-events", "actions", "inertia"], install: function(p) {
        p.Interaction.prototype.offsetBy = Hf;
      }, listeners: { "interactions:new": function(p) {
        p.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
      }, "interactions:update-pointer": function(p) {
        return (function(h) {
          h.pointerIsDown && (ia(h.coords.cur, h.offset.total), h.offset.pending.x = 0, h.offset.pending.y = 0);
        })(p.interaction);
      }, "interactions:before-action-start": _l, "interactions:before-action-move": _l, "interactions:before-action-end": function(p) {
        var h = p.interaction;
        if (or(h)) return h.move({ offset: !0 }), h.end(), !1;
      }, "interactions:stop": function(p) {
        var h = p.interaction;
        h.offset.total.x = 0, h.offset.total.y = 0, h.offset.pending.x = 0, h.offset.pending.y = 0;
      } } }, Gs = Vf, Ks = (function() {
        function p(h) {
          a(this, p), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = h;
        }
        return l(p, [{ key: "start", value: function(h) {
          var w = this.interaction, T = ir(w);
          if (!T || !T.enabled) return !1;
          var _ = w.coords.velocity.client, L = Le(_.x, _.y), q = this.modification || (this.modification = new To(w));
          if (q.copyFrom(w.modification), this.t0 = w._now(), this.allowResume = T.allowResume, this.v0 = L, this.currentOffset = { x: 0, y: 0 }, this.startCoords = w.coords.cur.page, this.modifierArg = q.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - w.coords.cur.timeStamp < 50 && L > T.minSpeed && L > T.endSpeed) this.startInertia();
          else {
            if (q.result = q.setAll(this.modifierArg), !q.result.changed) return !1;
            this.startSmoothEnd();
          }
          return w.modification.result.rect = null, w.offsetBy(this.targetOffset), w._doPhase({ interaction: w, event: h, phase: "inertiastart" }), w.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), w.modification.result.rect = null, this.active = !0, w.simulation = this, !0;
        } }, { key: "startInertia", value: function() {
          var h = this, w = this.interaction.coords.velocity.client, T = ir(this.interaction), _ = T.resistance, L = -Math.log(T.endSpeed / this.v0) / _;
          this.targetOffset = { x: (w.x - L) / _, y: (w.y - L) / _ }, this.te = L, this.lambda_v0 = _ / this.v0, this.one_ve_v0 = 1 - T.endSpeed / this.v0;
          var q = this.modification, X = this.modifierArg;
          X.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, q.result = q.setAll(X), q.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + q.result.delta.x, y: this.targetOffset.y + q.result.delta.y }), this.onNextFrame((function() {
            return h.inertiaTick();
          }));
        } }, { key: "startSmoothEnd", value: function() {
          var h = this;
          this.smoothEnd = !0, this.isModified = !0, this.targetOffset = { x: this.modification.result.delta.x, y: this.modification.result.delta.y }, this.onNextFrame((function() {
            return h.smoothEndTick();
          }));
        } }, { key: "onNextFrame", value: function(h) {
          var w = this;
          this.timeout = Jt.request((function() {
            w.active && h();
          }));
        } }, { key: "inertiaTick", value: function() {
          var h, w, T, _, L, q, X, oe = this, me = this.interaction, ie = ir(me).resistance, Se = (me._now() - this.t0) / 1e3;
          if (Se < this.te) {
            var $e, _e = 1 - (Math.exp(-ie * Se) - this.lambda_v0) / this.one_ve_v0;
            this.isModified ? (h = 0, w = 0, T = this.targetOffset.x, _ = this.targetOffset.y, L = this.modifiedOffset.x, q = this.modifiedOffset.y, $e = { x: Oa(X = _e, h, T, L), y: Oa(X, w, _, q) }) : $e = { x: this.targetOffset.x * _e, y: this.targetOffset.y * _e };
            var Ae = { x: $e.x - this.currentOffset.x, y: $e.y - this.currentOffset.y };
            this.currentOffset.x += Ae.x, this.currentOffset.y += Ae.y, me.offsetBy(Ae), me.move(), this.onNextFrame((function() {
              return oe.inertiaTick();
            }));
          } else me.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "smoothEndTick", value: function() {
          var h = this, w = this.interaction, T = w._now() - this.t0, _ = ir(w).smoothEndDuration;
          if (T < _) {
            var L = { x: Ia(T, 0, this.targetOffset.x, _), y: Ia(T, 0, this.targetOffset.y, _) }, q = { x: L.x - this.currentOffset.x, y: L.y - this.currentOffset.y };
            this.currentOffset.x += q.x, this.currentOffset.y += q.y, w.offsetBy(q), w.move({ skipModifiers: this.modifierCount }), this.onNextFrame((function() {
              return h.smoothEndTick();
            }));
          } else w.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "resume", value: function(h) {
          var w = h.pointer, T = h.event, _ = h.eventTarget, L = this.interaction;
          L.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), L.updatePointer(w, T, _, !0), L._doPhase({ interaction: L, event: T, phase: "resume" }), it(L.coords.prev, L.coords.cur), this.stop();
        } }, { key: "end", value: function() {
          this.interaction.move(), this.interaction.end(), this.stop();
        } }, { key: "stop", value: function() {
          this.active = this.smoothEnd = !1, this.interaction.simulation = null, Jt.cancel(this.timeout);
        } }]), p;
      })();
      function ir(p) {
        var h = p.interactable, w = p.prepared;
        return h && h.options && w.name && h.options[w.name].inertia;
      }
      var Ys = { id: "inertia", before: ["modifiers", "actions"], install: function(p) {
        var h = p.defaults;
        p.usePlugin(Gs), p.usePlugin(er), p.actions.phases.inertiastart = !0, p.actions.phases.resume = !0, h.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
      }, listeners: { "interactions:new": function(p) {
        var h = p.interaction;
        h.inertia = new Ks(h);
      }, "interactions:before-action-end": function(p) {
        var h = p.interaction, w = p.event;
        return (!h._interacting || h.simulation || !h.inertia.start(w)) && null;
      }, "interactions:down": function(p) {
        var h = p.interaction, w = p.eventTarget, T = h.inertia;
        if (T.active) for (var _ = w; x.element(_); ) {
          if (_ === h.element) {
            T.resume(p);
            break;
          }
          _ = G(_);
        }
      }, "interactions:stop": function(p) {
        var h = p.interaction.inertia;
        h.active && h.stop();
      }, "interactions:before-action-resume": function(p) {
        var h = p.interaction.modification;
        h.stop(p), h.start(p, p.interaction.coords.cur.page), h.applyToInteraction(p);
      }, "interactions:before-action-inertiastart": function(p) {
        return p.interaction.modification.setAndApply(p);
      }, "interactions:action-resume": co, "interactions:action-inertiastart": co, "interactions:after-action-inertiastart": function(p) {
        return p.interaction.modification.restoreInteractionCoords(p);
      }, "interactions:after-action-resume": function(p) {
        return p.interaction.modification.restoreInteractionCoords(p);
      } } };
      function Oa(p, h, w, T) {
        var _ = 1 - p;
        return _ * _ * h + 2 * _ * p * w + p * p * T;
      }
      function Ia(p, h, w, T) {
        return -w * (p /= T) * (p - 2) + h;
      }
      var cc = Ys;
      function Us(p, h) {
        for (var w = 0; w < h.length; w++) {
          var T = h[w];
          if (p.immediatePropagationStopped) break;
          T(p);
        }
      }
      var Ma = (function() {
        function p(h) {
          a(this, p), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = re({}, h || {});
        }
        return l(p, [{ key: "fire", value: function(h) {
          var w, T = this.global;
          (w = this.types[h.type]) && Us(h, w), !h.propagationStopped && T && (w = T[h.type]) && Us(h, w);
        } }, { key: "on", value: function(h, w) {
          var T = We(h, w);
          for (h in T) this.types[h] = Dt(this.types[h] || [], T[h]);
        } }, { key: "off", value: function(h, w) {
          var T = We(h, w);
          for (h in T) {
            var _ = this.types[h];
            if (_ && _.length) for (var L = 0, q = T[h]; L < q.length; L++) {
              var X = q[L], oe = _.indexOf(X);
              oe !== -1 && _.splice(oe, 1);
            }
          }
        } }, { key: "getRect", value: function(h) {
          return null;
        } }]), p;
      })(), ar = (function() {
        function p(h) {
          a(this, p), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = h, Ge(this, h);
        }
        return l(p, [{ key: "preventOriginalDefault", value: function() {
          this.originalEvent.preventDefault();
        } }, { key: "stopPropagation", value: function() {
          this.originalEvent.stopPropagation();
        } }, { key: "stopImmediatePropagation", value: function() {
          this.originalEvent.stopImmediatePropagation();
        } }]), p;
      })();
      function rr(p) {
        return x.object(p) ? { capture: !!p.capture, passive: !!p.passive } : { capture: !!p, passive: !1 };
      }
      function Lr(p, h) {
        return p === h || (typeof p == "boolean" ? !!h.capture === p && !h.passive : !!p.capture == !!h.capture && !!p.passive == !!h.passive);
      }
      var Sn = { id: "events", install: function(p) {
        var h, w = [], T = {}, _ = [], L = { add: q, remove: X, addDelegate: function(ie, Se, $e, _e, Ae) {
          var Be = rr(Ae);
          if (!T[$e]) {
            T[$e] = [];
            for (var Ye = 0; Ye < _.length; Ye++) {
              var Ue = _[Ye];
              q(Ue, $e, oe), q(Ue, $e, me, !0);
            }
          }
          var rt = T[$e], mt = Qt(rt, (function(Ot) {
            return Ot.selector === ie && Ot.context === Se;
          }));
          mt || (mt = { selector: ie, context: Se, listeners: [] }, rt.push(mt)), mt.listeners.push({ func: _e, options: Be });
        }, removeDelegate: function(ie, Se, $e, _e, Ae) {
          var Be, Ye = rr(Ae), Ue = T[$e], rt = !1;
          if (Ue)
            for (Be = Ue.length - 1; Be >= 0; Be--) {
              var mt = Ue[Be];
              if (mt.selector === ie && mt.context === Se) {
                for (var Ot = mt.listeners, pt = Ot.length - 1; pt >= 0; pt--) {
                  var St = Ot[pt];
                  if (St.func === _e && Lr(St.options, Ye)) {
                    Ot.splice(pt, 1), Ot.length || (Ue.splice(Be, 1), X(Se, $e, oe), X(Se, $e, me, !0)), rt = !0;
                    break;
                  }
                }
                if (rt) break;
              }
            }
        }, delegateListener: oe, delegateUseCapture: me, delegatedEvents: T, documents: _, targets: w, supportsOptions: !1, supportsPassive: !1 };
        function q(ie, Se, $e, _e) {
          if (ie.addEventListener) {
            var Ae = rr(_e), Be = Qt(w, (function(Ye) {
              return Ye.eventTarget === ie;
            }));
            Be || (Be = { eventTarget: ie, events: {} }, w.push(Be)), Be.events[Se] || (Be.events[Se] = []), Qt(Be.events[Se], (function(Ye) {
              return Ye.func === $e && Lr(Ye.options, Ae);
            })) || (ie.addEventListener(Se, $e, L.supportsOptions ? Ae : Ae.capture), Be.events[Se].push({ func: $e, options: Ae }));
          }
        }
        function X(ie, Se, $e, _e) {
          if (ie.addEventListener && ie.removeEventListener) {
            var Ae = on(w, (function(un) {
              return un.eventTarget === ie;
            })), Be = w[Ae];
            if (Be && Be.events) if (Se !== "all") {
              var Ye = !1, Ue = Be.events[Se];
              if (Ue) {
                if ($e === "all") {
                  for (var rt = Ue.length - 1; rt >= 0; rt--) {
                    var mt = Ue[rt];
                    X(ie, Se, mt.func, mt.options);
                  }
                  return;
                }
                for (var Ot = rr(_e), pt = 0; pt < Ue.length; pt++) {
                  var St = Ue[pt];
                  if (St.func === $e && Lr(St.options, Ot)) {
                    ie.removeEventListener(Se, $e, L.supportsOptions ? Ot : Ot.capture), Ue.splice(pt, 1), Ue.length === 0 && (delete Be.events[Se], Ye = !0);
                    break;
                  }
                }
              }
              Ye && !Object.keys(Be.events).length && w.splice(Ae, 1);
            } else for (Se in Be.events) Be.events.hasOwnProperty(Se) && X(ie, Se, "all");
          }
        }
        function oe(ie, Se) {
          for (var $e = rr(Se), _e = new ar(ie), Ae = T[ie.type], Be = Xt(ie)[0], Ye = Be; x.element(Ye); ) {
            for (var Ue = 0; Ue < Ae.length; Ue++) {
              var rt = Ae[Ue], mt = rt.selector, Ot = rt.context;
              if (Y(Ye, mt) && j(Ot, Be) && j(Ot, Ye)) {
                var pt = rt.listeners;
                _e.currentTarget = Ye;
                for (var St = 0; St < pt.length; St++) {
                  var un = pt[St];
                  Lr(un.options, $e) && un.func(_e);
                }
              }
            }
            Ye = G(Ye);
          }
        }
        function me(ie) {
          return oe(ie, !0);
        }
        return (h = p.document) == null || h.createElement("div").addEventListener("test", null, { get capture() {
          return L.supportsOptions = !0;
        }, get passive() {
          return L.supportsPassive = !0;
        } }), p.events = L, L;
      } }, yn = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(p) {
        for (var h = 0, w = yn.methodOrder; h < w.length; h++) {
          var T = w[h], _ = yn[T](p);
          if (_) return _;
        }
        return null;
      }, simulationResume: function(p) {
        var h = p.pointerType, w = p.eventType, T = p.eventTarget, _ = p.scope;
        if (!/down|start/i.test(w)) return null;
        for (var L = 0, q = _.interactions.list; L < q.length; L++) {
          var X = q[L], oe = T;
          if (X.simulation && X.simulation.allowResume && X.pointerType === h) for (; oe; ) {
            if (oe === X.element) return X;
            oe = G(oe);
          }
        }
        return null;
      }, mouseOrPen: function(p) {
        var h, w = p.pointerId, T = p.pointerType, _ = p.eventType, L = p.scope;
        if (T !== "mouse" && T !== "pen") return null;
        for (var q = 0, X = L.interactions.list; q < X.length; q++) {
          var oe = X[q];
          if (oe.pointerType === T) {
            if (oe.simulation && !Ai(oe, w)) continue;
            if (oe.interacting()) return oe;
            h || (h = oe);
          }
        }
        if (h) return h;
        for (var me = 0, ie = L.interactions.list; me < ie.length; me++) {
          var Se = ie[me];
          if (!(Se.pointerType !== T || /down/i.test(_) && Se.simulation)) return Se;
        }
        return null;
      }, hasPointer: function(p) {
        for (var h = p.pointerId, w = 0, T = p.scope.interactions.list; w < T.length; w++) {
          var _ = T[w];
          if (Ai(_, h)) return _;
        }
        return null;
      }, idle: function(p) {
        for (var h = p.pointerType, w = 0, T = p.scope.interactions.list; w < T.length; w++) {
          var _ = T[w];
          if (_.pointers.length === 1) {
            var L = _.interactable;
            if (L && (!L.options.gesture || !L.options.gesture.enabled)) continue;
          } else if (_.pointers.length >= 2) continue;
          if (!_.interacting() && h === _.pointerType) return _;
        }
        return null;
      } };
      function Ai(p, h) {
        return p.pointers.some((function(w) {
          return w.id === h;
        }));
      }
      var no = yn, Kn = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
      function Un(p, h) {
        return function(w) {
          var T = h.interactions.list, _ = Rt(w), L = Xt(w), q = L[0], X = L[1], oe = [];
          if (/^touch/.test(w.type)) {
            h.prevTouchTime = h.now();
            for (var me = 0, ie = w.changedTouches; me < ie.length; me++) {
              var Se = ie[me], $e = { pointer: Se, pointerId: Je(Se), pointerType: _, eventType: w.type, eventTarget: q, curEventTarget: X, scope: h }, _e = xn($e);
              oe.push([$e.pointer, $e.eventTarget, $e.curEventTarget, _e]);
            }
          } else {
            var Ae = !1;
            if (!U.supportsPointerEvent && /mouse/.test(w.type)) {
              for (var Be = 0; Be < T.length && !Ae; Be++) Ae = T[Be].pointerType !== "mouse" && T[Be].pointerIsDown;
              Ae = Ae || h.now() - h.prevTouchTime < 500 || w.timeStamp === 0;
            }
            if (!Ae) {
              var Ye = { pointer: w, pointerId: Je(w), pointerType: _, eventType: w.type, curEventTarget: X, eventTarget: q, scope: h }, Ue = xn(Ye);
              oe.push([Ye.pointer, Ye.eventTarget, Ye.curEventTarget, Ue]);
            }
          }
          for (var rt = 0; rt < oe.length; rt++) {
            var mt = oe[rt], Ot = mt[0], pt = mt[1], St = mt[2];
            mt[3][p](Ot, w, pt, St);
          }
        };
      }
      function xn(p) {
        var h = p.pointerType, w = p.scope, T = { interaction: no.search(p), searchDetails: p };
        return w.fire("interactions:find", T), T.interaction || w.interactions.new({ pointerType: h });
      }
      function aa(p, h) {
        var w = p.doc, T = p.scope, _ = p.options, L = T.interactions.docEvents, q = T.events, X = q[h];
        for (var oe in T.browser.isIOS && !_.events && (_.events = { passive: !1 }), q.delegatedEvents) X(w, oe, q.delegateListener), X(w, oe, q.delegateUseCapture, !0);
        for (var me = _ && _.events, ie = 0; ie < L.length; ie++) {
          var Se = L[ie];
          X(w, Se.type, Se.listener, me);
        }
      }
      var Al = { id: "core/interactions", install: function(p) {
        for (var h = {}, w = 0; w < Kn.length; w++) {
          var T = Kn[w];
          h[T] = Un(T, p);
        }
        var _, L = U.pEventTypes;
        function q() {
          for (var X = 0, oe = p.interactions.list; X < oe.length; X++) {
            var me = oe[X];
            if (me.pointerIsDown && me.pointerType === "touch" && !me._interacting) for (var ie = function() {
              var _e = $e[Se];
              p.documents.some((function(Ae) {
                return j(Ae.doc, _e.downTarget);
              })) || me.removePointer(_e.pointer, _e.event);
            }, Se = 0, $e = me.pointers; Se < $e.length; Se++) ie();
          }
        }
        (_ = F.PointerEvent ? [{ type: L.down, listener: q }, { type: L.down, listener: h.pointerDown }, { type: L.move, listener: h.pointerMove }, { type: L.up, listener: h.pointerUp }, { type: L.cancel, listener: h.pointerUp }] : [{ type: "mousedown", listener: h.pointerDown }, { type: "mousemove", listener: h.pointerMove }, { type: "mouseup", listener: h.pointerUp }, { type: "touchstart", listener: q }, { type: "touchstart", listener: h.pointerDown }, { type: "touchmove", listener: h.pointerMove }, { type: "touchend", listener: h.pointerUp }, { type: "touchcancel", listener: h.pointerUp }]).push({ type: "blur", listener: function(X) {
          for (var oe = 0, me = p.interactions.list; oe < me.length; oe++)
            me[oe].documentBlur(X);
        } }), p.prevTouchTime = 0, p.Interaction = (function(X) {
          u(me, X);
          var oe = g(me);
          function me() {
            return a(this, me), oe.apply(this, arguments);
          }
          return l(me, [{ key: "pointerMoveTolerance", get: function() {
            return p.interactions.pointerMoveTolerance;
          }, set: function(ie) {
            p.interactions.pointerMoveTolerance = ie;
          } }, { key: "_now", value: function() {
            return p.now();
          } }]), me;
        })(El), p.interactions = { list: [], new: function(X) {
          X.scopeFire = function(me, ie) {
            return p.fire(me, ie);
          };
          var oe = new p.Interaction(X);
          return p.interactions.list.push(oe), oe;
        }, listeners: h, docEvents: _, pointerMoveTolerance: 1 }, p.usePlugin(Qa);
      }, listeners: { "scope:add-document": function(p) {
        return aa(p, "add");
      }, "scope:remove-document": function(p) {
        return aa(p, "remove");
      }, "interactable:unset": function(p, h) {
        for (var w = p.interactable, T = h.interactions.list.length - 1; T >= 0; T--) {
          var _ = h.interactions.list[T];
          _.interactable === w && (_.stop(), h.fire("interactions:destroy", { interaction: _ }), _.destroy(), h.interactions.list.length > 2 && h.interactions.list.splice(T, 1));
        }
      } }, onDocSignal: aa, doOnInteractions: Un, methodNames: Kn }, jf = Al, vo = (function(p) {
        return p[p.On = 0] = "On", p[p.Off = 1] = "Off", p;
      })(vo || {}), gi = (function() {
        function p(h, w, T, _) {
          a(this, p), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new Ma(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = w.actions, this.target = h, this._context = w.context || T, this._win = $(we(h) ? this._context : h), this._doc = this._win.document, this._scopeEvents = _, this.set(w);
        }
        return l(p, [{ key: "_defaults", get: function() {
          return { base: {}, perAction: {}, actions: {} };
        } }, { key: "setOnEvents", value: function(h, w) {
          return x.func(w.onstart) && this.on("".concat(h, "start"), w.onstart), x.func(w.onmove) && this.on("".concat(h, "move"), w.onmove), x.func(w.onend) && this.on("".concat(h, "end"), w.onend), x.func(w.oninertiastart) && this.on("".concat(h, "inertiastart"), w.oninertiastart), this;
        } }, { key: "updatePerActionListeners", value: function(h, w, T) {
          var _, L = this, q = (_ = this._actions.map[h]) == null ? void 0 : _.filterEventType, X = function(oe) {
            return (q == null || q(oe)) && Za(oe, L._actions);
          };
          (x.array(w) || x.object(w)) && this._onOff(vo.Off, h, w, void 0, X), (x.array(T) || x.object(T)) && this._onOff(vo.On, h, T, void 0, X);
        } }, { key: "setPerAction", value: function(h, w) {
          var T = this._defaults;
          for (var _ in w) {
            var L = _, q = this.options[h], X = w[L];
            L === "listeners" && this.updatePerActionListeners(h, q.listeners, X), x.array(X) ? q[L] = zn(X) : x.plainObject(X) ? (q[L] = re(q[L] || {}, Nn(X)), x.object(T.perAction[L]) && "enabled" in T.perAction[L] && (q[L].enabled = X.enabled !== !1)) : x.bool(X) && x.object(T.perAction[L]) ? q[L].enabled = X : q[L] = X;
          }
        } }, { key: "getRect", value: function(h) {
          return h = h || (x.element(this.target) ? this.target : null), x.string(this.target) && (h = h || this._context.querySelector(this.target)), de(h);
        } }, { key: "rectChecker", value: function(h) {
          var w = this;
          return x.func(h) ? (this.getRect = function(T) {
            var _ = re({}, h.apply(w, T));
            return "width" in _ || (_.width = _.right - _.left, _.height = _.bottom - _.top), _;
          }, this) : h === null ? (delete this.getRect, this) : this.getRect;
        } }, { key: "_backCompatOption", value: function(h, w) {
          if (we(w) || x.object(w)) {
            for (var T in this.options[h] = w, this._actions.map) this.options[T][h] = w;
            return this;
          }
          return this.options[h];
        } }, { key: "origin", value: function(h) {
          return this._backCompatOption("origin", h);
        } }, { key: "deltaSource", value: function(h) {
          return h === "page" || h === "client" ? (this.options.deltaSource = h, this) : this.options.deltaSource;
        } }, { key: "getAllElements", value: function() {
          var h = this.target;
          return x.string(h) ? Array.from(this._context.querySelectorAll(h)) : x.func(h) && h.getAllElements ? h.getAllElements() : x.element(h) ? [h] : [];
        } }, { key: "context", value: function() {
          return this._context;
        } }, { key: "inContext", value: function(h) {
          return this._context === h.ownerDocument || j(this._context, h);
        } }, { key: "testIgnoreAllow", value: function(h, w, T) {
          return !this.testIgnore(h.ignoreFrom, w, T) && this.testAllow(h.allowFrom, w, T);
        } }, { key: "testAllow", value: function(h, w, T) {
          return !h || !!x.element(T) && (x.string(h) ? be(T, h, w) : !!x.element(h) && j(h, T));
        } }, { key: "testIgnore", value: function(h, w, T) {
          return !(!h || !x.element(T)) && (x.string(h) ? be(T, h, w) : !!x.element(h) && j(h, T));
        } }, { key: "fire", value: function(h) {
          return this.events.fire(h), this;
        } }, { key: "_onOff", value: function(h, w, T, _, L) {
          x.object(w) && !x.array(w) && (_ = T, T = null);
          var q = We(w, T, L);
          for (var X in q) {
            X === "wheel" && (X = U.wheelEvent);
            for (var oe = 0, me = q[X]; oe < me.length; oe++) {
              var ie = me[oe];
              Za(X, this._actions) ? this.events[h === vo.On ? "on" : "off"](X, ie) : x.string(this.target) ? this._scopeEvents[h === vo.On ? "addDelegate" : "removeDelegate"](this.target, this._context, X, ie, _) : this._scopeEvents[h === vo.On ? "add" : "remove"](this.target, X, ie, _);
            }
          }
          return this;
        } }, { key: "on", value: function(h, w, T) {
          return this._onOff(vo.On, h, w, T);
        } }, { key: "off", value: function(h, w, T) {
          return this._onOff(vo.Off, h, w, T);
        } }, { key: "set", value: function(h) {
          var w = this._defaults;
          for (var T in x.object(h) || (h = {}), this.options = Nn(w.base), this._actions.methodDict) {
            var _ = T, L = this._actions.methodDict[_];
            this.options[_] = {}, this.setPerAction(_, re(re({}, w.perAction), w.actions[_])), this[L](h[_]);
          }
          for (var q in h) q !== "getRect" ? x.func(this[q]) && this[q](h[q]) : this.rectChecker(h.getRect);
          return this;
        } }, { key: "unset", value: function() {
          if (x.string(this.target)) for (var h in this._scopeEvents.delegatedEvents) for (var w = this._scopeEvents.delegatedEvents[h], T = w.length - 1; T >= 0; T--) {
            var _ = w[T], L = _.selector, q = _.context, X = _.listeners;
            L === this.target && q === this._context && w.splice(T, 1);
            for (var oe = X.length - 1; oe >= 0; oe--) this._scopeEvents.removeDelegate(this.target, this._context, h, X[oe][0], X[oe][1]);
          }
          else this._scopeEvents.remove(this.target, "all");
        } }]), p;
      })(), Wf = (function() {
        function p(h) {
          var w = this;
          a(this, p), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = h, h.addListeners({ "interactable:unset": function(T) {
            var _ = T.interactable, L = _.target, q = x.string(L) ? w.selectorMap[L] : L[w.scope.id], X = on(q, (function(oe) {
              return oe === _;
            }));
            q.splice(X, 1);
          } });
        }
        return l(p, [{ key: "new", value: function(h, w) {
          w = re(w || {}, { actions: this.scope.actions });
          var T = new this.scope.Interactable(h, w, this.scope.document, this.scope.events);
          return this.scope.addDocument(T._doc), this.list.push(T), x.string(h) ? (this.selectorMap[h] || (this.selectorMap[h] = []), this.selectorMap[h].push(T)) : (T.target[this.scope.id] || Object.defineProperty(h, this.scope.id, { value: [], configurable: !0 }), h[this.scope.id].push(T)), this.scope.fire("interactable:new", { target: h, options: w, interactable: T, win: this.scope._win }), T;
        } }, { key: "getExisting", value: function(h, w) {
          var T = w && w.context || this.scope.document, _ = x.string(h), L = _ ? this.selectorMap[h] : h[this.scope.id];
          if (L) return Qt(L, (function(q) {
            return q._context === T && (_ || q.inContext(h));
          }));
        } }, { key: "forEachMatch", value: function(h, w) {
          for (var T = 0, _ = this.list; T < _.length; T++) {
            var L = _[T], q = void 0;
            if ((x.string(L.target) ? x.element(h) && Y(h, L.target) : h === L.target) && L.inContext(h) && (q = w(L)), q !== void 0) return q;
          }
        } }]), p;
      })(), qf = (function() {
        function p() {
          var h = this;
          a(this, p), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = U, this.defaults = Nn(tr), this.Eventable = Ma, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(T) {
            var _ = function L(q, X) {
              var oe = T.interactables.getExisting(q, X);
              return oe || ((oe = T.interactables.new(q, X)).events.global = L.globalEvents), oe;
            };
            return _.getPointerAverage = qe, _.getTouchBBox = at, _.getTouchDistance = dt, _.getTouchAngle = vt, _.getElementRect = de, _.getElementClientRect = he, _.matchesSelector = Y, _.closest = ae, _.globalEvents = {}, _.version = "1.10.27", _.scope = T, _.use = function(L, q) {
              return this.scope.usePlugin(L, q), this;
            }, _.isSet = function(L, q) {
              return !!this.scope.interactables.get(L, q && q.context);
            }, _.on = Ht((function(L, q, X) {
              if (x.string(L) && L.search(" ") !== -1 && (L = L.trim().split(/ +/)), x.array(L)) {
                for (var oe = 0, me = L; oe < me.length; oe++) {
                  var ie = me[oe];
                  this.on(ie, q, X);
                }
                return this;
              }
              if (x.object(L)) {
                for (var Se in L) this.on(Se, L[Se], q);
                return this;
              }
              return Za(L, this.scope.actions) ? this.globalEvents[L] ? this.globalEvents[L].push(q) : this.globalEvents[L] = [q] : this.scope.events.add(this.scope.document, L, q, { options: X }), this;
            }), "The interact.on() method is being deprecated"), _.off = Ht((function(L, q, X) {
              if (x.string(L) && L.search(" ") !== -1 && (L = L.trim().split(/ +/)), x.array(L)) {
                for (var oe = 0, me = L; oe < me.length; oe++) {
                  var ie = me[oe];
                  this.off(ie, q, X);
                }
                return this;
              }
              if (x.object(L)) {
                for (var Se in L) this.off(Se, L[Se], q);
                return this;
              }
              var $e;
              return Za(L, this.scope.actions) ? L in this.globalEvents && ($e = this.globalEvents[L].indexOf(q)) !== -1 && this.globalEvents[L].splice($e, 1) : this.scope.events.remove(this.scope.document, L, q, X), this;
            }), "The interact.off() method is being deprecated"), _.debug = function() {
              return this.scope;
            }, _.supportsTouch = function() {
              return U.supportsTouch;
            }, _.supportsPointerEvent = function() {
              return U.supportsPointerEvent;
            }, _.stop = function() {
              for (var L = 0, q = this.scope.interactions.list; L < q.length; L++) q[L].stop();
              return this;
            }, _.pointerMoveTolerance = function(L) {
              return x.number(L) ? (this.scope.interactions.pointerMoveTolerance = L, this) : this.scope.interactions.pointerMoveTolerance;
            }, _.addDocument = function(L, q) {
              this.scope.addDocument(L, q);
            }, _.removeDocument = function(L) {
              this.scope.removeDocument(L);
            }, _;
          })(this), this.InteractEvent = oa, this.Interactable = void 0, this.interactables = new Wf(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(T) {
            return h.removeDocument(T.target);
          };
          var w = this;
          this.Interactable = (function(T) {
            u(L, T);
            var _ = g(L);
            function L() {
              return a(this, L), _.apply(this, arguments);
            }
            return l(L, [{ key: "_defaults", get: function() {
              return w.defaults;
            } }, { key: "set", value: function(q) {
              return m(c(L.prototype), "set", this).call(this, q), w.fire("interactable:set", { options: q, interactable: this }), this;
            } }, { key: "unset", value: function() {
              m(c(L.prototype), "unset", this).call(this);
              var q = w.interactables.list.indexOf(this);
              q < 0 || (w.interactables.list.splice(q, 1), w.fire("interactable:unset", { interactable: this }));
            } }]), L;
          })(gi);
        }
        return l(p, [{ key: "addListeners", value: function(h, w) {
          this.listenerMaps.push({ id: w, map: h });
        } }, { key: "fire", value: function(h, w) {
          for (var T = 0, _ = this.listenerMaps; T < _.length; T++) {
            var L = _[T].map[h];
            if (L && L(w, this, h) === !1) return !1;
          }
        } }, { key: "init", value: function(h) {
          return this.isInitialized ? this : (function(w, T) {
            return w.isInitialized = !0, x.window(T) && O(T), F.init(T), U.init(T), Jt.init(T), w.window = T, w.document = T.document, w.usePlugin(jf), w.usePlugin(Sn), w;
          })(this, h);
        } }, { key: "pluginIsInstalled", value: function(h) {
          var w = h.id;
          return w ? !!this._plugins.map[w] : this._plugins.list.indexOf(h) !== -1;
        } }, { key: "usePlugin", value: function(h, w) {
          if (!this.isInitialized) return this;
          if (this.pluginIsInstalled(h)) return this;
          if (h.id && (this._plugins.map[h.id] = h), this._plugins.list.push(h), h.install && h.install(this, w), h.listeners && h.before) {
            for (var T = 0, _ = this.listenerMaps.length, L = h.before.reduce((function(X, oe) {
              return X[oe] = !0, X[dc(oe)] = !0, X;
            }), {}); T < _; T++) {
              var q = this.listenerMaps[T].id;
              if (q && (L[q] || L[dc(q)])) break;
            }
            this.listenerMaps.splice(T, 0, { id: h.id, map: h.listeners });
          } else h.listeners && this.listenerMaps.push({ id: h.id, map: h.listeners });
          return this;
        } }, { key: "addDocument", value: function(h, w) {
          if (this.getDocIndex(h) !== -1) return !1;
          var T = $(h);
          w = w ? re({}, w) : {}, this.documents.push({ doc: h, options: w }), this.events.documents.push(h), h !== this.document && this.events.add(T, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: h, window: T, scope: this, options: w });
        } }, { key: "removeDocument", value: function(h) {
          var w = this.getDocIndex(h), T = $(h), _ = this.documents[w].options;
          this.events.remove(T, "unload", this.onWindowUnload), this.documents.splice(w, 1), this.events.documents.splice(w, 1), this.fire("scope:remove-document", { doc: h, window: T, scope: this, options: _ });
        } }, { key: "getDocIndex", value: function(h) {
          for (var w = 0; w < this.documents.length; w++) if (this.documents[w].doc === h) return w;
          return -1;
        } }, { key: "getDocOptions", value: function(h) {
          var w = this.getDocIndex(h);
          return w === -1 ? null : this.documents[w].options;
        } }, { key: "now", value: function() {
          return (this.window.Date || Date).now();
        } }]), p;
      })();
      function dc(p) {
        return p && p.replace(/\/.*$/, "");
      }
      var fc = new qf(), En = fc.interactStatic, ra = typeof globalThis < "u" ? globalThis : window;
      fc.init(ra);
      var Ta = Object.freeze({ __proto__: null, edgeTarget: function() {
      }, elements: function() {
      }, grid: function(p) {
        var h = [["x", "y"], ["left", "top"], ["right", "bottom"], ["width", "height"]].filter((function(T) {
          var _ = T[0], L = T[1];
          return _ in p || L in p;
        })), w = function(T, _) {
          for (var L = p.range, q = p.limits, X = q === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : q, oe = p.offset, me = oe === void 0 ? { x: 0, y: 0 } : oe, ie = { range: L, grid: p, x: null, y: null }, Se = 0; Se < h.length; Se++) {
            var $e = h[Se], _e = $e[0], Ae = $e[1], Be = Math.round((T - me.x) / p[_e]), Ye = Math.round((_ - me.y) / p[Ae]);
            ie[_e] = Math.max(X.left, Math.min(X.right, Be * p[_e] + me.x)), ie[Ae] = Math.max(X.top, Math.min(X.bottom, Ye * p[Ae] + me.y));
          }
          return ie;
        };
        return w.grid = p, w.coordFields = h, w;
      } }), lr = { id: "snappers", install: function(p) {
        var h = p.interactStatic;
        h.snappers = re(h.snappers || {}, Ta), h.createSnapGrid = h.snappers.grid;
      } }, Gf = lr, hi = { start: function(p) {
        var h = p.state, w = p.rect, T = p.edges, _ = p.pageCoords, L = h.options, q = L.ratio, X = L.enabled, oe = h.options, me = oe.equalDelta, ie = oe.modifiers;
        q === "preserve" && (q = w.width / w.height), h.startCoords = re({}, _), h.startRect = re({}, w), h.ratio = q, h.equalDelta = me;
        var Se = h.linkedEdges = { top: T.top || T.left && !T.bottom, left: T.left || T.top && !T.right, bottom: T.bottom || T.right && !T.top, right: T.right || T.bottom && !T.left };
        if (h.xIsPrimaryAxis = !(!T.left && !T.right), h.equalDelta) {
          var $e = (Se.left ? 1 : -1) * (Se.top ? 1 : -1);
          h.edgeSign = { x: $e, y: $e };
        } else h.edgeSign = { x: Se.left ? -1 : 1, y: Se.top ? -1 : 1 };
        if (X !== !1 && re(T, Se), ie != null && ie.length) {
          var _e = new To(p.interaction);
          _e.copyFrom(p.interaction.modification), _e.prepareStates(ie), h.subModification = _e, _e.startAll(o({}, p));
        }
      }, set: function(p) {
        var h = p.state, w = p.rect, T = p.coords, _ = h.linkedEdges, L = re({}, T), q = h.equalDelta ? Kf : pc;
        if (re(p.edges, _), q(h, h.xIsPrimaryAxis, T, w), !h.subModification) return null;
        var X = re({}, w);
        Fe(_, X, { x: T.x - L.x, y: T.y - L.y });
        var oe = h.subModification.setAll(o(o({}, p), {}, { rect: X, edges: _, pageCoords: T, prevCoords: T, prevRect: X })), me = oe.delta;
        return oe.changed && (q(h, Math.abs(me.x) > Math.abs(me.y), oe.coords, oe.rect), re(T, oe.coords)), oe.eventProps;
      }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
      function Kf(p, h, w) {
        var T = p.startCoords, _ = p.edgeSign;
        h ? w.y = T.y + (w.x - T.x) * _.y : w.x = T.x + (w.y - T.y) * _.x;
      }
      function pc(p, h, w, T) {
        var _ = p.startRect, L = p.startCoords, q = p.ratio, X = p.edgeSign;
        if (h) {
          var oe = T.width / q;
          w.y = L.y + (oe - _.height) * X.y;
        } else {
          var me = T.height * q;
          w.x = L.x + (me - _.width) * X.x;
        }
      }
      var gc = ko(hi, "aspectRatio"), sr = function() {
      };
      sr._defaults = {};
      var la = sr;
      function ka(p, h, w) {
        return x.func(p) ? ve(p, h.interactable, h.element, [w.x, w.y, h]) : ve(p, h.interactable, h.element);
      }
      var ur = { start: function(p) {
        var h = p.rect, w = p.startOffset, T = p.state, _ = p.interaction, L = p.pageCoords, q = T.options, X = q.elementRect, oe = re({ left: 0, top: 0, right: 0, bottom: 0 }, q.offset || {});
        if (h && X) {
          var me = ka(q.restriction, _, L);
          if (me) {
            var ie = me.right - me.left - h.width, Se = me.bottom - me.top - h.height;
            ie < 0 && (oe.left += ie, oe.right += ie), Se < 0 && (oe.top += Se, oe.bottom += Se);
          }
          oe.left += w.left - h.width * X.left, oe.top += w.top - h.height * X.top, oe.right += w.right - h.width * (1 - X.right), oe.bottom += w.bottom - h.height * (1 - X.bottom);
        }
        T.offset = oe;
      }, set: function(p) {
        var h = p.coords, w = p.interaction, T = p.state, _ = T.options, L = T.offset, q = ka(_.restriction, w, h);
        if (q) {
          var X = (function(oe) {
            return !oe || "left" in oe && "top" in oe || ((oe = re({}, oe)).left = oe.x || 0, oe.top = oe.y || 0, oe.right = oe.right || oe.left + oe.width, oe.bottom = oe.bottom || oe.top + oe.height), oe;
          })(q);
          h.x = Math.max(Math.min(X.right - L.right, h.x), X.left + L.left), h.y = Math.max(Math.min(X.bottom - L.bottom, h.y), X.top + L.top);
        }
      }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Yf = ko(ur, "restrict"), sa = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, Di = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
      function cr(p, h) {
        for (var w = 0, T = ["top", "left", "bottom", "right"]; w < T.length; w++) {
          var _ = T[w];
          _ in p || (p[_] = h[_]);
        }
        return p;
      }
      var dr = { noInner: sa, noOuter: Di, start: function(p) {
        var h, w = p.interaction, T = p.startOffset, _ = p.state, L = _.options;
        L && (h = Me(ka(L.offset, w, w.coords.start.page))), h = h || { x: 0, y: 0 }, _.offset = { top: h.y + T.top, left: h.x + T.left, bottom: h.y - T.bottom, right: h.x - T.right };
      }, set: function(p) {
        var h = p.coords, w = p.edges, T = p.interaction, _ = p.state, L = _.offset, q = _.options;
        if (w) {
          var X = re({}, h), oe = ka(q.inner, T, X) || {}, me = ka(q.outer, T, X) || {};
          cr(oe, sa), cr(me, Di), w.top ? h.y = Math.min(Math.max(me.top + L.top, X.y), oe.top + L.top) : w.bottom && (h.y = Math.max(Math.min(me.bottom + L.bottom, X.y), oe.bottom + L.bottom)), w.left ? h.x = Math.min(Math.max(me.left + L.left, X.x), oe.left + L.left) : w.right && (h.x = Math.max(Math.min(me.right + L.right, X.x), oe.right + L.right));
        }
      }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Xs = ko(dr, "restrictEdges"), Qs = re({ get elementRect() {
        return { top: 0, left: 0, bottom: 1, right: 1 };
      }, set elementRect(p) {
      } }, ur.defaults), Dl = ko({ start: ur.start, set: ur.set, defaults: Qs }, "restrictRect"), hc = { width: -1 / 0, height: -1 / 0 }, vc = { width: 1 / 0, height: 1 / 0 }, mc = ko({ start: function(p) {
        return dr.start(p);
      }, set: function(p) {
        var h = p.interaction, w = p.state, T = p.rect, _ = p.edges, L = w.options;
        if (_) {
          var q = ke(ka(L.min, h, p.coords)) || hc, X = ke(ka(L.max, h, p.coords)) || vc;
          w.options = { endOnly: L.endOnly, inner: re({}, dr.noInner), outer: re({}, dr.noOuter) }, _.top ? (w.options.inner.top = T.bottom - q.height, w.options.outer.top = T.bottom - X.height) : _.bottom && (w.options.inner.bottom = T.top + q.height, w.options.outer.bottom = T.top + X.height), _.left ? (w.options.inner.left = T.right - q.width, w.options.outer.left = T.right - X.width) : _.right && (w.options.inner.right = T.left + q.width, w.options.outer.right = T.left + X.width), dr.set(p), w.options = L;
        }
      }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), zl = { start: function(p) {
        var h, w = p.interaction, T = p.interactable, _ = p.element, L = p.rect, q = p.state, X = p.startOffset, oe = q.options, me = oe.offsetWithOrigin ? (function($e) {
          var _e = $e.interaction.element, Ae = Me(ve($e.state.options.origin, null, null, [_e])), Be = Ae || Re($e.interactable, _e, $e.interaction.prepared.name);
          return Be;
        })(p) : { x: 0, y: 0 };
        if (oe.offset === "startCoords") h = { x: w.coords.start.page.x, y: w.coords.start.page.y };
        else {
          var ie = ve(oe.offset, T, _, [w]);
          (h = Me(ie) || { x: 0, y: 0 }).x += me.x, h.y += me.y;
        }
        var Se = oe.relativePoints;
        q.offsets = L && Se && Se.length ? Se.map((function($e, _e) {
          return { index: _e, relativePoint: $e, x: X.left - L.width * $e.x + h.x, y: X.top - L.height * $e.y + h.y };
        })) : [{ index: 0, relativePoint: null, x: h.x, y: h.y }];
      }, set: function(p) {
        var h = p.interaction, w = p.coords, T = p.state, _ = T.options, L = T.offsets, q = Re(h.interactable, h.element, h.prepared.name), X = re({}, w), oe = [];
        _.offsetWithOrigin || (X.x -= q.x, X.y -= q.y);
        for (var me = 0, ie = L; me < ie.length; me++) for (var Se = ie[me], $e = X.x - Se.x, _e = X.y - Se.y, Ae = 0, Be = _.targets.length; Ae < Be; Ae++) {
          var Ye = _.targets[Ae], Ue = void 0;
          (Ue = x.func(Ye) ? Ye($e, _e, h._proxy, Se, Ae) : Ye) && oe.push({ x: (x.number(Ue.x) ? Ue.x : $e) + Se.x, y: (x.number(Ue.y) ? Ue.y : _e) + Se.y, range: x.number(Ue.range) ? Ue.range : _.range, source: Ye, index: Ae, offset: Se });
        }
        for (var rt = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, mt = 0; mt < oe.length; mt++) {
          var Ot = oe[mt], pt = Ot.range, St = Ot.x - X.x, un = Ot.y - X.y, Yt = Le(St, un), hn = Yt <= pt;
          pt === 1 / 0 && rt.inRange && rt.range !== 1 / 0 && (hn = !1), rt.target && !(hn ? rt.inRange && pt !== 1 / 0 ? Yt / pt < rt.distance / rt.range : pt === 1 / 0 && rt.range !== 1 / 0 || Yt < rt.distance : !rt.inRange && Yt < rt.distance) || (rt.target = Ot, rt.distance = Yt, rt.range = pt, rt.inRange = hn, rt.delta.x = St, rt.delta.y = un);
        }
        return rt.inRange && (w.x = rt.target.x, w.y = rt.target.y), T.closest = rt, rt;
      }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, bc = ko(zl, "snap"), Hr = { start: function(p) {
        var h = p.state, w = p.edges, T = h.options;
        if (!w) return null;
        p.state = { options: { targets: null, relativePoints: [{ x: w.left ? 0 : 1, y: w.top ? 0 : 1 }], offset: T.offset || "self", origin: { x: 0, y: 0 }, range: T.range } }, h.targetFields = h.targetFields || [["width", "height"], ["x", "y"]], zl.start(p), h.offsets = p.state.offsets, p.state = h;
      }, set: function(p) {
        var h = p.interaction, w = p.state, T = p.coords, _ = w.options, L = w.offsets, q = { x: T.x - L[0].x, y: T.y - L[0].y };
        w.options = re({}, _), w.options.targets = [];
        for (var X = 0, oe = _.targets || []; X < oe.length; X++) {
          var me = oe[X], ie = void 0;
          if (ie = x.func(me) ? me(q.x, q.y, h) : me) {
            for (var Se = 0, $e = w.targetFields; Se < $e.length; Se++) {
              var _e = $e[Se], Ae = _e[0], Be = _e[1];
              if (Ae in ie || Be in ie) {
                ie.x = ie[Ae], ie.y = ie[Be];
                break;
              }
            }
            w.options.targets.push(ie);
          }
        }
        var Ye = zl.set(p);
        return w.options = _, Ye;
      }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, Uf = ko(Hr, "snapSize"), Rl = { aspectRatio: gc, restrictEdges: Xs, restrict: Yf, restrictRect: Dl, restrictSize: mc, snapEdges: ko({ start: function(p) {
        var h = p.edges;
        return h ? (p.state.targetFields = p.state.targetFields || [[h.left ? "left" : "right", h.top ? "top" : "bottom"]], Hr.start(p)) : null;
      }, set: Hr.set, defaults: re(Nn(Hr.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: bc, snapSize: Uf, spring: la, avoid: la, transform: la, rubberband: la }, yc = { id: "modifiers", install: function(p) {
        var h = p.interactStatic;
        for (var w in p.usePlugin(er), p.usePlugin(Gf), h.modifiers = Rl, Rl) {
          var T = Rl[w], _ = T._defaults, L = T._methods;
          _._methods = L, p.defaults.perAction[w] = _;
        }
      } }, fr = yc, Vr = (function(p) {
        u(w, p);
        var h = g(w);
        function w(T, _, L, q, X, oe) {
          var me;
          if (a(this, w), Ge(f(me = h.call(this, X)), L), L !== _ && Ge(f(me), _), me.timeStamp = oe, me.originalEvent = L, me.type = T, me.pointerId = Je(_), me.pointerType = Rt(_), me.target = q, me.currentTarget = null, T === "tap") {
            var ie = X.getPointerIndex(_);
            me.dt = me.timeStamp - X.pointers[ie].downTime;
            var Se = me.timeStamp - X.tapTime;
            me.double = !!X.prevTap && X.prevTap.type !== "doubletap" && X.prevTap.target === me.target && Se < 500;
          } else T === "doubletap" && (me.dt = _.timeStamp - X.tapTime, me.double = !0);
          return me;
        }
        return l(w, [{ key: "_subtractOrigin", value: function(T) {
          var _ = T.x, L = T.y;
          return this.pageX -= _, this.pageY -= L, this.clientX -= _, this.clientY -= L, this;
        } }, { key: "_addOrigin", value: function(T) {
          var _ = T.x, L = T.y;
          return this.pageX += _, this.pageY += L, this.clientX += _, this.clientY += L, this;
        } }, { key: "preventDefault", value: function() {
          this.originalEvent.preventDefault();
        } }]), w;
      })(vn), Bn = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(p) {
        p.pointerEvents = Bn, p.defaults.actions.pointerEvents = Bn.defaults, re(p.actions.phaselessTypes, Bn.types);
      }, listeners: { "interactions:new": function(p) {
        var h = p.interaction;
        h.prevTap = null, h.tapTime = 0;
      }, "interactions:update-pointer": function(p) {
        var h = p.down, w = p.pointerInfo;
        !h && w.hold || (w.hold = { duration: 1 / 0, timeout: null });
      }, "interactions:move": function(p, h) {
        var w = p.interaction, T = p.pointer, _ = p.event, L = p.eventTarget;
        p.duplicate || w.pointerIsDown && !w.pointerWasMoved || (w.pointerIsDown && Nl(p), zi({ interaction: w, pointer: T, event: _, eventTarget: L, type: "move" }, h));
      }, "interactions:down": function(p, h) {
        (function(w, T) {
          for (var _ = w.interaction, L = w.pointer, q = w.event, X = w.eventTarget, oe = w.pointerIndex, me = _.pointers[oe].hold, ie = ne(X), Se = { interaction: _, pointer: L, event: q, eventTarget: X, type: "hold", targets: [], path: ie, node: null }, $e = 0; $e < ie.length; $e++) {
            var _e = ie[$e];
            Se.node = _e, T.fire("pointerEvents:collect-targets", Se);
          }
          if (Se.targets.length) {
            for (var Ae = 1 / 0, Be = 0, Ye = Se.targets; Be < Ye.length; Be++) {
              var Ue = Ye[Be].eventable.options.holdDuration;
              Ue < Ae && (Ae = Ue);
            }
            me.duration = Ae, me.timeout = setTimeout((function() {
              zi({ interaction: _, eventTarget: X, pointer: L, event: q, type: "hold" }, T);
            }), Ae);
          }
        })(p, h), zi(p, h);
      }, "interactions:up": function(p, h) {
        Nl(p), zi(p, h), (function(w, T) {
          var _ = w.interaction, L = w.pointer, q = w.event, X = w.eventTarget;
          _.pointerWasMoved || zi({ interaction: _, eventTarget: X, pointer: L, event: q, type: "tap" }, T);
        })(p, h);
      }, "interactions:cancel": function(p, h) {
        Nl(p), zi(p, h);
      } }, PointerEvent: Vr, fire: zi, collectEventTargets: jn, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
      function zi(p, h) {
        var w = p.interaction, T = p.pointer, _ = p.event, L = p.eventTarget, q = p.type, X = p.targets, oe = X === void 0 ? jn(p, h) : X, me = new Vr(q, T, _, L, w, h.now());
        h.fire("pointerEvents:new", { pointerEvent: me });
        for (var ie = { interaction: w, pointer: T, event: _, eventTarget: L, targets: oe, type: q, pointerEvent: me }, Se = 0; Se < oe.length; Se++) {
          var $e = oe[Se];
          for (var _e in $e.props || {}) me[_e] = $e.props[_e];
          var Ae = Re($e.eventable, $e.node);
          if (me._subtractOrigin(Ae), me.eventable = $e.eventable, me.currentTarget = $e.node, $e.eventable.fire(me), me._addOrigin(Ae), me.immediatePropagationStopped || me.propagationStopped && Se + 1 < oe.length && oe[Se + 1].node !== me.currentTarget) break;
        }
        if (h.fire("pointerEvents:fired", ie), q === "tap") {
          var Be = me.double ? zi({ interaction: w, pointer: T, event: _, eventTarget: L, type: "doubletap" }, h) : me;
          w.prevTap = Be, w.tapTime = Be.timeStamp;
        }
        return me;
      }
      function jn(p, h) {
        var w = p.interaction, T = p.pointer, _ = p.event, L = p.eventTarget, q = p.type, X = w.getPointerIndex(T), oe = w.pointers[X];
        if (q === "tap" && (w.pointerWasMoved || !oe || oe.downTarget !== L)) return [];
        for (var me = ne(L), ie = { interaction: w, pointer: T, event: _, eventTarget: L, type: q, path: me, targets: [], node: null }, Se = 0; Se < me.length; Se++) {
          var $e = me[Se];
          ie.node = $e, h.fire("pointerEvents:collect-targets", ie);
        }
        return q === "hold" && (ie.targets = ie.targets.filter((function(_e) {
          var Ae, Be;
          return _e.eventable.options.holdDuration === ((Ae = w.pointers[X]) == null || (Be = Ae.hold) == null ? void 0 : Be.duration);
        }))), ie.targets;
      }
      function Nl(p) {
        var h = p.interaction, w = p.pointerIndex, T = h.pointers[w].hold;
        T && T.timeout && (clearTimeout(T.timeout), T.timeout = null);
      }
      var Zs = Object.freeze({ __proto__: null, default: Bn });
      function jr(p) {
        var h = p.interaction;
        h.holdIntervalHandle && (clearInterval(h.holdIntervalHandle), h.holdIntervalHandle = null);
      }
      var Xf = { id: "pointer-events/holdRepeat", install: function(p) {
        p.usePlugin(Bn);
        var h = p.pointerEvents;
        h.defaults.holdRepeatInterval = 0, h.types.holdrepeat = p.actions.phaselessTypes.holdrepeat = !0;
      }, listeners: ["move", "up", "cancel", "endall"].reduce((function(p, h) {
        return p["pointerEvents:".concat(h)] = jr, p;
      }), { "pointerEvents:new": function(p) {
        var h = p.pointerEvent;
        h.type === "hold" && (h.count = (h.count || 0) + 1);
      }, "pointerEvents:fired": function(p, h) {
        var w = p.interaction, T = p.pointerEvent, _ = p.eventTarget, L = p.targets;
        if (T.type === "hold" && L.length) {
          var q = L[0].eventable.options.holdRepeatInterval;
          q <= 0 || (w.holdIntervalHandle = setTimeout((function() {
            h.pointerEvents.fire({ interaction: w, eventTarget: _, type: "hold", pointer: T, event: T }, h);
          }), q));
        }
      } }) }, Qf = Xf, Js = { id: "pointer-events/interactableTargets", install: function(p) {
        var h = p.Interactable;
        h.prototype.pointerEvents = function(T) {
          return re(this.events.options, T), this;
        };
        var w = h.prototype._backCompatOption;
        h.prototype._backCompatOption = function(T, _) {
          var L = w.call(this, T, _);
          return L === this && (this.events.options[T] = _), L;
        };
      }, listeners: { "pointerEvents:collect-targets": function(p, h) {
        var w = p.targets, T = p.node, _ = p.type, L = p.eventTarget;
        h.interactables.forEachMatch(T, (function(q) {
          var X = q.events, oe = X.options;
          X.types[_] && X.types[_].length && q.testIgnoreAllow(oe, T, L) && w.push({ node: T, eventable: X, props: { interactable: q } });
        }));
      }, "interactable:new": function(p) {
        var h = p.interactable;
        h.events.getRect = function(w) {
          return h.getRect(w);
        };
      }, "interactable:set": function(p, h) {
        var w = p.interactable, T = p.options;
        re(w.events.options, h.pointerEvents.defaults), re(w.events.options, T.pointerEvents || {});
      } } }, V = Js, Q = { id: "pointer-events", install: function(p) {
        p.usePlugin(Zs), p.usePlugin(Qf), p.usePlugin(V);
      } }, fe = Q, pe = { id: "reflow", install: function(p) {
        var h = p.Interactable;
        p.actions.phases.reflow = !0, h.prototype.reflow = function(w) {
          return (function(T, _, L) {
            for (var q = T.getAllElements(), X = L.window.Promise, oe = X ? [] : null, me = function() {
              var Se = q[ie], $e = T.getRect(Se);
              if (!$e) return 1;
              var _e, Ae = Qt(L.interactions.list, (function(Ue) {
                return Ue.interacting() && Ue.interactable === T && Ue.element === Se && Ue.prepared.name === _.name;
              }));
              if (Ae) Ae.move(), oe && (_e = Ae._reflowPromise || new X((function(Ue) {
                Ae._reflowResolve = Ue;
              })));
              else {
                var Be = ke($e), Ye = /* @__PURE__ */ (function(Ue) {
                  return { coords: Ue, get page() {
                    return this.coords.page;
                  }, get client() {
                    return this.coords.client;
                  }, get timeStamp() {
                    return this.coords.timeStamp;
                  }, get pageX() {
                    return this.coords.page.x;
                  }, get pageY() {
                    return this.coords.page.y;
                  }, get clientX() {
                    return this.coords.client.x;
                  }, get clientY() {
                    return this.coords.client.y;
                  }, get pointerId() {
                    return this.coords.pointerId;
                  }, get target() {
                    return this.coords.target;
                  }, get type() {
                    return this.coords.type;
                  }, get pointerType() {
                    return this.coords.pointerType;
                  }, get buttons() {
                    return this.coords.buttons;
                  }, preventDefault: function() {
                  } };
                })({ page: { x: Be.x, y: Be.y }, client: { x: Be.x, y: Be.y }, timeStamp: L.now() });
                _e = (function(Ue, rt, mt, Ot, pt) {
                  var St = Ue.interactions.new({ pointerType: "reflow" }), un = { interaction: St, event: pt, pointer: pt, eventTarget: mt, phase: "reflow" };
                  St.interactable = rt, St.element = mt, St.prevEvent = pt, St.updatePointer(pt, pt, mt, !0), Ke(St.coords.delta), sn(St.prepared, Ot), St._doPhase(un);
                  var Yt = Ue.window, hn = Yt.Promise, Cn = hn ? new hn((function(Wn) {
                    St._reflowResolve = Wn;
                  })) : void 0;
                  return St._reflowPromise = Cn, St.start(Ot, rt, mt), St._interacting ? (St.move(un), St.end(pt)) : (St.stop(), St._reflowResolve()), St.removePointer(pt, pt), Cn;
                })(L, T, Se, _, Ye);
              }
              oe && oe.push(_e);
            }, ie = 0; ie < q.length && !me(); ie++) ;
            return oe && X.all(oe).then((function() {
              return T;
            }));
          })(this, w, p);
        };
      }, listeners: { "interactions:stop": function(p, h) {
        var w = p.interaction;
        w.pointerType === "reflow" && (w._reflowResolve && w._reflowResolve(), (function(T, _) {
          T.splice(T.indexOf(_), 1);
        })(h.interactions.list, w));
      } } }, Ce = pe;
      if (En.use(Qa), En.use(Gs), En.use(fe), En.use(cc), En.use(fr), En.use(Xa), En.use(Rn), En.use(ln), En.use(Ce), En.default = En, i(e) === "object" && e) try {
        e.exports = En;
      } catch {
      }
      return En.default = En, En;
    }));
  })(yu, yu.exports)), yu.exports;
}
var JH = /* @__PURE__ */ ZH();
const d1 = /* @__PURE__ */ TO(JH), f1 = /* @__PURE__ */ ye({
  __name: "grid-item",
  props: {
    isDraggable: { type: Boolean, default: void 0 },
    isResizable: { type: Boolean, default: void 0 },
    isBounded: { type: Boolean, default: void 0 },
    static: { type: Boolean, default: !1 },
    minH: { default: 1 },
    minW: { default: 1 },
    maxH: { default: 1 / 0 },
    maxW: { default: 1 / 0 },
    x: {},
    y: {},
    w: {},
    h: {},
    i: {},
    dragIgnoreFrom: { default: "a, button" },
    dragAllowFrom: { default: void 0 },
    resizeIgnoreFrom: { default: "a, button" },
    preserveAspectRatio: { type: Boolean, default: !1 },
    dragOption: { default: () => ({}) },
    resizeOption: { default: () => ({}) }
  },
  emits: ["container-resized", "resize", "resized", "move", "moved"],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, a = Tt(O2), r = Tt(I2);
    if (!a)
      throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");
    const l = Pe(null), s = Dn({
      cols: 1,
      containerWidth: 100,
      rowHeight: 30,
      margin: [10, 10],
      maxRows: 1 / 0,
      draggable: void 0,
      resizable: void 0,
      bounded: void 0,
      transformScale: 1,
      useCssTransforms: !0,
      useStyleCursor: !0,
      isDragging: !1,
      dragging: {
        top: -1,
        left: -1
      },
      isResizing: !1,
      resizing: {
        width: -1,
        height: -1
      },
      style: {},
      rtl: !1
    });
    let u = !1, c = !1, d = NaN, f = NaN, g = NaN, m = NaN, b = -1, y = -1, S = -1, C = -1, O = o.x, $ = o.y, P = o.w, k = o.h;
    const x = le(), E = Dn({
      i: Ut(o, "i"),
      state: s,
      wrapper: x,
      calcXY: ve
    });
    function z(Oe) {
      We(Oe);
    }
    function B() {
      et();
    }
    function D(Oe) {
      ei(o.isDraggable) && (s.draggable = Oe);
    }
    function W(Oe) {
      ei(o.isResizable) && (s.resizable = Oe);
    }
    function H(Oe) {
      ei(o.isBounded) && (s.bounded = Oe);
    }
    function F(Oe) {
      s.transformScale = Oe;
    }
    function A(Oe) {
      s.rowHeight = Oe;
    }
    function U(Oe) {
      s.maxRows = Oe;
    }
    function j() {
      s.rtl = u1() === "rtl", et();
    }
    function ae(Oe) {
      s.cols = Math.floor(Oe);
    }
    a.increaseItem(E), Yd(() => {
      s.rtl = u1() === "rtl";
    }), Pt(() => {
      a.responsive && a.lastBreakpoint ? s.cols = _2(a.lastBreakpoint, a.cols) : s.cols = a.colNum, s.rowHeight = a.rowHeight, s.containerWidth = a.width !== null ? a.width : 100, s.margin = a.margin !== void 0 ? a.margin.map(Number) : [10, 10], s.maxRows = a.maxRows, ei(o.isDraggable) ? s.draggable = a.isDraggable : s.draggable = o.isDraggable, ei(o.isResizable) ? s.resizable = a.isResizable : s.resizable = o.isResizable, ei(o.isBounded) ? s.bounded = a.isBounded : s.bounded = o.isBounded, s.transformScale = a.transformScale, s.useCssTransforms = a.useCssTransforms, s.useStyleCursor = a.useStyleCursor, Ft(() => {
        O = o.x, $ = o.y, k = o.h, P = o.w, Eo(de);
      }), r.on("updateWidth", z), r.on("compact", B), r.on("setDraggable", D), r.on("setResizable", W), r.on("setBounded", H), r.on("setTransformScale", F), r.on("setRowHeight", A), r.on("setMaxRows", U), r.on("directionchange", j), r.on("setColNum", ae);
    }), At(() => {
      r.off("updateWidth", z), r.off("compact", B), r.off("setDraggable", D), r.off("setResizable", W), r.off("setBounded", H), r.off("setTransformScale", F), r.off("setRowHeight", A), r.off("setMaxRows", U), r.off("directionchange", j), r.off("setColNum", ae), l.value && (l.value.unset(), l.value = null), a.decreaseItem(E);
    }), t({ state: s, wrapper: x });
    const G = typeof navigator < "u" ? navigator.userAgent.toLowerCase().includes("android") : !1, Y = R(() => s.resizable && !o.static), K = R(() => a.isMirrored ? !s.rtl : s.rtl), J = R(() => (s.draggable || s.resizable) && !o.static), be = WH("item"), xe = R(() => ({
      [be.b()]: !0,
      [be.bm("resizable")]: Y.value,
      [be.bm("static")]: o.static,
      [be.bm("resizing")]: s.isResizing,
      [be.bm("dragging")]: s.isDragging,
      [be.bm("transform")]: s.useCssTransforms,
      [be.bm("rtl")]: K.value,
      [be.bm("no-touch")]: G && J.value
    })), he = R(() => [be.be("resizer"), K.value && be.bem("resizer", "rtl")].filter(Boolean));
    Ie(
      () => o.isDraggable,
      (Oe) => {
        s.draggable = Oe;
      }
    ), Ie(
      () => o.static,
      () => {
        Eo(Ge), Eo(Ke);
      }
    ), Ie(
      () => s.draggable,
      () => {
        Eo(Ge);
      }
    ), Ie(
      () => o.isResizable,
      (Oe) => {
        s.resizable = Oe;
      }
    ), Ie(
      () => o.isBounded,
      (Oe) => {
        s.bounded = Oe;
      }
    ), Ie(
      () => s.resizable,
      () => {
        Eo(Ke);
      }
    ), Ie(
      () => s.rowHeight,
      () => {
        Eo(de), Eo(ne);
      }
    ), Ie([() => s.cols, () => s.containerWidth], () => {
      Eo(Ke), Eo(de), Eo(ne);
    }), Ie([() => o.minH, () => o.maxH, () => o.minW, () => o.maxW], () => {
      Eo(Ke);
    }), Ie(K, () => {
      Eo(Ke), Eo(de);
    }), Ie([() => a.margin, () => a.margin[0], () => a.margin[1]], () => {
      const Oe = a.margin;
      !Oe || Oe[0] === s.margin[0] && Oe[1] === s.margin[1] || (s.margin = Oe.map(Number), Eo(de), Eo(ne));
    });
    function de() {
      o.x + o.w > s.cols ? (O = 0, P = o.w > s.cols ? s.cols : o.w) : (O = o.x, P = o.w);
      const Oe = se(O, $, P, k);
      s.isDragging && (Oe.top = s.dragging.top, K.value ? Oe.right = s.dragging.left : Oe.left = s.dragging.left), s.isResizing && (Oe.width = s.resizing.width, Oe.height = s.resizing.height);
      let Ve;
      s.useCssTransforms ? K.value ? Ve = LH(Oe.top, Oe.right, Oe.width, Oe.height) : Ve = FH(Oe.top, Oe.left, Oe.width, Oe.height) : K.value ? Ve = VH(Oe.top, Oe.right, Oe.width, Oe.height) : Ve = HH(Oe.top, Oe.left, Oe.width, Oe.height), s.style = Ve;
    }
    function ne() {
      const Oe = {};
      for (const Ve of ["width", "height"]) {
        const De = s.style[Ve].match(/^(\d+)px$/);
        if (!De)
          return;
        Oe[Ve] = De[1];
      }
      i("container-resized", o.i, o.h, o.w, Oe.height, Oe.width);
    }
    function we(Oe) {
      if (o.static) return;
      const Ve = Oe.type;
      if (Ve === "resizestart" && s.isResizing || Ve !== "resizestart" && !s.isResizing)
        return;
      const De = l1(Oe);
      if (ei(De)) return;
      const { x: Je, y: wt } = De, lt = { width: 0, height: 0 };
      let qe;
      switch (Ve) {
        case "resizestart": {
          Ke(), b = P, y = k, qe = se(O, $, P, k), lt.width = qe.width, lt.height = qe.height, s.resizing = lt, s.isResizing = !0;
          break;
        }
        case "resizemove": {
          !Oe.edges.right && !Oe.edges.left && (g = Je), !Oe.edges.top && !Oe.edges.bottom && (m = wt);
          const at = s1(g, m, Je, wt);
          K.value ? lt.width = s.resizing.width - at.deltaX / s.transformScale : lt.width = s.resizing.width + at.deltaX / s.transformScale, lt.height = s.resizing.height + at.deltaY / s.transformScale, s.resizing = lt;
          break;
        }
        case "resizeend": {
          qe = se(O, $, P, k), lt.width = qe.width, lt.height = qe.height, s.resizing = { width: -1, height: -1 }, s.isResizing = !1;
          break;
        }
      }
      qe = Re(lt.height, lt.width), qe.w < o.minW && (qe.w = o.minW), qe.w > o.maxW && (qe.w = o.maxW), qe.h < o.minH && (qe.h = o.minH), qe.h > o.maxH && (qe.h = o.maxH), qe.h < 1 && (qe.h = 1), qe.w < 1 && (qe.w = 1), g = Je, m = wt, (P !== qe.w || k !== qe.h) && i("resize", o.i, qe.h, qe.w, lt.height, lt.width), Oe.type === "resizeend" && (b !== P || y !== k) && i("resized", o.i, qe.h, qe.w, lt.height, lt.width), r.emit("resizeEvent", Oe.type, o.i, O, $, qe.h, qe.w);
    }
    function re(Oe) {
      if (o.static || s.isResizing) return;
      const Ve = Oe.type;
      if (Ve === "dragstart" && s.isDragging || Ve !== "dragstart" && !s.isDragging)
        return;
      const De = l1(Oe);
      if (ei(De)) return;
      const { x: Je, y: wt } = De, lt = Oe.target;
      if (!lt.offsetParent) return;
      const qe = { top: 0, left: 0 };
      switch (Ve) {
        case "dragstart": {
          S = O, C = $;
          const dt = lt.offsetParent.getBoundingClientRect(), vt = lt.getBoundingClientRect(), Rt = vt.left / s.transformScale, Xt = dt.left / s.transformScale, vn = vt.right / s.transformScale, Dt = dt.right / s.transformScale, zn = vt.top / s.transformScale, on = dt.top / s.transformScale;
          K.value ? qe.left = (vn - Dt) * -1 : qe.left = Rt - Xt, qe.top = zn - on, s.dragging = qe, s.isDragging = !0;
          break;
        }
        case "dragmove": {
          const dt = s1(d, f, Je, wt);
          if (K.value ? qe.left = s.dragging.left - dt.deltaX / s.transformScale : qe.left = s.dragging.left + dt.deltaX / s.transformScale, qe.top = s.dragging.top + dt.deltaY / s.transformScale, s.bounded) {
            const vt = lt.offsetParent.clientHeight - ke(o.h, s.rowHeight, s.margin[1]);
            qe.top = Fe(qe.top, 0, vt);
            const Rt = Me(), Xt = s.containerWidth - ke(o.w, Rt, s.margin[0]);
            qe.left = Fe(qe.left, 0, Xt);
          }
          s.dragging = qe;
          break;
        }
        case "dragend": {
          const dt = lt.offsetParent.getBoundingClientRect(), vt = lt.getBoundingClientRect(), Rt = vt.left / s.transformScale, Xt = dt.left / s.transformScale, vn = vt.right / s.transformScale, Dt = dt.right / s.transformScale, zn = vt.top / s.transformScale, on = dt.top / s.transformScale;
          K.value ? qe.left = (vn - Dt) * -1 : qe.left = Rt - Xt, qe.top = zn - on, s.dragging = { top: -1, left: -1 }, s.isDragging = !1;
          break;
        }
      }
      let at;
      K.value, at = ve(qe.top, qe.left), d = Je, f = wt, (O !== at.x || $ !== at.y) && i("move", o.i, at.x, at.y), Oe.type === "dragend" && (S !== O || C !== $) && i("moved", o.i, at.x, at.y), r.emit("dragEvent", Oe.type, o.i, at.x, at.y, k, P);
    }
    function se(Oe, Ve, De, Je) {
      const wt = Me();
      let lt;
      return K.value ? lt = {
        right: Math.round(wt * Oe + (Oe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ve + (Ve + 1) * s.margin[1]),
        // 0 * Infinity === NaN, which causes problems with resize constraints;
        // Fix this if it occurs.
        // Note we do it here rather than later because Math.round(Infinity) causes depot
        width: De === 1 / 0 ? De : Math.round(wt * De + Math.max(0, De - 1) * s.margin[0]),
        height: Je === 1 / 0 ? Je : Math.round(s.rowHeight * Je + Math.max(0, Je - 1) * s.margin[1])
      } : lt = {
        left: Math.round(wt * Oe + (Oe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ve + (Ve + 1) * s.margin[1]),
        // 0 * Infinity === NaN, which causes problems with resize constraints;
        // Fix this if it occurs.
        // Note we do it here rather than later because Math.round(Infinity) causes depot
        width: De === 1 / 0 ? De : Math.round(wt * De + Math.max(0, De - 1) * s.margin[0]),
        height: Je === 1 / 0 ? Je : Math.round(s.rowHeight * Je + Math.max(0, Je - 1) * s.margin[1])
      }, lt;
    }
    function ve(Oe, Ve) {
      const De = Me();
      let Je = Math.round((Ve - s.margin[0]) / (De + s.margin[0])), wt = Math.round((Oe - s.margin[1]) / (s.rowHeight + s.margin[1]));
      return Je = Math.max(Math.min(Je, s.cols - P), 0), wt = Math.max(Math.min(wt, s.maxRows - k), 0), { x: Je, y: wt };
    }
    function Me() {
      return (s.containerWidth - s.margin[0] * (s.cols + 1)) / s.cols;
    }
    function ke(Oe, Ve, De) {
      return Number.isFinite(Oe) ? Math.round(Ve * Oe + Math.max(0, Oe - 1) * De) : Oe;
    }
    function Fe(Oe, Ve, De) {
      return Math.max(Math.min(Oe, De), Ve);
    }
    function Re(Oe, Ve, De = !1) {
      const Je = Me();
      let wt = Math.round((Ve + s.margin[0]) / (Je + s.margin[0])), lt = 0;
      return De ? lt = Math.ceil((Oe + s.margin[1]) / (s.rowHeight + s.margin[1])) : lt = Math.round((Oe + s.margin[1]) / (s.rowHeight + s.margin[1])), wt = Math.max(Math.min(wt, s.cols - O), 0), lt = Math.max(Math.min(lt, s.maxRows - $), 0), { w: wt, h: lt };
    }
    function We(Oe, Ve) {
      s.containerWidth = Oe;
    }
    function et() {
      de();
    }
    function Le() {
      !l.value && x.value && (l.value = d1(x.value), s.useStyleCursor || l.value.styleCursor(!1));
    }
    const Ne = i1(re);
    function Ge() {
      if (Le(), !!l.value)
        if (s.draggable && !o.static) {
          const Oe = {
            ignoreFrom: o.dragIgnoreFrom,
            allowFrom: o.dragAllowFrom,
            ...o.dragOption
          };
          l.value.draggable(Oe), u || (u = !0, l.value.on("dragstart dragmove dragend", (Ve) => {
            Ve.type === "dragmove" ? Ne(Ve) : re(Ve);
          }));
        } else
          l.value.draggable({ enabled: !1 });
    }
    const it = i1(we);
    function Ke() {
      if (Le(), !!l.value)
        if (s.resizable && !o.static) {
          const Oe = se(0, 0, o.maxW, o.maxH), Ve = se(0, 0, o.minW, o.minH), De = {
            edges: {
              left: K.value ? `.${he.value[0]}` : !1,
              right: K.value ? !1 : `.${he.value[0]}`,
              bottom: `.${he.value[0]}`,
              top: !1
            },
            ignoreFrom: o.resizeIgnoreFrom,
            restrictSize: {
              min: {
                height: Ve.height * s.transformScale,
                width: Ve.width * s.transformScale
              },
              max: {
                height: Oe.height * s.transformScale,
                width: Oe.width * s.transformScale
              }
            },
            ...o.resizeOption
          };
          o.preserveAspectRatio && (De.modifiers = [d1.modifiers.aspectRatio({ ratio: "preserve" })]), l.value.resizable(De), c || (c = !0, l.value.on("resizestart resizemove resizeend", (Je) => {
            Je.type === "resizemove" ? it(Je) : we(Je);
          }));
        } else
          l.value.resizable({ enabled: !1 });
    }
    return (Oe, Ve) => (ee(), ge("section", {
      ref_key: "wrapper",
      ref: x,
      class: ct(xe.value),
      style: xt(s.style)
    }, [
      Va(Oe.$slots, "default"),
      Y.value ? (ee(), ge("span", {
        key: 0,
        class: ct(he.value)
      }, null, 2)) : je("", !0)
    ], 6));
  }
}), Ml = typeof window < "u";
var p1;
Ml && (p1 = window?.navigator) != null && p1.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function g1(e) {
  return e != null;
}
function h1() {
}
const eV = Object.freeze({
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
});
Object.freeze(new Set(Object.keys(eV)));
const tV = Ml && ("ontouchstart" in window || nV() > 0), v1 = tV ? "pointerdown" : "click";
function nV() {
  return typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints) || 0;
}
function oV(e, t, n = window.Event) {
  const { type: o, bubbles: i = !1, cancelable: a = !1, ...r } = t;
  if (!g1(o) || o === "") return !1;
  let l;
  return g1(n) ? l = new n(o, { bubbles: i, cancelable: a }) : (l = document.createEvent("HTMLEvents"), l.initEvent(o, i, a)), Object.assign(l, r), e.dispatchEvent(l);
}
const iV = "clickoutside", aV = /* @__PURE__ */ new Set();
let rg = null;
function rV(e, t) {
  return e instanceof Node ? t === e || t.contains(e) || !!t.__transferElement && (t.__transferElement === e || t.__transferElement.contains(e)) : !1;
}
Ml && (v1 === "click" && document.addEventListener(
  "pointerdown",
  (e) => {
    rg = e.target;
  },
  !0
), document.addEventListener(
  v1,
  (e) => {
    const t = rg;
    rg = null, aV.forEach((n) => {
      if (t && rV(t, n))
        return;
      const o = e.target, i = e.composedPath && e.composedPath();
      n !== o && (i ? !i.includes(n) : !n.contains(o)) && (!n.__transferElement || n.__transferElement !== o && !n.__transferElement.contains(o)) && oV(n, { type: iV });
    });
  },
  !0
));
const lV = [
  [
    "requestFullscreen",
    "exitFullscreen",
    "fullscreenElement",
    "fullscreenEnabled",
    "fullscreenchange",
    "fullscreenerror"
  ],
  // New WebKit
  [
    "webkitRequestFullscreen",
    "webkitExitFullscreen",
    "webkitFullscreenElement",
    "webkitFullscreenEnabled",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  // Old WebKit
  [
    "webkitRequestFullScreen",
    "webkitCancelFullScreen",
    "webkitCurrentFullScreenElement",
    "webkitCancelFullScreen",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  [
    "mozRequestFullScreen",
    "mozCancelFullScreen",
    "mozFullScreenElement",
    "mozFullScreenEnabled",
    "mozfullscreenchange",
    "mozfullscreenerror"
  ],
  [
    "msRequestFullscreen",
    "msExitFullscreen",
    "msFullscreenElement",
    "msFullscreenEnabled",
    "MSFullscreenChange",
    "MSFullscreenError"
  ]
];
let bd;
if (Ml) {
  for (const e of lV)
    if (e[1] in document) {
      bd = e;
      break;
    }
}
R(() => !1);
const sV = /* @__PURE__ */ new Set(), uV = /* @__PURE__ */ new WeakMap();
if (Ml && bd) {
  const e = bd[2], t = bd[4];
  document.addEventListener(
    t,
    () => {
      if (sV.forEach((n) => {
        n.value = !1;
      }), document[e]) {
        const n = uV.get(document[e]);
        n && (n.value = !0);
      }
    },
    !1
  );
}
const D2 = /* @__PURE__ */ new Map();
D2.set("x", 0);
D2.set("y", 0);
var fl = [], cV = function() {
  return fl.some(function(e) {
    return e.activeTargets.length > 0;
  });
}, dV = function() {
  return fl.some(function(e) {
    return e.skippedTargets.length > 0;
  });
}, m1 = "ResizeObserver loop completed with undelivered notifications.", fV = function() {
  var e;
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
    message: m1
  }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = m1), window.dispatchEvent(e);
}, Yu;
(function(e) {
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
})(Yu || (Yu = {}));
var pl = function(e) {
  return Object.freeze(e);
}, pV = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.inlineSize = t, this.blockSize = n, pl(this);
  }
  return e;
})(), z2 = (function() {
  function e(t, n, o, i) {
    return this.x = t, this.y = n, this.width = o, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, pl(this);
  }
  return e.prototype.toJSON = function() {
    var t = this, n = t.x, o = t.y, i = t.top, a = t.right, r = t.bottom, l = t.left, s = t.width, u = t.height;
    return { x: n, y: o, top: i, right: a, bottom: r, left: l, width: s, height: u };
  }, e.fromRect = function(t) {
    return new e(t.x, t.y, t.width, t.height);
  }, e;
})(), Um = function(e) {
  return e instanceof SVGElement && "getBBox" in e;
}, R2 = function(e) {
  if (Um(e)) {
    var t = e.getBBox(), n = t.width, o = t.height;
    return !n && !o;
  }
  var i = e, a = i.offsetWidth, r = i.offsetHeight;
  return !(a || r || e.getClientRects().length);
}, b1 = function(e) {
  var t;
  if (e instanceof Element)
    return !0;
  var n = (t = e?.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
  return !!(n && e instanceof n.Element);
}, gV = function(e) {
  switch (e.tagName) {
    case "INPUT":
      if (e.type !== "image")
        break;
    case "VIDEO":
    case "AUDIO":
    case "EMBED":
    case "OBJECT":
    case "CANVAS":
    case "IFRAME":
    case "IMG":
      return !0;
  }
  return !1;
}, Au = typeof window < "u" ? window : {}, Kc = /* @__PURE__ */ new WeakMap(), y1 = /auto|scroll/, hV = /^tb|vertical/, vV = /msie|trident/i.test(Au.navigator && Au.navigator.userAgent), ca = function(e) {
  return parseFloat(e || "0");
}, gs = function(e, t, n) {
  return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new pV((n ? t : e) || 0, (n ? e : t) || 0);
}, x1 = pl({
  devicePixelContentBoxSize: gs(),
  borderBoxSize: gs(),
  contentBoxSize: gs(),
  contentRect: new z2(0, 0, 0, 0)
}), N2 = function(e, t) {
  if (t === void 0 && (t = !1), Kc.has(e) && !t)
    return Kc.get(e);
  if (R2(e))
    return Kc.set(e, x1), x1;
  var n = getComputedStyle(e), o = Um(e) && e.ownerSVGElement && e.getBBox(), i = !vV && n.boxSizing === "border-box", a = hV.test(n.writingMode || ""), r = !o && y1.test(n.overflowY || ""), l = !o && y1.test(n.overflowX || ""), s = o ? 0 : ca(n.paddingTop), u = o ? 0 : ca(n.paddingRight), c = o ? 0 : ca(n.paddingBottom), d = o ? 0 : ca(n.paddingLeft), f = o ? 0 : ca(n.borderTopWidth), g = o ? 0 : ca(n.borderRightWidth), m = o ? 0 : ca(n.borderBottomWidth), b = o ? 0 : ca(n.borderLeftWidth), y = d + u, S = s + c, C = b + g, O = f + m, $ = l ? e.offsetHeight - O - e.clientHeight : 0, P = r ? e.offsetWidth - C - e.clientWidth : 0, k = i ? y + C : 0, x = i ? S + O : 0, E = o ? o.width : ca(n.width) - k - P, z = o ? o.height : ca(n.height) - x - $, B = E + y + P + C, D = z + S + $ + O, W = pl({
    devicePixelContentBoxSize: gs(Math.round(E * devicePixelRatio), Math.round(z * devicePixelRatio), a),
    borderBoxSize: gs(B, D, a),
    contentBoxSize: gs(E, z, a),
    contentRect: new z2(d, s, E, z)
  });
  return Kc.set(e, W), W;
}, B2 = function(e, t, n) {
  var o = N2(e, n), i = o.borderBoxSize, a = o.contentBoxSize, r = o.devicePixelContentBoxSize;
  switch (t) {
    case Yu.DEVICE_PIXEL_CONTENT_BOX:
      return r;
    case Yu.BORDER_BOX:
      return i;
    default:
      return a;
  }
}, mV = /* @__PURE__ */ (function() {
  function e(t) {
    var n = N2(t);
    this.target = t, this.contentRect = n.contentRect, this.borderBoxSize = pl([n.borderBoxSize]), this.contentBoxSize = pl([n.contentBoxSize]), this.devicePixelContentBoxSize = pl([n.devicePixelContentBoxSize]);
  }
  return e;
})(), F2 = function(e) {
  if (R2(e))
    return 1 / 0;
  for (var t = 0, n = e.parentNode; n; )
    t += 1, n = n.parentNode;
  return t;
}, bV = function() {
  var e = 1 / 0, t = [];
  fl.forEach(function(a) {
    if (a.activeTargets.length !== 0) {
      var r = [];
      a.activeTargets.forEach(function(l) {
        var s = new mV(l.target), u = F2(l.target);
        r.push(s), l.lastReportedSize = B2(l.target, l.observedBox), u < e && (e = u);
      }), t.push(function() {
        a.callback.call(a.observer, r, a.observer);
      }), a.activeTargets.splice(0, a.activeTargets.length);
    }
  });
  for (var n = 0, o = t; n < o.length; n++) {
    var i = o[n];
    i();
  }
  return e;
}, w1 = function(e) {
  fl.forEach(function(t) {
    t.activeTargets.splice(0, t.activeTargets.length), t.skippedTargets.splice(0, t.skippedTargets.length), t.observationTargets.forEach(function(n) {
      n.isActive() && (F2(n.target) > e ? t.activeTargets.push(n) : t.skippedTargets.push(n));
    });
  });
}, yV = function() {
  var e = 0;
  for (w1(e); cV(); )
    e = bV(), w1(e);
  return dV() && fV(), e > 0;
}, lg, L2 = [], xV = function() {
  return L2.splice(0).forEach(function(e) {
    return e();
  });
}, wV = function(e) {
  if (!lg) {
    var t = 0, n = document.createTextNode(""), o = { characterData: !0 };
    new MutationObserver(function() {
      return xV();
    }).observe(n, o), lg = function() {
      n.textContent = "".concat(t ? t-- : t++);
    };
  }
  L2.push(e), lg();
}, SV = function(e) {
  wV(function() {
    requestAnimationFrame(e);
  });
}, yd = 0, CV = function() {
  return !!yd;
}, $V = 250, PV = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, S1 = [
  "resize",
  "load",
  "transitionend",
  "animationend",
  "animationstart",
  "animationiteration",
  "keyup",
  "keydown",
  "mouseup",
  "mousedown",
  "mouseover",
  "mouseout",
  "blur",
  "focus"
], C1 = function(e) {
  return e === void 0 && (e = 0), Date.now() + e;
}, sg = !1, OV = (function() {
  function e() {
    var t = this;
    this.stopped = !0, this.listener = function() {
      return t.schedule();
    };
  }
  return e.prototype.run = function(t) {
    var n = this;
    if (t === void 0 && (t = $V), !sg) {
      sg = !0;
      var o = C1(t);
      SV(function() {
        var i = !1;
        try {
          i = yV();
        } finally {
          if (sg = !1, t = o - C1(), !CV())
            return;
          i ? n.run(1e3) : t > 0 ? n.run(t) : n.start();
        }
      });
    }
  }, e.prototype.schedule = function() {
    this.stop(), this.run();
  }, e.prototype.observe = function() {
    var t = this, n = function() {
      return t.observer && t.observer.observe(document.body, PV);
    };
    document.body ? n() : Au.addEventListener("DOMContentLoaded", n);
  }, e.prototype.start = function() {
    var t = this;
    this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), S1.forEach(function(n) {
      return Au.addEventListener(n, t.listener, !0);
    }));
  }, e.prototype.stop = function() {
    var t = this;
    this.stopped || (this.observer && this.observer.disconnect(), S1.forEach(function(n) {
      return Au.removeEventListener(n, t.listener, !0);
    }), this.stopped = !0);
  }, e;
})(), Hh = new OV(), $1 = function(e) {
  !yd && e > 0 && Hh.start(), yd += e, !yd && Hh.stop();
}, IV = function(e) {
  return !Um(e) && !gV(e) && getComputedStyle(e).display === "inline";
}, MV = (function() {
  function e(t, n) {
    this.target = t, this.observedBox = n || Yu.CONTENT_BOX, this.lastReportedSize = {
      inlineSize: 0,
      blockSize: 0
    };
  }
  return e.prototype.isActive = function() {
    var t = B2(this.target, this.observedBox, !0);
    return IV(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
  }, e;
})(), TV = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = n;
  }
  return e;
})(), Yc = /* @__PURE__ */ new WeakMap(), P1 = function(e, t) {
  for (var n = 0; n < e.length; n += 1)
    if (e[n].target === t)
      return n;
  return -1;
}, Uc = (function() {
  function e() {
  }
  return e.connect = function(t, n) {
    var o = new TV(t, n);
    Yc.set(t, o);
  }, e.observe = function(t, n, o) {
    var i = Yc.get(t), a = i.observationTargets.length === 0;
    P1(i.observationTargets, n) < 0 && (a && fl.push(i), i.observationTargets.push(new MV(n, o && o.box)), $1(1), Hh.schedule());
  }, e.unobserve = function(t, n) {
    var o = Yc.get(t), i = P1(o.observationTargets, n), a = o.observationTargets.length === 1;
    i >= 0 && (a && fl.splice(fl.indexOf(o), 1), o.observationTargets.splice(i, 1), $1(-1));
  }, e.disconnect = function(t) {
    var n = this, o = Yc.get(t);
    o.observationTargets.slice().forEach(function(i) {
      return n.unobserve(t, i.target);
    }), o.activeTargets.splice(0, o.activeTargets.length);
  }, e;
})(), kV = (function() {
  function e(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
    if (typeof t != "function")
      throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
    Uc.connect(this, t);
  }
  return e.prototype.observe = function(t, n) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!b1(t))
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Uc.observe(this, t, n);
  }, e.prototype.unobserve = function(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!b1(t))
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Uc.unobserve(this, t);
  }, e.prototype.disconnect = function() {
    Uc.disconnect(this);
  }, e.toString = function() {
    return "function ResizeObserver () { [polyfill code] }";
  }, e;
})();
const Gd = /* @__PURE__ */ new WeakMap();
function EV(e) {
  var t;
  for (let n = 0, o = e.length; n < o; ++n) {
    const i = e[n], a = Gd.get(i.target);
    if (typeof a == "function") {
      const { inlineSize: r, blockSize: l } = ((t = i.borderBoxSize) == null ? void 0 : t[0]) ?? {}, { offsetWidth: s, offsetHeight: u } = i.target;
      a(
        Object.assign(i, {
          offsetWidth: s,
          offsetHeight: u,
          width: r ?? s,
          height: l ?? u
        })
      );
    }
  }
}
const H2 = new (Ml && window.ResizeObserver || kV)(
  EV
);
function O1(e, t) {
  Gd.set(e, t), H2.observe(e);
}
function I1(e) {
  Gd.has(e) && (H2.unobserve(e), Gd.delete(e));
}
function _V(e = {}) {
  let t = h1;
  const n = Ie(
    () => M(e.target),
    (i) => {
      t(), !(!i || typeof e.onResize != "function") && (O1(i, e.onResize), t = () => {
        I1(i), t = h1;
      });
    },
    { immediate: !0 }
  ), o = () => {
    n(), t();
  };
  return Z1() && J1(o), {
    /**
     * @deprecated Will be removed in next major version, please directly use `observeResize` from imports.
     */
    observeResize: O1,
    /**
     * @deprecated Will be removed in next major version, please directly use `unobserveResize` from imports.
     */
    unobserveResize: I1,
    unobserve: o
  };
}
const AV = le(!1);
R(() => AV.value);
const M1 = "__theme_style__", ug = "__theme_observer__", T1 = Dn(/* @__PURE__ */ new Map()), k1 = /* @__PURE__ */ new Map();
Ie(T1, () => {
  if (!Ml) return;
  k1.clear();
  const e = document.head.querySelector(`#${M1}`);
  e && document.head.removeChild(e);
  const t = document.createElement("style");
  let n = `.${ug} { width: 1px }`, o = 1;
  for (const [i, [a, r]] of T1.entries())
    n += ` html.${a} .${ug}, .${r} .${ug} { width: ${++o}px }`, k1.set(o, i);
  t.textContent = n, t.id = M1, document.head.appendChild(t);
});
const DV = /* @__PURE__ */ ye({
  __name: "grid-layout",
  props: {
    autoSize: { type: Boolean, default: !0 },
    colNum: { default: 12 },
    rowHeight: { default: 150 },
    maxRows: { default: 1 / 0 },
    margin: { default: () => [10, 10] },
    isDraggable: { type: Boolean, default: !0 },
    isResizable: { type: Boolean, default: !0 },
    isMirrored: { type: Boolean, default: !1 },
    isBounded: { type: Boolean, default: !1 },
    useCssTransforms: { type: Boolean, default: !0 },
    verticalCompact: { type: Boolean, default: !0 },
    restoreOnDrag: { type: Boolean, default: !1 },
    layout: {},
    responsive: { type: Boolean, default: !1 },
    responsiveLayouts: { default: () => ({}) },
    transformScale: { default: 1 },
    breakpoints: { default: () => ({ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }) },
    cols: { default: () => ({ lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 }) },
    preventCollision: { type: Boolean, default: !1 },
    useStyleCursor: { type: Boolean, default: !0 }
  },
  emits: [
    "layout-before-mount",
    "layout-mounted",
    "layout-updated",
    "breakpoint-changed",
    "update:layout",
    "layout-ready"
  ],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, a = Dn({
      width: -1,
      mergedStyle: {},
      lastLayoutLength: 0,
      isDragging: !1,
      placeholder: {
        x: 0,
        y: 0,
        w: 0,
        h: 0,
        i: ""
      },
      layouts: {},
      // array to store all layouts from different breakpoints
      lastBreakpoint: null,
      // store last active breakpoint
      originalLayout: null
      // store original Layout
    }), r = /* @__PURE__ */ new Map(), l = le(o.layout), s = le(), { observeResize: u, unobserveResize: c } = _V(), d = _H();
    d.on("resizeEvent", f), d.on("dragEvent", g), Yd(() => {
      i("layout-before-mount", l.value);
    }), Pt(() => {
      i("layout-mounted", l.value), Nt(() => {
        jH(l.value), a.originalLayout = l.value, Nt(() => {
          z(), s.value && u(s.value, AH(O, 16)), es(l.value, o.verticalCompact), i("layout-updated", l.value), C(), O();
        });
      });
    }), At(() => {
      d.clearAll(), s.value && c(s.value);
    });
    function f(D, W, H, F, A, U) {
      x(D, W, H, F, A, U);
    }
    function g(D, W, H, F, A, U) {
      k(D, W, H, F, A, U);
    }
    Ie(
      () => a.width,
      (D, W) => {
        Nt(() => {
          d.emit("updateWidth", D), W === -1 && Nt(() => {
            i("layout-ready", l.value);
          }), C();
        });
      }
    ), Ie(
      () => [o.layout, o.layout.length],
      () => {
        l.value = o.layout, S();
      }
    ), Ie(
      () => o.colNum,
      (D) => {
        d.emit("setColNum", D);
      }
    ), Ie(
      () => o.rowHeight,
      (D) => {
        d.emit("setRowHeight", D);
      }
    ), Ie(
      () => o.isDraggable,
      (D) => {
        d.emit("setDraggable", D);
      }
    ), Ie(
      () => o.isResizable,
      (D) => {
        d.emit("setResizable", D);
      }
    ), Ie(
      () => o.isBounded,
      (D) => {
        d.emit("setBounded", D);
      }
    ), Ie(
      () => o.transformScale,
      (D) => {
        d.emit("setTransformScale", D);
      }
    ), Ie(
      () => o.responsive,
      (D) => {
        D || (i("update:layout", a.originalLayout), d.emit("setColNum", o.colNum)), O();
      }
    ), Ie(
      () => o.maxRows,
      (D) => {
        d.emit("setMaxRows", D);
      }
    ), Ie([() => o.margin, () => o.margin[1]], C), kt(
      O2,
      Dn({
        ...xd(o),
        ...xd(a),
        increaseItem: m,
        decreaseItem: b
      })
    ), kt(I2, d), t({ state: a, getItem: y, resizeEvent: x, dragEvent: k, layoutUpdate: S });
    function m(D) {
      r.set(D.i, D);
    }
    function b(D) {
      r.delete(D.i);
    }
    function y(D) {
      return r.get(D);
    }
    function S() {
      if (!ei(l.value) && !ei(a.originalLayout)) {
        if (l.value.length !== a.originalLayout.length) {
          const D = B(l.value, a.originalLayout);
          if (D.length > 0)
            if (l.value.length > a.originalLayout.length)
              a.originalLayout = a.originalLayout.concat(D);
            else {
              const W = new Set(D.map((H) => H.i));
              a.originalLayout = a.originalLayout.filter((H) => !W.has(H.i));
            }
          a.lastLayoutLength = l.value.length, z();
        }
        es(l.value, o.verticalCompact), d.emit("updateWidth", a.width), C(), i("layout-updated", l.value);
      }
    }
    function C() {
      a.mergedStyle = {
        height: $()
      };
    }
    function O() {
      s.value && (a.width = s.value.offsetWidth), d.emit("resizeEvent");
    }
    function $() {
      if (!o.autoSize) return;
      const D = parseFloat(o.margin[1]);
      return zH(l.value) * (o.rowHeight + D) + D + "px";
    }
    let P;
    function k(D, W, H, F, A, U) {
      let j = a1(l.value, W);
      ei(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" }), D === "dragstart" && !o.verticalCompact && (P = l.value.reduce(
        (ae, { i: G, x: Y, y: K }) => ({
          ...ae,
          [G]: { x: Y, y: K }
        }),
        {}
      )), D === "dragmove" || D === "dragstart" ? (a.placeholder.i = W, a.placeholder.x = j.x, a.placeholder.y = j.y, a.placeholder.w = U, a.placeholder.h = A, Nt(() => {
        a.isDragging = !0;
      }), d.emit("updateWidth", a.width)) : Nt(() => {
        a.isDragging = !1;
      }), l.value = Lh(l.value, j, H, F, !0, o.preventCollision), o.restoreOnDrag ? (j.static = !0, es(l.value, o.verticalCompact, P), j.static = !1) : es(l.value, o.verticalCompact), d.emit("compact"), C(), D === "dragend" && (P = void 0, i("layout-updated", l.value));
    }
    function x(D, W, H, F, A, U) {
      let j = a1(l.value, W);
      ei(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" });
      let ae;
      if (o.preventCollision) {
        const G = T2(l.value, { ...j, w: U, h: A }).filter(
          (Y) => Y.i !== j.i
        );
        if (ae = G.length > 0, ae) {
          let Y = 1 / 0, K = 1 / 0;
          G.forEach((J) => {
            J.x > j.x && (Y = Math.min(Y, J.x)), J.y > j.y && (K = Math.min(K, J.y));
          }), Number.isFinite(Y) && (j.w = Y - j.x), Number.isFinite(K) && (j.h = K - j.y);
        }
      }
      ae || (j.w = U, j.h = A), D === "resizestart" || D === "resizemove" ? (a.placeholder.i = W, a.placeholder.x = H, a.placeholder.y = F, a.placeholder.w = j.w, a.placeholder.h = j.h, Nt(() => {
        a.isDragging = !0;
      }), d.emit("updateWidth", a.width)) : D && Nt(() => {
        a.isDragging = !1;
      }), o.responsive && E(), es(l.value, o.verticalCompact), d.emit("compact"), C(), D === "resizeend" && i("layout-updated", l.value);
    }
    function E() {
      const D = KH(o.breakpoints, a.width);
      if (D === a.lastBreakpoint)
        return;
      const W = _2(D, o.cols);
      !ei(a.lastBreakpoint) && !a.layouts[a.lastBreakpoint] && (a.layouts[a.lastBreakpoint] = Fh(l.value));
      const H = YH(
        a.originalLayout,
        a.layouts,
        o.breakpoints,
        D,
        a.lastBreakpoint,
        W,
        o.verticalCompact
      );
      a.layouts[D] = H, a.lastBreakpoint !== D && i("breakpoint-changed", D, H), l.value = H, i("update:layout", H), a.lastBreakpoint = D, d.emit("setColNum", W);
    }
    function z() {
      a.layouts = Object.assign({}, o.responsiveLayouts);
    }
    function B(D, W) {
      const H = new Set(W.map((j) => j.i)), F = new Set(D.map((j) => j.i)), A = D.filter((j) => !H.has(j.i)), U = W.filter((j) => !F.has(j.i));
      return A.concat(U);
    }
    return (D, W) => (ee(), ge("div", {
      ref_key: "wrapper",
      ref: s,
      class: "vgl-layout",
      style: xt(a.mergedStyle)
    }, [
      D.$slots.default ? Va(D.$slots, "default", { key: 0 }) : (ee(!0), ge(He, { key: 1 }, It(l.value, (H) => (ee(), Ze(f1, lO({
        key: H.i,
        ref_for: !0
      }, H), {
        default: ce(() => [
          Va(D.$slots, "item", { item: H })
        ]),
        _: 2
      }, 1040))), 128)),
      Qi(v(f1, {
        class: "vgl-item--placeholder",
        x: a.placeholder.x,
        y: a.placeholder.y,
        w: a.placeholder.w,
        h: a.placeholder.h,
        i: a.placeholder.i
      }, null, 8, ["x", "y", "w", "h", "i"]), [
        [va, a.isDragging]
      ])
    ], 4));
  }
});
(function() {
  try {
    if (typeof document < "u") {
      var e = document.createElement("style");
      e.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')), document.head.appendChild(e);
    }
  } catch (t) {
    console.error("vite-plugin-css-injected-by-js", t);
  }
})();
const V2 = Symbol("panelEditor");
function zV(e) {
  kt(V2, e);
}
function qs() {
  const e = Tt(V2);
  if (!e)
    throw new Error("usePanelEditor must be used within a PanelEditorProvider");
  return e;
}
function RV(e, t, { signal: n, edges: o } = {}) {
  let i, a = null;
  const r = o != null && o.includes("leading"), l = o == null || o.includes("trailing"), s = () => {
    a !== null && (e.apply(i, a), i = void 0, a = null);
  }, u = () => {
    l && s(), g();
  };
  let c = null;
  const d = () => {
    c != null && clearTimeout(c), c = setTimeout(() => {
      c = null, u();
    }, t);
  }, f = () => {
    c !== null && (clearTimeout(c), c = null);
  }, g = () => {
    f(), i = void 0, a = null;
  }, m = () => {
    s();
  }, b = function(...y) {
    if (n?.aborted)
      return;
    i = this, a = y;
    const S = c == null;
    d(), r && S && s();
  };
  return b.schedule = d, b.cancel = g, b.flush = m, n?.addEventListener("abort", g, { once: !0 }), b;
}
function NV() {
}
function Li(e, t, n) {
  return n == null ? Math.min(e, t) : Math.min(Math.max(e, t), n);
}
function E1(e) {
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
function _1(e) {
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
const BV = "[object RegExp]", FV = "[object String]", LV = "[object Number]", HV = "[object Boolean]", A1 = "[object Arguments]", VV = "[object Symbol]", jV = "[object Date]", WV = "[object Map]", qV = "[object Set]", GV = "[object Array]", KV = "[object Function]", YV = "[object ArrayBuffer]", cg = "[object Object]", UV = "[object Error]", XV = "[object DataView]", QV = "[object Uint8Array]", ZV = "[object Uint8ClampedArray]", JV = "[object Uint16Array]", ej = "[object Uint32Array]", tj = "[object BigUint64Array]", nj = "[object Int8Array]", oj = "[object Int16Array]", ij = "[object Int32Array]", aj = "[object BigInt64Array]", rj = "[object Float32Array]", lj = "[object Float64Array]";
function D1(e) {
  if (!e || typeof e != "object")
    return !1;
  const t = Object.getPrototypeOf(e);
  return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
}
function sj(e, t) {
  return e === t || Number.isNaN(e) && Number.isNaN(t);
}
function uj(e, t, n) {
  return xu(e, t, void 0, void 0, void 0, void 0, n);
}
function xu(e, t, n, o, i, a, r) {
  const l = r(e, t, n, o, i, a);
  if (l !== void 0)
    return l;
  if (typeof e == typeof t)
    switch (typeof e) {
      case "bigint":
      case "string":
      case "boolean":
      case "symbol":
      case "undefined":
        return e === t;
      case "number":
        return e === t || Object.is(e, t);
      case "function":
        return e === t;
      case "object":
        return Du(e, t, a, r);
    }
  return Du(e, t, a, r);
}
function Du(e, t, n, o) {
  if (Object.is(e, t))
    return !0;
  let i = _1(e), a = _1(t);
  if (i === A1 && (i = cg), a === A1 && (a = cg), i !== a)
    return !1;
  switch (i) {
    case FV:
      return e.toString() === t.toString();
    case LV: {
      const s = e.valueOf(), u = t.valueOf();
      return sj(s, u);
    }
    case HV:
    case jV:
    case VV:
      return Object.is(e.valueOf(), t.valueOf());
    case BV:
      return e.source === t.source && e.flags === t.flags;
    case KV:
      return e === t;
  }
  n = n ?? /* @__PURE__ */ new Map();
  const r = n.get(e), l = n.get(t);
  if (r != null && l != null)
    return r === t;
  n.set(e, t), n.set(t, e);
  try {
    switch (i) {
      case WV: {
        if (e.size !== t.size)
          return !1;
        for (const [s, u] of e.entries())
          if (!t.has(s) || !xu(u, t.get(s), s, e, t, n, o))
            return !1;
        return !0;
      }
      case qV: {
        if (e.size !== t.size)
          return !1;
        const s = Array.from(e.values()), u = Array.from(t.values());
        for (let c = 0; c < s.length; c++) {
          const d = s[c], f = u.findIndex((g) => xu(d, g, void 0, e, t, n, o));
          if (f === -1)
            return !1;
          u.splice(f, 1);
        }
        return !0;
      }
      case GV:
      case QV:
      case ZV:
      case JV:
      case ej:
      case tj:
      case nj:
      case oj:
      case ij:
      case aj:
      case rj:
      case lj: {
        if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
          return !1;
        for (let s = 0; s < e.length; s++)
          if (!xu(e[s], t[s], s, e, t, n, o))
            return !1;
        return !0;
      }
      case YV:
        return e.byteLength !== t.byteLength ? !1 : Du(new Uint8Array(e), new Uint8Array(t), n, o);
      case XV:
        return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : Du(new Uint8Array(e), new Uint8Array(t), n, o);
      case UV:
        return e.name === t.name && e.message === t.message;
      case cg: {
        if (!(Du(e.constructor, t.constructor, n, o) || D1(e) && D1(t)))
          return !1;
        const s = [...Object.keys(e), ...E1(e)], u = [...Object.keys(t), ...E1(t)];
        if (s.length !== u.length)
          return !1;
        for (let c = 0; c < s.length; c++) {
          const d = s[c], f = e[d];
          if (!Object.hasOwn(t, d))
            return !1;
          const g = t[d];
          if (!xu(f, g, d, e, t, n, o))
            return !1;
        }
        return !0;
      }
      default:
        return !1;
    }
  } finally {
    n.delete(e), n.delete(t);
  }
}
function cj(e, t) {
  return uj(e, t, NV);
}
const dj = "_splitView_pzp7c_6", fj = "_sashContainer_pzp7c_13", pj = "_sash_pzp7c_13", gj = "_splitViewContainer_pzp7c_24", hj = "_splitViewView_pzp7c_31", vj = "_vertical_pzp7c_37", mj = "_horizontal_pzp7c_41", bj = "_separatorBorder_pzp7c_45", mr = {
  splitView: dj,
  sashContainer: fj,
  sash: pj,
  splitViewContainer: gj,
  splitViewView: hj,
  vertical: vj,
  horizontal: mj,
  separatorBorder: bj
};
let j2 = !1, W2 = !1, cu;
typeof navigator == "object" && (cu = navigator.userAgent, W2 = cu.includes("Macintosh"), j2 = (cu.includes("Macintosh") || cu.includes("iPad") || cu.includes("iPhone")) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
const q2 = j2, yj = W2;
class xj {
  _size;
  getSize() {
    return this._size;
  }
  setSize(t) {
    this._size = t;
  }
}
function Xc(e, t) {
  const n = e.length, o = n - t.length;
  return o >= 0 && e.slice(o, n) === t;
}
function wj(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var z1 = { exports: {} }, R1;
function Sj() {
  return R1 || (R1 = 1, (function(e) {
    var t = Object.prototype.hasOwnProperty, n = "~";
    function o() {
    }
    Object.create && (o.prototype = /* @__PURE__ */ Object.create(null), new o().__proto__ || (n = !1));
    function i(s, u, c) {
      this.fn = s, this.context = u, this.once = c || !1;
    }
    function a(s, u, c, d, f) {
      if (typeof c != "function")
        throw new TypeError("The listener must be a function");
      var g = new i(c, d || s, f), m = n ? n + u : u;
      return s._events[m] ? s._events[m].fn ? s._events[m] = [s._events[m], g] : s._events[m].push(g) : (s._events[m] = g, s._eventsCount++), s;
    }
    function r(s, u) {
      --s._eventsCount === 0 ? s._events = new o() : delete s._events[u];
    }
    function l() {
      this._events = new o(), this._eventsCount = 0;
    }
    l.prototype.eventNames = function() {
      var s = [], u, c;
      if (this._eventsCount === 0) return s;
      for (c in u = this._events)
        t.call(u, c) && s.push(n ? c.slice(1) : c);
      return Object.getOwnPropertySymbols ? s.concat(Object.getOwnPropertySymbols(u)) : s;
    }, l.prototype.listeners = function(s) {
      var u = n ? n + s : s, c = this._events[u];
      if (!c) return [];
      if (c.fn) return [c.fn];
      for (var d = 0, f = c.length, g = new Array(f); d < f; d++)
        g[d] = c[d].fn;
      return g;
    }, l.prototype.listenerCount = function(s) {
      var u = n ? n + s : s, c = this._events[u];
      return c ? c.fn ? 1 : c.length : 0;
    }, l.prototype.emit = function(s, u, c, d, f, g) {
      var m = n ? n + s : s;
      if (!this._events[m]) return !1;
      var b = this._events[m], y = arguments.length, S, C;
      if (b.fn) {
        switch (b.once && this.removeListener(s, b.fn, void 0, !0), y) {
          case 1:
            return b.fn.call(b.context), !0;
          case 2:
            return b.fn.call(b.context, u), !0;
          case 3:
            return b.fn.call(b.context, u, c), !0;
          case 4:
            return b.fn.call(b.context, u, c, d), !0;
          case 5:
            return b.fn.call(b.context, u, c, d, f), !0;
          case 6:
            return b.fn.call(b.context, u, c, d, f, g), !0;
        }
        for (C = 1, S = new Array(y - 1); C < y; C++)
          S[C - 1] = arguments[C];
        b.fn.apply(b.context, S);
      } else {
        var O = b.length, $;
        for (C = 0; C < O; C++)
          switch (b[C].once && this.removeListener(s, b[C].fn, void 0, !0), y) {
            case 1:
              b[C].fn.call(b[C].context);
              break;
            case 2:
              b[C].fn.call(b[C].context, u);
              break;
            case 3:
              b[C].fn.call(b[C].context, u, c);
              break;
            case 4:
              b[C].fn.call(b[C].context, u, c, d);
              break;
            default:
              if (!S) for ($ = 1, S = new Array(y - 1); $ < y; $++)
                S[$ - 1] = arguments[$];
              b[C].fn.apply(b[C].context, S);
          }
      }
      return !0;
    }, l.prototype.on = function(s, u, c) {
      return a(this, s, u, c, !1);
    }, l.prototype.once = function(s, u, c) {
      return a(this, s, u, c, !0);
    }, l.prototype.removeListener = function(s, u, c, d) {
      var f = n ? n + s : s;
      if (!this._events[f]) return this;
      if (!u)
        return r(this, f), this;
      var g = this._events[f];
      if (g.fn)
        g.fn === u && (!d || g.once) && (!c || g.context === c) && r(this, f);
      else {
        for (var m = 0, b = [], y = g.length; m < y; m++)
          (g[m].fn !== u || d && !g[m].once || c && g[m].context !== c) && b.push(g[m]);
        b.length ? this._events[f] = b.length === 1 ? b[0] : b : r(this, f);
      }
      return this;
    }, l.prototype.removeAllListeners = function(s) {
      var u;
      return s ? (u = n ? n + s : s, this._events[u] && r(this, u)) : (this._events = new o(), this._eventsCount = 0), this;
    }, l.prototype.off = l.prototype.removeListener, l.prototype.addListener = l.prototype.on, l.prefixed = n, l.EventEmitter = l, e.exports = l;
  })(z1)), z1.exports;
}
var Cj = Sj();
const Xm = /* @__PURE__ */ wj(Cj);
function N1(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.unshift(t));
}
function dg(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.push(t));
}
function xi(e, t, n = 1) {
  const o = Math.max(0, Math.ceil((t - e) / n)), i = Array.from({ length: o });
  let a = -1;
  for (; ++a < o; )
    i[a] = e + a * n;
  return i;
}
const $j = "_sash_j5cmb_7", Pj = "_disabled_j5cmb_15", Oj = "_mac_j5cmb_19", Ij = "_vertical_j5cmb_19", Mj = "_minimum_j5cmb_23", Tj = "_maximum_j5cmb_27", kj = "_horizontal_j5cmb_31", Ej = "_hover_j5cmb_126", _j = "_active_j5cmb_127", _o = {
  sash: $j,
  disabled: Pj,
  mac: Oj,
  vertical: Ij,
  minimum: Mj,
  maximum: Tj,
  horizontal: kj,
  hover: Ej,
  active: _j
};
var Vi = /* @__PURE__ */ ((e) => (e[e.Vertical = 0] = "Vertical", e[e.Horizontal = 1] = "Horizontal", e))(Vi || {}), el = /* @__PURE__ */ ((e) => (e[e.Disabled = 0] = "Disabled", e[e.Minimum = 1] = "Minimum", e[e.Maximum = 2] = "Maximum", e[e.Enabled = 3] = "Enabled", e))(el || {});
let G2 = q2 ? 20 : 8;
const K2 = new Xm();
function Aj(e) {
  G2 = e, K2.emit("onDidChangeGlobalSize", e);
}
class B1 extends Xm {
  el;
  layoutProvider;
  orientation;
  size;
  hoverDelay = 300;
  hoverDelayerFunc = (t) => t.classList.add("sash-hover", _o.hover);
  hoverDelayer = RV(
    this.hoverDelayerFunc,
    this.hoverDelay
  );
  _state = 3;
  get state() {
    return this._state;
  }
  /**
   * The state of a sash defines whether it can be interacted with by the user
   * as well as what mouse cursor to use, when hovered.
   */
  set state(t) {
    this._state !== t && (this.el.classList.toggle(
      _o.disabled,
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      "sash-disabled",
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      _o.minimum,
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      "sash-minimum",
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      _o.maximum,
      t === 2
      /* Maximum */
    ), this.el.classList.toggle(
      "sash-maximum",
      t === 2
      /* Maximum */
    ), this._state = t, this.emit("enablementChange", t));
  }
  constructor(t, n, o) {
    super(), this.el = document.createElement("div"), this.el.classList.add("sash", _o.sash), this.el.dataset.testid = "sash", t.append(this.el), yj && this.el.classList.add("sash-mac", _o.mac), this.el.addEventListener("pointerdown", this.onPointerStart), this.el.addEventListener("dblclick", this.onPointerDoublePress), this.el.addEventListener("mouseenter", this.onMouseEnter), this.el.addEventListener("mouseleave", this.onMouseLeave), typeof o.size == "number" ? (this.size = o.size, o.orientation === 0 ? this.el.style.width = `${this.size}px` : this.el.style.height = `${this.size}px`) : (this.size = G2, K2.on("onDidChangeGlobalSize", (i) => {
      this.size = i, this.layout();
    })), this.layoutProvider = n, this.orientation = o.orientation ?? 0, this.orientation === 1 ? (this.el.classList.add("sash-horizontal", _o.horizontal), this.el.classList.remove("sash-vertical", _o.vertical)) : (this.el.classList.remove("sash-horizontal", _o.horizontal), this.el.classList.add("sash-vertical", _o.vertical)), o.skipInitialLayout || this.layout();
  }
  onPointerStart = (t) => {
    const n = t.pageX, o = t.pageY, i = {
      startX: n,
      currentX: n,
      startY: o,
      currentY: o
    };
    this.el.classList.add("sash-active", _o.active), this.emit("start", i), this.el.setPointerCapture(t.pointerId);
    const a = (l) => {
      l.preventDefault();
      const s = {
        startX: n,
        currentX: l.pageX,
        startY: o,
        currentY: l.pageY
      };
      this.emit("change", s);
    }, r = (l) => {
      l.preventDefault(), this.el.classList.remove("sash-active", _o.active), this.hoverDelayer.cancel(), this.emit("end"), this.el.releasePointerCapture(l.pointerId), globalThis.removeEventListener("pointermove", a), globalThis.removeEventListener("pointerup", r);
    };
    globalThis.addEventListener("pointermove", a), globalThis.addEventListener("pointerup", r);
  };
  onPointerDoublePress = () => {
    this.emit("reset");
  };
  onMouseEnter = () => {
    this.el.classList.contains(_o.active) ? (this.hoverDelayer.cancel(), this.el.classList.add("sash-hover", _o.hover)) : this.hoverDelayer(this.el);
  };
  onMouseLeave = () => {
    this.hoverDelayer.cancel(), this.el.classList.remove("sash-hover", _o.hover);
  };
  /**
   * Layout the sash. The sash will size and position itself
   * based on its provided {@link SashLayoutProvider layout provider}.
   */
  layout() {
    if (this.orientation === 0) {
      const t = this.layoutProvider;
      this.el.style.left = `${t.getVerticalSashLeft(this) - this.size / 2}px`, t.getVerticalSashTop && (this.el.style.top = `${t.getVerticalSashTop(this)}px`), t.getVerticalSashHeight && (this.el.style.height = `${t.getVerticalSashHeight(this)}px`);
    } else {
      const t = this.layoutProvider;
      this.el.style.top = `${t.getHorizontalSashTop(this) - this.size / 2}px`, t.getHorizontalSashLeft && (this.el.style.left = `${t.getHorizontalSashLeft(this)}px`), t.getHorizontalSashWidth && (this.el.style.width = `${t.getHorizontalSashWidth(this)}px`);
    }
  }
  dispose() {
    this.el.removeEventListener("pointerdown", this.onPointerStart), this.el.removeEventListener("dblclick", this.onPointerDoublePress), this.el.removeEventListener("mouseenter", this.onMouseEnter), this.el.removeEventListener("mouseleave", this.onMouseLeave), this.el.remove();
  }
}
const Y2 = {
  /**
   * When adding or removing views, distribute the delta space among
   * all other views.
   */
  Distribute: { type: "distribute" },
  /**
   * When adding or removing views, split the delta space with another
   * specific view, indexed by the provided `index`.
   */
  Split: (e) => ({ type: "split", index: e }),
  /**
   * When adding or removing views, assume the view is invisible.
   */
  Invisible: (e) => ({ type: "invisible", cachedVisibleSize: e })
};
var Kd = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Low = 1] = "Low", e[e.High = 2] = "High", e))(Kd || {});
class U2 {
  container;
  view;
  _size;
  _cachedVisibleSize = void 0;
  constructor(t, n, o) {
    this.container = t, this.view = n, this.container.classList.add("split-view-view", mr.splitViewView), this.container.dataset.testid = "split-view-view", typeof o == "number" ? (this._size = o, this._cachedVisibleSize = void 0, t.classList.add("split-view-view-visible")) : (this._size = 0, this._cachedVisibleSize = o.cachedVisibleSize);
  }
  set size(t) {
    this._size = t;
  }
  get size() {
    return this._size;
  }
  get priority() {
    return this.view.priority;
  }
  get snap() {
    return !!this.view.snap;
  }
  get visible() {
    return this._cachedVisibleSize === void 0;
  }
  setVisible(t, n) {
    t !== this.visible && (t ? (this.size = Li(
      this._cachedVisibleSize ?? 0,
      this.view.minimumSize,
      this.view.maximumSize
    ), this._cachedVisibleSize = void 0) : (this._cachedVisibleSize = typeof n == "number" ? n : this.size, this.size = 0), this.container.classList.toggle("split-view-view-visible", t), this.view.setVisible && this.view.setVisible(t));
  }
  get minimumSize() {
    return this.visible ? this.view.minimumSize : 0;
  }
  get maximumSize() {
    return this.visible ? this.view.maximumSize : 0;
  }
  get cachedVisibleSize() {
    return this._cachedVisibleSize;
  }
}
class Dj extends U2 {
  layout(t) {
    if (!this.visible) {
      this.container.style.height = "0px", this.container.style.top = `${t}px`, this.container.style.left = "0px", this.container.style.width = "100%";
      return;
    }
    this.container.style.top = `${t}px`, this.container.style.height = `${this.size}px`, this.container.style.left = "0px", this.container.style.width = "100%", this.view.layout(this.size, t);
  }
}
class zj extends U2 {
  layout(t) {
    if (!this.visible) {
      this.container.style.width = "0px", this.container.style.left = `${t}px`, this.container.style.top = "0px", this.container.style.height = "100%";
      return;
    }
    this.container.style.left = `${t}px`, this.container.style.width = `${this.size}px`, this.container.style.top = "0px", this.container.style.height = "100%", this.view.layout(this.size, t);
  }
}
class Rj extends Xm {
  onDidChange;
  onDidDragStart;
  onDidDragEnd;
  _orientation;
  get orientation() {
    return this._orientation;
  }
  set orientation(t) {
    this._orientation = t;
  }
  sashContainer;
  size = 0;
  contentSize = 0;
  proportions = void 0;
  viewItems = [];
  sashItems = [];
  sashDragState;
  _proportionalLayout;
  get proportionalLayout() {
    return this._proportionalLayout;
  }
  set proportionalLayout(t) {
    this._proportionalLayout = t;
  }
  getSashOrthogonalSize;
  _startSnappingEnabled = !0;
  get startSnappingEnabled() {
    return this._startSnappingEnabled;
  }
  set startSnappingEnabled(t) {
    this._startSnappingEnabled !== t && (this._startSnappingEnabled = t, this.updateSashEnablement());
  }
  _endSnappingEnabled = !0;
  get endSnappingEnabled() {
    return this._endSnappingEnabled;
  }
  set endSnappingEnabled(t) {
    this._endSnappingEnabled !== t && (this._endSnappingEnabled = t, this.updateSashEnablement());
  }
  /** Create a new {@link SplitView} instance. */
  constructor(t, n = {}, o, i, a) {
    if (super(), this._orientation = n.orientation ?? Vi.Vertical, this._proportionalLayout = n.proportionalLayout ?? !0, this.getSashOrthogonalSize = n.getSashOrthogonalSize, o && (this.onDidChange = o), i && (this.onDidDragStart = i), a && (this.onDidDragEnd = a), this.sashContainer = document.createElement("div"), this.sashContainer.classList.add("sash-container", mr.sashContainer), t.prepend(this.sashContainer), n.descriptor) {
      this.size = n.descriptor.size;
      for (const [r, l] of n.descriptor.views.entries()) {
        const s = l.size, u = l.container, c = l.view;
        this.addView(u, c, s, r, !0);
      }
      this.contentSize = this.viewItems.reduce((r, l) => r + l.size, 0), this.saveProportions();
    }
  }
  addView(t, n, o, i = this.viewItems.length, a) {
    let r;
    typeof o == "number" ? r = o : o.type === "split" ? r = this.getViewSize(o.index) / 2 : o.type === "invisible" ? r = { cachedVisibleSize: o.cachedVisibleSize } : r = n.minimumSize;
    const l = this.orientation === Vi.Vertical ? new Dj(t, n, r) : new zj(t, n, r);
    if (this.viewItems.splice(i, 0, l), this.viewItems.length > 1) {
      const s = this.orientation === Vi.Vertical ? new B1(
        this.sashContainer,
        {
          getHorizontalSashTop: (d) => this.getSashPosition(d),
          getHorizontalSashWidth: this.getSashOrthogonalSize
        },
        { orientation: Vi.Horizontal }
      ) : new B1(
        this.sashContainer,
        {
          getVerticalSashLeft: (d) => this.getSashPosition(d),
          getVerticalSashHeight: this.getSashOrthogonalSize
        },
        { orientation: Vi.Vertical }
      ), u = this.orientation === Vi.Vertical ? (d) => ({
        sash: s,
        start: d.startY,
        current: d.currentY
      }) : (d) => ({
        sash: s,
        start: d.startX,
        current: d.currentX
      });
      s.on("start", (d) => {
        this.emit("sashDragStart"), this.onSashStart(u(d));
        const f = this.viewItems.map((g) => g.size);
        this.onDidDragStart?.(f);
      }), s.on("change", (d) => this.onSashChange(u(d))), s.on("end", () => {
        this.emit("sashDragEnd");
        let d = this.sashItems.findIndex((g) => g.sash === s);
        if (d === -1) {
          const g = s.el;
          g && (d = this.sashItems.findIndex((m) => m.sash.el === g));
        }
        this.onSashEnd(d);
        const f = this.viewItems.map((g) => g.size);
        this.onDidDragEnd?.(f);
      }), s.on("reset", () => {
        let d = this.sashItems.findIndex((y) => y.sash === s);
        if (d === -1) {
          const y = s.el;
          y && (d = this.sashItems.findIndex((S) => S.sash.el === y));
        }
        const f = xi(d, -1, -1), g = xi(d + 1, this.viewItems.length), m = this.findFirstSnapIndex(f), b = this.findFirstSnapIndex(g);
        typeof m == "number" && !this.viewItems[m].visible || typeof b == "number" && !this.viewItems[b].visible || this.emit("sashreset", d);
      });
      const c = { sash: s };
      this.sashItems.splice(i - 1, 0, c);
    }
    a || this.relayout(), !a && typeof o != "number" && o.type === "distribute" && this.distributeViewSizes();
  }
  removeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    const o = this.viewItems.splice(t, 1)[0].view;
    if (this.viewItems.length > 0) {
      const i = Math.max(t - 1, 0);
      this.sashItems.splice(i, 1)[0].sash.dispose();
    }
    return this.relayout(), n && n.type === "distribute" && this.distributeViewSizes(), o;
  }
  moveView(t, n, o) {
    const i = this.getViewCachedVisibleSize(n), a = i === void 0 ? this.getViewSize(n) : Y2.Invisible(i), r = this.removeView(n);
    this.addView(t, r, a, o);
  }
  getViewCachedVisibleSize(t) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    return this.viewItems[t].cachedVisibleSize;
  }
  layout(t = this.size) {
    if (this.viewItems.length === 0)
      return;
    const n = Math.max(this.size, this.contentSize);
    if (this.size = t, this.proportions)
      for (let o = 0; o < this.viewItems.length; o++) {
        const i = this.viewItems[o];
        i && this.proportions[o] !== void 0 && (i.size = Li(
          Math.round(this.proportions[o] * t),
          i.minimumSize,
          i.maximumSize
        ));
      }
    else {
      const o = xi(0, this.viewItems.length), i = o.filter(
        (r) => this.viewItems[r] && this.viewItems[r].priority === 1
        /* Low */
      ), a = o.filter(
        (r) => this.viewItems[r] && this.viewItems[r].priority === 2
        /* High */
      );
      this.resize(
        this.viewItems.length - 1,
        t - n,
        void 0,
        i,
        a
      );
    }
    this.distributeEmptySpace(), this.layoutViews();
  }
  resizeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      return;
    const o = xi(0, this.viewItems.length).filter((l) => l !== t), i = [
      ...o.filter(
        (l) => this.viewItems[l].priority === 1
        /* Low */
      ),
      t
    ], a = o.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    ), r = this.viewItems[t];
    n = Math.round(n), n = Li(n, r.minimumSize, Math.min(r.maximumSize, this.size)), r.size = n, this.relayout(i, a);
  }
  resizeViews(t) {
    for (let [n, o] of t.entries()) {
      const i = this.viewItems[n];
      o = Math.round(o), o = Li(
        o,
        i.minimumSize,
        Math.min(i.maximumSize, this.size)
      ), i.size = o;
    }
    this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0), this.saveProportions(), this.layout(this.size);
  }
  getViewSize(t) {
    return t < 0 || t >= this.viewItems.length ? -1 : this.viewItems[t].size;
  }
  isViewVisible(t) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    return this.viewItems[t].visible;
  }
  setViewVisible(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    this.viewItems[t].setVisible(n), this.emit("sashchange", t), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
  }
  distributeViewSizes() {
    const t = [];
    let n = 0;
    for (const l of this.viewItems)
      l.maximumSize - l.minimumSize > 0 && (t.push(l), n += l.size);
    const o = Math.floor(n / t.length);
    for (const l of t)
      l.size = Li(o, l.minimumSize, l.maximumSize);
    const i = xi(0, this.viewItems.length), a = i.filter(
      (l) => this.viewItems[l].priority === 1
      /* Low */
    ), r = i.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    );
    this.relayout(a, r);
  }
  dispose() {
    for (const t of this.sashItems) t.sash.dispose();
    this.sashItems = [], this.viewItems = [], this.sashContainer && this.sashContainer.parentElement && this.sashContainer.remove();
  }
  onSashStart({ sash: t, start: n, current: o }) {
    let i = this.sashItems.findIndex((m) => m.sash === t);
    if (i === -1) {
      const m = t.el;
      m && (i = this.sashItems.findIndex((b) => b.sash.el === m));
    }
    const a = this.viewItems.map((m) => m.size), r = xi(i, -1, -1), l = xi(i + 1, this.viewItems.length), s = this.getMinDelta(r, l, a), u = this.getMaxDelta(r, l, a);
    let c, d;
    const f = this.findFirstSnapIndex(r), g = this.findFirstSnapIndex(l);
    if (typeof f == "number") {
      const m = this.viewItems[f], b = Math.floor(m.minimumSize / 2);
      c = {
        index: f,
        limitDelta: m.visible ? s - b : s + b,
        size: m.size
      };
    }
    if (typeof g == "number") {
      const m = this.viewItems[g], b = Math.floor(m.minimumSize / 2);
      d = {
        index: g,
        limitDelta: m.visible ? u + b : u - b,
        size: m.size
      };
    }
    this.sashDragState = {
      index: i,
      start: n,
      current: o,
      sizes: a,
      minDelta: s,
      maxDelta: u,
      snapBefore: c,
      snapAfter: d
    };
  }
  onSashChange({ current: t }) {
    const { index: n, start: o, sizes: i, minDelta: a, maxDelta: r, snapBefore: l, snapAfter: s } = this.sashDragState, u = t - o;
    this.resize(n, u, i, void 0, void 0, a, r, l, s), this.distributeEmptySpace(), this.layoutViews();
  }
  onSashEnd(t) {
    this.emit("sashchange", t), this.sashDragState = void 0, this.saveProportions();
    const n = this.viewItems.map((o) => o.size);
    this.onDidChange?.(n);
  }
  getMinDelta(t, n, o) {
    const i = t.reduce(
      (r, l) => r + (this.viewItems[l].minimumSize - o[l]),
      0
    ), a = n.reduce(
      (r, l) => r + (o[l] - this.viewItems[l].maximumSize),
      0
    );
    return Math.max(i, a);
  }
  getMaxDelta(t, n, o) {
    const i = t.reduce(
      (r, l) => r + (this.viewItems[l].maximumSize - o[l]),
      0
    ), a = n.reduce(
      (r, l) => r + (o[l] - this.viewItems[l].minimumSize),
      0
    );
    return Math.min(a, i);
  }
  resize(t, n, o, i, a, r = Number.NEGATIVE_INFINITY, l = Number.POSITIVE_INFINITY, s, u) {
    if (t < 0 || t >= this.viewItems.length || this.viewItems.length === 0)
      return 0;
    const c = xi(t, -1, -1), d = xi(t + 1, this.viewItems.length);
    if (a)
      for (const E of a)
        N1(c, E), N1(d, E);
    if (i)
      for (const E of i)
        dg(c, E), dg(d, E);
    const f = o ?? this.viewItems.map((E) => E?.size || 0), g = c.map((E) => this.viewItems[E]), m = c.map((E) => f[E]), b = d.map((E) => this.viewItems[E]), y = d.map((E) => f[E]), S = c.reduce(
      (E, z) => E + (this.viewItems[z].minimumSize - f[z]),
      0
    ), C = c.reduce(
      (E, z) => E + (this.viewItems[z].maximumSize - f[z]),
      0
    ), O = d.length === 0 ? Number.POSITIVE_INFINITY : d.reduce(
      (E, z) => E + (f[z] - this.viewItems[z].minimumSize),
      0
    ), $ = d.length === 0 ? Number.NEGATIVE_INFINITY : d.reduce(
      (E, z) => E + (f[z] - this.viewItems[z].maximumSize),
      0
    ), P = Math.max(S, $, r), k = Math.min(O, C, l);
    let x = !1;
    if (s) {
      const E = this.viewItems[s.index], z = n >= s.limitDelta;
      x = z !== E.visible, E.setVisible(z, s.size);
    }
    if (!x && u) {
      const E = this.viewItems[u.index], z = n < u.limitDelta;
      x = z !== E.visible, E.setVisible(z, u.size);
    }
    if (x)
      return this.resize(
        t,
        n,
        o,
        i,
        a,
        r,
        l
      );
    n = Li(n, P, k);
    for (let E = 0, z = n; E < g.length; E++) {
      const B = g[E];
      if (!B)
        continue;
      const D = Li(
        m[E] + z,
        B.minimumSize,
        B.maximumSize
      ), W = D - m[E];
      z -= W, B.size = D;
    }
    for (let E = 0, z = n; E < b.length; E++) {
      const B = b[E];
      if (!B)
        continue;
      const D = Li(
        y[E] - z,
        B.minimumSize,
        B.maximumSize
      ), W = D - y[E];
      z += W, B.size = D;
    }
    return n;
  }
  distributeEmptySpace(t) {
    if (this.viewItems.length === 0)
      return;
    const n = this.viewItems.reduce((u, c) => u + c.size, 0);
    let o = this.size - n;
    const i = xi(0, this.viewItems.length), a = [], r = i.filter(
      (u) => this.viewItems[u].priority === 1
      /* Low */
    ), l = i.filter(
      (u) => this.viewItems[u].priority === 0
      /* Normal */
    ), s = i.filter(
      (u) => this.viewItems[u].priority === 2
      /* High */
    );
    a.push(
      ...s,
      ...l,
      ...r
    ), typeof t == "number" && dg(a, t);
    for (let u = 0; o !== 0 && u < a.length; u++) {
      const c = this.viewItems[a[u]];
      if (!c)
        continue;
      const d = Li(
        c.size + o,
        c.minimumSize,
        c.maximumSize
      ), f = d - c.size;
      o -= f, c.size = d;
    }
    this.contentSize = this.viewItems.reduce((u, c) => u + c.size, 0);
  }
  layoutViews() {
    this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0);
    let t = 0;
    for (const n of this.viewItems)
      n && (n.layout(t), t += n.size);
    for (const n of this.sashItems) n.sash.layout();
    this.updateSashEnablement();
  }
  saveProportions() {
    this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((t) => t.size / this.contentSize));
  }
  relayout(t, n) {
    const o = this.viewItems.reduce((i, a) => i + a.size, 0);
    this.resize(
      this.viewItems.length - 1,
      this.size - o,
      void 0,
      t,
      n,
      Number.NEGATIVE_INFINITY,
      Number.POSITIVE_INFINITY
    ), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
  }
  getSashPosition(t) {
    let n = -1;
    for (let i = 0; i < this.sashItems.length; i++)
      if (this.sashItems[i].sash === t) {
        n = i;
        break;
      }
    if (n === -1) {
      const i = t.el || t;
      if (i) {
        for (let a = 0; a < this.sashItems.length; a++)
          if ((this.sashItems[a].sash.el || this.sashItems[a].sash) === i) {
            n = a;
            break;
          }
      }
    }
    if (n === -1)
      return 0;
    let o = 0;
    for (let i = 0; i <= n; i++)
      this.viewItems[i] && (o += this.viewItems[i].size);
    return o;
  }
  findFirstSnapIndex(t) {
    for (const n of t) {
      const o = this.viewItems[n];
      if (o.visible && o.snap)
        return n;
    }
    for (const n of t) {
      const o = this.viewItems[n];
      if (o.visible && o.maximumSize - o.minimumSize > 0)
        return;
      if (!o.visible && o.snap)
        return n;
    }
  }
  updateSashEnablement() {
    let t = !1;
    const n = this.viewItems.map(
      (s) => t = s.size - s.minimumSize > 0 || t
    );
    t = !1;
    const o = this.viewItems.map(
      (s) => t = s.maximumSize - s.size > 0 || t
    ), i = [...this.viewItems].toReversed();
    t = !1;
    const a = i.map((s) => t = s.size - s.minimumSize > 0 || t).toReversed();
    t = !1;
    const r = i.map((s) => t = s.maximumSize - s.size > 0 || t).toReversed();
    let l = 0;
    for (let s = 0; s < this.sashItems.length; s++) {
      const { sash: u } = this.sashItems[s], c = this.viewItems[s];
      l += c.size;
      const d = !(n[s] && r[s + 1]), f = !(o[s] && a[s + 1]);
      if (d && f) {
        const g = xi(s, -1, -1), m = xi(s + 1, this.viewItems.length), b = this.findFirstSnapIndex(g), y = this.findFirstSnapIndex(m), S = typeof b == "number" && !this.viewItems[b].visible, C = typeof y == "number" && !this.viewItems[y].visible;
        S && a[s] && (l > 0 || this.startSnappingEnabled) ? u.state = el.Minimum : C && n[s] && (l < this.contentSize || this.endSnappingEnabled) ? u.state = el.Maximum : u.state = el.Disabled;
      } else d && !f ? u.state = el.Minimum : !d && f ? u.state = el.Maximum : u.state = el.Enabled;
    }
  }
}
class Kl {
  size;
  constructor(t) {
    this.size = t;
  }
  getPreferredSize() {
    return this.size;
  }
}
class F1 {
  proportion;
  layoutService;
  constructor(t, n) {
    this.proportion = t, this.layoutService = n;
  }
  getPreferredSize() {
    return this.proportion * this.layoutService.getSize();
  }
}
class Qc {
  getPreferredSize() {
  }
}
class L1 {
  minimumSize = 0;
  maximumSize = Number.POSITIVE_INFINITY;
  element;
  priority;
  snap;
  layoutService;
  layoutStrategy;
  get preferredSize() {
    return this.layoutStrategy.getPreferredSize();
  }
  set preferredSize(t) {
    if (typeof t == "number")
      this.layoutStrategy = new Kl(t);
    else if (typeof t == "string") {
      const n = t.trim();
      if (Xc(n, "%")) {
        const o = Number(n.slice(0, -1)) / 100;
        this.layoutStrategy = new F1(
          o,
          this.layoutService
        );
      } else if (Xc(n, "px")) {
        const o = Number(n.slice(0, -2));
        this.layoutStrategy = new Kl(o);
      } else if (typeof Number.parseFloat(n) == "number") {
        const o = Number.parseFloat(n);
        this.layoutStrategy = new Kl(o);
      } else
        this.layoutStrategy = new Qc();
    } else
      this.layoutStrategy = new Qc();
  }
  constructor(t, n) {
    if (this.layoutService = t, this.element = n.element, this.snap = typeof n.snap == "boolean" ? n.snap : !1, this.minimumSize = this.snap ? 0 : typeof n.minimumSize == "number" ? n.minimumSize : 30, this.maximumSize = typeof n.maximumSize == "number" ? n.maximumSize : Number.POSITIVE_INFINITY, typeof n.preferredSize == "number")
      this.layoutStrategy = new Kl(n.preferredSize);
    else if (typeof n.preferredSize == "string") {
      const o = n.preferredSize.trim();
      if (Xc(o, "%")) {
        const i = Number(o.slice(0, -1)) / 100;
        this.layoutStrategy = new F1(
          i,
          this.layoutService
        );
      } else if (Xc(o, "px")) {
        const i = Number(o.slice(0, -2));
        this.layoutStrategy = new Kl(i);
      } else if (typeof Number.parseFloat(o) == "number") {
        const i = Number.parseFloat(o);
        this.layoutStrategy = new Kl(i);
      } else
        this.layoutStrategy = new Qc();
    } else
      this.layoutStrategy = new Qc();
    this.priority = n.priority ?? Kd.Normal;
  }
  layout(t) {
  }
}
function Nj(e) {
  const t = Li(e, 4, 20), n = Li(e, 1, 8);
  document.documentElement.style.setProperty("--sash-size", `${t}px`), document.documentElement.style.setProperty(
    "--sash-hover-size",
    `${n}px`
  ), Aj(t);
}
const Bj = ["id"], Fj = /* @__PURE__ */ ye({
  __name: "Allotment",
  props: {
    className: { default: "" },
    defaultSizes: {},
    id: {},
    maxSize: { default: 1 / 0 },
    minSize: { default: 30 },
    proportionalLayout: { type: Boolean, default: !0 },
    separator: { type: Boolean, default: !0 },
    snap: { type: Boolean, default: !1 },
    sizes: {},
    vertical: { type: Boolean, default: !1 }
  },
  emits: ["change", "reset", "visibleChange", "dragStart", "dragEnd"],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, a = le(), r = le(), l = le(!1), s = le(null), u = Dn(/* @__PURE__ */ new Map()), c = Dn(/* @__PURE__ */ new Map()), d = le(new xj()), f = le([]), g = le([]), m = le(null), b = sO();
    kt("allotment", {
      registerPane: (x, E, z) => {
        u.set(x, E), c.set(x, z), l.value && Nt(() => {
          P();
        });
      },
      unregisterPane: (x) => {
        u.delete(x), c.delete(x);
      },
      registerNonPane: (x, E) => {
        u.set(x, E), c.set(x, {});
      }
    });
    const y = R(() => {
      const x = b.default?.({}) || [], E = (z) => {
        const B = [];
        for (const D of z)
          Array.isArray(D.children) ? B.push(...E(D.children)) : D.type && B.push(D);
        return B;
      };
      return E(x);
    });
    function S(x) {
      const E = f.value?.[x];
      return typeof E?.preferredSize != "number" ? !1 : (s.value?.resizeView(x, Math.round(E.preferredSize)), !0);
    }
    function C() {
      if (i("reset"), !!s.value) {
        s.value.distributeViewSizes();
        for (let x = 0; x < f.value.length; x++)
          S(x);
      }
    }
    function O(x) {
      s.value?.resizeViews(x);
    }
    t({
      reset: C,
      resize: O
    });
    function $() {
      if (!a.value)
        return;
      let x = !0;
      o.defaultSizes && u.size !== o.defaultSizes.length && (x = !1, console.warn(
        `Expected ${o.defaultSizes.length} children based on defaultSizes but found ${u.size}`
      ));
      const E = o.vertical ? a.value.clientHeight : a.value.clientWidth;
      d.value.setSize(E);
      let z = o.defaultSizes;
      if (!o.defaultSizes && u.size > 0) {
        const D = Math.floor(E / u.size);
        z = Array.from({ length: u.size }, () => D), z[z.length - 1] += E - D * u.size, x = !0, g.value = y.value.map(
          (W) => W.key
        );
      } else if (o.defaultSizes) {
        const D = o.defaultSizes.reduce((W, H) => W + H, 0);
        if (E > 0 && D > 0 && Math.abs(E - D) > 1) {
          const W = E / D;
          z = o.defaultSizes.map((H) => Math.round(H * W));
        }
        g.value = y.value.map(
          (W) => W.key
        );
      }
      f.value = [];
      const B = {
        orientation: o.vertical ? Vi.Vertical : Vi.Horizontal,
        proportionalLayout: o.proportionalLayout,
        ...x && z && {
          descriptor: {
            size: z.reduce((D, W) => D + W, 0),
            views: z.map((D, W) => {
              const H = [...u.keys()][W], F = c.get(H), A = new L1(d.value, {
                element: document.createElement("div"),
                minimumSize: F?.minSize ?? o.minSize,
                maximumSize: F?.maxSize ?? o.maxSize,
                priority: F?.priority ?? Kd.Normal,
                ...F?.preferredSize && {
                  preferredSize: F?.preferredSize
                },
                snap: F?.snap ?? o.snap
              });
              return f.value.push(A), {
                container: [...u.values()][W],
                size: D,
                view: A
              };
            })
          }
        }
      };
      if (s.value = new Rj(
        a.value,
        B,
        (D) => i("change", D),
        (D) => i("dragStart", D),
        (D) => i("dragEnd", D)
      ), s.value.on("sashDragStart", () => {
        a.value?.classList.add("split-view-sash-dragging");
      }), s.value.on("sashDragEnd", () => {
        a.value?.classList.remove("split-view-sash-dragging");
      }), s.value.on("sashchange", (D) => {
        if (s.value) {
          const W = y.value.map((H) => H.key);
          for (const [H, F] of W.entries()) {
            const A = c.get(F);
            A?.visible !== void 0 && A.visible !== s.value.isViewVisible(H) && i("visibleChange", H, s.value.isViewVisible(H));
          }
        }
      }), s.value?.on("sashreset", (D) => {
        i("reset"), !S(D) && (S(D + 1) || s.value?.distributeViewSizes());
      }), E > 0) {
        s.value.layout(E);
        for (let D = 0; D < f.value.length; D++)
          S(D);
      }
    }
    function P() {
      if (!l.value || !s.value)
        return;
      const x = y.value.map((W) => W.key), E = [...g.value], z = x.filter((W) => !g.value.includes(W)), B = x.filter((W) => g.value.includes(W)), D = g.value.map((W, H) => ({ key: W, index: H, shouldExit: !x.includes(W) }));
      for (let W = D.length - 1; W >= 0; W--)
        D[W].shouldExit && (s.value.removeView(D[W].index), E.splice(D[W].index, 1), f.value.splice(D[W].index, 1));
      for (const W of z) {
        const H = c.get(W), F = new L1(d.value, {
          element: document.createElement("div"),
          minimumSize: H?.minSize ?? o.minSize,
          maximumSize: H?.maxSize ?? o.maxSize,
          priority: H?.priority ?? Kd.Normal,
          ...H?.preferredSize && {
            preferredSize: H?.preferredSize
          },
          snap: H?.snap ?? o.snap
        }), A = x.indexOf(W);
        s.value.addView(
          u.get(W),
          F,
          Y2.Distribute,
          A
        ), E.splice(A, 0, W), f.value.splice(A, 0, F);
      }
      for (; !cj(x, E); )
        for (const [W, H] of x.entries()) {
          const F = E.indexOf(H);
          if (F !== W) {
            s.value.moveView(
              u.get(H),
              F,
              W
            );
            const A = E[F];
            E.splice(F, 1), E.splice(W, 0, A);
            const U = f.value[F];
            f.value.splice(F, 1), f.value.splice(W, 0, U);
            break;
          }
        }
      for (const W of [...z, ...B]) {
        const H = c.get(W), F = x.indexOf(W);
        if (H) {
          H.visible !== void 0 && s.value.isViewVisible(F) !== H.visible && s.value.setViewVisible(F, H.visible), H.preferredSize !== void 0 && f.value[F].preferredSize !== H.preferredSize && (f.value[F].preferredSize = H.preferredSize, S(F));
          let A = !1;
          H.minSize !== void 0 && f.value[F].minimumSize !== H.minSize && (f.value[F].minimumSize = H.minSize, A = !0), H.maxSize !== void 0 && f.value[F].maximumSize !== H.maxSize && (f.value[F].maximumSize = H.maxSize, A = !0), A && s.value.layout();
        }
      }
      (z.length > 0 || D.some((W) => W.shouldExit)) && (g.value = x);
    }
    function k() {
      a.value && (m.value = new ResizeObserver(() => {
        if (a.value) {
          const x = o.vertical ? a.value.clientHeight : a.value.clientWidth;
          x > 0 && (s.value?.layout(x), d.value.setSize(x), l.value || (l.value = !0));
        }
      }), m.value.observe(a.value));
    }
    return Pt(() => {
      q2 && Nj(20), Nt(() => {
        $(), k(), setTimeout(() => {
          if (a.value && s.value) {
            const x = o.vertical ? a.value.clientHeight : a.value.clientWidth;
            x > 0 && s.value.layout(x);
          }
        }, 50);
      });
    }), Ie(y, () => {
      Nt(() => {
        P();
      });
    }, { deep: !0 }), Ie(() => o.vertical, (x) => {
      s.value && (s.value.orientation = x ? Vi.Vertical : Vi.Horizontal, s.value.layout());
    }), Ie(() => o.proportionalLayout, (x) => {
      s.value && (s.value.proportionalLayout = x);
    }), Bo(() => {
      m.value?.disconnect(), s.value?.dispose();
    }), (x, E) => (ee(), ge("div", {
      id: x.id,
      ref_key: "containerRef",
      ref: a,
      class: ct(["split-view", [
        x.vertical ? "split-view-vertical" : "split-view-horizontal",
        { "split-view-separator-border": x.separator },
        M(mr).splitView,
        x.vertical ? M(mr).vertical : M(mr).horizontal,
        { [M(mr).separatorBorder]: x.separator },
        x.className
      ]])
    }, [
      N("div", {
        ref_key: "splitViewContainerRef",
        ref: r,
        class: ct(["split-view-container", [M(mr).splitViewContainer]])
      }, [
        Va(x.$slots, "default", {}, void 0, !0)
      ], 2)
    ], 10, Bj));
  }
}), Lj = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
}, H1 = /* @__PURE__ */ Lj(Fj, [["__scopeId", "data-v-e77a1ca4"]]), Zc = /* @__PURE__ */ ye({
  __name: "Pane",
  props: {
    className: { default: "" },
    maxSize: {},
    minSize: {},
    snap: { type: Boolean, default: !1 },
    preferredSize: {},
    priority: {},
    visible: { type: Boolean, default: !0 }
  },
  setup(e, { expose: t }) {
    const n = e, o = le(), i = ui(), a = Tt("allotment");
    function r() {
      return i?.vnode.key || `pane-${Math.random().toString(36).slice(2, 11)}`;
    }
    const l = r();
    return Pt(() => {
      a && o.value && a.registerPane(l, o.value, {
        minSize: n.minSize,
        maxSize: n.maxSize,
        preferredSize: n.preferredSize,
        priority: n.priority,
        snap: n.snap,
        visible: n.visible
      });
    }), Ie(() => n, (s) => {
      a && o.value && a.registerPane(l, o.value, {
        minSize: s.minSize,
        maxSize: s.maxSize,
        preferredSize: s.preferredSize,
        priority: s.priority,
        snap: s.snap,
        visible: s.visible
      });
    }, { deep: !0 }), Bo(() => {
      a && a.unregisterPane(l);
    }), t({
      element: o
    }), (s, u) => (ee(), ge("div", {
      ref_key: "paneRef",
      ref: o,
      class: ct(["split-view-view", [
        s.visible && "split-view-view-visible",
        M(mr).splitViewView,
        s.className
      ]])
    }, [
      Va(s.$slots, "default")
    ], 2));
  }
}), Hj = { class: "flex flex-col gap-3" }, Vj = { class: "text-xs text-secondary mb-1" }, jj = { class: "text-xs text-secondary mb-1" }, Wj = { class: "text-xs text-secondary mb-1" }, qj = { class: "text-xs text-secondary mb-1" }, Gj = { class: "text-xs text-secondary mb-1" }, Kj = { class: "text-xs text-secondary mb-1" }, Yj = ["value"], Uj = { class: "text-xs text-secondary mb-1" }, Xj = { class: "text-xs text-secondary mb-1" }, Qj = { class: "text-xs text-secondary mb-1" }, Zj = { class: "text-xs text-secondary mb-1" }, Jj = { class: "text-xs text-secondary mb-1" }, e7 = { class: "text-xs text-secondary mb-1" }, t7 = ["value"], n7 = { class: "text-xs text-secondary mb-1" }, o7 = { class: "text-xs text-secondary mb-1" }, i7 = { key: 0 }, a7 = { class: "text-xs text-secondary mb-1" }, r7 = ["value"], l7 = { class: "text-xs text-secondary mb-1" }, s7 = /* @__PURE__ */ ye({
  __name: "AxesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-radio-button"), a = Vt("a-radio-group"), r = Vt("a-switch");
      return ee(), ge("div", Hj, [
        N("div", null, [
          N("div", Vj, te(M(t)("config.field.axisPlacement")), 1),
          v(a, {
            size: "small",
            value: e.panel.axisPlacement ?? "left",
            onChange: o[0] || (o[0] = (l) => e.onChange({ axisPlacement: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "left" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.placement.left")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "right" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.placement.right")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.placement.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", jj, te(M(t)("config.field.axisLabel")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.axisLabel ?? "",
            placeholder: M(t)("config.axis.label.placeholder"),
            onChange: o[1] || (o[1] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        N("div", null, [
          N("div", Wj, te(M(t)("config.field.axisName")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.axisName ?? "",
            placeholder: M(t)("config.axis.name.placeholder"),
            onChange: o[2] || (o[2] = (l) => e.onChange({ axisName: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        N("div", null, [
          N("div", qj, te(M(t)("config.field.axisWidth")), 1),
          v(M(fo), {
            size: "small",
            value: e.panel.axisWidth ?? void 0,
            min: 20,
            max: 300,
            style: { width: "100%" },
            onChange: o[3] || (o[3] = (l) => e.onChange({ axisWidth: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", Gj, te(M(t)("config.field.showGridLines")), 1),
          v(a, {
            size: "small",
            value: e.panel.showGridLines ?? "all",
            onChange: o[4] || (o[4] = (l) => e.onChange({ showGridLines: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.x")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.y")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", Kj, te(M(t)("config.field.gridColor")), 1),
          N("input", {
            type: "color",
            value: e.panel.gridColor ?? "#e8e8e8",
            onInput: o[5] || (o[5] = (l) => e.onChange({ gridColor: l.target.value }))
          }, null, 40, Yj)
        ]),
        N("div", null, [
          N("div", Uj, te(M(t)("config.field.scaleDistribution")), 1),
          v(a, {
            size: "small",
            value: e.panel.scaleDistribution ?? "linear",
            onChange: o[6] || (o[6] = (l) => e.onChange({ scaleDistribution: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "linear" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.scale.linear")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "logarithmic" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.scale.logarithmic")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", Xj, te(M(t)("config.field.softMin")), 1),
          v(M(fo), {
            size: "small",
            value: e.panel.softMin ?? void 0,
            style: { width: "100%" },
            onChange: o[7] || (o[7] = (l) => e.onChange({ softMin: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", Qj, te(M(t)("config.field.softMax")), 1),
          v(M(fo), {
            size: "small",
            value: e.panel.softMax ?? void 0,
            style: { width: "100%" },
            onChange: o[8] || (o[8] = (l) => e.onChange({ softMax: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", Zj, te(M(t)("config.field.centeredZero")), 1),
          v(r, {
            size: "small",
            checked: e.panel.centeredZero,
            onChange: o[9] || (o[9] = (l) => e.onChange({ centeredZero: l }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", Jj, te(M(t)("config.field.axisLine")), 1),
          v(a, {
            size: "small",
            value: e.panel.axisLabel ?? "all",
            onChange: o[10] || (o[10] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [...o[16] || (o[16] = [
                  Ee(" X ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [...o[17] || (o[17] = [
                  Ee(" Y ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", e7, te(M(t)("config.field.axisLineColor")), 1),
          N("input", {
            type: "color",
            value: e.panel.axisLabelColor ?? "#666666",
            onInput: o[11] || (o[11] = (l) => e.onChange({ axisLabelColor: l.target.value }))
          }, null, 40, t7)
        ]),
        N("div", null, [
          N("div", n7, te(M(t)("config.field.axisTickShow")), 1),
          v(a, {
            size: "small",
            value: e.panel.axisTick ?? "hidden",
            onChange: o[12] || (o[12] = (l) => e.onChange({ axisTick: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [...o[18] || (o[18] = [
                  Ee(" X ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [...o[19] || (o[19] = [
                  Ee(" Y ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", o7, te(M(t)("config.field.axisBorder")), 1),
          v(a, {
            size: "small",
            value: e.panel.axisBorder ?? "hidden",
            onChange: o[13] || (o[13] = (l) => e.onChange({ axisBorder: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "x" }, {
                default: ce(() => [...o[20] || (o[20] = [
                  Ee(" X ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "y" }, {
                default: ce(() => [...o[21] || (o[21] = [
                  Ee(" Y ", -1)
                ])]),
                _: 1
              }),
              v(i, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.axisBorder && e.panel.axisBorder !== "hidden" ? (ee(), ge("div", i7, [
          N("div", a7, te(M(t)("config.field.axisBorderColor")), 1),
          N("input", {
            type: "color",
            value: e.panel.axisBorderColor ?? "#cccccc",
            onInput: o[14] || (o[14] = (l) => e.onChange({ axisBorderColor: l.target.value }))
          }, null, 40, r7)
        ])) : je("", !0),
        N("div", null, [
          N("div", l7, te(M(t)("config.field.logScale")), 1),
          v(r, {
            size: "small",
            checked: e.panel.scaleDistribution === "logarithmic",
            onChange: o[15] || (o[15] = (l) => e.onChange({ scaleDistribution: l ? "logarithmic" : "linear" }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), u7 = { class: "flex flex-col gap-3" }, c7 = { class: "text-xs text-secondary mb-1" }, d7 = { class: "text-xs text-secondary mb-1" }, f7 = { class: "text-xs text-secondary mb-1" }, p7 = { class: "text-xs text-secondary mb-1" }, g7 = { class: "text-xs text-secondary mb-1" }, h7 = { class: "text-xs text-secondary mb-1" }, v7 = { class: "text-xs text-secondary mb-1" }, m7 = /* @__PURE__ */ ye({
  __name: "BarStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-radio-button"), a = Vt("a-radio-group"), r = Vt("a-switch"), l = Vt("a-input-number");
      return ee(), ge("div", u7, [
        N("div", null, [
          N("div", c7, te(M(t)("config.field.barShowValues")), 1),
          v(a, {
            size: "small",
            value: e.panel.barShowValues ?? "auto",
            onChange: o[0] || (o[0] = (s) => e.onChange({ barShowValues: s.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "auto" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.showValues.auto")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "always" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.showValues.always")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "never" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.showValues.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", d7, te(M(t)("config.field.barGroupWidth")), 1),
          v(M(Wo), {
            min: 0.1,
            max: 1,
            step: 0.05,
            value: e.panel.barGroupWidth ?? 0.7,
            onChange: o[1] || (o[1] = (s) => e.onChange({ barGroupWidth: s }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", f7, te(M(t)("config.field.barWidth")), 1),
          v(M(Wo), {
            min: 0.1,
            max: 1,
            step: 0.05,
            value: e.panel.barWidth ?? 1,
            onChange: o[2] || (o[2] = (s) => e.onChange({ barWidth: s }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", p7, te(M(t)("config.field.stacked")), 1),
          v(r, {
            size: "small",
            checked: e.panel.stacked,
            onChange: o[3] || (o[3] = (s) => e.onChange({ stacked: s }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", g7, te(M(t)("config.field.lineWidth")), 1),
          v(l, {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.lineWidth,
            style: { width: "100%" },
            onChange: o[4] || (o[4] = (s) => e.onChange({ lineWidth: s ?? 1 }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", h7, te(M(t)("config.field.fillOpacity")), 1),
          v(M(Wo), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (s) => e.onChange({ fillOpacity: s }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", v7, te(M(t)("config.field.xTickRotation")), 1),
          v(r, {
            size: "small",
            checked: e.panel.barXTickRotation ?? !1,
            onChange: o[6] || (o[6] = (s) => e.onChange({ barXTickRotation: s }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), b7 = { class: "flex flex-col gap-3" }, y7 = { class: "text-xs text-secondary mb-1" }, x7 = { class: "text-xs text-secondary mb-1" }, w7 = { class: "text-xs text-secondary mb-1" }, S7 = ["value"], C7 = { class: "text-xs text-secondary mb-1" }, $7 = { class: "text-xs text-secondary mb-1" }, P7 = { class: "text-xs text-secondary mb-1" }, O7 = { class: "text-xs text-secondary mb-1" }, I7 = { class: "text-xs text-secondary mb-1" }, M7 = { key: 0 }, T7 = { class: "text-xs text-secondary mb-1" }, k7 = ["value"], E7 = { class: "text-xs text-secondary mb-1" }, _7 = { class: "text-xs text-secondary mb-1" }, A7 = { class: "text-xs text-secondary mb-1" }, D7 = { class: "text-xs text-secondary mb-1" }, z7 = { class: "text-xs text-secondary mb-1" }, R7 = { class: "text-xs text-secondary mb-1" }, N7 = /* @__PURE__ */ ye({
  __name: "GaugeStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-switch"), a = Vt("a-radio-button"), r = Vt("a-radio-group");
      return ee(), ge("div", b7, [
        N("div", null, [
          N("div", y7, te(M(t)("config.gauge.fillWidth")), 1),
          v(M(Wo), {
            min: 1,
            max: 100,
            value: e.panel.gaugeFillWidth ?? M($n).fillWidth,
            onChange: o[0] || (o[0] = (l) => e.onChange({ gaugeFillWidth: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", x7, te(M(t)("config.gauge.trackWidth")), 1),
          v(M(Wo), {
            min: 1,
            max: 100,
            value: e.panel.gaugeTrackWidth ?? M($n).trackWidth,
            onChange: o[1] || (o[1] = (l) => e.onChange({ gaugeTrackWidth: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", w7, te(M(t)("config.gauge.trackColor")), 1),
          N("input", {
            type: "color",
            value: e.panel.gaugeTrackColor ?? "#222222",
            onInput: o[2] || (o[2] = (l) => e.onChange({ gaugeTrackColor: l.target.value }))
          }, null, 40, S7)
        ]),
        N("div", null, [
          N("div", C7, te(M(t)("config.gauge.arcSweep")), 1),
          v(M(Wo), {
            min: 30,
            max: 360,
            value: e.panel.sweepAngle ?? M($n).sweepAngle,
            onChange: o[3] || (o[3] = (l) => e.onChange({ sweepAngle: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", $7, te(M(t)("config.gauge.paddingX")), 1),
          v(M(Wo), {
            min: 0,
            max: 0.5,
            step: 0.01,
            value: e.panel.gaugePaddingX ?? 0.05,
            onChange: o[4] || (o[4] = (l) => e.onChange({ gaugePaddingX: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", P7, te(M(t)("config.gauge.paddingY")), 1),
          v(M(Wo), {
            min: 0,
            max: 0.5,
            step: 0.01,
            value: e.panel.gaugePaddingY ?? 0.1,
            onChange: o[5] || (o[5] = (l) => e.onChange({ gaugePaddingY: l }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", O7, te(M(t)("config.gauge.capRound")), 1),
          v(i, {
            size: "small",
            checked: e.panel.gaugeCapRound ?? M($n).capRound,
            onChange: o[6] || (o[6] = (l) => e.onChange({ gaugeCapRound: l }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", I7, te(M(t)("config.gauge.valueVisible")), 1),
          v(i, {
            size: "small",
            checked: e.panel.gaugeValueVisible ?? M($n).valueVisible,
            onChange: o[7] || (o[7] = (l) => e.onChange({ gaugeValueVisible: l }))
          }, null, 8, ["checked"])
        ]),
        e.panel.gaugeValueVisible !== !1 ? (ee(), ge("div", M7, [
          N("div", T7, te(M(t)("config.gauge.valueColor")), 1),
          N("input", {
            type: "color",
            value: e.panel.gaugeValueColor ?? "#ffffff",
            onInput: o[8] || (o[8] = (l) => e.onChange({ gaugeValueColor: l.target.value }))
          }, null, 40, k7)
        ])) : je("", !0),
        N("div", null, [
          N("div", E7, te(M(t)("config.gauge.valueSize")), 1),
          v(M(fo), {
            size: "small",
            min: 8,
            max: 80,
            value: e.panel.gaugeValueSize ?? M($n).valueSize,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[9] || (o[9] = (l) => e.onChange({ gaugeValueSize: l ?? M($n).valueSize }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", _7, te(M(t)("config.gauge.valueOffsetY")), 1),
          v(M(fo), {
            size: "small",
            min: -50,
            max: 50,
            value: e.panel.gaugeValueOffsetY ?? M($n).valueOffsetY,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[10] || (o[10] = (l) => e.onChange({ gaugeValueOffsetY: l ?? M($n).valueOffsetY }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", A7, te(M(t)("config.gauge.colorFromScheme")), 1),
          v(i, {
            size: "small",
            checked: e.panel.gaugeColorFromScheme ?? !1,
            onChange: o[11] || (o[11] = (l) => e.onChange({ gaugeColorFromScheme: l }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", D7, te(M(t)("config.gauge.thresholdDisplay")), 1),
          v(r, {
            size: "small",
            value: e.panel.gaugeThresholdDisplay ?? M($n).thresholdDisplay,
            onChange: o[12] || (o[12] = (l) => e.onChange({ gaugeThresholdDisplay: l.target.value }))
          }, {
            default: ce(() => [
              v(a, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdDisplayNone")), 1)
                ]),
                _: 1
              }),
              v(a, { value: "marker" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdDisplayMarker")), 1)
                ]),
                _: 1
              }),
              v(a, { value: "track" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdDisplayTrack")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", z7, te(M(t)("config.gauge.thresholdLabelDisplay")), 1),
          v(r, {
            size: "small",
            value: e.panel.gaugeThresholdLabelDisplay ?? "none",
            onChange: o[13] || (o[13] = (l) => e.onChange({ gaugeThresholdLabelDisplay: l.target.value }))
          }, {
            default: ce(() => [
              v(a, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelNone")), 1)
                ]),
                _: 1
              }),
              v(a, { value: "label" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelLabel")), 1)
                ]),
                _: 1
              }),
              v(a, { value: "value" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelValue")), 1)
                ]),
                _: 1
              }),
              v(a, { value: "both" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.thresholdLabelBoth")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", R7, te(M(t)("config.gauge.orientation")), 1),
          v(r, {
            size: "small",
            value: e.panel.gaugeOrientation ?? M($n).orientation,
            onChange: o[14] || (o[14] = (l) => e.onChange({ gaugeOrientation: l.target.value }))
          }, {
            default: ce(() => [
              v(a, { value: "auto" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.orientationAuto")), 1)
                ]),
                _: 1
              }),
              v(a, { value: "horizontal" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.orientationHorizontal")), 1)
                ]),
                _: 1
              }),
              v(a, { value: "vertical" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.gauge.orientationVertical")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])
      ]);
    };
  }
}), ot = {
  // Actions
  edit: "i-carbon:edit",
  delete: "i-carbon:trash-can",
  clone: "i-carbon:stickies ",
  plus: "i-carbon:add-large",
  save: "i-mdi-content-save",
  cancel: "i-mdi-cancel",
  refresh: "i-carbon:renew",
  download: "i-carbon:download",
  upload: "i-carbon:upload",
  export: "i-carbon:export",
  import: "i-carbon:document-import",
  search: "i-mdi-magnify",
  settings: "i-carbon:settings",
  config: "i-carbon:settings-adjust",
  link: "i-mdi-link",
  // Navigation
  fullscreen: "i-carbon:center-to-fit",
  chevronDown: "i-carbon:chevron-down",
  chevronRight: "i-carbon:chevron-right",
  dotsVertical: "i-mdi-dots-vertical",
  dragVertical: "i-carbon:draggable",
  closeCircle: "i-mdi-close-circle",
  chevronLeft: "i-carbon:chevron-left",
  // Info
  info: "i-carbon:information",
  // view
  view: "i-carbon:view",
  viewOff: "i-carbon:view-off",
  // Theme
  sun: "i-mdi-white-balance-sunny",
  moon: "i-mdi-weather-night",
  // Panel types
  chartLine: "i-mdi-chart-line",
  chartBar: "i-mdi-chart-bar",
  chartArea: "i-mdi-chart-areaspline",
  chartPie: "i-mdi-chart-pie",
  stat: "i-mdi-format-list-numbered",
  gauge: "i-mdi-alarm-panel",
  table: "i-mdi-table",
  databaseOff: "i-mdi-database-off"
}, B7 = { class: "inline-flex gap-0.5 items-center" }, F7 = /* @__PURE__ */ ye({
  __name: "PaletteSwatches",
  props: {
    colors: {}
  },
  setup(e) {
    return (t, n) => (ee(), ge("span", B7, [
      (ee(!0), ge(He, null, It(e.colors, (o, i) => (ee(), ge("span", {
        key: `${o}-${i}`,
        class: "inline-block rounded-sm flex-shrink-0",
        style: xt({ width: "12px", height: "12px", background: o })
      }, null, 4))), 128))
    ]));
  }
}), L7 = [
  { value: "classic", colors: Sr.slice(0, 8) },
  { value: "tableau10", colors: wi.tableau10.slice(0, 8) },
  { value: "grafana-classic", colors: wi["grafana-classic"].slice(0, 8) },
  { value: "green-yellow-red", colors: wi["green-yellow-red"] },
  { value: "red-yellow-green", colors: wi["red-yellow-green"] },
  { value: "blue-yellow-red", colors: wi["blue-yellow-red"] },
  { value: "blue-purple", colors: wi["blue-purple"] },
  { value: "yellow-blue", colors: wi["yellow-blue"] },
  { value: "blues", colors: wi.blues },
  { value: "reds", colors: wi.reds },
  { value: "GrYlRd", colors: wi.GrYlRd },
  { value: "purple-orange", colors: wi["purple-orange"] },
  { value: "fixed", colors: [] },
  { value: "thresholds", colors: [] }
], H7 = { class: "flex flex-col gap-3" }, V7 = { class: "text-xs text-secondary mb-1" }, j7 = { class: "text-xs text-secondary mb-1" }, W7 = { class: "text-xs text-secondary mb-1" }, q7 = { class: "inline-flex items-center gap-1.5" }, G7 = { key: 0 }, K7 = { class: "text-xs text-secondary mb-1" }, Y7 = ["value"], U7 = { key: 1 }, X7 = { class: "text-xs text-secondary mb-1" }, Q7 = { class: "text-xs text-secondary mb-1" }, Z7 = { class: "flex gap-1 items-center" }, J7 = { class: "flex items-center gap-1" }, eW = { class: "text-xs text-secondary" }, V1 = /* @__PURE__ */ ye({
  __name: "GeneralSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = L7.map((l) => ({
      value: l.value,
      label: n(`config.scheme.${l.value}`),
      colors: l.colors
    }));
    function i() {
      const l = [...t.panel.links ?? [], { title: "", url: "", newTab: !0 }];
      t.onChange({ links: l });
    }
    function a(l) {
      const s = (t.panel.links ?? []).filter((u, c) => c !== l);
      t.onChange({ links: s });
    }
    function r(l, s) {
      const u = (t.panel.links ?? []).map((c, d) => d === l ? { ...c, ...s } : c);
      t.onChange({ links: u });
    }
    return (l, s) => {
      const u = Vt("a-switch");
      return ee(), ge("div", H7, [
        N("div", null, [
          N("div", V7, te(M(n)("config.field.title")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.title,
            onChange: s[0] || (s[0] = (c) => e.onChange({ title: c.target.value }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", j7, te(M(n)("config.field.description")), 1),
          v(M(ft), {
            size: "small",
            value: e.panel.description,
            onChange: s[1] || (s[1] = (c) => e.onChange({ description: c.target.value }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", W7, te(M(n)("config.field.colorScheme")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.colorScheme ?? "classic",
            "option-label-prop": "children",
            style: { width: "100%" },
            onChange: s[2] || (s[2] = (c) => e.onChange({ colorScheme: c }))
          }, {
            default: ce(() => [
              (ee(!0), ge(He, null, It(M(o), (c) => (ee(), Ze(M(bt).Option, {
                key: c.value,
                value: c.value
              }, {
                default: ce(() => [
                  N("span", q7, [
                    c.colors.length ? (ee(), Ze(F7, {
                      key: 0,
                      colors: c.colors
                    }, null, 8, ["colors"])) : je("", !0),
                    N("span", null, te(c.label), 1)
                  ])
                ]),
                _: 2
              }, 1032, ["value"]))), 128))
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.colorScheme === "fixed" ? (ee(), ge("div", G7, [
          N("div", K7, te(M(n)("config.field.colorSingle")), 1),
          N("input", {
            type: "color",
            value: e.panel.colorSingleValue ?? "#4096ff",
            onInput: s[3] || (s[3] = (c) => e.onChange({ colorSingleValue: c.target.value }))
          }, null, 40, Y7)
        ])) : je("", !0),
        e.panel.colorScheme && e.panel.colorScheme !== "fixed" && e.panel.colorScheme !== "thresholds" ? (ee(), ge("div", U7, [
          N("div", X7, te(M(n)("config.field.colorDistribution")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.colorDistribution ?? "sequential",
            options: [
              { value: "sequential", label: M(n)("config.colorDist.sequential") },
              { value: "distributed", label: M(n)("config.colorDist.distributed") }
            ],
            style: { width: "100%" },
            onChange: s[4] || (s[4] = (c) => e.onChange({ colorDistribution: c }))
          }, null, 8, ["value", "options"])
        ])) : je("", !0),
        N("div", null, [
          N("div", Q7, te(M(n)("config.section.links", { n: (e.panel.links ?? []).length })), 1),
          (ee(!0), ge(He, null, It(e.panel.links ?? [], (c, d) => (ee(), ge("div", {
            key: d,
            class: "mb-2 flex flex-col gap-1"
          }, [
            N("div", Z7, [
              v(M(ft), {
                size: "small",
                value: c.title,
                placeholder: "Title",
                style: { flex: "1" },
                onChange: (f) => r(d, { title: f.target.value })
              }, null, 8, ["value", "onChange"]),
              v(M($t), {
                type: "text",
                danger: "",
                size: "small",
                onClick: (f) => a(d)
              }, {
                default: ce(() => [
                  N("span", {
                    class: ct(M(ot).delete)
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["onClick"])
            ]),
            v(M(ft), {
              size: "small",
              value: c.url,
              placeholder: "https://",
              onChange: (f) => r(d, { url: f.target.value })
            }, null, 8, ["value", "onChange"]),
            N("div", J7, [
              v(u, {
                size: "small",
                checked: c.newTab,
                onChange: (f) => r(d, { newTab: f })
              }, null, 8, ["checked", "onChange"]),
              N("span", eW, te(M(n)("config.link.newTab")), 1)
            ])
          ]))), 128)),
          v(M($t), {
            type: "dashed",
            size: "small",
            block: "",
            onClick: i
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).plus, "mr-1"])
              }, null, 2),
              Ee(te(M(n)("config.link.add")), 1)
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
}), tW = { class: "flex flex-col gap-3" }, nW = { class: "text-xs text-secondary mb-1" }, oW = { class: "text-xs text-secondary mb-1" }, iW = { class: "text-xs text-secondary mb-1" }, aW = { class: "text-xs text-secondary mb-1" }, rW = { class: "text-xs text-secondary mb-1" }, lW = { class: "text-xs text-secondary mb-1" }, sW = /* @__PURE__ */ ye({
  __name: "HistogramStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-input-number"), a = Vt("a-switch");
      return ee(), ge("div", tW, [
        N("div", null, [
          N("div", nW, te(M(t)("config.field.histBucketCount")), 1),
          v(i, {
            size: "small",
            min: 1,
            max: 500,
            value: e.panel.histBucketCount ?? 30,
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (r) => e.onChange({ histBucketCount: r ?? 30 }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", oW, te(M(t)("config.field.histBucketSize")), 1),
          v(i, {
            size: "small",
            min: 0,
            value: e.panel.histBucketSize,
            placeholder: M(t)("config.hist.bucketSizePlaceholder"),
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (r) => e.onChange({ histBucketSize: r }))
          }, null, 8, ["value", "placeholder"])
        ]),
        N("div", null, [
          N("div", iW, te(M(t)("config.field.histBucketOffset")), 1),
          v(i, {
            size: "small",
            min: 0,
            value: e.panel.histBucketOffset ?? 0,
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (r) => e.onChange({ histBucketOffset: r ?? 0 }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", aW, te(M(t)("config.field.histCombineSeries")), 1),
          v(a, {
            size: "small",
            checked: e.panel.histCombineSeries ?? !1,
            onChange: o[3] || (o[3] = (r) => e.onChange({ histCombineSeries: r }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", rW, te(M(t)("config.field.lineWidth")), 1),
          v(i, {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.lineWidth,
            style: { width: "100%" },
            onChange: o[4] || (o[4] = (r) => e.onChange({ lineWidth: r ?? 1 }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", lW, te(M(t)("config.field.fillOpacity")), 1),
          v(M(Wo), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (r) => e.onChange({ fillOpacity: r }))
          }, null, 8, ["value"])
        ])
      ]);
    };
  }
}), uW = { class: "flex flex-col gap-3" }, cW = { class: "override-rule-header" }, dW = { class: "override-props" }, fW = /* @__PURE__ */ ye({
  __name: "OverridesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = [
      { value: "byName", label: "Field name" },
      { value: "byType", label: "Field type" },
      { value: "byRegexp", label: "Field name by regex" }
    ], i = [
      { value: "displayName", label: "Display name" },
      { value: "unit", label: "Unit" },
      { value: "decimals", label: "Decimals" },
      { value: "color", label: "Color" },
      { value: "thresholds", label: "Thresholds" },
      { value: "min", label: "Min" },
      { value: "max", label: "Max" },
      { value: "noValue", label: "No value" }
    ], a = R(() => t.panel.fieldConfigOverrides ?? []);
    function r() {
      const f = {
        id: crypto.randomUUID(),
        matcher: { id: "byName", options: "" },
        properties: []
      };
      t.onChange({ fieldConfigOverrides: [...a.value, f] });
    }
    function l(f) {
      t.onChange({
        fieldConfigOverrides: a.value.filter((g) => g.id !== f)
      });
    }
    function s(f, g) {
      t.onChange({
        fieldConfigOverrides: a.value.map(
          (m) => m.id === f ? { ...m, matcher: { ...m.matcher, ...g } } : m
        )
      });
    }
    function u(f) {
      t.onChange({
        fieldConfigOverrides: a.value.map(
          (g) => g.id === f ? { ...g, properties: [...g.properties, { id: "displayName", value: "" }] } : g
        )
      });
    }
    function c(f, g, m) {
      t.onChange({
        fieldConfigOverrides: a.value.map(
          (b) => b.id === f ? {
            ...b,
            properties: b.properties.map(
              (y, S) => S === g ? { ...y, ...m } : y
            )
          } : b
        )
      });
    }
    function d(f, g) {
      t.onChange({
        fieldConfigOverrides: a.value.map(
          (m) => m.id === f ? { ...m, properties: m.properties.filter((b, y) => y !== g) } : m
        )
      });
    }
    return (f, g) => (ee(), ge("div", uW, [
      (ee(!0), ge(He, null, It(a.value, (m) => (ee(), ge("div", {
        key: m.id,
        class: "override-rule"
      }, [
        N("div", cW, [
          v(M(bt), {
            size: "small",
            value: m.matcher.id,
            options: o,
            style: { flex: "1" },
            onChange: (b) => s(m.id, { id: b })
          }, null, 8, ["value", "onChange"]),
          v(M(ft), {
            size: "small",
            value: m.matcher.options ?? "",
            placeholder: M(n)("editor.overrides.matcherValue"),
            style: { flex: "1" },
            onChange: (b) => s(m.id, { options: b.target.value })
          }, null, 8, ["value", "placeholder", "onChange"]),
          v(M($t), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (b) => l(m.id)
          }, {
            default: ce(() => [
              N("span", {
                class: ct(M(ot).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]),
        N("div", dW, [
          (ee(!0), ge(He, null, It(m.properties, (b, y) => (ee(), ge("div", {
            key: y,
            class: "override-prop-row"
          }, [
            v(M(bt), {
              size: "small",
              value: b.id,
              options: i,
              style: { width: "140px" },
              onChange: (S) => c(m.id, y, { id: S })
            }, null, 8, ["value", "onChange"]),
            v(M(ft), {
              size: "small",
              value: String(b.value ?? ""),
              placeholder: M(n)("editor.overrides.propValue"),
              style: { flex: "1" },
              onChange: (S) => c(m.id, y, { value: S.target.value })
            }, null, 8, ["value", "placeholder", "onChange"]),
            v(M($t), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (S) => d(m.id, y)
            }, {
              default: ce(() => [
                N("span", {
                  class: ct(M(ot).closeCircle)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ]))), 128)),
          v(M($t), {
            type: "dashed",
            size: "small",
            style: { width: "100%", "margin-top": "4px" },
            onClick: (b) => u(m.id)
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).plus, "mr-1"])
              }, null, 2),
              Ee(" " + te(M(n)("editor.overrides.addProperty")), 1)
            ]),
            _: 1
          }, 8, ["onClick"])
        ])
      ]))), 128)),
      v(M($t), {
        type: "dashed",
        size: "small",
        style: { width: "100%" },
        onClick: r
      }, {
        default: ce(() => [
          N("span", {
            class: ct([M(ot).plus, "mr-1"])
          }, null, 2),
          Ee(" " + te(M(n)("editor.overrides.addOverride")), 1)
        ]),
        _: 1
      })
    ]));
  }
}), Ko = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
}, j1 = /* @__PURE__ */ Ko(fW, [["__scopeId", "data-v-2396374b"]]), pW = { class: "flex flex-col gap-3" }, gW = { class: "text-xs text-secondary mb-1" }, hW = { class: "text-xs text-secondary mb-1" }, vW = { class: "text-xs text-secondary mb-1" }, mW = { class: "flex flex-col gap-1" }, bW = { class: "text-xs" }, yW = { class: "text-xs text-secondary mb-1" }, xW = { key: 0 }, wW = { class: "text-xs text-secondary mb-1" }, SW = { class: "text-xs text-secondary mb-1" }, CW = { class: "text-xs text-secondary mb-1" }, $W = { class: "flex flex-col gap-1" }, PW = { class: "text-xs" }, OW = /* @__PURE__ */ ye({
  __name: "PieStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = R(() => t.panel.pieLabels ?? []), i = R(() => t.panel.legendValues ?? []);
    function a(l, s) {
      const u = s ? [...o.value, l] : o.value.filter((c) => c !== l);
      t.onChange({ pieLabels: u });
    }
    function r(l, s) {
      const u = s ? [...i.value, l] : i.value.filter((c) => c !== l);
      t.onChange({ legendValues: u });
    }
    return (l, s) => {
      const u = Vt("a-radio-button"), c = Vt("a-radio-group"), d = Vt("a-checkbox");
      return ee(), ge("div", pW, [
        N("div", null, [
          N("div", gW, te(M(n)("config.field.pieType")), 1),
          v(c, {
            size: "small",
            value: e.panel.pieType ?? "pie",
            onChange: s[0] || (s[0] = (f) => e.onChange({ pieType: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "pie" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieType.pie")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "donut" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieType.donut")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", hW, te(M(n)("config.field.pieSliceSorting")), 1),
          v(c, {
            size: "small",
            value: e.panel.pieSliceSorting ?? "desc",
            onChange: s[1] || (s[1] = (f) => e.onChange({ pieSliceSorting: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "desc" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.sort.desc")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "asc" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.sort.asc")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.sort.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", vW, te(M(n)("config.field.pieLabels")), 1),
          N("div", mW, [
            (ee(), ge(He, null, It(["name", "percent", "value"], (f) => N("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              v(d, {
                checked: o.value.includes(f),
                onChange: (g) => a(f, g.target.checked)
              }, null, 8, ["checked", "onChange"]),
              N("span", bW, te(M(n)(`config.pieLabel.${f}`)), 1)
            ])), 64))
          ])
        ]),
        N("div", null, [
          N("div", yW, te(M(n)("config.field.pieShow")), 1),
          v(c, {
            size: "small",
            value: e.panel.pieShow ?? "calculate",
            onChange: s[2] || (s[2] = (f) => e.onChange({ pieShow: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "calculate" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieShow.calculate")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "all" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.pieShow.all")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.pieShow ?? "calculate") === "calculate" ? (ee(), ge("div", xW, [
          N("div", wW, te(M(n)("config.field.reducer")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.pieCalculation ?? "lastNotNull",
            options: [
              { value: "lastNotNull", label: M(n)("config.reducer.lastNotNull") },
              { value: "last", label: M(n)("config.reducer.last") },
              { value: "mean", label: M(n)("config.reducer.mean") },
              { value: "min", label: M(n)("config.reducer.min") },
              { value: "max", label: M(n)("config.reducer.max") },
              { value: "sum", label: M(n)("config.reducer.sum") }
            ],
            style: { width: "100%" },
            onChange: s[3] || (s[3] = (f) => e.onChange({ pieCalculation: f }))
          }, null, 8, ["value", "options"])
        ])) : je("", !0),
        N("div", null, [
          N("div", SW, te(M(n)("config.field.legendMode")), 1),
          v(c, {
            size: "small",
            value: e.panel.legendMode ?? "list",
            onChange: s[4] || (s[4] = (f) => e.onChange({ legendMode: f.target.value }))
          }, {
            default: ce(() => [
              v(u, { value: "list" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legendMode.list")), 1)
                ]),
                _: 1
              }),
              v(u, { value: "table" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legendMode.table")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", CW, te(M(n)("config.field.legendValues")), 1),
          N("div", $W, [
            (ee(), ge(He, null, It(["min", "max", "mean", "sum", "last"], (f) => N("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              v(d, {
                checked: i.value.includes(f),
                onChange: (g) => r(f, g.target.checked)
              }, null, 8, ["checked", "onChange"]),
              N("span", PW, te(M(n)(`config.legendValue.${f}`)), 1)
            ])), 64))
          ])
        ])
      ]);
    };
  }
}), IW = { class: "flex flex-col gap-3" }, MW = { class: "text-xs text-secondary mb-1" }, TW = { class: "text-xs text-secondary mb-1" }, kW = { class: "text-xs text-secondary mb-1" }, EW = { class: "text-xs text-secondary mb-1" }, _W = /* @__PURE__ */ ye({
  __name: "StatStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-switch");
      return ee(), ge("div", IW, [
        N("div", null, [
          N("div", MW, te(M(t)("config.field.orientation")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.statOrientation ?? "vertical",
            options: [
              { value: "vertical", label: M(t)("config.orientation.vertical") },
              { value: "horizontal", label: M(t)("config.orientation.horizontal") }
            ],
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (a) => e.onChange({ statOrientation: a }))
          }, null, 8, ["value", "options"])
        ]),
        N("div", null, [
          N("div", TW, te(M(t)("config.field.textMode")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.statTextMode ?? "value_and_name",
            options: [
              { value: "value_and_name", label: M(t)("config.textMode.valueAndName") },
              { value: "value", label: M(t)("config.textMode.value") },
              { value: "name", label: M(t)("config.textMode.name") },
              { value: "none", label: M(t)("config.textMode.none") }
            ],
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (a) => e.onChange({ statTextMode: a }))
          }, null, 8, ["value", "options"])
        ]),
        N("div", null, [
          N("div", kW, te(M(t)("config.field.colorMode")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.statColorMode ?? "value",
            options: [
              { value: "value", label: M(t)("config.colorMode.value") },
              { value: "background_solid", label: M(t)("config.colorMode.backgroundSolid") },
              { value: "background", label: M(t)("config.colorMode.background") }
            ],
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (a) => e.onChange({ statColorMode: a }))
          }, null, 8, ["value", "options"])
        ]),
        N("div", null, [
          N("div", EW, te(M(t)("config.field.percentChange")), 1),
          v(i, {
            size: "small",
            checked: e.panel.showPercentChange ?? !1,
            onChange: o[3] || (o[3] = (a) => e.onChange({ showPercentChange: a }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), AW = { class: "flex flex-col gap-3" }, DW = { key: 0 }, zW = { class: "text-xs text-secondary mb-1" }, RW = { key: 1 }, NW = { class: "text-xs text-secondary mb-1" }, BW = { key: 2 }, FW = { class: "text-xs text-secondary mb-1" }, LW = { key: 3 }, HW = { class: "text-xs text-secondary mb-1" }, VW = { class: "text-xs text-secondary mb-1" }, jW = { class: "text-xs text-secondary mb-1" }, WW = { class: "text-xs text-secondary mb-1" }, qW = { class: "flex items-center gap-2" }, GW = { class: "text-xs text-secondary mb-1" }, KW = { class: "flex items-center gap-2" }, YW = { key: 5 }, UW = { class: "text-xs text-secondary mb-1" }, XW = { key: 6 }, QW = { class: "text-xs text-secondary mb-1" }, ZW = { class: "text-xs text-secondary mb-1" }, JW = { key: 7 }, e9 = { class: "text-xs text-secondary mb-1" }, t9 = /* @__PURE__ */ ye({
  __name: "StyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = t.panel.type === "timeseries", i = t.panel.drawStyle ?? "lines", a = i === "lines", r = i === "points", l = t.panel.showPointsMode ?? "auto", s = t.panel.spanNulls ?? !1, u = t.panel.insertNulls ?? !1;
    return (c, d) => {
      const f = Vt("a-radio-button"), g = Vt("a-radio-group"), m = Vt("a-input-number"), b = Vt("a-switch");
      return ee(), ge("div", AW, [
        o ? (ee(), ge("div", DW, [
          N("div", zW, te(M(n)("config.field.drawStyle")), 1),
          v(g, {
            size: "small",
            value: e.panel.drawStyle ?? "lines",
            onChange: d[0] || (d[0] = (y) => e.onChange({ drawStyle: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "lines" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.drawStyle.lines")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "bars" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.drawStyle.bars")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "points" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.drawStyle.points")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : je("", !0),
        r ? je("", !0) : (ee(), ge("div", RW, [
          N("div", NW, te(M(n)("config.field.lineWidth")), 1),
          v(M(Wo), {
            min: 0.5,
            max: 4,
            step: 0.5,
            value: e.panel.lineWidth,
            onChange: d[1] || (d[1] = (y) => e.onChange({ lineWidth: y }))
          }, null, 8, ["value"])
        ])),
        r ? je("", !0) : (ee(), ge("div", BW, [
          N("div", FW, te(M(n)("config.field.fillOpacity")), 1),
          v(M(Wo), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: d[2] || (d[2] = (y) => e.onChange({ fillOpacity: y }))
          }, null, 8, ["value"])
        ])),
        r ? je("", !0) : (ee(), ge("div", LW, [
          N("div", HW, te(M(n)("config.field.gradientMode")), 1),
          v(g, {
            size: "small",
            value: e.panel.gradientMode ?? "none",
            onChange: d[3] || (d[3] = (y) => e.onChange({ gradientMode: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.none")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "opacity" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.opacity")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "hue" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.hue")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "scheme" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.gradient.scheme")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])),
        o && a ? (ee(), ge(He, { key: 4 }, [
          N("div", null, [
            N("div", VW, te(M(n)("config.field.interpolation")), 1),
            v(g, {
              size: "small",
              value: e.panel.lineInterpolation,
              onChange: d[4] || (d[4] = (y) => e.onChange({ lineInterpolation: y.target.value }))
            }, {
              default: ce(() => [
                v(f, { value: "linear" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.interp.linear")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "smooth" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.interp.smooth")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "step" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.interp.step")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          N("div", null, [
            N("div", jW, te(M(n)("config.field.lineStyle")), 1),
            v(g, {
              size: "small",
              value: e.panel.lineStyle,
              onChange: d[5] || (d[5] = (y) => e.onChange({ lineStyle: y.target.value }))
            }, {
              default: ce(() => [
                v(f, { value: "solid" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.linestyle.solid")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "dashed" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.linestyle.dashed")), 1)
                  ]),
                  _: 1
                }),
                v(f, { value: "dotted" }, {
                  default: ce(() => [
                    Ee(te(M(n)("config.linestyle.dotted")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          N("div", null, [
            N("div", WW, te(M(n)("config.field.spanNulls")), 1),
            N("div", qW, [
              v(g, {
                size: "small",
                value: M(s) === !0 ? "always" : typeof M(s) == "number" ? "threshold" : "never",
                onChange: d[6] || (d[6] = (y) => {
                  y.target.value === "never" ? e.onChange({ spanNulls: !1 }) : y.target.value === "always" ? e.onChange({ spanNulls: !0 }) : e.onChange({ spanNulls: 3600 });
                })
              }, {
                default: ce(() => [
                  v(f, { value: "never" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  v(f, { value: "always" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.always")), 1)
                    ]),
                    _: 1
                  }),
                  v(f, { value: "threshold" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof M(s) == "number" ? (ee(), Ze(m, {
                key: 0,
                size: "small",
                min: 1,
                value: M(s),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[7] || (d[7] = (y) => e.onChange({ spanNulls: y ?? 3600 }))
              }, null, 8, ["value"])) : je("", !0)
            ])
          ]),
          N("div", null, [
            N("div", GW, te(M(n)("config.field.insertNulls")), 1),
            N("div", KW, [
              v(g, {
                size: "small",
                value: typeof M(u) == "number" ? "threshold" : "never",
                onChange: d[8] || (d[8] = (y) => {
                  y.target.value === "never" ? e.onChange({ insertNulls: !1 }) : e.onChange({ insertNulls: 3600 });
                })
              }, {
                default: ce(() => [
                  v(f, { value: "never" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  v(f, { value: "threshold" }, {
                    default: ce(() => [
                      Ee(te(M(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof M(u) == "number" ? (ee(), Ze(m, {
                key: 0,
                size: "small",
                min: 1,
                value: M(u),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[9] || (d[9] = (y) => e.onChange({ insertNulls: y ?? 3600 }))
              }, null, 8, ["value"])) : je("", !0)
            ])
          ])
        ], 64)) : je("", !0),
        o && !r ? (ee(), ge("div", YW, [
          N("div", UW, te(M(n)("config.field.showPoints")), 1),
          v(g, {
            size: "small",
            value: M(l),
            onChange: d[10] || (d[10] = (y) => e.onChange({ showPointsMode: y.target.value, showPoints: y.target.value === "always" }))
          }, {
            default: ce(() => [
              v(f, { value: "auto" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.points.auto")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "always" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.points.always")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "never" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.points.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : je("", !0),
        o ? (ee(), ge("div", XW, [
          N("div", QW, te(M(n)("config.field.stackSeries")), 1),
          v(g, {
            size: "small",
            value: e.panel.stackingMode ?? "none",
            onChange: d[11] || (d[11] = (y) => e.onChange({ stackingMode: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.stack.none")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "normal" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.stack.normal")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "percent" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.stack.percent")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : je("", !0),
        N("div", null, [
          N("div", ZW, te(M(n)("config.field.legendPosition")), 1),
          v(g, {
            size: "small",
            value: e.panel.legendPosition,
            onChange: d[12] || (d[12] = (y) => e.onChange({ legendPosition: y.target.value }))
          }, {
            default: ce(() => [
              v(f, { value: "bottom" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legend.bottom")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "right" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legend.right")), 1)
                ]),
                _: 1
              }),
              v(f, { value: "hidden" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.legend.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.type === "bar" ? (ee(), ge("div", JW, [
          N("div", e9, te(M(n)("config.field.stacked")), 1),
          v(b, {
            size: "small",
            checked: e.panel.stacked,
            onChange: d[13] || (d[13] = (y) => e.onChange({ stacked: y }))
          }, null, 8, ["checked"])
        ])) : je("", !0)
      ]);
    };
  }
}), n9 = { class: "flex flex-col gap-3" }, o9 = { class: "text-xs text-secondary mb-1" }, i9 = { class: "text-xs text-secondary mb-1" }, a9 = { class: "text-xs text-secondary mb-1" }, r9 = { class: "text-xs text-secondary mb-1" }, l9 = { class: "text-xs text-secondary mb-1" }, s9 = { class: "text-xs text-secondary mb-1" }, u9 = { key: 0 }, c9 = { class: "text-xs text-secondary mb-1" }, d9 = { class: "text-xs text-secondary mb-1" }, f9 = { key: 1 }, p9 = { class: "text-xs text-secondary mb-1" }, g9 = { key: 2 }, h9 = { class: "text-xs text-secondary mb-1" }, v9 = /* @__PURE__ */ ye({
  __name: "TableStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt();
    function o(i) {
      t.onChange({ tableFooterReducers: i ? [i] : [] });
    }
    return (i, a) => {
      const r = Vt("a-switch"), l = Vt("a-radio-button"), s = Vt("a-radio-group");
      return ee(), ge("div", n9, [
        N("div", null, [
          N("div", o9, te(M(n)("config.field.tableShowHeader")), 1),
          v(r, {
            size: "small",
            checked: e.panel.tableShowHeader ?? !0,
            onChange: a[0] || (a[0] = (u) => e.onChange({ tableShowHeader: u }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", i9, te(M(n)("config.field.tableCellHeight")), 1),
          v(s, {
            size: "small",
            value: e.panel.tableCellHeight ?? "medium",
            onChange: a[1] || (a[1] = (u) => e.onChange({ tableCellHeight: u.target.value }))
          }, {
            default: ce(() => [
              v(l, { value: "small" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.tableHeight.small")), 1)
                ]),
                _: 1
              }),
              v(l, { value: "medium" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.tableHeight.medium")), 1)
                ]),
                _: 1
              }),
              v(l, { value: "large" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.tableHeight.large")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        N("div", null, [
          N("div", a9, te(M(n)("config.field.tableFrozenColumns")), 1),
          v(M(fo), {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.tableFrozenColumns ?? 0,
            style: { width: "100%" },
            onChange: a[2] || (a[2] = (u) => e.onChange({ tableFrozenColumns: u ?? 0 }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", r9, te(M(n)("config.field.tableColumnFilter")), 1),
          v(r, {
            size: "small",
            checked: e.panel.tableColumnFilter ?? !1,
            onChange: a[3] || (a[3] = (u) => e.onChange({ tableColumnFilter: u }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", l9, te(M(n)("config.field.tableWrapText")), 1),
          v(r, {
            size: "small",
            checked: e.panel.tableWrapText ?? !1,
            onChange: a[4] || (a[4] = (u) => e.onChange({ tableWrapText: u }))
          }, null, 8, ["checked"])
        ]),
        N("div", null, [
          N("div", s9, te(M(n)("config.field.tableEnablePagination")), 1),
          v(r, {
            size: "small",
            checked: e.panel.tableEnablePagination ?? !1,
            onChange: a[5] || (a[5] = (u) => e.onChange({ tableEnablePagination: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableEnablePagination ? (ee(), ge("div", u9, [
          N("div", c9, te(M(n)("config.field.tablePageSize")), 1),
          v(M(fo), {
            size: "small",
            min: 5,
            max: 500,
            value: e.panel.tablePageSize ?? 20,
            style: { width: "100%" },
            onChange: a[6] || (a[6] = (u) => e.onChange({ tablePageSize: u ?? 20 }))
          }, null, 8, ["value"])
        ])) : je("", !0),
        N("div", null, [
          N("div", d9, te(M(n)("config.field.tableFooterEnabled")), 1),
          v(r, {
            size: "small",
            checked: e.panel.tableFooterEnabled ?? !1,
            onChange: a[7] || (a[7] = (u) => e.onChange({ tableFooterEnabled: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableFooterEnabled ? (ee(), ge("div", f9, [
          N("div", p9, te(M(n)("config.field.tableFooterReducers")), 1),
          v(M(bt), {
            size: "small",
            value: e.panel.tableFooterReducers?.[0],
            options: [
              { value: "min", label: M(n)("config.reducer.min") },
              { value: "max", label: M(n)("config.reducer.max") },
              { value: "mean", label: M(n)("config.reducer.mean") },
              { value: "sum", label: M(n)("config.reducer.sum") },
              { value: "count", label: M(n)("config.reducer.count") }
            ],
            "allow-clear": "",
            style: { width: "100%" },
            onChange: a[8] || (a[8] = (u) => o(u))
          }, null, 8, ["value", "options"])
        ])) : je("", !0),
        e.panel.tableFooterEnabled && e.panel.tableFooterReducers?.[0] ? (ee(), ge("div", g9, [
          N("div", h9, te(M(n)("config.field.tableFooterFields")), 1),
          v(M(bt), {
            size: "small",
            mode: "multiple",
            "allow-clear": "",
            placeholder: M(n)("config.field.tableFooterFieldsPlaceholder"),
            value: e.panel.tableFooterFields ?? [],
            options: (e.numericFieldNames ?? []).map((u) => ({ value: u, label: u })),
            style: { width: "100%" },
            onChange: a[9] || (a[9] = (u) => e.onChange({ tableFooterFields: u.length > 0 ? u : void 0 }))
          }, null, 8, ["placeholder", "value", "options"])
        ])) : je("", !0)
      ]);
    };
  }
}), m9 = { class: "flex flex-col gap-1" }, b9 = { class: "mb-2" }, y9 = { class: "text-xs text-secondary mb-1" }, x9 = ["value", "onInput"], w9 = { class: "flex items-center gap-1.5 mb-1" }, S9 = ["value"], C9 = { class: "text-xs text-secondary flex-1" }, $9 = /* @__PURE__ */ ye({
  __name: "ThresholdsEditor",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), o = ["#52c41a", "#faad14", "#ff4d4f", "#1677ff", "#722ed1", "#13c2c2", "#fa8c16"], i = le(t.panel.thresholdMode ?? "absolute"), a = R(() => i.value === "percentage"), r = R(() => [...t.panel.thresholds].sort((f, g) => g.value - f.value));
    function l() {
      const f = [t.panel.thresholdBaseColor, ...t.panel.thresholds.map((g) => g.color)];
      return o.find((g) => !f.includes(g)) ?? "#cccccc";
    }
    function s() {
      const f = t.panel.thresholds.length > 0 ? Math.max(...t.panel.thresholds.map((y) => y.value)) : 0, m = { value: a.value ? Math.min(100, f + 20) : f + 10, color: l(), label: "" }, b = [...t.panel.thresholds, m].sort((y, S) => y.value - S.value);
      t.onChange({ thresholds: b });
    }
    function u(f) {
      t.onChange({ thresholds: t.panel.thresholds.filter((g) => g.value !== f) });
    }
    function c(f, g) {
      const m = t.panel.thresholds.map((b) => b.value === f ? { ...b, ...g } : b).sort((b, y) => b.value - y.value);
      t.onChange({ thresholds: m });
    }
    function d(f) {
      i.value = f, t.onChange({ thresholdMode: f });
    }
    return (f, g) => {
      const m = Vt("a-input");
      return ee(), ge("div", m9, [
        N("div", b9, [
          N("div", y9, te(M(n)("config.threshold.mode")), 1),
          v(M(Do).Group, {
            size: "small",
            value: i.value,
            onChange: g[0] || (g[0] = (b) => d(b.target.value))
          }, {
            default: ce(() => [
              v(M(Do).Button, { value: "absolute" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.threshold.modeAbsolute")), 1)
                ]),
                _: 1
              }),
              v(M(Do).Button, { value: "percentage" }, {
                default: ce(() => [
                  Ee(te(M(n)("config.threshold.modePercentage")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (ee(!0), ge(He, null, It(r.value, (b) => (ee(), ge("div", {
          key: b.value,
          class: "flex items-center gap-1.5 mb-1"
        }, [
          N("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: b.color,
            onInput: (y) => c(b.value, { color: y.target.value })
          }, null, 40, x9),
          v(M(fo), {
            size: "small",
            value: b.value,
            min: a.value ? 0 : void 0,
            max: a.value ? 100 : void 0,
            style: { width: "80px" },
            onChange: (y) => c(b.value, { value: y ?? 0 })
          }, null, 8, ["value", "min", "max", "onChange"]),
          v(m, {
            size: "small",
            value: b.label,
            placeholder: "Label",
            style: { flex: "1" },
            onChange: (y) => c(b.value, { label: y.target.value })
          }, null, 8, ["value", "onChange"]),
          v(M($t), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (y) => u(b.value)
          }, {
            default: ce(() => [
              N("span", {
                class: ct(M(ot).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]))), 128)),
        N("div", w9, [
          N("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: e.panel.thresholdBaseColor,
            onInput: g[1] || (g[1] = (b) => e.onChange({ thresholdBaseColor: b.target.value }))
          }, null, 40, S9),
          N("span", C9, te(M(n)("config.threshold.base")), 1)
        ]),
        v(M($t), {
          type: "dashed",
          size: "small",
          block: "",
          onClick: s
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(n)("config.threshold.add")), 1)
          ]),
          _: 1
        })
      ]);
    };
  }
}), P9 = { class: "flex flex-col gap-3" }, O9 = { class: "text-xs text-secondary mb-1" }, I9 = { key: 0 }, M9 = { class: "text-xs text-secondary mb-1" }, T9 = { key: 1 }, k9 = { class: "text-xs text-secondary mb-1" }, E9 = { class: "text-xs text-secondary mb-1" }, _9 = /* @__PURE__ */ ye({
  __name: "TooltipSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = jt();
    return (n, o) => {
      const i = Vt("a-radio-button"), a = Vt("a-radio-group"), r = Vt("a-switch");
      return ee(), ge("div", P9, [
        N("div", null, [
          N("div", O9, te(M(t)("config.field.tooltipMode")), 1),
          v(a, {
            size: "small",
            value: e.panel.tooltipMode ?? "multi",
            onChange: o[0] || (o[0] = (l) => e.onChange({ tooltipMode: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "single" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.single")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "multi" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.multi")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ee(), ge("div", I9, [
          N("div", M9, te(M(t)("config.field.tooltipSort")), 1),
          v(a, {
            size: "small",
            value: e.panel.tooltipSort ?? "none",
            onChange: o[1] || (o[1] = (l) => e.onChange({ tooltipSort: l.target.value }))
          }, {
            default: ce(() => [
              v(i, { value: "none" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.sortNone")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "asc" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.sortAsc")), 1)
                ]),
                _: 1
              }),
              v(i, { value: "desc" }, {
                default: ce(() => [
                  Ee(te(M(t)("config.tooltip.sortDesc")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : je("", !0),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ee(), ge("div", T9, [
          N("div", k9, te(M(t)("config.field.tooltipMaxHeight")), 1),
          v(M(fo), {
            size: "small",
            min: 50,
            max: 800,
            value: e.panel.tooltipMaxHeight ?? 600,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (l) => e.onChange({ tooltipMaxHeight: l ?? 600 }))
          }, null, 8, ["value"])
        ])) : je("", !0),
        N("div", null, [
          N("div", E9, te(M(t)("config.field.axisPointer")), 1),
          v(r, {
            size: "small",
            checked: e.panel.showAxisPointer ?? !0,
            onChange: o[3] || (o[3] = (l) => e.onChange({ showAxisPointer: l }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), A9 = { class: "flex items-center gap-2" }, D9 = /* @__PURE__ */ ye({
  __name: "SliderInput",
  props: {
    value: {},
    min: {},
    max: {},
    step: { default: 1 },
    shiftMultiplier: { default: 10 },
    unit: {},
    placeholder: {},
    allowClear: { type: Boolean, default: !1 }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt();
    function a(g) {
      return Math.min(n.max, Math.max(n.min, g));
    }
    const r = R(() => n.value ?? n.min), l = R(() => n.placeholder ?? i("common.auto")), s = R(() => {
      const g = n.value !== void 0 ? n.unit ? `${n.value}${n.unit}` : String(n.value) : l.value;
      try {
        const m = document.createElement("canvas").getContext("2d");
        return m ? (m.font = "14px system-ui, -apple-system, sans-serif", `${Math.ceil(m.measureText(g).width) + 24}px`) : "6ch";
      } catch {
        return "6ch";
      }
    });
    function u(g) {
      typeof g == "number" && o("change", a(g));
    }
    function c(g) {
      g != null && o("change", a(Number(g)));
    }
    function d() {
      o("change", void 0);
    }
    function f(g) {
      const m = g.shiftKey, b = n.step * (m ? n.shiftMultiplier : 1);
      g.key === "ArrowRight" || g.key === "ArrowUp" ? (g.preventDefault(), o("change", a(r.value + b))) : (g.key === "ArrowLeft" || g.key === "ArrowDown") && (g.preventDefault(), o("change", a(r.value - b)));
    }
    return (g, m) => (ee(), ge("div", A9, [
      v(M(Wo), {
        min: e.min,
        max: e.max,
        step: e.step,
        value: r.value,
        style: { flex: "1" },
        "tooltip-formatter": e.unit ? ((b) => `${b}${e.unit}`) : void 0,
        onChange: u
      }, null, 8, ["min", "max", "step", "value", "tooltip-formatter"]),
      v(M(ha).Compact, { size: "small" }, {
        default: ce(() => [
          v(M(fo), {
            size: "small",
            controls: !1,
            min: e.min,
            max: e.max,
            step: e.step,
            value: e.value ?? void 0,
            placeholder: l.value,
            style: xt({ width: s.value }),
            suffix: e.unit && e.value !== void 0 ? e.unit : void 0,
            onKeydown: f,
            onChange: c
          }, null, 8, ["min", "max", "step", "value", "placeholder", "style", "suffix"]),
          e.allowClear && e.value !== void 0 ? (ee(), Ze(M($t), {
            key: 0,
            onClick: d
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).closeCircle, "text-xs text-gray-400 cursor-pointer"])
              }, null, 2)
            ]),
            _: 1
          })) : je("", !0)
        ]),
        _: 1
      })
    ]));
  }
}), z9 = { class: "flex flex-col gap-3" }, R9 = { key: 0 }, N9 = { class: "text-xs text-secondary mb-1" }, B9 = { class: "text-xs text-secondary mb-1" }, F9 = { class: "text-xs text-secondary mb-1" }, L9 = { key: 1 }, H9 = { class: "text-xs text-secondary mb-1" }, V9 = { key: 2 }, j9 = { class: "text-xs text-secondary mb-1" }, W9 = /* @__PURE__ */ ye({
  __name: "ValueSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = jt(), i = ["", "ms", "s", "bytes", "percent", "percentunit", "reqps", "ops", "bps", "Bps"].map((s) => ({
      value: s,
      label: n(s ? `config.unit.${s}` : "config.unit.none")
    })), a = [
      { value: "lastNotNull", label: n("config.reducer.lastNotNull") },
      { value: "last", label: n("config.reducer.last") },
      { value: "firstNotNull", label: n("config.reducer.firstNotNull") },
      { value: "first", label: n("config.reducer.first") },
      { value: "mean", label: n("config.reducer.mean") },
      { value: "min", label: n("config.reducer.min") },
      { value: "max", label: n("config.reducer.max") },
      { value: "sum", label: n("config.reducer.sum") },
      { value: "count", label: n("config.reducer.count") }
    ], r = t.panel.type === "gauge", l = t.panel.type !== "timeseries";
    return (s, u) => (ee(), ge("div", z9, [
      l ? (ee(), ge("div", R9, [
        N("div", N9, te(M(n)("config.field.reducer")), 1),
        v(M(bt), {
          size: "small",
          value: e.panel.statReducer ?? "lastNotNull",
          options: a,
          style: { width: "100%" },
          onChange: u[0] || (u[0] = (c) => e.onChange({ statReducer: c }))
        }, null, 8, ["value"])
      ])) : je("", !0),
      N("div", null, [
        N("div", B9, te(M(n)("config.field.unit")), 1),
        v(M(bt), {
          size: "small",
          value: e.panel.unit || "",
          options: M(i),
          style: { width: "100%" },
          onChange: u[1] || (u[1] = (c) => e.onChange({ unit: c }))
        }, null, 8, ["value", "options"])
      ]),
      N("div", null, [
        N("div", F9, te(M(n)("config.field.decimals")), 1),
        v(D9, {
          min: 0,
          max: 15,
          step: 1,
          value: e.panel.decimals,
          "allow-clear": !0,
          onChange: u[2] || (u[2] = (c) => e.onChange({ decimals: c }))
        }, null, 8, ["value"])
      ]),
      r ? (ee(), ge("div", L9, [
        N("div", H9, te(M(n)("config.field.min")), 1),
        v(M(fo), {
          size: "small",
          value: e.panel.min,
          style: { width: "100%" },
          onChange: u[3] || (u[3] = (c) => e.onChange({ min: c ?? 0 }))
        }, null, 8, ["value"])
      ])) : je("", !0),
      r ? (ee(), ge("div", V9, [
        N("div", j9, te(M(n)("config.field.max")), 1),
        v(M(fo), {
          size: "small",
          value: e.panel.max,
          style: { width: "100%" },
          onChange: u[4] || (u[4] = (c) => e.onChange({ max: c ?? 100 }))
        }, null, 8, ["value"])
      ])) : je("", !0)
    ]));
  }
}), q9 = { class: "h-full flex flex-col overflow-hidden" }, G9 = {
  class: "flex-shrink-0 px-2 bg-primary/10 py-1",
  style: { "border-bottom": "1px solid #eee" }
}, K9 = { class: "flex-1 overflow-y-auto" }, Y9 = /* @__PURE__ */ ye({
  __name: "OptionsPane",
  setup(e) {
    const t = [
      "timeseries",
      "bar",
      "histogram",
      "stat",
      "gauge",
      "table",
      "pie"
    ], { t: n } = jt(), { panel: o, onChange: i, numericFieldNames: a, allFieldNames: r } = qs(), l = R(
      () => t.map((g) => ({
        value: g,
        label: n(`config.type.${g}`)
      }))
    ), s = le(""), u = {
      general: V1,
      style: t9,
      tooltip: _9,
      axes: s7,
      value: W9,
      // timeseries / bar / histogram
      "bar-style": m7,
      "histogram-style": sW,
      // stat
      "stat-style": _W,
      // gauge
      "gauge-style": N7,
      // pie
      "pie-style": OW,
      // table
      "table-style": v9,
      // overrides
      overrides: j1
    }, c = R(() => {
      const m = (uI(o.value.type)?.optionCategories ?? []).map((b) => ({
        key: b.key,
        label: n(b.labelKey),
        component: u[b.key] ?? V1
      }));
      return m.push({
        key: "thresholds",
        label: n("config.section.thresholds", { n: o.value.thresholds.length }),
        component: $9
      }), m.push({
        key: "overrides",
        label: n("config.section.overrides"),
        component: j1
      }), m;
    }), d = R(() => {
      if (!s.value.trim())
        return c.value;
      const g = s.value.toLowerCase();
      return c.value.filter(
        (m) => typeof m.label == "string" && m.label.toLowerCase().includes(g)
      );
    }), f = le(["general"]);
    return (g, m) => (ee(), ge("div", q9, [
      N("div", G9, [
        v(M(bt), {
          class: "text-primary",
          bordered: !1,
          value: M(o).type,
          size: "small",
          variant: "filled",
          options: l.value,
          "onUpdate:value": m[0] || (m[0] = (b) => M(i)({ type: b }))
        }, null, 8, ["value", "options"])
      ]),
      N("div", K9, [
        v(M(Cr), {
          "active-key": f.value,
          "onUpdate:activeKey": m[1] || (m[1] = (b) => f.value = b),
          bordered: !1,
          accordion: "",
          size: "small"
        }, {
          default: ce(() => [
            (ee(!0), ge(He, null, It(d.value, (b) => (ee(), Ze(M(Cr).Panel, {
              key: b.key,
              header: b.label
            }, {
              default: ce(() => [
                (ee(), Ze(ew(b.component), {
                  panel: M(o),
                  "on-change": M(i),
                  "numeric-field-names": M(a),
                  "all-field-names": M(r)
                }, null, 40, ["panel", "on-change", "numeric-field-names", "all-field-names"]))
              ]),
              _: 2
            }, 1032, ["header"]))), 128))
          ]),
          _: 1
        }, 8, ["active-key"])
      ])
    ]));
  }
}), X2 = /* @__PURE__ */ ye({
  __name: "PanelLinksIcon",
  props: {
    links: {},
    iconColor: {}
  },
  setup(e) {
    const t = e;
    function n(i) {
      i.url && window.open(i.url, i.newTab ? "_blank" : "_self", "noopener,noreferrer");
    }
    const o = R(() => t.links.filter((i) => i.url));
    return (i, a) => o.value.length === 0 ? (ee(), ge(He, { key: 0 }, [], 64)) : o.value.length === 1 ? (ee(), Ze(M(xo), {
      key: 1,
      title: o.value[0].title || o.value[0].url,
      placement: "bottom"
    }, {
      default: ce(() => [
        N("span", {
          class: ct([M(ot).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: xt({ color: e.iconColor }),
          onClick: a[0] || (a[0] = Ro((r) => n(o.value[0]), ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }, 8, ["title"])) : (ee(), Ze(M(Yi), {
      key: 2,
      trigger: ["hover", "click"],
      placement: "bottomLeft"
    }, {
      overlay: ce(() => [
        v(M(lo), null, {
          default: ce(() => [
            (ee(!0), ge(He, null, It(o.value, (r, l) => (ee(), Ze(M(lo).Item, {
              key: l,
              onClick: (s) => n(r)
            }, {
              default: ce(() => [
                Ee(te(r.title || r.url), 1)
              ]),
              _: 2
            }, 1032, ["onClick"]))), 128))
          ]),
          _: 1
        })
      ]),
      default: ce(() => [
        N("span", {
          class: ct([M(ot).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: xt({ color: e.iconColor }),
          onClick: a[1] || (a[1] = Ro(() => {
          }, ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }));
  }
}), U9 = {
  key: 0,
  class: "legend-search-container"
}, X9 = ["value"], Q9 = { class: "legend-table-wrap" }, Z9 = { class: "legend-table" }, J9 = ["data-legend-item-id"], eq = { class: "legend-table-td legend-table-name-col" }, tq = ["data-legend-tooltip"], nq = { class: "legend-label" }, oq = {
  key: 0,
  class: "legend-search-container"
}, iq = ["value"], aq = {
  key: 1,
  class: "legend-empty-state"
}, rq = { class: "virtuoso-grid-list" }, lq = ["data-legend-item-id"], sq = ["data-legend-tooltip"], uq = { class: "legend-label" }, cq = {
  key: 0,
  class: "legend-item-values"
}, dq = { class: "legend-item-value-key" }, fq = { class: "legend-item-value-num" }, pq = ["data-legend-tooltip", "onClick"], gq = {
  key: 0,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, hq = {
  key: 1,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, vq = /* @__PURE__ */ ye({
  __name: "ChartLegend",
  props: {
    items: {},
    uPlotInstance: {},
    position: { default: "bottom" },
    mode: { default: "list" },
    unit: {},
    decimals: {},
    averageLegendWidth: { default: 40 },
    values: { default: () => [] },
    data: {}
  },
  setup(e) {
    const t = e, n = le(null), o = le(""), i = le(null), a = le(!1), r = le(), l = le({});
    function s(z) {
      const B = {};
      z.series.forEach((D, W) => {
        W !== 0 && (B[W] = D.show ?? !0);
      }), l.value = { ...B };
    }
    function u(z, B, D) {
      !B || typeof D.show != "boolean" || (l.value = { ...l.value, [B]: D.show });
    }
    Ie(
      () => t.uPlotInstance,
      (z, B) => {
        if (B && (B.hooks.setSeries = (B.hooks.setSeries ?? []).filter(
          (D) => D.__legendSync !== !0
        )), z) {
          s(z);
          const D = (W, H, F) => u(W, H, F);
          D.__legendSync = !0, z.hooks.setSeries = [...z.hooks.setSeries ?? [], D];
        } else
          l.value = {};
      },
      { immediate: !0 }
    );
    const c = {
      last: "Last *",
      first: "First *",
      min: "Min",
      max: "Max",
      mean: "Avg",
      sum: "Sum"
    };
    function d(z) {
      const B = z.filter(
        (W) => W != null && !Number.isNaN(W)
      );
      if (B.length === 0)
        return { last: null, first: null, min: null, max: null, mean: null, sum: null };
      const D = B.reduce((W, H) => W + H, 0);
      return {
        last: B[B.length - 1],
        first: B[0],
        min: Math.min(...B),
        max: Math.max(...B),
        mean: D / B.length,
        sum: D
      };
    }
    function f(z, B) {
      return z === null ? "—" : Math.abs(z) >= 1e6 ? B !== void 0 ? `${(z / 1e6).toFixed(B)}M` : `${z / 1e6}M` : Math.abs(z) >= 1e3 ? B !== void 0 ? `${(z / 1e3).toFixed(B)}K` : `${z / 1e3}K` : B !== void 0 ? z.toFixed(B) : String(z);
    }
    const g = R(
      () => Object.values(t.items).map((z) => ({
        ...z,
        show: l.value[z.seriesIndex] ?? z.show ?? !0
      }))
    ), m = R(() => {
      if (t.position !== "right" || !o.value.trim())
        return g.value;
      const z = o.value.trim().toLowerCase();
      return g.value.filter((B) => B.label?.toLowerCase().includes(z));
    }), b = R(() => t.position !== "right" || !o.value.trim() ? !1 : m.value.length === 0), y = R(() => {
      if (!t.data || t.values.length === 0)
        return {};
      const z = {};
      return g.value.forEach((B) => {
        const D = t.data[B.seriesIndex];
        z[B.seriesIndex] = d(D ?? []);
      }), z;
    }), { onToggleSeriesOnOff: S, onToggleSeriesVisibility: C } = {
      onToggleSeriesOnOff(z) {
        const B = t.uPlotInstance;
        if (!B)
          return;
        const D = B.series[z];
        D && B.setSeries(z, { show: !D.show });
      },
      onToggleSeriesVisibility(z) {
        const B = t.uPlotInstance;
        if (!B)
          return;
        const D = n.value === z;
        B.series.forEach((W, H) => {
          H !== 0 && B.setSeries(H, { show: D || H === z });
        }), n.value = D ? null : z;
      }
    };
    function O(z) {
      const B = z.target.closest("[data-legend-item-id]");
      if (!B)
        return null;
      const D = Number(B.dataset.legendItemId);
      return Number.isNaN(D) ? null : D;
    }
    function $(z) {
      const B = O(z);
      if (B === null)
        return;
      if (!!z.target.dataset.isLegendMarker) {
        S(B);
        return;
      }
      C(B);
    }
    async function P(z, B) {
      try {
        await navigator.clipboard.writeText(B), i.value = z, setTimeout(() => {
          i.value = null;
        }, 2e3);
      } catch {
      }
    }
    function k(z) {
      const B = z.target;
      o.value = B.value;
    }
    function x() {
      if (!r.value || t.position !== "bottom") {
        a.value = !1;
        return;
      }
      const B = r.value.clientWidth;
      if (B === 0)
        return;
      const D = g.value.length * (t.averageLegendWidth + 16);
      a.value = Math.ceil(D / B) <= 1;
    }
    let E = null;
    return Pt(() => {
      x(), r.value && t.position === "bottom" && (E = new ResizeObserver(x), E.observe(r.value));
    }), Bo(() => {
      E && E.disconnect();
    }), Ie([() => t.averageLegendWidth, () => g.value.length, () => t.position], () => {
      x();
    }), (z, B) => e.mode === "table" && e.values.length > 0 ? (ee(), ge("div", {
      key: 0,
      ref_key: "legendContainerRef",
      ref: r,
      class: "legend-container legend-table-mode",
      onClick: $
    }, [
      e.position === "right" ? (ee(), ge("div", U9, [
        N("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: k
        }, null, 40, X9)
      ])) : je("", !0),
      N("div", Q9, [
        N("table", Z9, [
          N("thead", null, [
            N("tr", null, [
              B[0] || (B[0] = N("th", { class: "legend-table-th legend-table-name-col" }, " Name ", -1)),
              (ee(!0), ge(He, null, It(e.values, (D) => (ee(), ge("th", {
                key: D,
                class: "legend-table-th legend-table-val-col"
              }, te(c[D]), 1))), 128))
            ])
          ]),
          N("tbody", null, [
            (ee(!0), ge(He, null, It(m.value, (D) => (ee(), ge("tr", {
              key: D.seriesIndex,
              "data-legend-item-id": D.seriesIndex,
              class: ct(["legend-table-row", [
                D.show ? "" : "legend-item-off",
                n.value === D.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              N("td", eq, [
                N("div", {
                  class: "legend-item-label-trigger",
                  "data-legend-tooltip": D.label
                }, [
                  N("div", {
                    class: "legend-marker",
                    style: xt({ borderColor: D.color }),
                    "data-is-legend-marker": !0
                  }, null, 4),
                  N("span", nq, te(D.label), 1)
                ], 8, tq)
              ]),
              (ee(!0), ge(He, null, It(e.values, (W) => (ee(), ge("td", {
                key: W,
                class: "legend-table-td legend-table-val-col"
              }, te(y.value[D.seriesIndex] ? f(y.value[D.seriesIndex][W], e.decimals) : "—"), 1))), 128))
            ], 10, J9))), 128))
          ])
        ])
      ])
    ], 512)) : (ee(), ge("div", {
      key: 1,
      ref_key: "legendContainerRef",
      ref: r,
      class: ct(["legend-container", [e.position === "bottom" ? "legend-container-bottom" : ""]]),
      style: xt({ "--legend-average-width": `${e.averageLegendWidth + 16}px` }),
      onClick: $
    }, [
      e.position === "right" ? (ee(), ge("div", oq, [
        N("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: k
        }, null, 40, iq)
      ])) : je("", !0),
      b.value ? (ee(), ge("div", aq, ' No series found matching "' + te(o.value) + '" ', 1)) : (ee(), ge("div", {
        key: 2,
        class: ct(["legend-virtuoso-container", [
          `legend-virtuoso-container-${e.position}`,
          a.value ? "legend-virtuoso-container-single-row" : ""
        ]])
      }, [
        N("div", rq, [
          (ee(!0), ge(He, null, It(m.value, (D) => (ee(), ge("div", {
            key: D.seriesIndex,
            class: "virtuoso-grid-item"
          }, [
            N("div", {
              "data-legend-item-id": D.seriesIndex,
              class: ct(["legend-item", [
                `legend-item-${e.position}`,
                D.show ? "" : "legend-item-off",
                n.value === D.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              N("div", {
                class: "legend-item-label-trigger",
                "data-legend-tooltip": D.label
              }, [
                N("div", {
                  class: "legend-marker",
                  style: xt({ borderColor: D.color }),
                  "data-is-legend-marker": !0
                }, null, 4),
                N("span", uq, te(D.label), 1)
              ], 8, sq),
              y.value[D.seriesIndex] && e.values.length > 0 ? (ee(), ge("span", cq, [
                (ee(!0), ge(He, null, It(e.values, (W) => (ee(), ge("span", {
                  key: W,
                  class: "legend-item-value-badge"
                }, [
                  N("span", dq, te(c[W]) + ":", 1),
                  N("span", fq, te(f(y.value[D.seriesIndex][W], e.decimals)), 1)
                ]))), 128))
              ])) : je("", !0),
              N("button", {
                type: "button",
                class: "legend-copy-button",
                "data-legend-tooltip": i.value === D.seriesIndex ? "Copied" : "Copy",
                onClick: Ro((W) => P(D.seriesIndex, D.label ?? ""), ["stop"])
              }, [
                i.value === D.seriesIndex ? (ee(), ge("svg", gq, [...B[1] || (B[1] = [
                  N("path", { d: "M20 6L9 17l-5-5" }, null, -1)
                ])])) : (ee(), ge("svg", hq, [...B[2] || (B[2] = [
                  N("rect", {
                    x: "9",
                    y: "9",
                    width: "13",
                    height: "13",
                    rx: "2",
                    ry: "2"
                  }, null, -1),
                  N("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
                ])]))
              ], 8, pq)
            ], 10, lq)
          ]))), 128))
        ])
      ], 2))
    ], 6));
  }
}), mq = /* @__PURE__ */ Ko(vq, [["__scopeId", "data-v-85a1707f"]]), bq = { class: "footer" }, yq = {
  key: 0,
  class: "hint"
}, xq = { class: "kbd active" }, wq = {
  key: 1,
  class: "hint-list"
}, Sq = {
  class: "hint",
  "data-active": "false"
}, Cq = { class: "kbd" }, $q = /* @__PURE__ */ ye({
  __name: "TooltipFooter",
  props: {
    isPinned: { type: Boolean },
    pinKey: { default: "P" }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = t;
    return (o, i) => (ee(), ge("div", bq, [
      N("div", null, [
        e.isPinned ? (ee(), ge("div", yq, [
          i[1] || (i[1] = N("span", null, "按", -1)),
          N("kbd", xq, te(e.pinKey), 1),
          i[2] || (i[2] = N("span", null, "或", -1)),
          i[3] || (i[3] = N("kbd", { class: "kbd active" }, "Esc", -1)),
          i[4] || (i[4] = N("span", null, "取消固定", -1))
        ])) : (ee(), ge("div", wq, [
          N("div", Sq, [
            i[5] || (i[5] = N("span", null, "按", -1)),
            N("kbd", Cq, te(e.pinKey), 1),
            i[6] || (i[6] = N("span", null, "固定提示框", -1))
          ])
        ]))
      ]),
      e.isPinned ? (ee(), ge("button", {
        key: 0,
        class: "unpin-btn",
        onClick: i[0] || (i[0] = (a) => n("dismiss"))
      }, [...i[7] || (i[7] = [
        N("svg", {
          width: "10",
          height: "10",
          viewBox: "0 0 24 24",
          fill: "none",
          stroke: "currentColor",
          "stroke-width": "2"
        }, [
          N("path", { d: "M18 6L6 18" }),
          N("path", { d: "M6 6l12 12" })
        ], -1),
        N("span", null, "取消固定", -1)
      ])])) : je("", !0)
    ]));
  }
}), Pq = /* @__PURE__ */ Ko($q, [["__scopeId", "data-v-75c52e2f"]]), Oq = ["data-is-active"], Iq = { class: "tooltip-item-label" }, Mq = /* @__PURE__ */ ye({
  __name: "TooltipItem",
  props: {
    item: {},
    isItemActive: { type: Boolean }
  },
  setup(e) {
    return (t, n) => (ee(), ge("div", {
      class: "tooltip-item",
      "data-is-active": e.isItemActive
    }, [
      N("div", {
        class: "tooltip-item-marker",
        style: xt({ borderColor: e.item.color })
      }, null, 4),
      N("div", {
        class: "tooltip-item-content",
        style: xt({ color: e.item.color })
      }, [
        N("span", Iq, te(e.item.label), 1),
        N("span", {
          class: "tooltip-item-separator",
          style: xt({ borderColor: e.item.color })
        }, null, 4),
        N("span", null, te(e.item.tooltipValue), 1)
      ], 4)
    ], 8, Oq));
  }
}), Q2 = /* @__PURE__ */ Ko(Mq, [["__scopeId", "data-v-3b1d92d5"]]), Tq = { class: "header-container" }, kq = {
  key: 0,
  class: "header-row"
}, Eq = {
  key: 0,
  class: "header-status"
}, _q = {
  key: 1,
  class: "header-pinned-item"
}, Aq = /* @__PURE__ */ ye({
  __name: "TooltipHeader",
  props: {
    uPlotInstance: {},
    showTooltipHeader: { type: Boolean },
    isPinned: { type: Boolean },
    activeItem: {},
    headerTitle: {}
  },
  setup(e) {
    return (t, n) => (ee(), ge("div", Tq, [
      e.showTooltipHeader && e.headerTitle ? (ee(), ge("div", kq, [
        N("span", null, te(e.headerTitle), 1),
        e.isPinned ? (ee(), ge("div", Eq, [...n[0] || (n[0] = [
          N("svg", {
            width: "12",
            height: "12",
            viewBox: "0 0 24 24",
            fill: "none",
            stroke: "currentColor",
            "stroke-width": "2"
          }, [
            N("path", { d: "M12 2v4" }),
            N("path", { d: "M19 10h-7l-5 5v7h10v-7l-5-5z" })
          ], -1),
          N("span", null, "已固定", -1)
        ])])) : je("", !0)
      ])) : je("", !0),
      e.activeItem ? (ee(), ge("div", _q, [
        v(Q2, {
          item: e.activeItem,
          "is-item-active": !0
        }, null, 8, ["item"])
      ])) : je("", !0)
    ]));
  }
}), Dq = /* @__PURE__ */ Ko(Aq, [["__scopeId", "data-v-efb4cf97"]]), zq = /* @__PURE__ */ ye({
  __name: "TooltipList",
  props: {
    content: {},
    maxHeight: { default: 300 }
  },
  setup(e) {
    return (t, n) => (ee(), ge("div", {
      class: "tooltip-list",
      style: xt({ maxHeight: `${e.maxHeight}px`, overflowY: "auto" })
    }, [
      (ee(!0), ge(He, null, It(e.content, (o) => (ee(), Ze(Q2, {
        key: o.label,
        item: o,
        "is-item-active": !1
      }, null, 8, ["item"]))), 128))
    ], 4));
  }
}), Rq = /* @__PURE__ */ Ko(zq, [["__scopeId", "data-v-fa17493a"]]), Nq = {
  key: 1,
  class: "tooltip-divider"
}, Bq = /* @__PURE__ */ ye({
  __name: "Tooltip",
  props: {
    uPlotInstance: {},
    content: {},
    headerTitle: {},
    isPinned: { type: Boolean },
    canPinTooltip: { type: Boolean, default: !0 },
    showTooltipHeader: { type: Boolean, default: !0 },
    tooltipMaxHeight: { default: 300 }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = R(() => n.content.find((s) => s.isActive) ?? null), a = R(() => n.showTooltipHeader || i.value != null), r = R(() => n.content.length > 1), l = R(() => r.value && a.value);
    return (s, u) => (ee(), ge("div", {
      class: ct(["tooltip-container", { pinned: e.isPinned }])
    }, [
      a.value ? (ee(), Ze(Dq, {
        key: 0,
        "u-plot-instance": e.uPlotInstance,
        "show-tooltip-header": e.showTooltipHeader,
        "is-pinned": e.isPinned,
        "active-item": i.value,
        "header-title": e.headerTitle
      }, null, 8, ["u-plot-instance", "show-tooltip-header", "is-pinned", "active-item", "header-title"])) : je("", !0),
      l.value ? (ee(), ge("span", Nq)) : je("", !0),
      r.value ? (ee(), Ze(Rq, {
        key: 2,
        content: e.content,
        "max-height": e.tooltipMaxHeight
      }, null, 8, ["content", "max-height"])) : je("", !0),
      e.canPinTooltip ? (ee(), Ze(Pq, {
        key: 3,
        "is-pinned": e.isPinned,
        style: xt({ pointerEvents: e.isPinned ? "auto" : "none" }),
        onDismiss: u[0] || (u[0] = (c) => o("dismiss"))
      }, null, 8, ["is-pinned", "style"])) : je("", !0)
    ], 2));
  }
}), Fq = /* @__PURE__ */ Ko(Bq, [["__scopeId", "data-v-4b92f289"]]), Lq = /* @__PURE__ */ ye({
  __name: "ChartTooltip",
  props: {
    uPlotInstance: {},
    unit: { default: "" },
    decimals: {},
    canPinTooltip: { type: Boolean, default: !0 },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    showTooltipHeader: { type: Boolean, default: !0 },
    tooltipMaxHeight: { default: 300 }
  },
  setup(e) {
    const t = e, n = le(), o = le(!1), i = le(!1), a = le(""), r = le([]), l = {
      hoverActive: !1,
      pinned: !1,
      focusedSeriesIndex: null,
      seriesIndexes: [],
      mouseWithinPlot: !1,
      windowWidth: window.innerWidth - 16,
      windowHeight: window.innerHeight - 16,
      tooltipW: 0,
      tooltipH: 0
    };
    let s = null;
    function u() {
      s === null && (s = requestAnimationFrame(() => {
        s = null, b();
      }));
    }
    function c(H, F, A) {
      return typeof H == "function" ? String(H(F, A)) : typeof H == "string" ? H : "#cccccc";
    }
    function d(H, F, A) {
      const U = A !== void 0 ? H.toFixed(A) : String(Math.round(H * 1e3) / 1e3);
      return F ? `${U} ${F}` : U;
    }
    function f(H) {
      if (t.tooltipMode === "none")
        return [];
      const F = H.cursor.idx, A = [];
      for (let U = 1; U < H.series.length; U++) {
        const j = H.series[U];
        if (!j?.show)
          continue;
        let ae = l.seriesIndexes[U] ?? null;
        if (t.tooltipMode === "single") {
          if (U !== l.focusedSeriesIndex)
            continue;
          ae = F ?? ae;
        } else
          ae = ae ?? F ?? null;
        if (ae === null)
          continue;
        const G = H.data[U]?.[ae];
        G == null || !Number.isFinite(G) || A.push({
          label: String(j.label ?? `Series ${U}`),
          value: G,
          tooltipValue: d(G, t.unit, t.decimals),
          color: c(j.stroke, H, U),
          isActive: U === l.focusedSeriesIndex
        });
      }
      return t.tooltipSort === "asc" && A.sort((U, j) => U.value - j.value), t.tooltipSort === "desc" && A.sort((U, j) => j.value - U.value), A;
    }
    function g(H) {
      if (!t.showTooltipHeader)
        return "";
      const F = H.cursor.idx;
      if (F == null)
        return "";
      const A = H.data[0]?.[F];
      return A == null ? "" : H.scales.x?.time ? new Date(A * 1e3).toLocaleString() : String(A);
    }
    function m(H) {
      const F = n.value;
      if (!F)
        return;
      const { left: A = -1, top: U = -1 } = H.cursor;
      if (A < 0 || U < 0)
        return;
      const j = H.rect.left + A, ae = H.rect.top + U, G = F.offsetWidth, Y = F.offsetHeight;
      l.tooltipW = G, l.tooltipH = Y;
      const K = j + 14 + G > l.windowWidth ? -(G + 14) : 14, J = ae - 8 + Y > l.windowHeight ? -(Y - 8) : -8;
      F.style.transform = `translate(${j + K}px, ${ae + J}px)`;
    }
    function b() {
      const H = t.uPlotInstance;
      if (!H || !l.hoverActive && !l.pinned) {
        o.value = !1;
        return;
      }
      const F = f(H);
      if (F.length === 0) {
        l.pinned || (o.value = !1);
        return;
      }
      r.value = F, a.value = g(H), i.value = l.pinned, l.pinned || m(H), o.value = !0;
    }
    function y(H) {
      if (l.pinned)
        return;
      const F = H.cursor.idxs;
      F && (l.seriesIndexes = [...F], l.hoverActive = l.seriesIndexes.some((A, U) => U > 0 && A != null) && l.focusedSeriesIndex != null, u());
    }
    function S(H, F, A) {
      !("focus" in A) || l.pinned || (l.focusedSeriesIndex = F ?? null, l.hoverActive = l.focusedSeriesIndex != null, u());
    }
    function C(H) {
      if (l.pinned || !l.hoverActive)
        return;
      const F = n.value;
      if (!F)
        return;
      const { left: A = -1, top: U = -1 } = H.cursor;
      if (A < 0 || U < 0)
        return;
      const j = H.rect.left + A, ae = H.rect.top + U, G = F.offsetWidth, Y = F.offsetHeight;
      l.tooltipW = G, l.tooltipH = Y;
      const K = j + 14 + G > l.windowWidth ? -(G + 14) : 14, J = ae - 8 + Y > l.windowHeight ? -(Y - 8) : -8;
      F.style.transform = `translate(${j + K}px, ${ae + J}px)`;
    }
    function O() {
      const H = t.uPlotInstance;
      !H || !l.hoverActive || (l.pinned = !0, H.cursor._lock = !0, i.value = !0, document.addEventListener("mousedown", P, !0));
    }
    function $() {
      const H = t.uPlotInstance;
      l.pinned = !1, l.hoverActive = !1, H && (H.cursor._lock = !1), i.value = !1, o.value = !1, document.removeEventListener("mousedown", P, !0);
    }
    function P(H) {
      n.value && !n.value.contains(H.target) && $();
    }
    function k(H) {
      if (H.key === "Escape") {
        l.pinned && $();
        return;
      }
      H.key.toLowerCase() === "p" && l.mouseWithinPlot && (l.pinned ? $() : O());
    }
    function x() {
      l.mouseWithinPlot = !0;
    }
    function E() {
      l.mouseWithinPlot = !1;
    }
    function z() {
      l.windowWidth = window.innerWidth - 16, l.windowHeight = window.innerHeight - 16, l.pinned || (l.hoverActive = !1);
    }
    let B = [];
    function D(H) {
      const F = (j) => y(j), A = (j, ae, G) => S(j, ae, G), U = (j) => C(j);
      H.hooks.setLegend = [...H.hooks.setLegend ?? [], F], H.hooks.setSeries = [...H.hooks.setSeries ?? [], A], H.hooks.setCursor = [...H.hooks.setCursor ?? [], U], H.root.addEventListener("mouseenter", x), H.root.addEventListener("mouseleave", E), B = [
        () => {
          H.hooks.setLegend = (H.hooks.setLegend ?? []).filter(
            (j) => j !== F
          ), H.hooks.setSeries = (H.hooks.setSeries ?? []).filter(
            (j) => j !== A
          ), H.hooks.setCursor = (H.hooks.setCursor ?? []).filter(
            (j) => j !== U
          ), H.root.removeEventListener("mouseenter", x), H.root.removeEventListener("mouseleave", E);
        }
      ];
    }
    function W() {
      B.forEach((H) => H()), B = [], document.removeEventListener("mousedown", P, !0), l.hoverActive = !1, l.pinned = !1, l.focusedSeriesIndex = null, o.value = !1, i.value = !1, s !== null && (cancelAnimationFrame(s), s = null);
    }
    return Ie(
      () => t.uPlotInstance,
      (H, F) => {
        F && W(), H && D(H);
      },
      { immediate: !0 }
    ), Pt(() => {
      document.addEventListener("keydown", k, !0), window.addEventListener("resize", z);
    }), Bo(() => {
      W(), document.removeEventListener("keydown", k, !0), window.removeEventListener("resize", z);
    }), (H, F) => (ee(), Ze(Ud, { to: "body" }, [
      Qi(N("div", {
        ref_key: "containerRef",
        ref: n,
        style: { position: "fixed", top: "0", left: "0", "z-index": "1070", "pointer-events": "none" }
      }, [
        e.uPlotInstance ? (ee(), Ze(Fq, {
          key: 0,
          "u-plot-instance": e.uPlotInstance,
          content: r.value,
          "header-title": a.value,
          "is-pinned": i.value,
          "can-pin-tooltip": e.canPinTooltip,
          "show-tooltip-header": e.showTooltipHeader,
          "tooltip-max-height": e.tooltipMaxHeight,
          onDismiss: $
        }, null, 8, ["u-plot-instance", "content", "header-title", "is-pinned", "can-pin-tooltip", "show-tooltip-header", "tooltip-max-height"])) : je("", !0)
      ], 512), [
        [va, o.value && e.tooltipMode !== "none"]
      ])
    ]));
  }
}), Z2 = Symbol("plotContext");
function Hq() {
  const e = le(null), t = le(""), n = le(!1);
  let o;
  function i(c) {
    e.value = c.uPlotInstance, c.id !== void 0 && (t.value = c.id), c.shouldSaveSelectionPreference !== void 0 && (n.value = c.shouldSaveSelectionPreference), o = void 0;
  }
  function a() {
    const c = e.value;
    if (!c || !t.value)
      return;
    const d = c.series.map((f) => ({
      label: f.label ?? "",
      show: f.show ?? !0
    }));
    wT(t.value, d);
  }
  function r(c) {
    const d = e.value;
    if (!d)
      return;
    const f = o === c;
    o = f ? void 0 : c, d.batch(() => {
      d.series.forEach((g, m) => {
        m !== 0 && d.setSeries(m, {
          show: f || m === c
        });
      }), t.value && n.value && a();
    });
  }
  function l(c) {
    const d = e.value;
    if (!d)
      return;
    const f = d.series[c];
    f && (d.setSeries(c, { show: !f.show }), t.value && n.value && a());
  }
  function s(c) {
    const d = e.value;
    d && d.batch(() => {
      d.series.forEach((f, g) => {
        g !== 0 && d.setSeries(g, {
          show: c === null || g === c
        });
      });
    });
  }
  const u = {
    uPlotInstance: e,
    id: t,
    shouldSaveSelectionPreference: n,
    setPlotContextInitialState: i,
    onToggleSeriesVisibility: r,
    onToggleSeriesOnOff: l,
    onFocusSeries: s,
    syncSeriesVisibilityToLocalStorage: a
  };
  return kt(Z2, u), u;
}
function MQ() {
  const e = Tt(Z2);
  if (!e)
    throw new Error("usePlotContext must be used within a PlotContextProvider");
  return e;
}
const Vq = { style: { position: "relative", overflow: "hidden" } }, jq = /* @__PURE__ */ ye({
  __name: "UPlotChart",
  props: {
    config: {},
    data: {},
    width: {},
    height: {},
    plotRef: {},
    onDestroy: {}
  },
  emits: ["plotReady"],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, { setPlotContextInitialState: a } = Hq(), r = le(), l = le(null), s = le(""), u = le(""), c = le(0), d = le(0);
    function f() {
      l.value && (o.onDestroy && o.onDestroy(l.value), l.value.destroy(), l.value = null, a({ uPlotInstance: null }), o.plotRef && o.plotRef(null));
    }
    function g(P) {
      if (P === null || typeof P != "object")
        return P;
      const k = oi(P);
      if (k instanceof Date)
        return new Date(k.getTime());
      if (k instanceof RegExp)
        return new RegExp(k.source, k.flags);
      if (typeof k == "function")
        return k;
      if (Array.isArray(k)) {
        const E = [];
        for (let z = 0; z < k.length; z++)
          E.push(g(oi(k[z])));
        return E;
      }
      const x = {};
      for (const E in k)
        Object.prototype.hasOwnProperty.call(k, E) && (x[E] = g(oi(k[E])));
      return x;
    }
    function m() {
      if (f(), !r.value || o.width === 0 || o.height === 0)
        return;
      const P = o.config.getConfig(), x = g({
        ...P,
        width: Math.floor(o.width),
        height: Math.floor(o.height),
        series: P.series ?? []
      }), E = y(o.data, o.config), z = new ro(x, E, r.value);
      o.plotRef && o.plotRef(z), a({
        uPlotInstance: z,
        id: o.config.getId(),
        shouldSaveSelectionPreference: o.config.getShouldSaveSelectionPreference()
      }), l.value = z, i("plotReady", z), s.value = JSON.stringify(o.config.getConfig()), u.value = JSON.stringify(o.data), c.value = o.width, d.value = o.height;
    }
    function b(P) {
      return JSON.parse(JSON.stringify(P));
    }
    function y(P, k) {
      const x = b(P), E = k.getSeriesSpanGapsOptions();
      return E.length > 0 ? yT(x, E) : x;
    }
    function S() {
      return o.width === c.value && o.height === d.value;
    }
    function C() {
      return JSON.stringify(o.data) === u.value;
    }
    function O() {
      return JSON.stringify(o.config.getConfig()) === s.value;
    }
    const $ = R(() => !!(o.data && o.data[0] && o.data[0].length === 0));
    return Ie($, (P) => {
      P && f();
    }), Ft((P) => {
      if (P(() => {
        f(), s.value = "", u.value = "", c.value = 0, d.value = 0;
      }), !r.value || o.width === 0 || o.height === 0)
        return;
      if (!s.value) {
        m();
        return;
      }
      const k = !!l.value && (!r.value || l.value.root.parentElement !== r.value);
      if (!S() && l.value && !k && l.value.setSize({
        width: Math.floor(o.width),
        height: Math.floor(o.height)
      }), !O() || k)
        m();
      else if (!C() && l.value) {
        const x = y(o.data, o.config);
        l.value.setData(x);
      }
    }), At(() => {
      f();
    }), t({ plotInstance: l }), (P, k) => (ee(), ge("div", Vq, [
      $.value ? (ee(), ge("div", {
        key: 0,
        class: "flex flex-col items-center justify-center not-found",
        style: xt({
          width: `${e.width}px`,
          height: `${e.height}px`
        })
      }, [
        N("div", {
          class: ct([M(ot).chartLine, "mb-2"]),
          style: { "font-size": "48px" }
        }, null, 2),
        k[0] || (k[0] = N("div", { class: "text-gray-400 text-sm" }, " No Data ", -1))
      ], 4)) : (ee(), ge("div", {
        key: 1,
        ref_key: "containerRef",
        ref: r,
        class: "w-full h-full"
      }, null, 512)),
      Va(P.$slots, "default")
    ]));
  }
}), Wq = {
  key: 0,
  class: "flex items-center justify-center h-full text-gray-400 select-none"
}, qq = { class: "flex-1 min-h-0 min-w-0 relative overflow-hidden" }, Gq = {
  key: 2,
  class: "flex items-center justify-center h-full text-red-500 select-none"
}, Kq = { class: "text-xs" }, Qm = /* @__PURE__ */ ye({
  __name: "AgChart",
  props: {
    data: {},
    unit: {},
    decimals: {},
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    thresholds: {},
    thresholdBaseColor: {},
    fillOpacity: { default: 10 },
    lineWidth: { default: 1.5 },
    lineInterpolation: { default: "linear" },
    lineStyle: { default: "solid" },
    drawStyle: { default: "lines" },
    gradientMode: { default: "none" },
    spanNulls: { type: [Boolean, Number], default: !1 },
    showPoints: { type: Boolean, default: !1 },
    showPointsMode: { default: "auto" },
    stackingMode: { default: "none" },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    syncKey: {},
    panelId: {},
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    tooltipMaxHeight: {},
    showAxisPointer: { type: Boolean, default: !0 },
    softMin: {},
    softMax: {},
    axisPlacement: { default: "left" },
    axisName: {},
    axisWidth: {},
    showGridLines: { default: "all" },
    gridColor: {},
    axisLabel: { default: "all" },
    axisLabelColor: {},
    axisTick: { default: "hidden" },
    axisTickColor: {},
    axisBorder: { default: "hidden" },
    axisBorderColor: {},
    scaleDistribution: { default: "linear" },
    centeredZero: { type: Boolean, default: !1 },
    xAxisTime: { type: Boolean, default: !0 },
    barGroupWidth: {},
    barWidth: {}
  },
  setup(e) {
    const t = e, n = le(), o = le({ width: 0, height: 0 });
    let i = null;
    function a(y) {
      i = new ResizeObserver((S) => {
        const C = S[0];
        if (C) {
          const { width: O, height: $ } = C.contentRect;
          o.value = { width: Math.floor(O), height: Math.floor($) };
        }
      }), i.observe(y), requestAnimationFrame(() => {
        const { width: S, height: C } = y.getBoundingClientRect();
        o.value = { width: Math.floor(S), height: Math.floor(C) };
      });
    }
    Pt(() => {
      n.value && a(n.value);
    }), Ie(n, (y) => {
      i?.disconnect(), y && a(y);
    }), At(() => {
      i?.disconnect();
    });
    const r = R(() => {
      const y = new mT({ id: t.panelId ?? "chart" }), S = t.scaleDistribution ?? "linear", C = t.stackingMode !== "none";
      y.addScale({ scaleKey: "x", time: t.xAxisTime }), y.addScale({
        scaleKey: "y",
        distribution: S === "logarithmic" ? is.Logarithmic : S === "symlog" ? is.Symlog : is.Linear,
        softMin: C && t.stackingMode === "percent" ? 0 : t.softMin ?? void 0,
        softMax: C && t.stackingMode === "percent" ? 100 : t.softMax ?? void 0,
        ...t.centeredZero ? {
          range: (se, ve, Me) => {
            const ke = Math.max(Math.abs(ve), Math.abs(Me));
            return [-ke, ke];
          }
        } : {}
      });
      const O = t.gridColor ?? "#E8E9EA", $ = t.showGridLines === "all" || t.showGridLines === "x", P = t.showGridLines === "all" || t.showGridLines === "y", k = t.axisLabel === "all" || t.axisLabel === "x", x = t.axisLabel === "all" || t.axisLabel === "y", E = k ? t.axisLabelColor ?? "#666666" : "transparent", z = x ? t.axisLabelColor ?? "#666666" : "transparent", B = t.axisTick === "all" || t.axisTick === "x", D = t.axisTick === "all" || t.axisTick === "y", W = B ? t.axisTickColor ?? "#666666" : "transparent", H = D ? t.axisTickColor ?? "#666666" : "transparent", F = t.axisBorder === "all" || t.axisBorder === "x", A = t.axisBorder === "all" || t.axisBorder === "y", U = t.axisBorderColor ?? "#666666";
      y.addAxis({
        scaleKey: "x",
        side: 2,
        size: 28,
        stroke: E,
        grid: { show: $, stroke: O },
        ticks: { show: B, stroke: W, width: 0.5 },
        border: { show: F, stroke: U }
      });
      const j = t.axisPlacement === "right" ? 1 : 3, ae = t.axisPlacement !== "hidden", G = (() => {
        if (t.axisWidth !== void 0 && t.axisWidth !== null)
          return t.axisWidth;
        const se = t.data.series.reduce((Re, We) => Re.concat(We.values.filter((et) => et !== null && Number.isFinite(et))), []);
        if (se.length === 0)
          return 56;
        const ve = Math.max(...se.map(Math.abs)), Me = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15, Fe = ((Re) => {
          if (Math.abs(Re) >= 1e6) {
            const et = Me !== void 0 ? (Re / 1e6).toFixed(Me) : String(Re / 1e6);
            return t.unit ? `${et}M ${t.unit}` : `${et}M`;
          }
          if (Math.abs(Re) >= 1e3) {
            const et = Me !== void 0 ? (Re / 1e3).toFixed(Me) : String(Re / 1e3);
            return t.unit ? `${et}K ${t.unit}` : `${et}K`;
          }
          const We = Me !== void 0 ? Re.toFixed(Me) : String(Math.round(Re * 100) / 100);
          return t.unit ? `${We} ${t.unit}` : We;
        })(ve);
        try {
          const Re = document.createElement("canvas").getContext("2d");
          if (!Re)
            return 56;
          Re.font = "12px system-ui, sans-serif";
          const We = Re.measureText(Fe).width;
          return Math.ceil(We) + 14;
        } catch {
          return 56;
        }
      })(), Y = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15;
      y.addAxis({
        scaleKey: "y",
        side: j,
        show: ae,
        label: t.axisName || void 0,
        size: G,
        stroke: z,
        grid: { show: P, stroke: O },
        ticks: { show: D, stroke: H, width: 0.5 },
        border: { show: A, stroke: U },
        isDarkMode: !0,
        yAxisUnit: t.unit,
        decimalPrecision: Y,
        isLogScale: S === "logarithmic" || S === "symlog"
      });
      const K = aI(
        t.colorScheme,
        t.data.series.length,
        t.colorDistribution ?? "sequential",
        t.colorSingleValue
      ), J = t.drawStyle === "bars", be = t.drawStyle === "points", xe = t.data.series.length, he = t.barGroupWidth ?? 0.7, de = t.barWidth ?? (t.stackingMode !== "none" ? 1 : 1 / Math.max(xe, 1)), ne = J ? he * de : void 0, we = be || t.showPointsMode === "always" ? !0 : t.showPointsMode === "never" ? !1 : t.showPoints, re = C ? "none" : t.fillOpacity > 0 ? t.gradientMode !== "none" ? "gradient" : "solid" : "none";
      if (t.data.series.forEach((se, ve) => {
        const Me = K[ve] ?? Sr[ve % Sr.length];
        y.addSeries({
          scaleKey: "y",
          label: se.label,
          drawStyle: J ? "bars" : be ? "points" : "lines",
          lineColor: Me,
          lineWidth: t.lineWidth,
          lineInterpolation: t.lineInterpolation,
          lineStyle: t.lineStyle,
          fillColor: Me,
          fillOpacity: t.fillOpacity,
          fillMode: re,
          showPoints: we,
          pointSize: we ? 4 : 0,
          spanGaps: t.spanNulls ?? !1,
          ...ne !== void 0 ? { barWidthFactor: ne } : {}
        });
      }), C && t.data.series.length > 0 && t.fillOpacity > 0) {
        const se = K.length > 0 ? K : [...Sr], ve = Math.round(Math.min(t.fillOpacity, 100) / 100 * 255).toString(16).padStart?.(2, "0") || Math.round(Math.min(t.fillOpacity, 100) / 100 * 255).toString(16), Me = t.data.series.map((ke, Fe) => ({
          series: [Fe + 1, Fe],
          fill: `${se[Fe % se.length]}${ve}`
        }));
        Me.length > 0 && (Me[0] = { series: [1, 0], fill: `${se[0]}${ve}` }), y.setBands(Me);
      }
      return t.syncKey && y.setCursor({ sync: { key: t.syncKey, setSeries: !0 } }), t.showAxisPointer || y.setCursor({ x: !1, y: !1 }), y.setCursor({
        drag: { setScale: !0 },
        points: {
          one: !0,
          size: (se, ve) => (se.series[ve]?.points?.size ?? 0) * 3,
          width: (se, ve, Me) => Me / 4,
          stroke: (se, ve) => {
            const Me = se.series[ve]?.points, ke = typeof Me?.stroke == "function" ? Me.stroke : void 0;
            return `${ke !== void 0 ? ke(se, ve) : typeof Me?.stroke == "string" ? Me.stroke : ""}90`;
          },
          fill: "#fff"
        },
        focus: {
          prox: 30
        },
        hover: {
          prox: 30,
          bias: 0
        }
      }), y;
    }), l = R(() => {
      const y = t.data?.timestamps ?? [], S = JSON.parse(JSON.stringify(y));
      if (S.length === 0 || !t.data)
        return [[]];
      const C = t.data.series.map((O) => JSON.parse(JSON.stringify(O.values.map(($) => $ ?? 0))));
      if (t.stackingMode !== "none" && t.data.series.length > 0) {
        const O = S.length, $ = Array.from({ length: O }, () => 0), P = [];
        for (const k of t.data.series) {
          const x = Array.from({ length: O });
          for (let E = 0; E < O; E++) {
            if (t.stackingMode === "percent") {
              let z = 0;
              for (const B of t.data.series)
                z += B.values[E] ?? 0;
              $[E] = $[E] + (k.values[E] ?? 0) / (z || 1) * 100;
            } else
              $[E] = $[E] + (k.values[E] ?? 0);
            x[E] = $[E];
          }
          P.push(x);
        }
        return [S, ...P];
      }
      return [S, ...C];
    }), s = R(() => !t.data || t.data.timestamps.length === 0 || t.data.series.length === 0), u = le(null);
    function c(y) {
      u.value = y;
    }
    const d = R(() => t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15), f = R(() => t.legendPosition === "right"), g = R(() => t.legendPosition !== "hidden" && t.data.series.length > 0), m = R(() => f.value && g.value ? Math.max(o.value.width - 160, 100) : o.value.width), b = R(() => Math.max(o.value.height, 50));
    return (y, S) => (ee(), ge("div", {
      ref_key: "chartAreaRef",
      ref: n,
      class: ct(["w-full h-full flex overflow-hidden relative", f.value ? "flex-row" : "flex-col"])
    }, [
      s.value ? (ee(), ge("div", Wq, [...S[0] || (S[0] = [
        N("span", { class: "text-xs" }, "No data", -1)
      ])])) : o.value.width > 0 && o.value.height > 0 ? (ee(), ge(He, { key: 1 }, [
        N("div", qq, [
          v(jq, {
            config: r.value,
            data: l.value,
            width: m.value,
            height: b.value,
            onPlotReady: c
          }, {
            default: ce(() => [
              v(Lq, {
                "u-plot-instance": u.value,
                unit: t.unit,
                decimals: d.value,
                "can-pin-tooltip": !0,
                "tooltip-mode": t.tooltipMode,
                "tooltip-sort": t.tooltipSort,
                "tooltip-max-height": t.tooltipMaxHeight
              }, null, 8, ["u-plot-instance", "unit", "decimals", "tooltip-mode", "tooltip-sort", "tooltip-max-height"])
            ]),
            _: 1
          }, 8, ["config", "data", "width", "height"])
        ]),
        g.value ? (ee(), ge("div", {
          key: 0,
          style: xt(
            f.value ? { width: "160px", flexShrink: 0, height: "100%", padding: "4px 8px", overflow: "auto", zIndex: 10, position: "relative", pointerEvents: "auto" } : { flexShrink: 0, padding: "2px 4px", overflow: "auto", maxHeight: "140px", zIndex: 10, position: "relative", pointerEvents: "auto" }
          )
        }, [
          v(mq, {
            items: r.value.getLegendItems(),
            "u-plot-instance": u.value,
            position: f.value ? "right" : "bottom",
            mode: t.legendMode ?? "list",
            values: t.legendValues ?? [],
            data: l.value,
            decimals: d.value,
            unit: t.unit
          }, null, 8, ["items", "u-plot-instance", "position", "mode", "values", "data", "decimals", "unit"])
        ], 4)) : je("", !0)
      ], 64)) : (ee(), ge("div", Gq, [
        N("span", Kq, "dims: " + te(o.value.width) + " x " + te(o.value.height), 1)
      ]))
    ], 2));
  }
}), Yq = /* @__PURE__ */ ye({
  __name: "BarPanel",
  props: {
    data: {},
    stacked: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    barWidth: {},
    barGroupWidth: { default: 0.7 },
    showValues: { default: "auto" },
    unit: {},
    decimals: { default: 0 },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" }
  },
  setup(e) {
    return (t, n) => (ee(), Ze(Qm, {
      data: e.data,
      "draw-style": "bars",
      "stacking-mode": e.stacked ? "normal" : "none",
      "color-scheme": e.colorScheme,
      "color-single-value": e.colorSingleValue,
      "color-distribution": e.colorDistribution,
      unit: e.unit,
      decimals: e.decimals,
      "fill-opacity": 80,
      "bar-group-width": e.barGroupWidth,
      "bar-width": e.barWidth,
      "legend-position": e.legendPosition,
      "legend-mode": e.legendMode,
      "legend-values": e.legendValues,
      "tooltip-mode": e.tooltipMode,
      "tooltip-sort": e.tooltipSort
    }, null, 8, ["data", "stacking-mode", "color-scheme", "color-single-value", "color-distribution", "unit", "decimals", "bar-group-width", "bar-width", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"]));
  }
}), Uq = {
  key: 0,
  style: { "text-align": "center", "font-size": "11px", color: "#888", padding: "2px 4px 4px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
}, fg = 2, Xq = /* @__PURE__ */ ye({
  __name: "GaugePanel",
  props: {
    series: {},
    value: { default: 0 },
    title: {},
    min: { default: $n.min },
    max: { default: $n.max },
    unit: {},
    thresholds: {},
    thresholdBaseColor: {},
    capRound: { type: Boolean, default: $n.capRound },
    trackWidth: { default: $n.trackWidth },
    fillWidth: { default: $n.fillWidth },
    trackColor: { default: $n.trackColor },
    sweepAngle: { default: $n.sweepAngle },
    valueColor: { default: $n.valueColor },
    valueSize: { default: $n.valueSize },
    valueVisible: { type: Boolean, default: $n.valueVisible },
    paddingX: { default: $n.paddingX },
    paddingY: { default: $n.paddingY },
    activeColorOverride: {},
    thresholdDisplay: { default: $n.thresholdDisplay },
    thresholdLabelDisplay: { default: $n.thresholdLabelDisplay },
    valueOffsetY: { default: $n.valueOffsetY },
    orientation: { default: $n.orientation }
  },
  setup(e) {
    const t = e, n = le(), o = le({ w: 0, h: 0 });
    let i = null;
    function a(C, O, $ = 2) {
      const P = C.toFixed($);
      return O === "percent" ? `${P}%` : O === "bytes" ? C >= 1024 * 1024 ? `${(C / 1024 / 1024).toFixed(1)} MB` : C >= 1024 ? `${(C / 1024).toFixed(1)} KB` : `${C} B` : O ? `${P} ${O}` : P;
    }
    function r(C, O, $) {
      const P = [...$].sort((x, E) => x.value - E.value);
      let k = O;
      for (const x of P)
        C >= x.value && (k = x.color);
      return k;
    }
    function l(C, O) {
      const $ = C.match(/^#([0-9a-f]{6})([0-9a-f]{2})?$/i);
      if ($) {
        const k = Number.parseInt($[1].slice(0, 2), 16), x = Number.parseInt($[1].slice(2, 4), 16), E = Number.parseInt($[1].slice(4, 6), 16);
        return `rgba(${k},${x},${E},${O})`;
      }
      const P = C.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
      return P ? `rgba(${P[1]},${P[2]},${P[3]},${O})` : C;
    }
    function s(C, O, $, P, k, x, E, z, B, D, W, H, F, A, U, j, ae, G, Y, K, J, be) {
      const xe = C.getContext("2d");
      if (!xe)
        return;
      const he = window.devicePixelRatio || 1, de = C.clientWidth, ne = C.clientHeight;
      if (de === 0 || ne === 0)
        return;
      C.width = de * he, C.height = ne * he, xe.scale(he, he), xe.clearRect(0, 0, de, ne);
      const we = H * Math.PI / 180, re = (H + F) * Math.PI / 180;
      let se, ve, Me, ke;
      if (F >= 360)
        se = -1, ve = 1, Me = -1, ke = 1;
      else {
        se = Math.cos(we), ve = Math.cos(we), Me = Math.sin(we), ke = Math.sin(we);
        const Kt = (an) => {
          se = Math.min(se, Math.cos(an)), ve = Math.max(ve, Math.cos(an)), Me = Math.min(Me, Math.sin(an)), ke = Math.max(ke, Math.sin(an));
        };
        Kt(re);
        const Mn = [0, 90, 180, 270, 360, 450, 540].map((an) => an * Math.PI / 180);
        for (const an of Mn) {
          const gn = (qn) => (qn % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), Hn = gn(we), Co = gn(re), ut = gn(an);
          (Hn <= Co ? ut >= Hn && ut <= Co : ut >= Hn || ut <= Co) && Kt(an);
        }
      }
      const Fe = ve - se, Re = ke - Me, We = Math.min(de, ne), et = We / 300, Le = ae * et, Ne = G * et, Ge = Math.max(0, de - 2 * Le), it = Math.max(0, ne - 2 * Ne), Ke = Le, Oe = Ne, Ve = B * et, De = D * et, Je = K === "marker", wt = K === "track", lt = Je ? Math.max(2, We * 0.04) : 0, qe = Je ? Math.max(Ve, De) / 2 + 2 + lt : Math.max(Ve, De) / 2, at = Math.min((Ge - qe * 2) / Fe, (it - qe * 2) / Re);
      if (at < 10)
        return;
      const dt = Ke + Ge / 2 - (se + ve) / 2 * at, vt = Oe + it / 2 - (Me + ke) / 2 * at, Rt = P - $ || 1, Xt = Math.max($, Math.min(P, O)), vn = (Xt - $) / Rt, Dt = we + vn * (re - we), zn = Y ?? r(Xt, E, x), on = z ? "round" : "butt";
      xe.beginPath(), xe.arc(dt, vt, at, we, re), xe.strokeStyle = W, xe.lineWidth = Ve, xe.lineCap = on, xe.stroke();
      const Qt = [...x].sort((Kt, Mn) => Kt.value - Mn.value), mn = [];
      if (Qt.length === 0)
        mn.push({ from: $, to: P, color: E });
      else {
        mn.push({ from: $, to: Qt[0].value, color: E });
        for (let Kt = 0; Kt < Qt.length; Kt++)
          mn.push({ from: Qt[Kt].value, to: Kt + 1 < Qt.length ? Qt[Kt + 1].value : P, color: Qt[Kt].color });
      }
      if (wt) {
        const Kt = (re - we) / (2 * Math.PI), Mn = xe.createConicGradient(we, dt, vt);
        for (const an of mn) {
          const gn = Math.min(1, (Math.max($, an.from) - $) / Rt * Kt), Hn = Math.min(1, (Math.min(P, an.to) - $) / Rt * Kt);
          Mn.addColorStop(gn, l(an.color, 0.25)), Mn.addColorStop(Hn, l(an.color, 0.25));
        }
        Mn.addColorStop(1, l(mn[0].color, 0.25)), xe.beginPath(), xe.arc(dt, vt, at, we, re), xe.strokeStyle = Mn, xe.lineWidth = Ve, xe.lineCap = on, xe.stroke();
      }
      if (vn > 0 && (xe.beginPath(), xe.arc(dt, vt, at, we, Dt), xe.strokeStyle = zn, xe.lineWidth = De, xe.lineCap = on, xe.stroke()), Je && mn.length > 0) {
        const Kt = at + Math.max(Ve, De) / 2 + lt / 2 + 2, Mn = (re - we) / (2 * Math.PI), an = xe.createConicGradient(we, dt, vt);
        for (const gn of mn) {
          const Hn = Math.min(1, (Math.max($, gn.from) - $) / Rt * Mn), Co = Math.min(1, (Math.min(P, gn.to) - $) / Rt * Mn);
          an.addColorStop(Hn, gn.color), an.addColorStop(Co, gn.color);
        }
        an.addColorStop(1, mn[0].color), xe.beginPath(), xe.arc(dt, vt, Kt, we, re), xe.strokeStyle = an, xe.lineWidth = lt, xe.lineCap = on, xe.stroke();
      }
      if (be !== "none" && x.length > 0) {
        const Kt = Math.max(8, 11 * et), Mn = at + Math.max(Ve, De) / 2 + (Je ? lt + 4 : 4) + Kt * 0.6, an = P - $ || 1;
        xe.font = `${Kt}px system-ui, sans-serif`, xe.textBaseline = "middle";
        for (const gn of x) {
          const Hn = (gn.value - $) / an;
          if (Hn < 0 || Hn > 1)
            continue;
          const Co = we + Hn * (re - we), ut = dt + Math.cos(Co) * Mn, qn = vt + Math.sin(Co) * Mn, bn = ut - dt;
          if (xe.textAlign = bn > 1 ? "left" : bn < -1 ? "right" : "center", xe.fillStyle = gn.color, be === "label" || be === "both") {
            const Gn = gn.label || String(gn.value);
            be === "both" ? (xe.fillText(Gn, ut, qn - Kt * 0.6), xe.fillText(a(gn.value, k, 1), ut, qn + Kt * 0.6)) : xe.fillText(Gn, ut, qn);
          } else
            xe.fillText(a(gn.value, k, 1), ut, qn);
        }
      }
      if (j) {
        const Kt = Math.max(4, U * et), Mn = a(Xt, k, 2), an = vt + Me * at - De / 2, gn = vt + ke * at + De / 2, Hn = (an + gn) / 2;
        xe.textAlign = "center", xe.textBaseline = "middle", xe.fillStyle = A, xe.font = `600 ${Kt}px system-ui, sans-serif`, xe.fillText(Mn, dt, Hn + J * et);
      }
    }
    function u(C, O, $) {
      const P = Math.ceil(Math.sqrt($ * C / O));
      return Math.floor(P * O / C) * P < $ ? O / Math.ceil(P * O / C) : C / P;
    }
    function c(C, O, $, P) {
      const k = Math.max(u(C, O, P), u(O, C, P));
      let x = Math.max(1, Math.floor(C / k));
      const E = Math.ceil(P / x);
      return x = Math.ceil(P / E), { xCount: x, yCount: E, cellW: C / x - $ + $ / x, cellH: O / E - $ + $ / E };
    }
    const d = R(
      () => t.series && t.series.length > 0 ? t.series : [{ label: t.title ?? "", value: t.value ?? 0, activeColorOverride: t.activeColorOverride }]
    ), f = R(() => d.value.length), g = R(() => t.thresholds && t.thresholds.length > 0 ? t.thresholds : []), m = R(() => t.thresholdBaseColor ?? "#52c41a"), b = R(() => {
      const C = o.value.w, O = o.value.h;
      return C <= 0 || O <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: f.value, yCount: 1, cellW: (C - fg * (f.value - 1)) / f.value, cellH: O } : t.orientation === "vertical" ? { xCount: 1, yCount: f.value, cellW: C, cellH: (O - fg * (f.value - 1)) / f.value } : c(C, O, fg, f.value);
    });
    Pt(() => {
      n.value && (i = new ResizeObserver((C) => {
        const O = C[0].contentRect;
        o.value = { w: O.width, h: O.height };
      }), i.observe(n.value));
    }), Bo(() => {
      i?.disconnect();
    });
    const y = le({});
    function S() {
      Nt(() => {
        for (let C = 0; C < d.value.length; C++) {
          const O = y.value[C];
          if (!O)
            continue;
          const $ = d.value[C];
          s(
            O,
            $.value,
            t.min,
            t.max,
            t.unit,
            g.value,
            m.value,
            t.capRound,
            t.trackWidth,
            t.fillWidth,
            t.trackColor,
            270 - t.sweepAngle / 2,
            t.sweepAngle,
            t.valueColor,
            t.valueSize,
            t.valueVisible,
            t.paddingX,
            t.paddingY,
            $.activeColorOverride ?? t.activeColorOverride,
            t.thresholdDisplay,
            t.valueOffsetY,
            t.thresholdLabelDisplay
          );
        }
      });
    }
    return Ie(() => [
      d.value,
      t.min,
      t.max,
      t.unit,
      t.thresholds,
      t.thresholdBaseColor,
      t.capRound,
      t.trackWidth,
      t.fillWidth,
      t.trackColor,
      t.sweepAngle,
      t.valueColor,
      t.valueSize,
      t.valueVisible,
      t.paddingX,
      t.paddingY,
      t.thresholdDisplay,
      t.valueOffsetY,
      t.thresholdLabelDisplay,
      o.value
    ], S, { deep: !0, immediate: !0 }), (C, O) => (ee(), ge("div", {
      ref_key: "containerRef",
      ref: n,
      style: xt([{ width: "100%", height: "100%", display: "grid", gap: "2px" }, {
        gridTemplateColumns: `repeat(${b.value.xCount}, 1fr)`,
        gridTemplateRows: `repeat(${b.value.yCount}, 1fr)`
      }])
    }, [
      (ee(!0), ge(He, null, It(d.value, ($, P) => (ee(), ge("div", {
        key: `${$.label}-${P}`,
        style: { width: "100%", height: "100%", display: "flex", "flex-direction": "column", overflow: "hidden" }
      }, [
        N("canvas", {
          ref_for: !0,
          ref: (k) => {
            k && (y.value[P] = k);
          },
          style: { flex: "1", width: "100%", height: "0", display: "block", "min-height": "0" }
        }, null, 512),
        f.value > 1 && $.label ? (ee(), ge("div", Uq, te($.label), 1)) : je("", !0)
      ]))), 128))
    ], 4));
  }
}), Qq = /* @__PURE__ */ ye({
  __name: "HistogramPanel",
  props: {
    seriesValues: {},
    seriesLabels: {},
    bucketSize: {},
    bucketCount: {},
    bucketOffset: {},
    combineSeries: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    lineWidth: { default: 1 },
    fillOpacity: { default: 80 },
    unit: {}
  },
  setup(e) {
    const t = e;
    function n(r, l) {
      const s = r.filter((O) => Number.isFinite(O));
      if (s.length === 0)
        return { bucketStarts: [], counts: [] };
      const u = Math.min(...s), c = Math.max(...s), d = c - u || 1, f = l.bucketOffset ?? 0, g = l.bucketCount ?? 30, m = l.bucketSize ?? d / g, b = Math.floor((u - f) / m) * m + f, y = [], S = [];
      let C = b;
      for (; C <= c; )
        y.push(C), S.push(0), C += m;
      for (const O of s) {
        const $ = Math.floor((O - b) / m), P = Math.min($, S.length - 1);
        P >= 0 && S[P]++;
      }
      return { bucketStarts: y, counts: S };
    }
    function o(r, l) {
      const s = r.flat();
      return n(s, l);
    }
    const i = R(() => {
      const r = { bucketSize: t.bucketSize, bucketCount: t.bucketCount, bucketOffset: t.bucketOffset };
      if (t.combineSeries || t.seriesValues.length === 0) {
        const { bucketStarts: d, counts: f } = o(t.seriesValues, r);
        return { bucketStarts: d, countSeries: [f], labels: ["combined"] };
      }
      const l = t.seriesValues.flat(), { bucketStarts: s } = n(l, r), u = s.length > 1 ? s[1] - s[0] : void 0, c = t.seriesValues.map((d) => {
        const { counts: f } = n(d, { ...r, bucketSize: u });
        return Array.from({ length: s.length }, (g, m) => f[m] ?? 0);
      });
      return { bucketStarts: s, countSeries: c, labels: t.seriesLabels };
    }), a = R(() => ({
      timestamps: i.value.bucketStarts,
      series: i.value.labels.map((r, l) => ({
        label: r,
        values: i.value.countSeries[l] ?? []
      }))
    }));
    return (r, l) => (ee(), Ze(Qm, {
      data: a.value,
      "fill-opacity": e.fillOpacity,
      "line-width": e.lineWidth,
      "draw-style": "bars",
      unit: e.unit,
      "color-scheme": e.colorScheme,
      "color-single-value": e.colorSingleValue,
      "color-distribution": e.colorDistribution,
      "scale-distribution": "linear",
      "show-grid-lines": "y",
      "axis-label": "y",
      "axis-tick": "hidden",
      "axis-border": "hidden",
      "tooltip-mode": "multi",
      "legend-position": !e.combineSeries && i.value.countSeries.length > 1 ? "bottom" : "hidden",
      "legend-mode": "list",
      "stacking-mode": "none",
      "x-axis-time": !1
    }, null, 8, ["data", "fill-opacity", "line-width", "unit", "color-scheme", "color-single-value", "color-distribution", "legend-position"]));
  }
}), Zq = ["width", "height"], Jq = ["d", "fill", "stroke", "opacity", "onMousemove"], eG = ["x", "y"], tG = ["onClick"], nG = { style: { width: "100%", "border-collapse": "collapse" } }, oG = ["onClick"], iG = { class: "flex items-center gap-1" }, aG = {
  class: "overflow-hidden text-ellipsis whitespace-nowrap",
  style: { "max-width": "80px" }
}, rG = { class: "flex items-center gap-1.5" }, lG = /* @__PURE__ */ ye({
  __name: "PiePanel",
  props: {
    slices: {},
    pieType: { default: "pie" },
    pieLabels: { default: () => [] },
    unit: {},
    decimals: { default: 2 },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    tooltipMode: { default: "single" },
    tooltipSort: { default: "none" }
  },
  setup(e) {
    const t = e, n = ja(), o = le(), i = le({ width: 0, height: 0 });
    let a = null;
    Pt(() => {
      if (!o.value)
        return;
      a = new ResizeObserver((K) => {
        const { width: J, height: be } = K[0].contentRect;
        i.value = { width: Math.floor(J), height: Math.floor(be) };
      }), a.observe(o.value);
      const { width: G, height: Y } = o.value.getBoundingClientRect();
      i.value = { width: Math.floor(G), height: Math.floor(Y) };
    }), At(() => {
      a?.disconnect();
    });
    const r = R(() => n.isDark), l = R(() => r.value ? "#d9d9d9" : "#141414"), s = R(() => r.value ? "#8c8c8c" : "#595959"), u = R(() => r.value ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"), c = R(() => r.value ? "rgba(0,0,0,0.6)" : "rgba(255,255,255,0.8)"), d = R(() => {
      const G = t.legendValues.length > 0;
      return t.legendMode === "table" ? G ? 120 + t.legendValues.length * 64 : 160 : 140;
    }), f = R(
      () => t.legendPosition === "bottom" ? t.legendMode === "table" ? Math.min(t.slices.length * 24 + 28, 120) : 28 : 0
    ), g = R(() => t.legendPosition === "right" ? d.value : 0), m = R(() => Math.max(i.value.width - g.value, 10)), b = R(() => Math.max(i.value.height - f.value, 10)), y = R(() => m.value / 2), S = R(() => b.value / 2), C = R(() => Math.min(y.value, S.value) * 0.85), O = R(() => t.pieType === "donut" ? C.value * 0.55 : 0), $ = le(null), P = le({ x: 0, y: 0 }), k = le(/* @__PURE__ */ new Set()), x = R(() => t.slices.filter((G) => !k.value.has(G.label))), E = R(() => x.value.reduce((G, Y) => G + Y.value, 0));
    function z(G, Y, K, J) {
      const be = (J - 90) * Math.PI / 180;
      return { x: G + K * Math.cos(be), y: Y + K * Math.sin(be) };
    }
    function B(G, Y, K, J, be, xe) {
      const he = Math.min(xe - be, 359.9999), de = he > 180 ? 1 : 0, ne = z(G, Y, K, be), we = z(G, Y, K, be + he);
      if (J <= 0)
        return [
          `M ${G} ${Y}`,
          `L ${ne.x} ${ne.y}`,
          `A ${K} ${K} 0 ${de} 1 ${we.x} ${we.y}`,
          "Z"
        ].join(" ");
      const re = z(G, Y, J, be + he), se = z(G, Y, J, be);
      return [
        `M ${ne.x} ${ne.y}`,
        `A ${K} ${K} 0 ${de} 1 ${we.x} ${we.y}`,
        `L ${re.x} ${re.y}`,
        `A ${J} ${J} 0 ${de} 0 ${se.x} ${se.y}`,
        "Z"
      ].join(" ");
    }
    const D = R(() => {
      const G = E.value;
      if (G === 0 || i.value.width === 0)
        return [];
      let Y = 0;
      return x.value.map((K) => {
        const J = K.value / G * 360, be = K.value / G * 100, xe = Y;
        Y += J;
        const he = Y, de = xe + J / 2, ne = (C.value + O.value) / 2 || C.value * 0.65, we = z(y.value, S.value, ne, de), re = B(y.value, S.value, C.value, O.value, xe, he);
        return { ...K, angle: J, pct: be, startAngle: xe, endAngle: he, midAngle: de, labelPos: we, path: re };
      });
    });
    function W(G) {
      const Y = G.toFixed(t.decimals);
      return t.unit ? `${Y} ${t.unit}` : Y;
    }
    function H(G, Y) {
      return G.rawValues && G.rawValues.length > 0 ? fu(G.rawValues, Y) : G.value;
    }
    function F(G) {
      const Y = new Set(k.value);
      if (Y.has(G))
        Y.delete(G);
      else {
        if (t.slices.filter((J) => !Y.has(J.label)).length <= 1)
          return;
        Y.add(G);
      }
      k.value = Y;
    }
    function A(G, Y) {
      $.value = Y;
      const K = o.value?.getBoundingClientRect();
      K && (P.value = { x: G.clientX - K.left, y: G.clientY - K.top });
    }
    function U() {
      $.value = null;
    }
    const j = R(() => {
      if (!$.value || t.tooltipMode === "none")
        return [];
      const G = E.value;
      if (t.tooltipMode === "single") {
        const K = x.value.find((J) => J.label === $.value);
        return K ? [{ ...K, percent: G > 0 ? K.value / G * 100 : 0 }] : [];
      }
      let Y = x.value.map((K) => ({ ...K, percent: G > 0 ? K.value / G * 100 : 0 }));
      return t.tooltipSort === "desc" && (Y = [...Y].sort((K, J) => J.value - K.value)), t.tooltipSort === "asc" && (Y = [...Y].sort((K, J) => K.value - J.value)), Y;
    }), ae = R(() => {
      const G = t.tooltipMode === "multi" ? 180 : 140, Y = t.tooltipMode === "multi" ? j.value.length * 22 + 32 : 72, K = Math.min(P.value.x + 14, i.value.width - G - 4), J = Math.min(P.value.y - 8, i.value.height - Y - 4);
      return { left: Math.max(4, K), top: Math.max(4, J) };
    });
    return (G, Y) => (ee(), ge("div", {
      ref_key: "containerRef",
      ref: o,
      class: "w-full h-full relative overflow-hidden",
      style: xt({
        display: "flex",
        flexDirection: e.legendPosition === "bottom" ? "column" : "row"
      })
    }, [
      i.value.width > 0 ? (ee(), ge("svg", {
        key: 0,
        width: m.value,
        height: b.value,
        style: { "flex-shrink": "0" }
      }, [
        (ee(!0), ge(He, null, It(D.value, (K) => (ee(), ge("g", {
          key: K.label
        }, [
          K.angle > 0.3 ? (ee(), ge("path", {
            key: 0,
            d: K.path,
            fill: K.color,
            stroke: c.value,
            "stroke-width": "1.5",
            opacity: $.value && $.value !== K.label ? 0.6 : 1,
            style: { cursor: "pointer", transition: "opacity 0.15s" },
            onMousemove: (J) => A(J, K.label),
            onMouseleave: U
          }, null, 40, Jq)) : je("", !0),
          e.pieLabels.length > 0 && K.angle > 20 ? (ee(), ge("text", {
            key: 1,
            x: K.labelPos.x,
            y: K.labelPos.y,
            "text-anchor": "middle",
            "dominant-baseline": "middle",
            fill: "#fff",
            "font-size": "11",
            style: { "pointer-events": "none", "user-select": "none", "text-shadow": "0 1px 2px rgba(0,0,0,0.6)" }
          }, te([
            e.pieLabels.includes("name") ? K.label : null,
            e.pieLabels.includes("percent") ? `${K.pct.toFixed(1)}%` : null,
            e.pieLabels.includes("value") ? W(K.value) : null
          ].filter(Boolean).join(" ")), 9, eG)) : je("", !0)
        ]))), 128))
      ], 8, Zq)) : je("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "list" ? (ee(), ge("div", {
        key: 1,
        style: xt({
          display: "flex",
          flexDirection: e.legendPosition === "bottom" ? "row" : "column",
          flexWrap: "wrap",
          alignItems: e.legendPosition === "bottom" ? "center" : "flex-start",
          justifyContent: e.legendPosition === "bottom" ? "center" : "flex-start",
          gap: "4px 12px",
          padding: e.legendPosition === "right" ? "8px 4px" : "2px 8px",
          overflowY: e.legendPosition === "right" ? "auto" : "hidden",
          width: e.legendPosition === "right" ? `${g.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0
        })
      }, [
        (ee(!0), ge(He, null, It(e.slices, (K) => (ee(), ge("div", {
          key: K.label,
          class: "flex items-center gap-1 text-xs whitespace-nowrap cursor-pointer select-none",
          style: xt({
            color: l.value,
            opacity: k.value.has(K.label) ? 0.35 : 1,
            textDecoration: k.value.has(K.label) ? "line-through" : "none"
          }),
          onClick: (J) => F(K.label)
        }, [
          N("span", {
            class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
            style: xt({ background: K.color })
          }, null, 4),
          N("span", null, te(K.label), 1),
          e.legendValues.length > 0 ? (ee(), ge("span", {
            key: 0,
            class: "ml-1",
            style: xt({ color: s.value })
          }, te(e.legendValues.map((J) => W(H(K, J))).join(" / ")), 5)) : je("", !0)
        ], 12, tG))), 128))
      ], 4)) : je("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "table" ? (ee(), ge("div", {
        key: 2,
        style: xt({
          width: e.legendPosition === "right" ? `${g.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0,
          overflowY: "auto",
          flexShrink: 0,
          fontSize: "11px"
        })
      }, [
        N("table", nG, [
          N("thead", null, [
            N("tr", null, [
              N("th", {
                style: xt({ textAlign: "left", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Name ", 4),
              N("th", {
                style: xt({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Value ", 4),
              (ee(!0), ge(He, null, It(e.legendValues, (K) => (ee(), ge("th", {
                key: K,
                style: xt({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}`, minWidth: "56px" })
              }, te(K.charAt(0).toUpperCase() + K.slice(1)), 5))), 128))
            ])
          ]),
          N("tbody", null, [
            (ee(!0), ge(He, null, It(e.slices, (K) => (ee(), ge("tr", {
              key: K.label,
              class: "cursor-pointer select-none",
              style: xt({ opacity: k.value.has(K.label) ? 0.35 : 1 }),
              onClick: (J) => F(K.label)
            }, [
              N("td", {
                style: xt({ padding: "2px 6px", color: l.value })
              }, [
                N("div", iG, [
                  N("span", {
                    class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
                    style: xt({ background: K.color })
                  }, null, 4),
                  N("span", aG, te(K.label), 1)
                ])
              ], 4),
              N("td", {
                style: xt({ textAlign: "right", padding: "2px 6px", color: l.value, fontVariantNumeric: "tabular-nums" })
              }, te(W(K.value)), 5),
              (ee(!0), ge(He, null, It(e.legendValues, (J) => (ee(), ge("td", {
                key: J,
                style: xt({ textAlign: "right", padding: "2px 6px", color: s.value, fontVariantNumeric: "tabular-nums" })
              }, te(W(H(K, J))), 5))), 128))
            ], 12, oG))), 128))
          ])
        ])
      ], 4)) : je("", !0),
      $.value && e.tooltipMode !== "none" && j.value.length > 0 ? (ee(), ge("div", {
        key: 3,
        class: "absolute z-50 pointer-events-none rounded shadow-lg text-xs",
        style: xt({
          left: `${ae.value.left}px`,
          top: `${ae.value.top}px`,
          background: r.value ? "#1f1f1f" : "#fff",
          border: r.value ? "1px solid #333" : "1px solid #e8e8e8",
          minWidth: "140px"
        })
      }, [
        N("div", {
          class: "px-2 pt-1.5 pb-0 text-xs font-medium",
          style: xt({ color: r.value ? "#d9d9d9" : "#141414" })
        }, te(e.tooltipMode === "multi" ? `${W(E.value)} total` : j.value[0]?.label), 5),
        N("div", {
          class: "border-t my-1",
          style: xt({ borderColor: r.value ? "#333" : "#e8e8e8" })
        }, null, 4),
        (ee(!0), ge(He, null, It(j.value, (K) => (ee(), ge("div", {
          key: K.label,
          class: "px-2 py-0.5 flex items-center justify-between gap-2"
        }, [
          N("div", rG, [
            N("span", {
              class: "inline-block w-2 h-2 rounded-sm",
              style: xt({ background: K.color })
            }, null, 4),
            N("span", {
              style: xt({ color: r.value ? "#d9d9d9" : "#141414" })
            }, te(e.tooltipMode === "multi" ? K.label : `${K.percent.toFixed(1)}%`), 5)
          ]),
          N("span", {
            class: "font-mono",
            style: xt({ color: K.color })
          }, te(W(K.value)), 5)
        ]))), 128))
      ], 4)) : je("", !0)
    ], 4));
  }
}), Jc = 36, Xr = 1.2, W1 = 1, sG = /* @__PURE__ */ ye({
  __name: "StatPanel",
  props: {
    title: {},
    unit: {},
    series: {},
    trend: {},
    thresholds: {},
    thresholdBaseColor: {},
    orientation: {},
    textMode: {},
    colorMode: {}
  },
  setup(e) {
    const t = e, n = ja(), o = le(), i = le({ w: 0, h: 0 });
    let a = null;
    const r = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function l($) {
      return $ >= 1e6 ? `${($ / 1e6).toFixed(1)}M` : $ >= 1e3 ? `${($ / 1e3).toFixed(1)}K` : $ % 1 === 0 ? String($) : $.toFixed(1);
    }
    function s($, P, k, x) {
      const E = k ?? x ?? r[0];
      if (P && P.length > 0) {
        let z = E;
        for (const B of P)
          $ >= B.value && (z = B.color);
        return z;
      }
      return E;
    }
    function u($, P) {
      if ($.startsWith("rgb("))
        return $.replace("rgb(", "rgba(").replace(")", `, ${P})`);
      if ($.startsWith("rgba("))
        return $.replace(/,\s*[\d.]+\)$/, `, ${P})`);
      const k = $.replace("#", ""), x = k.length === 3 ? k.split("").map((D) => D + D).join("") : k.slice(0, 6), E = Number.parseInt(x.slice(0, 2), 16), z = Number.parseInt(x.slice(2, 4), 16), B = Number.parseInt(x.slice(4, 6), 16);
      return `rgba(${E}, ${z}, ${B}, ${P})`;
    }
    function c($, P, k) {
      switch (P) {
        case "background_solid":
          return gt($).toString();
        case "background": {
          const x = k ? 1 : -0.7, E = gt($).darken(15 * x).spin(8).toRgbString(), z = gt($).darken(5 * x).spin(-8).toRgbString();
          return `linear-gradient(120deg, ${E}, ${z})`;
        }
        default:
          return "transparent";
      }
    }
    function d($) {
      return gt($).isLight() ? "#1a1a1a" : "#ffffff";
    }
    function f($, P, k) {
      if ($ === 0 || P === 0)
        return { isWide: !1, showSparkline: !1, valueFontSize: 24, titleFontSize: 12, chartHeight: 0, padding: 8 };
      const x = P > 100 ? 12 : 8, E = $ - x * 2, z = P - x * 2, B = $ / P > 2.5, D = k && (B ? P > 50 : P > 100), W = Math.max(10, Math.min(13, z * (B ? 0.22 : 0.18)));
      let H, F = 0;
      if (B)
        H = D ? Math.min(z * 0.62, E * 0.42, Jc) : Math.min(z * 0.7, E * 0.38, Jc), D && (F = P * 0.5);
      else {
        const A = W * Xr;
        H = Math.min(D ? (z - A) * 0.65 : (z - A) * 0.85, E * 0.9, Jc), D && (F = Math.max(0, Math.min(P - W * Xr - H * Xr - x, P * 0.5)));
      }
      return {
        isWide: B,
        showSparkline: D,
        valueFontSize: Math.max(11, H),
        titleFontSize: W,
        chartHeight: F,
        padding: x
      };
    }
    function g($, P, k) {
      const x = Math.ceil(Math.sqrt(k * $ / P));
      return Math.floor(x * P / $) * x < k ? P / Math.ceil(x * P / $) : $ / x;
    }
    function m($, P, k, x) {
      const E = Math.max(g($, P, x), g(P, $, x));
      let z = Math.max(1, Math.floor($ / E));
      const B = Math.ceil(x / z);
      return z = Math.ceil(x / B), {
        xCount: z,
        yCount: B,
        cellW: $ / z - k + k / z,
        cellH: P / B - k + k / B
      };
    }
    function b($, P, k) {
      const x = $.getContext("2d");
      if (!x)
        return;
      const E = window.devicePixelRatio || 1, z = $.getBoundingClientRect();
      if (z.width === 0 || z.height === 0)
        return;
      $.width = z.width * E, $.height = z.height * E, x.scale(E, E);
      const B = z.width, D = z.height, W = Math.min(...P), F = Math.max(...P) - W || 1;
      x.clearRect(0, 0, B, D);
      const A = x.createLinearGradient(0, 0, 0, D);
      A.addColorStop(0, u(k, 0.25)), A.addColorStop(1, u(k, 0));
      const U = P.map((j, ae) => ({
        x: ae / (P.length - 1) * B,
        y: D - 2 - (j - W) / F * (D - 4)
      }));
      x.beginPath(), U.forEach(({ x: j, y: ae }, G) => G === 0 ? x.moveTo(j, ae) : x.lineTo(j, ae)), x.lineTo(B, D), x.lineTo(0, D), x.fillStyle = A, x.fill(), x.beginPath(), U.forEach(({ x: j, y: ae }, G) => G === 0 ? x.moveTo(j, ae) : x.lineTo(j, ae)), x.strokeStyle = k, x.lineWidth = 1.5, x.stroke();
    }
    const y = R(() => Math.max(t.series.length, 1)), S = R(() => {
      const $ = i.value.w, P = i.value.h;
      return $ <= 0 || P <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: 1, yCount: y.value, cellW: $, cellH: (P - W1 * (y.value - 1)) / y.value } : m($, P, W1, y.value);
    }), C = R(() => n.isDark ? "#303030" : "#fff");
    Pt(() => {
      o.value && (a = new ResizeObserver(($) => {
        const P = $[0].contentRect;
        (i.value.w !== P.width || i.value.h !== P.height) && (i.value = { w: P.width, h: P.height });
      }), a.observe(o.value));
    }), Bo(() => {
      a?.disconnect();
    });
    const O = ye({
      props: {
        label: String,
        value: Number,
        unit: String,
        mappedLabel: String,
        sparkline: Array,
        percentChange: [Number, null],
        textMode: { type: String, default: "value_and_name" },
        colorMode: String,
        color: String,
        width: Number,
        height: Number
      },
      setup($) {
        const P = le(), k = ja();
        function x() {
          Nt(() => {
            P.value && $.sparkline && $.sparkline.length > 1 && b(P.value, $.sparkline, $.color ?? "#1677ff");
          });
        }
        return Ie(() => [$.sparkline, $.color, $.width, $.height], x, { immediate: !0 }), () => {
          const E = $, z = k.isDark, B = E.sparkline != null && E.sparkline.length > 1, D = f(E.width ?? 0, E.height ?? 0, B), W = E.textMode === "value_and_name" || E.textMode === "name", H = E.textMode === "value_and_name" || E.textMode === "value", F = Math.max(10, D.valueFontSize * 0.44), A = E.colorMode === "background_solid" || E.colorMode === "background", U = A ? c(E.color ?? "#1677ff", E.colorMode ?? "value", z) : "transparent", j = A ? d(E.color ?? "#1677ff") : E.color ?? "#d9d9d9", ae = A ? j : "#888", G = A ? j : "#666", Y = E.percentChange != null ? (E.percentChange > 0 ? "+" : "") + E.percentChange.toLocaleString(void 0, { style: "percent", minimumFractionDigits: 1, maximumFractionDigits: 2 }) : null, K = E.percentChange != null ? E.percentChange > 0 ? "#52c41a" : E.percentChange < 0 ? "#ff4d4f" : "#888" : "", J = E.percentChange != null ? E.percentChange > 0 ? "↑" : E.percentChange < 0 ? "↓" : "" : "", be = E.mappedLabel ?? l(E.value ?? 0), xe = [
            io("span", {
              style: {
                color: j,
                fontSize: `${D.valueFontSize}px`,
                fontWeight: 500,
                fontFamily: "monospace",
                lineHeight: Xr
              }
            }, be)
          ];
          E.mappedLabel || xe.push(io("span", {
            style: { color: G, fontSize: `${F}px`, lineHeight: Xr }
          }, E.unit)), Y && xe.push(io("span", {
            style: { color: K, fontSize: `${F}px`, marginLeft: "2px", lineHeight: Xr }
          }, `${J}${Y}`));
          const he = W ? io("div", {
            style: {
              color: ae,
              fontSize: `${D.titleFontSize}px`,
              lineHeight: Xr,
              ...D.isWide ? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } : { marginBottom: "2px" }
            }
          }, E.label) : null, de = H ? io("div", {
            style: {
              display: "flex",
              alignItems: "baseline",
              gap: D.isWide ? "3px" : "4px",
              flexWrap: "wrap"
            }
          }, xe) : null, ne = io("div", {
            style: D.isWide ? { flex: 1, minWidth: 0, position: "relative", zIndex: 1 } : { position: "relative", zIndex: 1 }
          }, [he, de]), we = D.showSparkline ? io("canvas", {
            ref: (se) => {
              P.value = se;
            },
            style: D.isWide ? { position: "absolute", right: 0, bottom: 0, left: 0, width: "100%", height: `${D.chartHeight}px`, opacity: 0.7 } : { position: "absolute", bottom: 0, left: 0, right: 0, width: "100%", height: `${D.chartHeight}px`, opacity: 0.6 }
          }) : null, re = D.isWide ? {
            width: "100%",
            height: "100%",
            display: "flex",
            alignItems: "center",
            padding: `0 ${D.padding}px`,
            gap: "8px",
            overflow: "hidden",
            position: "relative",
            background: U
          } : {
            width: "100%",
            height: "100%",
            display: "flex",
            flexDirection: "column",
            justifyContent: "center",
            padding: `${D.padding}px`,
            overflow: "hidden",
            position: "relative",
            background: U
          };
          return io("div", { style: re }, D.isWide ? [we, ne] : [we, ne]);
        };
      }
    });
    return ($, P) => (ee(), ge("div", {
      ref_key: "containerRef",
      ref: o,
      style: xt([{ width: "100%", height: "100%", display: "grid", gap: "1px" }, {
        gridTemplateColumns: e.orientation === "horizontal" ? "1fr" : `repeat(${S.value.xCount}, 1fr)`,
        gridTemplateRows: e.orientation === "horizontal" ? `repeat(${y.value}, 1fr)` : `repeat(${S.value.yCount}, 1fr)`,
        background: C.value
      }])
    }, [
      (ee(!0), ge(He, null, It(e.series, (k, x) => (ee(), Ze(M(O), {
        key: `${k.label}-${x}`,
        label: y.value === 1 ? e.title : k.label,
        value: k.displayValue ?? (k.values.length > 0 ? k.values[k.values.length - 1] ?? 0 : 0),
        unit: k.units ?? e.unit,
        "mapped-label": k.valueMap !== void 0 ? k.valueMap[String(k.displayValue ?? (k.values.length > 0 ? k.values[k.values.length - 1] ?? 0 : 0))] : void 0,
        sparkline: k.values.length > 1 ? k.values : void 0,
        "percent-change": k.percentChange,
        "text-mode": e.textMode,
        "color-mode": e.colorMode,
        color: s(
          k.displayValue ?? k.values[k.values.length - 1] ?? 0,
          e.thresholds,
          e.thresholdBaseColor,
          r[x % r.length]
        ),
        width: S.value.cellW,
        height: S.value.cellH
      }, null, 8, ["label", "value", "unit", "mapped-label", "sparkline", "percent-change", "text-mode", "color-mode", "color", "width", "height"]))), 128))
    ], 4));
  }
}), uG = {
  key: 0,
  class: "flex-center h-full text-secondary"
}, cG = {
  key: 1,
  class: "flex-center h-full"
}, dG = {
  key: 2,
  class: "flex-center h-full text-red-500 text-xs"
}, fG = {
  key: 3,
  class: "w-full h-full relative"
}, pG = {
  key: 0,
  class: "absolute inset-0 z-10 flex items-center justify-center",
  style: { "backdrop-filter": "blur(1px)", "border-radius": "4px" }
}, gG = {
  key: 0,
  class: "w-full h-full"
}, hG = {
  key: 0,
  class: "w-full h-full overflow-auto"
}, Vh = /* @__PURE__ */ ye({
  __name: "PanelRenderer",
  props: {
    panelId: {},
    panelConfig: { default: void 0 }
  },
  setup(e) {
    const t = e, n = xa(), { t: o } = jt(), i = R(() => t.panelConfig ?? n.panels[t.panelId]), a = le(!1), r = le(null), l = le(null), s = le(null), u = le(null), c = le(null), d = le(null), f = le(null);
    let g = null;
    const m = le(null), b = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function y($, P) {
      S();
      const k = $.seriesCount ?? 1, x = Yl(
        { from: P.from / 1e3, to: P.to / 1e3 },
        15,
        k,
        $.pattern,
        $.labels
      ), E = Array.from({ length: k }, (B, D) => 20 + (D * 37 + 13) % 60), z = Array.from({ length: k }, (B, D) => 10 + (D * 53 + 7) % 40);
      m.value = {
        timestamps: [...x.timestamps],
        seriesValues: x.series.map((B) => [...B.values])
      }, g = setInterval(() => {
        const B = m.value;
        if (!B)
          return;
        const D = Math.floor(Date.now() / 1e3), W = [...B.timestamps.slice(1), D], H = B.seriesValues.map((F, A) => {
          const U = F[F.length - 1], j = nI(U, E[A], z[A] * 0.1, z[A] + E[A] * 1.8);
          return [...F.slice(1), j];
        });
        m.value = { timestamps: W, seriesValues: H };
      }, 1e3);
    }
    function S() {
      g && (clearInterval(g), g = null), m.value = null;
    }
    Bo(S);
    async function C() {
      const $ = i.value;
      if ($) {
        a.value = !0, r.value = null, S();
        try {
          const P = $.queries.filter((B) => B.enabled !== !1).map((B) => B.dataSource).filter((B) => !!B && B.type === "mock");
          if (P.length === 0)
            return;
          const k = n.timeRange, x = { from: k.from / 1e3, to: k.to / 1e3 }, E = P[0];
          if (E.pattern === "live") {
            y(E, k);
            return;
          }
          if ($.type === "timeseries" || $.type === "bar") {
            const B = P.map(
              (W) => Yl(x, 15, W.seriesCount ?? 1, W.pattern, W.labels)
            ), D = {
              timestamps: B[0].timestamps,
              series: B.flatMap((W) => W.series)
            };
            $.type === "timeseries" ? l.value = D : s.value = D;
            return;
          }
          if ($.type === "histogram") {
            const B = P.map(
              (D) => Yl(x, 15, D.seriesCount ?? 1, D.pattern, D.labels)
            );
            f.value = {
              seriesValues: B.flatMap((D) => D.series.map((W) => W.values)),
              seriesLabels: B.flatMap((D) => D.series.map((W) => W.label))
            };
            return;
          }
          const z = await Promise.all(
            P.map(async (B) => Yl(x, 15, 1, B.pattern, B.labels).series[0] ?? { label: B.metric || "series", values: [] })
          );
          if ($.type === "stat" || $.type === "gauge")
            u.value = {
              value: z[0]?.values[z[0].values.length - 1] ?? 0,
              values: z.map((B) => B.values[B.values.length - 1] ?? 0),
              series: z.map((B) => ({
                label: B.label,
                values: B.values,
                displayValue: fu(B.values, $.statReducer ?? "lastNotNull"),
                percentChange: $.showPercentChange ? xc(B.values) : void 0
              })),
              unit: $.unit ?? $.statUnit ?? "",
              trend: $.statTrend ?? "flat",
              percentChange: $.showPercentChange ? xc(z[0]?.values ?? []) : void 0
            };
          else if ($.type === "pie")
            d.value = z.map((B, D) => ({
              label: B.label,
              value: fu(B.values, $.statReducer ?? "lastNotNull"),
              color: b[D % b.length],
              rawValues: B.values
            }));
          else if ($.type === "table") {
            const B = Yl(x, 15, E.seriesCount ?? 1, E.pattern, E.labels);
            c.value = {
              columns: [
                { key: "time", title: "Time", dataIndex: "time" },
                ...B.series.map((D) => ({ key: D.label, title: D.label, dataIndex: D.label }))
              ],
              dataSource: B.timestamps.map((D, W) => {
                const H = { time: new Date(D * 1e3).toLocaleString(), key: W };
                return B.series.forEach((F) => {
                  H[F.label] = F.values[W];
                }), H;
              })
            };
          }
        } catch (P) {
          r.value = P?.message ?? String(P);
        } finally {
          a.value = !1;
        }
      }
    }
    Ie(m, ($) => {
      if (!$)
        return;
      const P = i.value;
      P && (P.type === "timeseries" ? l.value = {
        timestamps: $.timestamps,
        series: $.seriesValues.map((k, x) => ({
          label: `series-${x}`,
          values: k
        }))
      } : P.type === "stat" || P.type === "gauge" ? u.value = {
        value: $.seriesValues[0]?.[$.seriesValues[0].length - 1] ?? 0,
        values: $.seriesValues.map((k) => k[k.length - 1] ?? 0),
        series: $.seriesValues.map((k, x) => ({
          label: `series-${x}`,
          values: k,
          displayValue: fu(k, P.statReducer ?? "lastNotNull"),
          percentChange: P.showPercentChange ? xc(k) : void 0
        })),
        unit: P.statUnit ?? "",
        trend: P.statTrend ?? "flat",
        percentChange: P.showPercentChange ? xc($.seriesValues[0] ?? []) : void 0
      } : P.type === "pie" ? d.value = $.seriesValues.map((k, x) => ({
        label: `series-${x}`,
        value: fu(k, P.statReducer ?? "lastNotNull"),
        color: b[x % b.length],
        rawValues: k
      })) : P.type === "histogram" && (f.value = {
        seriesValues: $.seriesValues,
        seriesLabels: $.seriesValues.map((k, x) => `series-${x}`)
      }));
    }, { deep: !0 }), Ie(() => n.panelRefreshKeys[t.panelId], C, { immediate: !0 }), Ie(() => n.timeRange, C, { deep: !0 });
    const O = ye({
      name: "NoDataPlaceholder",
      setup() {
        const { t: $ } = jt();
        return () => io("div", { class: "flex flex-col items-center justify-center h-full gap-1.5 text-gray-400 select-none" }, [
          io("span", { class: [ot.databaseOff, "text-7", "opacity-50"] }),
          io("span", { class: "text-xs" }, $("panel.noData"))
        ]);
      }
    });
    return ($, P) => {
      const k = Vt("a-table");
      return i.value ? a.value && !m.value ? (ee(), ge("div", cG, [
        v(M(Ao))
      ])) : r.value ? (ee(), ge("div", dG, te(r.value), 1)) : (ee(), ge("div", fG, [
        a.value && m.value ? (ee(), ge("div", pG, [
          v(M(Ao))
        ])) : je("", !0),
        i.value.type === "timeseries" ? (ee(), ge(He, { key: 1 }, [
          l.value && l.value.series.length > 0 ? (ee(), ge("div", gG, [
            v(Qm, {
              data: l.value,
              unit: i.value.unit,
              decimals: i.value.decimals,
              "color-scheme": i.value.colorScheme,
              "color-single-value": i.value.colorSingleValue,
              "color-distribution": i.value.colorDistribution,
              thresholds: i.value.thresholds,
              "threshold-base-color": i.value.thresholdBaseColor,
              "fill-opacity": i.value.fillOpacity,
              "line-width": i.value.lineWidth,
              "line-interpolation": i.value.lineInterpolation,
              "line-style": i.value.lineStyle,
              "draw-style": i.value.drawStyle,
              "gradient-mode": i.value.gradientMode,
              "span-nulls": i.value.spanNulls,
              "show-points": i.value.showPoints,
              "show-points-mode": i.value.showPointsMode,
              "stacking-mode": i.value.stackingMode,
              "legend-position": i.value.legendPosition,
              "legend-mode": i.value.legendMode,
              "legend-values": i.value.legendValues,
              "panel-id": i.value.id,
              "tooltip-mode": i.value.tooltipMode,
              "tooltip-sort": i.value.tooltipSort,
              "tooltip-max-height": i.value.tooltipMaxHeight,
              "show-axis-pointer": i.value.showAxisPointer,
              "soft-min": i.value.softMin,
              "soft-max": i.value.softMax,
              "axis-placement": i.value.axisPlacement,
              "axis-name": i.value.axisName,
              "axis-width": i.value.axisWidth,
              "show-grid-lines": i.value.showGridLines,
              "grid-color": i.value.gridColor,
              "axis-label": i.value.axisLabel,
              "axis-label-color": i.value.axisLabelColor,
              "axis-tick": i.value.axisTick,
              "axis-tick-color": i.value.axisTickColor,
              "axis-border": i.value.axisBorder,
              "axis-border-color": i.value.axisBorderColor,
              "scale-distribution": i.value.scaleDistribution,
              "centered-zero": i.value.centeredZero
            }, null, 8, ["data", "unit", "decimals", "color-scheme", "color-single-value", "color-distribution", "thresholds", "threshold-base-color", "fill-opacity", "line-width", "line-interpolation", "line-style", "draw-style", "gradient-mode", "span-nulls", "show-points", "show-points-mode", "stacking-mode", "legend-position", "legend-mode", "legend-values", "panel-id", "tooltip-mode", "tooltip-sort", "tooltip-max-height", "show-axis-pointer", "soft-min", "soft-max", "axis-placement", "axis-name", "axis-width", "show-grid-lines", "grid-color", "axis-label", "axis-label-color", "axis-tick", "axis-tick-color", "axis-border", "axis-border-color", "scale-distribution", "centered-zero"])
          ])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "bar" ? (ee(), ge(He, { key: 2 }, [
          s.value && s.value.series.length > 0 ? (ee(), Ze(Yq, {
            key: 0,
            data: s.value,
            stacked: i.value.stacked,
            "bar-width": i.value.barWidth,
            "bar-group-width": i.value.barGroupWidth,
            "show-values": i.value.barShowValues,
            unit: i.value.unit,
            decimals: i.value.decimals,
            "color-scheme": i.value.colorScheme,
            "color-single-value": i.value.colorSingleValue,
            "color-distribution": i.value.colorDistribution,
            "legend-position": i.value.legendPosition,
            "legend-mode": i.value.legendMode,
            "legend-values": i.value.legendValues,
            "tooltip-mode": i.value.tooltipMode,
            "tooltip-sort": i.value.tooltipSort
          }, null, 8, ["data", "stacked", "bar-width", "bar-group-width", "show-values", "unit", "decimals", "color-scheme", "color-single-value", "color-distribution", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "stat" ? (ee(), ge(He, { key: 3 }, [
          u.value ? (ee(), Ze(sG, {
            key: 0,
            title: i.value.title,
            unit: u.value.unit,
            series: u.value.series,
            trend: u.value.trend,
            thresholds: i.value.thresholds,
            "threshold-base-color": i.value.thresholdBaseColor,
            orientation: i.value.statOrientation,
            "text-mode": i.value.statTextMode,
            "color-mode": i.value.statColorMode
          }, null, 8, ["title", "unit", "series", "trend", "thresholds", "threshold-base-color", "orientation", "text-mode", "color-mode"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "gauge" ? (ee(), ge(He, { key: 4 }, [
          u.value ? (ee(), Ze(Xq, {
            key: 0,
            series: u.value.series.map((x, E) => ({
              label: x.label,
              value: x.displayValue ?? x.values[x.values.length - 1] ?? 0,
              activeColorOverride: b[E % b.length]
            })),
            title: i.value.title,
            min: i.value.min ?? 0,
            max: i.value.max ?? 100,
            unit: i.value.unit,
            thresholds: i.value.thresholds,
            "threshold-base-color": i.value.thresholdBaseColor,
            "cap-round": i.value.gaugeCapRound,
            "track-width": i.value.gaugeTrackWidth,
            "fill-width": i.value.gaugeFillWidth,
            "track-color": i.value.gaugeTrackColor,
            "sweep-angle": i.value.sweepAngle,
            "value-color": i.value.gaugeValueColor,
            "value-size": i.value.gaugeValueSize,
            "value-visible": i.value.gaugeValueVisible,
            "padding-x": i.value.gaugePaddingX,
            "padding-y": i.value.gaugePaddingY,
            "threshold-display": i.value.gaugeThresholdDisplay,
            "threshold-label-display": i.value.gaugeThresholdLabelDisplay,
            "value-offset-y": i.value.gaugeValueOffsetY,
            orientation: i.value.gaugeOrientation
          }, null, 8, ["series", "title", "min", "max", "unit", "thresholds", "threshold-base-color", "cap-round", "track-width", "fill-width", "track-color", "sweep-angle", "value-color", "value-size", "value-visible", "padding-x", "padding-y", "threshold-display", "threshold-label-display", "value-offset-y", "orientation"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "table" ? (ee(), ge(He, { key: 5 }, [
          c.value ? (ee(), ge("div", hG, [
            v(k, {
              columns: c.value.columns,
              "data-source": c.value.dataSource,
              pagination: { pageSize: i.value.tablePageSize ?? 20 },
              size: "small",
              scroll: { y: "100%" },
              "show-header": i.value.tableShowHeader !== !1
            }, null, 8, ["columns", "data-source", "pagination", "show-header"])
          ])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "pie" ? (ee(), ge(He, { key: 6 }, [
          d.value && d.value.length > 0 ? (ee(), Ze(lG, {
            key: 0,
            slices: d.value,
            "pie-type": i.value.pieType,
            "pie-labels": i.value.pieLabels,
            unit: i.value.unit,
            decimals: i.value.decimals,
            "legend-position": i.value.legendPosition,
            "legend-mode": i.value.legendMode,
            "legend-values": i.value.legendValues,
            "tooltip-mode": i.value.tooltipMode,
            "tooltip-sort": i.value.tooltipSort
          }, null, 8, ["slices", "pie-type", "pie-labels", "unit", "decimals", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : i.value.type === "histogram" ? (ee(), ge(He, { key: 7 }, [
          f.value && f.value.seriesValues.length > 0 ? (ee(), Ze(Qq, {
            key: 0,
            "series-values": f.value.seriesValues,
            "series-labels": f.value.seriesLabels,
            "bucket-size": i.value.histBucketSize,
            "bucket-count": i.value.histBucketCount,
            "bucket-offset": i.value.histBucketOffset,
            "combine-series": i.value.histCombineSeries,
            "line-width": i.value.lineWidth,
            "fill-opacity": i.value.fillOpacity,
            unit: i.value.unit
          }, null, 8, ["series-values", "series-labels", "bucket-size", "bucket-count", "bucket-offset", "combine-series", "line-width", "fill-opacity", "unit"])) : (ee(), Ze(M(O), { key: 1 }))
        ], 64)) : je("", !0)
      ])) : (ee(), ge("div", uG, te(M(o)("panel.noData")), 1));
    };
  }
}), vG = { class: "w-full h-full flex flex-col" }, mG = { class: "flex-1 min-h-0" }, bG = {
  key: 1,
  class: "flex-center h-full text-secondary text-sm"
}, yG = /* @__PURE__ */ ye({
  __name: "ChartPreview",
  setup(e) {
    const { panel: t } = qs(), n = R(() => {
      const o = t.value;
      return [
        o.type,
        JSON.stringify(o.queries),
        o.colorScheme,
        o.statReducer,
        o.unit,
        o.decimals,
        o.lineWidth,
        o.fillOpacity,
        o.stacked,
        o.thresholds?.length,
        o.sweepAngle
      ].join("|");
    });
    return (o, i) => (ee(), ge("div", vG, [
      N("div", mG, [
        M(t).id ? (ee(), Ze(Vh, {
          key: n.value,
          "panel-id": M(t).id,
          "panel-config": M(t)
        }, null, 8, ["panel-id", "panel-config"])) : (ee(), ge("div", bG, " No preview available "))
      ])
    ]));
  }
}), xG = { class: "w-full h-full flex flex-col" }, wG = { class: "flex-1 min-h-0" }, SG = /* @__PURE__ */ ye({
  __name: "PanelChrome",
  setup(e) {
    const t = ja(), { panel: n } = qs(), o = R(() => t.isDark), i = R(() => o.value ? "#303030" : "#e8e8e8"), a = R(() => o.value ? "#d9d9d9" : "#141414"), r = R(() => o.value ? "#666" : "#bbb");
    return (l, s) => (ee(), ge("div", xG, [
      N("div", {
        class: "flex items-center px-2.5 py-1.5 flex-shrink-0 gap-1.5 h-32px",
        style: xt({ borderBottom: `1px solid ${i.value}` })
      }, [
        N("span", {
          class: "text-xs font-medium truncate",
          style: xt({ color: a.value })
        }, te(M(n).title || "—"), 5),
        M(n).description ? (ee(), Ze(M(xo), {
          key: 0,
          title: M(n).description,
          placement: "bottom"
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).info, "text-xs"]),
              style: xt({ color: r.value })
            }, null, 6)
          ]),
          _: 1
        }, 8, ["title"])) : je("", !0),
        v(X2, {
          links: M(n).links ?? [],
          "icon-color": r.value
        }, null, 8, ["links", "icon-color"])
      ], 4),
      N("div", wG, [
        v(yG)
      ])
    ]));
  }
}), J2 = /* @__PURE__ */ ye({
  __name: "TimeRangePicker",
  setup(e) {
    const { RangePicker: t } = Q6, n = xa(), o = [
      { label: "最近 5 分钟", minutes: 5 },
      { label: "最近 15 分钟", minutes: 15 },
      { label: "最近 30 分钟", minutes: 30 },
      { label: "最近 1 小时", minutes: 60 },
      { label: "最近 3 小时", minutes: 180 },
      { label: "最近 6 小时", minutes: 360 },
      { label: "最近 12 小时", minutes: 720 },
      { label: "最近 24 小时", minutes: 1440 },
      { label: "最近 7 天", minutes: 10080 },
      { label: "最近 30 天", minutes: 43200 },
      { label: "最近 90 天", minutes: 129600 }
    ], i = [
      { label: "关闭", value: 0 },
      { label: "5 秒", value: 5 },
      { label: "10 秒", value: 10 },
      { label: "30 秒", value: 30 },
      { label: "1 分钟", value: 60 },
      { label: "5 分钟", value: 300 }
    ], a = le(!1), r = Math.round((n.timeRange.to - n.timeRange.from) / 6e4), l = o.find((c) => c.minutes === r);
    function s(c) {
      const d = Date.now();
      n.setTimeRange({ from: d - c * 60 * 1e3, to: d }), a.value = !1;
    }
    function u() {
      const c = Date.now(), d = n.timeRange.to - n.timeRange.from;
      n.setTimeRange({ from: c - d, to: c });
    }
    return (c, d) => (ee(), Ze(M(ha), null, {
      default: ce(() => [
        v(M(ha).Compact, null, {
          default: ce(() => [
            a.value ? (ee(), Ze(M(t), {
              key: 1,
              "show-time": "",
              "allow-clear": !1,
              style: { width: "320px" },
              value: [M(Xn)(M(n).timeRange.from), M(Xn)(M(n).timeRange.to)],
              onChange: d[1] || (d[1] = (f) => {
                f?.[0] && f?.[1] && M(n).setTimeRange({ from: f[0].valueOf(), to: f[1].valueOf() });
              })
            }, null, 8, ["value"])) : (ee(), Ze(M(bt), {
              key: 0,
              value: M(l)?.minutes,
              options: o.map((f) => ({ value: f.minutes, label: f.label })),
              "popup-match-select-width": "false",
              placeholder: "快速选择",
              onChange: d[0] || (d[0] = (f) => s(f))
            }, null, 8, ["value", "options"])),
            v(M($t), {
              onClick: d[2] || (d[2] = (f) => a.value = !a.value)
            }, {
              default: ce(() => [
                Ee(te(a.value ? "收起" : "自定义"), 1)
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        v(M(ha).Compact, null, {
          default: ce(() => [
            v(M($t), { onClick: u }, {
              default: ce(() => [
                N("span", {
                  class: ct([M(ot).refresh, "mr-1"])
                }, null, 2),
                d[4] || (d[4] = Ee(" 刷新 ", -1))
              ]),
              _: 1
            }),
            v(M(bt), {
              value: M(n).autoRefresh,
              options: i,
              "popup-match-select-width": "false",
              onChange: d[3] || (d[3] = (f) => M(n).setAutoRefresh(f))
            }, null, 8, ["value"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), CG = { class: "font-semibold mb-3" }, $G = /* @__PURE__ */ ye({
  __name: "ConstantOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt();
    return (i, a) => {
      const r = Vt("a-form-item");
      return ee(), ge("div", null, [
        N("div", CG, te(M(o)("variable.constant.title")), 1),
        v(r, {
          label: M(o)("variable.constant.value"),
          required: ""
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.constantValue,
              onChange: a[0] || (a[0] = (l) => n("change", { constantValue: l.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(M(ai), {
          checked: e.config.hide,
          onChange: a[1] || (a[1] = (l) => n("change", { hide: l.target.checked }))
        }, {
          default: ce(() => [
            Ee(te(M(o)("variable.constant.hide")), 1)
          ]),
          _: 1
        }, 8, ["checked"])
      ]);
    };
  }
}), PG = { class: "font-semibold mb-3" }, OG = { class: "mt-3" }, IG = { class: "mt-2" }, MG = /* @__PURE__ */ ye({
  __name: "CustomOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt();
    function a() {
      const r = [...n.config.customOptions ?? []];
      o("change", { customOptions: r });
    }
    return (r, l) => {
      const s = Vt("a-form-item");
      return ee(), ge("div", null, [
        N("div", PG, te(M(i)("variable.custom.title")), 1),
        (ee(!0), ge(He, null, It(e.config.customOptions ?? [], (u, c) => (ee(), ge("div", {
          key: c,
          class: "flex gap-2 mb-2"
        }, [
          v(M(ft), {
            size: "small",
            value: u.text,
            placeholder: "Text",
            onChange: (d) => {
              const f = [...e.config.customOptions ?? []];
              f[c] = { ...f[c], text: d.target.value }, o("change", { customOptions: f });
            }
          }, null, 8, ["value", "onChange"]),
          v(M(ft), {
            size: "small",
            value: u.value,
            placeholder: "Value",
            onChange: (d) => {
              const f = [...e.config.customOptions ?? []];
              f[c] = { ...f[c], value: d.target.value }, o("change", { customOptions: f });
            }
          }, null, 8, ["value", "onChange"]),
          v(M($t), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (d) => o("change", { customOptions: (e.config.customOptions ?? []).filter((f, g) => g !== c) })
          }, {
            default: ce(() => [
              N("span", {
                class: ct(M(ot).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]))), 128)),
        v(M($t), {
          type: "dashed",
          size: "small",
          block: "",
          onClick: a
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(i)("variable.custom.add")), 1)
          ]),
          _: 1
        }),
        N("div", OG, [
          v(s, {
            label: M(i)("variable.custom.allValue")
          }, {
            default: ce(() => [
              v(M(ft), {
                size: "small",
                value: e.config.allValue,
                placeholder: "$_all",
                onChange: l[0] || (l[0] = (u) => o("change", { allValue: u.target.value }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        N("div", IG, [
          v(M(ai), {
            checked: e.config.multi,
            onChange: l[1] || (l[1] = (u) => o("change", { multi: u.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(i)("variable.query.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        N("div", null, [
          v(M(ai), {
            checked: e.config.includeAll,
            onChange: l[2] || (l[2] = (u) => o("change", { includeAll: u.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(i)("variable.query.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ])
      ]);
    };
  }
}), TG = { class: "font-semibold mb-3" }, kG = /* @__PURE__ */ ye({
  __name: "DataSourceOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = [
      { label: "Zabbix", value: "zabbix" },
      { label: "Prometheus", value: "prometheus" },
      { label: "MySQL", value: "mysql" }
    ];
    return (a, r) => {
      const l = Vt("a-form-item");
      return ee(), ge("div", null, [
        N("div", TG, te(M(o)("variable.ds.title")), 1),
        v(l, {
          label: M(o)("variable.ds.type")
        }, {
          default: ce(() => [
            v(M(bt), {
              value: e.config.dsType,
              options: i,
              placeholder: M(o)("variable.ds.type.placeholder"),
              onChange: r[0] || (r[0] = (s) => n("change", { dsType: s }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(l, {
          label: M(o)("variable.ds.filterRegex")
        }, {
          default: ce(() => [
            v(M(ft), {
              value: e.config.instanceFilterRegex ?? "",
              placeholder: "/regex/",
              onChange: r[1] || (r[1] = (s) => n("change", { instanceFilterRegex: s.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(l, null, {
          default: ce(() => [
            v(M(ai), {
              checked: e.config.multi,
              onChange: r[2] || (r[2] = (s) => n("change", { multi: s.target.checked }))
            }, {
              default: ce(() => [
                Ee(te(M(o)("variable.ds.multi")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        }),
        v(l, null, {
          default: ce(() => [
            v(M(ai), {
              checked: e.config.includeAll,
              onChange: r[3] || (r[3] = (s) => n("change", { includeAll: s.target.checked }))
            }, {
              default: ce(() => [
                Ee(te(M(o)("variable.ds.includeAll")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        })
      ]);
    };
  }
}), EG = { class: "font-semibold mb-3" }, _G = { class: "grid grid-cols-2 gap-x-4" }, AG = /* @__PURE__ */ ye({
  __name: "GeneralSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = [
      { label: o("variable.type.custom"), value: "custom" },
      { label: o("variable.type.query"), value: "query" },
      { label: o("variable.type.textbox"), value: "textbox" },
      { label: o("variable.type.constant"), value: "constant" }
    ], a = [
      { label: o("variable.general.showOn.labelAndValue"), value: "label-and-value" },
      { label: o("variable.general.showOn.value"), value: "value" },
      { label: o("variable.general.showOn.nothing"), value: "nothing" }
    ];
    function r(l) {
      n("change", {
        type: l,
        queryType: void 0,
        extractRegex: void 0,
        sortMode: void 0,
        customOptions: void 0,
        allValue: void 0,
        constantValue: void 0
      });
    }
    return (l, s) => {
      const u = Vt("a-form-item");
      return ee(), ge("div", null, [
        N("div", EG, te(M(o)("variable.general.title")), 1),
        N("div", _G, [
          v(u, {
            label: M(o)("variable.general.type"),
            required: ""
          }, {
            default: ce(() => [
              v(M(bt), {
                value: e.config.type,
                options: i,
                style: { width: "100%" },
                onChange: r
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.general.name"),
            required: ""
          }, {
            default: ce(() => [
              v(M(ft), {
                value: e.config.name,
                placeholder: "variable_name",
                onChange: s[0] || (s[0] = (c) => n("change", { name: c.target.value }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.general.label")
          }, {
            default: ce(() => [
              v(M(ft), {
                value: e.config.label,
                placeholder: M(o)("variable.general.label.placeholder"),
                onChange: s[1] || (s[1] = (c) => n("change", { label: c.target.value }))
              }, null, 8, ["value", "placeholder"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.general.showOn")
          }, {
            default: ce(() => [
              v(M(bt), {
                value: e.config.showOnDashboard ?? "label-and-value",
                options: a,
                style: { width: "100%" },
                onChange: s[2] || (s[2] = (c) => n("change", { showOnDashboard: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        v(u, {
          label: M(o)("variable.general.description")
        }, {
          default: ce(() => [
            v(M(ft), {
              value: e.config.description ?? "",
              placeholder: M(o)("variable.general.description.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { description: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), DG = { class: "font-semibold mb-3" }, zG = { class: "grid grid-cols-2 gap-x-4" }, RG = { class: "mb-2" }, NG = { class: "mb-2" }, BG = {
  class: "p-2 text-xs text-secondary rounded",
  style: { background: "var(--ant-color-fill-tertiary)", border: "1px solid var(--ant-color-border-secondary)", "min-height": "32px" }
}, FG = /* @__PURE__ */ ye({
  __name: "QueryOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = [
      { label: o("variable.query.queryType.group"), value: "group" },
      { label: o("variable.query.queryType.host"), value: "host" },
      { label: o("variable.query.queryType.item"), value: "item" },
      { label: o("variable.query.queryType.labelValues"), value: "label_values" }
    ], a = [
      { label: o("variable.query.sort.disabled"), value: "disabled" },
      { label: o("variable.query.sort.alphabetical"), value: "alphabetical" },
      { label: o("variable.query.sort.numeric"), value: "numeric" }
    ], r = [
      { label: o("variable.query.refresh.onLoad"), value: "onLoad" },
      { label: o("variable.query.refresh.onTimeChange"), value: "onTimeChange" }
    ];
    return (l, s) => {
      const u = Vt("a-form-item");
      return ee(), ge("div", null, [
        N("div", DG, te(M(o)("variable.query.title")), 1),
        v(u, {
          label: M(o)("variable.query.dsUid")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.targetDsUid ?? "",
              placeholder: M(o)("variable.query.dsUid.placeholder"),
              onChange: s[0] || (s[0] = (c) => n("change", { targetDsUid: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(u, {
          label: M(o)("variable.query.queryType")
        }, {
          default: ce(() => [
            v(M(bt), {
              size: "small",
              value: e.config.queryType,
              options: i,
              style: { width: "100%" },
              placeholder: M(o)("variable.query.queryType.placeholder"),
              onChange: s[1] || (s[1] = (c) => n("change", { queryType: c }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(u, {
          label: M(o)("variable.query.query")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.query ?? "",
              placeholder: M(o)("variable.query.query.placeholder"),
              onChange: s[2] || (s[2] = (c) => n("change", { query: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        v(u, {
          label: M(o)("variable.query.regex")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.extractRegex ?? "",
              placeholder: M(o)("variable.query.regex.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { extractRegex: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        N("div", zG, [
          v(u, {
            label: M(o)("variable.query.sort")
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                value: e.config.sortMode ?? "disabled",
                options: a,
                style: { width: "100%" },
                onChange: s[4] || (s[4] = (c) => n("change", { sortMode: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          v(u, {
            label: M(o)("variable.query.refresh")
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                value: e.config.refresh,
                options: r,
                style: { width: "100%" },
                onChange: s[5] || (s[5] = (c) => n("change", { refresh: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        N("div", RG, [
          v(M(ai), {
            checked: e.config.multi,
            onChange: s[6] || (s[6] = (c) => n("change", { multi: c.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(o)("variable.query.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        N("div", NG, [
          v(M(ai), {
            checked: e.config.includeAll,
            onChange: s[7] || (s[7] = (c) => n("change", { includeAll: c.target.checked }))
          }, {
            default: ce(() => [
              Ee(te(M(o)("variable.query.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        v(u, {
          label: M(o)("variable.query.preview")
        }, {
          default: ce(() => [
            N("div", BG, te(M(o)("variable.query.preview.placeholder")), 1)
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), LG = { class: "font-semibold mb-3" }, HG = /* @__PURE__ */ ye({
  __name: "TextBoxOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt();
    return (i, a) => {
      const r = Vt("a-form-item");
      return ee(), ge("div", null, [
        N("div", LG, te(M(o)("variable.textbox.title")), 1),
        v(r, {
          label: M(o)("variable.textbox.defaultValue")
        }, {
          default: ce(() => [
            v(M(ft), {
              size: "small",
              value: e.config.defaultValue,
              onChange: a[0] || (a[0] = (l) => n("change", { defaultValue: l.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), VG = /* @__PURE__ */ ye({
  __name: "VariableForm",
  props: {
    draft: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t;
    jt();
    function o(i) {
      n("change", i);
    }
    return (i, a) => (ee(), Ze(M(vr), {
      layout: "vertical",
      class: "px-5 py-4 overflow-y-auto flex-1"
    }, {
      default: ce(() => [
        v(AG, {
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"]),
        a[0] || (a[0] = N("div", {
          class: "my-4",
          style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
        }, null, -1)),
        e.draft.config.type === "query" ? (ee(), Ze(FG, {
          key: 0,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : je("", !0),
        e.draft.config.type === "datasource" ? (ee(), Ze(kG, {
          key: 1,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : je("", !0),
        e.draft.config.type === "custom" ? (ee(), Ze(MG, {
          key: 2,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : je("", !0),
        e.draft.config.type === "textbox" ? (ee(), Ze(HG, {
          key: 3,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : je("", !0),
        e.draft.config.type === "constant" ? (ee(), Ze($G, {
          key: 4,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : je("", !0)
      ]),
      _: 1
    }));
  }
}), jG = {
  class: "w-45 flex flex-col h-full",
  style: { "border-right": "1px solid var(--ant-color-border-secondary)" }
}, WG = {
  class: "px-3 py-2 text-xs text-secondary",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, qG = { class: "flex-1 overflow-y-auto" }, GG = ["onClick"], KG = { key: 0 }, YG = {
  key: 1,
  class: "text-secondary"
}, UG = {
  class: "p-2",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, XG = /* @__PURE__ */ ye({
  __name: "VariableNavList",
  props: {
    drafts: {},
    selectedId: {}
  },
  emits: ["select", "add"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt();
    return (i, a) => (ee(), ge("div", jG, [
      N("div", WG, te(M(o)("variable.nav.count", { n: e.drafts.length })), 1),
      N("div", qG, [
        (ee(!0), ge(He, null, It(e.drafts, (r) => (ee(), ge("div", {
          key: r.id,
          class: ct(["px-3 py-2 cursor-pointer text-sm transition-colors", r.id === e.selectedId ? "bg-blue-50 dark:bg-blue-900/30 border-l-3 border-primary" : "border-l-3 border-transparent"]),
          onClick: (l) => n("select", r.id)
        }, [
          r.config.name ? (ee(), ge("span", KG, te(r.config.name), 1)) : (ee(), ge("span", YG, te(M(o)("variable.nav.unnamed")), 1))
        ], 10, GG))), 128))
      ]),
      N("div", UG, [
        v(M($t), {
          type: "dashed",
          block: "",
          onClick: a[0] || (a[0] = (r) => n("add"))
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(o)("variable.modal.add")), 1)
          ]),
          _: 1
        })
      ])
    ]));
  }
}), QG = { class: "flex flex-1 overflow-hidden" }, ZG = { class: "flex-1 overflow-hidden flex flex-col" }, JG = {
  key: 1,
  class: "flex-1 flex-center text-secondary text-sm"
}, eK = {
  class: "flex items-center justify-between px-4 py-3",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, tK = { class: "flex gap-2" }, nK = /* @__PURE__ */ ye({
  __name: "VariableConfigModal",
  props: {
    open: { type: Boolean }
  },
  emits: ["close"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = xs(), { t: a } = jt(), r = le([]), l = le(""), s = () => `new-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
    function u(b) {
      return {
        id: "",
        name: b,
        label: "",
        type: "custom",
        hide: !1,
        refresh: "onLoad",
        multi: !1,
        includeAll: !1,
        showOnDashboard: "label-and-value"
      };
    }
    Ie(
      () => n.open,
      (b) => {
        if (b) {
          const y = Object.values(i.variables).map((S) => ({
            id: S.config.id,
            isNew: !1,
            config: JSON.parse(JSON.stringify(S.config))
          }));
          r.value = y, l.value = y[0]?.id ?? "";
        }
      }
    );
    const c = R(
      () => r.value.find((b) => b.id === l.value) ?? null
    );
    function d() {
      const y = `variable_${r.value.length + 1}`, S = s(), C = {
        id: S,
        isNew: !0,
        config: u(y)
      };
      r.value = [...r.value, C], l.value = S;
    }
    function f() {
      if (!c.value)
        return;
      const b = r.value.findIndex((y) => y.id === l.value);
      r.value = r.value.filter((y) => y.id !== l.value), r.value.length > 0 ? l.value = r.value[Math.min(b, r.value.length - 1)].id : l.value = "";
    }
    function g(b) {
      c.value && (r.value = r.value.map(
        (y) => y.id === l.value ? { ...y, config: { ...y.config, ...b } } : y
      ));
    }
    function m() {
      const b = i.variables, y = new Set(r.value.map((C) => C.id)), S = new Set(Object.keys(b));
      for (const C of S)
        y.has(C) || i.removeVariable(C);
      for (const C of r.value) {
        const O = C.config;
        C.isNew || !S.has(C.id) ? i.addVariable(O) : i.updateVariable(C.id, O);
      }
      o("close");
    }
    return (b, y) => (ee(), Ze(M(po), {
      open: e.open,
      title: M(a)("variable.modal.title"),
      width: 780,
      footer: null,
      "body-style": { padding: 0, height: "480px", display: "flex", flexDirection: "column" },
      onCancel: y[2] || (y[2] = (S) => o("close"))
    }, {
      default: ce(() => [
        N("div", QG, [
          v(XG, {
            drafts: r.value,
            "selected-id": l.value,
            onSelect: y[0] || (y[0] = (S) => l.value = S),
            onAdd: d
          }, null, 8, ["drafts", "selected-id"]),
          N("div", ZG, [
            c.value ? (ee(), Ze(VG, {
              key: 0,
              draft: c.value,
              onChange: g
            }, null, 8, ["draft"])) : (ee(), ge("div", JG, te(M(a)("variable.modal.placeholder")), 1))
          ])
        ]),
        N("div", eK, [
          v(M($t), {
            danger: "",
            disabled: !c.value,
            onClick: f
          }, {
            default: ce(() => [
              Ee(te(M(a)("variable.modal.delete")), 1)
            ]),
            _: 1
          }, 8, ["disabled"]),
          N("div", tK, [
            v(M($t), {
              onClick: y[1] || (y[1] = (S) => o("close"))
            }, {
              default: ce(() => [
                Ee(te(M(a)("variable.modal.cancel")), 1)
              ]),
              _: 1
            }),
            v(M($t), {
              type: "primary",
              onClick: m
            }, {
              default: ce(() => [
                Ee(te(M(a)("variable.modal.save")), 1)
              ]),
              _: 1
            })
          ])
        ])
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), oK = {
  key: 0,
  class: "flex items-center gap-3 flex-wrap",
  style: { padding: "0 8px" }
}, iK = {
  key: 0,
  class: "flex items-center gap-1"
}, aK = {
  key: 1,
  class: "flex items-center gap-1"
}, rK = {
  key: 2,
  class: "flex items-center gap-1"
}, eO = /* @__PURE__ */ ye({
  __name: "VariableBar",
  setup(e) {
    const t = xs(), n = xa(), o = ja(), i = le(!1), a = R(
      () => Object.entries(t.variables).filter(([, s]) => !s.config.hide).map(([s, u]) => ({ id: s, ...u })).sort((s, u) => s.config.name.localeCompare(u.config.name))
    ), r = R(() => o.isDark ? "#888" : "#555");
    function l(s, u) {
      t.setValue(s, u);
      const c = t.variables[s];
      if (c) {
        const d = t.getDependents(c.config.name);
        for (const f of d)
          for (const [g, m] of Object.entries(t.variables))
            if (m.config.name === f) {
              t.refreshVariable(g);
              break;
            }
      }
    }
    return (s, u) => a.value.length > 0 || M(n).isEditing ? (ee(), ge("div", oK, [
      (ee(!0), ge(He, null, It(a.value, (c) => (ee(), ge(He, {
        key: c.id
      }, [
        c.config.type === "textbox" ? (ee(), ge("div", iK, [
          N("span", {
            class: "text-sm",
            style: xt({ color: r.value, whiteSpace: "nowrap" })
          }, te(c.config.label), 5),
          v(M(ft), {
            size: "small",
            style: { width: "160px" },
            value: Array.isArray(c.current) ? c.current[0] || "" : c.current,
            placeholder: "Enter value...",
            onChange: (d) => l(c.id, d.target.value)
          }, null, 8, ["value", "onChange"])
        ])) : c.config.type === "constant" ? (ee(), ge("div", aK, [
          c.config.label ? (ee(), ge("span", {
            key: 0,
            class: "text-sm",
            style: xt({ color: r.value, whiteSpace: "nowrap" })
          }, te(c.config.label), 5)) : je("", !0),
          v(M(Ui), { style: { margin: "0", "font-size": "12px" } }, {
            default: ce(() => [
              Ee(te(c.config.constantValue ?? ""), 1)
            ]),
            _: 2
          }, 1024)
        ])) : (ee(), ge("div", rK, [
          N("span", {
            class: "text-sm",
            style: xt({ color: r.value, whiteSpace: "nowrap" })
          }, te(c.config.label || c.config.name) + ": ", 5),
          v(M(bt), {
            value: c.current,
            mode: c.config.multi ? "multiple" : void 0,
            options: c.options.map((d) => ({ label: d.label === "$__all" ? "All" : d.label, value: d.value })),
            loading: c.loading,
            style: { minWidth: "120px" },
            size: "small",
            "show-search": "",
            "allow-clear": !c.config.multi,
            "filter-option": (d, f) => (f?.label ?? "").toLowerCase().includes(d.toLowerCase()),
            placeholder: `Select ${c.config.label}`,
            onChange: (d) => l(c.id, d)
          }, null, 8, ["value", "mode", "options", "loading", "allow-clear", "filter-option", "placeholder", "onChange"]),
          c.error ? (ee(), Ze(M(Ui), {
            key: 0,
            color: "red",
            style: { "font-size": "10px", margin: "0" }
          }, {
            default: ce(() => [
              Ee(te(c.error), 1)
            ]),
            _: 2
          }, 1024)) : je("", !0)
        ]))
      ], 64))), 128)),
      M(n).isEditing ? (ee(), Ze(M($t), {
        key: 0,
        size: "small",
        type: "text",
        class: "ml-auto",
        onClick: u[0] || (u[0] = (c) => i.value = !0)
      }, {
        default: ce(() => [
          N("span", {
            class: ct([M(ot).settings, "text-base"])
          }, null, 2)
        ]),
        _: 1
      })) : je("", !0),
      v(nK, {
        open: i.value,
        onClose: u[1] || (u[1] = (c) => i.value = !1)
      }, null, 8, ["open"])
    ])) : je("", !0);
  }
}), lK = /* @__PURE__ */ ye({
  __name: "DatasourceSelect",
  props: {
    value: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { config: o } = Uu(), i = R(() => {
      const l = [{ value: "mock", label: "Mock", type: "mock", uid: "" }], s = o.value.datasourceConfig ?? [];
      return s.filter((u) => u.type === "zabbix").forEach((u, c) => {
        const d = u.uid || String(c);
        l.push({ value: `zabbix:${d}`, label: `${u.name}`, type: "zabbix", uid: d });
      }), s.filter((u) => u.type === "argus").forEach((u, c) => {
        const d = u.uid || String(c);
        l.push({ value: `argus:${d}`, label: `${u.name}`, type: "argus", uid: d });
      }), l;
    }), a = R(
      () => i.value.map((l) => ({ value: l.value, label: l.label }))
    );
    function r(l) {
      const s = i.value.find((u) => u.value === l);
      s && n("change", s);
    }
    return (l, s) => (ee(), Ze(M(bt), {
      size: "small",
      style: { "min-width": "140px" },
      value: e.value,
      options: a.value,
      onChange: r
    }, null, 8, ["value", "options"]));
  }
}), sK = {
  key: 0,
  class: ""
}, uK = {
  key: 1,
  class: "pt-2 px-2 text-xs text-secondary"
}, cK = /* @__PURE__ */ ye({
  __name: "QueryEditorRow",
  props: {
    entry: {},
    index: {},
    isChart: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["update", "remove"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = R(() => "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n.index] ?? String(n.index + 1)), a = R(() => mg(n.entry.dataSource.type)), r = R(() => a.value?.QueryEditor ?? null), l = R(() => {
      const c = n.entry.dataSource;
      if (c.type === "mock")
        return "mock";
      const d = "datasourceId" in c ? c.datasourceId : "";
      return d ? `${c.type}:${d}` : c.type;
    });
    function s(c) {
      const d = mg(c.type);
      if (!d?.defaultQuery)
        return;
      const f = { ...d.defaultQuery(), ...c.uid ? { datasourceId: c.uid } : {} };
      o("update", { dataSource: f });
    }
    function u(c) {
      o("update", { dataSource: c });
    }
    return (c, d) => (ee(), Ze(M(Cr), {
      size: "small",
      collapsible: "icon",
      bordered: !0,
      "default-active-key": [e.entry.id]
    }, {
      default: ce(() => [
        (ee(), Ze(M(Cr).Panel, {
          key: e.entry.id
        }, {
          header: ce(() => [
            N("div", {
              class: "flex items-center gap-2",
              onClick: d[3] || (d[3] = Ro(() => {
              }, ["stop"]))
            }, [
              v(M(Ui), {
                color: "blue",
                style: { "font-size": "12px", "font-weight": "600", margin: "0", "min-width": "24px", "text-align": "center", "line-height": "20px" }
              }, {
                default: ce(() => [
                  Ee(te(i.value), 1)
                ]),
                _: 1
              }),
              v(M(za), {
                size: "small",
                checked: e.entry.enabled,
                onChange: d[0] || (d[0] = (f) => o("update", { enabled: f })),
                onClick: d[1] || (d[1] = Ro(() => {
                }, ["stop"]))
              }, null, 8, ["checked"]),
              d[5] || (d[5] = N("div", { class: "flex-1" }, null, -1)),
              d[6] || (d[6] = N("span", { style: { "font-size": "11px", color: "var(--ant-color-text-secondary)" } }, "数据源", -1)),
              v(lK, {
                value: l.value,
                onClick: d[2] || (d[2] = Ro(() => {
                }, ["stop"])),
                onChange: s
              }, null, 8, ["value"])
            ])
          ]),
          extra: ce(() => [
            e.canDelete ? (ee(), Ze(M($t), {
              key: 0,
              type: "text",
              danger: "",
              size: "small",
              onClick: d[4] || (d[4] = Ro((f) => o("remove"), ["stop"]))
            }, {
              default: ce(() => [
                N("span", {
                  class: ct(M(ot).delete)
                }, null, 2)
              ]),
              _: 1
            })) : je("", !0)
          ]),
          default: ce(() => [
            e.entry.enabled && r.value ? (ee(), ge("div", sK, [
              (ee(), Ze(ew(r.value), {
                query: e.entry.dataSource,
                "datasource-id": "datasourceId" in e.entry.dataSource ? e.entry.dataSource.datasourceId : "",
                "is-chart": e.isChart,
                onChange: u
              }, null, 40, ["query", "datasource-id", "is-chart"]))
            ])) : e.entry.enabled && !r.value ? (ee(), ge("div", uK, " No query editor available for datasource type: " + te(e.entry.dataSource.type), 1)) : je("", !0)
          ]),
          _: 1
        }))
      ]),
      _: 1
    }, 8, ["default-active-key"]));
  }
}), dK = {
  class: "px-4 py-3 flex flex-col gap-2",
  style: { "min-width": "300px" }
}, fK = { class: "flex items-center gap-2" }, pK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, gK = { class: "flex items-center gap-2" }, hK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, vK = { class: "flex items-center gap-2" }, mK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, bK = {
  class: "text-xs",
  style: { color: "var(--ant-color-text-quaternary)" }
}, yK = { class: "flex items-center gap-2" }, xK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, wK = { class: "flex items-center gap-2" }, SK = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, q1 = 1e3, CK = /* @__PURE__ */ ye({
  __name: "QueryOptionsPanel",
  setup(e) {
    const { t } = jt(), { panel: n, onChange: o } = qs(), i = xa();
    function a(u) {
      return u >= 36e5 ? `${Math.round(u / 36e5)}h` : u >= 6e4 ? `${Math.round(u / 6e4)}m` : u >= 1e3 ? `${Math.round(u / 1e3)}s` : `${u}ms`;
    }
    function r(u) {
      const c = u.trim().match(/^(\d+(?:\.\d+)?)(ms|[smh])?$/i);
      if (!c)
        return;
      const d = Number.parseFloat(c[1]), f = (c[2] ?? "s").toLowerCase();
      return f === "ms" ? d : f === "s" ? d * 1e3 : f === "m" ? d * 6e4 : d * 36e5;
    }
    const l = R(() => {
      const u = n.value.queryOptions?.maxDataPoints ?? q1, c = i.timeRange, d = c.to - c.from;
      return Math.max(Math.ceil(d / u), 1e3);
    }), s = R(() => {
      const u = n.value.queryOptions?.minIntervalMs;
      return u != null ? a(u) : "";
    });
    return (u, c) => (ee(), ge("div", dK, [
      N("div", fK, [
        N("span", pK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.maxDataPoints")
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.maxDataPoints")), 1)
        ]),
        v(M(fo), {
          size: "small",
          style: { width: "100px" },
          min: 1,
          value: M(n).queryOptions?.maxDataPoints,
          placeholder: String(q1),
          onChange: c[0] || (c[0] = (d) => M(o)({ queryOptions: { ...M(n).queryOptions, maxDataPoints: d ?? void 0 } }))
        }, null, 8, ["value", "placeholder"])
      ]),
      N("div", gK, [
        N("span", hK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.minInterval")
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.minInterval")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          value: s.value,
          placeholder: M(t)("qb.queryOptions.minIntervalPlaceholder"),
          onChange: c[1] || (c[1] = (d) => {
            const f = d.target.value.trim();
            if (!f) {
              M(o)({ queryOptions: { ...M(n).queryOptions, minIntervalMs: void 0 } });
              return;
            }
            const g = r(f);
            g !== void 0 && M(o)({ queryOptions: { ...M(n).queryOptions, minIntervalMs: g } });
          })
        }, null, 8, ["value", "placeholder"])
      ]),
      N("div", vK, [
        N("span", mK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.interval")
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.interval")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          value: a(l.value),
          readonly: ""
        }, null, 8, ["value"]),
        N("span", bK, " = " + te(M(t)("qb.queryOptions.intervalHint")), 1)
      ]),
      N("div", yK, [
        N("span", xK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.relativeTime")
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.relativeTime")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: M(n).queryOptions?.relativeTime ?? "",
          onChange: c[2] || (c[2] = (d) => M(o)({ queryOptions: { ...M(n).queryOptions, relativeTime: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ]),
      N("div", wK, [
        N("span", SK, [
          v(M(xo), {
            title: M(t)("qb.queryOptions.timeShift")
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Ee(" " + te(M(t)("qb.queryOptions.timeShift")), 1)
        ]),
        v(M(ft), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: M(n).queryOptions?.timeShift ?? "",
          onChange: c[3] || (c[3] = (d) => M(o)({ queryOptions: { ...M(n).queryOptions, timeShift: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ])
    ]));
  }
}), $K = { class: "flex flex-col h-full" }, PK = {
  class: "flex items-center gap-2 px-3 py-1.5 flex-shrink-0 flex-wrap",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, OK = { class: "flex-1 overflow-y-auto px-3 py-2 flex flex-col gap-2" }, IK = {
  key: 0,
  class: "text-center text-secondary text-sm py-8"
}, MK = /* @__PURE__ */ ye({
  __name: "QueryEditorPane",
  setup(e) {
    const { t } = jt(), { panel: n, onChange: o } = qs(), i = R(() => ["timeseries", "bar", "histogram"].includes(n.value.type)), a = R(() => n.value.queries ?? []), r = le(!1), l = le("mock");
    function s(d, f) {
      o({ queries: a.value.map((g, m) => m === d ? { ...g, ...f } : g) });
    }
    function u(d) {
      o({ queries: a.value.filter((f, g) => g !== d) });
    }
    function c() {
      if (a.value.length >= 26)
        return;
      const d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[a.value.length] ?? String(a.value.length + 1), [f, g = ""] = l.value.split(":"), m = mg(f);
      if (!m?.defaultQuery)
        return;
      const b = {
        ...m.defaultQuery(),
        ...g ? { datasourceId: g } : {},
        // Non-chart types: each query = 1 series; seriesCount controlled by query count
        ...!i.value && "seriesCount" in m.defaultQuery() ? { seriesCount: 1 } : {}
      };
      o({
        queries: [...a.value, { id: d, enabled: !0, dataSource: b }]
      });
    }
    return (d, f) => (ee(), ge("div", $K, [
      N("div", PK, [
        v(eO),
        f[1] || (f[1] = N("div", { class: "flex-1" }, null, -1)),
        v(J2),
        v(M(nF), {
          type: "vertical",
          style: { margin: "0" }
        }),
        v(M(ha).Compact, null, {
          default: ce(() => [
            v(M($t), {
              type: "primary",
              disabled: a.value.length >= 26,
              onClick: c
            }, {
              default: ce(() => [
                N("span", {
                  class: ct([M(ot).plus, "mr-1"])
                }, null, 2),
                Ee(" " + te(M(t)("qb.addQuery")), 1)
              ]),
              _: 1
            }, 8, ["disabled"]),
            v(M(PN), {
              open: r.value,
              "onUpdate:open": f[0] || (f[0] = (g) => r.value = g),
              trigger: "click",
              placement: "bottomRight",
              "overlay-inner-style": { padding: 0, minWidth: "320px" }
            }, {
              content: ce(() => [
                v(CK)
              ]),
              default: ce(() => [
                v(M($t), { class: "text-12px cursor-pointer hover:op-90 active:op-80 underline" }, {
                  default: ce(() => [
                    Ee(te(M(t)("qb.queryOptions")) + " ", 1),
                    N("span", {
                      class: ct([M(ot).chevronDown, ""])
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["open"])
          ]),
          _: 1
        })
      ]),
      N("div", OK, [
        (ee(!0), ge(He, null, It(a.value, (g, m) => (ee(), Ze(cK, {
          key: g.id,
          entry: g,
          index: m,
          "is-chart": i.value,
          "can-delete": a.value.length > 1,
          onUpdate: (b) => s(m, b),
          onRemove: () => u(m)
        }, null, 8, ["entry", "index", "is-chart", "can-delete", "onUpdate", "onRemove"]))), 128)),
        a.value.length === 0 ? (ee(), ge("div", IK, ' No queries. Click "' + te(M(t)("qb.addQuery")) + '" to start. ', 1)) : je("", !0)
      ])
    ]));
  }
}), TK = { class: "w-full h-full" }, kK = { class: "w-full h-full" }, EK = /* @__PURE__ */ ye({
  __name: "PanelEditorLayout",
  setup(e) {
    const n = ja().isDark ? "#303030" : "#e8e8e8";
    return (o, i) => (ee(), Ze(M(H1), { style: { height: "100%" } }, {
      default: ce(() => [
        v(M(Zc), { "min-size": 200 }, {
          default: ce(() => [
            v(M(H1), {
              vertical: "",
              "default-sizes": [100, 200]
            }, {
              default: ce(() => [
                v(M(Zc), { "min-size": 100 }, {
                  default: ce(() => [
                    N("div", TK, [
                      v(SG)
                    ])
                  ]),
                  _: 1
                }),
                v(M(Zc), { "min-size": 60 }, {
                  default: ce(() => [
                    N("div", kK, [
                      v(MK)
                    ])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        v(M(Zc), {
          "preferred-size": "35%",
          "min-size": 200
        }, {
          default: ce(() => [
            N("div", {
              class: "w-full h-full overflow-y-auto",
              style: xt({ borderLeft: `1px solid ${M(n)}` })
            }, [
              v(Y9)
            ], 4)
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), _K = { class: "flex items-center gap-2" }, AK = { class: "font-medium text-sm" }, DK = { class: "flex justify-end gap-2 py-1" }, zK = /* @__PURE__ */ ye({
  __name: "PanelEditorModal",
  setup(e) {
    const t = xa(), { t: n } = jt(), o = le(null), i = le(null), a = R(() => {
      const m = t.editingPanelId;
      return m ? t.panels[m] : null;
    }), r = R(() => o.value ?? a.value), l = R(() => {
      const m = i.value?.data?.[0];
      return m ? m.fields.filter((b) => b.type === "number").map((b) => b.name) : [];
    }), s = R(() => {
      const m = i.value?.data?.[0];
      return m ? m.fields.map((b) => b.config?.displayNameFromDS ?? b.name) : [];
    });
    function u(m) {
      r.value && (o.value = { ...r.value, ...m });
    }
    function c() {
      o.value && t.editingPanelId && t.updatePanel(t.editingPanelId, o.value), o.value = null, t.setEditingPanel(null);
    }
    function d() {
      o.value = null, t.setEditingPanel(null);
    }
    Ie(() => t.editingPanelId, (m) => {
      m || (o.value = null);
    });
    const f = R(() => !!t.editingPanelId && !!a.value), g = le(!1);
    return Ie(f, (m) => {
      m && !g.value && setTimeout(() => {
        g.value = !0;
      }, 0);
    }), zV({
      panel: R(() => r.value),
      onChange: u,
      previewData: i,
      numericFieldNames: l,
      allFieldNames: s
    }), (m, b) => (ee(), Ze(M(mF), {
      open: f.value,
      closable: !0,
      mask: !1,
      placement: "right",
      width: "71vw",
      "body-style": { padding: 0 },
      "destroy-on-close": !1,
      onClose: d
    }, {
      title: ce(() => [
        N("div", _K, [
          N("span", AK, "Edit: " + te(r.value?.title ?? ""), 1)
        ])
      ]),
      footer: ce(() => [
        N("div", DK, [
          v(M($t), { onClick: d }, {
            default: ce(() => [
              Ee(te(M(n)("dashboard.cancel")), 1)
            ]),
            _: 1
          }),
          v(M($t), {
            type: "primary",
            onClick: c
          }, {
            default: ce(() => [
              Ee(te(M(n)("dashboard.save")), 1)
            ]),
            _: 1
          })
        ])
      ]),
      default: ce(() => [
        r.value && g.value ? (ee(), Ze(EK, { key: 0 })) : je("", !0)
      ]),
      _: 1
    }, 8, ["open"]));
  }
}), RK = {
  key: 0,
  class: "panel-container w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f] border border-[#e8e8e8] dark:border-[#303030]"
}, NK = { class: "flex items-center gap-2 min-w-0 lh-1 flex-1 text-[#666] dark:text-[#666]" }, BK = {
  key: 0,
  class: "drag-handle flex-shrink-0 cursor-grab"
}, FK = { class: "text-sm truncate text-[#141414] dark:text-[#d9d9d9]" }, LK = { class: "panel-actions flex items-center gap-10px lh-1 flex-shrink-0 text-[#444] dark:text-[#666]" }, HK = { class: "panel-content flex-1 overflow-hidden" }, VK = { class: "w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f]" }, jK = { class: "panel-content flex-1 overflow-hidden" }, WK = /* @__PURE__ */ ye({
  __name: "PanelContainer",
  props: {
    panelId: {},
    menuMode: { default: "inline" }
  },
  setup(e) {
    const t = e, n = xa(), o = ja(), { t: i } = jt(), a = le(!1), r = le(!1), l = R(() => n.panels[t.panelId]), s = R(() => o.isDark), u = R(() => s.value ? "#666" : "#bbb"), c = R(() => {
      const m = (b) => io("span", { class: b });
      return n.isEditing ? [
        { key: "edit", label: i("panel.menu.edit"), icon: () => m(ot.edit) },
        { key: "clone", label: i("panel.menu.clone"), icon: () => m(ot.clone) },
        { key: "fullscreen", label: i("panel.menu.fullscreen"), icon: () => m(ot.fullscreen) },
        { type: "divider" },
        { key: "remove", label: i("panel.menu.remove"), icon: () => m(ot.delete), danger: !0 }
      ] : [
        { key: "fullscreen", label: i("panel.menu.fullscreen"), icon: () => m(ot.fullscreen) }
      ];
    });
    function d(m) {
      switch (m) {
        case "edit":
          n.setEditingPanel(t.panelId);
          break;
        case "clone":
          n.clonePanel(t.panelId);
          break;
        case "remove":
          po.confirm({
            title: i("panel.remove.title", { title: l.value?.title ?? "" }),
            content: i("panel.remove.content"),
            okText: i("panel.remove.ok"),
            okButtonProps: { danger: !0 },
            onOk: () => n.removePanel(t.panelId)
          });
          break;
        case "fullscreen":
          a.value = !0;
          break;
      }
    }
    function f(m) {
      r.value = !1, d(String(m.key));
    }
    function g(m) {
      m.stopPropagation(), n.refreshPanel(t.panelId);
    }
    return (m, b) => (ee(), ge(He, null, [
      l.value && !a.value ? (ee(), ge("div", RK, [
        N("div", {
          class: "panel-header flex items-center px-3 py-2 flex-shrink-0 border-b border-[#e8e8e8] dark:border-[#303030]",
          onDblclick: b[6] || (b[6] = (y) => M(n).isEditing && M(n).setEditingPanel(t.panelId))
        }, [
          N("div", NK, [
            M(n).isEditing ? (ee(), ge("span", BK, [
              N("span", {
                class: ct(M(ot).dragVertical)
              }, null, 2)
            ])) : je("", !0),
            N("span", FK, te(l.value.title), 1),
            l.value.description ? (ee(), Ze(M(xo), {
              key: 1,
              title: l.value.description,
              placement: "bottom"
            }, {
              default: ce(() => [
                N("span", {
                  class: ct([M(ot).info, "flex-shrink-0"])
                }, null, 2)
              ]),
              _: 1
            }, 8, ["title"])) : je("", !0),
            v(X2, {
              links: l.value.links ?? [],
              "icon-color": u.value
            }, null, 8, ["links", "icon-color"])
          ]),
          N("div", LK, [
            v(M(xo), {
              title: M(i)("panel.menu.refresh")
            }, {
              default: ce(() => [
                N("span", {
                  class: ct([M(ot).refresh, "panel-refresh-btn cursor-pointer"]),
                  onMousedown: b[0] || (b[0] = Ro(() => {
                  }, ["stop"])),
                  onClick: g
                }, null, 34)
              ]),
              _: 1
            }, 8, ["title"]),
            t.menuMode === "inline" ? (ee(), ge(He, { key: 0 }, [
              M(n).isEditing ? (ee(), Ze(M(xo), {
                key: 0,
                title: M(i)("panel.menu.edit")
              }, {
                default: ce(() => [
                  N("span", {
                    class: ct([M(ot).edit, "cursor-pointer"]),
                    onClick: b[1] || (b[1] = (y) => d("edit"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : je("", !0),
              M(n).isEditing ? (ee(), Ze(M(xo), {
                key: 1,
                title: M(i)("panel.menu.clone")
              }, {
                default: ce(() => [
                  N("span", {
                    class: ct([M(ot).clone, "cursor-pointer"]),
                    onClick: b[2] || (b[2] = (y) => d("clone"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : je("", !0),
              M(n).isEditing ? (ee(), Ze(M(xo), {
                key: 2,
                title: M(i)("panel.menu.remove")
              }, {
                default: ce(() => [
                  N("span", {
                    class: ct([M(ot).delete, "cursor-pointer text-red-500"]),
                    onClick: b[3] || (b[3] = (y) => d("remove"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : je("", !0)
            ], 64)) : (ee(), Ze(M(Yi), {
              key: 1,
              open: r.value,
              "onUpdate:open": b[5] || (b[5] = (y) => r.value = y),
              trigger: "click"
            }, {
              overlay: ce(() => [
                v(M(lo), {
                  items: c.value,
                  onClick: f
                }, null, 8, ["items"])
              ]),
              default: ce(() => [
                N("span", {
                  class: "cursor-pointer p-[2px_4px]",
                  onClick: b[4] || (b[4] = Ro(() => {
                  }, ["prevent"]))
                }, [
                  N("span", {
                    class: ct(M(ot).dotsVertical)
                  }, null, 2)
                ])
              ]),
              _: 1
            }, 8, ["open"]))
          ])
        ], 32),
        N("div", HK, [
          Va(m.$slots, "default", {}, void 0, !0)
        ])
      ])) : je("", !0),
      a.value ? (ee(), Ze(M(po), {
        key: 1,
        open: !0,
        title: l.value?.title,
        footer: null,
        width: "92vw",
        "body-style": { height: "82vh", padding: 0 },
        closable: !1,
        onCancel: b[7] || (b[7] = (y) => a.value = !1)
      }, {
        default: ce(() => [
          N("div", VK, [
            N("div", jK, [
              Va(m.$slots, "default", {}, void 0, !0)
            ])
          ])
        ]),
        _: 3
      }, 8, ["title"])) : je("", !0)
    ], 64));
  }
}), G1 = /* @__PURE__ */ Ko(WK, [["__scopeId", "data-v-2c616ca4"]]), qK = { class: "font-medium text-sm" }, GK = { class: "text-xs text-secondary mt-1" }, KK = /* @__PURE__ */ ye({
  __name: "AddPanelModal",
  setup(e) {
    const t = xa(), { t: n } = jt(), o = [
      { type: "timeseries", icon: ot.chartLine, descKey: "panel.type.desc.timeseries" },
      { type: "bar", icon: ot.chartBar, descKey: "panel.type.desc.bar" },
      { type: "histogram", icon: ot.chartArea, descKey: "panel.type.desc.histogram" },
      { type: "stat", icon: ot.stat, descKey: "panel.type.desc.stat" },
      { type: "gauge", icon: ot.gauge, descKey: "panel.type.desc.gauge" },
      { type: "table", icon: ot.table, descKey: "panel.type.desc.table" },
      { type: "pie", icon: ot.chartPie, descKey: "panel.type.desc.pie" }
    ];
    function i(a) {
      t.addPanel(a);
    }
    return (a, r) => (ee(), Ze(M(po), {
      open: M(t).addPanelModalOpen,
      title: M(n)("dashboard.addPanel"),
      footer: null,
      onCancel: r[0] || (r[0] = (l) => M(t).addPanelModalOpen = !1)
    }, {
      default: ce(() => [
        v(M(GL), {
          gutter: [16, 16],
          class: "mt-4"
        }, {
          default: ce(() => [
            (ee(), ge(He, null, It(o, (l) => v(M(AB), {
              key: l.type,
              span: 8
            }, {
              default: ce(() => [
                v(M(ds), {
                  hoverable: "",
                  class: "text-center cursor-pointer",
                  onClick: (s) => i(l.type)
                }, {
                  default: ce(() => [
                    N("div", {
                      class: ct(["text-2xl mb-2", l.icon])
                    }, null, 2),
                    N("div", qK, te(M(n)(`config.type.${l.type}`)), 1),
                    N("div", GK, te(M(n)(l.descKey)), 1)
                  ]),
                  _: 2
                }, 1032, ["onClick"])
              ]),
              _: 2
            }, 1024)), 64))
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), YK = { style: { display: "flex", "align-items": "center", "flex-wrap": "wrap", gap: "8px", padding: "0 4px" } }, UK = { class: "" }, XK = { style: { margin: "0" } }, QK = { style: { margin: "0" } }, ZK = /* @__PURE__ */ ye({
  __name: "DashboardHeader",
  setup(e) {
    const t = xa(), { t: n } = jt(), { config: o } = Uu(), { message: i } = ps.useApp(), a = le(!1), r = le(!1), l = le(null);
    function s() {
      t.confirmSave(o.value.onSave);
    }
    function u() {
      t.isDirty ? a.value = !0 : t.discardChanges();
    }
    function c() {
      a.value = !1, t.discardChanges();
    }
    function d() {
      const C = t.exportJSON(), O = new Blob([C], { type: "application/json" }), $ = URL.createObjectURL(O), P = document.createElement("a");
      P.href = $, P.download = "dashboard.json", P.click(), URL.revokeObjectURL($), i.success(n("dashboard.exportSuccess"));
    }
    function f() {
      l.value?.click();
    }
    function g(C) {
      const O = C.target.files?.[0];
      O && (O.text().then(($) => {
        t.importJSON($) ? i.success(n("dashboard.importSuccess")) : i.error(n("dashboard.importError"));
      }), C.target.value = "");
    }
    function m(C) {
      t.importJSON(C) ? i.success(n("dashboard.importSuccess")) : i.error(n("dashboard.importError"));
    }
    const b = R(() => {
      const C = sI(), O = (o.value.presets ?? []).map(($) => ({ label: $.label, value: $.config }));
      return [{ label: "内置模板", value: C }, ...O];
    }), y = R(() => [
      { key: "export", label: n("dashboard.export"), icon: ot.export },
      { key: "import", label: n("dashboard.import"), icon: ot.import },
      { type: "divider" },
      { key: "clear", label: n("dashboard.clearPanels"), icon: ot.delete, danger: !0 }
    ]);
    function S(C) {
      C === "export" ? d() : C === "import" ? f() : C === "clear" && (r.value = !0);
    }
    return (C, O) => (ee(), ge("div", YK, [
      M(t).isEditing ? (ee(), ge(He, { key: 0 }, [
        v(M(ha).Compact, null, {
          default: ce(() => [
            v(M($t), {
              onClick: O[0] || (O[0] = ($) => M(t).addPanelModalOpen = !0)
            }, {
              default: ce(() => [
                N("span", {
                  class: ct([M(ot).plus, "mr-1"])
                }, null, 2),
                Ee(" " + te(M(n)("dashboard.addPanel")), 1)
              ]),
              _: 1
            }),
            v(M(bt), {
              placeholder: "预设",
              "popup-match-select-width": !1,
              options: b.value,
              style: { "min-width": "80px" },
              onSelect: O[1] || (O[1] = ($) => m($))
            }, null, 8, ["options"]),
            N("input", {
              ref_key: "fileInputRef",
              ref: l,
              type: "file",
              accept: ".json",
              style: { display: "none" },
              onChange: g
            }, null, 544),
            v(M(Yi), { trigger: ["click"] }, {
              overlay: ce(() => [
                v(M(lo), {
                  onClick: O[2] || (O[2] = ({ key: $ }) => S($))
                }, {
                  default: ce(() => [
                    (ee(!0), ge(He, null, It(y.value, ($) => (ee(), ge(He, {
                      key: $.key ?? $.type
                    }, [
                      $.type === "divider" ? (ee(), Ze(M(lo).Divider, { key: 0 })) : (ee(), Ze(M(lo).Item, {
                        key: $.key,
                        danger: $.danger
                      }, {
                        default: ce(() => [
                          N("span", {
                            class: ct([$.icon, "mr-1"])
                          }, null, 2),
                          Ee(te($.label), 1)
                        ]),
                        _: 2
                      }, 1032, ["danger"]))
                    ], 64))), 128))
                  ]),
                  _: 1
                })
              ]),
              default: ce(() => [
                v(M($t), null, {
                  default: ce(() => [
                    N("span", {
                      class: ct(M(ot).dotsVertical)
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        v(M($t), {
          type: "primary",
          ghost: "",
          onClick: s
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).save, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(n)("dashboard.save")), 1)
          ]),
          _: 1
        }),
        v(M($t), {
          danger: M(t).isDirty,
          onClick: u
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).cancel, "mr-1"])
            }, null, 2),
            Ee(" " + te(M(n)("dashboard.cancel")), 1)
          ]),
          _: 1
        }, 8, ["danger"])
      ], 64)) : (ee(), Ze(M($t), {
        key: 1,
        onClick: M(t).startEditing
      }, {
        default: ce(() => [
          N("span", {
            class: ct([M(ot).edit, "mr-1"])
          }, null, 2),
          N("span", UK, te(M(n)("dashboard.edit")), 1)
        ]),
        _: 1
      }, 8, ["onClick"])),
      v(M(po), {
        open: a.value,
        "onUpdate:open": O[3] || (O[3] = ($) => a.value = $),
        title: M(n)("dashboard.cancelConfirmTitle"),
        "ok-text": M(n)("dashboard.cancelConfirmOk"),
        "cancel-text": M(n)("dashboard.cancelConfirmCancel"),
        "ok-button-props": { danger: !0 },
        onOk: c,
        onCancel: O[4] || (O[4] = ($) => a.value = !1)
      }, {
        default: ce(() => [
          N("p", XK, te(M(n)("dashboard.cancelConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text", "cancel-text"]),
      v(M(po), {
        open: r.value,
        "onUpdate:open": O[5] || (O[5] = ($) => r.value = $),
        title: M(n)("dashboard.clearConfirmTitle"),
        "ok-text": M(n)("dashboard.clearConfirmOk"),
        "ok-button-props": { danger: !0 },
        onOk: O[6] || (O[6] = () => {
          M(t).clearPanels(), r.value = !1;
        }),
        onCancel: O[7] || (O[7] = ($) => r.value = !1)
      }, {
        default: ce(() => [
          N("p", QK, te(M(n)("dashboard.clearConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text"])
    ]));
  }
}), JK = { class: "w-full min-h-screen flex flex-col" }, eY = {
  key: 1,
  class: "p-2"
}, tY = {
  key: 1,
  class: "flex-center h-64"
}, nY = 30, pg = 8, oY = 768, iY = /* @__PURE__ */ ye({
  __name: "DashboardPage",
  setup(e) {
    const t = xa(), n = ja(), { config: o } = Uu(), i = R(() => o.value.canEdit !== !1), a = Pe([...t.layouts]);
    Ie(
      () => t.layouts,
      (m) => {
        const b = a.value;
        b.length === m.length && b.every(
          (y, S) => y.i === m[S].i && y.x === m[S].x && y.y === m[S].y && y.w === m[S].w && y.h === m[S].h
        ) || (a.value = [...m]);
      }
    );
    function r(m) {
      a.value = m, t.setLayouts(m);
    }
    const l = le(), s = le(0), u = R(() => s.value > 0 && s.value < oY);
    let c = null;
    Pt(() => {
      l.value && (c = new ResizeObserver((m) => {
        s.value = m[0].contentRect.width;
      }), c.observe(l.value), s.value = l.value.getBoundingClientRect().width);
    }), Bo(() => {
      c?.disconnect();
    });
    let d = null;
    function f() {
      g(), t.autoRefresh > 0 && (d = setInterval(() => {
        t.refresh();
      }, t.autoRefresh * 1e3));
    }
    function g() {
      d && (clearInterval(d), d = null);
    }
    return Ie(() => t.autoRefresh, f), (m, b) => (ee(), ge("div", JK, [
      N("div", {
        class: "flex items-center gap-2 flex-wrap px-2 sticky top-0 z-10",
        style: xt({
          background: M(n).isDark ? "#1a1a1a" : "#f5f5f5",
          border: `1px solid ${M(n).isDark ? "#303030" : "#e8e8e8"}`,
          height: "42px"
        })
      }, [
        v(eO),
        b[0] || (b[0] = N("div", { class: "flex-1" }, null, -1)),
        v(J2),
        i.value ? (ee(), Ze(ZK, { key: 0 })) : je("", !0)
      ], 4),
      N("div", {
        ref_key: "containerRef",
        ref: l,
        class: "flex-1 overflow-auto"
      }, [
        u.value ? (ee(), ge("div", {
          key: 0,
          class: "flex flex-col",
          style: xt({ gap: `${pg}px`, padding: "8px" })
        }, [
          (ee(!0), ge(He, null, It(Object.keys(M(t).panels), (y) => (ee(), ge("div", { key: y }, [
            v(G1, { "panel-id": y }, {
              default: ce(() => [
                v(Vh, { "panel-id": y }, null, 8, ["panel-id"])
              ]),
              _: 2
            }, 1032, ["panel-id"])
          ]))), 128))
        ], 4)) : (ee(), ge("div", eY, [
          s.value > 0 ? (ee(), Ze(M(DV), {
            key: 0,
            layout: a.value,
            "col-num": 12,
            "row-height": nY,
            margin: [pg, pg],
            "is-draggable": i.value && M(t).isEditing,
            "is-resizable": i.value && M(t).isEditing,
            "vertical-compact": !0,
            onLayoutUpdated: r
          }, {
            item: ce(({ item: y }) => [
              v(G1, {
                "panel-id": String(y.i)
              }, {
                default: ce(() => [
                  v(Vh, {
                    "panel-id": String(y.i)
                  }, null, 8, ["panel-id"])
                ]),
                _: 2
              }, 1032, ["panel-id"])
            ]),
            _: 1
          }, 8, ["layout", "margin", "is-draggable", "is-resizable"])) : je("", !0),
          Object.keys(M(t).panels).length === 0 ? (ee(), ge("div", tY, [...b[1] || (b[1] = [
            N("div", { class: "text-center text-secondary" }, [
              N("div", { class: "text-4xl mb-4" }, " 📊 "),
              N("div", null, "No panels yet"),
              N("div", { class: "text-sm mt-2" }, ' Click "Edit" then "Add Panel" to get started ')
            ], -1)
          ])])) : je("", !0)
        ]))
      ], 512),
      v(KK),
      v(zK)
    ]));
  }
}), aY = { class: "flex justify-between items-center gap-2" }, rY = { style: { "font-size": "12px" } }, lY = { style: { "font-size": "10px", color: "var(--ant-color-text-quaternary)" } }, gg = /* @__PURE__ */ ye({
  __name: "ArgusGroupBy",
  props: {
    groupBy: {},
    cfg: {},
    signal: {},
    metricName: {},
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = le(""), a = le([]), r = le(!1), l = le(!1);
    let s = null;
    Ie(
      [i, l, () => n.cfg?.url, () => n.cfg?.token, () => n.signal, () => n.metricName],
      () => {
        !n.cfg || !l.value || (s && clearTimeout(s), s = setTimeout(async () => {
          r.value = !0;
          try {
            const f = new Set(n.groupBy.map((m) => m.name)), g = await MO(n.cfg, {
              signal: n.signal,
              metricName: n.metricName,
              search: i.value
            });
            a.value = g.filter((m) => !f.has(m.name));
          } catch {
            a.value = [];
          } finally {
            r.value = !1;
          }
        }, 300));
      }
    );
    const u = R(() => n.groupBy.map((f) => f.name));
    function c(f) {
      const m = (Array.isArray(f) ? f : [f]).map((b) => {
        const y = a.value.find((C) => C.name === b), S = n.groupBy.find((C) => C.name === b);
        return y ?? S ?? { name: b, fieldDataType: "string", fieldContext: "tag" };
      });
      o("change", m);
    }
    const d = R(() => r.value ? io(Ao, { size: "small" }) : null);
    return (f, g) => (ee(), Ze(M(bt), {
      mode: "tags",
      size: "small",
      style: { flex: "1", "min-width": "160px" },
      placeholder: "不分组（全量汇总）",
      value: u.value,
      disabled: e.disabled,
      "filter-option": !1,
      "not-found-content": d.value,
      onSearch: g[0] || (g[0] = (m) => i.value = m),
      onFocus: g[1] || (g[1] = () => l.value = !0),
      onBlur: g[2] || (g[2] = () => {
        l.value = !1, i.value = "";
      }),
      onChange: c
    }, {
      default: ce(() => [
        (ee(!0), ge(He, null, It(a.value, (m) => (ee(), Ze(M(bt).Option, {
          key: m.name,
          value: m.name
        }, {
          default: ce(() => [
            N("div", aY, [
              N("span", rY, te(m.name), 1),
              N("span", lY, te([m.fieldContext, m.fieldDataType].filter(Boolean).join(" · ")), 1)
            ])
          ]),
          _: 2
        }, 1032, ["value"]))), 128))
      ]),
      _: 1
    }, 8, ["value", "disabled", "not-found-content"]));
  }
}), sY = { class: "flex flex-wrap gap-1 items-center" }, uY = { class: "font-medium" }, K1 = /* @__PURE__ */ ye({
  __name: "ArgusQueryFunctions",
  props: {
    functions: {},
    signal: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = [
      { value: "cutOffMin", label: "Cut Off Min" },
      { value: "cutOffMax", label: "Cut Off Max" },
      { value: "clampMin", label: "Clamp Min" },
      { value: "clampMax", label: "Clamp Max" },
      { value: "absolute", label: "Absolute" },
      { value: "runningDiff", label: "Running Diff" },
      { value: "log2", label: "Log2" },
      { value: "log10", label: "Log10" },
      { value: "cumulativeSum", label: "Cumulative Sum" },
      { value: "ewma3", label: "EWMA 3" },
      { value: "ewma5", label: "EWMA 5" },
      { value: "ewma7", label: "EWMA 7" },
      { value: "median3", label: "Median 3" },
      { value: "median5", label: "Median 5" },
      { value: "median7", label: "Median 7" },
      { value: "timeShift", label: "Time Shift" },
      { value: "fillZero", label: "Fill Zero" }
    ], a = [{ value: "timeShift", label: "Time Shift" }], r = {
      cutOffMin: { showInput: !0, placeholder: "阈值" },
      cutOffMax: { showInput: !0, placeholder: "阈值" },
      clampMin: { showInput: !0, placeholder: "阈值" },
      clampMax: { showInput: !0, placeholder: "阈值" },
      absolute: { showInput: !1 },
      runningDiff: { showInput: !1 },
      log2: { showInput: !1 },
      log10: { showInput: !1 },
      cumulativeSum: { showInput: !1 },
      ewma3: { showInput: !0, placeholder: "Alpha" },
      ewma5: { showInput: !0, placeholder: "Alpha" },
      ewma7: { showInput: !0, placeholder: "Alpha" },
      median3: { showInput: !1 },
      median5: { showInput: !1 },
      median7: { showInput: !1 },
      timeShift: { showInput: !0, placeholder: "如 -1h" },
      fillZero: { showInput: !1 }
    }, l = R(
      () => n.signal === "logs" || n.signal === "traces" ? a : i
    );
    function s(d) {
      const f = r[d];
      o("change", [...n.functions, { name: d, args: f?.showInput ? [{ value: "" }] : [] }]);
    }
    function u(d) {
      o("change", n.functions.filter((f, g) => g !== d));
    }
    function c(d, f) {
      o("change", n.functions.map((g, m) => m === d ? { ...g, args: [{ value: f }] } : g));
    }
    return (d, f) => (ee(), ge("div", sY, [
      (ee(!0), ge(He, null, It(e.functions, (g, m) => (ee(), ge("div", {
        key: m,
        class: "inline-flex items-center gap-1 rounded px-1.5",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        N("span", uY, te(g.name) + "(", 1),
        r[g.name]?.showInput ? (ee(), Ze(M(ft), {
          key: 0,
          class: "text-center",
          size: "small",
          bordered: !1,
          variant: "borderless",
          style: { width: "40px", padding: "0 2px", height: "20px" },
          placeholder: r[g.name]?.placeholder ?? "value",
          value: g.args[0]?.value ?? "",
          onChange: (b) => c(m, b.target.value)
        }, null, 8, ["placeholder", "value", "onChange"])) : je("", !0),
        f[1] || (f[1] = N("span", null, ")", -1)),
        v(M($t), {
          class: "p-0!",
          type: "link",
          size: "small",
          danger: "",
          onClick: (b) => u(m)
        }, {
          default: ce(() => [
            N("span", {
              class: ct(M(ot).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      v(M(Yi), { trigger: "click" }, {
        overlay: ce(() => [
          v(M(lo), {
            onClick: f[0] || (f[0] = ({ key: g }) => s(String(g)))
          }, {
            default: ce(() => [
              (ee(!0), ge(He, null, It(l.value, (g) => (ee(), Ze(M(lo).Item, {
                key: g.value
              }, {
                default: ce(() => [
                  Ee(te(g.label), 1)
                ]),
                _: 2
              }, 1024))), 128))
            ]),
            _: 1
          })
        ]),
        default: ce(() => [
          v(M($t), {
            size: "small",
            type: "dashed"
          }, {
            default: ce(() => [
              N("span", {
                class: ct([M(ot).plus, "mr-0.5"])
              }, null, 2),
              f[2] || (f[2] = Ee("函数 ", -1))
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), cY = {
  class: "bg-white p-2",
  style: { border: "1px solid #eee", "border-radius": "6px", "margin-bottom": "6px" }
}, dY = { class: "flex items-center gap-1 select-none" }, fY = { class: "flex gap-2 ml-1" }, pY = {
  key: 0,
  style: { "border-top": "1px solid var(--ant-color-border)" }
}, gY = {
  key: 0,
  class: "flex flex-col gap-2 p-2"
}, hY = { class: "flex flex-col gap-0.5" }, vY = { class: "flex items-center gap-1.5" }, mY = { class: "flex flex-col gap-0.5" }, bY = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, yY = { class: "flex flex-col gap-0.5" }, xY = { class: "flex flex-col gap-0.5" }, wY = { class: "flex flex-col gap-0.5" }, SY = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, CY = { class: "flex flex-col gap-0.5" }, $Y = { class: "flex items-center gap-1" }, PY = { class: "flex flex-col gap-0.5" }, OY = { class: "flex items-center gap-1" }, IY = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, MY = { class: "flex flex-col gap-0.5" }, TY = { class: "flex flex-col gap-0.5" }, kY = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, EY = { class: "flex flex-col gap-0.5" }, _Y = { class: "flex flex-col gap-0.5" }, AY = {
  key: 1,
  class: "flex flex-col gap-2 p-2"
}, DY = { class: "flex flex-col gap-0.5" }, zY = { class: "flex flex-col gap-0.5" }, RY = { class: "flex flex-col gap-1" }, NY = { class: "flex flex-col gap-0.5" }, BY = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, FY = { class: "flex flex-col gap-0.5" }, LY = { class: "flex flex-col gap-0.5" }, HY = { class: "flex flex-col gap-0.5" }, VY = {
  key: 2,
  class: "flex flex-col gap-1.5 p-2"
}, jY = { class: "flex items-center gap-1.5" }, WY = {
  key: 3,
  class: "flex flex-col gap-2 p-2"
}, qY = { class: "flex flex-col gap-0.5" }, GY = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, KY = { class: "flex flex-col gap-0.5" }, YY = { class: "flex flex-col gap-0.5" }, UY = /* @__PURE__ */ ye({
  __name: "QueryItemRow",
  props: {
    item: {},
    cfg: {},
    collapsed: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["toggleCollapse", "toggleDisabled", "delete", "change"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = R(() => n.item.type === "builder_formula"), a = R(() => n.item.spec.disabled), r = R(() => n.item.spec.name), l = le(
      n.item.type === "builder_query" ? n.item.queryType ?? "builder" : "builder"
    ), s = [
      { label: "查询构建器", value: "builder" },
      { label: "PromQL", value: "promql" },
      { label: "ClickHouse SQL", value: "clickhouse_sql" }
    ], u = [
      { value: "metrics", label: "指标" },
      { value: "logs", label: "日志" },
      { value: "traces", label: "链路" }
    ];
    function c(H) {
      o("change", H);
    }
    function d(H) {
      if (n.item.type !== "builder_query")
        return;
      const F = H === "metrics" ? [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }] : [{ expression: "count()" }];
      c({ ...n.item, spec: { ...n.item.spec, signal: H, aggregations: F } });
    }
    function f(H) {
      n.item.type === "builder_query" && (l.value = H, c({ ...n.item, queryType: H }));
    }
    const g = le([]), m = le(!1);
    Ie(
      [() => n.cfg?.url, () => n.cfg?.token],
      async ([H, F]) => {
        m.value = !0;
        try {
          g.value = await IO({ url: H ?? "", token: F ?? "" });
        } catch {
          g.value = [];
        } finally {
          m.value = !1;
        }
      },
      { immediate: !0 }
    );
    const b = R(
      () => n.item.type === "builder_query" ? n.item.spec : null
    ), y = R(
      () => b.value?.aggregations?.[0] ?? { metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }
    ), S = R(
      () => y.value.metricType === "histogram" || y.value.metricType === "exponential_histogram"
    ), C = R(
      () => S.value ? [{ value: "p50", label: "P50" }, { value: "p75", label: "P75" }, { value: "p90", label: "P90" }, { value: "p95", label: "P95" }, { value: "p99", label: "P99" }] : [{ value: "sum", label: "Sum" }, { value: "avg", label: "Avg" }, { value: "min", label: "Min" }, { value: "max", label: "Max" }]
    ), O = R(() => S.value ? [] : y.value.metricType === "gauge" ? [{ value: "latest", label: "Latest" }, { value: "sum", label: "Sum" }, { value: "avg", label: "Avg" }, { value: "min", label: "Min" }, { value: "max", label: "Max" }, { value: "count", label: "Count" }, { value: "count_distinct", label: "Count Distinct" }] : [{ value: "increase", label: "Increase" }, { value: "rate", label: "Rate" }]);
    function $(H, F) {
      b.value && c({ ...n.item, spec: { ...b.value, [H]: F } });
    }
    function P(H) {
      b.value && $("aggregations", [{ ...y.value, ...H }]);
    }
    function k(H) {
      const A = g.value.find((U) => U.metricName === H)?.type ?? "";
      P({
        metricName: H,
        metricType: A,
        timeAggregation: A === "" ? "" : A === "gauge" ? "latest" : "rate",
        spaceAggregation: A === "histogram" || A === "exponential_histogram" ? "p99" : "sum"
      });
    }
    const x = R(
      () => b.value?.aggregations ?? []
    );
    function E() {
      b.value && $("aggregations", [...x.value, { expression: "count()" }]);
    }
    function z(H) {
      b.value && $("aggregations", x.value.filter((F, A) => A !== H));
    }
    function B(H, F) {
      b.value && $("aggregations", x.value.map((A, U) => U === H ? { expression: F } : A));
    }
    function D(H) {
      if (!H) {
        $("order", []);
        return;
      }
      const F = H.split(" "), A = F[F.length - 1], j = { key: { name: F.slice(0, -1).join(" ") }, direction: A };
      $("order", [j]);
    }
    function W(H) {
      n.item.type === "builder_formula" && o("change", { ...n.item, spec: { ...n.item.spec, ...H } });
    }
    return (H, F) => (ee(), ge("div", cY, [
      N("div", dY, [
        N("span", {
          class: "flex items-center gap-1.5 flex-1 cursor-pointer",
          onClick: F[2] || (F[2] = (A) => o("toggleCollapse"))
        }, [
          N("span", {
            class: ct([e.collapsed ? M(ot).chevronRight : M(ot).chevronDown, "text-16px"])
          }, null, 2),
          v(M(Ui), {
            color: i.value ? "purple" : "cyan",
            style: { margin: "0", "font-weight": "600", "font-size": "12px", "line-height": "18px", padding: "0 6px" }
          }, {
            default: ce(() => [
              Ee(te(r.value), 1)
            ]),
            _: 1
          }, 8, ["color"]),
          i.value ? je("", !0) : (ee(), ge(He, { key: 0 }, [
            N("div", fY, [
              (ee(), ge(He, null, It(s, (A) => v(M($t), {
                key: A.value,
                size: "small",
                type: l.value === A.value ? "primary" : "default",
                style: { "font-size": "12px", height: "22px" },
                onClick: Ro((U) => f(A.value), ["stop"])
              }, {
                default: ce(() => [
                  Ee(te(A.label), 1)
                ]),
                _: 2
              }, 1032, ["type", "onClick"])), 64))
            ]),
            l.value === "builder" ? (ee(), Ze(M(bt), {
              key: 0,
              size: "small",
              style: { width: "80px" },
              value: e.item.spec.signal,
              options: u,
              onClick: F[0] || (F[0] = Ro(() => {
              }, ["stop"])),
              onChange: F[1] || (F[1] = (A) => d(A))
            }, null, 8, ["value"])) : je("", !0),
            F[32] || (F[32] = N("div", { class: "flex-1" }, null, -1))
          ], 64))
        ]),
        v(M($t), {
          class: "p-0!",
          size: "small",
          type: "link",
          onClick: F[3] || (F[3] = Ro((A) => o("toggleDisabled"), ["stop"]))
        }, {
          default: ce(() => [
            N("span", {
              class: ct(a.value ? M(ot).viewOff : M(ot).view)
            }, null, 2)
          ]),
          _: 1
        }),
        v(M($t), {
          class: "p-0!",
          size: "small",
          type: "link",
          danger: "",
          disabled: !e.canDelete,
          onClick: F[4] || (F[4] = (A) => o("delete"))
        }, {
          default: ce(() => [
            N("span", {
              class: ct(M(ot).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled"])
      ]),
      e.collapsed ? je("", !0) : (ee(), ge("div", pY, [
        e.item.type === "builder_query" && l.value === "builder" && e.item.spec.signal === "metrics" && b.value ? (ee(), ge("div", gY, [
          N("div", hY, [
            F[33] || (F[33] = N("span", { class: "text-xs text-secondary" }, "指标名称", -1)),
            N("div", vY, [
              Ee(te(m.value) + " ", 1),
              v(M(bt), {
                "show-search": "",
                "allow-clear": "",
                loading: m.value,
                size: "small",
                style: { flex: "1" },
                placeholder: "指标名称",
                value: y.value.metricName || void 0,
                options: g.value.map((A) => ({
                  value: A.metricName,
                  label: A.metricName
                })),
                "filter-option": (A, U) => String(U?.value ?? "").toLowerCase().includes(A.toLowerCase()),
                onChange: F[5] || (F[5] = (A) => k(A)),
                onClear: F[6] || (F[6] = () => P({
                  metricName: "",
                  metricType: "",
                  timeAggregation: "rate",
                  spaceAggregation: "sum"
                }))
              }, null, 8, ["loading", "value", "options", "filter-option"]),
              y.value.metricType ? (ee(), Ze(M(Ui), {
                key: 0,
                style: { "font-size": "10px", margin: "0" }
              }, {
                default: ce(() => [
                  Ee(te(y.value.metricType), 1)
                ]),
                _: 1
              })) : je("", !0)
            ])
          ]),
          N("div", mY, [
            F[34] || (F[34] = N("span", { class: "text-xs text-secondary" }, "源数据筛选", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "如 host.name = 'my-host'",
              value: b.value.filter.expression,
              onChange: F[7] || (F[7] = (A) => $("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          S.value ? (ee(), ge(He, { key: 0 }, [
            N("div", bY, [
              N("div", yY, [
                F[35] || (F[35] = N("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                v(M(bt), {
                  size: "small",
                  value: y.value.spaceAggregation || void 0,
                  options: C.value,
                  disabled: !y.value.metricType,
                  onChange: F[8] || (F[8] = (A) => P({ spaceAggregation: A }))
                }, null, 8, ["value", "options", "disabled"])
              ]),
              N("div", xY, [
                F[36] || (F[36] = N("span", { class: "text-xs text-secondary" }, "分组", -1)),
                v(gg, {
                  "group-by": b.value.groupBy,
                  cfg: e.cfg,
                  signal: "metrics",
                  "metric-name": y.value.metricName,
                  disabled: !y.value.metricName,
                  onChange: F[9] || (F[9] = (A) => $("groupBy", A))
                }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
              ])
            ]),
            N("div", wY, [
              F[37] || (F[37] = N("span", { class: "text-xs text-secondary" }, "步长（秒）", -1)),
              v(M(fo), {
                size: "small",
                style: { width: "100%" },
                placeholder: "自动",
                value: b.value.stepInterval ?? void 0,
                min: 1,
                onChange: F[10] || (F[10] = (A) => $("stepInterval", A ?? null))
              }, null, 8, ["value"])
            ])
          ], 64)) : (ee(), ge(He, { key: 1 }, [
            N("div", SY, [
              N("div", CY, [
                F[40] || (F[40] = N("span", { class: "text-xs text-secondary" }, "时序内聚合", -1)),
                N("div", $Y, [
                  v(M(bt), {
                    size: "small",
                    style: { flex: "1" },
                    value: y.value.timeAggregation || void 0,
                    options: O.value,
                    disabled: !y.value.metricType,
                    onChange: F[11] || (F[11] = (A) => P({ timeAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  F[38] || (F[38] = N("span", { class: "text-xs text-secondary whitespace-nowrap" }, "每隔", -1)),
                  v(M(fo), {
                    size: "small",
                    style: { width: "60px" },
                    placeholder: "自动",
                    value: b.value.stepInterval ?? void 0,
                    min: 1,
                    onChange: F[12] || (F[12] = (A) => $("stepInterval", A ?? null))
                  }, null, 8, ["value"]),
                  F[39] || (F[39] = N("span", { class: "text-xs text-secondary" }, "秒", -1))
                ])
              ]),
              N("div", PY, [
                F[41] || (F[41] = N("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                N("div", OY, [
                  v(M(bt), {
                    size: "small",
                    style: { width: "80px" },
                    value: y.value.spaceAggregation || void 0,
                    options: C.value,
                    disabled: !y.value.metricType,
                    onChange: F[13] || (F[13] = (A) => P({ spaceAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  v(gg, {
                    "group-by": b.value.groupBy,
                    cfg: e.cfg,
                    signal: "metrics",
                    "metric-name": y.value.metricName,
                    disabled: !y.value.metricName,
                    onChange: F[14] || (F[14] = (A) => $("groupBy", A))
                  }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
                ])
              ])
            ]),
            N("div", IY, [
              N("div", MY, [
                F[42] || (F[42] = N("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
                v(M(ft), {
                  size: "small",
                  placeholder: "如 sum > 100",
                  value: b.value.having?.expression ?? "",
                  onChange: F[15] || (F[15] = (A) => $("having", { expression: A.target.value }))
                }, null, 8, ["value"])
              ]),
              N("div", TY, [
                F[43] || (F[43] = N("span", { class: "text-xs text-secondary" }, "条数", -1)),
                v(M(fo), {
                  size: "small",
                  style: { width: "80px" },
                  placeholder: "∞",
                  value: b.value.limit ?? void 0,
                  min: 1,
                  onChange: F[16] || (F[16] = (A) => $("limit", A ?? void 0))
                }, null, 8, ["value"])
              ])
            ]),
            N("div", kY, [
              N("div", EY, [
                F[44] || (F[44] = N("span", { class: "text-xs text-secondary" }, "排序", -1)),
                v(M(bt), {
                  size: "small",
                  "allow-clear": "",
                  placeholder: "字段 升序/降序",
                  value: b.value.order[0] ? `${b.value.order[0].key.name} ${b.value.order[0].direction}` : void 0,
                  options: [
                    { value: "value asc", label: "值 升序" },
                    { value: "value desc", label: "值 降序" }
                  ],
                  onChange: F[17] || (F[17] = (A) => D(A)),
                  onClear: F[18] || (F[18] = () => $("order", []))
                }, null, 8, ["value"])
              ]),
              N("div", _Y, [
                F[45] || (F[45] = N("span", { class: "text-xs text-secondary" }, "图例", -1)),
                v(M(ft), {
                  size: "small",
                  placeholder: "{{label}}",
                  value: b.value.legend,
                  onChange: F[19] || (F[19] = (A) => $("legend", A.target.value))
                }, null, 8, ["value"])
              ])
            ])
          ], 64)),
          v(K1, {
            functions: b.value.functions,
            signal: b.value.signal,
            onChange: F[20] || (F[20] = (A) => $("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value === "builder" && b.value ? (ee(), ge("div", AY, [
          N("div", DY, [
            F[46] || (F[46] = N("span", { class: "text-xs text-secondary" }, "过滤条件", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "过滤表达式",
              value: b.value.filter.expression,
              onChange: F[21] || (F[21] = (A) => $("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          N("div", zY, [
            F[49] || (F[49] = N("span", { class: "text-xs text-secondary" }, "聚合表达式", -1)),
            N("div", RY, [
              (ee(!0), ge(He, null, It(x.value, (A, U) => (ee(), ge("div", {
                key: U,
                class: "flex items-center gap-1"
              }, [
                v(M(ft), {
                  size: "small",
                  style: { flex: "1" },
                  placeholder: "如 count() / avg(body)",
                  value: A.expression,
                  onChange: (j) => B(U, j.target.value)
                }, null, 8, ["value", "onChange"]),
                x.value.length > 1 ? (ee(), Ze(M($t), {
                  key: 0,
                  size: "small",
                  type: "text",
                  danger: "",
                  onClick: (j) => z(U)
                }, {
                  default: ce(() => [...F[47] || (F[47] = [
                    Ee(" × ", -1)
                  ])]),
                  _: 1
                }, 8, ["onClick"])) : je("", !0)
              ]))), 128)),
              v(M($t), {
                size: "small",
                type: "dashed",
                style: { "align-self": "flex-start" },
                onClick: E
              }, {
                default: ce(() => [
                  N("span", {
                    class: ct([M(ot).plus, "mr-0.5"])
                  }, null, 2),
                  F[48] || (F[48] = Ee("添加聚合 ", -1))
                ]),
                _: 1
              })
            ])
          ]),
          N("div", NY, [
            F[50] || (F[50] = N("span", { class: "text-xs text-secondary" }, "分组", -1)),
            v(gg, {
              "group-by": b.value.groupBy,
              cfg: e.cfg,
              signal: b.value.signal,
              onChange: F[22] || (F[22] = (A) => $("groupBy", A))
            }, null, 8, ["group-by", "cfg", "signal"])
          ]),
          N("div", BY, [
            N("div", FY, [
              F[51] || (F[51] = N("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
              v(M(ft), {
                size: "small",
                placeholder: "如 count > 100",
                value: b.value.having?.expression ?? "",
                onChange: F[23] || (F[23] = (A) => $("having", { expression: A.target.value }))
              }, null, 8, ["value"])
            ]),
            N("div", LY, [
              F[52] || (F[52] = N("span", { class: "text-xs text-secondary" }, "条数", -1)),
              v(M(fo), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: b.value.limit ?? void 0,
                min: 1,
                onChange: F[24] || (F[24] = (A) => $("limit", A ?? void 0))
              }, null, 8, ["value"])
            ])
          ]),
          N("div", HY, [
            F[53] || (F[53] = N("span", { class: "text-xs text-secondary" }, "图例", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "{{label}}",
              value: b.value.legend,
              onChange: F[25] || (F[25] = (A) => $("legend", A.target.value))
            }, null, 8, ["value"])
          ]),
          v(K1, {
            functions: b.value.functions,
            signal: b.value.signal,
            onChange: F[26] || (F[26] = (A) => $("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value !== "builder" ? (ee(), ge("div", VY, [
          v(M(ft).TextArea, {
            rows: 4,
            placeholder: l.value === "promql" ? "输入 PromQL 查询语句…" : "输入 ClickHouse SQL 查询语句…",
            value: e.item.rawQuery ?? "",
            style: { "font-family": "monospace", "font-size": "12px" },
            onChange: F[27] || (F[27] = (A) => o("change", { ...e.item, rawQuery: A.target.value }))
          }, null, 8, ["placeholder", "value"]),
          N("div", jY, [
            F[54] || (F[54] = N("span", { class: "text-xs text-secondary whitespace-nowrap" }, "图例格式", -1)),
            v(M(ft), {
              size: "small",
              style: { flex: "1" },
              placeholder: "{{label}}",
              value: e.item.rawLegend ?? "",
              onChange: F[28] || (F[28] = (A) => o("change", { ...e.item, rawLegend: A.target.value }))
            }, null, 8, ["value"])
          ])
        ])) : e.item.type === "builder_formula" ? (ee(), ge("div", WY, [
          N("div", qY, [
            F[55] || (F[55] = N("span", { class: "text-xs text-secondary" }, "表达式", -1)),
            v(M(ft), {
              size: "small",
              placeholder: "如 A + B",
              value: e.item.spec.expression,
              onChange: F[29] || (F[29] = (A) => o("change", {
                ...e.item,
                spec: { ...e.item.spec, expression: A.target.value }
              }))
            }, null, 8, ["value"])
          ]),
          N("div", GY, [
            N("div", KY, [
              F[56] || (F[56] = N("span", { class: "text-xs text-secondary" }, "图例", -1)),
              v(M(ft), {
                size: "small",
                placeholder: "图例格式",
                value: e.item.spec.legend,
                onChange: F[30] || (F[30] = (A) => W({ legend: A.target.value }))
              }, null, 8, ["value"])
            ]),
            N("div", YY, [
              F[57] || (F[57] = N("span", { class: "text-xs text-secondary" }, "条数", -1)),
              v(M(fo), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: e.item.spec.limit ?? void 0,
                min: 1,
                onChange: F[31] || (F[31] = (A) => W({ limit: A ?? void 0 }))
              }, null, 8, ["value"])
            ])
          ])
        ])) : je("", !0)
      ]))
    ]));
  }
}), XY = { class: "flex flex-col gap-2 p-1" }, QY = {
  key: 0,
  class: "flex items-center gap-2 mb-1"
}, ZY = { class: "flex gap-1.5 mt-1" }, JY = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", eU = /* @__PURE__ */ ye({
  __name: "ArgusQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { config: i } = Uu(), a = R(
      () => (i.value.datasourceConfig ?? []).filter((S) => S.type === "argus")
    ), r = le(/* @__PURE__ */ new Set());
    function l(S) {
      return {
        name: S,
        signal: "metrics",
        stepInterval: null,
        disabled: !1,
        filter: { expression: "" },
        having: { expression: "" },
        groupBy: [],
        order: [],
        legend: "",
        functions: [],
        aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
      };
    }
    function s(S) {
      return { name: S, expression: "", disabled: !1, legend: "", order: [] };
    }
    function u(S, C) {
      o("change", { ...n.query, [S]: C });
    }
    function c() {
      const S = n.query.queries.filter(($) => $.type === "builder_query"), C = JY[S.length] ?? `Q${S.length}`, O = { type: "builder_query", spec: l(C) };
      o("change", { ...n.query, queries: [...n.query.queries, O] });
    }
    function d() {
      const C = `F${n.query.queries.filter(($) => $.type === "builder_formula").length + 1}`, O = { type: "builder_formula", spec: s(C) };
      o("change", { ...n.query, queries: [...n.query.queries, O] });
    }
    function f(S) {
      o("change", { ...n.query, queries: n.query.queries.filter((C) => C.spec.name !== S) });
    }
    function g(S) {
      o("change", {
        ...n.query,
        queries: n.query.queries.map((C) => C.spec.name === S.spec.name ? S : C)
      });
    }
    function m(S) {
      const C = new Set(r.value);
      C.has(S) ? C.delete(S) : C.add(S), r.value = C;
    }
    function b(S) {
      g({ ...S, spec: { ...S.spec, disabled: !S.spec.disabled } });
    }
    const y = R(() => {
      const S = (i.value.datasourceConfig ?? []).filter((O) => O.type === "argus");
      if (!S.length)
        return null;
      const C = S.find((O) => O.uid === n.datasourceId) ?? S.find((O) => O.default) ?? S[0];
      return { url: C.url, token: C.token };
    });
    return (S, C) => (ee(), ge("div", XY, [
      a.value.length > 1 ? (ee(), ge("div", QY, [
        C[1] || (C[1] = N("span", { class: "text-xs text-secondary whitespace-nowrap" }, "数据源", -1)),
        v(M(bt), {
          size: "small",
          style: { width: "180px" },
          value: e.query.datasourceId,
          options: a.value.map((O) => ({ value: O.uid, label: O.name })),
          onChange: C[0] || (C[0] = (O) => u("datasourceId", O))
        }, null, 8, ["value", "options"])
      ])) : je("", !0),
      (ee(!0), ge(He, null, It(e.query.queries, (O) => (ee(), Ze(UY, {
        key: O.spec.name,
        item: O,
        cfg: y.value,
        collapsed: r.value.has(O.spec.name),
        "can-delete": e.query.queries.length > 1,
        onToggleCollapse: () => m(O.spec.name),
        onToggleDisabled: () => b(O),
        onDelete: () => f(O.spec.name),
        onChange: g
      }, null, 8, ["item", "cfg", "collapsed", "can-delete", "onToggleCollapse", "onToggleDisabled", "onDelete"]))), 128)),
      N("div", ZY, [
        v(M($t), {
          size: "small",
          type: "dashed",
          onClick: c
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            C[2] || (C[2] = Ee("基础查询 ", -1))
          ]),
          _: 1
        }),
        v(M($t), {
          size: "small",
          type: "dashed",
          onClick: d
        }, {
          default: ce(() => [
            N("span", {
              class: ct([M(ot).plus, "mr-1"])
            }, null, 2),
            C[3] || (C[3] = Ee("衍生算式 ", -1))
          ]),
          _: 1
        })
      ])
    ]));
  }
}), tU = { style: { "padding-top": "6px" } }, nU = { class: "inline-flex items-center gap-1.5 mb-2" }, oU = { class: "text-xs text-secondary" }, iU = {
  key: 0,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, aU = { class: "text-xs text-secondary" }, rU = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, lU = { class: "text-xs text-secondary" }, sU = {
  class: "text-xs text-secondary",
  style: { "min-width": "28px" }
}, uU = /* @__PURE__ */ ye({
  __name: "MockQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = jt(), i = R(() => [
      { value: "sine", label: o("qb.pattern.sine") },
      { value: "spike", label: o("qb.pattern.spike") },
      { value: "step", label: o("qb.pattern.step") },
      { value: "sawtooth", label: o("qb.pattern.sawtooth") },
      { value: "noise", label: o("qb.pattern.noise") },
      { value: "trend-up", label: o("qb.pattern.trendUp") },
      { value: "trend-down", label: o("qb.pattern.trendDown") },
      { value: "plateau", label: o("qb.pattern.plateau") },
      { value: "random-walk", label: o("qb.pattern.randomWalk") },
      { value: "live", label: o("qb.pattern.live") }
    ]);
    return (a, r) => (ee(), ge("div", tU, [
      N("div", nU, [
        N("span", oU, te(M(o)("qb.pattern")), 1),
        v(M(bt), {
          size: "small",
          style: { width: "140px" },
          value: e.query.pattern,
          options: i.value,
          onChange: r[0] || (r[0] = (l) => n("change", { ...e.query, pattern: l }))
        }, null, 8, ["value", "options"])
      ]),
      e.isChart ? (ee(), ge("div", iU, [
        N("span", aU, te(M(o)("qb.seriesCount")), 1),
        v(M(Wo), {
          min: 1,
          max: 8,
          value: e.query.seriesCount ?? 1,
          style: { width: "200px" },
          onChange: r[1] || (r[1] = (l) => n("change", { ...e.query, seriesCount: l }))
        }, null, 8, ["value"])
      ])) : je("", !0),
      e.query.pattern === "live" ? (ee(), ge("div", rU, [
        N("span", lU, te(M(o)("qb.liveAmplitude")), 1),
        v(M(Wo), {
          min: 0.1,
          max: 5,
          step: 0.1,
          value: e.query.liveAmplitude ?? 1,
          style: { width: "160px" },
          onChange: r[2] || (r[2] = (l) => n("change", { ...e.query, liveAmplitude: l }))
        }, null, 8, ["value"]),
        N("span", sU, te((e.query.liveAmplitude ?? 1).toFixed(1)) + "x ", 1)
      ])) : je("", !0)
    ]));
  }
}), Qr = /* @__PURE__ */ ye({
  __name: "ComboSelect",
  props: {
    value: {},
    displayValue: {},
    placeholder: {},
    groups: {},
    allowCustom: { type: Boolean, default: !0 },
    loading: { type: Boolean, default: !1 },
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["change", "clear"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = le(n.displayValue ?? n.value ?? "");
    Ie(
      [() => n.value, () => n.displayValue],
      ([s, u]) => {
        i.value = u ?? s ?? "";
      }
    );
    function a(s, u) {
      return s.toLowerCase().includes(u.toLowerCase());
    }
    const r = R(() => {
      const s = i.value, u = n.groups.flatMap((f) => f.options), c = n.allowCustom && s && !u.some((f) => f.value === s || f.label === s) ? [{ label: "── 自定义 ──", options: [{ value: s, label: s }] }] : [], d = s ? n.groups.map((f) => ({ ...f, options: f.options.filter((g) => a(g.label, s)) })).filter((f) => f.options.length > 0) : n.groups;
      return [...c, ...d];
    }), l = R(
      () => r.value.map((s) => ({
        label: s.label,
        options: s.options
      }))
    );
    return (s, u) => (ee(), Ze(M(bt), {
      size: "small",
      style: { width: "100%" },
      "show-search": "",
      "allow-clear": "",
      "filter-option": !1,
      value: e.value || void 0,
      "search-value": i.value,
      placeholder: e.placeholder,
      loading: e.loading,
      disabled: e.disabled,
      options: l.value,
      onFocus: u[0] || (u[0] = () => {
        i.value = e.displayValue ?? e.value ?? "";
      }),
      onSearch: u[1] || (u[1] = (c) => {
        i.value = c;
      }),
      onChange: u[2] || (u[2] = (c) => {
        i.value = String(c ?? ""), o("change", String(c));
      }),
      onClear: u[3] || (u[3] = () => {
        i.value = "", o("clear");
      })
    }, null, 8, ["value", "search-value", "placeholder", "loading", "disabled", "options"]));
  }
}), cU = { class: "flex flex-wrap items-center gap-1.5 mt-1" }, dU = { class: "text-xs text-secondary" }, fU = { class: "font-medium text-blue lh-1" }, pU = /* @__PURE__ */ ye({
  __name: "FunctionsEditor",
  props: {
    functions: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt();
    function a(g, m) {
      return m.length === 0 ? `${g.name}()` : `${g.name}(${m.join(", ")})`;
    }
    function r(g) {
      return { def: g, params: [...g.defaultParams], text: a(g, g.defaultParams) };
    }
    function l(g) {
      const m = g.filter((y) => y.def.category === "Alias");
      return [...g.filter((y) => y.def.category !== "Alias"), ...m];
    }
    function s(g) {
      const m = Kb.find((y) => y.name === g);
      if (!m)
        return;
      const b = r(m);
      o("change", l([...n.functions, b]));
    }
    function u(g, m, b) {
      const y = n.functions.map((S, C) => {
        if (C !== g)
          return S;
        const O = [...S.params];
        return O[m] = b, { ...S, params: O, text: a(S.def, O) };
      });
      o("change", y);
    }
    function c(g) {
      o("change", n.functions.filter((m, b) => b !== g));
    }
    function d(g, m) {
      const b = g + m;
      if (b < 0 || b >= n.functions.length)
        return;
      const y = [...n.functions];
      [y[g], y[b]] = [y[b], y[g]], o("change", y);
    }
    const f = R(
      () => zT.map((g) => ({
        key: g,
        label: g,
        children: Kb.filter((m) => m.category === g).map((m) => ({ key: m.name, label: m.name }))
      }))
    );
    return (g, m) => (ee(), ge("div", cU, [
      N("span", dU, te(M(i)("qb.functions")), 1),
      (ee(!0), ge(He, null, It(e.functions, (b, y) => (ee(), ge("div", {
        key: y,
        class: "inline-flex items-center gap-0.5 rounded px-1",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        v(M($t), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: y === 0,
          onClick: (S) => d(y, -1)
        }, {
          default: ce(() => [
            N("span", {
              class: ct(M(ot).chevronLeft)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        N("span", fU, te(b.def.name), 1),
        m[1] || (m[1] = N("span", { class: "text-yellow" }, "(", -1)),
        (ee(!0), ge(He, null, It(b.def.params, (S, C) => (ee(), ge(He, { key: C }, [
          S.options ? (ee(), Ze(M(bt), {
            key: 0,
            size: "small",
            value: String(b.params[C] ?? S.options[0]),
            options: S.options.map((O) => ({ value: String(O), label: String(O) })),
            "popup-match-select-width": "false",
            bordered: !1,
            variant: "borderless",
            style: { "min-width": "60px" },
            onChange: (O) => u(y, C, O)
          }, null, 8, ["value", "options", "onChange"])) : (ee(), Ze(M(ft), {
            key: 1,
            class: "text-green text-center",
            size: "small",
            bordered: !1,
            value: String(b.params[C] ?? ""),
            style: { width: "40px", padding: "0 4px", height: "20px" },
            variant: "borderless",
            onChange: (O) => u(y, C, O.target.value)
          }, null, 8, ["value", "onChange"]))
        ], 64))), 128)),
        m[2] || (m[2] = N("span", { class: "text-yellow font-medium" }, ")", -1)),
        v(M($t), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: y === e.functions.length - 1,
          onClick: (S) => d(y, 1)
        }, {
          default: ce(() => [
            N("span", {
              class: ct(M(ot).chevronRight)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        v(M($t), {
          type: "text",
          size: "small",
          class: "p-0!",
          danger: "",
          onClick: (S) => c(y)
        }, {
          default: ce(() => [
            N("span", {
              class: ct(M(ot).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      v(M(Yi), { trigger: ["click"] }, {
        overlay: ce(() => [
          v(M(lo), {
            onClick: m[0] || (m[0] = ({ key: b }) => s(String(b)))
          }, {
            default: ce(() => [
              (ee(!0), ge(He, null, It(f.value, (b) => (ee(), Ze(M(lo).SubMenu, {
                key: b.key,
                title: b.label
              }, {
                default: ce(() => [
                  (ee(!0), ge(He, null, It(b.children, (y) => (ee(), Ze(M(lo).Item, {
                    key: y.key
                  }, {
                    default: ce(() => [
                      Ee(te(y.label), 1)
                    ]),
                    _: 2
                  }, 1024))), 128))
                ]),
                _: 2
              }, 1032, ["title"]))), 128))
            ]),
            _: 1
          })
        ]),
        default: ce(() => [
          v(M($t), {
            size: "small",
            type: "dashed"
          }, {
            default: ce(() => [
              Ee(" + " + te(M(i)("qb.functions.add")), 1)
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), gU = { class: "flex flex-wrap items-center gap-0 mt-3" }, hU = { class: "text-xs text-secondary font-medium" }, vU = { class: "text-xs" }, mU = { class: "inline-flex items-center gap-1.5 mr-3" }, bU = { class: "text-xs text-secondary whitespace-nowrap" }, yU = { class: "inline-flex items-center gap-1.5 mr-3" }, xU = { class: "text-xs text-secondary whitespace-nowrap" }, wU = { class: "inline-flex items-center gap-1.5 mr-3" }, SU = { class: "text-xs text-secondary whitespace-nowrap" }, CU = { class: "inline-flex items-center gap-1.5 mr-3" }, $U = { class: "text-xs text-secondary whitespace-nowrap" }, PU = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mr-3"
}, OU = { class: "text-xs text-secondary whitespace-nowrap" }, IU = { class: "inline-flex items-center gap-1.5 mr-3" }, MU = { class: "text-xs text-secondary whitespace-nowrap" }, TU = { class: "inline-flex items-center gap-1.5 mr-3" }, kU = { class: "text-xs text-secondary whitespace-nowrap" }, EU = { class: "inline-flex items-center gap-1.5 mr-3" }, _U = { class: "text-xs text-secondary whitespace-nowrap" }, AU = { class: "inline-flex items-center gap-1.5 mr-3" }, DU = { class: "text-xs text-secondary whitespace-nowrap" }, zU = { class: "inline-flex items-center gap-1.5 mr-3" }, RU = { class: "text-xs text-secondary whitespace-nowrap" }, NU = { class: "inline-flex items-center gap-1.5 mr-3" }, BU = { class: "text-xs text-secondary whitespace-nowrap" }, FU = { class: "inline-flex items-center gap-1.5 mr-3" }, LU = { class: "text-xs text-secondary whitespace-nowrap" }, HU = { class: "inline-flex items-center gap-1.5 mr-3" }, VU = { class: "text-xs text-secondary whitespace-nowrap" }, jU = /* @__PURE__ */ ye({
  __name: "OptionsEditor",
  props: {
    queryType: {},
    options: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt(), a = le(!0);
    function r(c) {
      o("change", { ...n.options, ...c });
    }
    const l = [
      { value: 2, label: i("qb.ack.all") },
      { value: 0, label: i("qb.ack.unack") },
      { value: 1, label: i("qb.ack.ack") }
    ], s = [
      { value: "default", label: i("qb.sort.default") },
      { value: "lastchange", label: i("qb.sort.lastchange") },
      { value: "severity", label: i("qb.sort.severity") }
    ], u = [
      { value: "default", label: i("qb.trends.default") },
      { value: "true", label: i("qb.trends.true") },
      { value: "false", label: i("qb.trends.false") }
    ];
    return (c, d) => (ee(), ge("div", gU, [
      N("div", {
        class: "inline-flex items-center gap-1.5 cursor-pointer py-1 mr-2 select-none flex-shrink-0",
        onClick: d[0] || (d[0] = (f) => a.value = !a.value)
      }, [
        N("span", hU, te(M(i)("qb.options")), 1),
        N("span", vU, te(a.value ? "▸" : "▾"), 1)
      ]),
      N("div", {
        class: "flex flex-wrap items-center overflow-hidden transition-all",
        style: xt({ maxHeight: a.value ? "200px" : "0" })
      }, [
        e.queryType === "metrics" || e.queryType === "itemid" || e.queryType === "services" ? (ee(), ge(He, { key: 0 }, [
          N("div", mU, [
            N("span", bU, te(M(i)("qb.options.trends")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "100px" },
              value: e.options.useTrends ?? "default",
              options: u,
              onChange: d[1] || (d[1] = (f) => r({ useTrends: f }))
            }, null, 8, ["value"])
          ]),
          N("div", yU, [
            N("span", xU, te(M(i)("qb.options.showDisabled")), 1),
            v(M(za), {
              size: "small",
              checked: !!e.options.showDisabledItems,
              onChange: d[2] || (d[2] = (f) => r({ showDisabledItems: f }))
            }, null, 8, ["checked"])
          ]),
          N("div", wU, [
            N("span", SU, te(M(i)("qb.options.valueMapping")), 1),
            v(M(za), {
              size: "small",
              checked: !!e.options.useZabbixValueMapping,
              onChange: d[3] || (d[3] = (f) => r({ useZabbixValueMapping: f }))
            }, null, 8, ["checked"])
          ]),
          N("div", CU, [
            N("span", $U, te(M(i)("qb.options.disableAlignment")), 1),
            v(M(za), {
              size: "small",
              checked: !!e.options.disableDataAlignment,
              onChange: d[4] || (d[4] = (f) => r({ disableDataAlignment: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : je("", !0),
        e.queryType === "text" ? (ee(), ge("div", PU, [
          N("span", OU, te(M(i)("qb.options.showDisabled")), 1),
          v(M(za), {
            size: "small",
            checked: !!e.options.showDisabledItems,
            onChange: d[5] || (d[5] = (f) => r({ showDisabledItems: f }))
          }, null, 8, ["checked"])
        ])) : je("", !0),
        e.queryType === "problems" ? (ee(), ge(He, { key: 2 }, [
          N("div", IU, [
            N("span", MU, te(M(i)("qb.options.acknowledged")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[6] || (d[6] = (f) => r({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          N("div", TU, [
            N("span", kU, te(M(i)("qb.options.sortBy")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "120px" },
              value: e.options.sortProblems ?? "default",
              options: s,
              onChange: d[7] || (d[7] = (f) => r({ sortProblems: f }))
            }, null, 8, ["value"])
          ]),
          N("div", EU, [
            N("span", _U, te(M(i)("qb.options.useTimeRange")), 1),
            v(M(za), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[8] || (d[8] = (f) => r({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ]),
          N("div", AU, [
            N("span", DU, te(M(i)("qb.options.hostsInMaintenance")), 1),
            v(M(za), {
              size: "small",
              checked: !!e.options.hostsInMaintenance,
              onChange: d[9] || (d[9] = (f) => r({ hostsInMaintenance: f }))
            }, null, 8, ["checked"])
          ]),
          N("div", zU, [
            N("span", RU, te(M(i)("qb.options.hostProxy")), 1),
            v(M(za), {
              size: "small",
              checked: !!e.options.hostProxy,
              onChange: d[10] || (d[10] = (f) => r({ hostProxy: f }))
            }, null, 8, ["checked"])
          ]),
          N("div", NU, [
            N("span", BU, te(M(i)("qb.options.limit")), 1),
            v(M(ft), {
              size: "small",
              type: "number",
              style: { width: "80px" },
              value: e.options.limit ?? 100,
              onChange: d[11] || (d[11] = (f) => r({ limit: Number(f.target.value) }))
            }, null, 8, ["value"])
          ])
        ], 64)) : je("", !0),
        e.queryType === "triggers" ? (ee(), ge(He, { key: 3 }, [
          N("div", FU, [
            N("span", LU, te(M(i)("qb.options.acknowledged")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[12] || (d[12] = (f) => r({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          N("div", HU, [
            N("span", VU, te(M(i)("qb.options.useTimeRange")), 1),
            v(M(za), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[13] || (d[13] = (f) => r({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : je("", !0)
      ], 4)
    ]));
  }
});
function tO(e) {
  const t = xs();
  return R(() => {
    const n = e();
    if (!n)
      return [];
    if (!n.startsWith("$"))
      return [n];
    const o = n.slice(1), i = Object.values(t.variables).find(
      (l) => l.config.name === o
    );
    if (!i)
      return [];
    const a = i.current, r = Array.isArray(a) ? a : [a];
    return r.includes("$__all") ? i.options.map((l) => l.value).filter((l) => l !== "$__all") : r.filter(Boolean);
  });
}
function WU(e, t) {
  const n = le([]), o = le([]), i = le(!1), a = le(!1), r = tO(() => e().groupId);
  return Ie(
    () => ({ url: t().url, token: t().token }),
    async ({ url: l, token: s }) => {
      if (l) {
        i.value = !0, n.value = [];
        try {
          n.value = await OT({ url: l, token: s });
        } catch {
        } finally {
          i.value = !1;
        }
      }
    },
    { immediate: !0, deep: !0 }
  ), Ie(
    [r, () => t().url, () => t().token],
    async ([l, s, u]) => {
      if (!s || l.length === 0) {
        o.value = [];
        return;
      }
      a.value = !0, o.value = [];
      try {
        o.value = await IT(l, void 0, { url: s, token: u });
      } catch {
      } finally {
        a.value = !1;
      }
    },
    { immediate: !0 }
  ), { groups: n, hosts: o, loadingGroups: i, loadingHosts: a, resolvedGroupIds: r };
}
function qU(e) {
  const { config: t } = Uu(), n = R(() => (t.value.datasourceConfig ?? []).filter((r) => r.type === "zabbix").map((r, l) => ({
    uid: r.uid || String(l),
    name: r.name,
    url: r.url,
    token: r.token,
    isDefault: !!r.default
  }))), o = R(() => {
    const a = uO(e);
    return n.value.find((l) => l.uid === a) ?? n.value[0] ?? { url: "", token: "" };
  }), i = R(
    () => n.value.find((a) => a.isDefault)?.uid ?? n.value[0]?.uid ?? ""
  );
  return { sources: n, cfg: o, defaultUid: i };
}
const GU = {
  class: "flex flex-col gap-3 p-2",
  style: { "font-size": "12px" }
}, KU = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, YU = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, UU = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, XU = { key: 0 }, QU = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ZU = {
  key: 1,
  style: { "max-width": "400px" }
}, JU = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, eX = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, tX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, nX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, oX = { class: "flex items-center gap-2" }, iX = {
  class: "text-secondary",
  style: { "font-size": "11px" }
}, aX = { key: 3 }, rX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, lX = { key: 4 }, sX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, uX = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, cX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, dX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, fX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, pX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, gX = { class: "flex flex-wrap gap-1" }, hX = {
  key: 6,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, vX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, mX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, bX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, yX = { key: 7 }, xX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, wX = {
  key: 8,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, SX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, CX = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, $X = /* @__PURE__ */ ye({
  __name: "ZabbixQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = jt(), { cfg: a } = qU(() => n.datasourceId), r = xs();
    function l(he) {
      o("change", { ...n.query, ...he });
    }
    const s = R(
      () => Object.values(r.variables).map((he) => ({
        value: `$${he.config.name}`,
        label: `$${he.config.name}`
      }))
    );
    function u(he, de) {
      const ne = [];
      return s.value.length > 0 && ne.push({ label: "── 变量 ──", options: s.value }), ne.push({ label: he, options: de }), ne;
    }
    function c(he) {
      return typeof he == "string" && he.startsWith("$");
    }
    const { groups: d, hosts: f, loadingGroups: g, loadingHosts: m } = WU(
      () => n.query,
      () => a.value
    ), b = tO(() => n.query.hostId), y = R(
      () => d.value.map((he) => ({ value: he.groupid, label: he.name }))
    ), S = R(
      () => f.value.map((he) => ({ value: he.hostid, label: he.name || he.host }))
    ), C = le([]), O = le(!1);
    Ie(
      [
        b,
        () => a.value.url,
        () => a.value.token,
        () => n.query.queryType
      ],
      async ([he, de, ne, we]) => {
        if (we !== "metrics") {
          C.value = [];
          return;
        }
        if (!he.length || !de) {
          C.value = [];
          return;
        }
        O.value = !0;
        try {
          C.value = (await Promise.all(
            he.map(
              (re) => MT([re], void 0, void 0, { url: de, token: ne })
            )
          )).flat();
        } catch {
          C.value = [];
        } finally {
          O.value = !1;
        }
      },
      { immediate: !0 }
    );
    const $ = R(() => {
      const he = /* @__PURE__ */ new Set();
      return C.value.flatMap(
        (de) => (de.tags ?? []).map((ne) => TT(ne))
      ).filter((de) => he.has(de) ? !1 : (he.add(de), !0)).map((de) => ({ value: de, label: de }));
    }), P = R(() => {
      if (!n.query.itemTagsFilter)
        return C.value;
      const [he, de] = n.query.itemTagsFilter.split(":").map((ne) => ne.trim());
      return C.value.filter(
        (ne) => (ne.tags ?? []).some(
          (we) => we.tag === he && (de ? we.value === de : !0)
        )
      );
    }), k = R(() => {
      const he = /* @__PURE__ */ new Set();
      return P.value.map((de) => de.name).filter((de) => he.has(de) ? !1 : (he.add(de), !0)).map((de) => ({ value: de, label: de }));
    }), x = le([]), E = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => a.value.url,
        () => a.value.token,
        () => n.query.queryType
      ],
      async ([he, de, ne, we]) => {
        if (we !== "text" || !he || !de) {
          x.value = [];
          return;
        }
        E.value = !0;
        try {
          x.value = await kT([he], void 0, { url: de, token: ne });
        } catch {
          x.value = [];
        } finally {
          E.value = !1;
        }
      },
      { immediate: !0 }
    );
    const z = R(() => {
      const he = /* @__PURE__ */ new Set();
      return x.value.map((de) => de.name).filter((de) => he.has(de) ? !1 : (he.add(de), !0)).map((de) => ({ value: de, label: de }));
    }), B = le([]), D = le(!1);
    Ie(
      [() => a.value.url, () => a.value.token, () => n.query.queryType],
      async ([he, de, ne]) => {
        if (!(ne !== "services" || !he)) {
          D.value = !0;
          try {
            B.value = await _T({ url: he, token: de });
          } catch {
            B.value = [];
          } finally {
            D.value = !1;
          }
        }
      },
      { immediate: !0 }
    );
    const W = le([]), H = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => a.value.url,
        () => a.value.token,
        () => n.query.queryType
      ],
      async ([he, de, ne, we]) => {
        if (we !== "macros" || !he || !de) {
          W.value = [];
          return;
        }
        H.value = !0;
        try {
          W.value = await ET([he], { url: de, token: ne });
        } catch {
          W.value = [];
        } finally {
          H.value = !1;
        }
      },
      { immediate: !0 }
    );
    const F = le([]), A = le(!1), U = le([]), j = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => a.value.url,
        () => a.value.token,
        () => n.query.queryType
      ],
      async ([he, de, ne, we]) => {
        if (we !== "lld" || !he || he.startsWith("$") || !de) {
          F.value = [];
          return;
        }
        A.value = !0;
        try {
          F.value = await AT([he], { url: de, token: ne });
        } catch {
          F.value = [];
        } finally {
          A.value = !1;
        }
      },
      { immediate: !0 }
    ), Ie(
      [() => n.query.lldRuleId, () => a.value.url, () => a.value.token],
      async ([he, de, ne]) => {
        if (!he || !de) {
          U.value = [];
          return;
        }
        j.value = !0;
        try {
          const we = /* @__PURE__ */ new Set();
          U.value = (await DT(he, { url: de, token: ne })).map((re) => {
            const se = re.key_.includes("[") ? re.key_.slice(0, re.key_.indexOf("[")) : re.key_;
            return { value: se, label: `${re.name} (${se})` };
          }).filter((re) => we.has(re.value) ? !1 : (we.add(re.value), !0));
        } catch {
          U.value = [];
        } finally {
          j.value = !1;
        }
      },
      { immediate: !0 }
    );
    const ae = [
      "metrics",
      "text",
      "services",
      "itemid",
      "triggers",
      "problems",
      "macros",
      "lld"
    ], G = [
      "problems",
      "recent",
      "history"
    ], Y = {
      problems: "Problems",
      recent: "Recent problems",
      history: "History"
    }, K = [
      { value: 0, label: "Not classified", color: "#97aab3" },
      { value: 1, label: "Information", color: "#7499ff" },
      { value: 2, label: "Warning", color: "#ffc859" },
      { value: 3, label: "Average", color: "#ffa059" },
      { value: 4, label: "High", color: "#e97659" },
      { value: 5, label: "Disaster", color: "#e45959" }
    ], J = [
      { value: "status", label: "Status" },
      { value: "sli", label: "SLI" },
      { value: "uptime", label: "Uptime" },
      { value: "downtime", label: "Downtime" },
      { value: "error_budget", label: "Error budget" }
    ], be = [
      { value: "none", label: "No interval" },
      { value: "auto", label: "Auto" },
      { value: "1h", label: "1 hour" },
      { value: "12h", label: "12 hours" },
      { value: "1d", label: "24 hours" },
      { value: "1w", label: "1 week" },
      { value: "1M", label: "1 month" }
    ], xe = R(
      () => ["metrics", "text", "triggers", "problems", "macros", "lld"].includes(
        n.query.queryType
      )
    );
    return (he, de) => (ee(), ge("div", GU, [
      N("div", null, [
        N("div", KU, te(M(i)("qb.queryType")), 1),
        v(M(bt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.queryType,
          options: ae.map((ne) => ({
            value: ne,
            label: M(i)(`qb.queryType.${ne}`)
          })),
          onChange: de[0] || (de[0] = (ne) => l({ queryType: ne, itemIds: [], itemNames: [], itemids: "" }))
        }, null, 8, ["value", "options"])
      ]),
      xe.value ? (ee(), ge("div", {
        key: 0,
        class: "grid gap-3",
        style: xt({ gridTemplateColumns: e.query.queryType === "metrics" ? "repeat(3, 1fr)" : "repeat(2, 1fr)" })
      }, [
        N("div", null, [
          N("div", YU, te(M(i)("panel.group")), 1),
          v(M(Ao), {
            spinning: M(g),
            size: "small"
          }, {
            default: ce(() => [
              v(Qr, {
                value: e.query.groupId || void 0,
                "display-value": e.query.groupName || void 0,
                placeholder: M(i)("panel.group.placeholder"),
                groups: u("── 主机组 ──", y.value),
                onChange: de[1] || (de[1] = (ne) => l({ groupId: ne, groupName: c(ne) ? ne : M(d).find((we) => we.groupid === ne)?.name ?? ne, hostId: "", hostName: "", itemIds: [], itemNames: [] })),
                onClear: de[2] || (de[2] = () => l({ groupId: "", groupName: "", hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        N("div", null, [
          N("div", UU, te(M(i)("panel.host")), 1),
          v(M(Ao), {
            spinning: M(m),
            size: "small"
          }, {
            default: ce(() => [
              v(Qr, {
                value: e.query.hostId || void 0,
                "display-value": e.query.hostName || void 0,
                placeholder: M(i)("panel.host.placeholder"),
                groups: u("── 主机 ──", S.value),
                onChange: de[3] || (de[3] = (ne) => l({ hostId: ne, hostName: c(ne) ? ne : M(f).find((we) => we.hostid === ne)?.name ?? ne, itemIds: [], itemNames: [] })),
                onClear: de[4] || (de[4] = () => l({ hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        e.query.queryType === "metrics" ? (ee(), ge("div", XU, [
          N("div", QU, te(M(i)("panel.itemTag")), 1),
          v(M(Ao), {
            spinning: O.value,
            size: "small"
          }, {
            default: ce(() => [
              v(Qr, {
                value: e.query.itemTagsFilter || void 0,
                placeholder: M(i)("panel.itemTag.placeholder"),
                groups: u("── 标签 ──", $.value),
                onChange: de[5] || (de[5] = (ne) => l({ itemTagsFilter: ne ?? "", itemIds: [], itemNames: [] })),
                onClear: de[6] || (de[6] = () => l({ itemTagsFilter: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])) : je("", !0)
      ], 4)) : je("", !0),
      e.query.queryType === "metrics" ? (ee(), ge("div", ZU, [
        N("div", JU, te(M(i)("panel.items")), 1),
        v(Qr, {
          value: e.query.itemNames[0] || void 0,
          placeholder: M(i)("panel.items.placeholder"),
          groups: u("── 监控项 ──", k.value),
          onChange: de[7] || (de[7] = (ne) => l({ itemNames: [ne], itemIds: [] })),
          onClear: de[8] || (de[8] = () => l({ itemNames: [], itemIds: [] }))
        }, null, 8, ["value", "placeholder", "groups"])
      ])) : je("", !0),
      e.query.queryType === "text" ? (ee(), ge(He, { key: 2 }, [
        N("div", eX, [
          N("div", null, [
            N("div", tX, te(M(i)("panel.items")), 1),
            v(M(Ao), {
              spinning: E.value,
              size: "small"
            }, {
              default: ce(() => [
                v(Qr, {
                  value: e.query.itemNames[0] || void 0,
                  placeholder: M(i)("panel.items.placeholder"),
                  disabled: !e.query.hostId,
                  groups: u("── 监控项 ──", z.value),
                  onChange: de[9] || (de[9] = (ne) => l({ itemNames: [ne], itemIds: [] })),
                  onClear: de[10] || (de[10] = () => l({ itemNames: [], itemIds: [] }))
                }, null, 8, ["value", "placeholder", "disabled", "groups"])
              ]),
              _: 1
            }, 8, ["spinning"])
          ]),
          N("div", null, [
            N("div", nX, te(M(i)("qb.textFilter")), 1),
            v(M(ft), {
              size: "small",
              style: { width: "100%" },
              value: e.query.textFilter,
              onChange: de[11] || (de[11] = (ne) => l({ textFilter: ne.target.value }))
            }, null, 8, ["value"])
          ])
        ]),
        N("div", oX, [
          v(M(ai), {
            checked: e.query.useCaptureGroups,
            onChange: de[12] || (de[12] = (ne) => l({ useCaptureGroups: ne.target.checked }))
          }, null, 8, ["checked"]),
          N("span", iX, te(M(i)("qb.useCaptureGroups")), 1)
        ])
      ], 64)) : je("", !0),
      e.query.queryType === "itemid" ? (ee(), ge("div", aX, [
        N("div", rX, te(M(i)("qb.itemIds")), 1),
        v(M(ft), {
          size: "small",
          style: { width: "100%" },
          value: e.query.itemids,
          placeholder: M(i)("qb.itemIds.placeholder"),
          onChange: de[13] || (de[13] = (ne) => l({ itemids: ne.target.value }))
        }, null, 8, ["value", "placeholder"])
      ])) : je("", !0),
      e.query.queryType === "triggers" ? (ee(), ge("div", lX, [
        N("div", sX, te(M(i)("qb.triggerFilter")), 1),
        v(M(ft), {
          size: "small",
          style: { width: "100%" },
          value: e.query.triggerFilter,
          onChange: de[14] || (de[14] = (ne) => l({ triggerFilter: ne.target.value }))
        }, null, 8, ["value"])
      ])) : je("", !0),
      e.query.queryType === "problems" ? (ee(), ge(He, { key: 5 }, [
        N("div", uX, [
          N("div", null, [
            N("div", cX, te(M(i)("qb.problemName")), 1),
            v(M(ft), {
              size: "small",
              style: { width: "100%" },
              value: e.query.triggerFilter,
              onChange: de[15] || (de[15] = (ne) => l({ triggerFilter: ne.target.value }))
            }, null, 8, ["value"])
          ]),
          N("div", null, [
            N("div", dX, te(M(i)("qb.tags")), 1),
            v(M(ft), {
              size: "small",
              style: { width: "100%" },
              value: e.query.tagsFilter,
              onChange: de[16] || (de[16] = (ne) => l({ tagsFilter: ne.target.value }))
            }, null, 8, ["value"])
          ]),
          N("div", null, [
            N("div", fX, te(M(i)("qb.show")), 1),
            v(M(bt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.showProblems,
              options: G.map((ne) => ({ value: ne, label: Y[ne] })),
              onChange: de[17] || (de[17] = (ne) => l({ showProblems: ne }))
            }, null, 8, ["value", "options"])
          ])
        ]),
        N("div", null, [
          N("div", pX, te(M(i)("qb.severity")), 1),
          N("div", gX, [
            (ee(), ge(He, null, It(K, (ne) => v(M(Ui), {
              key: ne.value,
              color: e.query.severities.includes(ne.value) ? ne.color : void 0,
              class: "cursor-pointer select-none",
              style: xt({ opacity: e.query.severities.includes(ne.value) ? 1 : 0.4 }),
              onClick: () => l({ severities: e.query.severities.includes(ne.value) ? e.query.severities.filter((we) => we !== ne.value) : [...e.query.severities, ne.value] })
            }, {
              default: ce(() => [
                Ee(te(ne.label), 1)
              ]),
              _: 2
            }, 1032, ["color", "style", "onClick"])), 64))
          ])
        ])
      ], 64)) : je("", !0),
      e.query.queryType === "services" ? (ee(), ge("div", hX, [
        N("div", null, [
          N("div", vX, te(M(i)("qb.itService")), 1),
          v(M(Ao), {
            spinning: D.value,
            size: "small"
          }, {
            default: ce(() => [
              v(Qr, {
                value: e.query.itServiceFilter || void 0,
                placeholder: M(i)("qb.itService.placeholder"),
                groups: u("── 服务 ──", B.value.map((ne) => ({ value: ne.name, label: ne.name }))),
                onChange: de[18] || (de[18] = (ne) => l({ itServiceFilter: ne })),
                onClear: de[19] || (de[19] = () => l({ itServiceFilter: "" }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        N("div", null, [
          N("div", mX, te(M(i)("qb.slaProperty")), 1),
          v(M(bt), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaProperty,
            options: J,
            onChange: de[20] || (de[20] = (ne) => l({ slaProperty: ne }))
          }, null, 8, ["value"])
        ]),
        N("div", null, [
          N("div", bX, te(M(i)("qb.slaInterval")), 1),
          v(M(bt), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaInterval,
            options: be,
            onChange: de[21] || (de[21] = (ne) => l({ slaInterval: ne }))
          }, null, 8, ["value"])
        ])
      ])) : je("", !0),
      e.query.queryType === "macros" ? (ee(), ge("div", yX, [
        N("div", xX, te(M(i)("qb.macroFilter")), 1),
        v(M(Ao), {
          spinning: H.value,
          size: "small"
        }, {
          default: ce(() => [
            v(Qr, {
              value: e.query.macroFilter || void 0,
              placeholder: "{$MACRO_NAME}",
              disabled: !e.query.hostId,
              groups: [{ label: "── 宏 ──", options: W.value.map((ne) => ({ value: ne.macro, label: `${ne.macro} = ${ne.value}` })) }],
              onChange: de[22] || (de[22] = (ne) => l({ macroFilter: ne })),
              onClear: de[23] || (de[23] = () => l({ macroFilter: "" }))
            }, null, 8, ["value", "disabled", "groups"])
          ]),
          _: 1
        }, 8, ["spinning"])
      ])) : je("", !0),
      e.query.queryType === "lld" ? (ee(), ge("div", wX, [
        N("div", null, [
          N("div", SX, te(M(i)("qb.lld.rule")), 1),
          v(M(Ao), {
            spinning: A.value,
            size: "small"
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                style: { width: "100%" },
                "allow-clear": "",
                "show-search": "",
                value: e.query.lldRuleId || void 0,
                placeholder: M(i)("qb.lld.rule.placeholder"),
                options: F.value.map((ne) => ({ value: ne.itemid, label: ne.name })),
                onChange: de[24] || (de[24] = (ne) => l({ lldRuleId: ne, lldRuleName: F.value.find((we) => we.itemid === ne)?.name ?? ne, lldItemKeys: [] })),
                onClear: de[25] || (de[25] = () => l({ lldRuleId: "", lldRuleName: "", lldItemKeys: [] }))
              }, null, 8, ["value", "placeholder", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        N("div", null, [
          N("div", CX, te(M(i)("qb.lld.itemKeys")), 1),
          v(M(Ao), {
            spinning: j.value,
            size: "small"
          }, {
            default: ce(() => [
              v(M(bt), {
                size: "small",
                style: { width: "100%" },
                mode: "multiple",
                "allow-clear": "",
                value: e.query.lldItemKeys ?? [],
                options: U.value,
                onChange: de[26] || (de[26] = (ne) => l({ lldItemKeys: ne }))
              }, null, 8, ["value", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])
      ])) : je("", !0),
      ["metrics", "itemid", "services"].includes(e.query.queryType) ? (ee(), Ze(pU, {
        key: 9,
        functions: e.query.functions ?? [],
        onChange: de[27] || (de[27] = (ne) => l({ functions: ne }))
      }, null, 8, ["functions"])) : je("", !0),
      ["macros", "lld"].includes(e.query.queryType) ? je("", !0) : (ee(), Ze(jU, {
        key: 10,
        "query-type": e.query.queryType,
        options: e.query.options ?? {},
        onChange: de[28] || (de[28] = (ne) => l({ options: ne }))
      }, null, 8, ["query-type", "options"]))
    ]));
  }
});
class PX {
  type = "argus";
  meta = { type: "argus", displayName: "Argus", icon: "📊" };
  QueryEditor = eU;
  defaultQuery = () => ({
    type: "argus",
    datasourceId: "",
    queries: [
      {
        type: "builder_query",
        spec: {
          name: "A",
          signal: "metrics",
          stepInterval: null,
          disabled: !1,
          filter: { expression: "" },
          having: { expression: "" },
          groupBy: [],
          order: [],
          legend: "",
          functions: [],
          aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
        }
      }
    ]
  });
  async query() {
    return { data: [], state: "Done" };
  }
}
class OX {
  type = "zabbix";
  meta = { type: "zabbix", displayName: "Zabbix", icon: "" };
  QueryEditor = $X;
  defaultQuery = () => ({
    type: "zabbix",
    datasourceId: "",
    queryType: "metrics",
    groupId: "",
    groupName: "",
    hostId: "",
    hostName: "",
    appId: "",
    appName: "",
    itemIds: [],
    itemNames: [],
    textFilter: "",
    useCaptureGroups: !1,
    itemTagsFilter: "",
    itemids: "",
    triggerFilter: "",
    tagsFilter: "",
    showProblems: "problems",
    severities: [],
    itServiceFilter: "",
    slaFilter: "",
    slaProperty: "sli",
    slaInterval: "none",
    macroFilter: "",
    lldRuleId: "",
    lldRuleName: "",
    lldItemKeys: [],
    functions: [],
    options: {
      useTrends: "default",
      showDisabledItems: !1,
      useZabbixValueMapping: !1,
      disableDataAlignment: !1,
      acknowledged: 2,
      sortProblems: "default",
      useTimeRange: !1,
      hostsInMaintenance: !1,
      hostProxy: !1,
      limit: 100
    }
  });
  async query() {
    return { data: [], state: "Done" };
  }
}
let Y1 = !1;
function IX() {
  if (Y1)
    return;
  Y1 = !0, mI();
  const e = new oI();
  e.QueryEditor = uU, Jf(e), Jf(new PX()), Jf(new OX());
}
const TQ = /* @__PURE__ */ ye({
  __name: "ArgusBoard",
  props: {
    config: { default: () => ({
      hideHeader: !1,
      canEdit: !0,
      theme: null,
      lang: null,
      isEditing: !0,
      initialEditingPanelId: null,
      datasourceConfig: null
    }) }
  },
  emits: ["save"],
  setup(e, { emit: t }) {
    const n = e, o = t;
    IX(), OO({
      ...n.config,
      onSave: (d) => o("save", d)
    });
    const i = ja();
    n.config.theme && i.setTheme(n.config.theme);
    const a = R(() => n.config.theme ?? i.theme);
    Ie(a, (d) => {
      document.documentElement.dataset.theme = d, document.body.dataset.theme = d;
    }, { immediate: !0 });
    const r = le(n.config.lang ?? "zh");
    $O(r), Ie(() => n.config.lang, (d) => {
      d && (r.value = d);
    });
    const l = xa();
    Pt(() => {
      n.config.canEdit === !1 ? l.setEditing(!1) : n.config.isEditing !== null && l.setEditing(n.config.isEditing), n.config.initialConfig ? l.importJSON(
        typeof n.config.initialConfig == "string" ? n.config.initialConfig : JSON.stringify(n.config.initialConfig)
      ) : n.config.renderDefaultDashboard === !1 && l.importJSON(JSON.stringify({ title: "", panels: {}, layouts: [] })), n.config.initialEditingPanelId && l.setEditingPanel(n.config.initialEditingPanelId);
    });
    const s = R(() => ({
      algorithm: a.value === "dark" ? n1.darkAlgorithm : n1.defaultAlgorithm,
      token: { colorPrimary: "#1677ff", borderRadius: 4 },
      getPopupContainer: () => document.body
    })), u = R(() => a.value === "dark"), c = R(() => u.value ? "#141414" : "#f0f2f5");
    return (d, f) => (ee(), Ze(M(dl), { theme: s.value }, {
      default: ce(() => [
        v(M(ps), null, {
          default: ce(() => [
            v(M(Gx), {
              style: xt({ minHeight: "100%", background: c.value })
            }, {
              default: ce(() => [
                v(M(Gx).Content, { style: { padding: 0, flex: 1, minHeight: 0 } }, {
                  default: ce(() => [
                    v(iY)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["style"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["theme"]));
  }
}), MX = { class: "log-toolbar" }, TX = { class: "log-scroller" }, kX = { class: "log-time" }, EX = { class: "log-message" }, _X = {
  key: 0,
  class: "log-empty"
}, AX = /* @__PURE__ */ ye({
  __name: "LogViewer",
  props: {
    logs: {},
    maxHeight: { default: 400 }
  },
  setup(e) {
    const t = e, n = le(""), o = le([]), i = R(() => t.logs.filter((r) => !(o.value.length > 0 && !o.value.includes(r.level) || n.value && !r.message.toLowerCase().includes(n.value.toLowerCase())))), a = {
      error: "#ff4d4f",
      warn: "#faad14",
      info: "#52c41a",
      debug: "#8c8c8c"
    };
    return (r, l) => {
      const s = Vt("a-input"), u = Vt("a-select");
      return ee(), ge("div", {
        class: "log-viewer",
        style: xt({ maxHeight: `${e.maxHeight}px` })
      }, [
        N("div", MX, [
          v(s, {
            value: n.value,
            "onUpdate:value": l[0] || (l[0] = (c) => n.value = c),
            size: "small",
            placeholder: "Search logs...",
            "allow-clear": "",
            style: { flex: "1" }
          }, null, 8, ["value"]),
          v(u, {
            value: o.value,
            "onUpdate:value": l[1] || (l[1] = (c) => o.value = c),
            mode: "multiple",
            size: "small",
            placeholder: "Level",
            style: { "min-width": "160px" },
            options: [
              { value: "error", label: "Error" },
              { value: "warn", label: "Warn" },
              { value: "info", label: "Info" },
              { value: "debug", label: "Debug" }
            ]
          }, null, 8, ["value"])
        ]),
        N("div", TX, [
          (ee(!0), ge(He, null, It(i.value, (c) => (ee(), ge("div", {
            key: c.id,
            class: "log-entry"
          }, [
            N("span", kX, te(new Date(c.timestamp).toLocaleTimeString()), 1),
            N("span", {
              class: "log-level",
              style: xt({ color: a[c.level] })
            }, te(c.level.toUpperCase()), 5),
            N("span", EX, te(c.message), 1)
          ]))), 128))
        ]),
        i.value.length === 0 ? (ee(), ge("div", _X, " No log entries ")) : je("", !0)
      ], 4);
    };
  }
}), kQ = /* @__PURE__ */ Ko(AX, [["__scopeId", "data-v-22a0d40d"]]), DX = {
  key: 0,
  class: "topology-empty"
}, zX = ["width", "height"], RX = { class: "edges" }, NX = ["x1", "y1", "x2", "y2"], BX = ["cx", "cy", "fill", "stroke"], FX = ["x", "y"], LX = ["x", "y"], HX = /* @__PURE__ */ ye({
  __name: "ServiceTopology",
  props: {
    nodes: { default: () => [] },
    edges: { default: () => [] },
    width: { default: 800 },
    height: { default: 500 }
  },
  setup(e) {
    const t = e, n = le(), o = le({});
    function i() {
      if (t.nodes.length === 0)
        return;
      const r = Math.ceil(Math.sqrt(t.nodes.length)), l = t.width / r, s = t.height / Math.ceil(t.nodes.length / r), u = {};
      t.nodes.forEach((c, d) => {
        const f = d % r, g = Math.floor(d / r);
        u[c.id] = {
          x: f * l + l / 2,
          y: g * s + s / 2
        };
      }), o.value = u;
    }
    Pt(i);
    function a(r) {
      return r ? r > 0.05 ? "#ff4d4f" : r > 0.01 ? "#faad14" : "#52c41a" : "#52c41a";
    }
    return (r, l) => (ee(), ge("div", {
      class: "service-topology",
      style: xt({ width: `${e.width}px`, height: `${e.height}px` })
    }, [
      e.nodes.length === 0 ? (ee(), ge("div", DX, " No topology data ")) : (ee(), ge("svg", {
        key: 1,
        ref_key: "svgRef",
        ref: n,
        width: e.width,
        height: e.height
      }, [
        N("g", RX, [
          (ee(!0), ge(He, null, It(e.edges, (s) => (ee(), ge("line", {
            key: `${s.source}-${s.target}`,
            x1: o.value[s.source]?.x ?? 0,
            y1: o.value[s.source]?.y ?? 0,
            x2: o.value[s.target]?.x ?? 0,
            y2: o.value[s.target]?.y ?? 0,
            stroke: "var(--ant-color-border)",
            "stroke-width": "1.5",
            "marker-end": "url(#arrowhead)"
          }, null, 8, NX))), 128))
        ]),
        l[0] || (l[0] = N("defs", null, [
          N("marker", {
            id: "arrowhead",
            markerWidth: "10",
            markerHeight: "7",
            refX: "10",
            refY: "3.5",
            orient: "auto"
          }, [
            N("polygon", {
              points: "0 0, 10 3.5, 0 7",
              fill: "var(--ant-color-border)"
            })
          ])
        ], -1)),
        (ee(!0), ge(He, null, It(e.nodes, (s) => (ee(), ge("g", {
          key: s.id,
          class: "topology-node"
        }, [
          N("circle", {
            cx: o.value[s.id]?.x ?? 0,
            cy: o.value[s.id]?.y ?? 0,
            r: "24",
            fill: a(s.errorRate),
            "fill-opacity": "0.15",
            stroke: a(s.errorRate),
            "stroke-width": "2"
          }, null, 8, BX),
          N("text", {
            x: o.value[s.id]?.x ?? 0,
            y: (o.value[s.id]?.y ?? 0) + 4,
            "text-anchor": "middle",
            "font-size": "10",
            fill: "var(--ant-color-text)"
          }, te(s.name), 9, FX),
          s.latency !== void 0 ? (ee(), ge("text", {
            key: 0,
            x: o.value[s.id]?.x ?? 0,
            y: (o.value[s.id]?.y ?? 0) + 36,
            "text-anchor": "middle",
            "font-size": "9",
            fill: "var(--ant-color-text-secondary)"
          }, te(s.latency) + "ms ", 9, LX)) : je("", !0)
        ]))), 128))
      ], 8, zX))
    ], 4));
  }
}), EQ = /* @__PURE__ */ Ko(HX, [["__scopeId", "data-v-da85d863"]]), VX = { class: "trace-waterfall" }, jX = {
  key: 0,
  class: "trace-empty"
}, WX = { class: "trace-name-col" }, qX = { class: "trace-service" }, GX = { class: "trace-op" }, KX = { class: "trace-bar-col" }, YX = { class: "trace-dur-col" }, UX = /* @__PURE__ */ ye({
  __name: "TraceWaterfall",
  props: {
    spans: { default: () => [] },
    startTime: {},
    endTime: {}
  },
  setup(e) {
    const t = e, n = R(() => t.startTime ?? Math.min(...t.spans.map((u) => u.startTime))), o = R(() => t.endTime ?? Math.max(...t.spans.map((u) => u.startTime + u.duration))), i = R(() => o.value - n.value);
    function a(u) {
      return (u.startTime - n.value) / i.value * 100;
    }
    function r(u) {
      return Math.max(u.duration / i.value * 100, 0.5);
    }
    function l(u) {
      return u >= 1e6 ? `${(u / 1e6).toFixed(2)}s` : u >= 1e3 ? `${(u / 1e3).toFixed(2)}ms` : `${u}μs`;
    }
    const s = {
      ok: "#52c41a",
      error: "#ff4d4f",
      unset: "#1677ff"
    };
    return (u, c) => (ee(), ge("div", VX, [
      e.spans.length === 0 ? (ee(), ge("div", jX, " No trace data ")) : (ee(), ge(He, { key: 1 }, [
        c[0] || (c[0] = N("div", { class: "trace-header" }, [
          N("div", { class: "trace-name-col" }, " Operation "),
          N("div", { class: "trace-bar-col" }, " Timeline "),
          N("div", { class: "trace-dur-col" }, " Duration ")
        ], -1)),
        (ee(!0), ge(He, null, It(e.spans, (d) => (ee(), ge("div", {
          key: d.spanId,
          class: "trace-row"
        }, [
          N("div", WX, [
            N("span", qX, te(d.serviceName), 1),
            N("span", GX, te(d.operationName), 1)
          ]),
          N("div", KX, [
            N("div", {
              class: "trace-bar",
              style: xt({
                left: `${a(d)}%`,
                width: `${r(d)}%`,
                background: s[d.status ?? "unset"]
              })
            }, null, 4)
          ]),
          N("div", YX, te(l(d.duration)), 1)
        ]))), 128))
      ], 64))
    ]));
  }
}), _Q = /* @__PURE__ */ Ko(UX, [["__scopeId", "data-v-0212681c"]]), AQ = /* @__PURE__ */ ye({
  __name: "SimpleChart",
  props: {
    options: {},
    data: {}
  },
  setup(e) {
    const t = e, n = le(), o = le(null), i = le({ width: 0, height: 0 });
    let a = null;
    function r() {
      o.value && (o.value.destroy(), o.value = null);
    }
    return At(() => {
      a?.disconnect(), r();
    }), Ft((l) => {
      n.value && (a = new ResizeObserver((s) => {
        const { width: u, height: c } = s[0].contentRect;
        u > 0 && c > 0 && (i.value = { width: Math.floor(u), height: Math.floor(c) });
      }), a.observe(n.value), i.value = {
        width: Math.floor(n.value.getBoundingClientRect().width),
        height: Math.floor(n.value.getBoundingClientRect().height)
      }, l(() => {
        a?.disconnect();
      }));
    }), Ft((l) => {
      !n.value || i.value.width <= 0 || i.value.height <= 0 || (r(), o.value = new ro(
        { ...t.options, width: i.value.width, height: i.value.height },
        t.data,
        n.value
      ), l(() => {
        r();
      }));
    }), (l, s) => (ee(), ge("div", {
      ref_key: "containerRef",
      ref: n,
      class: "w-full h-full"
    }, null, 512));
  }
}), XX = { class: "kbd-key" }, QX = /* @__PURE__ */ ye({
  __name: "Kbd",
  props: {
    char: {}
  },
  setup(e) {
    return (t, n) => (ee(), ge("kbd", XX, [
      Va(t.$slots, "default", {}, () => [
        Ee(te(e.char), 1)
      ], !0)
    ]));
  }
}), DQ = /* @__PURE__ */ Ko(QX, [["__scopeId", "data-v-94fb4749"]]), ZX = ["href", "target"], JX = {
  key: 1,
  class: "panel-links-icon",
  style: { cursor: "pointer" }
}, eQ = { style: { "font-size": "10px", "margin-left": "2px" } }, tQ = /* @__PURE__ */ ye({
  __name: "PanelLinksIcon",
  props: {
    panel: {}
  },
  setup(e) {
    return (t, n) => e.panel.links && e.panel.links.length > 0 ? (ee(), Ze(M(xo), {
      key: 0,
      title: e.panel.links.map((o) => o.title ?? o.url).join(", ")
    }, {
      default: ce(() => [
        e.panel.links.length === 1 ? (ee(), ge("a", {
          key: 0,
          href: e.panel.links[0].url,
          target: e.panel.links[0].newTab ? "_blank" : "_self",
          class: "panel-links-icon",
          onClick: n[0] || (n[0] = Ro(() => {
          }, ["stop"]))
        }, [...n[1] || (n[1] = [
          N("span", {
            class: "i-mdi-link",
            style: { "font-size": "14px" }
          }, null, -1)
        ])], 8, ZX)) : (ee(), ge("span", JX, [
          n[2] || (n[2] = N("span", {
            class: "i-mdi-link-variant",
            style: { "font-size": "14px" }
          }, null, -1)),
          N("span", eQ, te(e.panel.links.length), 1)
        ]))
      ]),
      _: 1
    }, 8, ["title"])) : je("", !0);
  }
}), zQ = /* @__PURE__ */ Ko(tQ, [["__scopeId", "data-v-6925a5a2"]]), nQ = { class: "viz-picker" }, oQ = { class: "viz-picker-title" }, iQ = { class: "viz-picker-grid" }, aQ = ["onClick"], rQ = { class: "viz-picker-label" }, lQ = /* @__PURE__ */ ye({
  __name: "VizPickerPane",
  setup(e) {
    const { t } = jt(), { panel: n, onChange: o } = qs(), i = [
      { type: "timeseries", icon: ot.chartLine, labelKey: "config.type.timeseries" },
      { type: "bar", icon: ot.chartBar, labelKey: "config.type.bar" },
      { type: "stat", icon: ot.stat, labelKey: "config.type.stat" },
      { type: "gauge", icon: ot.gauge, labelKey: "config.type.gauge" },
      { type: "pie", icon: ot.chartPie, labelKey: "config.type.pie" },
      { type: "table", icon: ot.table, labelKey: "config.type.table" },
      { type: "histogram", icon: ot.chartArea, labelKey: "config.type.histogram" }
    ];
    return (a, r) => (ee(), ge("div", nQ, [
      N("div", oQ, te(M(t)("editor.vizPicker.title")), 1),
      N("div", iQ, [
        (ee(), ge(He, null, It(i, (l) => N("button", {
          key: l.type,
          class: ct(["viz-picker-item", { "viz-picker-item--active": M(n).type === l.type }]),
          onClick: (s) => M(o)({ type: l.type })
        }, [
          N("span", {
            class: ct(["viz-picker-icon", [l.icon]])
          }, null, 2),
          N("span", rQ, te(M(t)(l.labelKey)), 1)
        ], 10, aQ)), 64))
      ])
    ]));
  }
}), RQ = /* @__PURE__ */ Ko(lQ, [["__scopeId", "data-v-1d0d144f"]]);
export {
  KK as AddPanelModal,
  Qm as AgChart,
  TQ as ArgusBoard,
  eU as ArgusQueryEditor,
  ZK as DashboardHeader,
  iY as DashboardPage,
  DQ as Kbd,
  kQ as LogViewer,
  uU as MockQueryEditor,
  G1 as PanelContainer,
  EK as PanelEditorLayout,
  zK as PanelEditorModal,
  zQ as PanelLinksIcon,
  Vh as PanelRenderer,
  EQ as ServiceTopology,
  AQ as SimpleChart,
  J2 as TimeRangePicker,
  _Q as TraceWaterfall,
  jq as UPlotChart,
  eO as VariableBar,
  nK as VariableConfigModal,
  RQ as VizPickerPane,
  Hq as providePlotContext,
  IX as registerAllPlugins,
  MQ as usePlotContext
};
