import { inject as zt, ref as le, provide as Ft, readonly as IE, computed as E, reactive as $n, Fragment as Je, isVNode as ci, Comment as MP, Text as Xb, defineComponent as be, getCurrentInstance as fi, onMounted as At, onUpdated as Ya, onUnmounted as Vo, watch as Ie, unref as T, shallowRef as $e, watchEffect as It, onBeforeUnmount as qt, triggerRef as ME, createVNode as h, h as ko, Transition as Ei, withDirectives as er, resolveDirective as TE, cloneVNode as _l, render as El, nextTick as Yt, toRef as Kt, withModifiers as ui, vShow as Or, onBeforeMount as th, Teleport as nh, createTextVNode as Le, isRef as TP, toRefs as ys, toRaw as di, useAttrs as _E, onBeforeUpdate as Qb, getCurrentScope as _P, onScopeDispose as EP, TransitionGroup as Zb, onActivated as DP, openBlock as ne, createElementBlock as xe, normalizeStyle as Ht, normalizeClass as Pt, renderSlot as ai, createCommentVNode as nt, renderList as Ut, createBlock as dt, mergeProps as EE, withCtx as he, createSlots as Nx, createElementVNode as F, toDisplayString as oe, useSlots as DE, resolveComponent as yn, resolveDynamicComponent as AP, toValue as AE } from "vue";
import { merge as zx, isEmpty as RP } from "lodash-es";
import { defineStore as Jb } from "pinia";
import NP from "lodash-es/isPlainObject";
import ey from "lodash-es/isEqual";
import xg from "lodash-es/uniq";
import RE from "lodash-es/fromPairs";
import zP from "lodash-es/debounce";
import yo from "dayjs";
import NE from "dayjs/plugin/weekday";
import zE from "dayjs/plugin/localeData";
import BE from "dayjs/plugin/weekOfYear";
import FE from "dayjs/plugin/weekYear";
import LE from "dayjs/plugin/quarterOfYear";
import HE from "dayjs/plugin/advancedFormat";
import VE from "dayjs/plugin/customParseFormat";
import Kf from "lodash-es/cloneDeep";
import jE from "lodash-es/find";
import WE from "lodash-es/intersection";
import KE from "lodash-es/omit";
import BP from "lodash-es/pick";
import { isNumber as qE, isString as Xv, isBoolean as YE } from "lodash";
const GE = {
  "common.auto": "Auto",
  "common.all": "All",
  "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",
  "panel.remove.cancel": "Cancel",
  "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",
  "dashboard.empty": "No panels yet",
  "dashboard.emptyHint": 'Click "Edit" then "Add Panel" to get started',
  "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",
  "variable.custom.allValue.placeholder": "$_all",
  "variable.custom.col.text": "Display text",
  "variable.custom.col.value": "Value",
  "variable.custom.text.placeholder": "Display text",
  "variable.custom.value.placeholder": "Value",
  "variable.custom.addOption": "Add option",
  "variable.custom.allowCustomValue": "Allow custom values",
  "variable.custom.allowClear": "Allow clear",
  "variable.custom.multi": "Multi-value",
  "variable.custom.includeAll": "Include All option",
  "variable.general.label.placeholder": "Display label",
  "variable.general.description": "Description",
  "variable.general.description.placeholder": "Variable description",
  "variable.general.name.required": "Name is required",
  "variable.general.type.required": "Please select a type",
  "variable.general.showOn": "Show on dashboard",
  "variable.general.showOn.labelAndValue": "Label and value",
  "variable.general.showOn.value": "Value only",
  "variable.general.showOn.nothing": "Nothing",
  "variable.textbox.title": "Text box options",
  "variable.textbox.default": "Default value",
  "variable.textbox.default.placeholder": "Default value",
  "variable.textbox.width": "Input width",
  "variable.constant.title": "Constant options",
  "variable.constant.value": "Value",
  "variable.constant.value.required": "Value is required",
  "variable.constant.value.notNumber": "Please enter a valid number",
  "variable.constant.valueType": "Value type",
  "variable.constant.valueType.string": "String",
  "variable.constant.valueType.number": "Number",
  "variable.constant.hideFromList": "Hide from variable list",
  "variable.query.dsUid": "Datasource UID",
  "variable.query.dsUid.placeholder": "Enter datasource UID",
  "variable.query.queryType": "Query type",
  "variable.query.queryType.placeholder": "Select query type",
  "variable.query.queryType.group": "Host group",
  "variable.query.queryType.host": "Host",
  "variable.query.queryType.item": "Item",
  "variable.query.queryType.labelValues": "Label values",
  "variable.query.query": "Query",
  "variable.query.query.placeholder": "Query expression",
  "variable.query.regex": "Regex filter",
  "variable.query.regex.placeholder": "/regex/",
  "variable.query.sort": "Sort",
  "variable.query.sort.disabled": "Disabled",
  "variable.query.sort.alphabetical": "Alphabetical",
  "variable.query.sort.numeric": "Numerical",
  "variable.query.preview": "Preview",
  "variable.query.preview.placeholder": "(Refresh after save)",
  "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.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"
}, FP = {
  "panel.noData": "暂无数据",
  "common.auto": "自动",
  "common.all": "全部",
  "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": "删除",
  "panel.remove.cancel": "取消",
  "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": "刷新",
  "dashboard.empty": "暂无面板",
  "dashboard.emptyHint": '点击"编辑"后选择"添加面板"开始',
  "variable.modal.placeholder": '点击左侧"新增变量"开始配置',
  "variable.custom.title": "自定义选项",
  "variable.custom.add": "添加选项",
  "variable.custom.allValue": "全部值",
  "variable.custom.allValue.placeholder": "自定义全选值",
  "variable.custom.col.text": "显示文本",
  "variable.custom.col.value": "值",
  "variable.custom.text.placeholder": "显示文本",
  "variable.custom.value.placeholder": "值",
  "variable.custom.addOption": "添加选项",
  "variable.custom.allowCustomValue": "允许输入自定义值",
  "variable.custom.allowClear": "允许清空",
  "variable.custom.multi": "多选",
  "variable.custom.includeAll": "包含全选项",
  "variable.general.label.placeholder": "显示标签",
  "variable.general.description": "描述",
  "variable.general.description.placeholder": "变量描述",
  "variable.general.name.required": "名称不能为空",
  "variable.general.type.required": "请选择类型",
  "variable.general.showOn": "显示方式",
  "variable.general.showOn.labelAndValue": "标签和值",
  "variable.general.showOn.value": "仅值",
  "variable.general.showOn.nothing": "不显示",
  "variable.textbox.title": "文本框选项",
  "variable.textbox.default": "默认值",
  "variable.textbox.default.placeholder": "默认值",
  "variable.textbox.width": "输入框宽度",
  "variable.constant.title": "常量选项",
  "variable.constant.value": "值",
  "variable.constant.value.required": "值不能为空",
  "variable.constant.value.notNumber": "请输入有效数字",
  "variable.constant.valueType": "值类型",
  "variable.constant.valueType.string": "字符串",
  "variable.constant.valueType.number": "数字",
  "variable.constant.hideFromList": "从变量列表隐藏",
  "variable.query.dsUid": "数据源 UID",
  "variable.query.dsUid.placeholder": "输入数据源 UID",
  "variable.query.queryType": "查询类型",
  "variable.query.queryType.placeholder": "选择查询类型",
  "variable.query.queryType.group": "主机组",
  "variable.query.queryType.host": "主机",
  "variable.query.queryType.item": "监控项",
  "variable.query.queryType.labelValues": "标签值",
  "variable.query.query": "查询语句",
  "variable.query.query.placeholder": "查询表达式",
  "variable.query.regex": "提取正则",
  "variable.query.regex.placeholder": "/regex/",
  "variable.query.sort": "排序",
  "variable.query.sort.disabled": "禁用",
  "variable.query.sort.alphabetical": "字母顺序",
  "variable.query.sort.numeric": "数字顺序",
  "variable.query.preview": "预览结果",
  "variable.query.preview.placeholder": "（保存后刷新预览）",
  "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.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": "数量限制"
}, UE = { zh: FP, en: GE }, LP = Symbol("lang");
function XE(e) {
  Ft(LP, e);
}
function sn() {
  const e = zt(LP, le("zh"));
  function t(n, o) {
    let r = UE[e.value][n] ?? FP[n] ?? n;
    if (o)
      for (const [a, l] of Object.entries(o))
        r = r.replace(`{${a}}`, String(l));
    return r;
  }
  return { t, lang: e };
}
const QE = {
  hideHeader: !1,
  canEdit: !0,
  theme: null,
  lang: null,
  isEditing: null,
  initialEditingPanelId: null,
  datasourceConfig: null
}, HP = Symbol("argusBoardConfig");
function VP(e) {
  return { config: IE(E(e)) };
}
function ZE(e) {
  const t = VP(e);
  return Ft(HP, t), t;
}
function nc() {
  const e = zt(HP);
  return e || VP(() => QE);
}
async function JE(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 eD(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 ?? [];
}
//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var jP;
function yt() {
  return jP.apply(null, arguments);
}
function tD(e) {
  jP = e;
}
function kr(e) {
  return e instanceof Array || Object.prototype.toString.call(e) === "[object Array]";
}
function xs(e) {
  return e != null && Object.prototype.toString.call(e) === "[object Object]";
}
function Mn(e, t) {
  return Object.prototype.hasOwnProperty.call(e, t);
}
function ty(e) {
  if (Object.getOwnPropertyNames)
    return Object.getOwnPropertyNames(e).length === 0;
  var t;
  for (t in e)
    if (Mn(e, t))
      return !1;
  return !0;
}
function gi(e) {
  return e === void 0;
}
function Fa(e) {
  return typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]";
}
function kd(e) {
  return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]";
}
function WP(e, t) {
  var n = [], o, i = e.length;
  for (o = 0; o < i; ++o)
    n.push(t(e[o], o));
  return n;
}
function wl(e, t) {
  for (var n in t)
    Mn(t, n) && (e[n] = t[n]);
  return Mn(t, "toString") && (e.toString = t.toString), Mn(t, "valueOf") && (e.valueOf = t.valueOf), e;
}
function ia(e, t, n, o) {
  return pO(e, t, n, o, !0).utc();
}
function nD() {
  return {
    empty: !1,
    unusedTokens: [],
    unusedInput: [],
    overflow: -2,
    charsLeftOver: 0,
    nullInput: !1,
    invalidEra: null,
    invalidMonth: null,
    invalidFormat: !1,
    userInvalidated: !1,
    iso: !1,
    parsedDateParts: [],
    era: null,
    meridiem: null,
    rfc2822: !1,
    weekdayMismatch: !1
  };
}
function nn(e) {
  return e._pf == null && (e._pf = nD()), e._pf;
}
var Qv;
Array.prototype.some ? Qv = Array.prototype.some : Qv = function(e) {
  var t = Object(this), n = t.length >>> 0, o;
  for (o = 0; o < n; o++)
    if (o in t && e.call(this, t[o], o, t))
      return !0;
  return !1;
};
function ny(e) {
  var t = null, n = !1, o = e._d && !isNaN(e._d.getTime());
  if (o && (t = nn(e), n = Qv.call(t.parsedDateParts, function(i) {
    return i != null;
  }), o = t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && n), e._strict && (o = o && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === void 0)), Object.isFrozen == null || !Object.isFrozen(e))
    e._isValid = o;
  else
    return o;
  return e._isValid;
}
function oh(e) {
  var t = ia(NaN);
  return e != null ? wl(nn(t), e) : nn(t).userInvalidated = !0, t;
}
var Bx = yt.momentProperties = [], wg = !1;
function oy(e, t) {
  var n, o, i, r = Bx.length;
  if (gi(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), gi(t._i) || (e._i = t._i), gi(t._f) || (e._f = t._f), gi(t._l) || (e._l = t._l), gi(t._strict) || (e._strict = t._strict), gi(t._tzm) || (e._tzm = t._tzm), gi(t._isUTC) || (e._isUTC = t._isUTC), gi(t._offset) || (e._offset = t._offset), gi(t._pf) || (e._pf = nn(t)), gi(t._locale) || (e._locale = t._locale), r > 0)
    for (n = 0; n < r; n++)
      o = Bx[n], i = t[o], gi(i) || (e[o] = i);
  return e;
}
function Id(e) {
  oy(this, e), this._d = new Date(e._d != null ? e._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), wg === !1 && (wg = !0, yt.updateOffset(this), wg = !1);
}
function Ir(e) {
  return e instanceof Id || e != null && e._isAMomentObject != null;
}
function KP(e) {
  yt.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + e);
}
function or(e, t) {
  var n = !0;
  return wl(function() {
    if (yt.deprecationHandler != null && yt.deprecationHandler(null, e), n) {
      var o = [], i, r, a, l = arguments.length;
      for (r = 0; r < l; r++) {
        if (i = "", typeof arguments[r] == "object") {
          i += `
[` + r + "] ";
          for (a in arguments[0])
            Mn(arguments[0], a) && (i += a + ": " + arguments[0][a] + ", ");
          i = i.slice(0, -2);
        } else
          i = arguments[r];
        o.push(i);
      }
      KP(
        e + `
Arguments: ` + Array.prototype.slice.call(o).join("") + `
` + new Error().stack
      ), n = !1;
    }
    return t.apply(this, arguments);
  }, t);
}
var Fx = {};
function qP(e, t) {
  yt.deprecationHandler != null && yt.deprecationHandler(e, t), Fx[e] || (KP(t), Fx[e] = !0);
}
yt.suppressDeprecationWarnings = !1;
yt.deprecationHandler = null;
function ra(e) {
  return typeof Function < "u" && e instanceof Function || Object.prototype.toString.call(e) === "[object Function]";
}
function oD(e) {
  var t, n;
  for (n in e)
    Mn(e, n) && (t = e[n], ra(t) ? this[n] = t : this["_" + n] = t);
  this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp(
    (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
  );
}
function Zv(e, t) {
  var n = wl({}, e), o;
  for (o in t)
    Mn(t, o) && (xs(e[o]) && xs(t[o]) ? (n[o] = {}, wl(n[o], e[o]), wl(n[o], t[o])) : t[o] != null ? n[o] = t[o] : delete n[o]);
  for (o in e)
    Mn(e, o) && !Mn(t, o) && xs(e[o]) && (n[o] = wl({}, n[o]));
  return n;
}
function iy(e) {
  e != null && this.set(e);
}
var Jv;
Object.keys ? Jv = Object.keys : Jv = function(e) {
  var t, n = [];
  for (t in e)
    Mn(e, t) && n.push(t);
  return n;
};
var iD = {
  sameDay: "[Today at] LT",
  nextDay: "[Tomorrow at] LT",
  nextWeek: "dddd [at] LT",
  lastDay: "[Yesterday at] LT",
  lastWeek: "[Last] dddd [at] LT",
  sameElse: "L"
};
function rD(e, t, n) {
  var o = this._calendar[e] || this._calendar.sameElse;
  return ra(o) ? o.call(t, n) : o;
}
function ea(e, t, n) {
  var o = "" + Math.abs(e), i = t - o.length, r = e >= 0;
  return (r ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, i)).toString().substr(1) + o;
}
var ry = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, lf = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, Sg = {}, Pu = {};
function Lt(e, t, n, o) {
  var i = o;
  typeof o == "string" && (i = function() {
    return this[o]();
  }), e && (Pu[e] = i), t && (Pu[t[0]] = function() {
    return ea(i.apply(this, arguments), t[1], t[2]);
  }), n && (Pu[n] = function() {
    return this.localeData().ordinal(
      i.apply(this, arguments),
      e
    );
  });
}
function aD(e) {
  return e.match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, "");
}
function lD(e) {
  var t = e.match(ry), n, o;
  for (n = 0, o = t.length; n < o; n++)
    Pu[t[n]] ? t[n] = Pu[t[n]] : t[n] = aD(t[n]);
  return function(i) {
    var r = "", a;
    for (a = 0; a < o; a++)
      r += ra(t[a]) ? t[a].call(i, e) : t[a];
    return r;
  };
}
function qf(e, t) {
  return e.isValid() ? (t = YP(t, e.localeData()), Sg[t] = Sg[t] || lD(t), Sg[t](e)) : e.localeData().invalidDate();
}
function YP(e, t) {
  var n = 5;
  function o(i) {
    return t.longDateFormat(i) || i;
  }
  for (lf.lastIndex = 0; n >= 0 && lf.test(e); )
    e = e.replace(
      lf,
      o
    ), lf.lastIndex = 0, n -= 1;
  return e;
}
var sD = {
  LTS: "h:mm:ss A",
  LT: "h:mm A",
  L: "MM/DD/YYYY",
  LL: "MMMM D, YYYY",
  LLL: "MMMM D, YYYY h:mm A",
  LLLL: "dddd, MMMM D, YYYY h:mm A"
};
function uD(e) {
  var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()];
  return t || !n ? t : (this._longDateFormat[e] = n.match(ry).map(function(o) {
    return o === "MMMM" || o === "MM" || o === "DD" || o === "dddd" ? o.slice(1) : o;
  }).join(""), this._longDateFormat[e]);
}
var cD = "Invalid date";
function dD() {
  return this._invalidDate;
}
var fD = "%d", pD = /\d{1,2}/;
function hD(e) {
  return this._ordinal.replace("%d", e);
}
var gD = {
  future: "in %s",
  past: "%s ago",
  s: "a few seconds",
  ss: "%d seconds",
  m: "a minute",
  mm: "%d minutes",
  h: "an hour",
  hh: "%d hours",
  d: "a day",
  dd: "%d days",
  w: "a week",
  ww: "%d weeks",
  M: "a month",
  MM: "%d months",
  y: "a year",
  yy: "%d years"
};
function vD(e, t, n, o) {
  var i = this._relativeTime[n];
  return ra(i) ? i(e, t, n, o) : i.replace(/%d/i, e);
}
function mD(e, t) {
  var n = this._relativeTime[e > 0 ? "future" : "past"];
  return ra(n) ? n(t) : n.replace(/%s/i, t);
}
var Lx = {
  D: "date",
  dates: "date",
  date: "date",
  d: "day",
  days: "day",
  day: "day",
  e: "weekday",
  weekdays: "weekday",
  weekday: "weekday",
  E: "isoWeekday",
  isoweekdays: "isoWeekday",
  isoweekday: "isoWeekday",
  DDD: "dayOfYear",
  dayofyears: "dayOfYear",
  dayofyear: "dayOfYear",
  h: "hour",
  hours: "hour",
  hour: "hour",
  ms: "millisecond",
  milliseconds: "millisecond",
  millisecond: "millisecond",
  m: "minute",
  minutes: "minute",
  minute: "minute",
  M: "month",
  months: "month",
  month: "month",
  Q: "quarter",
  quarters: "quarter",
  quarter: "quarter",
  s: "second",
  seconds: "second",
  second: "second",
  gg: "weekYear",
  weekyears: "weekYear",
  weekyear: "weekYear",
  GG: "isoWeekYear",
  isoweekyears: "isoWeekYear",
  isoweekyear: "isoWeekYear",
  w: "week",
  weeks: "week",
  week: "week",
  W: "isoWeek",
  isoweeks: "isoWeek",
  isoweek: "isoWeek",
  y: "year",
  years: "year",
  year: "year"
};
function ir(e) {
  return typeof e == "string" ? Lx[e] || Lx[e.toLowerCase()] : void 0;
}
function ay(e) {
  var t = {}, n, o;
  for (o in e)
    Mn(e, o) && (n = ir(o), n && (t[n] = e[o]));
  return t;
}
var bD = {
  date: 9,
  day: 11,
  weekday: 11,
  isoWeekday: 11,
  dayOfYear: 4,
  hour: 13,
  millisecond: 16,
  minute: 14,
  month: 8,
  quarter: 7,
  second: 15,
  weekYear: 1,
  isoWeekYear: 1,
  week: 5,
  isoWeek: 5,
  year: 1
};
function yD(e) {
  var t = [], n;
  for (n in e)
    Mn(e, n) && t.push({ unit: n, priority: bD[n] });
  return t.sort(function(o, i) {
    return o.priority - i.priority;
  }), t;
}
var GP = /\d/, Ri = /\d\d/, UP = /\d{3}/, ly = /\d{4}/, ih = /[+-]?\d{6}/, no = /\d\d?/, XP = /\d\d\d\d?/, QP = /\d\d\d\d\d\d?/, rh = /\d{1,3}/, sy = /\d{1,4}/, ah = /[+-]?\d{1,6}/, oc = /\d+/, lh = /[+-]?\d+/, xD = /Z|[+-]\d\d:?\d\d/gi, sh = /Z|[+-]\d\d(?::?\d\d)?/gi, wD = /[+-]?\d+(\.\d{1,3})?/, Md = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, ic = /^[1-9]\d?/, uy = /^([1-9]\d|\d)/, bp;
bp = {};
function $t(e, t, n) {
  bp[e] = ra(t) ? t : function(o, i) {
    return o && n ? n : t;
  };
}
function SD(e, t) {
  return Mn(bp, e) ? bp[e](t._strict, t._locale) : new RegExp(CD(e));
}
function CD(e) {
  return Da(
    e.replace("\\", "").replace(
      /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
      function(t, n, o, i, r) {
        return n || o || i || r;
      }
    )
  );
}
function Da(e) {
  return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
function Qi(e) {
  return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
}
function mn(e) {
  var t = +e, n = 0;
  return t !== 0 && isFinite(t) && (n = Qi(t)), n;
}
var em = {};
function jn(e, t) {
  var n, o = t, i;
  for (typeof e == "string" && (e = [e]), Fa(t) && (o = function(r, a) {
    a[t] = mn(r);
  }), i = e.length, n = 0; n < i; n++)
    em[e[n]] = o;
}
function Td(e, t) {
  jn(e, function(n, o, i, r) {
    i._w = i._w || {}, t(n, i._w, i, r);
  });
}
function $D(e, t, n) {
  t != null && Mn(em, e) && em[e](t, n._a, n, e);
}
function uh(e) {
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
}
var Zo = 0, Ma = 1, Ur = 2, _o = 3, wr = 4, Ta = 5, gs = 6, PD = 7, OD = 8;
Lt("Y", 0, 0, function() {
  var e = this.year();
  return e <= 9999 ? ea(e, 4) : "+" + e;
});
Lt(0, ["YY", 2], 0, function() {
  return this.year() % 100;
});
Lt(0, ["YYYY", 4], 0, "year");
Lt(0, ["YYYYY", 5], 0, "year");
Lt(0, ["YYYYYY", 6, !0], 0, "year");
$t("Y", lh);
$t("YY", no, Ri);
$t("YYYY", sy, ly);
$t("YYYYY", ah, ih);
$t("YYYYYY", ah, ih);
jn(["YYYYY", "YYYYYY"], Zo);
jn("YYYY", function(e, t) {
  t[Zo] = e.length === 2 ? yt.parseTwoDigitYear(e) : mn(e);
});
jn("YY", function(e, t) {
  t[Zo] = yt.parseTwoDigitYear(e);
});
jn("Y", function(e, t) {
  t[Zo] = parseInt(e, 10);
});
function qc(e) {
  return uh(e) ? 366 : 365;
}
yt.parseTwoDigitYear = function(e) {
  return mn(e) + (mn(e) > 68 ? 1900 : 2e3);
};
var ZP = rc("FullYear", !0);
function kD() {
  return uh(this.year());
}
function rc(e, t) {
  return function(n) {
    return n != null ? (JP(this, e, n), yt.updateOffset(this, t), this) : ud(this, e);
  };
}
function ud(e, t) {
  if (!e.isValid())
    return NaN;
  var n = e._d, o = e._isUTC;
  switch (t) {
    case "Milliseconds":
      return o ? n.getUTCMilliseconds() : n.getMilliseconds();
    case "Seconds":
      return o ? n.getUTCSeconds() : n.getSeconds();
    case "Minutes":
      return o ? n.getUTCMinutes() : n.getMinutes();
    case "Hours":
      return o ? n.getUTCHours() : n.getHours();
    case "Date":
      return o ? n.getUTCDate() : n.getDate();
    case "Day":
      return o ? n.getUTCDay() : n.getDay();
    case "Month":
      return o ? n.getUTCMonth() : n.getMonth();
    case "FullYear":
      return o ? n.getUTCFullYear() : n.getFullYear();
    default:
      return NaN;
  }
}
function JP(e, t, n) {
  var o, i, r, a, l;
  if (!(!e.isValid() || isNaN(n))) {
    switch (o = e._d, i = e._isUTC, t) {
      case "Milliseconds":
        return void (i ? o.setUTCMilliseconds(n) : o.setMilliseconds(n));
      case "Seconds":
        return void (i ? o.setUTCSeconds(n) : o.setSeconds(n));
      case "Minutes":
        return void (i ? o.setUTCMinutes(n) : o.setMinutes(n));
      case "Hours":
        return void (i ? o.setUTCHours(n) : o.setHours(n));
      case "Date":
        return void (i ? o.setUTCDate(n) : o.setDate(n));
      // case 'Day': // Not real
      //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
      // case 'Month': // Not used because we need to pass two variables
      //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
      case "FullYear":
        break;
      // See below ...
      default:
        return;
    }
    r = n, a = e.month(), l = e.date(), l = l === 29 && a === 1 && !uh(r) ? 28 : l, i ? o.setUTCFullYear(r, a, l) : o.setFullYear(r, a, l);
  }
}
function ID(e) {
  return e = ir(e), ra(this[e]) ? this[e]() : this;
}
function MD(e, t) {
  if (typeof e == "object") {
    e = ay(e);
    var n = yD(e), o, i = n.length;
    for (o = 0; o < i; o++)
      this[n[o].unit](e[n[o].unit]);
  } else if (e = ir(e), ra(this[e]))
    return this[e](t);
  return this;
}
function TD(e, t) {
  return (e % t + t) % t;
}
var bo;
Array.prototype.indexOf ? bo = Array.prototype.indexOf : bo = function(e) {
  var t;
  for (t = 0; t < this.length; ++t)
    if (this[t] === e)
      return t;
  return -1;
};
function cy(e, t) {
  if (isNaN(e) || isNaN(t))
    return NaN;
  var n = TD(t, 12);
  return e += (t - n) / 12, n === 1 ? uh(e) ? 29 : 28 : 31 - n % 7 % 2;
}
Lt("M", ["MM", 2], "Mo", function() {
  return this.month() + 1;
});
Lt("MMM", 0, 0, function(e) {
  return this.localeData().monthsShort(this, e);
});
Lt("MMMM", 0, 0, function(e) {
  return this.localeData().months(this, e);
});
$t("M", no, ic);
$t("MM", no, Ri);
$t("MMM", function(e, t) {
  return t.monthsShortRegex(e);
});
$t("MMMM", function(e, t) {
  return t.monthsRegex(e);
});
jn(["M", "MM"], function(e, t) {
  t[Ma] = mn(e) - 1;
});
jn(["MMM", "MMMM"], function(e, t, n, o) {
  var i = n._locale.monthsParse(e, o, n._strict);
  i != null ? t[Ma] = i : nn(n).invalidMonth = e;
});
var _D = "January_February_March_April_May_June_July_August_September_October_November_December".split(
  "_"
), eO = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), tO = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, ED = Md, DD = Md;
function AD(e, t) {
  return e ? kr(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || tO).test(t) ? "format" : "standalone"][e.month()] : kr(this._months) ? this._months : this._months.standalone;
}
function RD(e, t) {
  return e ? kr(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[tO.test(t) ? "format" : "standalone"][e.month()] : kr(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
}
function ND(e, t, n) {
  var o, i, r, a = e.toLocaleLowerCase();
  if (!this._monthsParse)
    for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], o = 0; o < 12; ++o)
      r = ia([2e3, o]), this._shortMonthsParse[o] = this.monthsShort(
        r,
        ""
      ).toLocaleLowerCase(), this._longMonthsParse[o] = this.months(r, "").toLocaleLowerCase();
  return n ? t === "MMM" ? (i = bo.call(this._shortMonthsParse, a), i !== -1 ? i : null) : (i = bo.call(this._longMonthsParse, a), i !== -1 ? i : null) : t === "MMM" ? (i = bo.call(this._shortMonthsParse, a), i !== -1 ? i : (i = bo.call(this._longMonthsParse, a), i !== -1 ? i : null)) : (i = bo.call(this._longMonthsParse, a), i !== -1 ? i : (i = bo.call(this._shortMonthsParse, a), i !== -1 ? i : null));
}
function zD(e, t, n) {
  var o, i, r;
  if (this._monthsParseExact)
    return ND.call(this, e, t, n);
  for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), o = 0; o < 12; o++) {
    if (i = ia([2e3, o]), n && !this._longMonthsParse[o] && (this._longMonthsParse[o] = new RegExp(
      "^" + this.months(i, "").replace(".", "") + "$",
      "i"
    ), this._shortMonthsParse[o] = new RegExp(
      "^" + this.monthsShort(i, "").replace(".", "") + "$",
      "i"
    )), !n && !this._monthsParse[o] && (r = "^" + this.months(i, "") + "|^" + this.monthsShort(i, ""), this._monthsParse[o] = new RegExp(r.replace(".", ""), "i")), n && t === "MMMM" && this._longMonthsParse[o].test(e))
      return o;
    if (n && t === "MMM" && this._shortMonthsParse[o].test(e))
      return o;
    if (!n && this._monthsParse[o].test(e))
      return o;
  }
}
function nO(e, t) {
  if (!e.isValid())
    return e;
  if (typeof t == "string") {
    if (/^\d+$/.test(t))
      t = mn(t);
    else if (t = e.localeData().monthsParse(t), !Fa(t))
      return e;
  }
  var n = t, o = e.date();
  return o = o < 29 ? o : Math.min(o, cy(e.year(), n)), e._isUTC ? e._d.setUTCMonth(n, o) : e._d.setMonth(n, o), e;
}
function oO(e) {
  return e != null ? (nO(this, e), yt.updateOffset(this, !0), this) : ud(this, "Month");
}
function BD() {
  return cy(this.year(), this.month());
}
function FD(e) {
  return this._monthsParseExact ? (Mn(this, "_monthsRegex") || iO.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (Mn(this, "_monthsShortRegex") || (this._monthsShortRegex = ED), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);
}
function LD(e) {
  return this._monthsParseExact ? (Mn(this, "_monthsRegex") || iO.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (Mn(this, "_monthsRegex") || (this._monthsRegex = DD), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);
}
function iO() {
  function e(s, u) {
    return u.length - s.length;
  }
  var t = [], n = [], o = [], i, r, a, l;
  for (i = 0; i < 12; i++)
    r = ia([2e3, i]), a = Da(this.monthsShort(r, "")), l = Da(this.months(r, "")), t.push(a), n.push(l), o.push(l), o.push(a);
  t.sort(e), n.sort(e), o.sort(e), this._monthsRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._monthsShortStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function HD(e, t, n, o, i, r, a) {
  var l;
  return e < 100 && e >= 0 ? (l = new Date(e + 400, t, n, o, i, r, a), isFinite(l.getFullYear()) && l.setFullYear(e)) : l = new Date(e, t, n, o, i, r, a), l;
}
function cd(e) {
  var t, n;
  return e < 100 && e >= 0 ? (n = Array.prototype.slice.call(arguments), n[0] = e + 400, t = new Date(Date.UTC.apply(null, n)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) : t = new Date(Date.UTC.apply(null, arguments)), t;
}
function yp(e, t, n) {
  var o = 7 + t - n, i = (7 + cd(e, 0, o).getUTCDay() - t) % 7;
  return -i + o - 1;
}
function rO(e, t, n, o, i) {
  var r = (7 + n - o) % 7, a = yp(e, o, i), l = 1 + 7 * (t - 1) + r + a, s, u;
  return l <= 0 ? (s = e - 1, u = qc(s) + l) : l > qc(e) ? (s = e + 1, u = l - qc(e)) : (s = e, u = l), {
    year: s,
    dayOfYear: u
  };
}
function dd(e, t, n) {
  var o = yp(e.year(), t, n), i = Math.floor((e.dayOfYear() - o - 1) / 7) + 1, r, a;
  return i < 1 ? (a = e.year() - 1, r = i + Aa(a, t, n)) : i > Aa(e.year(), t, n) ? (r = i - Aa(e.year(), t, n), a = e.year() + 1) : (a = e.year(), r = i), {
    week: r,
    year: a
  };
}
function Aa(e, t, n) {
  var o = yp(e, t, n), i = yp(e + 1, t, n);
  return (qc(e) - o + i) / 7;
}
Lt("w", ["ww", 2], "wo", "week");
Lt("W", ["WW", 2], "Wo", "isoWeek");
$t("w", no, ic);
$t("ww", no, Ri);
$t("W", no, ic);
$t("WW", no, Ri);
Td(
  ["w", "ww", "W", "WW"],
  function(e, t, n, o) {
    t[o.substr(0, 1)] = mn(e);
  }
);
function VD(e) {
  return dd(e, this._week.dow, this._week.doy).week;
}
var jD = {
  dow: 0,
  // Sunday is the first day of the week.
  doy: 6
  // The week that contains Jan 6th is the first week of the year.
};
function WD() {
  return this._week.dow;
}
function KD() {
  return this._week.doy;
}
function qD(e) {
  var t = this.localeData().week(this);
  return e == null ? t : this.add((e - t) * 7, "d");
}
function YD(e) {
  var t = dd(this, 1, 4).week;
  return e == null ? t : this.add((e - t) * 7, "d");
}
Lt("d", 0, "do", "day");
Lt("dd", 0, 0, function(e) {
  return this.localeData().weekdaysMin(this, e);
});
Lt("ddd", 0, 0, function(e) {
  return this.localeData().weekdaysShort(this, e);
});
Lt("dddd", 0, 0, function(e) {
  return this.localeData().weekdays(this, e);
});
Lt("e", 0, 0, "weekday");
Lt("E", 0, 0, "isoWeekday");
$t("d", no);
$t("e", no);
$t("E", no);
$t("dd", function(e, t) {
  return t.weekdaysMinRegex(e);
});
$t("ddd", function(e, t) {
  return t.weekdaysShortRegex(e);
});
$t("dddd", function(e, t) {
  return t.weekdaysRegex(e);
});
Td(["dd", "ddd", "dddd"], function(e, t, n, o) {
  var i = n._locale.weekdaysParse(e, o, n._strict);
  i != null ? t.d = i : nn(n).invalidWeekday = e;
});
Td(["d", "e", "E"], function(e, t, n, o) {
  t[o] = mn(e);
});
function GD(e, t) {
  return typeof e != "string" ? e : isNaN(e) ? (e = t.weekdaysParse(e), typeof e == "number" ? e : null) : parseInt(e, 10);
}
function UD(e, t) {
  return typeof e == "string" ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e;
}
function dy(e, t) {
  return e.slice(t, 7).concat(e.slice(0, t));
}
var XD = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), aO = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), QD = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), ZD = Md, JD = Md, eA = Md;
function tA(e, t) {
  var n = kr(this._weekdays) ? this._weekdays : this._weekdays[e && e !== !0 && this._weekdays.isFormat.test(t) ? "format" : "standalone"];
  return e === !0 ? dy(n, this._week.dow) : e ? n[e.day()] : n;
}
function nA(e) {
  return e === !0 ? dy(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;
}
function oA(e) {
  return e === !0 ? dy(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;
}
function iA(e, t, n) {
  var o, i, r, a = e.toLocaleLowerCase();
  if (!this._weekdaysParse)
    for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], o = 0; o < 7; ++o)
      r = ia([2e3, 1]).day(o), this._minWeekdaysParse[o] = this.weekdaysMin(
        r,
        ""
      ).toLocaleLowerCase(), this._shortWeekdaysParse[o] = this.weekdaysShort(
        r,
        ""
      ).toLocaleLowerCase(), this._weekdaysParse[o] = this.weekdays(r, "").toLocaleLowerCase();
  return n ? t === "dddd" ? (i = bo.call(this._weekdaysParse, a), i !== -1 ? i : null) : t === "ddd" ? (i = bo.call(this._shortWeekdaysParse, a), i !== -1 ? i : null) : (i = bo.call(this._minWeekdaysParse, a), i !== -1 ? i : null) : t === "dddd" ? (i = bo.call(this._weekdaysParse, a), i !== -1 || (i = bo.call(this._shortWeekdaysParse, a), i !== -1) ? i : (i = bo.call(this._minWeekdaysParse, a), i !== -1 ? i : null)) : t === "ddd" ? (i = bo.call(this._shortWeekdaysParse, a), i !== -1 || (i = bo.call(this._weekdaysParse, a), i !== -1) ? i : (i = bo.call(this._minWeekdaysParse, a), i !== -1 ? i : null)) : (i = bo.call(this._minWeekdaysParse, a), i !== -1 || (i = bo.call(this._weekdaysParse, a), i !== -1) ? i : (i = bo.call(this._shortWeekdaysParse, a), i !== -1 ? i : null));
}
function rA(e, t, n) {
  var o, i, r;
  if (this._weekdaysParseExact)
    return iA.call(this, e, t, n);
  for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), o = 0; o < 7; o++) {
    if (i = ia([2e3, 1]).day(o), n && !this._fullWeekdaysParse[o] && (this._fullWeekdaysParse[o] = new RegExp(
      "^" + this.weekdays(i, "").replace(".", "\\.?") + "$",
      "i"
    ), this._shortWeekdaysParse[o] = new RegExp(
      "^" + this.weekdaysShort(i, "").replace(".", "\\.?") + "$",
      "i"
    ), this._minWeekdaysParse[o] = new RegExp(
      "^" + this.weekdaysMin(i, "").replace(".", "\\.?") + "$",
      "i"
    )), this._weekdaysParse[o] || (r = "^" + this.weekdays(i, "") + "|^" + this.weekdaysShort(i, "") + "|^" + this.weekdaysMin(i, ""), this._weekdaysParse[o] = new RegExp(r.replace(".", ""), "i")), n && t === "dddd" && this._fullWeekdaysParse[o].test(e))
      return o;
    if (n && t === "ddd" && this._shortWeekdaysParse[o].test(e))
      return o;
    if (n && t === "dd" && this._minWeekdaysParse[o].test(e))
      return o;
    if (!n && this._weekdaysParse[o].test(e))
      return o;
  }
}
function aA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = ud(this, "Day");
  return e != null ? (e = GD(e, this.localeData()), this.add(e - t, "d")) : t;
}
function lA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = (this.day() + 7 - this.localeData()._week.dow) % 7;
  return e == null ? t : this.add(e - t, "d");
}
function sA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    var t = UD(e, this.localeData());
    return this.day(this.day() % 7 ? t : t - 7);
  } else
    return this.day() || 7;
}
function uA(e) {
  return this._weekdaysParseExact ? (Mn(this, "_weekdaysRegex") || fy.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (Mn(this, "_weekdaysRegex") || (this._weekdaysRegex = ZD), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);
}
function cA(e) {
  return this._weekdaysParseExact ? (Mn(this, "_weekdaysRegex") || fy.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (Mn(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = JD), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
}
function dA(e) {
  return this._weekdaysParseExact ? (Mn(this, "_weekdaysRegex") || fy.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (Mn(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = eA), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
}
function fy() {
  function e(c, d) {
    return d.length - c.length;
  }
  var t = [], n = [], o = [], i = [], r, a, l, s, u;
  for (r = 0; r < 7; r++)
    a = ia([2e3, 1]).day(r), l = Da(this.weekdaysMin(a, "")), s = Da(this.weekdaysShort(a, "")), u = Da(this.weekdays(a, "")), t.push(l), n.push(s), o.push(u), i.push(l), i.push(s), i.push(u);
  t.sort(e), n.sort(e), o.sort(e), i.sort(e), this._weekdaysRegex = new RegExp("^(" + i.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
    "^(" + o.join("|") + ")",
    "i"
  ), this._weekdaysShortStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._weekdaysMinStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function py() {
  return this.hours() % 12 || 12;
}
function fA() {
  return this.hours() || 24;
}
Lt("H", ["HH", 2], 0, "hour");
Lt("h", ["hh", 2], 0, py);
Lt("k", ["kk", 2], 0, fA);
Lt("hmm", 0, 0, function() {
  return "" + py.apply(this) + ea(this.minutes(), 2);
});
Lt("hmmss", 0, 0, function() {
  return "" + py.apply(this) + ea(this.minutes(), 2) + ea(this.seconds(), 2);
});
Lt("Hmm", 0, 0, function() {
  return "" + this.hours() + ea(this.minutes(), 2);
});
Lt("Hmmss", 0, 0, function() {
  return "" + this.hours() + ea(this.minutes(), 2) + ea(this.seconds(), 2);
});
function lO(e, t) {
  Lt(e, 0, 0, function() {
    return this.localeData().meridiem(
      this.hours(),
      this.minutes(),
      t
    );
  });
}
lO("a", !0);
lO("A", !1);
function sO(e, t) {
  return t._meridiemParse;
}
$t("a", sO);
$t("A", sO);
$t("H", no, uy);
$t("h", no, ic);
$t("k", no, ic);
$t("HH", no, Ri);
$t("hh", no, Ri);
$t("kk", no, Ri);
$t("hmm", XP);
$t("hmmss", QP);
$t("Hmm", XP);
$t("Hmmss", QP);
jn(["H", "HH"], _o);
jn(["k", "kk"], function(e, t, n) {
  var o = mn(e);
  t[_o] = o === 24 ? 0 : o;
});
jn(["a", "A"], function(e, t, n) {
  n._isPm = n._locale.isPM(e), n._meridiem = e;
});
jn(["h", "hh"], function(e, t, n) {
  t[_o] = mn(e), nn(n).bigHour = !0;
});
jn("hmm", function(e, t, n) {
  var o = e.length - 2;
  t[_o] = mn(e.substr(0, o)), t[wr] = mn(e.substr(o)), nn(n).bigHour = !0;
});
jn("hmmss", function(e, t, n) {
  var o = e.length - 4, i = e.length - 2;
  t[_o] = mn(e.substr(0, o)), t[wr] = mn(e.substr(o, 2)), t[Ta] = mn(e.substr(i)), nn(n).bigHour = !0;
});
jn("Hmm", function(e, t, n) {
  var o = e.length - 2;
  t[_o] = mn(e.substr(0, o)), t[wr] = mn(e.substr(o));
});
jn("Hmmss", function(e, t, n) {
  var o = e.length - 4, i = e.length - 2;
  t[_o] = mn(e.substr(0, o)), t[wr] = mn(e.substr(o, 2)), t[Ta] = mn(e.substr(i));
});
function pA(e) {
  return (e + "").toLowerCase().charAt(0) === "p";
}
var hA = /[ap]\.?m?\.?/i, gA = rc("Hours", !0);
function vA(e, t, n) {
  return e > 11 ? n ? "pm" : "PM" : n ? "am" : "AM";
}
var uO = {
  calendar: iD,
  longDateFormat: sD,
  invalidDate: cD,
  ordinal: fD,
  dayOfMonthOrdinalParse: pD,
  relativeTime: gD,
  months: _D,
  monthsShort: eO,
  week: jD,
  weekdays: XD,
  weekdaysMin: QD,
  weekdaysShort: aO,
  meridiemParse: hA
}, ro = {}, Pc = {}, fd;
function mA(e, t) {
  var n, o = Math.min(e.length, t.length);
  for (n = 0; n < o; n += 1)
    if (e[n] !== t[n])
      return n;
  return o;
}
function Hx(e) {
  return e && e.toLowerCase().replace("_", "-");
}
function bA(e) {
  for (var t = 0, n, o, i, r; t < e.length; ) {
    for (r = Hx(e[t]).split("-"), n = r.length, o = Hx(e[t + 1]), o = o ? o.split("-") : null; n > 0; ) {
      if (i = ch(r.slice(0, n).join("-")), i)
        return i;
      if (o && o.length >= n && mA(r, o) >= n - 1)
        break;
      n--;
    }
    t++;
  }
  return fd;
}
function yA(e) {
  return !!(e && e.match("^[^/\\\\]*$"));
}
function ch(e) {
  var t = null, n;
  if (ro[e] === void 0 && typeof module < "u" && module && module.exports && yA(e))
    try {
      t = fd._abbr, n = require, n("./locale/" + e), kl(t);
    } catch {
      ro[e] = null;
    }
  return ro[e];
}
function kl(e, t) {
  var n;
  return e && (gi(t) ? n = Ga(e) : n = hy(e, t), n ? fd = n : typeof console < "u" && console.warn && console.warn(
    "Locale " + e + " not found. Did you forget to load it?"
  )), fd._abbr;
}
function hy(e, t) {
  if (t !== null) {
    var n, o = uO;
    if (t.abbr = e, ro[e] != null)
      qP(
        "defineLocaleOverride",
        "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
      ), o = ro[e]._config;
    else if (t.parentLocale != null)
      if (ro[t.parentLocale] != null)
        o = ro[t.parentLocale]._config;
      else if (n = ch(t.parentLocale), n != null)
        o = n._config;
      else
        return Pc[t.parentLocale] || (Pc[t.parentLocale] = []), Pc[t.parentLocale].push({
          name: e,
          config: t
        }), null;
    return ro[e] = new iy(Zv(o, t)), Pc[e] && Pc[e].forEach(function(i) {
      hy(i.name, i.config);
    }), kl(e), ro[e];
  } else
    return delete ro[e], null;
}
function xA(e, t) {
  if (t != null) {
    var n, o, i = uO;
    ro[e] != null && ro[e].parentLocale != null ? ro[e].set(Zv(ro[e]._config, t)) : (o = ch(e), o != null && (i = o._config), t = Zv(i, t), o == null && (t.abbr = e), n = new iy(t), n.parentLocale = ro[e], ro[e] = n), kl(e);
  } else
    ro[e] != null && (ro[e].parentLocale != null ? (ro[e] = ro[e].parentLocale, e === kl() && kl(e)) : ro[e] != null && delete ro[e]);
  return ro[e];
}
function Ga(e) {
  var t;
  if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e)
    return fd;
  if (!kr(e)) {
    if (t = ch(e), t)
      return t;
    e = [e];
  }
  return bA(e);
}
function wA() {
  return Jv(ro);
}
function gy(e) {
  var t, n = e._a;
  return n && nn(e).overflow === -2 && (t = n[Ma] < 0 || n[Ma] > 11 ? Ma : n[Ur] < 1 || n[Ur] > cy(n[Zo], n[Ma]) ? Ur : n[_o] < 0 || n[_o] > 24 || n[_o] === 24 && (n[wr] !== 0 || n[Ta] !== 0 || n[gs] !== 0) ? _o : n[wr] < 0 || n[wr] > 59 ? wr : n[Ta] < 0 || n[Ta] > 59 ? Ta : n[gs] < 0 || n[gs] > 999 ? gs : -1, nn(e)._overflowDayOfYear && (t < Zo || t > Ur) && (t = Ur), nn(e)._overflowWeeks && t === -1 && (t = PD), nn(e)._overflowWeekday && t === -1 && (t = OD), nn(e).overflow = t), e;
}
var SA = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, CA = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, $A = /Z|[+-]\d\d(?::?\d\d)?/, sf = [
  ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
  ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
  ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
  ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
  ["YYYY-DDD", /\d{4}-\d{3}/],
  ["YYYY-MM", /\d{4}-\d\d/, !1],
  ["YYYYYYMMDD", /[+-]\d{10}/],
  ["YYYYMMDD", /\d{8}/],
  ["GGGG[W]WWE", /\d{4}W\d{3}/],
  ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
  ["YYYYDDD", /\d{7}/],
  ["YYYYMM", /\d{6}/, !1],
  ["YYYY", /\d{4}/, !1]
], Cg = [
  ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
  ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
  ["HH:mm:ss", /\d\d:\d\d:\d\d/],
  ["HH:mm", /\d\d:\d\d/],
  ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
  ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
  ["HHmmss", /\d\d\d\d\d\d/],
  ["HHmm", /\d\d\d\d/],
  ["HH", /\d\d/]
], PA = /^\/?Date\((-?\d+)/i, OA = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, kA = {
  UT: 0,
  GMT: 0,
  EDT: -240,
  EST: -300,
  CDT: -300,
  CST: -360,
  MDT: -360,
  MST: -420,
  PDT: -420,
  PST: -480
};
function cO(e) {
  var t, n, o = e._i, i = SA.exec(o) || CA.exec(o), r, a, l, s, u = sf.length, c = Cg.length;
  if (i) {
    for (nn(e).iso = !0, t = 0, n = u; t < n; t++)
      if (sf[t][1].exec(i[1])) {
        a = sf[t][0], r = sf[t][2] !== !1;
        break;
      }
    if (a == null) {
      e._isValid = !1;
      return;
    }
    if (i[3]) {
      for (t = 0, n = c; t < n; t++)
        if (Cg[t][1].exec(i[3])) {
          l = (i[2] || " ") + Cg[t][0];
          break;
        }
      if (l == null) {
        e._isValid = !1;
        return;
      }
    }
    if (!r && l != null) {
      e._isValid = !1;
      return;
    }
    if (i[4])
      if ($A.exec(i[4]))
        s = "Z";
      else {
        e._isValid = !1;
        return;
      }
    e._f = a + (l || "") + (s || ""), my(e);
  } else
    e._isValid = !1;
}
function IA(e, t, n, o, i, r) {
  var a = [
    MA(e),
    eO.indexOf(t),
    parseInt(n, 10),
    parseInt(o, 10),
    parseInt(i, 10)
  ];
  return r && a.push(parseInt(r, 10)), a;
}
function MA(e) {
  var t = parseInt(e, 10);
  return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t;
}
function TA(e) {
  return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function _A(e, t, n) {
  if (e) {
    var o = aO.indexOf(e), i = new Date(
      t[0],
      t[1],
      t[2]
    ).getDay();
    if (o !== i)
      return nn(n).weekdayMismatch = !0, n._isValid = !1, !1;
  }
  return !0;
}
function EA(e, t, n) {
  if (e)
    return kA[e];
  if (t)
    return 0;
  var o = parseInt(n, 10), i = o % 100, r = (o - i) / 100;
  return r * 60 + i;
}
function dO(e) {
  var t = OA.exec(TA(e._i)), n;
  if (t) {
    if (n = IA(
      t[4],
      t[3],
      t[2],
      t[5],
      t[6],
      t[7]
    ), !_A(t[1], n, e))
      return;
    e._a = n, e._tzm = EA(t[8], t[9], t[10]), e._d = cd.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), nn(e).rfc2822 = !0;
  } else
    e._isValid = !1;
}
function DA(e) {
  var t = PA.exec(e._i);
  if (t !== null) {
    e._d = /* @__PURE__ */ new Date(+t[1]);
    return;
  }
  if (cO(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  if (dO(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  e._strict ? e._isValid = !1 : yt.createFromInputFallback(e);
}
yt.createFromInputFallback = or(
  "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
  function(e) {
    e._d = /* @__PURE__ */ new Date(e._i + (e._useUTC ? " UTC" : ""));
  }
);
function hu(e, t, n) {
  return e ?? t ?? n;
}
function AA(e) {
  var t = new Date(yt.now());
  return e._useUTC ? [
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate()
  ] : [t.getFullYear(), t.getMonth(), t.getDate()];
}
function vy(e) {
  var t, n, o = [], i, r, a;
  if (!e._d) {
    for (i = AA(e), e._w && e._a[Ur] == null && e._a[Ma] == null && RA(e), e._dayOfYear != null && (a = hu(e._a[Zo], i[Zo]), (e._dayOfYear > qc(a) || e._dayOfYear === 0) && (nn(e)._overflowDayOfYear = !0), n = cd(a, 0, e._dayOfYear), e._a[Ma] = n.getUTCMonth(), e._a[Ur] = n.getUTCDate()), t = 0; t < 3 && e._a[t] == null; ++t)
      e._a[t] = o[t] = i[t];
    for (; t < 7; t++)
      e._a[t] = o[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t];
    e._a[_o] === 24 && e._a[wr] === 0 && e._a[Ta] === 0 && e._a[gs] === 0 && (e._nextDay = !0, e._a[_o] = 0), e._d = (e._useUTC ? cd : HD).apply(
      null,
      o
    ), r = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), e._tzm != null && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[_o] = 24), e._w && typeof e._w.d < "u" && e._w.d !== r && (nn(e).weekdayMismatch = !0);
  }
}
function RA(e) {
  var t, n, o, i, r, a, l, s, u;
  t = e._w, t.GG != null || t.W != null || t.E != null ? (r = 1, a = 4, n = hu(
    t.GG,
    e._a[Zo],
    dd(to(), 1, 4).year
  ), o = hu(t.W, 1), i = hu(t.E, 1), (i < 1 || i > 7) && (s = !0)) : (r = e._locale._week.dow, a = e._locale._week.doy, u = dd(to(), r, a), n = hu(t.gg, e._a[Zo], u.year), o = hu(t.w, u.week), t.d != null ? (i = t.d, (i < 0 || i > 6) && (s = !0)) : t.e != null ? (i = t.e + r, (t.e < 0 || t.e > 6) && (s = !0)) : i = r), o < 1 || o > Aa(n, r, a) ? nn(e)._overflowWeeks = !0 : s != null ? nn(e)._overflowWeekday = !0 : (l = rO(n, o, i, r, a), e._a[Zo] = l.year, e._dayOfYear = l.dayOfYear);
}
yt.ISO_8601 = function() {
};
yt.RFC_2822 = function() {
};
function my(e) {
  if (e._f === yt.ISO_8601) {
    cO(e);
    return;
  }
  if (e._f === yt.RFC_2822) {
    dO(e);
    return;
  }
  e._a = [], nn(e).empty = !0;
  var t = "" + e._i, n, o, i, r, a, l = t.length, s = 0, u, c;
  for (i = YP(e._f, e._locale).match(ry) || [], c = i.length, n = 0; n < c; n++)
    r = i[n], o = (t.match(SD(r, e)) || [])[0], o && (a = t.substr(0, t.indexOf(o)), a.length > 0 && nn(e).unusedInput.push(a), t = t.slice(
      t.indexOf(o) + o.length
    ), s += o.length), Pu[r] ? (o ? nn(e).empty = !1 : nn(e).unusedTokens.push(r), $D(r, o, e)) : e._strict && !o && nn(e).unusedTokens.push(r);
  nn(e).charsLeftOver = l - s, t.length > 0 && nn(e).unusedInput.push(t), e._a[_o] <= 12 && nn(e).bigHour === !0 && e._a[_o] > 0 && (nn(e).bigHour = void 0), nn(e).parsedDateParts = e._a.slice(0), nn(e).meridiem = e._meridiem, e._a[_o] = NA(
    e._locale,
    e._a[_o],
    e._meridiem
  ), u = nn(e).era, u !== null && (e._a[Zo] = e._locale.erasConvertYear(u, e._a[Zo])), vy(e), gy(e);
}
function NA(e, t, n) {
  var o;
  return n == null ? t : e.meridiemHour != null ? e.meridiemHour(t, n) : (e.isPM != null && (o = e.isPM(n), o && t < 12 && (t += 12), !o && t === 12 && (t = 0)), t);
}
function zA(e) {
  var t, n, o, i, r, a, l = !1, s = e._f.length;
  if (s === 0) {
    nn(e).invalidFormat = !0, e._d = /* @__PURE__ */ new Date(NaN);
    return;
  }
  for (i = 0; i < s; i++)
    r = 0, a = !1, t = oy({}, e), e._useUTC != null && (t._useUTC = e._useUTC), t._f = e._f[i], my(t), ny(t) && (a = !0), r += nn(t).charsLeftOver, r += nn(t).unusedTokens.length * 10, nn(t).score = r, l ? r < o && (o = r, n = t) : (o == null || r < o || a) && (o = r, n = t, a && (l = !0));
  wl(e, n || t);
}
function BA(e) {
  if (!e._d) {
    var t = ay(e._i), n = t.day === void 0 ? t.date : t.day;
    e._a = WP(
      [t.year, t.month, n, t.hour, t.minute, t.second, t.millisecond],
      function(o) {
        return o && parseInt(o, 10);
      }
    ), vy(e);
  }
}
function FA(e) {
  var t = new Id(gy(fO(e)));
  return t._nextDay && (t.add(1, "d"), t._nextDay = void 0), t;
}
function fO(e) {
  var t = e._i, n = e._f;
  return e._locale = e._locale || Ga(e._l), t === null || n === void 0 && t === "" ? oh({ nullInput: !0 }) : (typeof t == "string" && (e._i = t = e._locale.preparse(t)), Ir(t) ? new Id(gy(t)) : (kd(t) ? e._d = t : kr(n) ? zA(e) : n ? my(e) : LA(e), ny(e) || (e._d = null), e));
}
function LA(e) {
  var t = e._i;
  gi(t) ? e._d = new Date(yt.now()) : kd(t) ? e._d = new Date(t.valueOf()) : typeof t == "string" ? DA(e) : kr(t) ? (e._a = WP(t.slice(0), function(n) {
    return parseInt(n, 10);
  }), vy(e)) : xs(t) ? BA(e) : Fa(t) ? e._d = new Date(t) : yt.createFromInputFallback(e);
}
function pO(e, t, n, o, i) {
  var r = {};
  return (t === !0 || t === !1) && (o = t, t = void 0), (n === !0 || n === !1) && (o = n, n = void 0), (xs(e) && ty(e) || kr(e) && e.length === 0) && (e = void 0), r._isAMomentObject = !0, r._useUTC = r._isUTC = i, r._l = n, r._i = e, r._f = t, r._strict = o, FA(r);
}
function to(e, t, n, o) {
  return pO(e, t, n, o, !1);
}
var HA = or(
  "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = to.apply(null, arguments);
    return this.isValid() && e.isValid() ? e < this ? this : e : oh();
  }
), VA = or(
  "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = to.apply(null, arguments);
    return this.isValid() && e.isValid() ? e > this ? this : e : oh();
  }
);
function hO(e, t) {
  var n, o;
  if (t.length === 1 && kr(t[0]) && (t = t[0]), !t.length)
    return to();
  for (n = t[0], o = 1; o < t.length; ++o)
    (!t[o].isValid() || t[o][e](n)) && (n = t[o]);
  return n;
}
function jA() {
  var e = [].slice.call(arguments, 0);
  return hO("isBefore", e);
}
function WA() {
  var e = [].slice.call(arguments, 0);
  return hO("isAfter", e);
}
var KA = function() {
  return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
}, Oc = [
  "year",
  "quarter",
  "month",
  "week",
  "day",
  "hour",
  "minute",
  "second",
  "millisecond"
];
function qA(e) {
  var t, n = !1, o, i = Oc.length;
  for (t in e)
    if (Mn(e, t) && !(bo.call(Oc, t) !== -1 && (e[t] == null || !isNaN(e[t]))))
      return !1;
  for (o = 0; o < i; ++o)
    if (e[Oc[o]]) {
      if (n)
        return !1;
      parseFloat(e[Oc[o]]) !== mn(e[Oc[o]]) && (n = !0);
    }
  return !0;
}
function YA() {
  return this._isValid;
}
function GA() {
  return Er(NaN);
}
function dh(e) {
  var t = ay(e), n = t.year || 0, o = t.quarter || 0, i = t.month || 0, r = t.week || t.isoWeek || 0, a = t.day || 0, l = t.hour || 0, s = t.minute || 0, u = t.second || 0, c = t.millisecond || 0;
  this._isValid = qA(t), this._milliseconds = +c + u * 1e3 + // 1000
  s * 6e4 + // 1000 * 60
  l * 1e3 * 60 * 60, this._days = +a + r * 7, this._months = +i + o * 3 + n * 12, this._data = {}, this._locale = Ga(), this._bubble();
}
function Yf(e) {
  return e instanceof dh;
}
function tm(e) {
  return e < 0 ? Math.round(-1 * e) * -1 : Math.round(e);
}
function UA(e, t, n) {
  var o = Math.min(e.length, t.length), i = Math.abs(e.length - t.length), r = 0, a;
  for (a = 0; a < o; a++)
    mn(e[a]) !== mn(t[a]) && r++;
  return r + i;
}
function gO(e, t) {
  Lt(e, 0, 0, function() {
    var n = this.utcOffset(), o = "+";
    return n < 0 && (n = -n, o = "-"), o + ea(~~(n / 60), 2) + t + ea(~~n % 60, 2);
  });
}
gO("Z", ":");
gO("ZZ", "");
$t("Z", sh);
$t("ZZ", sh);
jn(["Z", "ZZ"], function(e, t, n) {
  n._useUTC = !0, n._tzm = by(sh, e);
});
var XA = /([\+\-]|\d\d)/gi;
function by(e, t) {
  var n = (t || "").match(e), o, i, r;
  return n === null ? null : (o = n[n.length - 1] || [], i = (o + "").match(XA) || ["-", 0, 0], r = +(i[1] * 60) + mn(i[2]), r === 0 ? 0 : i[0] === "+" ? r : -r);
}
function yy(e, t) {
  var n, o;
  return t._isUTC ? (n = t.clone(), o = (Ir(e) || kd(e) ? e.valueOf() : to(e).valueOf()) - n.valueOf(), n._d.setTime(n._d.valueOf() + o), yt.updateOffset(n, !1), n) : to(e).local();
}
function nm(e) {
  return -Math.round(e._d.getTimezoneOffset());
}
yt.updateOffset = function() {
};
function QA(e, t, n) {
  var o = this._offset || 0, i;
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    if (typeof e == "string") {
      if (e = by(sh, e), e === null)
        return this;
    } else Math.abs(e) < 16 && !n && (e = e * 60);
    return !this._isUTC && t && (i = nm(this)), this._offset = e, this._isUTC = !0, i != null && this.add(i, "m"), o !== e && (!t || this._changeInProgress ? bO(
      this,
      Er(e - o, "m"),
      1,
      !1
    ) : this._changeInProgress || (this._changeInProgress = !0, yt.updateOffset(this, !0), this._changeInProgress = null)), this;
  } else
    return this._isUTC ? o : nm(this);
}
function ZA(e, t) {
  return e != null ? (typeof e != "string" && (e = -e), this.utcOffset(e, t), this) : -this.utcOffset();
}
function JA(e) {
  return this.utcOffset(0, e);
}
function eR(e) {
  return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(nm(this), "m")), this;
}
function tR() {
  if (this._tzm != null)
    this.utcOffset(this._tzm, !1, !0);
  else if (typeof this._i == "string") {
    var e = by(xD, this._i);
    e != null ? this.utcOffset(e) : this.utcOffset(0, !0);
  }
  return this;
}
function nR(e) {
  return this.isValid() ? (e = e ? to(e).utcOffset() : 0, (this.utcOffset() - e) % 60 === 0) : !1;
}
function oR() {
  return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}
function iR() {
  if (!gi(this._isDSTShifted))
    return this._isDSTShifted;
  var e = {}, t;
  return oy(e, this), e = fO(e), e._a ? (t = e._isUTC ? ia(e._a) : to(e._a), this._isDSTShifted = this.isValid() && UA(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
}
function rR() {
  return this.isValid() ? !this._isUTC : !1;
}
function aR() {
  return this.isValid() ? this._isUTC : !1;
}
function vO() {
  return this.isValid() ? this._isUTC && this._offset === 0 : !1;
}
var lR = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, sR = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function Er(e, t) {
  var n = e, o = null, i, r, a;
  return Yf(e) ? n = {
    ms: e._milliseconds,
    d: e._days,
    M: e._months
  } : Fa(e) || !isNaN(+e) ? (n = {}, t ? n[t] = +e : n.milliseconds = +e) : (o = lR.exec(e)) ? (i = o[1] === "-" ? -1 : 1, n = {
    y: 0,
    d: mn(o[Ur]) * i,
    h: mn(o[_o]) * i,
    m: mn(o[wr]) * i,
    s: mn(o[Ta]) * i,
    ms: mn(tm(o[gs] * 1e3)) * i
    // the millisecond decimal point is included in the match
  }) : (o = sR.exec(e)) ? (i = o[1] === "-" ? -1 : 1, n = {
    y: Xl(o[2], i),
    M: Xl(o[3], i),
    w: Xl(o[4], i),
    d: Xl(o[5], i),
    h: Xl(o[6], i),
    m: Xl(o[7], i),
    s: Xl(o[8], i)
  }) : n == null ? n = {} : typeof n == "object" && ("from" in n || "to" in n) && (a = uR(
    to(n.from),
    to(n.to)
  ), n = {}, n.ms = a.milliseconds, n.M = a.months), r = new dh(n), Yf(e) && Mn(e, "_locale") && (r._locale = e._locale), Yf(e) && Mn(e, "_isValid") && (r._isValid = e._isValid), r;
}
Er.fn = dh.prototype;
Er.invalid = GA;
function Xl(e, t) {
  var n = e && parseFloat(e.replace(",", "."));
  return (isNaN(n) ? 0 : n) * t;
}
function Vx(e, t) {
  var n = {};
  return n.months = t.month() - e.month() + (t.year() - e.year()) * 12, e.clone().add(n.months, "M").isAfter(t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, "M"), n;
}
function uR(e, t) {
  var n;
  return e.isValid() && t.isValid() ? (t = yy(t, e), e.isBefore(t) ? n = Vx(e, t) : (n = Vx(t, e), n.milliseconds = -n.milliseconds, n.months = -n.months), n) : { milliseconds: 0, months: 0 };
}
function mO(e, t) {
  return function(n, o) {
    var i, r;
    return o !== null && !isNaN(+o) && (qP(
      t,
      "moment()." + t + "(period, number) is deprecated. Please use moment()." + t + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
    ), r = n, n = o, o = r), i = Er(n, o), bO(this, i, e), this;
  };
}
function bO(e, t, n, o) {
  var i = t._milliseconds, r = tm(t._days), a = tm(t._months);
  e.isValid() && (o = o ?? !0, a && nO(e, ud(e, "Month") + a * n), r && JP(e, "Date", ud(e, "Date") + r * n), i && e._d.setTime(e._d.valueOf() + i * n), o && yt.updateOffset(e, r || a));
}
var cR = mO(1, "add"), dR = mO(-1, "subtract");
function yO(e) {
  return typeof e == "string" || e instanceof String;
}
function fR(e) {
  return Ir(e) || kd(e) || yO(e) || Fa(e) || hR(e) || pR(e) || e === null || e === void 0;
}
function pR(e) {
  var t = xs(e) && !ty(e), n = !1, o = [
    "years",
    "year",
    "y",
    "months",
    "month",
    "M",
    "days",
    "day",
    "d",
    "dates",
    "date",
    "D",
    "hours",
    "hour",
    "h",
    "minutes",
    "minute",
    "m",
    "seconds",
    "second",
    "s",
    "milliseconds",
    "millisecond",
    "ms"
  ], i, r, a = o.length;
  for (i = 0; i < a; i += 1)
    r = o[i], n = n || Mn(e, r);
  return t && n;
}
function hR(e) {
  var t = kr(e), n = !1;
  return t && (n = e.filter(function(o) {
    return !Fa(o) && yO(e);
  }).length === 0), t && n;
}
function gR(e) {
  var t = xs(e) && !ty(e), n = !1, o = [
    "sameDay",
    "nextDay",
    "lastDay",
    "nextWeek",
    "lastWeek",
    "sameElse"
  ], i, r;
  for (i = 0; i < o.length; i += 1)
    r = o[i], n = n || Mn(e, r);
  return t && n;
}
function vR(e, t) {
  var n = e.diff(t, "days", !0);
  return n < -6 ? "sameElse" : n < -1 ? "lastWeek" : n < 0 ? "lastDay" : n < 1 ? "sameDay" : n < 2 ? "nextDay" : n < 7 ? "nextWeek" : "sameElse";
}
function mR(e, t) {
  arguments.length === 1 && (arguments[0] ? fR(arguments[0]) ? (e = arguments[0], t = void 0) : gR(arguments[0]) && (t = arguments[0], e = void 0) : (e = void 0, t = void 0));
  var n = e || to(), o = yy(n, this).startOf("day"), i = yt.calendarFormat(this, o) || "sameElse", r = t && (ra(t[i]) ? t[i].call(this, n) : t[i]);
  return this.format(
    r || this.localeData().calendar(i, this, to(n))
  );
}
function bR() {
  return new Id(this);
}
function yR(e, t) {
  var n = Ir(e) ? e : to(e);
  return this.isValid() && n.isValid() ? (t = ir(t) || "millisecond", t === "millisecond" ? this.valueOf() > n.valueOf() : n.valueOf() < this.clone().startOf(t).valueOf()) : !1;
}
function xR(e, t) {
  var n = Ir(e) ? e : to(e);
  return this.isValid() && n.isValid() ? (t = ir(t) || "millisecond", t === "millisecond" ? this.valueOf() < n.valueOf() : this.clone().endOf(t).valueOf() < n.valueOf()) : !1;
}
function wR(e, t, n, o) {
  var i = Ir(e) ? e : to(e), r = Ir(t) ? t : to(t);
  return this.isValid() && i.isValid() && r.isValid() ? (o = o || "()", (o[0] === "(" ? this.isAfter(i, n) : !this.isBefore(i, n)) && (o[1] === ")" ? this.isBefore(r, n) : !this.isAfter(r, n))) : !1;
}
function SR(e, t) {
  var n = Ir(e) ? e : to(e), o;
  return this.isValid() && n.isValid() ? (t = ir(t) || "millisecond", t === "millisecond" ? this.valueOf() === n.valueOf() : (o = n.valueOf(), this.clone().startOf(t).valueOf() <= o && o <= this.clone().endOf(t).valueOf())) : !1;
}
function CR(e, t) {
  return this.isSame(e, t) || this.isAfter(e, t);
}
function $R(e, t) {
  return this.isSame(e, t) || this.isBefore(e, t);
}
function PR(e, t, n) {
  var o, i, r;
  if (!this.isValid())
    return NaN;
  if (o = yy(e, this), !o.isValid())
    return NaN;
  switch (i = (o.utcOffset() - this.utcOffset()) * 6e4, t = ir(t), t) {
    case "year":
      r = Gf(this, o) / 12;
      break;
    case "month":
      r = Gf(this, o);
      break;
    case "quarter":
      r = Gf(this, o) / 3;
      break;
    case "second":
      r = (this - o) / 1e3;
      break;
    // 1000
    case "minute":
      r = (this - o) / 6e4;
      break;
    // 1000 * 60
    case "hour":
      r = (this - o) / 36e5;
      break;
    // 1000 * 60 * 60
    case "day":
      r = (this - o - i) / 864e5;
      break;
    // 1000 * 60 * 60 * 24, negate dst
    case "week":
      r = (this - o - i) / 6048e5;
      break;
    // 1000 * 60 * 60 * 24 * 7, negate dst
    default:
      r = this - o;
  }
  return n ? r : Qi(r);
}
function Gf(e, t) {
  if (e.date() < t.date())
    return -Gf(t, e);
  var n = (t.year() - e.year()) * 12 + (t.month() - e.month()), o = e.clone().add(n, "months"), i, r;
  return t - o < 0 ? (i = e.clone().add(n - 1, "months"), r = (t - o) / (o - i)) : (i = e.clone().add(n + 1, "months"), r = (t - o) / (i - o)), -(n + r) || 0;
}
yt.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
yt.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
function OR() {
  return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}
function kR(e) {
  if (!this.isValid())
    return null;
  var t = e !== !0, n = t ? this.clone().utc() : this;
  return n.year() < 0 || n.year() > 9999 ? qf(
    n,
    t ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
  ) : ra(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", qf(n, "Z")) : qf(
    n,
    t ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
  );
}
function IR() {
  if (!this.isValid())
    return "moment.invalid(/* " + this._i + " */)";
  var e = "moment", t = "", n, o, i, r;
  return this.isLocal() || (e = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", t = "Z"), n = "[" + e + '("]', o = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", i = "-MM-DD[T]HH:mm:ss.SSS", r = t + '[")]', this.format(n + o + i + r);
}
function MR(e) {
  e || (e = this.isUtc() ? yt.defaultFormatUtc : yt.defaultFormat);
  var t = qf(this, e);
  return this.localeData().postformat(t);
}
function TR(e, t) {
  return this.isValid() && (Ir(e) && e.isValid() || to(e).isValid()) ? Er({ to: this, from: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function _R(e) {
  return this.from(to(), e);
}
function ER(e, t) {
  return this.isValid() && (Ir(e) && e.isValid() || to(e).isValid()) ? Er({ from: this, to: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function DR(e) {
  return this.to(to(), e);
}
function xO(e) {
  var t;
  return e === void 0 ? this._locale._abbr : (t = Ga(e), t != null && (this._locale = t), this);
}
var wO = or(
  "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
  function(e) {
    return e === void 0 ? this.localeData() : this.locale(e);
  }
);
function SO() {
  return this._locale;
}
var xp = 1e3, Ou = 60 * xp, wp = 60 * Ou, CO = (365 * 400 + 97) * 24 * wp;
function ku(e, t) {
  return (e % t + t) % t;
}
function $O(e, t, n) {
  return e < 100 && e >= 0 ? new Date(e + 400, t, n) - CO : new Date(e, t, n).valueOf();
}
function PO(e, t, n) {
  return e < 100 && e >= 0 ? Date.UTC(e + 400, t, n) - CO : Date.UTC(e, t, n);
}
function AR(e) {
  var t, n;
  if (e = ir(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? PO : $O, e) {
    case "year":
      t = n(this.year(), 0, 1);
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3,
        1
      );
      break;
    case "month":
      t = n(this.year(), this.month(), 1);
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday()
      );
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1)
      );
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date());
      break;
    case "hour":
      t = this._d.valueOf(), t -= ku(
        t + (this._isUTC ? 0 : this.utcOffset() * Ou),
        wp
      );
      break;
    case "minute":
      t = this._d.valueOf(), t -= ku(t, Ou);
      break;
    case "second":
      t = this._d.valueOf(), t -= ku(t, xp);
      break;
  }
  return this._d.setTime(t), yt.updateOffset(this, !0), this;
}
function RR(e) {
  var t, n;
  if (e = ir(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? PO : $O, e) {
    case "year":
      t = n(this.year() + 1, 0, 1) - 1;
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3 + 3,
        1
      ) - 1;
      break;
    case "month":
      t = n(this.year(), this.month() + 1, 1) - 1;
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday() + 7
      ) - 1;
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1) + 7
      ) - 1;
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date() + 1) - 1;
      break;
    case "hour":
      t = this._d.valueOf(), t += wp - ku(
        t + (this._isUTC ? 0 : this.utcOffset() * Ou),
        wp
      ) - 1;
      break;
    case "minute":
      t = this._d.valueOf(), t += Ou - ku(t, Ou) - 1;
      break;
    case "second":
      t = this._d.valueOf(), t += xp - ku(t, xp) - 1;
      break;
  }
  return this._d.setTime(t), yt.updateOffset(this, !0), this;
}
function NR() {
  return this._d.valueOf() - (this._offset || 0) * 6e4;
}
function zR() {
  return Math.floor(this.valueOf() / 1e3);
}
function BR() {
  return new Date(this.valueOf());
}
function FR() {
  var e = this;
  return [
    e.year(),
    e.month(),
    e.date(),
    e.hour(),
    e.minute(),
    e.second(),
    e.millisecond()
  ];
}
function LR() {
  var e = this;
  return {
    years: e.year(),
    months: e.month(),
    date: e.date(),
    hours: e.hours(),
    minutes: e.minutes(),
    seconds: e.seconds(),
    milliseconds: e.milliseconds()
  };
}
function HR() {
  return this.isValid() ? this.toISOString() : null;
}
function VR() {
  return ny(this);
}
function jR() {
  return wl({}, nn(this));
}
function WR() {
  return nn(this).overflow;
}
function KR() {
  return {
    input: this._i,
    format: this._f,
    locale: this._locale,
    isUTC: this._isUTC,
    strict: this._strict
  };
}
Lt("N", 0, 0, "eraAbbr");
Lt("NN", 0, 0, "eraAbbr");
Lt("NNN", 0, 0, "eraAbbr");
Lt("NNNN", 0, 0, "eraName");
Lt("NNNNN", 0, 0, "eraNarrow");
Lt("y", ["y", 1], "yo", "eraYear");
Lt("y", ["yy", 2], 0, "eraYear");
Lt("y", ["yyy", 3], 0, "eraYear");
Lt("y", ["yyyy", 4], 0, "eraYear");
$t("N", xy);
$t("NN", xy);
$t("NNN", xy);
$t("NNNN", nN);
$t("NNNNN", oN);
jn(
  ["N", "NN", "NNN", "NNNN", "NNNNN"],
  function(e, t, n, o) {
    var i = n._locale.erasParse(e, o, n._strict);
    i ? nn(n).era = i : nn(n).invalidEra = e;
  }
);
$t("y", oc);
$t("yy", oc);
$t("yyy", oc);
$t("yyyy", oc);
$t("yo", iN);
jn(["y", "yy", "yyy", "yyyy"], Zo);
jn(["yo"], function(e, t, n, o) {
  var i;
  n._locale._eraYearOrdinalRegex && (i = e.match(n._locale._eraYearOrdinalRegex)), n._locale.eraYearOrdinalParse ? t[Zo] = n._locale.eraYearOrdinalParse(e, i) : t[Zo] = parseInt(e, 10);
});
function qR(e, t) {
  var n, o, i, r = this._eras || Ga("en")._eras;
  for (n = 0, o = r.length; n < o; ++n) {
    switch (typeof r[n].since) {
      case "string":
        i = yt(r[n].since).startOf("day"), r[n].since = i.valueOf();
        break;
    }
    switch (typeof r[n].until) {
      case "undefined":
        r[n].until = 1 / 0;
        break;
      case "string":
        i = yt(r[n].until).startOf("day").valueOf(), r[n].until = i.valueOf();
        break;
    }
  }
  return r;
}
function YR(e, t, n) {
  var o, i, r = this.eras(), a, l, s;
  for (e = e.toUpperCase(), o = 0, i = r.length; o < i; ++o)
    if (a = r[o].name.toUpperCase(), l = r[o].abbr.toUpperCase(), s = r[o].narrow.toUpperCase(), n)
      switch (t) {
        case "N":
        case "NN":
        case "NNN":
          if (l === e)
            return r[o];
          break;
        case "NNNN":
          if (a === e)
            return r[o];
          break;
        case "NNNNN":
          if (s === e)
            return r[o];
          break;
      }
    else if ([a, l, s].indexOf(e) >= 0)
      return r[o];
}
function GR(e, t) {
  var n = e.since <= e.until ? 1 : -1;
  return t === void 0 ? yt(e.since).year() : yt(e.since).year() + (t - e.offset) * n;
}
function UR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].name;
  return "";
}
function XR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].narrow;
  return "";
}
function QR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].abbr;
  return "";
}
function ZR() {
  var e, t, n, o, i = this.localeData().eras();
  for (e = 0, t = i.length; e < t; ++e)
    if (n = i[e].since <= i[e].until ? 1 : -1, o = this.clone().startOf("day").valueOf(), i[e].since <= o && o <= i[e].until || i[e].until <= o && o <= i[e].since)
      return (this.year() - yt(i[e].since).year()) * n + i[e].offset;
  return this.year();
}
function JR(e) {
  return Mn(this, "_erasNameRegex") || wy.call(this), e ? this._erasNameRegex : this._erasRegex;
}
function eN(e) {
  return Mn(this, "_erasAbbrRegex") || wy.call(this), e ? this._erasAbbrRegex : this._erasRegex;
}
function tN(e) {
  return Mn(this, "_erasNarrowRegex") || wy.call(this), e ? this._erasNarrowRegex : this._erasRegex;
}
function xy(e, t) {
  return t.erasAbbrRegex(e);
}
function nN(e, t) {
  return t.erasNameRegex(e);
}
function oN(e, t) {
  return t.erasNarrowRegex(e);
}
function iN(e, t) {
  return t._eraYearOrdinalRegex || oc;
}
function wy() {
  var e = [], t = [], n = [], o = [], i, r, a, l, s, u = this.eras();
  for (i = 0, r = u.length; i < r; ++i)
    a = Da(u[i].name), l = Da(u[i].abbr), s = Da(u[i].narrow), t.push(a), e.push(l), n.push(s), o.push(a), o.push(l), o.push(s);
  this._erasRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + t.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  );
}
Lt(0, ["gg", 2], 0, function() {
  return this.weekYear() % 100;
});
Lt(0, ["GG", 2], 0, function() {
  return this.isoWeekYear() % 100;
});
function fh(e, t) {
  Lt(0, [e, e.length], 0, t);
}
fh("gggg", "weekYear");
fh("ggggg", "weekYear");
fh("GGGG", "isoWeekYear");
fh("GGGGG", "isoWeekYear");
$t("G", lh);
$t("g", lh);
$t("GG", no, Ri);
$t("gg", no, Ri);
$t("GGGG", sy, ly);
$t("gggg", sy, ly);
$t("GGGGG", ah, ih);
$t("ggggg", ah, ih);
Td(
  ["gggg", "ggggg", "GGGG", "GGGGG"],
  function(e, t, n, o) {
    t[o.substr(0, 2)] = mn(e);
  }
);
Td(["gg", "GG"], function(e, t, n, o) {
  t[o] = yt.parseTwoDigitYear(e);
});
function rN(e) {
  return OO.call(
    this,
    e,
    this.week(),
    this.weekday() + this.localeData()._week.dow,
    this.localeData()._week.dow,
    this.localeData()._week.doy
  );
}
function aN(e) {
  return OO.call(
    this,
    e,
    this.isoWeek(),
    this.isoWeekday(),
    1,
    4
  );
}
function lN() {
  return Aa(this.year(), 1, 4);
}
function sN() {
  return Aa(this.isoWeekYear(), 1, 4);
}
function uN() {
  var e = this.localeData()._week;
  return Aa(this.year(), e.dow, e.doy);
}
function cN() {
  var e = this.localeData()._week;
  return Aa(this.weekYear(), e.dow, e.doy);
}
function OO(e, t, n, o, i) {
  var r;
  return e == null ? dd(this, o, i).year : (r = Aa(e, o, i), t > r && (t = r), dN.call(this, e, t, n, o, i));
}
function dN(e, t, n, o, i) {
  var r = rO(e, t, n, o, i), a = cd(r.year, 0, r.dayOfYear);
  return this.year(a.getUTCFullYear()), this.month(a.getUTCMonth()), this.date(a.getUTCDate()), this;
}
Lt("Q", 0, "Qo", "quarter");
$t("Q", GP);
jn("Q", function(e, t) {
  t[Ma] = (mn(e) - 1) * 3;
});
function fN(e) {
  return e == null ? Math.ceil((this.month() + 1) / 3) : this.month((e - 1) * 3 + this.month() % 3);
}
Lt("D", ["DD", 2], "Do", "date");
$t("D", no, ic);
$t("DD", no, Ri);
$t("Do", function(e, t) {
  return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;
});
jn(["D", "DD"], Ur);
jn("Do", function(e, t) {
  t[Ur] = mn(e.match(no)[0]);
});
var kO = rc("Date", !0);
Lt("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
$t("DDD", rh);
$t("DDDD", UP);
jn(["DDD", "DDDD"], function(e, t, n) {
  n._dayOfYear = mn(e);
});
function pN(e) {
  var t = Math.round(
    (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
  ) + 1;
  return e == null ? t : this.add(e - t, "d");
}
Lt("m", ["mm", 2], 0, "minute");
$t("m", no, uy);
$t("mm", no, Ri);
jn(["m", "mm"], wr);
var hN = rc("Minutes", !1);
Lt("s", ["ss", 2], 0, "second");
$t("s", no, uy);
$t("ss", no, Ri);
jn(["s", "ss"], Ta);
var gN = rc("Seconds", !1);
Lt("S", 0, 0, function() {
  return ~~(this.millisecond() / 100);
});
Lt(0, ["SS", 2], 0, function() {
  return ~~(this.millisecond() / 10);
});
Lt(0, ["SSS", 3], 0, "millisecond");
Lt(0, ["SSSS", 4], 0, function() {
  return this.millisecond() * 10;
});
Lt(0, ["SSSSS", 5], 0, function() {
  return this.millisecond() * 100;
});
Lt(0, ["SSSSSS", 6], 0, function() {
  return this.millisecond() * 1e3;
});
Lt(0, ["SSSSSSS", 7], 0, function() {
  return this.millisecond() * 1e4;
});
Lt(0, ["SSSSSSSS", 8], 0, function() {
  return this.millisecond() * 1e5;
});
Lt(0, ["SSSSSSSSS", 9], 0, function() {
  return this.millisecond() * 1e6;
});
$t("S", rh, GP);
$t("SS", rh, Ri);
$t("SSS", rh, UP);
var Sl, IO;
for (Sl = "SSSS"; Sl.length <= 9; Sl += "S")
  $t(Sl, oc);
function vN(e, t) {
  t[gs] = mn(("0." + e) * 1e3);
}
for (Sl = "S"; Sl.length <= 9; Sl += "S")
  jn(Sl, vN);
IO = rc("Milliseconds", !1);
Lt("z", 0, 0, "zoneAbbr");
Lt("zz", 0, 0, "zoneName");
function mN() {
  return this._isUTC ? "UTC" : "";
}
function bN() {
  return this._isUTC ? "Coordinated Universal Time" : "";
}
var ut = Id.prototype;
ut.add = cR;
ut.calendar = mR;
ut.clone = bR;
ut.diff = PR;
ut.endOf = RR;
ut.format = MR;
ut.from = TR;
ut.fromNow = _R;
ut.to = ER;
ut.toNow = DR;
ut.get = ID;
ut.invalidAt = WR;
ut.isAfter = yR;
ut.isBefore = xR;
ut.isBetween = wR;
ut.isSame = SR;
ut.isSameOrAfter = CR;
ut.isSameOrBefore = $R;
ut.isValid = VR;
ut.lang = wO;
ut.locale = xO;
ut.localeData = SO;
ut.max = VA;
ut.min = HA;
ut.parsingFlags = jR;
ut.set = MD;
ut.startOf = AR;
ut.subtract = dR;
ut.toArray = FR;
ut.toObject = LR;
ut.toDate = BR;
ut.toISOString = kR;
ut.inspect = IR;
typeof Symbol < "u" && Symbol.for != null && (ut[Symbol.for("nodejs.util.inspect.custom")] = function() {
  return "Moment<" + this.format() + ">";
});
ut.toJSON = HR;
ut.toString = OR;
ut.unix = zR;
ut.valueOf = NR;
ut.creationData = KR;
ut.eraName = UR;
ut.eraNarrow = XR;
ut.eraAbbr = QR;
ut.eraYear = ZR;
ut.year = ZP;
ut.isLeapYear = kD;
ut.weekYear = rN;
ut.isoWeekYear = aN;
ut.quarter = ut.quarters = fN;
ut.month = oO;
ut.daysInMonth = BD;
ut.week = ut.weeks = qD;
ut.isoWeek = ut.isoWeeks = YD;
ut.weeksInYear = uN;
ut.weeksInWeekYear = cN;
ut.isoWeeksInYear = lN;
ut.isoWeeksInISOWeekYear = sN;
ut.date = kO;
ut.day = ut.days = aA;
ut.weekday = lA;
ut.isoWeekday = sA;
ut.dayOfYear = pN;
ut.hour = ut.hours = gA;
ut.minute = ut.minutes = hN;
ut.second = ut.seconds = gN;
ut.millisecond = ut.milliseconds = IO;
ut.utcOffset = QA;
ut.utc = JA;
ut.local = eR;
ut.parseZone = tR;
ut.hasAlignedHourOffset = nR;
ut.isDST = oR;
ut.isLocal = rR;
ut.isUtcOffset = aR;
ut.isUtc = vO;
ut.isUTC = vO;
ut.zoneAbbr = mN;
ut.zoneName = bN;
ut.dates = or(
  "dates accessor is deprecated. Use date instead.",
  kO
);
ut.months = or(
  "months accessor is deprecated. Use month instead",
  oO
);
ut.years = or(
  "years accessor is deprecated. Use year instead",
  ZP
);
ut.zone = or(
  "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
  ZA
);
ut.isDSTShifted = or(
  "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
  iR
);
function yN(e) {
  return to(e * 1e3);
}
function xN() {
  return to.apply(null, arguments).parseZone();
}
function MO(e) {
  return e;
}
var Tn = iy.prototype;
Tn.calendar = rD;
Tn.longDateFormat = uD;
Tn.invalidDate = dD;
Tn.ordinal = hD;
Tn.preparse = MO;
Tn.postformat = MO;
Tn.relativeTime = vD;
Tn.pastFuture = mD;
Tn.set = oD;
Tn.eras = qR;
Tn.erasParse = YR;
Tn.erasConvertYear = GR;
Tn.erasAbbrRegex = eN;
Tn.erasNameRegex = JR;
Tn.erasNarrowRegex = tN;
Tn.months = AD;
Tn.monthsShort = RD;
Tn.monthsParse = zD;
Tn.monthsRegex = LD;
Tn.monthsShortRegex = FD;
Tn.week = VD;
Tn.firstDayOfYear = KD;
Tn.firstDayOfWeek = WD;
Tn.weekdays = tA;
Tn.weekdaysMin = oA;
Tn.weekdaysShort = nA;
Tn.weekdaysParse = rA;
Tn.weekdaysRegex = uA;
Tn.weekdaysShortRegex = cA;
Tn.weekdaysMinRegex = dA;
Tn.isPM = pA;
Tn.meridiem = vA;
function Sp(e, t, n, o) {
  var i = Ga(), r = ia().set(o, t);
  return i[n](r, e);
}
function TO(e, t, n) {
  if (Fa(e) && (t = e, e = void 0), e = e || "", t != null)
    return Sp(e, t, n, "month");
  var o, i = [];
  for (o = 0; o < 12; o++)
    i[o] = Sp(e, o, n, "month");
  return i;
}
function Sy(e, t, n, o) {
  typeof e == "boolean" ? (Fa(t) && (n = t, t = void 0), t = t || "") : (t = e, n = t, e = !1, Fa(t) && (n = t, t = void 0), t = t || "");
  var i = Ga(), r = e ? i._week.dow : 0, a, l = [];
  if (n != null)
    return Sp(t, (n + r) % 7, o, "day");
  for (a = 0; a < 7; a++)
    l[a] = Sp(t, (a + r) % 7, o, "day");
  return l;
}
function wN(e, t) {
  return TO(e, t, "months");
}
function SN(e, t) {
  return TO(e, t, "monthsShort");
}
function CN(e, t, n) {
  return Sy(e, t, n, "weekdays");
}
function $N(e, t, n) {
  return Sy(e, t, n, "weekdaysShort");
}
function PN(e, t, n) {
  return Sy(e, t, n, "weekdaysMin");
}
kl("en", {
  eras: [
    {
      since: "0001-01-01",
      until: 1 / 0,
      offset: 1,
      name: "Anno Domini",
      narrow: "AD",
      abbr: "AD"
    },
    {
      since: "0000-12-31",
      until: -1 / 0,
      offset: 1,
      name: "Before Christ",
      narrow: "BC",
      abbr: "BC"
    }
  ],
  dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  ordinal: function(e) {
    var t = e % 10, n = mn(e % 100 / 10) === 1 ? "th" : t === 1 ? "st" : t === 2 ? "nd" : t === 3 ? "rd" : "th";
    return e + n;
  }
});
yt.lang = or(
  "moment.lang is deprecated. Use moment.locale instead.",
  kl
);
yt.langData = or(
  "moment.langData is deprecated. Use moment.localeData instead.",
  Ga
);
var ba = Math.abs;
function ON() {
  var e = this._data;
  return this._milliseconds = ba(this._milliseconds), this._days = ba(this._days), this._months = ba(this._months), e.milliseconds = ba(e.milliseconds), e.seconds = ba(e.seconds), e.minutes = ba(e.minutes), e.hours = ba(e.hours), e.months = ba(e.months), e.years = ba(e.years), this;
}
function _O(e, t, n, o) {
  var i = Er(t, n);
  return e._milliseconds += o * i._milliseconds, e._days += o * i._days, e._months += o * i._months, e._bubble();
}
function kN(e, t) {
  return _O(this, e, t, 1);
}
function IN(e, t) {
  return _O(this, e, t, -1);
}
function jx(e) {
  return e < 0 ? Math.floor(e) : Math.ceil(e);
}
function MN() {
  var e = this._milliseconds, t = this._days, n = this._months, o = this._data, i, r, a, l, s;
  return e >= 0 && t >= 0 && n >= 0 || e <= 0 && t <= 0 && n <= 0 || (e += jx(om(n) + t) * 864e5, t = 0, n = 0), o.milliseconds = e % 1e3, i = Qi(e / 1e3), o.seconds = i % 60, r = Qi(i / 60), o.minutes = r % 60, a = Qi(r / 60), o.hours = a % 24, t += Qi(a / 24), s = Qi(EO(t)), n += s, t -= jx(om(s)), l = Qi(n / 12), n %= 12, o.days = t, o.months = n, o.years = l, this;
}
function EO(e) {
  return e * 4800 / 146097;
}
function om(e) {
  return e * 146097 / 4800;
}
function TN(e) {
  if (!this.isValid())
    return NaN;
  var t, n, o = this._milliseconds;
  if (e = ir(e), e === "month" || e === "quarter" || e === "year")
    switch (t = this._days + o / 864e5, n = this._months + EO(t), e) {
      case "month":
        return n;
      case "quarter":
        return n / 3;
      case "year":
        return n / 12;
    }
  else
    switch (t = this._days + Math.round(om(this._months)), e) {
      case "week":
        return t / 7 + o / 6048e5;
      case "day":
        return t + o / 864e5;
      case "hour":
        return t * 24 + o / 36e5;
      case "minute":
        return t * 1440 + o / 6e4;
      case "second":
        return t * 86400 + o / 1e3;
      // Math.floor prevents floating point math errors here
      case "millisecond":
        return Math.floor(t * 864e5) + o;
      default:
        throw new Error("Unknown unit " + e);
    }
}
function Ua(e) {
  return function() {
    return this.as(e);
  };
}
var DO = Ua("ms"), _N = Ua("s"), EN = Ua("m"), DN = Ua("h"), AN = Ua("d"), RN = Ua("w"), NN = Ua("M"), zN = Ua("Q"), BN = Ua("y"), FN = DO;
function LN() {
  return Er(this);
}
function HN(e) {
  return e = ir(e), this.isValid() ? this[e + "s"]() : NaN;
}
function Ns(e) {
  return function() {
    return this.isValid() ? this._data[e] : NaN;
  };
}
var VN = Ns("milliseconds"), jN = Ns("seconds"), WN = Ns("minutes"), KN = Ns("hours"), qN = Ns("days"), YN = Ns("months"), GN = Ns("years");
function UN() {
  return Qi(this.days() / 7);
}
var Oa = Math.round, xu = {
  ss: 44,
  // a few seconds to seconds
  s: 45,
  // seconds to minute
  m: 45,
  // minutes to hour
  h: 22,
  // hours to day
  d: 26,
  // days to month/week
  w: null,
  // weeks to month
  M: 11
  // months to year
};
function XN(e, t, n, o, i) {
  return i.relativeTime(t || 1, !!n, e, o);
}
function QN(e, t, n, o) {
  var i = Er(e).abs(), r = Oa(i.as("s")), a = Oa(i.as("m")), l = Oa(i.as("h")), s = Oa(i.as("d")), u = Oa(i.as("M")), c = Oa(i.as("w")), d = Oa(i.as("y")), f = r <= n.ss && ["s", r] || r < n.s && ["ss", r] || a <= 1 && ["m"] || a < n.m && ["mm", a] || l <= 1 && ["h"] || l < n.h && ["hh", l] || s <= 1 && ["d"] || s < n.d && ["dd", s];
  return n.w != null && (f = f || c <= 1 && ["w"] || c < n.w && ["ww", c]), f = f || u <= 1 && ["M"] || u < n.M && ["MM", u] || d <= 1 && ["y"] || ["yy", d], f[2] = t, f[3] = +e > 0, f[4] = o, XN.apply(null, f);
}
function ZN(e) {
  return e === void 0 ? Oa : typeof e == "function" ? (Oa = e, !0) : !1;
}
function JN(e, t) {
  return xu[e] === void 0 ? !1 : t === void 0 ? xu[e] : (xu[e] = t, e === "s" && (xu.ss = t - 1), !0);
}
function ez(e, t) {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var n = !1, o = xu, i, r;
  return typeof e == "object" && (t = e, e = !1), typeof e == "boolean" && (n = e), typeof t == "object" && (o = Object.assign({}, xu, t), t.s != null && t.ss == null && (o.ss = t.s - 1)), i = this.localeData(), r = QN(this, !n, o, i), n && (r = i.pastFuture(+this, r)), i.postformat(r);
}
var $g = Math.abs;
function eu(e) {
  return (e > 0) - (e < 0) || +e;
}
function ph() {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var e = $g(this._milliseconds) / 1e3, t = $g(this._days), n = $g(this._months), o, i, r, a, l = this.asSeconds(), s, u, c, d;
  return l ? (o = Qi(e / 60), i = Qi(o / 60), e %= 60, o %= 60, r = Qi(n / 12), n %= 12, a = e ? e.toFixed(3).replace(/\.?0+$/, "") : "", s = l < 0 ? "-" : "", u = eu(this._months) !== eu(l) ? "-" : "", c = eu(this._days) !== eu(l) ? "-" : "", d = eu(this._milliseconds) !== eu(l) ? "-" : "", s + "P" + (r ? u + r + "Y" : "") + (n ? u + n + "M" : "") + (t ? c + t + "D" : "") + (i || o || e ? "T" : "") + (i ? d + i + "H" : "") + (o ? d + o + "M" : "") + (e ? d + a + "S" : "")) : "P0D";
}
var Pn = dh.prototype;
Pn.isValid = YA;
Pn.abs = ON;
Pn.add = kN;
Pn.subtract = IN;
Pn.as = TN;
Pn.asMilliseconds = DO;
Pn.asSeconds = _N;
Pn.asMinutes = EN;
Pn.asHours = DN;
Pn.asDays = AN;
Pn.asWeeks = RN;
Pn.asMonths = NN;
Pn.asQuarters = zN;
Pn.asYears = BN;
Pn.valueOf = FN;
Pn._bubble = MN;
Pn.clone = LN;
Pn.get = HN;
Pn.milliseconds = VN;
Pn.seconds = jN;
Pn.minutes = WN;
Pn.hours = KN;
Pn.days = qN;
Pn.weeks = UN;
Pn.months = YN;
Pn.years = GN;
Pn.humanize = ez;
Pn.toISOString = ph;
Pn.toString = ph;
Pn.toJSON = ph;
Pn.locale = xO;
Pn.localeData = SO;
Pn.toIsoString = or(
  "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
  ph
);
Pn.lang = wO;
Lt("X", 0, 0, "unix");
Lt("x", 0, 0, "valueOf");
$t("x", lh);
$t("X", wD);
jn("X", function(e, t, n) {
  n._d = new Date(parseFloat(e) * 1e3);
});
jn("x", function(e, t, n) {
  n._d = new Date(mn(e));
});
//! moment.js
yt.version = "2.30.1";
tD(to);
yt.fn = ut;
yt.min = jA;
yt.max = WA;
yt.now = KA;
yt.utc = ia;
yt.unix = yN;
yt.months = wN;
yt.isDate = kd;
yt.locale = kl;
yt.invalid = oh;
yt.duration = Er;
yt.isMoment = Ir;
yt.weekdays = CN;
yt.parseZone = xN;
yt.localeData = Ga;
yt.isDuration = Yf;
yt.monthsShort = SN;
yt.weekdaysMin = PN;
yt.defineLocale = hy;
yt.updateLocale = xA;
yt.locales = wA;
yt.weekdaysShort = $N;
yt.normalizeUnits = ir;
yt.relativeTimeRounding = ZN;
yt.relativeTimeThreshold = JN;
yt.calendarFormat = vR;
yt.prototype = ut;
yt.HTML5_FMT = {
  DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
  // <input type="datetime-local" />
  DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
  // <input type="datetime-local" step="1" />
  DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
  // <input type="datetime-local" step="0.001" />
  DATE: "YYYY-MM-DD",
  // <input type="date" />
  TIME: "HH:mm",
  // <input type="time" />
  TIME_SECONDS: "HH:mm:ss",
  // <input type="time" step="1" />
  TIME_MS: "HH:mm:ss.SSS",
  // <input type="time" step="0.001" />
  WEEK: "GGGG-[W]WW",
  // <input type="week" />
  MONTH: "YYYY-MM"
  // <input type="month" />
};
yt.ISO_8601;
const tz = (e) => yt.isMoment(e);
var ho = /* @__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))(ho || {});
const nz = /^\s*(-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?|NAN)\s*$/i;
function wu(e) {
  return e instanceof Date || tz(e) ? ho.time : qE(e) ? ho.number : Xv(e) ? nz.test(e) ? ho.number : e === "true" || e === "TRUE" || e === "True" || e === "false" || e === "FALSE" || e === "False" ? ho.boolean : ho.string : YE(e) ? ho.boolean : ho.other;
}
function oz(e) {
  if (e.name) {
    const t = e.name.toLowerCase();
    if (t === "date" || t === "time")
      return ho.time;
  }
  for (let t = 0; t < e.values.length; t++) {
    const n = e.values[t];
    if (n != null)
      return wu(n);
  }
}
function iz(e) {
  return rz(e);
}
function rz(e, t) {
  return {
    fields: (t ? e.fields.filter(t) : e.fields).map((i) => {
      let r = i.values;
      return {
        name: i.name,
        type: i.type,
        config: i.config,
        values: r,
        labels: i.labels
      };
    }),
    refId: e.refId,
    meta: e.meta,
    name: e.name
  };
}
var Wx, Kx;
class az {
  constructor() {
    this[Wx] = {};
  }
  // Implement "iterator protocol"
  *iterator() {
    for (let t = 0; t < this.length; t++)
      yield this.get(t);
  }
  set(t, n) {
    throw "unsupported operation";
  }
  add(t) {
    throw "unsupported operation";
  }
  push(...t) {
    for (const n of t)
      this.add(n);
    return this.length;
  }
  // Implement "iterable protocol"
  [(Kx = Symbol.iterator, Wx = Symbol.unscopables, Kx)]() {
    return this.iterator();
  }
  forEach(t) {
    return Og(this).forEach(t);
  }
  map(t) {
    return Og(this).map(t);
  }
  filter(t) {
    return Og(this).filter(t);
  }
  at(t) {
    return this.get(t);
  }
  toArray() {
    const t = new Array(this.length);
    for (let n = 0; n < this.length; n++)
      t[n] = this.get(n);
    return t;
  }
  join(t) {
    return this.toArray().join(t);
  }
  toJSON() {
    return this.toArray();
  }
  pop() {
    throw new Error("Method not implemented.");
  }
  concat(...t) {
    throw new Error("Method not implemented.");
  }
  reverse() {
    throw new Error("Method not implemented.");
  }
  shift() {
    throw new Error("Method not implemented.");
  }
  sort(t) {
    throw new Error("Method not implemented.");
  }
  splice(t, n, ...o) {
    throw new Error("Method not implemented.");
  }
  unshift(...t) {
    throw new Error("Method not implemented.");
  }
  fill(t, n, o) {
    throw new Error("Method not implemented.");
  }
  copyWithin(t, n, o) {
    throw new Error("Method not implemented.");
  }
  //--------------------------------------------------------------------------------
  // Delegated Array function -- these will not be efficient :grimmice:
  //--------------------------------------------------------------------------------
  slice(t, n) {
    return this.toArray().slice(t, n);
  }
  indexOf(t, n) {
    return this.toArray().indexOf(t, n);
  }
  lastIndexOf(t, n) {
    return this.toArray().lastIndexOf(t, n);
  }
  every(t, n) {
    return this.toArray().every(t, n);
  }
  some(t, n) {
    return this.toArray().some(t, n);
  }
  reduce(t, n) {
    throw new Error("Method not implemented.");
  }
  reduceRight(t, n) {
    throw new Error("Method not implemented.");
  }
  find(t, n) {
    return this.toArray().find(t, n);
  }
  findIndex(t, n) {
    return this.toArray().findIndex(t, n);
  }
  entries() {
    return this.toArray().entries();
  }
  keys() {
    return this.toArray().keys();
  }
  values() {
    return this.toArray().values();
  }
  includes(t, n) {
    return this.toArray().includes(t, n);
  }
  flatMap(t, n) {
    return this.toArray().flatMap(t, n);
  }
  flat(t) {
    throw new Error("Method not implemented.");
  }
}
const Pg = [];
function Og(e) {
  return {
    *[Symbol.iterator]() {
      for (let t = 0; t < e.length; t++)
        yield e.get(t);
    },
    forEach(t) {
      for (let n = 0; n < e.length; n++)
        t(e.get(n), n, Pg);
    },
    map(t) {
      const n = [];
      for (let o = 0; o < e.length; o++)
        n.push(t(e.get(o), o, Pg));
      return n;
    },
    /** Add a predicate where you return true if it should *keep* the value */
    filter(t) {
      const n = [];
      let o = 0;
      for (const i of this)
        t(i, o++, Pg) && n.push(i);
      return n;
    }
  };
}
function lz(e, t) {
  return t.type || (t.name === "time" || t.name === "Time" ? t.type = ho.time : t.type = wu(e)), t.type === ho.number ? (n) => parseFloat(n) : t.type === ho.boolean ? (n) => !(n[0] === "F" || n[0] === "f" || n[0] === "0") : (n) => n;
}
const kg = void 0;
class sz extends az {
  constructor(t, n) {
    if (super(), this.fields = [], this.first = [], this.parsers = void 0, this.creator = n || ((o) => o ?? []), t) {
      const { name: o, refId: i, meta: r, fields: a } = t;
      if (o && (this.name = o), i && (this.refId = i), r && (this.meta = r), a)
        for (const l of a)
          this.addField(l);
    }
    Object.defineProperty(this, "length", {
      enumerable: !0,
      get: () => this.first.length
    });
  }
  // Defined for Vector interface
  get length() {
    return this.first.length;
  }
  addFieldFor(t, n) {
    return this.addField({
      name: n || "",
      // Will be filled in
      type: wu(t)
    });
  }
  addField(t, n) {
    let o;
    t.values && (o = t.values);
    let i = t.type;
    !i && (t.name === "time" || t.name === "Time") ? i = ho.time : (!i && o && o.length && (i = wu(o[0])), i || (i = ho.other));
    let r = t.name;
    r || (r = `Field ${this.fields.length + 1}`);
    const a = {
      ...t,
      name: r,
      type: i,
      config: t.config || {},
      values: this.creator(o)
    };
    if (i === ho.other && (i = oz(a), i && (a.type = i)), this.fields.push(a), this.first = this.fields[0].values, n)
      for (; a.values.length < n; )
        a.values.push(kg);
    else
      this.validate();
    return a;
  }
  validate() {
    const t = this.fields.reduce((n, o) => Math.max(n, o.values.length), 0);
    for (const n of this.fields)
      for (; n.values.length !== t; )
        n.values.push(kg);
  }
  /**
   * @deprecated unclear if this is actually used
   */
  setParser(t, n) {
    return this.parsers || (this.parsers = /* @__PURE__ */ new Map()), this.parsers.set(t, n), n;
  }
  parseValue(t, n) {
    var o;
    let i = (o = this.parsers) == null ? void 0 : o.get(t);
    return i || (i = this.setParser(t, lz(n, t))), i(n);
  }
  /**
   * This will add each value to the corresponding column
   */
  appendRow(t) {
    for (let n = this.fields.length; n < t.length; n++)
      this.addField({
        name: `Field ${n + 1}`,
        type: wu(t[n])
      });
    if (this.length < 1)
      for (let n = 0; n < this.fields.length; n++) {
        const o = this.fields[n];
        (!o.type || o.type === ho.other) && (o.type = wu(t[n]));
      }
    for (let n = 0; n < this.fields.length; n++) {
      const o = this.fields[n];
      let i = t[n];
      o.type !== ho.string && Xv(i) && (i = this.parseValue(o, i)), o.values.push(i);
    }
  }
  /** support standard array push syntax */
  push(...t) {
    for (const n of t)
      this.add(n);
    return this.length;
  }
  reverse() {
    for (const t of this.fields)
      t.values.reverse();
    return this;
  }
  /**
   * Add values from an object to corresponding fields. Similar to appendRow but does not create new fields.
   */
  add(t) {
    const n = t;
    for (const o of this.fields) {
      let i = n[o.name];
      o.type !== ho.string && Xv(i) && (i = this.parseValue(o, i)), i === void 0 && (i = kg), o.values.push(i);
    }
  }
  set(t, n) {
    if (t > this.length)
      throw new Error("Unable to set value beyond current length");
    const o = n || {};
    for (const i of this.fields)
      i.values[t] = o[i.name];
  }
  /**
   * Get an object with a property for each field in the DataFrame
   */
  get(t) {
    const n = {};
    for (const o of this.fields)
      n[o.name] = o.values[t];
    return n;
  }
  /**
   * The simplified JSON values used in JSON.stringify()
   */
  toJSON() {
    return iz(this);
  }
}
function uz(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Cp(e) {
  "@babel/helpers - typeof";
  return Cp = 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;
  }, Cp(e);
}
var cz = /^\s+/, dz = /\s+$/;
function Dt(e, t) {
  if (e = e || "", t = t || {}, e instanceof Dt)
    return e;
  if (!(this instanceof Dt))
    return new Dt(e, t);
  var n = fz(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;
}
Dt.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, r, a, l;
    return n = t.r / 255, o = t.g / 255, i = t.b / 255, n <= 0.03928 ? r = n / 12.92 : r = Math.pow((n + 0.055) / 1.055, 2.4), o <= 0.03928 ? a = o / 12.92 : a = 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 * r + 0.7152 * a + 0.0722 * l;
  },
  setAlpha: function(t) {
    return this._a = AO(t), this._roundA = Math.round(100 * this._a) / 100, this;
  },
  toHsv: function() {
    var t = Yx(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      v: t.v,
      a: this._a
    };
  },
  toHsvString: function() {
    var t = Yx(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 = qx(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      l: t.l,
      a: this._a
    };
  },
  toHslString: function() {
    var t = qx(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 Gx(this._r, this._g, this._b, t);
  },
  toHexString: function(t) {
    return "#" + this.toHex(t);
  },
  toHex8: function(t) {
    return vz(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(ao(this._r, 255) * 100) + "%",
      g: Math.round(ao(this._g, 255) * 100) + "%",
      b: Math.round(ao(this._b, 255) * 100) + "%",
      a: this._a
    };
  },
  toPercentageRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(ao(this._r, 255) * 100) + "%, " + Math.round(ao(this._g, 255) * 100) + "%, " + Math.round(ao(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(ao(this._r, 255) * 100) + "%, " + Math.round(ao(this._g, 255) * 100) + "%, " + Math.round(ao(this._b, 255) * 100) + "%, " + this._roundA + ")";
  },
  toName: function() {
    return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Iz[Gx(this._r, this._g, this._b, !0)] || !1;
  },
  toFilter: function(t) {
    var n = "#" + Ux(this._r, this._g, this._b, this._a), o = n, i = this._gradientType ? "GradientType = 1, " : "";
    if (t) {
      var r = Dt(t);
      o = "#" + Ux(r._r, r._g, r._b, r._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, r = !n && i && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
    return r ? 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 Dt(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(xz, arguments);
  },
  brighten: function() {
    return this._applyModification(wz, arguments);
  },
  darken: function() {
    return this._applyModification(Sz, arguments);
  },
  desaturate: function() {
    return this._applyModification(mz, arguments);
  },
  saturate: function() {
    return this._applyModification(bz, arguments);
  },
  greyscale: function() {
    return this._applyModification(yz, arguments);
  },
  spin: function() {
    return this._applyModification(Cz, arguments);
  },
  _applyCombination: function(t, n) {
    return t.apply(null, [this].concat([].slice.call(n)));
  },
  analogous: function() {
    return this._applyCombination(Oz, arguments);
  },
  complement: function() {
    return this._applyCombination($z, arguments);
  },
  monochromatic: function() {
    return this._applyCombination(kz, arguments);
  },
  splitcomplement: function() {
    return this._applyCombination(Pz, arguments);
  },
  // Disabled until https://github.com/bgrins/TinyColor/issues/254
  // polyad: function (number) {
  //   return this._applyCombination(polyad, [number]);
  // },
  triad: function() {
    return this._applyCombination(Xx, [3]);
  },
  tetrad: function() {
    return this._applyCombination(Xx, [4]);
  }
};
Dt.fromRatio = function(e, t) {
  if (Cp(e) == "object") {
    var n = {};
    for (var o in e)
      e.hasOwnProperty(o) && (o === "a" ? n[o] = e[o] : n[o] = Nc(e[o]));
    e = n;
  }
  return Dt(e, t);
};
function fz(e) {
  var t = {
    r: 0,
    g: 0,
    b: 0
  }, n = 1, o = null, i = null, r = null, a = !1, l = !1;
  return typeof e == "string" && (e = Ez(e)), Cp(e) == "object" && (ya(e.r) && ya(e.g) && ya(e.b) ? (t = pz(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ya(e.h) && ya(e.s) && ya(e.v) ? (o = Nc(e.s), i = Nc(e.v), t = gz(e.h, o, i), a = !0, l = "hsv") : ya(e.h) && ya(e.s) && ya(e.l) && (o = Nc(e.s), r = Nc(e.l), t = hz(e.h, o, r), a = !0, l = "hsl"), e.hasOwnProperty("a") && (n = e.a)), n = AO(n), {
    ok: a,
    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 pz(e, t, n) {
  return {
    r: ao(e, 255) * 255,
    g: ao(t, 255) * 255,
    b: ao(n, 255) * 255
  };
}
function qx(e, t, n) {
  e = ao(e, 255), t = ao(t, 255), n = ao(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r, a, l = (o + i) / 2;
  if (o == i)
    r = a = 0;
  else {
    var s = o - i;
    switch (a = l > 0.5 ? s / (2 - o - i) : s / (o + i), o) {
      case e:
        r = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / s + 2;
        break;
      case n:
        r = (e - t) / s + 4;
        break;
    }
    r /= 6;
  }
  return {
    h: r,
    s: a,
    l
  };
}
function hz(e, t, n) {
  var o, i, r;
  e = ao(e, 360), t = ao(t, 100), n = ao(n, 100);
  function a(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 = r = n;
  else {
    var l = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - l;
    o = a(s, l, e + 1 / 3), i = a(s, l, e), r = a(s, l, e - 1 / 3);
  }
  return {
    r: o * 255,
    g: i * 255,
    b: r * 255
  };
}
function Yx(e, t, n) {
  e = ao(e, 255), t = ao(t, 255), n = ao(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r, a, l = o, s = o - i;
  if (a = o === 0 ? 0 : s / o, o == i)
    r = 0;
  else {
    switch (o) {
      case e:
        r = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / s + 2;
        break;
      case n:
        r = (e - t) / s + 4;
        break;
    }
    r /= 6;
  }
  return {
    h: r,
    s: a,
    v: l
  };
}
function gz(e, t, n) {
  e = ao(e, 360) * 6, t = ao(t, 100), n = ao(n, 100);
  var o = Math.floor(e), i = e - o, r = n * (1 - t), a = n * (1 - i * t), l = n * (1 - (1 - i) * t), s = o % 6, u = [n, a, r, r, l, n][s], c = [l, n, n, a, r, r][s], d = [r, r, l, n, n, a][s];
  return {
    r: u * 255,
    g: c * 255,
    b: d * 255
  };
}
function Gx(e, t, n, o) {
  var i = [Sr(Math.round(e).toString(16)), Sr(Math.round(t).toString(16)), Sr(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 vz(e, t, n, o, i) {
  var r = [Sr(Math.round(e).toString(16)), Sr(Math.round(t).toString(16)), Sr(Math.round(n).toString(16)), Sr(RO(o))];
  return i && r[0].charAt(0) == r[0].charAt(1) && r[1].charAt(0) == r[1].charAt(1) && r[2].charAt(0) == r[2].charAt(1) && r[3].charAt(0) == r[3].charAt(1) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
}
function Ux(e, t, n, o) {
  var i = [Sr(RO(o)), Sr(Math.round(e).toString(16)), Sr(Math.round(t).toString(16)), Sr(Math.round(n).toString(16))];
  return i.join("");
}
Dt.equals = function(e, t) {
  return !e || !t ? !1 : Dt(e).toRgbString() == Dt(t).toRgbString();
};
Dt.random = function() {
  return Dt.fromRatio({
    r: Math.random(),
    g: Math.random(),
    b: Math.random()
  });
};
function mz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.s -= t / 100, n.s = hh(n.s), Dt(n);
}
function bz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.s += t / 100, n.s = hh(n.s), Dt(n);
}
function yz(e) {
  return Dt(e).desaturate(100);
}
function xz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.l += t / 100, n.l = hh(n.l), Dt(n);
}
function wz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(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)))), Dt(n);
}
function Sz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = Dt(e).toHsl();
  return n.l -= t / 100, n.l = hh(n.l), Dt(n);
}
function Cz(e, t) {
  var n = Dt(e).toHsl(), o = (n.h + t) % 360;
  return n.h = o < 0 ? 360 + o : o, Dt(n);
}
function $z(e) {
  var t = Dt(e).toHsl();
  return t.h = (t.h + 180) % 360, Dt(t);
}
function Xx(e, t) {
  if (isNaN(t) || t <= 0)
    throw new Error("Argument to polyad must be a positive number");
  for (var n = Dt(e).toHsl(), o = [Dt(e)], i = 360 / t, r = 1; r < t; r++)
    o.push(Dt({
      h: (n.h + r * i) % 360,
      s: n.s,
      l: n.l
    }));
  return o;
}
function Pz(e) {
  var t = Dt(e).toHsl(), n = t.h;
  return [Dt(e), Dt({
    h: (n + 72) % 360,
    s: t.s,
    l: t.l
  }), Dt({
    h: (n + 216) % 360,
    s: t.s,
    l: t.l
  })];
}
function Oz(e, t, n) {
  t = t || 6, n = n || 30;
  var o = Dt(e).toHsl(), i = 360 / n, r = [Dt(e)];
  for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
    o.h = (o.h + i) % 360, r.push(Dt(o));
  return r;
}
function kz(e, t) {
  t = t || 6;
  for (var n = Dt(e).toHsv(), o = n.h, i = n.s, r = n.v, a = [], l = 1 / t; t--; )
    a.push(Dt({
      h: o,
      s: i,
      v: r
    })), r = (r + l) % 1;
  return a;
}
Dt.mix = function(e, t, n) {
  n = n === 0 ? 0 : n || 50;
  var o = Dt(e).toRgb(), i = Dt(t).toRgb(), r = n / 100, a = {
    r: (i.r - o.r) * r + o.r,
    g: (i.g - o.g) * r + o.g,
    b: (i.b - o.b) * r + o.b,
    a: (i.a - o.a) * r + o.a
  };
  return Dt(a);
};
Dt.readability = function(e, t) {
  var n = Dt(e), o = Dt(t);
  return (Math.max(n.getLuminance(), o.getLuminance()) + 0.05) / (Math.min(n.getLuminance(), o.getLuminance()) + 0.05);
};
Dt.isReadable = function(e, t, n) {
  var o = Dt.readability(e, t), i, r;
  switch (r = !1, i = Dz(n), i.level + i.size) {
    case "AAsmall":
    case "AAAlarge":
      r = o >= 4.5;
      break;
    case "AAlarge":
      r = o >= 3;
      break;
    case "AAAsmall":
      r = o >= 7;
      break;
  }
  return r;
};
Dt.mostReadable = function(e, t, n) {
  var o = null, i = 0, r, a, l, s;
  n = n || {}, a = n.includeFallbackColors, l = n.level, s = n.size;
  for (var u = 0; u < t.length; u++)
    r = Dt.readability(e, t[u]), r > i && (i = r, o = Dt(t[u]));
  return Dt.isReadable(e, o, {
    level: l,
    size: s
  }) || !a ? o : (n.includeFallbackColors = !1, Dt.mostReadable(e, ["#fff", "#000"], n));
};
var im = Dt.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"
}, Iz = Dt.hexNames = Mz(im);
function Mz(e) {
  var t = {};
  for (var n in e)
    e.hasOwnProperty(n) && (t[e[n]] = n);
  return t;
}
function AO(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function ao(e, t) {
  Tz(e) && (e = "100%");
  var n = _z(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 hh(e) {
  return Math.min(1, Math.max(0, e));
}
function $i(e) {
  return parseInt(e, 16);
}
function Tz(e) {
  return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
}
function _z(e) {
  return typeof e == "string" && e.indexOf("%") != -1;
}
function Sr(e) {
  return e.length == 1 ? "0" + e : "" + e;
}
function Nc(e) {
  return e <= 1 && (e = e * 100 + "%"), e;
}
function RO(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function Qx(e) {
  return $i(e) / 255;
}
var fr = (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 ya(e) {
  return !!fr.CSS_UNIT.exec(e);
}
function Ez(e) {
  e = e.replace(cz, "").replace(dz, "").toLowerCase();
  var t = !1;
  if (im[e])
    e = im[e], t = !0;
  else if (e == "transparent")
    return {
      r: 0,
      g: 0,
      b: 0,
      a: 0,
      format: "name"
    };
  var n;
  return (n = fr.rgb.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3]
  } : (n = fr.rgba.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3],
    a: n[4]
  } : (n = fr.hsl.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3]
  } : (n = fr.hsla.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3],
    a: n[4]
  } : (n = fr.hsv.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3]
  } : (n = fr.hsva.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3],
    a: n[4]
  } : (n = fr.hex8.exec(e)) ? {
    r: $i(n[1]),
    g: $i(n[2]),
    b: $i(n[3]),
    a: Qx(n[4]),
    format: t ? "name" : "hex8"
  } : (n = fr.hex6.exec(e)) ? {
    r: $i(n[1]),
    g: $i(n[2]),
    b: $i(n[3]),
    format: t ? "name" : "hex"
  } : (n = fr.hex4.exec(e)) ? {
    r: $i(n[1] + "" + n[1]),
    g: $i(n[2] + "" + n[2]),
    b: $i(n[3] + "" + n[3]),
    a: Qx(n[4] + "" + n[4]),
    format: t ? "name" : "hex8"
  } : (n = fr.hex3.exec(e)) ? {
    r: $i(n[1] + "" + n[1]),
    g: $i(n[2] + "" + n[2]),
    b: $i(n[3] + "" + n[3]),
    format: t ? "name" : "hex"
  } : !1;
}
function Dz(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 Az(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 NO = /* @__PURE__ */ new Map();
function Ig(e) {
  NO.set(e.type, e);
}
function $p(e) {
  return NO.get(e);
}
const Zx = [
  "api-gateway",
  "auth-service",
  "payment-service",
  "user-service",
  "notification-service",
  "order-service",
  "inventory-service",
  "search-service"
];
function Mg(e) {
  let t = e;
  return () => (t = (t * 16807 + 0) % 2147483647, t / 2147483647);
}
function Rz(e, t, n, o, i) {
  const r = n ^ Math.floor(Date.now() / 5e3) * 2654435761, a = Mg(n), l = Mg(r);
  if (e === "random-walk") {
    const s = Mg((n + Date.now()) % 2147483647), u = i + o * 0.5, c = i * 0.1, d = i + o * 1.8, f = [u];
    for (let p = 1; p < t; p++) {
      const v = f[p - 1], g = (u - v) * 0.05, m = (s() - 0.5) * o * 0.08 + g;
      f.push(Math.max(c, Math.min(d, v + m)));
    }
    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 + (a() - 0.5) * o * 0.2;
        break;
      case "spike": {
        const p = [0.2, 0.5, 0.8].reduce(
          (v, g) => v + Math.exp(-((c - g) ** 2) / 1e-3) * o * 2,
          0
        );
        d = i + p + (a() - 0.5) * o * 0.15;
        break;
      }
      case "step":
        d = i + Math.floor(c * 5) % 3 * o * 0.5 + (a() - 0.5) * o * 0.1;
        break;
      case "sawtooth":
        d = i + c * 3 % 1 * o + (a() - 0.5) * o * 0.15;
        break;
      case "noise":
        d = i + a() * o;
        break;
      case "trend-up":
        d = i + c * o * 1.5 + Math.sin(c * 10) * o * 0.2 + (a() - 0.5) * o * 0.1;
        break;
      case "trend-down":
        d = i + (1 - c) * o * 1.5 + Math.sin(c * 8) * o * 0.15 + (a() - 0.5) * o * 0.1;
        break;
      case "plateau": {
        const v = c < 0.3 ? c / 0.3 : c > 0.7 ? (1 - c) / 0.30000000000000004 : 1;
        d = i + v * o + (a() - 0.5) * o * 0.1;
        break;
      }
      case "live": {
        if (c < 0.9)
          d = i + Math.sin(c * Math.PI * 4 + n) * o * 0.6 + (a() - 0.5) * o * 0.1;
        else {
          const p = (c - 0.9) / 0.09999999999999998;
          d = i + Math.sin(0.9 * Math.PI * 4 + n) * o * 0.6 + (l() - 0.5) * o * 0.4 * p * 2;
        }
        break;
      }
      default:
        d = i;
    }
    return Math.max(0, d);
  });
}
function zO(e, t = 15, n = 3, o = "sine", i) {
  const r = [];
  for (let l = e.from; l <= e.to; l += t)
    r.push(l);
  const a = Array.from({ length: n }, (l, s) => {
    const u = 20 + (s * 37 + 13) % 60, c = 10 + (s * 53 + 7) % 40, d = Rz(o, r.length, s * 1e3 + 42, u, c);
    return {
      label: i?.[s] ?? Zx[s % Zx.length],
      values: d
    };
  });
  return { timestamps: r, series: a };
}
function Nz(e, t, n, o) {
  const r = ((n + o) / 2 - e) * 0.05, a = (Math.random() - 0.5) * t * 0.08 + r;
  return Math.max(n, Math.min(o, e + a));
}
class zz {
  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, intervalMs: i, maxDataPoints: r } = t, a = n.to - n.from, l = Math.max(i, Math.ceil(a / (r || 1e3))), s = Math.max(Math.round(l / 1e3), 1), u = o.filter((c) => c).map((c) => {
      const { timestamps: d, series: f } = zO(
        { from: n.from / 1e3, to: n.to / 1e3 },
        s,
        c.seriesCount,
        c.pattern,
        c.labels
      ), p = d.map((g) => g * 1e3), v = [
        { name: "Time", type: ho.time, values: p, config: {} },
        ...f.map((g) => ({
          name: g.label,
          type: ho.number,
          values: g.values,
          config: { displayNameFromDS: g.label }
        }))
      ];
      return Az({ name: c.metric, refId: "A", fields: v });
    });
    return Promise.resolve({ data: u, state: "Done" });
  }
}
const Il = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff",
  "#2f54eb",
  "#f5222d",
  "#fadb14",
  "#7cb305",
  "#08979c",
  "#531dab",
  "#c41d7f",
  "#d4380d",
  "#d48806",
  "#389e0d"
];
function xa(e, t) {
  if (e.length < 2 || t < 2)
    return [...e];
  const n = (r) => [
    Number.parseInt(r.slice(1, 3), 16),
    Number.parseInt(r.slice(3, 5), 16),
    Number.parseInt(r.slice(5, 7), 16)
  ], o = (r) => Math.round(Math.max(0, Math.min(255, r))).toString(16).padStart(2, "0"), i = e.length - 1;
  return Array.from({ length: t }, (r, a) => {
    const l = a / (t - 1) * i, s = Math.min(Math.floor(l), i - 1), u = l - s, [c, d, f] = n(e[s]), [p, v, g] = n(e[s + 1]);
    return `#${o(c + (p - c) * u)}${o(d + (v - d) * u)}${o(f + (g - f) * u)}`;
  });
}
const qi = {
  classic: Il,
  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: xa(["#cfe2f3", "#9fc5e8", "#3d85c8", "#0b5394", "#041d3a"], 16),
  reds: xa(["#fce5cd", "#f6b26b", "#e06666", "#cc0000", "#660000"], 16),
  GrYlRd: xa(
    ["#37872d", "#96d98d", "#fee520", "#ff780a", "#f2495c", "#8f3bb8"],
    16
  ),
  "purple-orange": xa(
    ["#7b2d8b", "#d45087", "#ff7c43", "#ffa600", "#f0e442", "#b3de69"],
    16
  ),
  "green-yellow-red": xa(
    ["#1a9850", "#a6d96a", "#fee08b", "#fdae61", "#d73027"],
    16
  ),
  "red-yellow-green": xa(
    ["#d73027", "#fdae61", "#fee08b", "#a6d96a", "#1a9850"],
    16
  ),
  "blue-yellow-red": xa(
    ["#2166ac", "#92c5de", "#d1e5f0", "#fddbc7", "#f4a582", "#b2182b"],
    16
  ),
  "blue-purple": xa(
    ["#045a8d", "#74a9cf", "#ccebc5", "#9ebcda", "#8856a7", "#810f7c"],
    16
  ),
  "yellow-blue": xa(["#ffffd9", "#c7e9b4", "#41b6c4", "#225ea8", "#0c2c84"], 16)
};
function Bz(e) {
  return !e || e === "classic" ? Il : qi[e] ?? Il;
}
function BO(e, t, n = "sequential", o) {
  if (t === 0)
    return [];
  if (e === "fixed") {
    const r = o ?? Il[0];
    return Array.from({ length: t }, () => r);
  }
  if (e === "thresholds")
    return [];
  const i = Bz(e);
  return n === "distributed" && t > 1 ? Array.from({ length: t }, (r, a) => {
    const l = Math.round(a * (i.length - 1) / (t - 1));
    return i[l];
  }) : Array.from({ length: t }, (r, a) => i[a % i.length]);
}
const Yn = {
  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 Fz = 0;
function rm() {
  return `panel-${Date.now()}-${++Fz}`;
}
function Ui(e) {
  return [{ id: "A", enabled: !0, dataSource: e }];
}
const Lz = {
  timeseries: {
    queries: Ui({
      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: Ui({
      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: Ui({ 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: Ui({
      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: Ui({ 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: Ui({ 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: Ui({
      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 FO(e, t) {
  const n = t?.id ?? rm();
  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
  }, ...Lz[e], ...t, id: n };
}
function LO() {
  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: Ui({
          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: Ui({
          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: Ui({
          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: Ui({
          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: Ui({
          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 = FO(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 Hz() {
  return JSON.stringify(LO(), null, 2);
}
const HO = /* @__PURE__ */ new Map();
function Ql(e) {
  HO.set(e.meta.type, e);
}
function Vz(e) {
  return HO.get(e);
}
const jz = {
  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 }
  ]
}, Wz = {
  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 }
  ]
}, Kz = {
  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 }
  ]
}, qz = {
  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 }
  ]
}, Yz = {
  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 }
  ]
}, Gz = {
  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 }
  ]
}, Uz = {
  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 Xz() {
  Ql(Uz), Ql(jz), Ql(Kz), Ql(Yz), Ql(Wz), Ql(Gz), Ql(qz);
}
function zc(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, r) => i + r, 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, r) => i + r, 0);
    case "count":
      return o.length;
    default:
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
  }
}
function uf(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 gh {
  constructor(t) {
    this.props = t;
  }
}
var am = /* @__PURE__ */ ((e) => (e.LOCAL_STORAGE = "LOCAL_STORAGE", e.IN_MEMORY = "IN_MEMORY", e))(am || {}), ws = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Logarithmic = "logarithmic", e.Symlog = "symlog", e))(ws || {}), Xr = /* @__PURE__ */ ((e) => (e.Lines = "lines", e.Bars = "bars", e.Points = "points", e.Histogram = "histogram", e))(Xr || {}), Uf = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Smooth = "smooth", e.StepBefore = "stepBefore", e.StepAfter = "stepAfter", e))(Uf || {}), lm = /* @__PURE__ */ ((e) => (e.Solid = "solid", e.Dashed = "dashed", e.Dotted = "dotted", e))(lm || {}), Yc = /* @__PURE__ */ ((e) => (e.None = "none", e.Solid = "solid", e.Gradient = "gradient", e))(Yc || {}), VO = /* @__PURE__ */ ((e) => (e[e.Before = -1] = "Before", e[e.Center = 0] = "Center", e[e.After = 1] = "After", e))(VO || {});
function Qz(e, t, n) {
  if (!n || n.length === 0)
    return 0;
  const o = n.reduce((i, r) => r.length > i.length ? r : i, "");
  return o === "" || !t.font?.[0] ? 0 : (e.ctx.font = t.font[0], e.ctx.measureText(o).width / devicePixelRatio);
}
function Zz(e) {
  return (t, n, o, i) => {
    const r = t.axes[o];
    if (i > 1) {
      const l = r._size;
      if (l !== void 0)
        return l;
    }
    let a = (r.ticks?.size ?? 0) + e;
    return a += Qz(t, r, n), Math.ceil(a);
  };
}
class Jz extends gh {
  buildGridConfig() {
    const { grid: t, isDarkMode: n, isLogScale: o } = this.props, i = n ? "#444" : "#E8E9EA", r = o ? 0.1 : 0.2;
    return t ? {
      stroke: t.stroke ?? i,
      width: t.width ?? r,
      show: t.show ?? !0
    } : { stroke: i, width: r, show: !0 };
  }
  buildTicksConfig() {
    const { ticks: t } = this.props;
    return t || { width: 0.3, show: !0 };
  }
  buildXAxisValuesFormatter() {
    if (this.props.isTimeAxis !== !1)
      return (t, n) => n.map((o) => {
        if (o == null || Number.isNaN(o))
          return "";
        const i = new Date(o * 1e3);
        return `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`;
      });
  }
  buildYAxisValuesFormatter() {
    const { yAxisUnit: t, decimalPrecision: n } = this.props;
    return (o, i) => i.map((r) => {
      if (r == null || Number.isNaN(r))
        return "";
      const a = r.toFixed(n ?? 1);
      return t ? `${a} ${t}` : a;
    });
  }
  buildValuesFormatter() {
    const { values: t, scaleKey: n } = this.props;
    if (t)
      return t;
    if (n === "x")
      return this.buildXAxisValuesFormatter();
    if (n === "y")
      return this.buildYAxisValuesFormatter();
  }
  buildSizeCalculator() {
    const { size: t, scaleKey: n } = this.props;
    if (t)
      return t;
    if (n === "y")
      return Zz(this.props.gap ?? 5);
  }
  buildStrokeColor() {
    const { stroke: t, isDarkMode: n } = this.props;
    if (t !== void 0)
      return t;
    if (n !== void 0)
      return n ? "white" : "black";
  }
  getConfig() {
    const {
      scaleKey: t,
      label: n,
      show: o = !0,
      side: i = 2,
      space: r,
      gap: a = 5
    } = this.props, l = this.buildGridConfig(), s = this.buildTicksConfig(), u = this.buildValuesFormatter(), c = this.buildSizeCalculator(), d = this.buildStrokeColor(), f = { scale: t, show: o, side: i };
    n && (f.label = n), d && (f.stroke = d), l && (f.grid = l), s && (f.ticks = s), u && (f.values = u), a !== void 0 && (f.gap = a), r !== void 0 && (f.space = r), c && (f.size = c);
    const { border: p } = this.props;
    return p?.show && (f.border = {
      stroke: p.stroke ?? d ?? "#666666",
      width: p.width ?? 1,
      show: !0
    }), f;
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
const e4 = "#FFFFFF", jO = 30, t4 = 1e6, n4 = 3, o4 = {
  focus: { alpha: 0.3 },
  legend: { show: !1 },
  padding: [16, 16, 8, 8],
  series: [],
  hooks: {}
}, Tg = {
  drag: { setScale: !0 },
  points: {
    one: !0,
    size: (e, t) => (e.series[t]?.points?.size ?? 0) * 3,
    width: (e, t, n) => n / 4,
    stroke: (e, t) => {
      const n = e.series[t]?.points, o = typeof n?.stroke == "function" ? n.stroke : void 0;
      return `${o !== void 0 ? o(e, t) : typeof n?.stroke == "string" ? n.stroke : ""}90`;
    },
    fill: () => e4
  },
  focus: { prox: t4 },
  hover: { prox: jO, bias: 0 }
};
function i4(e, t, n) {
  return e;
}
function r4(e) {
  const t = [10, 5];
  function n(r, a, l) {
    const s = r.ctx;
    s.save(), s.lineWidth = 2, s.setLineDash(t);
    const u = s.canvas.height * 0.9;
    for (const c of l) {
      const d = c.thresholdColor ?? "red", f = i4(
        c.thresholdValue,
        c.thresholdUnit,
        e.yAxisUnit
      ), p = r.valToPos(Number(f), a, !0), v = Math.round(r.bbox.left), g = Math.round(p), m = Math.round(r.bbox.left + r.bbox.width);
      if (s.strokeStyle = d, s.beginPath(), s.moveTo(v, g), s.lineTo(m, g), s.stroke(), c.thresholdLabel) {
        const x = s.measureText(c.thresholdLabel).width, S = m - x - 20, P = s.canvas.height - g > u ? g + 15 : g - 15;
        s.fillStyle = d, s.fillText(c.thresholdLabel, S, P);
      }
    }
  }
  const { scaleKey: o, thresholds: i } = e;
  return (r) => {
    const a = r.ctx;
    n(r, o, i), a.restore();
  };
}
function Jx({
  seriesShow: e,
  seriesLabel: t,
  visibleStoredLabels: n,
  hiddenStoredLabels: o,
  hasActivePreference: i
}) {
  const r = !!n?.has(t), a = !!o?.has(t);
  return r ? !0 : a || i ? !1 : e ?? !0;
}
const WO = "series_visibility_";
function a4(e) {
  try {
    const t = localStorage.getItem(WO + e);
    return t ? JSON.parse(t) : null;
  } catch {
    return null;
  }
}
function l4(e, t) {
  try {
    localStorage.setItem(WO + e, JSON.stringify(t));
  } catch {
  }
}
function KO({
  uPlotInstance: e,
  stepInterval: t
}) {
  const n = e.scales.x;
  if (n && typeof n.min == "number") {
    const o = n.min, i = o + t, r = e.valToPos(o, "x"), a = e.valToPos(i, "x");
    return Math.abs(a - r);
  }
  return 0;
}
const s4 = !0, No = "u-", u4 = "uplot", c4 = No + "hz", d4 = No + "vt", f4 = No + "title", p4 = No + "wrap", h4 = No + "under", g4 = No + "over", v4 = No + "axis", us = No + "off", m4 = No + "select", b4 = No + "cursor-x", y4 = No + "cursor-y", x4 = No + "cursor-pt", w4 = No + "legend", S4 = No + "live", C4 = No + "inline", $4 = No + "series", P4 = No + "marker", ew = No + "label", O4 = No + "value", Bc = "width", Fc = "height", kc = "top", tw = "bottom", tu = "left", _g = "right", Cy = "#000", nw = Cy + "0", ow = "mousemove", iw = "mousedown", Eg = "mouseup", rw = "mouseenter", aw = "mouseleave", lw = "dblclick", k4 = "resize", I4 = "scroll", sw = "change", Pp = "dppxchange", $y = "--", ac = typeof window < "u", sm = ac ? document : null, Iu = ac ? window : null, M4 = ac ? navigator : null;
let Nn, cf;
function um() {
  let e = devicePixelRatio;
  Nn != e && (Nn = e, cf && dm(sw, cf, um), cf = matchMedia(`(min-resolution: ${Nn - 1e-3}dppx) and (max-resolution: ${Nn + 1e-3}dppx)`), Ss(sw, cf, um), Iu.dispatchEvent(new CustomEvent(Pp)));
}
function Oi(e, t) {
  if (t != null) {
    let n = e.classList;
    !n.contains(t) && n.add(t);
  }
}
function cm(e, t) {
  let n = e.classList;
  n.contains(t) && n.remove(t);
}
function eo(e, t, n) {
  e.style[t] = n + "px";
}
function pr(e, t, n, o) {
  let i = sm.createElement(e);
  return t != null && Oi(i, t), n?.insertBefore(i, o), i;
}
function Yi(e, t) {
  return pr("div", e, t);
}
const uw = /* @__PURE__ */ new WeakMap();
function Vr(e, t, n, o, i) {
  let r = "translate(" + t + "px," + n + "px)", a = uw.get(e);
  r != a && (e.style.transform = r, uw.set(e, r), t < 0 || n < 0 || t > o || n > i ? Oi(e, us) : cm(e, us));
}
const cw = /* @__PURE__ */ new WeakMap();
function dw(e, t, n) {
  let o = t + n, i = cw.get(e);
  o != i && (cw.set(e, o), e.style.background = t, e.style.borderColor = n);
}
const fw = /* @__PURE__ */ new WeakMap();
function pw(e, t, n, o) {
  let i = t + "" + n, r = fw.get(e);
  i != r && (fw.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 Py = { passive: !0 }, T4 = { ...Py, capture: !0 };
function Ss(e, t, n, o) {
  t.addEventListener(e, n, o ? T4 : Py);
}
function dm(e, t, n, o) {
  t.removeEventListener(e, n, Py);
}
ac && um();
function br(e, t, n, o) {
  let i;
  n = n || 0, o = o || t.length - 1;
  let r = o <= 2147483647;
  for (; o - n > 1; )
    i = r ? n + o >> 1 : Ti((n + o) / 2), t[i] < e ? n = i : o = i;
  return e - t[n] <= t[o] - e ? n : o;
}
function Fu(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 _4(e, t, n, o) {
  let i = vn, r = -vn;
  if (o == 1)
    i = e[t], r = e[n];
  else if (o == -1)
    i = e[n], r = e[t];
  else
    for (let a = t; a <= n; a++) {
      let l = e[a];
      l != null && (l < i && (i = l), l > r && (r = l));
    }
  return [i, r];
}
function E4(e, t, n) {
  let o = vn, i = -vn;
  for (let r = t; r <= n; r++) {
    let a = e[r];
    a != null && a > 0 && (a < o && (o = a), a > i && (i = a));
  }
  return [o, i];
}
function vh(e, t, n, o) {
  let i = vw(e), r = vw(t);
  e == t && (i == -1 ? (e *= n, t /= n) : (e /= n, t *= n));
  let a = n == 10 ? Ra : qO, l = i == 1 ? Ti : Xi, s = r == 1 ? Xi : Ti, u = l(a(Io(e))), c = s(a(Io(t))), d = Lu(n, u), f = Lu(n, c);
  return n == 10 && (u < 0 && (d = Gn(d, -u)), c < 0 && (f = Gn(f, -c))), o || n == 2 ? (e = d * i, t = f * r) : (e = UO(e, d), t = mh(t, f)), [e, t];
}
function Oy(e, t, n, o) {
  let i = vh(e, t, n, o);
  return e == 0 && (i[0] = 0), t == 0 && (i[1] = 0), i;
}
const ky = 0.1, hw = {
  mode: 3,
  pad: ky
}, Gc = {
  pad: 0,
  soft: null,
  mode: 0
}, D4 = {
  min: Gc,
  max: Gc
};
function Op(e, t, n, o) {
  return bh(n) ? gw(e, t, n) : (Gc.pad = n, Gc.soft = o ? 0 : null, Gc.mode = o ? 3 : 0, gw(e, t, D4));
}
function kn(e, t) {
  return e ?? t;
}
function A4(e, t, n) {
  for (t = kn(t, 0), n = kn(n, e.length - 1); t <= n; ) {
    if (e[t] != null)
      return !0;
    t++;
  }
  return !1;
}
function gw(e, t, n) {
  let o = n.min, i = n.max, r = kn(o.pad, 0), a = kn(i.pad, 0), l = kn(o.hard, -vn), s = kn(i.hard, vn), u = kn(o.soft, vn), c = kn(i.soft, -vn), d = kn(o.mode, 0), f = kn(i.mode, 0), p = t - e, v = Ra(p), g = Qo(Io(e), Io(t)), m = Ra(g), x = Io(m - v);
  (p < 1e-24 || x > 10) && (p = 0, (e == 0 || t == 0) && (p = 1e-24, d == 2 && u != vn && (r = 0), f == 2 && c != -vn && (a = 0)));
  let S = p || g || 1e3, C = Ra(S), P = Lu(10, Ti(C)), $ = S * (p == 0 ? e == 0 ? 0.1 : 1 : r), I = Gn(UO(e - $, P / 10), 24), w = e >= u && (d == 1 || d == 3 && I <= u || d == 2 && I >= u) ? u : vn, M = Qo(l, I < w && e >= w ? w : Zi(w, I)), _ = S * (p == 0 ? t == 0 ? 0.1 : 1 : a), N = Gn(mh(t + _, P / 10), 24), R = t <= c && (f == 1 || f == 3 && N >= c || f == 2 && N <= c) ? c : -vn, H = Zi(s, N > R && t <= R ? R : Qo(R, N));
  return M == H && M == 0 && (H = 100), [M, H];
}
const R4 = new Intl.NumberFormat(ac ? M4.language : "en-US"), Iy = (e) => R4.format(e), Ni = Math, Xf = Ni.PI, Io = Ni.abs, Ti = Ni.floor, Oo = Ni.round, Xi = Ni.ceil, Zi = Ni.min, Qo = Ni.max, Lu = Ni.pow, vw = Ni.sign, Ra = Ni.log10, qO = Ni.log2, N4 = (e, t = 1) => Ni.sinh(e) * t, Dg = (e, t = 1) => Ni.asinh(e / t), vn = 1 / 0;
function mw(e) {
  return (Ra((e ^ e >> 31) - (e >> 31)) | 0) + 1;
}
function fm(e, t, n) {
  return Zi(Qo(e, t), n);
}
function gn(e) {
  return typeof e == "function" ? e : () => e;
}
const z4 = () => {
}, YO = (e) => e, GO = (e, t) => t, B4 = (e) => null, bw = (e) => !0, yw = (e, t) => e == t, F4 = /\.\d*?(?=9{6,}|0{6,})/gm, ks = (e) => {
  if (QO(e) || Dl.has(e))
    return e;
  const t = `${e}`, n = t.match(F4);
  if (n == null)
    return e;
  let o = n[0].length - 1;
  if (t.indexOf("e-") != -1) {
    let [i, r] = t.split("e");
    return +`${ks(i)}e${r}`;
  }
  return Gn(e, o);
};
function rs(e, t) {
  return ks(Gn(ks(e / t)) * t);
}
function mh(e, t) {
  return ks(Xi(ks(e / t)) * t);
}
function UO(e, t) {
  return ks(Ti(ks(e / t)) * t);
}
function Gn(e, t = 0) {
  if (QO(e))
    return e;
  let n = 10 ** t, o = e * n * (1 + Number.EPSILON);
  return Oo(o) / n;
}
const Dl = /* @__PURE__ */ new Map();
function XO(e) {
  return (("" + e).split(".")[1] || "").length;
}
function pd(e, t, n, o) {
  let i = [], r = o.map(XO);
  for (let a = t; a < n; a++) {
    let l = Io(a), s = Gn(Lu(e, a), l);
    for (let u = 0; u < o.length; u++) {
      let c = e == 10 ? +`${o[u]}e${a}` : o[u] * s, d = (a >= 0 ? 0 : l) + (a >= r[u] ? 0 : r[u]), f = e == 10 ? c : Gn(c, d);
      i.push(f), Dl.set(f, d);
    }
  }
  return i;
}
const Uc = {}, My = [], Hu = [null, null], ml = Array.isArray, QO = Number.isInteger, L4 = (e) => e === void 0;
function xw(e) {
  return typeof e == "string";
}
function bh(e) {
  let t = !1;
  if (e != null) {
    let n = e.constructor;
    t = n == null || n == Object;
  }
  return t;
}
function H4(e) {
  return e != null && typeof e == "object";
}
const V4 = Object.getPrototypeOf(Uint8Array), ZO = "__proto__";
function Vu(e, t = bh) {
  let n;
  if (ml(e)) {
    let o = e.find((i) => i != null);
    if (ml(o) || t(o)) {
      n = Array(e.length);
      for (let i = 0; i < e.length; i++)
        n[i] = Vu(e[i], t);
    } else
      n = e.slice();
  } else if (e instanceof V4)
    n = e.slice();
  else if (t(e)) {
    n = {};
    for (let o in e)
      o != ZO && (n[o] = Vu(e[o], t));
  } else
    n = e;
  return n;
}
function So(e) {
  let t = arguments;
  for (let n = 1; n < t.length; n++) {
    let o = t[n];
    for (let i in o)
      i != ZO && (bh(e[i]) ? So(e[i], Vu(o[i])) : e[i] = Vu(o[i]));
  }
  return e;
}
const j4 = 0, W4 = 1, K4 = 2;
function q4(e, t, n) {
  for (let o = 0, i, r = -1; o < t.length; o++) {
    let a = t[o];
    if (a > r) {
      for (i = a - 1; i >= 0 && e[i] == null; )
        e[i--] = null;
      for (i = a + 1; i < n && e[i] == null; )
        e[r = i++] = null;
    }
  }
}
function Y4(e, t) {
  if (X4(e)) {
    let a = e[0].slice();
    for (let l = 1; l < e.length; l++)
      a.push(...e[l].slice(1));
    return Q4(a[0]) || (a = U4(a)), a;
  }
  let n = /* @__PURE__ */ new Set();
  for (let a = 0; a < e.length; a++) {
    let s = e[a][0], u = s.length;
    for (let c = 0; c < u; c++)
      n.add(s[c]);
  }
  let o = [Array.from(n).sort((a, l) => a - l)], i = o[0].length, r = /* @__PURE__ */ new Map();
  for (let a = 0; a < i; a++)
    r.set(o[0][a], a);
  for (let a = 0; a < e.length; a++) {
    let l = e[a], s = l[0];
    for (let u = 1; u < l.length; u++) {
      let c = l[u], d = Array(i).fill(void 0), f = t ? t[a][u] : W4, p = [];
      for (let v = 0; v < c.length; v++) {
        let g = c[v], m = r.get(s[v]);
        g === null ? f != j4 && (d[m] = g, f == K4 && p.push(m)) : d[m] = g;
      }
      q4(d, p, i), o.push(d);
    }
  }
  return o;
}
const G4 = typeof queueMicrotask > "u" ? (e) => Promise.resolve().then(e) : queueMicrotask;
function U4(e) {
  let t = e[0], n = t.length, o = Array(n);
  for (let r = 0; r < o.length; r++)
    o[r] = r;
  o.sort((r, a) => t[r] - t[a]);
  let i = [];
  for (let r = 0; r < e.length; r++) {
    let a = e[r], l = Array(n);
    for (let s = 0; s < n; s++)
      l[s] = a[o[s]];
    i.push(l);
  }
  return i;
}
function X4(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 r = 0; r < n; r++)
        if (i[r] != t[r])
          return !1;
    }
  }
  return !0;
}
function Q4(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 r = Qo(1, Ti((i - o + 1) / t));
  for (let a = e[o], l = o + r; l <= i; l += r) {
    const s = e[l];
    if (s != null) {
      if (s <= a)
        return !1;
      a = s;
    }
  }
  return !0;
}
const JO = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], ek = [
  "Sunday",
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday"
];
function tk(e) {
  return e.slice(0, 3);
}
const Z4 = ek.map(tk), J4 = JO.map(tk), e3 = {
  MMMM: JO,
  MMM: J4,
  WWWW: ek,
  WWW: Z4
};
function Ic(e) {
  return (e < 10 ? "0" : "") + e;
}
function t3(e) {
  return (e < 10 ? "00" : e < 100 ? "0" : "") + e;
}
const n3 = {
  // 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) => Ic(e.getMonth() + 1),
  // 7
  M: (e) => e.getMonth() + 1,
  // 09
  DD: (e) => Ic(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) => Ic(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) => Ic(e.getMinutes()),
  // 9
  m: (e) => e.getMinutes(),
  // 09
  ss: (e) => Ic(e.getSeconds()),
  // 9
  s: (e) => e.getSeconds(),
  // 374
  fff: (e) => t3(e.getMilliseconds())
};
function Ty(e, t) {
  t = t || e3;
  let n = [], o = /\{([a-z]+)\}|[^{]+/gi, i;
  for (; i = o.exec(e); )
    n.push(i[0][0] == "{" ? n3[i[1]] : i[0]);
  return (r) => {
    let a = "";
    for (let l = 0; l < n.length; l++)
      a += typeof n[l] == "string" ? n[l] : n[l](r, t);
    return a;
  };
}
const o3 = new Intl.DateTimeFormat().resolvedOptions().timeZone;
function i3(e, t) {
  let n;
  return t == "UTC" || t == "Etc/UTC" ? n = new Date(+e + e.getTimezoneOffset() * 6e4) : t == o3 ? n = e : (n = new Date(e.toLocaleString("en-US", { timeZone: t })), n.setMilliseconds(e.getMilliseconds())), n;
}
const nk = (e) => e % 1 == 0, kp = [1, 2, 2.5, 5], r3 = pd(10, -32, 0, kp), ok = pd(10, 0, 32, kp), a3 = ok.filter(nk), as = r3.concat(ok), _y = `
`, ik = "{YYYY}", ww = _y + ik, rk = "{M}/{D}", Lc = _y + rk, df = Lc + "/{YY}", ak = "{aa}", l3 = "{h}:{mm}", gu = l3 + ak, Sw = _y + gu, Cw = ":{ss}", zn = null;
function lk(e) {
  let t = e * 1e3, n = t * 60, o = n * 60, i = o * 24, r = i * 30, a = i * 365, s = (e == 1 ? pd(10, 0, 3, kp).filter(nk) : pd(10, -3, 0, kp)).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)
    r,
    r * 2,
    r * 3,
    r * 4,
    r * 6,
    // century divisors
    a,
    a * 2,
    a * 5,
    a * 10,
    a * 25,
    a * 50,
    a * 100
  ]);
  const u = [
    //   tick incr    default          year                    month   day                   hour    min       sec   mode
    [a, ik, zn, zn, zn, zn, zn, zn, 1],
    [i * 28, "{MMM}", ww, zn, zn, zn, zn, zn, 1],
    [i, rk, ww, zn, zn, zn, zn, zn, 1],
    [o, "{h}" + ak, df, zn, Lc, zn, zn, zn, 1],
    [n, gu, df, zn, Lc, zn, zn, zn, 1],
    [t, Cw, df + " " + gu, zn, Lc + " " + gu, zn, Sw, zn, 1],
    [e, Cw + ".{fff}", df + " " + gu, zn, Lc + " " + gu, zn, Sw, zn, 1]
  ];
  function c(d) {
    return (f, p, v, g, m, x) => {
      let S = [], C = m >= a, P = m >= r && m < a, $ = d(v), I = Gn($ * e, 3), w = Ag($.getFullYear(), C ? 0 : $.getMonth(), P || C ? 1 : $.getDate()), M = Gn(w * e, 3);
      if (P || C) {
        let _ = P ? m / r : 0, N = C ? m / a : 0, R = I == M ? I : Gn(Ag(w.getFullYear() + N, w.getMonth() + _, 1) * e, 3), H = new Date(Oo(R / e)), L = H.getFullYear(), B = H.getMonth();
        for (let A = 0; R <= g; A++) {
          let G = Ag(L + N * A, B + _ * A, 1), j = G - d(Gn(G * e, 3));
          R = Gn((+G + j) * e, 3), R <= g && S.push(R);
        }
      } else {
        let _ = m >= i ? i : m, N = Ti(v) - Ti(I), R = M + N + mh(I - M, _);
        S.push(R);
        let H = d(R), L = H.getHours() + H.getMinutes() / n + H.getSeconds() / o, B = m / o, A = f.axes[p]._space, G = x / A;
        for (; R = Gn(R + m, e == 1 ? 0 : 3), !(R > g); )
          if (B > 1) {
            let j = Ti(Gn(L + B, 6)) % 24, K = d(R).getHours() - j;
            K > 1 && (K = -1), R -= K * o, L = (L + B) % 24;
            let q = S[S.length - 1];
            Gn((R - q) / m, 3) * G >= 0.7 && S.push(R);
          } else
            S.push(R);
      }
      return S;
    };
  }
  return [
    s,
    u,
    c
  ];
}
const [s3, u3, c3] = lk(1), [d3, f3, p3] = lk(1e-3);
pd(2, -53, 53, [1]);
function $w(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 Pw(e, t) {
  return (n, o, i, r, a) => {
    let l = t.find((v) => a >= v[0]) || t[t.length - 1], s, u, c, d, f, p;
    return o.map((v) => {
      let g = e(v), m = g.getFullYear(), x = g.getMonth(), S = g.getDate(), C = g.getHours(), P = g.getMinutes(), $ = g.getSeconds(), I = m != s && l[2] || x != u && l[3] || S != c && l[4] || C != d && l[5] || P != f && l[6] || $ != p && l[7] || l[1];
      return s = m, u = x, c = S, d = C, f = P, p = $, I(g);
    });
  };
}
function h3(e, t) {
  let n = Ty(t);
  return (o, i, r, a, l) => i.map((s) => n(e(s)));
}
function Ag(e, t, n) {
  return new Date(e, t, n);
}
function Ow(e, t) {
  return t(e);
}
const g3 = "{YYYY}-{MM}-{DD} {h}:{mm}{aa}";
function kw(e, t) {
  return (n, o, i, r) => r == null ? $y : t(e(o));
}
function v3(e, t) {
  let n = e.series[t];
  return n.width ? n.stroke(e, t) : n.points.width ? n.points.stroke(e, t) : null;
}
function m3(e, t) {
  return e.series[t].fill(e, t);
}
const b3 = {
  show: !0,
  live: !0,
  isolate: !1,
  mount: z4,
  markers: {
    show: !0,
    width: 2,
    stroke: v3,
    fill: m3,
    dash: "solid"
  },
  idx: null,
  idxs: null,
  values: []
};
function y3(e, t) {
  let n = e.cursor.points, o = Yi(), i = n.size(e, t);
  eo(o, Bc, i), eo(o, Fc, i);
  let r = i / -2;
  eo(o, "marginLeft", r), eo(o, "marginTop", r);
  let a = n.width(e, t, i);
  return a && eo(o, "borderWidth", a), o;
}
function x3(e, t) {
  let n = e.series[t].points;
  return n._fill || n._stroke;
}
function w3(e, t) {
  let n = e.series[t].points;
  return n._stroke || n._fill;
}
function S3(e, t) {
  return e.series[t].points.size;
}
const Rg = [0, 0];
function C3(e, t, n) {
  return Rg[0] = t, Rg[1] = n, Rg;
}
function ff(e, t, n, o = !0) {
  return (i) => {
    i.button == 0 && (!o || i.target == t) && n(i);
  };
}
function Ng(e, t, n, o = !0) {
  return (i) => {
    (!o || i.target == t) && n(i);
  };
}
const $3 = {
  show: !0,
  x: !0,
  y: !0,
  lock: !1,
  move: C3,
  points: {
    one: !1,
    show: y3,
    size: S3,
    width: 0,
    stroke: w3,
    fill: x3
  },
  bind: {
    mousedown: ff,
    mouseup: ff,
    click: ff,
    // legend clicks, not .u-over clicks
    dblclick: ff,
    mousemove: Ng,
    mouseleave: Ng,
    mouseenter: Ng
  },
  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
}, sk = {
  show: !0,
  stroke: "rgba(0,0,0,0.07)",
  width: 2
  //	dash: [],
}, Ey = So({}, sk, {
  filter: GO
}), uk = So({}, Ey, {
  size: 10
}), ck = So({}, sk, {
  show: !1
}), Dy = '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"', dk = "bold " + Dy, fk = 1.5, Iw = {
  show: !0,
  scale: "x",
  stroke: Cy,
  space: 50,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: dk,
  side: 2,
  //	class: "x-vals",
  //	incrs: timeIncrs,
  //	values: timeVals,
  //	filter: retArg1,
  grid: Ey,
  ticks: uk,
  border: ck,
  font: Dy,
  lineGap: fk,
  rotate: 0
}, P3 = "Value", O3 = "Time", Mw = {
  show: !0,
  scale: "x",
  auto: !1,
  sorted: 1,
  //	label: "Time",
  //	value: v => stamp(new Date(v * 1e3)),
  // internal caches
  min: vn,
  max: -vn,
  idxs: []
};
function k3(e, t, n, o, i) {
  return t.map((r) => r == null ? "" : Iy(r));
}
function I3(e, t, n, o, i, r, a) {
  let l = [], s = Dl.get(i) || 0;
  n = a ? n : Gn(mh(n, i), s);
  for (let u = n; u <= o; u = Gn(u + i, s))
    l.push(Object.is(u, -0) ? 0 : u);
  return l;
}
function pm(e, t, n, o, i, r, a) {
  const l = [], s = e.scales[e.axes[t].scale].log, u = s == 10 ? Ra : qO, c = Ti(u(n));
  i = Lu(s, c), s == 10 && (i = as[br(i, as)]);
  let d = n, f = i * s;
  s == 10 && (f = as[br(f, as)]);
  do
    l.push(d), d = d + i, s == 10 && !Dl.has(d) && (d = Gn(d, Dl.get(i))), d >= f && (i = d, f = i * s, s == 10 && (f = as[br(f, as)]));
  while (d <= o);
  return l;
}
function M3(e, t, n, o, i, r, a) {
  let s = e.scales[e.axes[t].scale].asinh, u = o > s ? pm(e, t, Qo(s, n), o, i) : [s], c = o >= 0 && n <= 0 ? [0] : [];
  return (n < -s ? pm(e, t, Qo(s, -o), -n, i) : [s]).reverse().map((f) => -f).concat(c, u);
}
const pk = /./, T3 = /[12357]/, _3 = /[125]/, Tw = /1/, hm = (e, t, n, o) => e.map((i, r) => t == 4 && i == 0 || r % o == 0 && n.test(i.toExponential()[i < 0 ? 1 : 0]) ? i : null);
function E3(e, t, n, o, i) {
  let r = e.axes[n], a = r.scale, l = e.scales[a], s = e.valToPos, u = r._space, c = s(10, a), d = s(9, a) - c >= u ? pk : s(7, a) - c >= u ? T3 : s(5, a) - c >= u ? _3 : Tw;
  if (d == Tw) {
    let f = Io(s(1, a) - c);
    if (f < u)
      return hm(t.slice().reverse(), l.distr, d, Xi(u / f)).reverse();
  }
  return hm(t, l.distr, d, 1);
}
function D3(e, t, n, o, i) {
  let r = e.axes[n], a = r.scale, l = r._space, s = e.valToPos, u = Io(s(1, a) - s(2, a));
  return u < l ? hm(t.slice().reverse(), 3, pk, Xi(l / u)).reverse() : t;
}
function A3(e, t, n, o) {
  return o == null ? $y : t == null ? "" : Iy(t);
}
const _w = {
  show: !0,
  scale: "y",
  stroke: Cy,
  space: 30,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: dk,
  side: 3,
  //	class: "y-vals",
  //	incrs: numIncrs,
  //	values: (vals, space) => vals,
  //	filter: retArg1,
  grid: Ey,
  ticks: uk,
  border: ck,
  font: Dy,
  lineGap: fk,
  rotate: 0
};
function R3(e, t) {
  let n = 3 + (e || 1) * 2;
  return Gn(n * t, 3);
}
function N3(e, t) {
  let { scale: n, idxs: o } = e.series[0], i = e._data[0], r = e.valToPos(i[o[0]], n, !0), a = e.valToPos(i[o[1]], n, !0), l = Io(a - r), s = e.series[t], u = l / (s.points.space * Nn);
  return o[1] - o[0] <= u;
}
const Ew = {
  scale: null,
  auto: !0,
  sorted: 0,
  // internal caches
  min: vn,
  max: -vn
}, hk = (e, t, n, o, i) => i, Dw = {
  show: !0,
  auto: !0,
  sorted: 0,
  gaps: hk,
  alpha: 1,
  facets: [
    So({}, Ew, { scale: "x" }),
    So({}, Ew, { scale: "y" })
  ]
}, Aw = {
  scale: "y",
  auto: !0,
  sorted: 0,
  show: !0,
  spanGaps: !1,
  gaps: hk,
  alpha: 1,
  points: {
    show: N3,
    filter: null
    //  paths:
    //	stroke: "#000",
    //	fill: "#fff",
    //	width: 1,
    //	size: 10,
  },
  //	label: "Value",
  //	value: v => v,
  values: null,
  // internal caches
  min: vn,
  max: -vn,
  idxs: [],
  path: null,
  clip: null
};
function z3(e, t, n, o, i) {
  return n / 10;
}
const gk = {
  time: s4,
  auto: !0,
  distr: 1,
  log: 10,
  asinh: 1,
  min: null,
  max: null,
  dir: 1,
  ori: 0
}, B3 = So({}, gk, {
  time: !1,
  ori: 1
}), Rw = {};
function vk(e, t) {
  let n = Rw[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, r, a, l, s, u) {
      for (let c = 0; c < n.plots.length; c++)
        n.plots[c] != i && n.plots[c].pub(o, i, r, a, l, s, u);
    }
  }, e != null && (Rw[e] = n)), n;
}
const ju = 1, gm = 2;
function zs(e, t, n) {
  const o = e.mode, i = e.series[t], r = o == 2 ? e._data[t] : e._data, a = e.scales, l = e.bbox;
  let s = r[0], u = o == 2 ? r[1] : r[t], c = o == 2 ? a[i.facets[0].scale] : a[e.series[0].scale], d = o == 2 ? a[i.facets[1].scale] : a[i.scale], f = l.left, p = l.top, v = l.width, g = l.height, m = e.valToPosH, x = e.valToPosV;
  return c.ori == 0 ? n(
    i,
    s,
    u,
    c,
    d,
    m,
    x,
    f,
    p,
    v,
    g,
    xh,
    lc,
    Sh,
    bk,
    xk
  ) : n(
    i,
    s,
    u,
    c,
    d,
    x,
    m,
    p,
    f,
    g,
    v,
    wh,
    sc,
    Ny,
    yk,
    wk
  );
}
function Ay(e, t) {
  let n = 0, o = 0, i = kn(e.bands, My);
  for (let r = 0; r < i.length; r++) {
    let a = i[r];
    a.series[0] == t ? n = a.dir : a.series[1] == t && (a.dir == 1 ? o |= 1 : o |= 2);
  }
  return [
    n,
    o == 1 ? -1 : (
      // neg only
      o == 2 ? 1 : (
        // pos only
        o == 3 ? 2 : (
          // both
          0
        )
      )
    )
  ];
}
function F3(e, t, n, o, i) {
  let r = e.mode, a = e.series[t], l = r == 2 ? a.facets[1].scale : a.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 Na(e, t, n, o, i, r) {
  return zs(e, t, (a, l, s, u, c, d, f, p, v, g, m) => {
    let x = a.pxRound;
    const S = u.dir * (u.ori == 0 ? 1 : -1), C = u.ori == 0 ? lc : sc;
    let P, $;
    S == 1 ? (P = n, $ = o) : (P = o, $ = n);
    let I = x(d(l[P], u, g, p)), w = x(f(s[P], c, m, v)), M = x(d(l[$], u, g, p)), _ = x(f(r == 1 ? c.max : c.min, c, m, v)), N = new Path2D(i);
    return C(N, M, _), C(N, I, _), C(N, I, w), N;
  });
}
function yh(e, t, n, o, i, r) {
  let a = null;
  if (e.length > 0) {
    a = new Path2D();
    const l = t == 0 ? Sh : Ny;
    let s = n;
    for (let d = 0; d < e.length; d++) {
      let f = e[d];
      if (f[1] > f[0]) {
        let p = f[0] - s;
        p > 0 && l(a, s, o, p, o + r), s = f[1];
      }
    }
    let u = n + i - s, c = 10;
    u > 0 && l(a, s, o - c / 2, u, o + r + c);
  }
  return a;
}
function L3(e, t, n) {
  let o = e[e.length - 1];
  o && o[0] == t ? o[1] = n : e.push([t, n]);
}
function Ry(e, t, n, o, i, r, a) {
  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 p = r(e[d]), v = f == d ? p : r(e[f]), g = d - i;
      p = a <= 0 && g >= 0 && g < s ? r(e[g]) : p;
      let x = f + i;
      v = a >= 0 && x >= 0 && x < s ? r(e[x]) : v, v >= p && l.push([p, v]);
    }
  return l;
}
function Nw(e) {
  return e == 0 ? YO : e == 1 ? Oo : (t) => rs(t, e);
}
function mk(e) {
  let t = e == 0 ? xh : wh, n = e == 0 ? (i, r, a, l, s, u) => {
    i.arcTo(r, a, l, s, u);
  } : (i, r, a, l, s, u) => {
    i.arcTo(a, r, s, l, u);
  }, o = e == 0 ? (i, r, a, l, s) => {
    i.rect(r, a, l, s);
  } : (i, r, a, l, s) => {
    i.rect(a, r, s, l);
  };
  return (i, r, a, l, s, u = 0, c = 0) => {
    u == 0 && c == 0 ? o(i, r, a, l, s) : (u = Zi(u, l / 2, s / 2), c = Zi(c, l / 2, s / 2), t(i, r + u, a), n(i, r + l, a, r + l, a + s, u), n(i, r + l, a + s, r, a + s, c), n(i, r, a + s, r, a, c), n(i, r, a, r + l, a, u), i.closePath());
  };
}
const xh = (e, t, n) => {
  e.moveTo(t, n);
}, wh = (e, t, n) => {
  e.moveTo(n, t);
}, lc = (e, t, n) => {
  e.lineTo(t, n);
}, sc = (e, t, n) => {
  e.lineTo(n, t);
}, Sh = mk(0), Ny = mk(1), bk = (e, t, n, o, i, r) => {
  e.arc(t, n, o, i, r);
}, yk = (e, t, n, o, i, r) => {
  e.arc(n, t, o, i, r);
}, xk = (e, t, n, o, i, r, a) => {
  e.bezierCurveTo(t, n, o, i, r, a);
}, wk = (e, t, n, o, i, r, a) => {
  e.bezierCurveTo(n, t, i, o, a, r);
};
function Sk(e) {
  return (t, n, o, i, r) => zs(t, n, (a, l, s, u, c, d, f, p, v, g, m) => {
    let { pxRound: x, points: S } = a, C, P;
    u.ori == 0 ? (C = xh, P = bk) : (C = wh, P = yk);
    const $ = Gn(S.width * Nn, 3);
    let I = (S.size - S.width) / 2 * Nn, w = Gn(I * 2, 3), M = new Path2D(), _ = new Path2D(), { left: N, top: R, width: H, height: L } = t.bbox;
    Sh(
      _,
      N - w,
      R - w,
      H + w * 2,
      L + w * 2
    );
    const B = (A) => {
      if (s[A] != null) {
        let G = x(d(l[A], u, g, p)), j = x(f(s[A], c, m, v));
        C(M, G + I, j), P(M, G, j, I, 0, Xf * 2);
      }
    };
    if (r)
      r.forEach(B);
    else
      for (let A = o; A <= i; A++)
        B(A);
    return {
      stroke: $ > 0 ? M : null,
      fill: M,
      clip: _,
      flags: ju | gm
    };
  });
}
function Ck(e) {
  return (t, n, o, i, r, a) => {
    o != i && (r != o && a != o && e(t, n, o), r != i && a != i && e(t, n, i), e(t, n, a));
  };
}
const H3 = Ck(lc), V3 = Ck(sc);
function $k(e) {
  const t = kn(e?.alignGaps, 0);
  return (n, o, i, r) => zs(n, o, (a, l, s, u, c, d, f, p, v, g, m) => {
    let x = a.pxRound, S = (U) => x(d(U, u, g, p)), C = (U) => x(f(U, c, m, v)), P, $;
    u.ori == 0 ? (P = lc, $ = H3) : (P = sc, $ = V3);
    const I = u.dir * (u.ori == 0 ? 1 : -1), w = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: ju }, M = w.stroke;
    let _ = vn, N = -vn, R, H, L, B = S(l[I == 1 ? i : r]), A = Fu(s, i, r, 1 * I), G = Fu(s, i, r, -1 * I), j = S(l[A]), Z = S(l[G]), W = !1;
    for (let U = I == 1 ? i : r; U >= i && U <= r; U += I) {
      let ae = S(l[U]), se = s[U];
      ae == B ? se != null ? (H = C(se), _ == vn && (P(M, ae, H), R = H), _ = Zi(H, _), N = Qo(H, N)) : se === null && (W = !0) : (_ != vn && ($(M, B, _, N, R, H), L = B), se != null ? (H = C(se), P(M, ae, H), _ = N = R = H) : (_ = vn, N = -vn, se === null && (W = !0)), B = ae);
    }
    _ != vn && _ != N && L != B && $(M, B, _, N, R, H);
    let [K, q] = Ay(n, o);
    if (a.fill != null || K != 0) {
      let U = w.fill = new Path2D(M), ae = a.fillTo(n, o, a.min, a.max, K), se = C(ae);
      P(U, Z, se), P(U, j, se);
    }
    if (!a.spanGaps) {
      let U = [];
      W && U.push(...Ry(l, s, i, r, I, S, t)), w.gaps = U = a.gaps(n, o, i, r, U), w.clip = yh(U, u.ori, p, v, g, m);
    }
    return q != 0 && (w.band = q == 2 ? [
      Na(n, o, i, r, M, -1),
      Na(n, o, i, r, M, 1)
    ] : Na(n, o, i, r, M, q)), w;
  });
}
function j3(e) {
  const t = kn(e.align, 1), n = kn(e.ascDesc, !1), o = kn(e.alignGaps, 0), i = kn(e.extend, !1);
  return (r, a, l, s) => zs(r, a, (u, c, d, f, p, v, g, m, x, S, C) => {
    let P = u.pxRound, { left: $, width: I } = r.bbox, w = (K) => P(v(K, f, S, m)), M = (K) => P(g(K, p, C, x)), _ = f.ori == 0 ? lc : sc;
    const N = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: ju }, R = N.stroke, H = f.dir * (f.ori == 0 ? 1 : -1);
    l = Fu(d, l, s, 1), s = Fu(d, l, s, -1);
    let L = M(d[H == 1 ? l : s]), B = w(c[H == 1 ? l : s]), A = B, G = B;
    i && t == -1 && (G = $, _(R, G, L)), _(R, B, L);
    for (let K = H == 1 ? l : s; K >= l && K <= s; K += H) {
      let q = d[K];
      if (q == null)
        continue;
      let U = w(c[K]), ae = M(q);
      t == 1 ? _(R, U, L) : _(R, A, ae), _(R, U, ae), L = ae, A = U;
    }
    let j = A;
    i && t == 1 && (j = $ + I, _(R, j, L));
    let [Z, W] = Ay(r, a);
    if (u.fill != null || Z != 0) {
      let K = N.fill = new Path2D(R), q = u.fillTo(r, a, u.min, u.max, Z), U = M(q);
      _(K, j, U), _(K, G, U);
    }
    if (!u.spanGaps) {
      let K = [];
      K.push(...Ry(c, d, l, s, H, w, o));
      let q = u.width * Nn / 2, U = n || t == 1 ? q : -q, ae = n || t == -1 ? -q : q;
      K.forEach((se) => {
        se[0] += U, se[1] += ae;
      }), N.gaps = K = u.gaps(r, a, l, s, K), N.clip = yh(K, f.ori, m, x, S, C);
    }
    return W != 0 && (N.band = W == 2 ? [
      Na(r, a, l, s, R, -1),
      Na(r, a, l, s, R, 1)
    ] : Na(r, a, l, s, R, W)), N;
  });
}
function zw(e, t, n, o, i, r, a = vn) {
  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 = Io(e[s] - e[l]);
          c < u && (u = c, a = Io(n(e[s], o, i, r) - n(e[l], o, i, r)));
        }
        l = s;
      }
  }
  return a;
}
function W3(e) {
  e = e || Uc;
  const t = kn(e.size, [0.6, vn, 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 r = gn(i), a = 1 - t[0], l = kn(t[1], vn), s = kn(t[2], 1), u = kn(e.disp, Uc), c = kn(e.each, (p) => {
  }), { fill: d, stroke: f } = u;
  return (p, v, g, m) => zs(p, v, (x, S, C, P, $, I, w, M, _, N, R) => {
    let H = x.pxRound, L = n, B = o * Nn, A = l * Nn, G = s * Nn, j, Z;
    P.ori == 0 ? [j, Z] = r(p, v) : [Z, j] = r(p, v);
    const W = P.dir * (P.ori == 0 ? 1 : -1);
    let K = P.ori == 0 ? Sh : Ny, q = P.ori == 0 ? c : (Se, Ce, Ae, qe, We, tt, Ee) => {
      c(Se, Ce, Ae, We, qe, Ee, tt);
    }, U = kn(p.bands, My).find((Se) => Se.series[0] == v), ae = U != null ? U.dir : 0, se = x.fillTo(p, v, x.min, x.max, ae), re = H(w(se, $, R, _)), ie, te, ve, ce = N, fe = H(x.width * Nn), ge = !1, Me = null, ze = null, Ke = null, He = null;
    d != null && (fe == 0 || f != null) && (ge = !0, Me = d.values(p, v, g, m), ze = /* @__PURE__ */ new Map(), new Set(Me).forEach((Se) => {
      Se != null && ze.set(Se, new Path2D());
    }), fe > 0 && (Ke = f.values(p, v, g, m), He = /* @__PURE__ */ new Map(), new Set(Ke).forEach((Se) => {
      Se != null && He.set(Se, new Path2D());
    })));
    let { x0: Re, size: Xe } = u;
    if (Re != null && Xe != null) {
      L = 1, S = Re.values(p, v, g, m), Re.unit == 2 && (S = S.map((Ae) => p.posToVal(M + Ae * N, P.key, !0)));
      let Se = Xe.values(p, v, g, m);
      Xe.unit == 2 ? te = Se[0] * N : te = I(Se[0], P, N, M) - I(0, P, N, M), ce = zw(S, C, I, P, N, M, ce), ve = ce - te + B;
    } else
      ce = zw(S, C, I, P, N, M, ce), ve = ce * a + B, te = ce - ve;
    ve < 1 && (ve = 0), fe >= te / 2 && (fe = 0), ve < 5 && (H = YO);
    let De = ve > 0, Be = ce - ve - (De ? fe : 0);
    te = H(fm(Be, G, A)), ie = (L == 0 ? te / 2 : L == W ? 0 : te) - L * W * ((L == 0 ? B / 2 : 0) + (De ? fe / 2 : 0));
    const Ve = { stroke: null, fill: null, clip: null, band: null, gaps: null, flags: 0 }, ot = ge ? null : new Path2D();
    let je = null;
    if (U != null)
      je = p.data[U.series[1]];
    else {
      let { y0: Se, y1: Ce } = u;
      Se != null && Ce != null && (C = Ce.values(p, v, g, m), je = Se.values(p, v, g, m));
    }
    let Pe = j * te, Ge = Z * te;
    for (let Se = W == 1 ? g : m; Se >= g && Se <= m; Se += W) {
      let Ce = C[Se];
      if (Ce == null)
        continue;
      if (je != null) {
        let it = je[Se] ?? 0;
        if (Ce - it == 0)
          continue;
        re = w(it, $, R, _);
      }
      let Ae = P.distr != 2 || u != null ? S[Se] : Se, qe = I(Ae, P, N, M), We = w(kn(Ce, se), $, R, _), tt = H(qe - ie), Ee = H(Qo(We, re)), Ne = H(Zi(We, re)), Fe = Ee - Ne;
      if (Ce != null) {
        let it = Ce < 0 ? Ge : Pe, pt = Ce < 0 ? Pe : Ge;
        ge ? (fe > 0 && Ke[Se] != null && K(He.get(Ke[Se]), tt, Ne + Ti(fe / 2), te, Qo(0, Fe - fe), it, pt), Me[Se] != null && K(ze.get(Me[Se]), tt, Ne + Ti(fe / 2), te, Qo(0, Fe - fe), it, pt)) : K(ot, tt, Ne + Ti(fe / 2), te, Qo(0, Fe - fe), it, pt), q(
          p,
          v,
          Se,
          tt - fe / 2,
          Ne,
          te + fe,
          Fe
        );
      }
    }
    return fe > 0 ? Ve.stroke = ge ? He : ot : ge || (Ve._fill = x.width == 0 ? x._fill : x._stroke ?? x._fill, Ve.width = 0), Ve.fill = ge ? ze : ot, Ve;
  });
}
function K3(e, t) {
  const n = kn(t?.alignGaps, 0);
  return (o, i, r, a) => zs(o, i, (l, s, u, c, d, f, p, v, g, m, x) => {
    let S = l.pxRound, C = (j) => S(f(j, c, m, v)), P = (j) => S(p(j, d, x, g)), $, I, w;
    c.ori == 0 ? ($ = xh, w = lc, I = xk) : ($ = wh, w = sc, I = wk);
    const M = c.dir * (c.ori == 0 ? 1 : -1);
    r = Fu(u, r, a, 1), a = Fu(u, r, a, -1);
    let _ = C(s[M == 1 ? r : a]), N = _, R = [], H = [];
    for (let j = M == 1 ? r : a; j >= r && j <= a; j += M)
      if (u[j] != null) {
        let W = s[j], K = C(W);
        R.push(N = K), H.push(P(u[j]));
      }
    const L = { stroke: e(R, H, $, w, I, S), fill: null, clip: null, band: null, gaps: null, flags: ju }, B = L.stroke;
    let [A, G] = Ay(o, i);
    if (l.fill != null || A != 0) {
      let j = L.fill = new Path2D(B), Z = l.fillTo(o, i, l.min, l.max, A), W = P(Z);
      w(j, N, W), w(j, _, W);
    }
    if (!l.spanGaps) {
      let j = [];
      j.push(...Ry(s, u, r, a, M, C, n)), L.gaps = j = l.gaps(o, i, r, a, j), L.clip = yh(j, c.ori, v, g, m, x);
    }
    return G != 0 && (L.band = G == 2 ? [
      Na(o, i, r, a, B, -1),
      Na(o, i, r, a, B, 1)
    ] : Na(o, i, r, a, B, G)), L;
  });
}
function q3(e) {
  return K3(Y3, e);
}
function Y3(e, t, n, o, i, r) {
  const a = e.length;
  if (a < 2)
    return null;
  const l = new Path2D();
  if (n(l, e[0], t[0]), a == 2)
    o(l, e[1], t[1]);
  else {
    let s = Array(a), u = Array(a - 1), c = Array(a - 1), d = Array(a - 1);
    for (let f = 0; f < a - 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 < a - 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[a - 1] = u[a - 2];
    for (let f = 0; f < a - 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 vm = /* @__PURE__ */ new Set();
function Bw() {
  for (let e of vm)
    e.syncRect(!0);
}
ac && (Ss(k4, Iu, Bw), Ss(I4, Iu, Bw, !0), Ss(Pp, Iu, () => {
  xo.pxRatio = Nn;
}));
const G3 = $k(), U3 = Sk();
function Fw(e, t, n, o) {
  return (o ? [e[0], e[1]].concat(e.slice(2)) : [e[0]].concat(e.slice(1))).map((r, a) => mm(r, a, t, n));
}
function X3(e, t) {
  return e.map((n, o) => o == 0 ? {} : So({}, t, n));
}
function mm(e, t, n, o) {
  return So({}, t == 0 ? n : o, e);
}
function Pk(e, t, n) {
  return t == null ? Hu : [t, n];
}
const Q3 = Pk;
function Z3(e, t, n) {
  return t == null ? Hu : Op(t, n, ky, !0);
}
function Ok(e, t, n, o) {
  return t == null ? Hu : vh(t, n, e.scales[o].log, !1);
}
const J3 = Ok;
function kk(e, t, n, o) {
  return t == null ? Hu : Oy(t, n, e.scales[o].log, !1);
}
const eB = kk;
function tB(e, t, n, o, i) {
  let r = Qo(mw(e), mw(t)), a = t - e, l = br(i / o * a, n);
  do {
    let s = n[l], u = o * s / a;
    if (u >= i && r + (s < 5 ? Dl.get(s) : 0) <= 17)
      return [s, u];
  } while (++l < n.length);
  return [0, 0];
}
function Lw(e) {
  let t, n;
  return e = e.replace(/(\d+)px/, (o, i) => (t = Oo((n = +i) * Nn)) + "px"), [e, t, n];
}
function nB(e) {
  e.show && [e.font, e.labelFont].forEach((t) => {
    let n = Gn(t[2] * Nn, 1);
    t[0] = t[0].replace(/[0-9.]+px/, n + "px"), t[1] = n;
  });
}
function xo(e, t, n) {
  const o = {
    mode: kn(e.mode, 1)
  }, i = o.mode;
  function r(Y, ee) {
    return ((ee.distr == 3 ? Ra(Y > 0 ? Y : ee.clamp(o, Y, ee.min, ee.max, ee.key)) : ee.distr == 4 ? Dg(Y, ee.asinh) : ee.distr == 100 ? ee.fwd(Y) : Y) - ee._min) / (ee._max - ee._min);
  }
  function a(Y, ee, me, ye) {
    let ke = r(Y, ee);
    return ye + me * (ee.dir == -1 ? 1 - ke : ke);
  }
  function l(Y, ee, me, ye) {
    let ke = r(Y, ee);
    return ye + me * (ee.dir == -1 ? ke : 1 - ke);
  }
  function s(Y, ee, me, ye) {
    return ee.ori == 0 ? a(Y, ee, me, ye) : l(Y, ee, me, ye);
  }
  o.valToPosH = a, o.valToPosV = l;
  let u = !1;
  o.status = 0;
  const c = o.root = Yi(u4);
  if (e.id != null && (c.id = e.id), Oi(c, e.class), e.title) {
    let Y = Yi(f4, c);
    Y.textContent = e.title;
  }
  const d = pr("canvas"), f = o.ctx = d.getContext("2d"), p = Yi(p4, c);
  Ss("click", p, (Y) => {
    Y.target === g && (Kn != ga || Ln != sl) && Po.click(o, Y);
  }, !0);
  const v = o.under = Yi(h4, p);
  p.appendChild(d);
  const g = o.over = Yi(g4, p);
  e = Vu(e);
  const m = +kn(e.pxAlign, 1), x = Nw(m);
  (e.plugins || []).forEach((Y) => {
    Y.opts && (e = Y.opts(o, e) || e);
  });
  const S = e.ms || 1e-3, C = o.series = i == 1 ? Fw(e.series || [], Mw, Aw, !1) : X3(e.series || [null], Dw), P = o.axes = Fw(e.axes || [], Iw, _w, !0), $ = o.scales = {}, I = o.bands = e.bands || [];
  I.forEach((Y) => {
    Y.fill = gn(Y.fill || null), Y.dir = kn(Y.dir, -1);
  });
  const w = i == 2 ? C[1].facets[0].scale : C[0].scale, M = {
    axes: Ud,
    series: tl
  }, _ = (e.drawOrder || ["axes", "series"]).map((Y) => M[Y]);
  function N(Y) {
    let ee = $[Y];
    if (ee == null) {
      let me = (e.scales || Uc)[Y] || Uc;
      if (me.from != null)
        N(me.from), $[Y] = So({}, $[me.from], me, { key: Y });
      else {
        ee = $[Y] = So({}, Y == w ? gk : B3, me), ee.key = Y;
        let ye = ee.time, ke = ee.range, b = ml(ke);
        if ((Y != w || i == 2 && !ye) && (b && (ke[0] == null || ke[1] == null) && (ke = {
          min: ke[0] == null ? hw : {
            mode: 1,
            hard: ke[0],
            soft: ke[0]
          },
          max: ke[1] == null ? hw : {
            mode: 1,
            hard: ke[1],
            soft: ke[1]
          }
        }, b = !1), !b && bh(ke))) {
          let y = ke;
          ke = (k, D, z) => D == null ? Hu : Op(D, z, y);
        }
        ee.range = gn(ke || (ye ? Q3 : Y == w ? ee.distr == 3 ? J3 : ee.distr == 4 ? eB : Pk : ee.distr == 3 ? Ok : ee.distr == 4 ? kk : Z3)), ee.auto = gn(b ? !1 : ee.auto), ee.clamp = gn(ee.clamp || z3), ee._min = ee._max = null;
      }
    }
  }
  N("x"), N("y"), i == 1 && C.forEach((Y) => {
    N(Y.scale);
  }), P.forEach((Y) => {
    N(Y.scale);
  });
  for (let Y in e.scales)
    N(Y);
  const R = $[w], H = R.distr;
  let L, B;
  R.ori == 0 ? (Oi(c, c4), L = a, B = l) : (Oi(c, d4), L = l, B = a);
  const A = {};
  for (let Y in $) {
    let ee = $[Y];
    (ee.min != null || ee.max != null) && (A[Y] = { min: ee.min, max: ee.max }, ee.min = ee.max = null);
  }
  const G = e.tzDate || ((Y) => new Date(Oo(Y / S))), j = e.fmtDate || Ty, Z = S == 1 ? c3(G) : p3(G), W = Pw(G, $w(S == 1 ? u3 : f3, j)), K = kw(G, Ow(g3, j)), q = [], U = o.legend = So({}, b3, e.legend), ae = U.show, se = U.markers;
  U.idxs = q, se.width = gn(se.width), se.dash = gn(se.dash), se.stroke = gn(se.stroke), se.fill = gn(se.fill);
  let re, ie, te, ve = [], ce = [], fe, ge = !1, Me = {};
  if (U.live) {
    const Y = C[1] ? C[1].values : null;
    ge = Y != null, fe = ge ? Y(o, 1, 0) : { _: 0 };
    for (let ee in fe)
      Me[ee] = $y;
  }
  if (ae)
    if (re = pr("table", w4, c), te = pr("tbody", null, re), U.mount(o, re), ge) {
      ie = pr("thead", null, re, te);
      let Y = pr("tr", null, ie);
      pr("th", null, Y);
      for (var ze in fe)
        pr("th", ew, Y).textContent = ze;
    } else
      Oi(re, C4), U.live && Oi(re, S4);
  const Ke = { show: !0 }, He = { show: !1 };
  function Re(Y, ee) {
    if (ee == 0 && (ge || !U.live || i == 2))
      return Hu;
    let me = [], ye = pr("tr", $4, te, te.childNodes[ee]);
    Oi(ye, Y.class), Y.show || Oi(ye, us);
    let ke = pr("th", null, ye);
    if (se.show) {
      let k = Yi(P4, ke);
      if (ee > 0) {
        let D = se.width(o, ee);
        D && (k.style.border = D + "px " + se.dash(o, ee) + " " + se.stroke(o, ee)), k.style.background = se.fill(o, ee);
      }
    }
    let b = Yi(ew, ke);
    b.textContent = Y.label, ee > 0 && (se.show || (b.style.color = Y.width > 0 ? se.stroke(o, ee) : se.fill(o, ee)), De("click", ke, (k) => {
      if (gt._lock)
        return;
      En(k);
      let D = C.indexOf(Y);
      if ((k.ctrlKey || k.metaKey) != U.isolate) {
        let z = C.some((V, X) => X > 0 && X != D && V.show);
        C.forEach((V, X) => {
          X > 0 && Fi(X, z ? X == D ? Ke : He : Ke, !0, so.setSeries);
        });
      } else
        Fi(D, { show: !Y.show }, !0, so.setSeries);
    }, !1), lo && De(rw, ke, (k) => {
      gt._lock || (En(k), Fi(C.indexOf(Y), cl, !0, so.setSeries));
    }, !1));
    for (var y in fe) {
      let k = pr("td", O4, ye);
      k.textContent = "--", me.push(k);
    }
    return [ye, me];
  }
  const Xe = /* @__PURE__ */ new Map();
  function De(Y, ee, me, ye = !0) {
    const ke = Xe.get(ee) || {}, b = gt.bind[Y](o, ee, me, ye);
    b && (Ss(Y, ee, ke[Y] = b), Xe.set(ee, ke));
  }
  function Be(Y, ee, me) {
    const ye = Xe.get(ee) || {};
    for (let ke in ye)
      (Y == null || ke == Y) && (dm(ke, ee, ye[ke]), delete ye[ke]);
    Y == null && Xe.delete(ee);
  }
  let Ve = 0, ot = 0, je = 0, Pe = 0, Ge = 0, Se = 0, Ce = Ge, Ae = Se, qe = je, We = Pe, tt = 0, Ee = 0, Ne = 0, Fe = 0;
  o.bbox = {};
  let it = !1, pt = !1, at = !1, ft = !1, wt = !1, Ct = !1;
  function St(Y, ee, me) {
    (me || Y != o.width || ee != o.height) && bt(Y, ee), rl(!1), at = !0, pt = !0, zr();
  }
  function bt(Y, ee) {
    o.width = Ve = je = Y, o.height = ot = Pe = ee, Ge = Se = 0, ln(), pn();
    let me = o.bbox;
    tt = me.left = rs(Ge * Nn, 0.5), Ee = me.top = rs(Se * Nn, 0.5), Ne = me.width = rs(je * Nn, 0.5), Fe = me.height = rs(Pe * Nn, 0.5);
  }
  const Ot = 3;
  function Wt() {
    let Y = !1, ee = 0;
    for (; !Y; ) {
      ee++;
      let me = qs(ee), ye = Kl(ee);
      Y = ee == Ot || me && ye, Y || (bt(o.width, o.height), pt = !0);
    }
  }
  function Xt({ width: Y, height: ee }) {
    St(Y, ee);
  }
  o.setSize = Xt;
  function ln() {
    let Y = !1, ee = !1, me = !1, ye = !1;
    P.forEach((ke, b) => {
      if (ke.show && ke._show) {
        let { side: y, _size: k } = ke, D = y % 2, z = ke.label != null ? ke.labelSize : 0, V = k + z;
        V > 0 && (D ? (je -= V, y == 3 ? (Ge += V, ye = !0) : me = !0) : (Pe -= V, y == 0 ? (Se += V, Y = !0) : ee = !0));
      }
    }), Sn[0] = Y, Sn[1] = me, Sn[2] = ee, Sn[3] = ye, je -= un[1] + un[3], Ge += un[3], Pe -= un[2] + un[0], Se += un[0];
  }
  function pn() {
    let Y = Ge + je, ee = Se + Pe, me = Ge, ye = Se;
    function ke(b, y) {
      switch (b) {
        case 1:
          return Y += y, Y - y;
        case 2:
          return ee += y, ee - y;
        case 3:
          return me -= y, me + y;
        case 0:
          return ye -= y, ye + y;
      }
    }
    P.forEach((b, y) => {
      if (b.show && b._show) {
        let k = b.side;
        b._pos = ke(k, b._size), b.label != null && (b._lpos = ke(k, b.labelSize));
      }
    });
  }
  const gt = o.cursor = So({}, $3, { drag: { y: i == 2 } }, e.cursor);
  if (gt.dataIdx == null) {
    let Y = gt.hover, ee = Y.skip = new Set(Y.skip ?? []);
    ee.add(void 0);
    let me = Y.prox = gn(Y.prox), ye = Y.bias ??= 0;
    gt.dataIdx = (ke, b, y, k) => {
      if (b == 0)
        return y;
      let D = y, z = me(ke, b, y, k) ?? vn, V = z >= 0 && z < vn, X = R.ori == 0 ? je : Pe, J = gt.left, ue = t[0], we = t[b];
      if (ee.has(we[y])) {
        D = null;
        let de = null, Oe = null, Te;
        if (ye == 0 || ye == -1)
          for (Te = y; de == null && Te-- > 0; )
            ee.has(we[Te]) || (de = Te);
        if (ye == 0 || ye == 1)
          for (Te = y; Oe == null && Te++ < we.length; )
            ee.has(we[Te]) || (Oe = Te);
        if (de != null || Oe != null)
          if (V) {
            let Ye = de == null ? -1 / 0 : L(ue[de], R, X, 0), Qe = Oe == null ? 1 / 0 : L(ue[Oe], R, X, 0), Ze = J - Ye, lt = Qe - J;
            Ze <= lt ? Ze <= z && (D = de) : lt <= z && (D = Oe);
          } else
            D = Oe == null ? de : de == null ? Oe : y - de <= Oe - y ? de : Oe;
      } else V && Io(J - L(ue[y], R, X, 0)) > z && (D = null);
      return D;
    };
  }
  const En = (Y) => {
    gt.event = Y;
  };
  gt.idxs = q, gt._lock = !1;
  let hn = gt.points;
  hn.show = gn(hn.show), hn.size = gn(hn.size), hn.stroke = gn(hn.stroke), hn.width = gn(hn.width), hn.fill = gn(hn.fill);
  const Wn = o.focus = So({}, e.focus || { alpha: 0.3 }, gt.focus), lo = Wn.prox >= 0, Uo = lo && hn.one;
  let Ue = [], ht = [], vt = [];
  function Zt(Y, ee) {
    let me = hn.show(o, ee);
    if (me)
      return Oi(me, x4), Oi(me, Y.class), Vr(me, -10, -10, je, Pe), g.insertBefore(me, Ue[ee]), me;
  }
  function Qn(Y, ee) {
    if (i == 1 || ee > 0) {
      let me = i == 1 && $[Y.scale].time, ye = Y.value;
      Y.value = me ? xw(ye) ? kw(G, Ow(ye, j)) : ye || K : ye || A3, Y.label = Y.label || (me ? O3 : P3);
    }
    if (Uo || ee > 0) {
      Y.width = Y.width == null ? 1 : Y.width, Y.paths = Y.paths || G3 || B4, Y.fillTo = gn(Y.fillTo || F3), Y.pxAlign = +kn(Y.pxAlign, m), Y.pxRound = Nw(Y.pxAlign), Y.stroke = gn(Y.stroke || null), Y.fill = gn(Y.fill || null), Y._stroke = Y._fill = Y._paths = Y._focus = null;
      let me = R3(Qo(1, Y.width), 1), ye = Y.points = So({}, {
        size: me,
        width: Qo(1, me * 0.2),
        stroke: Y.stroke,
        space: me * 2,
        paths: U3,
        _stroke: null,
        _fill: null
      }, Y.points);
      ye.show = gn(ye.show), ye.filter = gn(ye.filter), ye.fill = gn(ye.fill), ye.stroke = gn(ye.stroke), ye.paths = gn(ye.paths), ye.pxAlign = Y.pxAlign;
    }
    if (ae) {
      let me = Re(Y, ee);
      ve.splice(ee, 0, me[0]), ce.splice(ee, 0, me[1]), U.values.push(null);
    }
    if (gt.show) {
      q.splice(ee, 0, null);
      let me = null;
      Uo ? ee == 0 && (me = Zt(Y, ee)) : ee > 0 && (me = Zt(Y, ee)), Ue.splice(ee, 0, me), ht.splice(ee, 0, 0), vt.splice(ee, 0, 0);
    }
    io("addSeries", ee);
  }
  function Xn(Y, ee) {
    ee = ee ?? C.length, Y = i == 1 ? mm(Y, ee, Mw, Aw) : mm(Y, ee, {}, Dw), C.splice(ee, 0, Y), Qn(C[ee], ee);
  }
  o.addSeries = Xn;
  function $o(Y) {
    if (C.splice(Y, 1), ae) {
      U.values.splice(Y, 1), ce.splice(Y, 1);
      let ee = ve.splice(Y, 1)[0];
      Be(null, ee.firstChild), ee.remove();
    }
    gt.show && (q.splice(Y, 1), Ue.splice(Y, 1)[0].remove(), ht.splice(Y, 1), vt.splice(Y, 1)), io("delSeries", Y);
  }
  o.delSeries = $o;
  const Sn = [!1, !1, !1, !1];
  function Mt(Y, ee) {
    if (Y._show = Y.show, Y.show) {
      let me = Y.side % 2, ye = $[Y.scale];
      ye == null && (Y.scale = me ? C[1].scale : w, ye = $[Y.scale]);
      let ke = ye.time;
      Y.size = gn(Y.size), Y.space = gn(Y.space), Y.rotate = gn(Y.rotate), ml(Y.incrs) && Y.incrs.forEach((y) => {
        !Dl.has(y) && Dl.set(y, XO(y));
      }), Y.incrs = gn(Y.incrs || (ye.distr == 2 ? a3 : ke ? S == 1 ? s3 : d3 : as)), Y.splits = gn(Y.splits || (ke && ye.distr == 1 ? Z : ye.distr == 3 ? pm : ye.distr == 4 ? M3 : I3)), Y.stroke = gn(Y.stroke), Y.grid.stroke = gn(Y.grid.stroke), Y.ticks.stroke = gn(Y.ticks.stroke), Y.border.stroke = gn(Y.border.stroke);
      let b = Y.values;
      Y.values = // static array of tick values
      ml(b) && !ml(b[0]) ? gn(b) : (
        // temporal
        ke ? (
          // config array of fmtDate string tpls
          ml(b) ? Pw(G, $w(b, j)) : (
            // fmtDate string tpl
            xw(b) ? h3(G, b) : b || W
          )
        ) : b || k3
      ), Y.filter = gn(Y.filter || (ye.distr >= 3 && ye.log == 10 ? E3 : ye.distr == 3 && ye.log == 2 ? D3 : GO)), Y.font = Lw(Y.font), Y.labelFont = Lw(Y.labelFont), Y._size = Y.size(o, null, ee, 0), Y._space = Y._rotate = Y._incrs = Y._found = // foundIncrSpace
      Y._splits = Y._values = null, Y._size > 0 && (Sn[ee] = !0, Y._el = Yi(v4, p));
    }
  }
  function fo(Y, ee, me, ye) {
    let [ke, b, y, k] = me, D = ee % 2, z = 0;
    return D == 0 && (k || b) && (z = ee == 0 && !ke || ee == 2 && !y ? Oo(Iw.size / 3) : 0), D == 1 && (ke || y) && (z = ee == 1 && !b || ee == 3 && !k ? Oo(_w.size / 2) : 0), z;
  }
  const zo = o.padding = (e.padding || [fo, fo, fo, fo]).map((Y) => gn(kn(Y, fo))), un = o._padding = zo.map((Y, ee) => Y(o, ee, Sn, 0));
  let Dn, cn = null, An = null;
  const Jo = i == 1 ? C[0].idxs : null;
  let Zn = null, pi = !1;
  function jo(Y, ee) {
    if (t = Y ?? [], o.data = o._data = t, i == 2) {
      Dn = 0;
      for (let me = 1; me < C.length; me++)
        Dn += t[me][0].length;
    } else {
      t.length == 0 && (o.data = o._data = t = [[]]), Zn = t[0], Dn = Zn.length;
      let me = t;
      if (H == 2) {
        me = t.slice();
        let ye = me[0] = Array(Dn);
        for (let ke = 0; ke < Dn; ke++)
          ye[ke] = ke;
      }
      o._data = t = me;
    }
    if (rl(!0), io("setData"), H == 2 && (at = !0), ee !== !1) {
      let me = R;
      me.auto(o, pi) ? ca() : Wo(w, me.min, me.max), ft = ft || gt.left >= 0, Ct = !0, zr();
    }
  }
  o.setData = jo;
  function ca() {
    pi = !0;
    let Y, ee;
    i == 1 && (Dn > 0 ? (cn = Jo[0] = 0, An = Jo[1] = Dn - 1, Y = t[0][cn], ee = t[0][An], H == 2 ? (Y = cn, ee = An) : Y == ee && (H == 3 ? [Y, ee] = vh(Y, Y, R.log, !1) : H == 4 ? [Y, ee] = Oy(Y, Y, R.log, !1) : R.time ? ee = Y + Oo(86400 / S) : [Y, ee] = Op(Y, ee, ky, !0))) : (cn = Jo[0] = Y = null, An = Jo[1] = ee = null)), Wo(w, Y, ee);
  }
  let da, ar, Dr, Qa, Ar, Za, lr, Rr, Hl, ei;
  function Ks(Y, ee, me, ye, ke, b) {
    Y ??= nw, me ??= My, ye ??= "butt", ke ??= nw, b ??= "round", Y != da && (f.strokeStyle = da = Y), ke != ar && (f.fillStyle = ar = ke), ee != Dr && (f.lineWidth = Dr = ee), b != Ar && (f.lineJoin = Ar = b), ye != Za && (f.lineCap = Za = ye), me != Qa && f.setLineDash(Qa = me);
  }
  function Vl(Y, ee, me, ye) {
    ee != ar && (f.fillStyle = ar = ee), Y != lr && (f.font = lr = Y), me != Rr && (f.textAlign = Rr = me), ye != Hl && (f.textBaseline = Hl = ye);
  }
  function Ja(Y, ee, me, ye, ke = 0) {
    if (ye.length > 0 && Y.auto(o, pi) && (ee == null || ee.min == null)) {
      let b = kn(cn, 0), y = kn(An, ye.length - 1), k = me.min == null ? Y.distr == 3 ? E4(ye, b, y) : _4(ye, b, y, ke) : [me.min, me.max];
      Y.min = Zi(Y.min, me.min = k[0]), Y.max = Qo(Y.max, me.max = k[1]);
    }
  }
  const jl = { min: null, max: null };
  function Wl() {
    for (let ye in $) {
      let ke = $[ye];
      A[ye] == null && // scales that have never been set (on init)
      (ke.min == null || // or auto scales when the x scale was explicitly set
      A[w] != null && ke.auto(o, pi)) && (A[ye] = jl);
    }
    for (let ye in $) {
      let ke = $[ye];
      A[ye] == null && ke.from != null && A[ke.from] != null && (A[ye] = jl);
    }
    A[w] != null && rl(!0);
    let Y = {};
    for (let ye in A) {
      let ke = A[ye];
      if (ke != null) {
        let b = Y[ye] = Vu($[ye], H4);
        if (ke.min != null)
          So(b, ke);
        else if (ye != w || i == 2)
          if (Dn == 0 && b.from == null) {
            let y = b.range(o, null, null, ye);
            b.min = y[0], b.max = y[1];
          } else
            b.min = vn, b.max = -vn;
      }
    }
    if (Dn > 0) {
      C.forEach((ye, ke) => {
        if (i == 1) {
          let b = ye.scale, y = A[b];
          if (y == null)
            return;
          let k = Y[b];
          if (ke == 0) {
            let D = k.range(o, k.min, k.max, b);
            k.min = D[0], k.max = D[1], cn = br(k.min, t[0]), An = br(k.max, t[0]), An - cn > 1 && (t[0][cn] < k.min && cn++, t[0][An] > k.max && An--), ye.min = Zn[cn], ye.max = Zn[An];
          } else ye.show && ye.auto && Ja(k, y, ye, t[ke], ye.sorted);
          ye.idxs[0] = cn, ye.idxs[1] = An;
        } else if (ke > 0 && ye.show && ye.auto) {
          let [b, y] = ye.facets, k = b.scale, D = y.scale, [z, V] = t[ke], X = Y[k], J = Y[D];
          X != null && Ja(X, A[k], b, z, b.sorted), J != null && Ja(J, A[D], y, V, y.sorted), ye.min = y.min, ye.max = y.max;
        }
      });
      for (let ye in Y) {
        let ke = Y[ye], b = A[ye];
        if (ke.from == null && (b == null || b.min == null)) {
          let y = ke.range(
            o,
            ke.min == vn ? null : ke.min,
            ke.max == -vn ? null : ke.max,
            ye
          );
          ke.min = y[0], ke.max = y[1];
        }
      }
    }
    for (let ye in Y) {
      let ke = Y[ye];
      if (ke.from != null) {
        let b = Y[ke.from];
        if (b.min == null)
          ke.min = ke.max = null;
        else {
          let y = ke.range(o, b.min, b.max, ye);
          ke.min = y[0], ke.max = y[1];
        }
      }
    }
    let ee = {}, me = !1;
    for (let ye in Y) {
      let ke = Y[ye], b = $[ye];
      if (b.min != ke.min || b.max != ke.max) {
        b.min = ke.min, b.max = ke.max;
        let y = b.distr;
        b._min = y == 3 ? Ra(b.min) : y == 4 ? Dg(b.min, b.asinh) : y == 100 ? b.fwd(b.min) : b.min, b._max = y == 3 ? Ra(b.max) : y == 4 ? Dg(b.max, b.asinh) : y == 100 ? b.fwd(b.max) : b.max, ee[ye] = me = !0;
      }
    }
    if (me) {
      C.forEach((ye, ke) => {
        i == 2 ? ke > 0 && ee.y && (ye._paths = null) : ee[ye.scale] && (ye._paths = null);
      });
      for (let ye in ee)
        at = !0, io("setScale", ye);
      gt.show && gt.left >= 0 && (ft = Ct = !0);
    }
    for (let ye in A)
      A[ye] = null;
  }
  function el(Y) {
    let ee = fm(cn - 1, 0, Dn - 1), me = fm(An + 1, 0, Dn - 1);
    for (; Y[ee] == null && ee > 0; )
      ee--;
    for (; Y[me] == null && me < Dn - 1; )
      me++;
    return [ee, me];
  }
  function tl() {
    Dn > 0 && (C.forEach((Y, ee) => {
      if (ee > 0 && Y.show && (oo(ee, !1), oo(ee, !0), Y._paths == null)) {
        ei != Y.alpha && (f.globalAlpha = ei = Y.alpha);
        let me = i == 2 ? [0, t[ee][0].length - 1] : el(t[ee]);
        Y._paths = Y.paths(o, ee, me[0], me[1]), ei != 1 && (f.globalAlpha = ei = 1);
      }
    }), C.forEach((Y, ee) => {
      if (ee > 0 && Y.show) {
        ei != Y.alpha && (f.globalAlpha = ei = Y.alpha), Y._paths != null && ti(ee, !1);
        {
          let me = Y._paths != null ? Y._paths.gaps : null, ye = Y.points.show(o, ee, cn, An, me), ke = Y.points.filter(o, ee, ye, me);
          (ye || ke) && (Y.points._paths = Y.points.paths(o, ee, cn, An, ke), ti(ee, !0));
        }
        ei != 1 && (f.globalAlpha = ei = 1), io("drawSeries", ee);
      }
    }));
  }
  function oo(Y, ee) {
    let me = ee ? C[Y].points : C[Y];
    me._stroke = me.stroke(o, Y), me._fill = me.fill(o, Y);
  }
  function ti(Y, ee) {
    let me = ee ? C[Y].points : C[Y], {
      stroke: ye,
      fill: ke,
      clip: b,
      flags: y,
      _stroke: k = me._stroke,
      _fill: D = me._fill,
      _width: z = me.width
    } = me._paths;
    z = Gn(z * Nn, 3);
    let V = null, X = z % 2 / 2;
    ee && D == null && (D = z > 0 ? "#fff" : k);
    let J = me.pxAlign == 1 && X > 0;
    if (J && f.translate(X, X), !ee) {
      let ue = tt - z / 2, we = Ee - z / 2, de = Ne + z, Oe = Fe + z;
      V = new Path2D(), V.rect(ue, we, de, Oe);
    }
    ee ? Bo(k, z, me.dash, me.cap, D, ye, ke, y, b) : fa(Y, k, z, me.dash, me.cap, D, ye, ke, y, V, b), J && f.translate(-X, -X);
  }
  function fa(Y, ee, me, ye, ke, b, y, k, D, z, V) {
    let X = !1;
    D != 0 && I.forEach((J, ue) => {
      if (J.series[0] == Y) {
        let we = C[J.series[1]], de = t[J.series[1]], Oe = (we._paths || Uc).band;
        ml(Oe) && (Oe = J.dir == 1 ? Oe[0] : Oe[1]);
        let Te, Ye = null;
        we.show && Oe && A4(de, cn, An) ? (Ye = J.fill(o, ue) || b, Te = we._paths.clip) : Oe = null, Bo(ee, me, ye, ke, Ye, y, k, D, z, V, Te, Oe), X = !0;
      }
    }), X || Bo(ee, me, ye, ke, b, y, k, D, z, V);
  }
  const ni = ju | gm;
  function Bo(Y, ee, me, ye, ke, b, y, k, D, z, V, X) {
    Ks(Y, ee, me, ye, ke), (D || z || X) && (f.save(), D && f.clip(D), z && f.clip(z)), X ? (k & ni) == ni ? (f.clip(X), V && f.clip(V), ol(ke, y), nl(Y, b, ee)) : k & gm ? (ol(ke, y), f.clip(X), nl(Y, b, ee)) : k & ju && (f.save(), f.clip(X), V && f.clip(V), ol(ke, y), f.restore(), nl(Y, b, ee)) : (ol(ke, y), nl(Y, b, ee)), (D || z || X) && f.restore();
  }
  function nl(Y, ee, me) {
    me > 0 && (ee instanceof Map ? ee.forEach((ye, ke) => {
      f.strokeStyle = da = ke, f.stroke(ye);
    }) : ee != null && Y && f.stroke(ee));
  }
  function ol(Y, ee) {
    ee instanceof Map ? ee.forEach((me, ye) => {
      f.fillStyle = ar = ye, f.fill(me);
    }) : ee != null && Y && f.fill(ee);
  }
  function il(Y, ee, me, ye) {
    let ke = P[Y], b;
    if (ye <= 0)
      b = [0, 0];
    else {
      let y = ke._space = ke.space(o, Y, ee, me, ye), k = ke._incrs = ke.incrs(o, Y, ee, me, ye, y);
      b = tB(ee, me, k, ye, y);
    }
    return ke._found = b;
  }
  function Nr(Y, ee, me, ye, ke, b, y, k, D, z) {
    let V = y % 2 / 2;
    m == 1 && f.translate(V, V), Ks(k, y, D, z, k), f.beginPath();
    let X, J, ue, we, de = ke + (ye == 0 || ye == 3 ? -b : b);
    me == 0 ? (J = ke, we = de) : (X = ke, ue = de);
    for (let Oe = 0; Oe < Y.length; Oe++)
      ee[Oe] != null && (me == 0 ? X = ue = Y[Oe] : J = we = Y[Oe], f.moveTo(X, J), f.lineTo(ue, we));
    f.stroke(), m == 1 && f.translate(-V, -V);
  }
  function qs(Y) {
    let ee = !0;
    return P.forEach((me, ye) => {
      if (!me.show)
        return;
      let ke = $[me.scale];
      if (ke.min == null) {
        me._show && (ee = !1, me._show = !1, rl(!1));
        return;
      } else
        me._show || (ee = !1, me._show = !0, rl(!1));
      let b = me.side, y = b % 2, { min: k, max: D } = ke, [z, V] = il(ye, k, D, y == 0 ? je : Pe);
      if (V == 0)
        return;
      let X = ke.distr == 2, J = me._splits = me.splits(o, ye, k, D, z, V, X), ue = ke.distr == 2 ? J.map((Te) => Zn[Te]) : J, we = ke.distr == 2 ? Zn[J[1]] - Zn[J[0]] : z, de = me._values = me.values(o, me.filter(o, ue, ye, V, we), ye, V, we);
      me._rotate = b == 2 ? me.rotate(o, de, ye, V) : 0;
      let Oe = me._size;
      me._size = Xi(me.size(o, de, ye, Y)), Oe != null && me._size != Oe && (ee = !1);
    }), ee;
  }
  function Kl(Y) {
    let ee = !0;
    return zo.forEach((me, ye) => {
      let ke = me(o, ye, Sn, Y);
      ke != un[ye] && (ee = !1), un[ye] = ke;
    }), ee;
  }
  function Ud() {
    for (let Y = 0; Y < P.length; Y++) {
      let ee = P[Y];
      if (!ee.show || !ee._show)
        continue;
      let me = ee.side, ye = me % 2, ke, b, y = ee.stroke(o, Y), k = me == 0 || me == 3 ? -1 : 1;
      if (ee.label) {
        let qn = ee.labelGap * k, uo = Oo((ee._lpos + qn) * Nn);
        Vl(ee.labelFont[0], y, "center", me == 2 ? kc : tw), f.save(), ye == 1 ? (ke = b = 0, f.translate(
          uo,
          Oo(Ee + Fe / 2)
        ), f.rotate((me == 3 ? -Xf : Xf) / 2)) : (ke = Oo(tt + Ne / 2), b = uo), f.fillText(ee.label, ke, b), f.restore();
      }
      let [D, z] = ee._found;
      if (z == 0)
        continue;
      let V = $[ee.scale], X = ye == 0 ? Ne : Fe, J = ye == 0 ? tt : Ee, ue = Oo(ee.gap * Nn), we = ee._splits, de = V.distr == 2 ? we.map((qn) => Zn[qn]) : we, Oe = V.distr == 2 ? Zn[we[1]] - Zn[we[0]] : D, Te = ee.ticks, Ye = ee.border, Qe = Te.show ? Oo(Te.size * Nn) : 0, Ze = ee._rotate * -Xf / 180, lt = x(ee._pos * Nn), st = (Qe + ue) * k, xt = lt + st;
      b = ye == 0 ? xt : 0, ke = ye == 1 ? xt : 0;
      let Nt = ee.font[0], Gt = ee.align == 1 ? tu : ee.align == 2 ? _g : Ze > 0 ? tu : Ze < 0 ? _g : ye == 0 ? "center" : me == 3 ? _g : tu, Tt = Ze || ye == 1 ? "middle" : me == 2 ? kc : tw;
      Vl(Nt, y, Gt, Tt);
      let jt = ee.font[1] * ee.lineGap, Rn = we.map((qn) => x(s(qn, V, X, J))), xn = ee._values;
      for (let qn = 0; qn < xn.length; qn++) {
        let uo = xn[qn];
        if (uo != null) {
          ye == 0 ? ke = Rn[qn] : b = Rn[qn], uo = "" + uo;
          let dr = uo.indexOf(`
`) == -1 ? [uo] : uo.split(/\n/gm);
          for (let hi = 0; hi < dr.length; hi++) {
            let Hi = dr[hi];
            Ze ? (f.save(), f.translate(ke, b + hi * jt), f.rotate(Ze), f.fillText(Hi, 0, 0), f.restore()) : f.fillText(Hi, ke, b + hi * jt);
          }
        }
      }
      Te.show && Nr(
        Rn,
        Te.filter(o, de, Y, z, Oe),
        ye,
        me,
        lt,
        Qe,
        Gn(Te.width * Nn, 3),
        Te.stroke(o, Y),
        Te.dash,
        Te.cap
      );
      let Fn = ee.grid;
      Fn.show && Nr(
        Rn,
        Fn.filter(o, de, Y, z, Oe),
        ye,
        ye == 0 ? 2 : 1,
        ye == 0 ? Ee : tt,
        ye == 0 ? Fe : Ne,
        Gn(Fn.width * Nn, 3),
        Fn.stroke(o, Y),
        Fn.dash,
        Fn.cap
      ), Ye.show && Nr(
        [lt],
        [1],
        ye == 0 ? 1 : 0,
        ye == 0 ? 1 : 2,
        ye == 1 ? Ee : tt,
        ye == 1 ? Fe : Ne,
        Gn(Ye.width * Nn, 3),
        Ye.stroke(o, Y),
        Ye.dash,
        Ye.cap
      );
    }
    io("drawAxes");
  }
  function rl(Y) {
    C.forEach((ee, me) => {
      me > 0 && (ee._paths = null, Y && (i == 1 ? (ee.min = null, ee.max = null) : ee.facets.forEach((ye) => {
        ye.min = null, ye.max = null;
      })));
    });
  }
  let Ys = !1, Gs = !1, al = [];
  function ug() {
    Gs = !1;
    for (let Y = 0; Y < al.length; Y++)
      io(...al[Y]);
    al.length = 0;
  }
  function zr() {
    Ys || (G4(mc), Ys = !0);
  }
  function cg(Y, ee = !1) {
    Ys = !0, Gs = ee, Y(o), mc(), ee && al.length > 0 && queueMicrotask(ug);
  }
  o.batch = cg;
  function mc() {
    if (it && (Wl(), it = !1), at && (Wt(), at = !1), pt) {
      if (eo(v, tu, Ge), eo(v, kc, Se), eo(v, Bc, je), eo(v, Fc, Pe), eo(g, tu, Ge), eo(g, kc, Se), eo(g, Bc, je), eo(g, Fc, Pe), eo(p, Bc, Ve), eo(p, Fc, ot), d.width = Oo(Ve * Nn), d.height = Oo(ot * Nn), P.forEach(({ _el: Y, _show: ee, _size: me, _pos: ye, side: ke }) => {
        if (Y != null)
          if (ee) {
            let b = ke === 3 || ke === 0 ? me : 0, y = ke % 2 == 1;
            eo(Y, y ? "left" : "top", ye - b), eo(Y, y ? "width" : "height", me), eo(Y, y ? "top" : "left", y ? Se : Ge), eo(Y, y ? "height" : "width", y ? Pe : je), cm(Y, us);
          } else
            Oi(Y, us);
      }), da = ar = Dr = Ar = Za = lr = Rr = Hl = Qa = null, ei = 1, pl(!0), Ge != Ce || Se != Ae || je != qe || Pe != We) {
        rl(!1);
        let Y = je / qe, ee = Pe / We;
        if (gt.show && !ft && gt.left >= 0) {
          gt.left *= Y, gt.top *= ee, pa && Vr(pa, Oo(gt.left), 0, je, Pe), ha && Vr(ha, 0, Oo(gt.top), je, Pe);
          for (let me = 0; me < Ue.length; me++) {
            let ye = Ue[me];
            ye != null && (ht[me] *= Y, vt[me] *= ee, Vr(ye, Xi(ht[me]), Xi(vt[me]), je, Pe));
          }
        }
        if (Hn.show && !wt && Hn.left >= 0 && Hn.width > 0) {
          Hn.left *= Y, Hn.width *= Y, Hn.top *= ee, Hn.height *= ee;
          for (let me in Sc)
            eo(Br, me, Hn[me]);
        }
        Ce = Ge, Ae = Se, qe = je, We = Pe;
      }
      io("setSize"), pt = !1;
    }
    Ve > 0 && ot > 0 && (f.clearRect(0, 0, d.width, d.height), io("drawClear"), _.forEach((Y) => Y()), io("draw")), Hn.show && wt && (Us(Hn), wt = !1), gt.show && ft && (Hr(null, !0, !1), ft = !1), U.show && U.live && Ct && (fl(), Ct = !1), u || (u = !0, o.status = 1, io("ready")), pi = !1, Ys = !1;
  }
  o.redraw = (Y, ee) => {
    at = ee || !1, Y !== !1 ? Wo(w, R.min, R.max) : zr();
  };
  function bc(Y, ee) {
    let me = $[Y];
    if (me.from == null) {
      if (Dn == 0) {
        let ye = me.range(o, ee.min, ee.max, Y);
        ee.min = ye[0], ee.max = ye[1];
      }
      if (ee.min > ee.max) {
        let ye = ee.min;
        ee.min = ee.max, ee.max = ye;
      }
      if (Dn > 1 && ee.min != null && ee.max != null && ee.max - ee.min < 1e-16)
        return;
      Y == w && me.distr == 2 && Dn > 0 && (ee.min = br(ee.min, t[0]), ee.max = br(ee.max, t[0]), ee.min == ee.max && ee.max++), A[Y] = ee, it = !0, zr();
    }
  }
  o.setScale = bc;
  let ll, yc, pa, ha, Xd, xc, ga, sl, ul, ql, Kn, Ln, sr = !1;
  const Po = gt.drag;
  let po = Po.x, mo = Po.y;
  gt.show && (gt.x && (ll = Yi(b4, g)), gt.y && (yc = Yi(y4, g)), R.ori == 0 ? (pa = ll, ha = yc) : (pa = yc, ha = ll), Kn = gt.left, Ln = gt.top);
  const Hn = o.select = So({
    show: !0,
    over: !0,
    left: 0,
    width: 0,
    top: 0,
    height: 0
  }, e.select), Br = Hn.show ? Yi(m4, Hn.over ? g : v) : null;
  function Us(Y, ee) {
    if (Hn.show) {
      for (let me in Y)
        Hn[me] = Y[me], me in Sc && eo(Br, me, Y[me]);
      ee !== !1 && io("setSelect");
    }
  }
  o.setSelect = Us;
  function dg(Y, ee) {
    let me = C[Y], ye = ae ? ve[Y] : null;
    if (me.show)
      ye && cm(ye, us);
    else {
      ye && Oi(ye, us);
      let ke = Uo ? Ue[0] : Ue[Y];
      Vr(ke, -10, -10, je, Pe);
    }
  }
  function Wo(Y, ee, me) {
    bc(Y, { min: ee, max: me });
  }
  function Fi(Y, ee, me, ye) {
    ee.focus != null && hg(Y), ee.show != null && C.forEach((ke, b) => {
      b > 0 && (Y == b || Y == null) && (ke.show = ee.show, dg(b, ee.show), i == 2 ? (Wo(ke.facets[0].scale, null, null), Wo(ke.facets[1].scale, null, null)) : Wo(ke.scale, null, null), zr());
    }), me !== !1 && io("setSeries", Y, ee), ye && Ul("setSeries", o, Y, ee);
  }
  o.setSeries = Fi;
  function fg(Y, ee) {
    So(I[Y], ee);
  }
  function pg(Y, ee) {
    Y.fill = gn(Y.fill || null), Y.dir = kn(Y.dir, -1), ee = ee ?? I.length, I.splice(ee, 0, Y);
  }
  function Qd(Y) {
    Y == null ? I.length = 0 : I.splice(Y, 1);
  }
  o.addBand = pg, o.setBand = fg, o.delBand = Qd;
  function Zd(Y, ee) {
    C[Y].alpha = ee, gt.show && Ue[Y] && (Ue[Y].style.opacity = ee), ae && ve[Y] && (ve[Y].style.opacity = ee);
  }
  let Jn, Fr, va;
  const cl = { focus: !0 };
  function hg(Y) {
    if (Y != va) {
      let ee = Y == null, me = Wn.alpha != 1;
      C.forEach((ye, ke) => {
        if (i == 1 || ke > 0) {
          let b = ee || ke == 0 || ke == Y;
          ye._focus = ee ? null : b, me && Zd(ke, b ? 1 : Wn.alpha);
        }
      }), va = Y, me && zr();
    }
  }
  ae && lo && De(aw, re, (Y) => {
    gt._lock || (En(Y), va != null && Fi(null, cl, !0, so.setSeries));
  });
  function Li(Y, ee, me) {
    let ye = $[ee];
    me && (Y = Y / Nn - (ye.ori == 1 ? Se : Ge));
    let ke = je;
    ye.ori == 1 && (ke = Pe, Y = ke - Y), ye.dir == -1 && (Y = ke - Y);
    let b = ye._min, y = ye._max, k = Y / ke, D = b + (y - b) * k, z = ye.distr;
    return z == 3 ? Lu(10, D) : z == 4 ? N4(D, ye.asinh) : z == 100 ? ye.bwd(D) : D;
  }
  function gg(Y, ee) {
    let me = Li(Y, w, ee);
    return br(me, t[0], cn, An);
  }
  o.valToIdx = (Y) => br(Y, t[0]), o.posToIdx = gg, o.posToVal = Li, o.valToPos = (Y, ee, me) => $[ee].ori == 0 ? a(
    Y,
    $[ee],
    me ? Ne : je,
    me ? tt : 0
  ) : l(
    Y,
    $[ee],
    me ? Fe : Pe,
    me ? Ee : 0
  ), o.setCursor = (Y, ee, me) => {
    Kn = Y.left, Ln = Y.top, Hr(null, ee, me);
  };
  function Jd(Y, ee) {
    eo(Br, tu, Hn.left = Y), eo(Br, Bc, Hn.width = ee);
  }
  function ef(Y, ee) {
    eo(Br, kc, Hn.top = Y), eo(Br, Fc, Hn.height = ee);
  }
  let dl = R.ori == 0 ? Jd : ef, Lr = R.ori == 1 ? Jd : ef;
  function ma() {
    if (ae && U.live)
      for (let Y = i == 2 ? 1 : 0; Y < C.length; Y++) {
        if (Y == 0 && ge)
          continue;
        let ee = U.values[Y], me = 0;
        for (let ye in ee)
          ce[Y][me++].firstChild.nodeValue = ee[ye];
      }
  }
  function fl(Y, ee) {
    if (Y != null && (Y.idxs ? Y.idxs.forEach((me, ye) => {
      q[ye] = me;
    }) : L4(Y.idx) || q.fill(Y.idx), U.idx = q[0]), ae && U.live) {
      for (let me = 0; me < C.length; me++)
        (me > 0 || i == 1 && !ge) && vg(me, q[me]);
      ma();
    }
    Ct = !1, ee !== !1 && io("setLegend");
  }
  o.setLegend = fl;
  function vg(Y, ee) {
    let me = C[Y], ye = Y == 0 && H == 2 ? Zn : t[Y], ke;
    ge ? ke = me.values(o, Y, ee) ?? Me : (ke = me.value(o, ee == null ? null : ye[ee], Y, ee), ke = ke == null ? Me : { _: ke }), U.values[Y] = ke;
  }
  function Hr(Y, ee, me) {
    ul = Kn, ql = Ln, [Kn, Ln] = gt.move(o, Kn, Ln), gt.left = Kn, gt.top = Ln, gt.show && (pa && Vr(pa, Oo(Kn), 0, je, Pe), ha && Vr(ha, 0, Oo(Ln), je, Pe));
    let ye, ke = cn > An;
    Jn = vn, Fr = null;
    let b = R.ori == 0 ? je : Pe, y = R.ori == 1 ? je : Pe;
    if (Kn < 0 || Dn == 0 || ke) {
      ye = gt.idx = null;
      for (let k = 0; k < C.length; k++) {
        let D = Ue[k];
        D != null && Vr(D, -10, -10, je, Pe);
      }
      lo && Fi(null, cl, !0, Y == null && so.setSeries), U.live && (q.fill(ye), Ct = !0);
    } else {
      let k, D, z;
      i == 1 && (k = R.ori == 0 ? Kn : Ln, D = Li(k, w), ye = gt.idx = br(D, t[0], cn, An), z = L(t[0][ye], R, b, 0));
      let V = -10, X = -10, J = 0, ue = 0, we = !0, de = "", Oe = "";
      for (let Te = i == 2 ? 1 : 0; Te < C.length; Te++) {
        let Ye = C[Te], Qe = q[Te], Ze = Qe == null ? null : i == 1 ? t[Te][Qe] : t[Te][1][Qe], lt = gt.dataIdx(o, Te, ye, D), st = lt == null ? null : i == 1 ? t[Te][lt] : t[Te][1][lt];
        Ct = Ct || st != Ze || lt != Qe, q[Te] = lt;
        let xt = lt == ye ? z : L(i == 1 ? t[0][lt] : t[Te][0][lt], R, b, 0);
        if (Te > 0 && Ye.show) {
          let Nt = st == null ? -10 : B(st, i == 1 ? $[Ye.scale] : $[Ye.facets[1].scale], y, 0);
          if (lo && st != null) {
            let Gt = R.ori == 1 ? Kn : Ln, Tt = Io(Wn.dist(o, Te, lt, Nt, Gt));
            if (Tt < Jn) {
              let jt = Wn.bias;
              if (jt != 0) {
                let Rn = Li(Gt, Ye.scale), xn = st >= 0 ? 1 : -1, Fn = Rn >= 0 ? 1 : -1;
                Fn == xn && (Fn == 1 ? jt == 1 ? st >= Rn : st <= Rn : (
                  // >= 0
                  jt == 1 ? st <= Rn : st >= Rn
                )) && (Jn = Tt, Fr = Te);
              } else
                Jn = Tt, Fr = Te;
            }
          }
          if (Ct || Uo) {
            let Gt, Tt;
            R.ori == 0 ? (Gt = xt, Tt = Nt) : (Gt = Nt, Tt = xt);
            let jt, Rn, xn, Fn, qn, uo, dr = !0, hi = hn.bbox;
            if (hi != null) {
              dr = !1;
              let Hi = hi(o, Te);
              xn = Hi.left, Fn = Hi.top, jt = Hi.width, Rn = Hi.height;
            } else
              xn = Gt, Fn = Tt, jt = Rn = hn.size(o, Te);
            if (uo = hn.fill(o, Te), qn = hn.stroke(o, Te), Uo)
              Te == Fr && Jn <= Wn.prox && (V = xn, X = Fn, J = jt, ue = Rn, we = dr, de = uo, Oe = qn);
            else {
              let Hi = Ue[Te];
              Hi != null && (ht[Te] = xn, vt[Te] = Fn, pw(Hi, jt, Rn, dr), dw(Hi, uo, qn), Vr(Hi, Xi(xn), Xi(Fn), je, Pe));
            }
          }
        }
      }
      if (Uo) {
        let Te = Wn.prox, Ye = va == null ? Jn <= Te : Jn > Te || Fr != va;
        if (Ct || Ye) {
          let Qe = Ue[0];
          ht[0] = V, vt[0] = X, pw(Qe, J, ue, we), dw(Qe, de, Oe), Vr(Qe, Xi(V), Xi(X), je, Pe);
        }
      }
    }
    if (Hn.show && sr)
      if (Y != null) {
        let [k, D] = so.scales, [z, V] = so.match, [X, J] = Y.cursor.sync.scales, ue = Y.cursor.drag;
        if (po = ue._x, mo = ue._y, po || mo) {
          let { left: we, top: de, width: Oe, height: Te } = Y.select, Ye = Y.scales[X].ori, Qe = Y.posToVal, Ze, lt, st, xt, Nt, Gt = k != null && z(k, X), Tt = D != null && V(D, J);
          Gt && po ? (Ye == 0 ? (Ze = we, lt = Oe) : (Ze = de, lt = Te), st = $[k], xt = L(Qe(Ze, X), st, b, 0), Nt = L(Qe(Ze + lt, X), st, b, 0), dl(Zi(xt, Nt), Io(Nt - xt))) : dl(0, b), Tt && mo ? (Ye == 1 ? (Ze = we, lt = Oe) : (Ze = de, lt = Te), st = $[D], xt = B(Qe(Ze, J), st, y, 0), Nt = B(Qe(Ze + lt, J), st, y, 0), Lr(Zi(xt, Nt), Io(Nt - xt))) : Lr(0, y);
        } else
          Xs();
      } else {
        let k = Io(ul - Xd), D = Io(ql - xc);
        if (R.ori == 1) {
          let J = k;
          k = D, D = J;
        }
        po = Po.x && k >= Po.dist, mo = Po.y && D >= Po.dist;
        let z = Po.uni;
        z != null ? po && mo && (po = k >= z, mo = D >= z, !po && !mo && (D > k ? mo = !0 : po = !0)) : Po.x && Po.y && (po || mo) && (po = mo = !0);
        let V, X;
        po && (R.ori == 0 ? (V = ga, X = Kn) : (V = sl, X = Ln), dl(Zi(V, X), Io(X - V)), mo || Lr(0, y)), mo && (R.ori == 1 ? (V = ga, X = Kn) : (V = sl, X = Ln), Lr(Zi(V, X), Io(X - V)), po || dl(0, b)), !po && !mo && (dl(0, 0), Lr(0, 0));
      }
    if (Po._x = po, Po._y = mo, Y == null) {
      if (me) {
        if (Js != null) {
          let [k, D] = so.scales;
          so.values[0] = k != null ? Li(R.ori == 0 ? Kn : Ln, k) : null, so.values[1] = D != null ? Li(R.ori == 1 ? Kn : Ln, D) : null;
        }
        Ul(ow, o, Kn, Ln, je, Pe, ye);
      }
      if (lo) {
        let k = me && so.setSeries, D = Wn.prox;
        va == null ? Jn <= D && Fi(Fr, cl, !0, k) : Jn > D ? Fi(null, cl, !0, k) : Fr != va && Fi(Fr, cl, !0, k);
      }
    }
    Ct && (U.idx = ye, fl()), ee !== !1 && io("setCursor");
  }
  let ur = null;
  Object.defineProperty(o, "rect", {
    get() {
      return ur == null && pl(!1), ur;
    }
  });
  function pl(Y = !1) {
    Y ? ur = null : (ur = g.getBoundingClientRect(), io("syncRect", ur));
  }
  function hl(Y, ee, me, ye, ke, b, y) {
    gt._lock || sr && Y != null && Y.movementX == 0 && Y.movementY == 0 || (wc(Y, ee, me, ye, ke, b, y, !1, Y != null), Y != null ? Hr(null, !0, !0) : Hr(ee, !0, !1));
  }
  function wc(Y, ee, me, ye, ke, b, y, k, D) {
    if (ur == null && pl(!1), En(Y), Y != null)
      me = Y.clientX - ur.left, ye = Y.clientY - ur.top;
    else {
      if (me < 0 || ye < 0) {
        Kn = -10, Ln = -10;
        return;
      }
      let [z, V] = so.scales, X = ee.cursor.sync, [J, ue] = X.values, [we, de] = X.scales, [Oe, Te] = so.match, Ye = ee.axes[0].side % 2 == 1, Qe = R.ori == 0 ? je : Pe, Ze = R.ori == 1 ? je : Pe, lt = Ye ? b : ke, st = Ye ? ke : b, xt = Ye ? ye : me, Nt = Ye ? me : ye;
      if (we != null ? me = Oe(z, we) ? s(J, $[z], Qe, 0) : -10 : me = Qe * (xt / lt), de != null ? ye = Te(V, de) ? s(ue, $[V], Ze, 0) : -10 : ye = Ze * (Nt / st), R.ori == 1) {
        let Gt = me;
        me = ye, ye = Gt;
      }
    }
    D && ((me <= 1 || me >= je - 1) && (me = rs(me, je)), (ye <= 1 || ye >= Pe - 1) && (ye = rs(ye, Pe))), k ? (Xd = me, xc = ye, [ga, sl] = gt.move(o, me, ye)) : (Kn = me, Ln = ye);
  }
  const Sc = {
    width: 0,
    height: 0,
    left: 0,
    top: 0
  };
  function Xs() {
    Us(Sc, !1);
  }
  let tf, nf, of, Qs;
  function rf(Y, ee, me, ye, ke, b, y) {
    sr = !0, po = mo = Po._x = Po._y = !1, wc(Y, ee, me, ye, ke, b, y, !0, !1), Y != null && (De(Eg, sm, Yl, !1), Ul(iw, o, ga, sl, je, Pe, null));
    let { left: k, top: D, width: z, height: V } = Hn;
    tf = k, nf = D, of = z, Qs = V, Xs();
  }
  function Yl(Y, ee, me, ye, ke, b, y) {
    sr = Po._x = Po._y = !1, wc(Y, ee, me, ye, ke, b, y, !1, !0);
    let { left: k, top: D, width: z, height: V } = Hn, X = z > 0 || V > 0, J = tf != k || nf != D || of != z || Qs != V;
    if (X && J && Us(Hn), Po.setScale && X && J) {
      let ue = k, we = z, de = D, Oe = V;
      if (R.ori == 1 && (ue = D, we = V, de = k, Oe = z), po && Wo(
        w,
        Li(ue, w),
        Li(ue + we, w)
      ), mo)
        for (let Te in $) {
          let Ye = $[Te];
          Te != w && Ye.from == null && Ye.min != vn && Wo(
            Te,
            Li(de + Oe, Te),
            Li(de, Te)
          );
        }
      Xs();
    } else gt.lock && (gt._lock = !gt._lock, Hr(null, !0, !1));
    Y != null && (Be(Eg, sm), Ul(Eg, o, Kn, Ln, je, Pe, null));
  }
  function mg(Y, ee, me, ye, ke, b, y) {
    if (gt._lock)
      return;
    En(Y);
    let k = sr;
    if (sr) {
      let D = !0, z = !0, V = 10, X, J;
      R.ori == 0 ? (X = po, J = mo) : (X = mo, J = po), X && J && (D = Kn <= V || Kn >= je - V, z = Ln <= V || Ln >= Pe - V), X && D && (Kn = Kn < ga ? 0 : je), J && z && (Ln = Ln < sl ? 0 : Pe), Hr(null, !0, !0), sr = !1;
    }
    Kn = -10, Ln = -10, Hr(null, !0, !0), k && (sr = k);
  }
  function Zs(Y, ee, me, ye, ke, b, y) {
    gt._lock || (En(Y), ca(), Xs(), Y != null && Ul(lw, o, Kn, Ln, je, Pe, null));
  }
  function af() {
    P.forEach(nB), St(o.width, o.height, !0);
  }
  Ss(Pp, Iu, af);
  const gl = {};
  gl.mousedown = rf, gl.mousemove = hl, gl.mouseup = Yl, gl.dblclick = Zs, gl.setSeries = (Y, ee, me, ye) => {
    let ke = so.match[2];
    me = ke(o, ee, me), me != -1 && Fi(me, ye, !0, !1);
  }, gt.show && (De(iw, g, rf), De(ow, g, hl), De(rw, g, (Y) => {
    En(Y), pl(!1);
  }), De(aw, g, mg), De(lw, g, Zs), vm.add(o), o.syncRect = pl);
  const Gl = o.hooks = e.hooks || {};
  function io(Y, ee, me) {
    Gs ? al.push([Y, ee, me]) : Y in Gl && Gl[Y].forEach((ye) => {
      ye.call(null, o, ee, me);
    });
  }
  (e.plugins || []).forEach((Y) => {
    for (let ee in Y.hooks)
      Gl[ee] = (Gl[ee] || []).concat(Y.hooks[ee]);
  });
  const cr = (Y, ee, me) => me, so = So({
    key: null,
    setSeries: !1,
    filters: {
      pub: bw,
      sub: bw
    },
    scales: [w, C[1] ? C[1].scale : null],
    match: [yw, yw, cr],
    values: [null, null]
  }, gt.sync);
  so.match.length == 2 && so.match.push(cr), gt.sync = so;
  const Js = so.key, Cc = vk(Js);
  function Ul(Y, ee, me, ye, ke, b, y) {
    so.filters.pub(Y, ee, me, ye, ke, b, y) && Cc.pub(Y, ee, me, ye, ke, b, y);
  }
  Cc.sub(o);
  function bg(Y, ee, me, ye, ke, b, y) {
    so.filters.sub(Y, ee, me, ye, ke, b, y) && gl[Y](null, ee, me, ye, ke, b, y);
  }
  o.pub = bg;
  function yg() {
    Cc.unsub(o), vm.delete(o), Xe.clear(), dm(Pp, Iu, af), c.remove(), re?.remove(), io("destroy");
  }
  o.destroy = yg;
  function $c() {
    io("init", e, t), jo(t || e.data, !1), A[w] ? bc(w, A[w]) : ca(), wt = Hn.show && (Hn.width > 0 || Hn.height > 0), ft = Ct = !0, St(e.width, e.height);
  }
  return C.forEach(Qn), P.forEach(Mt), n ? n instanceof HTMLElement ? (n.appendChild(c), $c()) : n(o, $c) : $c(), o;
}
xo.assign = So;
xo.fmtNum = Iy;
xo.rangeNum = Op;
xo.rangeLog = vh;
xo.rangeAsinh = Oy;
xo.orient = zs;
xo.pxRatio = Nn;
xo.join = Y4;
xo.fmtDate = Ty, xo.tzDate = i3;
xo.sync = vk;
{
  xo.addGap = L3, xo.clipGaps = yh;
  let e = xo.paths = {
    points: Sk
  };
  e.linear = $k, e.stepped = j3, e.bars = W3, e.spline = q3;
}
function oB(e, t) {
  if (!e || e.length === 0)
    return [null, null];
  let n = null, o = null;
  for (const { thresholdValue: i } of e)
    i !== void 0 && ((n === null || i < n) && (n = i), (o === null || i > o) && (o = i));
  return [n, o];
}
function iB({
  distr: e,
  logBase: t,
  limits: n
}) {
  if (e !== ws.Logarithmic)
    return n;
  const o = t === 2 ? Math.log2 : Math.log10;
  return {
    min: pf(n.min, t, o, Math.floor),
    max: pf(n.max, t, o, Math.ceil),
    softMin: pf(n.softMin, t, o, Math.floor),
    softMax: pf(n.softMax, t, o, Math.ceil)
  };
}
function pf(e, t, n, o) {
  return e == null || e <= 0 ? e : t ** o(n(e));
}
function rB({
  time: e,
  distr: t,
  logBase: n
}) {
  if (e)
    return {};
  const o = (n ?? 10) === 2 ? 2 : 10;
  return {
    distr: t === ws.Logarithmic ? 3 : t === ws.Symlog ? 2 : 1,
    log: o
  };
}
function aB(e, t, n, o, i, r) {
  const a = n == null ? 3 : 1, l = o == null ? 3 : 1, s = {
    min: {
      pad: i,
      hard: e ?? -1 / 0,
      soft: n !== null ? n : void 0,
      mode: a
    },
    max: {
      pad: r,
      hard: t ?? 1 / 0,
      soft: o !== null ? o : void 0,
      mode: l
    }
  }, u = n == null && e != null, c = o == null && t != null;
  return { rangeConfig: s, hardMinOnly: u, hardMaxOnly: c, hasFixedRange: u && c };
}
function lB(e, t, n) {
  return !n && e == null && t == null ? null : [e, t];
}
function sB(e, t, n, o) {
  const { rangeConfig: i, hardMinOnly: r, hardMaxOnly: a, min: l, max: s } = t, u = r ? l : n, c = a ? s : o;
  return u == null || c == null ? e : xo.rangeNum(u, c, i);
}
function uB(e, t, n, o, i) {
  const r = t.min ?? n, a = t.max ?? o;
  return r == null || a == null ? e : xo.rangeLog(r, a, i ?? 10, !0);
}
function cB(e, t, n) {
  let [o, i] = e;
  return o != null && (o = t ** Math.floor(n(o))), i != null && (i = t ** Math.ceil(n(i)), o === i && (i *= t)), [o, i];
}
function dB(e, t, n) {
  if (n !== 1)
    return e;
  let [o, i] = e;
  return t.hardMinOnly && t.min != null && (o = t.min), t.hardMaxOnly && t.max != null && (i = t.max), [o, i];
}
function fB(e, t) {
  const [n, o] = e;
  return n != null && o != null && n >= o ? [t === 3 ? 1 : 0, 100] : e;
}
function pB(e) {
  return (t, n, o, i) => {
    const r = t.scales[i], a = lB(n, o, e.hasFixedRange);
    if (!a)
      return [n, o];
    let l = a;
    const s = r.log;
    if (r.distr === 1)
      l = sB(l, e, n, o);
    else if (r.distr === 3) {
      l = uB(l, e, n, o, s);
      const u = r.log === 2 ? Math.log2 : Math.log10;
      l = cB(l, s ?? 10, u);
    }
    return l = dB(l, e, r.distr ?? 1), fB(l, r.distr ?? 1);
  };
}
function hB(e, t, n, o) {
  if (!n || n.length === 0)
    return { softMin: e, softMax: t };
  const [i, r] = oB(n);
  if (i === null && r === null)
    return { softMin: e, softMax: t };
  const a = i !== null ? e !== null ? Math.min(e, i) : i : e, l = r !== null ? t !== null ? Math.max(t, r) : r : t;
  return { softMin: a, softMax: l };
}
class gB extends gh {
  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,
      thresholds: i,
      logBase: r = 10,
      padMinBy: a = 0,
      padMaxBy: l = 0.05
    } = this.props;
    if (n) {
      if (this.min != null && this.max != null) {
        const M = this.min;
        let _ = this.max;
        const N = new Date(_ * 1e3);
        return N.setSeconds(0), N.setMilliseconds(0), _ = Math.floor(N.getTime() / 1e3) + 60, { [t]: { time: !0, auto: !1, range: [M, _] } };
      }
      return { [t]: { time: !0, auto: !0 } };
    }
    const s = this.props.distribution, u = i?.thresholds, { softMin: c, softMax: d } = hB(
      this.softMin,
      this.softMax,
      u,
      i?.yAxisUnit
    ), { min: f, max: p, softMin: v, softMax: g } = iB({
      distr: s,
      logBase: r,
      limits: {
        min: this.min,
        max: this.max,
        softMin: c,
        softMax: d
      }
    }), m = rB({ time: n, distr: s, logBase: r }), { rangeConfig: x, hardMinOnly: S, hardMaxOnly: C, hasFixedRange: P } = aB(
      f,
      p,
      v,
      g,
      a,
      l
    ), $ = pB({
      rangeConfig: x,
      hardMinOnly: S,
      hardMaxOnly: C,
      hasFixedRange: P,
      min: f,
      max: p
    });
    let I = this.props.auto;
    return I ??= !n && !P, {
      [t]: {
        time: n,
        auto: I,
        range: o ?? $,
        ...m
      }
    };
  }
  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 zg = {};
let Hw = 0;
const Vw = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff"
];
function vB(e) {
  if (zg[e])
    return zg[e];
  const t = Vw[Hw % Vw.length];
  return Hw++, zg[e] = t, t;
}
const jw = {
  white: "#ffffff",
  black: "#000000"
};
function mB(e, t, n, o = 100) {
  const i = e.ctx.createLinearGradient(0, 0, 0, e.bbox.height), r = Math.round(o / 100 * 112).toString(16).padStart(2, "0"), a = Math.round(o / 100 * 64).toString(16).padStart(2, "0");
  return i.addColorStop(0, `${t}${r}`), i.addColorStop(0.6, `${t}${a}`), i.addColorStop(1, n), i;
}
function bB(e, t) {
  for (let n = 1; n < 100; n++) {
    if (e[t + n] != null)
      return t + n;
    if (e[t - n] != null)
      return t - n;
  }
  return t;
}
function yB(e, t, n) {
  const o = [];
  for (let i = 0; i < e.length; i++) {
    const r = e[i + 1];
    if (r && e[i][1] === r[0]) {
      const a = n.posToIdx(e[i][1], !0);
      o.push(t[a] == null ? bB(t, a) : a);
    }
  }
  return o;
}
function xB(e, t, n, o) {
  if (n || !o || o.length === 0)
    return null;
  const i = e.series[t].idxs;
  if (!i)
    return null;
  const [r, a] = i, l = e.data[0], s = e.data[t], u = Math.round(e.valToPos(l[r], "x", !0)), c = Math.round(e.valToPos(l[a], "x", !0)), d = [];
  return o[0][0] === u && d.push(r), d.push(...yB(o, s, e)), o[o.length - 1][1] === c && d.push(a), d.length ? d : null;
}
const Ww = 2, wB = 2.5;
let ri = null;
class SB extends gh {
  constructor(t) {
    if (super(t), !ri) {
      const n = xo.paths, o = n.linear, i = n.spline, r = n.stepped;
      if (!o || !i || !r)
        throw new Error("Required uPlot path builders are not available");
      ri = {
        linear: o(),
        spline: i(),
        stepBefore: r({ align: -1 }),
        stepAfter: r({ align: 1 })
      };
    }
  }
  getLineColor() {
    const { colorMapping: t, lineColor: n, label: o, isDarkMode: i } = this.props;
    return o ? n ?? t?.[o] ?? vB(o) : n ?? (i ? jw.white : jw.black);
  }
  buildLineConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, lineStyle: o, lineCap: i, fillColor: r, fillMode: a, fillOpacity: l } = this.props, s = {
      stroke: t,
      width: n ?? Ww
    }, u = l != null && l > 0 ? Math.round(Math.min(l, 100) / 100 * 255).toString(16).padStart(2, "0") : null;
    o === lm.Dashed && (s.dash = [10, 10]), o === lm.Dotted && (s.dash = [2, 6]), i && (s.cap = i);
    const c = r ?? t;
    return this.props.drawStyle === Xr.Bars ? s.fill = u ? `${c}${u}` : c : this.props.drawStyle === Xr.Histogram ? s.fill = `${c}${u ?? "40"}` : a && a !== Yc.None ? a === Yc.Solid ? s.fill = u ? `${c}${u}` : c : a === Yc.Gradient && (s.fill = (d) => mB(d, c, "rgba(0, 0, 0, 0)", l ?? 100)) : u && (s.fill = `${c}${u}`), s;
  }
  buildPathConfig() {
    const {
      pathBuilder: t,
      drawStyle: n,
      lineInterpolation: o,
      barAlignment: i,
      barMaxWidth: r,
      barWidthFactor: a,
      stepInterval: l
    } = this.props;
    return t ? { paths: t } : n === Xr.Points ? { paths: () => null } : n != null ? {
      paths: (s, u, c, d) => CB({
        drawStyle: n,
        lineInterpolation: o,
        barAlignment: i,
        barMaxWidth: r,
        barWidthFactor: a,
        stepInterval: l
      })(s, u, c, d)
    } : {};
  }
  resolvePointsShow() {
    const { pointsBuilder: t, drawStyle: n, showPoints: o } = this.props;
    return t || (n === Xr.Points ? !0 : !!o);
  }
  shouldApplyIsolatedPointFilter(t) {
    const { drawStyle: n, pointsFilter: o } = this.props;
    return n === Xr.Lines && !o && !t;
  }
  buildPointsConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, pointSize: o, pointsFilter: i } = this.props, r = o ?? (n ?? Ww) * wB, a = {
      stroke: t,
      fill: t,
      size: r,
      filter: i || void 0,
      show: this.resolvePointsShow()
    };
    return this.shouldApplyIsolatedPointFilter(a.show) && (a.filter = xB), a;
  }
  getConfig() {
    const { scaleKey: t, label: n, spanGaps: o, show: i = !0, metric: r } = this.props, a = this.getLineColor(), l = this.buildLineConfig({ resolvedLineColor: a }), s = this.buildPathConfig(), u = this.buildPointsConfig({ resolvedLineColor: a });
    return {
      scale: t,
      label: n,
      spanGaps: typeof o == "number" ? !1 : o ?? !0,
      value: () => "",
      pxAlign: !0,
      show: i,
      metric: r,
      ...l,
      ...s,
      points: Object.keys(u).length > 0 ? u : void 0
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
function CB({
  drawStyle: e,
  lineInterpolation: t,
  barAlignment: n = VO.Center,
  barWidthFactor: o = 0.6,
  barMaxWidth: i = 200,
  stepInterval: r
}) {
  if (!ri)
    throw new Error("Required uPlot path builders are not available");
  if (e === Xr.Bars || e === Xr.Histogram) {
    const a = xo.paths;
    return $B({ pathBuilders: a, barAlignment: n, barWidthFactor: o, barMaxWidth: i, stepInterval: r });
  }
  if (e === Xr.Lines) {
    if (t === Uf.StepBefore)
      return ri.stepBefore;
    if (t === Uf.StepAfter)
      return ri.stepAfter;
    if (t === Uf.Linear)
      return ri.linear;
  }
  return ri.spline;
}
function $B({
  pathBuilders: e,
  barAlignment: t,
  barWidthFactor: n,
  barMaxWidth: o,
  stepInterval: i
}) {
  if (!ri)
    throw new Error("Required uPlot path builders are not available");
  const r = e.bars;
  if (typeof i == "number" && i > 0 && r)
    return (l, s, u, c) => {
      let d = o;
      const f = KO({
        uPlotInstance: l,
        stepInterval: i
      });
      f > 0 && (d = Math.min(d, f));
      const p = `bars|${t}|${n}|${d}`;
      return ri && !ri[p] && (ri[p] = r({
        size: [n, d],
        align: t
      })), ri?.[p]?.(l, s, u, c) ?? null;
    };
  const a = `bars|${t}|${n}|${o}`;
  return !ri[a] && r && (ri[a] = r({
    size: [n, o],
    align: t
  })), ri[a];
}
class Ik extends gh {
  series = [];
  selectionPreferencesSource = am.IN_MEMORY;
  shouldSaveSelectionPreference = !1;
  axes = {};
  stepInterval;
  scales = [];
  bands = [];
  cursor;
  hooks = {};
  plugins = [];
  padding;
  legend;
  focus;
  select;
  thresholds = {};
  tzDate;
  id;
  onDragSelect;
  constructor(t) {
    super(t);
    const {
      id: n,
      onDragSelect: o,
      tzDate: i,
      selectionPreferencesSource: r,
      shouldSaveSelectionPreference: a,
      stepInterval: l
    } = t ?? {};
    this.id = n, i && (this.tzDate = i), r && (this.selectionPreferencesSource = r), a && (this.shouldSaveSelectionPreference = a), 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 Jz(t);
  }
  addScale(t) {
    const n = this.scales.find((o) => o.props.scaleKey === t.scaleKey);
    if (n) {
      n.merge?.(t);
      return;
    }
    this.scales.push(new gB(t));
  }
  addSeries(t) {
    this.series.push(new SB(t));
  }
  getSeriesSpanGapsOptions() {
    return this.series.map((t) => {
      const { spanGaps: n } = t.props;
      return { spanGaps: n };
    });
  }
  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);
  }
  addThresholds(t) {
    this.thresholds[t.scaleKey] || (this.thresholds[t.scaleKey] = t, this.addHook("draw", r4(t)));
  }
  setBands(t) {
    this.bands = t;
  }
  setCursor(t) {
    this.cursor = zx({}, 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;
  }
  getCursorConfig() {
    const t = {
      ...Tg,
      hover: {
        ...Tg.hover,
        prox: this.stepInterval ? (n) => KO({
          uPlotInstance: n,
          stepInterval: this.stepInterval ?? 0
        }) * n4 : jO
      }
    };
    return zx({}, Tg, t, this.cursor);
  }
  getStoredVisibility() {
    return this.id && this.selectionPreferencesSource === am.LOCAL_STORAGE ? a4(this.id) : null;
  }
  getVisibilityResolutionState() {
    const t = this.getStoredVisibility();
    if (!t || t.length === 0)
      return {
        visibleStoredLabels: /* @__PURE__ */ new Set(),
        hiddenStoredLabels: /* @__PURE__ */ new Set(),
        hasActivePreference: !1
      };
    const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
    let i = !1, r = !1;
    for (const { label: d, show: f } of t)
      f ? (i = !0, n.add(d), o.has(d) && o.delete(d)) : (r = !0, n.has(d) || o.add(d));
    const a = i && r, l = this.series.map(
      (d) => d.getConfig().label ?? ""
    ), s = n.size > 0 && l.some((d) => n.has(d)), u = a && s;
    return !a || u ? { visibleStoredLabels: n, hiddenStoredLabels: o, hasActivePreference: u } : {
      visibleStoredLabels: /* @__PURE__ */ new Set(),
      hiddenStoredLabels: /* @__PURE__ */ new Set(),
      hasActivePreference: u
    };
  }
  getLegendItems() {
    const { visibleStoredLabels: t, hiddenStoredLabels: n, hasActivePreference: o } = this.getVisibilityResolutionState();
    return this.series.reduce(
      (i, r, a) => {
        const l = r.getConfig(), s = l.label ?? "", u = a + 1, c = Jx({
          seriesShow: l.show,
          seriesLabel: s,
          visibleStoredLabels: t,
          hiddenStoredLabels: n,
          hasActivePreference: o
        });
        return i[u] = {
          seriesIndex: u,
          color: l.stroke ?? "#ccc",
          label: s,
          show: c,
          yAxis: 1
        }, i;
      },
      {}
    );
  }
  getConfig() {
    const t = { ...o4 }, { visibleStoredLabels: n, hiddenStoredLabels: o, hasActivePreference: i } = this.getVisibilityResolutionState();
    return t.series = [
      { value: () => "", label: "Timestamp" },
      ...this.series.map((r) => {
        const a = r.getConfig(), l = Jx({
          seriesShow: a.show,
          seriesLabel: a.label ?? "",
          visibleStoredLabels: n,
          hiddenStoredLabels: o,
          hasActivePreference: i
        });
        return { ...a, show: l };
      })
    ], t.axes = Object.values(this.axes).map((r) => r.getConfig()), t.scales = this.scales.reduce(
      (r, a) => ({ ...r, ...a.getConfig() }),
      {}
    ), t.hooks = this.hooks, t.select = this.select, t.cursor = this.getCursorConfig(), t.tzDate = this.tzDate, t.plugins = this.plugins.length > 0 ? this.plugins : void 0, t.bands = this.bands.length > 0 ? this.bands : void 0, Array.isArray(this.padding) && (t.padding = this.padding), this.legend && (t.legend = this.legend), this.focus && (t.focus = this.focus), t;
  }
}
function Kw(e, t) {
  return t.some(
    ({ spanGaps: n }) => typeof n == "number" && n > 0 && e > n
  );
}
function PB(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 r = o, a = r.length;
  let l = 0;
  for (let f = 0; f < a - 1; f += 1)
    Kw(r[f + 1] - r[f], t) && (l += 1);
  if (l === 0)
    return e;
  const s = a + l, u = Array.from({ length: s }), c = i.map(
    () => Array.from({ length: s })
  );
  let d = 0;
  for (let f = 0; f < a; f += 1) {
    u[d] = r[f];
    for (const [p, v] of i.entries())
      c[p][d] = v[f];
    if (d += 1, f < a - 1 && Kw(r[f + 1] - r[f], t)) {
      u[d] = r[f] + Math.max(1, Math.floor((r[f + 1] - r[f]) / 2));
      for (let p = 0; p < i.length; p += 1)
        c[p][d] = null;
      d += 1;
    }
  }
  return [u, ...c];
}
function OB(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...i] = n;
  if (!Array.isArray(o) || i.length === 0)
    return n;
  const a = t.some(({ spanGaps: d }) => typeof d == "number") ? PB(n, t) : n;
  if (!t.some(({ spanGaps: d }) => d === !0))
    return a;
  const [s, ...u] = a, c = u.map((d, f) => {
    const { spanGaps: p } = t[f] ?? {};
    return p !== !0 ? d : d.map(
      (v) => v === null ? void 0 : v
    );
  });
  return [s, ...c];
}
const Mk = /\{\{(\w+)(?::(\w+))?\}\}/g;
function kB(e, t) {
  if (typeof e == "number")
    return String(e);
  const n = Array.isArray(e) ? e : [e];
  switch (t) {
    case "csv":
      return n.join(",");
    case "sql":
      return n.map((o) => `'${o.replaceAll("'", "''")}'`).join(",");
    case "pipe":
      return n.join("|");
    case "single":
    default:
      return n[0] ?? "";
  }
}
function nu(e, t) {
  return e.replaceAll(Mk, (n, o, i) => {
    const r = t[o];
    return r == null ? n : kB(r, i || "single");
  });
}
function IB(e) {
  const t = /* @__PURE__ */ new Set();
  let n;
  const o = new RegExp(Mk.source, "g");
  for (; (n = o.exec(e)) !== null; )
    t.add(n[1]);
  return Array.from(t);
}
class MB {
  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 r = this.nodes.get(i);
      r && (r.dependents = r.dependents.filter((a) => a !== n));
    }
    o.dependsOn = [], t.query && (o.dependsOn = IB(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((r) => r !== t));
      }
      for (const o of n.dependents) {
        const i = this.nodes.get(o);
        i && (i.dependsOn = i.dependsOn.filter((r) => r !== t));
      }
      this.nodes.delete(t);
    }
  }
  getDependents(t) {
    return this.nodes.get(t)?.dependents ?? [];
  }
  getAllDependents(t) {
    const n = /* @__PURE__ */ new Set(), o = [], i = (r) => {
      if (n.has(r))
        return;
      n.add(r);
      const a = this.getDependents(r);
      for (const l of a)
        o.push(l), i(l);
    };
    return i(t), o;
  }
  detectCycle() {
    const i = /* @__PURE__ */ new Map(), r = [];
    for (const l of this.nodes.keys())
      i.set(l, 0);
    const a = (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 r.push(u, l), !0;
          if (c === 0 && a(u))
            return r.push(l), !0;
        }
      return i.set(l, 2), !1;
    };
    for (const l of this.nodes.keys())
      if (i.get(l) === 0 && a(l))
        return r.reverse();
    return null;
  }
  topologicalSort() {
    const t = /* @__PURE__ */ new Set(), n = [], o = (i) => {
      if (t.has(i))
        return;
      t.add(i);
      const r = this.nodes.get(i);
      if (r)
        for (const a of r.dependsOn)
          o(a);
      n.push(i);
    };
    for (const i of this.nodes.keys())
      o(i);
    return n;
  }
  clear() {
    this.nodes.clear();
  }
}
function TB(e, t, n, o) {
  const i = /* @__PURE__ */ new Map();
  for (const l of e) {
    const s = Number(l.clock), u = Math.round(s / o) * o, c = Number.parseFloat(l.value);
    i.set(u, Number.isNaN(c) ? null : c);
  }
  const r = [], a = Math.ceil(t / o) * o;
  for (let l = a; l <= n; l += o)
    r.push({ ts: l * 1e3, value: i.get(l) ?? null });
  return r;
}
function _B(e, t) {
  return e.map((n) => n === null ? null : n * t);
}
function EB(e, t) {
  return e.map((n) => n === null ? null : n + t);
}
function DB(e) {
  return e.map((t, n) => {
    if (n === 0)
      return 0;
    const o = e[n - 1];
    return t === null || o === null ? null : t - o;
  });
}
function AB(e, t) {
  return e.map((n, o) => {
    if (o === 0)
      return 0;
    const i = e[o - 1];
    if (n === null || i === null)
      return null;
    const r = t[o] - t[o - 1];
    return r > 0 ? (n - i) / r : 0;
  });
}
function RB(e, t) {
  return e.map((n, o) => {
    const i = Math.max(0, o - t + 1), r = e.slice(i, o + 1).filter((a) => a !== null);
    return r.length === 0 ? null : r.reduce((a, l) => a + l, 0) / r.length;
  });
}
function NB(e, t) {
  const n = [];
  let o = null;
  for (const i of e)
    if (i === null)
      n.push(null);
    else if (o === null)
      n.push(i), o = i;
    else {
      const r = t * i + (1 - t) * o;
      n.push(r), o = r;
    }
  return n;
}
function zB(e, t) {
  return e.map((n) => n !== null && n > t ? Number.NaN : n);
}
function BB(e, t) {
  return e.map((n) => n !== null && n < t ? Number.NaN : n);
}
function FB(e, t) {
  return e.map((n) => n === null || Number.isNaN(n) ? t : n);
}
function LB(e) {
  if (e.length === 0)
    return e;
  const t = e[0].values.length;
  return [{ label: "sumSeries", values: Array.from({ length: t }, (o, i) => e.every((a) => a.values[i] === null) ? null : e.reduce((a, l) => a + (l.values[i] ?? 0), 0)) }];
}
function HB(e, t, n) {
  return e.map((i) => {
    const r = i.values.filter((l) => l !== null && !Number.isNaN(l));
    let a = 0;
    return n === "max" ? a = r.reduce((l, s) => Math.max(l, s), -1 / 0) : n === "min" ? a = r.reduce((l, s) => Math.min(l, s), 1 / 0) : a = r.reduce((l, s) => l + s, 0) / (r.length || 1), { s: i, score: a };
  }).sort((i, r) => r.score - i.score).slice(0, t).map((i) => i.s);
}
function VB(e, t, n) {
  return e.map((i) => {
    const r = i.values.filter((l) => l !== null && !Number.isNaN(l));
    let a = 0;
    return n === "max" ? a = r.reduce((l, s) => Math.max(l, s), -1 / 0) : n === "min" ? a = r.reduce((l, s) => Math.min(l, s), 1 / 0) : a = r.reduce((l, s) => l + s, 0) / (r.length || 1), { s: i, score: a };
  }).sort((i, r) => i.score - r.score).slice(0, t).map((i) => i.s);
}
function jB(e, t) {
  if (!t || t.length === 0)
    return e;
  const { timestamps: n, series: o } = e;
  let i = o;
  for (const r of t) {
    const a = r.def.name, l = r.params;
    switch (a) {
      case "scale":
        i = i.map((s) => ({ ...s, values: _B(s.values, Number(l[0])) }));
        break;
      case "offset":
        i = i.map((s) => ({ ...s, values: EB(s.values, Number(l[0])) }));
        break;
      case "delta":
        i = i.map((s) => ({ ...s, values: DB(s.values) }));
        break;
      case "rate":
        i = i.map((s) => ({ ...s, values: AB(s.values, n) }));
        break;
      case "movingAverage":
        i = i.map((s) => ({ ...s, values: RB(s.values, Number(l[0])) }));
        break;
      case "exponentialMovingAverage":
        i = i.map((s) => ({ ...s, values: NB(s.values, Number(l[0])) }));
        break;
      case "removeAboveValue":
        i = i.map((s) => ({ ...s, values: zB(s.values, Number(l[0])) }));
        break;
      case "removeBelowValue":
        i = i.map((s) => ({ ...s, values: BB(s.values, Number(l[0])) }));
        break;
      case "transformNull":
        i = i.map((s) => ({ ...s, values: FB(s.values, Number(l[0])) }));
        break;
      case "sumSeries":
        i = LB(i);
        break;
      case "top":
        i = HB(i, Number(l[0]), String(l[1] ?? "avg"));
        break;
      case "bottom":
        i = VB(i, Number(l[0]), String(l[1] ?? "avg"));
        break;
      case "setAlias":
        i = i.map((s) => ({ ...s, label: String(l[0] ?? "") }));
        break;
      case "replaceAlias":
        i = i.map((s) => ({ ...s, label: s.label.replace(new RegExp(String(l[0] ?? "")), String(l[1] ?? "")) }));
        break;
    }
  }
  return { timestamps: n, series: i };
}
function WB(e, t, n, o) {
  const i = t[0], r = (e.get(i?.itemid ?? "") ?? []).map((l) => l.ts), a = new sz({ name: "zabbix", refId: o, fields: [] });
  a.addField({ name: "Time", type: ho.time, values: r });
  for (const l of t) {
    const u = (e.get(l.itemid) ?? []).map((d) => d.value), c = l.valuemapid ? n.get(l.valuemapid) : void 0;
    a.addField({
      name: l.name.replace(/^[\s:]+/, "").trim(),
      type: ho.number,
      values: u,
      labels: { host: l.hostid, item_key: l.key_ },
      config: {
        unit: l.units || void 0,
        displayNameFromDS: l.name.replace(/^[\s:]+/, "").trim(),
        ...c ? {
          mappings: [{
            type: 1,
            // MappingType.ValueToText
            options: Object.fromEntries(
              Object.entries(c).map(([d, f], p) => [d, { text: f, index: p }])
            )
          }]
        } : {}
      }
    });
  }
  return a;
}
let KB = 1;
async function tr(e, t, n) {
  const { url: o, token: i } = n, r = {
    jsonrpc: "2.0",
    method: e,
    params: t,
    auth: i,
    id: KB++
  }, a = await fetch(`${o}?_m=${e}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(r)
  });
  if (!a.ok)
    throw new Error(`Zabbix API HTTP error: ${a.status}`);
  const l = await a.json();
  if (l.error)
    throw new Error(`Zabbix API error [${l.error.code}]: ${l.error.data}`);
  return l.result;
}
function qB(e) {
  return tr(
    "hostgroup.get",
    {
      output: ["groupid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
function YB(e, t, n) {
  return tr(
    "host.get",
    {
      output: ["hostid", "host", "name"],
      ...e?.length ? { groupids: e } : {},
      sortfield: "name",
      limit: 200
    },
    n
  );
}
function Tk(e, t, n, o, i) {
  const r = i ? UB(i) : void 0;
  return tr(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      selectTags: "extend",
      hostids: e,
      filter: { value_type: ["0", "3"] },
      ...r ? { tags: [r], evaltype: 0 } : {},
      sortfield: "name",
      limit: 500
    },
    o
  );
}
function GB(e, t) {
  return tr(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      itemids: e,
      sortfield: "name"
    },
    t
  );
}
function UB(e) {
  const t = e.indexOf(":");
  return t > 0 ? { tag: e.slice(0, t).trim(), value: e.slice(t + 1).trim(), operator: 0 } : { tag: e.trim(), value: "", operator: 2 };
}
function XB(e) {
  return e.value ? `${e.tag}: ${e.value}` : e.tag;
}
function QB(e, t, n) {
  return tr(
    "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 ZB(e, t) {
  return tr(
    "usermacro.get",
    {
      output: ["hostmacroid", "macro", "value"],
      ...e?.length ? { hostids: e } : {},
      sortfield: "macro",
      limit: 200
    },
    t
  );
}
function JB(e) {
  return tr(
    "service.get",
    {
      output: ["serviceid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
async function eF(e, t, n, o) {
  return (n - t) / 86400 <= 7 ? tr(
    "history.get",
    {
      output: "extend",
      itemids: e,
      history: 0,
      time_from: t,
      time_till: n,
      sortfield: "clock",
      sortorder: "ASC",
      limit: 1e4
    },
    o
  ) : (await tr(
    "trend.get",
    {
      output: "extend",
      itemids: e,
      time_from: t,
      time_till: n,
      sortfield: "clock",
      sortorder: "ASC",
      limit: 1e4
    },
    o
  )).map((a) => ({
    itemid: a.itemid,
    clock: a.clock,
    value: a.value_avg,
    ns: "0"
  }));
}
function tF(e) {
  return tr(
    "valuemap.get",
    {
      output: "extend",
      selectMappings: "extend"
    },
    e
  );
}
function nF(e, t) {
  return tr(
    "discoveryrule.get",
    {
      output: ["itemid", "hostid", "name", "key_"],
      hostids: e,
      sortfield: "name",
      limit: 200
    },
    t
  );
}
function oF(e, t) {
  return tr(
    "itemprototype.get",
    {
      output: ["itemid", "name", "key_"],
      discoveryids: [e],
      sortfield: "name"
    },
    t
  );
}
function iF(e, t) {
  const n = new Map(t.map((o) => [o, []]));
  for (const o of e)
    n.get(o.itemid)?.push(o);
  return n;
}
function rF(e, t) {
  if (e.length === 0)
    return 0;
  switch (t) {
    case "avg":
      return e.reduce((n, o) => n + o, 0) / e.length;
    case "sum":
      return e.reduce((n, o) => n + o, 0);
    case "min":
      return e.reduce((n, o) => Math.min(n, o), 1 / 0);
    case "max":
      return e.reduce((n, o) => Math.max(n, o), -1 / 0);
    case "count":
      return e.length;
    case "median": {
      const n = [...e].sort((o, i) => o - i);
      return n[Math.floor(n.length / 2)];
    }
  }
}
function aF(e, t, n = "avg") {
  if (e.length === 0)
    return [];
  const o = t / 1e3, i = /* @__PURE__ */ new Map();
  for (const a of e) {
    const l = Math.floor(Number(a.clock) / o) * o, s = i.get(l);
    s ? s.push(Number(a.value)) : i.set(l, [Number(a.value)]);
  }
  const r = e[0].itemid;
  return Array.from(i.entries()).sort(([a], [l]) => a - l).map(([a, l]) => ({
    itemid: r,
    clock: String(a),
    value: String(rF(l, n)),
    ns: "0"
  }));
}
const lF = [
  "Transform",
  "Aggregate",
  "Filter",
  "Trends",
  "Time",
  "Alias",
  "Special"
], qw = [
  // 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"] }
], sF = /^\$(\w+)$/;
function Bg(e, t, n) {
  if (!e)
    return [];
  const o = sF.exec(e);
  if (!o)
    return [e];
  const i = o[1], r = t[i];
  if (r == null)
    return [e];
  const a = (Array.isArray(r) ? r : [r]).map(String);
  return a.includes("$__all") ? n[i] ?? [] : a.filter(Boolean);
}
function uF(e, t, n) {
  const o = {};
  for (const i of Object.values(n))
    o[i.config.name] = i.options.map((r) => r.value).filter((r) => r !== "$__all");
  return {
    ...e,
    hostIds: Bg(e.hostId, t, o),
    groupIds: Bg(e.groupId, t, o),
    lldRuleIds: Bg(e.lldRuleId, t, o),
    itemTagsFilter: nu(e.itemTagsFilter ?? "", t),
    triggerFilter: nu(e.triggerFilter ?? "", t),
    tagsFilter: nu(e.tagsFilter ?? "", t),
    itemids: nu(e.itemids ?? "", t),
    itServiceFilter: nu(e.itServiceFilter ?? "", t),
    macroFilter: nu(e.macroFilter ?? "", t)
  };
}
const ou = new MB();
function cF(e) {
  return e.split(",").map((t) => t.trim()).filter(Boolean).map((t) => ({ value: t, label: t }));
}
function dF(e) {
  return e.map((t) => ({ value: t.value, label: t.text || t.value }));
}
function fF(e, t, n) {
  if (t) {
    const o = e ?? n[0]?.value ?? "";
    return o ? [o] : [];
  }
  return e ?? n[0]?.value ?? "";
}
function pF(e, t) {
  return [{ value: t || "$__all", label: "$__all" }, ...e];
}
function hF(e, t, n) {
  switch (e.type) {
    case "custom": {
      if (e.customOptions && e.customOptions.length > 0)
        return Promise.resolve(dF(e.customOptions));
      const o = e.customValues ?? "";
      return Promise.resolve(cF(o));
    }
    case "query": {
      if (!t || !e.query)
        return Promise.resolve([]);
      const o = gF(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 gF(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 Is = Jb("variable", () => {
  const e = le({}), t = le(null);
  function n(p) {
    t.value = p;
  }
  function o(p) {
    e.value[p.id] || (ou.addVariable(p), e.value[p.id] = $n({
      config: p,
      options: [],
      current: "",
      loading: !1,
      error: null
    }), l(p.id));
  }
  function i(p) {
    const v = e.value[p];
    v && (ou.removeVariable(v.config.name), delete e.value[p]);
  }
  function r(p, v) {
    const g = e.value[p];
    g && (g.config = { ...g.config, ...v }, ("name" in v || "query" in v) && ou.addVariable(g.config), l(p));
  }
  function a(p, v) {
    const g = e.value[p];
    g && (g.current = v);
  }
  async function l(p) {
    const v = e.value[p];
    if (v) {
      v.loading = !0, v.error = null;
      try {
        const g = u(), m = await hF(v.config, t.value, g);
        v.options = v.config.includeAll ? pF(m, v.config.allValue) : m;
        const x = Array.isArray(v.current) ? v.current[0] : v.current;
        (!x || !v.options.some((S) => S.value === x)) && (v.current = fF(v.config.defaultValue, v.config.multi, v.options));
      } catch (g) {
        v.error = g?.message ?? String(g);
      } finally {
        v.loading = !1;
      }
    }
  }
  async function s() {
    const p = ou.topologicalSort();
    for (const v of p) {
      const g = Object.values(e.value).find((m) => m.config.name === v);
      g && await l(g.config.id);
    }
  }
  function u() {
    const p = {};
    for (const v of Object.values(e.value)) {
      const { name: g } = v.config;
      Array.isArray(v.current) ? p[g] = v.current.length === 1 ? v.current[0] : v.current : p[g] = v.current;
    }
    return p;
  }
  function c(p) {
    return Object.values(e.value).find((v) => v.config.name === p);
  }
  function d(p) {
    return ou.getAllDependents(p);
  }
  function f() {
    return ou.detectCycle();
  }
  return {
    variables: e,
    optionsResolver: t,
    setOptionsResolver: n,
    addVariable: o,
    removeVariable: i,
    updateVariable: r,
    setValue: a,
    refreshVariable: l,
    refreshAll: s,
    resolveAll: u,
    getVariable: c,
    getDependents: d,
    detectCycle: f
  };
});
function vF() {
  const e = Date.now();
  return { from: e - 3600 * 1e3, to: e };
}
const aa = Jb("dashboard", () => {
  const e = LO(), t = le(""), n = le(e.panels), o = le(e.layouts), i = le(!1), r = le(null), a = le(!1), l = le(vF()), s = le(0), u = le(null), c = le(!1), d = le({});
  function f(B) {
    const A = rm(), G = FO(B, { id: A }), j = o.value.reduce((W, K) => Math.max(W, K.y + K.h), 0), Z = {
      i: A,
      x: 0,
      y: j,
      w: B === "stat" || B === "gauge" ? 3 : B === "table" ? 12 : 6,
      h: B === "stat" || B === "gauge" ? 4 : B === "table" ? 10 : 8,
      minH: B === "stat" || B === "gauge" ? 3 : 6
    };
    n.value[A] = G, o.value = [...o.value, Z], r.value = A, a.value = !1, c.value = !0;
  }
  function p(B) {
    const { [B]: A, ...G } = n.value;
    n.value = G, o.value = o.value.filter((j) => j.i !== B), r.value === B && (r.value = null), c.value = !0;
  }
  function v(B) {
    const A = n.value[B];
    if (!A)
      return;
    const G = rm(), j = { ...A, id: G, title: `${A.title} (copy)` }, Z = o.value.find((K) => K.i === B), W = o.value.reduce((K, q) => Math.max(K, q.y + q.h), 0);
    n.value[G] = j, o.value = [
      ...o.value,
      {
        i: G,
        x: Z?.x ?? 0,
        y: W,
        w: Z?.w ?? 6,
        h: Z?.h ?? 8,
        minH: Z?.minH
      }
    ], c.value = !0;
  }
  function g(B, A) {
    const G = n.value[B];
    G && (n.value[B] = { ...G, ...A }, c.value = !0);
  }
  function m() {
    n.value = {}, o.value = [], r.value = null, c.value = !0;
  }
  function x(B) {
    o.value = B;
  }
  function S() {
    u.value = {
      title: t.value,
      panels: { ...n.value },
      layouts: [...o.value]
    }, i.value = !0, c.value = !1;
  }
  function C(B) {
    B && B(H()), i.value = !1, u.value = null, c.value = !1;
  }
  function P() {
    const B = u.value;
    B && (t.value = B.title, n.value = B.panels, o.value = B.layouts), i.value = !1, u.value = null, c.value = !1;
  }
  function $() {
    i.value ? P() : S();
  }
  function I(B) {
    i.value = B;
  }
  function w(B) {
    r.value = B;
  }
  function M(B) {
    l.value = B;
  }
  function _(B) {
    s.value = B;
  }
  function N() {
    for (const B of Object.keys(n.value))
      d.value[B] = (d.value[B] ?? 0) + 1;
  }
  function R(B) {
    d.value[B] = (d.value[B] ?? 0) + 1;
  }
  function H() {
    const B = Is(), A = Object.values(B.variables).map((j) => j.config), G = {
      title: t.value,
      panels: n.value,
      layouts: o.value,
      variables: A
    };
    return JSON.stringify(G, null, 2);
  }
  function L(B) {
    try {
      const A = JSON.parse(B);
      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 G = Is();
        for (const j of Object.keys(G.variables))
          G.removeVariable(j);
        for (const j of A.variables) {
          const Z = {
            ...j,
            hide: j.showOnDashboard === "nothing" || !!j.hideFromVariableList
          };
          G.addVariable(Z);
        }
      }
      return !!(A.panels && A.layouts);
    } catch {
      return !1;
    }
  }
  return {
    title: t,
    panels: n,
    layouts: o,
    isEditing: i,
    editingPanelId: r,
    addPanelModalOpen: a,
    timeRange: l,
    autoRefresh: s,
    _editSnapshot: u,
    isDirty: c,
    panelRefreshKeys: d,
    addPanel: f,
    removePanel: p,
    clonePanel: v,
    updatePanel: g,
    clearPanels: m,
    setLayouts: x,
    startEditing: S,
    confirmSave: C,
    discardChanges: P,
    setEditingPanel: w,
    toggleEditing: $,
    setEditing: I,
    setTimeRange: M,
    setAutoRefresh: _,
    refresh: N,
    refreshPanel: R,
    exportJSON: H,
    importJSON: L
  };
}), ta = Jb("theme", () => {
  const e = le(
    (typeof localStorage < "u" ? localStorage.getItem("argus-theme") : null) || "dark"
  ), t = E(() => 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 hd(e) {
  "@babel/helpers - typeof";
  return hd = 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;
  }, hd(e);
}
function mF(e, t) {
  if (hd(e) != "object" || !e) return e;
  var n = e[Symbol.toPrimitive];
  if (n !== void 0) {
    var o = n.call(e, t);
    if (hd(o) != "object") return o;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (t === "string" ? String : Number)(e);
}
function bF(e) {
  var t = mF(e, "string");
  return hd(t) == "symbol" ? t : t + "";
}
function yF(e, t, n) {
  return (t = bF(t)) in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function Yw(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 Q(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Yw(Object(n), !0).forEach(function(o) {
      yF(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Yw(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function O() {
  return O = 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;
  }, O.apply(null, arguments);
}
const xF = (e) => typeof e == "function", wF = Array.isArray, SF = (e) => typeof e == "string", CF = (e) => e !== null && typeof e == "object", $F = /^on[^a-z]/, PF = (e) => $F.test(e), zy = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (n) => t[n] || (t[n] = e(n));
}, OF = /-(\w)/g, _d = zy((e) => e.replace(OF, (t, n) => n ? n.toUpperCase() : "")), kF = /\B([A-Z])/g, IF = zy((e) => e.replace(kF, "-$1").toLowerCase()), MF = zy((e) => e.charAt(0).toUpperCase() + e.slice(1)), TF = Object.prototype.hasOwnProperty, Gw = (e, t) => TF.call(e, t);
function _F(e, t, n, o) {
  const i = e[n];
  if (i != null) {
    const r = Gw(i, "default");
    if (r && o === void 0) {
      const a = i.default;
      o = i.type !== Function && xF(a) ? a() : a;
    }
    i.type === Boolean && (!Gw(t, n) && !r ? o = !1 : o === "" && (o = !0));
  }
  return o;
}
function EF(e) {
  return Object.keys(e).reduce((t, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (t[n] = e[n]), t), {});
}
function cs(e) {
  return typeof e == "number" ? `${e}px` : e;
}
function Su(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 DF(e) {
  let t;
  const n = new Promise((i) => {
    t = e(() => {
      i(!0);
    });
  }), o = () => {
    t?.();
  };
  return o.then = (i, r) => n.then(i, r), o.promise = n, o;
}
function _e() {
  const e = [];
  for (let t = 0; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    if (n) {
      if (SF(n))
        e.push(n);
      else if (wF(n))
        for (let o = 0; o < n.length; o++) {
          const i = _e(n[o]);
          i && e.push(i);
        }
      else if (CF(n))
        for (const o in n)
          n[o] && e.push(o);
    }
  }
  return e.join(" ");
}
var _k = (function() {
  if (typeof Map < "u")
    return Map;
  function e(t, n) {
    var o = -1;
    return t.some(function(i, r) {
      return i[0] === n ? (o = r, !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, r = this.__entries__; i < r.length; i++) {
          var a = r[i];
          n.call(o, a[1], a[0]);
        }
      }, t;
    })()
  );
})(), bm = typeof window < "u" && typeof document < "u" && window.document === document, Ip = (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")();
})(), AF = (function() {
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Ip) : function(e) {
    return setTimeout(function() {
      return e(Date.now());
    }, 1e3 / 60);
  };
})(), RF = 2;
function NF(e, t) {
  var n = !1, o = !1, i = 0;
  function r() {
    n && (n = !1, e()), o && l();
  }
  function a() {
    AF(r);
  }
  function l() {
    var s = Date.now();
    if (n) {
      if (s - i < RF)
        return;
      o = !0;
    } else
      n = !0, o = !1, setTimeout(a, t);
    i = s;
  }
  return l;
}
var zF = 20, BF = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], FF = typeof MutationObserver < "u", LF = (
  /** @class */
  (function() {
    function e() {
      this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = NF(this.refresh.bind(this), zF);
    }
    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() {
      !bm || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), FF ? (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() {
      !bm || !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 = BF.some(function(r) {
        return !!~o.indexOf(r);
      });
      i && this.refresh();
    }, e.getInstance = function() {
      return this.instance_ || (this.instance_ = new e()), this.instance_;
    }, e.instance_ = null, e;
  })()
), Ek = (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;
}), Wu = (function(e) {
  var t = e && e.ownerDocument && e.ownerDocument.defaultView;
  return t || Ip;
}), Dk = Ch(0, 0, 0, 0);
function Mp(e) {
  return parseFloat(e) || 0;
}
function Uw(e) {
  for (var t = [], n = 1; n < arguments.length; n++)
    t[n - 1] = arguments[n];
  return t.reduce(function(o, i) {
    var r = e["border-" + i + "-width"];
    return o + Mp(r);
  }, 0);
}
function HF(e) {
  for (var t = ["top", "right", "bottom", "left"], n = {}, o = 0, i = t; o < i.length; o++) {
    var r = i[o], a = e["padding-" + r];
    n[r] = Mp(a);
  }
  return n;
}
function VF(e) {
  var t = e.getBBox();
  return Ch(0, 0, t.width, t.height);
}
function jF(e) {
  var t = e.clientWidth, n = e.clientHeight;
  if (!t && !n)
    return Dk;
  var o = Wu(e).getComputedStyle(e), i = HF(o), r = i.left + i.right, a = i.top + i.bottom, l = Mp(o.width), s = Mp(o.height);
  if (o.boxSizing === "border-box" && (Math.round(l + r) !== t && (l -= Uw(o, "left", "right") + r), Math.round(s + a) !== n && (s -= Uw(o, "top", "bottom") + a)), !KF(e)) {
    var u = Math.round(l + r) - t, c = Math.round(s + a) - n;
    Math.abs(u) !== 1 && (l -= u), Math.abs(c) !== 1 && (s -= c);
  }
  return Ch(i.left, i.top, l, s);
}
var WF = /* @__PURE__ */ (function() {
  return typeof SVGGraphicsElement < "u" ? function(e) {
    return e instanceof Wu(e).SVGGraphicsElement;
  } : function(e) {
    return e instanceof Wu(e).SVGElement && typeof e.getBBox == "function";
  };
})();
function KF(e) {
  return e === Wu(e).document.documentElement;
}
function qF(e) {
  return bm ? WF(e) ? VF(e) : jF(e) : Dk;
}
function YF(e) {
  var t = e.x, n = e.y, o = e.width, i = e.height, r = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, a = Object.create(r.prototype);
  return Ek(a, {
    x: t,
    y: n,
    width: o,
    height: i,
    top: n,
    right: t + o,
    bottom: i + n,
    left: t
  }), a;
}
function Ch(e, t, n, o) {
  return { x: e, y: t, width: n, height: o };
}
var GF = (
  /** @class */
  (function() {
    function e(t) {
      this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Ch(0, 0, 0, 0), this.target = t;
    }
    return e.prototype.isActive = function() {
      var t = qF(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;
  })()
), UF = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t, n) {
      var o = YF(n);
      Ek(this, { target: t, contentRect: o });
    }
    return e;
  })()
), XF = (
  /** @class */
  (function() {
    function e(t, n, o) {
      if (this.activeObservations_ = [], this.observations_ = new _k(), 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 Wu(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) || (n.set(t, new GF(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 Wu(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 UF(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;
  })()
), Ak = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new _k(), Rk = (
  /** @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 = LF.getInstance(), o = new XF(t, n, this);
      Ak.set(this, o);
    }
    return e;
  })()
);
[
  "observe",
  "unobserve",
  "disconnect"
].forEach(function(e) {
  Rk.prototype[e] = function() {
    var t;
    return (t = Ak.get(this))[e].apply(t, arguments);
  };
});
var Nk = (function() {
  return typeof Ip.ResizeObserver < "u" ? Ip.ResizeObserver : Rk;
})();
const ym = (e) => e != null && e !== "", _n = (e, t) => {
  const n = O({}, 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;
}, zk = (e) => {
  const t = Object.keys(e), n = {}, o = {}, i = {};
  for (let r = 0, a = t.length; r < a; r++) {
    const l = t[r];
    PF(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
  };
}, QF = 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(r) {
    if (r) {
      const a = r.split(i);
      if (a.length > 1) {
        const l = t ? _d(a[0].trim()) : a[0].trim();
        n[l] = a[1].trim();
      }
    }
  }), n);
}, Ia = (e, t) => e[t] !== void 0, Bk = Symbol("skipFlatten"), go = 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(...go(i, t)) : i && i.type === Je ? i.key === Bk ? o.push(i) : o.push(...go(i.children, t)) : i && ci(i) ? t && !$h(i) ? o.push(i) : t || o.push(i) : ym(i) && o.push(i);
  }), o;
}, Fk = 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 (ci(e))
    return e.type === Je ? t === "default" ? go(e.children) : [] : e.children && e.children[t] ? go(e.children[t](n)) : [];
  {
    const o = e.$slots[t] && e.$slots[t](n);
    return go(o);
  }
}, Qr = (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;
}, ZF = (e) => {
  const t = {};
  if (e.$ && e.$.vnode) {
    const n = e.$.vnode.props || {};
    Object.keys(e.$props).forEach((o) => {
      const i = e.$props[o], r = IF(o);
      (i !== void 0 || r in n) && (t[o] = i);
    });
  } else if (ci(e) && typeof e.type == "object") {
    const n = e.props || {}, o = {};
    Object.keys(n).forEach((r) => {
      o[_d(r)] = n[r];
    });
    const i = e.type.props || {};
    Object.keys(i).forEach((r) => {
      const a = _F(i, o, r, o[r]);
      (a !== void 0 || r in o) && (t[r] = a);
    });
  }
  return t;
}, Lk = 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 r = e[t];
    if (r !== void 0)
      return typeof r == "function" && o ? r(n) : r;
    i = e.$slots[t], i = o && i ? i(n) : i;
  } else if (ci(e)) {
    const r = e.props && e.props[t];
    if (r !== void 0 && e.props !== null)
      return typeof r == "function" && o ? r(n) : r;
    e.type === Je ? i = e.children : e.children && e.children[t] && (i = e.children[t], i = o && i ? i(n) : i);
  }
  return Array.isArray(i) && (i = go(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
};
function Xw() {
  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 = O(O({}, n), e.$attrs) : n = O(O({}, n), e.props), zk(n)[t ? "onEvents" : "events"];
}
function JF(e, t) {
  let o = ((ci(e) ? e.props : e.$attrs) || {}).style || {};
  return typeof o == "string" && (o = QF(o, t)), o;
}
function eL(e) {
  return e.length === 1 && e[0].type === Je;
}
function $h(e) {
  return e && (e.type === MP || e.type === Je && e.children.length === 0 || e.type === Xb && e.children.trim() === "");
}
function Do() {
  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 === Je ? t.push(...Do(n.children)) : t.push(n);
  }), t.filter((n) => !$h(n));
}
function Mc(e) {
  if (e) {
    const t = Do(e);
    return t.length ? t : void 0;
  } else
    return e;
}
function Ao(e) {
  return Array.isArray(e) && e.length === 1 && (e = e[0]), e && e.__v_isVNode && typeof e.type != "symbol";
}
function Ji(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 Al = be({
  compatConfig: {
    MODE: 3
  },
  name: "ResizeObserver",
  props: {
    disabled: Boolean,
    onResize: Function
  },
  emits: ["resize"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $n({
      width: 0,
      height: 0,
      offsetHeight: 0,
      offsetWidth: 0
    });
    let i = null, r = null;
    const a = () => {
      r && (r.disconnect(), r = null);
    }, l = (c) => {
      const {
        onResize: d
      } = e, f = c[0].target, {
        width: p,
        height: v
      } = f.getBoundingClientRect(), {
        offsetWidth: g,
        offsetHeight: m
      } = f, x = Math.floor(p), S = Math.floor(v);
      if (o.width !== x || o.height !== S || o.offsetWidth !== g || o.offsetHeight !== m) {
        const C = {
          width: x,
          height: S,
          offsetWidth: g,
          offsetHeight: m
        };
        O(o, C), d && Promise.resolve().then(() => {
          d(O(O({}, C), {
            offsetWidth: g,
            offsetHeight: m
          }), f);
        });
      }
    }, s = fi(), u = () => {
      const {
        disabled: c
      } = e;
      if (c) {
        a();
        return;
      }
      const d = Qr(s);
      d !== i && (a(), i = d), !r && d && (r = new Nk(l), r.observe(d));
    };
    return At(() => {
      u();
    }), Ya(() => {
      u();
    }), Vo(() => {
      a();
    }), Ie(() => e.disabled, () => {
      u();
    }, {
      flush: "post"
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
let Hk = (e) => setTimeout(e, 16), Vk = (e) => clearTimeout(e);
typeof window < "u" && "requestAnimationFrame" in window && (Hk = (e) => window.requestAnimationFrame(e), Vk = (e) => window.cancelAnimationFrame(e));
let Qw = 0;
const By = /* @__PURE__ */ new Map();
function jk(e) {
  By.delete(e);
}
function Vt(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  Qw += 1;
  const n = Qw;
  function o(i) {
    if (i === 0)
      jk(n), e();
    else {
      const r = Hk(() => {
        o(i - 1);
      });
      By.set(n, r);
    }
  }
  return o(t), n;
}
Vt.cancel = (e) => {
  const t = By.get(e);
  return jk(t), Vk(t);
};
const Mr = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
}, rr = (e) => {
  const t = e;
  return t.install = function(n) {
    n.component(t.displayName || t.name, e);
  }, e;
};
function Ku() {
  return {
    type: [Function, Array]
  };
}
function _t(e) {
  return {
    type: Object,
    default: e
  };
}
function ct(e) {
  return {
    type: Boolean,
    default: e
  };
}
function et(e) {
  return {
    type: Function,
    default: e
  };
}
function Ii(e, t) {
  return {
    validator: () => !0,
    default: e
  };
}
function Fg() {
  return {
    validator: () => !0
  };
}
function Vn(e) {
  return {
    type: Array,
    default: e
  };
}
function rn(e) {
  return {
    type: String,
    default: e
  };
}
function en(e, t) {
  return e ? {
    type: e,
    default: t
  } : Ii(t);
}
let Fo = !1;
try {
  const e = Object.defineProperty({}, "passive", {
    get() {
      Fo = !0;
    }
  });
  window.addEventListener("testPassive", null, e), window.removeEventListener("testPassive", null, e);
} catch {
}
function Ho(e, t, n, o) {
  if (e && e.addEventListener) {
    let i = o;
    i === void 0 && Fo && (t === "touchstart" || t === "touchmove" || t === "wheel") && (i = {
      passive: !1
    }), e.addEventListener(t, n, i);
  }
  return {
    remove: () => {
      e && e.removeEventListener && e.removeEventListener(t, n);
    }
  };
}
const Fy = "anticon", Wk = Symbol("GlobalFormContextKey"), tL = (e) => {
  Ft(Wk, e);
}, nL = () => zt(Wk, {
  validateMessages: E(() => {
  })
}), oL = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: _t(),
  input: _t(),
  autoInsertSpaceInButton: {
    type: Boolean,
    default: void 0
  },
  locale: _t(),
  pageHeader: _t(),
  componentSize: {
    type: String
  },
  componentDisabled: {
    type: Boolean,
    default: void 0
  },
  direction: {
    type: String,
    default: "ltr"
  },
  space: _t(),
  virtual: {
    type: Boolean,
    default: void 0
  },
  dropdownMatchSelectWidth: {
    type: [Number, Boolean],
    default: !0
  },
  form: _t(),
  pagination: _t(),
  theme: _t(),
  select: _t(),
  wave: _t()
}), Ly = Symbol("configProvider"), Kk = {
  getPrefixCls: (e, t) => t || (e ? `ant-${e}` : "ant"),
  iconPrefixCls: E(() => Fy),
  getPopupContainer: E(() => () => document.body),
  direction: E(() => "ltr")
}, Ph = () => zt(Ly, Kk), iL = (e) => Ft(Ly, e), qk = Symbol("DisabledContextKey"), Tr = () => zt(qk, le(void 0)), Yk = (e) => {
  const t = Tr();
  return Ft(qk, E(() => {
    var n;
    return (n = e.value) !== null && n !== void 0 ? n : t.value;
  })), e;
}, Gk = {
  // 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"
}, rL = {
  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"
}, Uk = {
  placeholder: "Select time",
  rangePlaceholder: ["Start time", "End time"]
}, Tp = {
  lang: O({
    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"]
  }, rL),
  timePickerLocale: O({}, Uk)
}, Si = "${label} is not a valid ${type}", La = {
  locale: "en",
  Pagination: Gk,
  DatePicker: Tp,
  TimePicker: Uk,
  Calendar: Tp,
  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: Si,
        method: Si,
        array: Si,
        object: Si,
        number: Si,
        date: Si,
        boolean: Si,
        integer: Si,
        float: Si,
        regexp: Si,
        email: Si,
        url: Si,
        hex: Si
      },
      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"
  }
}, Xk = be({
  compatConfig: {
    MODE: 3
  },
  name: "LocaleReceiver",
  props: {
    componentName: String,
    defaultLocale: {
      type: [Object, Function]
    },
    children: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = zt("localeData", {}), i = E(() => {
      const {
        componentName: a = "global",
        defaultLocale: l
      } = e, s = l || La[a || "global"], {
        antLocale: u
      } = o, c = a && u ? u[a] : {};
      return O(O({}, typeof s == "function" ? s() : s), c || {});
    }), r = E(() => {
      const {
        antLocale: a
      } = o, l = a && a.locale;
      return a && a.exist && !l ? La.locale : l;
    });
    return () => {
      const a = e.children || n.default, {
        antLocale: l
      } = o;
      return a?.(i.value, r.value, l);
    };
  }
});
function Nl(e, t, n) {
  const o = zt("localeData", {});
  return [E(() => {
    const {
      antLocale: r
    } = o, a = T(t) || La[e || "global"], l = e && r ? r[e] : {};
    return O(O(O({}, typeof a == "function" ? a() : a), l || {}), T(n) || {});
  })];
}
function Hy(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 Zw = "%";
class aL {
  constructor(t) {
    this.cache = /* @__PURE__ */ new Map(), this.instanceId = t;
  }
  get(t) {
    return this.cache.get(Array.isArray(t) ? t.join(Zw) : t) || null;
  }
  update(t, n) {
    const o = Array.isArray(t) ? t.join(Zw) : t, i = this.cache.get(o), r = n(i);
    r === null ? this.cache.delete(o) : this.cache.set(o, r);
  }
}
const Qk = "data-token-hash", Cs = "data-css-hash", lL = "data-cache-path", Cu = "__cssinjs_instance__";
function gd() {
  const e = Math.random().toString(12).slice(2);
  if (typeof document < "u" && document.head && document.body) {
    const t = document.body.querySelectorAll(`style[${Cs}]`) || [], {
      firstChild: n
    } = document.head;
    Array.from(t).forEach((i) => {
      i[Cu] = i[Cu] || e, i[Cu] === e && document.head.insertBefore(i, n);
    });
    const o = {};
    Array.from(document.querySelectorAll(`style[${Cs}]`)).forEach((i) => {
      var r;
      const a = i.getAttribute(Cs);
      o[a] ? i[Cu] === e && ((r = i.parentNode) === null || r === void 0 || r.removeChild(i)) : o[a] = !0;
    });
  }
  return new aL(e);
}
const Zk = Symbol("StyleContextKey"), sL = () => {
  var e, t, n;
  const o = fi();
  let i;
  if (o && o.appContext) {
    const r = (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__;
    r ? i = r : (i = gd(), o.appContext.config.globalProperties && (o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  } else
    i = gd();
  return i;
}, Jk = {
  cache: gd(),
  defaultCache: !0,
  hashPriority: "low"
}, Oh = () => {
  const e = sL();
  return zt(Zk, $e(O(O({}, Jk), {
    cache: e
  })));
}, uL = (e) => {
  const t = Oh(), n = $e(O(O({}, Jk), {
    cache: gd()
  }));
  return Ie([() => T(e), t], () => {
    const o = O({}, t.value), i = T(e);
    Object.keys(i).forEach((a) => {
      const l = i[a];
      i[a] !== void 0 && (o[a] = l);
    });
    const {
      cache: r
    } = i;
    o.cache = o.cache || gd(), o.defaultCache = !r && t.value.defaultCache, n.value = o;
  }, {
    immediate: !0
  }), Ft(Zk, n), n;
}, cL = () => ({
  autoClear: ct(),
  /** @private Test only. Not work in production. */
  mock: rn(),
  /**
   * 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: _t(),
  /** Tell children that this context is default generated context */
  defaultCache: ct(),
  /** Use `:where` selector to reduce hashId css selector priority */
  hashPriority: rn(),
  /** Tell cssinjs where to inject style in */
  container: en(),
  /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
  ssrInline: ct(),
  /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  transformers: Vn(),
  /**
   * Linters to lint css before inject in document.
   * Styles will be linted after transforming.
   * Please note that `linters` do not support dynamic update.
   */
  linters: Vn()
});
rr(be({
  name: "AStyleProvider",
  inheritAttrs: !1,
  props: cL(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return uL(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}));
function dL() {
  return !1;
}
let xm = !1;
function fL() {
  return xm;
}
const pL = process.env.NODE_ENV === "production" ? dL : fL;
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 xm = !0, setTimeout(() => {
        xm = !1;
      }, 0), t(...arguments);
    };
  }
}
function eI(e, t, n, o) {
  const i = Oh(), r = $e(""), a = $e();
  It(() => {
    r.value = [e, ...t.value].join("%");
  });
  const l = pL(), 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(r, (u, c) => {
    c && s(c), i.value.cache.update(u, (d) => {
      const [f = 0, p] = d || [];
      let v = p;
      process.env.NODE_ENV !== "production" && p && l && (o?.(v, l), v = null);
      const g = v || n();
      return [f + 1, g];
    }), a.value = i.value.cache.get(r.value)[1];
  }, {
    immediate: !0
  }), qt(() => {
    s(r.value);
  }), a;
}
function xi() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function bl(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
const Jw = "data-vc-order", hL = "vc-util-key", wm = /* @__PURE__ */ new Map();
function tI() {
  let {
    mark: e
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return e ? e.startsWith("data-") ? e : `data-${e}` : hL;
}
function kh(e) {
  return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
}
function gL(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function nI(e) {
  return Array.from((wm.get(e) || e).children).filter((t) => t.tagName === "STYLE");
}
function oI(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!xi())
    return null;
  const {
    csp: n,
    prepend: o
  } = t, i = document.createElement("style");
  i.setAttribute(Jw, gL(o)), n?.nonce && (i.nonce = n?.nonce), i.innerHTML = e;
  const r = kh(t), {
    firstChild: a
  } = r;
  if (o) {
    if (o === "queue") {
      const l = nI(r).filter((s) => ["prepend", "prependQueue"].includes(s.getAttribute(Jw)));
      if (l.length)
        return r.insertBefore(i, l[l.length - 1].nextSibling), i;
    }
    r.insertBefore(i, a);
  } else
    r.appendChild(i);
  return i;
}
function iI(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = kh(t);
  return nI(n).find((o) => o.getAttribute(tI(t)) === e);
}
function _p(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = iI(e, t);
  n && kh(t).removeChild(n);
}
function vL(e, t) {
  const n = wm.get(e);
  if (!n || !bl(document, n)) {
    const o = oI("", t), {
      parentNode: i
    } = o;
    wm.set(e, i), e.removeChild(o);
  }
}
function vd(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  var o, i, r;
  const a = kh(n);
  vL(a, n);
  const l = iI(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 = (r = n.csp) === null || r === void 0 ? void 0 : r.nonce), l.innerHTML !== e && (l.innerHTML = e), l;
  const s = oI(e, n);
  return s.setAttribute(tI(n), t), s;
}
function mL(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 qu {
  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 r;
      o ? o = (r = o?.map) === null || r === void 0 ? void 0 : r.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 > qu.MAX_CACHE_SIZE + qu.MAX_CACHE_OFFSET) {
        const [i] = this.keys.reduce((r, a) => {
          const [, l] = r;
          return this.internalGet(a)[1] < l ? [a, this.internalGet(a)[1]] : r;
        }, [this.keys[0], this.cacheCallTimes]);
        this.delete(i);
      }
      this.keys.push(t);
    }
    let o = this.cache;
    t.forEach((i, r) => {
      if (r === t.length - 1)
        o.set(i, {
          value: [n, this.cacheCallTimes++]
        });
      else {
        const a = o.get(i);
        a ? a.map || (a.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 r = this.deleteByPath(i.map, n.slice(1));
    return (!i.map || i.map.size === 0) && !i.value && t.delete(n[0]), r;
  }
  delete(t) {
    if (this.has(t))
      return this.keys = this.keys.filter((n) => !mL(n, t)), this.deleteByPath(this.cache, t);
  }
}
qu.MAX_CACHE_SIZE = 20;
qu.MAX_CACHE_OFFSET = 5;
let Sm = {};
function wn(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${t}`);
}
function rI(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.warn(`Note: ${t}`);
}
function bL() {
  Sm = {};
}
function aI(e, t, n) {
  !t && !Sm[n] && (e(!1, n), Sm[n] = !0);
}
function vi(e, t) {
  aI(wn, e, t);
}
function Cm(e, t) {
  aI(rI, e, t);
}
function yL() {
}
let wo = yL;
process.env.NODE_ENV !== "production" && (wo = (e, t, n) => {
  vi(e, `[ant-design-vue: ${t}] ${n}`), process.env.NODE_ENV === "test" && bL();
});
let e1 = 0;
class lI {
  constructor(t) {
    this.derivatives = Array.isArray(t) ? t : [t], this.id = e1, t.length === 0 && wo(t.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), e1 += 1;
  }
  getDerivativeToken(t) {
    return this.derivatives.reduce((n, o) => o(t, n), void 0);
  }
}
const Lg = new qu();
function sI(e) {
  const t = Array.isArray(e) ? e : [e];
  return Lg.has(t) || Lg.set(t, new lI(t)), Lg.get(t);
}
const t1 = /* @__PURE__ */ new WeakMap();
function Ep(e) {
  let t = t1.get(e) || "";
  return t || (Object.keys(e).forEach((n) => {
    const o = e[n];
    t += n, o instanceof lI ? t += o.id : o && typeof o == "object" ? t += Ep(o) : t += o;
  }), t1.set(e, t)), t;
}
function xL(e, t) {
  return Hy(`${t}_${Ep(e)}`);
}
const Xc = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), uI = "_bAmBoO_";
function wL(e, t, n) {
  var o, i;
  if (xi()) {
    vd(e, Xc);
    const r = document.createElement("div");
    r.style.position = "fixed", r.style.left = "0", r.style.top = "0", t?.(r), document.body.appendChild(r), process.env.NODE_ENV !== "production" && (r.innerHTML = "Test", r.style.zIndex = "9999999");
    const a = n ? n(r) : (o = getComputedStyle(r).content) === null || o === void 0 ? void 0 : o.includes(uI);
    return (i = r.parentNode) === null || i === void 0 || i.removeChild(r), _p(Xc), a;
  }
  return !1;
}
let Hg;
function SL() {
  return Hg === void 0 && (Hg = wL(`@layer ${Xc} { .${Xc} { content: "${uI}"!important; } }`, (e) => {
    e.className = Xc;
  })), Hg;
}
const n1 = {}, CL = process.env.NODE_ENV === "production", $L = process.env.NODE_ENV === "prerender", PL = !CL && !$L ? "css-dev-only-do-not-override" : "css", ds = /* @__PURE__ */ new Map();
function OL(e) {
  ds.set(e, (ds.get(e) || 0) + 1);
}
function kL(e, t) {
  typeof document < "u" && document.querySelectorAll(`style[${Qk}="${e}"]`).forEach((o) => {
    var i;
    o[Cu] === t && ((i = o.parentNode) === null || i === void 0 || i.removeChild(o));
  });
}
const IL = 0;
function ML(e, t) {
  ds.set(e, (ds.get(e) || 0) - 1);
  const n = Array.from(ds.keys()), o = n.filter((i) => (ds.get(i) || 0) <= 0);
  n.length - o.length > IL && o.forEach((i) => {
    kL(i, t), ds.delete(i);
  });
}
const TL = (e, t, n, o) => {
  const i = n.getDerivativeToken(e);
  let r = O(O({}, i), t);
  return o && (r = o(r)), r;
};
function _L(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : le({});
  const o = Oh(), i = E(() => O({}, ...t.value)), r = E(() => Ep(i.value)), a = E(() => Ep(n.value.override || n1));
  return eI("token", E(() => [n.value.salt || "", e.value.id, r.value, a.value]), () => {
    const {
      salt: s = "",
      override: u = n1,
      formatToken: c,
      getComputedToken: d
    } = n.value, f = d ? d(i.value, u, e.value) : TL(i.value, u, e.value, c), p = xL(f, s);
    f._tokenKey = p, OL(p);
    const v = `${PL}-${Hy(p)}`;
    return f._hashId = v, [f, v];
  }, (s) => {
    var u;
    ML(s[0]._tokenKey, (u = o.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  });
}
var EL = {
  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
}, cI = "comm", dI = "rule", fI = "decl", DL = "@import", AL = "@namespace", RL = "@keyframes", NL = "@layer", zL = Math.abs, Qc = String.fromCharCode;
function pI(e) {
  return e.trim();
}
function $m(e, t, n) {
  return e.replace(t, n);
}
function Mu(e, t) {
  return e.charCodeAt(t) | 0;
}
function Yu(e, t, n) {
  return e.slice(t, n);
}
function Gr(e) {
  return e.length;
}
function BL(e) {
  return e.length;
}
function hf(e, t) {
  return t.push(e), e;
}
var Ih = 1, Gu = 1, hI = 0, nr = 0, Co = 0, uc = "";
function Vy(e, t, n, o, i, r, a, l) {
  return { value: e, root: t, parent: n, type: o, props: i, children: r, line: Ih, column: Gu, length: a, return: "", siblings: l };
}
function FL() {
  return Co;
}
function LL() {
  return Co = nr > 0 ? Mu(uc, --nr) : 0, Gu--, Co === 10 && (Gu = 1, Ih--), Co;
}
function Cr() {
  return Co = nr < hI ? Mu(uc, nr++) : 0, Gu++, Co === 10 && (Gu = 1, Ih++), Co;
}
function Cl() {
  return Mu(uc, nr);
}
function Qf() {
  return nr;
}
function Mh(e, t) {
  return Yu(uc, e, t);
}
function md(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 HL(e) {
  return Ih = Gu = 1, hI = Gr(uc = e), nr = 0, [];
}
function VL(e) {
  return uc = "", e;
}
function Vg(e) {
  return pI(Mh(nr - 1, Pm(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function jL(e) {
  for (; (Co = Cl()) && Co < 33; )
    Cr();
  return md(e) > 2 || md(Co) > 3 ? "" : " ";
}
function WL(e, t) {
  for (; --t && Cr() && !(Co < 48 || Co > 102 || Co > 57 && Co < 65 || Co > 70 && Co < 97); )
    ;
  return Mh(e, Qf() + (t < 6 && Cl() == 32 && Cr() == 32));
}
function Pm(e) {
  for (; Cr(); )
    switch (Co) {
      // ] ) " '
      case e:
        return nr;
      // " '
      case 34:
      case 39:
        e !== 34 && e !== 39 && Pm(Co);
        break;
      // (
      case 40:
        e === 41 && Pm(e);
        break;
      // \
      case 92:
        Cr();
        break;
    }
  return nr;
}
function KL(e, t) {
  for (; Cr() && e + Co !== 57; )
    if (e + Co === 84 && Cl() === 47)
      break;
  return "/*" + Mh(t, nr - 1) + "*" + Qc(e === 47 ? e : Cr());
}
function qL(e) {
  for (; !md(Cl()); )
    Cr();
  return Mh(e, nr);
}
function YL(e) {
  return VL(Zf("", null, null, null, [""], e = HL(e), 0, [0], e));
}
function Zf(e, t, n, o, i, r, a, l, s) {
  for (var u = 0, c = 0, d = a, f = 0, p = 0, v = 0, g = 1, m = 1, x = 1, S = 0, C = 0, P = "", $ = i, I = r, w = o, M = P; m; )
    switch (v = C, C = Cr()) {
      // (
      case 40:
        v != 108 && Mu(M, d - 1) == 58 ? (S++, M += "(") : M += Vg(C);
        break;
      // )
      case 41:
        S--, M += ")";
        break;
      // " ' [
      case 34:
      case 39:
      case 91:
        M += Vg(C);
        break;
      // \t \n \r \s
      case 9:
      case 10:
      case 13:
      case 32:
        if (S > 0) {
          M += Qc(C);
          break;
        }
        M += jL(v);
        break;
      // \
      case 92:
        M += WL(Qf() - 1, 7);
        continue;
      // /
      case 47:
        switch (Cl()) {
          case 42:
          case 47:
            hf(GL(KL(Cr(), Qf()), t, n, s), s), (md(v || 1) == 5 || md(Cl() || 1) == 5) && Gr(M) && Yu(M, -1, void 0) !== " " && (M += " ");
            break;
          default:
            M += "/";
        }
        break;
      // {
      case 123 * g:
        l[u++] = Gr(M) * x;
      // } ; \0
      case 125 * g:
      case 59:
      case 0:
        if (S > 0 && C) {
          M += Qc(C);
          break;
        }
        switch (C) {
          // \0 }
          case 0:
          case 125:
            m = 0;
          // ;
          case 59 + c:
            x == -1 && (M = $m(M, /\f/g, "")), p > 0 && (Gr(M) - d || g === 0) && hf(p > 32 ? i1(M + ";", o, n, d - 1, s) : i1($m(M, " ", "") + ";", o, n, d - 2, s), s);
            break;
          // @ ;
          case 59:
            M += ";";
          // { rule/at-rule
          default:
            if (hf(w = o1(M, t, n, u, c, i, l, P, $ = [], I = [], d, r), r), C === 123)
              if (c === 0)
                Zf(M, t, w, w, $, r, d, l, I);
              else {
                switch (f) {
                  // c(ontainer)
                  case 99:
                    if (Mu(M, 3) === 110) break;
                  // l(ayer)
                  case 108:
                    if (Mu(M, 2) === 97) break;
                  default:
                    c = 0;
                  // d(ocument) m(edia) s(upports)
                  case 100:
                  case 109:
                  case 115:
                }
                c ? Zf(e, w, w, o && hf(o1(e, w, w, 0, 0, i, l, P, i, $ = [], d, I), I), i, I, d, l, o ? $ : I) : Zf(M, w, w, w, [""], I, 0, l, I);
              }
        }
        u = c = p = 0, g = x = 1, P = M = "", d = a;
        break;
      // :
      case 58:
        d = 1 + Gr(M), p = v;
      default:
        if (g < 1) {
          if (C == 123)
            --g;
          else if (C == 125 && g++ == 0 && LL() == 125)
            continue;
        }
        switch (M += Qc(C), C * g) {
          // &
          case 38:
            x = c > 0 ? 1 : (M += "\f", -1);
            break;
          // ,
          case 44:
            if (S > 0) break;
            l[u++] = (Gr(M) - 1) * x, x = 1;
            break;
          // @
          case 64:
            Cl() === 45 && (M += Vg(Cr())), f = Cl(), c = d = Gr(P = M += qL(Qf())), C++;
            break;
          // -
          case 45:
            v === 45 && Gr(M) == 2 && (g = 0);
        }
    }
  return r;
}
function o1(e, t, n, o, i, r, a, l, s, u, c, d) {
  for (var f = i - 1, p = i === 0 ? r : [""], v = BL(p), g = 0, m = 0, x = 0; g < o; ++g)
    for (var S = 0, C = Yu(e, f + 1, f = zL(m = a[g])), P = e; S < v; ++S)
      (P = pI(m > 0 ? p[S] + " " + C : $m(C, /&\f/g, p[S]))) && (s[x++] = P);
  return Vy(e, t, n, i === 0 ? dI : l, s, u, c, d);
}
function GL(e, t, n, o) {
  return Vy(e, t, n, cI, Qc(FL()), Yu(e, 2, -2), 0, o);
}
function i1(e, t, n, o, i) {
  return Vy(e, t, n, fI, Yu(e, 0, o), Yu(e, o + 1, -1), o, i);
}
function Om(e, t) {
  for (var n = "", o = 0; o < e.length; o++)
    n += t(e[o], o, e, t) || "";
  return n;
}
function UL(e, t, n, o) {
  switch (e.type) {
    case NL:
      if (e.children.length) break;
    case DL:
    case AL:
    case fI:
      return e.return = e.return || e.value;
    case cI:
      return "";
    case RL:
      return e.return = e.value + "{" + Om(e.children, o) + "}";
    case dI:
      if (!Gr(e.value = e.props.join(","))) return "";
  }
  return Gr(n = Om(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
}
function gI(e, t) {
  const {
    path: n,
    parentSelectors: o
  } = t;
  vi(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${e}${o.length ? ` Selector info: ${o.join(" -> ")}` : ""}`);
}
const XL = (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) !== "'")) && gI(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`, n);
  }
}, QL = (e, t, n) => {
  e === "animation" && n.hashId && t !== "none" && gI(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`, n);
}, r1 = "data-ant-cssinjs-cache-path", ZL = "_FILE_STYLE__";
let $s, vI = !0;
function JL() {
  var e;
  if (!$s && ($s = {}, xi())) {
    const t = document.createElement("div");
    t.className = r1, 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 [r, a] = i.split(":");
      $s[r] = a;
    });
    const o = document.querySelector(`style[${r1}]`);
    o && (vI = !1, (e = o.parentNode) === null || e === void 0 || e.removeChild(o)), document.body.removeChild(t);
  }
}
function e8(e) {
  return JL(), !!$s[e];
}
function t8(e) {
  const t = $s[e];
  let n = null;
  if (t && xi())
    if (vI)
      n = ZL;
    else {
      const o = document.querySelector(`style[${Cs}="${$s[e]}"]`);
      o ? n = o.innerHTML : delete $s[e];
    }
  return [n, t];
}
const a1 = xi(), mI = "_skip_check_", bI = "_multi_value_";
function l1(e) {
  return Om(YL(e), UL).replace(/\{%%%\:[^;];}/g, ";");
}
function n8(e) {
  return typeof e == "object" && e && (mI in e || bI in e);
}
function o8(e, t, n) {
  if (!t)
    return e;
  const o = `.${t}`, i = n === "low" ? `:where(${o})` : o;
  return e.split(",").map((a) => {
    var l;
    const s = a.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 km = /* @__PURE__ */ new Set();
process.env.NODE_ENV;
const Im = 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: r,
    layer: a,
    path: l,
    hashPriority: s,
    transformers: u = [],
    linters: c = []
  } = t;
  let d = "", f = {};
  function p(m) {
    const x = m.getName(r);
    if (!f[x]) {
      const [S] = Im(m.style, t, {
        root: !1,
        parentSelectors: i
      });
      f[x] = `@keyframes ${m.getName(r)}${S}`;
    }
  }
  function v(m) {
    let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    return m.forEach((S) => {
      Array.isArray(S) ? v(S, x) : S && x.push(S);
    }), x;
  }
  if (v(Array.isArray(e) ? e : [e]).forEach((m) => {
    const x = typeof m == "string" && !n ? {} : m;
    if (typeof x == "string")
      d += `${x}
`;
    else if (x._keyframe)
      p(x);
    else {
      const S = u.reduce((C, P) => {
        var $;
        return (($ = P?.visit) === null || $ === void 0 ? void 0 : $.call(P, C)) || C;
      }, x);
      Object.keys(S).forEach((C) => {
        var P;
        const $ = S[C];
        if (typeof $ == "object" && $ && (C !== "animationName" || !$._keyframe) && !n8($)) {
          let I = !1, w = C.trim(), M = !1;
          (n || o) && r ? w.startsWith("@") ? I = !0 : w = o8(C, r, s) : n && !r && (w === "&" || w === "") && (w = "", M = !0);
          const [_, N] = Im($, t, {
            root: M,
            injectHash: I,
            parentSelectors: [...i, w]
          });
          f = O(O({}, f), N), d += `${w}${_}`;
        } else {
          let I = function(M, _) {
            process.env.NODE_ENV !== "production" && (typeof $ != "object" || !$?.[mI]) && [XL, QL, ...c].forEach((H) => H(M, _, {
              path: l,
              hashId: r,
              parentSelectors: i
            }));
            const N = M.replace(/[A-Z]/g, (H) => `-${H.toLowerCase()}`);
            let R = _;
            !EL[M] && typeof R == "number" && R !== 0 && (R = `${R}px`), M === "animationName" && _?._keyframe && (p(_), R = _.getName(r)), d += `${N}:${R};`;
          };
          const w = (P = $?.value) !== null && P !== void 0 ? P : $;
          typeof $ == "object" && $?.[bI] && Array.isArray(w) ? w.forEach((M) => {
            I(C, M);
          }) : I(C, w);
        }
      });
    }
  }), !n)
    d = `{${d}}`;
  else if (a && SL()) {
    const m = a.split(",");
    d = `@layer ${m[m.length - 1].trim()} {${d}}`, m.length > 1 && (d = `@layer ${a}{%%%:%}${d}`);
  }
  return [d, f];
};
function i8(e, t) {
  return Hy(`${e.join("%")}${t}`);
}
function Mm(e, t) {
  const n = Oh(), o = E(() => e.value.token._tokenKey), i = E(() => [o.value, ...e.value.path]);
  let r = a1;
  return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (r = n.value.mock === "client"), eI(
    "style",
    i,
    // Create cache if needed
    () => {
      const {
        path: a,
        hashId: l,
        layer: s,
        nonce: u,
        clientOnly: c,
        order: d = 0
      } = e.value, f = i.value.join("|");
      if (e8(f)) {
        const [w, M] = t8(f);
        if (w)
          return [w, o.value, M, {}, c, d];
      }
      const p = t(), {
        hashPriority: v,
        container: g,
        transformers: m,
        linters: x,
        cache: S
      } = n.value, [C, P] = Im(p, {
        hashId: l,
        hashPriority: v,
        layer: s,
        path: a.join("-"),
        transformers: m,
        linters: x
      }), $ = l1(C), I = i8(i.value, $);
      if (r) {
        const w = {
          mark: Cs,
          prepend: "queue",
          attachTo: g,
          priority: d
        }, M = typeof u == "function" ? u() : u;
        M && (w.csp = {
          nonce: M
        });
        const _ = vd($, I, w);
        _[Cu] = S.instanceId, _.setAttribute(Qk, o.value), process.env.NODE_ENV !== "production" && _.setAttribute(lL, i.value.join("|")), Object.keys(P).forEach((N) => {
          km.has(N) || (km.add(N), vd(l1(P[N]), `_effect-${N}`, {
            mark: Cs,
            prepend: "queue",
            attachTo: g
          }));
        });
      }
      return [$, o.value, I, P, c, d];
    },
    // Remove cache if no need
    (a, l) => {
      let [, , s] = a;
      (l || n.value.autoClear) && a1 && _p(s, {
        mark: Cs
      });
    }
  ), (a) => a;
}
class tn {
  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;
  }
}
function iu(e) {
  return e.notSplit = !0, e;
}
iu(["borderTop", "borderBottom"]), iu(["borderTop"]), iu(["borderBottom"]), iu(["borderLeft", "borderRight"]), iu(["borderLeft"]), iu(["borderRight"]);
const r8 = "4.2.6", bd = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
function Yo(e, t) {
  a8(e) && (e = "100%");
  var n = l8(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 gf(e) {
  return Math.min(1, Math.max(0, e));
}
function a8(e) {
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function l8(e) {
  return typeof e == "string" && e.indexOf("%") !== -1;
}
function yI(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function vf(e) {
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function vs(e) {
  return e.length === 1 ? "0" + e : String(e);
}
function s8(e, t, n) {
  return {
    r: Yo(e, 255) * 255,
    g: Yo(t, 255) * 255,
    b: Yo(n, 255) * 255
  };
}
function s1(e, t, n) {
  e = Yo(e, 255), t = Yo(t, 255), n = Yo(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, a = 0, l = (o + i) / 2;
  if (o === i)
    a = 0, r = 0;
  else {
    var s = o - i;
    switch (a = l > 0.5 ? s / (2 - o - i) : s / (o + i), o) {
      case e:
        r = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / s + 2;
        break;
      case n:
        r = (e - t) / s + 4;
        break;
    }
    r /= 6;
  }
  return { h: r, s: a, l };
}
function jg(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 u8(e, t, n) {
  var o, i, r;
  if (e = Yo(e, 360), t = Yo(t, 100), n = Yo(n, 100), t === 0)
    i = n, r = n, o = n;
  else {
    var a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
    o = jg(l, a, e + 1 / 3), i = jg(l, a, e), r = jg(l, a, e - 1 / 3);
  }
  return { r: o * 255, g: i * 255, b: r * 255 };
}
function Tm(e, t, n) {
  e = Yo(e, 255), t = Yo(t, 255), n = Yo(n, 255);
  var o = Math.max(e, t, n), i = Math.min(e, t, n), r = 0, a = o, l = o - i, s = o === 0 ? 0 : l / o;
  if (o === i)
    r = 0;
  else {
    switch (o) {
      case e:
        r = (t - n) / l + (t < n ? 6 : 0);
        break;
      case t:
        r = (n - e) / l + 2;
        break;
      case n:
        r = (e - t) / l + 4;
        break;
    }
    r /= 6;
  }
  return { h: r, s, v: a };
}
function c8(e, t, n) {
  e = Yo(e, 360) * 6, t = Yo(t, 100), n = Yo(n, 100);
  var o = Math.floor(e), i = e - o, r = n * (1 - t), a = n * (1 - i * t), l = n * (1 - (1 - i) * t), s = o % 6, u = [n, a, r, r, l, n][s], c = [l, n, n, a, r, r][s], d = [r, r, l, n, n, a][s];
  return { r: u * 255, g: c * 255, b: d * 255 };
}
function _m(e, t, n, o) {
  var i = [
    vs(Math.round(e).toString(16)),
    vs(Math.round(t).toString(16)),
    vs(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 d8(e, t, n, o, i) {
  var r = [
    vs(Math.round(e).toString(16)),
    vs(Math.round(t).toString(16)),
    vs(Math.round(n).toString(16)),
    vs(f8(o))
  ];
  return i && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) && r[3].startsWith(r[3].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
}
function f8(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function u1(e) {
  return Pi(e) / 255;
}
function Pi(e) {
  return parseInt(e, 16);
}
function p8(e) {
  return {
    r: e >> 16,
    g: (e & 65280) >> 8,
    b: e & 255
  };
}
var Em = {
  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 vu(e) {
  var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, i = null, r = null, a = !1, l = !1;
  return typeof e == "string" && (e = v8(e)), typeof e == "object" && (wa(e.r) && wa(e.g) && wa(e.b) ? (t = s8(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : wa(e.h) && wa(e.s) && wa(e.v) ? (o = vf(e.s), i = vf(e.v), t = c8(e.h, o, i), a = !0, l = "hsv") : wa(e.h) && wa(e.s) && wa(e.l) && (o = vf(e.s), r = vf(e.l), t = u8(e.h, o, r), a = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = yI(n), {
    ok: a,
    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 h8 = "[-\\+]?\\d+%?", g8 = "[-\\+]?\\d*\\.\\d+%?", $l = "(?:".concat(g8, ")|(?:").concat(h8, ")"), Wg = "[\\s|\\(]+(".concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")\\s*\\)?"), Kg = "[\\s|\\(]+(".concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")\\s*\\)?"), hr = {
  CSS_UNIT: new RegExp($l),
  rgb: new RegExp("rgb" + Wg),
  rgba: new RegExp("rgba" + Kg),
  hsl: new RegExp("hsl" + Wg),
  hsla: new RegExp("hsla" + Kg),
  hsv: new RegExp("hsv" + Wg),
  hsva: new RegExp("hsva" + Kg),
  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 v8(e) {
  if (e = e.trim().toLowerCase(), e.length === 0)
    return !1;
  var t = !1;
  if (Em[e])
    e = Em[e], t = !0;
  else if (e === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = hr.rgb.exec(e);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = hr.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = hr.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = hr.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = hr.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = hr.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = hr.hex8.exec(e), n ? {
    r: Pi(n[1]),
    g: Pi(n[2]),
    b: Pi(n[3]),
    a: u1(n[4]),
    format: t ? "name" : "hex8"
  } : (n = hr.hex6.exec(e), n ? {
    r: Pi(n[1]),
    g: Pi(n[2]),
    b: Pi(n[3]),
    format: t ? "name" : "hex"
  } : (n = hr.hex4.exec(e), n ? {
    r: Pi(n[1] + n[1]),
    g: Pi(n[2] + n[2]),
    b: Pi(n[3] + n[3]),
    a: u1(n[4] + n[4]),
    format: t ? "name" : "hex8"
  } : (n = hr.hex3.exec(e), n ? {
    r: Pi(n[1] + n[1]),
    g: Pi(n[2] + n[2]),
    b: Pi(n[3] + n[3]),
    format: t ? "name" : "hex"
  } : !1)))))))));
}
function wa(e) {
  return !!hr.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 = p8(t)), this.originalInput = t;
      var i = vu(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, r = t.r / 255, a = t.g / 255, l = t.b / 255;
      return r <= 0.03928 ? n = r / 12.92 : n = Math.pow((r + 0.055) / 1.055, 2.4), a <= 0.03928 ? o = a / 12.92 : o = Math.pow((a + 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 = yI(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 = Tm(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 = Tm(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 = s1(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 = s1(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), _m(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), d8(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(Yo(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(Yo(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 = "#" + _m(this.r, this.g, this.b, !1), n = 0, o = Object.entries(Em); n < o.length; n++) {
        var i = o[n], r = i[0], a = i[1];
        if (t === a)
          return r;
      }
      return !1;
    }, e.prototype.toString = function(t) {
      var n = !!t;
      t = t ?? this.format;
      var o = !1, i = this.a < 1 && this.a >= 0, r = !n && i && (t.startsWith("hex") || t === "name");
      return r ? 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 = gf(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 = gf(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 = gf(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 = gf(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(), r = n / 100, a = {
        r: (i.r - o.r) * r + o.r,
        g: (i.g - o.g) * r + o.g,
        b: (i.b - o.b) * r + o.b,
        a: (i.a - o.a) * r + o.a
      };
      return new e(a);
    }, e.prototype.analogous = function(t, n) {
      t === void 0 && (t = 6), n === void 0 && (n = 30);
      var o = this.toHsl(), i = 360 / n, r = [this];
      for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
        o.h = (o.h + i) % 360, r.push(new e(o));
      return r;
    }, 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, r = n.v, a = [], l = 1 / t; t--; )
        a.push(new e({ h: o, s: i, v: r })), r = (r + l) % 1;
      return a;
    }, 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], r = 360 / t, a = 1; a < t; a++)
        i.push(new e({ h: (o + a * r) % 360, s: n.s, l: n.l }));
      return i;
    }, e.prototype.equals = function(t) {
      return this.toRgbString() === new e(t).toRgbString();
    }, e;
  })()
), mf = 2, c1 = 0.16, m8 = 0.05, b8 = 0.05, y8 = 0.15, xI = 5, wI = 4, x8 = [{
  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 d1(e) {
  var t = e.r, n = e.g, o = e.b, i = Tm(t, n, o);
  return {
    h: i.h * 360,
    s: i.s,
    v: i.v
  };
}
function bf(e) {
  var t = e.r, n = e.g, o = e.b;
  return "#".concat(_m(t, n, o, !1));
}
function w8(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 f1(e, t, n) {
  var o;
  return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? o = n ? Math.round(e.h) - mf * t : Math.round(e.h) + mf * t : o = n ? Math.round(e.h) + mf * t : Math.round(e.h) - mf * t, o < 0 ? o += 360 : o >= 360 && (o -= 360), o;
}
function p1(e, t, n) {
  if (e.h === 0 && e.s === 0)
    return e.s;
  var o;
  return n ? o = e.s - c1 * t : t === wI ? o = e.s + c1 : o = e.s + m8 * t, o > 1 && (o = 1), n && t === xI && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Number(o.toFixed(2));
}
function h1(e, t, n) {
  var o;
  return n ? o = e.v + b8 * t : o = e.v - y8 * t, o > 1 && (o = 1), Number(o.toFixed(2));
}
function Ha(e) {
  for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], o = vu(e), i = xI; i > 0; i -= 1) {
    var r = d1(o), a = bf(vu({
      h: f1(r, i, !0),
      s: p1(r, i, !0),
      v: h1(r, i, !0)
    }));
    n.push(a);
  }
  n.push(bf(o));
  for (var l = 1; l <= wI; l += 1) {
    var s = d1(o), u = bf(vu({
      h: f1(s, l),
      s: p1(s, l),
      v: h1(s, l)
    }));
    n.push(u);
  }
  return t.theme === "dark" ? x8.map(function(c) {
    var d = c.index, f = c.opacity, p = bf(w8(vu(t.backgroundColor || "#141414"), vu(n[d]), f * 100));
    return p;
  }) : n;
}
var qg = {
  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"
}, Jf = {}, Yg = {};
Object.keys(qg).forEach(function(e) {
  Jf[e] = Ha(qg[e]), Jf[e].primary = Jf[e][5], Yg[e] = Ha(qg[e], {
    theme: "dark",
    backgroundColor: "#141414"
  }), Yg[e].primary = Yg[e][5];
});
var S8 = Jf.blue;
const C8 = (e) => {
  const {
    controlHeight: t
  } = e;
  return {
    controlHeightSM: t * 0.75,
    controlHeightXS: t * 0.5,
    controlHeightLG: t * 1.25
  };
};
function $8(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 jy = {
  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"
}, Th = O(O({}, jy), {
  // 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 SI(e, t) {
  let {
    generateColorPalettes: n,
    generateNeutralColorPalettes: o
  } = t;
  const {
    colorSuccess: i,
    colorWarning: r,
    colorError: a,
    colorInfo: l,
    colorPrimary: s,
    colorBgBase: u,
    colorTextBase: c
  } = e, d = n(s), f = n(i), p = n(r), v = n(a), g = n(l), m = o(u, c);
  return O(O({}, m), {
    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: v[1],
    colorErrorBgHover: v[2],
    colorErrorBorder: v[3],
    colorErrorBorderHover: v[4],
    colorErrorHover: v[5],
    colorError: v[6],
    colorErrorActive: v[7],
    colorErrorTextHover: v[8],
    colorErrorText: v[9],
    colorErrorTextActive: v[10],
    colorWarningBg: p[1],
    colorWarningBgHover: p[2],
    colorWarningBorder: p[3],
    colorWarningBorderHover: p[4],
    colorWarningHover: p[4],
    colorWarning: p[6],
    colorWarningActive: p[7],
    colorWarningTextHover: p[8],
    colorWarningText: p[9],
    colorWarningTextActive: p[10],
    colorInfoBg: g[1],
    colorInfoBgHover: g[2],
    colorInfoBorder: g[3],
    colorInfoBorderHover: g[4],
    colorInfoHover: g[4],
    colorInfo: g[6],
    colorInfoActive: g[7],
    colorInfoTextHover: g[8],
    colorInfoText: g[9],
    colorInfoTextActive: g[10],
    colorBgMask: new In("#000").setAlpha(0.45).toRgbString(),
    colorWhite: "#fff"
  });
}
const P8 = (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 O8(e) {
  const {
    motionUnit: t,
    motionBase: n,
    borderRadius: o,
    lineWidth: i
  } = e;
  return O({
    // 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
  }, P8(o));
}
const Sa = (e, t) => new In(e).setAlpha(t).toRgbString(), Tc = (e, t) => new In(e).darken(t).toHexString(), k8 = (e) => {
  const t = Ha(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],
  };
}, I8 = (e, t) => {
  const n = e || "#fff", o = t || "#000";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: Sa(o, 0.88),
    colorTextSecondary: Sa(o, 0.65),
    colorTextTertiary: Sa(o, 0.45),
    colorTextQuaternary: Sa(o, 0.25),
    colorFill: Sa(o, 0.15),
    colorFillSecondary: Sa(o, 0.06),
    colorFillTertiary: Sa(o, 0.04),
    colorFillQuaternary: Sa(o, 0.02),
    colorBgLayout: Tc(n, 4),
    colorBgContainer: Tc(n, 0),
    colorBgElevated: Tc(n, 0),
    colorBgSpotlight: Sa(o, 0.85),
    colorBorder: Tc(n, 15),
    colorBorderSecondary: Tc(n, 6)
  };
};
function M8(e) {
  const t = new Array(10).fill(null).map((n, o) => {
    const i = o - 1, r = e * Math.pow(2.71828, i / 5), a = o > 1 ? Math.floor(r) : Math.ceil(r);
    return Math.floor(a / 2) * 2;
  });
  return t[1] = e, t.map((n) => {
    const o = n + 8;
    return {
      size: n,
      lineHeight: o / n
    };
  });
}
const T8 = (e) => {
  const t = M8(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 Wy(e) {
  const t = Object.keys(jy).map((n) => {
    const o = Ha(e[n]);
    return new Array(10).fill(1).reduce((i, r, a) => (i[`${n}-${a + 1}`] = o[a], i), {});
  }).reduce((n, o) => (n = O(O({}, n), o), n), {});
  return O(O(O(O(O(O(O({}, e), t), SI(e, {
    generateColorPalettes: k8,
    generateNeutralColorPalettes: I8
  })), T8(e.fontSize)), $8(e)), C8(e)), O8(e));
}
function Gg(e) {
  return e >= 0 && e <= 255;
}
function yf(e, t) {
  const {
    r: n,
    g: o,
    b: i,
    a: r
  } = new In(e).toRgb();
  if (r < 1)
    return e;
  const {
    r: a,
    g: l,
    b: s
  } = new In(t).toRgb();
  for (let u = 0.01; u <= 1; u += 0.01) {
    const c = Math.round((n - a * (1 - u)) / u), d = Math.round((o - l * (1 - u)) / u), f = Math.round((i - s * (1 - u)) / u);
    if (Gg(c) && Gg(d) && Gg(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 _8 = 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 E8(e) {
  const {
    override: t
  } = e, n = _8(e, ["override"]), o = O({}, t);
  Object.keys(Th).forEach((p) => {
    delete o[p];
  });
  const i = O(O({}, n), o), r = 480, a = 576, l = 768, s = 992, u = 1200, c = 1600, d = 2e3;
  return O(O(O({}, 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: yf(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: yf(i.colorErrorBg, i.colorBgContainer),
    colorWarningOutline: yf(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: yf(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: r,
    screenXSMin: r,
    screenXSMax: a - 1,
    screenSM: a,
    screenSMMin: a,
    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 D8 = (e) => ({
  // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
  // And Typography use this to generate link style which should not do this.
  color: e.colorLink,
  textDecoration: "none",
  outline: "none",
  cursor: "pointer",
  transition: `color ${e.motionDurationSlow}`,
  "&:focus, &:hover": {
    color: e.colorLinkHover
  },
  "&:active": {
    color: e.colorLinkActive
  }
}), Ky = (e, t, n, o, i) => {
  const r = e / 2, a = 0, l = r, s = n * 1 / Math.sqrt(2), u = r - n * (1 - 1 / Math.sqrt(2)), c = r - t * (1 / Math.sqrt(2)), d = n * (Math.sqrt(2) - 1) + t * (1 / Math.sqrt(2)), f = 2 * r - c, p = d, v = 2 * r - s, g = u, m = 2 * r - a, x = l, S = r * Math.sqrt(2) + n * (Math.sqrt(2) - 2), C = n * (Math.sqrt(2) - 1);
  return {
    pointerEvents: "none",
    width: e,
    height: e,
    overflow: "hidden",
    "&::after": {
      content: '""',
      position: "absolute",
      width: S,
      height: S,
      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(${C}px 100%, 50% ${C}px, ${2 * r - C}px 100%, ${C}px 100%)`, `path('M ${a} ${l} A ${n} ${n} 0 0 0 ${s} ${u} L ${c} ${d} A ${t} ${t} 0 0 1 ${f} ${p} L ${v} ${g} A ${n} ${n} 0 0 0 ${m} ${x} Z')`]
      },
      content: '""'
    }
  };
};
function CI(e, t) {
  return bd.reduce((n, o) => {
    const i = e[`${o}-1`], r = e[`${o}-3`], a = e[`${o}-6`], l = e[`${o}-7`];
    return O(O({}, n), t(o, {
      lightColor: i,
      lightBorderColor: r,
      darkColor: a,
      textColor: l
    }));
  }, {});
}
const Va = {
  overflow: "hidden",
  whiteSpace: "nowrap",
  textOverflow: "ellipsis"
}, fn = (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
}), cc = () => ({
  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"
  }
}), ja = () => ({
  // 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: '""'
  }
}), A8 = (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"
    }
  }
}), R8 = (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"
        }
      }
    }
  };
}, Wa = (e) => ({
  outline: `${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,
  outlineOffset: 1,
  transition: "outline-offset 0s, outline 0s"
}), Rl = (e) => ({
  "&:focus-visible": O({}, Wa(e))
});
function On(e, t, n) {
  return (o) => {
    const i = E(() => o?.value), [r, a, l] = dc(), {
      getPrefixCls: s,
      iconPrefixCls: u
    } = Ph(), c = E(() => s()), d = E(() => ({
      theme: r.value,
      token: a.value,
      hashId: l.value,
      path: ["Shared", c.value]
    }));
    Mm(d, () => [{
      // Link
      "&": A8(a.value)
    }]);
    const f = E(() => ({
      theme: r.value,
      token: a.value,
      hashId: l.value,
      path: [e, i.value, u.value]
    }));
    return [Mm(f, () => {
      const {
        token: p,
        flush: v
      } = z8(a.value), g = typeof n == "function" ? n(p) : n, m = O(O({}, g), a.value[e]), x = `.${i.value}`, S = Qt(p, {
        componentCls: x,
        prefixCls: i.value,
        iconCls: `.${u.value}`,
        antCls: `.${c.value}`
      }, m), C = t(S, {
        hashId: l.value,
        prefixCls: i.value,
        rootPrefixCls: c.value,
        iconPrefixCls: u.value,
        overrideComponentToken: a.value[e]
      });
      return v(e, m), [R8(a.value, i.value), C];
    }), l];
  };
}
const $I = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
let Dm = !0;
function Qt() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  if (!$I)
    return O({}, ...t);
  Dm = !1;
  const o = {};
  return t.forEach((i) => {
    Object.keys(i).forEach((a) => {
      Object.defineProperty(o, a, {
        configurable: !0,
        enumerable: !0,
        get: () => i[a]
      });
    });
  }), Dm = !0, o;
}
function N8() {
}
function z8(e) {
  let t, n = e, o = N8;
  return $I && (t = /* @__PURE__ */ new Set(), n = new Proxy(e, {
    get(i, r) {
      return Dm && t.add(r), i[r];
    }
  }), o = (i, r) => {
    Array.from(t);
  }), {
    token: n,
    keys: t,
    flush: o
  };
}
const B8 = sI(Wy), qy = {
  token: Th,
  hashed: !0
}, PI = Symbol("DesignTokenContext"), Am = $e(), F8 = (e) => {
  Ft(PI, e), Ie(e, () => {
    Am.value = T(e), ME(Am);
  }, {
    immediate: !0,
    deep: !0
  });
}, L8 = be({
  props: {
    value: _t()
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return F8(E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function dc() {
  const e = zt(PI, E(() => Am.value || qy)), t = E(() => `${r8}-${e.value.hashed || ""}`), n = E(() => e.value.theme || B8), o = _L(n, E(() => [Th, e.value.token]), E(() => ({
    salt: t.value,
    override: O({
      override: e.value.token
    }, e.value.components),
    formatToken: E8
  })));
  return [n, E(() => o.value[0]), E(() => e.value.hashed ? o.value[1] : "")];
}
const Yy = be({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = dc(), t = E(() => new In(e.value.colorBgBase).toHsl().l < 0.5 ? {
      opacity: 0.65
    } : {});
    return () => h("svg", {
      style: t.value,
      width: "184",
      height: "152",
      viewBox: "0 0 184 152",
      xmlns: "http://www.w3.org/2000/svg"
    }, [h("g", {
      fill: "none",
      "fill-rule": "evenodd"
    }, [h("g", {
      transform: "translate(24 31.67)"
    }, [h("ellipse", {
      "fill-opacity": ".8",
      fill: "#F5F5F7",
      cx: "67.797",
      cy: "106.89",
      rx: "67.797",
      ry: "12.668"
    }, null), h("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), h("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), h("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), h("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)]), h("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), h("g", {
      transform: "translate(149.65 15.383)",
      fill: "#FFF"
    }, [h("ellipse", {
      cx: "20.654",
      cy: "3.167",
      rx: "2.849",
      ry: "2.815"
    }, null), h("path", {
      d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
    }, null)])])]);
  }
});
Yy.PRESENTED_IMAGE_DEFAULT = !0;
const OI = be({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = dc(), t = E(() => {
      const {
        colorFill: n,
        colorFillTertiary: o,
        colorFillQuaternary: i,
        colorBgContainer: r
      } = e.value;
      return {
        borderColor: new In(n).onBackground(r).toHexString(),
        shadowColor: new In(o).onBackground(r).toHexString(),
        contentColor: new In(i).onBackground(r).toHexString()
      };
    });
    return () => h("svg", {
      width: "64",
      height: "41",
      viewBox: "0 0 64 41",
      xmlns: "http://www.w3.org/2000/svg"
    }, [h("g", {
      transform: "translate(0 1)",
      fill: "none",
      "fill-rule": "evenodd"
    }, [h("ellipse", {
      fill: t.value.shadowColor,
      cx: "32",
      cy: "33",
      rx: "32",
      ry: "7"
    }, null), h("g", {
      "fill-rule": "nonzero",
      stroke: t.value.borderColor
    }, [h("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), h("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)])])]);
  }
});
OI.PRESENTED_IMAGE_SIMPLE = !0;
const H8 = (e) => {
  const {
    componentCls: t,
    margin: n,
    marginXS: o,
    marginXL: i,
    fontSize: r,
    lineHeight: a
  } = e;
  return {
    [t]: {
      marginInline: o,
      fontSize: r,
      lineHeight: a,
      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
        }
      }
    }
  };
}, V8 = On("Empty", (e) => {
  const {
    componentCls: t,
    controlHeightLG: n
  } = e, o = Qt(e, {
    emptyImgCls: `${t}-img`,
    emptyImgHeight: n * 2.5,
    emptyImgHeightMD: n,
    emptyImgHeightSM: n * 0.875
  });
  return [H8(o)];
});
var j8 = 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 W8 = () => ({
  prefixCls: String,
  imageStyle: _t(),
  image: Ii(),
  description: Ii()
}), Gy = be({
  name: "AEmpty",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: W8(),
  setup(e, t) {
    let {
      slots: n = {},
      attrs: o
    } = t;
    const {
      direction: i,
      prefixCls: r
    } = Rt("empty", e), [a, l] = V8(r);
    return () => {
      var s, u;
      const c = r.value, d = O(O({}, e), o), {
        image: f = ((s = n.image) === null || s === void 0 ? void 0 : s.call(n)) || ko(Yy),
        description: p = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
        imageStyle: v,
        class: g = ""
      } = d, m = j8(d, ["image", "description", "imageStyle", "class"]), x = typeof f == "function" ? f() : f, S = typeof x == "object" && "type" in x && x.type.PRESENTED_IMAGE_SIMPLE;
      return a(h(Xk, {
        componentName: "Empty",
        children: (C) => {
          const P = typeof p < "u" ? p : C.description, $ = typeof P == "string" ? P : "empty";
          let I = null;
          return typeof x == "string" ? I = h("img", {
            alt: $,
            src: x
          }, null) : I = x, h("div", Q({
            class: _e(c, g, l.value, {
              [`${c}-normal`]: S,
              [`${c}-rtl`]: i.value === "rtl"
            })
          }, m), [h("div", {
            class: `${c}-image`,
            style: v
          }, [I]), P && h("p", {
            class: `${c}-description`
          }, [P]), n.default && h("div", {
            class: `${c}-footer`
          }, [Do(n.default())])]);
        }
      }, null));
    };
  }
});
Gy.PRESENTED_IMAGE_DEFAULT = () => ko(Yy);
Gy.PRESENTED_IMAGE_SIMPLE = () => ko(OI);
const fs = rr(Gy), Uy = (e) => {
  const {
    prefixCls: t
  } = Rt("empty", e);
  return ((o) => {
    switch (o) {
      case "Table":
      case "List":
        return h(fs, {
          image: fs.PRESENTED_IMAGE_SIMPLE
        }, null);
      case "Select":
      case "TreeSelect":
      case "Cascader":
      case "Transfer":
      case "Mentions":
        return h(fs, {
          image: fs.PRESENTED_IMAGE_SIMPLE,
          class: `${t.value}-small`
        }, null);
      default:
        return h(fs, null, null);
    }
  })(e.componentName);
};
function K8(e) {
  return h(Uy, {
    componentName: e
  }, null);
}
const kI = Symbol("SizeContextKey"), II = () => zt(kI, le(void 0)), MI = (e) => {
  const t = II();
  return Ft(kI, E(() => e.value || t.value)), e;
}, Rt = ((e, t) => {
  const n = II(), o = Tr(), i = zt(Ly, O(O({}, Kk), {
    renderEmpty: (w) => ko(Uy, {
      componentName: w
    })
  })), r = E(() => i.getPrefixCls(e, t.prefixCls)), a = E(() => {
    var w, M;
    return (w = t.direction) !== null && w !== void 0 ? w : (M = i.direction) === null || M === void 0 ? void 0 : M.value;
  }), l = E(() => {
    var w;
    return (w = t.iconPrefixCls) !== null && w !== void 0 ? w : i.iconPrefixCls.value;
  }), s = E(() => i.getPrefixCls()), u = E(() => {
    var w;
    return (w = i.autoInsertSpaceInButton) === null || w === void 0 ? void 0 : w.value;
  }), c = i.renderEmpty, d = i.space, f = i.pageHeader, p = i.form, v = E(() => {
    var w, M;
    return (w = t.getTargetContainer) !== null && w !== void 0 ? w : (M = i.getTargetContainer) === null || M === void 0 ? void 0 : M.value;
  }), g = E(() => {
    var w, M, _;
    return (M = (w = t.getContainer) !== null && w !== void 0 ? w : t.getPopupContainer) !== null && M !== void 0 ? M : (_ = i.getPopupContainer) === null || _ === void 0 ? void 0 : _.value;
  }), m = E(() => {
    var w, M;
    return (w = t.dropdownMatchSelectWidth) !== null && w !== void 0 ? w : (M = i.dropdownMatchSelectWidth) === null || M === void 0 ? void 0 : M.value;
  }), x = E(() => {
    var w;
    return (t.virtual === void 0 ? ((w = i.virtual) === null || w === void 0 ? void 0 : w.value) !== !1 : t.virtual !== !1) && m.value !== !1;
  }), S = E(() => t.size || n.value), C = E(() => {
    var w, M, _;
    return (w = t.autocomplete) !== null && w !== void 0 ? w : (_ = (M = i.input) === null || M === void 0 ? void 0 : M.value) === null || _ === void 0 ? void 0 : _.autocomplete;
  }), P = E(() => {
    var w;
    return (w = t.disabled) !== null && w !== void 0 ? w : o.value;
  }), $ = E(() => {
    var w;
    return (w = t.csp) !== null && w !== void 0 ? w : i.csp;
  }), I = E(() => {
    var w, M;
    return (w = t.wave) !== null && w !== void 0 ? w : (M = i.wave) === null || M === void 0 ? void 0 : M.value;
  });
  return {
    configProvider: i,
    prefixCls: r,
    direction: a,
    size: S,
    getTargetContainer: v,
    getPopupContainer: g,
    space: d,
    pageHeader: f,
    form: p,
    autoInsertSpaceInButton: u,
    renderEmpty: c,
    virtual: x,
    dropdownMatchSelectWidth: m,
    rootPrefixCls: s,
    getPrefixCls: i.getPrefixCls,
    autocomplete: C,
    csp: $,
    iconPrefixCls: l,
    disabled: P,
    select: i.select,
    wave: I
  };
});
function Bn(e, t) {
  const n = O({}, e);
  for (let o = 0; o < t.length; o += 1) {
    const i = t[o];
    delete n[i];
  }
  return n;
}
function g1(e) {
  return typeof e == "object" && e != null && e.nodeType === 1;
}
function v1(e, t) {
  return (!t || e !== "hidden") && e !== "visible" && e !== "clip";
}
function Ug(e, t) {
  if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
    var n = getComputedStyle(e, null);
    return v1(n.overflowY, t) || v1(n.overflowX, t) || (function(o) {
      var i = (function(r) {
        if (!r.ownerDocument || !r.ownerDocument.defaultView) return null;
        try {
          return r.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      })(o);
      return !!i && (i.clientHeight < o.scrollHeight || i.clientWidth < o.scrollWidth);
    })(e);
  }
  return !1;
}
function xf(e, t, n, o, i, r, a, l) {
  return r < e && a > t || r > e && a < t ? 0 : r <= e && l <= n || a >= t && l >= n ? r - e - o : a > t && l < n || r < e && l > n ? a - t + i : 0;
}
var m1 = function(e, t) {
  var n = window, o = t.scrollMode, i = t.block, r = t.inline, a = t.boundary, l = t.skipOverflowHiddenElements, s = typeof a == "function" ? a : function(Ke) {
    return Ke !== a;
  };
  if (!g1(e)) throw new TypeError("Invalid target");
  for (var u, c, d = document.scrollingElement || document.documentElement, f = [], p = e; g1(p) && s(p); ) {
    if ((p = (c = (u = p).parentElement) == null ? u.getRootNode().host || null : c) === d) {
      f.push(p);
      break;
    }
    p != null && p === document.body && Ug(p) && !Ug(document.documentElement) || p != null && Ug(p, l) && f.push(p);
  }
  for (var v = n.visualViewport ? n.visualViewport.width : innerWidth, g = n.visualViewport ? n.visualViewport.height : innerHeight, m = window.scrollX || pageXOffset, x = window.scrollY || pageYOffset, S = e.getBoundingClientRect(), C = S.height, P = S.width, $ = S.top, I = S.right, w = S.bottom, M = S.left, _ = i === "start" || i === "nearest" ? $ : i === "end" ? w : $ + C / 2, N = r === "center" ? M + P / 2 : r === "end" ? I : M, R = [], H = 0; H < f.length; H++) {
    var L = f[H], B = L.getBoundingClientRect(), A = B.height, G = B.width, j = B.top, Z = B.right, W = B.bottom, K = B.left;
    if (o === "if-needed" && $ >= 0 && M >= 0 && w <= g && I <= v && $ >= j && w <= W && M >= K && I <= Z) return R;
    var q = getComputedStyle(L), U = parseInt(q.borderLeftWidth, 10), ae = parseInt(q.borderTopWidth, 10), se = parseInt(q.borderRightWidth, 10), re = parseInt(q.borderBottomWidth, 10), ie = 0, te = 0, ve = "offsetWidth" in L ? L.offsetWidth - L.clientWidth - U - se : 0, ce = "offsetHeight" in L ? L.offsetHeight - L.clientHeight - ae - re : 0, fe = "offsetWidth" in L ? L.offsetWidth === 0 ? 0 : G / L.offsetWidth : 0, ge = "offsetHeight" in L ? L.offsetHeight === 0 ? 0 : A / L.offsetHeight : 0;
    if (d === L) ie = i === "start" ? _ : i === "end" ? _ - g : i === "nearest" ? xf(x, x + g, g, ae, re, x + _, x + _ + C, C) : _ - g / 2, te = r === "start" ? N : r === "center" ? N - v / 2 : r === "end" ? N - v : xf(m, m + v, v, U, se, m + N, m + N + P, P), ie = Math.max(0, ie + x), te = Math.max(0, te + m);
    else {
      ie = i === "start" ? _ - j - ae : i === "end" ? _ - W + re + ce : i === "nearest" ? xf(j, W, A, ae, re + ce, _, _ + C, C) : _ - (j + A / 2) + ce / 2, te = r === "start" ? N - K - U : r === "center" ? N - (K + G / 2) + ve / 2 : r === "end" ? N - Z + se + ve : xf(K, Z, G, U, se + ve, N, N + P, P);
      var Me = L.scrollLeft, ze = L.scrollTop;
      _ += ze - (ie = Math.max(0, Math.min(ze + ie / ge, L.scrollHeight - A / ge + ce))), N += Me - (te = Math.max(0, Math.min(Me + te / fe, L.scrollWidth - G / fe + ve)));
    }
    R.push({ el: L, top: ie, left: te });
  }
  return R;
};
function TI(e) {
  return e === Object(e) && Object.keys(e).length !== 0;
}
function q8(e, t) {
  t === void 0 && (t = "auto");
  var n = "scrollBehavior" in document.body.style;
  e.forEach(function(o) {
    var i = o.el, r = o.top, a = o.left;
    i.scroll && n ? i.scroll({
      top: r,
      left: a,
      behavior: t
    }) : (i.scrollTop = r, i.scrollLeft = a);
  });
}
function Y8(e) {
  return e === !1 ? {
    block: "end",
    inline: "nearest"
  } : TI(e) ? e : {
    block: "start",
    inline: "nearest"
  };
}
function G8(e, t) {
  var n = e.isConnected || e.ownerDocument.documentElement.contains(e);
  if (TI(t) && typeof t.behavior == "function")
    return t.behavior(n ? m1(e, t) : []);
  if (n) {
    var o = Y8(t);
    return q8(m1(e, o), o.behavior);
  }
}
function U8(e, t, n, o) {
  const i = n - t;
  return e /= o / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
}
function Rm(e) {
  return e != null && e === e.window;
}
function X8(e, t) {
  var n, o;
  if (typeof window > "u")
    return 0;
  const i = "scrollTop";
  let r = 0;
  return Rm(e) ? r = e.scrollY : e instanceof Document ? r = e.documentElement[i] : (e instanceof HTMLElement || e) && (r = e[i]), e && !Rm(e) && typeof r != "number" && (r = (o = ((n = e.ownerDocument) !== null && n !== void 0 ? n : e).documentElement) === null || o === void 0 ? void 0 : o[i]), r;
}
function Q8(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    getContainer: n = () => window,
    callback: o,
    duration: i = 450
  } = t, r = n(), a = X8(r), l = Date.now(), s = () => {
    const c = Date.now() - l, d = U8(c > i ? i : c, a, e, i);
    Rm(r) ? r.scrollTo(window.scrollX, d) : r instanceof Document ? r.documentElement.scrollTop = d : r.scrollTop = d, c < i ? Vt(s) : typeof o == "function" && o();
  };
  Vt(s);
}
function Z8(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 _I(e, t, n) {
  return n && Z8(e, n), e;
}
function ep() {
  return (ep = 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 EI(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
}
function DI(e, t) {
  if (e == null) return {};
  var n, o, i = {}, r = Object.keys(e);
  for (o = 0; o < r.length; o++) t.indexOf(n = r[o]) >= 0 || (i[n] = e[n]);
  return i;
}
function b1(e) {
  return ((t = e) != null && typeof t == "object" && Array.isArray(t) === !1) == 1 && Object.prototype.toString.call(e) === "[object Object]";
  var t;
}
var AI = Object.prototype, RI = AI.toString, J8 = AI.hasOwnProperty, NI = /^\s*function (\w+)/;
function y1(e) {
  var t, n = (t = e?.type) !== null && t !== void 0 ? t : e;
  if (n) {
    var o = n.toString().match(NI);
    return o ? o[1] : "";
  }
  return "";
}
var Ms = function(e) {
  var t, n;
  return b1(e) !== !1 && typeof (t = e.constructor) == "function" && b1(n = t.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
}, zI = function(e) {
  return e;
}, yi = zI;
if (process.env.NODE_ENV !== "production") {
  var e6 = typeof console < "u";
  yi = e6 ? function(e) {
    console.warn("[VueTypes warn]: " + e);
  } : zI;
}
var yd = function(e, t) {
  return J8.call(e, t);
}, t6 = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, Uu = Array.isArray || function(e) {
  return RI.call(e) === "[object Array]";
}, Xu = function(e) {
  return RI.call(e) === "[object Function]";
}, Dp = function(e) {
  return Ms(e) && yd(e, "_vueTypes_name");
}, BI = function(e) {
  return Ms(e) && (yd(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(t) {
    return yd(e, t);
  }));
};
function Xy(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function Bs(e, t, n) {
  var o, i = !0, r = "";
  o = Ms(e) ? e : { type: e };
  var a = Dp(o) ? o._vueTypes_name + " - " : "";
  if (BI(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && t === void 0) return i;
    Uu(o.type) ? (i = o.type.some(function(d) {
      return Bs(d, t) === !0;
    }), r = o.type.map(function(d) {
      return y1(d);
    }).join(" or ")) : i = (r = y1(o)) === "Array" ? Uu(t) : r === "Object" ? Ms(t) : r === "String" || r === "Number" || r === "Boolean" || r === "Function" ? (function(d) {
      if (d == null) return "";
      var f = d.constructor.toString().match(NI);
      return f ? f[1] : "";
    })(t) === r : t instanceof o.type;
  }
  if (!i) {
    var l = a + 'value "' + t + '" should be of type "' + r + '"';
    return l;
  }
  if (yd(o, "validator") && Xu(o.validator)) {
    var s = yi, u = [];
    if (yi = function(d) {
      u.push(d);
    }, i = o.validator(t), yi = s, !i) {
      var c = (u.length > 1 ? "* " : "") + u.join(`
* `);
      return u.length = 0, c;
    }
  }
  return i;
}
function Di(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 ? Xu(i) || Bs(this, i) === !0 ? (this.default = Uu(i) ? function() {
      return [].concat(i);
    } : Ms(i) ? function() {
      return Object.assign({}, i);
    } : i, this) : (yi(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  } } }), o = n.validator;
  return Xu(o) && (n.validator = Xy(o, n)), n;
}
function na(e, t) {
  var n = Di(e, t);
  return Object.defineProperty(n, "validate", { value: function(o) {
    return Xu(this.validator) && yi(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
` + JSON.stringify(this)), this.validator = Xy(o, this), this;
  } });
}
function x1(e, t, n) {
  var o, i, r = (o = t, i = {}, Object.getOwnPropertyNames(o).forEach(function(d) {
    i[d] = Object.getOwnPropertyDescriptor(o, d);
  }), Object.defineProperties({}, i));
  if (r._vueTypes_name = e, !Ms(n)) return r;
  var a, l, s = n.validator, u = DI(n, ["validator"]);
  if (Xu(s)) {
    var c = r.validator;
    c && (c = (l = (a = c).__original) !== null && l !== void 0 ? l : a), r.validator = Xy(c ? function(d) {
      return c.call(this, d) && s.call(this, d);
    } : s, r);
  }
  return Object.assign(r, u);
}
function _h(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
var n6 = function() {
  return na("any", {});
}, o6 = function() {
  return na("function", { type: Function });
}, i6 = function() {
  return na("boolean", { type: Boolean });
}, r6 = function() {
  return na("string", { type: String });
}, a6 = function() {
  return na("number", { type: Number });
}, l6 = function() {
  return na("array", { type: Array });
}, s6 = function() {
  return na("object", { type: Object });
}, u6 = function() {
  return Di("integer", { type: Number, validator: function(e) {
    return t6(e);
  } });
}, c6 = function() {
  return Di("symbol", { validator: function(e) {
    return typeof e == "symbol";
  } });
};
function d6(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 Di(e.name || "<<anonymous function>>", { validator: function(n) {
    var o = e(n);
    return o || yi(this._vueTypes_name + " - " + t), o;
  } });
}
function f6(e) {
  if (!Uu(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 r = i.constructor;
      o.indexOf(r) === -1 && o.push(r);
    }
    return o;
  }, []);
  return Di("oneOf", { type: n.length > 0 ? n : void 0, validator: function(o) {
    var i = e.indexOf(o) !== -1;
    return i || yi(t), i;
  } });
}
function p6(e) {
  if (!Uu(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 (BI(i)) {
      if (Dp(i) && i._vueTypes_name === "oneOf") {
        n = n.concat(i.type);
        continue;
      }
      if (Xu(i.validator) && (t = !0), i.type !== !0 && i.type) {
        n = n.concat(i.type);
        continue;
      }
    }
    n.push(i);
  }
  return n = n.filter(function(r, a) {
    return n.indexOf(r) === a;
  }), Di("oneOfType", t ? { type: n, validator: function(r) {
    var a = [], l = e.some(function(s) {
      var u = Bs(Dp(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, r);
      return typeof u == "string" && a.push(u), u === !0;
    });
    return l || yi("oneOfType - provided value does not match any of the " + a.length + ` passed-in validators:
` + _h(a.join(`
`))), l;
  } } : { type: n });
}
function h6(e) {
  return Di("arrayOf", { type: Array, validator: function(t) {
    var n, o = t.every(function(i) {
      return (n = Bs(e, i)) === !0;
    });
    return o || yi(`arrayOf - value validation error:
` + _h(n)), o;
  } });
}
function g6(e) {
  return Di("instanceOf", { type: e });
}
function v6(e) {
  return Di("objectOf", { type: Object, validator: function(t) {
    var n, o = Object.keys(t).every(function(i) {
      return (n = Bs(e, t[i])) === !0;
    });
    return o || yi(`objectOf - value validation error:
` + _h(n)), o;
  } });
}
function m6(e) {
  var t = Object.keys(e), n = t.filter(function(i) {
    var r;
    return !!(!((r = e[i]) === null || r === void 0) && r.required);
  }), o = Di("shape", { type: Object, validator: function(i) {
    var r = this;
    if (!Ms(i)) return !1;
    var a = Object.keys(i);
    if (n.length > 0 && n.some(function(s) {
      return a.indexOf(s) === -1;
    })) {
      var l = n.filter(function(s) {
        return a.indexOf(s) === -1;
      });
      return yi(l.length === 1 ? 'shape - required property "' + l[0] + '" is not defined.' : 'shape - required properties "' + l.join('", "') + '" are not defined.'), !1;
    }
    return a.every(function(s) {
      if (t.indexOf(s) === -1) return r._vueTypes_isLoose === !0 || (yi('shape - shape definition does not include a "' + s + '" property. Allowed keys: "' + t.join('", "') + '".'), !1);
      var u = Bs(e[s], i[s]);
      return typeof u == "string" && yi('shape - "' + s + `" property validation error:
 ` + _h(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 Wr = (function() {
  function e() {
  }
  return e.extend = function(t) {
    var n = this;
    if (Uu(t)) return t.forEach(function(d) {
      return n.extend(d);
    }), this;
    var o = t.name, i = t.validate, r = i !== void 0 && i, a = t.getter, l = a !== void 0 && a, s = DI(t, ["name", "validate", "getter"]);
    if (yd(this, o)) throw new TypeError('[VueTypes error]: Type "' + o + '" already defined');
    var u, c = s.type;
    return Dp(c) ? (delete s.type, Object.defineProperty(this, o, l ? { get: function() {
      return x1(o, c, s);
    } } : { value: function() {
      var d, f = x1(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 r ? na(o, d) : Di(o, d);
    }, enumerable: !0 } : { value: function() {
      var d, f, p = Object.assign({}, s);
      return d = r ? na(o, p) : Di(o, p), p.validator && (d.validator = (f = p.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
    }, enumerable: !0 }, Object.defineProperty(this, o, u));
  }, _I(e, null, [{ key: "any", get: function() {
    return n6();
  } }, { key: "func", get: function() {
    return o6().def(this.defaults.func);
  } }, { key: "bool", get: function() {
    return i6().def(this.defaults.bool);
  } }, { key: "string", get: function() {
    return r6().def(this.defaults.string);
  } }, { key: "number", get: function() {
    return a6().def(this.defaults.number);
  } }, { key: "array", get: function() {
    return l6().def(this.defaults.array);
  } }, { key: "object", get: function() {
    return s6().def(this.defaults.object);
  } }, { key: "integer", get: function() {
    return u6().def(this.defaults.integer);
  } }, { key: "symbol", get: function() {
    return c6();
  } }]), e;
})();
function FI(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 EI(o, n), _I(o, null, [{ key: "sensibleDefaults", get: function() {
      return ep({}, this.defaults);
    }, set: function(i) {
      this.defaults = i !== !1 ? ep({}, i !== !0 ? i : e) : {};
    } }]), o;
  })(Wr)).defaults = ep({}, e), t;
}
Wr.defaults = {}, Wr.custom = d6, Wr.oneOf = f6, Wr.instanceOf = g6, Wr.oneOfType = p6, Wr.arrayOf = h6, Wr.objectOf = v6, Wr.shape = m6, Wr.utils = { validate: function(e, t) {
  return Bs(t, e) === !0;
}, toType: function(e, t, n) {
  return n === void 0 && (n = !1), n ? na(e, t) : Di(e, t);
} };
(function(e) {
  function t() {
    return e.apply(this, arguments) || this;
  }
  return EI(t, e), t;
})(FI());
const pe = FI({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  array: void 0,
  object: void 0,
  integer: void 0
});
pe.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 b6(e) {
  return e.default = void 0, e;
}
const dn = ((e, t, n) => {
  vi(e, `[ant-design-vue: ${t}] ${n}`);
});
function w1(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 LI(e, t) {
  const {
    label: n,
    value: o,
    options: i
  } = e || {};
  return {
    label: n || (t ? "children" : "label"),
    value: o || "value",
    options: i || "options"
  };
}
function y6(e) {
  let {
    fieldNames: t,
    childrenAsData: n
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const o = [], {
    label: i,
    value: r,
    options: a
  } = LI(t, !1);
  function l(s, u) {
    s.forEach((c) => {
      const d = c[i];
      if (u || !(a in c)) {
        const f = c[r];
        o.push({
          key: w1(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: w1(c, o.length),
          group: !0,
          data: c,
          label: f
        }), l(c[a], !0);
      }
    });
  }
  return l(e, !1), o;
}
function Nm(e) {
  const t = O({}, e);
  return "props" in t || Object.defineProperty(t, "props", {
    get() {
      return wn(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
    }
  }), t;
}
function x6(e, t) {
  if (!t || !t.length)
    return null;
  let n = !1;
  function o(r, a) {
    let [l, ...s] = a;
    if (!l)
      return [r];
    const u = r.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 w6() {
  return "";
}
function S6(e) {
  return e ? e.ownerDocument : window.document;
}
function HI() {
}
const C6 = () => ({
  action: pe.oneOfType([pe.string, pe.arrayOf(pe.string)]).def([]),
  showAction: pe.any.def([]),
  hideAction: pe.any.def([]),
  getPopupClassNameFromAlign: pe.any.def(w6),
  onPopupVisibleChange: Function,
  afterPopupVisibleChange: pe.func.def(HI),
  popup: pe.any,
  arrow: pe.bool.def(!0),
  popupStyle: {
    type: Object,
    default: void 0
  },
  prefixCls: pe.string.def("rc-trigger-popup"),
  popupClassName: pe.string.def(""),
  popupPlacement: String,
  builtinPlacements: pe.object,
  popupTransitionName: String,
  popupAnimation: pe.any,
  mouseEnterDelay: pe.number.def(0),
  mouseLeaveDelay: pe.number.def(0.1),
  zIndex: Number,
  focusDelay: pe.number.def(0),
  blurDelay: pe.number.def(0.15),
  getPopupContainer: Function,
  getDocument: pe.func.def(S6),
  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: pe.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
}), Qy = {
  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
  }
}, $6 = O(O({}, Qy), {
  mobile: {
    type: Object
  }
}), P6 = O(O({}, Qy), {
  mask: Boolean,
  mobile: {
    type: Object
  },
  maskAnimation: String,
  maskTransitionName: String
});
function Zy(e) {
  let {
    prefixCls: t,
    animation: n,
    transitionName: o
  } = e;
  return n ? {
    name: `${t}-${n}`
  } : o ? {
    name: o
  } : {};
}
function VI(e) {
  const {
    prefixCls: t,
    visible: n,
    zIndex: o,
    mask: i,
    maskAnimation: r,
    maskTransitionName: a
  } = e;
  if (!i)
    return null;
  let l = {};
  return (a || r) && (l = Zy({
    prefixCls: t,
    transitionName: a,
    animation: r
  })), h(Ei, Q({
    appear: !0
  }, l), {
    default: () => [er(h("div", {
      style: {
        zIndex: o
      },
      class: `${t}-mask`
    }, null), [[TE("if"), n]])]
  });
}
VI.displayName = "Mask";
const O6 = be({
  compatConfig: {
    MODE: 3
  },
  name: "MobilePopupInner",
  inheritAttrs: !1,
  props: $6,
  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 r;
      const {
        zIndex: a,
        visible: l,
        prefixCls: s,
        mobile: {
          popupClassName: u,
          popupStyle: c,
          popupMotion: d = {},
          popupRender: f
        } = {}
      } = e, p = O({
        zIndex: a
      }, c);
      let v = go((r = o.default) === null || r === void 0 ? void 0 : r.call(o));
      v.length > 1 && (v = h("div", {
        class: `${s}-content`
      }, [v])), f && (v = f(v));
      const g = _e(s, u);
      return h(Ei, Q({
        ref: i
      }, d), {
        default: () => [l ? h("div", {
          class: g,
          style: p
        }, [v]) : null]
      });
    };
  }
});
var k6 = function(e, t, n, o) {
  function i(r) {
    return r instanceof n ? r : new n(function(a) {
      a(r);
    });
  }
  return new (n || (n = Promise))(function(r, a) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        a(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        a(d);
      }
    }
    function u(c) {
      c.done ? r(c.value) : i(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const S1 = ["measure", "align", null, "motion"], I6 = ((e, t) => {
  const n = $e(null), o = $e(), i = $e(!1);
  function r(s) {
    i.value || (n.value = s);
  }
  function a() {
    Vt.cancel(o.value);
  }
  function l(s) {
    a(), o.value = Vt(() => {
      let u = n.value;
      switch (n.value) {
        case "align":
          u = "motion";
          break;
        case "motion":
          u = "stable";
          break;
      }
      r(u), s?.();
    });
  }
  return Ie(e, () => {
    r("measure");
  }, {
    immediate: !0,
    flush: "post"
  }), At(() => {
    Ie(n, () => {
      switch (n.value) {
        case "measure":
          t();
          break;
      }
      n.value && (o.value = Vt(() => k6(void 0, void 0, void 0, function* () {
        const s = S1.indexOf(n.value), u = S1[s + 1];
        u && s !== -1 && r(u);
      })));
    }, {
      immediate: !0,
      flush: "post"
    });
  }), qt(() => {
    i.value = !0, a();
  }), [n, l];
}), M6 = ((e) => {
  const t = $e({
    width: 0,
    height: 0
  });
  function n(i) {
    t.value = {
      width: i.offsetWidth,
      height: i.offsetHeight
    };
  }
  return [E(() => {
    const i = {};
    if (e.value) {
      const {
        width: r,
        height: a
      } = t.value;
      e.value.indexOf("height") !== -1 && a ? i.height = `${a}px` : e.value.indexOf("minHeight") !== -1 && a && (i.minHeight = `${a}px`), e.value.indexOf("width") !== -1 && r ? i.width = `${r}px` : e.value.indexOf("minWidth") !== -1 && r && (i.minWidth = `${r}px`);
    }
    return i;
  }), n];
});
function C1(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 $1(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? C1(Object(n), !0).forEach(function(o) {
      T6(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : C1(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function zm(e) {
  "@babel/helpers - typeof";
  return zm = 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;
  }, zm(e);
}
function T6(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
var _c, _6 = {
  Webkit: "-webkit-",
  Moz: "-moz-",
  // IE did it wrong again ...
  ms: "-ms-",
  O: "-o-"
};
function Ap() {
  if (_c !== void 0)
    return _c;
  _c = "";
  var e = document.createElement("p").style, t = "Transform";
  for (var n in _6)
    n + t in e && (_c = n);
  return _c;
}
function jI() {
  return Ap() ? "".concat(Ap(), "TransitionProperty") : "transitionProperty";
}
function Eh() {
  return Ap() ? "".concat(Ap(), "Transform") : "transform";
}
function P1(e, t) {
  var n = jI();
  n && (e.style[n] = t, n !== "transitionProperty" && (e.style.transitionProperty = t));
}
function Xg(e, t) {
  var n = Eh();
  n && (e.style[n] = t, n !== "transform" && (e.style.transform = t));
}
function E6(e) {
  return e.style.transitionProperty || e.style[jI()];
}
function D6(e) {
  var t = window.getComputedStyle(e, null), n = t.getPropertyValue("transform") || t.getPropertyValue(Eh());
  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 A6 = /matrix\((.*)\)/, R6 = /matrix3d\((.*)\)/;
function N6(e, t) {
  var n = window.getComputedStyle(e, null), o = n.getPropertyValue("transform") || n.getPropertyValue(Eh());
  if (o && o !== "none") {
    var i, r = o.match(A6);
    if (r)
      r = r[1], i = r.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), i[4] = t.x, i[5] = t.y, Xg(e, "matrix(".concat(i.join(","), ")"));
    else {
      var a = o.match(R6)[1];
      i = a.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), i[12] = t.x, i[13] = t.y, Xg(e, "matrix3d(".concat(i.join(","), ")"));
    }
  } else
    Xg(e, "translateX(".concat(t.x, "px) translateY(").concat(t.y, "px) translateZ(0)"));
}
var z6 = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, Ed;
function O1(e) {
  var t = e.style.display;
  e.style.display = "none", e.offsetHeight, e.style.display = t;
}
function Tu(e, t, n) {
  var o = n;
  if (zm(t) === "object") {
    for (var i in t)
      t.hasOwnProperty(i) && Tu(e, i, t[i]);
    return;
  }
  if (typeof o < "u") {
    typeof o == "number" && (o = "".concat(o, "px")), e.style[t] = o;
    return;
  }
  return Ed(e, t);
}
function B6(e) {
  var t, n, o, i = e.ownerDocument, r = i.body, a = i && i.documentElement;
  return t = e.getBoundingClientRect(), n = Math.floor(t.left), o = Math.floor(t.top), n -= a.clientLeft || r.clientLeft || 0, o -= a.clientTop || r.clientTop || 0, {
    left: n,
    top: o
  };
}
function WI(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 KI(e) {
  return WI(e);
}
function qI(e) {
  return WI(e, !0);
}
function xd(e) {
  var t = B6(e), n = e.ownerDocument, o = n.defaultView || n.parentWindow;
  return t.left += KI(o), t.top += qI(o), t;
}
function Jy(e) {
  return e != null && e == e.window;
}
function YI(e) {
  return Jy(e) ? e.document : e.nodeType === 9 ? e : e.ownerDocument;
}
function F6(e, t, n) {
  var o = n, i = "", r = YI(e);
  return o = o || r.defaultView.getComputedStyle(e, null), o && (i = o.getPropertyValue(t) || o[t]), i;
}
var L6 = new RegExp("^(".concat(z6, ")(?!px)[a-z%]+$"), "i"), H6 = /^(top|right|bottom|left)$/, Qg = "currentStyle", Zg = "runtimeStyle", Zl = "left", V6 = "px";
function j6(e, t) {
  var n = e[Qg] && e[Qg][t];
  if (L6.test(n) && !H6.test(t)) {
    var o = e.style, i = o[Zl], r = e[Zg][Zl];
    e[Zg][Zl] = e[Qg][Zl], o[Zl] = t === "fontSize" ? "1em" : n || 0, n = o.pixelLeft + V6, o[Zl] = i, e[Zg][Zl] = r;
  }
  return n === "" ? "auto" : n;
}
typeof window < "u" && (Ed = window.getComputedStyle ? F6 : j6);
function wf(e, t) {
  return e === "left" ? t.useCssRight ? "right" : e : t.useCssBottom ? "bottom" : e;
}
function k1(e) {
  if (e === "left")
    return "right";
  if (e === "right")
    return "left";
  if (e === "top")
    return "bottom";
  if (e === "bottom")
    return "top";
}
function I1(e, t, n) {
  Tu(e, "position") === "static" && (e.style.position = "relative");
  var o = -999, i = -999, r = wf("left", n), a = wf("top", n), l = k1(r), s = k1(a);
  r !== "left" && (o = 999), a !== "top" && (i = 999);
  var u = "", c = xd(e);
  ("left" in t || "top" in t) && (u = E6(e) || "", P1(e, "none")), "left" in t && (e.style[l] = "", e.style[r] = "".concat(o, "px")), "top" in t && (e.style[s] = "", e.style[a] = "".concat(i, "px")), O1(e);
  var d = xd(e), f = {};
  for (var p in t)
    if (t.hasOwnProperty(p)) {
      var v = wf(p, n), g = p === "left" ? o : i, m = c[p] - d[p];
      v === p ? f[v] = g + m : f[v] = g - m;
    }
  Tu(e, f), O1(e), ("left" in t || "top" in t) && P1(e, u);
  var x = {};
  for (var S in t)
    if (t.hasOwnProperty(S)) {
      var C = wf(S, n), P = t[S] - c[S];
      S === C ? x[C] = f[C] + P : x[C] = f[C] - P;
    }
  Tu(e, x);
}
function W6(e, t) {
  var n = xd(e), o = D6(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), N6(e, i);
}
function K6(e, t, n) {
  if (n.ignoreShake) {
    var o = xd(e), i = o.left.toFixed(0), r = o.top.toFixed(0), a = t.left.toFixed(0), l = t.top.toFixed(0);
    if (i === a && r === l)
      return;
  }
  n.useCssRight || n.useCssBottom ? I1(e, t, n) : n.useCssTransform && Eh() in document.body.style ? W6(e, t) : I1(e, t, n);
}
function e0(e, t) {
  for (var n = 0; n < e.length; n++)
    t(e[n]);
}
function GI(e) {
  return Ed(e, "boxSizing") === "border-box";
}
var q6 = ["margin", "border", "padding"], Bm = -1, Y6 = 2, Fm = 1, G6 = 0;
function U6(e, t, n) {
  var o = {}, i = e.style, r;
  for (r in t)
    t.hasOwnProperty(r) && (o[r] = i[r], i[r] = t[r]);
  n.call(e);
  for (r in t)
    t.hasOwnProperty(r) && (i[r] = o[r]);
}
function Hc(e, t, n) {
  var o = 0, i, r, a;
  for (r = 0; r < t.length; r++)
    if (i = t[r], i)
      for (a = 0; a < n.length; a++) {
        var l = void 0;
        i === "border" ? l = "".concat(i).concat(n[a], "Width") : l = i + n[a], o += parseFloat(Ed(e, l)) || 0;
      }
  return o;
}
var Zr = {
  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;
  }
};
e0(["Width", "Height"], function(e) {
  Zr["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)],
      Zr["viewport".concat(e)](n)
    );
  }, Zr["viewport".concat(e)] = function(t) {
    var n = "client".concat(e), o = t.document, i = o.body, r = o.documentElement, a = r[n];
    return o.compatMode === "CSS1Compat" && a || i && i[n] || a;
  };
});
function M1(e, t, n) {
  var o = n;
  if (Jy(e))
    return t === "width" ? Zr.viewportWidth(e) : Zr.viewportHeight(e);
  if (e.nodeType === 9)
    return t === "width" ? Zr.docWidth(e) : Zr.docHeight(e);
  var i = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"], r = Math.floor(t === "width" ? e.getBoundingClientRect().width : e.getBoundingClientRect().height), a = GI(e), l = 0;
  (r == null || r <= 0) && (r = void 0, l = Ed(e, t), (l == null || Number(l) < 0) && (l = e.style[t] || 0), l = Math.floor(parseFloat(l)) || 0), o === void 0 && (o = a ? Fm : Bm);
  var s = r !== void 0 || a, u = r || l;
  return o === Bm ? s ? u - Hc(e, ["border", "padding"], i) : l : s ? o === Fm ? u : u + (o === Y6 ? -Hc(e, ["border"], i) : Hc(e, ["margin"], i)) : l + Hc(e, q6.slice(o), i);
}
var X6 = {
  position: "absolute",
  visibility: "hidden",
  display: "block"
};
function T1() {
  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 = M1.apply(void 0, t) : U6(i, X6, function() {
    o = M1.apply(void 0, t);
  }), o;
}
e0(["width", "height"], function(e) {
  var t = e.charAt(0).toUpperCase() + e.slice(1);
  Zr["outer".concat(t)] = function(o, i) {
    return o && T1(o, e, i ? G6 : Fm);
  };
  var n = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  Zr[e] = function(o, i) {
    var r = i;
    if (r !== void 0) {
      if (o) {
        var a = GI(o);
        return a && (r += Hc(o, ["padding", "border"], n)), Tu(o, e, r);
      }
      return;
    }
    return o && T1(o, e, Bm);
  };
});
function UI(e, t) {
  for (var n in t)
    t.hasOwnProperty(n) && (e[n] = t[n]);
  return e;
}
var Jt = {
  getWindow: function(t) {
    if (t && t.document && t.setTimeout)
      return t;
    var n = t.ownerDocument || t;
    return n.defaultView || n.parentWindow;
  },
  getDocument: YI,
  offset: function(t, n, o) {
    if (typeof n < "u")
      K6(t, n, o || {});
    else
      return xd(t);
  },
  isWindow: Jy,
  each: e0,
  css: Tu,
  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: UI,
  getWindowScrollLeft: function(t) {
    return KI(t);
  },
  getWindowScrollTop: function(t) {
    return qI(t);
  },
  merge: function() {
    for (var t = {}, n = 0; n < arguments.length; n++)
      Jt.mix(t, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
    return t;
  },
  viewportWidth: 0,
  viewportHeight: 0
};
UI(Jt, Zr);
var Jg = Jt.getParent;
function Lm(e) {
  if (Jt.isWindow(e) || e.nodeType === 9)
    return null;
  var t = Jt.getDocument(e), n = t.body, o, i = Jt.css(e, "position"), r = i === "fixed" || i === "absolute";
  if (!r)
    return e.nodeName.toLowerCase() === "html" ? null : Jg(e);
  for (o = Jg(e); o && o !== n && o.nodeType !== 9; o = Jg(o))
    if (i = Jt.css(o, "position"), i !== "static")
      return o;
  return null;
}
var _1 = Jt.getParent;
function Q6(e) {
  if (Jt.isWindow(e) || e.nodeType === 9)
    return !1;
  var t = Jt.getDocument(e), n = t.body, o = null;
  for (
    o = _1(e);
    // 修复元素位于 document.documentElement 下导致崩溃问题
    o && o !== n && o !== t;
    o = _1(o)
  ) {
    var i = Jt.css(o, "position");
    if (i === "fixed")
      return !0;
  }
  return !1;
}
function t0(e, t) {
  for (var n = {
    left: 0,
    right: 1 / 0,
    top: 0,
    bottom: 1 / 0
  }, o = Lm(e), i = Jt.getDocument(e), r = i.defaultView || i.parentWindow, a = 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 !== a && o !== l && Jt.css(o, "overflow") !== "visible") {
      var s = Jt.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 === a || o === l)
      break;
    o = Lm(o);
  }
  var u = null;
  if (!Jt.isWindow(e) && e.nodeType !== 9) {
    u = e.style.position;
    var c = Jt.css(e, "position");
    c === "absolute" && (e.style.position = "fixed");
  }
  var d = Jt.getWindowScrollLeft(r), f = Jt.getWindowScrollTop(r), p = Jt.viewportWidth(r), v = Jt.viewportHeight(r), g = l.scrollWidth, m = l.scrollHeight, x = window.getComputedStyle(a);
  if (x.overflowX === "hidden" && (g = r.innerWidth), x.overflowY === "hidden" && (m = r.innerHeight), e.style && (e.style.position = u), t || Q6(e))
    n.left = Math.max(n.left, d), n.top = Math.max(n.top, f), n.right = Math.min(n.right, d + p), n.bottom = Math.min(n.bottom, f + v);
  else {
    var S = Math.max(g, d + p);
    n.right = Math.min(n.right, S);
    var C = Math.max(m, f + v);
    n.bottom = Math.min(n.bottom, C);
  }
  return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
}
function Z6(e, t, n, o) {
  var i = Jt.clone(e), r = {
    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 + r.width > n.right && (r.width -= i.left + r.width - n.right), o.adjustX && i.left + r.width > n.right && (i.left = Math.max(n.right - r.width, n.left)), o.adjustY && i.top < n.top && (i.top = n.top), o.resizeHeight && i.top >= n.top && i.top + r.height > n.bottom && (r.height -= i.top + r.height - n.bottom), o.adjustY && i.top + r.height > n.bottom && (i.top = Math.max(n.bottom - r.height, n.top)), Jt.mix(i, r);
}
function n0(e) {
  var t, n, o;
  if (!Jt.isWindow(e) && e.nodeType !== 9)
    t = Jt.offset(e), n = Jt.outerWidth(e), o = Jt.outerHeight(e);
  else {
    var i = Jt.getWindow(e);
    t = {
      left: Jt.getWindowScrollLeft(i),
      top: Jt.getWindowScrollTop(i)
    }, n = Jt.viewportWidth(i), o = Jt.viewportHeight(i);
  }
  return t.width = n, t.height = o, t;
}
function E1(e, t) {
  var n = t.charAt(0), o = t.charAt(1), i = e.width, r = e.height, a = e.left, l = e.top;
  return n === "c" ? l += r / 2 : n === "b" && (l += r), o === "c" ? a += i / 2 : o === "r" && (a += i), {
    left: a,
    top: l
  };
}
function Sf(e, t, n, o, i) {
  var r = E1(t, n[1]), a = E1(e, n[0]), l = [a.left - r.left, a.top - r.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 D1(e, t, n) {
  return e.left < n.left || e.left + t.width > n.right;
}
function A1(e, t, n) {
  return e.top < n.top || e.top + t.height > n.bottom;
}
function J6(e, t, n) {
  return e.left > n.right || e.left + t.width < n.left;
}
function e5(e, t, n) {
  return e.top > n.bottom || e.top + t.height < n.top;
}
function Cf(e, t, n) {
  var o = [];
  return Jt.each(e, function(i) {
    o.push(i.replace(t, function(r) {
      return n[r];
    }));
  }), o;
}
function $f(e, t) {
  return e[t] = -e[t], e;
}
function R1(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 N1(e, t) {
  e[0] = R1(e[0], t.width), e[1] = R1(e[1], t.height);
}
function XI(e, t, n, o) {
  var i = n.points, r = n.offset || [0, 0], a = n.targetOffset || [0, 0], l = n.overflow, s = n.source || e;
  r = [].concat(r), a = [].concat(a), l = l || {};
  var u = {}, c = 0, d = !!(l && l.alwaysByViewport), f = t0(s, d), p = n0(s);
  N1(r, p), N1(a, t);
  var v = Sf(p, t, i, r, a), g = Jt.merge(p, v);
  if (f && (l.adjustX || l.adjustY) && o) {
    if (l.adjustX && D1(v, p, f)) {
      var m = Cf(i, /[lr]/gi, {
        l: "r",
        r: "l"
      }), x = $f(r, 0), S = $f(a, 0), C = Sf(p, t, m, x, S);
      J6(C, p, f) || (c = 1, i = m, r = x, a = S);
    }
    if (l.adjustY && A1(v, p, f)) {
      var P = Cf(i, /[tb]/gi, {
        t: "b",
        b: "t"
      }), $ = $f(r, 1), I = $f(a, 1), w = Sf(p, t, P, $, I);
      e5(w, p, f) || (c = 1, i = P, r = $, a = I);
    }
    c && (v = Sf(p, t, i, r, a), Jt.mix(g, v));
    var M = D1(v, p, f), _ = A1(v, p, f);
    if (M || _) {
      var N = i;
      M && (N = Cf(i, /[lr]/gi, {
        l: "r",
        r: "l"
      })), _ && (N = Cf(i, /[tb]/gi, {
        t: "b",
        b: "t"
      })), i = N, r = n.offset || [0, 0], a = n.targetOffset || [0, 0];
    }
    u.adjustX = l.adjustX && M, u.adjustY = l.adjustY && _, (u.adjustX || u.adjustY) && (g = Z6(v, p, f, u));
  }
  return g.width !== p.width && Jt.css(s, "width", Jt.width(s) + g.width - p.width), g.height !== p.height && Jt.css(s, "height", Jt.height(s) + g.height - p.height), Jt.offset(s, {
    left: g.left,
    top: g.top
  }, {
    useCssRight: n.useCssRight,
    useCssBottom: n.useCssBottom,
    useCssTransform: n.useCssTransform,
    ignoreShake: n.ignoreShake
  }), {
    points: i,
    offset: r,
    targetOffset: a,
    overflow: u
  };
}
function t5(e, t) {
  var n = t0(e, t), o = n0(e);
  return !n || o.left + o.width <= n.left || o.top + o.height <= n.top || o.left >= n.right || o.top >= n.bottom;
}
function o0(e, t, n) {
  var o = n.target || t, i = n0(o), r = !t5(o, n.overflow && n.overflow.alwaysByViewport);
  return XI(e, i, n, r);
}
o0.__getOffsetParent = Lm;
o0.__getVisibleRectForElement = t0;
function n5(e, t, n) {
  var o, i, r = Jt.getDocument(e), a = r.defaultView || r.parentWindow, l = Jt.getWindowScrollLeft(a), s = Jt.getWindowScrollTop(a), u = Jt.viewportWidth(a), c = Jt.viewportHeight(a);
  "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, p = [n.points[0], "cc"];
  return XI(e, d, $1($1({}, n), {}, {
    points: p
  }), f);
}
function Un(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 = Do(e)[0]), !i)
    return null;
  const r = _l(i, t, o);
  return r.props = n ? O(O({}, r.props), t) : r.props, wo(typeof r.props.class != "object", "class must be string"), r;
}
function o5(e, t, n) {
  El(_l(e, O({}, t)), n);
}
const QI = (e) => (e || []).some((t) => ci(t) ? !(t.type === MP || t.type === Je && !QI(t.children)) : !0) ? e : null;
function Dh(e, t, n, o) {
  var i;
  const r = (i = e[t]) === null || i === void 0 ? void 0 : i.call(e, n);
  return QI(r) ? r : o?.();
}
const Ah = ((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 i5(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 r5(e, t) {
  e !== document.activeElement && bl(t, e) && typeof e.focus == "function" && e.focus();
}
function z1(e, t) {
  let n = null, o = null;
  function i(a) {
    let [{
      target: l
    }] = a;
    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 r = new Nk(i);
  return e && r.observe(e), () => {
    r.disconnect();
  };
}
const a5 = ((e, t) => {
  let n = !1, o = null;
  function i() {
    clearTimeout(o);
  }
  function r(a) {
    if (!n || a === !0) {
      if (e() === !1)
        return;
      n = !0, i(), o = setTimeout(() => {
        n = !1;
      }, t.value);
    } else
      i(), o = setTimeout(() => {
        n = !1, r();
      }, t.value);
  }
  return [r, () => {
    n = !1, i();
  }];
}), l5 = {
  align: Object,
  target: [Object, Function],
  onAlign: Function,
  monitorBufferTime: Number,
  monitorWindowResize: Boolean,
  disabled: Boolean
};
function B1(e) {
  return typeof e != "function" ? null : e();
}
function F1(e) {
  return typeof e != "object" || !e ? null : e;
}
const s5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Align",
  props: l5,
  emits: ["align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = le({}), r = le(), [a, l] = a5(() => {
      const {
        disabled: f,
        target: p,
        align: v,
        onAlign: g
      } = e;
      if (!f && p && r.value) {
        const m = r.value;
        let x;
        const S = B1(p), C = F1(p);
        i.value.element = S, i.value.point = C, i.value.align = v;
        const {
          activeElement: P
        } = document;
        return S && Ah(S) ? x = o0(m, S, v) : C && (x = n5(m, C, v)), r5(P, m), g && x && g(m, x), !0;
      }
      return !1;
    }, E(() => e.monitorBufferTime)), s = le({
      cancel: () => {
      }
    }), u = le({
      cancel: () => {
      }
    }), c = () => {
      const f = e.target, p = B1(f), v = F1(f);
      r.value !== u.value.element && (u.value.cancel(), u.value.element = r.value, u.value.cancel = z1(r.value, a)), (i.value.element !== p || !i5(i.value.point, v) || !ey(i.value.align, e.align)) && (a(), s.value.element !== p && (s.value.cancel(), s.value.element = p, s.value.cancel = z1(p, a)));
    };
    At(() => {
      Yt(() => {
        c();
      });
    }), Ya(() => {
      Yt(() => {
        c();
      });
    }), Ie(() => e.disabled, (f) => {
      f ? l() : a();
    }, {
      immediate: !0,
      flush: "post"
    });
    const d = le(null);
    return Ie(() => e.monitorWindowResize, (f) => {
      f ? d.value || (d.value = Ho(window, "resize", a)) : d.value && (d.value.remove(), d.value = null);
    }, {
      flush: "post"
    }), Vo(() => {
      s.value.cancel(), u.value.cancel(), d.value && d.value.remove(), l();
    }), n({
      forceAlign: () => a(!0)
    }), () => {
      const f = o?.default();
      return f ? Un(f[0], {
        ref: r
      }, !0, !0) : null;
    };
  }
});
Mr("bottomLeft", "bottomRight", "topLeft", "topRight");
const u5 = (e) => e !== void 0 && (e === "topLeft" || e === "topRight") ? "slide-down" : "slide-up", Ts = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return O(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);
}, i0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return O(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);
}, Ka = (e, t, n) => n !== void 0 ? n : `${e}-${t}`, c5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "PopupInner",
  inheritAttrs: !1,
  props: Qy,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: i
    } = t;
    const r = $e(), a = $e(), l = $e(), [s, u] = M6(Kt(e, "stretch")), c = () => {
      e.stretch && u(e.getRootDomNode());
    }, d = $e(!1);
    let f;
    Ie(() => e.visible, (I) => {
      clearTimeout(f), I ? f = setTimeout(() => {
        d.value = e.visible;
      }) : d.value = !1;
    }, {
      immediate: !0
    });
    const [p, v] = I6(d, c), g = $e(), m = () => e.point ? e.point : e.getRootDomNode, x = () => {
      var I;
      (I = r.value) === null || I === void 0 || I.forceAlign();
    }, S = (I, w) => {
      var M;
      const _ = e.getClassNameFromAlign(w), N = l.value;
      l.value !== _ && (l.value = _), p.value === "align" && (N !== _ ? Promise.resolve().then(() => {
        x();
      }) : v(() => {
        var R;
        (R = g.value) === null || R === void 0 || R.call(g);
      }), (M = e.onAlign) === null || M === void 0 || M.call(e, I, w));
    }, C = E(() => {
      const I = typeof e.animation == "object" ? e.animation : Zy(e);
      return ["onAfterEnter", "onAfterLeave"].forEach((w) => {
        const M = I[w];
        I[w] = (_) => {
          v(), p.value = "stable", M?.(_);
        };
      }), I;
    }), P = () => new Promise((I) => {
      g.value = I;
    });
    Ie([C, p], () => {
      !C.value && p.value === "motion" && v();
    }, {
      immediate: !0
    }), n({
      forceAlign: x,
      getElement: () => a.value.$el || a.value
    });
    const $ = E(() => {
      var I;
      return !(!((I = e.align) === null || I === void 0) && I.points && (p.value === "align" || p.value === "stable"));
    });
    return () => {
      var I;
      const {
        zIndex: w,
        align: M,
        prefixCls: _,
        destroyPopupOnHide: N,
        onMouseenter: R,
        onMouseleave: H,
        onTouchstart: L = () => {
        },
        onMousedown: B
      } = e, A = p.value, G = [O(O({}, s.value), {
        zIndex: w,
        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 = go((I = i.default) === null || I === void 0 ? void 0 : I.call(i, {
        visible: e.visible
      }));
      j.length > 1 && (j = h("div", {
        class: `${_}-content`
      }, [j]));
      const Z = _e(_, o.class, l.value, !e.arrow && `${_}-arrow-hidden`), K = d.value || !e.visible ? Ts(C.value.name, C.value) : {};
      return h(Ei, Q(Q({
        ref: a
      }, K), {}, {
        onBeforeEnter: P
      }), {
        default: () => !N || e.visible ? er(h(s5, {
          target: m(),
          key: "popup",
          ref: r,
          monitorWindowResize: !0,
          disabled: $.value,
          align: M,
          onAlign: S
        }, {
          default: () => h("div", {
            class: Z,
            onMouseenter: R,
            onMouseleave: H,
            onMousedown: ui(B, ["capture"]),
            [Fo ? "onTouchstartPassive" : "onTouchstart"]: ui(L, ["capture"]),
            style: G
          }, [j])
        }), [[Or, d.value]]) : null
      });
    };
  }
}), d5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Popup",
  inheritAttrs: !1,
  props: P6,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i
    } = t;
    const r = $e(!1), a = $e(!1), l = $e(), s = $e();
    return Ie([() => e.visible, () => e.mobile], () => {
      r.value = e.visible, e.visible && e.mobile && (a.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 = O(O(O({}, e), n), {
        visible: r.value
      }), c = a.value ? h(O6, Q(Q({}, u), {}, {
        mobile: e.mobile,
        ref: l
      }), {
        default: o.default
      }) : h(c5, Q(Q({}, u), {}, {
        ref: l
      }), {
        default: o.default
      });
      return h("div", {
        ref: s
      }, [h(VI, u, null), c]);
    };
  }
});
function f5(e, t, n) {
  return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
}
function L1(e, t, n) {
  const o = e[t] || {};
  return O(O({}, o), n);
}
function p5(e, t, n, o) {
  const {
    points: i
  } = n, r = Object.keys(e);
  for (let a = 0; a < r.length; a += 1) {
    const l = r[a];
    if (f5(e[l].points, i, o))
      return `${t}-placement-${l}`;
  }
  return "";
}
const Dd = {
  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(ZF(this), O(O({}, this.$data), n));
        if (o === null)
          return;
        n = O(O({}, n), o || {});
      }
      O(this.$data, n), this._.isMounted && this.$forceUpdate(), Yt(() => {
        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));
    }
  }
}, ZI = Symbol("PortalContextKey"), r0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    inTriggerContext: !0
  };
  Ft(ZI, {
    inTriggerContext: t.inTriggerContext,
    shouldRender: E(() => {
      const {
        sPopupVisible: n,
        popupRef: o,
        forceRender: i,
        autoDestroy: r
      } = e || {};
      let a = !1;
      return (n || o || i) && (a = !0), !n && r && (a = !1), a;
    })
  });
}, h5 = () => {
  r0({}, {
    inTriggerContext: !1
  });
  const e = zt(ZI, {
    shouldRender: E(() => !1),
    inTriggerContext: !1
  });
  return {
    shouldRender: E(() => e.shouldRender.value || e.inTriggerContext === !1)
  };
}, JI = be({
  compatConfig: {
    MODE: 3
  },
  name: "Portal",
  inheritAttrs: !1,
  props: {
    getContainer: pe.func.isRequired,
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t, o = !0, i;
    const {
      shouldRender: r
    } = h5();
    function a() {
      r.value && (i = e.getContainer());
    }
    th(() => {
      o = !1, a();
    }), At(() => {
      i || a();
    });
    const l = Ie(r, () => {
      r.value && !i && (i = e.getContainer()), i && l();
    });
    return Ya(() => {
      Yt(() => {
        var s;
        r.value && ((s = e.didUpdate) === null || s === void 0 || s.call(e, e));
      });
    }), () => {
      var s;
      return r.value ? o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : i ? h(nh, {
        to: i
      }, n) : null : null;
    };
  }
});
let ev;
function Rp(e) {
  if (typeof document > "u")
    return 0;
  if (ev === 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 r = t.offsetWidth;
    i === r && (r = n.clientWidth), document.body.removeChild(n), ev = i - r;
  }
  return ev;
}
function H1(e) {
  const t = e.match(/^(.*)px$/), n = Number(t?.[1]);
  return Number.isNaN(n) ? Rp() : n;
}
function g5(e) {
  if (typeof document > "u" || !e || !(e instanceof Element))
    return {
      width: 0,
      height: 0
    };
  const {
    width: t,
    height: n
  } = getComputedStyle(e, "::-webkit-scrollbar");
  return {
    width: H1(t),
    height: H1(n)
  };
}
const v5 = `vc-util-locker-${Date.now()}`;
let V1 = 0;
function m5() {
  return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
function b5(e) {
  const t = E(() => !!e && !!e.value);
  V1 += 1;
  const n = `${v5}_${V1}`;
  It((o) => {
    if (xi()) {
      if (t.value) {
        const i = Rp(), r = m5();
        vd(`
html body {
  overflow-y: hidden;
  ${r ? `width: calc(100% - ${i}px);` : ""}
}`, n);
      } else
        _p(n);
      o(() => {
        _p(n);
      });
    }
  }, {
    flush: "post"
  });
}
let Jl = 0;
const tp = xi(), j1 = (e) => {
  if (!tp)
    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;
}, a0 = be({
  compatConfig: {
    MODE: 3
  },
  name: "PortalWrapper",
  inheritAttrs: !1,
  props: {
    wrapperClassName: String,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getContainer: pe.any,
    visible: {
      type: Boolean,
      default: void 0
    },
    autoLock: ct(),
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(), i = $e(), r = $e(), a = $e(1), l = xi() && document.createElement("div"), s = () => {
      var p, v;
      o.value === l && ((v = (p = o.value) === null || p === void 0 ? void 0 : p.parentNode) === null || v === void 0 || v.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 = j1(e.getContainer), u ? (u.appendChild(o.value), !0) : !1) : !0;
    }, d = () => tp ? (o.value || (o.value = l, c(!0)), f(), o.value) : null, f = () => {
      const {
        wrapperClassName: p
      } = e;
      o.value && p && p !== o.value.className && (o.value.className = p);
    };
    return Ya(() => {
      f(), c();
    }), b5(E(() => e.autoLock && e.visible && xi() && (o.value === document.body || o.value === l))), At(() => {
      let p = !1;
      Ie([() => e.visible, () => e.getContainer], (v, g) => {
        let [m, x] = v, [S, C] = g;
        tp && (u = j1(e.getContainer), u === document.body && (m && !S ? Jl += 1 : p && (Jl -= 1))), p && (typeof x == "function" && typeof C == "function" ? x.toString() !== C.toString() : x !== C) && s(), p = !0;
      }, {
        immediate: !0,
        flush: "post"
      }), Yt(() => {
        c() || (r.value = Vt(() => {
          a.value += 1;
        }));
      });
    }), qt(() => {
      const {
        visible: p
      } = e;
      tp && u === document.body && (Jl = p && Jl ? Jl - 1 : Jl), s(), Vt.cancel(r.value);
    }), () => {
      const {
        forceRender: p,
        visible: v
      } = e;
      let g = null;
      const m = {
        getOpenCount: () => Jl,
        getContainer: d
      };
      return a.value && (p || v || i.value) && (g = h(JI, {
        getContainer: d,
        ref: i,
        didUpdate: e.didUpdate
      }, {
        default: () => {
          var x;
          return (x = n.default) === null || x === void 0 ? void 0 : x.call(n, m);
        }
      })), g;
    };
  }
}), y5 = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], Ad = be({
  compatConfig: {
    MODE: 3
  },
  name: "Trigger",
  mixins: [Dd],
  inheritAttrs: !1,
  props: C6(),
  setup(e) {
    const t = E(() => {
      const {
        popupPlacement: i,
        popupAlign: r,
        builtinPlacements: a
      } = e;
      return i && a ? L1(a, i, r) : r;
    }), n = $e(null), o = (i) => {
      n.value = i;
    };
    return {
      vcTriggerContext: zt("vcTriggerContext", {}),
      popupRef: n,
      setPopupRef: o,
      triggerRef: $e(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, y5.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() {
    Ft("vcTriggerContext", {
      onPopupMouseDown: this.onPopupMouseDown,
      onPopupMouseenter: this.onPopupMouseenter,
      onPopupMouseleave: this.onPopupMouseleave
    }), r0(this);
  },
  deactivated() {
    this.setPopupVisible(!1);
  },
  mounted() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  updated() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  beforeUnmount() {
    this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), Vt.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 = Ho(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || e.getDocument(this.getRootDomNode()), this.touchOutsideHandler = Ho(n, "touchstart", this.onDocumentClick, Fo ? {
          passive: !1
        } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || e.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = Ho(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = Ho(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 && bl((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) {
      bl(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
      (!bl(n, t) || this.isContextMenuOnly()) && !bl(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 r = ((t = (e = this.triggerRef) === null || e === void 0 ? void 0 : e.$el) === null || t === void 0 ? void 0 : t.nodeName) === "#comment" ? null : Qr(this.triggerRef);
        return Qr(i(r));
      }
      try {
        const r = ((o = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || o === void 0 ? void 0 : o.nodeName) === "#comment" ? null : Qr(this.triggerRef);
        if (r)
          return r;
      } catch {
      }
      return Qr(this);
    },
    handleGetPopupClassFromAlign(e) {
      const t = [], n = this.$props, {
        popupPlacement: o,
        builtinPlacements: i,
        prefixCls: r,
        alignPoint: a,
        getPopupClassNameFromAlign: l
      } = n;
      return o && i && t.push(p5(i, r, e, a)), l && t.push(l(e)), t.join(" ");
    },
    getPopupAlign() {
      const e = this.$props, {
        popupPlacement: t,
        popupAlign: n,
        builtinPlacements: o
      } = e;
      return t && o ? L1(o, t, n) : n;
    },
    getComponent() {
      const e = {};
      this.isMouseEnterToShow() && (e.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (e.onMouseleave = this.onPopupMouseleave), e.onMousedown = this.onPopupMouseDown, e[Fo ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
      const {
        handleGetPopupClassFromAlign: t,
        getRootDomNode: n,
        $attrs: o
      } = this, {
        prefixCls: i,
        destroyPopupOnHide: r,
        popupClassName: a,
        popupAnimation: l,
        popupTransitionName: s,
        popupStyle: u,
        mask: c,
        maskAnimation: d,
        maskTransitionName: f,
        zIndex: p,
        stretch: v,
        alignPoint: g,
        mobile: m,
        arrow: x,
        forceRender: S
      } = this.$props, {
        sPopupVisible: C,
        point: P
      } = this.$data, $ = O(O({
        prefixCls: i,
        arrow: x,
        destroyPopupOnHide: r,
        visible: C,
        point: g ? P : null,
        align: this.align,
        animation: l,
        getClassNameFromAlign: t,
        stretch: v,
        getRootDomNode: n,
        mask: c,
        zIndex: p,
        transitionName: s,
        maskAnimation: d,
        maskTransitionName: f,
        class: a,
        style: u,
        onAlign: o.onPopupAlign || HI
      }, e), {
        ref: this.setPopupRef,
        mobile: m,
        forceRender: S
      });
      return h(d5, $, {
        default: this.$slots.popup || (() => Lk(this, "popup"))
      });
    },
    attachParent(e) {
      Vt.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 = Vt(() => {
        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 && (Ia(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 = Xw(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 = Do(Fk(this)), {
      alignPoint: n,
      getPopupContainer: o
    } = this.$props, i = t[0];
    this.childOriginEvents = Xw(i);
    const r = {
      key: "trigger"
    };
    this.isContextmenuToShow() ? r.onContextmenu = this.onContextmenu : r.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (r.onClick = this.onClick, r.onMousedown = this.onMousedown, r[Fo ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (r.onClick = this.createTwoChains("onClick"), r.onMousedown = this.createTwoChains("onMousedown"), r[Fo ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (r.onMouseenter = this.onMouseenter, n && (r.onMousemove = this.onMouseMove)) : r.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? r.onMouseleave = this.onMouseleave : r.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (r.onFocus = this.onFocus, r.onBlur = this.onBlur) : (r.onFocus = this.createTwoChains("onFocus"), r.onBlur = (u) => {
      u && (!u.relatedTarget || !bl(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
    });
    const a = _e(i && i.props && i.props.class, e.class);
    a && (r.class = a);
    const l = Un(i, O(O({}, r), {
      ref: "triggerRef"
    }), !0, !0), s = h(a0, {
      key: "portal",
      getContainer: o && (() => o(this.getRootDomNode())),
      didUpdate: this.handlePortalUpdate,
      visible: this.$data.sPopupVisible
    }, {
      default: this.getComponent
    });
    return h(Je, null, [l, s]);
  }
});
var x5 = 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 w5 = (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
      }
    }
  };
}, S5 = be({
  name: "SelectTrigger",
  inheritAttrs: !1,
  props: {
    dropdownAlign: Object,
    visible: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    dropdownClassName: String,
    dropdownStyle: pe.object,
    placement: String,
    empty: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    popupClassName: String,
    animation: String,
    transitionName: String,
    getPopupContainer: Function,
    dropdownRender: Function,
    containerWidth: Number,
    dropdownMatchSelectWidth: pe.oneOfType([Number, Boolean]).def(!0),
    popupElement: pe.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 r = E(() => {
      const {
        dropdownMatchSelectWidth: l
      } = e;
      return w5(l);
    }), a = le();
    return i({
      getPopupElement: () => a.value
    }), () => {
      const l = O(O({}, e), o), {
        empty: s = !1
      } = l, u = x5(l, ["empty"]), {
        visible: c,
        dropdownAlign: d,
        prefixCls: f,
        popupElement: p,
        dropdownClassName: v,
        dropdownStyle: g,
        direction: m = "ltr",
        placement: x,
        dropdownMatchSelectWidth: S,
        containerWidth: C,
        dropdownRender: P,
        animation: $,
        transitionName: I,
        getPopupContainer: w,
        getTriggerDOMNode: M,
        onPopupVisibleChange: _,
        onPopupMouseEnter: N,
        onPopupFocusin: R,
        onPopupFocusout: H
      } = u, L = `${f}-dropdown`;
      let B = p;
      P && (B = P({
        menuNode: p,
        props: e
      }));
      const A = $ ? `${L}-${$}` : I, G = O({
        minWidth: `${C}px`
      }, g);
      return typeof S == "number" ? G.width = `${S}px` : S && (G.width = `${C}px`), h(Ad, Q(Q({}, e), {}, {
        showAction: _ ? ["click"] : [],
        hideAction: _ ? ["click"] : [],
        popupPlacement: x || (m === "rtl" ? "bottomRight" : "bottomLeft"),
        builtinPlacements: r.value,
        prefixCls: L,
        popupTransitionName: A,
        popupAlign: d,
        popupVisible: c,
        getPopupContainer: w,
        popupClassName: _e(v, {
          [`${L}-empty`]: s
        }),
        popupStyle: G,
        getTriggerDOMNode: M,
        onPopupVisibleChange: _
      }), {
        default: n.default,
        popup: () => h("div", {
          ref: a,
          onMouseenter: N,
          onFocusin: R,
          onFocusout: H
        }, [B])
      });
    };
  }
}), rt = {
  /**
   * 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
}, _s = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  const {
    class: i,
    customizeIcon: r,
    customizeIconProps: a,
    onMousedown: l,
    onClick: s
  } = e;
  let u;
  return typeof r == "function" ? u = r(a) : u = ci(r) ? _l(r) : r, h("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 : h("span", {
    class: i.split(/\s+/).map((c) => `${c}-icon`)
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
};
_s.inheritAttrs = !1;
_s.displayName = "TransBtn";
_s.props = {
  class: String,
  customizeIcon: pe.any,
  customizeIconProps: pe.any,
  onMousedown: Function,
  onClick: Function
};
var C5 = 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 $5 = be({
  compatConfig: {
    MODE: 3
  },
  // inheritAttrs: false,
  props: {
    disabled: pe.looseBool,
    type: pe.string,
    value: pe.any,
    tag: {
      type: String,
      default: "input"
    },
    size: pe.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 = $e(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 = C5(e, ["tag", "value"]);
      return h(s, Q(Q({}, c), {}, {
        ref: o,
        value: u
      }), null);
    };
  }
});
function W1(e) {
  const t = e.getBoundingClientRect(), n = document.documentElement;
  return {
    left: t.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
    top: t.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  };
}
function P5(e) {
  return Object.keys(e).reduce((t, n) => {
    const o = e[n];
    return typeof o > "u" || o === null || (t += `${n}: ${e[n]};`), t;
  }, "");
}
var O5 = 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 = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: {
    disabled: pe.looseBool,
    type: pe.string,
    value: pe.any,
    lazy: pe.bool.def(!0),
    tag: {
      type: String,
      default: "input"
    },
    size: pe.string,
    style: pe.oneOfType([String, Object]),
    class: pe.string
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      expose: i
    } = t;
    const r = $e(null), a = le(), l = le(!1);
    Ie([() => e.value, l], () => {
      l.value || (a.value = e.value);
    }, {
      immediate: !0
    });
    const s = (w) => {
      n("change", w);
    }, u = (w) => {
      l.value = !0, w.target.composing = !0, n("compositionstart", w);
    }, c = (w) => {
      l.value = !1, w.target.composing = !1, n("compositionend", w);
      const M = document.createEvent("HTMLEvents");
      M.initEvent("input", !0, !0), w.target.dispatchEvent(M), s(w);
    }, d = (w) => {
      if (l.value && e.lazy) {
        a.value = w.target.value;
        return;
      }
      n("input", w);
    }, f = (w) => {
      n("blur", w);
    }, p = (w) => {
      n("focus", w);
    }, v = () => {
      r.value && r.value.focus();
    }, g = () => {
      r.value && r.value.blur();
    }, m = (w) => {
      n("keydown", w);
    }, x = (w) => {
      n("keyup", w);
    }, S = (w, M, _) => {
      var N;
      (N = r.value) === null || N === void 0 || N.setSelectionRange(w, M, _);
    }, C = () => {
      var w;
      (w = r.value) === null || w === void 0 || w.select();
    };
    i({
      focus: v,
      blur: g,
      input: E(() => {
        var w;
        return (w = r.value) === null || w === void 0 ? void 0 : w.input;
      }),
      setSelectionRange: S,
      select: C,
      getSelectionStart: () => {
        var w;
        return (w = r.value) === null || w === void 0 ? void 0 : w.getSelectionStart();
      },
      getSelectionEnd: () => {
        var w;
        return (w = r.value) === null || w === void 0 ? void 0 : w.getSelectionEnd();
      },
      getScrollTop: () => {
        var w;
        return (w = r.value) === null || w === void 0 ? void 0 : w.getScrollTop();
      }
    });
    const P = (w) => {
      n("mousedown", w);
    }, $ = (w) => {
      n("paste", w);
    }, I = E(() => e.style && typeof e.style != "string" ? P5(e.style) : e.style);
    return () => {
      const {
        style: w,
        lazy: M
      } = e, _ = O5(e, ["style", "lazy"]);
      return h($5, Q(Q(Q({}, _), o), {}, {
        style: I.value,
        onInput: d,
        onChange: s,
        onBlur: f,
        onFocus: p,
        ref: r,
        value: a.value,
        onCompositionstart: u,
        onCompositionend: c,
        onKeyup: x,
        onKeydown: m,
        onPaste: $,
        onMousedown: P
      }), null);
    };
  }
}), k5 = {
  inputRef: pe.any,
  prefixCls: String,
  id: String,
  inputElement: pe.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: pe.oneOfType([pe.number, pe.string]),
  /** Pass accessibility props to input */
  attrs: pe.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
  }
}, eM = be({
  compatConfig: {
    MODE: 3
  },
  name: "SelectInput",
  inheritAttrs: !1,
  props: k5,
  setup(e) {
    let t = null;
    const n = zt("VCSelectContainerEvent");
    return () => {
      var o;
      const {
        prefixCls: i,
        id: r,
        inputElement: a,
        disabled: l,
        tabindex: s,
        autofocus: u,
        autocomplete: c,
        editable: d,
        activeDescendantId: f,
        value: p,
        onKeydown: v,
        onMousedown: g,
        onChange: m,
        onPaste: x,
        onCompositionstart: S,
        onCompositionend: C,
        onFocus: P,
        onBlur: $,
        open: I,
        inputRef: w,
        attrs: M
      } = e;
      let _ = a || h(Rd, null, null);
      const N = _.props || {}, {
        onKeydown: R,
        onInput: H,
        onFocus: L,
        onBlur: B,
        onMousedown: A,
        onCompositionstart: G,
        onCompositionend: j,
        style: Z
      } = N;
      return _ = Un(_, O(O(O(O(O({
        type: "search"
      }, N), {
        id: r,
        ref: w,
        disabled: l,
        tabindex: s,
        lazy: !1,
        autocomplete: c || "off",
        autofocus: u,
        class: _e(`${i}-selection-search-input`, (o = _?.props) === null || o === void 0 ? void 0 : o.class),
        role: "combobox",
        "aria-expanded": I,
        "aria-haspopup": "listbox",
        "aria-owns": `${r}_list`,
        "aria-autocomplete": "list",
        "aria-controls": `${r}_list`,
        "aria-activedescendant": f
      }), M), {
        value: d ? p : "",
        readonly: !d,
        unselectable: d ? null : "on",
        style: O(O({}, Z), {
          opacity: d ? null : 0
        }),
        onKeydown: (W) => {
          v(W), R && R(W);
        },
        onMousedown: (W) => {
          g(W), A && A(W);
        },
        onInput: (W) => {
          m(W), H && H(W);
        },
        onCompositionstart(W) {
          S(W), G && G(W);
        },
        onCompositionend(W) {
          C(W), j && j(W);
        },
        onPaste: x,
        onFocus: function() {
          clearTimeout(t), L && L(arguments.length <= 0 ? void 0 : arguments[0]), P && P(arguments.length <= 0 ? void 0 : arguments[0]), n?.focus(arguments.length <= 0 ? void 0 : arguments[0]);
        },
        onBlur: function() {
          for (var W = arguments.length, K = new Array(W), q = 0; q < W; q++)
            K[q] = arguments[q];
          t = setTimeout(() => {
            B && B(K[0]), $ && $(K[0]), n?.blur(K[0]);
          }, 100);
        }
      }), _.type === "textarea" ? {} : {
        type: "search"
      }), !0, !0), _;
    };
  }
}), I5 = `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`, M5 = `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`, K1 = `${I5} ${M5}`.split(/[\s\n]+/), T5 = "aria-", _5 = "data-";
function q1(e, t) {
  return e.indexOf(t) === 0;
}
function Fs(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 = O({}, t);
  const o = {};
  return Object.keys(e).forEach((i) => {
    // Aria
    (n.aria && (i === "role" || q1(i, T5)) || // Data
    n.data && q1(i, _5) || // Attr
    n.attr && (K1.includes(i) || K1.includes(i.toLowerCase()))) && (o[i] = e[i]);
  }), o;
}
const tM = Symbol("OverflowContextProviderKey"), Hm = be({
  compatConfig: {
    MODE: 3
  },
  name: "OverflowContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(tM, E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), E5 = () => zt(tM, E(() => null));
var D5 = 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 ru = void 0, np = be({
  compatConfig: {
    MODE: 3
  },
  name: "Item",
  props: {
    prefixCls: String,
    item: pe.any,
    renderItem: Function,
    responsive: Boolean,
    itemKey: {
      type: [String, Number]
    },
    registerSize: Function,
    display: Boolean,
    order: Number,
    component: pe.any,
    invalidate: Boolean
  },
  setup(e, t) {
    let {
      slots: n,
      expose: o
    } = t;
    const i = E(() => e.responsive && !e.display), r = le();
    o({
      itemNodeRef: r
    });
    function a(l) {
      e.registerSize(e.itemKey, l);
    }
    return Vo(() => {
      a(null);
    }), () => {
      var l;
      const {
        prefixCls: s,
        invalidate: u,
        item: c,
        renderItem: d,
        responsive: f,
        registerSize: p,
        itemKey: v,
        display: g,
        order: m,
        component: x = "div"
      } = e, S = D5(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), C = (l = n.default) === null || l === void 0 ? void 0 : l.call(n), P = d && c !== ru ? d(c) : C;
      let $;
      u || ($ = {
        opacity: i.value ? 0 : 1,
        height: i.value ? 0 : ru,
        overflowY: i.value ? "hidden" : ru,
        order: f ? m : ru,
        pointerEvents: i.value ? "none" : ru,
        position: i.value ? "absolute" : ru
      });
      const I = {};
      return i.value && (I["aria-hidden"] = !0), h(Al, {
        disabled: !f,
        onResize: (w) => {
          let {
            offsetWidth: M
          } = w;
          a(M);
        }
      }, {
        default: () => h(x, Q(Q(Q({
          class: _e(!u && s),
          style: $
        }, I), S), {}, {
          ref: r
        }), {
          default: () => [P]
        })
      });
    };
  }
});
var tv = 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 A5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: !1,
  props: {
    component: pe.any,
    title: pe.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 = E5();
    return () => {
      var r;
      if (!i.value) {
        const {
          component: d = "div"
        } = e, f = tv(e, ["component"]);
        return h(d, Q(Q({}, f), o), {
          default: () => [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]
        });
      }
      const a = i.value, {
        className: l
      } = a, s = tv(a, ["className"]), {
        class: u
      } = o, c = tv(o, ["class"]);
      return h(Hm, {
        value: null
      }, {
        default: () => [h(np, Q(Q(Q({
          class: _e(l, u)
        }, s), c), e), n)]
      });
    };
  }
});
var R5 = 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 nM = "responsive", oM = "invalidate";
function N5(e) {
  return `+ ${e.length} ...`;
}
const z5 = () => ({
  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: pe.any,
  component: String,
  itemComponent: pe.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
}), za = be({
  name: "Overflow",
  inheritAttrs: !1,
  props: z5(),
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: i
    } = t;
    const r = E(() => e.ssr === "full"), a = $e(null), l = E(() => a.value || 0), s = $e(/* @__PURE__ */ new Map()), u = $e(0), c = $e(0), d = $e(0), f = $e(null), p = $e(null), v = E(() => p.value === null && r.value ? Number.MAX_SAFE_INTEGER : p.value || 0), g = $e(!1), m = E(() => `${e.prefixCls}-item`), x = E(() => Math.max(u.value, c.value)), S = E(() => !!(e.data.length && e.maxCount === nM)), C = E(() => e.maxCount === oM), P = E(() => S.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), $ = E(() => {
      let A = e.data;
      return S.value ? a.value === null && r.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;
    }), I = E(() => S.value ? e.data.slice(v.value + 1) : e.data.slice($.value.length)), w = (A, G) => {
      var j;
      return typeof e.itemKey == "function" ? e.itemKey(A) : (j = e.itemKey && A?.[e.itemKey]) !== null && j !== void 0 ? j : G;
    }, M = E(() => e.renderItem || ((A) => A)), _ = (A, G) => {
      p.value = A, G || (g.value = A < e.data.length - 1, o("visibleChange", A));
    }, N = (A, G) => {
      a.value = G.clientWidth;
    }, R = (A, G) => {
      const j = new Map(s.value);
      G === null ? j.delete(A) : j.set(A, G), s.value = j;
    }, H = (A, G) => {
      u.value = c.value, c.value = G;
    }, L = (A, G) => {
      d.value = G;
    }, B = (A) => s.value.get(w($.value[A], A));
    return Ie([l, s, c, d, () => e.itemKey, $], () => {
      if (l.value && x.value && $.value) {
        let A = d.value;
        const G = $.value.length, j = G - 1;
        if (!G) {
          _(0), f.value = null;
          return;
        }
        for (let Z = 0; Z < G; Z += 1) {
          const W = B(Z);
          if (W === void 0) {
            _(Z - 1, !0);
            break;
          }
          if (A += W, // Only one means `totalWidth` is the final width
          j === 0 && A <= l.value || // Last two width will be the final width
          Z === j - 1 && A + B(j) <= l.value) {
            _(j), f.value = null;
            break;
          } else if (A + x.value > l.value) {
            _(Z - 1), f.value = A - W - d.value + c.value;
            break;
          }
        }
        e.suffix && B(0) + d.value > l.value && (f.value = null);
      }
    }), () => {
      const A = g.value && !!I.value.length, {
        itemComponent: G,
        renderRawItem: j,
        renderRawRest: Z,
        renderRest: W,
        prefixCls: K = "rc-overflow",
        suffix: q,
        component: U = "div",
        id: ae,
        onMousedown: se
      } = e, {
        class: re,
        style: ie
      } = n, te = R5(n, ["class", "style"]);
      let ve = {};
      f.value !== null && S.value && (ve = {
        position: "absolute",
        left: `${f.value}px`,
        top: 0
      });
      const ce = {
        prefixCls: m.value,
        responsive: S.value,
        component: G,
        invalidate: C.value
      }, fe = j ? (Ke, He) => {
        const Re = w(Ke, He);
        return h(Hm, {
          key: Re,
          value: O(O({}, ce), {
            order: He,
            item: Ke,
            itemKey: Re,
            registerSize: R,
            display: He <= v.value
          })
        }, {
          default: () => [j(Ke, He)]
        });
      } : (Ke, He) => {
        const Re = w(Ke, He);
        return h(np, Q(Q({}, ce), {}, {
          order: He,
          key: Re,
          item: Ke,
          renderItem: M.value,
          itemKey: Re,
          registerSize: R,
          display: He <= v.value
        }), null);
      };
      let ge = () => null;
      const Me = {
        order: A ? v.value : Number.MAX_SAFE_INTEGER,
        className: `${m.value} ${m.value}-rest`,
        registerSize: H,
        display: A
      };
      if (Z)
        Z && (ge = () => h(Hm, {
          value: O(O({}, ce), Me)
        }, {
          default: () => [Z(I.value)]
        }));
      else {
        const Ke = W || N5;
        ge = () => h(np, Q(Q({}, ce), Me), {
          default: () => typeof Ke == "function" ? Ke(I.value) : Ke
        });
      }
      const ze = () => {
        var Ke;
        return h(U, Q({
          id: ae,
          class: _e(!C.value && K, re),
          style: ie,
          onMousedown: se,
          role: e.role
        }, te), {
          default: () => [$.value.map(fe), P.value ? ge() : null, q && h(np, Q(Q({}, ce), {}, {
            order: v.value,
            class: `${m.value}-suffix`,
            registerSize: L,
            display: !0,
            style: ve
          }), {
            default: () => q
          }), (Ke = i.default) === null || Ke === void 0 ? void 0 : Ke.call(i)]
        });
      };
      return h(Al, {
        disabled: !S.value,
        onResize: N
      }, {
        default: ze
      });
    };
  }
});
za.Item = A5;
za.RESPONSIVE = nM;
za.INVALIDATE = oM;
const B5 = Symbol("TreeSelectLegacyContextPropsKey");
function l0() {
  return zt(B5, {});
}
const F5 = {
  id: String,
  prefixCls: String,
  values: pe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: pe.any,
  placeholder: pe.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: pe.oneOfType([pe.number, pe.string]),
  compositionStatus: Boolean,
  removeIcon: pe.any,
  choiceTransitionName: String,
  maxTagCount: pe.oneOfType([pe.number, pe.string]),
  maxTagTextLength: Number,
  maxTagPlaceholder: pe.any.def(() => (e) => `+ ${e.length} ...`),
  tagRender: Function,
  onToggleOpen: {
    type: Function
  },
  onRemove: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, Y1 = (e) => {
  e.preventDefault(), e.stopPropagation();
}, L5 = be({
  name: "MultipleSelectSelector",
  inheritAttrs: !1,
  props: F5,
  setup(e) {
    const t = $e(), n = $e(0), o = $e(!1), i = l0(), r = E(() => `${e.prefixCls}-selection`), a = E(() => e.open || e.mode === "tags" ? e.searchValue : ""), l = E(() => e.mode === "tags" || e.showSearch && (e.open || o.value)), s = le("");
    It(() => {
      s.value = a.value;
    }), At(() => {
      Ie(s, () => {
        n.value = t.value.scrollWidth;
      }, {
        flush: "post",
        immediate: !0
      });
    });
    function u(v, g, m, x, S) {
      return h("span", {
        class: _e(`${r.value}-item`, {
          [`${r.value}-item-disabled`]: m
        }),
        title: typeof v == "string" || typeof v == "number" ? v.toString() : void 0
      }, [h("span", {
        class: `${r.value}-item-content`
      }, [g]), x && h(_s, {
        class: `${r.value}-item-remove`,
        onMousedown: Y1,
        onClick: S,
        customizeIcon: e.removeIcon
      }, {
        default: () => [Le("×")]
      })]);
    }
    function c(v, g, m, x, S, C) {
      var P;
      const $ = (w) => {
        Y1(w), e.onToggleOpen(!open);
      };
      let I = C;
      return i.keyEntities && (I = ((P = i.keyEntities[v]) === null || P === void 0 ? void 0 : P.node) || {}), h("span", {
        key: v,
        onMousedown: $
      }, [e.tagRender({
        label: g,
        value: v,
        disabled: m,
        closable: x,
        onClose: S,
        option: I
      })]);
    }
    function d(v) {
      const {
        disabled: g,
        label: m,
        value: x,
        option: S
      } = v, C = !e.disabled && !g;
      let P = m;
      if (typeof e.maxTagTextLength == "number" && (typeof m == "string" || typeof m == "number")) {
        const I = String(P);
        I.length > e.maxTagTextLength && (P = `${I.slice(0, e.maxTagTextLength)}...`);
      }
      const $ = (I) => {
        var w;
        I && I.stopPropagation(), (w = e.onRemove) === null || w === void 0 || w.call(e, v);
      };
      return typeof e.tagRender == "function" ? c(x, P, g, C, $, S) : u(m, P, g, C, $);
    }
    function f(v) {
      const {
        maxTagPlaceholder: g = (x) => `+ ${x.length} ...`
      } = e, m = typeof g == "function" ? g(v) : g;
      return u(m, m, !1);
    }
    const p = (v) => {
      const g = v.target.composing;
      s.value = v.target.value, g || e.onInputChange(v);
    };
    return () => {
      const {
        id: v,
        prefixCls: g,
        values: m,
        open: x,
        inputRef: S,
        placeholder: C,
        disabled: P,
        autofocus: $,
        autocomplete: I,
        activeDescendantId: w,
        tabindex: M,
        compositionStatus: _,
        onInputPaste: N,
        onInputKeyDown: R,
        onInputMouseDown: H,
        onInputCompositionStart: L,
        onInputCompositionEnd: B
      } = e, A = h("div", {
        class: `${r.value}-search`,
        style: {
          width: n.value + "px"
        },
        key: "input"
      }, [h(eM, {
        inputRef: S,
        open: x,
        prefixCls: g,
        id: v,
        inputElement: null,
        disabled: P,
        autofocus: $,
        autocomplete: I,
        editable: l.value,
        activeDescendantId: w,
        value: s.value,
        onKeydown: R,
        onMousedown: H,
        onChange: p,
        onPaste: N,
        onCompositionstart: L,
        onCompositionend: B,
        tabindex: M,
        attrs: Fs(e, !0),
        onFocus: () => o.value = !0,
        onBlur: () => o.value = !1
      }, null), h("span", {
        ref: t,
        class: `${r.value}-search-mirror`,
        "aria-hidden": !0
      }, [s.value, Le(" ")])]), G = h(za, {
        prefixCls: `${r.value}-overflow`,
        data: m,
        renderItem: d,
        renderRest: f,
        suffix: A,
        itemKey: "key",
        maxCount: e.maxTagCount,
        key: "overflow"
      }, null);
      return h(Je, null, [G, !m.length && !a.value && !_ && h("span", {
        class: `${r.value}-placeholder`
      }, [C])]);
    };
  }
}), H5 = {
  inputElement: pe.any,
  id: String,
  prefixCls: String,
  values: pe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: pe.any,
  placeholder: pe.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: pe.oneOfType([pe.number, pe.string]),
  activeValue: String,
  backfill: {
    type: Boolean,
    default: void 0
  },
  optionLabelRender: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, s0 = be({
  name: "SingleSelector",
  setup(e) {
    const t = $e(!1), n = E(() => e.mode === "combobox"), o = E(() => n.value || e.showSearch), i = E(() => {
      let c = e.searchValue || "";
      return n.value && e.activeValue && !t.value && (c = e.activeValue), c;
    }), r = l0();
    Ie([n, () => e.activeValue], () => {
      n.value && (t.value = !1);
    }, {
      immediate: !0
    });
    const a = E(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!i.value || e.compositionStatus), l = E(() => {
      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 = a.value ? {
        visibility: "hidden"
      } : void 0;
      return h("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, p;
      const {
        inputElement: v,
        prefixCls: g,
        id: m,
        values: x,
        inputRef: S,
        disabled: C,
        autofocus: P,
        autocomplete: $,
        activeDescendantId: I,
        open: w,
        tabindex: M,
        optionLabelRender: _,
        onInputKeyDown: N,
        onInputMouseDown: R,
        onInputPaste: H,
        onInputCompositionStart: L,
        onInputCompositionEnd: B
      } = e, A = x[0];
      let G = null;
      if (A && r.customSlots) {
        const j = (c = A.key) !== null && c !== void 0 ? c : A.value, Z = ((d = r.keyEntities[j]) === null || d === void 0 ? void 0 : d.node) || {};
        G = r.customSlots[(f = Z.slots) === null || f === void 0 ? void 0 : f.title] || r.customSlots.title || A.label, typeof G == "function" && (G = G(Z));
      } else
        G = _ && A ? _(A.option) : A?.label;
      return h(Je, null, [h("span", {
        class: `${g}-selection-search`
      }, [h(eM, {
        inputRef: S,
        prefixCls: g,
        id: m,
        open: w,
        inputElement: v,
        disabled: C,
        autofocus: P,
        autocomplete: $,
        editable: o.value,
        activeDescendantId: I,
        value: i.value,
        onKeydown: N,
        onMousedown: R,
        onChange: u,
        onPaste: H,
        onCompositionstart: L,
        onCompositionend: B,
        tabindex: M,
        attrs: Fs(e, !0)
      }, null)]), !n.value && A && !a.value && h("span", {
        class: `${g}-selection-item`,
        title: l.value
      }, [h(Je, {
        key: (p = A.key) !== null && p !== void 0 ? p : A.value
      }, [G])]), s()]);
    };
  }
});
s0.props = H5;
s0.inheritAttrs = !1;
function V5(e) {
  return ![
    // System function button
    rt.ESC,
    rt.SHIFT,
    rt.BACKSPACE,
    rt.TAB,
    rt.WIN_KEY,
    rt.ALT,
    rt.META,
    rt.WIN_KEY_RIGHT,
    rt.CTRL,
    rt.SEMICOLON,
    rt.EQUALS,
    rt.CAPS_LOCK,
    rt.CONTEXT_MENU,
    // F1-F12
    rt.F1,
    rt.F2,
    rt.F3,
    rt.F4,
    rt.F5,
    rt.F6,
    rt.F7,
    rt.F8,
    rt.F9,
    rt.F10,
    rt.F11,
    rt.F12
  ].includes(e);
}
function iM() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = null, n;
  qt(() => {
    clearTimeout(n);
  });
  function o(i) {
    (i || t === null) && (t = i), clearTimeout(n), n = setTimeout(() => {
      t = null;
    }, e);
  }
  return [() => t, o];
}
function wd() {
  const e = (t) => {
    e.current = t;
  };
  return e;
}
const j5 = be({
  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: pe.array,
    multiple: {
      type: Boolean,
      default: void 0
    },
    mode: String,
    searchValue: String,
    activeValue: String,
    inputElement: pe.any,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    activeDescendantId: String,
    tabindex: pe.oneOfType([pe.number, pe.string]),
    disabled: {
      type: Boolean,
      default: void 0
    },
    placeholder: pe.any,
    removeIcon: pe.any,
    // Tags
    maxTagCount: pe.oneOfType([pe.number, pe.string]),
    maxTagTextLength: Number,
    maxTagPlaceholder: pe.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 = wd(), i = le(!1), [r, a] = iM(0), l = (x) => {
      const {
        which: S
      } = x;
      (S === rt.UP || S === rt.DOWN) && x.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(x), S === rt.ENTER && e.mode === "tags" && !i.value && !e.open && e.onSearchSubmit(x.target.value), V5(S) && e.onToggleOpen(!0);
    }, s = () => {
      a(!0);
    };
    let u = null;
    const c = (x) => {
      e.onSearch(x, !0, i.value) !== !1 && e.onToggleOpen(!0);
    }, d = () => {
      i.value = !0;
    }, f = (x) => {
      i.value = !1, e.mode !== "combobox" && c(x.target.value);
    }, p = (x) => {
      let {
        target: {
          value: S
        }
      } = x;
      if (e.tokenWithEnter && u && /[\r\n]/.test(u)) {
        const C = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
        S = S.replace(C, u);
      }
      u = null, c(S);
    }, v = (x) => {
      const {
        clipboardData: S
      } = x;
      u = S.getData("text");
    }, g = (x) => {
      let {
        target: S
      } = x;
      S !== o.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
        o.current.focus();
      }) : o.current.focus());
    }, m = (x) => {
      const S = r();
      x.target !== o.current && !S && x.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !S) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
    };
    return n({
      focus: () => {
        o.current.focus();
      },
      blur: () => {
        o.current.blur();
      }
    }), () => {
      const {
        prefixCls: x,
        domRef: S,
        mode: C
      } = e, P = {
        inputRef: o,
        onInputKeyDown: l,
        onInputMouseDown: s,
        onInputChange: p,
        onInputPaste: v,
        compositionStatus: i.value,
        onInputCompositionStart: d,
        onInputCompositionEnd: f
      }, $ = C === "multiple" || C === "tags" ? h(L5, Q(Q({}, e), P), null) : h(s0, Q(Q({}, e), P), null);
      return h("div", {
        ref: S,
        class: `${x}-selector`,
        onClick: g,
        onMousedown: m
      }, [$]);
    };
  }
});
function W5(e, t, n) {
  function o(i) {
    var r, a, l;
    let s = i.target;
    s.shadowRoot && i.composed && (s = i.composedPath()[0] || s);
    const u = [(r = e[0]) === null || r === void 0 ? void 0 : r.value, (l = (a = e[1]) === null || a === void 0 ? void 0 : a.value) === null || l === void 0 ? void 0 : l.getPopupElement()];
    t.value && u.every((c) => c && !c.contains(s) && c !== s) && n(!1);
  }
  At(() => {
    window.addEventListener("mousedown", o);
  }), qt(() => {
    window.removeEventListener("mousedown", o);
  });
}
function K5() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  const t = $e(!1);
  let n;
  const o = () => {
    clearTimeout(n);
  };
  return At(() => {
    o();
  }), [t, (r, a) => {
    o(), n = setTimeout(() => {
      t.value = r, a && a();
    }, e);
  }, o];
}
const rM = Symbol("BaseSelectContextKey");
function q5(e) {
  return Ft(rM, e);
}
function Y5() {
  return zt(rM, {});
}
const u0 = (() => {
  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 aM(e) {
  if (!TP(e)) return $n(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 $n(t);
}
var G5 = 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 U5 = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], X5 = () => ({
  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: pe.any,
  /** Tell if provided `options` is empty */
  emptyOptions: Boolean
}), lM = () => ({
  showSearch: {
    type: Boolean,
    default: void 0
  },
  tagRender: {
    type: Function
  },
  optionLabelRender: {
    type: Function
  },
  direction: {
    type: String
  },
  // MISC
  tabindex: Number,
  autofocus: Boolean,
  notFoundContent: pe.any,
  placeholder: pe.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: pe.any,
  // >>> Search
  tokenSeparators: {
    type: Array
  },
  // >>> Icons
  allowClear: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: void 0
  },
  inputIcon: pe.any,
  /** Clear all icon */
  clearIcon: pe.any,
  /** Selector remove icon */
  removeIcon: pe.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
}), Q5 = () => O(O({}, X5()), lM());
function c0(e) {
  return e === "tags" || e === "multiple";
}
const Z5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "BaseSelect",
  inheritAttrs: !1,
  props: _n(Q5(), {
    showAction: [],
    notFoundContent: "Not Found"
  }),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: i
    } = t;
    const r = E(() => c0(e.mode)), a = E(() => e.showSearch !== void 0 ? e.showSearch : r.value || e.mode === "combobox"), l = $e(!1);
    At(() => {
      l.value = u0();
    });
    const s = l0(), u = $e(null), c = wd(), d = $e(null), f = $e(null), p = $e(null), v = le(!1), [g, m, x] = K5();
    o({
      focus: () => {
        var fe;
        (fe = f.value) === null || fe === void 0 || fe.focus();
      },
      blur: () => {
        var fe;
        (fe = f.value) === null || fe === void 0 || fe.blur();
      },
      scrollTo: (fe) => {
        var ge;
        return (ge = p.value) === null || ge === void 0 ? void 0 : ge.scrollTo(fe);
      }
    });
    const P = E(() => {
      var fe;
      if (e.mode !== "combobox")
        return e.searchValue;
      const ge = (fe = e.displayValues[0]) === null || fe === void 0 ? void 0 : fe.value;
      return typeof ge == "string" || typeof ge == "number" ? String(ge) : "";
    }), $ = e.open !== void 0 ? e.open : e.defaultOpen, I = $e($), w = $e($), M = (fe) => {
      I.value = e.open !== void 0 ? e.open : fe, w.value = I.value;
    };
    Ie(() => e.open, () => {
      M(e.open);
    });
    const _ = E(() => !e.notFoundContent && e.emptyOptions);
    It(() => {
      w.value = I.value, (e.disabled || _.value && w.value && e.mode === "combobox") && (w.value = !1);
    });
    const N = E(() => _.value ? !1 : w.value), R = (fe) => {
      const ge = fe !== void 0 ? fe : !w.value;
      w.value !== ge && !e.disabled && (M(ge), e.onDropdownVisibleChange && e.onDropdownVisibleChange(ge), !ge && U.value && (U.value = !1, m(!1, () => {
        K.value = !1, v.value = !1;
      })));
    }, H = E(() => (e.tokenSeparators || []).some((fe) => [`
`, `\r
`].includes(fe))), L = (fe, ge, Me) => {
      var ze, Ke;
      let He = !0, Re = fe;
      (ze = e.onActiveValueChange) === null || ze === void 0 || ze.call(e, null);
      const Xe = Me ? null : x6(fe, e.tokenSeparators);
      return e.mode !== "combobox" && Xe && (Re = "", (Ke = e.onSearchSplit) === null || Ke === void 0 || Ke.call(e, Xe), R(!1), He = !1), e.onSearch && P.value !== Re && e.onSearch(Re, {
        source: ge ? "typing" : "effect"
      }), He;
    }, B = (fe) => {
      var ge;
      !fe || !fe.trim() || (ge = e.onSearch) === null || ge === void 0 || ge.call(e, fe, {
        source: "submit"
      });
    };
    Ie(w, () => {
      !w.value && !r.value && e.mode !== "combobox" && L("", !1, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), Ie(() => e.disabled, () => {
      I.value && e.disabled && M(!1), e.disabled && !v.value && m(!1);
    }, {
      immediate: !0
    });
    const [A, G] = iM(), j = function(fe) {
      var ge;
      const Me = A(), {
        which: ze
      } = fe;
      if (ze === rt.ENTER && (e.mode !== "combobox" && fe.preventDefault(), w.value || R(!0)), G(!!P.value), ze === rt.BACKSPACE && !Me && r.value && !P.value && e.displayValues.length) {
        const Xe = [...e.displayValues];
        let De = null;
        for (let Be = Xe.length - 1; Be >= 0; Be -= 1) {
          const Ve = Xe[Be];
          if (!Ve.disabled) {
            Xe.splice(Be, 1), De = Ve;
            break;
          }
        }
        De && e.onDisplayValuesChange(Xe, {
          type: "remove",
          values: [De]
        });
      }
      for (var Ke = arguments.length, He = new Array(Ke > 1 ? Ke - 1 : 0), Re = 1; Re < Ke; Re++)
        He[Re - 1] = arguments[Re];
      w.value && p.value && p.value.onKeydown(fe, ...He), (ge = e.onKeydown) === null || ge === void 0 || ge.call(e, fe, ...He);
    }, Z = function(fe) {
      for (var ge = arguments.length, Me = new Array(ge > 1 ? ge - 1 : 0), ze = 1; ze < ge; ze++)
        Me[ze - 1] = arguments[ze];
      w.value && p.value && p.value.onKeyup(fe, ...Me), e.onKeyup && e.onKeyup(fe, ...Me);
    }, W = (fe) => {
      const ge = e.displayValues.filter((Me) => Me !== fe);
      e.onDisplayValuesChange(ge, {
        type: "remove",
        values: [fe]
      });
    }, K = $e(!1), q = function() {
      m(!0), e.disabled || (e.onFocus && !K.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && R(!0)), K.value = !0;
    }, U = le(!1), ae = function() {
      if (U.value || (v.value = !0, m(!1, () => {
        K.value = !1, v.value = !1, R(!1);
      }), e.disabled))
        return;
      const fe = P.value;
      fe && (e.mode === "tags" ? e.onSearch(fe, {
        source: "submit"
      }) : e.mode === "multiple" && e.onSearch("", {
        source: "blur"
      })), e.onBlur && e.onBlur(...arguments);
    }, se = () => {
      U.value = !0;
    }, re = () => {
      U.value = !1;
    };
    Ft("VCSelectContainerEvent", {
      focus: q,
      blur: ae
    });
    const ie = [];
    At(() => {
      ie.forEach((fe) => clearTimeout(fe)), ie.splice(0, ie.length);
    }), qt(() => {
      ie.forEach((fe) => clearTimeout(fe)), ie.splice(0, ie.length);
    });
    const te = function(fe) {
      var ge, Me;
      const {
        target: ze
      } = fe, Ke = (ge = d.value) === null || ge === void 0 ? void 0 : ge.getPopupElement();
      if (Ke && Ke.contains(ze)) {
        const De = setTimeout(() => {
          var Be;
          const Ve = ie.indexOf(De);
          Ve !== -1 && ie.splice(Ve, 1), x(), !l.value && !Ke.contains(document.activeElement) && ((Be = f.value) === null || Be === void 0 || Be.focus());
        });
        ie.push(De);
      }
      for (var He = arguments.length, Re = new Array(He > 1 ? He - 1 : 0), Xe = 1; Xe < He; Xe++)
        Re[Xe - 1] = arguments[Xe];
      (Me = e.onMousedown) === null || Me === void 0 || Me.call(e, fe, ...Re);
    }, ve = $e(null), ce = () => {
    };
    return At(() => {
      Ie(N, () => {
        var fe;
        if (N.value) {
          const ge = Math.ceil((fe = u.value) === null || fe === void 0 ? void 0 : fe.offsetWidth);
          ve.value !== ge && !Number.isNaN(ge) && (ve.value = ge);
        }
      }, {
        immediate: !0,
        flush: "post"
      });
    }), W5([u, d], N, R), q5(aM(O(O({}, ys(e)), {
      open: w,
      triggerOpen: N,
      showSearch: a,
      multiple: r,
      toggleOpen: R
    }))), () => {
      const fe = O(O({}, e), n), {
        prefixCls: ge,
        id: Me,
        open: ze,
        defaultOpen: Ke,
        mode: He,
        // Search related
        showSearch: Re,
        searchValue: Xe,
        onSearch: De,
        // Icons
        allowClear: Be,
        clearIcon: Ve,
        showArrow: ot,
        inputIcon: je,
        // Others
        disabled: Pe,
        loading: Ge,
        getInputElement: Se,
        getPopupContainer: Ce,
        placement: Ae,
        // Dropdown
        animation: qe,
        transitionName: We,
        dropdownStyle: tt,
        dropdownClassName: Ee,
        dropdownMatchSelectWidth: Ne,
        dropdownRender: Fe,
        dropdownAlign: it,
        showAction: pt,
        direction: at,
        // Tags
        tokenSeparators: ft,
        tagRender: wt,
        optionLabelRender: Ct,
        // Events
        onPopupScroll: St,
        onDropdownVisibleChange: bt,
        onFocus: Ot,
        onBlur: Wt,
        onKeyup: Xt,
        onKeydown: ln,
        onMousedown: pn,
        onClear: gt,
        omitDomProps: En,
        getRawInputElement: hn,
        displayValues: Wn,
        onDisplayValuesChange: lo,
        emptyOptions: Uo,
        activeDescendantId: Ue,
        activeValue: ht,
        OptionList: vt
      } = fe, Zt = G5(fe, ["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"]), Qn = He === "combobox" && Se && Se() || null, Xn = typeof hn == "function" && hn(), $o = O({}, Zt);
      let Sn;
      Xn && (Sn = (Zn) => {
        R(Zn);
      }), U5.forEach((Zn) => {
        delete $o[Zn];
      }), En?.forEach((Zn) => {
        delete $o[Zn];
      });
      const Mt = ot !== void 0 ? ot : Ge || !r.value && He !== "combobox";
      let fo;
      Mt && (fo = h(_s, {
        class: _e(`${ge}-arrow`, {
          [`${ge}-arrow-loading`]: Ge
        }),
        customizeIcon: je,
        customizeIconProps: {
          loading: Ge,
          searchValue: P.value,
          open: w.value,
          focused: g.value,
          showSearch: a.value
        }
      }, null));
      let zo;
      const un = () => {
        gt?.(), lo([], {
          type: "clear",
          values: Wn
        }), L("", !1, !1);
      };
      !Pe && Be && (Wn.length || P.value) && (zo = h(_s, {
        class: `${ge}-clear`,
        onMousedown: un,
        customizeIcon: Ve
      }, {
        default: () => [Le("×")]
      }));
      const Dn = h(vt, {
        ref: p
      }, O(O({}, s.customSlots), {
        option: i.option
      })), cn = _e(ge, n.class, {
        [`${ge}-focused`]: g.value,
        [`${ge}-multiple`]: r.value,
        [`${ge}-single`]: !r.value,
        [`${ge}-allow-clear`]: Be,
        [`${ge}-show-arrow`]: Mt,
        [`${ge}-disabled`]: Pe,
        [`${ge}-loading`]: Ge,
        [`${ge}-open`]: w.value,
        [`${ge}-customize-input`]: Qn,
        [`${ge}-show-search`]: a.value
      }), An = h(S5, {
        ref: d,
        disabled: Pe,
        prefixCls: ge,
        visible: N.value,
        popupElement: Dn,
        containerWidth: ve.value,
        animation: qe,
        transitionName: We,
        dropdownStyle: tt,
        dropdownClassName: Ee,
        direction: at,
        dropdownMatchSelectWidth: Ne,
        dropdownRender: Fe,
        dropdownAlign: it,
        placement: Ae,
        getPopupContainer: Ce,
        empty: Uo,
        getTriggerDOMNode: () => c.current,
        onPopupVisibleChange: Sn,
        onPopupMouseEnter: ce,
        onPopupFocusin: se,
        onPopupFocusout: re
      }, {
        default: () => Xn ? Ao(Xn) && Un(Xn, {
          ref: c
        }, !1, !0) : h(j5, Q(Q({}, e), {}, {
          domRef: c,
          prefixCls: ge,
          inputElement: Qn,
          ref: f,
          id: Me,
          showSearch: a.value,
          mode: He,
          activeDescendantId: Ue,
          tagRender: wt,
          optionLabelRender: Ct,
          values: Wn,
          open: w.value,
          onToggleOpen: R,
          activeValue: ht,
          searchValue: P.value,
          onSearch: L,
          onSearchSubmit: B,
          onRemove: W,
          tokenWithEnter: H.value
        }), null)
      });
      let Jo;
      return Xn ? Jo = An : Jo = h("div", Q(Q({}, $o), {}, {
        class: cn,
        ref: u,
        onMousedown: te,
        onKeydown: j,
        onKeyup: Z
      }), [g.value && !w.value && h("span", {
        style: {
          width: 0,
          height: 0,
          position: "absolute",
          overflow: "hidden",
          opacity: 0
        },
        "aria-live": "polite"
      }, [`${Wn.map((Zn) => {
        let {
          label: pi,
          value: jo
        } = Zn;
        return ["number", "string"].includes(typeof pi) ? pi : jo;
      }).join(", ")}`]), An, fo, zo]), Jo;
    };
  }
}), Rh = (e, t) => {
  let {
    height: n,
    offset: o,
    prefixCls: i,
    onInnerResize: r
  } = e, {
    slots: a
  } = t;
  var l;
  let s = {}, u = {
    display: "flex",
    flexDirection: "column"
  };
  return o !== void 0 && (s = {
    height: `${n}px`,
    position: "relative",
    overflow: "hidden"
  }, u = O(O({}, u), {
    transform: `translateY(${o}px)`,
    position: "absolute",
    left: 0,
    right: 0,
    top: 0
  })), h("div", {
    style: s
  }, [h(Al, {
    onResize: (c) => {
      let {
        offsetHeight: d
      } = c;
      d && r && r();
    }
  }, {
    default: () => [h("div", {
      style: u,
      class: _e({
        [`${i}-holder-inner`]: i
      })
    }, [(l = a.default) === null || l === void 0 ? void 0 : l.call(a)])]
  })]);
};
Rh.displayName = "Filter";
Rh.inheritAttrs = !1;
Rh.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 sM = (e, t) => {
  let {
    setRef: n
  } = e, {
    slots: o
  } = t;
  var i;
  const r = go((i = o.default) === null || i === void 0 ? void 0 : i.call(o));
  return r && r.length ? _l(r[0], {
    ref: n
  }) : r;
};
sM.props = {
  setRef: {
    type: Function,
    default: () => {
    }
  }
};
const J5 = 20;
function G1(e) {
  return "touches" in e ? e.touches[0].pageY : e.pageY;
}
const eH = be({
  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: wd(),
      thumbRef: wd(),
      visibleTimeout: null,
      state: $n({
        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, Fo ? {
      passive: !1
    } : !1), (t = this.thumbRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onMouseDown, Fo ? {
      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, Fo ? {
        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, Fo ? {
        passive: !1
      } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, Fo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, Fo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), Vt.cancel(this.moveRaf);
    },
    // ======================= Thumb =======================
    onMouseDown(e) {
      const {
        onStartMove: t
      } = this.$props;
      O(this.state, {
        dragging: !0,
        pageY: G1(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 (Vt.cancel(this.moveRaf), t) {
        const r = G1(e) - n, a = o + r, l = this.getEnableScrollRange(), s = this.getEnableHeightRange(), u = s ? a / s : 0, c = Math.ceil(u * l);
        this.moveRaf = Vt(() => {
          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, J5), 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", r = this.showScroll(), a = r && t;
    return h("div", {
      ref: this.scrollbarRef,
      class: _e(`${n}-scrollbar`, {
        [`${n}-scrollbar-show`]: r
      }),
      style: {
        width: "8px",
        top: 0,
        bottom: 0,
        right: 0,
        position: "absolute",
        display: a ? void 0 : "none"
      },
      onMousedown: this.onContainerMouseDown,
      onMousemove: this.delayHidden
    }, [h("div", {
      ref: this.thumbRef,
      class: _e(`${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 tH(e, t, n, o) {
  const i = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), a = le(Symbol("update"));
  Ie(e, () => {
    a.value = Symbol("update");
  });
  let l;
  function s() {
    Vt.cancel(l);
  }
  function u() {
    s(), l = Vt(() => {
      i.forEach((d, f) => {
        if (d && d.offsetParent) {
          const {
            offsetHeight: p
          } = d;
          r.get(f) !== p && (a.value = Symbol("update"), r.set(f, d.offsetHeight));
        }
      });
    });
  }
  function c(d, f) {
    const p = t(d);
    i.get(p), f ? (i.set(p, f.$el || f), u()) : i.delete(p);
  }
  return Vo(() => {
    s();
  }), [c, u, r, a];
}
function nH(e, t, n, o, i, r, a, l) {
  let s;
  return (u) => {
    if (u == null) {
      l();
      return;
    }
    Vt.cancel(s);
    const c = t.value, d = o.itemHeight;
    if (typeof u == "number")
      a(u);
    else if (u && typeof u == "object") {
      let f;
      const {
        align: p
      } = u;
      "index" in u ? {
        index: f
      } = u : f = c.findIndex((m) => i(m) === u.key);
      const {
        offset: v = 0
      } = u, g = (m, x) => {
        if (m < 0 || !e.value) return;
        const S = e.value.clientHeight;
        let C = !1, P = x;
        if (S) {
          const $ = x || p;
          let I = 0, w = 0, M = 0;
          const _ = Math.min(c.length, f);
          for (let H = 0; H <= _; H += 1) {
            const L = i(c[H]);
            w = I;
            const B = n.get(L);
            M = w + (B === void 0 ? d : B), I = M, H === f && B === void 0 && (C = !0);
          }
          const N = e.value.scrollTop;
          let R = null;
          switch ($) {
            case "top":
              R = w - v;
              break;
            case "bottom":
              R = M - S + v;
              break;
            default: {
              const H = N + S;
              w < N ? P = "top" : M > H && (P = "bottom");
            }
          }
          R !== null && R !== N && a(R);
        }
        s = Vt(() => {
          C && r(), g(m - 1, P);
        }, 2);
      };
      g(5);
    }
  };
}
const oH = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), uM = ((e, t) => {
  let n = !1, o = null;
  function i() {
    clearTimeout(o), n = !0, o = setTimeout(() => {
      n = !1;
    }, 50);
  }
  return function(r) {
    let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    const l = (
      // Pass origin wheel when on the top
      r < 0 && e.value || // Pass origin wheel when on the bottom
      r > 0 && t.value
    );
    return a && l ? (clearTimeout(o), n = !1) : (!l || n) && i(), !n && l;
  };
});
function iH(e, t, n, o) {
  let i = 0, r = null, a = null, l = !1;
  const s = uM(t, n);
  function u(d) {
    if (!e.value) return;
    Vt.cancel(r);
    const {
      deltaY: f
    } = d;
    i += f, a = f, !s(f) && (oH || d.preventDefault(), r = Vt(() => {
      o(i * (l ? 10 : 1)), i = 0;
    }));
  }
  function c(d) {
    e.value && (l = d.detail === a);
  }
  return [u, c];
}
const rH = 14 / 15;
function aH(e, t, n) {
  let o = !1, i = 0, r = null, a = null;
  const l = () => {
    r && (r.removeEventListener("touchmove", s), r.removeEventListener("touchend", u));
  }, s = (f) => {
    if (o) {
      const p = Math.ceil(f.touches[0].pageY);
      let v = i - p;
      i = p, n(v) && f.preventDefault(), clearInterval(a), a = setInterval(() => {
        v *= rH, (!n(v, !0) || Math.abs(v) <= 0.1) && clearInterval(a);
      }, 16);
    }
  }, u = () => {
    o = !1, l();
  }, c = (f) => {
    l(), f.touches.length === 1 && !o && (o = !0, i = Math.ceil(f.touches[0].pageY), r = f.target, r.addEventListener("touchmove", s, {
      passive: !1
    }), r.addEventListener("touchend", u));
  }, d = () => {
  };
  At(() => {
    document.addEventListener("touchmove", d, {
      passive: !1
    }), Ie(e, (f) => {
      t.value.removeEventListener("touchstart", c), l(), clearInterval(a), f && t.value.addEventListener("touchstart", c, {
        passive: !1
      });
    }, {
      immediate: !0
    });
  }), qt(() => {
    document.removeEventListener("touchmove", d);
  });
}
var lH = 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 sH = [], uH = {
  overflowY: "auto",
  overflowAnchor: "none"
};
function cH(e, t, n, o, i, r) {
  let {
    getKey: a
  } = r;
  return e.slice(t, n + 1).map((l, s) => {
    const u = t + s, c = i(l, u, {
      // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
    }), d = a(l);
    return h(sM, {
      key: d,
      setRef: (f) => o(l, f)
    }, {
      default: () => [c]
    });
  });
}
const cM = be({
  compatConfig: {
    MODE: 3
  },
  name: "List",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    data: pe.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 = E(() => {
      const {
        height: W,
        itemHeight: K,
        virtual: q
      } = e;
      return !!(q !== !1 && W && K);
    }), i = E(() => {
      const {
        height: W,
        itemHeight: K,
        data: q
      } = e;
      return o.value && q && K * q.length > W;
    }), r = $n({
      scrollTop: 0,
      scrollMoving: !1
    }), a = E(() => e.data || sH), l = $e([]);
    Ie(a, () => {
      l.value = di(a.value).slice();
    }, {
      immediate: !0
    });
    const s = $e((W) => {
    });
    Ie(() => e.itemKey, (W) => {
      typeof W == "function" ? s.value = W : s.value = (K) => K?.[W];
    }, {
      immediate: !0
    });
    const u = $e(), c = $e(), d = $e(), f = (W) => s.value(W), p = {
      getKey: f
    };
    function v(W) {
      let K;
      typeof W == "function" ? K = W(r.scrollTop) : K = W;
      const q = I(K);
      u.value && (u.value.scrollTop = q), r.scrollTop = q;
    }
    const [g, m, x, S] = tH(l, f), C = $n({
      scrollHeight: void 0,
      start: 0,
      end: 0,
      offset: void 0
    }), P = $e(0);
    At(() => {
      Yt(() => {
        var W;
        P.value = ((W = c.value) === null || W === void 0 ? void 0 : W.offsetHeight) || 0;
      });
    }), Ya(() => {
      Yt(() => {
        var W;
        P.value = ((W = c.value) === null || W === void 0 ? void 0 : W.offsetHeight) || 0;
      });
    }), Ie([o, l], () => {
      o.value || O(C, {
        scrollHeight: void 0,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      });
    }, {
      immediate: !0
    }), Ie([o, l, P, i], () => {
      o.value && !i.value && O(C, {
        scrollHeight: P.value,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      }), u.value && (r.scrollTop = u.value.scrollTop);
    }, {
      immediate: !0
    }), Ie([i, o, () => r.scrollTop, l, S, () => e.height, P], () => {
      if (!o.value || !i.value)
        return;
      let W = 0, K, q, U;
      const ae = l.value.length, se = l.value, re = r.scrollTop, {
        itemHeight: ie,
        height: te
      } = e, ve = re + te;
      for (let ce = 0; ce < ae; ce += 1) {
        const fe = se[ce], ge = f(fe);
        let Me = x.get(ge);
        Me === void 0 && (Me = ie);
        const ze = W + Me;
        K === void 0 && ze >= re && (K = ce, q = W), U === void 0 && ze > ve && (U = ce), W = ze;
      }
      K === void 0 && (K = 0, q = 0, U = Math.ceil(te / ie)), U === void 0 && (U = ae - 1), U = Math.min(U + 1, ae), O(C, {
        scrollHeight: W,
        start: K,
        end: U,
        offset: q
      });
    }, {
      immediate: !0
    });
    const $ = E(() => C.scrollHeight - e.height);
    function I(W) {
      let K = W;
      return Number.isNaN($.value) || (K = Math.min(K, $.value)), K = Math.max(K, 0), K;
    }
    const w = E(() => r.scrollTop <= 0), M = E(() => r.scrollTop >= $.value), _ = uM(w, M);
    function N(W) {
      v(W);
    }
    function R(W) {
      var K;
      const {
        scrollTop: q
      } = W.currentTarget;
      q !== r.scrollTop && v(q), (K = e.onScroll) === null || K === void 0 || K.call(e, W);
    }
    const [H, L] = iH(o, w, M, (W) => {
      v((K) => K + W);
    });
    aH(o, u, (W, K) => _(W, K) ? !1 : (H({
      preventDefault() {
      },
      deltaY: W
    }), !0));
    function B(W) {
      o.value && W.preventDefault();
    }
    const A = () => {
      u.value && (u.value.removeEventListener("wheel", H, Fo ? {
        passive: !1
      } : !1), u.value.removeEventListener("DOMMouseScroll", L), u.value.removeEventListener("MozMousePixelScroll", B));
    };
    It(() => {
      Yt(() => {
        u.value && (A(), u.value.addEventListener("wheel", H, Fo ? {
          passive: !1
        } : !1), u.value.addEventListener("DOMMouseScroll", L), u.value.addEventListener("MozMousePixelScroll", B));
      });
    }), qt(() => {
      A();
    });
    const G = nH(u, l, x, e, f, m, v, () => {
      var W;
      (W = d.value) === null || W === void 0 || W.delayHidden();
    });
    n({
      scrollTo: G
    });
    const j = E(() => {
      let W = null;
      return e.height && (W = O({
        [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
      }, uH), o.value && (W.overflowY = "hidden", r.scrollMoving && (W.pointerEvents = "none"))), W;
    });
    return Ie([() => C.start, () => C.end, l], () => {
      if (e.onVisibleChange) {
        const W = l.value.slice(C.start, C.end + 1);
        e.onVisibleChange(W, l.value);
      }
    }, {
      flush: "post"
    }), {
      state: r,
      mergedData: l,
      componentStyle: j,
      onFallbackScroll: R,
      onScrollBar: N,
      componentRef: u,
      useVirtual: o,
      calRes: C,
      collectHeight: m,
      setInstance: g,
      sharedConfig: p,
      scrollBarRef: d,
      fillerInnerRef: c,
      delayHideScrollBar: () => {
        var W;
        (W = d.value) === null || W === void 0 || W.delayHidden();
      }
    };
  },
  render() {
    const e = O(O({}, this.$props), this.$attrs), {
      prefixCls: t = "rc-virtual-list",
      height: n,
      itemHeight: o,
      // eslint-disable-next-line no-unused-vars
      fullHeight: i,
      data: r,
      itemKey: a,
      virtual: l,
      component: s = "div",
      onScroll: u,
      children: c = this.$slots.default,
      style: d,
      class: f
    } = e, p = lH(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), v = _e(t, f), {
      scrollTop: g
    } = this.state, {
      scrollHeight: m,
      offset: x,
      start: S,
      end: C
    } = this.calRes, {
      componentStyle: P,
      onFallbackScroll: $,
      onScrollBar: I,
      useVirtual: w,
      collectHeight: M,
      sharedConfig: _,
      setInstance: N,
      mergedData: R,
      delayHideScrollBar: H
    } = this;
    return h("div", Q({
      style: O(O({}, d), {
        position: "relative"
      }),
      class: v
    }, p), [h(s, {
      class: `${t}-holder`,
      style: P,
      ref: "componentRef",
      onScroll: $,
      onMouseenter: H
    }, {
      default: () => [h(Rh, {
        prefixCls: t,
        height: m,
        offset: x,
        onInnerResize: M,
        ref: "fillerInnerRef"
      }, {
        default: () => cH(R, S, C, N, c, _)
      })]
    }), w && h(eH, {
      ref: "scrollBarRef",
      prefixCls: t,
      scrollTop: g,
      height: n,
      scrollHeight: m,
      count: R.length,
      onScroll: I,
      onStartMove: () => {
        this.state.scrollMoving = !0;
      },
      onStopMove: () => {
        this.state.scrollMoving = !1;
      }
    }, null)]);
  }
});
function dM(e, t, n) {
  const o = le(e());
  return Ie(t, (i, r) => {
    n ? n(i, r) && (o.value = e()) : o.value = e();
  }), o;
}
function dH() {
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
const fM = Symbol("SelectContextKey");
function fH(e) {
  return Ft(fM, e);
}
function pH() {
  return zt(fM, {});
}
var hH = 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 U1(e) {
  return typeof e == "string" || typeof e == "number";
}
const gH = be({
  compatConfig: {
    MODE: 3
  },
  name: "OptionList",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const i = Y5(), r = pH(), a = E(() => `${i.prefixCls}-item`), l = dM(() => r.flattenOptions, [() => i.open, () => r.flattenOptions], ($) => $[0]), s = wd(), u = ($) => {
      $.preventDefault();
    }, c = ($) => {
      s.current && s.current.scrollTo(typeof $ == "number" ? {
        index: $
      } : $);
    }, d = function($) {
      let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      const w = l.value.length;
      for (let M = 0; M < w; M += 1) {
        const _ = ($ + M * I + w) % w, {
          group: N,
          data: R
        } = l.value[_];
        if (!N && !R.disabled)
          return _;
      }
      return -1;
    }, f = $n({
      activeIndex: d(0)
    }), p = function($) {
      let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      f.activeIndex = $;
      const w = {
        source: I ? "keyboard" : "mouse"
      }, M = l.value[$];
      if (!M) {
        r.onActiveValue(null, -1, w);
        return;
      }
      r.onActiveValue(M.value, $, w);
    };
    Ie([() => l.value.length, () => i.searchValue], () => {
      p(r.defaultActiveFirstOption !== !1 ? d(0) : -1);
    }, {
      immediate: !0
    });
    const v = ($) => r.rawValues.has($) && i.mode !== "combobox";
    Ie([() => i.open, () => i.searchValue], () => {
      if (!i.multiple && i.open && r.rawValues.size === 1) {
        const $ = Array.from(r.rawValues)[0], I = di(l.value).findIndex((w) => {
          let {
            data: M
          } = w;
          return M[r.fieldNames.value] === $;
        });
        I !== -1 && (p(I), Yt(() => {
          c(I);
        }));
      }
      i.open && Yt(() => {
        var $;
        ($ = s.current) === null || $ === void 0 || $.scrollTo(void 0);
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const g = ($) => {
      $ !== void 0 && r.onSelect($, {
        selected: !r.rawValues.has($)
      }), i.multiple || i.toggleOpen(!1);
    }, m = ($) => typeof $.label == "function" ? $.label() : $.label;
    function x($) {
      const I = l.value[$];
      if (!I) return null;
      const w = I.data || {}, {
        value: M
      } = w, {
        group: _
      } = I, N = Fs(w, !0), R = m(I);
      return I ? h("div", Q(Q({
        "aria-label": typeof R == "string" && !_ ? R : null
      }, N), {}, {
        key: $,
        role: _ ? "presentation" : "option",
        id: `${i.id}_list_${$}`,
        "aria-selected": v(M)
      }), [M]) : null;
    }
    return n({
      onKeydown: ($) => {
        const {
          which: I,
          ctrlKey: w
        } = $;
        switch (I) {
          // >>> Arrow keys & ctrl + n/p on Mac
          case rt.N:
          case rt.P:
          case rt.UP:
          case rt.DOWN: {
            let M = 0;
            if (I === rt.UP ? M = -1 : I === rt.DOWN ? M = 1 : dH() && w && (I === rt.N ? M = 1 : I === rt.P && (M = -1)), M !== 0) {
              const _ = d(f.activeIndex + M, M);
              c(_), p(_, !0);
            }
            break;
          }
          // >>> Select
          case rt.ENTER: {
            const M = l.value[f.activeIndex];
            M && !M.data.disabled ? g(M.value) : g(void 0), i.open && $.preventDefault();
            break;
          }
          // >>> Close
          case rt.ESC:
            i.toggleOpen(!1), i.open && $.stopPropagation();
        }
      },
      onKeyup: () => {
      },
      scrollTo: ($) => {
        c($);
      }
    }), () => {
      const {
        id: $,
        notFoundContent: I,
        onPopupScroll: w
      } = i, {
        menuItemSelectedIcon: M,
        fieldNames: _,
        virtual: N,
        listHeight: R,
        listItemHeight: H
      } = r, L = o.option, {
        activeIndex: B
      } = f, A = Object.keys(_).map((G) => _[G]);
      return l.value.length === 0 ? h("div", {
        role: "listbox",
        id: `${$}_list`,
        class: `${a.value}-empty`,
        onMousedown: u
      }, [I]) : h(Je, null, [h("div", {
        role: "listbox",
        id: `${$}_list`,
        style: {
          height: 0,
          width: 0,
          overflow: "hidden"
        }
      }, [x(B - 1), x(B), x(B + 1)]), h(cM, {
        itemKey: "key",
        ref: s,
        data: l.value,
        height: R,
        itemHeight: H,
        fullHeight: !1,
        onMousedown: u,
        onScroll: w,
        virtual: N
      }, {
        default: (G, j) => {
          var Z;
          const {
            group: W,
            groupOption: K,
            data: q,
            value: U
          } = G, {
            key: ae
          } = q, se = typeof G.label == "function" ? G.label() : G.label;
          if (W) {
            const Ve = (Z = q.title) !== null && Z !== void 0 ? Z : U1(se) && se;
            return h("div", {
              class: _e(a.value, `${a.value}-group`),
              title: Ve
            }, [L ? L(q) : se !== void 0 ? se : ae]);
          }
          const {
            disabled: re,
            title: ie,
            children: te,
            style: ve,
            class: ce,
            className: fe
          } = q, ge = hH(q, ["disabled", "title", "children", "style", "class", "className"]), Me = Bn(ge, A), ze = v(U), Ke = `${a.value}-option`, He = _e(a.value, Ke, ce, fe, {
            [`${Ke}-grouped`]: K,
            [`${Ke}-active`]: B === j && !re,
            [`${Ke}-disabled`]: re,
            [`${Ke}-selected`]: ze
          }), Re = m(G), Xe = !M || typeof M == "function" || ze, De = typeof Re == "number" ? Re : Re || U;
          let Be = U1(De) ? De.toString() : void 0;
          return ie !== void 0 && (Be = ie), h("div", Q(Q({}, Me), {}, {
            "aria-selected": ze,
            class: He,
            title: Be,
            onMousemove: (Ve) => {
              ge.onMousemove && ge.onMousemove(Ve), !(B === j || re) && p(j);
            },
            onClick: (Ve) => {
              re || g(U), ge.onClick && ge.onClick(Ve);
            },
            style: ve
          }), [h("div", {
            class: `${Ke}-content`
          }, [L ? L(q) : De]), Ao(M) || ze, Xe && h(_s, {
            class: `${a.value}-option-state`,
            customizeIcon: M,
            customizeIconProps: {
              isSelected: ze
            }
          }, {
            default: () => [ze ? "✓" : null]
          })]);
        }
      })]);
    };
  }
});
var vH = 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 mH(e) {
  const t = e, {
    key: n,
    children: o
  } = t, i = t.props, {
    value: r,
    disabled: a
  } = i, l = vH(i, ["value", "disabled"]), s = o?.default;
  return O({
    key: n,
    value: r !== void 0 ? r : n,
    children: s,
    disabled: a || a === ""
  }, l);
}
function d0(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return go(e).map((o, i) => {
    var r;
    if (!Ao(o) || !o.type)
      return null;
    const {
      type: {
        isSelectOptGroup: a
      },
      key: l,
      children: s,
      props: u
    } = o;
    if (t || !a)
      return mH(o);
    const c = s && s.default ? s.default() : void 0, d = u?.label || ((r = s.label) === null || r === void 0 ? void 0 : r.call(s)) || l;
    return O(O({
      key: `__RC_SELECT_GRP__${l === null ? i : String(l)}__`
    }, u), {
      label: d,
      options: d0(c || [])
    });
  }).filter((o) => o);
}
function bH(e, t, n) {
  const o = $e(), i = $e(), r = $e(), a = $e([]);
  return Ie([e, t], () => {
    e.value ? a.value = di(e.value).slice() : a.value = d0(t.value);
  }, {
    immediate: !0,
    deep: !0
  }), It(() => {
    const l = a.value, s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
    function d(f) {
      let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      for (let v = 0; v < f.length; v += 1) {
        const g = f[v];
        !g[c.options] || p ? (s.set(g[c.value], g), u.set(g[c.label], g)) : d(g[c.options], !0);
      }
    }
    d(l), o.value = l, i.value = s, r.value = u;
  }), {
    options: o,
    valueOptions: i,
    labelOptions: r
  };
}
let X1 = 0;
const yH = process.env.NODE_ENV !== "test" && xi();
function xH() {
  let e;
  return yH ? (e = X1, X1 += 1) : e = "TEST_OR_SSR", e;
}
function wH() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : le("");
  const t = `rc_select_${xH()}`;
  return e.value || t;
}
function f0(e) {
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
}
const SH = typeof window < "u" && window.document && window.document.documentElement;
process.env.NODE_ENV;
function CH(e) {
  const {
    mode: t,
    options: n,
    children: o,
    backfill: i,
    allowClear: r,
    placeholder: a,
    getInputElement: l,
    showSearch: s,
    onSearch: u,
    defaultOpen: c,
    autofocus: d,
    labelInValue: f,
    value: p,
    inputValue: v,
    optionLabelProp: g
  } = e, m = c0(t), x = s !== void 0 ? s : m || t === "combobox", S = n || d0(o);
  if (vi(t !== "tags" || S.every((C) => !C.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), vi(t !== "combobox" || !g, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), vi(t === "combobox" || !i, "`backfill` only works with `combobox` mode."), vi(t === "combobox" || !l, "`getInputElement` only work with `combobox` mode."), Cm(t !== "combobox" || !l || !r || !a, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !x && t !== "combobox" && t !== "tags" && vi(!1, "`onSearch` should work with `showSearch` instead of use alone."), Cm(!c || d, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), p != null) {
    const C = f0(p);
    vi(!f || C.every((P) => typeof P == "object" && ("key" in P || "value" in P)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), vi(!m || Array.isArray(p), "`value` should be array when `mode` is `multiple` or `tags`");
  }
  if (o) {
    let C = null;
    o.some((P) => {
      var $;
      if (!Ao(P) || !P.type)
        return !1;
      const {
        type: I
      } = P;
      return I.isSelectOption ? !1 : I.isSelectOptGroup ? !((($ = P.children) === null || $ === void 0 ? void 0 : $.default()) || []).every((_) => !Ao(_) || !P.type || _.type.isSelectOption ? !0 : (C = _.type, !1)) : (C = I, !0);
    }), C && vi(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${C.displayName || C.name || C}\`.`), vi(v === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  }
}
function nv(e, t) {
  return f0(e).join("").toUpperCase().includes(t);
}
const $H = ((e, t, n, o, i) => E(() => {
  const r = n.value, a = i?.value, l = o?.value;
  if (!r || l === !1)
    return e.value;
  const {
    options: s,
    label: u,
    value: c
  } = t.value, d = [], f = typeof l == "function", p = r.toUpperCase(), v = f ? l : (m, x) => a ? nv(x[a], p) : x[s] ? nv(x[u !== "children" ? u : "label"], p) : nv(x[c], p), g = f ? (m) => Nm(m) : (m) => m;
  return e.value.forEach((m) => {
    if (m[s]) {
      if (v(r, g(m)))
        d.push(m);
      else {
        const S = m[s].filter((C) => v(r, g(C)));
        S.length && d.push(O(O({}, m), {
          [s]: S
        }));
      }
      return;
    }
    v(r, g(m)) && d.push(m);
  }), d;
})), PH = ((e, t) => {
  const n = $e({
    values: /* @__PURE__ */ new Map(),
    options: /* @__PURE__ */ new Map()
  });
  return [E(() => {
    const {
      values: r,
      options: a
    } = n.value, l = e.value.map((c) => {
      var d;
      return c.label === void 0 ? O(O({}, c), {
        label: (d = r.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) || a.get(c.value));
    }), n.value.values = s, n.value.options = u, l;
  }), (r) => t.value.get(r) || n.value.options.get(r)];
});
function li(e, t) {
  const {
    defaultValue: n,
    value: o = le()
  } = t || {};
  let i = typeof e == "function" ? e() : e;
  o.value !== void 0 && (i = T(o)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  const r = le(i), a = le(i);
  It(() => {
    let s = o.value !== void 0 ? o.value : r.value;
    t.postState && (s = t.postState(s)), a.value = s;
  });
  function l(s) {
    const u = a.value;
    r.value = s, di(a.value) !== s && t.onChange && t.onChange(s, u);
  }
  return Ie(o, () => {
    r.value = o.value;
  }), [a, l];
}
function Cn(e) {
  const t = typeof e == "function" ? e() : e, n = le(t);
  function o(i) {
    n.value = i;
  }
  return [n, o];
}
const OH = ["inputValue"];
function pM() {
  return O(O({}, lM()), {
    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: pe.any,
    mode: String,
    labelInValue: {
      type: Boolean,
      default: void 0
    },
    value: pe.any,
    defaultValue: pe.any,
    onChange: Function,
    children: Array
  });
}
function kH(e) {
  return !e || typeof e != "object";
}
const IH = be({
  compatConfig: {
    MODE: 3
  },
  name: "VcSelect",
  inheritAttrs: !1,
  props: _n(pM(), {
    prefixCls: "vc-select",
    autoClearSearchValue: !0,
    listHeight: 200,
    listItemHeight: 20,
    dropdownMatchSelectWidth: !0
  }),
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: i
    } = t;
    const r = wH(Kt(e, "id")), a = E(() => c0(e.mode)), l = E(() => !!(!e.options && e.children)), s = E(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), u = E(() => LI(e.fieldNames, l.value)), [c, d] = li("", {
      value: E(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
      postState: (ce) => ce || ""
    }), f = bH(Kt(e, "options"), Kt(e, "children"), u), {
      valueOptions: p,
      labelOptions: v,
      options: g
    } = f, m = (ce) => f0(ce).map((ge) => {
      var Me, ze;
      let Ke, He, Re, Xe;
      kH(ge) ? Ke = ge : (Re = ge.key, He = ge.label, Ke = (Me = ge.value) !== null && Me !== void 0 ? Me : Re);
      const De = p.value.get(Ke);
      return De && (He === void 0 && (He = De?.[e.optionLabelProp || u.value.label]), Re === void 0 && (Re = (ze = De?.key) !== null && ze !== void 0 ? ze : Ke), Xe = De?.disabled), {
        label: He,
        value: Ke,
        key: Re,
        disabled: Xe,
        option: De
      };
    }), [x, S] = li(e.defaultValue, {
      value: Kt(e, "value")
    }), C = E(() => {
      var ce;
      const fe = m(x.value);
      return e.mode === "combobox" && !(!((ce = fe[0]) === null || ce === void 0) && ce.value) ? [] : fe;
    }), [P, $] = PH(C, p), I = E(() => {
      if (!e.mode && P.value.length === 1) {
        const ce = P.value[0];
        if (ce.value === null && (ce.label === null || ce.label === void 0))
          return [];
      }
      return P.value.map((ce) => {
        var fe;
        return O(O({}, ce), {
          label: (fe = typeof ce.label == "function" ? ce.label() : ce.label) !== null && fe !== void 0 ? fe : ce.value
        });
      });
    }), w = E(() => new Set(P.value.map((ce) => ce.value)));
    It(() => {
      var ce;
      if (e.mode === "combobox") {
        const fe = (ce = P.value[0]) === null || ce === void 0 ? void 0 : ce.value;
        fe != null && d(String(fe));
      }
    }, {
      flush: "post"
    });
    const M = (ce, fe) => {
      const ge = fe ?? ce;
      return {
        [u.value.value]: ce,
        [u.value.label]: ge
      };
    }, _ = $e();
    It(() => {
      if (e.mode !== "tags") {
        _.value = g.value;
        return;
      }
      const ce = g.value.slice(), fe = (ge) => p.value.has(ge);
      [...P.value].sort((ge, Me) => ge.value < Me.value ? -1 : 1).forEach((ge) => {
        const Me = ge.value;
        fe(Me) || ce.push(M(Me, ge.label));
      }), _.value = ce;
    });
    const N = $H(_, u, c, s, Kt(e, "optionFilterProp")), R = E(() => e.mode !== "tags" || !c.value || N.value.some((ce) => ce[e.optionFilterProp || "value"] === c.value) ? N.value : [M(c.value), ...N.value]), H = E(() => e.filterSort ? [...R.value].sort((ce, fe) => e.filterSort(ce, fe)) : R.value), L = E(() => y6(H.value, {
      fieldNames: u.value,
      childrenAsData: l.value
    })), B = (ce) => {
      const fe = m(ce);
      if (S(fe), e.onChange && // Trigger event only when value changed
      (fe.length !== P.value.length || fe.some((ge, Me) => {
        var ze;
        return ((ze = P.value[Me]) === null || ze === void 0 ? void 0 : ze.value) !== ge?.value;
      }))) {
        const ge = e.labelInValue ? fe.map((ze) => O(O({}, ze), {
          originLabel: ze.label,
          label: typeof ze.label == "function" ? ze.label() : ze.label
        })) : fe.map((ze) => ze.value), Me = fe.map((ze) => Nm($(ze.value)));
        e.onChange(
          // Value
          a.value ? ge : ge[0],
          // Option
          a.value ? Me : Me[0]
        );
      }
    }, [A, G] = Cn(null), [j, Z] = Cn(0), W = E(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), K = function(ce, fe) {
      let {
        source: ge = "keyboard"
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      Z(fe), e.backfill && e.mode === "combobox" && ce !== null && ge === "keyboard" && G(String(ce));
    }, q = (ce, fe) => {
      const ge = () => {
        var Me;
        const ze = $(ce), Ke = ze?.[u.value.label];
        return [e.labelInValue ? {
          label: typeof Ke == "function" ? Ke() : Ke,
          originLabel: Ke,
          value: ce,
          key: (Me = ze?.key) !== null && Me !== void 0 ? Me : ce
        } : ce, Nm(ze)];
      };
      if (fe && e.onSelect) {
        const [Me, ze] = ge();
        e.onSelect(Me, ze);
      } else if (!fe && e.onDeselect) {
        const [Me, ze] = ge();
        e.onDeselect(Me, ze);
      }
    }, U = (ce, fe) => {
      let ge;
      const Me = a.value ? fe.selected : !0;
      Me ? ge = a.value ? [...P.value, ce] : [ce] : ge = P.value.filter((ze) => ze.value !== ce), B(ge), q(ce, Me), e.mode === "combobox" ? G("") : (!a.value || e.autoClearSearchValue) && (d(""), G(""));
    }, ae = (ce, fe) => {
      B(ce), (fe.type === "remove" || fe.type === "clear") && fe.values.forEach((ge) => {
        q(ge.value, !1);
      });
    }, se = (ce, fe) => {
      var ge;
      if (d(ce), G(null), fe.source === "submit") {
        const Me = (ce || "").trim();
        if (Me) {
          const ze = Array.from(/* @__PURE__ */ new Set([...w.value, Me]));
          B(ze), q(Me, !0), d("");
        }
        return;
      }
      fe.source !== "blur" && (e.mode === "combobox" && B(ce), (ge = e.onSearch) === null || ge === void 0 || ge.call(e, ce));
    }, re = (ce) => {
      let fe = ce;
      e.mode !== "tags" && (fe = ce.map((Me) => {
        const ze = v.value.get(Me);
        return ze?.value;
      }).filter((Me) => Me !== void 0));
      const ge = Array.from(/* @__PURE__ */ new Set([...w.value, ...fe]));
      B(ge), ge.forEach((Me) => {
        q(Me, !0);
      });
    }, ie = E(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
    fH(aM(O(O({}, f), {
      flattenOptions: L,
      onActiveValue: K,
      defaultActiveFirstOption: W,
      onSelect: U,
      menuItemSelectedIcon: Kt(e, "menuItemSelectedIcon"),
      rawValues: w,
      fieldNames: u,
      virtual: ie,
      listHeight: Kt(e, "listHeight"),
      listItemHeight: Kt(e, "listItemHeight"),
      childrenAsData: l
    }))), process.env.NODE_ENV !== "production" && It(() => {
      CH(e);
    }, {
      flush: "post"
    });
    const te = le();
    n({
      focus() {
        var ce;
        (ce = te.value) === null || ce === void 0 || ce.focus();
      },
      blur() {
        var ce;
        (ce = te.value) === null || ce === void 0 || ce.blur();
      },
      scrollTo(ce) {
        var fe;
        (fe = te.value) === null || fe === void 0 || fe.scrollTo(ce);
      }
    });
    const ve = E(() => Bn(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 () => h(Z5, Q(Q(Q({}, ve.value), o), {}, {
      id: r,
      prefixCls: e.prefixCls,
      ref: te,
      omitDomProps: OH,
      mode: e.mode,
      displayValues: I.value,
      onDisplayValuesChange: ae,
      searchValue: c.value,
      onSearch: se,
      onSearchSplit: re,
      dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
      OptionList: gH,
      emptyOptions: !L.value.length,
      activeValue: A.value,
      activeDescendantId: `${r}_list_${j.value}`
    }), i);
  }
}), p0 = () => null;
p0.isSelectOption = !0;
p0.displayName = "ASelectOption";
const h0 = () => null;
h0.isSelectOptGroup = !0;
h0.displayName = "ASelectOptGroup";
var MH = { 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" }, TH = Symbol("iconContext"), hM = function() {
  return zt(TH, {
    prefixCls: le("anticon"),
    rootClassName: le(""),
    csp: le()
  });
};
function g0() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function _H(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
var Q1 = "data-vc-order", EH = "vc-icon-key", Vm = /* @__PURE__ */ new Map();
function gM() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mark;
  return t ? t.startsWith("data-") ? t : "data-".concat(t) : EH;
}
function v0(e) {
  if (e.attachTo)
    return e.attachTo;
  var t = document.querySelector("head");
  return t || document.body;
}
function DH(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function vM(e) {
  return Array.from((Vm.get(e) || e).children).filter(function(t) {
    return t.tagName === "STYLE";
  });
}
function mM(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!g0())
    return null;
  var n = t.csp, o = t.prepend, i = document.createElement("style");
  i.setAttribute(Q1, DH(o)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = e;
  var r = v0(t), a = r.firstChild;
  if (o) {
    if (o === "queue") {
      var l = vM(r).filter(function(s) {
        return ["prepend", "prependQueue"].includes(s.getAttribute(Q1));
      });
      if (l.length)
        return r.insertBefore(i, l[l.length - 1].nextSibling), i;
    }
    r.insertBefore(i, a);
  } else
    r.appendChild(i);
  return i;
}
function AH(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = v0(t);
  return vM(n).find(function(o) {
    return o.getAttribute(gM(t)) === e;
  });
}
function RH(e, t) {
  var n = Vm.get(e);
  if (!n || !_H(document, n)) {
    var o = mM("", t), i = o.parentNode;
    Vm.set(e, i), e.removeChild(o);
  }
}
function NH(e, t) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = v0(n);
  RH(o, n);
  var i = AH(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 r = mM(e, n);
  return r.setAttribute(gM(n), t), r;
}
function Z1(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) {
      zH(e, i, n[i]);
    });
  }
  return e;
}
function zH(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function BH(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
}
function FH(e, t) {
  BH(e, "[@ant-design/icons-vue] ".concat(t));
}
function J1(e) {
  return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
}
function jm(e, t, n) {
  return n ? ko(e.tag, Z1({
    key: t
  }, n, e.attrs), (e.children || []).map(function(o, i) {
    return jm(o, "".concat(t, "-").concat(e.tag, "-").concat(i));
  })) : ko(e.tag, Z1({
    key: t
  }, e.attrs), (e.children || []).map(function(o, i) {
    return jm(o, "".concat(t, "-").concat(e.tag, "-").concat(i));
  }));
}
function bM(e) {
  return Ha(e)[0];
}
function yM(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
var LH = `
.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 xM(e) {
  return e && e.getRootNode && e.getRootNode();
}
function HH(e) {
  return g0() ? xM(e) instanceof ShadowRoot : !1;
}
function VH(e) {
  return HH(e) ? xM(e) : null;
}
var jH = function() {
  var t = hM(), n = t.prefixCls, o = t.csp, i = fi(), r = LH;
  n && (r = r.replace(/anticon/g, n.value)), Yt(function() {
    if (g0()) {
      var a = i.vnode.el, l = VH(a);
      NH(r, "@ant-design-vue-icons", {
        prepend: !0,
        csp: o.value,
        attachTo: l
      });
    }
  });
}, WH = ["icon", "primaryColor", "secondaryColor"];
function KH(e, t) {
  if (e == null) return {};
  var n = qH(e, t), o, i;
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    for (i = 0; i < r.length; i++)
      o = r[i], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function qH(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), i, r;
  for (r = 0; r < o.length; r++)
    i = o[r], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
  return n;
}
function op(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) {
      YH(e, i, n[i]);
    });
  }
  return e;
}
function YH(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Zc = $n({
  primaryColor: "#333",
  secondaryColor: "#E6E6E6",
  calculated: !1
});
function GH(e) {
  var t = e.primaryColor, n = e.secondaryColor;
  Zc.primaryColor = t, Zc.secondaryColor = n || bM(t), Zc.calculated = !!n;
}
function UH() {
  return op({}, Zc);
}
var zl = function(t, n) {
  var o = op({}, t, n.attrs), i = o.icon, r = o.primaryColor, a = o.secondaryColor, l = KH(o, WH), s = Zc;
  if (r && (s = {
    primaryColor: r,
    secondaryColor: a || bM(r)
  }), FH(J1(i), "icon should be icon definiton, but got ".concat(i)), !J1(i))
    return null;
  var u = i;
  return u && typeof u.icon == "function" && (u = op({}, u, {
    icon: u.icon(s.primaryColor, s.secondaryColor)
  })), jm(u.icon, "svg-".concat(u.name), op({}, l, {
    "data-icon": u.name,
    width: "1em",
    height: "1em",
    fill: "currentColor",
    "aria-hidden": "true"
  }));
};
zl.props = {
  icon: Object,
  primaryColor: String,
  secondaryColor: String,
  focusable: String
};
zl.inheritAttrs = !1;
zl.displayName = "IconBase";
zl.getTwoToneColors = UH;
zl.setTwoToneColors = GH;
function XH(e, t) {
  return eV(e) || JH(e, t) || ZH(e, t) || QH();
}
function QH() {
  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 ZH(e, t) {
  if (e) {
    if (typeof e == "string") return eS(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 eS(e, t);
  }
}
function eS(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 JH(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], i = !0, r = !1, a, l;
    try {
      for (n = n.call(e); !(i = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); i = !0)
        ;
    } catch (s) {
      r = !0, l = s;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (r) throw l;
      }
    }
    return o;
  }
}
function eV(e) {
  if (Array.isArray(e)) return e;
}
function wM(e) {
  var t = yM(e), n = XH(t, 2), o = n[0], i = n[1];
  return zl.setTwoToneColors({
    primaryColor: o,
    secondaryColor: i
  });
}
function tV() {
  var e = zl.getTwoToneColors();
  return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
}
var nV = be({
  name: "InsertStyles",
  setup: function() {
    return jH(), function() {
      return null;
    };
  }
}), oV = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function iV(e, t) {
  return sV(e) || lV(e, t) || aV(e, t) || rV();
}
function rV() {
  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 aV(e, t) {
  if (e) {
    if (typeof e == "string") return tS(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 tS(e, t);
  }
}
function tS(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 lV(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], i = !0, r = !1, a, l;
    try {
      for (n = n.call(e); !(i = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); i = !0)
        ;
    } catch (s) {
      r = !0, l = s;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (r) throw l;
      }
    }
    return o;
  }
}
function sV(e) {
  if (Array.isArray(e)) return e;
}
function nS(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) {
      Vc(e, i, n[i]);
    });
  }
  return e;
}
function Vc(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function uV(e, t) {
  if (e == null) return {};
  var n = cV(e, t), o, i;
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    for (i = 0; i < r.length; i++)
      o = r[i], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function cV(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), i, r;
  for (r = 0; r < o.length; r++)
    i = o[r], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
  return n;
}
wM(S8.primary);
var an = function(t, n) {
  var o, i = nS({}, t, n.attrs), r = i.class, a = i.icon, l = i.spin, s = i.rotate, u = i.tabindex, c = i.twoToneColor, d = i.onClick, f = uV(i, oV), p = hM(), v = p.prefixCls, g = p.rootClassName, m = (o = {}, Vc(o, g.value, !!g.value), Vc(o, v.value, !0), Vc(o, "".concat(v.value, "-").concat(a.name), !!a.name), Vc(o, "".concat(v.value, "-spin"), !!l || a.name === "loading"), o), x = u;
  x === void 0 && d && (x = -1);
  var S = s ? {
    msTransform: "rotate(".concat(s, "deg)"),
    transform: "rotate(".concat(s, "deg)")
  } : void 0, C = yM(c), P = iV(C, 2), $ = P[0], I = P[1];
  return h("span", nS({
    role: "img",
    "aria-label": a.name
  }, f, {
    onClick: d,
    class: [m, r],
    tabindex: x
  }), [h(zl, {
    icon: a,
    primaryColor: $,
    secondaryColor: I,
    style: S
  }, null), h(nV, null, null)]);
};
an.props = {
  spin: Boolean,
  rotate: Number,
  icon: Object,
  twoToneColor: [String, Array]
};
an.displayName = "AntdIcon";
an.inheritAttrs = !1;
an.getTwoToneColor = tV;
an.setTwoToneColor = wM;
function oS(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) {
      dV(e, i, n[i]);
    });
  }
  return e;
}
function dV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Nd = function(t, n) {
  var o = oS({}, t, n.attrs);
  return h(an, oS({}, o, {
    icon: MH
  }), null);
};
Nd.displayName = "DownOutlined";
Nd.inheritAttrs = !1;
var fV = { 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 iS(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) {
      pV(e, i, n[i]);
    });
  }
  return e;
}
function pV(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 = iS({}, t, n.attrs);
  return h(an, iS({}, o, {
    icon: fV
  }), null);
};
_r.displayName = "LoadingOutlined";
_r.inheritAttrs = !1;
var hV = { 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 rS(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) {
      gV(e, i, n[i]);
    });
  }
  return e;
}
function gV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var m0 = function(t, n) {
  var o = rS({}, t, n.attrs);
  return h(an, rS({}, o, {
    icon: hV
  }), null);
};
m0.displayName = "CheckOutlined";
m0.inheritAttrs = !1;
var vV = { 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 aS(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) {
      mV(e, i, n[i]);
    });
  }
  return e;
}
function mV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var la = function(t, n) {
  var o = aS({}, t, n.attrs);
  return h(an, aS({}, o, {
    icon: vV
  }), null);
};
la.displayName = "CloseOutlined";
la.inheritAttrs = !1;
var bV = { 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 lS(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) {
      yV(e, i, n[i]);
    });
  }
  return e;
}
function yV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var zi = function(t, n) {
  var o = lS({}, t, n.attrs);
  return h(an, lS({}, o, {
    icon: bV
  }), null);
};
zi.displayName = "CloseCircleFilled";
zi.inheritAttrs = !1;
var xV = { 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 sS(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) {
      wV(e, i, n[i]);
    });
  }
  return e;
}
function wV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var zd = function(t, n) {
  var o = sS({}, t, n.attrs);
  return h(an, sS({}, o, {
    icon: xV
  }), null);
};
zd.displayName = "SearchOutlined";
zd.inheritAttrs = !1;
function SV(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    loading: n,
    multiple: o,
    prefixCls: i,
    hasFeedback: r,
    feedbackIcon: a,
    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 ?? h(zi, null, null), p = (x) => h(Je, null, [l !== !1 && x, r && a]);
  let v = null;
  if (s !== void 0)
    v = p(s);
  else if (n)
    v = p(h(_r, {
      spin: !0
    }, null));
  else {
    const x = `${i}-suffix`;
    v = (S) => {
      let {
        open: C,
        showSearch: P
      } = S;
      return p(C && P ? h(zd, {
        class: x
      }, null) : h(Nd, {
        class: x
      }, null));
    };
  }
  let g = null;
  c !== void 0 ? g = c : o ? g = h(m0, null, null) : g = null;
  let m = null;
  return d !== void 0 ? m = d : m = h(la, null, null), {
    clearIcon: f,
    suffixIcon: v,
    itemIcon: g,
    removeIcon: m
  };
}
function b0(e) {
  const t = Symbol("contextKey");
  return {
    useProvide: (i, r) => {
      const a = $n({});
      return Ft(t, a), It(() => {
        O(a, i, r || {});
      }), a;
    },
    useInject: () => zt(t, e) || {}
  };
}
const Np = Symbol("ContextProps"), zp = Symbol("InternalContextProps"), CV = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : E(() => !0);
  const n = le(/* @__PURE__ */ new Map()), o = (a, l) => {
    n.value.set(a, l), n.value = new Map(n.value);
  }, i = (a) => {
    n.value.delete(a), n.value = new Map(n.value);
  }, r = fi();
  Ie([t, n], () => {
    if (process.env.NODE_ENV !== "production" && t.value && n.value.size > 1) {
      dn(!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 a = r;
      for (; a.parent; )
        console.warn("at", a.type), a = a.parent;
    }
  }), Ft(Np, e), Ft(zp, {
    addFormItemField: o,
    removeFormItemField: i
  });
}, Wm = {
  id: E(() => {
  }),
  onFieldBlur: () => {
  },
  onFieldChange: () => {
  },
  clearValidate: () => {
  }
}, Km = {
  addFormItemField: () => {
  },
  removeFormItemField: () => {
  }
}, Bi = () => {
  const e = zt(zp, Km), t = Symbol("FormItemFieldKey"), n = fi();
  return e.addFormItemField(t, n.type), qt(() => {
    e.removeFormItemField(t);
  }), Ft(zp, Km), Ft(Np, Wm), zt(Np, Wm);
}, qm = be({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItemRest",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(zp, Km), Ft(Np, Wm), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), Ai = b0({}), Bp = be({
  name: "NoFormStatus",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ai.useProvide({}), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function $r(e, t, n) {
  return _e({
    [`${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 Ls = (e, t) => t || e, $V = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-block": {
        display: "flex",
        width: "100%"
      },
      "&-vertical": {
        flexDirection: "column"
      }
    }
  };
}, PV = (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"
        }
      }
    }
  };
}, SM = On("Space", (e) => [PV(e), $V(e)]), OV = () => ({
  compactSize: String,
  compactDirection: pe.oneOf(Mr("horizontal", "vertical")).def("horizontal"),
  isFirstItem: ct(),
  isLastItem: ct()
}), Nh = b0(null), fc = (e, t) => {
  const n = Nh.useInject(), o = E(() => {
    if (!n || RP(n)) return "";
    const {
      compactDirection: i,
      isFirstItem: r,
      isLastItem: a
    } = n, l = i === "vertical" ? "-vertical-" : "-";
    return _e({
      [`${e.value}-compact${l}item`]: !0,
      [`${e.value}-compact${l}first-item`]: r,
      [`${e.value}-compact${l}last-item`]: a,
      [`${e.value}-compact${l}item-rtl`]: t.value === "rtl"
    });
  });
  return {
    compactSize: E(() => n?.compactSize),
    compactDirection: E(() => n?.compactDirection),
    compactItemClassnames: o
  };
}, Sd = be({
  name: "NoCompactStyle",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Nh.useProvide(null), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), kV = () => ({
  prefixCls: String,
  size: {
    type: String
  },
  direction: pe.oneOf(Mr("horizontal", "vertical")).def("horizontal"),
  align: pe.oneOf(Mr("start", "end", "center", "baseline")),
  block: {
    type: Boolean,
    default: void 0
  }
}), IV = be({
  name: "CompactItem",
  props: OV(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Nh.useProvide(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), Ym = be({
  name: "ASpaceCompact",
  inheritAttrs: !1,
  props: kV(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: i,
      direction: r
    } = Rt("space-compact", e), a = Nh.useInject(), [l, s] = SM(i), u = E(() => _e(i.value, s.value, {
      [`${i.value}-rtl`]: r.value === "rtl",
      [`${i.value}-block`]: e.block,
      [`${i.value}-vertical`]: e.direction === "vertical"
    }));
    return () => {
      var c;
      const d = go(((c = o.default) === null || c === void 0 ? void 0 : c.call(o)) || []);
      return d.length === 0 ? null : l(h("div", Q(Q({}, n), {}, {
        class: [u.value, n.class]
      }), [d.map((f, p) => {
        var v;
        const g = f && f.key || `${i.value}-item-${p}`, m = !a || RP(a);
        return h(IV, {
          key: g,
          compactSize: (v = e.size) !== null && v !== void 0 ? v : "middle",
          compactDirection: e.direction,
          isFirstItem: p === 0 && (m || a?.isFirstItem),
          isLastItem: p === d.length - 1 && (m || a?.isLastItem)
        }, {
          default: () => [f]
        });
      })]));
    };
  }
}), MV = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), TV = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), zh = function(e, t, n, o) {
  const r = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  return {
    [`
      ${r}${e}-enter,
      ${r}${e}-appear
    `]: O(O({}, MV(o)), {
      animationPlayState: "paused"
    }),
    [`${r}${e}-leave`]: O(O({}, TV(o)), {
      animationPlayState: "paused"
    }),
    [`
      ${r}${e}-enter${e}-enter-active,
      ${r}${e}-appear${e}-appear-active
    `]: {
      animationName: t,
      animationPlayState: "running"
    },
    [`${r}${e}-leave${e}-leave-active`]: {
      animationName: n,
      animationPlayState: "running",
      pointerEvents: "none"
    }
  };
}, _V = new tn("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), EV = new tn("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
}), DV = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const {
    antCls: n
  } = e, o = `${n}-fade`, i = t ? "&" : "";
  return [zh(o, _V, EV, e.motionDurationMid, t), {
    [`
        ${i}${o}-enter,
        ${i}${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: "linear"
    },
    [`${i}${o}-leave`]: {
      animationTimingFunction: "linear"
    }
  }];
}, AV = new tn("antMoveDownIn", {
  "0%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), RV = new tn("antMoveDownOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), NV = new tn("antMoveLeftIn", {
  "0%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), zV = new tn("antMoveLeftOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), BV = new tn("antMoveRightIn", {
  "0%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), FV = new tn("antMoveRightOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), LV = new tn("antMoveUpIn", {
  "0%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), HV = new tn("antMoveUpOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), VV = {
  "move-up": {
    inKeyframes: LV,
    outKeyframes: HV
  },
  "move-down": {
    inKeyframes: AV,
    outKeyframes: RV
  },
  "move-left": {
    inKeyframes: NV,
    outKeyframes: zV
  },
  "move-right": {
    inKeyframes: BV,
    outKeyframes: FV
  }
}, Qu = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: r
  } = VV[t];
  return [zh(o, i, r, e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, Bh = new tn("antSlideUpIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), Fh = new tn("antSlideUpOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), Lh = new tn("antSlideDownIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  }
}), Hh = new tn("antSlideDownOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  }
}), jV = new tn("antSlideLeftIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), WV = new tn("antSlideLeftOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), KV = new tn("antSlideRightIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  }
}), qV = new tn("antSlideRightOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  }
}), YV = {
  "slide-up": {
    inKeyframes: Bh,
    outKeyframes: Fh
  },
  "slide-down": {
    inKeyframes: Lh,
    outKeyframes: Hh
  },
  "slide-left": {
    inKeyframes: jV,
    outKeyframes: WV
  },
  "slide-right": {
    inKeyframes: KV,
    outKeyframes: qV
  }
}, oa = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: r
  } = YV[t];
  return [zh(o, i, r, e.motionDurationMid), {
    [`
      ${o}-enter,
      ${o}-appear
    `]: {
      transform: "scale(0)",
      transformOrigin: "0% 0%",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutQuint
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInQuint
    }
  }];
}, y0 = new tn("antZoomIn", {
  "0%": {
    transform: "scale(0.2)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), GV = new tn("antZoomOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.2)",
    opacity: 0
  }
}), uS = new tn("antZoomBigIn", {
  "0%": {
    transform: "scale(0.8)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), cS = new tn("antZoomBigOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.8)",
    opacity: 0
  }
}), UV = new tn("antZoomUpIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  }
}), XV = new tn("antZoomUpOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  }
}), QV = new tn("antZoomLeftIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  }
}), ZV = new tn("antZoomLeftOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  }
}), JV = new tn("antZoomRightIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  }
}), ej = new tn("antZoomRightOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  }
}), tj = new tn("antZoomDownIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  }
}), nj = new tn("antZoomDownOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  }
}), oj = {
  zoom: {
    inKeyframes: y0,
    outKeyframes: GV
  },
  "zoom-big": {
    inKeyframes: uS,
    outKeyframes: cS
  },
  "zoom-big-fast": {
    inKeyframes: uS,
    outKeyframes: cS
  },
  "zoom-left": {
    inKeyframes: QV,
    outKeyframes: ZV
  },
  "zoom-right": {
    inKeyframes: JV,
    outKeyframes: ej
  },
  "zoom-up": {
    inKeyframes: UV,
    outKeyframes: XV
  },
  "zoom-down": {
    inKeyframes: tj,
    outKeyframes: nj
  }
}, Bd = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: i,
    outKeyframes: r
  } = oj[t];
  return [zh(o, i, r, 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
    }
  }];
}, Vh = (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`
    }
  }
}), dS = (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"
  };
}, ij = (e) => {
  const {
    antCls: t,
    componentCls: n
  } = e, o = `${n}-item`;
  return [
    {
      [`${n}-dropdown`]: O(O({}, fn(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: Bh
        },
        [`
            &${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: Lh
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
          animationName: Fh
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
          animationName: Hh
        },
        "&-hidden": {
          display: "none"
        },
        "&-empty": {
          color: e.colorTextDisabled
        },
        // ========================= Options =========================
        [`${o}-empty`]: O(O({}, dS(e)), {
          color: e.colorTextDisabled
        }),
        [`${o}`]: O(O({}, dS(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": O({
              flex: "auto"
            }, Va),
            "&-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
    oa(e, "slide-up"),
    oa(e, "slide-down"),
    Qu(e, "move-up"),
    Qu(e, "move-down")
  ];
}, au = 2;
function CM(e) {
  let {
    controlHeightSM: t,
    controlHeight: n,
    lineWidth: o
  } = e;
  const i = (n - t) / 2 - o, r = Math.ceil(i / 2);
  return [i, r];
}
function ov(e, t) {
  const {
    componentCls: n,
    iconCls: o
  } = e, i = `${n}-selection-overflow`, r = e.controlHeightSM, [a] = CM(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: `${a - au}px ${au * 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: `${au}px 0`,
          lineHeight: `${r}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: r,
        marginTop: au,
        marginBottom: au,
        lineHeight: `${r - 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: au * 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": O(O({}, cc()), {
          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 - a,
        "\n          &-input,\n          &-mirror\n        ": {
          height: r,
          fontFamily: e.fontFamily,
          lineHeight: `${r}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 rj(e) {
  const {
    componentCls: t
  } = e, n = Qt(e, {
    controlHeight: e.controlHeightSM,
    controlHeightSM: e.controlHeightXS,
    borderRadius: e.borderRadiusSM,
    borderRadiusSM: e.borderRadiusXS
  }), [, o] = CM(e);
  return [
    ov(e),
    // ======================== Small ========================
    // Shared
    ov(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
    ov(Qt(e, {
      fontSize: e.fontSizeLG,
      controlHeight: e.controlHeightLG,
      controlHeightSM: e.controlHeight,
      borderRadius: e.borderRadiusLG,
      borderRadiusSM: e.borderRadius
    }), "lg")
  ];
}
function iv(e, t) {
  const {
    componentCls: n,
    inputPaddingHorizontalBase: o,
    borderRadius: i
  } = e, r = e.controlHeight - e.lineWidth * 2, a = Math.ceil(e.fontSize * 1.25), l = t ? `${n}-${t}` : "";
  return {
    [`${n}-single${l}`]: {
      fontSize: e.fontSize,
      // ========================= Selector =========================
      [`${n}-selector`]: O(O({}, fn(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: `${r}px`,
          transition: `all ${e.motionDurationSlow}`,
          // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
          "@supports (-moz-appearance: meterbar)": {
            lineHeight: `${r}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: a
      },
      // 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: r
          },
          "&:after": {
            lineHeight: `${r}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 aj(e) {
  const {
    componentCls: t
  } = e, n = e.controlPaddingHorizontalSM - e.lineWidth;
  return [
    iv(e),
    // ======================== Small ========================
    // Shared
    iv(Qt(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
    iv(Qt(e, {
      controlHeight: e.controlHeightLG,
      fontSize: e.fontSizeLG,
      borderRadius: e.borderRadiusLG
    }), "lg")
  ];
}
function lj(e, t, n) {
  const {
    focusElCls: o,
    focus: i,
    borderElCls: r
  } = n, a = r ? "> *" : "", l = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((s) => `&:${s} ${a}`).join(",");
  return {
    [`&-item:not(${t}-last-item)`]: {
      marginInlineEnd: -e.lineWidth
    },
    "&-item": O(O({
      [l]: {
        zIndex: 2
      }
    }, o ? {
      [`&${o}`]: {
        zIndex: 2
      }
    } : {}), {
      [`&[disabled] ${a}`]: {
        zIndex: 0
      }
    })
  };
}
function sj(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 Fd(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    focus: !0
  };
  const {
    componentCls: n
  } = e, o = `${n}-compact`;
  return {
    [o]: O(O({}, lj(e, o, t)), sj(n, o, t))
  };
}
const uj = (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"
      }
    }
  };
}, rv = function(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const {
    componentCls: o,
    borderHoverColor: i,
    outlineColor: r,
    antCls: a
  } = t, l = n ? {
    [`${o}-selector`]: {
      borderColor: i
    }
  } : {};
  return {
    [e]: {
      [`&:not(${o}-disabled):not(${o}-customize-input):not(${a}-pagination-size-changer)`]: O(O({}, l), {
        [`${o}-focused& ${o}-selector`]: {
          borderColor: i,
          boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${r}`,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`,
          outline: 0
        },
        [`&:hover ${o}-selector`]: {
          borderColor: i,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`
        }
      })
    }
  };
}, cj = (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"
      }
    }
  };
}, dj = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontalBase: n,
    iconCls: o
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      display: "inline-block",
      cursor: "pointer",
      [`&:not(${t}-customize-input) ${t}-selector`]: O(O({}, uj(e)), cj(e)),
      // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
      //   ...genHoverStyle(token),
      // },
      // ======================== Selection ========================
      [`${t}-selection-item`]: O({
        flex: 1,
        fontWeight: "normal"
      }, Va),
      // ======================= Placeholder =======================
      [`${t}-selection-placeholder`]: O(O({}, Va), {
        flex: 1,
        color: e.colorTextPlaceholder,
        pointerEvents: "none"
      }),
      // ========================== Arrow ==========================
      [`${t}-arrow`]: O(O({}, cc()), {
        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
      }
    }
  };
}, fj = (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
    dj(e),
    // Single
    aj(e),
    // Multiple
    rj(e),
    // Dropdown
    ij(e),
    // =====================================================
    // ==                       RTL                       ==
    // =====================================================
    {
      [`${t}-rtl`]: {
        direction: "rtl"
      }
    },
    // =====================================================
    // ==                     Status                      ==
    // =====================================================
    rv(t, Qt(e, {
      borderHoverColor: e.colorPrimaryHover,
      outlineColor: e.controlOutline
    })),
    rv(`${t}-status-error`, Qt(e, {
      borderHoverColor: e.colorErrorHover,
      outlineColor: e.colorErrorOutline
    }), !0),
    rv(`${t}-status-warning`, Qt(e, {
      borderHoverColor: e.colorWarningHover,
      outlineColor: e.colorWarningOutline
    }), !0),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(e, {
      borderElCls: `${t}-selector`,
      focusElCls: `${t}-focused`
    })
  ];
}, pj = On("Select", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = Qt(e, {
    rootPrefixCls: n,
    inputPaddingHorizontalBase: e.paddingSM - 1
  });
  return [fj(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
})), x0 = () => O(O({}, Bn(pM(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  value: en([Array, Object, String, Number]),
  defaultValue: en([Array, Object, String, Number]),
  notFoundContent: pe.any,
  suffixIcon: pe.any,
  itemIcon: pe.any,
  size: rn(),
  mode: rn(),
  bordered: ct(!0),
  transitionName: String,
  choiceTransitionName: rn(""),
  popupClassName: String,
  /** @deprecated Please use `popupClassName` instead */
  dropdownClassName: String,
  placement: rn(),
  status: rn(),
  "onUpdate:value": et()
}), fS = "SECRET_COMBOBOX_MODE_DO_NOT_USE", Et = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASelect",
  Option: p0,
  OptGroup: h0,
  inheritAttrs: !1,
  props: _n(x0(), {
    listHeight: 256,
    listItemHeight: 24
  }),
  SECRET_COMBOBOX_MODE_DO_NOT_USE: fS,
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: i,
      expose: r
    } = t;
    const a = le(), l = Bi(), s = Ai.useInject(), u = E(() => Ls(s.status, e.status)), c = () => {
      var q;
      (q = a.value) === null || q === void 0 || q.focus();
    }, d = () => {
      var q;
      (q = a.value) === null || q === void 0 || q.blur();
    }, f = (q) => {
      var U;
      (U = a.value) === null || U === void 0 || U.scrollTo(q);
    }, p = E(() => {
      const {
        mode: q
      } = e;
      if (q !== "combobox")
        return q === fS ? "combobox" : q;
    });
    process.env.NODE_ENV !== "production" && dn(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
    const {
      prefixCls: v,
      direction: g,
      renderEmpty: m,
      size: x,
      getPrefixCls: S,
      getPopupContainer: C,
      disabled: P,
      select: $
    } = Rt("select", e), {
      compactSize: I,
      compactItemClassnames: w
    } = fc(v, g), M = E(() => I.value || x.value), _ = Tr(), N = E(() => {
      var q;
      return (q = P.value) !== null && q !== void 0 ? q : _.value;
    }), [R, H] = pj(v), L = E(() => S()), B = E(() => e.placement !== void 0 ? e.placement : g.value === "rtl" ? "bottomRight" : "bottomLeft"), A = E(() => Ka(L.value, u5(B.value), e.transitionName)), G = E(() => _e({
      [`${v.value}-lg`]: M.value === "large",
      [`${v.value}-sm`]: M.value === "small",
      [`${v.value}-rtl`]: g.value === "rtl",
      [`${v.value}-borderless`]: !e.bordered,
      [`${v.value}-in-form-item`]: s.isFormItemInput
    }, $r(v.value, u.value, s.hasFeedback), w.value, H.value)), j = function() {
      for (var q = arguments.length, U = new Array(q), ae = 0; ae < q; ae++)
        U[ae] = arguments[ae];
      o("update:value", U[0]), o("change", ...U), l.onFieldChange();
    }, Z = (q) => {
      o("blur", q), l.onFieldBlur();
    };
    r({
      blur: d,
      focus: c,
      scrollTo: f
    });
    const W = E(() => p.value === "multiple" || p.value === "tags"), K = E(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(W.value || p.value === "combobox"));
    return () => {
      var q, U, ae, se;
      const {
        notFoundContent: re,
        listHeight: ie = 256,
        listItemHeight: te = 24,
        popupClassName: ve,
        dropdownClassName: ce,
        virtual: fe,
        dropdownMatchSelectWidth: ge,
        id: Me = l.id.value,
        placeholder: ze = (q = i.placeholder) === null || q === void 0 ? void 0 : q.call(i),
        showArrow: Ke
      } = e, {
        hasFeedback: He,
        feedbackIcon: Re
      } = s;
      let Xe;
      re !== void 0 ? Xe = re : i.notFoundContent ? Xe = i.notFoundContent() : p.value === "combobox" ? Xe = null : Xe = m?.("Select") || h(Uy, {
        componentName: "Select"
      }, null);
      const {
        suffixIcon: De,
        itemIcon: Be,
        removeIcon: Ve,
        clearIcon: ot
      } = SV(O(O({}, e), {
        multiple: W.value,
        prefixCls: v.value,
        hasFeedback: He,
        feedbackIcon: Re,
        showArrow: K.value
      }), i), je = Bn(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Pe = _e(ve || ce, {
        [`${v.value}-dropdown-${g.value}`]: g.value === "rtl"
      }, H.value);
      return R(h(IH, Q(Q(Q({
        ref: a,
        virtual: fe,
        dropdownMatchSelectWidth: ge
      }, je), n), {}, {
        showSearch: (U = e.showSearch) !== null && U !== void 0 ? U : (ae = $?.value) === null || ae === void 0 ? void 0 : ae.showSearch,
        placeholder: ze,
        listHeight: ie,
        listItemHeight: te,
        mode: p.value,
        prefixCls: v.value,
        direction: g.value,
        inputIcon: De,
        menuItemSelectedIcon: Be,
        removeIcon: Ve,
        clearIcon: ot,
        notFoundContent: Xe,
        class: [G.value, n.class],
        getPopupContainer: C?.value,
        dropdownClassName: Pe,
        onChange: j,
        onBlur: Z,
        id: Me,
        dropdownRender: je.dropdownRender || i.dropdownRender,
        transitionName: A.value,
        children: (se = i.default) === null || se === void 0 ? void 0 : se.call(i),
        tagRender: e.tagRender || i.tagRender,
        optionLabelRender: i.optionLabel,
        maxTagPlaceholder: e.maxTagPlaceholder || i.maxTagPlaceholder,
        showArrow: He || Ke,
        disabled: N.value
      }), {
        option: i.option
      }));
    };
  }
});
Et.install = function(e) {
  return e.component(Et.name, Et), e.component(Et.Option.displayName, Et.Option), e.component(Et.OptGroup.displayName, Et.OptGroup), e;
};
const hj = Et.Option;
Et.OptGroup;
var gj = { 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 pS(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) {
      vj(e, i, n[i]);
    });
  }
  return e;
}
function vj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var w0 = function(t, n) {
  var o = pS({}, t, n.attrs);
  return h(an, pS({}, o, {
    icon: gj
  }), null);
};
w0.displayName = "CheckCircleOutlined";
w0.inheritAttrs = !1;
var mj = { 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 hS(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) {
      bj(e, i, n[i]);
    });
  }
  return e;
}
function bj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var S0 = function(t, n) {
  var o = hS({}, t, n.attrs);
  return h(an, hS({}, o, {
    icon: mj
  }), null);
};
S0.displayName = "ExclamationCircleOutlined";
S0.inheritAttrs = !1;
var yj = { 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 gS(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) {
      xj(e, i, n[i]);
    });
  }
  return e;
}
function xj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var C0 = function(t, n) {
  var o = gS({}, t, n.attrs);
  return h(an, gS({}, o, {
    icon: yj
  }), null);
};
C0.displayName = "InfoCircleOutlined";
C0.inheritAttrs = !1;
var wj = { 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 vS(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) {
      Sj(e, i, n[i]);
    });
  }
  return e;
}
function Sj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var $0 = function(t, n) {
  var o = vS({}, t, n.attrs);
  return h(an, vS({}, o, {
    icon: wj
  }), null);
};
$0.displayName = "CloseCircleOutlined";
$0.inheritAttrs = !1;
var Cj = { 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 mS(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) {
      $j(e, i, n[i]);
    });
  }
  return e;
}
function $j(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bl = function(t, n) {
  var o = mS({}, t, n.attrs);
  return h(an, mS({}, o, {
    icon: Cj
  }), null);
};
Bl.displayName = "CheckCircleFilled";
Bl.inheritAttrs = !1;
var Pj = { 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 bS(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) {
      Oj(e, i, n[i]);
    });
  }
  return e;
}
function Oj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Fl = function(t, n) {
  var o = bS({}, t, n.attrs);
  return h(an, bS({}, o, {
    icon: Pj
  }), null);
};
Fl.displayName = "ExclamationCircleFilled";
Fl.inheritAttrs = !1;
var kj = { 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 yS(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) {
      Ij(e, i, n[i]);
    });
  }
  return e;
}
function Ij(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Hs = function(t, n) {
  var o = yS({}, t, n.attrs);
  return h(an, yS({}, o, {
    icon: kj
  }), null);
};
Hs.displayName = "InfoCircleFilled";
Hs.inheritAttrs = !1;
const Pf = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], Mj = (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 $M() {
  const [, e] = dc();
  return E(() => {
    const t = Mj(e.value), n = /* @__PURE__ */ new Map();
    let o = -1, i = {};
    return {
      matchHandlers: {},
      dispatch(r) {
        return i = r, n.forEach((a) => a(i)), n.size >= 1;
      },
      subscribe(r) {
        return n.size || this.register(), o += 1, n.set(o, r), r(i), o;
      },
      unsubscribe(r) {
        n.delete(r), n.size || this.unregister();
      },
      unregister() {
        Object.keys(t).forEach((r) => {
          const a = t[r], l = this.matchHandlers[a];
          l?.mql.removeListener(l?.listener);
        }), n.clear();
      },
      register() {
        Object.keys(t).forEach((r) => {
          const a = t[r], l = (u) => {
            let {
              matches: c
            } = u;
            this.dispatch(O(O({}, i), {
              [r]: c
            }));
          }, s = window.matchMedia(a);
          s.addListener(l), this.matchHandlers[a] = {
            mql: s,
            listener: l
          }, l(s);
        });
      },
      responsiveMap: t
    };
  });
}
function PM() {
  const e = $e({});
  let t = null;
  const n = $M();
  return At(() => {
    t = n.value.subscribe((o) => {
      e.value = o;
    });
  }), Vo(() => {
    n.value.unsubscribe(t);
  }), e;
}
function gr(e) {
  const t = $e();
  return It(() => {
    t.value = e();
  }, {
    flush: "sync"
    // needed so updates are immediate.
  }), t;
}
const Vi = {
  adjustX: 1,
  adjustY: 1
}, ji = [0, 0], OM = {
  left: {
    points: ["cr", "cl"],
    overflow: Vi,
    offset: [-4, 0],
    targetOffset: ji
  },
  right: {
    points: ["cl", "cr"],
    overflow: Vi,
    offset: [4, 0],
    targetOffset: ji
  },
  top: {
    points: ["bc", "tc"],
    overflow: Vi,
    offset: [0, -4],
    targetOffset: ji
  },
  bottom: {
    points: ["tc", "bc"],
    overflow: Vi,
    offset: [0, 4],
    targetOffset: ji
  },
  topLeft: {
    points: ["bl", "tl"],
    overflow: Vi,
    offset: [0, -4],
    targetOffset: ji
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Vi,
    offset: [-4, 0],
    targetOffset: ji
  },
  topRight: {
    points: ["br", "tr"],
    overflow: Vi,
    offset: [0, -4],
    targetOffset: ji
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Vi,
    offset: [4, 0],
    targetOffset: ji
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: Vi,
    offset: [0, 4],
    targetOffset: ji
  },
  rightBottom: {
    points: ["bl", "br"],
    overflow: Vi,
    offset: [4, 0],
    targetOffset: ji
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Vi,
    offset: [0, 4],
    targetOffset: ji
  },
  leftBottom: {
    points: ["br", "bl"],
    overflow: Vi,
    offset: [-4, 0],
    targetOffset: ji
  }
}, Tj = {
  prefixCls: String,
  id: String,
  overlayInnerStyle: pe.any
}, _j = be({
  compatConfig: {
    MODE: 3
  },
  name: "TooltipContent",
  props: Tj,
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("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 Ej = 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 xS() {
}
const Dj = be({
  compatConfig: {
    MODE: 3
  },
  name: "Tooltip",
  inheritAttrs: !1,
  props: {
    trigger: pe.any.def(["hover"]),
    defaultVisible: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    placement: pe.string.def("right"),
    transitionName: String,
    animation: pe.any,
    afterVisibleChange: pe.func.def(() => {
    }),
    overlayStyle: {
      type: Object,
      default: void 0
    },
    overlayClassName: String,
    prefixCls: pe.string.def("rc-tooltip"),
    mouseEnterDelay: pe.number.def(0.1),
    mouseLeaveDelay: pe.number.def(0.1),
    getPopupContainer: Function,
    destroyTooltipOnHide: {
      type: Boolean,
      default: !1
    },
    align: pe.object.def(() => ({})),
    arrowContent: pe.any.def(null),
    tipId: String,
    builtinPlacements: pe.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 r = $e(), a = () => {
      const {
        prefixCls: c,
        tipId: d,
        overlayInnerStyle: f
      } = e;
      return [e.arrow ? h("div", {
        class: `${c}-arrow`,
        key: "arrow"
      }, [Ji(n, e, "arrowContent")]) : null, h(_j, {
        key: "content",
        prefixCls: c,
        id: d,
        overlayInnerStyle: f
      }, {
        overlay: n.overlay
      })];
    };
    i({
      getPopupDomNode: () => r.value.getPopupDomNode(),
      triggerDOM: r,
      forcePopupAlign: () => {
        var c;
        return (c = r.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
      }
    });
    const s = $e(!1), u = $e(!1);
    return It(() => {
      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: p,
        overlayStyle: v,
        prefixCls: g,
        afterVisibleChange: m,
        transitionName: x,
        animation: S,
        placement: C,
        align: P,
        destroyTooltipOnHide: $,
        defaultVisible: I
      } = e, w = Ej(e, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), M = O({}, w);
      e.visible !== void 0 && (M.popupVisible = e.visible);
      const _ = O(O(O({
        popupClassName: c,
        prefixCls: g,
        action: d,
        builtinPlacements: OM,
        popupPlacement: C,
        popupAlign: P,
        afterPopupVisibleChange: m,
        popupTransitionName: x,
        popupAnimation: S,
        defaultPopupVisible: I,
        destroyPopupOnHide: s.value,
        autoDestroy: u.value,
        mouseLeaveDelay: p,
        popupStyle: v,
        mouseEnterDelay: f
      }, M), o), {
        onPopupVisibleChange: e.onVisibleChange || xS,
        onPopupAlign: e.onPopupAlign || xS,
        ref: r,
        arrow: !!e.arrow,
        popup: a()
      });
      return h(Ad, _, {
        default: n.default
      });
    };
  }
}), kM = (() => ({
  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: _t(),
  overlayInnerStyle: _t(),
  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: _t(),
  builtinPlacements: _t(),
  children: Array,
  /** @deprecated Please use `onOpenChange` instead. */
  onVisibleChange: Function,
  /** @deprecated Please use `onUpdate:open` instead. */
  "onUpdate:visible": Function,
  onOpenChange: Function,
  "onUpdate:open": Function
})), Aj = {
  adjustX: 1,
  adjustY: 1
}, wS = {
  adjustX: 0,
  adjustY: 0
}, Rj = [0, 0];
function SS(e) {
  return typeof e == "boolean" ? e ? Aj : wS : O(O({}, wS), e);
}
function IM(e) {
  const {
    arrowWidth: t = 4,
    horizontalArrowShift: n = 16,
    verticalArrowShift: o = 8,
    autoAdjustOverflow: i,
    arrowPointAtCenter: r
  } = e, a = {
    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(a).forEach((l) => {
    a[l] = r ? O(O({}, a[l]), {
      overflow: SS(i),
      targetOffset: Rj
    }) : O(O({}, OM[l]), {
      overflow: SS(i)
    }), a[l].ignoreShake = !0;
  }), a;
}
function Fp() {
  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 Nj = bd.map((e) => `${e}-inverse`), zj = ["success", "processing", "error", "default", "warning"];
function MM(e) {
  return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...Nj, ...bd].includes(e) : bd.includes(e);
}
function Bj(e) {
  return zj.includes(e);
}
function Fj(e, t) {
  const n = MM(t), o = _e({
    [`${e}-${t}`]: t && n
  }), i = {}, r = {};
  return t && !n && (i.background = t, r["--antd-arrow-background-color"] = t), {
    className: o,
    overlayStyle: i,
    arrowStyle: r
  };
}
function Of(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return e.map((n) => `${t}${n}`).join(",");
}
const TM = 8;
function _M(e) {
  const t = TM, {
    sizePopupArrow: n,
    contentRadius: o,
    borderRadiusOuter: i,
    limitVerticalRadius: r
  } = e, a = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), l = (o > 12 ? o + 2 : 12) - a, s = r ? t - a : l;
  return {
    dropdownArrowOffset: l,
    dropdownArrowOffsetVertical: s
  };
}
function EM(e, t) {
  const {
    componentCls: n,
    sizePopupArrow: o,
    marginXXS: i,
    borderRadiusXS: r,
    borderRadiusOuter: a,
    boxShadowPopoverArrow: l
  } = e, {
    colorBg: s,
    showArrowCls: u,
    contentRadius: c = e.borderRadiusLG,
    limitVerticalRadius: d
  } = t, {
    dropdownArrowOffsetVertical: f,
    dropdownArrowOffset: p
  } = _M({
    sizePopupArrow: o,
    contentRadius: c,
    borderRadiusOuter: a,
    limitVerticalRadius: d
  }), v = o / 2 + i;
  return {
    [n]: {
      // ============================ Basic ============================
      [`${n}-arrow`]: [O(O({
        position: "absolute",
        zIndex: 1,
        display: "block"
      }, Ky(o, r, a, 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: p
        }
      },
      [`&-placement-topRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> 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: p
        }
      },
      [`&-placement-bottomRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> 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
      [Of(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingBottom: v
      },
      // >>>>> Bottom
      [Of(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingTop: v
      },
      // >>>>> Left
      [Of(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingRight: {
          _skip_check_: !0,
          value: v
        }
      },
      // >>>>> Right
      [Of(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingLeft: {
          _skip_check_: !0,
          value: v
        }
      }
    }
  };
}
const Lj = (e) => {
  const {
    componentCls: t,
    // ant-tooltip
    tooltipMaxWidth: n,
    tooltipColor: o,
    tooltipBg: i,
    tooltipBorderRadius: r,
    zIndexPopup: a,
    controlHeight: l,
    boxShadowSecondary: s,
    paddingSM: u,
    paddingXS: c,
    tooltipRadiusOuter: d
  } = e;
  return [
    {
      [t]: O(O(O(O({}, fn(e)), {
        position: "absolute",
        zIndex: a,
        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: r,
          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(r, TM)
          }
        },
        [`${t}-content`]: {
          position: "relative"
        }
      }), CI(e, (f, p) => {
        let {
          darkColor: v
        } = p;
        return {
          [`&${t}-${f}`]: {
            [`${t}-inner`]: {
              backgroundColor: v
            },
            [`${t}-arrow`]: {
              "--antd-arrow-background-color": v
            }
          }
        };
      })), {
        // RTL
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Arrow Style
    EM(Qt(e, {
      borderRadiusOuter: d
    }), {
      colorBg: "var(--antd-arrow-background-color)",
      showArrowCls: "",
      contentRadius: r,
      limitVerticalRadius: !0
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none"
      }
    }
  ];
}, Hj = ((e, t) => On("Tooltip", (o) => {
  if (t?.value === !1)
    return [];
  const {
    borderRadius: i,
    colorTextLightSolid: r,
    colorBgDefault: a,
    borderRadiusOuter: l
  } = o, s = Qt(o, {
    // default variables
    tooltipMaxWidth: 250,
    tooltipColor: r,
    tooltipBorderRadius: i,
    tooltipBg: a,
    tooltipRadiusOuter: l > 4 ? 4 : l
  });
  return [Lj(s), Bd(o, "zoom-big-fast")];
}, (o) => {
  let {
    zIndexPopupBase: i,
    colorBgSpotlight: r
  } = o;
  return {
    zIndexPopup: i + 70,
    colorBgDefault: r
  };
})(e)), Vj = (e, t) => {
  const n = {}, o = O({}, e);
  return t.forEach((i) => {
    e && i in e && (n[i] = e[i], delete o[i]);
  }), {
    picked: n,
    omitted: o
  };
}, DM = () => O(O({}, kM()), {
  title: pe.any
}), jj = () => ({
  trigger: "hover",
  align: {},
  placement: "top",
  mouseEnterDelay: 0.1,
  mouseLeaveDelay: 0.1,
  arrowPointAtCenter: !1,
  autoAdjustOverflow: !0
}), Wj = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATooltip",
  inheritAttrs: !1,
  props: _n(DM(), {
    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: r
    } = t;
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((N) => {
      let [R, H] = N;
      wo(e[R] === void 0, "Tooltip", `\`${R}\` is deprecated, please use \`${H}\` instead.`);
    });
    const {
      prefixCls: a,
      getPopupContainer: l,
      direction: s,
      rootPrefixCls: u
    } = Rt("tooltip", e), c = E(() => {
      var N;
      return (N = e.open) !== null && N !== void 0 ? N : e.visible;
    }), d = le(Fp([e.open, e.visible])), f = le();
    let p;
    Ie(c, (N) => {
      Vt.cancel(p), p = Vt(() => {
        d.value = !!N;
      });
    });
    const v = () => {
      var N;
      const R = (N = e.title) !== null && N !== void 0 ? N : n.title;
      return !R && R !== 0;
    }, g = (N) => {
      const R = v();
      c.value === void 0 && (d.value = R ? !1 : N), R || (o("update:visible", N), o("visibleChange", N), o("update:open", N), o("openChange", N));
    };
    r({
      getPopupDomNode: () => f.value.getPopupDomNode(),
      open: d,
      forcePopupAlign: () => {
        var N;
        return (N = f.value) === null || N === void 0 ? void 0 : N.forcePopupAlign();
      }
    });
    const x = E(() => {
      var N;
      const {
        builtinPlacements: R,
        autoAdjustOverflow: H,
        arrow: L,
        arrowPointAtCenter: B
      } = e;
      let A = B;
      return typeof L == "object" && (A = (N = L.pointAtCenter) !== null && N !== void 0 ? N : B), R || IM({
        arrowPointAtCenter: A,
        autoAdjustOverflow: H
      });
    }), S = (N) => N || N === "", C = (N) => {
      const R = N.type;
      if (typeof R == "object" && N.props && ((R.__ANT_BUTTON === !0 || R === "button") && S(N.props.disabled) || R.__ANT_SWITCH === !0 && (S(N.props.disabled) || S(N.props.loading)) || R.__ANT_RADIO === !0 && S(N.props.disabled))) {
        const {
          picked: H,
          omitted: L
        } = Vj(JF(N), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), B = O(O({
          display: "inline-block"
        }, H), {
          cursor: "not-allowed",
          lineHeight: 1,
          width: N.props && N.props.block ? "100%" : void 0
        }), A = O(O({}, L), {
          pointerEvents: "none"
        }), G = Un(N, {
          style: A
        }, !0);
        return h("span", {
          style: B,
          class: `${a.value}-disabled-compatible-wrapper`
        }, [G]);
      }
      return N;
    }, P = () => {
      var N, R;
      return (N = e.title) !== null && N !== void 0 ? N : (R = n.title) === null || R === void 0 ? void 0 : R.call(n);
    }, $ = (N, R) => {
      const H = x.value, L = Object.keys(H).find((B) => {
        var A, G;
        return H[B].points[0] === ((A = R.points) === null || A === void 0 ? void 0 : A[0]) && H[B].points[1] === ((G = R.points) === null || G === void 0 ? void 0 : G[1]);
      });
      if (L) {
        const B = N.getBoundingClientRect(), A = {
          top: "50%",
          left: "50%"
        };
        L.indexOf("top") >= 0 || L.indexOf("Bottom") >= 0 ? A.top = `${B.height - R.offset[1]}px` : (L.indexOf("Top") >= 0 || L.indexOf("bottom") >= 0) && (A.top = `${-R.offset[1]}px`), L.indexOf("left") >= 0 || L.indexOf("Right") >= 0 ? A.left = `${B.width - R.offset[0]}px` : (L.indexOf("right") >= 0 || L.indexOf("Left") >= 0) && (A.left = `${-R.offset[0]}px`), N.style.transformOrigin = `${A.left} ${A.top}`;
      }
    }, I = E(() => Fj(a.value, e.color)), w = E(() => i["data-popover-inject"]), [M, _] = Hj(a, E(() => !w.value));
    return () => {
      var N, R;
      const {
        openClassName: H,
        overlayClassName: L,
        overlayStyle: B,
        overlayInnerStyle: A
      } = e;
      let G = (R = Do((N = n.default) === null || N === void 0 ? void 0 : N.call(n))) !== null && R !== void 0 ? R : null;
      G = G.length === 1 ? G[0] : G;
      let j = d.value;
      if (c.value === void 0 && v() && (j = !1), !G)
        return null;
      const Z = C(Ao(G) && !eL(G) ? G : h("span", null, [G])), W = _e({
        [H || `${a.value}-open`]: !0,
        [Z.props && Z.props.class]: Z.props && Z.props.class
      }), K = _e(L, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, I.value.className, _.value), q = O(O({}, I.value.overlayStyle), A), U = I.value.arrowStyle, ae = O(O(O({}, i), e), {
        prefixCls: a.value,
        arrow: !!e.arrow,
        getPopupContainer: l?.value,
        builtinPlacements: x.value,
        visible: j,
        ref: f,
        overlayClassName: K,
        overlayStyle: O(O({}, U), B),
        overlayInnerStyle: q,
        onVisibleChange: g,
        onPopupAlign: $,
        transitionName: Ka(u.value, "zoom-big-fast", e.transitionName)
      });
      return M(h(Dj, ae, {
        default: () => [d.value ? Un(Z, {
          class: W
        }) : Z],
        arrowContent: () => h("span", {
          class: `${a.value}-arrow-content`
        }, null),
        overlay: P
      }));
    };
  }
}), Lo = rr(Wj), Kj = (e) => {
  const {
    componentCls: t,
    popoverBg: n,
    popoverColor: o,
    width: i,
    fontWeightStrong: r,
    popoverPadding: a,
    boxShadowSecondary: l,
    colorTextHeading: s,
    borderRadiusLG: u,
    zIndexPopup: c,
    marginXS: d,
    colorBgElevated: f
  } = e;
  return [
    {
      [t]: O(O({}, fn(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: a
        },
        [`${t}-title`]: {
          minWidth: i,
          marginBottom: d,
          color: s,
          fontWeight: r
        },
        [`${t}-inner-content`]: {
          color: o
        }
      })
    },
    // Arrow Style
    EM(e, {
      colorBg: "var(--antd-arrow-background-color)"
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none",
        [`${t}-content`]: {
          display: "inline-block"
        }
      }
    }
  ];
}, qj = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: bd.map((n) => {
      const o = e[`${n}-6`];
      return {
        [`&${t}-${n}`]: {
          "--antd-arrow-background-color": o,
          [`${t}-inner`]: {
            backgroundColor: o
          },
          [`${t}-arrow`]: {
            background: "transparent"
          }
        }
      };
    })
  };
}, Yj = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorSplit: i,
    paddingSM: r,
    controlHeight: a,
    fontSize: l,
    lineHeight: s,
    padding: u
  } = e, c = a - Math.round(l * s), d = c / 2, f = c / 2 - n, p = u;
  return {
    [t]: {
      [`${t}-inner`]: {
        padding: 0
      },
      [`${t}-title`]: {
        margin: 0,
        padding: `${d}px ${p}px ${f}px`,
        borderBottom: `${n}px ${o} ${i}`
      },
      [`${t}-inner-content`]: {
        padding: `${r}px ${p}px`
      }
    }
  };
}, Gj = On("Popover", (e) => {
  const {
    colorBgElevated: t,
    colorText: n,
    wireframe: o
  } = e, i = Qt(e, {
    popoverBg: t,
    popoverColor: n,
    popoverPadding: 12
    // Fixed Value
  });
  return [Kj(i), qj(i), o && Yj(i), Bd(i, "zoom-big")];
}, (e) => {
  let {
    zIndexPopupBase: t
  } = e;
  return {
    zIndexPopup: t + 30,
    width: 177
  };
}), Uj = () => O(O({}, kM()), {
  content: Ii(),
  title: Ii()
}), Xj = be({
  compatConfig: {
    MODE: 3
  },
  name: "APopover",
  inheritAttrs: !1,
  props: _n(Uj(), O(O({}, jj()), {
    trigger: "hover",
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1
  })),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: i
    } = t;
    const r = le();
    wo(e.visible === void 0, "popover", "`visible` will be removed in next major version, please use `open` instead."), n({
      getPopupDomNode: () => {
        var f, p;
        return (p = (f = r.value) === null || f === void 0 ? void 0 : f.getPopupDomNode) === null || p === void 0 ? void 0 : p.call(f);
      }
    });
    const {
      prefixCls: a,
      configProvider: l
    } = Rt("popover", e), [s, u] = Gj(a), c = E(() => l.getPrefixCls()), d = () => {
      var f, p;
      const {
        title: v = Do((f = o.title) === null || f === void 0 ? void 0 : f.call(o)),
        content: g = Do((p = o.content) === null || p === void 0 ? void 0 : p.call(o))
      } = e, m = !!(Array.isArray(v) ? v.length : v), x = !!(Array.isArray(g) ? g.length : v);
      return !m && !x ? null : h(Je, null, [m && h("div", {
        class: `${a.value}-title`
      }, [v]), h("div", {
        class: `${a.value}-inner-content`
      }, [g])]);
    };
    return () => {
      const f = _e(e.overlayClassName, u.value);
      return s(h(Lo, Q(Q(Q({}, Bn(e, ["title", "content"])), i), {}, {
        prefixCls: a.value,
        ref: r,
        overlayClassName: f,
        transitionName: Ka(c.value, "zoom-big", e.transitionName),
        "data-popover-inject": !0
      }), {
        title: d,
        default: o.default
      }));
    };
  }
}), Qj = rr(Xj), CS = (e) => !isNaN(parseFloat(e)) && isFinite(e), lu = {
  adjustX: 1,
  adjustY: 1
}, su = [0, 0], Zj = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: lu,
    offset: [0, -4],
    targetOffset: su
  },
  topCenter: {
    points: ["bc", "tc"],
    overflow: lu,
    offset: [0, -4],
    targetOffset: su
  },
  topRight: {
    points: ["br", "tr"],
    overflow: lu,
    offset: [0, -4],
    targetOffset: su
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: lu,
    offset: [0, 4],
    targetOffset: su
  },
  bottomCenter: {
    points: ["tc", "bc"],
    overflow: lu,
    offset: [0, 4],
    targetOffset: su
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: lu,
    offset: [0, 4],
    targetOffset: su
  }
};
var Jj = 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 AM = be({
  compatConfig: {
    MODE: 3
  },
  props: {
    minOverlayWidthMatchTrigger: {
      type: Boolean,
      default: void 0
    },
    arrow: {
      type: Boolean,
      default: !1
    },
    prefixCls: pe.string.def("rc-dropdown"),
    transitionName: String,
    overlayClassName: pe.string.def(""),
    openClassName: String,
    animation: pe.any,
    align: pe.object,
    overlayStyle: {
      type: Object,
      default: void 0
    },
    placement: pe.string.def("bottomLeft"),
    overlay: pe.any,
    trigger: pe.oneOfType([pe.string, pe.arrayOf(pe.string)]).def("hover"),
    alignPoint: {
      type: Boolean,
      default: void 0
    },
    showAction: pe.array,
    hideAction: pe.array,
    getPopupContainer: Function,
    visible: {
      type: Boolean,
      default: void 0
    },
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    mouseEnterDelay: pe.number.def(0.15),
    mouseLeaveDelay: pe.number.def(0.1)
  },
  emits: ["visibleChange", "overlayClick"],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      expose: i
    } = t;
    const r = le(!!e.visible);
    Ie(() => e.visible, (p) => {
      p !== void 0 && (r.value = p);
    });
    const a = le();
    i({
      triggerRef: a
    });
    const l = (p) => {
      e.visible === void 0 && (r.value = !1), o("overlayClick", p);
    }, s = (p) => {
      e.visible === void 0 && (r.value = p), o("visibleChange", p);
    }, u = () => {
      var p;
      const v = (p = n.overlay) === null || p === void 0 ? void 0 : p.call(n), g = {
        prefixCls: `${e.prefixCls}-menu`,
        onClick: l
      };
      return h(Je, {
        key: Bk
      }, [e.arrow && h("div", {
        class: `${e.prefixCls}-arrow`
      }, null), Un(v, g, !1)]);
    }, c = E(() => {
      const {
        minOverlayWidthMatchTrigger: p = !e.alignPoint
      } = e;
      return p;
    }), d = () => {
      var p;
      const v = (p = n.default) === null || p === void 0 ? void 0 : p.call(n);
      return r.value && v ? Un(v[0], {
        class: e.openClassName || `${e.prefixCls}-open`
      }, !1) : v;
    }, f = E(() => !e.hideAction && e.trigger.indexOf("contextmenu") !== -1 ? ["click"] : e.hideAction);
    return () => {
      const {
        prefixCls: p,
        arrow: v,
        showAction: g,
        overlayStyle: m,
        trigger: x,
        placement: S,
        align: C,
        getPopupContainer: P,
        transitionName: $,
        animation: I,
        overlayClassName: w
      } = e, M = Jj(e, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
      return h(Ad, Q(Q({}, M), {}, {
        prefixCls: p,
        ref: a,
        popupClassName: _e(w, {
          [`${p}-show-arrow`]: v
        }),
        popupStyle: m,
        builtinPlacements: Zj,
        action: x,
        showAction: g,
        hideAction: f.value || [],
        popupPlacement: S,
        popupAlign: C,
        popupTransitionName: $,
        popupAnimation: I,
        popupVisible: r.value,
        stretch: c.value ? "minWidth" : "",
        onPopupVisibleChange: s,
        getPopupContainer: P
      }), {
        popup: u,
        default: d
      });
    };
  }
}), eW = (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
        }
      }
    }
  };
}, tW = On("Wave", (e) => [eW(e)]);
function nW(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 av(e) {
  return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && nW(e) && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
  e !== "transparent";
}
function oW(e) {
  const {
    borderTopColor: t,
    borderColor: n,
    backgroundColor: o
  } = getComputedStyle(e);
  return av(t) ? t : av(n) ? n : av(o) ? o : null;
}
function lv(e) {
  return Number.isNaN(e) ? 0 : e;
}
const iW = be({
  props: {
    target: _t(),
    className: String
  },
  setup(e) {
    const t = $e(null), [n, o] = Cn(null), [i, r] = Cn([]), [a, l] = Cn(0), [s, u] = Cn(0), [c, d] = Cn(0), [f, p] = Cn(0), [v, g] = Cn(!1);
    function m() {
      const {
        target: w
      } = e, M = getComputedStyle(w);
      o(oW(w));
      const _ = M.position === "static", {
        borderLeftWidth: N,
        borderTopWidth: R
      } = M;
      l(_ ? w.offsetLeft : lv(-parseFloat(N))), u(_ ? w.offsetTop : lv(-parseFloat(R))), d(w.offsetWidth), p(w.offsetHeight);
      const {
        borderTopLeftRadius: H,
        borderTopRightRadius: L,
        borderBottomLeftRadius: B,
        borderBottomRightRadius: A
      } = M;
      r([H, L, A, B].map((G) => lv(parseFloat(G))));
    }
    let x, S, C;
    const P = () => {
      clearTimeout(C), Vt.cancel(S), x?.disconnect();
    }, $ = () => {
      var w;
      const M = (w = t.value) === null || w === void 0 ? void 0 : w.parentElement;
      M && (El(null, M), M.parentElement && M.parentElement.removeChild(M));
    };
    At(() => {
      P(), C = setTimeout(() => {
        $();
      }, 5e3);
      const {
        target: w
      } = e;
      w && (S = Vt(() => {
        m(), g(!0);
      }), typeof ResizeObserver < "u" && (x = new ResizeObserver(m), x.observe(w)));
    }), qt(() => {
      P();
    });
    const I = (w) => {
      w.propertyName === "opacity" && $();
    };
    return () => {
      if (!v.value)
        return null;
      const w = {
        left: `${a.value}px`,
        top: `${s.value}px`,
        width: `${c.value}px`,
        height: `${f.value}px`,
        borderRadius: i.value.map((M) => `${M}px`).join(" ")
      };
      return n && (w["--wave-color"] = n.value), h(Ei, {
        appear: !0,
        name: "wave-motion",
        appearFromClass: "wave-motion-appear",
        appearActiveClass: "wave-motion-appear",
        appearToClass: "wave-motion-appear wave-motion-appear-active"
      }, {
        default: () => [h("div", {
          ref: t,
          class: e.className,
          style: w,
          onTransitionend: I
        }, null)]
      });
    };
  }
});
function rW(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), El(h(iW, {
    target: e,
    className: t
  }, null), n), () => {
    El(null, n), n.parentElement && n.parentElement.removeChild(n);
  };
}
function aW(e, t) {
  const n = fi();
  let o;
  function i() {
    var r;
    const a = Qr(n);
    o?.(), !(!((r = t?.value) === null || r === void 0) && r.disabled || !a) && (o = rW(a, e.value));
  }
  return qt(() => {
    o?.();
  }), i;
}
const P0 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Wave",
  props: {
    disabled: Boolean
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = fi(), {
      prefixCls: i,
      wave: r
    } = Rt("wave", e), [, a] = tW(i), l = aW(E(() => _e(i.value, a.value)), r);
    let s;
    const u = () => {
      Qr(o).removeEventListener("click", s, !0);
    };
    return At(() => {
      Ie(() => e.disabled, () => {
        u(), Yt(() => {
          const c = Qr(o);
          c?.removeEventListener("click", s, !0), !(!c || c.nodeType !== 1 || e.disabled) && (s = (d) => {
            d.target.tagName === "INPUT" || !Ah(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"
      });
    }), qt(() => {
      u();
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
function RM(e) {
  return e === "danger" ? {
    danger: !0
  } : {
    type: e
  };
}
const NM = () => ({
  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: pe.any,
  href: String,
  target: String,
  title: String,
  onClick: Ku(),
  onMousedown: Ku()
}), $S = (e) => {
  e && (e.style.width = "0px", e.style.opacity = "0", e.style.transform = "scale(0)");
}, PS = (e) => {
  Yt(() => {
    e && (e.style.width = `${e.scrollWidth}px`, e.style.opacity = "1", e.style.transform = "scale(1)");
  });
}, OS = (e) => {
  e && e.style && (e.style.width = null, e.style.opacity = null, e.style.transform = null);
}, lW = be({
  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 h("span", {
          class: `${n}-loading-icon`
        }, [h(_r, null, null)]);
      const i = !!o;
      return h(Ei, {
        name: `${n}-loading-icon-motion`,
        onBeforeEnter: $S,
        onEnter: PS,
        onAfterEnter: OS,
        onBeforeLeave: PS,
        onLeave: (r) => {
          setTimeout(() => {
            $S(r);
          });
        },
        onAfterLeave: OS
      }, {
        default: () => [i ? h("span", {
          class: `${n}-loading-icon`
        }, [h(_r, null, null)]) : null]
      });
    };
  }
}), kS = (e, t) => ({
  // Border
  [`> span, > ${e}`]: {
    "&:not(:last-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: t
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: t
        }
      }
    }
  }
}), sW = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    lineWidth: o,
    colorPrimaryHover: i,
    colorErrorHover: r
  } = 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
      kS(`${t}-primary`, i),
      kS(`${t}-danger`, r)
    ]
  };
};
function uW(e, t) {
  return {
    // border collapse
    [`&-item:not(${t}-last-item)`]: {
      marginBottom: -e.lineWidth
    },
    "&-item": {
      "&:hover,&:focus,&:active": {
        zIndex: 2
      },
      "&[disabled]": {
        zIndex: 0
      }
    }
  };
}
function cW(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 dW(e) {
  const t = `${e.componentCls}-compact-vertical`;
  return {
    [t]: O(O({}, uW(e, t)), cW(e.componentCls, t))
  };
}
const fW = (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)": O({}, Rl(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: '""'
            }
          }
        }
      }
    }
  };
}, qa = (e, t) => ({
  "&:not(:disabled)": {
    "&:hover": e,
    "&:active": t
  }
}), pW = (e) => ({
  minWidth: e.controlHeight,
  paddingInlineStart: 0,
  paddingInlineEnd: 0,
  borderRadius: "50%"
}), hW = (e) => ({
  borderRadius: e.controlHeight,
  paddingInlineStart: e.controlHeight / 2,
  paddingInlineEnd: e.controlHeight / 2
}), Gm = (e) => ({
  cursor: "not-allowed",
  borderColor: e.colorBorder,
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  boxShadow: "none"
}), Lp = (e, t, n, o, i, r, a) => ({
  [`&${e}-background-ghost`]: O(O({
    color: t || void 0,
    backgroundColor: "transparent",
    borderColor: n || void 0,
    boxShadow: "none"
  }, qa(O({
    backgroundColor: "transparent"
  }, r), O({
    backgroundColor: "transparent"
  }, a))), {
    "&:disabled": {
      cursor: "not-allowed",
      color: o || void 0,
      borderColor: i || void 0
    }
  })
}), O0 = (e) => ({
  "&:disabled": O({}, Gm(e))
}), zM = (e) => O({}, O0(e)), Hp = (e) => ({
  "&:disabled": {
    cursor: "not-allowed",
    color: e.colorTextDisabled
  }
}), BM = (e) => O(O(O(O(O({}, zM(e)), {
  backgroundColor: e.colorBgContainer,
  borderColor: e.colorBorder,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`
}), qa({
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), Lp(e.componentCls, e.colorBgContainer, e.colorBgContainer, e.colorTextDisabled, e.colorBorder)), {
  [`&${e.componentCls}-dangerous`]: O(O(O({
    color: e.colorError,
    borderColor: e.colorError
  }, qa({
    color: e.colorErrorHover,
    borderColor: e.colorErrorBorderHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), Lp(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder)), O0(e))
}), gW = (e) => O(O(O(O(O({}, zM(e)), {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimary,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`
}), qa({
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryHover
}, {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryActive
})), Lp(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`]: O(O(O({
    backgroundColor: e.colorError,
    boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`
  }, qa({
    backgroundColor: e.colorErrorHover
  }, {
    backgroundColor: e.colorErrorActive
  })), Lp(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
    color: e.colorErrorHover,
    borderColor: e.colorErrorHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), O0(e))
}), vW = (e) => O(O({}, BM(e)), {
  borderStyle: "dashed"
}), mW = (e) => O(O(O({
  color: e.colorLink
}, qa({
  color: e.colorLinkHover
}, {
  color: e.colorLinkActive
})), Hp(e)), {
  [`&${e.componentCls}-dangerous`]: O(O({
    color: e.colorError
  }, qa({
    color: e.colorErrorHover
  }, {
    color: e.colorErrorActive
  })), Hp(e))
}), bW = (e) => O(O(O({}, qa({
  color: e.colorText,
  backgroundColor: e.colorBgTextHover
}, {
  color: e.colorText,
  backgroundColor: e.colorBgTextActive
})), Hp(e)), {
  [`&${e.componentCls}-dangerous`]: O(O({
    color: e.colorError
  }, Hp(e)), qa({
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }, {
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }))
}), yW = (e) => O(O({}, Gm(e)), {
  [`&${e.componentCls}:hover`]: O({}, Gm(e))
}), xW = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-default`]: BM(e),
    [`${t}-primary`]: gW(e),
    [`${t}-dashed`]: vW(e),
    [`${t}-link`]: mW(e),
    [`${t}-text`]: bW(e),
    [`${t}-disabled`]: yW(e)
  };
}, k0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  const {
    componentCls: n,
    iconCls: o,
    controlHeight: i,
    fontSize: r,
    lineHeight: a,
    lineWidth: l,
    borderRadius: s,
    buttonPaddingHorizontal: u
  } = e, c = Math.max(0, (i - r * a) / 2 - l), d = u - l, f = `${n}-icon-only`;
  return [
    // Size
    {
      [`${n}${t}`]: {
        fontSize: r,
        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}`]: pW(e)
    },
    {
      [`${n}${n}-round${t}`]: hW(e)
    }
  ];
}, wW = (e) => k0(e), SW = (e) => {
  const t = Qt(e, {
    controlHeight: e.controlHeightSM,
    padding: e.paddingXS,
    buttonPaddingHorizontal: 8,
    borderRadius: e.borderRadiusSM
  });
  return k0(t, `${e.componentCls}-sm`);
}, CW = (e) => {
  const t = Qt(e, {
    controlHeight: e.controlHeightLG,
    fontSize: e.fontSizeLG,
    borderRadius: e.borderRadiusLG
  });
  return k0(t, `${e.componentCls}-lg`);
}, $W = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`&${t}-block`]: {
        width: "100%"
      }
    }
  };
}, PW = On("Button", (e) => {
  const {
    controlTmpOutline: t,
    paddingContentHorizontal: n
  } = e, o = Qt(e, {
    colorOutlineDefault: t,
    buttonPaddingHorizontal: n
  });
  return [
    // Shared
    fW(o),
    // Size
    SW(o),
    wW(o),
    CW(o),
    // Block
    $W(o),
    // Group (type, ghost, danger, disabled, loading)
    xW(o),
    // Button Group
    sW(o),
    // Space Compact
    Fd(e, {
      focus: !1
    }),
    dW(e)
  ];
}), OW = () => ({
  prefixCls: String,
  size: {
    type: String
  }
}), FM = b0(), Um = be({
  compatConfig: {
    MODE: 3
  },
  name: "AButtonGroup",
  props: OW(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: i
    } = Rt("btn-group", e), [, , r] = dc();
    FM.useProvide($n({
      size: E(() => e.size)
    }));
    const a = E(() => {
      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:
          dn(!l, "Button.Group", "Invalid prop `size`.");
      }
      return {
        [`${o.value}`]: !0,
        [`${o.value}-${s}`]: s,
        [`${o.value}-rtl`]: i.value === "rtl",
        [r.value]: !0
      };
    });
    return () => {
      var l;
      return h("div", {
        class: a.value
      }, [go((l = n.default) === null || l === void 0 ? void 0 : l.call(n))]);
    };
  }
}), IS = /^[\u4e00-\u9fa5]{2}$/, MS = IS.test.bind(IS);
function kf(e) {
  return e === "text" || e === "link";
}
const Bt = be({
  compatConfig: {
    MODE: 3
  },
  name: "AButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: _n(NM(), {
    type: "default"
  }),
  slots: Object,
  // emits: ['click', 'mousedown'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i,
      expose: r
    } = t;
    const {
      prefixCls: a,
      autoInsertSpaceInButton: l,
      direction: s,
      size: u
    } = Rt("btn", e), [c, d] = PW(a), f = FM.useInject(), p = Tr(), v = E(() => {
      var A;
      return (A = e.disabled) !== null && A !== void 0 ? A : p.value;
    }), g = $e(null), m = $e(void 0);
    let x = !1;
    const S = $e(!1), C = $e(!1), P = E(() => l.value !== !1), {
      compactSize: $,
      compactItemClassnames: I
    } = fc(a, s), w = E(() => typeof e.loading == "object" && e.loading.delay ? e.loading.delay || !0 : !!e.loading);
    Ie(w, (A) => {
      clearTimeout(m.value), typeof w.value == "number" ? m.value = setTimeout(() => {
        S.value = A;
      }, w.value) : S.value = A;
    }, {
      immediate: !0
    });
    const M = E(() => {
      const {
        type: A,
        shape: G = "default",
        ghost: j,
        block: Z,
        danger: W
      } = e, K = a.value, q = {
        large: "lg",
        small: "sm",
        middle: void 0
      }, U = $.value || f?.size || u.value, ae = U && q[U] || "";
      return [I.value, {
        [d.value]: !0,
        [`${K}`]: !0,
        [`${K}-${G}`]: G !== "default" && G,
        [`${K}-${A}`]: A,
        [`${K}-${ae}`]: ae,
        [`${K}-loading`]: S.value,
        [`${K}-background-ghost`]: j && !kf(A),
        [`${K}-two-chinese-chars`]: C.value && P.value,
        [`${K}-block`]: Z,
        [`${K}-dangerous`]: !!W,
        [`${K}-rtl`]: s.value === "rtl"
      }];
    }), _ = () => {
      const A = g.value;
      if (!A || l.value === !1)
        return;
      const G = A.textContent;
      x && MS(G) ? C.value || (C.value = !0) : C.value && (C.value = !1);
    }, N = (A) => {
      if (S.value || v.value) {
        A.preventDefault();
        return;
      }
      i("click", A);
    }, R = (A) => {
      i("mousedown", A);
    }, H = (A, G) => {
      const j = G ? " " : "";
      if (A.type === Xb) {
        let Z = A.children.trim();
        return MS(Z) && (Z = Z.split("").join(j)), h("span", null, [Z]);
      }
      return A;
    };
    return It(() => {
      dn(!(e.ghost && kf(e.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
    }), At(_), Ya(_), qt(() => {
      m.value && clearTimeout(m.value);
    }), r({
      focus: () => {
        var A;
        (A = g.value) === null || A === void 0 || A.focus();
      },
      blur: () => {
        var A;
        (A = g.value) === null || A === void 0 || A.blur();
      }
    }), () => {
      var A, G;
      const {
        icon: j = (A = n.icon) === null || A === void 0 ? void 0 : A.call(n)
      } = e, Z = go((G = n.default) === null || G === void 0 ? void 0 : G.call(n));
      x = Z.length === 1 && !j && !kf(e.type);
      const {
        type: W,
        htmlType: K,
        href: q,
        title: U,
        target: ae
      } = e, se = S.value ? "loading" : j, re = O(O({}, o), {
        title: U,
        disabled: v.value,
        class: [M.value, o.class, {
          [`${a.value}-icon-only`]: Z.length === 0 && !!se
        }],
        onClick: N,
        onMousedown: R
      });
      v.value || delete re.disabled;
      const ie = j && !S.value ? j : h(lW, {
        existIcon: !!j,
        prefixCls: a.value,
        loading: !!S.value
      }, null), te = Z.map((ce) => H(ce, x && P.value));
      if (q !== void 0)
        return c(h("a", Q(Q({}, re), {}, {
          href: q,
          target: ae,
          ref: g
        }), [ie, te]));
      let ve = h("button", Q(Q({}, re), {}, {
        ref: g,
        type: K
      }), [ie, te]);
      if (!kf(W)) {
        const ce = /* @__PURE__ */ (function() {
          return ve;
        })();
        ve = h(P0, {
          ref: "wave",
          disabled: !!S.value
        }, {
          default: () => [ce]
        });
      }
      return c(ve);
    };
  }
});
Bt.Group = Um;
Bt.install = function(e) {
  return e.component(Bt.name, Bt), e.component(Um.name, Um), e;
};
const LM = () => ({
  arrow: en([Boolean, Object]),
  trigger: {
    type: [Array, String]
  },
  menu: _t(),
  overlay: pe.any,
  /** @deprecated Please use `open` instead */
  visible: ct(),
  open: ct(),
  disabled: ct(),
  danger: ct(),
  autofocus: ct(),
  align: _t(),
  getPopupContainer: Function,
  prefixCls: String,
  transitionName: String,
  placement: String,
  overlayClassName: String,
  overlayStyle: _t(),
  forceRender: ct(),
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  openClassName: String,
  minOverlayWidthMatchTrigger: ct(),
  destroyPopupOnHide: ct(),
  /** @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
  }
}), sv = NM(), kW = () => O(O({}, LM()), {
  type: sv.type,
  size: String,
  htmlType: sv.htmlType,
  href: String,
  disabled: ct(),
  prefixCls: String,
  icon: pe.any,
  title: String,
  loading: sv.loading,
  onClick: Ku()
});
var IW = { 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 TS(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) {
      MW(e, i, n[i]);
    });
  }
  return e;
}
function MW(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ld = function(t, n) {
  var o = TS({}, t, n.attrs);
  return h(an, TS({}, o, {
    icon: IW
  }), null);
};
Ld.displayName = "EllipsisOutlined";
Ld.inheritAttrs = !1;
const TW = (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
        }
      }
    }
  };
}, _W = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    colorError: o,
    colorTextLightSolid: i
  } = e, r = `${n}-item`;
  return {
    [`${t}, ${t}-menu-submenu`]: {
      [`${n} ${r}`]: {
        [`&${r}-danger:not(${r}-disabled)`]: {
          color: o,
          "&:hover": {
            color: i,
            backgroundColor: o
          }
        }
      }
    }
  };
}, EW = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    zIndexPopup: o,
    dropdownArrowDistance: i,
    dropdownArrowOffset: r,
    sizePopupArrow: a,
    antCls: l,
    iconCls: s,
    motionDurationMid: u,
    dropdownPaddingVertical: c,
    fontSize: d,
    dropdownEdgeChildPadding: f,
    colorTextDisabled: p,
    fontSizeIcon: v,
    controlPaddingHorizontal: g,
    colorBgElevated: m,
    boxShadowPopoverArrow: x
  } = e;
  return [
    {
      [t]: O(O({}, fn(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 + a / 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: v
          },
          [`${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`]: O({
          position: "absolute",
          zIndex: 1,
          display: "block"
        }, Ky(a, e.borderRadiusXS, e.borderRadiusOuter, m, x)),
        [`
        &-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: r
          }
        },
        [`&-placement-topRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: r
          }
        },
        [`
          &-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: r
          }
        },
        [`&-placement-bottomRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: r
          }
        },
        // =============================================================
        // ==                         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: Bh
        },
        [`&${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: Lh
        },
        [`&${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: Fh
        },
        [`&${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: Hh
        }
      })
    },
    {
      // =============================================================
      // ==                          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]: O(O({
          padding: f,
          listStyleType: "none",
          backgroundColor: m,
          backgroundClip: "padding-box",
          borderRadius: e.borderRadiusLG,
          outline: "none",
          boxShadow: e.boxShadowSecondary
        }, Rl(e)), {
          [`${n}-item-group-title`]: {
            padding: `${c}px ${g}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`]: O(O({
            clear: "both",
            margin: 0,
            padding: `${c}px ${g}px`,
            color: e.colorText,
            fontWeight: "normal",
            fontSize: d,
            lineHeight: e.lineHeight,
            cursor: "pointer",
            transition: `all ${u}`,
            "&:hover, &-active": {
              backgroundColor: e.controlItemBgHover
            }
          }, Rl(e)), {
            "&-selected": {
              color: e.colorPrimary,
              backgroundColor: e.controlItemBgActive,
              "&:hover, &-active": {
                backgroundColor: e.controlItemBgActiveHover
              }
            },
            "&-disabled": {
              color: p,
              cursor: "not-allowed",
              "&:hover": {
                color: p,
                backgroundColor: m,
                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: v,
                fontStyle: "normal"
              }
            }
          }),
          [`${n}-item-group-list`]: {
            margin: `0 ${e.marginXS}px`,
            padding: 0,
            listStyle: "none"
          },
          [`${n}-submenu-title`]: {
            paddingInlineEnd: g + e.fontSizeSM
          },
          [`${n}-submenu-vertical`]: {
            position: "relative"
          },
          [`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]: {
            [`&, ${t}-menu-submenu-arrow-icon`]: {
              color: p,
              backgroundColor: m,
              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
    [oa(e, "slide-up"), oa(e, "slide-down"), Qu(e, "move-up"), Qu(e, "move-down"), Bd(e, "zoom-big")]
  ];
}, HM = On("Dropdown", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const {
    marginXXS: o,
    sizePopupArrow: i,
    controlHeight: r,
    fontSize: a,
    lineHeight: l,
    paddingXXS: s,
    componentCls: u,
    borderRadiusOuter: c,
    borderRadiusLG: d
  } = e, f = (r - a * l) / 2, {
    dropdownArrowOffset: p
  } = _M({
    sizePopupArrow: i,
    contentRadius: d,
    borderRadiusOuter: c
  }), v = Qt(e, {
    menuCls: `${u}-menu`,
    rootPrefixCls: n,
    dropdownArrowDistance: i / 2 + o,
    dropdownArrowOffset: p,
    dropdownPaddingVertical: f,
    dropdownEdgeChildPadding: s
  });
  return [EW(v), TW(v), _W(v)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
var DW = 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 AW = Bt.Group, Vp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdownButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: _n(kW(), {
    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 r = (f) => {
      i("update:visible", f), i("visibleChange", f), i("update:open", f), i("openChange", f);
    }, {
      prefixCls: a,
      direction: l,
      getPopupContainer: s
    } = Rt("dropdown", e), u = E(() => `${a.value}-button`), [c, d] = HM(a);
    return () => {
      var f, p;
      const v = O(O({}, e), o), {
        type: g = "default",
        disabled: m,
        danger: x,
        loading: S,
        htmlType: C,
        class: P = "",
        overlay: $ = (f = n.overlay) === null || f === void 0 ? void 0 : f.call(n),
        trigger: I,
        align: w,
        open: M,
        visible: _,
        onVisibleChange: N,
        placement: R = l.value === "rtl" ? "bottomLeft" : "bottomRight",
        href: H,
        title: L,
        icon: B = ((p = n.icon) === null || p === void 0 ? void 0 : p.call(n)) || h(Ld, null, null),
        mouseEnterDelay: A,
        mouseLeaveDelay: G,
        overlayClassName: j,
        overlayStyle: Z,
        destroyPopupOnHide: W,
        onClick: K,
        "onUpdate:open": q
      } = v, U = DW(v, ["type", "disabled", "danger", "loading", "htmlType", "class", "overlay", "trigger", "align", "open", "visible", "onVisibleChange", "placement", "href", "title", "icon", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "onClick", "onUpdate:open"]), ae = {
        align: w,
        disabled: m,
        trigger: m ? [] : I,
        placement: R,
        getPopupContainer: s?.value,
        onOpenChange: r,
        mouseEnterDelay: A,
        mouseLeaveDelay: G,
        open: M ?? _,
        overlayClassName: j,
        overlayStyle: Z,
        destroyPopupOnHide: W
      }, se = h(Bt, {
        danger: x,
        type: g,
        disabled: m,
        loading: S,
        onClick: K,
        htmlType: C,
        href: H,
        title: L
      }, {
        default: n.default
      }), re = h(Bt, {
        danger: x,
        type: g,
        icon: B
      }, null);
      return c(h(AW, Q(Q({}, U), {}, {
        class: _e(u.value, P, d.value)
      }), {
        default: () => [n.leftButton ? n.leftButton({
          button: se
        }) : se, h(_i, ae, {
          default: () => [n.rightButton ? n.rightButton({
            button: re
          }) : re],
          overlay: () => $
        })]
      }));
    };
  }
});
var RW = { 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 _S(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) {
      NW(e, i, n[i]);
    });
  }
  return e;
}
function NW(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Es = function(t, n) {
  var o = _S({}, t, n.attrs);
  return h(an, _S({}, o, {
    icon: RW
  }), null);
};
Es.displayName = "RightOutlined";
Es.inheritAttrs = !1;
const VM = Symbol("OverrideContextKey"), jM = () => zt(VM, void 0), WM = (e) => {
  var t, n, o;
  const {
    prefixCls: i,
    mode: r,
    selectable: a,
    validator: l,
    onClick: s,
    expandIcon: u
  } = jM() || {};
  Ft(VM, {
    prefixCls: E(() => {
      var c, d;
      return (d = (c = e.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : i?.value;
    }),
    mode: E(() => {
      var c, d;
      return (d = (c = e.mode) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : r?.value;
    }),
    selectable: E(() => {
      var c, d;
      return (d = (c = e.selectable) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : a?.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
  });
}, _i = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdown",
  inheritAttrs: !1,
  props: _n(LM(), {
    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: r,
      rootPrefixCls: a,
      direction: l,
      getPopupContainer: s
    } = Rt("dropdown", e), [u, c] = HM(r);
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"], ["onUpdate:visible", "onUpdate:open"]].forEach((m) => {
      let [x, S] = m;
      wo(e[x] === void 0, "Dropdown", `\`${x}\` is deprecated which will be removed in next major version, please use \`${S}\` instead.`);
    });
    const d = E(() => {
      const {
        placement: m = "",
        transitionName: x
      } = e;
      return x !== void 0 ? x : m.includes("top") ? `${a.value}-slide-down` : `${a.value}-slide-up`;
    });
    WM({
      prefixCls: E(() => `${r.value}-menu`),
      expandIcon: E(() => h("span", {
        class: `${r.value}-menu-submenu-arrow`
      }, [h(Es, {
        class: `${r.value}-menu-submenu-arrow-icon`
      }, null)])),
      mode: E(() => "vertical"),
      selectable: E(() => !1),
      onClick: () => {
      },
      validator: (m) => {
        let {
          mode: x
        } = m;
        wo(!x || x === "vertical", "Dropdown", `mode="${x}" is not supported for Dropdown's Menu.`);
      }
    });
    const f = () => {
      var m, x, S;
      const C = e.overlay || ((m = n.overlay) === null || m === void 0 ? void 0 : m.call(n)), P = Array.isArray(C) ? C[0] : C;
      if (!P) return null;
      const $ = P.props || {};
      dn(!$.mode || $.mode === "vertical", "Dropdown", `mode="${$.mode}" is not supported for Dropdown's Menu.`);
      const {
        selectable: I = !1,
        expandIcon: w = (S = (x = P.children) === null || x === void 0 ? void 0 : x.expandIcon) === null || S === void 0 ? void 0 : S.call(x)
      } = $, M = typeof w < "u" && Ao(w) ? w : h("span", {
        class: `${r.value}-menu-submenu-arrow`
      }, [h(Es, {
        class: `${r.value}-menu-submenu-arrow-icon`
      }, null)]);
      return Ao(P) ? Un(P, {
        mode: "vertical",
        selectable: I,
        expandIcon: () => M
      }) : P;
    }, p = E(() => {
      const m = e.placement;
      if (!m)
        return l.value === "rtl" ? "bottomRight" : "bottomLeft";
      if (m.includes("Center")) {
        const x = m.slice(0, m.indexOf("Center"));
        return dn(!m.includes("Center"), "Dropdown", `You are using '${m}' placement in Dropdown, which is deprecated. Try to use '${x}' instead.`), x;
      }
      return m;
    }), v = E(() => typeof e.visible == "boolean" ? e.visible : e.open), g = (m) => {
      i("update:visible", m), i("visibleChange", m), i("update:open", m), i("openChange", m);
    };
    return () => {
      var m, x;
      const {
        arrow: S,
        trigger: C,
        disabled: P,
        overlayClassName: $
      } = e, I = (m = n.default) === null || m === void 0 ? void 0 : m.call(n)[0], w = Un(I, O({
        class: _e((x = I?.props) === null || x === void 0 ? void 0 : x.class, {
          [`${r.value}-rtl`]: l.value === "rtl"
        }, `${r.value}-trigger`)
      }, P ? {
        disabled: P
      } : {})), M = _e($, c.value, {
        [`${r.value}-rtl`]: l.value === "rtl"
      }), _ = P ? [] : C;
      let N;
      _ && _.includes("contextmenu") && (N = !0);
      const R = IM({
        arrowPointAtCenter: typeof S == "object" && S.pointAtCenter,
        autoAdjustOverflow: !0
      }), H = Bn(O(O(O({}, e), o), {
        visible: v.value,
        builtinPlacements: R,
        overlayClassName: M,
        arrow: !!S,
        alignPoint: N,
        prefixCls: r.value,
        getPopupContainer: s?.value,
        transitionName: d.value,
        trigger: _,
        onVisibleChange: g,
        placement: p.value
      }), ["overlay", "onUpdate:visible"]);
      return u(h(AM, H, {
        default: () => [w],
        overlay: f
      }));
    };
  }
});
_i.Button = Vp;
function zW(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 r = Object.keys(e), a = Object.keys(t);
  if (r.length !== a.length)
    return !1;
  const l = Object.prototype.hasOwnProperty.bind(t);
  for (let s = 0; s < r.length; s++) {
    const u = r[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 mu(e, t) {
  return zW(di(e), di(t));
}
const KM = Symbol("menuContextKey"), qM = (e) => {
  Ft(KM, e);
}, Xa = () => zt(KM), YM = Symbol("ForceRenderKey"), BW = (e) => {
  Ft(YM, e);
}, GM = () => zt(YM, !1), UM = Symbol("menuFirstLevelContextKey"), XM = (e) => {
  Ft(UM, e);
}, FW = () => zt(UM, !0), jp = be({
  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 = Xa(), i = O({}, o);
    return e.mode !== void 0 && (i.mode = Kt(e, "mode")), e.overflowDisabled !== void 0 && (i.overflowDisabled = Kt(e, "overflowDisabled")), qM(i), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), LW = Symbol("siderCollapsed"), If = "$$__vc-menu-more__key", QM = Symbol("KeyPathContext"), I0 = () => zt(QM, {
  parentEventKeys: E(() => []),
  parentKeys: E(() => []),
  parentInfo: {}
}), HW = (e, t, n) => {
  const {
    parentEventKeys: o,
    parentKeys: i
  } = I0(), r = E(() => [...o.value, e]), a = E(() => [...i.value, t]);
  return Ft(QM, {
    parentEventKeys: r,
    parentKeys: a,
    parentInfo: n
  }), a;
}, ZM = Symbol("measure"), ES = be({
  compatConfig: {
    MODE: 3
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(ZM, !0), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), M0 = () => zt(ZM, !1);
function JM(e) {
  const {
    mode: t,
    rtl: n,
    inlineIndent: o
  } = Xa();
  return E(() => t.value !== "inline" ? null : n.value ? {
    paddingRight: `${e.value * o.value}px`
  } : {
    paddingLeft: `${e.value * o.value}px`
  });
}
let VW = 0;
const jW = () => ({
  id: String,
  role: String,
  disabled: Boolean,
  danger: Boolean,
  title: {
    type: [String, Boolean],
    default: void 0
  },
  icon: pe.any,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function,
  onKeydown: Function,
  onFocus: Function,
  // Internal user prop
  originItemValue: _t()
}), Zu = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItem",
  inheritAttrs: !1,
  props: jW(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const r = fi(), a = M0(), l = typeof r.vnode.key == "symbol" ? String(r.vnode.key) : r.vnode.key;
    dn(typeof r.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(l)}"\` not support Symbol type`);
    const s = `menu_item_${++VW}_$$_${l}`, {
      parentEventKeys: u,
      parentKeys: c
    } = I0(), {
      prefixCls: d,
      activeKeys: f,
      disabled: p,
      changeActiveKeys: v,
      rtl: g,
      inlineCollapsed: m,
      siderCollapsed: x,
      onItemClick: S,
      selectedKeys: C,
      registerMenuInfo: P,
      unRegisterMenuInfo: $
    } = Xa(), I = FW(), w = $e(!1), M = E(() => [...c.value, l]);
    P(s, {
      eventKey: s,
      key: l,
      parentEventKeys: u,
      parentKeys: c,
      isLeaf: !0
    }), qt(() => {
      $(s);
    }), Ie(f, () => {
      w.value = !!f.value.find((q) => q === l);
    }, {
      immediate: !0
    });
    const N = E(() => p.value || e.disabled), R = E(() => C.value.includes(l)), H = E(() => {
      const q = `${d.value}-item`;
      return {
        [`${q}`]: !0,
        [`${q}-danger`]: e.danger,
        [`${q}-active`]: w.value,
        [`${q}-selected`]: R.value,
        [`${q}-disabled`]: N.value
      };
    }), L = (q) => ({
      key: l,
      eventKey: s,
      keyPath: M.value,
      eventKeyPath: [...u.value, s],
      domEvent: q,
      item: O(O({}, e), i)
    }), B = (q) => {
      if (N.value)
        return;
      const U = L(q);
      o("click", q), S(U);
    }, A = (q) => {
      N.value || (v(M.value), o("mouseenter", q));
    }, G = (q) => {
      N.value || (v([]), o("mouseleave", q));
    }, j = (q) => {
      if (o("keydown", q), q.which === rt.ENTER) {
        const U = L(q);
        o("click", q), S(U);
      }
    }, Z = (q) => {
      v(M.value), o("focus", q);
    }, W = (q, U) => {
      const ae = h("span", {
        class: `${d.value}-title-content`
      }, [U]);
      return (!q || Ao(U) && U.type === "span") && U && m.value && I && typeof U == "string" ? h("div", {
        class: `${d.value}-inline-collapsed-noicon`
      }, [U.charAt(0)]) : ae;
    }, K = JM(E(() => M.value.length));
    return () => {
      var q, U, ae, se, re;
      if (a) return null;
      const ie = (q = e.title) !== null && q !== void 0 ? q : (U = n.title) === null || U === void 0 ? void 0 : U.call(n), te = go((ae = n.default) === null || ae === void 0 ? void 0 : ae.call(n)), ve = te.length;
      let ce = ie;
      typeof ie > "u" ? ce = I && ve ? te : "" : ie === !1 && (ce = "");
      const fe = {
        title: ce
      };
      !x.value && !m.value && (fe.title = null, fe.open = !1);
      const ge = {};
      e.role === "option" && (ge["aria-selected"] = R.value);
      const Me = (se = e.icon) !== null && se !== void 0 ? se : (re = n.icon) === null || re === void 0 ? void 0 : re.call(n, e);
      return h(Lo, Q(Q({}, fe), {}, {
        placement: g.value ? "left" : "right",
        overlayClassName: `${d.value}-inline-collapsed-tooltip`
      }), {
        default: () => [h(za.Item, Q(Q(Q({
          component: "li"
        }, i), {}, {
          id: e.id,
          style: O(O({}, i.style || {}), K.value),
          class: [H.value, {
            [`${i.class}`]: !!i.class,
            [`${d.value}-item-only-child`]: (Me ? ve + 1 : ve) === 1
          }],
          role: e.role || "menuitem",
          tabindex: e.disabled ? null : -1,
          "data-menu-id": l,
          "aria-disabled": e.disabled
        }, ge), {}, {
          onMouseenter: A,
          onMouseleave: G,
          onClick: B,
          onKeydown: j,
          onFocus: Z,
          title: typeof ie == "string" ? ie : void 0
        }), {
          default: () => [Un(typeof Me == "function" ? Me(e.originItemValue) : Me, {
            class: `${d.value}-item-icon`
          }, !1), W(Me, te)]
        })]
      });
    };
  }
}), Pl = {
  adjustX: 1,
  adjustY: 1
}, WW = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Pl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Pl,
    offset: [0, 7]
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Pl,
    offset: [-4, 0]
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Pl,
    offset: [4, 0]
  }
}, KW = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Pl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Pl,
    offset: [0, 7]
  },
  rightTop: {
    points: ["tr", "tl"],
    overflow: Pl,
    offset: [-4, 0]
  },
  leftTop: {
    points: ["tl", "tr"],
    overflow: Pl,
    offset: [4, 0]
  }
}, qW = {
  horizontal: "bottomLeft",
  vertical: "rightTop",
  "vertical-left": "rightTop",
  "vertical-right": "leftTop"
}, DS = be({
  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 = $e(!1), {
      getPopupContainer: r,
      rtl: a,
      subMenuOpenDelay: l,
      subMenuCloseDelay: s,
      builtinPlacements: u,
      triggerSubMenuAction: c,
      forceSubMenuRender: d,
      motion: f,
      defaultMotions: p,
      rootClassName: v
    } = Xa(), g = GM(), m = E(() => a.value ? O(O({}, KW), u.value) : O(O({}, WW), u.value)), x = E(() => qW[e.mode]), S = $e();
    Ie(() => e.visible, ($) => {
      Vt.cancel(S.value), S.value = Vt(() => {
        i.value = $;
      });
    }, {
      immediate: !0
    }), qt(() => {
      Vt.cancel(S.value);
    });
    const C = ($) => {
      o("visibleChange", $);
    }, P = E(() => {
      var $, I;
      const w = f.value || (($ = p.value) === null || $ === void 0 ? void 0 : $[e.mode]) || ((I = p.value) === null || I === void 0 ? void 0 : I.other), M = typeof w == "function" ? w() : w;
      return M ? Ts(M.name, {
        css: !0
      }) : void 0;
    });
    return () => {
      const {
        prefixCls: $,
        popupClassName: I,
        mode: w,
        popupOffset: M,
        disabled: _
      } = e;
      return h(Ad, {
        prefixCls: $,
        popupClassName: _e(`${$}-popup`, {
          [`${$}-rtl`]: a.value
        }, I, v.value),
        stretch: w === "horizontal" ? "minWidth" : null,
        getPopupContainer: r.value,
        builtinPlacements: m.value,
        popupPlacement: x.value,
        popupVisible: i.value,
        popupAlign: M && {
          offset: M
        },
        action: _ ? [] : [c.value],
        mouseEnterDelay: l.value,
        mouseLeaveDelay: s.value,
        onPopupVisibleChange: C,
        forceRender: g || d.value,
        popupAnimation: P.value
      }, {
        popup: n.popup,
        default: n.default
      });
    };
  }
}), T0 = (e, t) => {
  let {
    slots: n,
    attrs: o
  } = t;
  var i;
  const {
    prefixCls: r,
    mode: a
  } = Xa();
  return h("ul", Q(Q({}, o), {}, {
    class: _e(r.value, `${r.value}-sub`, `${r.value}-${a.value === "inline" ? "inline" : "vertical"}`),
    "data-menu-list": !0
  }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
};
T0.displayName = "SubMenuList";
const YW = be({
  compatConfig: {
    MODE: 3
  },
  name: "InlineSubMenuList",
  inheritAttrs: !1,
  props: {
    id: String,
    open: Boolean,
    keyPath: Array
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = E(() => "inline"), {
      motion: i,
      mode: r,
      defaultMotions: a
    } = Xa(), l = E(() => r.value === o.value), s = le(!l.value), u = E(() => l.value ? e.open : !1);
    Ie(r, () => {
      l.value && (s.value = !1);
    }, {
      flush: "post"
    });
    const c = E(() => {
      var d, f;
      const p = i.value || ((d = a.value) === null || d === void 0 ? void 0 : d[o.value]) || ((f = a.value) === null || f === void 0 ? void 0 : f.other), v = typeof p == "function" ? p() : p;
      return O(O({}, v), {
        appear: e.keyPath.length <= 1
      });
    });
    return () => {
      var d;
      return s.value ? null : h(jp, {
        mode: o.value
      }, {
        default: () => [h(Ei, c.value, {
          default: () => [er(h(T0, {
            id: e.id
          }, {
            default: () => [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]
          }), [[Or, u.value]])]
        })]
      });
    };
  }
});
let AS = 0;
const GW = () => ({
  icon: pe.any,
  title: pe.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: _t()
}), Ju = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASubMenu",
  inheritAttrs: !1,
  props: GW(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i
    } = t;
    var r, a;
    XM(!1);
    const l = M0(), s = fi(), u = typeof s.vnode.key == "symbol" ? String(s.vnode.key) : s.vnode.key;
    dn(typeof s.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
    const c = ym(u) ? u : `sub_menu_${++AS}_$$_not_set_key`, d = (r = e.eventKey) !== null && r !== void 0 ? r : ym(u) ? `sub_menu_${++AS}_$$_${u}` : c, {
      parentEventKeys: f,
      parentInfo: p,
      parentKeys: v
    } = I0(), g = E(() => [...v.value, c]), m = $e([]), x = {
      eventKey: d,
      key: c,
      parentEventKeys: f,
      childrenEventKeys: m,
      parentKeys: v
    };
    (a = p.childrenEventKeys) === null || a === void 0 || a.value.push(d), qt(() => {
      var Be;
      p.childrenEventKeys && (p.childrenEventKeys.value = (Be = p.childrenEventKeys) === null || Be === void 0 ? void 0 : Be.value.filter((Ve) => Ve != d));
    }), HW(d, c, x);
    const {
      prefixCls: S,
      activeKeys: C,
      disabled: P,
      changeActiveKeys: $,
      mode: I,
      inlineCollapsed: w,
      openKeys: M,
      overflowDisabled: _,
      onOpenChange: N,
      registerMenuInfo: R,
      unRegisterMenuInfo: H,
      selectedSubMenuKeys: L,
      expandIcon: B,
      theme: A
    } = Xa(), G = u != null, j = !l && (GM() || !G);
    BW(j), (l && G || !l && !G || j) && (R(d, x), qt(() => {
      H(d);
    }));
    const Z = E(() => `${S.value}-submenu`), W = E(() => P.value || e.disabled), K = $e(), q = $e(), U = E(() => M.value.includes(c)), ae = E(() => !_.value && U.value), se = E(() => L.value.includes(c)), re = $e(!1);
    Ie(C, () => {
      re.value = !!C.value.find((Be) => Be === c);
    }, {
      immediate: !0
    });
    const ie = (Be) => {
      W.value || (i("titleClick", Be, c), I.value === "inline" && N(c, !U.value));
    }, te = (Be) => {
      W.value || ($(g.value), i("mouseenter", Be));
    }, ve = (Be) => {
      W.value || ($([]), i("mouseleave", Be));
    }, ce = JM(E(() => g.value.length)), fe = (Be) => {
      I.value !== "inline" && N(c, Be);
    }, ge = () => {
      $(g.value);
    }, Me = d && `${d}-popup`, ze = E(() => _e(S.value, `${S.value}-${e.theme || A.value}`, e.popupClassName)), Ke = (Be, Ve) => {
      if (!Ve)
        return w.value && !v.value.length && Be && typeof Be == "string" ? h("div", {
          class: `${S.value}-inline-collapsed-noicon`
        }, [Be.charAt(0)]) : h("span", {
          class: `${S.value}-title-content`
        }, [Be]);
      const ot = Ao(Be) && Be.type === "span";
      return h(Je, null, [Un(typeof Ve == "function" ? Ve(e.originItemValue) : Ve, {
        class: `${S.value}-item-icon`
      }, !1), ot ? Be : h("span", {
        class: `${S.value}-title-content`
      }, [Be])]);
    }, He = E(() => I.value !== "inline" && g.value.length > 1 ? "vertical" : I.value), Re = E(() => I.value === "horizontal" ? "vertical" : I.value), Xe = E(() => He.value === "horizontal" ? "vertical" : He.value), De = () => {
      var Be, Ve;
      const ot = Z.value, je = (Be = e.icon) !== null && Be !== void 0 ? Be : (Ve = n.icon) === null || Ve === void 0 ? void 0 : Ve.call(n, e), Pe = e.expandIcon || n.expandIcon || B.value, Ge = Ke(Ji(n, e, "title"), je);
      return h("div", {
        style: ce.value,
        class: `${ot}-title`,
        tabindex: W.value ? null : -1,
        ref: K,
        title: typeof Ge == "string" ? Ge : null,
        "data-menu-id": c,
        "aria-expanded": ae.value,
        "aria-haspopup": !0,
        "aria-controls": Me,
        "aria-disabled": W.value,
        onClick: ie,
        onFocus: ge
      }, [Ge, I.value !== "horizontal" && Pe ? Pe(O(O({}, e), {
        isOpen: ae.value
      })) : h("i", {
        class: `${ot}-arrow`
      }, null)]);
    };
    return () => {
      var Be;
      if (l)
        return G ? (Be = n.default) === null || Be === void 0 ? void 0 : Be.call(n) : null;
      const Ve = Z.value;
      let ot = () => null;
      if (!_.value && I.value !== "inline") {
        const je = I.value === "horizontal" ? [0, 8] : [10, 0];
        ot = () => h(DS, {
          mode: He.value,
          prefixCls: Ve,
          visible: !e.internalPopupClose && ae.value,
          popupClassName: ze.value,
          popupOffset: e.popupOffset || je,
          disabled: W.value,
          onVisibleChange: fe
        }, {
          default: () => [De()],
          popup: () => h(jp, {
            mode: Xe.value
          }, {
            default: () => [h(T0, {
              id: Me,
              ref: q
            }, {
              default: n.default
            })]
          })
        });
      } else
        ot = () => h(DS, null, {
          default: De
        });
      return h(jp, {
        mode: Re.value
      }, {
        default: () => [h(za.Item, Q(Q({
          component: "li"
        }, o), {}, {
          role: "none",
          class: _e(Ve, `${Ve}-${I.value}`, o.class, {
            [`${Ve}-open`]: ae.value,
            [`${Ve}-active`]: re.value,
            [`${Ve}-selected`]: se.value,
            [`${Ve}-disabled`]: W.value
          }),
          onMouseenter: te,
          onMouseleave: ve,
          "data-submenu-id": c
        }), {
          default: () => h(Je, null, [ot(), !_.value && h(YW, {
            id: Me,
            open: ae.value,
            keyPath: g.value
          }, {
            default: n.default
          })])
        })]
      });
    };
  }
});
function eT(e, t) {
  return e.classList ? e.classList.contains(t) : ` ${e.className} `.indexOf(` ${t} `) > -1;
}
function Xm(e, t) {
  e.classList ? e.classList.add(t) : eT(e, t) || (e.className = `${e.className} ${t}`);
}
function Qm(e, t) {
  if (e.classList)
    e.classList.remove(t);
  else if (eT(e, t)) {
    const n = e.className;
    e.className = ` ${n} `.replace(` ${t} `, " ");
  }
}
const jh = 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", Xm(n, e);
    },
    onEnter: (n) => {
      Yt(() => {
        n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
      });
    },
    onAfterEnter: (n) => {
      n && (Qm(n, e), n.style.height = null, n.style.opacity = null);
    },
    onBeforeLeave: (n) => {
      Xm(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 && (Qm(n, e), n.style && (n.style.height = null, n.style.opacity = null));
    }
  };
}, UW = () => ({
  title: pe.any,
  // Internal user prop
  originItemValue: _t()
}), Wp = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: !1,
  props: UW(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i
    } = Xa(), r = E(() => `${i.value}-item-group`), a = M0();
    return () => {
      var l, s;
      return a ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : h("li", Q(Q({}, o), {}, {
        onClick: (u) => u.stopPropagation(),
        class: r.value
      }), [h("div", {
        title: typeof e.title == "string" ? e.title : void 0,
        class: `${r.value}-title`
      }, [Ji(n, e, "title")]), h("ul", {
        class: `${r.value}-list`
      }, [(s = n.default) === null || s === void 0 ? void 0 : s.call(n)])]);
    };
  }
}), XW = () => ({
  prefixCls: String,
  dashed: Boolean
}), Kp = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuDivider",
  props: XW(),
  setup(e) {
    const {
      prefixCls: t
    } = Xa(), n = E(() => ({
      [`${t.value}-item-divider`]: !0,
      [`${t.value}-item-divider-dashed`]: !!e.dashed
    }));
    return () => h("li", {
      class: n.value
    }, null);
  }
});
var QW = 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 Zm(e, t, n) {
  return (e || []).map((o, i) => {
    if (o && typeof o == "object") {
      const r = o, {
        label: a,
        children: l,
        key: s,
        type: u
      } = r, c = QW(r, ["label", "children", "key", "type"]), d = s ?? `tmp-${i}`, f = n ? n.parentKeys.slice() : [], p = [], v = {
        eventKey: d,
        key: d,
        parentEventKeys: le(f),
        parentKeys: le(f),
        childrenEventKeys: le(p),
        isLeaf: !1
      };
      if (l || u === "group") {
        if (u === "group") {
          const m = Zm(l, t, n);
          return h(Wp, Q(Q({
            key: d
          }, c), {}, {
            title: a,
            originItemValue: o
          }), {
            default: () => [m]
          });
        }
        t.set(d, v), n && n.childrenEventKeys.push(d);
        const g = Zm(l, t, {
          childrenEventKeys: p,
          parentKeys: [].concat(f, d)
        });
        return h(Ju, Q(Q({
          key: d
        }, c), {}, {
          title: a,
          originItemValue: o
        }), {
          default: () => [g]
        });
      }
      return u === "divider" ? h(Kp, Q({
        key: d
      }, c), null) : (v.isLeaf = !0, t.set(d, v), h(Zu, Q(Q({
        key: d
      }, c), {}, {
        originItemValue: o
      }), {
        default: () => [a]
      }));
    }
    return null;
  }).filter((o) => o);
}
function ZW(e) {
  const t = $e([]), n = $e(!1), o = $e(/* @__PURE__ */ new Map());
  return Ie(() => e.items, () => {
    const i = /* @__PURE__ */ new Map();
    n.value = !1, e.items ? (n.value = !0, t.value = Zm(e.items, i)) : t.value = void 0, o.value = i;
  }, {
    immediate: !0,
    deep: !0
  }), {
    itemsNodes: t,
    store: o,
    hasItmes: n
  };
}
const JW = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    menuHorizontalHeight: o,
    colorSplit: i,
    lineWidth: r,
    lineType: a,
    menuItemPaddingInline: l
  } = e;
  return {
    [`${t}-horizontal`]: {
      lineHeight: `${o}px`,
      border: 0,
      borderBottom: `${r}px ${a} ${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"
      }
    }
  };
}, e7 = (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})`
        }
      }
    }
  };
}, RS = (e) => O({}, Wa(e)), NS = (e, t) => {
  const {
    componentCls: n,
    colorItemText: o,
    colorItemTextSelected: i,
    colorGroupTitle: r,
    colorItemBg: a,
    colorSubItemBg: l,
    colorItemBgSelected: s,
    colorActiveBarHeight: u,
    colorActiveBarWidth: c,
    colorActiveBarBorderSize: d,
    motionDurationSlow: f,
    motionEaseInOut: p,
    motionEaseOut: v,
    menuItemPaddingInline: g,
    motionDurationMid: m,
    colorItemTextHover: x,
    lineType: S,
    colorSplit: C,
    // Disabled
    colorItemTextDisabled: P,
    // Danger
    colorDangerItemText: $,
    colorDangerItemTextHover: I,
    colorDangerItemTextSelected: w,
    colorDangerItemBgActive: M,
    colorDangerItemBgSelected: _,
    colorItemBgHover: N,
    menuSubMenuBg: R,
    // Horizontal
    colorItemTextSelectedHorizontal: H,
    colorItemBgSelectedHorizontal: L
  } = e;
  return {
    [`${n}-${t}`]: {
      color: o,
      background: a,
      [`&${n}-root:focus-visible`]: O({}, RS(e)),
      // ======================== Item ========================
      [`${n}-item-group-title`]: {
        color: r
      },
      [`${n}-submenu-selected`]: {
        [`> ${n}-submenu-title`]: {
          color: i
        }
      },
      // Disabled
      [`${n}-item-disabled, ${n}-submenu-disabled`]: {
        color: `${P} !important`
      },
      // Hover
      [`${n}-item:hover, ${n}-submenu-title:hover`]: {
        [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
          color: x
        }
      },
      [`&:not(${n}-horizontal)`]: {
        [`${n}-item:not(${n}-item-selected)`]: {
          "&:hover": {
            backgroundColor: N
          },
          "&:active": {
            backgroundColor: s
          }
        },
        [`${n}-submenu-title`]: {
          "&:hover": {
            backgroundColor: N
          },
          "&:active": {
            backgroundColor: s
          }
        }
      },
      // Danger - only Item has
      [`${n}-item-danger`]: {
        color: $,
        [`&${n}-item:hover`]: {
          [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
            color: I
          }
        },
        [`&${n}-item:active`]: {
          background: M
        }
      },
      [`${n}-item a`]: {
        "&, &:hover": {
          color: "inherit"
        }
      },
      [`${n}-item-selected`]: {
        color: i,
        // Danger
        [`&${n}-item-danger`]: {
          color: w
        },
        "a, a:hover": {
          color: "inherit"
        }
      },
      [`& ${n}-item-selected`]: {
        backgroundColor: s,
        // Danger
        [`&${n}-item-danger`]: {
          backgroundColor: _
        }
      },
      [`${n}-item, ${n}-submenu-title`]: {
        [`&:not(${n}-item-disabled):focus-visible`]: O({}, RS(e))
      },
      [`&${n}-submenu > ${n}`]: {
        backgroundColor: R
      },
      [`&${n}-popup > ${n}`]: {
        backgroundColor: a
      },
      // ====================== Horizontal ======================
      [`&${n}-horizontal`]: O(O({}, t === "dark" ? {
        borderBottom: 0
      } : {}), {
        [`> ${n}-item, > ${n}-submenu`]: {
          top: d,
          marginTop: -d,
          marginBottom: 0,
          borderRadius: 0,
          "&::after": {
            position: "absolute",
            insetInline: g,
            bottom: 0,
            borderBottom: `${u}px solid transparent`,
            transition: `border-color ${f} ${p}`,
            content: '""'
          },
          "&:hover, &-active, &-open": {
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: H
            }
          },
          "&-selected": {
            color: H,
            backgroundColor: L,
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: H
            }
          }
        }
      }),
      // ================== Inline & Vertical ===================
      //
      [`&${n}-root`]: {
        [`&${n}-inline, &${n}-vertical`]: {
          borderInlineEnd: `${d}px ${S} ${C}`
        }
      },
      // ======================== 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 ${m} ${v}`, `opacity ${m} ${v}`].join(","),
            content: '""'
          },
          // Danger
          [`&${n}-item-danger`]: {
            "&::after": {
              borderInlineEndColor: w
            }
          }
        },
        [`${n}-selected, ${n}-item-selected`]: {
          "&::after": {
            transform: "scaleY(1)",
            opacity: 1,
            transition: [`transform ${m} ${p}`, `opacity ${m} ${p}`].join(",")
          }
        }
      }
    }
  };
}, zS = (e) => {
  const {
    componentCls: t,
    menuItemHeight: n,
    itemMarginInline: o,
    padding: i,
    menuArrowSize: r,
    marginXS: a,
    marginXXS: l
  } = e, s = i + r + a;
  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
    }
  };
}, t7 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    menuItemHeight: o,
    colorTextLightSolid: i,
    dropdownWidth: r,
    controlHeightLG: a,
    motionDurationMid: l,
    motionEaseOut: s,
    paddingXL: u,
    fontSizeSM: c,
    fontSizeLG: d,
    motionDurationSlow: f,
    paddingXS: p,
    boxShadowSecondary: v
  } = e, g = {
    height: o,
    lineHeight: `${o}px`,
    listStylePosition: "inside",
    listStyleType: "disc"
  };
  return [
    {
      [t]: {
        "&-inline, &-vertical": O({
          [`&${t}-root`]: {
            boxShadow: "none"
          }
        }, zS(e))
      },
      [`${t}-submenu-popup`]: {
        [`${t}-vertical`]: O(O({}, zS(e)), {
          boxShadow: v
        })
      }
    },
    // Vertical only
    {
      [`${t}-submenu-popup ${t}-vertical${t}-sub`]: {
        minWidth: r,
        maxHeight: `calc(100vh - ${a * 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`]: g,
          [`& ${t}-item-group-title`]: {
            paddingInlineStart: u
          }
        },
        // >>>>> Item
        [`${t}-item`]: g
      }
    },
    // 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`]: O(O({}, Va), {
          paddingInline: p
        })
      }
    }
  ];
}, BS = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    motionDurationSlow: o,
    motionDurationMid: i,
    motionEaseInOut: r,
    motionEaseOut: a,
    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} ${r}`].join(","),
      [`${t}-item-icon, ${l}`]: {
        minWidth: n,
        fontSize: n,
        transition: [`font-size ${i} ${a}`, `margin ${o} ${r}`, `color ${o}`].join(","),
        "+ span": {
          marginInlineStart: s - n,
          opacity: 1,
          transition: [`opacity ${o} ${r}`, `margin ${o}`, `color ${o}`].join(",")
        }
      },
      [`${t}-item-icon`]: O({}, cc()),
      [`&${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"
      }
    }
  };
}, FS = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    motionEaseInOut: o,
    borderRadius: i,
    menuArrowSize: r,
    menuArrowOffset: a
  } = e;
  return {
    [`${t}-submenu`]: {
      "&-expand-icon, &-arrow": {
        position: "absolute",
        top: "50%",
        insetInlineEnd: e.margin,
        width: r,
        color: "currentcolor",
        transform: "translateY(-50%)",
        transition: `transform ${n} ${o}, opacity ${n}`
      },
      "&-arrow": {
        // →
        "&::before, &::after": {
          position: "absolute",
          width: r * 0.6,
          height: r * 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(-${a})`
        },
        "&::after": {
          transform: `rotate(-45deg) translateY(${a})`
        }
      }
    }
  };
}, n7 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    fontSize: o,
    motionDurationSlow: i,
    motionDurationMid: r,
    motionEaseInOut: a,
    lineHeight: l,
    paddingXS: s,
    padding: u,
    colorSplit: c,
    lineWidth: d,
    zIndexPopup: f,
    borderRadiusLG: p,
    radiusSubMenuItem: v,
    menuArrowSize: g,
    menuArrowOffset: m,
    lineType: x,
    menuPanelMaskInset: S
  } = e;
  return [
    // Misc
    {
      "": {
        [`${n}`]: O(O({}, ja()), {
          // Hidden
          "&-hidden": {
            display: "none"
          }
        })
      },
      [`${n}-submenu-hidden`]: {
        display: "none"
      }
    },
    {
      [n]: O(O(O(O(O(O(O({}, fn(e)), ja()), {
        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} ${a}`, `background ${i} ${a}`].join(",")
        },
        [`${n}-submenu, ${n}-submenu-inline`]: {
          transition: [`border-color ${i} ${a}`, `background ${i} ${a}`, `padding ${r} ${a}`].join(",")
        },
        [`${n}-submenu ${n}-sub`]: {
          cursor: "initial",
          transition: [`background ${i} ${a}`, `padding ${i} ${a}`].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: x,
          borderWidth: 0,
          borderTopWidth: d,
          marginBlock: d,
          padding: 0,
          "&-dashed": {
            borderStyle: "dashed"
          }
        }
      }), BS(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: p,
            boxShadow: "none",
            transformOrigin: "0 0",
            // https://github.com/ant-design/ant-design/issues/13955
            "&::before": {
              position: "absolute",
              inset: `${S}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: S
          },
          [`> ${n}`]: O(O(O({
            borderRadius: p
          }, BS(e)), FS(e)), {
            [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
              borderRadius: v
            },
            [`${n}-submenu-title::after`]: {
              transition: `transform ${i} ${a}`
            }
          })
        }
      }), FS(e)), {
        [`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]: {
          // ↓
          "&::before": {
            transform: `rotate(-45deg) translateX(${m})`
          },
          "&::after": {
            transform: `rotate(45deg) translateX(-${m})`
          }
        },
        [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
          // ↑
          transform: `translateY(-${g * 0.2}px)`,
          "&::after": {
            transform: `rotate(-45deg) translateX(-${m})`
          },
          "&::before": {
            transform: `rotate(45deg) translateX(${m})`
          }
        }
      })
    },
    // Integration with header element so menu items have the same height
    {
      [`${t}-layout-header`]: {
        [n]: {
          lineHeight: "inherit"
        }
      }
    }
  ];
}, o7 = ((e, t) => On("Menu", (o, i) => {
  let {
    overrideComponentToken: r
  } = i;
  if (t?.value === !1)
    return [];
  const {
    colorBgElevated: a,
    colorPrimary: l,
    colorError: s,
    colorErrorHover: u,
    colorTextLightSolid: c
  } = o, {
    controlHeightLG: d,
    fontSize: f
  } = o, p = f / 7 * 5, v = Qt(o, {
    menuItemHeight: d,
    menuItemPaddingInline: o.margin,
    menuArrowSize: p,
    menuHorizontalHeight: d * 1.15,
    menuArrowOffset: `${p * 0.25}px`,
    menuPanelMaskInset: -7,
    menuSubMenuBg: a
  }), g = new In(c).setAlpha(0.65).toRgbString(), m = Qt(v, {
    colorItemText: g,
    colorItemTextHover: c,
    colorGroupTitle: g,
    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
  }, O({}, r));
  return [
    // Basic
    n7(v),
    // Horizontal
    JW(v),
    // Vertical
    t7(v),
    // Theme
    NS(v, "light"),
    NS(m, "dark"),
    // RTL
    e7(v),
    // Motion
    Vh(v),
    oa(v, "slide-up"),
    oa(v, "slide-down"),
    Bd(v, "zoom-big")
  ];
}, (o) => {
  const {
    colorPrimary: i,
    colorError: r,
    colorTextDisabled: a,
    colorErrorBg: l,
    colorText: s,
    colorTextDescription: u,
    colorBgContainer: c,
    colorFillAlter: d,
    colorFillContent: f,
    lineWidth: p,
    lineWidthBold: v,
    controlItemBgActive: g,
    colorBgTextHover: m
  } = 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: m,
    colorItemBgActive: f,
    colorSubItemBg: d,
    colorItemBgSelected: g,
    colorItemBgSelectedHorizontal: "transparent",
    colorActiveBarWidth: 0,
    colorActiveBarHeight: v,
    colorActiveBarBorderSize: p,
    // Disabled
    colorItemTextDisabled: a,
    // Danger
    colorDangerItemText: r,
    colorDangerItemTextHover: r,
    colorDangerItemTextSelected: r,
    colorDangerItemBgActive: l,
    colorDangerItemBgSelected: l,
    itemMarginInline: o.marginXXS
  };
})(e)), i7 = () => ({
  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
}), LS = [], co = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenu",
  inheritAttrs: !1,
  props: i7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      direction: r,
      getPrefixCls: a
    } = Rt("menu", e), l = jM(), s = E(() => {
      var te;
      return a("menu", e.prefixCls || ((te = l?.prefixCls) === null || te === void 0 ? void 0 : te.value));
    }), [u, c] = o7(s, E(() => !l)), d = $e(/* @__PURE__ */ new Map()), f = zt(LW, le(void 0)), p = E(() => f.value !== void 0 ? f.value : e.inlineCollapsed), {
      itemsNodes: v
    } = ZW(e), g = $e(!1);
    At(() => {
      g.value = !0;
    }), It(() => {
      dn(!(e.inlineCollapsed === !0 && e.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), dn(!(f.value !== void 0 && e.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
    });
    const m = le([]), x = le([]), S = le({});
    Ie(d, () => {
      const te = {};
      for (const ve of d.value.values())
        te[ve.key] = ve;
      S.value = te;
    }, {
      flush: "post"
    }), It(() => {
      if (e.activeKey !== void 0) {
        let te = [];
        const ve = e.activeKey ? S.value[e.activeKey] : void 0;
        ve && e.activeKey !== void 0 ? te = xg([].concat(T(ve.parentKeys), e.activeKey)) : te = [], mu(m.value, te) || (m.value = te);
      }
    }), Ie(() => e.selectedKeys, (te) => {
      te && (x.value = te.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    const C = le([]);
    Ie([S, x], () => {
      let te = [];
      x.value.forEach((ve) => {
        const ce = S.value[ve];
        ce && (te = te.concat(T(ce.parentKeys)));
      }), te = xg(te), mu(C.value, te) || (C.value = te);
    }, {
      immediate: !0
    });
    const P = (te) => {
      if (e.selectable) {
        const {
          key: ve
        } = te, ce = x.value.includes(ve);
        let fe;
        e.multiple ? ce ? fe = x.value.filter((Me) => Me !== ve) : fe = [...x.value, ve] : fe = [ve];
        const ge = O(O({}, te), {
          selectedKeys: fe
        });
        mu(fe, x.value) || (e.selectedKeys === void 0 && (x.value = fe), o("update:selectedKeys", fe), ce && e.multiple ? o("deselect", ge) : o("select", ge));
      }
      N.value !== "inline" && !e.multiple && $.value.length && L(LS);
    }, $ = le([]);
    Ie(() => e.openKeys, function() {
      let te = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $.value;
      mu($.value, te) || ($.value = te.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    let I;
    const w = (te) => {
      clearTimeout(I), I = setTimeout(() => {
        e.activeKey === void 0 && (m.value = te), o("update:activeKey", te[te.length - 1]);
      });
    }, M = E(() => !!e.disabled), _ = E(() => r.value === "rtl"), N = le("vertical"), R = $e(!1);
    It(() => {
      var te;
      (e.mode === "inline" || e.mode === "vertical") && p.value ? (N.value = "vertical", R.value = p.value) : (N.value = e.mode, R.value = !1), !((te = l?.mode) === null || te === void 0) && te.value && (N.value = l.mode.value);
    });
    const H = E(() => N.value === "inline"), L = (te) => {
      $.value = te, o("update:openKeys", te), o("openChange", te);
    }, B = le($.value), A = $e(!1);
    Ie($, () => {
      H.value && (B.value = $.value);
    }, {
      immediate: !0
    }), Ie(H, () => {
      if (!A.value) {
        A.value = !0;
        return;
      }
      H.value ? $.value = B.value : L(LS);
    }, {
      immediate: !0
    });
    const G = E(() => ({
      [`${s.value}`]: !0,
      [`${s.value}-root`]: !0,
      [`${s.value}-${N.value}`]: !0,
      [`${s.value}-inline-collapsed`]: R.value,
      [`${s.value}-rtl`]: _.value,
      [`${s.value}-${e.theme}`]: !0
    })), j = E(() => a()), Z = E(() => ({
      horizontal: {
        name: `${j.value}-slide-up`
      },
      inline: jh(`${j.value}-motion-collapse`),
      other: {
        name: `${j.value}-zoom-big`
      }
    }));
    XM(!0);
    const W = function() {
      let te = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const ve = [], ce = d.value;
      return te.forEach((fe) => {
        const {
          key: ge,
          childrenEventKeys: Me
        } = ce.get(fe);
        ve.push(ge, ...W(T(Me)));
      }), ve;
    }, K = (te) => {
      var ve;
      o("click", te), P(te), (ve = l?.onClick) === null || ve === void 0 || ve.call(l);
    }, q = (te, ve) => {
      var ce;
      const fe = ((ce = S.value[te]) === null || ce === void 0 ? void 0 : ce.childrenEventKeys) || [];
      let ge = $.value.filter((Me) => Me !== te);
      if (ve)
        ge.push(te);
      else if (N.value !== "inline") {
        const Me = W(T(fe));
        ge = xg(ge.filter((ze) => !Me.includes(ze)));
      }
      mu($, ge) || L(ge);
    }, U = (te, ve) => {
      d.value.set(te, ve), d.value = new Map(d.value);
    }, ae = (te) => {
      d.value.delete(te), d.value = new Map(d.value);
    }, se = le(0), re = E(() => {
      var te;
      return e.expandIcon || n.expandIcon || !((te = l?.expandIcon) === null || te === void 0) && te.value ? (ve) => {
        let ce = e.expandIcon || n.expandIcon;
        return ce = typeof ce == "function" ? ce(ve) : ce, Un(ce, {
          class: `${s.value}-submenu-expand-icon`
        }, !1);
      } : null;
    });
    qM({
      prefixCls: s,
      activeKeys: m,
      openKeys: $,
      selectedKeys: x,
      changeActiveKeys: w,
      disabled: M,
      rtl: _,
      mode: N,
      inlineIndent: E(() => e.inlineIndent),
      subMenuCloseDelay: E(() => e.subMenuCloseDelay),
      subMenuOpenDelay: E(() => e.subMenuOpenDelay),
      builtinPlacements: E(() => e.builtinPlacements),
      triggerSubMenuAction: E(() => e.triggerSubMenuAction),
      getPopupContainer: E(() => e.getPopupContainer),
      inlineCollapsed: R,
      theme: E(() => e.theme),
      siderCollapsed: f,
      defaultMotions: E(() => g.value ? Z.value : null),
      motion: E(() => g.value ? e.motion : null),
      overflowDisabled: $e(void 0),
      onOpenChange: q,
      onItemClick: K,
      registerMenuInfo: U,
      unRegisterMenuInfo: ae,
      selectedSubMenuKeys: C,
      expandIcon: re,
      forceSubMenuRender: E(() => e.forceSubMenuRender),
      rootClassName: c
    });
    const ie = () => {
      var te;
      return v.value || go((te = n.default) === null || te === void 0 ? void 0 : te.call(n));
    };
    return () => {
      var te;
      const ve = ie(), ce = se.value >= ve.length - 1 || N.value !== "horizontal" || e.disabledOverflow, fe = (Me) => N.value !== "horizontal" || e.disabledOverflow ? Me : (
        // Need wrap for overflow dropdown that do not response for open
        Me.map((ze, Ke) => (
          // Always wrap provider to avoid sub node re-mount
          h(jp, {
            key: ze.key,
            overflowDisabled: Ke > se.value
          }, {
            default: () => ze
          })
        ))
      ), ge = ((te = n.overflowedIndicator) === null || te === void 0 ? void 0 : te.call(n)) || h(Ld, null, null);
      return u(h(za, Q(Q({}, i), {}, {
        onMousedown: e.onMousedown,
        prefixCls: `${s.value}-overflow`,
        component: "ul",
        itemComponent: Zu,
        class: [G.value, i.class, c.value],
        role: "menu",
        id: e.id,
        data: fe(ve),
        renderRawItem: (Me) => Me,
        renderRawRest: (Me) => {
          const ze = Me.length, Ke = ze ? ve.slice(-ze) : null;
          return h(Je, null, [h(Ju, {
            eventKey: If,
            key: If,
            title: ge,
            disabled: ce,
            internalPopupClose: ze === 0
          }, {
            default: () => Ke
          }), h(ES, null, {
            default: () => [h(Ju, {
              eventKey: If,
              key: If,
              title: ge,
              disabled: ce,
              internalPopupClose: ze === 0
            }, {
              default: () => Ke
            })]
          })]);
        },
        maxCount: N.value !== "horizontal" || e.disabledOverflow ? za.INVALIDATE : za.RESPONSIVE,
        ssr: "full",
        "data-menu-list": !0,
        onVisibleChange: (Me) => {
          se.value = Me;
        }
      }), {
        default: () => [h(nh, {
          to: "body"
        }, {
          default: () => [h("div", {
            style: {
              display: "none"
            },
            "aria-hidden": !0
          }, [h(ES, null, {
            default: () => [fe(ie())]
          })])]
        })]
      }));
    };
  }
});
co.install = function(e) {
  return e.component(co.name, co), e.component(Zu.name, Zu), e.component(Ju.name, Ju), e.component(Kp.name, Kp), e.component(Wp.name, Wp), e;
};
co.Item = Zu;
co.Divider = Kp;
co.SubMenu = Ju;
co.ItemGroup = Wp;
yo.extend(VE);
yo.extend(HE);
yo.extend(NE);
yo.extend(zE);
yo.extend(BE);
yo.extend(FE);
yo.extend(LE);
yo.extend((e, t) => {
  const n = t.prototype, o = n.format;
  n.format = function(r) {
    const a = (r || "").replace("Wo", "wo");
    return o.bind(this)(a);
  };
});
const r7 = {
  // 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"
}, es = (e) => r7[e] || e.split("_")[0], HS = () => {
  Cm(!1, "Not match any format. Please help to fire a issue about this.");
}, a7 = /\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;
function VS(e, t, n) {
  const o = [...new Set(e.split(n))];
  let i = 0;
  for (let r = 0; r < o.length; r++) {
    const a = o[r];
    if (i += a.length, i > t)
      return a;
    i += n.length;
  }
}
const jS = (e, t) => {
  if (!e) return null;
  if (yo.isDayjs(e))
    return e;
  const n = t.matchAll(a7);
  let o = yo(e, t);
  if (n === null)
    return o;
  for (const i of n) {
    const r = i[0], a = i.index;
    if (r === "Q") {
      const l = e.slice(a - 1, a), s = VS(e, a, l).match(/\d+/)[0];
      o = o.quarter(parseInt(s));
    }
    if (r.toLowerCase() === "wo") {
      const l = e.slice(a - 1, a), s = VS(e, a, l).match(/\d+/)[0];
      o = o.week(parseInt(s));
    }
    r.toLowerCase() === "ww" && (o = o.week(parseInt(e.slice(a, a + r.length)))), r.toLowerCase() === "w" && (o = o.week(parseInt(e.slice(a, a + r.length + 1))));
  }
  return o;
}, l7 = {
  // get
  getNow: () => yo(),
  getFixedDate: (e) => yo(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) => yo().locale(es(e)).localeData().firstDayOfWeek(),
    getWeekFirstDate: (e, t) => t.locale(es(e)).weekday(0),
    getWeek: (e, t) => t.locale(es(e)).week(),
    getShortWeekDays: (e) => yo().locale(es(e)).localeData().weekdaysMin(),
    getShortMonths: (e) => yo().locale(es(e)).localeData().monthsShort(),
    format: (e, t, n) => t.locale(es(e)).format(n),
    parse: (e, t, n) => {
      const o = es(e);
      for (let i = 0; i < n.length; i += 1) {
        const r = n[i], a = t;
        if (r.includes("wo") || r.includes("Wo")) {
          const s = a.split("-")[0], u = a.split("-")[1], c = yo(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 HS(), null;
        }
        const l = yo(a, r, !0).locale(o);
        if (l.isValid())
          return l;
      }
      return t || HS(), null;
    }
  },
  toDate: (e, t) => Array.isArray(e) ? e.map((n) => jS(n, t)) : jS(e, t),
  toString: (e, t) => Array.isArray(e) ? e.map((n) => yo.isDayjs(n) ? n.format(t) : n) : yo.isDayjs(e) ? e.format(t) : e
};
function vo(e) {
  const t = _E();
  return O(O({}, e), t);
}
const tT = Symbol("PanelContextProps"), _0 = (e) => {
  Ft(tT, e);
}, sa = () => zt(tT, {}), Mf = {
  visibility: "hidden"
};
function Ll(e, t) {
  let {
    slots: n
  } = t;
  var o;
  const i = vo(e), {
    prefixCls: r,
    prevIcon: a = "‹",
    nextIcon: l = "›",
    superPrevIcon: s = "«",
    superNextIcon: u = "»",
    onSuperPrev: c,
    onSuperNext: d,
    onPrev: f,
    onNext: p
  } = i, {
    hideNextBtn: v,
    hidePrevBtn: g
  } = sa();
  return h("div", {
    class: r
  }, [c && h("button", {
    type: "button",
    onClick: c,
    tabindex: -1,
    class: `${r}-super-prev-btn`,
    style: g.value ? Mf : {}
  }, [s]), f && h("button", {
    type: "button",
    onClick: f,
    tabindex: -1,
    class: `${r}-prev-btn`,
    style: g.value ? Mf : {}
  }, [a]), h("div", {
    class: `${r}-view`
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]), p && h("button", {
    type: "button",
    onClick: p,
    tabindex: -1,
    class: `${r}-next-btn`,
    style: v.value ? Mf : {}
  }, [l]), d && h("button", {
    type: "button",
    onClick: d,
    tabindex: -1,
    class: `${r}-super-next-btn`,
    style: v.value ? Mf : {}
  }, [u])]);
}
Ll.displayName = "Header";
Ll.inheritAttrs = !1;
function E0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: i,
    onPrevDecades: r,
    onNextDecades: a
  } = t, {
    hideHeader: l
  } = sa();
  if (l)
    return null;
  const s = `${n}-header`, u = o.getYear(i), c = Math.floor(u / _a) * _a, d = c + _a - 1;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: s,
    onSuperPrev: r,
    onSuperNext: a
  }), {
    default: () => [c, Le("-"), d]
  });
}
E0.displayName = "DecadeHeader";
E0.inheritAttrs = !1;
function nT(e, t, n, o, i) {
  let r = e.setHour(t, n);
  return r = e.setMinute(r, o), r = e.setSecond(r, i), r;
}
function ip(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 s7(e, t, n, o, i, r) {
  const a = Math.floor(e / o) * o;
  if (a < e)
    return [a, 60 - i, 60 - r];
  const l = Math.floor(t / i) * i;
  if (l < t)
    return [a, l, 60 - r];
  const s = Math.floor(n / r) * r;
  return [a, l, s];
}
function u7(e, t) {
  const n = e.getYear(t), o = e.getMonth(t) + 1, i = e.getEndDate(e.getFixedDate(`${n}-${o}-01`)), r = e.getDate(i), a = o < 10 ? `0${o}` : `${o}`;
  return `${n}-${a}-${r}`;
}
function Vs(e) {
  const {
    prefixCls: t,
    disabledDate: n,
    onSelect: o,
    picker: i,
    rowNum: r,
    colNum: a,
    prefixColumn: l,
    rowClassName: s,
    baseDate: u,
    getCellClassName: c,
    getCellText: d,
    getCellNode: f,
    getCellDate: p,
    generateConfig: v,
    titleCell: g,
    headerCells: m
  } = vo(e), {
    onDateMouseenter: x,
    onDateMouseleave: S,
    mode: C
  } = sa(), P = `${t}-cell`, $ = [];
  for (let I = 0; I < r; I += 1) {
    const w = [];
    let M;
    for (let _ = 0; _ < a; _ += 1) {
      const N = I * a + _, R = p(u, N), H = nb({
        cellDate: R,
        mode: C.value,
        disabledDate: n,
        generateConfig: v
      });
      _ === 0 && (M = R, l && w.push(l(M)));
      const L = g && g(R);
      w.push(h("td", {
        key: _,
        title: L,
        class: _e(P, O({
          [`${P}-disabled`]: H,
          [`${P}-start`]: d(R) === 1 || i === "year" && Number(L) % 10 === 0,
          [`${P}-end`]: L === u7(v, R) || i === "year" && Number(L) % 10 === 9
        }, c(R))),
        onClick: (B) => {
          B.stopPropagation(), H || o(R);
        },
        onMouseenter: () => {
          !H && x && x(R);
        },
        onMouseleave: () => {
          !H && S && S(R);
        }
      }, [f ? f(R) : h("div", {
        class: `${P}-inner`
      }, [d(R)])]));
    }
    $.push(h("tr", {
      key: I,
      class: s && s(M)
    }, [w]));
  }
  return h("div", {
    class: `${t}-body`
  }, [h("table", {
    class: `${t}-content`
  }, [m && h("thead", null, [h("tr", null, [m])]), h("tbody", null, [$])])]);
}
Vs.displayName = "PanelBody";
Vs.inheritAttrs = !1;
const Jm = 3, WS = 4;
function D0(e) {
  const t = vo(e), n = xr - 1, {
    prefixCls: o,
    viewDate: i,
    generateConfig: r
  } = t, a = `${o}-cell`, l = r.getYear(i), s = Math.floor(l / xr) * xr, u = Math.floor(l / _a) * _a, c = u + _a - 1, d = r.setYear(i, u - Math.ceil((Jm * WS * xr - _a) / 2)), f = (p) => {
    const v = r.getYear(p), g = v + n;
    return {
      [`${a}-in-view`]: u <= v && g <= c,
      [`${a}-selected`]: v === s
    };
  };
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: WS,
    colNum: Jm,
    baseDate: d,
    getCellText: (p) => {
      const v = r.getYear(p);
      return `${v}-${v + n}`;
    },
    getCellClassName: f,
    getCellDate: (p, v) => r.addYear(p, v * xr)
  }), null);
}
D0.displayName = "DecadeBody";
D0.inheritAttrs = !1;
const Tf = /* @__PURE__ */ new Map();
function c7(e, t) {
  let n;
  function o() {
    Ah(e) ? t() : n = Vt(() => {
      o();
    });
  }
  return o(), () => {
    Vt.cancel(n);
  };
}
function eb(e, t, n) {
  if (Tf.get(e) && Vt.cancel(Tf.get(e)), n <= 0) {
    Tf.set(e, Vt(() => {
      e.scrollTop = t;
    }));
    return;
  }
  const i = (t - e.scrollTop) / n * 10;
  Tf.set(e, Vt(() => {
    e.scrollTop += i, e.scrollTop !== t && eb(e, t, n - 10);
  }));
}
function pc(e, t) {
  let {
    onLeftRight: n,
    onCtrlLeftRight: o,
    onUpDown: i,
    onPageUpDown: r,
    onEnter: a
  } = t;
  const {
    which: l,
    ctrlKey: s,
    metaKey: u
  } = e;
  switch (l) {
    case rt.LEFT:
      if (s || u) {
        if (o)
          return o(-1), !0;
      } else if (n)
        return n(-1), !0;
      break;
    case rt.RIGHT:
      if (s || u) {
        if (o)
          return o(1), !0;
      } else if (n)
        return n(1), !0;
      break;
    case rt.UP:
      if (i)
        return i(-1), !0;
      break;
    case rt.DOWN:
      if (i)
        return i(1), !0;
      break;
    case rt.PAGE_UP:
      if (r)
        return r(-1), !0;
      break;
    case rt.PAGE_DOWN:
      if (r)
        return r(1), !0;
      break;
    case rt.ENTER:
      if (a)
        return a(), !0;
      break;
  }
  return !1;
}
function oT(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 iT(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 Ec = null;
const _f = /* @__PURE__ */ new Set();
function d7(e) {
  return !Ec && typeof window < "u" && window.addEventListener && (Ec = (t) => {
    [..._f].forEach((n) => {
      n(t);
    });
  }, window.addEventListener("mousedown", Ec)), _f.add(e), () => {
    _f.delete(e), _f.size === 0 && (window.removeEventListener("mousedown", Ec), Ec = null);
  };
}
function f7(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 p7 = (e) => e === "month" || e === "date" ? "year" : e, h7 = (e) => e === "date" ? "month" : e, g7 = (e) => e === "month" || e === "date" ? "quarter" : e, v7 = (e) => e === "date" ? "week" : e, m7 = {
  year: p7,
  month: h7,
  quarter: g7,
  week: v7,
  time: null,
  date: null
};
function rT(e, t) {
  return process.env.NODE_ENV === "test" ? !1 : e.some((n) => n && n.contains(t));
}
const xr = 10, _a = xr * 10;
function A0(e) {
  const t = vo(e), {
    prefixCls: n,
    onViewDateChange: o,
    generateConfig: i,
    viewDate: r,
    operationRef: a,
    onSelect: l,
    onPanelChange: s
  } = t, u = `${n}-decade-panel`;
  a.value = {
    onKeydown: (f) => pc(f, {
      onLeftRight: (p) => {
        l(i.addYear(r, p * xr), "key");
      },
      onCtrlLeftRight: (p) => {
        l(i.addYear(r, p * _a), "key");
      },
      onUpDown: (p) => {
        l(i.addYear(r, p * xr * Jm), "key");
      },
      onEnter: () => {
        s("year", r);
      }
    })
  };
  const c = (f) => {
    const p = i.addYear(r, f * _a);
    o(p), s(null, p);
  }, d = (f) => {
    l(f, "mouse"), s("year", f);
  };
  return h("div", {
    class: u
  }, [h(E0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevDecades: () => {
      c(-1);
    },
    onNextDecades: () => {
      c(1);
    }
  }), null), h(D0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: d
  }), null)]);
}
A0.displayName = "DecadePanel";
A0.inheritAttrs = !1;
const rp = 7;
function js(e, t) {
  if (!e && !t)
    return !0;
  if (!e || !t)
    return !1;
}
function b7(e, t, n) {
  const o = js(t, n);
  if (typeof o == "boolean")
    return o;
  const i = Math.floor(e.getYear(t) / 10), r = Math.floor(e.getYear(n) / 10);
  return i === r;
}
function Wh(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n);
}
function tb(e, t) {
  return Math.floor(e.getMonth(t) / 3) + 1;
}
function aT(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : Wh(e, t, n) && tb(e, t) === tb(e, n);
}
function R0(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : Wh(e, t, n) && e.getMonth(t) === e.getMonth(n);
}
function Ea(e, t, n) {
  const o = js(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 y7(e, t, n) {
  const o = js(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 lT(e, t, n, o) {
  const i = js(n, o);
  return typeof i == "boolean" ? i : e.locale.getWeek(t, n) === e.locale.getWeek(t, o);
}
function _u(e, t, n) {
  return Ea(e, t, n) && y7(e, t, n);
}
function Ef(e, t, n, o) {
  return !t || !n || !o ? !1 : !Ea(e, t, o) && !Ea(e, n, o) && e.isAfter(o, t) && e.isAfter(n, o);
}
function x7(e, t, n) {
  const o = t.locale.getWeekFirstDay(e), i = t.setDate(n, 1), r = t.getWeekDay(i);
  let a = t.addDate(i, o - r);
  return t.getMonth(a) === t.getMonth(n) && t.getDate(a) > 1 && (a = t.addDate(a, -7)), a;
}
function Jc(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 qo(e, t) {
  let {
    generateConfig: n,
    locale: o,
    format: i
  } = t;
  return typeof i == "function" ? i(e) : n.locale.format(o.locale, e, i);
}
function sT(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 nb(e) {
  let {
    cellDate: t,
    mode: n,
    disabledDate: o,
    generateConfig: i
  } = e;
  if (!o) return !1;
  const r = (a, l, s) => {
    let u = l;
    for (; u <= s; ) {
      let c;
      switch (a) {
        case "date": {
          if (c = i.setDate(t, u), !o(c))
            return !1;
          break;
        }
        case "month": {
          if (c = i.setMonth(t, u), !nb({
            cellDate: c,
            mode: "month",
            generateConfig: i,
            disabledDate: o
          }))
            return !1;
          break;
        }
        case "year": {
          if (c = i.setYear(t, u), !nb({
            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 r("date", 1, l);
    }
    case "quarter": {
      const a = Math.floor(i.getMonth(t) / 3) * 3, l = a + 2;
      return r("month", a, l);
    }
    case "year":
      return r("month", 0, 11);
    case "decade": {
      const a = i.getYear(t), l = Math.floor(a / xr) * xr, s = l + xr - 1;
      return r("year", l, s);
    }
  }
}
function N0(e) {
  const t = vo(e), {
    hideHeader: n
  } = sa();
  if (n.value)
    return null;
  const {
    prefixCls: o,
    generateConfig: i,
    locale: r,
    value: a,
    format: l
  } = t, s = `${o}-header`;
  return h(Ll, {
    prefixCls: s
  }, {
    default: () => [a ? qo(a, {
      locale: r,
      format: l,
      generateConfig: i
    }) : " "]
  });
}
N0.displayName = "TimeHeader";
N0.inheritAttrs = !1;
const Df = be({
  name: "TimeUnitColumn",
  props: ["prefixCls", "units", "onSelect", "value", "active", "hideDisabledOptions"],
  setup(e) {
    const {
      open: t
    } = sa(), n = $e(null), o = le(/* @__PURE__ */ new Map()), i = le();
    return Ie(() => e.value, () => {
      const r = o.value.get(e.value);
      r && t.value !== !1 && eb(n.value, r.offsetTop, 120);
    }), qt(() => {
      var r;
      (r = i.value) === null || r === void 0 || r.call(i);
    }), Ie(t, () => {
      var r;
      (r = i.value) === null || r === void 0 || r.call(i), Yt(() => {
        if (t.value) {
          const a = o.value.get(e.value);
          a && (i.value = c7(a, () => {
            eb(n.value, a.offsetTop, 0);
          }));
        }
      });
    }, {
      immediate: !0,
      flush: "post"
    }), () => {
      const {
        prefixCls: r,
        units: a,
        onSelect: l,
        value: s,
        active: u,
        hideDisabledOptions: c
      } = e, d = `${r}-cell`;
      return h("ul", {
        class: _e(`${r}-column`, {
          [`${r}-column-active`]: u
        }),
        ref: n,
        style: {
          position: "relative"
        }
      }, [a.map((f) => c && f.disabled ? null : h("li", {
        key: f.value,
        ref: (p) => {
          o.value.set(f.value, p);
        },
        class: _e(d, {
          [`${d}-disabled`]: f.disabled,
          [`${d}-selected`]: s === f.value
        }),
        onClick: () => {
          f.disabled || l(f.value);
        }
      }, [h("div", {
        class: `${d}-inner`
      }, [f.label])]))]);
    };
  }
});
function uT(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 w7 = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
};
function cT(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function dT(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 on(e, t) {
  return e ? e[t] : null;
}
function Gi(e, t, n) {
  const o = [on(e, 0), on(e, 1)];
  return o[n] = typeof t == "function" ? t(o[n]) : t, !o[0] && !o[1] ? null : o;
}
function uv(e, t, n, o) {
  const i = [];
  for (let r = e; r <= t; r += n)
    i.push({
      label: uT(r, 2),
      value: r,
      disabled: (o || []).includes(r)
    });
  return i;
}
const S7 = be({
  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 = E(() => e.value ? e.generateConfig.getHour(e.value) : -1), n = E(() => e.use12Hours ? t.value >= 12 : !1), o = E(() => e.use12Hours ? t.value % 12 : t.value), i = E(() => e.value ? e.generateConfig.getMinute(e.value) : -1), r = E(() => e.value ? e.generateConfig.getSecond(e.value) : -1), a = le(e.generateConfig.getNow()), l = le(), s = le(), u = le();
    Qb(() => {
      a.value = e.generateConfig.getNow();
    }), It(() => {
      if (e.disabledTime) {
        const m = e.disabledTime(a);
        [l.value, s.value, u.value] = [m.disabledHours, m.disabledMinutes, m.disabledSeconds];
      } else
        [l.value, s.value, u.value] = [e.disabledHours, e.disabledMinutes, e.disabledSeconds];
    });
    const c = (m, x, S, C) => {
      let P = e.value || e.generateConfig.getNow();
      const $ = Math.max(0, x), I = Math.max(0, S), w = Math.max(0, C);
      return P = nT(e.generateConfig, P, !e.use12Hours || !m ? $ : $ + 12, I, w), P;
    }, d = E(() => {
      var m;
      return uv(0, 23, (m = e.hourStep) !== null && m !== void 0 ? m : 1, l.value && l.value());
    }), f = E(() => {
      if (!e.use12Hours)
        return [!1, !1];
      const m = [!0, !0];
      return d.value.forEach((x) => {
        let {
          disabled: S,
          value: C
        } = x;
        S || (C >= 12 ? m[1] = !1 : m[0] = !1);
      }), m;
    }), p = E(() => e.use12Hours ? d.value.filter(n.value ? (m) => m.value >= 12 : (m) => m.value < 12).map((m) => {
      const x = m.value % 12, S = x === 0 ? "12" : uT(x, 2);
      return O(O({}, m), {
        label: S,
        value: x
      });
    }) : d.value), v = E(() => {
      var m;
      return uv(0, 59, (m = e.minuteStep) !== null && m !== void 0 ? m : 1, s.value && s.value(t.value));
    }), g = E(() => {
      var m;
      return uv(0, 59, (m = e.secondStep) !== null && m !== void 0 ? m : 1, u.value && u.value(t.value, i.value));
    });
    return () => {
      const {
        prefixCls: m,
        operationRef: x,
        activeColumnIndex: S,
        showHour: C,
        showMinute: P,
        showSecond: $,
        use12Hours: I,
        hideDisabledOptions: w,
        onSelect: M
      } = e, _ = [], N = `${m}-content`, R = `${m}-time-panel`;
      x.value = {
        onUpDown: (B) => {
          const A = _[S];
          if (A) {
            const G = A.units.findIndex((Z) => Z.value === A.value), j = A.units.length;
            for (let Z = 1; Z < j; Z += 1) {
              const W = A.units[(G + B * Z + j) % j];
              if (W.disabled !== !0) {
                A.onSelect(W.value);
                break;
              }
            }
          }
        }
      };
      function H(B, A, G, j, Z) {
        B !== !1 && _.push({
          node: Un(A, {
            prefixCls: R,
            value: G,
            active: S === _.length,
            onSelect: Z,
            units: j,
            hideDisabledOptions: w
          }),
          onSelect: Z,
          value: G,
          units: j
        });
      }
      H(C, h(Df, {
        key: "hour"
      }, null), o.value, p.value, (B) => {
        M(c(n.value, B, i.value, r.value), "mouse");
      }), H(P, h(Df, {
        key: "minute"
      }, null), i.value, v.value, (B) => {
        M(c(n.value, o.value, B, r.value), "mouse");
      }), H($, h(Df, {
        key: "second"
      }, null), r.value, g.value, (B) => {
        M(c(n.value, o.value, i.value, B), "mouse");
      });
      let L = -1;
      return typeof n.value == "boolean" && (L = n.value ? 1 : 0), H(I === !0, h(Df, {
        key: "12hours"
      }, null), L, [{
        label: "AM",
        value: 0,
        disabled: f.value[0]
      }, {
        label: "PM",
        value: 1,
        disabled: f.value[1]
      }], (B) => {
        M(c(!!B, o.value, i.value, r.value), "mouse");
      }), h("div", {
        class: N
      }, [_.map((B) => {
        let {
          node: A
        } = B;
        return A;
      })]);
    };
  }
}), C7 = (e) => e.filter((t) => t !== !1).length;
function Kh(e) {
  const t = vo(e), {
    generateConfig: n,
    format: o = "HH:mm:ss",
    prefixCls: i,
    active: r,
    operationRef: a,
    showHour: l,
    showMinute: s,
    showSecond: u,
    use12Hours: c = !1,
    onSelect: d,
    value: f
  } = t, p = `${i}-time-panel`, v = le(), g = le(-1), m = C7([l, s, u, c]);
  return a.value = {
    onKeydown: (x) => pc(x, {
      onLeftRight: (S) => {
        g.value = (g.value + S + m) % m;
      },
      onUpDown: (S) => {
        g.value === -1 ? g.value = 0 : v.value && v.value.onUpDown(S);
      },
      onEnter: () => {
        d(f || n.getNow(), "key"), g.value = -1;
      }
    }),
    onBlur: () => {
      g.value = -1;
    }
  }, h("div", {
    class: _e(p, {
      [`${p}-active`]: r
    })
  }, [h(N0, Q(Q({}, t), {}, {
    format: o,
    prefixCls: i
  }), null), h(S7, Q(Q({}, t), {}, {
    prefixCls: i,
    activeColumnIndex: g.value,
    operationRef: v
  }), null)]);
}
Kh.displayName = "TimePanel";
Kh.inheritAttrs = !1;
function qh(e) {
  let {
    cellPrefixCls: t,
    generateConfig: n,
    rangedValue: o,
    hoverRangedValue: i,
    isInView: r,
    isSameCell: a,
    offsetCell: l,
    today: s,
    value: u
  } = e;
  function c(d) {
    const f = l(d, -1), p = l(d, 1), v = on(o, 0), g = on(o, 1), m = on(i, 0), x = on(i, 1), S = Ef(n, m, x, d);
    function C(_) {
      return a(v, _);
    }
    function P(_) {
      return a(g, _);
    }
    const $ = a(m, d), I = a(x, d), w = (S || I) && (!r(f) || P(f)), M = (S || $) && (!r(p) || C(p));
    return {
      // In view
      [`${t}-in-view`]: r(d),
      // Range
      [`${t}-in-range`]: Ef(n, v, g, d),
      [`${t}-range-start`]: C(d),
      [`${t}-range-end`]: P(d),
      [`${t}-range-start-single`]: C(d) && !g,
      [`${t}-range-end-single`]: P(d) && !v,
      [`${t}-range-start-near-hover`]: C(d) && (a(f, m) || Ef(n, m, x, f)),
      [`${t}-range-end-near-hover`]: P(d) && (a(p, x) || Ef(n, m, x, p)),
      // Range Hover
      [`${t}-range-hover`]: S,
      [`${t}-range-hover-start`]: $,
      [`${t}-range-hover-end`]: I,
      // Range Edge
      [`${t}-range-hover-edge-start`]: w,
      [`${t}-range-hover-edge-end`]: M,
      [`${t}-range-hover-edge-start-near-range`]: w && a(f, g),
      [`${t}-range-hover-edge-end-near-range`]: M && a(p, v),
      // Others
      [`${t}-today`]: a(s, d),
      [`${t}-selected`]: a(u, d)
    };
  }
  return c;
}
const fT = Symbol("RangeContextProps"), $7 = (e) => {
  Ft(fT, e);
}, Hd = () => zt(fT, {
  rangedValue: le(),
  hoverRangedValue: le(),
  inRange: le(),
  panelPosition: le()
}), P7 = be({
  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 $7(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 Yh(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    prefixColumn: i,
    locale: r,
    rowCount: a,
    viewDate: l,
    value: s,
    dateRender: u
  } = t, {
    rangedValue: c,
    hoverRangedValue: d
  } = Hd(), f = x7(r.locale, o, l), p = `${n}-cell`, v = o.locale.getWeekFirstDay(r.locale), g = o.getNow(), m = [], x = r.shortWeekDays || (o.locale.getShortWeekDays ? o.locale.getShortWeekDays(r.locale) : []);
  i && m.push(h("th", {
    key: "empty",
    "aria-label": "empty cell"
  }, null));
  for (let P = 0; P < rp; P += 1)
    m.push(h("th", {
      key: P
    }, [x[(P + v) % rp]]));
  const S = qh({
    cellPrefixCls: p,
    today: g,
    value: s,
    generateConfig: o,
    rangedValue: i ? null : c.value,
    hoverRangedValue: i ? null : d.value,
    isSameCell: (P, $) => Ea(o, P, $),
    isInView: (P) => R0(o, P, l),
    offsetCell: (P, $) => o.addDate(P, $)
  }), C = u ? (P) => u({
    current: P,
    today: g
  }) : void 0;
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: a,
    colNum: rp,
    baseDate: f,
    getCellNode: C,
    getCellText: o.getDate,
    getCellClassName: S,
    getCellDate: o.addDate,
    titleCell: (P) => qo(P, {
      locale: r,
      format: "YYYY-MM-DD",
      generateConfig: o
    }),
    headerCells: m
  }), null);
}
Yh.displayName = "DateBody";
Yh.inheritAttrs = !1;
Yh.props = [
  "prefixCls",
  "generateConfig",
  "value?",
  "viewDate",
  "locale",
  "rowCount",
  "onSelect",
  "dateRender?",
  "disabledDate?",
  // Used for week panel
  "prefixColumn?",
  "rowClassName?"
];
function z0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: r,
    onNextMonth: a,
    onPrevMonth: l,
    onNextYear: s,
    onPrevYear: u,
    onYearClick: c,
    onMonthClick: d
  } = t, {
    hideHeader: f
  } = sa();
  if (f.value)
    return null;
  const p = `${n}-header`, v = i.shortMonths || (o.locale.getShortMonths ? o.locale.getShortMonths(i.locale) : []), g = o.getMonth(r), m = h("button", {
    type: "button",
    key: "year",
    onClick: c,
    tabindex: -1,
    class: `${n}-year-btn`
  }, [qo(r, {
    locale: i,
    format: i.yearFormat,
    generateConfig: o
  })]), x = h("button", {
    type: "button",
    key: "month",
    onClick: d,
    tabindex: -1,
    class: `${n}-month-btn`
  }, [i.monthFormat ? qo(r, {
    locale: i,
    format: i.monthFormat,
    generateConfig: o
  }) : v[g]]), S = i.monthBeforeYear ? [x, m] : [m, x];
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: p,
    onSuperPrev: u,
    onPrev: l,
    onNext: a,
    onSuperNext: s
  }), {
    default: () => [S]
  });
}
z0.displayName = "DateHeader";
z0.inheritAttrs = !1;
const O7 = 6;
function Vd(e) {
  const t = vo(e), {
    prefixCls: n,
    panelName: o = "date",
    keyboardConfig: i,
    active: r,
    operationRef: a,
    generateConfig: l,
    value: s,
    viewDate: u,
    onViewDateChange: c,
    onPanelChange: d,
    onSelect: f
  } = t, p = `${n}-${o}-panel`;
  a.value = {
    onKeydown: (m) => pc(m, O({
      onLeftRight: (x) => {
        f(l.addDate(s || u, x), "key");
      },
      onCtrlLeftRight: (x) => {
        f(l.addYear(s || u, x), "key");
      },
      onUpDown: (x) => {
        f(l.addDate(s || u, x * rp), "key");
      },
      onPageUpDown: (x) => {
        f(l.addMonth(s || u, x), "key");
      }
    }, i))
  };
  const v = (m) => {
    const x = l.addYear(u, m);
    c(x), d(null, x);
  }, g = (m) => {
    const x = l.addMonth(u, m);
    c(x), d(null, x);
  };
  return h("div", {
    class: _e(p, {
      [`${p}-active`]: r
    })
  }, [h(z0, Q(Q({}, t), {}, {
    prefixCls: n,
    value: s,
    viewDate: u,
    onPrevYear: () => {
      v(-1);
    },
    onNextYear: () => {
      v(1);
    },
    onPrevMonth: () => {
      g(-1);
    },
    onNextMonth: () => {
      g(1);
    },
    onMonthClick: () => {
      d("month", u);
    },
    onYearClick: () => {
      d("year", u);
    }
  }), null), h(Yh, Q(Q({}, t), {}, {
    onSelect: (m) => f(m, "mouse"),
    prefixCls: n,
    value: s,
    viewDate: u,
    rowCount: O7
  }), null)]);
}
Vd.displayName = "DatePanel";
Vd.inheritAttrs = !1;
const KS = w7("date", "time");
function B0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    generateConfig: i,
    value: r,
    defaultValue: a,
    disabledTime: l,
    showTime: s,
    onSelect: u
  } = t, c = `${n}-datetime-panel`, d = le(null), f = le({}), p = le({}), v = typeof s == "object" ? O({}, s) : {};
  function g(C) {
    const P = KS.indexOf(d.value) + C;
    return KS[P] || null;
  }
  const m = (C) => {
    p.value.onBlur && p.value.onBlur(C), d.value = null;
  };
  o.value = {
    onKeydown: (C) => {
      if (C.which === rt.TAB) {
        const P = g(C.shiftKey ? -1 : 1);
        return d.value = P, P && C.preventDefault(), !0;
      }
      if (d.value) {
        const P = d.value === "date" ? f : p;
        return P.value && P.value.onKeydown && P.value.onKeydown(C), !0;
      }
      return [rt.LEFT, rt.RIGHT, rt.UP, rt.DOWN].includes(C.which) ? (d.value = "date", !0) : !1;
    },
    onBlur: m,
    onClose: m
  };
  const x = (C, P) => {
    let $ = C;
    P === "date" && !r && v.defaultValue ? ($ = i.setHour($, i.getHour(v.defaultValue)), $ = i.setMinute($, i.getMinute(v.defaultValue)), $ = i.setSecond($, i.getSecond(v.defaultValue))) : P === "time" && !r && a && ($ = i.setYear($, i.getYear(a)), $ = i.setMonth($, i.getMonth(a)), $ = i.setDate($, i.getDate(a))), u && u($, "mouse");
  }, S = l ? l(r || null) : {};
  return h("div", {
    class: _e(c, {
      [`${c}-active`]: d.value
    })
  }, [h(Vd, Q(Q({}, t), {}, {
    operationRef: f,
    active: d.value === "date",
    onSelect: (C) => {
      x(ip(i, C, !r && typeof s == "object" ? s.defaultValue : null), "date");
    }
  }), null), h(Kh, Q(Q(Q(Q({}, t), {}, {
    format: void 0
  }, v), S), {}, {
    disabledTime: null,
    defaultValue: void 0,
    operationRef: p,
    active: d.value === "time",
    onSelect: (C) => {
      x(C, "time");
    }
  }), null)]);
}
B0.displayName = "DatetimePanel";
B0.inheritAttrs = !1;
function F0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    value: r
  } = t, a = `${n}-cell`, l = (c) => h("td", {
    key: "week",
    class: _e(a, `${a}-week`)
  }, [o.locale.getWeek(i.locale, c)]), s = `${n}-week-panel-row`, u = (c) => _e(s, {
    [`${s}-selected`]: lT(o, i.locale, r, c)
  });
  return h(Vd, Q(Q({}, t), {}, {
    panelName: "week",
    prefixColumn: l,
    rowClassName: u,
    keyboardConfig: {
      onLeftRight: null
    }
  }), null);
}
F0.displayName = "WeekPanel";
F0.inheritAttrs = !1;
function L0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: r,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = sa();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [qo(r, {
      locale: i,
      format: i.yearFormat,
      generateConfig: o
    })])]
  });
}
L0.displayName = "MonthHeader";
L0.inheritAttrs = !1;
const pT = 3, k7 = 4;
function H0(e) {
  const t = vo(e), {
    prefixCls: n,
    locale: o,
    value: i,
    viewDate: r,
    generateConfig: a,
    monthCellRender: l
  } = t, {
    rangedValue: s,
    hoverRangedValue: u
  } = Hd(), c = `${n}-cell`, d = qh({
    cellPrefixCls: c,
    value: i,
    generateConfig: a,
    rangedValue: s.value,
    hoverRangedValue: u.value,
    isSameCell: (g, m) => R0(a, g, m),
    isInView: () => !0,
    offsetCell: (g, m) => a.addMonth(g, m)
  }), f = o.shortMonths || (a.locale.getShortMonths ? a.locale.getShortMonths(o.locale) : []), p = a.setMonth(r, 0), v = l ? (g) => l({
    current: g,
    locale: o
  }) : void 0;
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: k7,
    colNum: pT,
    baseDate: p,
    getCellNode: v,
    getCellText: (g) => o.monthFormat ? qo(g, {
      locale: o,
      format: o.monthFormat,
      generateConfig: a
    }) : f[a.getMonth(g)],
    getCellClassName: d,
    getCellDate: a.addMonth,
    titleCell: (g) => qo(g, {
      locale: o,
      format: "YYYY-MM",
      generateConfig: a
    })
  }), null);
}
H0.displayName = "MonthBody";
H0.inheritAttrs = !1;
function V0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: r,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-month-panel`;
  o.value = {
    onKeydown: (f) => pc(f, {
      onLeftRight: (p) => {
        u(r.addMonth(a || l, p), "key");
      },
      onCtrlLeftRight: (p) => {
        u(r.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(r.addMonth(a || l, p * pT), "key");
      },
      onEnter: () => {
        s("date", a || l);
      }
    })
  };
  const d = (f) => {
    const p = r.addYear(l, f);
    i(p), s(null, p);
  };
  return h("div", {
    class: c
  }, [h(L0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), h(H0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse"), s("date", f);
    }
  }), null)]);
}
V0.displayName = "MonthPanel";
V0.inheritAttrs = !1;
function j0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: i,
    viewDate: r,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = sa();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [qo(r, {
      locale: i,
      format: i.yearFormat,
      generateConfig: o
    })])]
  });
}
j0.displayName = "QuarterHeader";
j0.inheritAttrs = !1;
const I7 = 4, M7 = 1;
function W0(e) {
  const t = vo(e), {
    prefixCls: n,
    locale: o,
    value: i,
    viewDate: r,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = Hd(), u = `${n}-cell`, c = qh({
    cellPrefixCls: u,
    value: i,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (f, p) => aT(a, f, p),
    isInView: () => !0,
    offsetCell: (f, p) => a.addMonth(f, p * 3)
  }), d = a.setDate(a.setMonth(r, 0), 1);
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: M7,
    colNum: I7,
    baseDate: d,
    getCellText: (f) => qo(f, {
      locale: o,
      format: o.quarterFormat || "[Q]Q",
      generateConfig: a
    }),
    getCellClassName: c,
    getCellDate: (f, p) => a.addMonth(f, p * 3),
    titleCell: (f) => qo(f, {
      locale: o,
      format: "YYYY-[Q]Q",
      generateConfig: a
    })
  }), null);
}
W0.displayName = "QuarterBody";
W0.inheritAttrs = !1;
function K0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: r,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-quarter-panel`;
  o.value = {
    onKeydown: (f) => pc(f, {
      onLeftRight: (p) => {
        u(r.addMonth(a || l, p * 3), "key");
      },
      onCtrlLeftRight: (p) => {
        u(r.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(r.addYear(a || l, p), "key");
      }
    })
  };
  const d = (f) => {
    const p = r.addYear(l, f);
    i(p), s(null, p);
  };
  return h("div", {
    class: c
  }, [h(j0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), h(W0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse");
    }
  }), null)]);
}
K0.displayName = "QuarterPanel";
K0.inheritAttrs = !1;
function q0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: i,
    onPrevDecade: r,
    onNextDecade: a,
    onDecadeClick: l
  } = t, {
    hideHeader: s
  } = sa();
  if (s.value)
    return null;
  const u = `${n}-header`, c = o.getYear(i), d = Math.floor(c / Ol) * Ol, f = d + Ol - 1;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: u,
    onSuperPrev: r,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: l,
      class: `${n}-decade-btn`
    }, [d, Le("-"), f])]
  });
}
q0.displayName = "YearHeader";
q0.inheritAttrs = !1;
const ob = 3, qS = 4;
function Y0(e) {
  const t = vo(e), {
    prefixCls: n,
    value: o,
    viewDate: i,
    locale: r,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = Hd(), u = `${n}-cell`, c = a.getYear(i), d = Math.floor(c / Ol) * Ol, f = d + Ol - 1, p = a.setYear(i, d - Math.ceil((ob * qS - Ol) / 2)), v = (m) => {
    const x = a.getYear(m);
    return d <= x && x <= f;
  }, g = qh({
    cellPrefixCls: u,
    value: o,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (m, x) => Wh(a, m, x),
    isInView: v,
    offsetCell: (m, x) => a.addYear(m, x)
  });
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: qS,
    colNum: ob,
    baseDate: p,
    getCellText: a.getYear,
    getCellClassName: g,
    getCellDate: a.addYear,
    titleCell: (m) => qo(m, {
      locale: r,
      format: "YYYY",
      generateConfig: a
    })
  }), null);
}
Y0.displayName = "YearBody";
Y0.inheritAttrs = !1;
const Ol = 10;
function G0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: i,
    generateConfig: r,
    value: a,
    viewDate: l,
    sourceMode: s,
    onSelect: u,
    onPanelChange: c
  } = t, d = `${n}-year-panel`;
  o.value = {
    onKeydown: (p) => pc(p, {
      onLeftRight: (v) => {
        u(r.addYear(a || l, v), "key");
      },
      onCtrlLeftRight: (v) => {
        u(r.addYear(a || l, v * Ol), "key");
      },
      onUpDown: (v) => {
        u(r.addYear(a || l, v * ob), "key");
      },
      onEnter: () => {
        c(s === "date" ? "date" : "month", a || l);
      }
    })
  };
  const f = (p) => {
    const v = r.addYear(l, p * 10);
    i(v), c(null, v);
  };
  return h("div", {
    class: d
  }, [h(q0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevDecade: () => {
      f(-1);
    },
    onNextDecade: () => {
      f(1);
    },
    onDecadeClick: () => {
      c("decade", l);
    }
  }), null), h(Y0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (p) => {
      c(s === "date" ? "date" : "month", p), u(p, "mouse");
    }
  }), null)]);
}
G0.displayName = "YearPanel";
G0.inheritAttrs = !1;
function hT(e, t, n) {
  return n ? h("div", {
    class: `${e}-footer-extra`
  }, [n(t)]) : null;
}
function gT(e) {
  let {
    prefixCls: t,
    components: n = {},
    needConfirmButton: o,
    onNow: i,
    onOk: r,
    okDisabled: a,
    showNow: l,
    locale: s
  } = e, u, c;
  if (o) {
    const d = n.button || "button";
    i && l !== !1 && (u = h("li", {
      class: `${t}-now`
    }, [h("a", {
      class: `${t}-now-btn`,
      onClick: i
    }, [s.now])])), c = o && h("li", {
      class: `${t}-ok`
    }, [h(d, {
      disabled: a,
      onClick: (f) => {
        f.stopPropagation(), r && r();
      }
    }, {
      default: () => [s.ok]
    })]);
  }
  return !u && !c ? null : h("ul", {
    class: `${t}-ranges`
  }, [u, c]);
}
function T7() {
  return be({
    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 = E(() => e.picker === "date" && !!e.showTime || e.picker === "time"), i = E(() => 24 % e.hourStep === 0), r = E(() => 60 % e.minuteStep === 0), a = E(() => 60 % e.secondStep === 0);
      process.env.NODE_ENV !== "production" && It(() => {
        const {
          generateConfig: j,
          value: Z,
          hourStep: W = 1,
          minuteStep: K = 1,
          secondStep: q = 1
        } = e;
        wn(!Z || j.isValidate(Z), "Invalidate date pass to `value`."), wn(!Z || j.isValidate(Z), "Invalidate date pass to `defaultValue`."), wn(i.value, `\`hourStep\` ${W} is invalid. It should be a factor of 24.`), wn(r.value, `\`minuteStep\` ${K} is invalid. It should be a factor of 60.`), wn(a.value, `\`secondStep\` ${q} is invalid. It should be a factor of 60.`);
      });
      const l = sa(), {
        operationRef: s,
        onSelect: u,
        hideRanges: c,
        defaultOpenValue: d
      } = l, {
        inRange: f,
        panelPosition: p,
        rangedValue: v,
        hoverRangedValue: g
      } = Hd(), m = le({}), [x, S] = li(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue,
        postState: (j) => !j && d?.value && e.picker === "time" ? d.value : j
      }), [C, P] = li(null, {
        value: Kt(e, "pickerValue"),
        defaultValue: e.defaultPickerValue || x.value,
        postState: (j) => {
          const {
            generateConfig: Z,
            showTime: W,
            defaultValue: K
          } = e, q = Z.getNow();
          return j ? !x.value && e.showTime ? typeof W == "object" ? ip(Z, Array.isArray(j) ? j[0] : j, W.defaultValue || q) : K ? ip(Z, Array.isArray(j) ? j[0] : j, K) : ip(Z, Array.isArray(j) ? j[0] : j, q) : j : q;
        }
      }), $ = (j) => {
        P(j), e.onPickerValueChange && e.onPickerValueChange(j);
      }, I = (j) => {
        const Z = m7[e.picker];
        return Z ? Z(j) : j;
      }, [w, M] = li(() => e.picker === "time" ? "time" : I("date"), {
        value: Kt(e, "mode")
      });
      Ie(() => e.picker, () => {
        M(e.picker);
      });
      const _ = le(w.value), N = (j) => {
        _.value = j;
      }, R = (j, Z) => {
        const {
          onPanelChange: W,
          generateConfig: K
        } = e, q = I(j || w.value);
        N(w.value), M(q), W && (w.value !== q || _u(K, C.value, C.value)) && W(Z, q);
      }, H = function(j, Z) {
        let W = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
        const {
          picker: K,
          generateConfig: q,
          onSelect: U,
          onChange: ae,
          disabledDate: se
        } = e;
        (w.value === K || W) && (S(j), U && U(j), u && u(j, Z), ae && !_u(q, j, x.value) && !se?.(j) && ae(j));
      }, L = (j) => m.value && m.value.onKeydown ? ([rt.LEFT, rt.RIGHT, rt.UP, rt.DOWN, rt.PAGE_UP, rt.PAGE_DOWN, rt.ENTER].includes(j.which) && j.preventDefault(), m.value.onKeydown(j)) : (wn(!1, "Panel not correct handle keyDown event. Please help to fire issue about this."), !1), B = (j) => {
        m.value && m.value.onBlur && m.value.onBlur(j);
      }, A = () => {
        const {
          generateConfig: j,
          hourStep: Z,
          minuteStep: W,
          secondStep: K
        } = e, q = j.getNow(), U = s7(j.getHour(q), j.getMinute(q), j.getSecond(q), i.value ? Z : 1, r.value ? W : 1, a.value ? K : 1), ae = nT(
          j,
          q,
          U[0],
          // hour
          U[1],
          // minute
          U[2]
        );
        H(ae, "submit");
      }, G = E(() => {
        const {
          prefixCls: j,
          direction: Z
        } = e;
        return _e(`${j}-panel`, {
          [`${j}-panel-has-range`]: v && v.value && v.value[0] && v.value[1],
          [`${j}-panel-has-range-hover`]: g && g.value && g.value[0] && g.value[1],
          [`${j}-panel-rtl`]: Z === "rtl"
        });
      });
      return _0(O(O({}, l), {
        mode: w,
        hideHeader: E(() => {
          var j;
          return e.hideHeader !== void 0 ? e.hideHeader : (j = l.hideHeader) === null || j === void 0 ? void 0 : j.value;
        }),
        hidePrevBtn: E(() => f.value && p.value === "right"),
        hideNextBtn: E(() => f.value && p.value === "left")
      })), Ie(() => e.value, () => {
        e.value && P(e.value);
      }), () => {
        const {
          prefixCls: j = "ant-picker",
          locale: Z,
          generateConfig: W,
          disabledDate: K,
          picker: q = "date",
          tabindex: U = 0,
          showNow: ae,
          showTime: se,
          showToday: re,
          renderExtraFooter: ie,
          onMousedown: te,
          onOk: ve,
          components: ce
        } = e;
        s && p.value !== "right" && (s.value = {
          onKeydown: L,
          onClose: () => {
            m.value && m.value.onClose && m.value.onClose();
          }
        });
        let fe;
        const ge = O(O(O({}, n), e), {
          operationRef: m,
          prefixCls: j,
          viewDate: C.value,
          value: x.value,
          onViewDateChange: $,
          sourceMode: _.value,
          onPanelChange: R,
          disabledDate: K
        });
        switch (delete ge.onChange, delete ge.onSelect, w.value) {
          case "decade":
            fe = h(A0, Q(Q({}, ge), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null);
            break;
          case "year":
            fe = h(G0, Q(Q({}, ge), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null);
            break;
          case "month":
            fe = h(V0, Q(Q({}, ge), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null);
            break;
          case "quarter":
            fe = h(K0, Q(Q({}, ge), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null);
            break;
          case "week":
            fe = h(F0, Q(Q({}, ge), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null);
            break;
          case "time":
            delete ge.showTime, fe = h(Kh, Q(Q(Q({}, ge), typeof se == "object" ? se : null), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null);
            break;
          default:
            se ? fe = h(B0, Q(Q({}, ge), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null) : fe = h(Vd, Q(Q({}, ge), {}, {
              onSelect: (He, Re) => {
                $(He), H(He, Re);
              }
            }), null);
        }
        let Me, ze;
        c?.value || (Me = hT(j, w.value, ie), ze = gT({
          prefixCls: j,
          components: ce,
          needConfirmButton: o.value,
          okDisabled: !x.value || K && K(x.value),
          locale: Z,
          showNow: ae,
          onNow: o.value && A,
          onOk: () => {
            x.value && (H(x.value, "submit", !0), ve && ve(x.value));
          }
        }));
        let Ke;
        if (re && w.value === "date" && q === "date" && !se) {
          const He = W.getNow(), Re = `${j}-today-btn`, Xe = K && K(He);
          Ke = h("a", {
            class: _e(Re, Xe && `${Re}-disabled`),
            "aria-disabled": Xe,
            onClick: () => {
              Xe || H(He, "mouse", !0);
            }
          }, [Z.today]);
        }
        return h("div", {
          tabindex: U,
          class: _e(G.value, n.class),
          style: n.style,
          onKeydown: L,
          onBlur: B,
          onMousedown: te
        }, [fe, Me || ze || Ke ? h("div", {
          class: `${j}-footer`
        }, [Me, ze, Ke]) : null]);
      };
    }
  });
}
const _7 = T7(), vT = ((e) => h(_7, e)), E7 = {
  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 mT(e, t) {
  let {
    slots: n
  } = t;
  const {
    prefixCls: o,
    popupStyle: i,
    visible: r,
    dropdownClassName: a,
    dropdownAlign: l,
    transitionName: s,
    getPopupContainer: u,
    range: c,
    popupPlacement: d,
    direction: f
  } = vo(e), p = `${o}-dropdown`;
  return h(Ad, {
    showAction: [],
    hideAction: [],
    popupPlacement: d !== void 0 ? d : f === "rtl" ? "bottomRight" : "bottomLeft",
    builtinPlacements: E7,
    prefixCls: p,
    popupTransitionName: s,
    popupAlign: l,
    popupVisible: r,
    popupClassName: _e(a, {
      [`${p}-range`]: c,
      [`${p}-rtl`]: f === "rtl"
    }),
    popupStyle: i,
    getPopupContainer: u
  }, {
    default: n.default,
    popup: n.popupElement
  });
}
const bT = be({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(e) {
    return () => e.presets.length ? h("div", {
      class: `${e.prefixCls}-presets`
    }, [h("ul", null, [e.presets.map((t, n) => {
      let {
        label: o,
        value: i
      } = t;
      return h("li", {
        key: n,
        onClick: (r) => {
          r.stopPropagation(), e.onClick(i);
        },
        onMouseenter: () => {
          var r;
          (r = e.onHover) === null || r === void 0 || r.call(e, i);
        },
        onMouseleave: () => {
          var r;
          (r = e.onHover) === null || r === void 0 || r.call(e, null);
        }
      }, [o]);
    })])]) : null;
  }
});
function ib(e) {
  let {
    open: t,
    value: n,
    isClickOutside: o,
    triggerOpen: i,
    forwardKeydown: r,
    onKeydown: a,
    blurToCancel: l,
    onSubmit: s,
    onCancel: u,
    onFocus: c,
    onBlur: d
  } = e;
  const f = $e(!1), p = $e(!1), v = $e(!1), g = $e(!1), m = $e(!1), x = E(() => ({
    onMousedown: () => {
      f.value = !0, i(!0);
    },
    onKeydown: (C) => {
      if (a(C, () => {
        m.value = !0;
      }), !m.value) {
        switch (C.which) {
          case rt.ENTER: {
            t.value ? s() !== !1 && (f.value = !0) : i(!0), C.preventDefault();
            return;
          }
          case rt.TAB: {
            f.value && t.value && !C.shiftKey ? (f.value = !1, C.preventDefault()) : !f.value && t.value && !r(C) && C.shiftKey && (f.value = !0, C.preventDefault());
            return;
          }
          case rt.ESC: {
            f.value = !0, u();
            return;
          }
        }
        !t.value && ![rt.SHIFT].includes(C.which) ? i(!0) : f.value || r(C);
      }
    },
    onFocus: (C) => {
      f.value = !0, p.value = !0, c && c(C);
    },
    onBlur: (C) => {
      if (v.value || !o(document.activeElement)) {
        v.value = !1;
        return;
      }
      l.value ? setTimeout(() => {
        let {
          activeElement: P
        } = document;
        for (; P && P.shadowRoot; )
          P = P.shadowRoot.activeElement;
        o(P) && u();
      }, 0) : t.value && (i(!1), g.value && s()), p.value = !1, d && d(C);
    }
  }));
  Ie(t, () => {
    g.value = !1;
  }), Ie(n, () => {
    g.value = !0;
  });
  const S = $e();
  return At(() => {
    S.value = d7((C) => {
      const P = f7(C);
      if (t.value) {
        const $ = o(P);
        $ ? (!p.value || $) && i(!1) : (v.value = !0, Vt(() => {
          v.value = !1;
        }));
      }
    });
  }), qt(() => {
    S.value && S.value();
  }), [x, {
    focused: p,
    typing: f
  }];
}
function rb(e) {
  let {
    valueTexts: t,
    onTextChange: n
  } = e;
  const o = le("");
  function i(a) {
    o.value = a, n(a);
  }
  function r() {
    o.value = t.value[0];
  }
  return Ie(() => [...t.value], function(a) {
    let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    a.join("||") !== l.join("||") && t.value.every((s) => s !== o.value) && r();
  }, {
    immediate: !0
  }), [o, i, r];
}
function qp(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: i
  } = t;
  const r = dM(() => {
    if (!e.value)
      return [[""], ""];
    let s = "";
    const u = [];
    for (let c = 0; c < n.value.length; c += 1) {
      const d = n.value[c], f = qo(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] || !mu(u[1], s[1])), a = E(() => r.value[0]), l = E(() => r.value[1]);
  return [a, l];
}
function ab(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: i
  } = t;
  const r = le(null);
  let a;
  function l(d) {
    let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    if (Vt.cancel(a), f) {
      r.value = d;
      return;
    }
    a = Vt(() => {
      r.value = d;
    });
  }
  const [, s] = qp(r, {
    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);
  }), qt(() => {
    Vt.cancel(a);
  }), [s, u, c];
}
function yT(e, t) {
  return E(() => e?.value ? e.value : t?.value ? (vi(!1, "`ranges` is deprecated. Please use `presets` instead."), Object.keys(t.value).map((o) => {
    const i = t.value[o], r = typeof i == "function" ? i() : i;
    return {
      label: o,
      value: r
    };
  })) : []);
}
function xT(e) {
  const {
    picker: t,
    disabledHours: n,
    disabledMinutes: o,
    disabledSeconds: i
  } = e;
  t === "time" && (n || o || i) && wn(!1, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
}
function D7() {
  return be({
    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), r = E(() => e.presets), a = yT(r), l = E(() => {
        var K;
        return (K = e.picker) !== null && K !== void 0 ? K : "date";
      }), s = E(() => l.value === "date" && !!e.showTime || l.value === "time");
      process.env.NODE_ENV !== "production" && xT(e);
      const u = E(() => cT(oT(e.format, l.value, e.showTime, e.use12Hours))), c = le(null), d = le(null), f = le(null), [p, v] = li(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue
      }), g = le(p.value), m = (K) => {
        g.value = K;
      }, x = le(null), [S, C] = li(!1, {
        value: Kt(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (K) => e.disabled ? !1 : K,
        onChange: (K) => {
          e.onOpenChange && e.onOpenChange(K), !K && x.value && x.value.onClose && x.value.onClose();
        }
      }), [P, $] = qp(g, {
        formatList: u,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }), [I, w, M] = rb({
        valueTexts: P,
        onTextChange: (K) => {
          const q = sT(K, {
            locale: e.locale,
            formatList: u.value,
            generateConfig: e.generateConfig
          });
          q && (!e.disabledDate || !e.disabledDate(q)) && m(q);
        }
      }), _ = (K) => {
        const {
          onChange: q,
          generateConfig: U,
          locale: ae
        } = e;
        m(K), v(K), q && !_u(U, p.value, K) && q(K, K ? qo(K, {
          generateConfig: U,
          locale: ae,
          format: u.value[0]
        }) : "");
      }, N = (K) => {
        e.disabled && K || C(K);
      }, R = (K) => S.value && x.value && x.value.onKeydown ? x.value.onKeydown(K) : (wn(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), H = function() {
        e.onMouseup && e.onMouseup(...arguments), i.value && (i.value.focus(), N(!0));
      }, [L, {
        focused: B,
        typing: A
      }] = ib({
        blurToCancel: s,
        open: S,
        value: I,
        triggerOpen: N,
        forwardKeydown: R,
        isClickOutside: (K) => !rT([c.value, d.value, f.value], K),
        onSubmit: () => (
          // When user typing disabledDate with keyboard and enter, this value will be empty
          !g.value || // Normal disabled check
          e.disabledDate && e.disabledDate(g.value) ? !1 : (_(g.value), N(!1), M(), !0)
        ),
        onCancel: () => {
          N(!1), m(p.value), M();
        },
        onKeydown: (K, q) => {
          var U;
          (U = e.onKeydown) === null || U === void 0 || U.call(e, K, q);
        },
        onFocus: (K) => {
          var q;
          (q = e.onFocus) === null || q === void 0 || q.call(e, K);
        },
        onBlur: (K) => {
          var q;
          (q = e.onBlur) === null || q === void 0 || q.call(e, K);
        }
      });
      Ie([S, P], () => {
        S.value || (m(p.value), !P.value.length || P.value[0] === "" ? w("") : $.value !== I.value && M());
      }), Ie(l, () => {
        S.value || M();
      }), Ie(p, () => {
        m(p.value);
      });
      const [G, j, Z] = ab(I, {
        formatList: u,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }), W = (K, q) => {
        (q === "submit" || q !== "key" && !s.value) && (_(K), N(!1));
      };
      return _0({
        operationRef: x,
        hideHeader: E(() => l.value === "time"),
        onSelect: W,
        open: S,
        defaultOpenValue: Kt(e, "defaultOpenValue"),
        onDateMouseenter: j,
        onDateMouseleave: Z
      }), o({
        focus: () => {
          i.value && i.value.focus();
        },
        blur: () => {
          i.value && i.value.blur();
        }
      }), () => {
        const {
          prefixCls: K = "rc-picker",
          id: q,
          tabindex: U,
          dropdownClassName: ae,
          dropdownAlign: se,
          popupStyle: re,
          transitionName: ie,
          generateConfig: te,
          locale: ve,
          inputReadOnly: ce,
          allowClear: fe,
          autofocus: ge,
          picker: Me = "date",
          defaultOpenValue: ze,
          suffixIcon: Ke,
          clearIcon: He,
          disabled: Re,
          placeholder: Xe,
          getPopupContainer: De,
          panelRender: Be,
          onMousedown: Ve,
          onMouseenter: ot,
          onMouseleave: je,
          onContextmenu: Pe,
          onClick: Ge,
          onSelect: Se,
          direction: Ce,
          autocomplete: Ae = "off"
        } = e, qe = O(O(O({}, e), n), {
          class: _e({
            [`${K}-panel-focused`]: !A.value
          }),
          style: void 0,
          pickerValue: void 0,
          onPickerValueChange: void 0,
          onChange: null
        });
        let We = h("div", {
          class: `${K}-panel-layout`
        }, [h(bT, {
          prefixCls: K,
          presets: a.value,
          onClick: (at) => {
            _(at), N(!1);
          }
        }, null), h(vT, Q(Q({}, qe), {}, {
          generateConfig: te,
          value: g.value,
          locale: ve,
          tabindex: -1,
          onSelect: (at) => {
            Se?.(at), m(at);
          },
          direction: Ce,
          onPanelChange: (at, ft) => {
            const {
              onPanelChange: wt
            } = e;
            Z(!0), wt?.(at, ft);
          }
        }), null)]);
        Be && (We = Be(We));
        const tt = h("div", {
          class: `${K}-panel-container`,
          ref: c,
          onMousedown: (at) => {
            at.preventDefault();
          }
        }, [We]);
        let Ee;
        Ke && (Ee = h("span", {
          class: `${K}-suffix`
        }, [Ke]));
        let Ne;
        fe && p.value && !Re && (Ne = h("span", {
          onMousedown: (at) => {
            at.preventDefault(), at.stopPropagation();
          },
          onMouseup: (at) => {
            at.preventDefault(), at.stopPropagation(), _(null), N(!1);
          },
          class: `${K}-clear`,
          role: "button"
        }, [He || h("span", {
          class: `${K}-clear-btn`
        }, null)]));
        const Fe = O(O(O(O({
          id: q,
          tabindex: U,
          disabled: Re,
          readonly: ce || typeof u.value[0] == "function" || !A.value,
          value: G.value || I.value,
          onInput: (at) => {
            w(at.target.value);
          },
          autofocus: ge,
          placeholder: Xe,
          ref: i,
          title: I.value
        }, L.value), {
          size: iT(Me, u.value[0], te)
        }), dT(e)), {
          autocomplete: Ae
        }), it = e.inputRender ? e.inputRender(Fe) : h("input", Fe, null);
        process.env.NODE_ENV !== "production" && wn(!ze, "`defaultOpenValue` may confuse user for the current value status. Please use `defaultValue` instead.");
        const pt = Ce === "rtl" ? "bottomRight" : "bottomLeft";
        return h("div", {
          ref: f,
          class: _e(K, n.class, {
            [`${K}-disabled`]: Re,
            [`${K}-focused`]: B.value,
            [`${K}-rtl`]: Ce === "rtl"
          }),
          style: n.style,
          onMousedown: Ve,
          onMouseup: H,
          onMouseenter: ot,
          onMouseleave: je,
          onContextmenu: Pe,
          onClick: Ge
        }, [h("div", {
          class: _e(`${K}-input`, {
            [`${K}-input-placeholder`]: !!G.value
          }),
          ref: d
        }, [it, Ee, Ne]), h(mT, {
          visible: S.value,
          popupStyle: re,
          prefixCls: K,
          dropdownClassName: ae,
          dropdownAlign: se,
          getPopupContainer: De,
          transitionName: ie,
          popupPlacement: pt,
          direction: Ce
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => tt
        })]);
      };
    }
  });
}
const A7 = D7();
function R7(e, t) {
  let {
    picker: n,
    locale: o,
    selectedValue: i,
    disabledDate: r,
    disabled: a,
    generateConfig: l
  } = e;
  const s = E(() => on(i.value, 0)), u = E(() => on(i.value, 1));
  function c(g) {
    return l.value.locale.getWeekFirstDate(o.value.locale, g);
  }
  function d(g) {
    const m = l.value.getYear(g), x = l.value.getMonth(g);
    return m * 100 + x;
  }
  function f(g) {
    const m = l.value.getYear(g), x = tb(l.value, g);
    return m * 10 + x;
  }
  return [(g) => {
    var m;
    if (r && (!((m = r?.value) === null || m === void 0) && m.call(r, g)))
      return !0;
    if (a[1] && u)
      return !Ea(l.value, g, u.value) && l.value.isAfter(g, u.value);
    if (t.value[1] && u.value)
      switch (n.value) {
        case "quarter":
          return f(g) > f(u.value);
        case "month":
          return d(g) > d(u.value);
        case "week":
          return c(g) > c(u.value);
        default:
          return !Ea(l.value, g, u.value) && l.value.isAfter(g, u.value);
      }
    return !1;
  }, (g) => {
    var m;
    if (!((m = r.value) === null || m === void 0) && m.call(r, g))
      return !0;
    if (a[0] && s)
      return !Ea(l.value, g, u.value) && l.value.isAfter(s.value, g);
    if (t.value[0] && s.value)
      switch (n.value) {
        case "quarter":
          return f(g) < f(s.value);
        case "month":
          return d(g) < d(s.value);
        case "week":
          return c(g) < c(s.value);
        default:
          return !Ea(l.value, g, s.value) && l.value.isAfter(s.value, g);
      }
    return !1;
  }];
}
function N7(e, t, n, o) {
  const i = Jc(e, n, o, 1);
  function r(a) {
    return a(e, t) ? "same" : a(i, t) ? "closing" : "far";
  }
  switch (n) {
    case "year":
      return r((a, l) => b7(o, a, l));
    case "quarter":
    case "month":
      return r((a, l) => Wh(o, a, l));
    default:
      return r((a, l) => R0(o, a, l));
  }
}
function z7(e, t, n, o) {
  const i = on(e, 0), r = on(e, 1);
  if (t === 0)
    return i;
  if (i && r)
    switch (N7(i, r, n, o)) {
      case "same":
        return i;
      case "closing":
        return i;
      default:
        return Jc(r, n, o, -1);
    }
  return i;
}
function B7(e) {
  let {
    values: t,
    picker: n,
    defaultDates: o,
    generateConfig: i
  } = e;
  const r = le([on(o, 0), on(o, 1)]), a = le(null), l = E(() => on(t.value, 0)), s = E(() => on(t.value, 1)), u = (p) => r.value[p] ? r.value[p] : on(a.value, p) || z7(t.value, p, n.value, i.value) || l.value || s.value || i.value.getNow(), c = le(null), d = le(null);
  It(() => {
    c.value = u(0), d.value = u(1);
  });
  function f(p, v) {
    if (p) {
      let g = Gi(a.value, p, v);
      r.value = Gi(r.value, null, v) || [null, null];
      const m = (v + 1) % 2;
      on(t.value, m) || (g = Gi(g, p, m)), a.value = g;
    } else (l.value || s.value) && (a.value = null);
  }
  return [c, d, f];
}
function F7(e) {
  return _P() ? (EP(e), !0) : !1;
}
function L7(e) {
  return typeof e == "function" ? e() : T(e);
}
function wT(e) {
  var t;
  const n = L7(e);
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
}
function H7(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  fi() ? At(e) : t ? e() : Yt(e);
}
function V7(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = $e(), o = () => n.value = !!e();
  return o(), H7(o, t), n;
}
var cv;
const ST = typeof window < "u";
ST && (!((cv = window?.navigator) === null || cv === void 0) && cv.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
const j7 = ST ? window : void 0;
var W7 = 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 K7(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    window: o = j7
  } = n, i = W7(n, ["window"]);
  let r;
  const a = V7(() => o && "ResizeObserver" in o), l = () => {
    r && (r.disconnect(), r = void 0);
  }, s = Ie(() => wT(e), (c) => {
    l(), a.value && o && c && (r = new ResizeObserver(t), r.observe(c, i));
  }, {
    immediate: !0,
    flush: "post"
  }), u = () => {
    l(), s();
  };
  return F7(u), {
    isSupported: a,
    stop: u
  };
}
function Dc(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 = $e(t.width), r = $e(t.height);
  return K7(e, (a) => {
    let [l] = a;
    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), r.value = s.reduce((u, c) => {
      let {
        blockSize: d
      } = c;
      return u + d;
    }, 0)) : (i.value = l.contentRect.width, r.value = l.contentRect.height);
  }, n), Ie(() => wT(e), (a) => {
    i.value = a ? t.width : 0, r.value = a ? t.height : 0;
  }), {
    width: i,
    height: r
  };
}
function YS(e, t) {
  return e && e[0] && e[1] && t.isAfter(e[0], e[1]) ? [e[1], e[0]] : e;
}
function GS(e, t, n, o) {
  return !!(e || o && o[t] || n[(t + 1) % 2]);
}
function q7() {
  return be({
    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 = E(() => e.picker === "date" && !!e.showTime || e.picker === "time"), r = E(() => e.presets), a = E(() => e.ranges), l = yT(r, a), s = le({}), u = le(null), c = le(null), d = le(null), f = le(null), p = le(null), v = le(null), g = le(null), m = le(null);
      process.env.NODE_ENV !== "production" && xT(e);
      const x = E(() => cT(oT(e.format, e.picker, e.showTime, e.use12Hours))), [S, C] = li(0, {
        value: Kt(e, "activePickerIndex")
      }), P = le(null), $ = E(() => {
        const {
          disabled: Ue
        } = e;
        return Array.isArray(Ue) ? Ue : [Ue || !1, Ue || !1];
      }), [I, w] = li(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue,
        postState: (Ue) => e.picker === "time" && !e.order ? Ue : YS(Ue, e.generateConfig)
      }), [M, _, N] = B7({
        values: I,
        picker: Kt(e, "picker"),
        defaultDates: e.defaultPickerValue,
        generateConfig: Kt(e, "generateConfig")
      }), [R, H] = li(I.value, {
        postState: (Ue) => {
          let ht = Ue;
          if ($.value[0] && $.value[1])
            return ht;
          for (let vt = 0; vt < 2; vt += 1)
            $.value[vt] && !on(ht, vt) && !on(e.allowEmpty, vt) && (ht = Gi(ht, e.generateConfig.getNow(), vt));
          return ht;
        }
      }), [L, B] = li([e.picker, e.picker], {
        value: Kt(e, "mode")
      });
      Ie(() => e.picker, () => {
        B([e.picker, e.picker]);
      });
      const A = (Ue, ht) => {
        var vt;
        B(Ue), (vt = e.onPanelChange) === null || vt === void 0 || vt.call(e, ht, Ue);
      }, [G, j] = R7({
        picker: Kt(e, "picker"),
        selectedValue: R,
        locale: Kt(e, "locale"),
        disabled: $,
        disabledDate: Kt(e, "disabledDate"),
        generateConfig: Kt(e, "generateConfig")
      }, s), [Z, W] = li(!1, {
        value: Kt(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (Ue) => $.value[S.value] ? !1 : Ue,
        onChange: (Ue) => {
          var ht;
          (ht = e.onOpenChange) === null || ht === void 0 || ht.call(e, Ue), !Ue && P.value && P.value.onClose && P.value.onClose();
        }
      }), K = E(() => Z.value && S.value === 0), q = E(() => Z.value && S.value === 1), U = le(0), ae = le(0), se = le(0), {
        width: re
      } = Dc(u);
      Ie([Z, re], () => {
        !Z.value && u.value && (se.value = re.value);
      });
      const {
        width: ie
      } = Dc(c), {
        width: te
      } = Dc(m), {
        width: ve
      } = Dc(d), {
        width: ce
      } = Dc(p);
      Ie([S, Z, ie, te, ve, ce, () => e.direction], () => {
        ae.value = 0, S.value ? d.value && p.value && (ae.value = ve.value + ce.value, ie.value && te.value && ae.value > ie.value - te.value - (e.direction === "rtl" || m.value.offsetLeft > ae.value ? 0 : m.value.offsetLeft) && (U.value = ae.value)) : S.value === 0 && (U.value = 0);
      }, {
        immediate: !0
      });
      const fe = le();
      function ge(Ue, ht) {
        if (Ue)
          clearTimeout(fe.value), s.value[ht] = !0, C(ht), W(Ue), Z.value || N(null, ht);
        else if (S.value === ht) {
          W(Ue);
          const vt = s.value;
          fe.value = setTimeout(() => {
            vt === s.value && (s.value = {});
          });
        }
      }
      function Me(Ue) {
        ge(!0, Ue), setTimeout(() => {
          const ht = [v, g][Ue];
          ht.value && ht.value.focus();
        }, 0);
      }
      function ze(Ue, ht) {
        let vt = Ue, Zt = on(vt, 0), Qn = on(vt, 1);
        const {
          generateConfig: Xn,
          locale: $o,
          picker: Sn,
          order: Mt,
          onCalendarChange: fo,
          allowEmpty: zo,
          onChange: un,
          showTime: Dn
        } = e;
        Zt && Qn && Xn.isAfter(Zt, Qn) && (// WeekPicker only compare week
        Sn === "week" && !lT(Xn, $o.locale, Zt, Qn) || // QuotaPicker only compare week
        Sn === "quarter" && !aT(Xn, Zt, Qn) || // Other non-TimePicker compare date
        Sn !== "week" && Sn !== "quarter" && Sn !== "time" && !(Dn ? _u(Xn, Zt, Qn) : Ea(Xn, Zt, Qn)) ? (ht === 0 ? (vt = [Zt, null], Qn = null) : (Zt = null, vt = [null, Qn]), s.value = {
          [ht]: !0
        }) : (Sn !== "time" || Mt !== !1) && (vt = YS(vt, Xn))), H(vt);
        const cn = vt && vt[0] ? qo(vt[0], {
          generateConfig: Xn,
          locale: $o,
          format: x.value[0]
        }) : "", An = vt && vt[1] ? qo(vt[1], {
          generateConfig: Xn,
          locale: $o,
          format: x.value[0]
        }) : "";
        fo && fo(vt, [cn, An], {
          range: ht === 0 ? "start" : "end"
        });
        const Jo = GS(Zt, 0, $.value, zo), Zn = GS(Qn, 1, $.value, zo);
        (vt === null || Jo && Zn) && (w(vt), un && (!_u(Xn, on(I.value, 0), Zt) || !_u(Xn, on(I.value, 1), Qn)) && un(vt, [cn, An]));
        let jo = null;
        ht === 0 && !$.value[1] ? jo = 1 : ht === 1 && !$.value[0] && (jo = 0), jo !== null && jo !== S.value && (!s.value[jo] || !on(vt, jo)) && on(vt, ht) ? Me(jo) : ge(!1, ht);
      }
      const Ke = (Ue) => Z && P.value && P.value.onKeydown ? P.value.onKeydown(Ue) : (wn(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), He = {
        formatList: x,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }, [Re, Xe] = qp(E(() => on(R.value, 0)), He), [De, Be] = qp(E(() => on(R.value, 1)), He), Ve = (Ue, ht) => {
        const vt = sT(Ue, {
          locale: e.locale,
          formatList: x.value,
          generateConfig: e.generateConfig
        });
        vt && !(ht === 0 ? G : j)(vt) && (H(Gi(R.value, vt, ht)), N(vt, ht));
      }, [ot, je, Pe] = rb({
        valueTexts: Re,
        onTextChange: (Ue) => Ve(Ue, 0)
      }), [Ge, Se, Ce] = rb({
        valueTexts: De,
        onTextChange: (Ue) => Ve(Ue, 1)
      }), [Ae, qe] = Cn(null), [We, tt] = Cn(null), [Ee, Ne, Fe] = ab(ot, He), [it, pt, at] = ab(Ge, He), ft = (Ue) => {
        tt(Gi(R.value, Ue, S.value)), S.value === 0 ? Ne(Ue) : pt(Ue);
      }, wt = () => {
        tt(Gi(R.value, null, S.value)), S.value === 0 ? Fe() : at();
      }, Ct = (Ue, ht) => ({
        forwardKeydown: Ke,
        onBlur: (vt) => {
          var Zt;
          (Zt = e.onBlur) === null || Zt === void 0 || Zt.call(e, vt);
        },
        isClickOutside: (vt) => !rT([c.value, d.value, f.value, u.value], vt),
        onFocus: (vt) => {
          var Zt;
          C(Ue), (Zt = e.onFocus) === null || Zt === void 0 || Zt.call(e, vt);
        },
        triggerOpen: (vt) => {
          ge(vt, Ue);
        },
        onSubmit: () => {
          if (
            // When user typing disabledDate with keyboard and enter, this value will be empty
            !R.value || // Normal disabled check
            e.disabledDate && e.disabledDate(R.value[Ue])
          )
            return !1;
          ze(R.value, Ue), ht();
        },
        onCancel: () => {
          ge(!1, Ue), H(I.value), ht();
        }
      }), [St, {
        focused: bt,
        typing: Ot
      }] = ib(O(O({}, Ct(0, Pe)), {
        blurToCancel: i,
        open: K,
        value: ot,
        onKeydown: (Ue, ht) => {
          var vt;
          (vt = e.onKeydown) === null || vt === void 0 || vt.call(e, Ue, ht);
        }
      })), [Wt, {
        focused: Xt,
        typing: ln
      }] = ib(O(O({}, Ct(1, Ce)), {
        blurToCancel: i,
        open: q,
        value: Ge,
        onKeydown: (Ue, ht) => {
          var vt;
          (vt = e.onKeydown) === null || vt === void 0 || vt.call(e, Ue, ht);
        }
      })), pn = (Ue) => {
        var ht;
        (ht = e.onClick) === null || ht === void 0 || ht.call(e, Ue), !Z.value && !v.value.contains(Ue.target) && !g.value.contains(Ue.target) && ($.value[0] ? $.value[1] || Me(1) : Me(0));
      }, gt = (Ue) => {
        var ht;
        (ht = e.onMousedown) === null || ht === void 0 || ht.call(e, Ue), Z.value && (bt.value || Xt.value) && !v.value.contains(Ue.target) && !g.value.contains(Ue.target) && Ue.preventDefault();
      }, En = E(() => {
        var Ue;
        return !((Ue = I.value) === null || Ue === void 0) && Ue[0] ? qo(I.value[0], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      }), hn = E(() => {
        var Ue;
        return !((Ue = I.value) === null || Ue === void 0) && Ue[1] ? qo(I.value[1], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      });
      Ie([Z, Re, De], () => {
        Z.value || (H(I.value), !Re.value.length || Re.value[0] === "" ? je("") : Xe.value !== ot.value && Pe(), !De.value.length || De.value[0] === "" ? Se("") : Be.value !== Ge.value && Ce());
      }), Ie([En, hn], () => {
        H(I.value);
      }), process.env.NODE_ENV !== "production" && It(() => {
        const {
          value: Ue,
          disabled: ht
        } = e;
        Ue && Array.isArray(ht) && (on(ht, 0) && !on(Ue, 0) || on(ht, 1) && !on(Ue, 1)) && wn(!1, "`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.");
      }), o({
        focus: () => {
          v.value && v.value.focus();
        },
        blur: () => {
          v.value && v.value.blur(), g.value && g.value.blur();
        }
      });
      const Wn = E(() => Z.value && We.value && We.value[0] && We.value[1] && e.generateConfig.isAfter(We.value[1], We.value[0]) ? We.value : null);
      function lo() {
        let Ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, ht = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        const {
          generateConfig: vt,
          showTime: Zt,
          dateRender: Qn,
          direction: Xn,
          disabledTime: $o,
          prefixCls: Sn,
          locale: Mt
        } = e;
        let fo = Zt;
        if (Zt && typeof Zt == "object" && Zt.defaultValue) {
          const un = Zt.defaultValue;
          fo = O(O({}, Zt), {
            defaultValue: on(un, S.value) || void 0
          });
        }
        let zo = null;
        return Qn && (zo = (un) => {
          let {
            current: Dn,
            today: cn
          } = un;
          return Qn({
            current: Dn,
            today: cn,
            info: {
              range: S.value ? "end" : "start"
            }
          });
        }), h(P7, {
          value: {
            inRange: !0,
            panelPosition: Ue,
            rangedValue: Ae.value || R.value,
            hoverRangedValue: Wn.value
          }
        }, {
          default: () => [h(vT, Q(Q(Q({}, e), ht), {}, {
            dateRender: zo,
            showTime: fo,
            mode: L.value[S.value],
            generateConfig: vt,
            style: void 0,
            direction: Xn,
            disabledDate: S.value === 0 ? G : j,
            disabledTime: (un) => $o ? $o(un, S.value === 0 ? "start" : "end") : !1,
            class: _e({
              [`${Sn}-panel-focused`]: S.value === 0 ? !Ot.value : !ln.value
            }),
            value: on(R.value, S.value),
            locale: Mt,
            tabIndex: -1,
            onPanelChange: (un, Dn) => {
              S.value === 0 && Fe(!0), S.value === 1 && at(!0), A(Gi(L.value, Dn, S.value), Gi(R.value, un, S.value));
              let cn = un;
              Ue === "right" && L.value[S.value] === Dn && (cn = Jc(cn, Dn, vt, -1)), N(cn, S.value);
            },
            onOk: null,
            onSelect: void 0,
            onChange: void 0,
            defaultValue: S.value === 0 ? on(R.value, 1) : on(R.value, 0)
          }), null)]
        });
      }
      const Uo = (Ue, ht) => {
        const vt = Gi(R.value, Ue, S.value);
        ht === "submit" || ht !== "key" && !i.value ? (ze(vt, S.value), S.value === 0 ? Fe() : at()) : H(vt);
      };
      return _0({
        operationRef: P,
        hideHeader: E(() => e.picker === "time"),
        onDateMouseenter: ft,
        onDateMouseleave: wt,
        hideRanges: E(() => !0),
        onSelect: Uo,
        open: Z
      }), () => {
        const {
          prefixCls: Ue = "rc-picker",
          id: ht,
          popupStyle: vt,
          dropdownClassName: Zt,
          transitionName: Qn,
          dropdownAlign: Xn,
          getPopupContainer: $o,
          generateConfig: Sn,
          locale: Mt,
          placeholder: fo,
          autofocus: zo,
          picker: un = "date",
          showTime: Dn,
          separator: cn = "~",
          disabledDate: An,
          panelRender: Jo,
          allowClear: Zn,
          suffixIcon: pi,
          clearIcon: jo,
          inputReadOnly: ca,
          renderExtraFooter: da,
          onMouseenter: ar,
          onMouseleave: Dr,
          onMouseup: Qa,
          onOk: Ar,
          components: Za,
          direction: lr,
          autocomplete: Rr = "off"
        } = e, Hl = lr === "rtl" ? {
          right: `${ae.value}px`
        } : {
          left: `${ae.value}px`
        };
        function ei() {
          let oo;
          const ti = hT(Ue, L.value[S.value], da), fa = gT({
            prefixCls: Ue,
            components: Za,
            needConfirmButton: i.value,
            okDisabled: !on(R.value, S.value) || An && An(R.value[S.value]),
            locale: Mt,
            onOk: () => {
              on(R.value, S.value) && (ze(R.value, S.value), Ar && Ar(R.value));
            }
          });
          if (un !== "time" && !Dn) {
            const Bo = S.value === 0 ? M.value : _.value, nl = Jc(Bo, un, Sn), il = L.value[S.value] === un, Nr = lo(il ? "left" : !1, {
              pickerValue: Bo,
              onPickerValueChange: (Kl) => {
                N(Kl, S.value);
              }
            }), qs = lo("right", {
              pickerValue: nl,
              onPickerValueChange: (Kl) => {
                N(Jc(Kl, un, Sn, -1), S.value);
              }
            });
            lr === "rtl" ? oo = h(Je, null, [qs, il && Nr]) : oo = h(Je, null, [Nr, il && qs]);
          } else
            oo = lo();
          let ni = h("div", {
            class: `${Ue}-panel-layout`
          }, [h(bT, {
            prefixCls: Ue,
            presets: l.value,
            onClick: (Bo) => {
              ze(Bo, null), ge(!1, S.value);
            },
            onHover: (Bo) => {
              qe(Bo);
            }
          }, null), h("div", null, [h("div", {
            class: `${Ue}-panels`
          }, [oo]), (ti || fa) && h("div", {
            class: `${Ue}-footer`
          }, [ti, fa])])]);
          return Jo && (ni = Jo(ni)), h("div", {
            class: `${Ue}-panel-container`,
            style: {
              marginLeft: `${U.value}px`
            },
            ref: c,
            onMousedown: (Bo) => {
              Bo.preventDefault();
            }
          }, [ni]);
        }
        const Ks = h("div", {
          class: _e(`${Ue}-range-wrapper`, `${Ue}-${un}-range-wrapper`),
          style: {
            minWidth: `${se.value}px`
          }
        }, [h("div", {
          ref: m,
          class: `${Ue}-range-arrow`,
          style: Hl
        }, null), ei()]);
        let Vl;
        pi && (Vl = h("span", {
          class: `${Ue}-suffix`
        }, [pi]));
        let Ja;
        Zn && (on(I.value, 0) && !$.value[0] || on(I.value, 1) && !$.value[1]) && (Ja = h("span", {
          onMousedown: (oo) => {
            oo.preventDefault(), oo.stopPropagation();
          },
          onMouseup: (oo) => {
            oo.preventDefault(), oo.stopPropagation();
            let ti = I.value;
            $.value[0] || (ti = Gi(ti, null, 0)), $.value[1] || (ti = Gi(ti, null, 1)), ze(ti, null), ge(!1, S.value);
          },
          class: `${Ue}-clear`
        }, [jo || h("span", {
          class: `${Ue}-clear-btn`
        }, null)]));
        const jl = {
          size: iT(un, x.value[0], Sn)
        };
        let Wl = 0, el = 0;
        d.value && f.value && p.value && (S.value === 0 ? el = d.value.offsetWidth : (Wl = ae.value, el = f.value.offsetWidth));
        const tl = lr === "rtl" ? {
          right: `${Wl}px`
        } : {
          left: `${Wl}px`
        };
        return h("div", Q({
          ref: u,
          class: _e(Ue, `${Ue}-range`, n.class, {
            [`${Ue}-disabled`]: $.value[0] && $.value[1],
            [`${Ue}-focused`]: S.value === 0 ? bt.value : Xt.value,
            [`${Ue}-rtl`]: lr === "rtl"
          }),
          style: n.style,
          onClick: pn,
          onMouseenter: ar,
          onMouseleave: Dr,
          onMousedown: gt,
          onMouseup: Qa
        }, dT(e)), [h("div", {
          class: _e(`${Ue}-input`, {
            [`${Ue}-input-active`]: S.value === 0,
            [`${Ue}-input-placeholder`]: !!Ee.value
          }),
          ref: d
        }, [h("input", Q(Q(Q({
          id: ht,
          disabled: $.value[0],
          readonly: ca || typeof x.value[0] == "function" || !Ot.value,
          value: Ee.value || ot.value,
          onInput: (oo) => {
            je(oo.target.value);
          },
          autofocus: zo,
          placeholder: on(fo, 0) || "",
          ref: v
        }, St.value), jl), {}, {
          autocomplete: Rr
        }), null)]), h("div", {
          class: `${Ue}-range-separator`,
          ref: p
        }, [cn]), h("div", {
          class: _e(`${Ue}-input`, {
            [`${Ue}-input-active`]: S.value === 1,
            [`${Ue}-input-placeholder`]: !!it.value
          }),
          ref: f
        }, [h("input", Q(Q(Q({
          disabled: $.value[1],
          readonly: ca || typeof x.value[0] == "function" || !ln.value,
          value: it.value || Ge.value,
          onInput: (oo) => {
            Se(oo.target.value);
          },
          placeholder: on(fo, 1) || "",
          ref: g
        }, Wt.value), jl), {}, {
          autocomplete: Rr
        }), null)]), h("div", {
          class: `${Ue}-active-bar`,
          style: O(O({}, tl), {
            width: `${el}px`,
            position: "absolute"
          })
        }, null), Vl, Ja, h(mT, {
          visible: Z.value,
          popupStyle: vt,
          prefixCls: Ue,
          dropdownClassName: Zt,
          dropdownAlign: Xn,
          getPopupContainer: $o,
          transitionName: Qn,
          range: !0,
          direction: lr
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => Ks
        })]);
      };
    }
  });
}
const Y7 = q7();
var G7 = 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 U7 = {
  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: pe.any,
  required: Boolean
}, CT = be({
  compatConfig: {
    MODE: 3
  },
  name: "Checkbox",
  inheritAttrs: !1,
  props: _n(U7, {
    prefixCls: "rc-checkbox",
    type: "checkbox",
    defaultChecked: !1
  }),
  emits: ["click", "change"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t;
    const r = le(e.checked === void 0 ? e.defaultChecked : e.checked), a = le();
    Ie(() => e.checked, () => {
      r.value = e.checked;
    }), i({
      focus() {
        var c;
        (c = a.value) === null || c === void 0 || c.focus();
      },
      blur() {
        var c;
        (c = a.value) === null || c === void 0 || c.blur();
      }
    });
    const l = le(), s = (c) => {
      if (e.disabled)
        return;
      e.checked === void 0 && (r.value = c.target.checked), c.shiftKey = l.value;
      const d = {
        target: O(O({}, e), {
          checked: c.target.checked
        }),
        stopPropagation() {
          c.stopPropagation();
        },
        preventDefault() {
          c.preventDefault();
        },
        nativeEvent: c
      };
      e.checked !== void 0 && (a.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: p,
        disabled: v,
        readonly: g,
        tabindex: m,
        autofocus: x,
        value: S,
        required: C
      } = e, P = G7(e, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
        class: $,
        onFocus: I,
        onBlur: w,
        onKeydown: M,
        onKeypress: _,
        onKeyup: N
      } = n, R = O(O({}, P), n), H = Object.keys(R).reduce((A, G) => ((G.startsWith("data-") || G.startsWith("aria-") || G === "role") && (A[G] = R[G]), A), {}), L = _e(c, $, {
        [`${c}-checked`]: r.value,
        [`${c}-disabled`]: v
      }), B = O(O({
        name: d,
        id: f,
        type: p,
        readonly: g,
        disabled: v,
        tabindex: m,
        class: `${c}-input`,
        checked: !!r.value,
        autofocus: x,
        value: S
      }, H), {
        onChange: s,
        onClick: u,
        onFocus: I,
        onBlur: w,
        onKeydown: M,
        onKeypress: _,
        onKeyup: N,
        required: C
      });
      return h("span", {
        class: L
      }, [h("input", Q({
        ref: a
      }, B), null), h("span", {
        class: `${c}-inner`
      }, null)]);
    };
  }
}), $T = Symbol("radioGroupContextKey"), X7 = (e) => {
  Ft($T, e);
}, Q7 = () => zt($T, void 0), PT = Symbol("radioOptionTypeContextKey"), Z7 = (e) => {
  Ft(PT, e);
}, J7 = () => zt(PT, void 0), e9 = new tn("antRadioEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), t9 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-group`;
  return {
    [o]: O(O({}, fn(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"
      }
    })
  };
}, n9 = (e) => {
  const {
    componentCls: t,
    radioWrapperMarginRight: n,
    radioCheckedColor: o,
    radioSize: i,
    motionDurationSlow: r,
    motionDurationMid: a,
    motionEaseInOut: l,
    motionEaseInOutCirc: s,
    radioButtonBg: u,
    colorBorder: c,
    lineWidth: d,
    radioDotSize: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: v,
    paddingXS: g,
    radioDotDisabledColor: m,
    lineType: x,
    radioDotDisabledSize: S,
    wireframe: C,
    colorWhite: P
  } = e, $ = `${t}-inner`;
  return {
    [`${t}-wrapper`]: O(O({}, fn(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 ${x} ${o}`,
        borderRadius: "50%",
        visibility: "hidden",
        animationName: e9,
        animationDuration: r,
        animationTimingFunction: l,
        animationFillMode: "both",
        content: '""'
      },
      [t]: O(O({}, fn(e)), {
        position: "relative",
        display: "inline-block",
        outline: "none",
        cursor: "pointer",
        alignSelf: "center"
      }),
      [`${t}-wrapper:hover &,
        &:hover ${$}`]: {
        borderColor: o
      },
      [`${t}-input:focus-visible + ${$}`]: O({}, Wa(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: C ? o : P,
          borderBlockStart: 0,
          borderInlineStart: 0,
          borderRadius: i,
          transform: "scale(0)",
          opacity: 0,
          transition: `all ${r} ${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 ${a}`
      },
      [`${t}-input`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        insetBlockEnd: 0,
        insetInlineStart: 0,
        zIndex: 1,
        cursor: "pointer",
        opacity: 0
      },
      // 选中状态
      [`${t}-checked`]: {
        [$]: {
          borderColor: o,
          backgroundColor: C ? u : o,
          "&::after": {
            transform: `scale(${f / i})`,
            opacity: 1,
            transition: `all ${r} ${s}`
          }
        }
      },
      [`${t}-disabled`]: {
        cursor: "not-allowed",
        [$]: {
          backgroundColor: p,
          borderColor: c,
          cursor: "not-allowed",
          "&::after": {
            backgroundColor: m
          }
        },
        [`${t}-input`]: {
          cursor: "not-allowed"
        },
        [`${t}-disabled + span`]: {
          color: v,
          cursor: "not-allowed"
        },
        [`&${t}-checked`]: {
          [$]: {
            "&::after": {
              transform: `scale(${S / i})`
            }
          }
        }
      },
      [`span${t} + *`]: {
        paddingInlineStart: g,
        paddingInlineEnd: g
      }
    })
  };
}, o9 = (e) => {
  const {
    radioButtonColor: t,
    controlHeight: n,
    componentCls: o,
    lineWidth: i,
    lineType: r,
    colorBorder: a,
    motionDurationSlow: l,
    motionDurationMid: s,
    radioButtonPaddingHorizontal: u,
    fontSize: c,
    radioButtonBg: d,
    fontSizeLG: f,
    controlHeightLG: p,
    controlHeightSM: v,
    paddingXS: g,
    borderRadius: m,
    borderRadiusSM: x,
    borderRadiusLG: S,
    radioCheckedColor: C,
    radioButtonCheckedBg: P,
    radioButtonHoverColor: $,
    radioButtonActiveColor: I,
    radioSolidCheckedColor: w,
    colorTextDisabled: M,
    colorBgContainerDisabled: _,
    radioDisabledButtonCheckedColor: N,
    radioDisabledButtonCheckedBg: R
  } = 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 ${r} ${a}`,
      // 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: a,
          transition: `background-color ${l}`,
          content: '""'
        }
      },
      "&:first-child": {
        borderInlineStart: `${i}px ${r} ${a}`,
        borderStartStartRadius: m,
        borderEndStartRadius: m
      },
      "&:last-child": {
        borderStartEndRadius: m,
        borderEndEndRadius: m
      },
      "&:first-child:last-child": {
        borderRadius: m
      },
      [`${o}-group-large &`]: {
        height: p,
        fontSize: f,
        lineHeight: `${p - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: S,
          borderEndStartRadius: S
        },
        "&:last-child": {
          borderStartEndRadius: S,
          borderEndEndRadius: S
        }
      },
      [`${o}-group-small &`]: {
        height: v,
        paddingInline: g - i,
        paddingBlock: 0,
        lineHeight: `${v - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: x,
          borderEndStartRadius: x
        },
        "&:last-child": {
          borderStartEndRadius: x,
          borderEndEndRadius: x
        }
      },
      "&:hover": {
        position: "relative",
        color: C
      },
      "&:has(:focus-visible)": O({}, Wa(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: C,
        background: P,
        borderColor: C,
        "&::before": {
          backgroundColor: C
        },
        "&:first-child": {
          borderColor: C
        },
        "&:hover": {
          color: $,
          borderColor: $,
          "&::before": {
            backgroundColor: $
          }
        },
        "&:active": {
          color: I,
          borderColor: I,
          "&::before": {
            backgroundColor: I
          }
        }
      },
      [`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]: {
        color: w,
        background: C,
        borderColor: C,
        "&:hover": {
          color: w,
          background: $,
          borderColor: $
        },
        "&:active": {
          color: w,
          background: I,
          borderColor: I
        }
      },
      "&-disabled": {
        color: M,
        backgroundColor: _,
        borderColor: a,
        cursor: "not-allowed",
        "&:first-child, &:hover": {
          color: M,
          backgroundColor: _,
          borderColor: a
        }
      },
      [`&-disabled${o}-button-wrapper-checked`]: {
        color: N,
        backgroundColor: R,
        borderColor: a,
        boxShadow: "none"
      }
    }
  };
}, OT = On("Radio", (e) => {
  const {
    padding: t,
    lineWidth: n,
    controlItemBgActiveDisabled: o,
    colorTextDisabled: i,
    colorBgContainer: r,
    fontSizeLG: a,
    controlOutline: l,
    colorPrimaryHover: s,
    colorPrimaryActive: u,
    colorText: c,
    colorPrimary: d,
    marginXS: f,
    controlOutlineWidth: p,
    colorTextLightSolid: v,
    wireframe: g
  } = e, m = `0 0 0 ${p}px ${l}`, x = m, S = a, C = 4, P = S - C * 2, $ = g ? P : S - (C + n) * 2, I = d, w = c, M = s, _ = u, N = t - n, L = Qt(e, {
    radioFocusShadow: m,
    radioButtonFocusShadow: x,
    radioSize: S,
    radioDotSize: $,
    radioDotDisabledSize: P,
    radioCheckedColor: I,
    radioDotDisabledColor: i,
    radioSolidCheckedColor: v,
    radioButtonBg: r,
    radioButtonCheckedBg: r,
    radioButtonColor: w,
    radioButtonHoverColor: M,
    radioButtonActiveColor: _,
    radioButtonPaddingHorizontal: N,
    radioDisabledButtonCheckedBg: o,
    radioDisabledButtonCheckedColor: i,
    radioWrapperMarginRight: f
  });
  return [t9(L), n9(L), o9(L)];
});
var i9 = 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 kT = () => ({
  prefixCls: String,
  checked: ct(),
  disabled: ct(),
  isGroup: ct(),
  value: pe.any,
  name: String,
  id: String,
  autofocus: ct(),
  onChange: et(),
  onFocus: et(),
  onBlur: et(),
  onClick: et(),
  "onUpdate:checked": et(),
  "onUpdate:value": et()
}), Mo = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadio",
  inheritAttrs: !1,
  props: kT(),
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      slots: i,
      attrs: r
    } = t;
    const a = Bi(), l = Ai.useInject(), s = J7(), u = Q7(), c = Tr(), d = E(() => {
      var M;
      return (M = g.value) !== null && M !== void 0 ? M : c.value;
    }), f = le(), {
      prefixCls: p,
      direction: v,
      disabled: g
    } = Rt("radio", e), m = E(() => u?.optionType.value === "button" || s === "button" ? `${p.value}-button` : p.value), x = Tr(), [S, C] = OT(p);
    o({
      focus: () => {
        f.value.focus();
      },
      blur: () => {
        f.value.blur();
      }
    });
    const I = (M) => {
      const _ = M.target.checked;
      n("update:checked", _), n("update:value", _), n("change", M), a.onFieldChange();
    }, w = (M) => {
      n("change", M), u && u.onChange && u.onChange(M);
    };
    return () => {
      var M;
      const _ = u, {
        prefixCls: N,
        id: R = a.id.value
      } = e, H = i9(e, ["prefixCls", "id"]), L = O(O({
        prefixCls: m.value,
        id: R
      }, Bn(H, ["onUpdate:checked", "onUpdate:value"])), {
        disabled: (M = g.value) !== null && M !== void 0 ? M : x.value
      });
      _ ? (L.name = _.name.value, L.onChange = w, L.checked = e.value === _.value.value, L.disabled = d.value || _.disabled.value) : L.onChange = I;
      const B = _e({
        [`${m.value}-wrapper`]: !0,
        [`${m.value}-wrapper-checked`]: L.checked,
        [`${m.value}-wrapper-disabled`]: L.disabled,
        [`${m.value}-wrapper-rtl`]: v.value === "rtl",
        [`${m.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, r.class, C.value);
      return S(h("label", Q(Q({}, r), {}, {
        class: B
      }), [h(CT, Q(Q({}, L), {}, {
        type: "radio",
        ref: f
      }), null), i.default && h("span", null, [i.default()])]));
    };
  }
}), r9 = () => ({
  prefixCls: String,
  value: pe.any,
  size: rn(),
  options: Vn(),
  disabled: ct(),
  name: String,
  buttonStyle: rn("outline"),
  id: String,
  optionType: rn("default"),
  onChange: et(),
  "onUpdate:value": et()
}), IT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioGroup",
  inheritAttrs: !1,
  props: r9(),
  // emits: ['update:value', 'change'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const r = Bi(), {
      prefixCls: a,
      direction: l,
      size: s
    } = Rt("radio", e), [u, c] = OT(a), d = le(e.value), f = le(!1);
    return Ie(() => e.value, (v) => {
      d.value = v, f.value = !1;
    }), X7({
      onChange: (v) => {
        const g = d.value, {
          value: m
        } = v.target;
        "value" in e || (d.value = m), !f.value && m !== g && (f.value = !0, o("update:value", m), o("change", v), r.onFieldChange()), Yt(() => {
          f.value = !1;
        });
      },
      value: d,
      disabled: E(() => e.disabled),
      name: E(() => e.name),
      optionType: E(() => e.optionType)
    }), () => {
      var v;
      const {
        options: g,
        buttonStyle: m,
        id: x = r.id.value
      } = e, S = `${a.value}-group`, C = _e(S, `${S}-${m}`, {
        [`${S}-${s.value}`]: s.value,
        [`${S}-rtl`]: l.value === "rtl"
      }, i.class, c.value);
      let P = null;
      return g && g.length > 0 ? P = g.map(($) => {
        if (typeof $ == "string" || typeof $ == "number")
          return h(Mo, {
            key: $,
            prefixCls: a.value,
            disabled: e.disabled,
            value: $,
            checked: d.value === $
          }, {
            default: () => [$]
          });
        const {
          value: I,
          disabled: w,
          label: M
        } = $;
        return h(Mo, {
          key: `radio-group-value-options-${I}`,
          prefixCls: a.value,
          disabled: w || e.disabled,
          value: I,
          checked: d.value === I
        }, {
          default: () => [M]
        });
      }) : P = (v = n.default) === null || v === void 0 ? void 0 : v.call(n), u(h("div", Q(Q({}, i), {}, {
        class: C,
        id: x
      }), [P]));
    };
  }
}), a9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioButton",
  inheritAttrs: !1,
  props: kT(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i
    } = Rt("radio", e);
    return Z7("button"), () => {
      var r;
      return h(Mo, Q(Q(Q({}, o), e), {}, {
        prefixCls: i.value
      }), {
        default: () => [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]
      });
    };
  }
});
Mo.Group = IT;
Mo.Button = a9;
Mo.install = function(e) {
  return e.component(Mo.name, Mo), e.component(Mo.Group.name, Mo.Group), e.component(Mo.Button.name, Mo.Button), e;
};
const MT = (e) => ({
  // Firefox
  "&::-moz-placeholder": {
    opacity: 1
  },
  "&::placeholder": {
    color: e,
    userSelect: "none"
    // https://github.com/ant-design/ant-design/pull/32639
  },
  "&:placeholder-shown": {
    textOverflow: "ellipsis"
  }
}), hc = (e) => ({
  borderColor: e.inputBorderHoverColor,
  borderInlineEndWidth: e.lineWidth
}), Ds = (e) => ({
  borderColor: e.inputBorderHoverColor,
  boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,
  borderInlineEndWidth: e.lineWidth,
  outline: 0
}), TT = (e) => ({
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  borderColor: e.colorBorder,
  boxShadow: "none",
  cursor: "not-allowed",
  opacity: 1,
  "&:hover": O({}, hc(Qt(e, {
    inputBorderHoverColor: e.colorBorder
  })))
}), _T = (e) => {
  const {
    inputPaddingVerticalLG: t,
    fontSizeLG: n,
    lineHeightLG: o,
    borderRadiusLG: i,
    inputPaddingHorizontalLG: r
  } = e;
  return {
    padding: `${t}px ${r}px`,
    fontSize: n,
    lineHeight: o,
    borderRadius: i
  };
}, U0 = (e) => ({
  padding: `${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM - 1}px`,
  borderRadius: e.borderRadiusSM
}), Gh = (e, t) => {
  const {
    componentCls: n,
    colorError: o,
    colorWarning: i,
    colorErrorOutline: r,
    colorWarningOutline: a,
    colorErrorBorderHover: l,
    colorWarningBorderHover: s
  } = e;
  return {
    [`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: o,
      "&:hover": {
        borderColor: l
      },
      "&:focus, &-focused": O({}, Ds(Qt(e, {
        inputBorderActiveColor: o,
        inputBorderHoverColor: o,
        controlOutline: r
      }))),
      [`${n}-prefix`]: {
        color: o
      }
    },
    [`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: i,
      "&:hover": {
        borderColor: s
      },
      "&:focus, &-focused": O({}, Ds(Qt(e, {
        inputBorderActiveColor: i,
        inputBorderHoverColor: i,
        controlOutline: a
      }))),
      [`${n}-prefix`]: {
        color: i
      }
    }
  };
}, gc = (e) => O(O({
  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}`
}, MT(e.colorTextPlaceholder)), {
  "&:hover": O({}, hc(e)),
  "&:focus, &-focused": O({}, Ds(e)),
  "&-disabled, &[disabled]": O({}, TT(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": O({}, _T(e)),
  "&-sm": O({}, U0(e)),
  // RTL
  "&-rtl": {
    direction: "rtl"
  },
  "&-textarea-rtl": {
    direction: "rtl"
  }
}), ET = (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`]: O({}, _T(e)),
    [`&-sm ${t}, &-sm > ${t}-group-addon`]: O({}, U0(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`]: O(O({
      display: "block"
    }, ja()), {
      [`${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`
      }
    }
  };
}, l9 = (e) => {
  const {
    componentCls: t,
    controlHeightSM: n,
    lineWidth: o
  } = e, r = (n - o * 2 - 16) / 2;
  return {
    [t]: O(O(O(O({}, fn(e)), gc(e)), Gh(e, t)), {
      '&[type="color"]': {
        height: e.controlHeight,
        [`&${t}-lg`]: {
          height: e.controlHeightLG
        },
        [`&${t}-sm`]: {
          height: n,
          paddingTop: r,
          paddingBottom: r
        }
      }
    })
  };
}, s9 = (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
      }
    }
  };
}, u9 = (e) => {
  const {
    componentCls: t,
    inputAffixPadding: n,
    colorTextDescription: o,
    motionDurationSlow: i,
    colorIcon: r,
    colorIconHover: a,
    iconCls: l
  } = e;
  return {
    [`${t}-affix-wrapper`]: O(O(O(O(O({}, gc(e)), {
      display: "inline-flex",
      [`&:not(${t}-affix-wrapper-disabled):hover`]: O(O({}, hc(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
        }
      }
    }), s9(e)), {
      // password
      [`${l}${t}-password-icon`]: {
        color: r,
        cursor: "pointer",
        transition: `all ${i}`,
        "&:hover": {
          color: a
        }
      }
    }), Gh(e, `${t}-affix-wrapper`))
  };
}, c9 = (e) => {
  const {
    componentCls: t,
    colorError: n,
    colorSuccess: o,
    borderRadiusLG: i,
    borderRadiusSM: r
  } = e;
  return {
    [`${t}-group`]: O(O(O({}, fn(e)), ET(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: r
          }
        },
        // Status
        "&-status-error": {
          [`${t}-group-addon`]: {
            color: n,
            borderColor: n
          }
        },
        "&-status-warning": {
          [`${t}-group-addon:last-child`]: {
            color: o,
            borderColor: o
          }
        }
      }
    })
  };
}, d9 = (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 Uh(e) {
  return Qt(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 f9 = (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"
        }
      }
    }
  };
}, X0 = On("Input", (e) => {
  const t = Uh(e);
  return [
    l9(t),
    f9(t),
    u9(t),
    c9(t),
    d9(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(t)
  ];
}), dv = (e, t, n, o) => {
  const {
    lineHeight: i
  } = e, r = Math.floor(n * i) + 2, a = Math.max((t - r) / 2, 0), l = Math.max(t - r - a, 0);
  return {
    padding: `${a}px ${o}px ${l}px`
  };
}, p9 = (e) => {
  const {
    componentCls: t,
    pickerCellCls: n,
    pickerCellInnerCls: o,
    pickerPanelCellHeight: i,
    motionDurationSlow: r,
    borderRadiusSM: a,
    motionDurationMid: l,
    controlItemBgHover: s,
    lineWidth: u,
    lineType: c,
    colorPrimary: d,
    controlItemBgActive: f,
    colorTextLightSolid: p,
    controlHeightSM: v,
    pickerDateHoverRangeBorderColor: g,
    pickerCellBorderGap: m,
    pickerBasicCellHoverWithRangeColor: x,
    pickerPanelCellWidth: S,
    colorTextDisabled: C,
    colorBgContainerDisabled: P
  } = e;
  return {
    "&::before": {
      position: "absolute",
      top: "50%",
      insetInlineStart: 0,
      insetInlineEnd: 0,
      zIndex: 1,
      height: i,
      transform: "translateY(-50%)",
      transition: `all ${r}`,
      content: '""'
    },
    // >>> Default
    [o]: {
      position: "relative",
      zIndex: 2,
      display: "inline-block",
      minWidth: i,
      height: i,
      lineHeight: `${i}px`,
      borderRadius: a,
      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: a,
        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: p,
      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: v,
        borderTop: `${u}px dashed ${g}`,
        borderBottom: `${u}px dashed ${g}`,
        transform: "translateY(-50%)",
        transition: `all ${r}`,
        content: '""'
      }
    },
    // Add space for stash
    "&-range-hover-start::after,\n      &-range-hover-end::after,\n      &-range-hover::after": {
      insetInlineEnd: 0,
      insetInlineStart: m
    },
    // 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: x
    },
    // range start border-radius
    [`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${o}`]: {
      borderStartStartRadius: a,
      borderEndStartRadius: a,
      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: a,
      borderEndEndRadius: a
    },
    [`&-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: (S - i) / 2,
      borderInlineStart: `${u}px dashed ${g}`,
      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: (S - i) / 2,
      borderInlineEnd: `${u}px dashed ${g}`,
      borderStartEndRadius: u,
      borderEndEndRadius: u
    },
    // >>> Disabled
    "&-disabled": {
      color: C,
      pointerEvents: "none",
      [o]: {
        background: "transparent"
      },
      "&::before": {
        background: P
      }
    },
    [`&-disabled${n}-today ${o}::before`]: {
      borderColor: C
    }
  };
}, h9 = (e) => {
  const {
    componentCls: t,
    pickerCellInnerCls: n,
    pickerYearMonthCellWidth: o,
    pickerControlIconSize: i,
    pickerPanelCellWidth: r,
    paddingSM: a,
    paddingXS: l,
    paddingXXS: s,
    colorBgContainer: u,
    lineWidth: c,
    lineType: d,
    borderRadiusLG: f,
    colorPrimary: p,
    colorTextHeading: v,
    colorSplit: g,
    pickerControlIconBorderWidth: m,
    colorIcon: x,
    pickerTextHeight: S,
    motionDurationMid: C,
    colorIconHover: P,
    fontWeightStrong: $,
    pickerPanelCellHeight: I,
    pickerCellPaddingVertical: w,
    colorTextDisabled: M,
    colorText: _,
    fontSize: N,
    pickerBasicCellHoverWithRangeColor: R,
    motionDurationSlow: H,
    pickerPanelWithoutTimeCellHeight: L,
    pickerQuarterPanelContentHeight: B,
    colorLink: A,
    colorLinkActive: G,
    colorLinkHover: j,
    pickerDateHoverRangeBorderColor: Z,
    borderRadiusSM: W,
    colorTextLightSolid: K,
    borderRadius: q,
    controlItemBgHover: U,
    pickerTimePanelColumnHeight: ae,
    pickerTimePanelColumnWidth: se,
    pickerTimePanelCellHeight: re,
    controlItemBgActive: ie,
    marginXXS: te
  } = e, ve = r * 7 + a * 2 + 4, ce = (ve - l * 2) / 3 - o - a;
  return {
    [t]: {
      "&-panel": {
        display: "inline-flex",
        flexDirection: "column",
        textAlign: "center",
        background: u,
        border: `${c}px ${d} ${g}`,
        borderRadius: f,
        outline: "none",
        "&-focused": {
          borderColor: p
        },
        "&-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: ve
      },
      // ======================= Header =======================
      "&-header": {
        display: "flex",
        padding: `0 ${l}px`,
        color: v,
        borderBottom: `${c}px ${d} ${g}`,
        "> *": {
          flex: "none"
        },
        button: {
          padding: 0,
          color: x,
          lineHeight: `${S}px`,
          background: "transparent",
          border: 0,
          cursor: "pointer",
          transition: `color ${C}`
        },
        "> button": {
          minWidth: "1.6em",
          fontSize: N,
          "&:hover": {
            color: P
          }
        },
        "&-view": {
          flex: "auto",
          fontWeight: $,
          lineHeight: `${S}px`,
          button: {
            color: "inherit",
            fontWeight: "inherit",
            verticalAlign: "top",
            "&:not(:first-child)": {
              marginInlineStart: l
            },
            "&:hover": {
              color: p
            }
          }
        }
      },
      // 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: m,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: m,
          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: m,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: m,
          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: I,
          fontWeight: "normal"
        },
        th: {
          height: I + w * 2,
          color: _,
          verticalAlign: "middle"
        }
      },
      "&-cell": O({
        padding: `${w}px 0`,
        color: M,
        cursor: "pointer",
        // In view
        "&-in-view": {
          color: _
        }
      }, p9(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: R,
          transition: `all ${H}`,
          content: '""'
        }
      },
      [`&-date-panel
        ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start
        ${n}::after`]: {
        insetInlineEnd: -(r - I) / 2,
        insetInlineStart: 0
      },
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]: {
        insetInlineEnd: 0,
        insetInlineStart: -(r - I) / 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: L * 4
        },
        [n]: {
          padding: `0 ${l}px`
        }
      },
      "&-quarter-panel": {
        [`${t}-content`]: {
          height: B
        }
      },
      // ======================== Footer ========================
      [`&-panel ${t}-footer`]: {
        borderTop: `${c}px ${d} ${g}`
      },
      "&-footer": {
        width: "min-content",
        minWidth: "100%",
        lineHeight: `${S - 2 * c}px`,
        textAlign: "center",
        "&-extra": {
          padding: `0 ${a}`,
          lineHeight: `${S - 2 * c}px`,
          textAlign: "start",
          "&:not(:last-child)": {
            borderBottom: `${c}px ${d} ${g}`
          }
        }
      },
      "&-now": {
        textAlign: "start"
      },
      "&-today-btn": {
        color: A,
        "&:hover": {
          color: j
        },
        "&:active": {
          color: G
        },
        [`&${t}-today-btn-disabled`]: {
          color: M,
          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: ce,
          borderInlineStart: `${c}px dashed ${Z}`,
          borderStartStartRadius: W,
          borderBottomStartRadius: W,
          borderStartEndRadius: 0,
          borderBottomEndRadius: 0,
          [`${t}-panel-rtl &`]: {
            insetInlineEnd: ce,
            borderInlineEnd: `${c}px dashed ${Z}`,
            borderStartStartRadius: 0,
            borderBottomStartRadius: 0,
            borderStartEndRadius: W,
            borderBottomEndRadius: W
          }
        },
        [`${t}-cell-range-hover-end::after`]: {
          insetInlineEnd: ce,
          borderInlineEnd: `${c}px dashed ${Z}`,
          borderStartStartRadius: 0,
          borderEndStartRadius: 0,
          borderStartEndRadius: q,
          borderEndEndRadius: q,
          [`${t}-panel-rtl &`]: {
            insetInlineStart: ce,
            borderInlineStart: `${c}px dashed ${Z}`,
            borderStartStartRadius: q,
            borderEndStartRadius: q,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0
          }
        }
      },
      // ====================== Week Panel ======================
      "&-week-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${a}px`
        },
        // Clear cell style
        [`${t}-cell`]: {
          [`&:hover ${n},
            &-selected ${n},
            ${n}`]: {
            background: "transparent !important"
          }
        },
        "&-row": {
          td: {
            transition: `background ${C}`,
            "&:first-child": {
              borderStartStartRadius: W,
              borderEndStartRadius: W
            },
            "&:last-child": {
              borderStartEndRadius: W,
              borderEndEndRadius: W
            }
          },
          "&:hover td": {
            background: U
          },
          "&-selected td,\n            &-selected:hover td": {
            background: p,
            [`&${t}-cell-week`]: {
              color: new In(K).setAlpha(0.5).toHexString()
            },
            [`&${t}-cell-today ${n}::before`]: {
              borderColor: K
            },
            [n]: {
              color: K
            }
          }
        }
      },
      // ====================== Date Panel ======================
      "&-date-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${a}px`
        },
        [`${t}-content`]: {
          width: r * 7,
          th: {
            width: r
          }
        }
      },
      // ==================== Datetime Panel ====================
      "&-datetime-panel": {
        display: "flex",
        [`${t}-time-panel`]: {
          borderInlineStart: `${c}px ${d} ${g}`
        },
        [`${t}-date-panel,
          ${t}-time-panel`]: {
          transition: `opacity ${H}`
        },
        // 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: ae
        },
        "&-column": {
          flex: "1 0 auto",
          width: se,
          margin: `${s}px 0`,
          padding: 0,
          overflowY: "hidden",
          textAlign: "start",
          listStyle: "none",
          transition: `background ${C}`,
          overflowX: "hidden",
          "&::after": {
            display: "block",
            height: ae - re,
            content: '""'
          },
          "&:not(:first-child)": {
            borderInlineStart: `${c}px ${d} ${g}`
          },
          "&-active": {
            background: new In(ie).setAlpha(0.2).toHexString()
          },
          "&:hover": {
            overflowY: "auto"
          },
          "> li": {
            margin: 0,
            padding: 0,
            [`&${t}-time-panel-cell`]: {
              marginInline: te,
              [`${t}-time-panel-cell-inner`]: {
                display: "block",
                width: se - 2 * te,
                height: re,
                margin: 0,
                paddingBlock: 0,
                paddingInlineEnd: 0,
                paddingInlineStart: (se - re) / 2,
                color: _,
                lineHeight: `${re}px`,
                borderRadius: W,
                cursor: "pointer",
                transition: `background ${C}`,
                "&:hover": {
                  background: U
                }
              },
              "&-selected": {
                [`${t}-time-panel-cell-inner`]: {
                  background: ie
                }
              },
              "&-disabled": {
                [`${t}-time-panel-cell-inner`]: {
                  color: M,
                  background: "transparent",
                  cursor: "not-allowed"
                }
              }
            }
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/39227
      [`&-datetime-panel ${t}-time-panel-column:after`]: {
        height: ae - re + s * 2
      }
    }
  };
}, g9 = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorError: o,
    colorErrorOutline: i,
    colorWarning: r,
    colorWarningOutline: a
  } = e;
  return {
    [t]: {
      [`&-status-error${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: o
        },
        "&-focused, &:focus": O({}, Ds(Qt(e, {
          inputBorderActiveColor: o,
          inputBorderHoverColor: o,
          controlOutline: i
        }))),
        [`${t}-active-bar`]: {
          background: o
        }
      },
      [`&-status-warning${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: r
        },
        "&-focused, &:focus": O({}, Ds(Qt(e, {
          inputBorderActiveColor: r,
          inputBorderHoverColor: r,
          controlOutline: a
        }))),
        [`${t}-active-bar`]: {
          background: r
        }
      }
    }
  };
}, v9 = (e) => {
  const {
    componentCls: t,
    antCls: n,
    boxShadowPopoverArrow: o,
    controlHeight: i,
    fontSize: r,
    inputPaddingHorizontal: a,
    colorBgContainer: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    borderRadius: d,
    motionDurationMid: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: v,
    colorTextPlaceholder: g,
    controlHeightLG: m,
    fontSizeLG: x,
    controlHeightSM: S,
    inputPaddingHorizontalSM: C,
    paddingXS: P,
    marginXS: $,
    colorTextDescription: I,
    lineWidthBold: w,
    lineHeight: M,
    colorPrimary: _,
    motionDurationSlow: N,
    zIndexPopup: R,
    paddingXXS: H,
    paddingSM: L,
    pickerTextHeight: B,
    controlItemBgActive: A,
    colorPrimaryBorder: G,
    sizePopupArrow: j,
    borderRadiusXS: Z,
    borderRadiusOuter: W,
    colorBgElevated: K,
    borderRadiusLG: q,
    boxShadowSecondary: U,
    borderRadiusSM: ae,
    colorSplit: se,
    controlItemBgHover: re,
    presetsWidth: ie,
    presetsMaxWidth: te
  } = e;
  return [
    {
      [t]: O(O(O({}, fn(e)), dv(e, i, r, a)), {
        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": O({}, hc(e)),
        "&-focused": O({}, Ds(e)),
        [`&${t}-disabled`]: {
          background: p,
          borderColor: c,
          cursor: "not-allowed",
          [`${t}-suffix`]: {
            color: v
          }
        },
        [`&${t}-borderless`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ======================== Input =========================
        [`${t}-input`]: {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          width: "100%",
          "> input": O(O({}, gc(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: g
            }
          }
        },
        // Size
        "&-large": O(O({}, dv(e, m, x, a)), {
          [`${t}-input > input`]: {
            fontSize: x
          }
        }),
        "&-small": O({}, dv(e, S, r, C)),
        [`${t}-suffix`]: {
          display: "flex",
          flex: "none",
          alignSelf: "center",
          marginInlineStart: P / 2,
          color: v,
          lineHeight: 1,
          pointerEvents: "none",
          "> *": {
            verticalAlign: "top",
            "&:not(:last-child)": {
              marginInlineEnd: $
            }
          }
        },
        [`${t}-clear`]: {
          position: "absolute",
          top: "50%",
          insetInlineEnd: 0,
          color: v,
          lineHeight: 1,
          background: l,
          transform: "translateY(-50%)",
          cursor: "pointer",
          opacity: 0,
          transition: `opacity ${f}, color ${f}`,
          "> *": {
            verticalAlign: "top"
          },
          "&:hover": {
            color: I
          }
        },
        [`${t}-separator`]: {
          position: "relative",
          display: "inline-block",
          width: "1em",
          height: x,
          color: v,
          fontSize: x,
          verticalAlign: "top",
          cursor: "default",
          [`${t}-focused &`]: {
            color: I
          },
          [`${t}-range-separator &`]: {
            [`${t}-disabled &`]: {
              cursor: "not-allowed"
            }
          }
        },
        // ======================== Range =========================
        "&-range": {
          position: "relative",
          display: "inline-flex",
          // Clear
          [`${t}-clear`]: {
            insetInlineEnd: a
          },
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          // Active bar
          [`${t}-active-bar`]: {
            bottom: -s,
            height: w,
            marginInlineStart: a,
            background: _,
            opacity: 0,
            transition: `all ${N} ease-out`,
            pointerEvents: "none"
          },
          [`&${t}-focused`]: {
            [`${t}-active-bar`]: {
              opacity: 1
            }
          },
          [`${t}-range-separator`]: {
            alignItems: "center",
            padding: `0 ${P}px`,
            lineHeight: 1
          },
          [`&${t}-small`]: {
            [`${t}-clear`]: {
              insetInlineEnd: C
            },
            [`${t}-active-bar`]: {
              marginInlineStart: C
            }
          }
        },
        // ======================= Dropdown =======================
        "&-dropdown": O(O(O({}, fn(e)), h9(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: R,
          [`&${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: Lh
          },
          [`&${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: Bh
          },
          [`&${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: Hh
          },
          [`&${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: Fh
          },
          // Time picker with additional style
          [`${t}-panel > ${t}-time-panel`]: {
            paddingTop: H
          },
          // ======================== Ranges ========================
          [`${t}-ranges`]: {
            marginBottom: 0,
            padding: `${H}px ${L}px`,
            overflow: "hidden",
            lineHeight: `${B - 2 * s - P / 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: _,
              background: A,
              borderColor: G,
              cursor: "pointer"
            },
            [`${t}-ok`]: {
              marginInlineStart: "auto"
            }
          },
          [`${t}-range-wrapper`]: {
            display: "flex",
            position: "relative"
          },
          [`${t}-range-arrow`]: O({
            position: "absolute",
            zIndex: 1,
            display: "none",
            marginInlineStart: a * 1.5,
            transition: `left ${N} ease-out`
          }, Ky(j, Z, W, K, o)),
          [`${t}-panel-container`]: {
            overflow: "hidden",
            verticalAlign: "top",
            background: K,
            borderRadius: q,
            boxShadow: U,
            transition: `margin ${N}`,
            // ======================== Layout ========================
            [`${t}-panel-layout`]: {
              display: "flex",
              flexWrap: "nowrap",
              alignItems: "stretch"
            },
            // ======================== Preset ========================
            [`${t}-presets`]: {
              display: "flex",
              flexDirection: "column",
              minWidth: ie,
              maxWidth: te,
              ul: {
                height: 0,
                flex: "auto",
                listStyle: "none",
                overflow: "auto",
                margin: 0,
                padding: P,
                borderInlineEnd: `${s}px ${u} ${se}`,
                li: O(O({}, Va), {
                  borderRadius: ae,
                  paddingInline: P,
                  paddingBlock: (S - Math.round(r * M)) / 2,
                  cursor: "pointer",
                  transition: `all ${N}`,
                  "+ li": {
                    marginTop: $
                  },
                  "&:hover": {
                    background: re
                  }
                })
              }
            },
            // ======================== 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
    oa(e, "slide-up"),
    oa(e, "slide-down"),
    Qu(e, "move-up"),
    Qu(e, "move-down")
  ];
}, m9 = (e) => {
  const {
    componentCls: n,
    controlHeightLG: o,
    controlHeightSM: i,
    colorPrimary: r,
    paddingXXS: a
  } = e;
  return {
    pickerCellCls: `${n}-cell`,
    pickerCellInnerCls: `${n}-cell-inner`,
    pickerTextHeight: o,
    pickerPanelCellWidth: i * 1.5,
    pickerPanelCellHeight: i,
    pickerDateHoverRangeBorderColor: new In(r).lighten(20).toHexString(),
    pickerBasicCellHoverWithRangeColor: new In(r).lighten(35).toHexString(),
    pickerPanelWithoutTimeCellHeight: o * 1.65,
    pickerYearMonthCellWidth: o * 1.5,
    pickerTimePanelColumnHeight: 224,
    pickerTimePanelColumnWidth: o * 1.4,
    pickerTimePanelCellHeight: 28,
    pickerQuarterPanelContentHeight: o * 1.4,
    pickerCellPaddingVertical: a,
    pickerCellBorderGap: 2,
    pickerControlIconSize: 7,
    pickerControlIconBorderWidth: 1.5
  };
}, DT = On("DatePicker", (e) => {
  const t = Qt(Uh(e), m9(e));
  return [
    v9(t),
    g9(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(e, {
      focusElCls: `${e.componentCls}-focused`
    })
  ];
}, (e) => ({
  presetsWidth: 120,
  presetsMaxWidth: 200,
  zIndexPopup: e.zIndexPopupBase + 50
}));
function b9(e) {
  const t = $e(), n = $e(!1);
  function o() {
    for (var i = arguments.length, r = new Array(i), a = 0; a < i; a++)
      r[a] = arguments[a];
    n.value || (Vt.cancel(t.value), t.value = Vt(() => {
      e(...r);
    }));
  }
  return qt(() => {
    n.value = !0, Vt.cancel(t.value);
  }), o;
}
function y9(e) {
  const t = $e([]), n = $e(typeof e == "function" ? e() : e), o = b9(() => {
    let r = n.value;
    t.value.forEach((a) => {
      r = a(r);
    }), t.value = [], n.value = r;
  });
  function i(r) {
    t.value.push(r), o();
  }
  return [n, i];
}
const x9 = be({
  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 r(s) {
      var u;
      !((u = e.tab) === null || u === void 0) && u.disabled || e.onClick(s);
    }
    n({
      domRef: i
    });
    function a(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 = E(() => {
      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: p,
          disabled: v,
          closeIcon: g
        },
        renderWrapper: m,
        removeAriaLabel: x,
        editable: S,
        onFocus: C
      } = e, P = `${u}-tab`, $ = h("div", {
        key: f,
        ref: i,
        class: _e(P, {
          [`${P}-with-remove`]: l.value,
          [`${P}-active`]: d,
          [`${P}-disabled`]: v
        }),
        style: o.style,
        onClick: r
      }, [h("div", {
        role: "tab",
        "aria-selected": d,
        id: c && `${c}-tab-${f}`,
        class: `${P}-btn`,
        "aria-controls": c && `${c}-panel-${f}`,
        "aria-disabled": v,
        tabindex: v ? null : 0,
        onClick: (I) => {
          I.stopPropagation(), r(I);
        },
        onKeydown: (I) => {
          [rt.SPACE, rt.ENTER].includes(I.which) && (I.preventDefault(), r(I));
        },
        onFocus: C
      }, [typeof p == "function" ? p() : p]), l.value && h("button", {
        type: "button",
        "aria-label": x || "remove",
        tabindex: 0,
        class: `${P}-remove`,
        onClick: (I) => {
          I.stopPropagation(), a(I);
        }
      }, [g?.() || ((s = S.removeIcon) === null || s === void 0 ? void 0 : s.call(S)) || "×"])]);
      return m ? m($) : $;
    };
  }
}), US = {
  width: 0,
  height: 0,
  left: 0,
  top: 0
};
function w9(e, t) {
  const n = le(/* @__PURE__ */ new Map());
  return It(() => {
    var o, i;
    const r = /* @__PURE__ */ new Map(), a = e.value, l = t.value.get((o = a[0]) === null || o === void 0 ? void 0 : o.key) || US, s = l.left + l.width;
    for (let u = 0; u < a.length; u += 1) {
      const {
        key: c
      } = a[u];
      let d = t.value.get(c);
      d || (d = t.value.get((i = a[u - 1]) === null || i === void 0 ? void 0 : i.key) || US);
      const f = r.get(c) || O({}, d);
      f.right = s - f.left - f.width, r.set(c, f);
    }
    n.value = new Map(r);
  }), n;
}
const AT = be({
  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: r,
        editable: a,
        locale: l
      } = e;
      return !a || a.showAdd === !1 ? null : h("button", {
        ref: i,
        type: "button",
        class: `${r}-nav-add`,
        style: o.style,
        "aria-label": l?.addAriaLabel || "Add tab",
        onClick: (s) => {
          a.onEdit("add", {
            event: s
          });
        }
      }, [a.addIcon ? a.addIcon() : "+"]);
    };
  }
}), S9 = {
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  tabs: {
    type: Object
  },
  rtl: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  activeKey: {
    type: [String, Number]
  },
  mobile: {
    type: Boolean
  },
  moreIcon: pe.any,
  moreTransitionName: {
    type: String
  },
  editable: {
    type: Object
  },
  locale: {
    type: Object,
    default: void 0
  },
  removeAriaLabel: String,
  onTabClick: {
    type: Function
  },
  popupClassName: String,
  getPopupContainer: et()
}, C9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "OperationNode",
  inheritAttrs: !1,
  props: S9,
  emits: ["tabClick"],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const [i, r] = Cn(!1), [a, l] = Cn(null), s = (p) => {
      const v = e.tabs.filter((x) => !x.disabled);
      let g = v.findIndex((x) => x.key === a.value) || 0;
      const m = v.length;
      for (let x = 0; x < m; x += 1) {
        g = (g + p + m) % m;
        const S = v[g];
        if (!S.disabled) {
          l(S.key);
          return;
        }
      }
    }, u = (p) => {
      const {
        which: v
      } = p;
      if (!i.value) {
        [rt.DOWN, rt.SPACE, rt.ENTER].includes(v) && (r(!0), p.preventDefault());
        return;
      }
      switch (v) {
        case rt.UP:
          s(-1), p.preventDefault();
          break;
        case rt.DOWN:
          s(1), p.preventDefault();
          break;
        case rt.ESC:
          r(!1);
          break;
        case rt.SPACE:
        case rt.ENTER:
          a.value !== null && e.onTabClick(a.value, p);
          break;
      }
    }, c = E(() => `${e.id}-more-popup`), d = E(() => a.value !== null ? `${c.value}-${a.value}` : null), f = (p, v) => {
      p.preventDefault(), p.stopPropagation(), e.editable.onEdit("remove", {
        key: v,
        event: p
      });
    };
    return At(() => {
      Ie(a, () => {
        const p = document.getElementById(d.value);
        p && p.scrollIntoView && p.scrollIntoView(!1);
      }, {
        flush: "post",
        immediate: !0
      });
    }), Ie(i, () => {
      i.value || l(null);
    }), WM({}), () => {
      var p;
      const {
        prefixCls: v,
        id: g,
        tabs: m,
        locale: x,
        mobile: S,
        moreIcon: C = ((p = o.moreIcon) === null || p === void 0 ? void 0 : p.call(o)) || h(Ld, null, null),
        moreTransitionName: P,
        editable: $,
        tabBarGutter: I,
        rtl: w,
        onTabClick: M,
        popupClassName: _
      } = e;
      if (!m.length) return null;
      const N = `${v}-dropdown`, R = x?.dropdownAriaLabel, H = {
        [w ? "marginRight" : "marginLeft"]: I
      };
      m.length || (H.visibility = "hidden", H.order = 1);
      const L = _e({
        [`${N}-rtl`]: w,
        [`${_}`]: !0
      }), B = S ? null : h(AM, {
        prefixCls: N,
        trigger: ["hover"],
        visible: i.value,
        transitionName: P,
        onVisibleChange: r,
        overlayClassName: L,
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        getPopupContainer: e.getPopupContainer
      }, {
        overlay: () => h(co, {
          onClick: (A) => {
            let {
              key: G,
              domEvent: j
            } = A;
            M(G, j), r(!1);
          },
          id: c.value,
          tabindex: -1,
          role: "listbox",
          "aria-activedescendant": d.value,
          selectedKeys: [a.value],
          "aria-label": R !== void 0 ? R : "expanded dropdown"
        }, {
          default: () => [m.map((A) => {
            var G, j;
            const Z = $ && A.closable !== !1 && !A.disabled;
            return h(Zu, {
              key: A.key,
              id: `${c.value}-${A.key}`,
              role: "option",
              "aria-controls": g && `${g}-panel-${A.key}`,
              disabled: A.disabled
            }, {
              default: () => [h("span", null, [typeof A.tab == "function" ? A.tab() : A.tab]), Z && h("button", {
                type: "button",
                "aria-label": e.removeAriaLabel || "remove",
                tabindex: 0,
                class: `${N}-menu-item-remove`,
                onClick: (W) => {
                  W.stopPropagation(), f(W, A.key);
                }
              }, [((G = A.closeIcon) === null || G === void 0 ? void 0 : G.call(A)) || ((j = $.removeIcon) === null || j === void 0 ? void 0 : j.call($)) || "×"])]
            });
          })]
        }),
        default: () => h("button", {
          type: "button",
          class: `${v}-nav-more`,
          style: H,
          tabindex: -1,
          "aria-hidden": "true",
          "aria-haspopup": "listbox",
          "aria-controls": c.value,
          id: `${g}-more`,
          "aria-expanded": i.value,
          onKeydown: u
        }, [C])
      });
      return h("div", {
        class: _e(`${v}-nav-operations`, n.class),
        style: n.style
      }, [B, h(AT, {
        prefixCls: v,
        locale: x,
        editable: $
      }, null)]);
    };
  }
}), RT = Symbol("tabsContextKey"), NT = (e) => {
  Ft(RT, e);
}, zT = () => zt(RT, {
  tabs: le([]),
  prefixCls: le()
});
be({
  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 NT(ys(e)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
const $9 = 0.1, XS = 0.01, ap = 20, QS = Math.pow(0.995, ap);
function P9(e, t) {
  const [n, o] = Cn(), [i, r] = Cn(0), [a, l] = Cn(0), [s, u] = Cn(), c = le();
  function d($) {
    const {
      screenX: I,
      screenY: w
    } = $.touches[0];
    o({
      x: I,
      y: w
    }), clearInterval(c.value);
  }
  function f($) {
    if (!n.value) return;
    $.preventDefault();
    const {
      screenX: I,
      screenY: w
    } = $.touches[0], M = I - n.value.x, _ = w - n.value.y;
    t(M, _), o({
      x: I,
      y: w
    });
    const N = Date.now();
    l(N - i.value), r(N), u({
      x: M,
      y: _
    });
  }
  function p() {
    if (!n.value) return;
    const $ = s.value;
    if (o(null), u(null), $) {
      const I = $.x / a.value, w = $.y / a.value, M = Math.abs(I), _ = Math.abs(w);
      if (Math.max(M, _) < $9) return;
      let N = I, R = w;
      c.value = setInterval(() => {
        if (Math.abs(N) < XS && Math.abs(R) < XS) {
          clearInterval(c.value);
          return;
        }
        N *= QS, R *= QS, t(N * ap, R * ap);
      }, ap);
    }
  }
  const v = le();
  function g($) {
    const {
      deltaX: I,
      deltaY: w
    } = $;
    let M = 0;
    const _ = Math.abs(I), N = Math.abs(w);
    _ === N ? M = v.value === "x" ? I : w : _ > N ? (M = I, v.value = "x") : (M = w, v.value = "y"), t(-M, -M) && $.preventDefault();
  }
  const m = le({
    onTouchStart: d,
    onTouchMove: f,
    onTouchEnd: p,
    onWheel: g
  });
  function x($) {
    m.value.onTouchStart($);
  }
  function S($) {
    m.value.onTouchMove($);
  }
  function C($) {
    m.value.onTouchEnd($);
  }
  function P($) {
    m.value.onWheel($);
  }
  At(() => {
    var $, I;
    document.addEventListener("touchmove", S, {
      passive: !1
    }), document.addEventListener("touchend", C, {
      passive: !1
    }), ($ = e.value) === null || $ === void 0 || $.addEventListener("touchstart", x, {
      passive: !1
    }), (I = e.value) === null || I === void 0 || I.addEventListener("wheel", P, {
      passive: !1
    });
  }), qt(() => {
    document.removeEventListener("touchmove", S), document.removeEventListener("touchend", C);
  });
}
function ZS(e, t) {
  const n = le(e);
  function o(i) {
    const r = typeof i == "function" ? i(n.value) : i;
    r !== n.value && t(r, n.value), n.value = r;
  }
  return [n, o];
}
const O9 = () => {
  const e = le(/* @__PURE__ */ new Map()), t = (n) => (o) => {
    e.value.set(n, o);
  };
  return Qb(() => {
    e.value = /* @__PURE__ */ new Map();
  }), [t, e];
}, JS = {
  width: 0,
  height: 0,
  left: 0,
  top: 0,
  right: 0
}, k9 = () => ({
  id: {
    type: String
  },
  tabPosition: {
    type: String
  },
  activeKey: {
    type: [String, Number]
  },
  rtl: {
    type: Boolean
  },
  animated: _t(),
  editable: _t(),
  moreIcon: pe.any,
  moreTransitionName: {
    type: String
  },
  mobile: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  renderTabBar: {
    type: Function
  },
  locale: _t(),
  popupClassName: String,
  getPopupContainer: et(),
  onTabClick: {
    type: Function
  },
  onTabScroll: {
    type: Function
  }
}), I9 = (e, t) => {
  const {
    offsetWidth: n,
    offsetHeight: o,
    offsetTop: i,
    offsetLeft: r
  } = e, {
    width: a,
    height: l,
    x: s,
    y: u
  } = e.getBoundingClientRect();
  return Math.abs(a - n) < 1 ? [a, l, s - t.x, u - t.y] : [n, o, r, i];
}, eC = be({
  compatConfig: {
    MODE: 3
  },
  name: "TabNavList",
  inheritAttrs: !1,
  props: k9(),
  slots: Object,
  emits: ["tabClick", "tabScroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      tabs: i,
      prefixCls: r
    } = zT(), a = $e(), l = $e(), s = $e(), u = $e(), [c, d] = O9(), f = E(() => e.tabPosition === "top" || e.tabPosition === "bottom"), [p, v] = ZS(0, (De, Be) => {
      f.value && e.onTabScroll && e.onTabScroll({
        direction: De > Be ? "left" : "right"
      });
    }), [g, m] = ZS(0, (De, Be) => {
      !f.value && e.onTabScroll && e.onTabScroll({
        direction: De > Be ? "top" : "bottom"
      });
    }), [x, S] = Cn(0), [C, P] = Cn(0), [$, I] = Cn(null), [w, M] = Cn(null), [_, N] = Cn(0), [R, H] = Cn(0), [L, B] = y9(/* @__PURE__ */ new Map()), A = w9(i, L), G = E(() => `${r.value}-nav-operations-hidden`), j = $e(0), Z = $e(0);
    It(() => {
      f.value ? e.rtl ? (j.value = 0, Z.value = Math.max(0, x.value - $.value)) : (j.value = Math.min(0, $.value - x.value), Z.value = 0) : (j.value = Math.min(0, w.value - C.value), Z.value = 0);
    });
    const W = (De) => De < j.value ? j.value : De > Z.value ? Z.value : De, K = $e(), [q, U] = Cn(), ae = () => {
      U(Date.now());
    }, se = () => {
      clearTimeout(K.value);
    }, re = (De, Be) => {
      De((Ve) => W(Ve + Be));
    };
    P9(a, (De, Be) => {
      if (f.value) {
        if ($.value >= x.value)
          return !1;
        re(v, De);
      } else {
        if (w.value >= C.value)
          return !1;
        re(m, Be);
      }
      return se(), ae(), !0;
    }), Ie(q, () => {
      se(), q.value && (K.value = setTimeout(() => {
        U(0);
      }, 100));
    });
    const ie = function() {
      let De = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activeKey;
      const Be = A.value.get(De) || {
        width: 0,
        height: 0,
        left: 0,
        right: 0,
        top: 0
      };
      if (f.value) {
        let Ve = p.value;
        e.rtl ? Be.right < p.value ? Ve = Be.right : Be.right + Be.width > p.value + $.value && (Ve = Be.right + Be.width - $.value) : Be.left < -p.value ? Ve = -Be.left : Be.left + Be.width > -p.value + $.value && (Ve = -(Be.left + Be.width - $.value)), m(0), v(W(Ve));
      } else {
        let Ve = g.value;
        Be.top < -g.value ? Ve = -Be.top : Be.top + Be.height > -g.value + w.value && (Ve = -(Be.top + Be.height - w.value)), v(0), m(W(Ve));
      }
    }, te = $e(0), ve = $e(0);
    It(() => {
      let De, Be, Ve, ot, je, Pe;
      const Ge = A.value;
      ["top", "bottom"].includes(e.tabPosition) ? (De = "width", ot = $.value, je = x.value, Pe = _.value, Be = e.rtl ? "right" : "left", Ve = Math.abs(p.value)) : (De = "height", ot = w.value, je = x.value, Pe = R.value, Be = "top", Ve = -g.value);
      let Se = ot;
      je + Pe > ot && je < ot && (Se = ot - Pe);
      const Ce = i.value;
      if (!Ce.length)
        return [te.value, ve.value] = [0, 0];
      const Ae = Ce.length;
      let qe = Ae;
      for (let tt = 0; tt < Ae; tt += 1) {
        const Ee = Ge.get(Ce[tt].key) || JS;
        if (Ee[Be] + Ee[De] > Ve + Se) {
          qe = tt - 1;
          break;
        }
      }
      let We = 0;
      for (let tt = Ae - 1; tt >= 0; tt -= 1)
        if ((Ge.get(Ce[tt].key) || JS)[Be] < Ve) {
          We = tt + 1;
          break;
        }
      return [te.value, ve.value] = [We, qe];
    });
    const ce = () => {
      B(() => {
        var De;
        const Be = /* @__PURE__ */ new Map(), Ve = (De = l.value) === null || De === void 0 ? void 0 : De.getBoundingClientRect();
        return i.value.forEach((ot) => {
          let {
            key: je
          } = ot;
          const Pe = d.value.get(je), Ge = Pe?.$el || Pe;
          if (Ge) {
            const [Se, Ce, Ae, qe] = I9(Ge, Ve);
            Be.set(je, {
              width: Se,
              height: Ce,
              left: Ae,
              top: qe
            });
          }
        }), Be;
      });
    };
    Ie(() => i.value.map((De) => De.key).join("%%"), () => {
      ce();
    }, {
      flush: "post"
    });
    const fe = () => {
      var De, Be, Ve, ot, je;
      const Pe = ((De = a.value) === null || De === void 0 ? void 0 : De.offsetWidth) || 0, Ge = ((Be = a.value) === null || Be === void 0 ? void 0 : Be.offsetHeight) || 0, Se = ((Ve = u.value) === null || Ve === void 0 ? void 0 : Ve.$el) || {}, Ce = Se.offsetWidth || 0, Ae = Se.offsetHeight || 0;
      I(Pe), M(Ge), N(Ce), H(Ae);
      const qe = (((ot = l.value) === null || ot === void 0 ? void 0 : ot.offsetWidth) || 0) - Ce, We = (((je = l.value) === null || je === void 0 ? void 0 : je.offsetHeight) || 0) - Ae;
      S(qe), P(We), ce();
    }, ge = E(() => [...i.value.slice(0, te.value), ...i.value.slice(ve.value + 1)]), [Me, ze] = Cn(), Ke = E(() => A.value.get(e.activeKey)), He = $e(), Re = () => {
      Vt.cancel(He.value);
    };
    Ie([Ke, f, () => e.rtl], () => {
      const De = {};
      Ke.value && (f.value ? (e.rtl ? De.right = cs(Ke.value.right) : De.left = cs(Ke.value.left), De.width = cs(Ke.value.width)) : (De.top = cs(Ke.value.top), De.height = cs(Ke.value.height))), Re(), He.value = Vt(() => {
        ze(De);
      });
    }), Ie([() => e.activeKey, Ke, A, f], () => {
      ie();
    }, {
      flush: "post"
    }), Ie([() => e.rtl, () => e.tabBarGutter, () => e.activeKey, () => i.value], () => {
      fe();
    }, {
      flush: "post"
    });
    const Xe = (De) => {
      let {
        position: Be,
        prefixCls: Ve,
        extra: ot
      } = De;
      if (!ot) return null;
      const je = ot?.({
        position: Be
      });
      return je ? h("div", {
        class: `${Ve}-extra-content`
      }, [je]) : null;
    };
    return qt(() => {
      se(), Re();
    }), () => {
      const {
        id: De,
        animated: Be,
        activeKey: Ve,
        rtl: ot,
        editable: je,
        locale: Pe,
        tabPosition: Ge,
        tabBarGutter: Se,
        onTabClick: Ce
      } = e, {
        class: Ae,
        style: qe
      } = n, We = r.value, tt = !!ge.value.length, Ee = `${We}-nav-wrap`;
      let Ne, Fe, it, pt;
      f.value ? ot ? (Fe = p.value > 0, Ne = p.value + $.value < x.value) : (Ne = p.value < 0, Fe = -p.value + $.value < x.value) : (it = g.value < 0, pt = -g.value + w.value < C.value);
      const at = {};
      Ge === "top" || Ge === "bottom" ? at[ot ? "marginRight" : "marginLeft"] = typeof Se == "number" ? `${Se}px` : Se : at.marginTop = typeof Se == "number" ? `${Se}px` : Se;
      const ft = i.value.map((wt, Ct) => {
        const {
          key: St
        } = wt;
        return h(x9, {
          id: De,
          prefixCls: We,
          key: St,
          tab: wt,
          style: Ct === 0 ? void 0 : at,
          closable: wt.closable,
          editable: je,
          active: St === Ve,
          removeAriaLabel: Pe?.removeAriaLabel,
          ref: c(St),
          onClick: (bt) => {
            Ce(St, bt);
          },
          onFocus: () => {
            ie(St), ae(), a.value && (ot || (a.value.scrollLeft = 0), a.value.scrollTop = 0);
          }
        }, o);
      });
      return h("div", {
        role: "tablist",
        class: _e(`${We}-nav`, Ae),
        style: qe,
        onKeydown: () => {
          ae();
        }
      }, [h(Xe, {
        position: "left",
        prefixCls: We,
        extra: o.leftExtra
      }, null), h(Al, {
        onResize: fe
      }, {
        default: () => [h("div", {
          class: _e(Ee, {
            [`${Ee}-ping-left`]: Ne,
            [`${Ee}-ping-right`]: Fe,
            [`${Ee}-ping-top`]: it,
            [`${Ee}-ping-bottom`]: pt
          }),
          ref: a
        }, [h(Al, {
          onResize: fe
        }, {
          default: () => [h("div", {
            ref: l,
            class: `${We}-nav-list`,
            style: {
              transform: `translate(${p.value}px, ${g.value}px)`,
              transition: q.value ? "none" : void 0
            }
          }, [ft, h(AT, {
            ref: u,
            prefixCls: We,
            locale: Pe,
            editable: je,
            style: O(O({}, ft.length === 0 ? void 0 : at), {
              visibility: tt ? "hidden" : null
            })
          }, null), h("div", {
            class: _e(`${We}-ink-bar`, {
              [`${We}-ink-bar-animated`]: Be.inkBar
            }),
            style: Me.value
          }, null)])]
        })])]
      }), h(C9, Q(Q({}, e), {}, {
        removeAriaLabel: Pe?.removeAriaLabel,
        ref: s,
        prefixCls: We,
        tabs: ge.value,
        class: !tt && G.value
      }), BP(o, ["moreIcon"])), h(Xe, {
        position: "right",
        prefixCls: We,
        extra: o.rightExtra
      }, null), h(Xe, {
        position: "right",
        prefixCls: We,
        extra: o.tabBarExtraContent
      }, null)]);
    };
  }
}), M9 = be({
  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
    } = zT();
    return () => {
      const {
        id: o,
        activeKey: i,
        animated: r,
        tabPosition: a,
        rtl: l,
        destroyInactiveTabPane: s
      } = e, u = r.tabPane, c = n.value, d = t.value.findIndex((f) => f.key === i);
      return h("div", {
        class: `${c}-content-holder`
      }, [h("div", {
        class: [`${c}-content`, `${c}-content-${a}`, {
          [`${c}-content-animated`]: u
        }],
        style: d && u ? {
          [l ? "marginRight" : "marginLeft"]: `-${d}00%`
        } : null
      }, [t.value.map((f) => Un(f.node, {
        key: f.key,
        prefixCls: c,
        tabKey: f.key,
        id: o,
        animated: u,
        active: f.key === i,
        destroyInactiveTabPane: s
      }))])]);
    };
  }
});
var T9 = { 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 tC(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) {
      _9(e, i, n[i]);
    });
  }
  return e;
}
function _9(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Q0 = function(t, n) {
  var o = tC({}, t, n.attrs);
  return h(an, tC({}, o, {
    icon: T9
  }), null);
};
Q0.displayName = "PlusOutlined";
Q0.inheritAttrs = !1;
const E9 = (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
    [oa(e, "slide-up"), oa(e, "slide-down")]
  ];
}, D9 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeadBackground: o,
    tabsCardGutter: i,
    colorSplit: r
  } = e;
  return {
    [`${t}-card`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-tab`]: {
          margin: 0,
          padding: n,
          background: o,
          border: `${e.lineWidth}px ${e.lineType} ${r}`,
          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
            }
          }
        }
      }
    }
  };
}, A9 = (e) => {
  const {
    componentCls: t,
    tabsHoverColor: n,
    dropdownEdgeChildVerticalPadding: o
  } = e;
  return {
    [`${t}-dropdown`]: O(O({}, fn(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": O(O({}, Va), {
          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"
            }
          }
        })
      }
    })
  };
}, R9 = (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
          }
        }
      }
    }
  };
}, N9 = (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`
          }
        }
      }
    }
  };
}, z9 = (e) => {
  const {
    componentCls: t,
    tabsActiveColor: n,
    tabsHoverColor: o,
    iconCls: i,
    tabsHorizontalGutter: r
  } = e, a = `${t}-tab`;
  return {
    [a]: {
      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": O({
        "&:focus:not(:focus-visible), &:active": {
          color: n
        }
      }, Rl(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
      },
      [`&${a}-active ${a}-btn`]: {
        color: e.colorPrimary,
        textShadow: e.tabsActiveTextShadow
      },
      [`&${a}-disabled`]: {
        color: e.colorTextDisabled,
        cursor: "not-allowed"
      },
      [`&${a}-disabled ${a}-btn, &${a}-disabled ${t}-remove`]: {
        "&:focus, &:active": {
          color: e.colorTextDisabled
        }
      },
      [`& ${a}-remove ${i}`]: {
        margin: 0
      },
      [i]: {
        marginRight: {
          _skip_check_: !0,
          value: e.marginSM
        }
      }
    },
    [`${a} + ${a}`]: {
      margin: {
        _skip_check_: !0,
        value: `0 0 0 ${r}px`
      }
    }
  };
}, B9 = (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"
        }
      }
    }
  };
}, F9 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeight: o,
    tabsCardGutter: i,
    tabsHoverColor: r,
    tabsActiveColor: a,
    colorSplit: l
  } = e;
  return {
    [t]: O(O(O(O({}, fn(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`]: O({
          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: r
          },
          "&:active, &:focus:not(:focus-visible)": {
            color: a
          }
        }, Rl(e))
      },
      [`${t}-extra-content`]: {
        flex: "none"
      },
      // ============================ InkBar ============================
      [`${t}-ink-bar`]: {
        position: "absolute",
        background: e.colorPrimary,
        pointerEvents: "none"
      }
    }), z9(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"
          }
        }
      }
    }
  };
}, L9 = On("Tabs", (e) => {
  const t = e.controlHeightLG, n = Qt(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 [N9(n), B9(n), R9(n), A9(n), D9(n), F9(n), E9(n)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
let nC = 0;
const BT = () => ({
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  popupClassName: String,
  getPopupContainer: et(),
  activeKey: {
    type: [String, Number]
  },
  defaultActiveKey: {
    type: [String, Number]
  },
  direction: rn(),
  animated: en([Boolean, Object]),
  renderTabBar: et(),
  tabBarGutter: {
    type: Number
  },
  tabBarStyle: _t(),
  tabPosition: rn(),
  destroyInactiveTabPane: ct(),
  hideAdd: Boolean,
  type: rn(),
  size: rn(),
  centered: Boolean,
  onEdit: et(),
  onChange: et(),
  onTabClick: et(),
  onTabScroll: et(),
  "onUpdate:activeKey": et(),
  // Accessibility
  locale: _t(),
  onPrevClick: et(),
  onNextClick: et(),
  tabBarExtraContent: pe.any
});
function H9(e) {
  return e.map((t) => {
    if (Ao(t)) {
      const n = O({}, t.props || {});
      for (const [f, p] of Object.entries(n))
        delete n[f], n[_d(f)] = p;
      const o = t.children || {}, i = t.key !== void 0 ? t.key : void 0, {
        tab: r = o.tab,
        disabled: a,
        forceRender: l,
        closable: s,
        animated: u,
        active: c,
        destroyInactiveTabPane: d
      } = n;
      return O(O({
        key: i
      }, n), {
        node: t,
        closeIcon: o.closeIcon,
        tab: r,
        disabled: a === "" || a,
        forceRender: l === "" || l,
        closable: s === "" || s,
        animated: u === "" || u,
        active: c === "" || c,
        destroyInactiveTabPane: d === "" || d
      });
    }
    return null;
  }).filter((t) => t);
}
const V9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "InternalTabs",
  inheritAttrs: !1,
  props: O(O({}, _n(BT(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  })), {
    tabs: Vn()
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    dn(e.onPrevClick === void 0 && e.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), dn(e.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), dn(o.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
    const {
      prefixCls: i,
      direction: r,
      size: a,
      rootPrefixCls: l,
      getPopupContainer: s
    } = Rt("tabs", e), [u, c] = L9(i), d = E(() => r.value === "rtl"), f = E(() => {
      const {
        animated: w,
        tabPosition: M
      } = e;
      return w === !1 || ["left", "right"].includes(M) ? {
        inkBar: !1,
        tabPane: !1
      } : w === !0 ? {
        inkBar: !0,
        tabPane: !0
      } : O({
        inkBar: !0,
        tabPane: !1
      }, typeof w == "object" ? w : {});
    }), [p, v] = Cn(!1);
    At(() => {
      v(u0());
    });
    const [g, m] = li(() => {
      var w;
      return (w = e.tabs[0]) === null || w === void 0 ? void 0 : w.key;
    }, {
      value: E(() => e.activeKey),
      defaultValue: e.defaultActiveKey
    }), [x, S] = Cn(() => e.tabs.findIndex((w) => w.key === g.value));
    It(() => {
      var w;
      let M = e.tabs.findIndex((_) => _.key === g.value);
      M === -1 && (M = Math.max(0, Math.min(x.value, e.tabs.length - 1)), m((w = e.tabs[M]) === null || w === void 0 ? void 0 : w.key)), S(M);
    });
    const [C, P] = li(null, {
      value: E(() => e.id)
    }), $ = E(() => p.value && !["left", "right"].includes(e.tabPosition) ? "top" : e.tabPosition);
    At(() => {
      e.id || (P(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : nC}`), nC += 1);
    });
    const I = (w, M) => {
      var _, N;
      (_ = e.onTabClick) === null || _ === void 0 || _.call(e, w, M);
      const R = w !== g.value;
      m(w), R && ((N = e.onChange) === null || N === void 0 || N.call(e, w));
    };
    return NT({
      tabs: E(() => e.tabs),
      prefixCls: i
    }), () => {
      const {
        id: w,
        type: M,
        tabBarGutter: _,
        tabBarStyle: N,
        locale: R,
        destroyInactiveTabPane: H,
        renderTabBar: L = o.renderTabBar,
        onTabScroll: B,
        hideAdd: A,
        centered: G
      } = e, j = {
        id: C.value,
        activeKey: g.value,
        animated: f.value,
        tabPosition: $.value,
        rtl: d.value,
        mobile: p.value
      };
      let Z;
      M === "editable-card" && (Z = {
        onEdit: (U, ae) => {
          let {
            key: se,
            event: re
          } = ae;
          var ie;
          (ie = e.onEdit) === null || ie === void 0 || ie.call(e, U === "add" ? re : se, U);
        },
        removeIcon: () => h(la, null, null),
        addIcon: o.addIcon ? o.addIcon : () => h(Q0, null, null),
        showAdd: A !== !0
      });
      let W;
      const K = O(O({}, j), {
        moreTransitionName: `${l.value}-slide-up`,
        editable: Z,
        locale: R,
        tabBarGutter: _,
        onTabClick: I,
        onTabScroll: B,
        style: N,
        getPopupContainer: s.value,
        popupClassName: _e(e.popupClassName, c.value)
      });
      L ? W = L(O(O({}, K), {
        DefaultTabBar: eC
      })) : W = h(eC, K, BP(o, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
      const q = i.value;
      return u(h("div", Q(Q({}, n), {}, {
        id: w,
        class: _e(q, `${q}-${$.value}`, {
          [c.value]: !0,
          [`${q}-${a.value}`]: a.value,
          [`${q}-card`]: ["card", "editable-card"].includes(M),
          [`${q}-editable-card`]: M === "editable-card",
          [`${q}-centered`]: G,
          [`${q}-mobile`]: p.value,
          [`${q}-editable`]: M === "editable-card",
          [`${q}-rtl`]: d.value
        }, n.class)
      }), [W, h(M9, Q(Q({
        destroyInactiveTabPane: H
      }, j), {}, {
        animated: f.value
      }), null)]));
    };
  }
}), Eu = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATabs",
  inheritAttrs: !1,
  props: _n(BT(), {
    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 r = (a) => {
      i("update:activeKey", a), i("change", a);
    };
    return () => {
      var a;
      const l = H9(go((a = o.default) === null || a === void 0 ? void 0 : a.call(o)));
      return h(V9, Q(Q(Q({}, Bn(e, ["onUpdate:activeKey"])), n), {}, {
        onChange: r,
        tabs: l
      }), o);
    };
  }
}), j9 = () => ({
  tab: pe.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,
}), lb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATabPane",
  inheritAttrs: !1,
  __ANT_TAB_PANE: !0,
  props: j9(),
  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 r = E(() => e.active ? {} : e.animated ? {
      visibility: "hidden",
      height: 0,
      overflowY: "hidden"
    } : {
      display: "none"
    });
    return () => {
      var a;
      const {
        prefixCls: l,
        forceRender: s,
        id: u,
        active: c,
        tabKey: d
      } = e;
      return h("div", {
        id: u && `${u}-panel-${d}`,
        role: "tabpanel",
        tabindex: c ? 0 : -1,
        "aria-labelledby": u && `${u}-tab-${d}`,
        "aria-hidden": !c,
        style: [r.value, n.style],
        class: [`${l}-tabpane`, c && `${l}-tabpane-active`, n.class]
      }, [(c || i.value || s) && ((a = o.default) === null || a === void 0 ? void 0 : a.call(o))]);
    };
  }
});
Eu.TabPane = lb;
Eu.install = function(e) {
  return e.component(Eu.name, Eu), e.component(lb.name, lb), e;
};
const W9 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    cardHeadHeight: o,
    cardPaddingBase: i,
    cardHeadTabsMarginBottom: r
  } = e;
  return O(O({
    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`
  }, ja()), {
    "&-wrapper": {
      width: "100%",
      display: "flex",
      alignItems: "center"
    },
    "&-title": O(O({
      display: "inline-block",
      flex: 1
    }, Va), {
      [`
          > ${n}-typography,
          > ${n}-typography-edit-content
        `]: {
        insetInlineStart: 0,
        marginTop: 0,
        marginBottom: 0
      }
    }),
    [`${t}-tabs-top`]: {
      clear: "both",
      marginBottom: r,
      color: e.colorText,
      fontWeight: "normal",
      fontSize: e.fontSize,
      "&-bar": {
        borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`
      }
    }
  });
}, K9 = (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
    }
  };
}, q9 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    cardActionsLiMargin: o,
    cardActionsIconSize: i,
    colorBorderSecondary: r
  } = e;
  return O(O({
    margin: 0,
    padding: 0,
    listStyle: "none",
    background: e.colorBgContainer,
    borderTop: `${e.lineWidth}px ${e.lineType} ${r}`,
    display: "flex",
    borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `
  }, ja()), {
    "& > 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} ${r}`
      }
    }
  });
}, Y9 = (e) => O(O({
  margin: `-${e.marginXXS}px 0`,
  display: "flex"
}, ja()), {
  "&-avatar": {
    paddingInlineEnd: e.padding
  },
  "&-detail": {
    overflow: "hidden",
    flex: 1,
    "> div:not(:last-child)": {
      marginBottom: e.marginXS
    }
  },
  "&-title": O({
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG
  }, Va),
  "&-description": {
    color: e.colorTextDescription
  }
}), G9 = (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`
    }
  };
}, U9 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    overflow: "hidden",
    [`${t}-body`]: {
      userSelect: "none"
    }
  };
}, X9 = (e) => {
  const {
    componentCls: t,
    cardShadow: n,
    cardHeadPadding: o,
    colorBorderSecondary: i,
    boxShadow: r,
    cardPaddingBase: a
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      background: e.colorBgContainer,
      borderRadius: e.borderRadiusLG,
      [`&:not(${t}-bordered)`]: {
        boxShadow: r
      },
      [`${t}-head`]: W9(e),
      [`${t}-extra`]: {
        // https://stackoverflow.com/a/22429853/3040605
        marginInlineStart: "auto",
        color: "",
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`${t}-body`]: O({
        padding: a,
        borderRadius: ` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
      }, ja()),
      [`${t}-grid`]: K9(e),
      [`${t}-cover`]: {
        "> *": {
          display: "block",
          width: "100%"
        },
        img: {
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
        }
      },
      [`${t}-actions`]: q9(e),
      [`${t}-meta`]: Y9(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`]: G9(e),
    [`${t}-loading`]: U9(e),
    [`${t}-rtl`]: {
      direction: "rtl"
    }
  };
}, Q9 = (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"
        }
      }
    }
  };
}, Z9 = On("Card", (e) => {
  const t = Qt(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
    X9(t),
    // Size
    Q9(t)
  ];
}), J9 = () => ({
  prefixCls: String,
  width: {
    type: [Number, String]
  }
}), Z0 = be({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonTitle",
  props: J9(),
  setup(e) {
    return () => {
      const {
        prefixCls: t,
        width: n
      } = e, o = typeof n == "number" ? `${n}px` : n;
      return h("h3", {
        class: t,
        style: {
          width: o
        }
      }, null);
    };
  }
}), eK = () => ({
  prefixCls: String,
  width: {
    type: [Number, String, Array]
  },
  rows: Number
}), tK = be({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonParagraph",
  props: eK(),
  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((r, a) => {
        const l = t(a);
        return h("li", {
          key: a,
          style: {
            width: typeof l == "number" ? `${l}px` : l
          }
        }, null);
      });
      return h("ul", {
        class: n
      }, [i]);
    };
  }
}), Xh = () => ({
  prefixCls: String,
  size: [String, Number],
  shape: String,
  active: {
    type: Boolean,
    default: void 0
  }
}), jd = (e) => {
  const {
    prefixCls: t,
    size: n,
    shape: o
  } = e, i = _e({
    [`${t}-lg`]: n === "large",
    [`${t}-sm`]: n === "small"
  }), r = _e({
    [`${t}-circle`]: o === "circle",
    [`${t}-square`]: o === "square",
    [`${t}-round`]: o === "round"
  }), a = typeof n == "number" ? {
    width: `${n}px`,
    height: `${n}px`,
    lineHeight: `${n}px`
  } : {};
  return h("span", {
    class: _e(t, i, r),
    style: a
  }, null);
};
jd.displayName = "SkeletonElement";
const nK = new tn("ant-skeleton-loading", {
  "0%": {
    transform: "translateX(-37.5%)"
  },
  "100%": {
    transform: "translateX(37.5%)"
  }
}), Qh = (e) => ({
  height: e,
  lineHeight: `${e}px`
}), Du = (e) => O({
  width: e
}, Qh(e)), oK = (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: nK,
    animationDuration: e.skeletonLoadingMotionDuration,
    animationTimingFunction: "ease",
    animationIterationCount: "infinite",
    content: '""'
  }
}), fv = (e) => O({
  width: e * 5,
  minWidth: e * 5
}, Qh(e)), iK = (e) => {
  const {
    skeletonAvatarCls: t,
    color: n,
    controlHeight: o,
    controlHeightLG: i,
    controlHeightSM: r
  } = e;
  return {
    [`${t}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: n
    }, Du(o)),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    },
    [`${t}${t}-lg`]: O({}, Du(i)),
    [`${t}${t}-sm`]: O({}, Du(r))
  };
}, rK = (e) => {
  const {
    controlHeight: t,
    borderRadiusSM: n,
    skeletonInputCls: o,
    controlHeightLG: i,
    controlHeightSM: r,
    color: a
  } = e;
  return {
    [`${o}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: n
    }, fv(t)),
    [`${o}-lg`]: O({}, fv(i)),
    [`${o}-sm`]: O({}, fv(r))
  };
}, oC = (e) => O({
  width: e
}, Qh(e)), aK = (e) => {
  const {
    skeletonImageCls: t,
    imageSizeBase: n,
    color: o,
    borderRadiusSM: i
  } = e;
  return {
    [`${t}`]: O(O({
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      verticalAlign: "top",
      background: o,
      borderRadius: i
    }, oC(n * 2)), {
      [`${t}-path`]: {
        fill: "#bfbfbf"
      },
      [`${t}-svg`]: O(O({}, oC(n)), {
        maxWidth: n * 4,
        maxHeight: n * 4
      }),
      [`${t}-svg${t}-svg-circle`]: {
        borderRadius: "50%"
      }
    }),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    }
  };
}, pv = (e, t, n) => {
  const {
    skeletonButtonCls: o
  } = e;
  return {
    [`${n}${o}-circle`]: {
      width: t,
      minWidth: t,
      borderRadius: "50%"
    },
    [`${n}${o}-round`]: {
      borderRadius: t
    }
  };
}, hv = (e) => O({
  width: e * 2,
  minWidth: e * 2
}, Qh(e)), lK = (e) => {
  const {
    borderRadiusSM: t,
    skeletonButtonCls: n,
    controlHeight: o,
    controlHeightLG: i,
    controlHeightSM: r,
    color: a
  } = e;
  return O(O(O(O(O({
    [`${n}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: t,
      width: o * 2,
      minWidth: o * 2
    }, hv(o))
  }, pv(e, o, n)), {
    [`${n}-lg`]: O({}, hv(i))
  }), pv(e, i, `${n}-lg`)), {
    [`${n}-sm`]: O({}, hv(r))
  }), pv(e, r, `${n}-sm`));
}, sK = (e) => {
  const {
    componentCls: t,
    skeletonAvatarCls: n,
    skeletonTitleCls: o,
    skeletonParagraphCls: i,
    skeletonButtonCls: r,
    skeletonInputCls: a,
    skeletonImageCls: l,
    controlHeight: s,
    controlHeightLG: u,
    controlHeightSM: c,
    color: d,
    padding: f,
    marginSM: p,
    borderRadius: v,
    skeletonTitleHeight: g,
    skeletonBlockRadius: m,
    skeletonParagraphLineHeight: x,
    controlHeightXS: S,
    skeletonParagraphMarginTop: C
  } = e;
  return {
    [`${t}`]: {
      display: "table",
      width: "100%",
      [`${t}-header`]: {
        display: "table-cell",
        paddingInlineEnd: f,
        verticalAlign: "top",
        // Avatar
        [`${n}`]: O({
          display: "inline-block",
          verticalAlign: "top",
          background: d
        }, Du(s)),
        [`${n}-circle`]: {
          borderRadius: "50%"
        },
        [`${n}-lg`]: O({}, Du(u)),
        [`${n}-sm`]: O({}, Du(c))
      },
      [`${t}-content`]: {
        display: "table-cell",
        width: "100%",
        verticalAlign: "top",
        // Title
        [`${o}`]: {
          width: "100%",
          height: g,
          background: d,
          borderRadius: m,
          [`+ ${i}`]: {
            marginBlockStart: c
          }
        },
        // paragraph
        [`${i}`]: {
          padding: 0,
          "> li": {
            width: "100%",
            height: x,
            listStyle: "none",
            background: d,
            borderRadius: m,
            "+ li": {
              marginBlockStart: S
            }
          }
        },
        [`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
          width: "61%"
        }
      },
      [`&-round ${t}-content`]: {
        [`${o}, ${i} > li`]: {
          borderRadius: v
        }
      }
    },
    [`${t}-with-avatar ${t}-content`]: {
      // Title
      [`${o}`]: {
        marginBlockStart: p,
        [`+ ${i}`]: {
          marginBlockStart: C
        }
      }
    },
    // Skeleton element
    [`${t}${t}-element`]: O(O(O(O({
      display: "inline-block",
      width: "auto"
    }, lK(e)), iK(e)), rK(e)), aK(e)),
    // Skeleton Block Button, Input
    [`${t}${t}-block`]: {
      width: "100%",
      [`${r}`]: {
        width: "100%"
      },
      [`${a}`]: {
        width: "100%"
      }
    },
    // With active animation
    [`${t}${t}-active`]: {
      [`
        ${o},
        ${i} > li,
        ${n},
        ${r},
        ${a},
        ${l}
      `]: O({}, oK(e))
    }
  };
}, Wd = On("Skeleton", (e) => {
  const {
    componentCls: t
  } = e, n = Qt(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 [sK(n)];
}, (e) => {
  const {
    colorFillContent: t,
    colorFill: n
  } = e;
  return {
    color: t,
    colorGradientEnd: n
  };
}), uK = () => ({
  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 gv(e) {
  return e && typeof e == "object" ? e : {};
}
function cK(e, t) {
  return e && !t ? {
    size: "large",
    shape: "square"
  } : {
    size: "large",
    shape: "circle"
  };
}
function dK(e, t) {
  return !e && t ? {
    width: "38%"
  } : e && t ? {
    width: "50%"
  } : {};
}
function fK(e, t) {
  const n = {};
  return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
}
const mi = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeleton",
  props: _n(uK(), {
    avatar: !1,
    title: !0,
    paragraph: !0
  }),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: i
    } = Rt("skeleton", e), [r, a] = Wd(o);
    return () => {
      var l;
      const {
        loading: s,
        avatar: u,
        title: c,
        paragraph: d,
        active: f,
        round: p
      } = e, v = o.value;
      if (s || e.loading === void 0) {
        const g = !!u || u === "", m = !!c || c === "", x = !!d || d === "";
        let S;
        if (g) {
          const $ = O(O({
            prefixCls: `${v}-avatar`
          }, cK(m, x)), gv(u));
          S = h("div", {
            class: `${v}-header`
          }, [h(jd, $, null)]);
        }
        let C;
        if (m || x) {
          let $;
          if (m) {
            const w = O(O({
              prefixCls: `${v}-title`
            }, dK(g, x)), gv(c));
            $ = h(Z0, w, null);
          }
          let I;
          if (x) {
            const w = O(O({
              prefixCls: `${v}-paragraph`
            }, fK(g, m)), gv(d));
            I = h(tK, w, null);
          }
          C = h("div", {
            class: `${v}-content`
          }, [$, I]);
        }
        const P = _e(v, {
          [`${v}-with-avatar`]: g,
          [`${v}-active`]: f,
          [`${v}-rtl`]: i.value === "rtl",
          [`${v}-round`]: p,
          [a.value]: !0
        });
        return r(h("div", {
          class: P
        }, [S, C]));
      }
      return (l = n.default) === null || l === void 0 ? void 0 : l.call(n);
    };
  }
}), pK = () => O(O({}, Xh()), {
  size: String,
  block: Boolean
}), FT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonButton",
  props: _n(pK(), {
    size: "default"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = Rt("skeleton", e), [n, o] = Wd(t), i = E(() => _e(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(h("div", {
      class: i.value
    }, [h(jd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-button`
    }), null)]));
  }
}), LT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonInput",
  props: O(O({}, Bn(Xh(), ["shape"])), {
    size: String,
    block: Boolean
  }),
  setup(e) {
    const {
      prefixCls: t
    } = Rt("skeleton", e), [n, o] = Wd(t), i = E(() => _e(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(h("div", {
      class: i.value
    }, [h(jd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-input`
    }), null)]));
  }
}), hK = "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", HT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonImage",
  props: Bn(Xh(), ["size", "shape", "active"]),
  setup(e) {
    const {
      prefixCls: t
    } = Rt("skeleton", e), [n, o] = Wd(t), i = E(() => _e(t.value, `${t.value}-element`, o.value));
    return () => n(h("div", {
      class: i.value
    }, [h("div", {
      class: `${t.value}-image`
    }, [h("svg", {
      viewBox: "0 0 1098 1024",
      xmlns: "http://www.w3.org/2000/svg",
      class: `${t.value}-image-svg`
    }, [h("path", {
      d: hK,
      class: `${t.value}-image-path`
    }, null)])])]));
  }
}), gK = () => O(O({}, Xh()), {
  shape: String
}), VT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonAvatar",
  props: _n(gK(), {
    size: "default",
    shape: "circle"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = Rt("skeleton", e), [n, o] = Wd(t), i = E(() => _e(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active
    }, o.value));
    return () => n(h("div", {
      class: i.value
    }, [h(jd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-avatar`
    }), null)]));
  }
});
mi.Button = FT;
mi.Avatar = VT;
mi.Input = LT;
mi.Image = HT;
mi.Title = Z0;
mi.install = function(e) {
  return e.component(mi.name, mi), e.component(mi.Button.name, FT), e.component(mi.Avatar.name, VT), e.component(mi.Input.name, LT), e.component(mi.Image.name, HT), e.component(mi.Title.name, Z0), e;
};
const {
  TabPane: vK
} = Eu, mK = () => ({
  prefixCls: String,
  title: pe.any,
  extra: pe.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: pe.any,
  tabList: {
    type: Array
  },
  tabBarExtraContent: pe.any,
  activeTabKey: String,
  defaultActiveTabKey: String,
  cover: pe.any,
  onTabChange: {
    type: Function
  }
}), Au = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACard",
  inheritAttrs: !1,
  props: mK(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r,
      size: a
    } = Rt("card", e), [l, s] = Z9(i), u = (f) => f.map((v, g) => ci(v) && !$h(v) || !ci(v) ? h("li", {
      style: {
        width: `${100 / f.length}%`
      },
      key: `action-${g}`
    }, [h("span", null, [v])]) : null), c = (f) => {
      var p;
      (p = e.onTabChange) === null || p === void 0 || p.call(e, f);
    }, d = function() {
      let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], p;
      return f.forEach((v) => {
        v && NP(v.type) && v.type.__ANT_CARD_GRID && (p = !0);
      }), p;
    };
    return () => {
      var f, p, v, g, m, x;
      const {
        headStyle: S = {},
        bodyStyle: C = {},
        loading: P,
        bordered: $ = !0,
        type: I,
        tabList: w,
        hoverable: M,
        activeTabKey: _,
        defaultActiveTabKey: N,
        tabBarExtraContent: R = Mc((f = n.tabBarExtraContent) === null || f === void 0 ? void 0 : f.call(n)),
        title: H = Mc((p = n.title) === null || p === void 0 ? void 0 : p.call(n)),
        extra: L = Mc((v = n.extra) === null || v === void 0 ? void 0 : v.call(n)),
        actions: B = Mc((g = n.actions) === null || g === void 0 ? void 0 : g.call(n)),
        cover: A = Mc((m = n.cover) === null || m === void 0 ? void 0 : m.call(n))
      } = e, G = go((x = n.default) === null || x === void 0 ? void 0 : x.call(n)), j = i.value, Z = {
        [`${j}`]: !0,
        [s.value]: !0,
        [`${j}-loading`]: P,
        [`${j}-bordered`]: $,
        [`${j}-hoverable`]: !!M,
        [`${j}-contain-grid`]: d(G),
        [`${j}-contain-tabs`]: w && w.length,
        [`${j}-${a.value}`]: a.value,
        [`${j}-type-${I}`]: !!I,
        [`${j}-rtl`]: r.value === "rtl"
      }, W = h(mi, {
        loading: !0,
        active: !0,
        paragraph: {
          rows: 4
        },
        title: !1
      }, {
        default: () => [G]
      }), K = _ !== void 0, q = {
        size: "large",
        [K ? "activeKey" : "defaultActiveKey"]: K ? _ : N,
        onChange: c,
        class: `${j}-head-tabs`
      };
      let U;
      const ae = w && w.length ? h(Eu, q, {
        default: () => [w.map((te) => {
          const {
            tab: ve,
            slots: ce
          } = te, fe = ce?.tab;
          dn(!ce, "Card", "tabList slots is deprecated, Please use `customTab` instead.");
          let ge = ve !== void 0 ? ve : n[fe] ? n[fe](te) : null;
          return ge = Dh(n, "customTab", te, () => [ge]), h(vK, {
            tab: ge,
            key: te.key,
            disabled: te.disabled
          }, null);
        })],
        rightExtra: R ? () => R : null
      }) : null;
      (H || L || ae) && (U = h("div", {
        class: `${j}-head`,
        style: S
      }, [h("div", {
        class: `${j}-head-wrapper`
      }, [H && h("div", {
        class: `${j}-head-title`
      }, [H]), L && h("div", {
        class: `${j}-extra`
      }, [L])]), ae]));
      const se = A ? h("div", {
        class: `${j}-cover`
      }, [A]) : null, re = h("div", {
        class: `${j}-body`,
        style: C
      }, [P ? W : G]), ie = B && B.length ? h("ul", {
        class: `${j}-actions`
      }, [u(B)]) : null;
      return l(h("div", Q(Q({
        ref: "cardContainerRef"
      }, o), {}, {
        class: [Z, o.class]
      }), [U, se, G && G.length ? re : null, ie]));
    };
  }
}), bK = () => ({
  prefixCls: String,
  title: Fg(),
  description: Fg(),
  avatar: Fg()
}), sb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACardMeta",
  props: bK(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = Rt("card", e);
    return () => {
      const i = {
        [`${o.value}-meta`]: !0
      }, r = Ji(n, e, "avatar"), a = Ji(n, e, "title"), l = Ji(n, e, "description"), s = r ? h("div", {
        class: `${o.value}-meta-avatar`
      }, [r]) : null, u = a ? h("div", {
        class: `${o.value}-meta-title`
      }, [a]) : null, c = l ? h("div", {
        class: `${o.value}-meta-description`
      }, [l]) : null, d = u || c ? h("div", {
        class: `${o.value}-meta-detail`
      }, [u, c]) : null;
      return h("div", {
        class: i
      }, [s, d]);
    };
  }
}), yK = () => ({
  prefixCls: String,
  hoverable: {
    type: Boolean,
    default: !0
  }
}), ub = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACardGrid",
  __ANT_CARD_GRID: !0,
  props: yK(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = Rt("card", e), i = E(() => ({
      [`${o.value}-grid`]: !0,
      [`${o.value}-grid-hoverable`]: e.hoverable
    }));
    return () => {
      var r;
      return h("div", {
        class: i.value
      }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]);
    };
  }
});
Au.Meta = sb;
Au.Grid = ub;
Au.install = function(e) {
  return e.component(Au.name, Au), e.component(sb.name, sb), e.component(ub.name, ub), e;
};
const xK = () => ({
  prefixCls: String,
  activeKey: en([Array, Number, String]),
  defaultActiveKey: en([Array, Number, String]),
  accordion: ct(),
  destroyInactivePanel: ct(),
  bordered: ct(),
  expandIcon: et(),
  openAnimation: pe.object,
  expandIconPosition: rn(),
  collapsible: rn(),
  ghost: ct(),
  onChange: et(),
  "onUpdate:activeKey": et()
}), jT = () => ({
  openAnimation: pe.object,
  prefixCls: String,
  header: pe.any,
  headerClass: String,
  showArrow: ct(),
  isActive: ct(),
  destroyInactivePanel: ct(),
  /** @deprecated Use `collapsible="disabled"` instead */
  disabled: ct(),
  accordion: ct(),
  forceRender: ct(),
  expandIcon: et(),
  extra: pe.any,
  panelKey: en(),
  collapsible: rn(),
  role: String,
  onItemClick: et()
}), wK = (e) => {
  const {
    componentCls: t,
    collapseContentBg: n,
    padding: o,
    collapseContentPaddingHorizontal: i,
    collapseHeaderBg: r,
    collapseHeaderPadding: a,
    collapsePanelBorderRadius: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    colorText: d,
    colorTextHeading: f,
    colorTextDisabled: p,
    fontSize: v,
    lineHeight: g,
    marginSM: m,
    paddingSM: x,
    motionDurationSlow: S,
    fontSizeIcon: C
  } = e, P = `${s}px ${u} ${c}`;
  return {
    [t]: O(O({}, fn(e)), {
      backgroundColor: r,
      border: P,
      borderBottom: 0,
      borderRadius: `${l}px`,
      "&-rtl": {
        direction: "rtl"
      },
      [`& > ${t}-item`]: {
        borderBottom: P,
        "&:last-child": {
          [`
            &,
            & > ${t}-header`]: {
            borderRadius: `0 0 ${l}px ${l}px`
          }
        },
        [`> ${t}-header`]: {
          position: "relative",
          display: "flex",
          flexWrap: "nowrap",
          alignItems: "flex-start",
          padding: a,
          color: f,
          lineHeight: g,
          cursor: "pointer",
          transition: `all ${S}, visibility 0s`,
          [`> ${t}-header-text`]: {
            flex: "auto"
          },
          "&:focus": {
            outline: "none"
          },
          // >>>>> Arrow
          [`${t}-expand-icon`]: {
            height: v * g,
            display: "flex",
            alignItems: "center",
            paddingInlineEnd: m
          },
          [`${t}-arrow`]: O(O({}, cc()), {
            fontSize: C,
            svg: {
              transition: `transform ${S}`
            }
          }),
          // >>>>> 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: x
          }
        }
      },
      [`${t}-content`]: {
        color: d,
        backgroundColor: n,
        borderTop: P,
        [`& > ${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: p,
          cursor: "not-allowed"
        }
      },
      // ========================== Icon Position ==========================
      [`&${t}-icon-position-end`]: {
        [`& > ${t}-item`]: {
          [`> ${t}-header`]: {
            [`${t}-expand-icon`]: {
              order: 1,
              paddingInlineEnd: 0,
              paddingInlineStart: m
            }
          }
        }
      }
    })
  };
}, SK = (e) => {
  const {
    componentCls: t
  } = e, n = `> ${t}-item > ${t}-header ${t}-arrow svg`;
  return {
    [`${t}-rtl`]: {
      [n]: {
        transform: "rotate(180deg)"
      }
    }
  };
}, CK = (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
      }
    }
  };
}, $K = (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
          }
        }
      }
    }
  };
}, PK = On("Collapse", (e) => {
  const t = Qt(e, {
    collapseContentBg: e.colorBgContainer,
    collapseHeaderBg: e.colorFillAlter,
    collapseHeaderPadding: `${e.paddingSM}px ${e.padding}px`,
    collapsePanelBorderRadius: e.borderRadiusLG,
    collapseContentPaddingHorizontal: 16
    // Fixed value
  });
  return [wK(t), CK(t), $K(t), SK(t), Vh(t)];
});
function iC(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 Ml = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapse",
  inheritAttrs: !1,
  props: _n(xK(), {
    accordion: !1,
    destroyInactivePanel: !1,
    bordered: !0,
    expandIconPosition: "start"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i
    } = t;
    const r = le(iC(Fp([e.activeKey, e.defaultActiveKey])));
    Ie(() => e.activeKey, () => {
      r.value = iC(e.activeKey);
    }, {
      deep: !0
    });
    const {
      prefixCls: a,
      direction: l,
      rootPrefixCls: s
    } = Rt("collapse", e), [u, c] = PK(a), d = E(() => {
      const {
        expandIconPosition: x
      } = e;
      return x !== void 0 ? x : l.value === "rtl" ? "end" : "start";
    }), f = (x) => {
      const {
        expandIcon: S = o.expandIcon
      } = e, C = S ? S(x) : h(Es, {
        rotate: x.isActive ? 90 : void 0
      }, null);
      return h("div", {
        class: [`${a.value}-expand-icon`, c.value],
        onClick: () => ["header", "icon"].includes(e.collapsible) && v(x.panelKey)
      }, [Ao(Array.isArray(S) ? C[0] : C) ? Un(C, {
        class: `${a.value}-arrow`
      }, !1) : C]);
    }, p = (x) => {
      e.activeKey === void 0 && (r.value = x);
      const S = e.accordion ? x[0] : x;
      i("update:activeKey", S), i("change", S);
    }, v = (x) => {
      let S = r.value;
      if (e.accordion)
        S = S[0] === x ? [] : [x];
      else {
        S = [...S];
        const C = S.indexOf(x);
        C > -1 ? S.splice(C, 1) : S.push(x);
      }
      p(S);
    }, g = (x, S) => {
      var C, P, $;
      if ($h(x)) return;
      const I = r.value, {
        accordion: w,
        destroyInactivePanel: M,
        collapsible: _,
        openAnimation: N
      } = e, R = N || jh(`${s.value}-motion-collapse`), H = String((C = x.key) !== null && C !== void 0 ? C : S), {
        header: L = ($ = (P = x.children) === null || P === void 0 ? void 0 : P.header) === null || $ === void 0 ? void 0 : $.call(P),
        headerClass: B,
        collapsible: A,
        disabled: G
      } = x.props || {};
      let j = !1;
      w ? j = I[0] === H : j = I.indexOf(H) > -1;
      let Z = A ?? _;
      (G || G === "") && (Z = "disabled");
      const W = {
        key: H,
        panelKey: H,
        header: L,
        headerClass: B,
        isActive: j,
        prefixCls: a.value,
        destroyInactivePanel: M,
        openAnimation: R,
        accordion: w,
        onItemClick: Z === "disabled" ? null : v,
        expandIcon: f,
        collapsible: Z
      };
      return Un(x, W);
    }, m = () => {
      var x;
      return go((x = o.default) === null || x === void 0 ? void 0 : x.call(o)).map(g);
    };
    return () => {
      const {
        accordion: x,
        bordered: S,
        ghost: C
      } = e, P = _e(a.value, {
        [`${a.value}-borderless`]: !S,
        [`${a.value}-icon-position-${d.value}`]: !0,
        [`${a.value}-rtl`]: l.value === "rtl",
        [`${a.value}-ghost`]: !!C,
        [n.class]: !!n.class
      }, c.value);
      return u(h("div", Q(Q({
        class: P
      }, EF(n)), {}, {
        style: n.style,
        role: x ? "tablist" : null
      }), [m()]));
    };
  }
}), OK = be({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: jT(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(!1);
    return It(() => {
      (e.isActive || e.forceRender) && (o.value = !0);
    }), () => {
      var i;
      if (!o.value) return null;
      const {
        prefixCls: r,
        isActive: a,
        role: l
      } = e;
      return h("div", {
        class: _e(`${r}-content`, {
          [`${r}-content-active`]: a,
          [`${r}-content-inactive`]: !a
        }),
        role: l
      }, [h("div", {
        class: `${r}-content-box`
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
    };
  }
}), cb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapsePanel",
  inheritAttrs: !1,
  props: _n(jT(), {
    showArrow: !0,
    isActive: !1,
    onItemClick() {
    },
    headerClass: "",
    forceRender: !1
  }),
  slots: Object,
  // emits: ['itemClick'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    dn(e.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
    const {
      prefixCls: r
    } = Rt("collapse", e), a = () => {
      o("itemClick", e.panelKey);
    }, l = (s) => {
      (s.key === "Enter" || s.keyCode === 13 || s.which === 13) && a();
    };
    return () => {
      var s, u;
      const {
        header: c = (s = n.header) === null || s === void 0 ? void 0 : s.call(n),
        headerClass: d,
        isActive: f,
        showArrow: p,
        destroyInactivePanel: v,
        accordion: g,
        forceRender: m,
        openAnimation: x,
        expandIcon: S = n.expandIcon,
        extra: C = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
        collapsible: P
      } = e, $ = P === "disabled", I = r.value, w = _e(`${I}-header`, {
        [d]: d,
        [`${I}-header-collapsible-only`]: P === "header",
        [`${I}-icon-collapsible-only`]: P === "icon"
      }), M = _e({
        [`${I}-item`]: !0,
        [`${I}-item-active`]: f,
        [`${I}-item-disabled`]: $,
        [`${I}-no-arrow`]: !p,
        [`${i.class}`]: !!i.class
      });
      let _ = h("i", {
        class: "arrow"
      }, null);
      p && typeof S == "function" && (_ = S(e));
      const N = er(h(OK, {
        prefixCls: I,
        isActive: f,
        forceRender: m,
        role: g ? "tabpanel" : null
      }, {
        default: n.default
      }), [[Or, f]]), R = O({
        appear: !1,
        css: !1
      }, x);
      return h("div", Q(Q({}, i), {}, {
        class: M
      }), [h("div", {
        class: w,
        onClick: () => !["header", "icon"].includes(P) && a(),
        role: g ? "tab" : "button",
        tabindex: $ ? -1 : 0,
        "aria-expanded": f,
        onKeypress: l
      }, [p && _, h("span", {
        onClick: () => P === "header" && a(),
        class: `${I}-header-text`
      }, [c]), C && h("div", {
        class: `${I}-extra`
      }, [C])]), h(Ei, R, {
        default: () => [!v || f ? N : null]
      })]);
    };
  }
});
Ml.Panel = cb;
Ml.install = function(e) {
  return e.component(Ml.name, Ml), e.component(cb.name, cb), e;
};
const WT = Symbol("TreeContextKey"), kK = be({
  compatConfig: {
    MODE: 3
  },
  name: "TreeContext",
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(WT, E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), J0 = () => zt(WT, E(() => ({}))), KT = Symbol("KeysStateKey"), IK = (e) => {
  Ft(KT, e);
}, qT = () => zt(KT, {
  expandedKeys: $e([]),
  selectedKeys: $e([]),
  loadedKeys: $e([]),
  loadingKeys: $e([]),
  checkedKeys: $e([]),
  halfCheckedKeys: $e([]),
  expandedKeysSet: E(() => /* @__PURE__ */ new Set()),
  selectedKeysSet: E(() => /* @__PURE__ */ new Set()),
  loadedKeysSet: E(() => /* @__PURE__ */ new Set()),
  loadingKeysSet: E(() => /* @__PURE__ */ new Set()),
  checkedKeysSet: E(() => /* @__PURE__ */ new Set()),
  halfCheckedKeysSet: E(() => /* @__PURE__ */ new Set()),
  flattenNodes: $e([])
}), MK = (e) => {
  let {
    prefixCls: t,
    level: n,
    isStart: o,
    isEnd: i
  } = e;
  const r = `${t}-indent-unit`, a = [];
  for (let l = 0; l < n; l += 1)
    a.push(h("span", {
      key: l,
      class: {
        [r]: !0,
        [`${r}-start`]: o[l],
        [`${r}-end`]: i[l]
      }
    }, null));
  return h("span", {
    "aria-hidden": "true",
    class: `${t}-indent`
  }, [a]);
}, YT = {
  eventKey: [String, Number],
  prefixCls: String,
  // By parent
  // expanded: { type: Boolean, default: undefined },
  // selected: { type: Boolean, default: undefined },
  // checked: { type: Boolean, default: undefined },
  // loaded: { type: Boolean, default: undefined },
  // loading: { type: Boolean, default: undefined },
  // halfChecked: { type: Boolean, default: undefined },
  // dragOver: { type: Boolean, default: undefined },
  // dragOverGapTop: { type: Boolean, default: undefined },
  // dragOverGapBottom: { type: Boolean, default: undefined },
  // pos: String,
  title: pe.any,
  /** New added in Tree for easy data access */
  data: {
    type: Object,
    default: void 0
  },
  parent: {
    type: Object,
    default: void 0
  },
  isStart: {
    type: Array
  },
  isEnd: {
    type: Array
  },
  active: {
    type: Boolean,
    default: void 0
  },
  onMousemove: {
    type: Function
  },
  // By user
  isLeaf: {
    type: Boolean,
    default: void 0
  },
  checkable: {
    type: Boolean,
    default: void 0
  },
  selectable: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  disableCheckbox: {
    type: Boolean,
    default: void 0
  },
  icon: pe.any,
  switcherIcon: pe.any,
  domRef: {
    type: Function
  }
}, TK = {
  prefixCls: {
    type: String
  },
  // data: { type: Array as PropType<FlattenNode[]> },
  motion: {
    type: Object
  },
  focusable: {
    type: Boolean
  },
  activeItem: {
    type: Object
  },
  focused: {
    type: Boolean
  },
  tabindex: {
    type: Number
  },
  checkable: {
    type: Boolean
  },
  selectable: {
    type: Boolean
  },
  disabled: {
    type: Boolean
  },
  // expandedKeys: { type: Array as PropType<Key[]> },
  // selectedKeys: { type: Array as PropType<Key[]> },
  // checkedKeys: { type: Array as PropType<Key[]> },
  // loadedKeys: { type: Array as PropType<Key[]> },
  // loadingKeys: { type: Array as PropType<Key[]> },
  // halfCheckedKeys: { type: Array as PropType<Key[]> },
  // keyEntities: { type: Object as PropType<Record<Key, DataEntity<DataNode>>> },
  // dragging: { type: Boolean as PropType<boolean> },
  // dragOverNodeKey: { type: [String, Number] as PropType<Key> },
  // dropPosition: { type: Number as PropType<number> },
  // Virtual list
  height: {
    type: Number
  },
  itemHeight: {
    type: Number
  },
  virtual: {
    type: Boolean
  },
  onScroll: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  },
  onActiveChange: {
    type: Function
  },
  onContextmenu: {
    type: Function
  },
  onListChangeStart: {
    type: Function
  },
  onListChangeEnd: {
    type: Function
  }
}, GT = () => ({
  prefixCls: String,
  focusable: {
    type: Boolean,
    default: void 0
  },
  activeKey: [Number, String],
  tabindex: Number,
  children: pe.any,
  treeData: {
    type: Array
  },
  fieldNames: {
    type: Object
  },
  showLine: {
    type: [Boolean, Object],
    default: void 0
  },
  showIcon: {
    type: Boolean,
    default: void 0
  },
  icon: pe.any,
  selectable: {
    type: Boolean,
    default: void 0
  },
  expandAction: [String, Boolean],
  disabled: {
    type: Boolean,
    default: void 0
  },
  multiple: {
    type: Boolean,
    default: void 0
  },
  checkable: {
    type: Boolean,
    default: void 0
  },
  checkStrictly: {
    type: Boolean,
    default: void 0
  },
  draggable: {
    type: [Function, Boolean]
  },
  defaultExpandParent: {
    type: Boolean,
    default: void 0
  },
  autoExpandParent: {
    type: Boolean,
    default: void 0
  },
  defaultExpandAll: {
    type: Boolean,
    default: void 0
  },
  defaultExpandedKeys: {
    type: Array
  },
  expandedKeys: {
    type: Array
  },
  defaultCheckedKeys: {
    type: Array
  },
  checkedKeys: {
    type: [Object, Array]
  },
  defaultSelectedKeys: {
    type: Array
  },
  selectedKeys: {
    type: Array
  },
  allowDrop: {
    type: Function
  },
  dropIndicatorRender: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onContextmenu: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onDblclick: {
    type: Function
  },
  onScroll: {
    type: Function
  },
  onExpand: {
    type: Function
  },
  onCheck: {
    type: Function
  },
  onSelect: {
    type: Function
  },
  onLoad: {
    type: Function
  },
  loadData: {
    type: Function
  },
  loadedKeys: {
    type: Array
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onRightClick: {
    type: Function
  },
  onDragstart: {
    type: Function
  },
  onDragenter: {
    type: Function
  },
  onDragover: {
    type: Function
  },
  onDragleave: {
    type: Function
  },
  onDragend: {
    type: Function
  },
  onDrop: {
    type: Function
  },
  /**
   * Used for `rc-tree-select` only.
   * Do not use in your production code directly since this will be refactor.
   */
  onActiveChange: {
    type: Function
  },
  filterTreeNode: {
    type: Function
  },
  motion: pe.any,
  switcherIcon: pe.any,
  // Virtual List
  height: Number,
  itemHeight: Number,
  virtual: {
    type: Boolean,
    default: void 0
  },
  // direction for drag logic
  direction: {
    type: String
  },
  rootClassName: String,
  rootStyle: Object
});
var _K = 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 rC = "open", aC = "close", EK = "---", db = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATreeNode",
  inheritAttrs: !1,
  props: YT,
  isTreeNode: 1,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i
    } = t;
    wn(!("slots" in e.data), `treeData slots is deprecated, please use ${Object.keys(e.data.slots || {}).map((Se) => "`v-slot:" + Se + "` ")}instead`);
    const r = $e(!1), a = J0(), {
      expandedKeysSet: l,
      selectedKeysSet: s,
      loadedKeysSet: u,
      loadingKeysSet: c,
      checkedKeysSet: d,
      halfCheckedKeysSet: f
    } = qT(), {
      dragOverNodeKey: p,
      dropPosition: v,
      keyEntities: g
    } = a.value, m = E(() => lp(e.eventKey, {
      expandedKeysSet: l.value,
      selectedKeysSet: s.value,
      loadedKeysSet: u.value,
      loadingKeysSet: c.value,
      checkedKeysSet: d.value,
      halfCheckedKeysSet: f.value,
      dragOverNodeKey: p,
      dropPosition: v,
      keyEntities: g
    })), x = gr(() => m.value.expanded), S = gr(() => m.value.selected), C = gr(() => m.value.checked), P = gr(() => m.value.loaded), $ = gr(() => m.value.loading), I = gr(() => m.value.halfChecked), w = gr(() => m.value.dragOver), M = gr(() => m.value.dragOverGapTop), _ = gr(() => m.value.dragOverGapBottom), N = gr(() => m.value.pos), R = $e(), H = E(() => {
      const {
        eventKey: Se
      } = e, {
        keyEntities: Ce
      } = a.value, {
        children: Ae
      } = Ce[Se] || {};
      return !!(Ae || []).length;
    }), L = E(() => {
      const {
        isLeaf: Se
      } = e, {
        loadData: Ce
      } = a.value, Ae = H.value;
      return Se === !1 ? !1 : Se || !Ce && !Ae || Ce && P.value && !Ae;
    }), B = E(() => L.value ? null : x.value ? rC : aC), A = E(() => {
      const {
        disabled: Se
      } = e, {
        disabled: Ce
      } = a.value;
      return !!(Ce || Se);
    }), G = E(() => {
      const {
        checkable: Se
      } = e, {
        checkable: Ce
      } = a.value;
      return !Ce || Se === !1 ? !1 : Ce;
    }), j = E(() => {
      const {
        selectable: Se
      } = e, {
        selectable: Ce
      } = a.value;
      return typeof Se == "boolean" ? Se : Ce;
    }), Z = E(() => {
      const {
        data: Se,
        active: Ce,
        checkable: Ae,
        disableCheckbox: qe,
        disabled: We,
        selectable: tt
      } = e;
      return O(O({
        active: Ce,
        checkable: Ae,
        disableCheckbox: qe,
        disabled: We,
        selectable: tt
      }, Se), {
        dataRef: Se,
        data: Se,
        isLeaf: L.value,
        checked: C.value,
        expanded: x.value,
        loading: $.value,
        selected: S.value,
        halfChecked: I.value
      });
    }), W = fi(), K = E(() => {
      const {
        eventKey: Se
      } = e, {
        keyEntities: Ce
      } = a.value, {
        parent: Ae
      } = Ce[Se] || {};
      return O(O({}, sp(O({}, e, m.value))), {
        parent: Ae
      });
    }), q = $n({
      eventData: K,
      eventKey: E(() => e.eventKey),
      selectHandle: R,
      pos: N,
      key: W.vnode.key
    });
    i(q);
    const U = (Se) => {
      const {
        onNodeDoubleClick: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ae = (Se) => {
      if (A.value) return;
      const {
        onNodeSelect: Ce
      } = a.value;
      Se.preventDefault(), Ce(Se, K.value);
    }, se = (Se) => {
      if (A.value) return;
      const {
        disableCheckbox: Ce
      } = e, {
        onNodeCheck: Ae
      } = a.value;
      if (!G.value || Ce) return;
      Se.preventDefault();
      const qe = !C.value;
      Ae(Se, K.value, qe);
    }, re = (Se) => {
      const {
        onNodeClick: Ce
      } = a.value;
      Ce(Se, K.value), j.value ? ae(Se) : se(Se);
    }, ie = (Se) => {
      const {
        onNodeMouseEnter: Ce
      } = a.value;
      Ce(Se, K.value);
    }, te = (Se) => {
      const {
        onNodeMouseLeave: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ve = (Se) => {
      const {
        onNodeContextMenu: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ce = (Se) => {
      const {
        onNodeDragStart: Ce
      } = a.value;
      Se.stopPropagation(), r.value = !0, Ce(Se, q);
      try {
        Se.dataTransfer.setData("text/plain", "");
      } catch {
      }
    }, fe = (Se) => {
      const {
        onNodeDragEnter: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), Ce(Se, q);
    }, ge = (Se) => {
      const {
        onNodeDragOver: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), Ce(Se, q);
    }, Me = (Se) => {
      const {
        onNodeDragLeave: Ce
      } = a.value;
      Se.stopPropagation(), Ce(Se, q);
    }, ze = (Se) => {
      const {
        onNodeDragEnd: Ce
      } = a.value;
      Se.stopPropagation(), r.value = !1, Ce(Se, q);
    }, Ke = (Se) => {
      const {
        onNodeDrop: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), r.value = !1, Ce(Se, q);
    }, He = (Se) => {
      const {
        onNodeExpand: Ce
      } = a.value;
      $.value || Ce(Se, K.value);
    }, Re = () => {
      const {
        data: Se
      } = e, {
        draggable: Ce
      } = a.value;
      return !!(Ce && (!Ce.nodeDraggable || Ce.nodeDraggable(Se)));
    }, Xe = () => {
      const {
        draggable: Se,
        prefixCls: Ce
      } = a.value;
      return Se && Se?.icon ? h("span", {
        class: `${Ce}-draggable-icon`
      }, [Se.icon]) : null;
    }, De = () => {
      var Se, Ce, Ae;
      const {
        switcherIcon: qe = o.switcherIcon || ((Se = a.value.slots) === null || Se === void 0 ? void 0 : Se[(Ae = (Ce = e.data) === null || Ce === void 0 ? void 0 : Ce.slots) === null || Ae === void 0 ? void 0 : Ae.switcherIcon])
      } = e, {
        switcherIcon: We
      } = a.value, tt = qe || We;
      return typeof tt == "function" ? tt(Z.value) : tt;
    }, Be = () => {
      const {
        loadData: Se,
        onNodeLoad: Ce
      } = a.value;
      $.value || Se && x.value && !L.value && !H.value && !P.value && Ce(K.value);
    };
    At(() => {
      Be();
    }), Ya(() => {
      Be();
    });
    const Ve = () => {
      const {
        prefixCls: Se
      } = a.value, Ce = De();
      if (L.value)
        return Ce !== !1 ? h("span", {
          class: _e(`${Se}-switcher`, `${Se}-switcher-noop`)
        }, [Ce]) : null;
      const Ae = _e(`${Se}-switcher`, `${Se}-switcher_${x.value ? rC : aC}`);
      return Ce !== !1 ? h("span", {
        onClick: He,
        class: Ae
      }, [Ce]) : null;
    }, ot = () => {
      var Se, Ce;
      const {
        disableCheckbox: Ae
      } = e, {
        prefixCls: qe
      } = a.value, We = A.value;
      return G.value ? h("span", {
        class: _e(`${qe}-checkbox`, C.value && `${qe}-checkbox-checked`, !C.value && I.value && `${qe}-checkbox-indeterminate`, (We || Ae) && `${qe}-checkbox-disabled`),
        onClick: se
      }, [(Ce = (Se = a.value).customCheckable) === null || Ce === void 0 ? void 0 : Ce.call(Se)]) : null;
    }, je = () => {
      const {
        prefixCls: Se
      } = a.value;
      return h("span", {
        class: _e(`${Se}-iconEle`, `${Se}-icon__${B.value || "docu"}`, $.value && `${Se}-icon_loading`)
      }, null);
    }, Pe = () => {
      const {
        disabled: Se,
        eventKey: Ce
      } = e, {
        draggable: Ae,
        dropLevelOffset: qe,
        dropPosition: We,
        prefixCls: tt,
        indent: Ee,
        dropIndicatorRender: Ne,
        dragOverNodeKey: Fe,
        direction: it
      } = a.value;
      return !Se && Ae !== !1 && Fe === Ce ? Ne({
        dropPosition: We,
        dropLevelOffset: qe,
        indent: Ee,
        prefixCls: tt,
        direction: it
      }) : null;
    }, Ge = () => {
      var Se, Ce, Ae, qe, We, tt;
      const {
        // title = slots.title ||
        //   context.value.slots?.[props.data?.slots?.title] ||
        //   context.value.slots?.title,
        // selected,
        icon: Ee = o.icon,
        // loading,
        data: Ne
      } = e, Fe = o.title || ((Se = a.value.slots) === null || Se === void 0 ? void 0 : Se[(Ae = (Ce = e.data) === null || Ce === void 0 ? void 0 : Ce.slots) === null || Ae === void 0 ? void 0 : Ae.title]) || ((qe = a.value.slots) === null || qe === void 0 ? void 0 : qe.title) || e.title, {
        prefixCls: it,
        showIcon: pt,
        icon: at,
        loadData: ft
        // slots: contextSlots,
      } = a.value, wt = A.value, Ct = `${it}-node-content-wrapper`;
      let St;
      if (pt) {
        const Wt = Ee || ((We = a.value.slots) === null || We === void 0 ? void 0 : We[(tt = Ne?.slots) === null || tt === void 0 ? void 0 : tt.icon]) || at;
        St = Wt ? h("span", {
          class: _e(`${it}-iconEle`, `${it}-icon__customize`)
        }, [typeof Wt == "function" ? Wt(Z.value) : Wt]) : je();
      } else ft && $.value && (St = je());
      let bt;
      typeof Fe == "function" ? bt = Fe(Z.value) : bt = Fe, bt = bt === void 0 ? EK : bt;
      const Ot = h("span", {
        class: `${it}-title`
      }, [bt]);
      return h("span", {
        ref: R,
        title: typeof Fe == "string" ? Fe : "",
        class: _e(`${Ct}`, `${Ct}-${B.value || "normal"}`, !wt && (S.value || r.value) && `${it}-node-selected`),
        onMouseenter: ie,
        onMouseleave: te,
        onContextmenu: ve,
        onClick: re,
        onDblclick: U
      }, [St, Ot, Pe()]);
    };
    return () => {
      const Se = O(O({}, e), n), {
        eventKey: Ce,
        isLeaf: Ae,
        isStart: qe,
        isEnd: We,
        domRef: tt,
        active: Ee,
        data: Ne,
        onMousemove: Fe,
        selectable: it
      } = Se, pt = _K(Se, ["eventKey", "isLeaf", "isStart", "isEnd", "domRef", "active", "data", "onMousemove", "selectable"]), {
        prefixCls: at,
        filterTreeNode: ft,
        keyEntities: wt,
        dropContainerKey: Ct,
        dropTargetKey: St,
        draggingNodeKey: bt
      } = a.value, Ot = A.value, Wt = Fs(pt, {
        aria: !0,
        data: !0
      }), {
        level: Xt
      } = wt[Ce] || {}, ln = We[We.length - 1], pn = Re(), gt = !Ot && pn, En = bt === Ce, hn = it !== void 0 ? {
        "aria-selected": !!it
      } : void 0;
      return h("div", Q(Q({
        ref: tt,
        class: _e(n.class, `${at}-treenode`, {
          [`${at}-treenode-disabled`]: Ot,
          [`${at}-treenode-switcher-${x.value ? "open" : "close"}`]: !Ae,
          [`${at}-treenode-checkbox-checked`]: C.value,
          [`${at}-treenode-checkbox-indeterminate`]: I.value,
          [`${at}-treenode-selected`]: S.value,
          [`${at}-treenode-loading`]: $.value,
          [`${at}-treenode-active`]: Ee,
          [`${at}-treenode-leaf-last`]: ln,
          [`${at}-treenode-draggable`]: gt,
          dragging: En,
          "drop-target": St === Ce,
          "drop-container": Ct === Ce,
          "drag-over": !Ot && w.value,
          "drag-over-gap-top": !Ot && M.value,
          "drag-over-gap-bottom": !Ot && _.value,
          "filter-node": ft && ft(K.value)
        }),
        style: n.style,
        draggable: gt,
        "aria-grabbed": En,
        onDragstart: gt ? ce : void 0,
        onDragenter: pn ? fe : void 0,
        onDragover: pn ? ge : void 0,
        onDragleave: pn ? Me : void 0,
        onDrop: pn ? Ke : void 0,
        onDragend: pn ? ze : void 0,
        onMousemove: Fe
      }, hn), Wt), [h(MK, {
        prefixCls: at,
        level: Xt,
        isStart: qe,
        isEnd: We
      }, null), Xe(), Ve(), ot(), Ge()]);
    };
  }
});
function Kr(e, t) {
  if (!e) return [];
  const n = e.slice(), o = n.indexOf(t);
  return o >= 0 && n.splice(o, 1), n;
}
function $a(e, t) {
  const n = (e || []).slice();
  return n.indexOf(t) === -1 && n.push(t), n;
}
function ex(e) {
  return e.split("-");
}
function UT(e, t) {
  return `${e}-${t}`;
}
function DK(e) {
  return e && e.type && e.type.isTreeNode;
}
function AK(e, t) {
  const n = [], o = t[e];
  function i() {
    (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).forEach((a) => {
      let {
        key: l,
        children: s
      } = a;
      n.push(l), i(s);
    });
  }
  return i(o.children), n;
}
function RK(e) {
  if (e.parent) {
    const t = ex(e.pos);
    return Number(t[t.length - 1]) === e.parent.children.length - 1;
  }
  return !1;
}
function NK(e) {
  const t = ex(e.pos);
  return Number(t[t.length - 1]) === 0;
}
function lC(e, t, n, o, i, r, a, l, s, u) {
  var c;
  const {
    clientX: d,
    clientY: f
  } = e, {
    top: p,
    height: v
  } = e.target.getBoundingClientRect(), m = ((u === "rtl" ? -1 : 1) * ((i?.x || 0) - d) - 12) / o;
  let x = l[n.eventKey];
  if (f < p + v / 2) {
    const N = a.findIndex((L) => L.key === x.key), R = N <= 0 ? 0 : N - 1, H = a[R].key;
    x = l[H];
  }
  const S = x.key, C = x, P = x.key;
  let $ = 0, I = 0;
  if (!s.has(S))
    for (let N = 0; N < m && RK(x); N += 1)
      x = x.parent, I += 1;
  const w = t.eventData, M = x.node;
  let _ = !0;
  return NK(x) && x.level === 0 && f < p + v / 2 && r({
    dragNode: w,
    dropNode: M,
    dropPosition: -1
  }) && x.key === n.eventKey ? $ = -1 : (C.children || []).length && s.has(P) ? r({
    dragNode: w,
    dropNode: M,
    dropPosition: 0
  }) ? $ = 0 : _ = !1 : I === 0 ? m > -1.5 ? r({
    dragNode: w,
    dropNode: M,
    dropPosition: 1
  }) ? $ = 1 : _ = !1 : r({
    dragNode: w,
    dropNode: M,
    dropPosition: 0
  }) ? $ = 0 : r({
    dragNode: w,
    dropNode: M,
    dropPosition: 1
  }) ? $ = 1 : _ = !1 : r({
    dragNode: w,
    dropNode: M,
    dropPosition: 1
  }) ? $ = 1 : _ = !1, {
    dropPosition: $,
    dropLevelOffset: I,
    dropTargetKey: x.key,
    dropTargetPos: x.pos,
    dragOverNodeKey: P,
    dropContainerKey: $ === 0 ? null : ((c = x.parent) === null || c === void 0 ? void 0 : c.key) || null,
    dropAllowed: _
  };
}
function sC(e, t) {
  if (!e) return;
  const {
    multiple: n
  } = t;
  return n ? e.slice() : e.length ? [e[0]] : e;
}
function vv(e) {
  if (!e)
    return null;
  let t;
  if (Array.isArray(e))
    t = {
      checkedKeys: e,
      halfCheckedKeys: void 0
    };
  else if (typeof e == "object")
    t = {
      checkedKeys: e.checked || void 0,
      halfCheckedKeys: e.halfChecked || void 0
    };
  else
    return wn(!1, "`checkedKeys` is not an array or an object"), null;
  return t;
}
function fb(e, t) {
  const n = /* @__PURE__ */ new Set();
  function o(i) {
    if (n.has(i)) return;
    const r = t[i];
    if (!r) return;
    n.add(i);
    const {
      parent: a,
      node: l
    } = r;
    l.disabled || a && o(a.key);
  }
  return (e || []).forEach((i) => {
    o(i);
  }), [...n];
}
var zK = 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 Kd(e, t) {
  return e ?? t;
}
function Zh(e) {
  const {
    title: t,
    _title: n,
    key: o,
    children: i
  } = e || {}, r = t || "title";
  return {
    title: r,
    _title: n || [r],
    key: o || "key",
    children: i || "children"
  };
}
function pb(e) {
  function t() {
    let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
    return Do(n).map((i) => {
      var r, a, l, s;
      if (!DK(i))
        return wn(!i, "Tree/TreeNode can only accept TreeNode as children."), null;
      const u = i.children || {}, c = i.key, d = {};
      for (const [N, R] of Object.entries(i.props))
        d[_d(N)] = R;
      const {
        isLeaf: f,
        checkable: p,
        selectable: v,
        disabled: g,
        disableCheckbox: m
      } = d, x = {
        isLeaf: f || f === "" || void 0,
        checkable: p || p === "" || void 0,
        selectable: v || v === "" || void 0,
        disabled: g || g === "" || void 0,
        disableCheckbox: m || m === "" || void 0
      }, S = O(O({}, d), x), {
        title: C = (r = u.title) === null || r === void 0 ? void 0 : r.call(u, S),
        icon: P = (a = u.icon) === null || a === void 0 ? void 0 : a.call(u, S),
        switcherIcon: $ = (l = u.switcherIcon) === null || l === void 0 ? void 0 : l.call(u, S)
      } = d, I = zK(d, ["title", "icon", "switcherIcon"]), w = (s = u.default) === null || s === void 0 ? void 0 : s.call(u), M = O(O(O({}, I), {
        title: C,
        icon: P,
        switcherIcon: $,
        key: c,
        isLeaf: f
      }), x), _ = t(w);
      return _.length && (M.children = _), M;
    });
  }
  return t(e);
}
function BK(e, t, n) {
  const {
    _title: o,
    key: i,
    children: r
  } = Zh(n), a = new Set(t === !0 ? [] : t), l = [];
  function s(u) {
    let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
    return u.map((d, f) => {
      const p = UT(c ? c.pos : "0", f), v = Kd(d[i], p);
      let g;
      for (let x = 0; x < o.length; x += 1) {
        const S = o[x];
        if (d[S] !== void 0) {
          g = d[S];
          break;
        }
      }
      const m = O(O({}, Bn(d, [...o, i, r])), {
        title: g,
        key: v,
        parent: c,
        pos: p,
        children: null,
        data: d,
        isStart: [...c ? c.isStart : [], f === 0],
        isEnd: [...c ? c.isEnd : [], f === u.length - 1]
      });
      return l.push(m), t === !0 || a.has(v) ? m.children = s(d[r] || [], m) : m.children = [], m;
    });
  }
  return s(e), l;
}
function FK(e, t, n) {
  let o = {};
  typeof n == "object" ? o = n : o = {
    externalGetKey: n
  }, o = o || {};
  const {
    childrenPropName: i,
    externalGetKey: r,
    fieldNames: a
  } = o, {
    key: l,
    children: s
  } = Zh(a), u = i || s;
  let c;
  r ? typeof r == "string" ? c = (f) => f[r] : typeof r == "function" && (c = (f) => r(f)) : c = (f, p) => Kd(f[l], p);
  function d(f, p, v, g) {
    const m = f ? f[u] : e, x = f ? UT(v.pos, p) : "0", S = f ? [...g, f] : [];
    if (f) {
      const C = c(f, x), P = {
        node: f,
        index: p,
        pos: x,
        key: C,
        parentPos: v.node ? v.pos : null,
        level: v.level + 1,
        nodes: S
      };
      t(P);
    }
    m && m.forEach((C, P) => {
      d(C, P, {
        node: f,
        pos: x,
        level: v ? v.level + 1 : -1
      }, S);
    });
  }
  d(null);
}
function tx(e) {
  let {
    initWrapper: t,
    processEntity: n,
    onProcessFinished: o,
    externalGetKey: i,
    childrenPropName: r,
    fieldNames: a
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, l = arguments.length > 2 ? arguments[2] : void 0;
  const s = i || l, u = {}, c = {};
  let d = {
    posEntities: u,
    keyEntities: c
  };
  return t && (d = t(d) || d), FK(e, (f) => {
    const {
      node: p,
      index: v,
      pos: g,
      key: m,
      parentPos: x,
      level: S,
      nodes: C
    } = f, P = {
      node: p,
      nodes: C,
      index: v,
      key: m,
      pos: g,
      level: S
    }, $ = Kd(m, g);
    u[g] = P, c[$] = P, P.parent = u[x], P.parent && (P.parent.children = P.parent.children || [], P.parent.children.push(P)), n && n(P, d);
  }, {
    externalGetKey: s,
    childrenPropName: r,
    fieldNames: a
  }), o && o(d), d;
}
function lp(e, t) {
  let {
    expandedKeysSet: n,
    selectedKeysSet: o,
    loadedKeysSet: i,
    loadingKeysSet: r,
    checkedKeysSet: a,
    halfCheckedKeysSet: l,
    dragOverNodeKey: s,
    dropPosition: u,
    keyEntities: c
  } = t;
  const d = c[e];
  return {
    eventKey: e,
    expanded: n.has(e),
    selected: o.has(e),
    loaded: i.has(e),
    loading: r.has(e),
    checked: a.has(e),
    halfChecked: l.has(e),
    pos: String(d ? d.pos : ""),
    parent: d.parent,
    // [Legacy] Drag props
    // Since the interaction of drag is changed, the semantic of the props are
    // not accuracy, I think it should be finally removed
    dragOver: s === e && u === 0,
    dragOverGapTop: s === e && u === -1,
    dragOverGapBottom: s === e && u === 1
  };
}
function sp(e) {
  const {
    data: t,
    expanded: n,
    selected: o,
    checked: i,
    loaded: r,
    loading: a,
    halfChecked: l,
    dragOver: s,
    dragOverGapTop: u,
    dragOverGapBottom: c,
    pos: d,
    active: f,
    eventKey: p
  } = e, v = O(O({
    dataRef: t
  }, t), {
    expanded: n,
    selected: o,
    checked: i,
    loaded: r,
    loading: a,
    halfChecked: l,
    dragOver: s,
    dragOverGapTop: u,
    dragOverGapBottom: c,
    pos: d,
    active: f,
    eventKey: p,
    key: p
  });
  return "props" in v || Object.defineProperty(v, "props", {
    get() {
      return wn(!1, "Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."), e;
    }
  }), v;
}
function XT(e, t) {
  const n = /* @__PURE__ */ new Set();
  return e.forEach((o) => {
    t.has(o) || n.add(o);
  }), n;
}
function LK(e) {
  const {
    disabled: t,
    disableCheckbox: n,
    checkable: o
  } = e || {};
  return !!(t || n) || o === !1;
}
function HK(e, t, n, o) {
  const i = new Set(e), r = /* @__PURE__ */ new Set();
  for (let l = 0; l <= n; l += 1)
    (t.get(l) || /* @__PURE__ */ new Set()).forEach((u) => {
      const {
        key: c,
        node: d,
        children: f = []
      } = u;
      i.has(c) && !o(d) && f.filter((p) => !o(p.node)).forEach((p) => {
        i.add(p.key);
      });
    });
  const a = /* @__PURE__ */ new Set();
  for (let l = n; l >= 0; l -= 1)
    (t.get(l) || /* @__PURE__ */ new Set()).forEach((u) => {
      const {
        parent: c,
        node: d
      } = u;
      if (o(d) || !u.parent || a.has(u.parent.key))
        return;
      if (o(u.parent.node)) {
        a.add(c.key);
        return;
      }
      let f = !0, p = !1;
      (c.children || []).filter((v) => !o(v.node)).forEach((v) => {
        let {
          key: g
        } = v;
        const m = i.has(g);
        f && !m && (f = !1), !p && (m || r.has(g)) && (p = !0);
      }), f && i.add(c.key), p && r.add(c.key), a.add(c.key);
    });
  return {
    checkedKeys: Array.from(i),
    halfCheckedKeys: Array.from(XT(r, i))
  };
}
function VK(e, t, n, o, i) {
  const r = new Set(e);
  let a = new Set(t);
  for (let s = 0; s <= o; s += 1)
    (n.get(s) || /* @__PURE__ */ new Set()).forEach((c) => {
      const {
        key: d,
        node: f,
        children: p = []
      } = c;
      !r.has(d) && !a.has(d) && !i(f) && p.filter((v) => !i(v.node)).forEach((v) => {
        r.delete(v.key);
      });
    });
  a = /* @__PURE__ */ new Set();
  const l = /* @__PURE__ */ new Set();
  for (let s = o; s >= 0; s -= 1)
    (n.get(s) || /* @__PURE__ */ new Set()).forEach((c) => {
      const {
        parent: d,
        node: f
      } = c;
      if (i(f) || !c.parent || l.has(c.parent.key))
        return;
      if (i(c.parent.node)) {
        l.add(d.key);
        return;
      }
      let p = !0, v = !1;
      (d.children || []).filter((g) => !i(g.node)).forEach((g) => {
        let {
          key: m
        } = g;
        const x = r.has(m);
        p && !x && (p = !1), !v && (x || a.has(m)) && (v = !0);
      }), p || r.delete(d.key), v && a.add(d.key), l.add(d.key);
    });
  return {
    checkedKeys: Array.from(r),
    halfCheckedKeys: Array.from(XT(a, r))
  };
}
function Ru(e, t, n, o, i, r) {
  const a = [];
  let l;
  r ? l = r : l = LK;
  const s = new Set(e.filter((c) => {
    const d = !!n[c];
    return d || a.push(c), d;
  }));
  rI(!a.length, `Tree missing follow keys: ${a.slice(0, 100).map((c) => `'${c}'`).join(", ")}`);
  let u;
  return t === !0 ? u = HK(s, i, o, l) : u = VK(s, t.halfCheckedKeys, i, o, l), u;
}
function QT(e) {
  const t = le(0), n = $e();
  return It(() => {
    const o = /* @__PURE__ */ new Map();
    let i = 0;
    const r = e.value || {};
    for (const a in r)
      if (Object.prototype.hasOwnProperty.call(r, a)) {
        const l = r[a], {
          level: s
        } = l;
        let u = o.get(s);
        u || (u = /* @__PURE__ */ new Set(), o.set(s, u)), u.add(l), i = Math.max(i, s);
      }
    t.value = i, n.value = o;
  }), {
    maxLevel: t,
    levelEntities: n
  };
}
var jK = { 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 uC(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) {
      WK(e, i, n[i]);
    });
  }
  return e;
}
function WK(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Yp = function(t, n) {
  var o = uC({}, t, n.attrs);
  return h(an, uC({}, o, {
    icon: jK
  }), null);
};
Yp.displayName = "LeftOutlined";
Yp.inheritAttrs = !1;
const ZT = () => xi() && window.document.documentElement, JT = (e) => {
  if (xi() && window.document.documentElement) {
    const t = Array.isArray(e) ? e : [e], {
      documentElement: n
    } = window.document;
    return t.some((o) => o in n.style);
  }
  return !1;
}, KK = (e, t) => {
  if (!JT(e))
    return !1;
  const n = document.createElement("div"), o = n.style[e];
  return n.style[e] = t, n.style[e] !== o;
};
function qK(e, t) {
  return !Array.isArray(e) && t !== void 0 ? KK(e, t) : JT(e);
}
let Af;
const YK = () => {
  if (!ZT())
    return !1;
  if (Af !== void 0)
    return Af;
  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), Af = e.scrollHeight === 1, document.body.removeChild(e), Af;
}, e_ = (() => {
  const e = $e(!1);
  return At(() => {
    e.value = YK();
  }), e;
}), t_ = Symbol("rowContextKey"), GK = (e) => {
  Ft(t_, e);
}, UK = () => zt(t_, {
  gutter: E(() => {
  }),
  wrap: E(() => {
  }),
  supportFlexGap: E(() => {
  })
}), XK = (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"
      }
    }
  };
}, QK = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      position: "relative",
      maxWidth: "100%",
      // Prevent columns from collapsing when empty
      minHeight: 1
    }
  };
}, ZK = (e, t) => {
  const {
    componentCls: n,
    gridColumns: o
  } = e, i = {};
  for (let r = o; r >= 0; r--)
    r === 0 ? (i[`${n}${t}-${r}`] = {
      display: "none"
    }, i[`${n}-push-${r}`] = {
      insetInlineStart: "auto"
    }, i[`${n}-pull-${r}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${t}-push-${r}`] = {
      insetInlineStart: "auto"
    }, i[`${n}${t}-pull-${r}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${t}-offset-${r}`] = {
      marginInlineEnd: 0
    }, i[`${n}${t}-order-${r}`] = {
      order: 0
    }) : (i[`${n}${t}-${r}`] = {
      display: "block",
      flex: `0 0 ${r / o * 100}%`,
      maxWidth: `${r / o * 100}%`
    }, i[`${n}${t}-push-${r}`] = {
      insetInlineStart: `${r / o * 100}%`
    }, i[`${n}${t}-pull-${r}`] = {
      insetInlineEnd: `${r / o * 100}%`
    }, i[`${n}${t}-offset-${r}`] = {
      marginInlineStart: `${r / o * 100}%`
    }, i[`${n}${t}-order-${r}`] = {
      order: r
    });
  return i;
}, hb = (e, t) => ZK(e, t), JK = (e, t, n) => ({
  [`@media (min-width: ${t}px)`]: O({}, hb(e, n))
}), eq = On("Grid", (e) => [XK(e)]), tq = On("Grid", (e) => {
  const t = Qt(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 [QK(t), hb(t, ""), hb(t, "-xs"), Object.keys(n).map((o) => JK(t, n[o], o)).reduce((o, i) => O(O({}, o), i), {})];
}), nq = () => ({
  align: en([String, Object]),
  justify: en([String, Object]),
  prefixCls: String,
  gutter: en([Number, Array, Object], 0),
  wrap: {
    type: Boolean,
    default: void 0
  }
}), n_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARow",
  inheritAttrs: !1,
  props: nq(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r
    } = Rt("row", e), [a, l] = eq(i);
    let s;
    const u = $M(), 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 = (C) => E(() => {
      if (typeof e[C] == "string")
        return e[C];
      if (typeof e[C] != "object")
        return "";
      for (let P = 0; P < Pf.length; P++) {
        const $ = Pf[P];
        if (!d.value[$]) continue;
        const I = e[C][$];
        if (I !== void 0)
          return I;
      }
      return "";
    }), p = f("align"), v = f("justify"), g = e_();
    At(() => {
      s = u.value.subscribe((C) => {
        d.value = C;
        const P = e.gutter || 0;
        (!Array.isArray(P) && typeof P == "object" || Array.isArray(P) && (typeof P[0] == "object" || typeof P[1] == "object")) && (c.value = C);
      });
    }), qt(() => {
      u.value.unsubscribe(s);
    });
    const m = E(() => {
      const C = [void 0, void 0], {
        gutter: P = 0
      } = e;
      return (Array.isArray(P) ? P : [P, void 0]).forEach((I, w) => {
        if (typeof I == "object")
          for (let M = 0; M < Pf.length; M++) {
            const _ = Pf[M];
            if (c.value[_] && I[_] !== void 0) {
              C[w] = I[_];
              break;
            }
          }
        else
          C[w] = I;
      }), C;
    });
    GK({
      gutter: m,
      supportFlexGap: g,
      wrap: E(() => e.wrap)
    });
    const x = E(() => _e(i.value, {
      [`${i.value}-no-wrap`]: e.wrap === !1,
      [`${i.value}-${v.value}`]: v.value,
      [`${i.value}-${p.value}`]: p.value,
      [`${i.value}-rtl`]: r.value === "rtl"
    }, o.class, l.value)), S = E(() => {
      const C = m.value, P = {}, $ = C[0] != null && C[0] > 0 ? `${C[0] / -2}px` : void 0, I = C[1] != null && C[1] > 0 ? `${C[1] / -2}px` : void 0;
      return $ && (P.marginLeft = $, P.marginRight = $), g.value ? P.rowGap = `${C[1]}px` : I && (P.marginTop = I, P.marginBottom = I), P;
    });
    return () => {
      var C;
      return a(h("div", Q(Q({}, o), {}, {
        class: x.value,
        style: O(O({}, S.value), o.style)
      }), [(C = n.default) === null || C === void 0 ? void 0 : C.call(n)]));
    };
  }
});
function ms() {
  return ms = 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;
  }, ms.apply(this, arguments);
}
function oq(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Cd(e, t);
}
function gb(e) {
  return gb = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, gb(e);
}
function Cd(e, t) {
  return Cd = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, i) {
    return o.__proto__ = i, o;
  }, Cd(e, t);
}
function iq() {
  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 up(e, t, n) {
  return iq() ? up = Reflect.construct.bind() : up = function(i, r, a) {
    var l = [null];
    l.push.apply(l, r);
    var s = Function.bind.apply(i, l), u = new s();
    return a && Cd(u, a.prototype), u;
  }, up.apply(null, arguments);
}
function rq(e) {
  return Function.toString.call(e).indexOf("[native code]") !== -1;
}
function vb(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return vb = function(o) {
    if (o === null || !rq(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 up(o, arguments, gb(this).constructor);
    }
    return i.prototype = Object.create(o.prototype, {
      constructor: {
        value: i,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), Cd(i, o);
  }, vb(e);
}
var aq = /%[sdj%]/g, o_ = function() {
};
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (o_ = 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 mb(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 Mi(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, r = n.length;
  if (typeof e == "function")
    return e.apply(null, n);
  if (typeof e == "string") {
    var a = e.replace(aq, function(l) {
      if (l === "%%")
        return "%";
      if (i >= r)
        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 a;
  }
  return e;
}
function lq(e) {
  return e === "string" || e === "url" || e === "hex" || e === "email" || e === "date" || e === "pattern";
}
function Ro(e, t) {
  return !!(e == null || t === "array" && Array.isArray(e) && !e.length || lq(t) && typeof e == "string" && !e);
}
function sq(e, t, n) {
  var o = [], i = 0, r = e.length;
  function a(l) {
    o.push.apply(o, l || []), i++, i === r && n(o);
  }
  e.forEach(function(l) {
    t(l, a);
  });
}
function cC(e, t, n) {
  var o = 0, i = e.length;
  function r(a) {
    if (a && a.length) {
      n(a);
      return;
    }
    var l = o;
    o = o + 1, l < i ? t(e[l], r) : n([]);
  }
  r([]);
}
function uq(e) {
  var t = [];
  return Object.keys(e).forEach(function(n) {
    t.push.apply(t, e[n] || []);
  }), t;
}
var dC = /* @__PURE__ */ (function(e) {
  oq(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__ */ vb(Error));
function cq(e, t, n, o, i) {
  if (t.first) {
    var r = new Promise(function(f, p) {
      var v = function(x) {
        return o(x), x.length ? p(new dC(x, mb(x))) : f(i);
      }, g = uq(e);
      cC(g, n, v);
    });
    return r.catch(function(f) {
      return f;
    }), r;
  }
  var a = t.firstFields === !0 ? Object.keys(e) : t.firstFields || [], l = Object.keys(e), s = l.length, u = 0, c = [], d = new Promise(function(f, p) {
    var v = function(m) {
      if (c.push.apply(c, m), u++, u === s)
        return o(c), c.length ? p(new dC(c, mb(c))) : f(i);
    };
    l.length || (o(c), f(i)), l.forEach(function(g) {
      var m = e[g];
      a.indexOf(g) !== -1 ? cC(m, n, v) : sq(m, n, v);
    });
  });
  return d.catch(function(f) {
    return f;
  }), d;
}
function dq(e) {
  return !!(e && e.message !== void 0);
}
function fq(e, t) {
  for (var n = e, o = 0; o < t.length; o++) {
    if (n == null)
      return n;
    n = n[t[o]];
  }
  return n;
}
function fC(e, t) {
  return function(n) {
    var o;
    return e.fullFields ? o = fq(t, e.fullFields) : o = t[n.field || e.fullField], dq(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 pC(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] = ms({}, e[n], o) : e[n] = o;
      }
  }
  return e;
}
var i_ = function(t, n, o, i, r, a) {
  t.required && (!o.hasOwnProperty(t.field) || Ro(n, a || t.type)) && i.push(Mi(r.messages.required, t.fullField));
}, pq = function(t, n, o, i, r) {
  (/^\s+$/.test(n) || n === "") && i.push(Mi(r.messages.whitespace, t.fullField));
}, Rf, hq = (function() {
  if (Rf)
    return Rf;
  var e = "[a-fA-F\\d:]", t = function(P) {
    return P && P.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(), r = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), a = new RegExp("^" + n + "$"), l = new RegExp("^" + i + "$"), s = function(P) {
    return P && P.exact ? r : new RegExp("(?:" + t(P) + n + t(P) + ")|(?:" + t(P) + i + t(P) + ")", "g");
  };
  s.v4 = function(C) {
    return C && C.exact ? a : new RegExp("" + t(C) + n + t(C), "g");
  }, s.v6 = function(C) {
    return C && C.exact ? l : new RegExp("" + t(C) + i + t(C), "g");
  };
  var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", d = s.v4().source, f = s.v6().source, p = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", v = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", m = "(?::\\d{2,5})?", x = '(?:[/?#][^\\s"]*)?', S = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + d + "|" + f + "|" + p + v + g + ")" + m + x;
  return Rf = new RegExp("(?:^" + S + "$)", "i"), Rf;
}), hC = {
  // 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
}, jc = {
  integer: function(t) {
    return jc.number(t) && parseInt(t, 10) === t;
  },
  float: function(t) {
    return jc.number(t) && !jc.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" && !jc.array(t);
  },
  method: function(t) {
    return typeof t == "function";
  },
  email: function(t) {
    return typeof t == "string" && t.length <= 320 && !!t.match(hC.email);
  },
  url: function(t) {
    return typeof t == "string" && t.length <= 2048 && !!t.match(hq());
  },
  hex: function(t) {
    return typeof t == "string" && !!t.match(hC.hex);
  }
}, gq = function(t, n, o, i, r) {
  if (t.required && n === void 0) {
    i_(t, n, o, i, r);
    return;
  }
  var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
  a.indexOf(l) > -1 ? jc[l](n) || i.push(Mi(r.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && i.push(Mi(r.messages.types[l], t.fullField, t.type));
}, vq = function(t, n, o, i, r) {
  var a = 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", p = typeof n == "string", v = Array.isArray(n);
  if (f ? d = "number" : p ? d = "string" : v && (d = "array"), !d)
    return !1;
  v && (c = n.length), p && (c = n.replace(u, "_").length), a ? c !== t.len && i.push(Mi(r.messages[d].len, t.fullField, t.len)) : l && !s && c < t.min ? i.push(Mi(r.messages[d].min, t.fullField, t.min)) : s && !l && c > t.max ? i.push(Mi(r.messages[d].max, t.fullField, t.max)) : l && s && (c < t.min || c > t.max) && i.push(Mi(r.messages[d].range, t.fullField, t.min, t.max));
}, uu = "enum", mq = function(t, n, o, i, r) {
  t[uu] = Array.isArray(t[uu]) ? t[uu] : [], t[uu].indexOf(n) === -1 && i.push(Mi(r.messages[uu], t.fullField, t[uu].join(", ")));
}, bq = function(t, n, o, i, r) {
  if (t.pattern) {
    if (t.pattern instanceof RegExp)
      t.pattern.lastIndex = 0, t.pattern.test(n) || i.push(Mi(r.messages.pattern.mismatch, t.fullField, n, t.pattern));
    else if (typeof t.pattern == "string") {
      var a = new RegExp(t.pattern);
      a.test(n) || i.push(Mi(r.messages.pattern.mismatch, t.fullField, n, t.pattern));
    }
  }
}, bn = {
  required: i_,
  whitespace: pq,
  type: gq,
  range: vq,
  enum: mq,
  pattern: bq
}, yq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n, "string") && !t.required)
      return o();
    bn.required(t, n, i, a, r, "string"), Ro(n, "string") || (bn.type(t, n, i, a, r), bn.range(t, n, i, a, r), bn.pattern(t, n, i, a, r), t.whitespace === !0 && bn.whitespace(t, n, i, a, r));
  }
  o(a);
}, xq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), n !== void 0 && bn.type(t, n, i, a, r);
  }
  o(a);
}, wq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (n === "" && (n = void 0), Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), n !== void 0 && (bn.type(t, n, i, a, r), bn.range(t, n, i, a, r));
  }
  o(a);
}, Sq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), n !== void 0 && bn.type(t, n, i, a, r);
  }
  o(a);
}, Cq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), Ro(n) || bn.type(t, n, i, a, r);
  }
  o(a);
}, $q = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), n !== void 0 && (bn.type(t, n, i, a, r), bn.range(t, n, i, a, r));
  }
  o(a);
}, Pq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), n !== void 0 && (bn.type(t, n, i, a, r), bn.range(t, n, i, a, r));
  }
  o(a);
}, Oq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (n == null && !t.required)
      return o();
    bn.required(t, n, i, a, r, "array"), n != null && (bn.type(t, n, i, a, r), bn.range(t, n, i, a, r));
  }
  o(a);
}, kq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), n !== void 0 && bn.type(t, n, i, a, r);
  }
  o(a);
}, Iq = "enum", Mq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r), n !== void 0 && bn[Iq](t, n, i, a, r);
  }
  o(a);
}, Tq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n, "string") && !t.required)
      return o();
    bn.required(t, n, i, a, r), Ro(n, "string") || bn.pattern(t, n, i, a, r);
  }
  o(a);
}, _q = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n, "date") && !t.required)
      return o();
    if (bn.required(t, n, i, a, r), !Ro(n, "date")) {
      var s;
      n instanceof Date ? s = n : s = new Date(n), bn.type(t, s, i, a, r), s && bn.range(t, s.getTime(), i, a, r);
    }
  }
  o(a);
}, Eq = function(t, n, o, i, r) {
  var a = [], l = Array.isArray(n) ? "array" : typeof n;
  bn.required(t, n, i, a, r, l), o(a);
}, mv = function(t, n, o, i, r) {
  var a = t.type, l = [], s = t.required || !t.required && i.hasOwnProperty(t.field);
  if (s) {
    if (Ro(n, a) && !t.required)
      return o();
    bn.required(t, n, i, l, r, a), Ro(n, a) || bn.type(t, n, i, l, r);
  }
  o(l);
}, Dq = function(t, n, o, i, r) {
  var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
  if (l) {
    if (Ro(n) && !t.required)
      return o();
    bn.required(t, n, i, a, r);
  }
  o(a);
}, ed = {
  string: yq,
  method: xq,
  number: wq,
  boolean: Sq,
  regexp: Cq,
  integer: $q,
  float: Pq,
  array: Oq,
  object: kq,
  enum: Mq,
  pattern: Tq,
  date: _q,
  url: mv,
  hex: mv,
  email: mv,
  required: Eq,
  any: Dq
};
function bb() {
  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 yb = bb(), qd = /* @__PURE__ */ (function() {
  function e(n) {
    this.rules = null, this._messages = yb, 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(r) {
      var a = o[r];
      i.rules[r] = Array.isArray(a) ? a : [a];
    });
  }, t.messages = function(o) {
    return o && (this._messages = pC(bb(), o)), this._messages;
  }, t.validate = function(o, i, r) {
    var a = this;
    i === void 0 && (i = {}), r === void 0 && (r = function() {
    });
    var l = o, s = i, u = r;
    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(g) {
      var m = [], x = {};
      function S(P) {
        if (Array.isArray(P)) {
          var $;
          m = ($ = m).concat.apply($, P);
        } else
          m.push(P);
      }
      for (var C = 0; C < g.length; C++)
        S(g[C]);
      m.length ? (x = mb(m), u(m, x)) : u(null, l);
    }
    if (s.messages) {
      var d = this.messages();
      d === yb && (d = bb()), pC(d, s.messages), s.messages = d;
    } else
      s.messages = this.messages();
    var f = {}, p = s.keys || Object.keys(this.rules);
    p.forEach(function(g) {
      var m = a.rules[g], x = l[g];
      m.forEach(function(S) {
        var C = S;
        typeof C.transform == "function" && (l === o && (l = ms({}, l)), x = l[g] = C.transform(x)), typeof C == "function" ? C = {
          validator: C
        } : C = ms({}, C), C.validator = a.getValidationMethod(C), C.validator && (C.field = g, C.fullField = C.fullField || g, C.type = a.getType(C), f[g] = f[g] || [], f[g].push({
          rule: C,
          value: x,
          source: l,
          field: g
        }));
      });
    });
    var v = {};
    return cq(f, s, function(g, m) {
      var x = g.rule, S = (x.type === "object" || x.type === "array") && (typeof x.fields == "object" || typeof x.defaultField == "object");
      S = S && (x.required || !x.required && g.value), x.field = g.field;
      function C(I, w) {
        return ms({}, w, {
          fullField: x.fullField + "." + I,
          fullFields: x.fullFields ? [].concat(x.fullFields, [I]) : [I]
        });
      }
      function P(I) {
        I === void 0 && (I = []);
        var w = Array.isArray(I) ? I : [I];
        !s.suppressWarning && w.length && e.warning("async-validator:", w), w.length && x.message !== void 0 && (w = [].concat(x.message));
        var M = w.map(fC(x, l));
        if (s.first && M.length)
          return v[x.field] = 1, m(M);
        if (!S)
          m(M);
        else {
          if (x.required && !g.value)
            return x.message !== void 0 ? M = [].concat(x.message).map(fC(x, l)) : s.error && (M = [s.error(x, Mi(s.messages.required, x.field))]), m(M);
          var _ = {};
          x.defaultField && Object.keys(g.value).map(function(H) {
            _[H] = x.defaultField;
          }), _ = ms({}, _, g.rule.fields);
          var N = {};
          Object.keys(_).forEach(function(H) {
            var L = _[H], B = Array.isArray(L) ? L : [L];
            N[H] = B.map(C.bind(null, H));
          });
          var R = new e(N);
          R.messages(s.messages), g.rule.options && (g.rule.options.messages = s.messages, g.rule.options.error = s.error), R.validate(g.value, g.rule.options || s, function(H) {
            var L = [];
            M && M.length && L.push.apply(L, M), H && H.length && L.push.apply(L, H), m(L.length ? L : null);
          });
        }
      }
      var $;
      if (x.asyncValidator)
        $ = x.asyncValidator(x, g.value, P, g.source, s);
      else if (x.validator) {
        try {
          $ = x.validator(x, g.value, P, g.source, s);
        } catch (I) {
          console.error?.(I), s.suppressValidatorError || setTimeout(function() {
            throw I;
          }, 0), P(I.message);
        }
        $ === !0 ? P() : $ === !1 ? P(typeof x.message == "function" ? x.message(x.fullField || x.field) : x.message || (x.fullField || x.field) + " fails") : $ instanceof Array ? P($) : $ instanceof Error && P($.message);
      }
      $ && $.then && $.then(function() {
        return P();
      }, function(I) {
        return P(I);
      });
    }, function(g) {
      c(g);
    }, l);
  }, t.getType = function(o) {
    if (o.type === void 0 && o.pattern instanceof RegExp && (o.type = "pattern"), typeof o.validator != "function" && o.type && !ed.hasOwnProperty(o.type))
      throw new Error(Mi("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), r = i.indexOf("message");
    return r !== -1 && i.splice(r, 1), i.length === 1 && i[0] === "required" ? ed.required : ed[this.getType(o)] || void 0;
  }, e;
})();
qd.register = function(t, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  ed[t] = n;
};
qd.warning = o_;
qd.messages = yb;
qd.validators = ed;
function Tl(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function r_(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 a_(e, t, n, o) {
  if (!t.length)
    return n;
  const [i, ...r] = t;
  let a;
  return !e && typeof i == "number" ? a = [] : Array.isArray(e) ? a = [...e] : a = O({}, e), o && n === void 0 && r.length === 1 ? delete a[i][r[0]] : a[i] = a_(a[i], r, n, o), a;
}
function Aq(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return t.length && o && n === void 0 && !r_(e, t.slice(0, -1)) ? e : a_(e, t, n, o);
}
function xb(e) {
  return Tl(e);
}
function Rq(e, t) {
  return r_(e, t);
}
function Nq(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return Aq(e, t, n, o);
}
function zq(e, t) {
  return e && e.some((n) => Fq(n, t));
}
function gC(e) {
  return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
}
function l_(e, t) {
  const n = Array.isArray(e) ? [...e] : O({}, e);
  return t && Object.keys(t).forEach((o) => {
    const i = n[o], r = t[o], a = gC(i) && gC(r);
    n[o] = a ? l_(i, r || {}) : r;
  }), n;
}
function Bq(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, r) => l_(i, r), e);
}
function vC(e, t) {
  let n = {};
  return t.forEach((o) => {
    const i = Rq(e, o);
    n = Nq(n, o, i);
  }), n;
}
function Fq(e, t) {
  return !e || !t || e.length !== t.length ? !1 : e.every((n, o) => t[o] === n);
}
const Ci = "'${name}' is not a valid ${type}", Jh = {
  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: Ci,
    method: Ci,
    array: Ci,
    object: Ci,
    number: Ci,
    date: Ci,
    boolean: Ci,
    integer: Ci,
    float: Ci,
    regexp: Ci,
    email: Ci,
    url: Ci,
    hex: Ci
  },
  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 eg = function(e, t, n, o) {
  function i(r) {
    return r instanceof n ? r : new n(function(a) {
      a(r);
    });
  }
  return new (n || (n = Promise))(function(r, a) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        a(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        a(d);
      }
    }
    function u(c) {
      c.done ? r(c.value) : i(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const Lq = qd;
function Hq(e, t) {
  return e.replace(/\$\{\w+\}/g, (n) => {
    const o = n.slice(2, -1);
    return t[o];
  });
}
function wb(e, t, n, o, i) {
  return eg(this, void 0, void 0, function* () {
    const r = O({}, n);
    delete r.ruleIndex, delete r.trigger;
    let a = null;
    r && r.type === "array" && r.defaultField && (a = r.defaultField, delete r.defaultField);
    const l = new Lq({
      [e]: [r]
    }), s = Bq({}, Jh, o.validateMessages);
    l.messages(s);
    let u = [];
    try {
      yield Promise.resolve(l.validate({
        [e]: t
      }, O({}, o)));
    } catch (f) {
      f.errors ? u = f.errors.map((p, v) => {
        let {
          message: g
        } = p;
        return (
          // Wrap VueNode with `key`
          Ao(g) ? _l(g, {
            key: `error_${v}`
          }) : g
        );
      }) : (console.error(f), u = [s.default()]);
    }
    if (!u.length && a)
      return (yield Promise.all(t.map((p, v) => wb(`${e}.${v}`, p, a, o, i)))).reduce((p, v) => [...p, ...v], []);
    const c = O(O(O({}, n), {
      name: e,
      enum: (n.enum || []).join(", ")
    }), i);
    return u.map((f) => typeof f == "string" ? Hq(f, c) : f);
  });
}
function s_(e, t, n, o, i, r) {
  const a = e.join("."), l = n.map((u, c) => {
    const d = u.validator, f = O(O({}, u), {
      ruleIndex: c
    });
    return d && (f.validator = (p, v, g) => {
      let m = !1;
      const S = d(p, v, function() {
        for (var C = arguments.length, P = new Array(C), $ = 0; $ < C; $++)
          P[$] = arguments[$];
        Promise.resolve().then(() => {
          wn(!m, "Your validator function has already return a promise. `callback` will be ignored."), m || g(...P);
        });
      });
      m = S && typeof S.then == "function" && typeof S.catch == "function", wn(m, "`callback` is deprecated. Please return a promise instead."), m && S.then(() => {
        g();
      }).catch((C) => {
        g(C || " ");
      });
    }), f;
  }).sort((u, c) => {
    let {
      warningOnly: d,
      ruleIndex: f
    } = u, {
      warningOnly: p,
      ruleIndex: v
    } = c;
    return !!d == !!p ? f - v : d ? 1 : -1;
  });
  let s;
  if (i === !0)
    s = new Promise((u, c) => eg(this, void 0, void 0, function* () {
      for (let d = 0; d < l.length; d += 1) {
        const f = l[d], p = yield wb(a, t, f, o, r);
        if (p.length) {
          c([{
            errors: p,
            rule: f
          }]);
          return;
        }
      }
      u([]);
    }));
  else {
    const u = l.map((c) => wb(a, t, c, o, r).then((d) => ({
      errors: d,
      rule: c
    })));
    s = (i ? jq(u) : Vq(u)).then((c) => Promise.reject(c));
  }
  return s.catch((u) => u), s;
}
function Vq(e) {
  return eg(this, void 0, void 0, function* () {
    return Promise.all(e).then((t) => [].concat(...t));
  });
}
function jq(e) {
  return eg(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 u_ = Symbol("formContextKey"), c_ = (e) => {
  Ft(u_, e);
}, nx = () => zt(u_, {
  name: E(() => {
  }),
  labelAlign: E(() => "right"),
  vertical: E(() => !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: E(() => {
  }),
  rules: E(() => {
  }),
  colon: E(() => {
  }),
  labelWrap: E(() => {
  }),
  labelCol: E(() => {
  }),
  requiredMark: E(() => !1),
  validateTrigger: E(() => {
  }),
  onValidate: () => {
  },
  validateMessages: E(() => Jh)
}), d_ = Symbol("formItemPrefixContextKey"), Wq = (e) => {
  Ft(d_, e);
}, Kq = () => zt(d_, {
  prefixCls: E(() => "")
});
function qq(e) {
  return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
}
const Yq = () => ({
  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]
}), Gq = ["xs", "sm", "md", "lg", "xl", "xxl"], ox = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACol",
  inheritAttrs: !1,
  props: Yq(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      gutter: i,
      supportFlexGap: r,
      wrap: a
    } = UK(), {
      prefixCls: l,
      direction: s
    } = Rt("col", e), [u, c] = tq(l), d = E(() => {
      const {
        span: p,
        order: v,
        offset: g,
        push: m,
        pull: x
      } = e, S = l.value;
      let C = {};
      return Gq.forEach((P) => {
        let $ = {};
        const I = e[P];
        typeof I == "number" ? $.span = I : typeof I == "object" && ($ = I || {}), C = O(O({}, C), {
          [`${S}-${P}-${$.span}`]: $.span !== void 0,
          [`${S}-${P}-order-${$.order}`]: $.order || $.order === 0,
          [`${S}-${P}-offset-${$.offset}`]: $.offset || $.offset === 0,
          [`${S}-${P}-push-${$.push}`]: $.push || $.push === 0,
          [`${S}-${P}-pull-${$.pull}`]: $.pull || $.pull === 0,
          [`${S}-rtl`]: s.value === "rtl"
        });
      }), _e(S, {
        [`${S}-${p}`]: p !== void 0,
        [`${S}-order-${v}`]: v,
        [`${S}-offset-${g}`]: g,
        [`${S}-push-${m}`]: m,
        [`${S}-pull-${x}`]: x
      }, C, o.class, c.value);
    }), f = E(() => {
      const {
        flex: p
      } = e, v = i.value, g = {};
      if (v && v[0] > 0) {
        const m = `${v[0] / 2}px`;
        g.paddingLeft = m, g.paddingRight = m;
      }
      if (v && v[1] > 0 && !r.value) {
        const m = `${v[1] / 2}px`;
        g.paddingTop = m, g.paddingBottom = m;
      }
      return p && (g.flex = qq(p), a.value === !1 && !g.minWidth && (g.minWidth = 0)), g;
    });
    return () => {
      var p;
      return u(h("div", Q(Q({}, o), {}, {
        class: d.value,
        style: [f.value, o.style]
      }), [(p = n.default) === null || p === void 0 ? void 0 : p.call(n)]));
    };
  }
});
var Uq = { 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 mC(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) {
      Xq(e, i, n[i]);
    });
  }
  return e;
}
function Xq(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ix = function(t, n) {
  var o = mC({}, t, n.attrs);
  return h(an, mC({}, o, {
    icon: Uq
  }), null);
};
ix.displayName = "QuestionCircleOutlined";
ix.inheritAttrs = !1;
const rx = (e, t) => {
  let {
    slots: n,
    emit: o,
    attrs: i
  } = t;
  var r, a, l, s, u;
  const {
    prefixCls: c,
    htmlFor: d,
    labelCol: f,
    labelAlign: p,
    colon: v,
    required: g,
    requiredMark: m
  } = O(O({}, e), i), [x] = Nl("Form"), S = (r = e.label) !== null && r !== void 0 ? r : (a = n.label) === null || a === void 0 ? void 0 : a.call(n);
  if (!S) return null;
  const {
    vertical: C,
    labelAlign: P,
    labelCol: $,
    labelWrap: I,
    colon: w
  } = nx(), M = f || $?.value || {}, _ = p || P?.value, N = `${c}-item-label`, R = _e(N, _ === "left" && `${N}-left`, M.class, {
    [`${N}-wrap`]: !!I.value
  });
  let H = S;
  const L = v === !0 || w?.value !== !1 && v !== !1;
  if (L && !C.value && typeof S == "string" && S.trim() !== "" && (H = S.replace(/[:|：]\s*$/, "")), e.tooltip || n.tooltip) {
    const G = h("span", {
      class: `${c}-item-tooltip`
    }, [h(Lo, {
      title: e.tooltip
    }, {
      default: () => [h(ix, null, null)]
    })]);
    H = h(Je, null, [H, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
      class: `${c}-item-tooltip`
    }) : G]);
  }
  m === "optional" && !g && (H = h(Je, null, [H, h("span", {
    class: `${c}-item-optional`
  }, [((s = x.value) === null || s === void 0 ? void 0 : s.optional) || ((u = La.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  const A = _e({
    [`${c}-item-required`]: g,
    [`${c}-item-required-mark-optional`]: m === "optional",
    [`${c}-item-no-colon`]: !L
  });
  return h(ox, Q(Q({}, M), {}, {
    class: R
  }), {
    default: () => [h("label", {
      for: d,
      class: A,
      title: typeof S == "string" ? S : "",
      onClick: (G) => o("click", G)
    }, [H])]
  });
};
rx.displayName = "FormItemLabel";
rx.inheritAttrs = !1;
const Qq = (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)"
        }
      }
    }
  };
}, Zq = (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
  }
}), bC = (e, t) => {
  const {
    formItemCls: n
  } = e;
  return {
    [n]: {
      [`${n}-label > label`]: {
        height: t
      },
      [`${n}-control-input`]: {
        minHeight: t
      }
    }
  };
}, Jq = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [e.componentCls]: O(O(O({}, fn(e)), Zq(e)), {
      [`${t}-text`]: {
        display: "inline-block",
        paddingInlineEnd: e.paddingSM
      },
      // ================================================================
      // =                             Size                             =
      // ================================================================
      "&-small": O({}, bC(e, e.controlHeightSM)),
      "&-large": O({}, bC(e, e.controlHeightLG))
    })
  };
}, eY = (e) => {
  const {
    formItemCls: t,
    iconCls: n,
    componentCls: o,
    rootPrefixCls: i
  } = e;
  return {
    [t]: O(O({}, fn(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: y0,
        animationDuration: e.motionDurationMid,
        animationTimingFunction: e.motionEaseOutBack,
        pointerEvents: "none",
        "&-success": {
          color: e.colorSuccess
        },
        "&-error": {
          color: e.colorError
        },
        "&-warning": {
          color: e.colorWarning
        },
        "&-validating": {
          color: e.colorPrimary
        }
      }
    })
  };
}, tY = (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"
      }
    }
  };
}, nY = (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"
        }
      }
    }
  };
}, bu = (e) => ({
  margin: 0,
  padding: `0 0 ${e.paddingXS}px`,
  whiteSpace: "initial",
  textAlign: "start",
  "> label": {
    margin: 0,
    "&::after": {
      display: "none"
    }
  }
}), oY = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${n} ${n}-label`]: bu(e),
    [t]: {
      [n]: {
        flexWrap: "wrap",
        [`${n}-label,
          ${n}-control`]: {
          flex: "0 0 100%",
          maxWidth: "100%"
        }
      }
    }
  };
}, iY = (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`]: bu(e),
    [`@media (max-width: ${e.screenXSMax}px)`]: [oY(e), {
      [t]: {
        [`.${o}-col-xs-24${n}-label`]: bu(e)
      }
    }],
    [`@media (max-width: ${e.screenSMMax}px)`]: {
      [t]: {
        [`.${o}-col-sm-24${n}-label`]: bu(e)
      }
    },
    [`@media (max-width: ${e.screenMDMax}px)`]: {
      [t]: {
        [`.${o}-col-md-24${n}-label`]: bu(e)
      }
    },
    [`@media (max-width: ${e.screenLGMax}px)`]: {
      [t]: {
        [`.${o}-col-lg-24${n}-label`]: bu(e)
      }
    }
  };
}, ax = On("Form", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = Qt(e, {
    formItemCls: `${e.componentCls}-item`,
    rootPrefixCls: n
  });
  return [Jq(o), eY(o), Qq(o), tY(o), nY(o), iY(o), Vh(o), y0];
}), rY = be({
  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
    } = Kq(), r = E(() => `${o.value}-item-explain`), a = E(() => !!(e.errors && e.errors.length)), l = le(i.value), [, s] = ax(o);
    return Ie([a, i], () => {
      a.value && (l.value = i.value);
    }), () => {
      var u, c;
      const d = jh(`${o.value}-show-help-item`), f = i0(`${o.value}-show-help-item`, d);
      return f.role = "alert", f.class = [s.value, r.value, n.class, `${o.value}-show-help`], h(Ei, Q(Q({}, Ts(`${o.value}-show-help`)), {}, {
        onAfterEnter: () => e.onErrorVisibleChanged(!0),
        onAfterLeave: () => e.onErrorVisibleChanged(!1)
      }), {
        default: () => [er(h(Zb, Q(Q({}, f), {}, {
          tag: "div"
        }), {
          default: () => [(c = e.errors) === null || c === void 0 ? void 0 : c.map((p, v) => h("div", {
            key: v,
            class: l.value ? `${r.value}-${l.value}` : ""
          }, [p]))]
        }), [[Or, !!(!((u = e.errors) === null || u === void 0) && u.length)]])]
      });
    };
  }
}), aY = be({
  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 = nx(), {
      wrapperCol: i
    } = o, r = O({}, o);
    return delete r.labelCol, delete r.wrapperCol, c_(r), Wq({
      prefixCls: E(() => e.prefixCls),
      status: E(() => e.status)
    }), () => {
      var a, l, s;
      const {
        prefixCls: u,
        wrapperCol: c,
        marginBottom: d,
        onErrorVisibleChanged: f,
        help: p = (a = n.help) === null || a === void 0 ? void 0 : a.call(n),
        errors: v = Do((l = n.errors) === null || l === void 0 ? void 0 : l.call(n)),
        // hasFeedback,
        // status,
        extra: g = (s = n.extra) === null || s === void 0 ? void 0 : s.call(n)
      } = e, m = `${u}-item`, x = c || i?.value || {}, S = _e(`${m}-control`, x.class);
      return h(ox, Q(Q({}, x), {}, {
        class: S
      }), {
        default: () => {
          var C;
          return h(Je, null, [h("div", {
            class: `${m}-control-input`
          }, [h("div", {
            class: `${m}-control-input-content`
          }, [(C = n.default) === null || C === void 0 ? void 0 : C.call(n)])]), d !== null || v.length ? h("div", {
            style: {
              display: "flex",
              flexWrap: "nowrap"
            }
          }, [h(rY, {
            errors: v,
            help: p,
            class: `${m}-explain-connected`,
            onErrorVisibleChanged: f
          }, null), !!d && h("div", {
            style: {
              width: 0,
              height: `${d}px`
            }
          }, null)]) : null, g ? h("div", {
            class: `${m}-extra`
          }, [g]) : null]);
        }
      });
    };
  }
});
function lY(e) {
  const t = $e(e.value.slice());
  let n = null;
  return It(() => {
    clearTimeout(n), n = setTimeout(() => {
      t.value = e.value;
    }, e.value.length ? 0 : 10);
  }), t;
}
Mr("success", "warning", "error", "validating", "");
const sY = {
  success: Bl,
  warning: Fl,
  error: zi,
  validating: _r
};
function bv(e, t, n) {
  let o = e;
  const i = t;
  let r = 0;
  try {
    for (let a = i.length; r < a - 1 && !(!o && !n); ++r) {
      const l = i[r];
      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[r],
    v: o ? o[i[r]] : void 0
  };
}
const uY = () => ({
  htmlFor: String,
  prefixCls: String,
  label: pe.any,
  help: pe.any,
  extra: pe.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: pe.oneOf(Mr("", "success", "warning", "error", "validating")),
  validateTrigger: {
    type: [String, Array]
  },
  messageVariables: {
    type: Object
  },
  hidden: Boolean,
  noStyle: Boolean,
  tooltip: String
});
let cY = 0;
const dY = "form_item", fY = be({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItem",
  inheritAttrs: !1,
  __ANT_NEW_FORM_ITEM: !0,
  props: uY(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i
    } = t;
    wn(e.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
    const r = `form-item-${++cY}`, {
      prefixCls: a
    } = Rt("form", e), [l, s] = ax(a), u = $e(), c = nx(), d = E(() => e.name || e.prop), f = $e([]), p = $e(!1), v = $e(), g = E(() => {
      const re = d.value;
      return xb(re);
    }), m = E(() => {
      if (g.value.length) {
        const re = c.name.value, ie = g.value.join("_");
        return re ? `${re}_${ie}` : `${dY}_${ie}`;
      } else
        return;
    }), x = () => {
      const re = c.model.value;
      if (!(!re || !d.value))
        return bv(re, g.value, !0).v;
    }, S = E(() => x()), C = $e(Kf(S.value)), P = E(() => {
      let re = e.validateTrigger !== void 0 ? e.validateTrigger : c.validateTrigger.value;
      return re = re === void 0 ? "change" : re, Tl(re);
    }), $ = E(() => {
      let re = c.rules.value;
      const ie = e.rules, te = e.required !== void 0 ? {
        required: !!e.required,
        trigger: P.value
      } : [], ve = bv(re, g.value);
      re = re ? ve.o[ve.k] || ve.v : [];
      const ce = [].concat(ie || re || []);
      return jE(ce, (fe) => fe.required) ? ce : ce.concat(te);
    }), I = E(() => {
      const re = $.value;
      let ie = !1;
      return re && re.length && re.every((te) => te.required ? (ie = !0, !1) : !0), ie || e.required;
    }), w = $e();
    It(() => {
      w.value = e.validateStatus;
    });
    const M = E(() => {
      let re = {};
      return typeof e.label == "string" ? re.label = e.label : e.name && (re.label = String(e.name)), e.messageVariables && (re = O(O({}, re), e.messageVariables)), re;
    }), _ = (re) => {
      if (g.value.length === 0)
        return;
      const {
        validateFirst: ie = !1
      } = e, {
        triggerName: te
      } = re || {};
      let ve = $.value;
      if (te && (ve = ve.filter((fe) => {
        const {
          trigger: ge
        } = fe;
        return !ge && !P.value.length ? !0 : Tl(ge || P.value).includes(te);
      })), !ve.length)
        return Promise.resolve();
      const ce = s_(g.value, S.value, ve, O({
        validateMessages: c.validateMessages.value
      }, re), ie, M.value);
      return w.value = "validating", f.value = [], ce.catch((fe) => fe).then(function() {
        let fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        if (w.value === "validating") {
          const ge = fe.filter((Me) => Me && Me.errors.length);
          w.value = ge.length ? "error" : "success", f.value = ge.map((Me) => Me.errors), c.onValidate(d.value, !f.value.length, f.value.length ? di(f.value[0]) : null);
        }
      }), ce;
    }, N = () => {
      _({
        triggerName: "blur"
      });
    }, R = () => {
      if (p.value) {
        p.value = !1;
        return;
      }
      _({
        triggerName: "change"
      });
    }, H = () => {
      w.value = e.validateStatus, p.value = !1, f.value = [];
    }, L = () => {
      var re;
      w.value = e.validateStatus, p.value = !0, f.value = [];
      const ie = c.model.value || {}, te = S.value, ve = bv(ie, g.value, !0);
      Array.isArray(te) ? ve.o[ve.k] = [].concat((re = C.value) !== null && re !== void 0 ? re : []) : ve.o[ve.k] = C.value, Yt(() => {
        p.value = !1;
      });
    }, B = E(() => e.htmlFor === void 0 ? m.value : e.htmlFor), A = () => {
      const re = B.value;
      if (!re || !v.value)
        return;
      const ie = v.value.$el.querySelector(`[id="${re}"]`);
      ie && ie.focus && ie.focus();
    };
    i({
      onFieldBlur: N,
      onFieldChange: R,
      clearValidate: H,
      resetField: L
    }), CV({
      id: m,
      onFieldBlur: () => {
        e.autoLink && N();
      },
      onFieldChange: () => {
        e.autoLink && R();
      },
      clearValidate: H
    }, E(() => !!(e.autoLink && c.model.value && d.value)));
    let G = !1;
    Ie(d, (re) => {
      re ? G || (G = !0, c.addField(r, {
        fieldValue: S,
        fieldId: m,
        fieldName: d,
        resetField: L,
        clearValidate: H,
        namePath: g,
        validateRules: _,
        rules: $
      })) : (G = !1, c.removeField(r));
    }, {
      immediate: !0
    }), qt(() => {
      c.removeField(r);
    });
    const j = lY(f), Z = E(() => e.validateStatus !== void 0 ? e.validateStatus : j.value.length ? "error" : w.value), W = E(() => ({
      [`${a.value}-item`]: !0,
      [s.value]: !0,
      // Status
      [`${a.value}-item-has-feedback`]: Z.value && e.hasFeedback,
      [`${a.value}-item-has-success`]: Z.value === "success",
      [`${a.value}-item-has-warning`]: Z.value === "warning",
      [`${a.value}-item-has-error`]: Z.value === "error",
      [`${a.value}-item-is-validating`]: Z.value === "validating",
      [`${a.value}-item-hidden`]: e.hidden
    })), K = $n({});
    Ai.useProvide(K), It(() => {
      let re;
      if (e.hasFeedback) {
        const ie = Z.value && sY[Z.value];
        re = ie ? h("span", {
          class: _e(`${a.value}-item-feedback-icon`, `${a.value}-item-feedback-icon-${Z.value}`)
        }, [h(ie, null, null)]) : null;
      }
      O(K, {
        status: Z.value,
        hasFeedback: e.hasFeedback,
        feedbackIcon: re,
        isFormItemInput: !0
      });
    });
    const q = $e(null), U = $e(!1), ae = () => {
      if (u.value) {
        const re = getComputedStyle(u.value);
        q.value = parseInt(re.marginBottom, 10);
      }
    };
    At(() => {
      Ie(U, () => {
        U.value && ae();
      }, {
        flush: "post",
        immediate: !0
      });
    });
    const se = (re) => {
      re || (q.value = null);
    };
    return () => {
      var re, ie;
      if (e.noStyle) return (re = n.default) === null || re === void 0 ? void 0 : re.call(n);
      const te = (ie = e.help) !== null && ie !== void 0 ? ie : n.help ? Do(n.help()) : null, ve = !!(te != null && Array.isArray(te) && te.length || j.value.length);
      return U.value = ve, l(h("div", {
        class: [W.value, ve ? `${a.value}-item-with-help` : "", o.class],
        ref: u
      }, [h(n_, Q(Q({}, o), {}, {
        class: `${a.value}-item-row`,
        key: "row"
      }), {
        default: () => {
          var ce, fe;
          return h(Je, null, [h(rx, Q(Q({}, e), {}, {
            htmlFor: B.value,
            required: I.value,
            requiredMark: c.requiredMark.value,
            prefixCls: a.value,
            onClick: A,
            label: e.label
          }), {
            label: n.label,
            tooltip: n.tooltip
          }), h(aY, Q(Q({}, e), {}, {
            errors: te != null ? Tl(te) : j.value,
            marginBottom: q.value,
            prefixCls: a.value,
            status: Z.value,
            ref: v,
            help: te,
            extra: (ce = e.extra) !== null && ce !== void 0 ? ce : (fe = n.extra) === null || fe === void 0 ? void 0 : fe.call(n),
            onErrorVisibleChanged: se
          }), {
            default: n.default
          })]);
        }
      }), !!q.value && h("div", {
        class: `${a.value}-margin-offset`,
        style: {
          marginBottom: `-${q.value}px`
        }
      }, null)]));
    };
  }
});
function f_(e) {
  let t = !1, n = e.length;
  const o = [];
  return e.length ? new Promise((i, r) => {
    e.forEach((a, l) => {
      a.catch((s) => (t = !0, s)).then((s) => {
        n -= 1, o[l] = s, !(n > 0) && (t && r(o), i(o));
      });
    });
  }) : Promise.resolve([]);
}
function yC(e) {
  let t = !1;
  return e && e.length && e.every((n) => n.required ? (t = !0, !1) : !0), t;
}
function xC(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function yv(e, t, n) {
  let o = e;
  t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
  const i = t.split(".");
  let r = 0;
  for (let a = i.length; r < a - 1 && !(!o && !n); ++r) {
    const l = i[r];
    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[r],
    v: o ? o[i[r]] : null,
    isValid: o && i[r] in o
  };
}
function pY(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : le({}), n = arguments.length > 2 ? arguments[2] : void 0;
  const o = Kf(T(e)), i = $n({}), r = $e([]), a = (C) => {
    O(T(e), O(O({}, Kf(o)), C)), Yt(() => {
      Object.keys(i).forEach((P) => {
        i[P] = {
          autoLink: !1,
          required: yC(T(t)[P])
        };
      });
    });
  }, l = function() {
    let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], P = arguments.length > 1 ? arguments[1] : void 0;
    return P.length ? C.filter(($) => {
      const I = xC($.trigger || "change");
      return WE(I, P).length;
    }) : C;
  };
  let s = null;
  const u = function(C) {
    let P = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, $ = arguments.length > 2 ? arguments[2] : void 0;
    const I = [], w = {};
    for (let N = 0; N < C.length; N++) {
      const R = C[N], H = yv(T(e), R, $);
      if (!H.isValid) continue;
      w[R] = H.v;
      const L = l(T(t)[R], xC(P && P.trigger));
      L.length && I.push(c(R, H.v, L, P || {}).then(() => ({
        name: R,
        errors: [],
        warnings: []
      })).catch((B) => {
        const A = [], G = [];
        return B.forEach((j) => {
          let {
            rule: {
              warningOnly: Z
            },
            errors: W
          } = j;
          Z ? G.push(...W) : A.push(...W);
        }), A.length ? Promise.reject({
          name: R,
          errors: A,
          warnings: G
        }) : {
          name: R,
          errors: A,
          warnings: G
        };
      }));
    }
    const M = f_(I);
    s = M;
    const _ = M.then(() => s === M ? Promise.resolve(w) : Promise.reject([])).catch((N) => {
      const R = N.filter((H) => H && H.errors.length);
      return R.length ? Promise.reject({
        values: w,
        errorFields: R,
        outOfDate: s !== M
      }) : Promise.resolve(w);
    });
    return _.catch((N) => N), _;
  }, c = function(C, P, $) {
    let I = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    const w = s_([C], P, $, O({
      validateMessages: Jh
    }, I), !!I.validateFirst);
    return i[C] ? (i[C].validateStatus = "validating", w.catch((M) => M).then(function() {
      let M = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      var _;
      if (i[C].validateStatus === "validating") {
        const N = M.filter((R) => R && R.errors.length);
        i[C].validateStatus = N.length ? "error" : "success", i[C].help = N.length ? N.map((R) => R.errors) : null, (_ = n?.onValidate) === null || _ === void 0 || _.call(n, C, !N.length, N.length ? di(i[C].help[0]) : null);
      }
    }), w) : w.catch((M) => M);
  }, d = (C, P) => {
    let $ = [], I = !0;
    C ? Array.isArray(C) ? $ = C : $ = [C] : (I = !1, $ = r.value);
    const w = u($, P || {}, I);
    return w.catch((M) => M), w;
  }, f = (C) => {
    let P = [];
    C ? Array.isArray(C) ? P = C : P = [C] : P = r.value, P.forEach(($) => {
      i[$] && O(i[$], {
        validateStatus: "",
        help: null
      });
    });
  }, p = (C) => {
    const P = {
      autoLink: !1
    }, $ = [], I = Array.isArray(C) ? C : [C];
    for (let w = 0; w < I.length; w++) {
      const M = I[w];
      M?.validateStatus === "error" && (P.validateStatus = "error", M.help && $.push(M.help)), P.required = P.required || M?.required;
    }
    return P.help = $, P;
  };
  let v = o, g = !0;
  const m = (C) => {
    const P = [];
    r.value.forEach(($) => {
      const I = yv(C, $, !1), w = yv(v, $, !1);
      (g && n?.immediate && I.isValid || !ey(I.v, w.v)) && P.push($);
    }), d(P, {
      trigger: "change"
    }), g = !1, v = Kf(di(C));
  }, x = n?.debounce;
  let S = !0;
  return Ie(t, () => {
    r.value = t ? Object.keys(T(t)) : [], !S && n && n.validateOnRuleChange && d(), S = !1;
  }, {
    deep: !0,
    immediate: !0
  }), Ie(r, () => {
    const C = {};
    r.value.forEach((P) => {
      C[P] = O({}, i[P], {
        autoLink: !1,
        required: yC(T(t)[P])
      }), delete i[P];
    });
    for (const P in i)
      Object.prototype.hasOwnProperty.call(i, P) && delete i[P];
    O(i, C);
  }, {
    immediate: !0
  }), Ie(e, x && x.wait ? zP(m, x.wait, KE(x, ["wait"])) : m, {
    immediate: n && !!n.immediate,
    deep: !0
  }), {
    modelRef: e,
    rulesRef: t,
    initialModel: o,
    validateInfos: i,
    resetFields: a,
    validate: d,
    validateField: c,
    mergeValidateInfo: p,
    clearValidate: f
  };
}
const hY = () => ({
  layout: pe.oneOf(Mr("horizontal", "inline", "vertical")),
  labelCol: _t(),
  wrapperCol: _t(),
  colon: ct(),
  labelAlign: rn(),
  labelWrap: ct(),
  prefixCls: String,
  requiredMark: en([String, Boolean]),
  /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  hideRequiredMark: ct(),
  model: pe.object,
  rules: _t(),
  validateMessages: _t(),
  validateOnRuleChange: ct(),
  // 提交失败自动滚动到第一个错误字段
  scrollToFirstError: Ii(),
  onSubmit: et(),
  name: String,
  validateTrigger: en([String, Array]),
  size: rn(),
  disabled: ct(),
  onValuesChange: et(),
  onFieldsChange: et(),
  onFinish: et(),
  onFinishFailed: et(),
  onValidate: et()
});
function gY(e, t) {
  return ey(Tl(e), Tl(t));
}
const yl = be({
  compatConfig: {
    MODE: 3
  },
  name: "AForm",
  inheritAttrs: !1,
  props: _n(hY(), {
    layout: "horizontal",
    hideRequiredMark: !1,
    colon: !0
  }),
  Item: fY,
  useForm: pY,
  // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      expose: i,
      attrs: r
    } = t;
    const {
      prefixCls: a,
      direction: l,
      form: s,
      size: u,
      disabled: c
    } = Rt("form", e), d = E(() => e.requiredMark === "" || e.requiredMark), f = E(() => {
      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;
    });
    MI(u), Yk(c);
    const p = E(() => {
      var j, Z;
      return (j = e.colon) !== null && j !== void 0 ? j : (Z = s.value) === null || Z === void 0 ? void 0 : Z.colon;
    }), {
      validateMessages: v
    } = nL(), g = E(() => O(O(O({}, Jh), v.value), e.validateMessages)), [m, x] = ax(a), S = E(() => _e(a.value, {
      [`${a.value}-${e.layout}`]: !0,
      [`${a.value}-hide-required-mark`]: f.value === !1,
      [`${a.value}-rtl`]: l.value === "rtl",
      [`${a.value}-${u.value}`]: u.value
    }, x.value)), C = le(), P = {}, $ = (j, Z) => {
      P[j] = Z;
    }, I = (j) => {
      delete P[j];
    }, w = (j) => {
      const Z = !!j, W = Z ? Tl(j).map(xb) : [];
      return Z ? Object.values(P).filter((K) => W.findIndex((q) => gY(q, K.fieldName.value)) > -1) : Object.values(P);
    }, M = (j) => {
      if (!e.model) {
        wo(!1, "Form", "model is required for resetFields to work.");
        return;
      }
      w(j).forEach((Z) => {
        Z.resetField();
      });
    }, _ = (j) => {
      w(j).forEach((Z) => {
        Z.clearValidate();
      });
    }, N = (j) => {
      const {
        scrollToFirstError: Z
      } = e;
      if (n("finishFailed", j), Z && j.errorFields.length) {
        let W = {};
        typeof Z == "object" && (W = Z), H(j.errorFields[0].name, W);
      }
    }, R = function() {
      return A(...arguments);
    }, H = function(j) {
      let Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const W = w(j ? [j] : void 0);
      if (W.length) {
        const K = W[0].fieldId.value, q = K ? document.getElementById(K) : null;
        q && G8(q, O({
          scrollMode: "if-needed",
          block: "nearest"
        }, Z));
      }
    }, L = function() {
      let j = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
      if (j === !0) {
        const Z = [];
        return Object.values(P).forEach((W) => {
          let {
            namePath: K
          } = W;
          Z.push(K.value);
        }), vC(e.model, Z);
      } else
        return vC(e.model, j);
    }, B = (j, Z) => {
      if (wo(!(j instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
        return wo(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
      const W = !!j, K = W ? Tl(j).map(xb) : [], q = [];
      Object.values(P).forEach((se) => {
        var re;
        if (W || K.push(se.namePath.value), !(!((re = se.rules) === null || re === void 0) && re.value.length))
          return;
        const ie = se.namePath.value;
        if (!W || zq(K, ie)) {
          const te = se.validateRules(O({
            validateMessages: g.value
          }, Z));
          q.push(te.then(() => ({
            name: ie,
            errors: [],
            warnings: []
          })).catch((ve) => {
            const ce = [], fe = [];
            return ve.forEach((ge) => {
              let {
                rule: {
                  warningOnly: Me
                },
                errors: ze
              } = ge;
              Me ? fe.push(...ze) : ce.push(...ze);
            }), ce.length ? Promise.reject({
              name: ie,
              errors: ce,
              warnings: fe
            }) : {
              name: ie,
              errors: ce,
              warnings: fe
            };
          }));
        }
      });
      const U = f_(q);
      C.value = U;
      const ae = U.then(() => C.value === U ? Promise.resolve(L(K)) : Promise.reject([])).catch((se) => {
        const re = se.filter((ie) => ie && ie.errors.length);
        return Promise.reject({
          values: L(K),
          errorFields: re,
          outOfDate: C.value !== U
        });
      });
      return ae.catch((se) => se), ae;
    }, A = function() {
      return B(...arguments);
    }, G = (j) => {
      j.preventDefault(), j.stopPropagation(), n("submit", j), e.model && B().then((W) => {
        n("finish", W);
      }).catch((W) => {
        N(W);
      });
    };
    return i({
      resetFields: M,
      clearValidate: _,
      validateFields: B,
      getFieldsValue: L,
      validate: R,
      scrollToField: H
    }), c_({
      model: E(() => e.model),
      name: E(() => e.name),
      labelAlign: E(() => e.labelAlign),
      labelCol: E(() => e.labelCol),
      labelWrap: E(() => e.labelWrap),
      wrapperCol: E(() => e.wrapperCol),
      vertical: E(() => e.layout === "vertical"),
      colon: p,
      requiredMark: f,
      validateTrigger: E(() => e.validateTrigger),
      rules: E(() => e.rules),
      addField: $,
      removeField: I,
      onValidate: (j, Z, W) => {
        n("validate", j, Z, W);
      },
      validateMessages: g
    }), Ie(() => e.rules, () => {
      e.validateOnRuleChange && B();
    }), () => {
      var j;
      return m(h("form", Q(Q({}, r), {}, {
        onSubmit: G,
        class: [S.value, r.class]
      }), [(j = o.default) === null || j === void 0 ? void 0 : j.call(o)]));
    };
  }
});
yl.useInjectFormItemContext = Bi;
yl.ItemRest = qm;
yl.install = function(e) {
  return e.component(yl.name, yl), e.component(yl.Item.name, yl.Item), e.component(qm.name, qm), e;
};
const vY = new tn("antCheckboxEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), mY = (e) => {
  const {
    checkboxCls: t
  } = e, n = `${t}-wrapper`;
  return [
    // ===================== Basic =====================
    {
      // Group
      [`${t}-group`]: O(O({}, fn(e)), {
        display: "inline-flex",
        flexWrap: "wrap",
        columnGap: e.marginXS,
        // Group > Grid
        [`> ${e.antCls}-row`]: {
          flex: 1
        }
      }),
      // Wrapper
      [n]: O(O({}, fn(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]: O(O({}, fn(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`]: O({}, Wa(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: vY,
          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 p_(e, t) {
  const n = Qt(t, {
    checkboxCls: `.${e}`,
    checkboxSize: t.controlInteractiveSize
  });
  return [mY(n)];
}
const h_ = On("Checkbox", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [p_(n, e)];
}), bY = () => ({
  name: String,
  prefixCls: String,
  options: Vn([]),
  disabled: Boolean,
  id: String
}), yY = () => O(O({}, bY()), {
  defaultValue: Vn(),
  value: Vn(),
  onChange: et(),
  "onUpdate:value": et()
}), xY = () => ({
  prefixCls: String,
  defaultChecked: ct(),
  checked: ct(),
  disabled: ct(),
  isGroup: ct(),
  value: pe.any,
  name: String,
  id: String,
  indeterminate: ct(),
  type: rn("checkbox"),
  autofocus: ct(),
  onChange: et(),
  "onUpdate:checked": et(),
  onClick: et(),
  skipGroup: ct(!1)
}), wY = () => O(O({}, xY()), {
  indeterminate: ct(!1)
}), g_ = Symbol("CheckboxGroupContext");
var wC = 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 Eo = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckbox",
  inheritAttrs: !1,
  __ANT_CHECKBOX: !0,
  props: wY(),
  // emits: ['change', 'update:checked'],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: i,
      expose: r
    } = t;
    const a = Bi(), l = Ai.useInject(), {
      prefixCls: s,
      direction: u,
      disabled: c
    } = Rt("checkbox", e), d = Tr(), [f, p] = h_(s), v = zt(g_, void 0), g = Symbol("checkboxUniId"), m = E(() => v?.disabled.value || c.value);
    It(() => {
      !e.skipGroup && v && v.registerValue(g, e.value);
    }), qt(() => {
      v && v.cancelValue(g);
    }), At(() => {
      wo(!!(e.checked !== void 0 || v || e.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
    });
    const x = ($) => {
      const I = $.target.checked;
      n("update:checked", I), n("change", $), a.onFieldChange();
    }, S = le();
    return r({
      focus: () => {
        var $;
        ($ = S.value) === null || $ === void 0 || $.focus();
      },
      blur: () => {
        var $;
        ($ = S.value) === null || $ === void 0 || $.blur();
      }
    }), () => {
      var $;
      const I = go(($ = i.default) === null || $ === void 0 ? void 0 : $.call(i)), {
        indeterminate: w,
        skipGroup: M,
        id: _ = a.id.value
      } = e, N = wC(e, ["indeterminate", "skipGroup", "id"]), {
        onMouseenter: R,
        onMouseleave: H,
        onInput: L,
        class: B,
        style: A
      } = o, G = wC(o, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), j = O(O(O(O({}, N), {
        id: _,
        prefixCls: s.value
      }), G), {
        disabled: m.value
      });
      v && !M ? (j.onChange = function() {
        for (var q = arguments.length, U = new Array(q), ae = 0; ae < q; ae++)
          U[ae] = arguments[ae];
        n("change", ...U), v.toggleOption({
          label: I,
          value: e.value
        });
      }, j.name = v.name.value, j.checked = v.mergedValue.value.includes(e.value), j.disabled = m.value || d.value, j.indeterminate = w) : j.onChange = x;
      const Z = _e({
        [`${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
      }, B, p.value), W = _e({
        [`${s.value}-indeterminate`]: w
      }, p.value);
      return f(h("label", {
        class: Z,
        style: A,
        onMouseenter: R,
        onMouseleave: H
      }, [h(CT, Q(Q({
        "aria-checked": w ? "mixed" : void 0
      }, j), {}, {
        class: W,
        ref: S
      }), null), I.length ? h("span", null, [I]) : null]));
    };
  }
}), Sb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckboxGroup",
  inheritAttrs: !1,
  props: yY(),
  // emits: ['change', 'update:value'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: i,
      expose: r
    } = t;
    const a = Bi(), {
      prefixCls: l,
      direction: s
    } = Rt("checkbox", e), u = E(() => `${l.value}-group`), [c, d] = h_(u), f = le((e.value === void 0 ? e.defaultValue : e.value) || []);
    Ie(() => e.value, () => {
      f.value = e.value || [];
    });
    const p = E(() => e.options.map((P) => typeof P == "string" || typeof P == "number" ? {
      label: P,
      value: P
    } : P)), v = le(Symbol()), g = le(/* @__PURE__ */ new Map()), m = (P) => {
      g.value.delete(P), v.value = Symbol();
    }, x = (P, $) => {
      g.value.set(P, $), v.value = Symbol();
    }, S = le(/* @__PURE__ */ new Map());
    return Ie(v, () => {
      const P = /* @__PURE__ */ new Map();
      for (const $ of g.value.values())
        P.set($, !0);
      S.value = P;
    }), Ft(g_, {
      cancelValue: m,
      registerValue: x,
      toggleOption: (P) => {
        const $ = f.value.indexOf(P.value), I = [...f.value];
        $ === -1 ? I.push(P.value) : I.splice($, 1), e.value === void 0 && (f.value = I);
        const w = I.filter((M) => S.value.has(M)).sort((M, _) => {
          const N = p.value.findIndex((H) => H.value === M), R = p.value.findIndex((H) => H.value === _);
          return N - R;
        });
        i("update:value", w), i("change", w), a.onFieldChange();
      },
      mergedValue: f,
      name: E(() => e.name),
      disabled: E(() => e.disabled)
    }), r({
      mergedValue: f
    }), () => {
      var P;
      const {
        id: $ = a.id.value
      } = e;
      let I = null;
      return p.value && p.value.length > 0 && (I = p.value.map((w) => {
        var M;
        return h(Eo, {
          prefixCls: l.value,
          key: w.value.toString(),
          disabled: "disabled" in w ? w.disabled : e.disabled,
          indeterminate: w.indeterminate,
          value: w.value,
          checked: f.value.indexOf(w.value) !== -1,
          onChange: w.onChange,
          class: `${u.value}-item`
        }, {
          default: () => [n.label !== void 0 ? (M = n.label) === null || M === void 0 ? void 0 : M.call(n, w) : w.label]
        });
      })), c(h("div", Q(Q({}, o), {}, {
        class: [u.value, {
          [`${u.value}-rtl`]: s.value === "rtl"
        }, o.class, d.value],
        id: $
      }), [I || ((P = n.default) === null || P === void 0 ? void 0 : P.call(n))]));
    };
  }
});
Eo.Group = Sb;
Eo.install = function(e) {
  return e.component(Eo.name, Eo), e.component(Sb.name, Sb), e;
};
const SY = rr(ox);
let cp = O({}, La.Modal);
function CY(e) {
  e ? cp = O(O({}, cp), e) : cp = O({}, La.Modal);
}
function $Y() {
  return cp;
}
const Cb = "internalMark", dp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    wo(e.ANT_MARK__ === Cb, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const o = $n({
      antLocale: O(O({}, e.locale), {
        exist: !0
      }),
      ANT_MARK__: Cb
    });
    return Ft("localeData", o), Ie(() => e.locale, (i) => {
      CY(i && i.Modal), o.antLocale = O(O({}, i), {
        exist: !0
      });
    }, {
      immediate: !0
    }), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
});
dp.install = function(e) {
  return e.component(dp.name, dp), e;
};
const PY = rr(dp), tg = be({
  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, r = !1;
    const a = E(() => e.duration === void 0 ? 4.5 : e.duration), l = () => {
      a.value && !r && (i = setTimeout(() => {
        u();
      }, a.value * 1e3));
    }, s = () => {
      i && (clearTimeout(i), i = null);
    }, u = (d) => {
      d && d.stopPropagation(), s();
      const {
        onClose: f,
        noticeKey: p
      } = e;
      f && f(p);
    }, c = () => {
      s(), l();
    };
    return At(() => {
      l();
    }), Vo(() => {
      r = !0, s();
    }), Ie([a, () => e.updateMark, () => e.visible], (d, f) => {
      let [p, v, g] = d, [m, x, S] = f;
      (p !== m || v !== x || g !== S && S) && c();
    }, {
      flush: "post"
    }), () => {
      var d, f;
      const {
        prefixCls: p,
        closable: v,
        closeIcon: g = (d = o.closeIcon) === null || d === void 0 ? void 0 : d.call(o),
        onClick: m,
        holder: x
      } = e, {
        class: S,
        style: C
      } = n, P = `${p}-notice`, $ = Object.keys(n).reduce((w, M) => ((M.startsWith("data-") || M.startsWith("aria-") || M === "role") && (w[M] = n[M]), w), {}), I = h("div", Q({
        class: _e(P, S, {
          [`${P}-closable`]: v
        }),
        style: C,
        onMouseenter: s,
        onMouseleave: l,
        onClick: m
      }, $), [h("div", {
        class: `${P}-content`
      }, [(f = o.default) === null || f === void 0 ? void 0 : f.call(o)]), v ? h("a", {
        tabindex: 0,
        onClick: u,
        class: `${P}-close`
      }, [g || h("span", {
        class: `${P}-close-x`
      }, null)]) : null]);
      return x ? h(nh, {
        to: x
      }, {
        default: () => I
      }) : I;
    };
  }
});
var OY = 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 SC = 0;
const kY = Date.now();
function CC() {
  const e = SC;
  return SC += 1, `rcNotification_${kY}_${e}`;
}
const Gp = be({
  name: "Notification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: i
    } = t;
    const r = /* @__PURE__ */ new Map(), a = le([]), l = E(() => {
      const {
        prefixCls: c,
        animation: d = "fade"
      } = e;
      let f = e.transitionName;
      return !f && d && (f = `${c}-${d}`), i0(f);
    }), s = (c, d) => {
      const f = c.key || CC(), p = O(O({}, c), {
        key: f
      }), {
        maxCount: v
      } = e, g = a.value.map((x) => x.notice.key).indexOf(f), m = a.value.concat();
      g !== -1 ? m.splice(g, 1, {
        notice: p,
        holderCallback: d
      }) : (v && a.value.length >= v && (p.key = m[0].notice.key, p.updateMark = CC(), p.userPassKey = f, m.shift()), m.push({
        notice: p,
        holderCallback: d
      })), a.value = m;
    }, u = (c) => {
      a.value = di(a.value).filter((d) => {
        let {
          notice: {
            key: f,
            userPassKey: p
          }
        } = d;
        return (p || f) !== c;
      });
    };
    return o({
      add: s,
      remove: u,
      notices: a
    }), () => {
      var c;
      const {
        prefixCls: d,
        closeIcon: f = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
          prefixCls: d
        })
      } = e, p = a.value.map((g, m) => {
        let {
          notice: x,
          holderCallback: S
        } = g;
        const C = m === a.value.length - 1 ? x.updateMark : void 0, {
          key: P,
          userPassKey: $
        } = x, {
          content: I
        } = x, w = O(O(O({
          prefixCls: d,
          closeIcon: typeof f == "function" ? f({
            prefixCls: d
          }) : f
        }, x), x.props), {
          key: P,
          noticeKey: $ || P,
          updateMark: C,
          onClose: (M) => {
            var _;
            u(M), (_ = x.onClose) === null || _ === void 0 || _.call(x);
          },
          onClick: x.onClick
        });
        return S ? h("div", {
          key: P,
          class: `${d}-hook-holder`,
          ref: (M) => {
            typeof P > "u" || (M ? (r.set(P, M), S(M, w)) : r.delete(P));
          }
        }, null) : h(tg, Q(Q({}, w), {}, {
          class: _e(w.class, e.hashId)
        }), {
          default: () => [typeof I == "function" ? I({
            prefixCls: d
          }) : I]
        });
      }), v = {
        [d]: 1,
        [n.class]: !!n.class,
        [e.hashId]: !0
      };
      return h("div", {
        class: v,
        style: n.style || {
          top: "65px",
          left: "50%"
        }
      }, [h(Zb, Q({
        tag: "div"
      }, l.value), {
        default: () => [p]
      })]);
    };
  }
});
Gp.newInstance = function(t, n) {
  const o = t || {}, {
    name: i = "notification",
    getContainer: r,
    appContext: a,
    prefixCls: l,
    rootPrefixCls: s,
    transitionName: u,
    hasTransitionName: c,
    useStyle: d
  } = o, f = OY(o, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), p = document.createElement("div");
  r ? r().appendChild(p) : document.body.appendChild(p);
  const v = be({
    compatConfig: {
      MODE: 3
    },
    name: "NotificationWrapper",
    setup(m, x) {
      let {
        attrs: S
      } = x;
      const C = $e(), P = E(() => Ko.getPrefixCls(i, l)), [, $] = d(P);
      return At(() => {
        n({
          notice(I) {
            var w;
            (w = C.value) === null || w === void 0 || w.add(I);
          },
          removeNotice(I) {
            var w;
            (w = C.value) === null || w === void 0 || w.remove(I);
          },
          destroy() {
            El(null, p), p.parentNode && p.parentNode.removeChild(p);
          },
          component: C
        });
      }), () => {
        const I = Ko, w = I.getRootPrefixCls(s, P.value), M = c ? u : `${P.value}-${u}`;
        return h(Ba, Q(Q({}, I), {}, {
          prefixCls: w
        }), {
          default: () => [h(Gp, Q(Q({
            ref: C
          }, S), {}, {
            prefixCls: P.value,
            transitionName: M,
            hashId: $.value
          }), null)]
        });
      };
    }
  }), g = h(v, f);
  g.appContext = a || g.appContext, El(g, p);
};
let $C = 0;
const IY = Date.now();
function PC() {
  const e = $C;
  return $C += 1, `rcNotification_${IY}_${e}`;
}
const MY = be({
  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(), r = E(() => e.notices), a = E(() => {
      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 i0(c);
    }), l = (c) => e.remove(c), s = le({});
    Ie(r, () => {
      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 = E(() => 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, p = u.value.map((v) => {
        var g, m;
        const x = s.value[v], S = (g = e.getClassName) === null || g === void 0 ? void 0 : g.call(e, v), C = (m = e.getStyles) === null || m === void 0 ? void 0 : m.call(e, v), P = x.map((w, M) => {
          let {
            notice: _,
            holderCallback: N
          } = w;
          const R = M === r.value.length - 1 ? _.updateMark : void 0, {
            key: H,
            userPassKey: L
          } = _, {
            content: B
          } = _, A = O(O(O({
            prefixCls: d,
            closeIcon: typeof f == "function" ? f({
              prefixCls: d
            }) : f
          }, _), _.props), {
            key: H,
            noticeKey: L || H,
            updateMark: R,
            onClose: (G) => {
              var j;
              l(G), (j = _.onClose) === null || j === void 0 || j.call(_);
            },
            onClick: _.onClick
          });
          return N ? h("div", {
            key: H,
            class: `${d}-hook-holder`,
            ref: (G) => {
              typeof H > "u" || (G ? (i.set(H, G), N(G, A)) : i.delete(H));
            }
          }, null) : h(tg, Q(Q({}, A), {}, {
            class: _e(A.class, e.hashId)
          }), {
            default: () => [typeof B == "function" ? B({
              prefixCls: d
            }) : B]
          });
        }), $ = {
          [d]: 1,
          [`${d}-${v}`]: 1,
          [n.class]: !!n.class,
          [e.hashId]: !0,
          [S]: !!S
        };
        function I() {
          var w;
          x.length > 0 || (Reflect.deleteProperty(s.value, v), (w = e.onAllRemoved) === null || w === void 0 || w.call(e));
        }
        return h("div", {
          key: v,
          class: $,
          style: n.style || C || {
            top: "65px",
            left: "50%"
          }
        }, [h(Zb, Q(Q({
          tag: "div"
        }, a.value), {}, {
          onAfterLeave: I
        }), {
          default: () => [P]
        })]);
      });
      return h(JI, {
        getContainer: e.getContainer
      }, {
        default: () => [p]
      });
    };
  }
});
var TY = 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 _Y = () => document.body;
let OC = 0;
function EY() {
  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((r) => {
      const a = i[r];
      a !== void 0 && (e[r] = a);
    });
  }), e;
}
function v_() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  const {
    getContainer: t = _Y,
    motion: n,
    prefixCls: o,
    maxCount: i,
    getClassName: r,
    getStyles: a,
    onAllRemoved: l
  } = e, s = TY(e, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = $e([]), c = $e(), d = (x, S) => {
    const C = x.key || PC(), P = O(O({}, x), {
      key: C
    }), $ = u.value.map((w) => w.notice.key).indexOf(C), I = u.value.concat();
    $ !== -1 ? I.splice($, 1, {
      notice: P,
      holderCallback: S
    }) : (i && u.value.length >= i && (P.key = I[0].notice.key, P.updateMark = PC(), P.userPassKey = C, I.shift()), I.push({
      notice: P,
      holderCallback: S
    })), u.value = I;
  }, f = (x) => {
    u.value = u.value.filter((S) => {
      let {
        notice: {
          key: C,
          userPassKey: P
        }
      } = S;
      return (P || C) !== x;
    });
  }, p = () => {
    u.value = [];
  }, v = () => h(MY, {
    ref: c,
    prefixCls: o,
    maxCount: i,
    notices: u.value,
    remove: f,
    getClassName: r,
    getStyles: a,
    animation: n,
    hashId: e.hashId,
    onAllRemoved: l,
    getContainer: t
  }, null), g = $e([]), m = {
    open: (x) => {
      const S = EY(s, x);
      (S.key === null || S.key === void 0) && (S.key = `vc-notification-${OC}`, OC += 1), g.value = [...g.value, {
        type: "open",
        config: S
      }];
    },
    close: (x) => {
      g.value = [...g.value, {
        type: "close",
        key: x
      }];
    },
    destroy: () => {
      g.value = [...g.value, {
        type: "destroy"
      }];
    }
  };
  return Ie(g, () => {
    g.value.length && (g.value.forEach((x) => {
      switch (x.type) {
        case "open":
          d(x.config);
          break;
        case "close":
          f(x.key);
          break;
        case "destroy":
          p();
          break;
      }
    }), g.value = []);
  }), [m, v];
}
const DY = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    boxShadowSecondary: o,
    colorBgElevated: i,
    colorSuccess: r,
    colorError: a,
    colorWarning: l,
    colorInfo: s,
    fontSizeLG: u,
    motionEaseInOutCirc: c,
    motionDurationSlow: d,
    marginXS: f,
    paddingXS: p,
    borderRadiusLG: v,
    zIndexPopup: g,
    // Custom token
    messageNoticeContentPadding: m
  } = e, x = new tn("MessageMoveIn", {
    "0%": {
      padding: 0,
      transform: "translateY(-100%)",
      opacity: 0
    },
    "100%": {
      padding: p,
      transform: "translateY(0)",
      opacity: 1
    }
  }), S = new tn("MessageMoveOut", {
    "0%": {
      maxHeight: e.height,
      padding: p,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      padding: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [t]: O(O({}, fn(e)), {
        position: "fixed",
        top: f,
        left: "50%",
        transform: "translateX(-50%)",
        width: "100%",
        pointerEvents: "none",
        zIndex: g,
        [`${t}-move-up`]: {
          animationFillMode: "forwards"
        },
        [`
        ${t}-move-up-appear,
        ${t}-move-up-enter
      `]: {
          animationName: x,
          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: S,
          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: p,
        textAlign: "center",
        [n]: {
          verticalAlign: "text-bottom",
          marginInlineEnd: f,
          fontSize: u
        },
        [`${t}-notice-content`]: {
          display: "inline-block",
          padding: m,
          background: i,
          borderRadius: v,
          boxShadow: o,
          pointerEvents: "all"
        },
        [`${t}-success ${n}`]: {
          color: r
        },
        [`${t}-error ${n}`]: {
          color: a
        },
        [`${t}-warning ${n}`]: {
          color: l
        },
        [`
        ${t}-info ${n},
        ${t}-loading ${n}`]: {
          color: s
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${t}-notice-pure-panel`]: {
        padding: 0,
        textAlign: "start"
      }
    }
  ];
}, lx = On("Message", (e) => {
  const t = Qt(e, {
    messageNoticeContentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
  });
  return [DY(t)];
}, (e) => ({
  height: 150,
  zIndexPopup: e.zIndexPopupBase + 10
})), AY = {
  info: h(Hs, null, null),
  success: h(Bl, null, null),
  error: h(zi, null, null),
  warning: h(Fl, null, null),
  loading: h(_r, null, null)
}, m_ = be({
  name: "PureContent",
  inheritAttrs: !1,
  props: ["prefixCls", "type", "icon"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("div", {
        class: _e(`${e.prefixCls}-custom-content`, `${e.prefixCls}-${e.type}`)
      }, [e.icon || AY[e.type], h("span", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
    };
  }
});
be({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    var i;
    const {
      getPrefixCls: r
    } = Ph(), a = E(() => e.prefixCls || r("message")), [, l] = lx(a);
    return h(tg, Q(Q({}, o), {}, {
      prefixCls: a.value,
      class: _e(l.value, `${a.value}-notice-pure-panel`),
      noticeKey: "pure",
      duration: null
    }), {
      default: () => [h(m_, {
        prefixCls: a.value,
        type: e.type,
        icon: e.icon
      }, {
        default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
      })]
    });
  }
});
var RY = 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 NY = 8, zY = 3, BY = be({
  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: r,
      getPopupContainer: a
    } = Rt("message", e), l = E(() => r("message", e.prefixCls)), [, s] = lx(l), u = () => {
      var g;
      const m = (g = e.top) !== null && g !== void 0 ? g : NY;
      return {
        left: "50%",
        transform: "translateX(-50%)",
        top: typeof m == "number" ? `${m}px` : m
      };
    }, c = () => _e(s.value, e.rtl ? `${l.value}-rtl` : ""), d = () => {
      var g;
      return Zy({
        prefixCls: l.value,
        animation: (g = e.animation) !== null && g !== void 0 ? g : "move-up",
        transitionName: e.transitionName
      });
    }, f = h("span", {
      class: `${l.value}-close-x`
    }, [h(la, {
      class: `${l.value}-close-icon`
    }, null)]), [p, v] = v_({
      //@ts-ignore
      getStyles: u,
      prefixCls: l.value,
      getClassName: c,
      motion: d,
      closable: !1,
      closeIcon: f,
      duration: (o = e.duration) !== null && o !== void 0 ? o : zY,
      getContainer: (i = e.staticGetContainer) !== null && i !== void 0 ? i : a.value,
      maxCount: e.maxCount,
      onAllRemoved: e.onAllRemoved
    });
    return n(O(O({}, p), {
      prefixCls: l,
      hashId: s
    })), v;
  }
});
let kC = 0;
function FY(e) {
  const t = $e(null), n = Symbol("messageHolderKey"), o = (s) => {
    var u;
    (u = t.value) === null || u === void 0 || u.close(s);
  }, i = (s) => {
    if (!t.value) {
      const $ = () => {
      };
      return $.then = () => {
      }, $;
    }
    const {
      open: u,
      prefixCls: c,
      hashId: d
    } = t.value, f = `${c}-notice`, {
      content: p,
      icon: v,
      type: g,
      key: m,
      class: x,
      onClose: S
    } = s, C = RY(s, ["content", "icon", "type", "key", "class", "onClose"]);
    let P = m;
    return P == null && (kC += 1, P = `antd-message-${kC}`), DF(($) => (u(O(O({}, C), {
      key: P,
      content: () => h(m_, {
        prefixCls: c,
        type: g,
        icon: typeof v == "function" ? v() : v
      }, {
        default: () => [typeof p == "function" ? p() : p]
      }),
      placement: "top",
      // @ts-ignore
      class: _e(g && `${f}-${g}`, d, x),
      onClose: () => {
        S?.(), $();
      }
    })), () => {
      o(P);
    }));
  }, a = {
    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 p;
      c && typeof c == "object" && "content" in c ? p = c : p = {
        content: c
      };
      let v, g;
      typeof d == "function" ? g = d : (v = d, g = f);
      const m = O(O({
        onClose: g,
        duration: v
      }, p), {
        type: s
      });
      return i(m);
    };
    a[s] = u;
  }), [a, () => h(BY, Q(Q({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function b_(e) {
  return FY(e);
}
let y_ = 3, x_, si, LY = 1, w_ = "", S_ = "move-up", C_ = !1, $_ = () => document.body, P_, O_ = !1;
function HY() {
  return LY++;
}
function VY(e) {
  e.top !== void 0 && (x_ = e.top, si = null), e.duration !== void 0 && (y_ = e.duration), e.prefixCls !== void 0 && (w_ = e.prefixCls), e.getContainer !== void 0 && ($_ = e.getContainer, si = null), e.transitionName !== void 0 && (S_ = e.transitionName, si = null, C_ = !0), e.maxCount !== void 0 && (P_ = e.maxCount, si = null), e.rtl !== void 0 && (O_ = e.rtl);
}
function jY(e, t) {
  if (si) {
    t(si);
    return;
  }
  Gp.newInstance({
    appContext: e.appContext,
    prefixCls: e.prefixCls || w_,
    rootPrefixCls: e.rootPrefixCls,
    transitionName: S_,
    hasTransitionName: C_,
    style: {
      top: x_
    },
    getContainer: $_ || e.getPopupContainer,
    maxCount: P_,
    name: "message",
    useStyle: lx
  }, (n) => {
    if (si) {
      t(si);
      return;
    }
    si = n, t(n);
  });
}
const k_ = {
  info: Hs,
  success: Bl,
  error: zi,
  warning: Fl,
  loading: _r
}, WY = Object.keys(k_);
function KY(e) {
  const t = e.duration !== void 0 ? e.duration : y_, n = e.key || HY(), o = new Promise((r) => {
    const a = () => (typeof e.onClose == "function" && e.onClose(), r(!0));
    jY(e, (l) => {
      l.notice({
        key: n,
        duration: t,
        style: e.style || {},
        class: e.class,
        content: (s) => {
          let {
            prefixCls: u
          } = s;
          const c = k_[e.type], d = c ? h(c, null, null) : "", f = _e(`${u}-custom-content`, {
            [`${u}-${e.type}`]: e.type,
            [`${u}-rtl`]: O_ === !0
          });
          return h("div", {
            class: f
          }, [typeof e.icon == "function" ? e.icon() : e.icon || d, h("span", null, [typeof e.content == "function" ? e.content() : e.content])]);
        },
        onClose: a,
        onClick: e.onClick
      });
    });
  }), i = () => {
    si && si.removeNotice(n);
  };
  return i.then = (r, a) => o.then(r, a), i.promise = o, i;
}
function qY(e) {
  return Object.prototype.toString.call(e) === "[object Object]" && !!e.content;
}
const $d = {
  open: KY,
  config: VY,
  destroy(e) {
    if (si)
      if (e) {
        const {
          removeNotice: t
        } = si;
        t(e);
      } else {
        const {
          destroy: t
        } = si;
        t(), si = null;
      }
  }
};
function YY(e, t) {
  e[t] = (n, o, i) => qY(n) ? e.open(O(O({}, n), {
    type: t
  })) : (typeof o == "function" && (i = o, o = void 0), e.open({
    content: n,
    duration: o,
    type: t,
    onClose: i
  }));
}
WY.forEach((e) => YY($d, e));
$d.warn = $d.warning;
$d.useMessage = b_;
const GY = (e) => {
  const {
    componentCls: t,
    width: n,
    notificationMarginEdge: o
  } = e, i = new tn("antNotificationTopFadeIn", {
    "0%": {
      marginTop: "-100%",
      opacity: 0
    },
    "100%": {
      marginTop: 0,
      opacity: 1
    }
  }), r = new tn("antNotificationBottomFadeIn", {
    "0%": {
      marginBottom: "-100%",
      opacity: 0
    },
    "100%": {
      marginBottom: 0,
      opacity: 1
    }
  }), a = new tn("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: r
      }
    },
    [`&${t}-topLeft, &${t}-bottomLeft`]: {
      marginInlineEnd: 0,
      marginInlineStart: o,
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: a
      }
    }
  };
}, UY = (e) => {
  const {
    iconCls: t,
    componentCls: n,
    // .ant-notification
    boxShadowSecondary: o,
    fontSizeLG: i,
    notificationMarginBottom: r,
    borderRadiusLG: a,
    colorSuccess: l,
    colorInfo: s,
    colorWarning: u,
    colorError: c,
    colorTextHeading: d,
    notificationBg: f,
    notificationPadding: p,
    notificationMarginEdge: v,
    motionDurationMid: g,
    motionEaseInOut: m,
    fontSize: x,
    lineHeight: S,
    width: C,
    notificationIconSize: P
  } = e, $ = `${n}-notice`, I = new tn("antNotificationFadeIn", {
    "0%": {
      left: {
        _skip_check_: !0,
        value: C
      },
      opacity: 0
    },
    "100%": {
      left: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  }), w = new tn("antNotificationFadeOut", {
    "0%": {
      maxHeight: e.animationMaxHeight,
      marginBottom: r,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      marginBottom: 0,
      paddingTop: 0,
      paddingBottom: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [n]: O(O(O(O({}, fn(e)), {
        position: "fixed",
        zIndex: e.zIndexPopup,
        marginInlineEnd: v,
        [`${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: m,
          animationFillMode: "both",
          opacity: 0,
          animationPlayState: "paused"
        },
        [`${n}-fade-leave`]: {
          animationTimingFunction: m,
          animationFillMode: "both",
          animationDuration: g,
          animationPlayState: "paused"
        },
        [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
          animationName: I,
          animationPlayState: "running"
        },
        [`${n}-fade-leave${n}-fade-leave-active`]: {
          animationName: w,
          animationPlayState: "running"
        }
      }), GY(e)), {
        // RTL
        "&-rtl": {
          direction: "rtl",
          [`${n}-notice-btn`]: {
            float: "left"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [$]: {
        position: "relative",
        width: C,
        maxWidth: `calc(100vw - ${v * 2}px)`,
        marginBottom: r,
        marginInlineStart: "auto",
        padding: p,
        overflow: "hidden",
        lineHeight: S,
        wordWrap: "break-word",
        background: f,
        borderRadius: a,
        boxShadow: o,
        [`${n}-close-icon`]: {
          fontSize: x,
          cursor: "pointer"
        },
        [`${$}-message`]: {
          marginBottom: e.marginXS,
          color: d,
          fontSize: i,
          lineHeight: e.lineHeightLG
        },
        [`${$}-description`]: {
          fontSize: x
        },
        [`&${$}-closable ${$}-message`]: {
          paddingInlineEnd: e.paddingLG
        },
        [`${$}-with-icon ${$}-message`]: {
          marginBottom: e.marginXS,
          marginInlineStart: e.marginSM + P,
          fontSize: i
        },
        [`${$}-with-icon ${$}-description`]: {
          marginInlineStart: e.marginSM + P,
          fontSize: x
        },
        // 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
        [`${$}-icon`]: {
          position: "absolute",
          fontSize: P,
          lineHeight: 0,
          // icon-font
          [`&-success${t}`]: {
            color: l
          },
          [`&-info${t}`]: {
            color: s
          },
          [`&-warning${t}`]: {
            color: u
          },
          [`&-error${t}`]: {
            color: c
          }
        },
        [`${$}-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
          }
        },
        [`${$}-btn`]: {
          float: "right",
          marginTop: e.marginSM
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${$}-pure-panel`]: {
        margin: 0
      }
    }
  ];
}, sx = On("Notification", (e) => {
  const t = e.paddingMD, n = e.paddingLG, o = Qt(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 [UY(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50,
  width: 384
}));
function I_(e, t) {
  return t || h("span", {
    class: `${e}-close-x`
  }, [h(la, {
    class: `${e}-close-icon`
  }, null)]);
}
h(Hs, null, null), h(Bl, null, null), h(zi, null, null), h(Fl, null, null), h(_r, null, null);
const XY = {
  success: Bl,
  info: Hs,
  error: zi,
  warning: Fl
};
function M_(e) {
  let {
    prefixCls: t,
    icon: n,
    type: o,
    message: i,
    description: r,
    btn: a
  } = e, l = null;
  if (n)
    l = h("span", {
      class: `${t}-icon`
    }, [Su(n)]);
  else if (o) {
    const s = XY[o];
    l = h(s, {
      class: `${t}-icon ${t}-icon-${o}`
    }, null);
  }
  return h("div", {
    class: _e({
      [`${t}-with-icon`]: l
    }),
    role: "alert"
  }, [l, h("div", {
    class: `${t}-message`
  }, [i]), h("div", {
    class: `${t}-description`
  }, [r]), a && h("div", {
    class: `${t}-btn`
  }, [a])]);
}
be({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  setup(e) {
    const {
      getPrefixCls: t
    } = Rt("notification", e), n = E(() => e.prefixCls || t("notification")), o = E(() => `${n.value}-notice`), [, i] = sx(n);
    return () => h(tg, Q(Q({}, e), {}, {
      prefixCls: n.value,
      class: _e(i.value, `${o.value}-pure-panel`),
      noticeKey: "pure",
      duration: null,
      closable: e.closable,
      closeIcon: I_(n.value, e.closeIcon)
    }), {
      default: () => [h(M_, {
        prefixCls: o.value,
        icon: e.icon,
        type: e.type,
        message: e.message,
        description: e.description,
        btn: e.btn
      }, null)]
    });
  }
});
function T_(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 QY(e) {
  return {
    name: `${e}-fade`
  };
}
var ZY = 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 IC = 24, JY = 4.5, eG = be({
  name: "Holder",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const {
      getPrefixCls: o,
      getPopupContainer: i
    } = Rt("notification", e), r = E(() => e.prefixCls || o("notification")), a = (f) => {
      var p, v;
      return T_(f, (p = e.top) !== null && p !== void 0 ? p : IC, (v = e.bottom) !== null && v !== void 0 ? v : IC);
    }, [, l] = sx(r), s = () => _e(l.value, {
      [`${r.value}-rtl`]: e.rtl
    }), u = () => QY(r.value), [c, d] = v_({
      prefixCls: r.value,
      getStyles: a,
      getClassName: s,
      motion: u,
      closable: !0,
      closeIcon: I_(r.value),
      duration: JY,
      getContainer: () => {
        var f, p;
        return ((f = e.getPopupContainer) === null || f === void 0 ? void 0 : f.call(e)) || ((p = i.value) === null || p === void 0 ? void 0 : p.call(i)) || document.body;
      },
      maxCount: e.maxCount,
      hashId: l.value,
      onAllRemoved: e.onAllRemoved
    });
    return n(O(O({}, c), {
      prefixCls: r.value,
      hashId: l
    })), d;
  }
});
function tG(e) {
  const t = $e(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: p,
      icon: v,
      type: g,
      btn: m,
      class: x
    } = l, S = ZY(l, ["message", "description", "icon", "type", "btn", "class"]);
    return s(O(O({
      placement: "topRight"
    }, S), {
      content: () => h(M_, {
        prefixCls: d,
        icon: typeof v == "function" ? v() : v,
        type: g,
        message: typeof f == "function" ? f() : f,
        description: typeof p == "function" ? p() : p,
        btn: typeof m == "function" ? m() : m
      }, null),
      // @ts-ignore
      class: _e(g && `${d}-${g}`, c, x)
    }));
  }, r = {
    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) => {
    r[l] = (s) => o(O(O({}, s), {
      type: l
    }));
  }), [r, () => h(eG, Q(Q({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function __(e) {
  return tG(e);
}
const ps = {};
let E_ = 4.5, D_ = "24px", A_ = "24px", $b = "", R_ = "topRight", N_ = () => document.body, z_ = null, Pb = !1, B_;
function nG(e) {
  const {
    duration: t,
    placement: n,
    bottom: o,
    top: i,
    getContainer: r,
    closeIcon: a,
    prefixCls: l
  } = e;
  l !== void 0 && ($b = l), t !== void 0 && (E_ = t), n !== void 0 && (R_ = n), o !== void 0 && (A_ = typeof o == "number" ? `${o}px` : o), i !== void 0 && (D_ = typeof i == "number" ? `${i}px` : i), r !== void 0 && (N_ = r), a !== void 0 && (z_ = a), e.rtl !== void 0 && (Pb = e.rtl), e.maxCount !== void 0 && (B_ = e.maxCount);
}
function oG(e, t) {
  let {
    prefixCls: n,
    placement: o = R_,
    getContainer: i = N_,
    top: r,
    bottom: a,
    closeIcon: l = z_,
    appContext: s
  } = e;
  const {
    getPrefixCls: u
  } = gG(), c = u("notification", n || $b), d = `${c}-${o}-${Pb}`, f = ps[d];
  if (f) {
    Promise.resolve(f).then((v) => {
      t(v);
    });
    return;
  }
  const p = _e(`${c}-${o}`, {
    [`${c}-rtl`]: Pb === !0
  });
  Gp.newInstance({
    name: "notification",
    prefixCls: n || $b,
    useStyle: sx,
    class: p,
    style: T_(o, r ?? D_, a ?? A_),
    appContext: s,
    getContainer: i,
    closeIcon: (v) => {
      let {
        prefixCls: g
      } = v;
      return h("span", {
        class: `${g}-close-x`
      }, [Su(l, {}, h(la, {
        class: `${g}-close-icon`
      }, null))]);
    },
    maxCount: B_,
    hasTransitionName: !0
  }, (v) => {
    ps[d] = v, t(v);
  });
}
const iG = {
  success: w0,
  info: C0,
  error: $0,
  warning: S0
};
function rG(e) {
  const {
    icon: t,
    type: n,
    description: o,
    message: i,
    btn: r
  } = e, a = e.duration === void 0 ? E_ : e.duration;
  oG(e, (l) => {
    l.notice({
      content: (s) => {
        let {
          prefixCls: u
        } = s;
        const c = `${u}-notice`;
        let d = null;
        if (t)
          d = () => h("span", {
            class: `${c}-icon`
          }, [Su(t)]);
        else if (n) {
          const f = iG[n];
          d = () => h(f, {
            class: `${c}-icon ${c}-icon-${n}`
          }, null);
        }
        return h("div", {
          class: d ? `${c}-with-icon` : ""
        }, [d && d(), h("div", {
          class: `${c}-message`
        }, [!o && d ? h("span", {
          class: `${c}-message-single-line-auto-margin`
        }, null) : null, Su(i)]), h("div", {
          class: `${c}-description`
        }, [Su(o)]), r ? h("span", {
          class: `${c}-btn`
        }, [Su(r)]) : null]);
      },
      duration: a,
      closable: !0,
      onClose: e.onClose,
      onClick: e.onClick,
      key: e.key,
      style: e.style || {},
      class: e.class
    });
  });
}
const ec = {
  open: rG,
  close(e) {
    Object.keys(ps).forEach((t) => Promise.resolve(ps[t]).then((n) => {
      n.removeNotice(e);
    }));
  },
  config: nG,
  destroy() {
    Object.keys(ps).forEach((e) => {
      Promise.resolve(ps[e]).then((t) => {
        t.destroy();
      }), delete ps[e];
    });
  }
}, aG = ["success", "info", "warning", "error"];
aG.forEach((e) => {
  ec[e] = (t) => ec.open(O(O({}, t), {
    type: e
  }));
});
ec.warn = ec.warning;
ec.useNotification = __;
const lG = `-ant-${Date.now()}-${Math.random()}`;
function sG(e, t) {
  const n = {}, o = (a, l) => {
    let s = a.clone();
    return s = l?.(s) || s, s.toRgbString();
  }, i = (a, l) => {
    const s = new In(a), u = Ha(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 a = new In(t.primaryColor), l = Ha(a.toRgbString());
    l.forEach((u, c) => {
      n[`primary-${c + 1}`] = u;
    }), n["primary-color-deprecated-l-35"] = o(a, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = o(a, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = o(a, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = o(a, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = o(a, (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((a) => `--${e}-${a}: ${n[a]};`).join(`
`)}
  }
  `.trim();
}
function uG(e, t) {
  const n = sG(e, t);
  xi() ? vd(n, `${lG}-dynamic-theme`) : wo(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
}
const cG = (e) => {
  const [t, n] = dc();
  return Mm(E(() => ({
    theme: t.value,
    token: n.value,
    hashId: "",
    path: ["ant-design-icons", e.value]
  })), () => [{
    [`.${e.value}`]: O(O({}, cc()), {
      [`.${e.value} .${e.value}-icon`]: {
        display: "block"
      }
    })
  }]);
};
function dG(e, t) {
  const n = E(() => e?.value || {}), o = E(() => n.value.inherit === !1 || !t?.value ? qy : t.value);
  return E(() => {
    if (!e?.value)
      return t?.value;
    const r = O({}, o.value.components);
    return Object.keys(e.value.components || {}).forEach((a) => {
      r[a] = O(O({}, r[a]), e.value.components[a]);
    }), O(O(O({}, o.value), n.value), {
      token: O(O({}, o.value.token), n.value.token),
      components: r
    });
  });
}
var fG = 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 pG = "ant";
function Nu() {
  return Ko.prefixCls || pG;
}
function F_() {
  return Ko.iconPrefixCls || Fy;
}
const ux = $n({}), Ko = $n({});
It(() => {
  O(Ko, ux), Ko.prefixCls = Nu(), Ko.iconPrefixCls = F_(), Ko.getPrefixCls = (e, t) => t || (e ? `${Ko.prefixCls}-${e}` : Ko.prefixCls), Ko.getRootPrefixCls = () => Ko.prefixCls ? Ko.prefixCls : Nu();
});
let xv;
const hG = (e) => {
  xv && xv(), xv = It(() => {
    O(ux, $n(e)), O(Ko, $n(e));
  }), e.theme && uG(Nu(), e.theme);
}, gG = () => ({
  getPrefixCls: (e, t) => t || (e ? `${Nu()}-${e}` : Nu()),
  getIconPrefixCls: F_,
  getRootPrefixCls: () => Ko.prefixCls ? Ko.prefixCls : Nu()
}), Ba = be({
  compatConfig: {
    MODE: 3
  },
  name: "AConfigProvider",
  inheritAttrs: !1,
  props: oL(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Ph(), i = (A, G) => {
      const {
        prefixCls: j = "ant"
      } = e;
      if (G) return G;
      const Z = j || o.getPrefixCls("");
      return A ? `${Z}-${A}` : Z;
    }, r = E(() => e.iconPrefixCls || o.iconPrefixCls.value || Fy), a = E(() => r.value !== o.iconPrefixCls.value), l = E(() => {
      var A;
      return e.csp || ((A = o.csp) === null || A === void 0 ? void 0 : A.value);
    }), s = cG(r), u = dG(E(() => e.theme), E(() => {
      var A;
      return (A = o.theme) === null || A === void 0 ? void 0 : A.value;
    })), c = (A) => (e.renderEmpty || n.renderEmpty || o.renderEmpty || K8)(A), d = E(() => {
      var A, G;
      return (A = e.autoInsertSpaceInButton) !== null && A !== void 0 ? A : (G = o.autoInsertSpaceInButton) === null || G === void 0 ? void 0 : G.value;
    }), f = E(() => {
      var A;
      return e.locale || ((A = o.locale) === null || A === void 0 ? void 0 : A.value);
    });
    Ie(f, () => {
      ux.locale = f.value;
    }, {
      immediate: !0
    });
    const p = E(() => {
      var A;
      return e.direction || ((A = o.direction) === null || A === void 0 ? void 0 : A.value);
    }), v = E(() => {
      var A, G;
      return (A = e.space) !== null && A !== void 0 ? A : (G = o.space) === null || G === void 0 ? void 0 : G.value;
    }), g = E(() => {
      var A, G;
      return (A = e.virtual) !== null && A !== void 0 ? A : (G = o.virtual) === null || G === void 0 ? void 0 : G.value;
    }), m = E(() => {
      var A, G;
      return (A = e.dropdownMatchSelectWidth) !== null && A !== void 0 ? A : (G = o.dropdownMatchSelectWidth) === null || G === void 0 ? void 0 : G.value;
    }), x = E(() => {
      var A;
      return e.getTargetContainer !== void 0 ? e.getTargetContainer : (A = o.getTargetContainer) === null || A === void 0 ? void 0 : A.value;
    }), S = E(() => {
      var A;
      return e.getPopupContainer !== void 0 ? e.getPopupContainer : (A = o.getPopupContainer) === null || A === void 0 ? void 0 : A.value;
    }), C = E(() => {
      var A;
      return e.pageHeader !== void 0 ? e.pageHeader : (A = o.pageHeader) === null || A === void 0 ? void 0 : A.value;
    }), P = E(() => {
      var A;
      return e.input !== void 0 ? e.input : (A = o.input) === null || A === void 0 ? void 0 : A.value;
    }), $ = E(() => {
      var A;
      return e.pagination !== void 0 ? e.pagination : (A = o.pagination) === null || A === void 0 ? void 0 : A.value;
    }), I = E(() => {
      var A;
      return e.form !== void 0 ? e.form : (A = o.form) === null || A === void 0 ? void 0 : A.value;
    }), w = E(() => {
      var A;
      return e.select !== void 0 ? e.select : (A = o.select) === null || A === void 0 ? void 0 : A.value;
    }), M = E(() => e.componentSize), _ = E(() => e.componentDisabled), N = E(() => {
      var A, G;
      return (A = e.wave) !== null && A !== void 0 ? A : (G = o.wave) === null || G === void 0 ? void 0 : G.value;
    }), R = {
      csp: l,
      autoInsertSpaceInButton: d,
      locale: f,
      direction: p,
      space: v,
      virtual: g,
      dropdownMatchSelectWidth: m,
      getPrefixCls: i,
      iconPrefixCls: r,
      theme: E(() => {
        var A, G;
        return (A = u.value) !== null && A !== void 0 ? A : (G = o.theme) === null || G === void 0 ? void 0 : G.value;
      }),
      renderEmpty: c,
      getTargetContainer: x,
      getPopupContainer: S,
      pageHeader: C,
      input: P,
      pagination: $,
      form: I,
      select: w,
      componentSize: M,
      componentDisabled: _,
      transformCellText: E(() => e.transformCellText),
      wave: N
    }, H = E(() => {
      const A = u.value || {}, {
        algorithm: G,
        token: j
      } = A, Z = fG(A, ["algorithm", "token"]), W = G && (!Array.isArray(G) || G.length > 0) ? sI(G) : void 0;
      return O(O({}, Z), {
        theme: W,
        token: O(O({}, Th), j)
      });
    }), L = E(() => {
      var A, G;
      let j = {};
      return f.value && (j = ((A = f.value.Form) === null || A === void 0 ? void 0 : A.defaultValidateMessages) || ((G = La.Form) === null || G === void 0 ? void 0 : G.defaultValidateMessages) || {}), e.form && e.form.validateMessages && (j = O(O({}, j), e.form.validateMessages)), j;
    });
    iL(R), tL({
      validateMessages: L
    }), MI(M), Yk(_);
    const B = (A) => {
      var G, j;
      let Z = a.value ? s((G = n.default) === null || G === void 0 ? void 0 : G.call(n)) : (j = n.default) === null || j === void 0 ? void 0 : j.call(n);
      if (e.theme) {
        const W = /* @__PURE__ */ (function() {
          return Z;
        })();
        Z = h(L8, {
          value: H.value
        }, {
          default: () => [W]
        });
      }
      return h(PY, {
        locale: f.value || A,
        ANT_MARK__: Cb
      }, {
        default: () => [Z]
      });
    };
    return It(() => {
      p.value && ($d.config({
        rtl: p.value === "rtl"
      }), ec.config({
        rtl: p.value === "rtl"
      }));
    }), () => h(Xk, {
      children: (A, G, j) => B(j)
    }, null);
  }
});
Ba.config = hG;
Ba.install = function(e) {
  e.component(Ba.name, Ba);
};
const vG = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  return h(Bt, Q(Q({
    size: "small",
    type: "primary"
  }, e), n), o);
}, Nf = (e, t, n) => {
  const o = MF(n);
  return {
    [`${e.componentCls}-${t}`]: {
      color: e[`color${n}`],
      background: e[`color${o}Bg`],
      borderColor: e[`color${o}Border`],
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}, mG = (e) => CI(e, (t, n) => {
  let {
    textColor: o,
    lightBorderColor: i,
    lightColor: r,
    darkColor: a
  } = n;
  return {
    [`${e.componentCls}-${t}`]: {
      color: o,
      background: r,
      borderColor: i,
      // Inverse color
      "&-inverse": {
        color: e.colorTextLightSolid,
        background: a,
        borderColor: a
      },
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}), bG = (e) => {
  const {
    paddingXXS: t,
    lineWidth: n,
    tagPaddingHorizontal: o,
    componentCls: i
  } = e, r = o - n, a = t - n;
  return {
    // Result
    [i]: O(O({}, fn(e)), {
      display: "inline-block",
      height: "auto",
      marginInlineEnd: e.marginXS,
      paddingInline: r,
      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: a,
        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: r
      }
    }),
    [`${i}-borderless`]: {
      borderColor: "transparent",
      background: e.tagBorderlessBg
    }
  };
}, L_ = On("Tag", (e) => {
  const {
    fontSize: t,
    lineHeight: n,
    lineWidth: o,
    fontSizeIcon: i
  } = e, r = Math.round(t * n), a = e.fontSizeSM, l = r - o * 2, s = e.colorFillAlter, u = e.colorText, c = Qt(e, {
    tagFontSize: a,
    tagLineHeight: l,
    tagDefaultBg: s,
    tagDefaultColor: u,
    tagIconSize: i - 2 * o,
    tagPaddingHorizontal: 8,
    tagBorderlessBg: e.colorFillTertiary
  });
  return [bG(c), mG(c), Nf(c, "success", "Success"), Nf(c, "processing", "Info"), Nf(c, "error", "Error"), Nf(c, "warning", "Warning")];
}), yG = () => ({
  prefixCls: String,
  checked: {
    type: Boolean,
    default: void 0
  },
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  "onUpdate:checked": Function
}), Ob = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckableTag",
  inheritAttrs: !1,
  props: yG(),
  // emits: ['update:checked', 'change', 'click'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      prefixCls: r
    } = Rt("tag", e), [a, l] = L_(r), s = (c) => {
      const {
        checked: d
      } = e;
      o("update:checked", !d), o("change", !d), o("click", c);
    }, u = E(() => _e(r.value, l.value, {
      [`${r.value}-checkable`]: !0,
      [`${r.value}-checkable-checked`]: e.checked
    }));
    return () => {
      var c;
      return a(h("span", Q(Q({}, i), {}, {
        class: [u.value, i.class],
        onClick: s
      }), [(c = n.default) === null || c === void 0 ? void 0 : c.call(n)]));
    };
  }
}), xG = () => ({
  prefixCls: String,
  color: {
    type: String
  },
  closable: {
    type: Boolean,
    default: !1
  },
  closeIcon: pe.any,
  /** @deprecated `visible` will be removed in next major version. */
  visible: {
    type: Boolean,
    default: void 0
  },
  onClose: {
    type: Function
  },
  onClick: Ku(),
  "onUpdate:visible": Function,
  icon: pe.any,
  bordered: {
    type: Boolean,
    default: !0
  }
}), Pr = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATag",
  inheritAttrs: !1,
  props: xG(),
  // emits: ['update:visible', 'close'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: i
    } = t;
    const {
      prefixCls: r,
      direction: a
    } = Rt("tag", e), [l, s] = L_(r), u = $e(!0);
    process.env.NODE_ENV !== "production" && wo(e.visible === void 0, "Tag", '`visible` is deprecated, please use `<Tag v-show="visible" />` instead.'), It(() => {
      e.visible !== void 0 && (u.value = e.visible);
    });
    const c = (v) => {
      v.stopPropagation(), o("update:visible", !1), o("close", v), !v.defaultPrevented && e.visible === void 0 && (u.value = !1);
    }, d = E(() => MM(e.color) || Bj(e.color)), f = E(() => _e(r.value, s.value, {
      [`${r.value}-${e.color}`]: d.value,
      [`${r.value}-has-color`]: e.color && !d.value,
      [`${r.value}-hidden`]: !u.value,
      [`${r.value}-rtl`]: a.value === "rtl",
      [`${r.value}-borderless`]: !e.bordered
    })), p = (v) => {
      o("click", v);
    };
    return () => {
      var v, g, m;
      const {
        icon: x = (v = n.icon) === null || v === void 0 ? void 0 : v.call(n),
        color: S,
        closeIcon: C = (g = n.closeIcon) === null || g === void 0 ? void 0 : g.call(n),
        closable: P = !1
      } = e, $ = () => P ? C ? h("span", {
        class: `${r.value}-close-icon`,
        onClick: c
      }, [C]) : h(la, {
        class: `${r.value}-close-icon`,
        onClick: c
      }, null) : null, I = {
        backgroundColor: S && !d.value ? S : void 0
      }, w = x || null, M = (m = n.default) === null || m === void 0 ? void 0 : m.call(n), _ = w ? h(Je, null, [w, h("span", null, [M])]) : M, N = e.onClick !== void 0, R = h("span", Q(Q({}, i), {}, {
        onClick: p,
        class: [f.value, i.class],
        style: [I, i.style]
      }), [_, $()]);
      return l(N ? h(P0, null, {
        default: () => [R]
      }) : R);
    };
  }
});
Pr.CheckableTag = Ob;
Pr.install = function(e) {
  return e.component(Pr.name, Pr), e.component(Ob.name, Ob), e;
};
function wG(e, t) {
  let {
    slots: n,
    attrs: o
  } = t;
  return h(Pr, Q(Q({
    color: "blue"
  }, e), o), n);
}
var SG = { 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 MC(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) {
      CG(e, i, n[i]);
    });
  }
  return e;
}
function CG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ng = function(t, n) {
  var o = MC({}, t, n.attrs);
  return h(an, MC({}, o, {
    icon: SG
  }), null);
};
ng.displayName = "CalendarOutlined";
ng.inheritAttrs = !1;
var $G = { 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 TC(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) {
      PG(e, i, n[i]);
    });
  }
  return e;
}
function PG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var og = function(t, n) {
  var o = TC({}, t, n.attrs);
  return h(an, TC({}, o, {
    icon: $G
  }), null);
};
og.displayName = "ClockCircleOutlined";
og.inheritAttrs = !1;
function OG(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 kG(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 H_(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 V_() {
  return {
    id: String,
    /**
     * @deprecated `dropdownClassName` is deprecated which will be removed in next major
     *   version.Please use `popupClassName` instead.
     */
    dropdownClassName: String,
    popupClassName: String,
    popupStyle: _t(),
    transitionName: String,
    placeholder: String,
    allowClear: ct(),
    autofocus: ct(),
    disabled: ct(),
    tabindex: Number,
    open: ct(),
    defaultOpen: ct(),
    /** Make input readOnly to avoid popup keyboard in mobile */
    inputReadOnly: ct(),
    format: en([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: et(),
    panelRender: et(),
    // // Events
    onChange: et(),
    "onUpdate:value": et(),
    onOk: et(),
    onOpenChange: et(),
    "onUpdate:open": et(),
    onFocus: et(),
    onBlur: et(),
    onMousedown: et(),
    onMouseup: et(),
    onMouseenter: et(),
    onMouseleave: et(),
    onClick: et(),
    onContextmenu: et(),
    onKeydown: et(),
    // WAI-ARIA
    role: String,
    name: String,
    autocomplete: String,
    direction: rn(),
    showToday: ct(),
    showTime: en([Boolean, Object]),
    locale: _t(),
    size: rn(),
    bordered: ct(),
    dateRender: et(),
    disabledDate: et(),
    mode: rn(),
    picker: rn(),
    valueFormat: String,
    placement: rn(),
    status: rn(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledHours: et(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledMinutes: et(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledSeconds: et()
  };
}
function IG() {
  return {
    defaultPickerValue: en([Object, String]),
    defaultValue: en([Object, String]),
    value: en([Object, String]),
    presets: Vn(),
    disabledTime: et(),
    renderExtraFooter: et(),
    showNow: ct(),
    monthCellRender: et(),
    // deprecated  Please use `monthCellRender"` instead.',
    monthCellContentRender: et()
  };
}
function MG() {
  return {
    allowEmpty: Vn(),
    dateRender: et(),
    defaultPickerValue: Vn(),
    defaultValue: Vn(),
    value: Vn(),
    presets: Vn(),
    disabledTime: et(),
    disabled: en([Boolean, Array]),
    renderExtraFooter: et(),
    separator: {
      type: String
    },
    showTime: en([Boolean, Object]),
    ranges: _t(),
    placeholder: Vn(),
    mode: Vn(),
    onChange: et(),
    "onUpdate:value": et(),
    onCalendarChange: et(),
    onPanelChange: et(),
    onOk: et()
  };
}
var TG = 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 _G(e, t) {
  function n(u, c) {
    const d = O(O(O({}, V_()), IG()), t);
    return be({
      compatConfig: {
        MODE: 3
      },
      name: c,
      inheritAttrs: !1,
      props: d,
      slots: Object,
      setup(f, p) {
        let {
          slots: v,
          expose: g,
          attrs: m,
          emit: x
        } = p;
        const S = f, C = Bi(), P = Ai.useInject();
        process.env.NODE_ENV !== "production" && (dn(u !== "quarter", c || "DatePicker", `DatePicker.${c} is legacy usage. Please use DatePicker[picker='${u}'] directly.`), dn(!S.dropdownClassName, c || "DatePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), dn(!(S.monthCellContentRender || v.monthCellContentRender), c || "DatePicker", '`monthCellContentRender` is deprecated. Please use `monthCellRender"` instead.'), dn(!m.getCalendarContainer, c || "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
        const {
          prefixCls: $,
          direction: I,
          getPopupContainer: w,
          size: M,
          rootPrefixCls: _,
          disabled: N
        } = Rt("picker", S), {
          compactSize: R,
          compactItemClassnames: H
        } = fc($, I), L = E(() => R.value || M.value), [B, A] = DT($), G = le();
        g({
          focus: () => {
            var ve;
            (ve = G.value) === null || ve === void 0 || ve.focus();
          },
          blur: () => {
            var ve;
            (ve = G.value) === null || ve === void 0 || ve.blur();
          }
        });
        const j = (ve) => S.valueFormat ? e.toString(ve, S.valueFormat) : ve, Z = (ve, ce) => {
          const fe = j(ve);
          x("update:value", fe), x("change", fe, ce), C.onFieldChange();
        }, W = (ve) => {
          x("update:open", ve), x("openChange", ve);
        }, K = (ve) => {
          x("focus", ve);
        }, q = (ve) => {
          x("blur", ve), C.onFieldBlur();
        }, U = (ve, ce) => {
          const fe = j(ve);
          x("panelChange", fe, ce);
        }, ae = (ve) => {
          const ce = j(ve);
          x("ok", ce);
        }, [se] = Nl("DatePicker", Tp), re = E(() => S.value ? S.valueFormat ? e.toDate(S.value, S.valueFormat) : S.value : S.value === "" ? void 0 : S.value), ie = E(() => S.defaultValue ? S.valueFormat ? e.toDate(S.defaultValue, S.valueFormat) : S.defaultValue : S.defaultValue === "" ? void 0 : S.defaultValue), te = E(() => S.defaultPickerValue ? S.valueFormat ? e.toDate(S.defaultPickerValue, S.valueFormat) : S.defaultPickerValue : S.defaultPickerValue === "" ? void 0 : S.defaultPickerValue);
        return () => {
          var ve, ce, fe, ge, Me, ze;
          const Ke = O(O({}, se.value), S.locale), He = O(O({}, S), m), {
            bordered: Re = !0,
            placeholder: Xe,
            suffixIcon: De = (ve = v.suffixIcon) === null || ve === void 0 ? void 0 : ve.call(v),
            showToday: Be = !0,
            transitionName: Ve,
            allowClear: ot = !0,
            dateRender: je = v.dateRender,
            renderExtraFooter: Pe = v.renderExtraFooter,
            monthCellRender: Ge = v.monthCellRender || S.monthCellContentRender || v.monthCellContentRender,
            clearIcon: Se = (ce = v.clearIcon) === null || ce === void 0 ? void 0 : ce.call(v),
            id: Ce = C.id.value
          } = He, Ae = TG(He, ["bordered", "placeholder", "suffixIcon", "showToday", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "monthCellRender", "clearIcon", "id"]), qe = He.showTime === "" ? !0 : He.showTime, {
            format: We
          } = He;
          let tt = {};
          u && (tt.picker = u);
          const Ee = u || He.picker || "date";
          tt = O(O(O({}, tt), qe ? Up(O({
            format: We,
            picker: Ee
          }, typeof qe == "object" ? qe : {})) : {}), Ee === "time" ? Up(O(O({
            format: We
          }, Ae), {
            picker: Ee
          })) : {});
          const Ne = $.value, Fe = h(Je, null, [De || (u === "time" ? h(og, null, null) : h(ng, null, null)), P.hasFeedback && P.feedbackIcon]);
          return B(h(A7, Q(Q(Q({
            monthCellRender: Ge,
            dateRender: je,
            renderExtraFooter: Pe,
            ref: G,
            placeholder: OG(Ke, Ee, Xe),
            suffixIcon: Fe,
            dropdownAlign: H_(I.value, S.placement),
            clearIcon: Se || h(zi, null, null),
            allowClear: ot,
            transitionName: Ve || `${_.value}-slide-up`
          }, Ae), tt), {}, {
            id: Ce,
            picker: Ee,
            value: re.value,
            defaultValue: ie.value,
            defaultPickerValue: te.value,
            showToday: Be,
            locale: Ke.lang,
            class: _e({
              [`${Ne}-${L.value}`]: L.value,
              [`${Ne}-borderless`]: !Re
            }, $r(Ne, Ls(P.status, S.status), P.hasFeedback), m.class, A.value, H.value),
            disabled: N.value,
            prefixCls: Ne,
            getPopupContainer: m.getCalendarContainer || w.value,
            generateConfig: e,
            prevIcon: ((fe = v.prevIcon) === null || fe === void 0 ? void 0 : fe.call(v)) || h("span", {
              class: `${Ne}-prev-icon`
            }, null),
            nextIcon: ((ge = v.nextIcon) === null || ge === void 0 ? void 0 : ge.call(v)) || h("span", {
              class: `${Ne}-next-icon`
            }, null),
            superPrevIcon: ((Me = v.superPrevIcon) === null || Me === void 0 ? void 0 : Me.call(v)) || h("span", {
              class: `${Ne}-super-prev-icon`
            }, null),
            superNextIcon: ((ze = v.superNextIcon) === null || ze === void 0 ? void 0 : ze.call(v)) || h("span", {
              class: `${Ne}-super-next-icon`
            }, null),
            components: j_,
            direction: I.value,
            dropdownClassName: _e(A.value, S.popupClassName, S.dropdownClassName),
            onChange: Z,
            onOpenChange: W,
            onFocus: K,
            onBlur: q,
            onPanelChange: U,
            onOk: ae
          }), null));
        };
      }
    });
  }
  const o = n(void 0, "ADatePicker"), i = n("week", "AWeekPicker"), r = n("month", "AMonthPicker"), a = n("year", "AYearPicker"), l = n("time", "TimePicker"), s = n("quarter", "AQuarterPicker");
  return {
    DatePicker: o,
    WeekPicker: i,
    MonthPicker: r,
    YearPicker: a,
    TimePicker: l,
    QuarterPicker: s
  };
}
var EG = { 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 _C(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) {
      DG(e, i, n[i]);
    });
  }
  return e;
}
function DG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var cx = function(t, n) {
  var o = _C({}, t, n.attrs);
  return h(an, _C({}, o, {
    icon: EG
  }), null);
};
cx.displayName = "SwapRightOutlined";
cx.inheritAttrs = !1;
var AG = 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 RG(e, t) {
  return be({
    compatConfig: {
      MODE: 3
    },
    name: "ARangePicker",
    inheritAttrs: !1,
    props: O(O(O({}, V_()), MG()), t),
    slots: Object,
    setup(o, i) {
      let {
        expose: r,
        slots: a,
        attrs: l,
        emit: s
      } = i;
      const u = o, c = Bi(), d = Ai.useInject();
      process.env.NODE_ENV !== "production" && (dn(!u.dropdownClassName, "RangePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), dn(!l.getCalendarContainer, "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
      const {
        prefixCls: f,
        direction: p,
        getPopupContainer: v,
        size: g,
        rootPrefixCls: m,
        disabled: x
      } = Rt("picker", u), {
        compactSize: S,
        compactItemClassnames: C
      } = fc(f, p), P = E(() => S.value || g.value), [$, I] = DT(f), w = le();
      r({
        focus: () => {
          var K;
          (K = w.value) === null || K === void 0 || K.focus();
        },
        blur: () => {
          var K;
          (K = w.value) === null || K === void 0 || K.blur();
        }
      });
      const M = (K) => u.valueFormat ? e.toString(K, u.valueFormat) : K, _ = (K, q) => {
        const U = M(K);
        s("update:value", U), s("change", U, q), c.onFieldChange();
      }, N = (K) => {
        s("update:open", K), s("openChange", K);
      }, R = (K) => {
        s("focus", K);
      }, H = (K) => {
        s("blur", K), c.onFieldBlur();
      }, L = (K, q) => {
        const U = M(K);
        s("panelChange", U, q);
      }, B = (K) => {
        const q = M(K);
        s("ok", q);
      }, A = (K, q, U) => {
        const ae = M(K);
        s("calendarChange", ae, q, U);
      }, [G] = Nl("DatePicker", Tp), j = E(() => u.value && u.valueFormat ? e.toDate(u.value, u.valueFormat) : u.value), Z = E(() => u.defaultValue && u.valueFormat ? e.toDate(u.defaultValue, u.valueFormat) : u.defaultValue), W = E(() => u.defaultPickerValue && u.valueFormat ? e.toDate(u.defaultPickerValue, u.valueFormat) : u.defaultPickerValue);
      return () => {
        var K, q, U, ae, se, re, ie;
        const te = O(O({}, G.value), u.locale), ve = O(O({}, u), l), {
          prefixCls: ce,
          bordered: fe = !0,
          placeholder: ge,
          suffixIcon: Me = (K = a.suffixIcon) === null || K === void 0 ? void 0 : K.call(a),
          picker: ze = "date",
          transitionName: Ke,
          allowClear: He = !0,
          dateRender: Re = a.dateRender,
          renderExtraFooter: Xe = a.renderExtraFooter,
          separator: De = (q = a.separator) === null || q === void 0 ? void 0 : q.call(a),
          clearIcon: Be = (U = a.clearIcon) === null || U === void 0 ? void 0 : U.call(a),
          id: Ve = c.id.value
        } = ve, ot = AG(ve, ["prefixCls", "bordered", "placeholder", "suffixIcon", "picker", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "separator", "clearIcon", "id"]);
        delete ot["onUpdate:value"], delete ot["onUpdate:open"];
        const {
          format: je,
          showTime: Pe
        } = ve;
        let Ge = {};
        Ge = O(O(O({}, Ge), Pe ? Up(O({
          format: je,
          picker: ze
        }, Pe)) : {}), ze === "time" ? Up(O(O({
          format: je
        }, Bn(ot, ["disabledTime"])), {
          picker: ze
        })) : {});
        const Se = f.value, Ce = h(Je, null, [Me || (ze === "time" ? h(og, null, null) : h(ng, null, null)), d.hasFeedback && d.feedbackIcon]);
        return $(h(Y7, Q(Q(Q({
          dateRender: Re,
          renderExtraFooter: Xe,
          separator: De || h("span", {
            "aria-label": "to",
            class: `${Se}-separator`
          }, [h(cx, null, null)]),
          ref: w,
          dropdownAlign: H_(p.value, u.placement),
          placeholder: kG(te, ze, ge),
          suffixIcon: Ce,
          clearIcon: Be || h(zi, null, null),
          allowClear: He,
          transitionName: Ke || `${m.value}-slide-up`
        }, ot), Ge), {}, {
          disabled: x.value,
          id: Ve,
          value: j.value,
          defaultValue: Z.value,
          defaultPickerValue: W.value,
          picker: ze,
          class: _e({
            [`${Se}-${P.value}`]: P.value,
            [`${Se}-borderless`]: !fe
          }, $r(Se, Ls(d.status, u.status), d.hasFeedback), l.class, I.value, C.value),
          locale: te.lang,
          prefixCls: Se,
          getPopupContainer: l.getCalendarContainer || v.value,
          generateConfig: e,
          prevIcon: ((ae = a.prevIcon) === null || ae === void 0 ? void 0 : ae.call(a)) || h("span", {
            class: `${Se}-prev-icon`
          }, null),
          nextIcon: ((se = a.nextIcon) === null || se === void 0 ? void 0 : se.call(a)) || h("span", {
            class: `${Se}-next-icon`
          }, null),
          superPrevIcon: ((re = a.superPrevIcon) === null || re === void 0 ? void 0 : re.call(a)) || h("span", {
            class: `${Se}-super-prev-icon`
          }, null),
          superNextIcon: ((ie = a.superNextIcon) === null || ie === void 0 ? void 0 : ie.call(a)) || h("span", {
            class: `${Se}-super-next-icon`
          }, null),
          components: j_,
          direction: p.value,
          dropdownClassName: _e(I.value, u.popupClassName, u.dropdownClassName),
          onChange: _,
          onOpenChange: N,
          onFocus: R,
          onBlur: H,
          onPanelChange: L,
          onOk: B,
          onCalendarChange: A
        }), null));
      };
    }
  });
}
const j_ = {
  button: vG,
  rangeItem: wG
};
function NG(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function Up(e) {
  const {
    format: t,
    picker: n,
    showHour: o,
    showMinute: i,
    showSecond: r,
    use12Hours: a
  } = e, l = NG(t)[0], s = O({}, e);
  return l && typeof l == "string" && (!l.includes("s") && r === 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")) && a === void 0 && (s.use12Hours = !0)), n === "time" ? s : (typeof l == "function" && delete s.format, {
    showTime: s
  });
}
function zG(e, t) {
  const {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: i,
    YearPicker: r,
    TimePicker: a,
    QuarterPicker: l
  } = _G(e, t), s = RG(e, t);
  return {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: i,
    YearPicker: r,
    TimePicker: a,
    QuarterPicker: l,
    RangePicker: s
  };
}
const {
  DatePicker: wv,
  WeekPicker: Sv,
  MonthPicker: Cv,
  YearPicker: BG,
  TimePicker: FG,
  QuarterPicker: $v,
  RangePicker: Pv
} = zG(l7), LG = O(wv, {
  WeekPicker: Sv,
  MonthPicker: Cv,
  YearPicker: BG,
  RangePicker: Pv,
  TimePicker: FG,
  QuarterPicker: $v,
  install: (e) => (e.component(wv.name, wv), e.component(Pv.name, Pv), e.component(Cv.name, Cv), e.component(Sv.name, Sv), e.component($v.name, $v), e)
}), HG = (e) => {
  const {
    componentCls: t,
    sizePaddingEdgeHorizontal: n,
    colorSplit: o,
    lineWidth: i
  } = e;
  return {
    [t]: O(O({}, fn(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
        }
      }
    })
  };
}, VG = On("Divider", (e) => {
  const t = Qt(e, {
    dividerVerticalGutterMargin: e.marginXS,
    dividerHorizontalWithTextGutterMargin: e.margin,
    dividerHorizontalGutterMargin: e.marginLG
  });
  return [HG(t)];
}, {
  sizePaddingEdgeHorizontal: 0
}), jG = () => ({
  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]
}), WG = be({
  name: "ADivider",
  inheritAttrs: !1,
  compatConfig: {
    MODE: 3
  },
  props: jG(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      direction: r
    } = Rt("divider", e), [a, l] = VG(i), s = E(() => e.orientation === "left" && e.orientationMargin != null), u = E(() => e.orientation === "right" && e.orientationMargin != null), c = E(() => {
      const {
        type: p,
        dashed: v,
        plain: g
      } = e, m = i.value;
      return {
        [m]: !0,
        [l.value]: !!l.value,
        [`${m}-${p}`]: !0,
        [`${m}-dashed`]: !!v,
        [`${m}-plain`]: !!g,
        [`${m}-rtl`]: r.value === "rtl",
        [`${m}-no-default-orientation-margin-left`]: s.value,
        [`${m}-no-default-orientation-margin-right`]: u.value
      };
    }), d = E(() => {
      const p = typeof e.orientationMargin == "number" ? `${e.orientationMargin}px` : e.orientationMargin;
      return O(O({}, s.value && {
        marginLeft: p
      }), u.value && {
        marginRight: p
      });
    }), f = E(() => e.orientation.length > 0 ? "-" + e.orientation : e.orientation);
    return () => {
      var p;
      const v = go((p = n.default) === null || p === void 0 ? void 0 : p.call(n));
      return a(h("div", Q(Q({}, o), {}, {
        class: [c.value, v.length ? `${i.value}-with-text ${i.value}-with-text${f.value}` : "", o.class],
        role: "separator"
      }), [v.length ? h("span", {
        class: `${i.value}-inner-text`,
        style: d.value
      }, [v]) : null]));
    };
  }
}), KG = rr(WG);
_i.Button = Vp;
_i.install = function(e) {
  return e.component(_i.name, _i), e.component(Vp.name, Vp), e;
};
const W_ = () => ({
  prefixCls: String,
  width: pe.oneOfType([pe.string, pe.number]),
  height: pe.oneOfType([pe.string, pe.number]),
  style: {
    type: Object,
    default: void 0
  },
  class: String,
  rootClassName: String,
  rootStyle: _t(),
  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: Vn(),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  // Motion
  motion: et(),
  maskMotion: _t()
}), qG = () => O(O({}, W_()), {
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: pe.oneOfType([pe.string, pe.func, pe.object, pe.looseBool])
}), YG = () => O(O({}, W_()), {
  getContainer: Function,
  getOpenCount: Function,
  scrollLocker: pe.any,
  inline: Boolean
});
function GG(e) {
  return Array.isArray(e) ? e : [e];
}
const UG = {
  transition: "transitionend",
  WebkitTransition: "webkitTransitionEnd",
  MozTransition: "transitionend",
  OTransition: "oTransitionEnd otransitionend"
};
Object.keys(UG).filter((e) => {
  if (typeof document > "u")
    return !1;
  const t = document.getElementsByTagName("html")[0];
  return e in (t ? t.style : {});
})[0];
const XG = !(typeof window < "u" && window.document && window.document.createElement);
var QG = 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 EC = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: YG(),
  emits: ["close", "handleClick", "change"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const i = $e(), r = $e(), a = $e(), l = $e(), s = $e();
    let u = [];
    `${Number((Date.now() + Math.random()).toString().replace(".", Math.round(Math.random() * 9).toString())).toString(16)}`, At(() => {
      Yt(() => {
        var x;
        const {
          open: S,
          getContainer: C,
          showMask: P,
          autofocus: $
        } = e, I = C?.();
        v(e), S && (I && (I.parentNode, document.body), Yt(() => {
          $ && c();
        }), P && ((x = e.scrollLocker) === null || x === void 0 || x.lock()));
      });
    }), Ie(() => e.level, () => {
      v(e);
    }, {
      flush: "post"
    }), Ie(() => e.open, () => {
      const {
        open: x,
        getContainer: S,
        scrollLocker: C,
        showMask: P,
        autofocus: $
      } = e, I = S?.();
      I && (I.parentNode, document.body), x ? ($ && c(), P && C?.lock()) : C?.unLock();
    }, {
      flush: "post"
    }), Vo(() => {
      var x;
      const {
        open: S
      } = e;
      S && (document.body.style.touchAction = ""), (x = e.scrollLocker) === null || x === void 0 || x.unLock();
    }), Ie(() => e.placement, (x) => {
      x && (s.value = null);
    });
    const c = () => {
      var x, S;
      (S = (x = r.value) === null || x === void 0 ? void 0 : x.focus) === null || S === void 0 || S.call(x);
    }, d = (x) => {
      n("close", x);
    }, f = (x) => {
      x.keyCode === rt.ESC && (x.stopPropagation(), d(x));
    }, p = () => {
      const {
        open: x,
        afterVisibleChange: S
      } = e;
      S && S(!!x);
    }, v = (x) => {
      let {
        level: S,
        getContainer: C
      } = x;
      if (XG)
        return;
      const P = C?.(), $ = P ? P.parentNode : null;
      u = [], S === "all" ? ($ ? Array.prototype.slice.call($.children) : []).forEach((w) => {
        w.nodeName !== "SCRIPT" && w.nodeName !== "STYLE" && w.nodeName !== "LINK" && w !== P && u.push(w);
      }) : S && GG(S).forEach((I) => {
        document.querySelectorAll(I).forEach((w) => {
          u.push(w);
        });
      });
    }, g = (x) => {
      n("handleClick", x);
    }, m = $e(!1);
    return Ie(r, () => {
      Yt(() => {
        m.value = !0;
      });
    }), () => {
      var x, S;
      const {
        width: C,
        height: P,
        open: $,
        prefixCls: I,
        placement: w,
        level: M,
        levelMove: _,
        ease: N,
        duration: R,
        getContainer: H,
        onChange: L,
        afterVisibleChange: B,
        showMask: A,
        maskClosable: G,
        maskStyle: j,
        keyboard: Z,
        getOpenCount: W,
        scrollLocker: K,
        contentWrapperStyle: q,
        style: U,
        class: ae,
        rootClassName: se,
        rootStyle: re,
        maskMotion: ie,
        motion: te,
        inline: ve
      } = e, ce = QG(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"]), fe = $ && m.value, ge = _e(I, {
        [`${I}-${w}`]: !0,
        [`${I}-open`]: fe,
        [`${I}-inline`]: ve,
        "no-mask": !A,
        [se]: !0
      }), Me = typeof te == "function" ? te(w) : te;
      return h("div", Q(Q({}, Bn(ce, ["autofocus"])), {}, {
        tabindex: -1,
        class: ge,
        style: re,
        ref: r,
        onKeydown: fe && Z ? f : void 0
      }), [h(Ei, ie, {
        default: () => [A && er(h("div", {
          class: `${I}-mask`,
          onClick: G ? d : void 0,
          style: j,
          ref: a
        }, null), [[Or, fe]])]
      }), h(Ei, Q(Q({}, Me), {}, {
        onAfterEnter: p,
        onAfterLeave: p
      }), {
        default: () => [er(h("div", {
          class: `${I}-content-wrapper`,
          style: [q],
          ref: i
        }, [h("div", {
          class: [`${I}-content`, ae],
          style: U,
          ref: s
        }, [(x = o.default) === null || x === void 0 ? void 0 : x.call(o)]), o.handler ? h("div", {
          onClick: g,
          ref: l
        }, [(S = o.handler) === null || S === void 0 ? void 0 : S.call(o)]) : null]), [[Or, fe]])]
      })]);
    };
  }
});
var DC = 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 ZG = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: _n(qG(), {
    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), r = (l) => {
      n("handleClick", l);
    }, a = (l) => {
      n("close", l);
    };
    return () => {
      const {
        getContainer: l,
        wrapperClassName: s,
        rootClassName: u,
        rootStyle: c,
        forceRender: d
      } = e, f = DC(e, ["getContainer", "wrapperClassName", "rootClassName", "rootStyle", "forceRender"]);
      let p = null;
      if (!l)
        return h(EC, Q(Q({}, f), {}, {
          rootClassName: u,
          rootStyle: c,
          open: e.open,
          onClose: a,
          onHandleClick: r,
          inline: !0
        }), o);
      const v = !!o.handler || d;
      return (v || e.open || i.value) && (p = h(a0, {
        autoLock: !0,
        visible: e.open,
        forceRender: v,
        getContainer: l,
        wrapperClassName: s
      }, {
        default: (g) => {
          var {
            visible: m,
            afterClose: x
          } = g, S = DC(g, ["visible", "afterClose"]);
          return h(EC, Q(Q(Q({
            ref: i
          }, f), S), {}, {
            rootClassName: u,
            rootStyle: c,
            open: m !== void 0 ? m : e.open,
            afterVisibleChange: x !== void 0 ? x : e.afterVisibleChange,
            onClose: a,
            onHandleClick: r
          }), o);
        }
      })), p;
    };
  }
}), JG = (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%)"
            }
          }
        }]
      }
    }
  };
}, eU = (e) => {
  const {
    componentCls: t,
    zIndexPopup: n,
    colorBgMask: o,
    colorBgElevated: i,
    motionDurationSlow: r,
    motionDurationMid: a,
    padding: l,
    paddingLG: s,
    fontSizeLG: u,
    lineHeightLG: c,
    lineWidth: d,
    lineType: f,
    colorSplit: p,
    marginSM: v,
    colorIcon: g,
    colorIconHover: m,
    colorText: x,
    fontWeightStrong: S,
    drawerFooterPaddingVertical: C,
    drawerFooterPaddingHorizontal: P
  } = e, $ = `${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 =====================
      [$]: {
        position: "absolute",
        zIndex: n,
        transition: `all ${r}`,
        "&-hidden": {
          display: "none"
        }
      },
      // Placement
      [`&-left > ${$}`]: {
        top: 0,
        bottom: 0,
        left: {
          _skip_check_: !0,
          value: 0
        },
        boxShadow: e.boxShadowDrawerLeft
      },
      [`&-right > ${$}`]: {
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: 0,
        boxShadow: e.boxShadowDrawerRight
      },
      [`&-top > ${$}`]: {
        top: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerUp
      },
      [`&-bottom > ${$}`]: {
        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} ${p}`,
        "&-title": {
          display: "flex",
          flex: 1,
          alignItems: "center",
          minWidth: 0,
          minHeight: 0
        }
      },
      [`${t}-extra`]: {
        flex: "none"
      },
      [`${t}-close`]: {
        display: "inline-block",
        marginInlineEnd: v,
        color: g,
        fontWeight: S,
        fontSize: u,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        textDecoration: "none",
        background: "transparent",
        border: 0,
        outline: 0,
        cursor: "pointer",
        transition: `color ${a}`,
        textRendering: "auto",
        "&:focus, &:hover": {
          color: m,
          textDecoration: "none"
        }
      },
      [`${t}-title`]: {
        flex: 1,
        margin: 0,
        color: x,
        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: `${C}px ${P}px`,
        borderTop: `${d}px ${f} ${p}`
      },
      // ====================== RTL =======================
      "&-rtl": {
        direction: "rtl"
      }
    }
  };
}, tU = On("Drawer", (e) => {
  const t = Qt(e, {
    drawerFooterPaddingVertical: e.paddingXS,
    drawerFooterPaddingHorizontal: e.padding
  });
  return [eU(t), JG(t)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase
}));
var nU = 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 oU = ["top", "right", "bottom", "left"], AC = {
  distance: 180
}, iU = () => ({
  autofocus: {
    type: Boolean,
    default: void 0
  },
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: pe.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: _t(),
  rootClassName: String,
  rootStyle: _t(),
  size: {
    type: String
  },
  drawerStyle: _t(),
  headerStyle: _t(),
  bodyStyle: _t(),
  contentWrapperStyle: {
    type: Object,
    default: void 0
  },
  title: pe.any,
  /** @deprecated Please use `open` instead */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  width: pe.oneOfType([pe.string, pe.number]),
  height: pe.oneOfType([pe.string, pe.number]),
  zIndex: Number,
  prefixCls: String,
  push: pe.oneOfType([pe.looseBool, {
    type: Object
  }]),
  placement: pe.oneOf(oU),
  keyboard: {
    type: Boolean,
    default: void 0
  },
  extra: pe.any,
  footer: pe.any,
  footerStyle: _t(),
  level: pe.any,
  levelMove: {
    type: [Number, Array, Function]
  },
  handle: pe.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
}), rU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADrawer",
  inheritAttrs: !1,
  props: _n(iU(), {
    closable: !0,
    placement: "right",
    maskClosable: !0,
    mask: !0,
    level: null,
    keyboard: !0,
    push: AC
  }),
  slots: Object,
  // emits: ['update:visible', 'close', 'afterVisibleChange'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: i
    } = t;
    const r = $e(!1), a = $e(!1), l = $e(null), s = $e(!1), u = $e(!1), c = E(() => {
      var W;
      return (W = e.open) !== null && W !== void 0 ? W : 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 = zt("parentDrawerOpts", null), {
      prefixCls: f,
      getPopupContainer: p,
      direction: v
    } = Rt("drawer", e), [g, m] = tU(f), x = E(() => (
      // 有可能为 false，所以不能直接判断
      e.getContainer === void 0 && p?.value ? () => p.value(document.body) : e.getContainer
    ));
    dn(!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((W) => {
      let [K, q] = W;
      dn(!e[K], "Drawer", `\`${K}\` is deprecated, please use \`${q}\` instead.`);
    }), Ft("parentDrawerOpts", {
      setPush: () => {
        r.value = !0;
      },
      setPull: () => {
        r.value = !1, Yt(() => {
          P();
        });
      }
    }), At(() => {
      c.value && d && d.setPush();
    }), Vo(() => {
      d && d.setPull();
    }), Ie(u, () => {
      d && (u.value ? d.setPush() : d.setPull());
    }, {
      flush: "post"
    });
    const P = () => {
      var W, K;
      (K = (W = l.value) === null || W === void 0 ? void 0 : W.domFocus) === null || K === void 0 || K.call(W);
    }, $ = (W) => {
      n("update:visible", !1), n("update:open", !1), n("close", W);
    }, I = (W) => {
      var K;
      W || (a.value === !1 && (a.value = !0), e.destroyOnClose && (s.value = !1)), (K = e.afterVisibleChange) === null || K === void 0 || K.call(e, W), n("afterVisibleChange", W), n("afterOpenChange", W);
    }, w = E(() => {
      const {
        push: W,
        placement: K
      } = e;
      let q;
      return typeof W == "boolean" ? q = W ? AC.distance : 0 : q = W.distance, q = parseFloat(String(q || 0)), K === "left" || K === "right" ? `translateX(${K === "left" ? q : -q}px)` : K === "top" || K === "bottom" ? `translateY(${K === "top" ? q : -q}px)` : null;
    }), M = E(() => {
      var W;
      return (W = e.width) !== null && W !== void 0 ? W : e.size === "large" ? 736 : 378;
    }), _ = E(() => {
      var W;
      return (W = e.height) !== null && W !== void 0 ? W : e.size === "large" ? 736 : 378;
    }), N = E(() => {
      const {
        mask: W,
        placement: K
      } = e;
      if (!u.value && !W)
        return {};
      const q = {};
      return K === "left" || K === "right" ? q.width = CS(M.value) ? `${M.value}px` : M.value : q.height = CS(_.value) ? `${_.value}px` : _.value, q;
    }), R = E(() => {
      const {
        zIndex: W,
        contentWrapperStyle: K
      } = e, q = N.value;
      return [{
        zIndex: W,
        transform: r.value ? w.value : void 0
      }, O({}, K), q];
    }), H = (W) => {
      const {
        closable: K,
        headerStyle: q
      } = e, U = Ji(o, e, "extra"), ae = Ji(o, e, "title");
      return !ae && !K ? null : h("div", {
        class: _e(`${W}-header`, {
          [`${W}-header-close-only`]: K && !ae && !U
        }),
        style: q
      }, [h("div", {
        class: `${W}-header-title`
      }, [L(W), ae && h("div", {
        class: `${W}-title`
      }, [ae])]), U && h("div", {
        class: `${W}-extra`
      }, [U])]);
    }, L = (W) => {
      var K;
      const {
        closable: q
      } = e, U = o.closeIcon ? (K = o.closeIcon) === null || K === void 0 ? void 0 : K.call(o) : e.closeIcon;
      return q && h("button", {
        key: "closer",
        onClick: $,
        "aria-label": "Close",
        class: `${W}-close`
      }, [U === void 0 ? h(la, null, null) : U]);
    }, B = (W) => {
      var K;
      if (a.value && !e.forceRender && !s.value)
        return null;
      const {
        bodyStyle: q,
        drawerStyle: U
      } = e;
      return h("div", {
        class: `${W}-wrapper-body`,
        style: U
      }, [H(W), h("div", {
        key: "body",
        class: `${W}-body`,
        style: q
      }, [(K = o.default) === null || K === void 0 ? void 0 : K.call(o)]), A(W)]);
    }, A = (W) => {
      const K = Ji(o, e, "footer");
      if (!K)
        return null;
      const q = `${W}-footer`;
      return h("div", {
        class: q,
        style: e.footerStyle
      }, [K]);
    }, G = E(() => _e({
      "no-mask": !e.mask,
      [`${f.value}-rtl`]: v.value === "rtl"
    }, e.rootClassName, m.value)), j = E(() => Ts(Ka(f.value, "mask-motion"))), Z = (W) => Ts(Ka(f.value, `panel-motion-${W}`));
    return () => {
      const {
        width: W,
        height: K,
        placement: q,
        mask: U,
        forceRender: ae
      } = e, se = nU(e, ["width", "height", "placement", "mask", "forceRender"]), re = O(O(O({}, i), Bn(se, ["size", "closeIcon", "closable", "destroyOnClose", "drawerStyle", "headerStyle", "bodyStyle", "title", "push", "onAfterVisibleChange", "onClose", "onUpdate:visible", "onUpdate:open", "visible"])), {
        forceRender: ae,
        onClose: $,
        afterVisibleChange: I,
        handler: !1,
        prefixCls: f.value,
        open: u.value,
        showMask: U,
        placement: q,
        ref: l
      });
      return g(h(Sd, null, {
        default: () => [h(ZG, Q(Q({}, re), {}, {
          maskMotion: j.value,
          motion: Z,
          width: M.value,
          height: _.value,
          getContainer: x.value,
          rootClassName: G.value,
          rootStyle: e.rootStyle,
          contentWrapperStyle: R.value
        }), {
          handler: e.handle ? () => e.handle : o.handle,
          default: () => B(f.value)
        })]
      }));
    };
  }
}), aU = rr(rU), td = (e) => e != null && (Array.isArray(e) ? Do(e).length : !0);
function dx(e) {
  return td(e.prefix) || td(e.suffix) || td(e.allowClear);
}
function fp(e) {
  return td(e.addonBefore) || td(e.addonAfter);
}
function kb(e) {
  return typeof e > "u" || e === null ? "" : String(e);
}
function nd(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 r = e.cloneNode(!0);
    i.target = r, i.currentTarget = r, r.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 K_(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 lU = () => ({
  addonBefore: pe.any,
  addonAfter: pe.any,
  prefix: pe.any,
  suffix: pe.any,
  clearIcon: pe.any,
  affixWrapperClassName: String,
  groupClassName: String,
  wrapperClassName: String,
  inputClassName: String,
  allowClear: {
    type: Boolean,
    default: void 0
  }
}), q_ = () => O(O({}, lU()), {
  value: {
    type: [String, Number, Symbol],
    default: void 0
  },
  defaultValue: {
    type: [String, Number, Symbol],
    default: void 0
  },
  inputElement: pe.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
  }
}), Y_ = () => O(O({}, q_()), {
  id: String,
  placeholder: {
    type: [String, Number]
  },
  autocomplete: String,
  type: rn("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
}), sU = be({
  name: "BaseInput",
  inheritAttrs: !1,
  props: q_(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = le(), r = (l) => {
      var s;
      if (!((s = i.value) === null || s === void 0) && s.contains(l.target)) {
        const {
          triggerFocus: u
        } = e;
        u?.();
      }
    }, a = () => {
      var l;
      const {
        allowClear: s,
        value: u,
        disabled: c,
        readonly: d,
        handleReset: f,
        suffix: p = n.suffix,
        prefixCls: v
      } = e;
      if (!s)
        return null;
      const g = !c && !d && u, m = `${v}-clear-icon`, x = ((l = n.clearIcon) === null || l === void 0 ? void 0 : l.call(n)) || "*";
      return h("span", {
        onClick: f,
        onMousedown: (S) => S.preventDefault(),
        class: _e({
          [`${m}-hidden`]: !g,
          [`${m}-has-suffix`]: !!p
        }, m),
        role: "button",
        tabindex: -1
      }, [x]);
    };
    return () => {
      var l, s;
      const {
        focused: u,
        value: c,
        disabled: d,
        allowClear: f,
        readonly: p,
        hidden: v,
        prefixCls: g,
        prefix: m = (l = n.prefix) === null || l === void 0 ? void 0 : l.call(n),
        suffix: x = (s = n.suffix) === null || s === void 0 ? void 0 : s.call(n),
        addonAfter: S = n.addonAfter,
        addonBefore: C = n.addonBefore,
        inputElement: P,
        affixWrapperClassName: $,
        wrapperClassName: I,
        groupClassName: w
      } = e;
      let M = Un(P, {
        value: c,
        hidden: v
      });
      if (dx({
        prefix: m,
        suffix: x,
        allowClear: f
      })) {
        const _ = `${g}-affix-wrapper`, N = _e(_, {
          [`${_}-disabled`]: d,
          [`${_}-focused`]: u,
          [`${_}-readonly`]: p,
          [`${_}-input-with-clear-btn`]: x && f && c
        }, !fp({
          addonAfter: S,
          addonBefore: C
        }) && o.class, $), R = (x || f) && h("span", {
          class: `${g}-suffix`
        }, [a(), x]);
        M = h("span", {
          class: N,
          style: o.style,
          hidden: !fp({
            addonAfter: S,
            addonBefore: C
          }) && v,
          onMousedown: r,
          ref: i
        }, [m && h("span", {
          class: `${g}-prefix`
        }, [m]), Un(P, {
          style: null,
          value: c,
          hidden: null
        }), R]);
      }
      if (fp({
        addonAfter: S,
        addonBefore: C
      })) {
        const _ = `${g}-group`, N = `${_}-addon`, R = _e(`${g}-wrapper`, _, I), H = _e(`${g}-group-wrapper`, o.class, w);
        return h("span", {
          class: H,
          style: o.style,
          hidden: v
        }, [h("span", {
          class: R
        }, [C && h("span", {
          class: N
        }, [C]), Un(M, {
          style: null,
          hidden: null
        }), S && h("span", {
          class: N
        }, [S])])]);
      }
      return M;
    };
  }
});
var uU = 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 cU = be({
  name: "VCInput",
  inheritAttrs: !1,
  props: Y_(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: r
    } = t;
    const a = $e(e.value === void 0 ? e.defaultValue : e.value), l = $e(!1), s = $e(), u = $e();
    Ie(() => e.value, () => {
      a.value = e.value;
    }), Ie(() => e.disabled, () => {
      e.disabled && (l.value = !1);
    });
    const c = (w) => {
      s.value && K_(s.value.input, w);
    }, d = () => {
      var w;
      (w = s.value.input) === null || w === void 0 || w.blur();
    }, f = (w, M, _) => {
      var N;
      (N = s.value.input) === null || N === void 0 || N.setSelectionRange(w, M, _);
    }, p = () => {
      var w;
      (w = s.value.input) === null || w === void 0 || w.select();
    };
    i({
      focus: c,
      blur: d,
      input: E(() => {
        var w;
        return (w = s.value.input) === null || w === void 0 ? void 0 : w.input;
      }),
      stateValue: a,
      setSelectionRange: f,
      select: p
    });
    const v = (w) => {
      r("change", w);
    }, g = (w, M) => {
      a.value !== w && (e.value === void 0 ? a.value = w : Yt(() => {
        var _;
        s.value.input.value !== a.value && ((_ = u.value) === null || _ === void 0 || _.$forceUpdate());
      }), Yt(() => {
        M && M();
      }));
    }, m = (w) => {
      const {
        value: M
      } = w.target;
      if (a.value === M) return;
      const _ = w.target.value;
      nd(s.value.input, w, v), g(_);
    }, x = (w) => {
      w.keyCode === 13 && r("pressEnter", w), r("keydown", w);
    }, S = (w) => {
      l.value = !0, r("focus", w);
    }, C = (w) => {
      l.value = !1, r("blur", w);
    }, P = (w) => {
      nd(s.value.input, w, v), g("", () => {
        c();
      });
    }, $ = () => {
      var w, M;
      const {
        addonBefore: _ = n.addonBefore,
        addonAfter: N = n.addonAfter,
        disabled: R,
        valueModifiers: H = {},
        htmlSize: L,
        autocomplete: B,
        prefixCls: A,
        inputClassName: G,
        prefix: j = (w = n.prefix) === null || w === void 0 ? void 0 : w.call(n),
        suffix: Z = (M = n.suffix) === null || M === void 0 ? void 0 : M.call(n),
        allowClear: W,
        type: K = "text"
      } = e, q = Bn(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"
      ]), U = O(O(O({}, q), o), {
        autocomplete: B,
        onChange: m,
        onInput: m,
        onFocus: S,
        onBlur: C,
        onKeydown: x,
        class: _e(A, {
          [`${A}-disabled`]: R
        }, G, !fp({
          addonAfter: N,
          addonBefore: _
        }) && !dx({
          prefix: j,
          suffix: Z,
          allowClear: W
        }) && o.class),
        ref: s,
        key: "ant-input",
        size: L,
        type: K,
        lazy: e.lazy
      });
      return H.lazy && delete U.onInput, U.autofocus || delete U.autofocus, h(Rd, Bn(U, ["size"]), null);
    }, I = () => {
      var w;
      const {
        maxlength: M,
        suffix: _ = (w = n.suffix) === null || w === void 0 ? void 0 : w.call(n),
        showCount: N,
        prefixCls: R
      } = e, H = Number(M) > 0;
      if (_ || N) {
        const L = [...kb(a.value)].length, B = typeof N == "object" ? N.formatter({
          count: L,
          maxlength: M
        }) : `${L}${H ? ` / ${M}` : ""}`;
        return h(Je, null, [!!N && h("span", {
          class: _e(`${R}-show-count-suffix`, {
            [`${R}-show-count-has-suffix`]: !!_
          })
        }, [B]), _]);
      }
      return null;
    };
    return At(() => {
      process.env.NODE_ENV === "test" && e.autofocus && c();
    }), () => {
      const {
        prefixCls: w,
        disabled: M
      } = e, _ = uU(e, ["prefixCls", "disabled"]);
      return h(sU, Q(Q(Q({}, _), o), {}, {
        ref: u,
        prefixCls: w,
        inputElement: $(),
        handleReset: P,
        value: kb(a.value),
        focused: l.value,
        triggerFocus: c,
        suffix: I(),
        disabled: M
      }), n);
    };
  }
}), ig = () => Bn(Y_(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), G_ = () => O(O({}, Bn(ig(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  rows: Number,
  autosize: {
    type: [Boolean, Object],
    default: void 0
  },
  autoSize: {
    type: [Boolean, Object],
    default: void 0
  },
  onResize: {
    type: Function
  },
  onCompositionstart: Ku(),
  onCompositionend: Ku(),
  valueModifiers: Object
});
var dU = 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 kt = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInput",
  inheritAttrs: !1,
  props: ig(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: r
    } = t;
    const a = le(), l = Bi(), s = Ai.useInject(), u = E(() => Ls(s.status, e.status)), {
      direction: c,
      prefixCls: d,
      size: f,
      autocomplete: p
    } = Rt("input", e), {
      compactSize: v,
      compactItemClassnames: g
    } = fc(d, c), m = E(() => v.value || f.value), [x, S] = X0(d), C = Tr();
    i({
      focus: (L) => {
        var B;
        (B = a.value) === null || B === void 0 || B.focus(L);
      },
      blur: () => {
        var L;
        (L = a.value) === null || L === void 0 || L.blur();
      },
      input: a,
      setSelectionRange: (L, B, A) => {
        var G;
        (G = a.value) === null || G === void 0 || G.setSelectionRange(L, B, A);
      },
      select: () => {
        var L;
        (L = a.value) === null || L === void 0 || L.select();
      }
    });
    const M = le([]), _ = () => {
      M.value.push(setTimeout(() => {
        var L, B, A, G;
        !((L = a.value) === null || L === void 0) && L.input && ((B = a.value) === null || B === void 0 ? void 0 : B.input.getAttribute("type")) === "password" && (!((A = a.value) === null || A === void 0) && A.input.hasAttribute("value")) && ((G = a.value) === null || G === void 0 || G.input.removeAttribute("value"));
      }));
    };
    At(() => {
      _();
    }), Qb(() => {
      M.value.forEach((L) => clearTimeout(L));
    }), qt(() => {
      M.value.forEach((L) => clearTimeout(L));
    });
    const N = (L) => {
      _(), r("blur", L), l.onFieldBlur();
    }, R = (L) => {
      _(), r("focus", L);
    }, H = (L) => {
      r("update:value", L.target.value), r("change", L), r("input", L), l.onFieldChange();
    };
    return () => {
      var L, B, A, G, j, Z;
      const {
        hasFeedback: W,
        feedbackIcon: K
      } = s, {
        allowClear: q,
        bordered: U = !0,
        prefix: ae = (L = n.prefix) === null || L === void 0 ? void 0 : L.call(n),
        suffix: se = (B = n.suffix) === null || B === void 0 ? void 0 : B.call(n),
        addonAfter: re = (A = n.addonAfter) === null || A === void 0 ? void 0 : A.call(n),
        addonBefore: ie = (G = n.addonBefore) === null || G === void 0 ? void 0 : G.call(n),
        id: te = (j = l.id) === null || j === void 0 ? void 0 : j.value
      } = e, ve = dU(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), ce = (W || se) && h(Je, null, [se, W && K]), fe = d.value, ge = dx({
        prefix: ae,
        suffix: se
      }) || !!W, Me = n.clearIcon || (() => h(zi, null, null));
      return x(h(cU, Q(Q(Q({}, o), Bn(ve, ["onUpdate:value", "onChange", "onInput"])), {}, {
        onChange: H,
        id: te,
        disabled: (Z = e.disabled) !== null && Z !== void 0 ? Z : C.value,
        ref: a,
        prefixCls: fe,
        autocomplete: p.value,
        onBlur: N,
        onFocus: R,
        prefix: ae,
        suffix: ce,
        allowClear: q,
        addonAfter: re && h(Sd, null, {
          default: () => [h(Bp, null, {
            default: () => [re]
          })]
        }),
        addonBefore: ie && h(Sd, null, {
          default: () => [h(Bp, null, {
            default: () => [ie]
          })]
        }),
        class: [o.class, g.value],
        inputClassName: _e({
          [`${fe}-sm`]: m.value === "small",
          [`${fe}-lg`]: m.value === "large",
          [`${fe}-rtl`]: c.value === "rtl",
          [`${fe}-borderless`]: !U
        }, !ge && $r(fe, u.value), S.value),
        affixWrapperClassName: _e({
          [`${fe}-affix-wrapper-sm`]: m.value === "small",
          [`${fe}-affix-wrapper-lg`]: m.value === "large",
          [`${fe}-affix-wrapper-rtl`]: c.value === "rtl",
          [`${fe}-affix-wrapper-borderless`]: !U
        }, $r(`${fe}-affix-wrapper`, u.value, W), S.value),
        wrapperClassName: _e({
          [`${fe}-group-rtl`]: c.value === "rtl"
        }, S.value),
        groupClassName: _e({
          [`${fe}-group-wrapper-sm`]: m.value === "small",
          [`${fe}-group-wrapper-lg`]: m.value === "large",
          [`${fe}-group-wrapper-rtl`]: c.value === "rtl"
        }, $r(`${fe}-group-wrapper`, u.value, W), S.value)
      }), O(O({}, n), {
        clearIcon: Me
      })));
    };
  }
}), fU = be({
  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: r,
      getPrefixCls: a
    } = Rt("input-group", e), l = Ai.useInject();
    Ai.useProvide(l, {
      isFormItemInput: !1
    });
    const s = E(() => a("input")), [u, c] = X0(s), d = E(() => {
      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`]: r.value === "rtl"
      };
    });
    return () => {
      var f;
      return u(h("span", Q(Q({}, o), {}, {
        class: _e(d.value, o.class)
      }), [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]));
    };
  }
});
var pU = 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 hU = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputSearch",
  inheritAttrs: !1,
  props: O(O({}, ig()), {
    inputPrefixCls: String,
    // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
    enterButton: pe.any,
    onSearch: {
      type: Function
    }
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: i,
      emit: r
    } = t;
    const a = $e(), l = $e(!1);
    i({
      focus: () => {
        var $;
        ($ = a.value) === null || $ === void 0 || $.focus();
      },
      blur: () => {
        var $;
        ($ = a.value) === null || $ === void 0 || $.blur();
      }
    });
    const c = ($) => {
      r("update:value", $.target.value), $ && $.target && $.type === "click" && r("search", $.target.value, $), r("change", $);
    }, d = ($) => {
      var I;
      document.activeElement === ((I = a.value) === null || I === void 0 ? void 0 : I.input) && $.preventDefault();
    }, f = ($) => {
      var I, w;
      r("search", (w = (I = a.value) === null || I === void 0 ? void 0 : I.input) === null || w === void 0 ? void 0 : w.stateValue, $);
    }, p = ($) => {
      l.value || e.loading || f($);
    }, v = ($) => {
      l.value = !0, r("compositionstart", $);
    }, g = ($) => {
      l.value = !1, r("compositionend", $);
    }, {
      prefixCls: m,
      getPrefixCls: x,
      direction: S,
      size: C
    } = Rt("input-search", e), P = E(() => x("input", e.inputPrefixCls));
    return () => {
      var $, I, w, M;
      const {
        disabled: _,
        loading: N,
        addonAfter: R = ($ = n.addonAfter) === null || $ === void 0 ? void 0 : $.call(n),
        suffix: H = (I = n.suffix) === null || I === void 0 ? void 0 : I.call(n)
      } = e, L = pU(e, ["disabled", "loading", "addonAfter", "suffix"]);
      let {
        enterButton: B = (M = (w = n.enterButton) === null || w === void 0 ? void 0 : w.call(n)) !== null && M !== void 0 ? M : !1
      } = e;
      B = B || B === "";
      const A = typeof B == "boolean" ? h(zd, null, null) : null, G = `${m.value}-button`, j = Array.isArray(B) ? B[0] : B;
      let Z;
      const W = j.type && NP(j.type) && j.type.__ANT_BUTTON;
      if (W || j.tagName === "button")
        Z = Un(j, O({
          onMousedown: d,
          onClick: f,
          key: "enterButton"
        }, W ? {
          class: G,
          size: C.value
        } : {}), !1);
      else {
        const q = A && !B;
        Z = h(Bt, {
          class: G,
          type: B ? "primary" : void 0,
          size: C.value,
          disabled: _,
          key: "enterButton",
          onMousedown: d,
          onClick: f,
          loading: N,
          icon: q ? A : null
        }, {
          default: () => [q ? null : A || B]
        });
      }
      R && (Z = [Z, R]);
      const K = _e(m.value, {
        [`${m.value}-rtl`]: S.value === "rtl",
        [`${m.value}-${C.value}`]: !!C.value,
        [`${m.value}-with-button`]: !!B
      }, o.class);
      return h(kt, Q(Q(Q({
        ref: a
      }, Bn(L, ["onUpdate:value", "onSearch", "enterButton"])), o), {}, {
        onPressEnter: p,
        onCompositionstart: v,
        onCompositionend: g,
        size: C.value,
        prefixCls: P.value,
        addonAfter: Z,
        suffix: H,
        onChange: c,
        class: K,
        disabled: _
      }), n);
    };
  }
}), RC = (e) => e != null && (Array.isArray(e) ? Do(e).length : !0);
function gU(e) {
  return RC(e.addonBefore) || RC(e.addonAfter);
}
const vU = ["text", "input"], mU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ClearableLabeledInput",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    inputType: pe.oneOf(Mr("text", "input")),
    value: Ii(),
    defaultValue: Ii(),
    allowClear: {
      type: Boolean,
      default: void 0
    },
    element: Ii(),
    handleReset: Function,
    disabled: {
      type: Boolean,
      default: void 0
    },
    direction: {
      type: String
    },
    size: {
      type: String
    },
    suffix: Ii(),
    prefix: Ii(),
    addonBefore: Ii(),
    addonAfter: Ii(),
    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 = Ai.useInject(), r = (l) => {
      const {
        value: s,
        disabled: u,
        readonly: c,
        handleReset: d,
        suffix: f = n.suffix
      } = e, p = !u && !c && s, v = `${l}-clear-icon`;
      return h(zi, {
        onClick: d,
        onMousedown: (g) => g.preventDefault(),
        class: _e({
          [`${v}-hidden`]: !p,
          [`${v}-has-suffix`]: !!f
        }, v),
        role: "button"
      }, null);
    }, a = (l, s) => {
      const {
        value: u,
        allowClear: c,
        direction: d,
        bordered: f,
        hidden: p,
        status: v,
        addonAfter: g = n.addonAfter,
        addonBefore: m = n.addonBefore,
        hashId: x
      } = e, {
        status: S,
        hasFeedback: C
      } = i;
      if (!c)
        return Un(s, {
          value: u,
          disabled: e.disabled
        });
      const P = _e(`${l}-affix-wrapper`, `${l}-affix-wrapper-textarea-with-clear-btn`, $r(`${l}-affix-wrapper`, Ls(S, v), C), {
        [`${l}-affix-wrapper-rtl`]: d === "rtl",
        [`${l}-affix-wrapper-borderless`]: !f,
        // className will go to addon wrapper
        [`${o.class}`]: !gU({
          addonAfter: g,
          addonBefore: m
        }) && o.class
      }, x);
      return h("span", {
        class: P,
        style: o.style,
        hidden: p
      }, [Un(s, {
        style: null,
        value: u,
        disabled: e.disabled
      }), r(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 === vU[0] ? a(s, c) : null;
    };
  }
}), bU = `
  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;
`, yU = ["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"], Ov = {};
let Wi;
function xU(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 && Ov[n])
    return Ov[n];
  const o = window.getComputedStyle(e), i = o.getPropertyValue("box-sizing") || o.getPropertyValue("-moz-box-sizing") || o.getPropertyValue("-webkit-box-sizing"), r = parseFloat(o.getPropertyValue("padding-bottom")) + parseFloat(o.getPropertyValue("padding-top")), a = parseFloat(o.getPropertyValue("border-bottom-width")) + parseFloat(o.getPropertyValue("border-top-width")), s = {
    sizingStyle: yU.map((u) => `${u}:${o.getPropertyValue(u)}`).join(";"),
    paddingSize: r,
    borderSize: a,
    boxSizing: i
  };
  return t && n && (Ov[n] = s), s;
}
function wU(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;
  Wi || (Wi = document.createElement("textarea"), Wi.setAttribute("tab-index", "-1"), Wi.setAttribute("aria-hidden", "true"), document.body.appendChild(Wi)), e.getAttribute("wrap") ? Wi.setAttribute("wrap", e.getAttribute("wrap")) : Wi.removeAttribute("wrap");
  const {
    paddingSize: i,
    borderSize: r,
    boxSizing: a,
    sizingStyle: l
  } = xU(e, t);
  Wi.setAttribute("style", `${l};${bU}`), Wi.value = e.value || e.placeholder || "";
  let s, u, c, d = Wi.scrollHeight;
  if (a === "border-box" ? d += r : a === "content-box" && (d -= i), n !== null || o !== null) {
    Wi.value = " ";
    const p = Wi.scrollHeight - i;
    n !== null && (s = p * n, a === "border-box" && (s = s + i + r), d = Math.max(s, d)), o !== null && (u = p * o, a === "border-box" && (u = u + i + r), 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 kv = 0, Iv = 1, Mv = 2, SU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ResizableTextArea",
  inheritAttrs: !1,
  props: G_(),
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: i
    } = t, r, a;
    const l = le(), s = le({}), u = le(Mv);
    qt(() => {
      Vt.cancel(r), Vt.cancel(a);
    });
    const c = () => {
      try {
        if (l.value && document.activeElement === l.value.input) {
          const I = l.value.getSelectionStart(), w = l.value.getSelectionEnd(), M = l.value.getScrollTop();
          l.value.setSelectionRange(I, w), l.value.setScrollTop(M);
        }
      } catch {
      }
    }, d = le(), f = le();
    It(() => {
      const I = e.autoSize || e.autosize;
      I ? (d.value = I.minRows, f.value = I.maxRows) : (d.value = void 0, f.value = void 0);
    });
    const p = E(() => !!(e.autoSize || e.autosize)), v = () => {
      u.value = kv;
    };
    Ie([() => e.value, d, f, p], () => {
      p.value && v();
    }, {
      immediate: !0
    });
    const g = le();
    Ie([u, l], () => {
      if (l.value)
        if (u.value === kv)
          u.value = Iv;
        else if (u.value === Iv) {
          const I = wU(l.value.input, !1, d.value, f.value);
          u.value = Mv, g.value = I;
        } else
          c();
    }, {
      immediate: !0,
      flush: "post"
    });
    const m = fi(), x = le(), S = () => {
      Vt.cancel(x.value);
    }, C = (I) => {
      u.value === Mv && (o("resize", I), p.value && (S(), x.value = Vt(() => {
        v();
      })));
    };
    qt(() => {
      S();
    }), i({
      resizeTextarea: () => {
        v();
      },
      textArea: E(() => {
        var I;
        return (I = l.value) === null || I === void 0 ? void 0 : I.input;
      }),
      instance: m
    }), wo(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
    const $ = () => {
      const {
        prefixCls: I,
        disabled: w
      } = e, M = Bn(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), _ = _e(I, n.class, {
        [`${I}-disabled`]: w
      }), N = p.value ? g.value : null, R = [n.style, s.value, N], H = O(O(O({}, M), n), {
        style: R,
        class: _
      });
      return (u.value === kv || u.value === Iv) && R.push({
        overflowX: "hidden",
        overflowY: "hidden"
      }), H.autofocus || delete H.autofocus, H.rows === 0 && delete H.rows, h(Al, {
        onResize: C,
        disabled: !p.value
      }, {
        default: () => [h(Rd, Q(Q({}, H), {}, {
          ref: l,
          tag: "textarea"
        }), null)]
      });
    };
    return () => $();
  }
});
function U_(e, t) {
  return [...e || ""].slice(0, t).join("");
}
function NC(e, t, n, o) {
  let i = n;
  return e ? i = U_(n, o) : [...t || ""].length < n.length && [...n || ""].length > o && (i = t), i;
}
const CU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATextarea",
  inheritAttrs: !1,
  props: G_(),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: i
    } = t;
    var r;
    const a = Bi(), l = Ai.useInject(), s = E(() => Ls(l.status, e.status)), u = $e((r = e.value) !== null && r !== void 0 ? r : e.defaultValue), c = $e(), d = $e(""), {
      prefixCls: f,
      size: p,
      direction: v
    } = Rt("input", e), [g, m] = X0(f), x = Tr(), S = E(() => e.showCount === "" || e.showCount || !1), C = E(() => Number(e.maxlength) > 0), P = $e(!1), $ = $e(), I = $e(0), w = (W) => {
      P.value = !0, $.value = d.value, I.value = W.currentTarget.selectionStart, i("compositionstart", W);
    }, M = (W) => {
      var K;
      P.value = !1;
      let q = W.currentTarget.value;
      if (C.value) {
        const U = I.value >= e.maxlength + 1 || I.value === ((K = $.value) === null || K === void 0 ? void 0 : K.length);
        q = NC(U, $.value, q, e.maxlength);
      }
      q !== d.value && (H(q), nd(W.currentTarget, W, A, q)), i("compositionend", W);
    }, _ = fi();
    Ie(() => e.value, () => {
      var W;
      "value" in _.vnode.props, u.value = (W = e.value) !== null && W !== void 0 ? W : "";
    });
    const N = (W) => {
      var K;
      K_((K = c.value) === null || K === void 0 ? void 0 : K.textArea, W);
    }, R = () => {
      var W, K;
      (K = (W = c.value) === null || W === void 0 ? void 0 : W.textArea) === null || K === void 0 || K.blur();
    }, H = (W, K) => {
      u.value !== W && (e.value === void 0 ? u.value = W : Yt(() => {
        var q, U, ae;
        c.value.textArea.value !== d.value && ((ae = (q = c.value) === null || q === void 0 ? void 0 : (U = q.instance).update) === null || ae === void 0 || ae.call(U));
      }), Yt(() => {
        K && K();
      }));
    }, L = (W) => {
      W.keyCode === 13 && i("pressEnter", W), i("keydown", W);
    }, B = (W) => {
      const {
        onBlur: K
      } = e;
      K?.(W), a.onFieldBlur();
    }, A = (W) => {
      i("update:value", W.target.value), i("change", W), i("input", W), a.onFieldChange();
    }, G = (W) => {
      nd(c.value.textArea, W, A), H("", () => {
        N();
      });
    }, j = (W) => {
      let K = W.target.value;
      if (u.value !== K) {
        if (C.value) {
          const q = W.target, U = q.selectionStart >= e.maxlength + 1 || q.selectionStart === K.length || !q.selectionStart;
          K = NC(U, d.value, K, e.maxlength);
        }
        nd(W.currentTarget, W, A, K), H(K);
      }
    }, Z = () => {
      var W, K;
      const {
        class: q
      } = n, {
        bordered: U = !0
      } = e, ae = O(O(O({}, Bn(e, ["allowClear"])), n), {
        class: [{
          [`${f.value}-borderless`]: !U,
          [`${q}`]: q && !S.value,
          [`${f.value}-sm`]: p.value === "small",
          [`${f.value}-lg`]: p.value === "large"
        }, $r(f.value, s.value), m.value],
        disabled: x.value,
        showCount: null,
        prefixCls: f.value,
        onInput: j,
        onChange: j,
        onBlur: B,
        onKeydown: L,
        onCompositionstart: w,
        onCompositionend: M
      });
      return !((W = e.valueModifiers) === null || W === void 0) && W.lazy && delete ae.onInput, h(SU, Q(Q({}, ae), {}, {
        id: (K = ae?.id) !== null && K !== void 0 ? K : a.id.value,
        ref: c,
        maxlength: e.maxlength,
        lazy: e.lazy
      }), null);
    };
    return o({
      focus: N,
      blur: R,
      resizableTextArea: c
    }), It(() => {
      let W = kb(u.value);
      !P.value && C.value && (e.value === null || e.value === void 0) && (W = U_(W, e.maxlength)), d.value = W;
    }), () => {
      var W;
      const {
        maxlength: K,
        bordered: q = !0,
        hidden: U
      } = e, {
        style: ae,
        class: se
      } = n, re = O(O(O({}, e), n), {
        prefixCls: f.value,
        inputType: "text",
        handleReset: G,
        direction: v.value,
        bordered: q,
        style: S.value ? void 0 : ae,
        hashId: m.value,
        disabled: (W = e.disabled) !== null && W !== void 0 ? W : x.value
      });
      let ie = h(mU, Q(Q({}, re), {}, {
        value: d.value,
        status: e.status
      }), {
        element: Z
      });
      if (S.value || l.hasFeedback) {
        const te = [...d.value].length;
        let ve = "";
        typeof S.value == "object" ? ve = S.value.formatter({
          value: d.value,
          count: te,
          maxlength: K
        }) : ve = `${te}${C.value ? ` / ${K}` : ""}`, ie = h("div", {
          hidden: U,
          class: _e(`${f.value}-textarea`, {
            [`${f.value}-textarea-rtl`]: v.value === "rtl",
            [`${f.value}-textarea-show-count`]: S.value,
            [`${f.value}-textarea-in-form-item`]: l.isFormItemInput
          }, `${f.value}-textarea-show-count`, se, m.value),
          style: ae,
          "data-count": typeof ve != "object" ? ve : void 0
        }, [ie, l.hasFeedback && h("span", {
          class: `${f.value}-textarea-suffix`
        }, [l.feedbackIcon])]);
      }
      return g(ie);
    };
  }
});
var $U = { 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 zC(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) {
      PU(e, i, n[i]);
    });
  }
  return e;
}
function PU(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var fx = function(t, n) {
  var o = zC({}, t, n.attrs);
  return h(an, zC({}, o, {
    icon: $U
  }), null);
};
fx.displayName = "EyeOutlined";
fx.inheritAttrs = !1;
var OU = { 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 BC(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) {
      kU(e, i, n[i]);
    });
  }
  return e;
}
function kU(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var px = function(t, n) {
  var o = BC({}, t, n.attrs);
  return h(an, BC({}, o, {
    icon: OU
  }), null);
};
px.displayName = "EyeInvisibleOutlined";
px.inheritAttrs = !1;
var IU = 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 MU = {
  click: "onClick",
  hover: "onMouseover"
}, TU = (e) => e ? h(fx, null, null) : h(px, null, null), _U = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputPassword",
  inheritAttrs: !1,
  props: O(O({}, ig()), {
    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: r
    } = t;
    const a = $e(!1), l = () => {
      const {
        disabled: m
      } = e;
      m || (a.value = !a.value, r("update:visible", a.value));
    };
    It(() => {
      e.visible !== void 0 && (a.value = !!e.visible);
    });
    const s = $e();
    i({
      focus: () => {
        var m;
        (m = s.value) === null || m === void 0 || m.focus();
      },
      blur: () => {
        var m;
        (m = s.value) === null || m === void 0 || m.blur();
      }
    });
    const d = (m) => {
      const {
        action: x,
        iconRender: S = n.iconRender || TU
      } = e, C = MU[x] || "", P = S(a.value), $ = {
        [C]: l,
        class: `${m}-icon`,
        key: "passwordIcon",
        onMousedown: (I) => {
          I.preventDefault();
        },
        onMouseup: (I) => {
          I.preventDefault();
        }
      };
      return Un(Ao(P) ? P : h("span", null, [P]), $);
    }, {
      prefixCls: f,
      getPrefixCls: p
    } = Rt("input-password", e), v = E(() => p("input", e.inputPrefixCls)), g = () => {
      const {
        size: m,
        visibilityToggle: x
      } = e, S = IU(e, ["size", "visibilityToggle"]), C = x && d(f.value), P = _e(f.value, o.class, {
        [`${f.value}-${m}`]: !!m
      }), $ = O(O(O({}, Bn(S, ["suffix", "iconRender", "action"])), o), {
        type: a.value ? "text" : "password",
        class: P,
        prefixCls: v.value,
        suffix: C
      });
      return m && ($.size = m), h(kt, Q({
        ref: s
      }, $), n);
    };
    return () => g();
  }
});
kt.Group = fU;
kt.Search = hU;
kt.TextArea = CU;
kt.Password = _U;
kt.install = function(e) {
  return e.component(kt.name, kt), e.component(kt.Group.name, kt.Group), e.component(kt.Search.name, kt.Search), e.component(kt.TextArea.name, kt.TextArea), e.component(kt.Password.name, kt.Password), e;
};
function hx() {
  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: pe.shape({
      x: Number,
      y: Number
    }).loose,
    title: pe.any,
    footer: pe.any,
    transitionName: String,
    maskTransitionName: String,
    animation: pe.any,
    maskAnimation: pe.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: pe.any,
    maskProps: pe.any,
    wrapProps: pe.any,
    getContainer: pe.any,
    dialogStyle: {
      type: Object,
      default: void 0
    },
    dialogClass: String,
    closeIcon: pe.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 FC(e, t, n) {
  let o = t;
  return !o && n && (o = `${e}-${n}`), o;
}
let LC = -1;
function EU() {
  return LC += 1, LC;
}
function HC(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 DU(e) {
  const t = e.getBoundingClientRect(), n = {
    left: t.left,
    top: t.top
  }, o = e.ownerDocument, i = o.defaultView || o.parentWindow;
  return n.left += HC(i), n.top += HC(i, !0), n;
}
const AU = {
  width: 0,
  height: 0,
  overflow: "hidden",
  outline: "none"
}, RU = {
  outline: "none"
}, NU = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogContent",
  inheritAttrs: !1,
  props: O(O({}, hx()), {
    motionName: String,
    ariaId: String,
    onVisibleChanged: Function,
    onMousedown: Function,
    onMouseup: Function
  }),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: i
    } = t;
    const r = le(), a = le(), l = le();
    n({
      focus: () => {
        var f;
        (f = r.value) === null || f === void 0 || f.focus({
          preventScroll: !0
        });
      },
      changeActive: (f) => {
        const {
          activeElement: p
        } = document;
        f && p === a.value ? r.value.focus({
          preventScroll: !0
        }) : !f && p === r.value && a.value.focus({
          preventScroll: !0
        });
      }
    });
    const s = le(), u = E(() => {
      const {
        width: f,
        height: p
      } = e, v = {};
      return f !== void 0 && (v.width = typeof f == "number" ? `${f}px` : f), p !== void 0 && (v.height = typeof p == "number" ? `${p}px` : p), s.value && (v.transformOrigin = s.value), v;
    }), c = () => {
      Yt(() => {
        if (l.value) {
          const f = DU(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, p, v, g;
      const {
        prefixCls: m,
        footer: x = (f = o.footer) === null || f === void 0 ? void 0 : f.call(o),
        title: S = (p = o.title) === null || p === void 0 ? void 0 : p.call(o),
        ariaId: C,
        closable: P,
        closeIcon: $ = (v = o.closeIcon) === null || v === void 0 ? void 0 : v.call(o),
        onClose: I,
        bodyStyle: w,
        bodyProps: M,
        onMousedown: _,
        onMouseup: N,
        visible: R,
        modalRender: H = o.modalRender,
        destroyOnClose: L,
        motionName: B
      } = e;
      let A;
      x && (A = h("div", {
        class: `${m}-footer`
      }, [x]));
      let G;
      S && (G = h("div", {
        class: `${m}-header`
      }, [h("div", {
        class: `${m}-title`,
        id: C
      }, [S])]));
      let j;
      P && (j = h("button", {
        type: "button",
        onClick: I,
        "aria-label": "Close",
        class: `${m}-close`
      }, [$ || h("span", {
        class: `${m}-close-x`
      }, null)]));
      const Z = h("div", {
        class: `${m}-content`
      }, [j, G, h("div", Q({
        class: `${m}-body`,
        style: w
      }, M), [(g = o.default) === null || g === void 0 ? void 0 : g.call(o)]), A]), W = Ts(B);
      return h(Ei, Q(Q({}, W), {}, {
        onBeforeEnter: c,
        onAfterEnter: () => d(!0),
        onAfterLeave: () => d(!1)
      }), {
        default: () => [R || !L ? er(h("div", Q(Q({}, i), {}, {
          ref: l,
          key: "dialog-element",
          role: "document",
          style: [u.value, i.style],
          class: [m, i.class],
          onMousedown: _,
          onMouseup: N
        }), [h("div", {
          tabindex: 0,
          ref: r,
          style: RU
        }, [H ? H({
          originVNode: Z
        }) : Z]), h("div", {
          tabindex: 0,
          ref: a,
          style: AU
        }, null)]), [[Or, R]]) : null]
      });
    };
  }
}), zU = be({
  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: r
      } = e, a = Ts(r);
      return h(Ei, a, {
        default: () => [er(h("div", Q({
          class: `${n}-mask`
        }, i), null), [[Or, o]])]
      });
    };
  }
}), VC = be({
  compatConfig: {
    MODE: 3
  },
  name: "VcDialog",
  inheritAttrs: !1,
  props: _n(O(O({}, hx()), {
    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 = $e(), r = $e(), a = $e(), l = $e(e.visible), s = $e(`vcDialogTitle${EU()}`), u = (x) => {
      var S, C;
      if (x)
        bl(r.value, document.activeElement) || (i.value = document.activeElement, (S = a.value) === null || S === void 0 || S.focus());
      else {
        const P = l.value;
        if (l.value = !1, e.mask && i.value && e.focusTriggerAfterClose) {
          try {
            i.value.focus({
              preventScroll: !0
            });
          } catch {
          }
          i.value = null;
        }
        P && ((C = e.afterClose) === null || C === void 0 || C.call(e));
      }
    }, c = (x) => {
      var S;
      (S = e.onClose) === null || S === void 0 || S.call(e, x);
    }, d = $e(!1), f = $e(), p = () => {
      clearTimeout(f.value), d.value = !0;
    }, v = () => {
      f.value = setTimeout(() => {
        d.value = !1;
      });
    }, g = (x) => {
      if (!e.maskClosable) return null;
      d.value ? d.value = !1 : r.value === x.target && c(x);
    }, m = (x) => {
      if (e.keyboard && x.keyCode === rt.ESC) {
        x.stopPropagation(), c(x);
        return;
      }
      e.visible && x.keyCode === rt.TAB && a.value.changeActive(!x.shiftKey);
    };
    return Ie(() => e.visible, () => {
      e.visible && (l.value = !0);
    }, {
      flush: "post"
    }), qt(() => {
      var x;
      clearTimeout(f.value), (x = e.scrollLocker) === null || x === void 0 || x.unLock();
    }), It(() => {
      var x, S;
      (x = e.scrollLocker) === null || x === void 0 || x.unLock(), l.value && ((S = e.scrollLocker) === null || S === void 0 || S.lock());
    }), () => {
      const {
        prefixCls: x,
        mask: S,
        visible: C,
        maskTransitionName: P,
        maskAnimation: $,
        zIndex: I,
        wrapClassName: w,
        rootClassName: M,
        wrapStyle: _,
        closable: N,
        maskProps: R,
        maskStyle: H,
        transitionName: L,
        animation: B,
        wrapProps: A,
        title: G = o.title
      } = e, {
        style: j,
        class: Z
      } = n;
      return h("div", Q({
        class: [`${x}-root`, M]
      }, Fs(e, {
        data: !0
      })), [h(zU, {
        prefixCls: x,
        visible: S && C,
        motionName: FC(x, P, $),
        style: O({
          zIndex: I
        }, H),
        maskProps: R
      }, null), h("div", Q({
        tabIndex: -1,
        onKeydown: m,
        class: _e(`${x}-wrap`, w),
        ref: r,
        onClick: g,
        role: "dialog",
        "aria-labelledby": G ? s.value : null,
        style: O(O({
          zIndex: I
        }, _), {
          display: l.value ? null : "none"
        })
      }, A), [h(NU, Q(Q({}, Bn(e, ["scrollLocker"])), {}, {
        style: j,
        class: Z,
        onMousedown: p,
        onMouseup: v,
        ref: a,
        closable: N,
        ariaId: s.value,
        prefixCls: x,
        visible: C,
        onClose: c,
        onVisibleChanged: u,
        motionName: FC(x, L, B)
      }), o)])]);
    };
  }
}), BU = hx(), FU = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogWrap",
  inheritAttrs: !1,
  props: _n(BU, {
    visible: !1
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(e.visible);
    return r0({}, {
      inTriggerContext: !1
    }), Ie(() => e.visible, () => {
      e.visible && (i.value = !0);
    }, {
      flush: "post"
    }), () => {
      const {
        visible: r,
        getContainer: a,
        forceRender: l,
        destroyOnClose: s = !1,
        afterClose: u
      } = e;
      let c = O(O(O({}, e), n), {
        ref: "_component",
        key: "dialog"
      });
      return a === !1 ? h(VC, Q(Q({}, c), {}, {
        getOpenCount: () => 2
      }), o) : !l && s && !i.value ? null : h(a0, {
        autoLock: !0,
        visible: r,
        forceRender: l,
        getContainer: a
      }, {
        default: (d) => (c = O(O(O({}, c), d), {
          afterClose: () => {
            u?.(), i.value = !1;
          }
        }), h(VC, c, o))
      });
    };
  }
});
function jC(e) {
  return {
    position: e,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  };
}
const LU = (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`]: O(O({}, jC("fixed")), {
        zIndex: e.zIndexPopupBase,
        height: "100%",
        backgroundColor: e.colorBgMask,
        [`${t}-hidden`]: {
          display: "none"
        }
      }),
      [`${t}-wrap`]: O(O({}, jC("fixed")), {
        overflow: "auto",
        outline: 0,
        WebkitOverflowScrolling: "touch"
      })
    }
  }, {
    [`${t}-root`]: DV(e)
  }];
}, HU = (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]: O(O({}, fn(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`]: O({
          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
          }
        }, Rl(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"
        }
      }
    }
  ];
}, VU = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-confirm`;
  return {
    [n]: {
      "&-rtl": {
        direction: "rtl"
      },
      [`${e.antCls}-modal-header`]: {
        display: "none"
      },
      [`${n}-body-wrapper`]: O({}, ja()),
      [`${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"
    }
  };
}, jU = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-root`]: {
      [`${t}-wrap-rtl`]: {
        direction: "rtl",
        [`${t}-confirm-body`]: {
          direction: "rtl"
        }
      }
    }
  };
}, WU = (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
      }
    }
  };
}, KU = On("Modal", (e) => {
  const t = e.padding, n = e.fontSizeHeading5, o = e.lineHeightHeading5, i = Qt(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 [HU(i), VU(i), jU(i), LU(i), e.wireframe && WU(i), Bd(i, "zoom")];
});
var qU = { 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 WC(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) {
      YU(e, i, n[i]);
    });
  }
  return e;
}
function YU(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var gx = function(t, n) {
  var o = WC({}, t, n.attrs);
  return h(an, WC({}, o, {
    icon: qU
  }), null);
};
gx.displayName = "UpOutlined";
gx.inheritAttrs = !1;
function Ib() {
  return typeof BigInt == "function";
}
function od(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("."), r = i[0] || "0", a = i[1] || "0";
  r === "0" && a === "0" && (n = !1);
  const l = n ? "-" : "";
  return {
    negative: n,
    negativeStr: l,
    trimStr: o,
    integerStr: r,
    decimalStr: a,
    fullStr: `${l}${o}`
  };
}
function vx(e) {
  const t = String(e);
  return !Number.isNaN(Number(t)) && t.includes("e");
}
function Pd(e) {
  const t = String(e);
  if (vx(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(".") && bx(t) ? t.length - t.indexOf(".") - 1 : 0;
}
function mx(e) {
  let t = String(e);
  if (vx(e)) {
    if (e > Number.MAX_SAFE_INTEGER)
      return String(Ib() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
    if (e < Number.MIN_SAFE_INTEGER)
      return String(Ib() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER);
    t = e.toFixed(Pd(t));
  }
  return od(t).fullStr;
}
function bx(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 X_(e) {
  return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
}
class hs {
  constructor(t) {
    if (this.origin = "", X_(t)) {
      this.empty = !0;
      return;
    }
    this.origin = String(t), this.number = Number(t);
  }
  negate() {
    return new hs(-this.toNumber());
  }
  add(t) {
    if (this.isInvalidate())
      return new hs(t);
    const n = Number(t);
    if (Number.isNaN(n))
      return this;
    const o = this.number + n;
    if (o > Number.MAX_SAFE_INTEGER)
      return new hs(Number.MAX_SAFE_INTEGER);
    if (o < Number.MIN_SAFE_INTEGER)
      return new hs(Number.MIN_SAFE_INTEGER);
    const i = Math.max(Pd(this.number), Pd(n));
    return new hs(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() ? "" : mx(this.number) : this.origin;
  }
}
class $u {
  constructor(t) {
    if (this.origin = "", X_(t)) {
      this.empty = !0;
      return;
    }
    if (this.origin = String(t), t === "-" || Number.isNaN(t)) {
      this.nan = !0;
      return;
    }
    let n = t;
    if (vx(n) && (n = Number(n)), n = typeof n == "string" ? n : mx(n), bx(n)) {
      const o = od(n);
      this.negative = o.negative;
      const i = o.trimStr.split(".");
      this.integer = BigInt(i[0]);
      const r = i[1] || "0";
      this.decimal = BigInt(r), this.decimalLen = r.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 $u(this.toString());
    return t.negative = !t.negative, t;
  }
  add(t) {
    if (this.isInvalidate())
      return new $u(t);
    const n = new $u(t);
    if (n.isInvalidate())
      return this;
    const o = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(o), r = n.alignDecimal(o), a = (i + r).toString(), {
      negativeStr: l,
      trimStr: s
    } = od(a), u = `${l}${s.padStart(o + 1, "0")}`;
    return new $u(`${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() ? "" : od(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  }
}
function qr(e) {
  return Ib() ? new $u(e) : new hs(e);
}
function Mb(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  if (e === "")
    return "";
  const {
    negativeStr: i,
    integerStr: r,
    decimalStr: a
  } = od(e), l = `${t}${a}`, s = `${i}${r}`;
  if (n >= 0) {
    const u = Number(a[n]);
    if (u >= 5 && !o) {
      const c = qr(e).add(`${i}0.${"0".repeat(n)}${10 - u}`);
      return Mb(c.toString(), t, n, o);
    }
    return n === 0 ? s : `${s}${t}${a.padEnd(n, "0").slice(0, n)}`;
  }
  return l === ".0" ? s : `${s}${l}`;
}
const GU = 200, UU = 600, XU = be({
  compatConfig: {
    MODE: 3
  },
  name: "StepHandler",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    upDisabled: Boolean,
    downDisabled: Boolean,
    onStep: et()
  },
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const i = le(), r = (l, s) => {
      l.preventDefault(), o("step", s);
      function u() {
        o("step", s), i.value = setTimeout(u, GU);
      }
      i.value = setTimeout(u, UU);
    }, a = () => {
      clearTimeout(i.value);
    };
    return qt(() => {
      a();
    }), () => {
      if (u0())
        return null;
      const {
        prefixCls: l,
        upDisabled: s,
        downDisabled: u
      } = e, c = `${l}-handler`, d = _e(c, `${c}-up`, {
        [`${c}-up-disabled`]: s
      }), f = _e(c, `${c}-down`, {
        [`${c}-down-disabled`]: u
      }), p = {
        unselectable: "on",
        role: "button",
        onMouseup: a,
        onMouseleave: a
      }, {
        upNode: v,
        downNode: g
      } = n;
      return h("div", {
        class: `${c}-wrap`
      }, [h("span", Q(Q({}, p), {}, {
        onMousedown: (m) => {
          r(m, !0);
        },
        "aria-label": "Increase Value",
        "aria-disabled": s,
        class: d
      }), [v?.() || h("span", {
        unselectable: "on",
        class: `${l}-handler-up-inner`
      }, null)]), h("span", Q(Q({}, p), {}, {
        onMousedown: (m) => {
          r(m, !1);
        },
        "aria-label": "Decrease Value",
        "aria-disabled": u,
        class: f
      }), [g?.() || h("span", {
        unselectable: "on",
        class: `${l}-handler-down-inner`
      }, null)])]);
    };
  }
});
function QU(e, t) {
  const n = le(null);
  function o() {
    try {
      const {
        selectionStart: r,
        selectionEnd: a,
        value: l
      } = e.value, s = l.substring(0, r), u = l.substring(a);
      n.value = {
        start: r,
        end: a,
        value: l,
        beforeTxt: s,
        afterTxt: u
      };
    } catch {
    }
  }
  function i() {
    if (e.value && n.value && t.value)
      try {
        const {
          value: r
        } = e.value, {
          beforeTxt: a,
          afterTxt: l,
          start: s
        } = n.value;
        let u = r.length;
        if (r.endsWith(l))
          u = r.length - n.value.afterTxt.length;
        else if (r.startsWith(a))
          u = a.length;
        else {
          const c = a[s - 1], d = r.indexOf(c, s - 1);
          d !== -1 && (u = d + 1);
        }
        e.value.setSelectionRange(u, u);
      } catch (r) {
        wn(!1, `Something warning of cursor restore. Please fire issue about this: ${r.message}`);
      }
  }
  return [o, i];
}
const ZU = (() => {
  const e = $e(0), t = () => {
    Vt.cancel(e.value);
  };
  return qt(() => {
    t();
  }), (n) => {
    t(), e.value = Vt(() => {
      n();
    });
  };
});
var JU = 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 KC = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), qC = (e) => {
  const t = qr(e);
  return t.isInvalidate() ? null : t;
}, Q_ = () => ({
  /** value will show as string */
  stringMode: ct(),
  defaultValue: en([String, Number]),
  value: en([String, Number]),
  prefixCls: rn(),
  min: en([String, Number]),
  max: en([String, Number]),
  step: en([String, Number], 1),
  tabindex: Number,
  controls: ct(!0),
  readonly: ct(),
  disabled: ct(),
  autofocus: ct(),
  keyboard: ct(!0),
  /** Parse display value to validate number */
  parser: et(),
  /** Transform `value` to display value show in input */
  formatter: et(),
  /** Syntactic sugar of `formatter`. Config precision of display. */
  precision: Number,
  /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  decimalSeparator: String,
  onInput: et(),
  onChange: et(),
  onPressEnter: et(),
  onStep: et(),
  onBlur: et(),
  onFocus: et()
}), eX = be({
  compatConfig: {
    MODE: 3
  },
  name: "InnerInputNumber",
  inheritAttrs: !1,
  props: O(O({}, Q_()), {
    lazy: Boolean
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i,
      expose: r
    } = t;
    const a = $e(), l = $e(!1), s = $e(!1), u = $e(!1), c = $e(qr(e.value));
    function d(U) {
      e.value === void 0 && (c.value = U);
    }
    const f = (U, ae) => {
      if (!ae)
        return e.precision >= 0 ? e.precision : Math.max(Pd(U), Pd(e.step));
    }, p = (U) => {
      const ae = String(U);
      if (e.parser)
        return e.parser(ae);
      let se = ae;
      return e.decimalSeparator && (se = se.replace(e.decimalSeparator, ".")), se.replace(/[^\w.-]+/g, "");
    }, v = $e(""), g = (U, ae) => {
      if (e.formatter)
        return e.formatter(U, {
          userTyping: ae,
          input: String(v.value)
        });
      let se = typeof U == "number" ? mx(U) : U;
      if (!ae) {
        const re = f(se, ae);
        if (bx(se) && (e.decimalSeparator || re >= 0)) {
          const ie = e.decimalSeparator || ".";
          se = Mb(se, ie, re);
        }
      }
      return se;
    }, m = (() => {
      const U = e.value;
      return c.value.isInvalidate() && ["string", "number"].includes(typeof U) ? Number.isNaN(U) ? "" : U : g(c.value.toString(), !1);
    })();
    v.value = m;
    function x(U, ae) {
      v.value = g(
        // 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.
        U.isInvalidate() ? U.toString(!1) : U.toString(!ae),
        ae
      );
    }
    const S = E(() => qC(e.max)), C = E(() => qC(e.min)), P = E(() => !S.value || !c.value || c.value.isInvalidate() ? !1 : S.value.lessEquals(c.value)), $ = E(() => !C.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(C.value)), [I, w] = QU(a, l), M = (U) => S.value && !U.lessEquals(S.value) ? S.value : C.value && !C.value.lessEquals(U) ? C.value : null, _ = (U) => !M(U), N = (U, ae) => {
      var se;
      let re = U, ie = _(re) || re.isEmpty();
      if (!re.isEmpty() && !ae && (re = M(re) || re, ie = !0), !e.readonly && !e.disabled && ie) {
        const te = re.toString(), ve = f(te, ae);
        return ve >= 0 && (re = qr(Mb(te, ".", ve))), re.equals(c.value) || (d(re), (se = e.onChange) === null || se === void 0 || se.call(e, re.isEmpty() ? null : KC(e.stringMode, re)), e.value === void 0 && x(re, ae)), re;
      }
      return c.value;
    }, R = ZU(), H = (U) => {
      var ae;
      if (I(), v.value = U, !u.value) {
        const se = p(U), re = qr(se);
        re.isNaN() || N(re, !0);
      }
      (ae = e.onInput) === null || ae === void 0 || ae.call(e, U), R(() => {
        let se = U;
        e.parser || (se = U.replace(/。/g, ".")), se !== U && H(se);
      });
    }, L = () => {
      u.value = !0;
    }, B = () => {
      u.value = !1, H(a.value.value);
    }, A = (U) => {
      H(U.target.value);
    }, G = (U) => {
      var ae, se;
      if (U && P.value || !U && $.value)
        return;
      s.value = !1;
      let re = qr(e.step);
      U || (re = re.negate());
      const ie = (c.value || qr(0)).add(re.toString()), te = N(ie, !1);
      (ae = e.onStep) === null || ae === void 0 || ae.call(e, KC(e.stringMode, te), {
        offset: e.step,
        type: U ? "up" : "down"
      }), (se = a.value) === null || se === void 0 || se.focus();
    }, j = (U) => {
      const ae = qr(p(v.value));
      let se = ae;
      ae.isNaN() ? se = c.value : se = N(ae, U), e.value !== void 0 ? x(c.value, !1) : se.isNaN() || x(se, !1);
    }, Z = () => {
      s.value = !0;
    }, W = (U) => {
      var ae;
      const {
        which: se
      } = U;
      s.value = !0, se === rt.ENTER && (u.value || (s.value = !1), j(!1), (ae = e.onPressEnter) === null || ae === void 0 || ae.call(e, U)), e.keyboard !== !1 && !u.value && [rt.UP, rt.DOWN].includes(se) && (G(rt.UP === se), U.preventDefault());
    }, K = () => {
      s.value = !1;
    }, q = (U) => {
      j(!1), l.value = !1, s.value = !1, i("blur", U);
    };
    return Ie(() => e.precision, () => {
      c.value.isInvalidate() || x(c.value, !1);
    }, {
      flush: "post"
    }), Ie(() => e.value, () => {
      const U = qr(e.value);
      c.value = U;
      const ae = qr(p(v.value));
      (!U.equals(ae) || !s.value || e.formatter) && x(U, s.value);
    }, {
      flush: "post"
    }), Ie(v, () => {
      e.formatter && w();
    }, {
      flush: "post"
    }), Ie(() => e.disabled, (U) => {
      U && (l.value = !1);
    }), r({
      focus: () => {
        var U;
        (U = a.value) === null || U === void 0 || U.focus();
      },
      blur: () => {
        var U;
        (U = a.value) === null || U === void 0 || U.blur();
      }
    }), () => {
      const U = O(O({}, n), e), {
        prefixCls: ae = "rc-input-number",
        min: se,
        max: re,
        step: ie = 1,
        defaultValue: te,
        value: ve,
        disabled: ce,
        readonly: fe,
        keyboard: ge,
        controls: Me = !0,
        autofocus: ze,
        stringMode: Ke,
        parser: He,
        formatter: Re,
        precision: Xe,
        decimalSeparator: De,
        onChange: Be,
        onInput: Ve,
        onPressEnter: ot,
        onStep: je,
        lazy: Pe,
        class: Ge,
        style: Se
      } = U, Ce = JU(U, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
        upHandler: Ae,
        downHandler: qe
      } = o, We = `${ae}-input`, tt = {};
      return Pe ? tt.onChange = A : tt.onInput = A, h("div", {
        class: _e(ae, Ge, {
          [`${ae}-focused`]: l.value,
          [`${ae}-disabled`]: ce,
          [`${ae}-readonly`]: fe,
          [`${ae}-not-a-number`]: c.value.isNaN(),
          [`${ae}-out-of-range`]: !c.value.isInvalidate() && !_(c.value)
        }),
        style: Se,
        onKeydown: W,
        onKeyup: K
      }, [Me && h(XU, {
        prefixCls: ae,
        upDisabled: P.value,
        downDisabled: $.value,
        onStep: G
      }, {
        upNode: Ae,
        downNode: qe
      }), h("div", {
        class: `${We}-wrap`
      }, [h("input", Q(Q(Q({
        autofocus: ze,
        autocomplete: "off",
        role: "spinbutton",
        "aria-valuemin": se,
        "aria-valuemax": re,
        "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
        step: ie
      }, Ce), {}, {
        ref: a,
        class: We,
        value: v.value,
        disabled: ce,
        readonly: fe,
        onFocus: (Ee) => {
          l.value = !0, i("focus", Ee);
        }
      }, tt), {}, {
        onBlur: q,
        onCompositionstart: L,
        onCompositionend: B,
        onBeforeinput: Z
      }), null)])]);
    };
  }
});
function Tv(e) {
  return e != null;
}
const tX = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorBorder: i,
    borderRadius: r,
    fontSizeLG: a,
    controlHeightLG: l,
    controlHeightSM: s,
    colorError: u,
    inputPaddingHorizontalSM: c,
    colorTextDescription: d,
    motionDurationMid: f,
    colorPrimary: p,
    controlHeight: v,
    inputPaddingHorizontal: g,
    colorBgContainer: m,
    colorTextDisabled: x,
    borderRadiusSM: S,
    borderRadiusLG: C,
    controlWidth: P,
    handleVisible: $
  } = e;
  return [
    {
      [t]: O(O(O(O({}, fn(e)), gc(e)), Gh(e, t)), {
        display: "inline-block",
        width: P,
        margin: 0,
        padding: 0,
        border: `${n}px ${o} ${i}`,
        borderRadius: r,
        "&-rtl": {
          direction: "rtl",
          [`${t}-input`]: {
            direction: "rtl"
          }
        },
        "&-lg": {
          padding: 0,
          fontSize: a,
          borderRadius: C,
          [`input${t}-input`]: {
            height: l - 2 * n
          }
        },
        "&-sm": {
          padding: 0,
          borderRadius: S,
          [`input${t}-input`]: {
            height: s - 2 * n,
            padding: `0 ${c}px`
          }
        },
        "&:hover": O({}, hc(e)),
        "&-focused": O({}, Ds(e)),
        "&-disabled": O(O({}, TT(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": O(O(O({}, fn(e)), ET(e)), {
          "&-wrapper": {
            display: "inline-block",
            textAlign: "start",
            verticalAlign: "top",
            [`${t}-affix-wrapper`]: {
              width: "100%"
            },
            // Size
            "&-lg": {
              [`${t}-group-addon`]: {
                borderRadius: C
              }
            },
            "&-sm": {
              [`${t}-group-addon`]: {
                borderRadius: S
              }
            }
          }
        }),
        [t]: {
          "&-input": O(O({
            width: "100%",
            height: v - 2 * n,
            padding: `0 ${g}px`,
            textAlign: "start",
            backgroundColor: "transparent",
            border: 0,
            borderRadius: r,
            outline: 0,
            transition: `all ${f} linear`,
            appearance: "textfield",
            color: e.colorText,
            fontSize: "inherit",
            verticalAlign: "top"
          }, MT(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: m,
          borderStartStartRadius: 0,
          borderStartEndRadius: r,
          borderEndEndRadius: r,
          borderEndStartRadius: 0,
          opacity: $ === !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: p
            }
          },
          "&-up-inner, &-down-inner": O(O({}, cc()), {
            color: d,
            transition: `all ${f} linear`,
            userSelect: "none"
          })
        },
        [`${t}-handler-up`]: {
          borderStartEndRadius: r
        },
        [`${t}-handler-down`]: {
          borderBlockStart: `${n}px ${o} ${i}`,
          borderEndEndRadius: r
        },
        // 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: x
        }
      }
    },
    // Border-less
    {
      [`${t}-borderless`]: {
        borderColor: "transparent",
        boxShadow: "none",
        [`${t}-handler-down`]: {
          borderBlockStartWidth: 0
        }
      }
    }
  ];
}, nX = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    inputAffixPadding: o,
    controlWidth: i,
    borderRadiusLG: r,
    borderRadiusSM: a
  } = e;
  return {
    [`${t}-affix-wrapper`]: O(O(O({}, gc(e)), Gh(e, `${t}-affix-wrapper`)), {
      // or number handler will cover form status
      position: "relative",
      display: "inline-flex",
      width: i,
      padding: 0,
      paddingInlineStart: n,
      "&-lg": {
        borderRadius: r
      },
      "&-sm": {
        borderRadius: a
      },
      [`&:not(${t}-affix-wrapper-disabled):hover`]: O(O({}, hc(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
        }
      }
    })
  };
}, oX = On("InputNumber", (e) => {
  const t = Uh(e);
  return [
    tX(t),
    nX(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(t)
  ];
}, (e) => ({
  controlWidth: 90,
  handleWidth: e.controlHeightSM - e.lineWidth * 2,
  handleFontSize: e.fontSize / 2,
  handleVisible: "auto"
}));
var iX = 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 = Q_(), rX = () => O(O({}, YC), {
  size: rn(),
  bordered: ct(!0),
  placeholder: String,
  name: String,
  id: String,
  type: String,
  addonBefore: pe.any,
  addonAfter: pe.any,
  prefix: pe.any,
  "onUpdate:value": YC.onChange,
  valueModifiers: Object,
  status: rn()
}), _v = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputNumber",
  inheritAttrs: !1,
  props: rX(),
  // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  slots: Object,
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      attrs: i,
      slots: r
    } = t;
    var a;
    const l = Bi(), s = Ai.useInject(), u = E(() => Ls(s.status, e.status)), {
      prefixCls: c,
      size: d,
      direction: f,
      disabled: p
    } = Rt("input-number", e), {
      compactSize: v,
      compactItemClassnames: g
    } = fc(c, f), m = Tr(), x = E(() => {
      var L;
      return (L = p.value) !== null && L !== void 0 ? L : m.value;
    }), [S, C] = oX(c), P = E(() => v.value || d.value), $ = $e((a = e.value) !== null && a !== void 0 ? a : e.defaultValue), I = $e(!1);
    Ie(() => e.value, () => {
      $.value = e.value;
    });
    const w = $e(null), M = () => {
      var L;
      (L = w.value) === null || L === void 0 || L.focus();
    };
    o({
      focus: M,
      blur: () => {
        var L;
        (L = w.value) === null || L === void 0 || L.blur();
      }
    });
    const N = (L) => {
      e.value === void 0 && ($.value = L), n("update:value", L), n("change", L), l.onFieldChange();
    }, R = (L) => {
      I.value = !1, n("blur", L), l.onFieldBlur();
    }, H = (L) => {
      I.value = !0, n("focus", L);
    };
    return () => {
      var L, B, A, G;
      const {
        hasFeedback: j,
        isFormItemInput: Z,
        feedbackIcon: W
      } = s, K = (L = e.id) !== null && L !== void 0 ? L : l.id.value, q = O(O(O({}, i), e), {
        id: K,
        disabled: x.value
      }), {
        class: U,
        bordered: ae,
        readonly: se,
        style: re,
        addonBefore: ie = (B = r.addonBefore) === null || B === void 0 ? void 0 : B.call(r),
        addonAfter: te = (A = r.addonAfter) === null || A === void 0 ? void 0 : A.call(r),
        prefix: ve = (G = r.prefix) === null || G === void 0 ? void 0 : G.call(r),
        valueModifiers: ce = {}
      } = q, fe = iX(q, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), ge = c.value, Me = _e({
        [`${ge}-lg`]: P.value === "large",
        [`${ge}-sm`]: P.value === "small",
        [`${ge}-rtl`]: f.value === "rtl",
        [`${ge}-readonly`]: se,
        [`${ge}-borderless`]: !ae,
        [`${ge}-in-form-item`]: Z
      }, $r(ge, u.value), U, g.value, C.value);
      let ze = h(eX, Q(Q({}, Bn(fe, ["size", "defaultValue"])), {}, {
        ref: w,
        lazy: !!ce.lazy,
        value: $.value,
        class: Me,
        prefixCls: ge,
        readonly: se,
        onChange: N,
        onBlur: R,
        onFocus: H
      }), {
        upHandler: r.upIcon ? () => h("span", {
          class: `${ge}-handler-up-inner`
        }, [r.upIcon()]) : () => h(gx, {
          class: `${ge}-handler-up-inner`
        }, null),
        downHandler: r.downIcon ? () => h("span", {
          class: `${ge}-handler-down-inner`
        }, [r.downIcon()]) : () => h(Nd, {
          class: `${ge}-handler-down-inner`
        }, null)
      });
      const Ke = Tv(ie) || Tv(te), He = Tv(ve);
      if (He || j) {
        const Re = _e(`${ge}-affix-wrapper`, $r(`${ge}-affix-wrapper`, u.value, j), {
          [`${ge}-affix-wrapper-focused`]: I.value,
          [`${ge}-affix-wrapper-disabled`]: x.value,
          [`${ge}-affix-wrapper-sm`]: P.value === "small",
          [`${ge}-affix-wrapper-lg`]: P.value === "large",
          [`${ge}-affix-wrapper-rtl`]: f.value === "rtl",
          [`${ge}-affix-wrapper-readonly`]: se,
          [`${ge}-affix-wrapper-borderless`]: !ae,
          // className will go to addon wrapper
          [`${U}`]: !Ke && U
        }, C.value);
        ze = h("div", {
          class: Re,
          style: re,
          onClick: M
        }, [He && h("span", {
          class: `${ge}-prefix`
        }, [ve]), ze, j && h("span", {
          class: `${ge}-suffix`
        }, [W])]);
      }
      if (Ke) {
        const Re = `${ge}-group`, Xe = `${Re}-addon`, De = ie ? h("div", {
          class: Xe
        }, [ie]) : null, Be = te ? h("div", {
          class: Xe
        }, [te]) : null, Ve = _e(`${ge}-wrapper`, Re, {
          [`${Re}-rtl`]: f.value === "rtl"
        }, C.value), ot = _e(`${ge}-group-wrapper`, {
          [`${ge}-group-wrapper-sm`]: P.value === "small",
          [`${ge}-group-wrapper-lg`]: P.value === "large",
          [`${ge}-group-wrapper-rtl`]: f.value === "rtl"
        }, $r(`${c}-group-wrapper`, u.value, j), U, C.value);
        ze = h("div", {
          class: ot,
          style: re
        }, [h("div", {
          class: Ve
        }, [De && h(Sd, null, {
          default: () => [h(Bp, null, {
            default: () => [De]
          })]
        }), ze, Be && h(Sd, null, {
          default: () => [h(Bp, null, {
            default: () => [Be]
          })]
        })])]);
      }
      return S(Un(ze, {
        style: re
      }));
    };
  }
}), To = O(_v, {
  install: (e) => (e.component(_v.name, _v), e)
});
function aX(e, t, n) {
  var o = n || {}, i = o.noTrailing, r = i === void 0 ? !1 : i, a = o.noLeading, l = a === void 0 ? !1 : a, s = o.debounceMode, u = s === void 0 ? void 0 : s, c, d = !1, f = 0;
  function p() {
    c && clearTimeout(c);
  }
  function v(m) {
    var x = m || {}, S = x.upcomingOnly, C = S === void 0 ? !1 : S;
    p(), d = !C;
  }
  function g() {
    for (var m = arguments.length, x = new Array(m), S = 0; S < m; S++)
      x[S] = arguments[S];
    var C = this, P = Date.now() - f;
    if (d)
      return;
    function $() {
      f = Date.now(), t.apply(C, x);
    }
    function I() {
      c = void 0;
    }
    !l && u && !c && $(), p(), u === void 0 && P > e ? l ? (f = Date.now(), r || (c = setTimeout(u ? I : $, e))) : $() : r !== !0 && (c = setTimeout(u ? I : $, u === void 0 ? e - P : e));
  }
  return g.cancel = v, g;
}
function lX(e, t, n) {
  var o = {}, i = o.atBegin, r = i === void 0 ? !1 : i;
  return aX(e, t, {
    debounceMode: r !== !1
  });
}
const sX = new tn("antSpinMove", {
  to: {
    opacity: 1
  }
}), uX = new tn("antRotate", {
  to: {
    transform: "rotate(405deg)"
  }
}), cX = (e) => ({
  [`${e.componentCls}`]: O(O({}, fn(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: sX,
        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: uX,
        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"
    }
  })
}), dX = On("Spin", (e) => {
  const t = Qt(e, {
    spinDotDefault: e.colorTextDescription,
    spinDotSize: e.controlHeightLG / 2,
    spinDotSizeSM: e.controlHeightLG * 0.35,
    spinDotSizeLG: e.controlHeight
  });
  return [cX(t)];
}, {
  contentHeight: 400
});
var fX = 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 pX = () => ({
  prefixCls: String,
  spinning: {
    type: Boolean,
    default: void 0
  },
  size: String,
  wrapperClassName: String,
  tip: pe.any,
  delay: Number,
  indicator: pe.any
});
let pp = null;
function hX(e, t) {
  return !!e && !!t && !isNaN(Number(t));
}
function gX(e) {
  const t = e.indicator;
  pp = typeof t == "function" ? t : () => h(t, null, null);
}
const Xo = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASpin",
  inheritAttrs: !1,
  props: _n(pX(), {
    size: "default",
    spinning: !0,
    wrapperClassName: ""
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: i,
      size: r,
      direction: a
    } = Rt("spin", e), [l, s] = dX(i), u = $e(e.spinning && !hX(e.spinning, e.delay));
    let c;
    return Ie([() => e.spinning, () => e.delay], () => {
      c?.cancel(), c = lX(e.delay, () => {
        u.value = e.spinning;
      }), c?.();
    }, {
      immediate: !0,
      flush: "post"
    }), qt(() => {
      c?.cancel();
    }), () => {
      var d, f;
      const {
        class: p
      } = n, v = fX(n, ["class"]), {
        tip: g = (d = o.tip) === null || d === void 0 ? void 0 : d.call(o)
      } = e, m = (f = o.default) === null || f === void 0 ? void 0 : f.call(o), x = {
        [s.value]: !0,
        [i.value]: !0,
        [`${i.value}-sm`]: r.value === "small",
        [`${i.value}-lg`]: r.value === "large",
        [`${i.value}-spinning`]: u.value,
        [`${i.value}-show-text`]: !!g,
        [`${i.value}-rtl`]: a.value === "rtl",
        [p]: !!p
      };
      function S(P) {
        const $ = `${P}-dot`;
        let I = Ji(o, e, "indicator");
        return I === null ? null : (Array.isArray(I) && (I = I.length === 1 ? I[0] : I), ci(I) ? _l(I, {
          class: $
        }) : pp && ci(pp()) ? _l(pp(), {
          class: $
        }) : h("span", {
          class: `${$} ${P}-dot-spin`
        }, [h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null)]));
      }
      const C = h("div", Q(Q({}, v), {}, {
        class: x,
        "aria-live": "polite",
        "aria-busy": u.value
      }), [S(i.value), g ? h("div", {
        class: `${i.value}-text`
      }, [g]) : null]);
      if (m && Do(m).length) {
        const P = {
          [`${i.value}-container`]: !0,
          [`${i.value}-blur`]: u.value
        };
        return l(h("div", {
          class: [`${i.value}-nested-loading`, e.wrapperClassName, s.value]
        }, [u.value && h("div", {
          key: "loading"
        }, [C]), h("div", {
          class: P,
          key: "container"
        }, [m])]));
      }
      return l(C);
    };
  }
});
Xo.setDefaultIndicator = gX;
Xo.install = function(e) {
  return e.component(Xo.name, Xo), e;
};
var vX = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" } }] }, name: "double-left", theme: "outlined" };
function GC(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) {
      mX(e, i, n[i]);
    });
  }
  return e;
}
function mX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Xp = function(t, n) {
  var o = GC({}, t, n.attrs);
  return h(an, GC({}, o, {
    icon: vX
  }), null);
};
Xp.displayName = "DoubleLeftOutlined";
Xp.inheritAttrs = !1;
var bX = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, name: "double-right", theme: "outlined" };
function UC(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) {
      yX(e, i, n[i]);
    });
  }
  return e;
}
function yX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Qp = function(t, n) {
  var o = UC({}, t, n.attrs);
  return h(an, UC({}, o, {
    icon: bX
  }), null);
};
Qp.displayName = "DoubleRightOutlined";
Qp.inheritAttrs = !1;
const xX = be({
  name: "MiniSelect",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: x0(),
  Option: Et.Option,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    return () => {
      const i = O(O(O({}, e), {
        size: "small"
      }), n);
      return h(Et, i, o);
    };
  }
}), wX = be({
  name: "MiddleSelect",
  inheritAttrs: !1,
  props: x0(),
  Option: Et.Option,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    return () => {
      const i = O(O(O({}, e), {
        size: "middle"
      }), n);
      return h(Et, i, o);
    };
  }
}), ts = be({
  compatConfig: {
    MODE: 3
  },
  name: "Pager",
  inheritAttrs: !1,
  props: {
    rootPrefixCls: String,
    page: Number,
    active: {
      type: Boolean,
      default: void 0
    },
    last: {
      type: Boolean,
      default: void 0
    },
    locale: pe.object,
    showTitle: {
      type: Boolean,
      default: void 0
    },
    itemRender: {
      type: Function,
      default: () => {
      }
    },
    onClick: {
      type: Function
    },
    onKeypress: {
      type: Function
    }
  },
  eimt: ["click", "keypress"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o
    } = t;
    const i = () => {
      n("click", e.page);
    }, r = (a) => {
      n("keypress", a, i, e.page);
    };
    return () => {
      const {
        showTitle: a,
        page: l,
        itemRender: s
      } = e, {
        class: u,
        style: c
      } = o, d = `${e.rootPrefixCls}-item`, f = _e(d, `${d}-${e.page}`, {
        [`${d}-active`]: e.active,
        [`${d}-disabled`]: !e.page
      }, u);
      return h("li", {
        onClick: i,
        onKeypress: r,
        title: a ? String(l) : null,
        tabindex: "0",
        class: f,
        style: c
      }, [s({
        page: l,
        type: "page",
        originalElement: h("a", {
          rel: "nofollow"
        }, [l])
      })]);
    };
  }
}), ls = {
  ENTER: 13,
  ARROW_UP: 38,
  ARROW_DOWN: 40
}, SX = be({
  compatConfig: {
    MODE: 3
  },
  props: {
    disabled: {
      type: Boolean,
      default: void 0
    },
    changeSize: Function,
    quickGo: Function,
    selectComponentClass: pe.any,
    current: Number,
    pageSizeOptions: pe.array.def(["10", "20", "50", "100"]),
    pageSize: Number,
    buildOptionText: Function,
    locale: pe.object,
    rootPrefixCls: String,
    selectPrefixCls: String,
    goButton: pe.any
  },
  setup(e) {
    const t = le(""), n = E(() => !t.value || isNaN(t.value) ? void 0 : Number(t.value)), o = (s) => `${s.value} ${e.locale.items_per_page}`, i = (s) => {
      const {
        value: u
      } = s.target;
      t.value !== u && (t.value = u);
    }, r = (s) => {
      const {
        goButton: u,
        quickGo: c,
        rootPrefixCls: d
      } = e;
      if (!(u || t.value === ""))
        if (s.relatedTarget && (s.relatedTarget.className.indexOf(`${d}-item-link`) >= 0 || s.relatedTarget.className.indexOf(`${d}-item`) >= 0)) {
          t.value = "";
          return;
        } else
          c(n.value), t.value = "";
    }, a = (s) => {
      t.value !== "" && (s.keyCode === ls.ENTER || s.type === "click") && (e.quickGo(n.value), t.value = "");
    }, l = E(() => {
      const {
        pageSize: s,
        pageSizeOptions: u
      } = e;
      return u.some((c) => c.toString() === s.toString()) ? u : u.concat([s.toString()]).sort((c, d) => {
        const f = isNaN(Number(c)) ? 0 : Number(c), p = isNaN(Number(d)) ? 0 : Number(d);
        return f - p;
      });
    });
    return () => {
      const {
        rootPrefixCls: s,
        locale: u,
        changeSize: c,
        quickGo: d,
        goButton: f,
        selectComponentClass: p,
        selectPrefixCls: v,
        pageSize: g,
        disabled: m
      } = e, x = `${s}-options`;
      let S = null, C = null, P = null;
      if (!c && !d)
        return null;
      if (c && p) {
        const $ = e.buildOptionText || o, I = l.value.map((w, M) => h(p.Option, {
          key: M,
          value: w
        }, {
          default: () => [$({
            value: w
          })]
        }));
        S = h(p, {
          disabled: m,
          prefixCls: v,
          showSearch: !1,
          class: `${x}-size-changer`,
          optionLabelProp: "children",
          value: (g || l.value[0]).toString(),
          onChange: (w) => c(Number(w)),
          getPopupContainer: (w) => w.parentNode
        }, {
          default: () => [I]
        });
      }
      return d && (f && (P = typeof f == "boolean" ? h("button", {
        type: "button",
        onClick: a,
        onKeyup: a,
        disabled: m,
        class: `${x}-quick-jumper-button`
      }, [u.jump_to_confirm]) : h("span", {
        onClick: a,
        onKeyup: a
      }, [f])), C = h("div", {
        class: `${x}-quick-jumper`
      }, [u.jump_to, h(Rd, {
        disabled: m,
        type: "text",
        value: t.value,
        onInput: i,
        onChange: i,
        onKeyup: a,
        onBlur: r
      }, null), u.page, P])), h("li", {
        class: `${x}`
      }, [S, C]);
    };
  }
}), CX = {
  // Options.jsx
  items_per_page: "条/页",
  jump_to: "跳至",
  jump_to_confirm: "确定",
  page: "页",
  // Pagination.jsx
  prev_page: "上一页",
  next_page: "下一页",
  prev_5: "向前 5 页",
  next_5: "向后 5 页",
  prev_3: "向前 3 页",
  next_3: "向后 3 页"
};
var $X = 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 PX(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}
function OX(e) {
  let {
    originalElement: t
  } = e;
  return t;
}
function Ca(e, t, n) {
  const o = typeof e > "u" ? t.statePageSize : e;
  return Math.floor((n.total - 1) / o) + 1;
}
const kX = be({
  compatConfig: {
    MODE: 3
  },
  name: "Pagination",
  mixins: [Dd],
  inheritAttrs: !1,
  props: {
    disabled: {
      type: Boolean,
      default: void 0
    },
    prefixCls: pe.string.def("rc-pagination"),
    selectPrefixCls: pe.string.def("rc-select"),
    current: Number,
    defaultCurrent: pe.number.def(1),
    total: pe.number.def(0),
    pageSize: Number,
    defaultPageSize: pe.number.def(10),
    hideOnSinglePage: {
      type: Boolean,
      default: !1
    },
    showSizeChanger: {
      type: Boolean,
      default: void 0
    },
    showLessItems: {
      type: Boolean,
      default: !1
    },
    // showSizeChange: PropTypes.func.def(noop),
    selectComponentClass: pe.any,
    showPrevNextJumpers: {
      type: Boolean,
      default: !0
    },
    showQuickJumper: pe.oneOfType([pe.looseBool, pe.object]).def(!1),
    showTitle: {
      type: Boolean,
      default: !0
    },
    pageSizeOptions: pe.arrayOf(pe.oneOfType([pe.number, pe.string])),
    buildOptionText: Function,
    showTotal: Function,
    simple: {
      type: Boolean,
      default: void 0
    },
    locale: pe.object.def(CX),
    itemRender: pe.func.def(OX),
    prevIcon: pe.any,
    nextIcon: pe.any,
    jumpPrevIcon: pe.any,
    jumpNextIcon: pe.any,
    totalBoundaryShowSizeChanger: pe.number.def(50)
  },
  data() {
    const e = this.$props;
    let t = Fp([this.current, this.defaultCurrent]);
    const n = Fp([this.pageSize, this.defaultPageSize]);
    return t = Math.min(t, Ca(n, void 0, e)), {
      stateCurrent: t,
      stateCurrentInputValue: t,
      statePageSize: n
    };
  },
  watch: {
    current(e) {
      this.setState({
        stateCurrent: e,
        stateCurrentInputValue: e
      });
    },
    pageSize(e) {
      const t = {};
      let n = this.stateCurrent;
      const o = Ca(e, this.$data, this.$props);
      n = n > o ? o : n, Ia(this, "current") || (t.stateCurrent = n, t.stateCurrentInputValue = n), t.statePageSize = e, this.setState(t);
    },
    stateCurrent(e, t) {
      this.$nextTick(() => {
        if (this.$refs.paginationNode) {
          const n = this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);
          n && document.activeElement === n && n.blur();
        }
      });
    },
    total() {
      const e = {}, t = Ca(this.pageSize, this.$data, this.$props);
      if (Ia(this, "current")) {
        const n = Math.min(this.current, t);
        e.stateCurrent = n, e.stateCurrentInputValue = n;
      } else {
        let n = this.stateCurrent;
        n === 0 && t > 0 ? n = 1 : n = Math.min(this.stateCurrent, t), e.stateCurrent = n;
      }
      this.setState(e);
    }
  },
  methods: {
    getJumpPrevPage() {
      return Math.max(1, this.stateCurrent - (this.showLessItems ? 3 : 5));
    },
    getJumpNextPage() {
      return Math.min(Ca(void 0, this.$data, this.$props), this.stateCurrent + (this.showLessItems ? 3 : 5));
    },
    getItemIcon(e, t) {
      const {
        prefixCls: n
      } = this.$props;
      return Lk(this, e, this.$props) || h("button", {
        type: "button",
        "aria-label": t,
        class: `${n}-item-link`
      }, null);
    },
    getValidValue(e) {
      const t = e.target.value, n = Ca(void 0, this.$data, this.$props), {
        stateCurrentInputValue: o
      } = this.$data;
      let i;
      return t === "" ? i = t : isNaN(Number(t)) ? i = o : t >= n ? i = n : i = Number(t), i;
    },
    isValid(e) {
      return PX(e) && e !== this.stateCurrent;
    },
    shouldDisplayQuickJumper() {
      const {
        showQuickJumper: e,
        pageSize: t,
        total: n
      } = this.$props;
      return n <= t ? !1 : e;
    },
    // calculatePage (p) {
    //   let pageSize = p
    //   if (typeof pageSize === 'undefined') {
    //     pageSize = this.statePageSize
    //   }
    //   return Math.floor((this.total - 1) / pageSize) + 1
    // },
    handleKeyDown(e) {
      (e.keyCode === ls.ARROW_UP || e.keyCode === ls.ARROW_DOWN) && e.preventDefault();
    },
    handleKeyUp(e) {
      const t = this.getValidValue(e), n = this.stateCurrentInputValue;
      t !== n && this.setState({
        stateCurrentInputValue: t
      }), e.keyCode === ls.ENTER ? this.handleChange(t) : e.keyCode === ls.ARROW_UP ? this.handleChange(t - 1) : e.keyCode === ls.ARROW_DOWN && this.handleChange(t + 1);
    },
    changePageSize(e) {
      let t = this.stateCurrent;
      const n = t, o = Ca(e, this.$data, this.$props);
      t = t > o ? o : t, o === 0 && (t = this.stateCurrent), typeof e == "number" && (Ia(this, "pageSize") || this.setState({
        statePageSize: e
      }), Ia(this, "current") || this.setState({
        stateCurrent: t,
        stateCurrentInputValue: t
      })), this.__emit("update:pageSize", e), t !== n && this.__emit("update:current", t), this.__emit("showSizeChange", t, e), this.__emit("change", t, e);
    },
    handleChange(e) {
      const {
        disabled: t
      } = this.$props;
      let n = e;
      if (this.isValid(n) && !t) {
        const o = Ca(void 0, this.$data, this.$props);
        return n > o ? n = o : n < 1 && (n = 1), Ia(this, "current") || this.setState({
          stateCurrent: n,
          stateCurrentInputValue: n
        }), this.__emit("update:current", n), this.__emit("change", n, this.statePageSize), n;
      }
      return this.stateCurrent;
    },
    prev() {
      this.hasPrev() && this.handleChange(this.stateCurrent - 1);
    },
    next() {
      this.hasNext() && this.handleChange(this.stateCurrent + 1);
    },
    jumpPrev() {
      this.handleChange(this.getJumpPrevPage());
    },
    jumpNext() {
      this.handleChange(this.getJumpNextPage());
    },
    hasPrev() {
      return this.stateCurrent > 1;
    },
    hasNext() {
      return this.stateCurrent < Ca(void 0, this.$data, this.$props);
    },
    getShowSizeChanger() {
      const {
        showSizeChanger: e,
        total: t,
        totalBoundaryShowSizeChanger: n
      } = this.$props;
      return typeof e < "u" ? e : t > n;
    },
    runIfEnter(e, t) {
      if (e.key === "Enter" || e.charCode === 13) {
        e.preventDefault();
        for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++)
          o[i - 2] = arguments[i];
        t(...o);
      }
    },
    runIfEnterPrev(e) {
      this.runIfEnter(e, this.prev);
    },
    runIfEnterNext(e) {
      this.runIfEnter(e, this.next);
    },
    runIfEnterJumpPrev(e) {
      this.runIfEnter(e, this.jumpPrev);
    },
    runIfEnterJumpNext(e) {
      this.runIfEnter(e, this.jumpNext);
    },
    handleGoTO(e) {
      (e.keyCode === ls.ENTER || e.type === "click") && this.handleChange(this.stateCurrentInputValue);
    },
    renderPrev(e) {
      const {
        itemRender: t
      } = this.$props, n = t({
        page: e,
        type: "prev",
        originalElement: this.getItemIcon("prevIcon", "prev page")
      }), o = !this.hasPrev();
      return Ao(n) ? Un(n, o ? {
        disabled: o
      } : {}) : n;
    },
    renderNext(e) {
      const {
        itemRender: t
      } = this.$props, n = t({
        page: e,
        type: "next",
        originalElement: this.getItemIcon("nextIcon", "next page")
      }), o = !this.hasNext();
      return Ao(n) ? Un(n, o ? {
        disabled: o
      } : {}) : n;
    }
  },
  render() {
    const {
      prefixCls: e,
      disabled: t,
      hideOnSinglePage: n,
      total: o,
      locale: i,
      showQuickJumper: r,
      showLessItems: a,
      showTitle: l,
      showTotal: s,
      simple: u,
      itemRender: c,
      showPrevNextJumpers: d,
      jumpPrevIcon: f,
      jumpNextIcon: p,
      selectComponentClass: v,
      selectPrefixCls: g,
      pageSizeOptions: m
    } = this.$props, {
      stateCurrent: x,
      statePageSize: S
    } = this, C = zk(this.$attrs).extraAttrs, {
      class: P
    } = C, $ = $X(C, ["class"]);
    if (n === !0 && this.total <= S)
      return null;
    const I = Ca(void 0, this.$data, this.$props), w = [];
    let M = null, _ = null, N = null, R = null, H = null;
    const L = r && r.goButton, B = a ? 1 : 2, A = x - 1 > 0 ? x - 1 : 0, G = x + 1 < I ? x + 1 : I, j = this.hasPrev(), Z = this.hasNext();
    if (u)
      return L && (typeof L == "boolean" ? H = h("button", {
        type: "button",
        onClick: this.handleGoTO,
        onKeyup: this.handleGoTO
      }, [i.jump_to_confirm]) : H = h("span", {
        onClick: this.handleGoTO,
        onKeyup: this.handleGoTO
      }, [L]), H = h("li", {
        title: l ? `${i.jump_to}${x}/${I}` : null,
        class: `${e}-simple-pager`
      }, [H])), h("ul", Q({
        class: _e(`${e} ${e}-simple`, {
          [`${e}-disabled`]: t
        }, P)
      }, $), [h("li", {
        title: l ? i.prev_page : null,
        onClick: this.prev,
        tabindex: j ? 0 : null,
        onKeypress: this.runIfEnterPrev,
        class: _e(`${e}-prev`, {
          [`${e}-disabled`]: !j
        }),
        "aria-disabled": !j
      }, [this.renderPrev(A)]), h("li", {
        title: l ? `${x}/${I}` : null,
        class: `${e}-simple-pager`
      }, [h(Rd, {
        type: "text",
        value: this.stateCurrentInputValue,
        disabled: t,
        onKeydown: this.handleKeyDown,
        onKeyup: this.handleKeyUp,
        onInput: this.handleKeyUp,
        onChange: this.handleKeyUp,
        size: "3"
      }, null), h("span", {
        class: `${e}-slash`
      }, [Le("／")]), I]), h("li", {
        title: l ? i.next_page : null,
        onClick: this.next,
        tabindex: Z ? 0 : null,
        onKeypress: this.runIfEnterNext,
        class: _e(`${e}-next`, {
          [`${e}-disabled`]: !Z
        }),
        "aria-disabled": !Z
      }, [this.renderNext(G)]), H]);
    if (I <= 3 + B * 2) {
      const ae = {
        locale: i,
        rootPrefixCls: e,
        showTitle: l,
        itemRender: c,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter
      };
      I || w.push(h(ts, Q(Q({}, ae), {}, {
        key: "noPager",
        page: 1,
        class: `${e}-item-disabled`
      }), null));
      for (let se = 1; se <= I; se += 1) {
        const re = x === se;
        w.push(h(ts, Q(Q({}, ae), {}, {
          key: se,
          page: se,
          active: re
        }), null));
      }
    } else {
      const ae = a ? i.prev_3 : i.prev_5, se = a ? i.next_3 : i.next_5;
      d && (M = h("li", {
        title: this.showTitle ? ae : null,
        key: "prev",
        onClick: this.jumpPrev,
        tabindex: "0",
        onKeypress: this.runIfEnterJumpPrev,
        class: _e(`${e}-jump-prev`, {
          [`${e}-jump-prev-custom-icon`]: !!f
        })
      }, [c({
        page: this.getJumpPrevPage(),
        type: "jump-prev",
        originalElement: this.getItemIcon("jumpPrevIcon", "prev page")
      })]), _ = h("li", {
        title: this.showTitle ? se : null,
        key: "next",
        tabindex: "0",
        onClick: this.jumpNext,
        onKeypress: this.runIfEnterJumpNext,
        class: _e(`${e}-jump-next`, {
          [`${e}-jump-next-custom-icon`]: !!p
        })
      }, [c({
        page: this.getJumpNextPage(),
        type: "jump-next",
        originalElement: this.getItemIcon("jumpNextIcon", "next page")
      })])), R = h(ts, {
        locale: i,
        last: !0,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: I,
        page: I,
        active: !1,
        showTitle: l,
        itemRender: c
      }, null), N = h(ts, {
        locale: i,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: 1,
        page: 1,
        active: !1,
        showTitle: l,
        itemRender: c
      }, null);
      let re = Math.max(1, x - B), ie = Math.min(x + B, I);
      x - 1 <= B && (ie = 1 + B * 2), I - x <= B && (re = I - B * 2);
      for (let te = re; te <= ie; te += 1) {
        const ve = x === te;
        w.push(h(ts, {
          locale: i,
          rootPrefixCls: e,
          onClick: this.handleChange,
          onKeypress: this.runIfEnter,
          key: te,
          page: te,
          active: ve,
          showTitle: l,
          itemRender: c
        }, null));
      }
      x - 1 >= B * 2 && x !== 3 && (w[0] = h(ts, {
        locale: i,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: re,
        page: re,
        class: `${e}-item-after-jump-prev`,
        active: !1,
        showTitle: this.showTitle,
        itemRender: c
      }, null), w.unshift(M)), I - x >= B * 2 && x !== I - 2 && (w[w.length - 1] = h(ts, {
        locale: i,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: ie,
        page: ie,
        class: `${e}-item-before-jump-next`,
        active: !1,
        showTitle: this.showTitle,
        itemRender: c
      }, null), w.push(_)), re !== 1 && w.unshift(N), ie !== I && w.push(R);
    }
    let W = null;
    s && (W = h("li", {
      class: `${e}-total-text`
    }, [s(o, [o === 0 ? 0 : (x - 1) * S + 1, x * S > o ? o : x * S])]));
    const K = !j || !I, q = !Z || !I, U = this.buildOptionText || this.$slots.buildOptionText;
    return h("ul", Q(Q({
      unselectable: "on",
      ref: "paginationNode"
    }, $), {}, {
      class: _e({
        [`${e}`]: !0,
        [`${e}-disabled`]: t
      }, P)
    }), [W, h("li", {
      title: l ? i.prev_page : null,
      onClick: this.prev,
      tabindex: K ? null : 0,
      onKeypress: this.runIfEnterPrev,
      class: _e(`${e}-prev`, {
        [`${e}-disabled`]: K
      }),
      "aria-disabled": K
    }, [this.renderPrev(A)]), w, h("li", {
      title: l ? i.next_page : null,
      onClick: this.next,
      tabindex: q ? null : 0,
      onKeypress: this.runIfEnterNext,
      class: _e(`${e}-next`, {
        [`${e}-disabled`]: q
      }),
      "aria-disabled": q
    }, [this.renderNext(G)]), h(SX, {
      disabled: t,
      locale: i,
      rootPrefixCls: e,
      selectComponentClass: v,
      selectPrefixCls: g,
      changeSize: this.getShowSizeChanger() ? this.changePageSize : null,
      current: x,
      pageSize: S,
      pageSizeOptions: m,
      buildOptionText: U || null,
      quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
      goButton: L
    }, null)]);
  }
}), IX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-disabled`]: {
      "&, &:hover": {
        cursor: "not-allowed",
        [`${t}-item-link`]: {
          color: e.colorTextDisabled,
          cursor: "not-allowed"
        }
      },
      "&:focus-visible": {
        cursor: "not-allowed",
        [`${t}-item-link`]: {
          color: e.colorTextDisabled,
          cursor: "not-allowed"
        }
      }
    },
    [`&${t}-disabled`]: {
      cursor: "not-allowed",
      [`&${t}-mini`]: {
        [`
          &:hover ${t}-item:not(${t}-item-active),
          &:active ${t}-item:not(${t}-item-active),
          &:hover ${t}-item-link,
          &:active ${t}-item-link
        `]: {
          backgroundColor: "transparent"
        }
      },
      [`${t}-item`]: {
        cursor: "not-allowed",
        "&:hover, &:active": {
          backgroundColor: "transparent"
        },
        a: {
          color: e.colorTextDisabled,
          backgroundColor: "transparent",
          border: "none",
          cursor: "not-allowed"
        },
        "&-active": {
          borderColor: e.colorBorder,
          backgroundColor: e.paginationItemDisabledBgActive,
          "&:hover, &:active": {
            backgroundColor: e.paginationItemDisabledBgActive
          },
          a: {
            color: e.paginationItemDisabledColorActive
          }
        }
      },
      [`${t}-item-link`]: {
        color: e.colorTextDisabled,
        cursor: "not-allowed",
        "&:hover, &:active": {
          backgroundColor: "transparent"
        },
        [`${t}-simple&`]: {
          backgroundColor: "transparent",
          "&:hover, &:active": {
            backgroundColor: "transparent"
          }
        }
      },
      [`${t}-simple-pager`]: {
        color: e.colorTextDisabled
      },
      [`${t}-jump-prev, ${t}-jump-next`]: {
        [`${t}-item-link-icon`]: {
          opacity: 0
        },
        [`${t}-item-ellipsis`]: {
          opacity: 1
        }
      }
    },
    [`&${t}-simple`]: {
      [`${t}-prev, ${t}-next`]: {
        [`&${t}-disabled ${t}-item-link`]: {
          "&:hover, &:active": {
            backgroundColor: "transparent"
          }
        }
      }
    }
  };
}, MX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]: {
      height: e.paginationItemSizeSM,
      lineHeight: `${e.paginationItemSizeSM}px`
    },
    [`&${t}-mini ${t}-item`]: {
      minWidth: e.paginationItemSizeSM,
      height: e.paginationItemSizeSM,
      margin: 0,
      lineHeight: `${e.paginationItemSizeSM - 2}px`
    },
    [`&${t}-mini ${t}-item:not(${t}-item-active)`]: {
      backgroundColor: "transparent",
      borderColor: "transparent",
      "&:hover": {
        backgroundColor: e.colorBgTextHover
      },
      "&:active": {
        backgroundColor: e.colorBgTextActive
      }
    },
    [`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]: {
      minWidth: e.paginationItemSizeSM,
      height: e.paginationItemSizeSM,
      margin: 0,
      lineHeight: `${e.paginationItemSizeSM}px`,
      [`&:hover ${t}-item-link`]: {
        backgroundColor: e.colorBgTextHover
      },
      [`&:active ${t}-item-link`]: {
        backgroundColor: e.colorBgTextActive
      },
      [`&${t}-disabled:hover ${t}-item-link`]: {
        backgroundColor: "transparent"
      }
    },
    [`
    &${t}-mini ${t}-prev ${t}-item-link,
    &${t}-mini ${t}-next ${t}-item-link
    `]: {
      backgroundColor: "transparent",
      borderColor: "transparent",
      "&::after": {
        height: e.paginationItemSizeSM,
        lineHeight: `${e.paginationItemSizeSM}px`
      }
    },
    [`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]: {
      height: e.paginationItemSizeSM,
      marginInlineEnd: 0,
      lineHeight: `${e.paginationItemSizeSM}px`
    },
    [`&${t}-mini ${t}-options`]: {
      marginInlineStart: e.paginationMiniOptionsMarginInlineStart,
      "&-size-changer": {
        top: e.paginationMiniOptionsSizeChangerTop
      },
      "&-quick-jumper": {
        height: e.paginationItemSizeSM,
        lineHeight: `${e.paginationItemSizeSM}px`,
        input: O(O({}, U0(e)), {
          width: e.paginationMiniQuickJumperInputWidth,
          height: e.controlHeightSM
        })
      }
    }
  };
}, TX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`
    &${t}-simple ${t}-prev,
    &${t}-simple ${t}-next
    `]: {
      height: e.paginationItemSizeSM,
      lineHeight: `${e.paginationItemSizeSM}px`,
      verticalAlign: "top",
      [`${t}-item-link`]: {
        height: e.paginationItemSizeSM,
        backgroundColor: "transparent",
        border: 0,
        "&:hover": {
          backgroundColor: e.colorBgTextHover
        },
        "&:active": {
          backgroundColor: e.colorBgTextActive
        },
        "&::after": {
          height: e.paginationItemSizeSM,
          lineHeight: `${e.paginationItemSizeSM}px`
        }
      }
    },
    [`&${t}-simple ${t}-simple-pager`]: {
      display: "inline-block",
      height: e.paginationItemSizeSM,
      marginInlineEnd: e.marginXS,
      input: {
        boxSizing: "border-box",
        height: "100%",
        marginInlineEnd: e.marginXS,
        padding: `0 ${e.paginationItemPaddingInline}px`,
        textAlign: "center",
        backgroundColor: e.paginationItemInputBg,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        borderRadius: e.borderRadius,
        outline: "none",
        transition: `border-color ${e.motionDurationMid}`,
        color: "inherit",
        "&:hover": {
          borderColor: e.colorPrimary
        },
        "&:focus": {
          borderColor: e.colorPrimaryHover,
          boxShadow: `${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
        },
        "&[disabled]": {
          color: e.colorTextDisabled,
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          cursor: "not-allowed"
        }
      }
    }
  };
}, _X = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-jump-prev, ${t}-jump-next`]: {
      outline: 0,
      [`${t}-item-container`]: {
        position: "relative",
        [`${t}-item-link-icon`]: {
          color: e.colorPrimary,
          fontSize: e.fontSizeSM,
          opacity: 0,
          transition: `all ${e.motionDurationMid}`,
          "&-svg": {
            top: 0,
            insetInlineEnd: 0,
            bottom: 0,
            insetInlineStart: 0,
            margin: "auto"
          }
        },
        [`${t}-item-ellipsis`]: {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          display: "block",
          margin: "auto",
          color: e.colorTextDisabled,
          fontFamily: "Arial, Helvetica, sans-serif",
          letterSpacing: e.paginationEllipsisLetterSpacing,
          textAlign: "center",
          textIndent: e.paginationEllipsisTextIndent,
          opacity: 1,
          transition: `all ${e.motionDurationMid}`
        }
      },
      "&:hover": {
        [`${t}-item-link-icon`]: {
          opacity: 1
        },
        [`${t}-item-ellipsis`]: {
          opacity: 0
        }
      },
      "&:focus-visible": O({
        [`${t}-item-link-icon`]: {
          opacity: 1
        },
        [`${t}-item-ellipsis`]: {
          opacity: 0
        }
      }, Wa(e))
    },
    [`
    ${t}-prev,
    ${t}-jump-prev,
    ${t}-jump-next
    `]: {
      marginInlineEnd: e.marginXS
    },
    [`
    ${t}-prev,
    ${t}-next,
    ${t}-jump-prev,
    ${t}-jump-next
    `]: {
      display: "inline-block",
      minWidth: e.paginationItemSize,
      height: e.paginationItemSize,
      color: e.colorText,
      fontFamily: e.paginationFontFamily,
      lineHeight: `${e.paginationItemSize}px`,
      textAlign: "center",
      verticalAlign: "middle",
      listStyle: "none",
      borderRadius: e.borderRadius,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid}`
    },
    [`${t}-prev, ${t}-next`]: {
      fontFamily: "Arial, Helvetica, sans-serif",
      outline: 0,
      button: {
        color: e.colorText,
        cursor: "pointer",
        userSelect: "none"
      },
      [`${t}-item-link`]: {
        display: "block",
        width: "100%",
        height: "100%",
        padding: 0,
        fontSize: e.fontSizeSM,
        textAlign: "center",
        backgroundColor: "transparent",
        border: `${e.lineWidth}px ${e.lineType} transparent`,
        borderRadius: e.borderRadius,
        outline: "none",
        transition: `all ${e.motionDurationMid}`
      },
      [`&:focus-visible ${t}-item-link`]: O({}, Wa(e)),
      [`&:hover ${t}-item-link`]: {
        backgroundColor: e.colorBgTextHover
      },
      [`&:active ${t}-item-link`]: {
        backgroundColor: e.colorBgTextActive
      },
      [`&${t}-disabled:hover`]: {
        [`${t}-item-link`]: {
          backgroundColor: "transparent"
        }
      }
    },
    [`${t}-slash`]: {
      marginInlineEnd: e.paginationSlashMarginInlineEnd,
      marginInlineStart: e.paginationSlashMarginInlineStart
    },
    [`${t}-options`]: {
      display: "inline-block",
      marginInlineStart: e.margin,
      verticalAlign: "middle",
      "&-size-changer.-select": {
        display: "inline-block",
        width: "auto"
      },
      "&-quick-jumper": {
        display: "inline-block",
        height: e.controlHeight,
        marginInlineStart: e.marginXS,
        lineHeight: `${e.controlHeight}px`,
        verticalAlign: "top",
        input: O(O({}, gc(e)), {
          width: e.controlHeightLG * 1.25,
          height: e.controlHeight,
          boxSizing: "border-box",
          margin: 0,
          marginInlineStart: e.marginXS,
          marginInlineEnd: e.marginXS
        })
      }
    }
  };
}, EX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-item`]: O(O({
      display: "inline-block",
      minWidth: e.paginationItemSize,
      height: e.paginationItemSize,
      marginInlineEnd: e.marginXS,
      fontFamily: e.paginationFontFamily,
      lineHeight: `${e.paginationItemSize - 2}px`,
      textAlign: "center",
      verticalAlign: "middle",
      listStyle: "none",
      backgroundColor: "transparent",
      border: `${e.lineWidth}px ${e.lineType} transparent`,
      borderRadius: e.borderRadius,
      outline: 0,
      cursor: "pointer",
      userSelect: "none",
      a: {
        display: "block",
        padding: `0 ${e.paginationItemPaddingInline}px`,
        color: e.colorText,
        transition: "none",
        "&:hover": {
          textDecoration: "none"
        }
      },
      [`&:not(${t}-item-active)`]: {
        "&:hover": {
          transition: `all ${e.motionDurationMid}`,
          backgroundColor: e.colorBgTextHover
        },
        "&:active": {
          backgroundColor: e.colorBgTextActive
        }
      }
    }, Rl(e)), {
      "&-active": {
        fontWeight: e.paginationFontWeightActive,
        backgroundColor: e.paginationItemBgActive,
        borderColor: e.colorPrimary,
        a: {
          color: e.colorPrimary
        },
        "&:hover": {
          borderColor: e.colorPrimaryHover
        },
        "&:hover a": {
          color: e.colorPrimaryHover
        }
      }
    })
  };
}, DX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: O(O(O(O(O(O(O(O({}, fn(e)), {
      "ul, ol": {
        margin: 0,
        padding: 0,
        listStyle: "none"
      },
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        overflow: "hidden",
        visibility: "hidden",
        content: '""'
      },
      [`${t}-total-text`]: {
        display: "inline-block",
        height: e.paginationItemSize,
        marginInlineEnd: e.marginXS,
        lineHeight: `${e.paginationItemSize - 2}px`,
        verticalAlign: "middle"
      }
    }), EX(e)), _X(e)), TX(e)), MX(e)), IX(e)), {
      // media query style
      [`@media only screen and (max-width: ${e.screenLG}px)`]: {
        [`${t}-item`]: {
          "&-after-jump-prev, &-before-jump-next": {
            display: "none"
          }
        }
      },
      [`@media only screen and (max-width: ${e.screenSM}px)`]: {
        [`${t}-options`]: {
          display: "none"
        }
      }
    }),
    // rtl style
    [`&${e.componentCls}-rtl`]: {
      direction: "rtl"
    }
  };
}, AX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}${t}-disabled`]: {
      "&, &:hover": {
        [`${t}-item-link`]: {
          borderColor: e.colorBorder
        }
      },
      "&:focus-visible": {
        [`${t}-item-link`]: {
          borderColor: e.colorBorder
        }
      },
      [`${t}-item, ${t}-item-link`]: {
        backgroundColor: e.colorBgContainerDisabled,
        borderColor: e.colorBorder,
        [`&:hover:not(${t}-item-active)`]: {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          a: {
            color: e.colorTextDisabled
          }
        },
        [`&${t}-item-active`]: {
          backgroundColor: e.paginationItemDisabledBgActive
        }
      },
      [`${t}-prev, ${t}-next`]: {
        "&:hover button": {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          color: e.colorTextDisabled
        },
        [`${t}-item-link`]: {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder
        }
      }
    },
    [t]: {
      [`${t}-prev, ${t}-next`]: {
        "&:hover button": {
          borderColor: e.colorPrimaryHover,
          backgroundColor: e.paginationItemBg
        },
        [`${t}-item-link`]: {
          backgroundColor: e.paginationItemLinkBg,
          borderColor: e.colorBorder
        },
        [`&:hover ${t}-item-link`]: {
          borderColor: e.colorPrimary,
          backgroundColor: e.paginationItemBg,
          color: e.colorPrimary
        },
        [`&${t}-disabled`]: {
          [`${t}-item-link`]: {
            borderColor: e.colorBorder,
            color: e.colorTextDisabled
          }
        }
      },
      [`${t}-item`]: {
        backgroundColor: e.paginationItemBg,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        [`&:hover:not(${t}-item-active)`]: {
          borderColor: e.colorPrimary,
          backgroundColor: e.paginationItemBg,
          a: {
            color: e.colorPrimary
          }
        },
        "&-active": {
          borderColor: e.colorPrimary
        }
      }
    }
  };
}, RX = On("Pagination", (e) => {
  const t = Qt(e, {
    paginationItemSize: e.controlHeight,
    paginationFontFamily: e.fontFamily,
    paginationItemBg: e.colorBgContainer,
    paginationItemBgActive: e.colorBgContainer,
    paginationFontWeightActive: e.fontWeightStrong,
    paginationItemSizeSM: e.controlHeightSM,
    paginationItemInputBg: e.colorBgContainer,
    paginationMiniOptionsSizeChangerTop: 0,
    paginationItemDisabledBgActive: e.controlItemBgActiveDisabled,
    paginationItemDisabledColorActive: e.colorTextDisabled,
    paginationItemLinkBg: e.colorBgContainer,
    inputOutlineOffset: "0 0",
    paginationMiniOptionsMarginInlineStart: e.marginXXS / 2,
    paginationMiniQuickJumperInputWidth: e.controlHeightLG * 1.1,
    paginationItemPaddingInline: e.marginXXS * 1.5,
    paginationEllipsisLetterSpacing: e.marginXXS / 2,
    paginationSlashMarginInlineStart: e.marginXXS,
    paginationSlashMarginInlineEnd: e.marginSM,
    paginationEllipsisTextIndent: "0.13em"
    // magic for ui experience
  }, Uh(e));
  return [DX(t), e.wireframe && AX(t)];
});
var NX = 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 zX = () => ({
  total: Number,
  defaultCurrent: Number,
  disabled: ct(),
  current: Number,
  defaultPageSize: Number,
  pageSize: Number,
  hideOnSinglePage: ct(),
  showSizeChanger: ct(),
  pageSizeOptions: Vn(),
  buildOptionText: et(),
  showQuickJumper: en([Boolean, Object]),
  showTotal: et(),
  size: rn(),
  simple: ct(),
  locale: Object,
  prefixCls: String,
  selectPrefixCls: String,
  totalBoundaryShowSizeChanger: Number,
  selectComponentClass: String,
  itemRender: et(),
  role: String,
  responsive: Boolean,
  showLessItems: ct(),
  onChange: et(),
  onShowSizeChange: et(),
  "onUpdate:current": et(),
  "onUpdate:pageSize": et()
}), BX = be({
  compatConfig: {
    MODE: 3
  },
  name: "APagination",
  inheritAttrs: !1,
  props: zX(),
  // emits: ['change', 'showSizeChange', 'update:current', 'update:pageSize'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      configProvider: r,
      direction: a,
      size: l
    } = Rt("pagination", e), [s, u] = RX(i), c = E(() => r.getPrefixCls("select", e.selectPrefixCls)), d = PM(), [f] = Nl("Pagination", Gk, Kt(e, "locale")), p = (v) => {
      const g = h("span", {
        class: `${v}-item-ellipsis`
      }, [Le("•••")]), m = h("button", {
        class: `${v}-item-link`,
        type: "button",
        tabindex: -1
      }, [a.value === "rtl" ? h(Es, null, null) : h(Yp, null, null)]), x = h("button", {
        class: `${v}-item-link`,
        type: "button",
        tabindex: -1
      }, [a.value === "rtl" ? h(Yp, null, null) : h(Es, null, null)]), S = h("a", {
        rel: "nofollow",
        class: `${v}-item-link`
      }, [h("div", {
        class: `${v}-item-container`
      }, [a.value === "rtl" ? h(Qp, {
        class: `${v}-item-link-icon`
      }, null) : h(Xp, {
        class: `${v}-item-link-icon`
      }, null), g])]), C = h("a", {
        rel: "nofollow",
        class: `${v}-item-link`
      }, [h("div", {
        class: `${v}-item-container`
      }, [a.value === "rtl" ? h(Xp, {
        class: `${v}-item-link-icon`
      }, null) : h(Qp, {
        class: `${v}-item-link-icon`
      }, null), g])]);
      return {
        prevIcon: m,
        nextIcon: x,
        jumpPrevIcon: S,
        jumpNextIcon: C
      };
    };
    return () => {
      var v;
      const {
        itemRender: g = n.itemRender,
        buildOptionText: m = n.buildOptionText,
        selectComponentClass: x,
        responsive: S
      } = e, C = NX(e, ["itemRender", "buildOptionText", "selectComponentClass", "responsive"]), P = l.value === "small" || !!(!((v = d.value) === null || v === void 0) && v.xs && !l.value && S), $ = O(O(O(O(O({}, C), p(i.value)), {
        prefixCls: i.value,
        selectPrefixCls: c.value,
        selectComponentClass: x || (P ? xX : wX),
        locale: f.value,
        buildOptionText: m
      }), o), {
        class: _e({
          [`${i.value}-mini`]: P,
          [`${i.value}-rtl`]: a.value === "rtl"
        }, o.class, u.value),
        itemRender: g
      });
      return s(h(kX, $, null));
    };
  }
}), FX = rr(BX);
var LX = 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 Tb;
const HX = (e) => {
  Tb = {
    x: e.pageX,
    y: e.pageY
  }, setTimeout(() => Tb = null, 100);
};
ZT() && Ho(document.documentElement, "click", HX, !0);
const VX = () => ({
  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: pe.any,
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: pe.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: pe.any,
  okText: pe.any,
  okType: String,
  cancelText: pe.any,
  icon: pe.any,
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  okButtonProps: _t(),
  cancelButtonProps: _t(),
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  wrapClassName: String,
  maskTransitionName: String,
  transitionName: String,
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  zIndex: Number,
  bodyStyle: _t(),
  maskStyle: _t(),
  mask: {
    type: Boolean,
    default: void 0
  },
  keyboard: {
    type: Boolean,
    default: void 0
  },
  wrapProps: Object,
  focusTriggerAfterClose: {
    type: Boolean,
    default: void 0
  },
  modalRender: Function,
  mousePosition: _t()
}), Go = be({
  compatConfig: {
    MODE: 3
  },
  name: "AModal",
  inheritAttrs: !1,
  props: _n(VX(), {
    width: 520,
    confirmLoading: !1,
    okType: "primary"
  }),
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: i
    } = t;
    const [r] = Nl("Modal"), {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u
    } = Rt("modal", e), [c, d] = KU(a);
    wo(e.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
    const f = (g) => {
      n("update:visible", !1), n("update:open", !1), n("cancel", g), n("change", !1);
    }, p = (g) => {
      n("ok", g);
    }, v = () => {
      var g, m;
      const {
        okText: x = (g = o.okText) === null || g === void 0 ? void 0 : g.call(o),
        okType: S,
        cancelText: C = (m = o.cancelText) === null || m === void 0 ? void 0 : m.call(o),
        confirmLoading: P
      } = e;
      return h(Je, null, [h(Bt, Q({
        onClick: f
      }, e.cancelButtonProps), {
        default: () => [C || r.value.cancelText]
      }), h(Bt, Q(Q({}, RM(S)), {}, {
        loading: P,
        onClick: p
      }, e.okButtonProps), {
        default: () => [x || r.value.okText]
      })]);
    };
    return () => {
      var g, m;
      const {
        prefixCls: x,
        visible: S,
        open: C,
        wrapClassName: P,
        centered: $,
        getContainer: I,
        closeIcon: w = (g = o.closeIcon) === null || g === void 0 ? void 0 : g.call(o),
        focusTriggerAfterClose: M = !0
      } = e, _ = LX(e, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), N = _e(P, {
        [`${a.value}-centered`]: !!$,
        [`${a.value}-wrap-rtl`]: s.value === "rtl"
      });
      return c(h(FU, Q(Q(Q({}, _), i), {}, {
        rootClassName: d.value,
        class: _e(d.value, i.class),
        getContainer: I || u?.value,
        prefixCls: a.value,
        wrapClassName: N,
        visible: C ?? S,
        onClose: f,
        focusTriggerAfterClose: M,
        transitionName: Ka(l.value, "zoom", e.transitionName),
        maskTransitionName: Ka(l.value, "fade", e.maskTransitionName),
        mousePosition: (m = _.mousePosition) !== null && m !== void 0 ? m : Tb
      }), O(O({}, o), {
        footer: o.footer || v,
        closeIcon: () => h("span", {
          class: `${a.value}-close-x`
        }, [w || h(la, {
          class: `${a.value}-close-icon`
        }, null)])
      })));
    };
  }
}), jX = () => {
  const e = $e(!1);
  return qt(() => {
    e.value = !0;
  }), e;
}, WX = {
  type: {
    type: String
  },
  actionFn: Function,
  close: Function,
  autofocus: Boolean,
  prefixCls: String,
  buttonProps: _t(),
  emitEvent: Boolean,
  quitOnNullishReturnValue: Boolean
};
function XC(e) {
  return !!(e && e.then);
}
const QC = be({
  compatConfig: {
    MODE: 3
  },
  name: "ActionButton",
  props: WX,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(!1), i = $e(), r = $e(!1);
    let a;
    const l = jX();
    At(() => {
      e.autofocus && (a = setTimeout(() => {
        var d, f;
        return (f = (d = Qr(i.value)) === null || d === void 0 ? void 0 : d.focus) === null || f === void 0 ? void 0 : f.call(d);
      }));
    }), qt(() => {
      clearTimeout(a);
    });
    const s = function() {
      for (var d, f = arguments.length, p = new Array(f), v = 0; v < f; v++)
        p[v] = arguments[v];
      (d = e.close) === null || d === void 0 || d.call(e, ...p);
    }, u = (d) => {
      XC(d) && (r.value = !0, d.then(function() {
        l.value || (r.value = !1), s(...arguments), o.value = !1;
      }, (f) => (l.value || (r.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 p;
      if (e.emitEvent) {
        if (p = f(d), e.quitOnNullishReturnValue && !XC(p)) {
          o.value = !1, s(d);
          return;
        }
      } else if (f.length)
        p = f(e.close), o.value = !1;
      else if (p = f(), !p) {
        s();
        return;
      }
      u(p);
    };
    return () => {
      const {
        type: d,
        prefixCls: f,
        buttonProps: p
      } = e;
      return h(Bt, Q(Q(Q({}, RM(d)), {}, {
        onClick: c,
        loading: r.value,
        prefixCls: f
      }, p), {}, {
        ref: i
      }), n);
    };
  }
});
function cu(e) {
  return typeof e == "function" ? e() : e;
}
const Z_ = be({
  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] = Nl("Modal");
    return process.env.NODE_ENV !== "production" && wo(e.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
      const {
        icon: i,
        onCancel: r,
        onOk: a,
        close: l,
        okText: s,
        closable: u = !1,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: v,
        maskStyle: g,
        okButtonProps: m,
        cancelButtonProps: x,
        okCancel: S,
        width: C = 416,
        mask: P = !0,
        maskClosable: $ = !1,
        type: I,
        open: w,
        title: M,
        content: _,
        direction: N,
        closeIcon: R,
        modalRender: H,
        focusTriggerAfterClose: L,
        rootPrefixCls: B,
        bodyStyle: A,
        wrapClassName: G,
        footer: j
      } = e;
      let Z = i;
      if (!i && i !== null)
        switch (I) {
          case "info":
            Z = h(Hs, null, null);
            break;
          case "success":
            Z = h(Bl, null, null);
            break;
          case "error":
            Z = h(zi, null, null);
            break;
          default:
            Z = h(Fl, null, null);
        }
      const W = e.okType || "primary", K = e.prefixCls || "ant-modal", q = `${K}-confirm`, U = n.style || {}, ae = S ?? I === "confirm", se = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", re = `${K}-confirm`, ie = _e(re, `${re}-${e.type}`, {
        [`${re}-rtl`]: N === "rtl"
      }, n.class), te = o.value, ve = ae && h(QC, {
        actionFn: r,
        close: l,
        autofocus: se === "cancel",
        buttonProps: x,
        prefixCls: `${B}-btn`
      }, {
        default: () => [cu(e.cancelText) || te.cancelText]
      });
      return h(Go, {
        prefixCls: K,
        class: ie,
        wrapClassName: _e({
          [`${re}-centered`]: !!p
        }, G),
        onCancel: (ce) => l?.({
          triggerCancel: !0
        }, ce),
        open: w,
        title: "",
        footer: "",
        transitionName: Ka(B, "zoom", e.transitionName),
        maskTransitionName: Ka(B, "fade", e.maskTransitionName),
        mask: P,
        maskClosable: $,
        maskStyle: g,
        style: U,
        bodyStyle: A,
        width: C,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: v,
        closable: u,
        closeIcon: R,
        modalRender: H,
        focusTriggerAfterClose: L
      }, {
        default: () => [h("div", {
          class: `${q}-body-wrapper`
        }, [h("div", {
          class: `${q}-body`
        }, [cu(Z), M === void 0 ? null : h("span", {
          class: `${q}-title`
        }, [cu(M)]), h("div", {
          class: `${q}-content`
        }, [cu(_)])]), j !== void 0 ? cu(j) : h("div", {
          class: `${q}-btns`
        }, [ve, h(QC, {
          type: W,
          actionFn: a,
          close: l,
          autofocus: se === "ok",
          buttonProps: m,
          prefixCls: `${B}-btn`
        }, {
          default: () => [cu(s) || (ae ? te.okText : te.justOkText)]
        })])])]
      });
    };
  }
}), bs = [], Yd = (e) => {
  const t = document.createDocumentFragment();
  let n = O(O({}, Bn(e, ["parentContext", "appContext"])), {
    close: r,
    open: !0
  }), o = null;
  function i() {
    o && (El(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((p) => p && p.triggerCancel);
    e.onCancel && f && e.onCancel(() => {
    }, ...c.slice(1));
    for (let p = 0; p < bs.length; p++)
      if (bs[p] === r) {
        bs.splice(p, 1);
        break;
      }
  }
  function r() {
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    n = O(O({}, n), {
      open: !1,
      afterClose: () => {
        typeof e.afterClose == "function" && e.afterClose(), i.apply(this, c);
      }
    }), n.visible && delete n.visible, a(n);
  }
  function a(u) {
    typeof u == "function" ? n = u(n) : n = O(O({}, n), u), o && o5(o, n, t);
  }
  const l = (u) => {
    const c = Ko, d = c.prefixCls, f = u.prefixCls || `${d}-modal`, p = c.iconPrefixCls, v = $Y();
    return h(Ba, Q(Q({}, c), {}, {
      prefixCls: d
    }), {
      default: () => [h(Z_, Q(Q({}, u), {}, {
        rootPrefixCls: d,
        prefixCls: f,
        iconPrefixCls: p,
        locale: v,
        cancelText: u.cancelText || v.cancelText
      }), null)]
    });
  };
  function s(u) {
    const c = h(l, O({}, u));
    return c.appContext = e.parentContext || e.appContext || c.appContext, El(c, t), c;
  }
  return o = s(n), bs.push(r), {
    destroy: r,
    update: a
  };
};
function J_(e) {
  return O(O({}, e), {
    type: "warning"
  });
}
function e2(e) {
  return O(O({}, e), {
    type: "info"
  });
}
function t2(e) {
  return O(O({}, e), {
    type: "success"
  });
}
function n2(e) {
  return O(O({}, e), {
    type: "error"
  });
}
function o2(e) {
  return O(O({}, e), {
    type: "confirm"
  });
}
const KX = () => ({
  config: Object,
  afterClose: Function,
  destroyAction: Function,
  open: Boolean
}), qX = be({
  name: "HookModal",
  inheritAttrs: !1,
  props: _n(KX(), {
    config: {
      width: 520,
      okType: "primary"
    }
  }),
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o;
    const i = E(() => e.open), r = E(() => e.config), {
      direction: a,
      getPrefixCls: l
    } = Ph(), s = l("modal"), u = l(), c = () => {
      var v, g;
      e?.afterClose(), (g = (v = r.value).afterClose) === null || g === void 0 || g.call(v);
    }, d = function() {
      e.destroyAction(...arguments);
    };
    n({
      destroy: d
    });
    const f = (o = r.value.okCancel) !== null && o !== void 0 ? o : r.value.type === "confirm", [p] = Nl("Modal", La.Modal);
    return () => h(Z_, Q(Q({
      prefixCls: s,
      rootPrefixCls: u
    }, r.value), {}, {
      close: d,
      open: i.value,
      afterClose: c,
      okText: r.value.okText || (f ? p?.value.okText : p?.value.justOkText),
      direction: r.value.direction || a.value,
      cancelText: r.value.cancelText || p?.value.cancelText
    }), null);
  }
});
let ZC = 0;
const YX = be({
  name: "ElementsHolder",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = $e([]);
    return n({
      addModal: (r) => (o.value.push(r), o.value = o.value.slice(), () => {
        o.value = o.value.filter((a) => a !== r);
      })
    }), () => o.value.map((r) => r());
  }
});
function i2() {
  const e = $e(null), t = $e([]);
  Ie(t, () => {
    t.value.length && ([...t.value].forEach((a) => {
      a();
    }), t.value = []);
  }, {
    immediate: !0
  });
  const n = (r) => function(l) {
    var s;
    ZC += 1;
    const u = $e(!0), c = $e(null), d = $e(T(l)), f = $e({});
    Ie(() => l, (C) => {
      m(O(O({}, TP(C) ? C.value : C), f.value));
    });
    const p = function() {
      u.value = !1;
      for (var C = arguments.length, P = new Array(C), $ = 0; $ < C; $++)
        P[$] = arguments[$];
      const I = P.some((w) => w && w.triggerCancel);
      d.value.onCancel && I && d.value.onCancel(() => {
      }, ...P.slice(1));
    };
    let v;
    const g = () => h(qX, {
      key: `modal-${ZC}`,
      config: r(d.value),
      ref: c,
      open: u.value,
      destroyAction: p,
      afterClose: () => {
        v?.();
      }
    }, null);
    v = (s = e.value) === null || s === void 0 ? void 0 : s.addModal(g), v && bs.push(v);
    const m = (C) => {
      d.value = O(O({}, d.value), C);
    };
    return {
      destroy: () => {
        c.value ? p() : t.value = [...t.value, p];
      },
      update: (C) => {
        f.value = C, c.value ? m(C) : t.value = [...t.value, () => m(C)];
      }
    };
  }, o = E(() => ({
    info: n(e2),
    success: n(t2),
    error: n(n2),
    warning: n(J_),
    confirm: n(o2)
  })), i = Symbol("modalHolderKey");
  return [o.value, () => h(YX, {
    key: i,
    ref: e
  }, null)];
}
function r2(e) {
  return Yd(J_(e));
}
Go.useModal = i2;
Go.info = function(t) {
  return Yd(e2(t));
};
Go.success = function(t) {
  return Yd(t2(t));
};
Go.error = function(t) {
  return Yd(n2(t));
};
Go.warning = r2;
Go.warn = r2;
Go.confirm = function(t) {
  return Yd(o2(t));
};
Go.destroyAll = function() {
  for (; bs.length; ) {
    const t = bs.pop();
    t && t();
  }
};
Go.install = function(e) {
  return e.component(Go.name, Go), e;
};
const GX = {
  small: 8,
  middle: 16,
  large: 24
}, UX = () => ({
  prefixCls: String,
  size: {
    type: [String, Number, Array]
  },
  direction: pe.oneOf(Mr("horizontal", "vertical")).def("horizontal"),
  align: pe.oneOf(Mr("start", "end", "center", "baseline")),
  wrap: ct()
});
function XX(e) {
  return typeof e == "string" ? GX[e] : e || 0;
}
const Jr = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASpace",
  inheritAttrs: !1,
  props: UX(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: i,
      space: r,
      direction: a
    } = Rt("space", e), [l, s] = SM(i), u = e_(), c = E(() => {
      var x, S, C;
      return (C = (x = e.size) !== null && x !== void 0 ? x : (S = r?.value) === null || S === void 0 ? void 0 : S.size) !== null && C !== void 0 ? C : "small";
    }), d = le(), f = le();
    Ie(c, () => {
      [d.value, f.value] = (Array.isArray(c.value) ? c.value : [c.value, c.value]).map((x) => XX(x));
    }, {
      immediate: !0
    });
    const p = E(() => e.align === void 0 && e.direction === "horizontal" ? "center" : e.align), v = E(() => _e(i.value, s.value, `${i.value}-${e.direction}`, {
      [`${i.value}-rtl`]: a.value === "rtl",
      [`${i.value}-align-${p.value}`]: p.value
    })), g = E(() => a.value === "rtl" ? "marginLeft" : "marginRight"), m = E(() => {
      const x = {};
      return u.value && (x.columnGap = `${d.value}px`, x.rowGap = `${f.value}px`), O(O({}, x), e.wrap && {
        flexWrap: "wrap",
        marginBottom: `${-f.value}px`
      });
    });
    return () => {
      var x, S;
      const {
        wrap: C,
        direction: P = "horizontal"
      } = e, $ = (x = n.default) === null || x === void 0 ? void 0 : x.call(n), I = Do($), w = I.length;
      if (w === 0)
        return null;
      const M = (S = n.split) === null || S === void 0 ? void 0 : S.call(n), _ = `${i.value}-item`, N = d.value, R = w - 1;
      return h("div", Q(Q({}, o), {}, {
        class: [v.value, o.class],
        style: [m.value, o.style]
      }), [I.map((H, L) => {
        let B = $.indexOf(H);
        B === -1 && (B = `$$space-${L}`);
        let A = {};
        return u.value || (P === "vertical" ? L < R && (A = {
          marginBottom: `${N / (M ? 2 : 1)}px`
        }) : A = O(O({}, L < R && {
          [g.value]: `${N / (M ? 2 : 1)}px`
        }), C && {
          paddingBottom: `${f.value}px`
        })), l(h(Je, {
          key: B
        }, [h("div", {
          class: _,
          style: A
        }, [H]), L < R && M && h("span", {
          class: `${_}-split`,
          style: A
        }, [M])]));
      })]);
    };
  }
});
Jr.Compact = Ym;
Jr.install = function(e) {
  return e.component(Jr.name, Jr), e.component(Ym.name, Ym), e;
};
const QX = rr(n_), yx = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    included: o,
    vertical: i,
    style: r,
    class: a
  } = 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 = O(O({}, r), c);
  return o ? h("div", {
    class: a,
    style: d
  }, null) : null;
};
yx.inheritAttrs = !1;
const ZX = (e, t, n, o, i, r) => {
  wo(n ? o > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  const a = Object.keys(t).map(parseFloat).sort((l, s) => l - s);
  if (n && o)
    for (let l = i; l <= r; l += o)
      a.indexOf(l) === -1 && a.push(l);
  return a;
}, a2 = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    prefixCls: o,
    vertical: i,
    reverse: r,
    marks: a,
    dots: l,
    step: s,
    included: u,
    lowerBound: c,
    upperBound: d,
    max: f,
    min: p,
    dotStyle: v,
    activeDotStyle: g
  } = n, m = f - p, x = ZX(i, a, l, s, p, f).map((S) => {
    const C = `${Math.abs(S - p) / m * 100}%`, P = !u && S === d || u && S <= d && S >= c;
    let $ = i ? O(O({}, v), {
      [r ? "top" : "bottom"]: C
    }) : O(O({}, v), {
      [r ? "right" : "left"]: C
    });
    P && ($ = O(O({}, $), g));
    const I = _e({
      [`${o}-dot`]: !0,
      [`${o}-dot-active`]: P,
      [`${o}-dot-reverse`]: r
    });
    return h("span", {
      class: I,
      style: $,
      key: S
    }, null);
  });
  return h("div", {
    class: `${o}-step`
  }, [x]);
};
a2.inheritAttrs = !1;
const l2 = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  const {
    class: i,
    vertical: r,
    reverse: a,
    marks: l,
    included: s,
    upperBound: u,
    lowerBound: c,
    max: d,
    min: f,
    onClickLabel: p
  } = n, v = Object.keys(l), g = o.mark, m = d - f, x = v.map(parseFloat).sort((S, C) => S - C).map((S) => {
    const C = typeof l[S] == "function" ? l[S]() : l[S], P = typeof C == "object" && !Ao(C);
    let $ = P ? C.label : C;
    if (!$ && $ !== 0)
      return null;
    g && ($ = g({
      point: S,
      label: $
    }));
    const I = !s && S === u || s && S <= u && S >= c, w = _e({
      [`${i}-text`]: !0,
      [`${i}-text-active`]: I
    }), M = {
      marginBottom: "-50%",
      [a ? "top" : "bottom"]: `${(S - f) / m * 100}%`
    }, _ = {
      transform: `translateX(${a ? "50%" : "-50%"})`,
      msTransform: `translateX(${a ? "50%" : "-50%"})`,
      [a ? "right" : "left"]: `${(S - f) / m * 100}%`
    }, N = r ? M : _, R = P ? O(O({}, N), C.style) : N, H = {
      [Fo ? "onTouchstartPassive" : "onTouchstart"]: (L) => p(L, S)
    };
    return h("span", Q({
      class: w,
      style: R,
      key: S,
      onMousedown: (L) => p(L, S)
    }, H), [$]);
  });
  return h("div", {
    class: i
  }, [x]);
};
l2.inheritAttrs = !1;
const s2 = be({
  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: pe.oneOfType([pe.number, pe.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 r = $e(!1), a = $e(), l = () => {
      document.activeElement === a.value && (r.value = !0);
    }, s = (m) => {
      r.value = !1, o("blur", m);
    }, u = () => {
      r.value = !1;
    }, c = () => {
      var m;
      (m = a.value) === null || m === void 0 || m.focus();
    }, d = () => {
      var m;
      (m = a.value) === null || m === void 0 || m.blur();
    }, f = () => {
      r.value = !0, c();
    }, p = (m) => {
      m.preventDefault(), c(), o("mousedown", m);
    };
    i({
      focus: c,
      blur: d,
      clickFocus: f,
      ref: a
    });
    let v = null;
    At(() => {
      v = Ho(document, "mouseup", l);
    }), qt(() => {
      v?.remove();
    });
    const g = E(() => {
      const {
        vertical: m,
        offset: x,
        reverse: S
      } = e;
      return m ? {
        [S ? "top" : "bottom"]: `${x}%`,
        [S ? "bottom" : "top"]: "auto",
        transform: S ? null : "translateY(+50%)"
      } : {
        [S ? "right" : "left"]: `${x}%`,
        [S ? "left" : "right"]: "auto",
        transform: `translateX(${S ? "+" : "-"}50%)`
      };
    });
    return () => {
      const {
        prefixCls: m,
        disabled: x,
        min: S,
        max: C,
        value: P,
        tabindex: $,
        ariaLabel: I,
        ariaLabelledBy: w,
        ariaValueTextFormatter: M,
        onMouseenter: _,
        onMouseleave: N
      } = e, R = _e(n.class, {
        [`${m}-handle-click-focused`]: r.value
      }), H = {
        "aria-valuemin": S,
        "aria-valuemax": C,
        "aria-valuenow": P,
        "aria-disabled": !!x
      }, L = [n.style, g.value];
      let B = $ || 0;
      (x || $ === null) && (B = null);
      let A;
      M && (A = M(P));
      const G = O(O(O(O({}, n), {
        role: "slider",
        tabindex: B
      }), H), {
        class: R,
        onBlur: s,
        onKeydown: u,
        onMousedown: p,
        onMouseenter: _,
        onMouseleave: N,
        ref: a,
        style: L
      });
      return h("div", Q(Q({}, G), {}, {
        "aria-label": I,
        "aria-labelledby": w,
        "aria-valuetext": A
      }), null);
    };
  }
});
function Ev(e, t) {
  try {
    return Object.keys(t).some((n) => e.target === t[n].ref);
  } catch {
    return !1;
  }
}
function u2(e, t) {
  let {
    min: n,
    max: o
  } = t;
  return e < n || e > o;
}
function JC(e) {
  return e.touches.length > 1 || e.type.toLowerCase() === "touchend" && e.touches.length > 0;
}
function e$(e, t) {
  let {
    marks: n,
    step: o,
    min: i,
    max: r
  } = t;
  const a = Object.keys(n).map(parseFloat);
  if (o !== null) {
    const s = Math.pow(10, c2(o)), u = Math.floor((r * s - i * s) / (o * s)), c = Math.min((e - i) / o, u), d = Math.round(c) * o + i;
    a.push(d);
  }
  const l = a.map((s) => Math.abs(e - s));
  return a[l.indexOf(Math.min(...l))];
}
function c2(e) {
  const t = e.toString();
  let n = 0;
  return t.indexOf(".") >= 0 && (n = t.length - t.indexOf(".") - 1), n;
}
function t$(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 n$(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 o$(e, t) {
  const n = t.getBoundingClientRect();
  return e ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
}
function xx(e, t) {
  let {
    max: n,
    min: o
  } = t;
  return e <= o ? o : e >= n ? n : e;
}
function d2(e, t) {
  const {
    step: n
  } = t, o = isFinite(e$(e, t)) ? e$(e, t) : 0;
  return n === null ? o : parseFloat(o.toFixed(c2(n)));
}
function tc(e) {
  e.stopPropagation(), e.preventDefault();
}
function JX(e, t, n) {
  const o = {
    increase: (a, l) => a + l,
    decrease: (a, l) => a - l
  }, i = o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)), 1), r = Object.keys(n.marks)[i];
  return n.step ? o[e](t, n.step) : Object.keys(n.marks).length && n.marks[r] ? n.marks[r] : t;
}
function f2(e, t, n) {
  const o = "increase", i = "decrease";
  let r = o;
  switch (e.keyCode) {
    case rt.UP:
      r = t && n ? i : o;
      break;
    case rt.RIGHT:
      r = !t && n ? i : o;
      break;
    case rt.DOWN:
      r = t && n ? o : i;
      break;
    case rt.LEFT:
      r = !t && n ? o : i;
      break;
    case rt.END:
      return (a, l) => l.max;
    case rt.HOME:
      return (a, l) => l.min;
    case rt.PAGE_UP:
      return (a, l) => a + l.step * 2;
    case rt.PAGE_DOWN:
      return (a, l) => a - l.step * 2;
    default:
      return;
  }
  return (a, l) => JX(r, a, l);
}
var eQ = 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 ns() {
}
function p2(e) {
  const t = {
    id: String,
    min: Number,
    max: Number,
    step: Number,
    marks: pe.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: pe.object,
    maximumTrackStyle: pe.object,
    handleStyle: pe.oneOfType([pe.object, pe.arrayOf(pe.object)]),
    trackStyle: pe.oneOfType([pe.object, pe.arrayOf(pe.object)]),
    railStyle: pe.object,
    dotStyle: pe.object,
    activeDotStyle: pe.object,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    draggableTrack: {
      type: Boolean,
      default: void 0
    }
  };
  return be({
    compatConfig: {
      MODE: 3
    },
    name: "CreateSlider",
    mixins: [Dd, e],
    inheritAttrs: !1,
    props: _n(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, r = isFinite(o - i) ? (o - i) % n === 0 : !0;
      return wo(n && Math.floor(n) === n ? r : !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: r,
          style: a
        } = n, l = eQ(n, ["index", "directives", "className", "style"]);
        if (delete l.dragging, l.value === null)
          return null;
        const s = O(O({}, l), {
          class: r,
          style: a,
          key: o
        });
        return h(s2, s, null);
      },
      onDown(n, o) {
        let i = o;
        const {
          draggableTrack: r,
          vertical: a
        } = this.$props, {
          bounds: l
        } = this.$data, s = r && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = Ev(n, this.handlesRefs);
        if (this.dragTrack = r && 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 = o$(a, 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 = t$(o, n);
        this.onDown(n, i), this.addDocumentMouseEvents();
      },
      onTouchStart(n) {
        if (JC(n)) return;
        const o = this.vertical, i = n$(o, n);
        this.onDown(n, i), this.addDocumentTouchEvents(), tc(n);
      },
      onFocus(n) {
        const {
          vertical: o
        } = this;
        if (Ev(n, this.handlesRefs) && !this.dragTrack) {
          const i = o$(o, n.target);
          this.dragOffset = 0, this.onStart(i), tc(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 = t$(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onTouchMove(n) {
        if (JC(n) || !this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = n$(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onKeyDown(n) {
        this.sliderRef && Ev(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, r = n.getBoundingClientRect();
        return o ? i ? r.bottom : r.top : window.scrollX + (i ? r.right : r.left);
      },
      getSliderLength() {
        const n = this.sliderRef;
        if (!n)
          return 0;
        const o = n.getBoundingClientRect();
        return this.vertical ? o.height : o.width;
      },
      addDocumentTouchEvents() {
        this.onTouchMoveListener = Ho(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = Ho(this.document, "touchend", this.onEnd);
      },
      addDocumentMouseEvents() {
        this.onMouseMoveListener = Ho(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = Ho(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: r
        } = this, a = Math.abs(Math.max(n, 0) / this.getSliderLength());
        return o ? (1 - a) * (r - i) + i : a * (r - 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, r = (n - o) / (i - o);
        return Math.max(0, r * 100);
      },
      saveSlider(n) {
        this.sliderRef = n;
      },
      saveHandle(n, o) {
        this.handlesRefs[n] = o;
      }
    },
    render() {
      const {
        prefixCls: n,
        marks: o,
        dots: i,
        step: r,
        included: a,
        disabled: l,
        vertical: s,
        reverse: u,
        min: c,
        max: d,
        maximumTrackStyle: f,
        railStyle: p,
        dotStyle: v,
        activeDotStyle: g,
        id: m
      } = this, {
        class: x,
        style: S
      } = this.$attrs, {
        tracks: C,
        handles: P
      } = this.renderSlider(), $ = _e(n, x, {
        [`${n}-with-marks`]: Object.keys(o).length,
        [`${n}-disabled`]: l,
        [`${n}-vertical`]: s,
        [`${n}-horizontal`]: !s
      }), I = {
        vertical: s,
        marks: o,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        reverse: u,
        class: `${n}-mark`,
        onClickLabel: l ? ns : this.onClickMarkLabel
      }, w = {
        [Fo ? "onTouchstartPassive" : "onTouchstart"]: l ? ns : this.onTouchStart
      };
      return h("div", Q(Q({
        id: m,
        ref: this.saveSlider,
        tabindex: "-1",
        class: $
      }, w), {}, {
        onMousedown: l ? ns : this.onMouseDown,
        onMouseup: l ? ns : this.onMouseUp,
        onKeydown: l ? ns : this.onKeyDown,
        onFocus: l ? ns : this.onFocus,
        onBlur: l ? ns : this.onBlur,
        style: S
      }), [h("div", {
        class: `${n}-rail`,
        style: O(O({}, f), p)
      }, null), C, h(a2, {
        prefixCls: n,
        vertical: s,
        reverse: u,
        marks: o,
        dots: i,
        step: r,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        dotStyle: v,
        activeDotStyle: g
      }, null), P, h(l2, I, {
        mark: this.$slots.mark
      }), Fk(this)]);
    }
  });
}
const tQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Slider",
  mixins: [Dd],
  inheritAttrs: !1,
  props: {
    defaultValue: Number,
    value: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    autofocus: {
      type: Boolean,
      default: void 0
    },
    tabindex: pe.oneOfType([pe.number, pe.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
      }), u2(t, this.$props) && this.$emit("change", n));
    },
    onChange(e) {
      const t = !Ia(this, "value"), n = e.sValue > this.max ? O(O({}, 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) {
      tc(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 = f2(e, n, t);
      if (o) {
        tc(e);
        const {
          sValue: i
        } = this, r = o(i, this.$props), a = this.trimAlignValue(r);
        if (a === i) return;
        this.onChange({
          sValue: a
        }), this.$emit("afterChange", a), 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 = O(O({}, this.$props), t), o = xx(e, n);
      return d2(o, n);
    },
    getTrack(e) {
      let {
        prefixCls: t,
        reverse: n,
        vertical: o,
        included: i,
        minimumTrackStyle: r,
        mergedTrackStyle: a,
        length: l,
        offset: s
      } = e;
      return h(yx, {
        class: `${t}-track`,
        vertical: o,
        included: i,
        offset: s,
        reverse: n,
        length: l,
        style: O(O({}, r), a)
      }, null);
    },
    renderSlider() {
      const {
        prefixCls: e,
        vertical: t,
        included: n,
        disabled: o,
        minimumTrackStyle: i,
        trackStyle: r,
        handleStyle: a,
        tabindex: l,
        ariaLabelForHandle: s,
        ariaLabelledByForHandle: u,
        ariaValueTextFormatterForHandle: c,
        min: d,
        max: f,
        startPoint: p,
        reverse: v,
        handle: g,
        defaultHandle: m
      } = this, x = g || m, {
        sValue: S,
        dragging: C
      } = this, P = this.calcOffset(S), $ = x({
        class: `${e}-handle`,
        prefixCls: e,
        vertical: t,
        offset: P,
        value: S,
        dragging: C,
        disabled: o,
        min: d,
        max: f,
        reverse: v,
        index: 0,
        tabindex: l,
        ariaLabel: s,
        ariaLabelledBy: u,
        ariaValueTextFormatter: c,
        style: a[0] || a,
        ref: (M) => this.saveHandle(0, M),
        onFocus: this.onFocus,
        onBlur: this.onBlur
      }), I = p !== void 0 ? this.calcOffset(p) : 0, w = r[0] || r;
      return {
        tracks: this.getTrack({
          prefixCls: e,
          reverse: v,
          vertical: t,
          included: n,
          offset: I,
          minimumTrackStyle: i,
          mergedTrackStyle: w,
          length: P - I
        }),
        handles: $
      };
    }
  }
}), nQ = p2(tQ), Ac = (e) => {
  let {
    value: t,
    handle: n,
    bounds: o,
    props: i
  } = e;
  const {
    allowCross: r,
    pushable: a
  } = i, l = Number(a), s = xx(t, i);
  let u = s;
  return !r && 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)), d2(u, i);
}, oQ = {
  defaultValue: pe.arrayOf(pe.number),
  value: pe.arrayOf(pe.number),
  count: Number,
  pushable: b6(pe.oneOfType([pe.looseBool, pe.number])),
  allowCross: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  reverse: {
    type: Boolean,
    default: void 0
  },
  tabindex: pe.arrayOf(pe.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
  }
}, iQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Range",
  mixins: [Dd],
  inheritAttrs: !1,
  props: _n(oQ, {
    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 = Ia(this, "defaultValue") ? this.defaultValue : o;
    let {
      value: r
    } = this;
    r === void 0 && (r = i);
    const a = r.map((s, u) => Ac({
      value: s,
      handle: u,
      props: this.$props
    }));
    return {
      sHandle: null,
      recent: a[0] === n ? 0 : a.length - 1,
      bounds: a
    };
  },
  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) => Ac({
        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) => Ac({
          value: o,
          handle: i,
          props: this.$props
        }));
      if (this.setState({
        bounds: n
      }), e.some((o) => u2(o, this.$props))) {
        const o = e.map((i) => xx(i, this.$props));
        this.$emit("change", o);
      }
    },
    onChange(e) {
      if (!Ia(this, "value"))
        this.setState(e);
      else {
        const i = {};
        ["sHandle", "recent"].forEach((r) => {
          e[r] !== void 0 && (i[r] = e[r]);
        }), Object.keys(i).length && this.setState(i);
      }
      const o = O(O({}, 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), r = t[i];
      if (n === r) return null;
      const a = [...t];
      return a[i] = n, a;
    },
    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 r = [...t];
      r[this.prevMovedHandleIndex] = n, this.onChange({
        bounds: r
      });
    },
    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) {
      tc(e);
      const {
        $data: i,
        $props: r
      } = this, a = r.max || 100, l = r.min || 0;
      if (n) {
        let f = r.vertical ? -t : t;
        f = r.reverse ? -f : f;
        const p = a - Math.max(...o), v = l - Math.min(...o), g = Math.min(Math.max(f / (this.getSliderLength() / 100), v), p), m = o.map((x) => Math.floor(Math.max(Math.min(x + g, a), l)));
        i.bounds.map((x, S) => x === m[S]).some((x) => !x) && this.onChange({
          bounds: m
        });
        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 = f2(e, n, t);
      if (o) {
        tc(e);
        const {
          bounds: i,
          sHandle: r
        } = this, a = i[r === null ? this.recent : r], l = o(a, this.$props), s = Ac({
          value: l,
          handle: r,
          bounds: i,
          props: this.$props
        });
        if (s === a) 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 r = n[t + 1] === n[t];
      return r && n[o] === n[t] && (i = o), r && 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 r = O({}, e);
        if (t !== null)
          for (let l = n; l <= o; l += t)
            r[l] = l;
        const a = Object.keys(r).map(parseFloat);
        a.sort((l, s) => l - s), this.internalPointsCache = {
          marks: e,
          step: t,
          points: a
        };
      }
      return this.internalPointsCache.points;
    },
    moveTo(e, t) {
      const n = [...this.bounds], {
        sHandle: o,
        recent: i
      } = this, r = o === null ? i : o;
      n[r] = e;
      let a = r;
      this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, a) : this.$props.allowCross && (n.sort((l, s) => l - s), a = n.indexOf(e)), this.onChange({
        recent: a,
        sHandle: a,
        bounds: n
      }), t && (this.$emit("afterChange", n), this.setState({}, () => {
        this.handlesRefs[a].focus();
      }), this.onEnd());
    },
    pushSurroundingHandles(e, t) {
      const n = e[t], {
        pushable: o
      } = this, i = Number(o);
      let r = 0;
      if (e[t + 1] - n < i && (r = 1), n - e[t - 1] < i && (r = -1), r === 0)
        return;
      const a = t + r, l = r * (e[a] - n);
      this.pushHandle(e, a, r, i - l) || (e[t] = e[a] - r * i);
    },
    pushHandle(e, t, n, o) {
      const i = e[t];
      let r = e[t];
      for (; n * (r - i) < o; ) {
        if (!this.pushHandleOnePoint(e, t, n))
          return e[t] = i, !1;
        r = e[t];
      }
      return !0;
    },
    pushHandleOnePoint(e, t, n) {
      const o = this.getPoints(), r = o.indexOf(e[t]) + n;
      if (r >= o.length || r < 0)
        return !1;
      const a = t + n, l = o[r], {
        pushable: s
      } = this, u = Number(s), c = n * (e[a] - l);
      return this.pushHandle(e, a, n, u - c) ? (e[t] = l, !0) : !1;
    },
    trimAlignValue(e) {
      const {
        sHandle: t,
        bounds: n
      } = this;
      return Ac({
        value: e,
        handle: t,
        bounds: n,
        props: this.$props
      });
    },
    ensureValueNotConflict(e, t, n) {
      let {
        allowCross: o,
        pushable: i
      } = n;
      const r = this.$data || {}, {
        bounds: a
      } = r;
      if (e = e === void 0 ? r.sHandle : e, i = Number(i), !o && e != null && a !== void 0) {
        if (e > 0 && t <= a[e - 1] + i)
          return a[e - 1] + i;
        if (e < a.length - 1 && t >= a[e + 1] - i)
          return a[e + 1] - i;
      }
      return t;
    },
    getTrack(e) {
      let {
        bounds: t,
        prefixCls: n,
        reverse: o,
        vertical: i,
        included: r,
        offsets: a,
        trackStyle: l
      } = e;
      return t.slice(0, -1).map((s, u) => {
        const c = u + 1, d = _e({
          [`${n}-track`]: !0,
          [`${n}-track-${c}`]: !0
        });
        return h(yx, {
          class: d,
          vertical: i,
          reverse: o,
          included: r,
          offset: a[c - 1],
          length: a[c] - a[c - 1],
          style: l[u],
          key: c
        }, null);
      });
    },
    renderSlider() {
      const {
        sHandle: e,
        bounds: t,
        prefixCls: n,
        vertical: o,
        included: i,
        disabled: r,
        min: a,
        max: l,
        reverse: s,
        handle: u,
        defaultHandle: c,
        trackStyle: d,
        handleStyle: f,
        tabindex: p,
        ariaLabelGroupForHandles: v,
        ariaLabelledByGroupForHandles: g,
        ariaValueTextFormatterGroupForHandles: m
      } = this, x = u || c, S = t.map(($) => this.calcOffset($)), C = `${n}-handle`, P = t.map(($, I) => {
        let w = p[I] || 0;
        (r || p[I] === null) && (w = null);
        const M = e === I;
        return x({
          class: _e({
            [C]: !0,
            [`${C}-${I + 1}`]: !0,
            [`${C}-dragging`]: M
          }),
          prefixCls: n,
          vertical: o,
          dragging: M,
          offset: S[I],
          value: $,
          index: I,
          tabindex: w,
          min: a,
          max: l,
          reverse: s,
          disabled: r,
          style: f[I],
          ref: (_) => this.saveHandle(I, _),
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          ariaLabel: v[I],
          ariaLabelledBy: g[I],
          ariaValueTextFormatter: m[I]
        });
      });
      return {
        tracks: this.getTrack({
          bounds: t,
          prefixCls: n,
          reverse: s,
          vertical: o,
          included: i,
          offsets: S,
          trackStyle: d
        }),
        handles: P
      };
    }
  }
}), rQ = p2(iQ), aQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "SliderTooltip",
  inheritAttrs: !1,
  props: DM(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = le(null), r = le(null);
    function a() {
      Vt.cancel(r.value), r.value = null;
    }
    function l() {
      r.value = Vt(() => {
        var u;
        (u = i.value) === null || u === void 0 || u.forcePopupAlign(), r.value = null;
      });
    }
    const s = () => {
      a(), e.open && l();
    };
    return Ie([() => e.open, () => e.title], () => {
      s();
    }, {
      flush: "post",
      immediate: !0
    }), DP(() => {
      s();
    }), qt(() => {
      a();
    }), () => h(Lo, Q(Q({
      ref: i
    }, e), n), o);
  }
}), lQ = (e) => {
  const {
    componentCls: t,
    controlSize: n,
    dotSize: o,
    marginFull: i,
    marginPart: r,
    colorFillContentHover: a
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      height: n,
      margin: `${r}px ${i}px`,
      padding: 0,
      cursor: "pointer",
      touchAction: "none",
      "&-vertical": {
        margin: `${i}px ${r}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: a
        },
        [`${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"
        }
      }
    })
  };
}, h2 = (e, t) => {
  const {
    componentCls: n,
    railSize: o,
    handleSize: i,
    dotSize: r
  } = e, a = t ? "paddingBlock" : "paddingInline", l = t ? "width" : "height", s = t ? "height" : "width", u = t ? "insetBlockStart" : "insetInlineStart", c = t ? "top" : "insetInlineStart";
  return {
    [a]: 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 - r) / 2
    }
  };
}, sQ = (e) => {
  const {
    componentCls: t,
    marginPartWithMark: n
  } = e;
  return {
    [`${t}-horizontal`]: O(O({}, h2(e, !0)), {
      [`&${t}-with-marks`]: {
        marginBottom: n
      }
    })
  };
}, uQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-vertical`]: O(O({}, h2(e, !1)), {
      height: "100%"
    })
  };
}, cQ = On("Slider", (e) => {
  const t = Qt(e, {
    marginPart: (e.controlHeight - e.controlSize) / 2,
    marginFull: e.controlSize / 2,
    marginPartWithMark: e.controlHeightLG - e.controlSize
  });
  return [lQ(t), sQ(t), uQ(t)];
}, (e) => {
  const n = e.controlHeightLG / 4, o = e.controlHeightSM / 2, i = e.lineWidth + 1, r = e.lineWidth + 3;
  return {
    controlSize: n,
    railSize: 4,
    handleSize: n,
    handleSizeHover: o,
    dotSize: 8,
    handleLineWidth: i,
    handleLineWidthHover: r
  };
});
var i$ = 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 dQ = (e) => typeof e == "number" ? e.toString() : "", fQ = () => ({
  id: String,
  prefixCls: String,
  tooltipPrefixCls: String,
  range: en([Boolean, Object]),
  reverse: ct(),
  min: Number,
  max: Number,
  step: en([Object, Number]),
  marks: _t(),
  dots: ct(),
  value: en([Array, Number]),
  defaultValue: en([Array, Number]),
  included: ct(),
  disabled: ct(),
  vertical: ct(),
  tipFormatter: en([Function, Object], () => dQ),
  tooltipOpen: ct(),
  /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  tooltipVisible: ct(),
  tooltipPlacement: rn(),
  getTooltipPopupContainer: et(),
  autofocus: ct(),
  handleStyle: en([Array, Object]),
  trackStyle: en([Array, Object]),
  onChange: et(),
  onAfterChange: et(),
  onFocus: et(),
  onBlur: et(),
  "onUpdate:value": et()
}), pQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASlider",
  inheritAttrs: !1,
  props: fQ(),
  // emits: ['update:value', 'change', 'afterChange', 'blur'],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i,
      expose: r
    } = t;
    process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((w) => {
      let [M, _] = w;
      dn(e.tooltipVisible === void 0, "Slider", `\`${M}\` is deprecated, please use \`${_}\` instead.`);
    });
    const {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u,
      configProvider: c
    } = Rt("slider", e), [d, f] = cQ(a), p = Bi(), v = le(), g = le({}), m = (w, M) => {
      g.value[w] = M;
    }, x = E(() => e.tooltipPlacement ? e.tooltipPlacement : e.vertical ? s.value === "rtl" ? "left" : "right" : "top"), S = () => {
      var w;
      (w = v.value) === null || w === void 0 || w.focus();
    }, C = () => {
      var w;
      (w = v.value) === null || w === void 0 || w.blur();
    }, P = (w) => {
      i("update:value", w), i("change", w), p.onFieldChange();
    }, $ = (w) => {
      i("blur", w);
    };
    r({
      focus: S,
      blur: C
    });
    const I = (w) => {
      var {
        tooltipPrefixCls: M
      } = w, _ = w.info, {
        value: N,
        dragging: R,
        index: H
      } = _, L = i$(_, ["value", "dragging", "index"]);
      const {
        tipFormatter: B,
        tooltipOpen: A = e.tooltipVisible,
        getTooltipPopupContainer: G
      } = e, j = B ? g.value[H] || R : !1, Z = A || A === void 0 && j;
      return h(aQ, {
        prefixCls: M,
        title: B ? B(N) : "",
        open: Z,
        placement: x.value,
        transitionName: `${l.value}-zoom-down`,
        key: H,
        overlayClassName: `${a.value}-tooltip`,
        getPopupContainer: G || u?.value
      }, {
        default: () => [h(s2, Q(Q({}, L), {}, {
          value: N,
          onMouseenter: () => m(H, !0),
          onMouseleave: () => m(H, !1)
        }), null)]
      });
    };
    return () => {
      const {
        tooltipPrefixCls: w,
        range: M,
        id: _ = p.id.value
      } = e, N = i$(e, ["tooltipPrefixCls", "range", "id"]), R = c.getPrefixCls("tooltip", w), H = _e(n.class, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, f.value);
      s.value === "rtl" && !N.vertical && (N.reverse = !N.reverse);
      let L;
      return typeof M == "object" && (L = M.draggableTrack), d(M ? h(rQ, Q(Q(Q({}, n), N), {}, {
        step: N.step,
        draggableTrack: L,
        class: H,
        ref: v,
        handle: (B) => I({
          tooltipPrefixCls: R,
          prefixCls: a.value,
          info: B
        }),
        prefixCls: a.value,
        onChange: P,
        onBlur: $
      }), {
        mark: o.mark
      }) : h(nQ, Q(Q(Q({}, n), N), {}, {
        id: _,
        step: N.step,
        class: H,
        ref: v,
        handle: (B) => I({
          tooltipPrefixCls: R,
          prefixCls: a.value,
          info: B
        }),
        prefixCls: a.value,
        onChange: P,
        onBlur: $
      }), {
        mark: o.mark
      }));
    };
  }
}), bi = rr(pQ), hQ = (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
            }
          }
        }
      }
    }
  };
}, gQ = (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
      }
    }
  };
}, vQ = (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
        }
      }
    }
  };
}, mQ = (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
          }
        }
      }
    }
  };
}, bQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: O(O(O(O({}, fn(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
      }
    }), Rl(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"
      }
    })
  };
}, yQ = On("Switch", (e) => {
  const t = e.fontSize * e.lineHeight, n = e.controlHeight / 2, o = 2, i = t - o * 2, r = n - o * 2, a = Qt(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: r * 2 + o * 2,
    switchHeightSM: n,
    switchInnerMarginMinSM: r / 2,
    switchInnerMarginMaxSM: r + o + o * 2,
    switchPinSizeSM: r,
    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 [
    bQ(a),
    // inner style
    mQ(a),
    // handle style
    vQ(a),
    // loading style
    gQ(a),
    // small style
    hQ(a)
  ];
}), xQ = Mr("small", "default"), wQ = () => ({
  id: String,
  prefixCls: String,
  size: pe.oneOf(xQ),
  disabled: {
    type: Boolean,
    default: void 0
  },
  checkedChildren: pe.any,
  unCheckedChildren: pe.any,
  tabindex: pe.oneOfType([pe.string, pe.number]),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  checked: pe.oneOfType([pe.string, pe.number, pe.looseBool]),
  checkedValue: pe.oneOfType([pe.string, pe.number, pe.looseBool]).def(!0),
  unCheckedValue: pe.oneOfType([pe.string, pe.number, pe.looseBool]).def(!1),
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onMouseup: {
    type: Function
  },
  "onUpdate:checked": {
    type: Function
  },
  onBlur: Function,
  onFocus: Function
}), SQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASwitch",
  __ANT_SWITCH: !0,
  inheritAttrs: !1,
  props: wQ(),
  slots: Object,
  // emits: ['update:checked', 'mouseup', 'change', 'click', 'keydown', 'blur'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i,
      emit: r
    } = t;
    const a = Bi(), l = Tr(), s = E(() => {
      var _;
      return (_ = e.disabled) !== null && _ !== void 0 ? _ : l.value;
    });
    th(() => {
      wo(!("defaultChecked" in n), "Switch", "'defaultChecked' is deprecated, please use 'v-model:checked'"), wo(!("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 = E(() => u.value === e.checkedValue);
    Ie(() => e.checked, () => {
      u.value = e.checked;
    });
    const {
      prefixCls: d,
      direction: f,
      size: p
    } = Rt("switch", e), [v, g] = yQ(d), m = le(), x = () => {
      var _;
      (_ = m.value) === null || _ === void 0 || _.focus();
    };
    i({
      focus: x,
      blur: () => {
        var _;
        (_ = m.value) === null || _ === void 0 || _.blur();
      }
    }), At(() => {
      Yt(() => {
        e.autofocus && !s.value && m.value.focus();
      });
    });
    const C = (_, N) => {
      s.value || (r("update:checked", _), r("change", _, N), a.onFieldChange());
    }, P = (_) => {
      r("blur", _);
    }, $ = (_) => {
      x();
      const N = c.value ? e.unCheckedValue : e.checkedValue;
      C(N, _), r("click", N, _);
    }, I = (_) => {
      _.keyCode === rt.LEFT ? C(e.unCheckedValue, _) : _.keyCode === rt.RIGHT && C(e.checkedValue, _), r("keydown", _);
    }, w = (_) => {
      var N;
      (N = m.value) === null || N === void 0 || N.blur(), r("mouseup", _);
    }, M = E(() => ({
      [`${d.value}-small`]: p.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",
      [g.value]: !0
    }));
    return () => {
      var _;
      return v(h(P0, null, {
        default: () => [h("button", Q(Q(Q({}, Bn(e, ["prefixCls", "checkedChildren", "unCheckedChildren", "checked", "autofocus", "checkedValue", "unCheckedValue", "id", "onChange", "onUpdate:checked"])), n), {}, {
          id: (_ = e.id) !== null && _ !== void 0 ? _ : a.id.value,
          onKeydown: I,
          onClick: $,
          onBlur: P,
          onMouseup: w,
          type: "button",
          role: "switch",
          "aria-checked": u.value,
          disabled: s.value || e.loading,
          class: [n.class, M.value],
          ref: m
        }), [h("div", {
          class: `${d.value}-handle`
        }, [e.loading ? h(_r, {
          class: `${d.value}-loading-icon`
        }, null) : null]), h("span", {
          class: `${d.value}-inner`
        }, [h("span", {
          class: `${d.value}-inner-checked`
        }, [Ji(o, e, "checkedChildren")]), h("span", {
          class: `${d.value}-inner-unchecked`
        }, [Ji(o, e, "unCheckedChildren")])])])]
      }));
    };
  }
}), Pa = rr(SQ), g2 = Symbol("TableContextProps"), CQ = (e) => {
  Ft(g2, e);
}, ua = () => zt(g2, {}), $Q = "RC_TABLE_KEY";
function v2(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function m2(e, t) {
  if (!t && typeof t != "number")
    return e;
  const n = v2(t);
  let o = e;
  for (let i = 0; i < n.length; i += 1) {
    if (!o)
      return null;
    const r = n[i];
    o = o[r];
  }
  return o;
}
function rg(e) {
  const t = [], n = {};
  return e.forEach((o) => {
    const {
      key: i,
      dataIndex: r
    } = o || {};
    let a = i || v2(r).join("-") || $Q;
    for (; n[a]; )
      a = `${a}_next`;
    n[a] = !0, t.push(a);
  }), t;
}
function PQ() {
  const e = {};
  function t(r, a) {
    a && Object.keys(a).forEach((l) => {
      const s = a[l];
      s && typeof s == "object" ? (r[l] = r[l] || {}, t(r[l], s)) : r[l] = s;
    });
  }
  for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++)
    o[i] = arguments[i];
  return o.forEach((r) => {
    t(e, r);
  }), e;
}
function _b(e) {
  return e != null;
}
const b2 = Symbol("SlotsContextProps"), OQ = (e) => {
  Ft(b2, e);
}, wx = () => zt(b2, E(() => ({}))), y2 = Symbol("ContextProps"), kQ = (e) => {
  Ft(y2, e);
}, IQ = () => zt(y2, {
  onResizeColumn: () => {
  }
}), zu = "RC_TABLE_INTERNAL_COL_DEFINE", x2 = Symbol("HoverContextProps"), MQ = (e) => {
  Ft(x2, e);
}, TQ = () => zt(x2, {
  startRow: $e(-1),
  endRow: $e(-1),
  onHover() {
  }
}), Eb = $e(!1), _Q = () => {
  At(() => {
    Eb.value = Eb.value || qK("position", "sticky");
  });
}, EQ = () => Eb;
var DQ = 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 AQ(e, t, n, o) {
  const i = e + t - 1;
  return e <= o && i >= n;
}
function RQ(e) {
  return e && typeof e == "object" && !Array.isArray(e) && !ci(e);
}
const ag = be({
  name: "Cell",
  props: ["prefixCls", "record", "index", "renderIndex", "dataIndex", "customRender", "component", "colSpan", "rowSpan", "fixLeft", "fixRight", "firstFixLeft", "lastFixLeft", "firstFixRight", "lastFixRight", "appendNode", "additionalProps", "ellipsis", "align", "rowType", "isSticky", "column", "cellType", "transformCellText"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = wx(), {
      onHover: i,
      startRow: r,
      endRow: a
    } = TQ(), l = E(() => {
      var g, m, x, S;
      return (x = (g = e.colSpan) !== null && g !== void 0 ? g : (m = e.additionalProps) === null || m === void 0 ? void 0 : m.colSpan) !== null && x !== void 0 ? x : (S = e.additionalProps) === null || S === void 0 ? void 0 : S.colspan;
    }), s = E(() => {
      var g, m, x, S;
      return (x = (g = e.rowSpan) !== null && g !== void 0 ? g : (m = e.additionalProps) === null || m === void 0 ? void 0 : m.rowSpan) !== null && x !== void 0 ? x : (S = e.additionalProps) === null || S === void 0 ? void 0 : S.rowspan;
    }), u = gr(() => {
      const {
        index: g
      } = e;
      return AQ(g, s.value || 1, r.value, a.value);
    }), c = EQ(), d = (g, m) => {
      var x;
      const {
        record: S,
        index: C,
        additionalProps: P
      } = e;
      S && i(C, C + m - 1), (x = P?.onMouseenter) === null || x === void 0 || x.call(P, g);
    }, f = (g) => {
      var m;
      const {
        record: x,
        additionalProps: S
      } = e;
      x && i(-1, -1), (m = S?.onMouseleave) === null || m === void 0 || m.call(S, g);
    }, p = (g) => {
      const m = Do(g)[0];
      return ci(m) ? m.type === Xb ? m.children : Array.isArray(m.children) ? p(m.children) : void 0 : m;
    }, v = $e(null);
    return Ie([u, () => e.prefixCls, v], () => {
      const g = Qr(v.value);
      g && (u.value ? Xm(g, `${e.prefixCls}-cell-row-hover`) : Qm(g, `${e.prefixCls}-cell-row-hover`));
    }), () => {
      var g, m, x, S, C, P;
      const {
        prefixCls: $,
        record: I,
        index: w,
        renderIndex: M,
        dataIndex: _,
        customRender: N,
        component: R = "td",
        fixLeft: H,
        fixRight: L,
        firstFixLeft: B,
        lastFixLeft: A,
        firstFixRight: G,
        lastFixRight: j,
        appendNode: Z = (g = n.appendNode) === null || g === void 0 ? void 0 : g.call(n),
        additionalProps: W = {},
        ellipsis: K,
        align: q,
        rowType: U,
        isSticky: ae,
        column: se = {},
        cellType: re
      } = e, ie = `${$}-cell`;
      let te, ve;
      const ce = (m = n.default) === null || m === void 0 ? void 0 : m.call(n);
      if (_b(ce) || re === "header")
        ve = ce;
      else {
        const Se = m2(I, _);
        if (ve = Se, N) {
          const Ce = N({
            text: Se,
            value: Se,
            record: I,
            index: w,
            renderIndex: M,
            column: se.__originColumn__
          });
          RQ(Ce) ? (process.env.NODE_ENV !== "production" && wn(!1, "`columns.customRender` return cell props is deprecated with perf issue, please use `customCell` instead."), ve = Ce.children, te = Ce.props) : ve = Ce;
        }
        if (!(zu in se) && re === "body" && o.value.bodyCell && !(!((x = se.slots) === null || x === void 0) && x.customRender)) {
          const Ce = Dh(o.value, "bodyCell", {
            text: Se,
            value: Se,
            record: I,
            index: w,
            column: se.__originColumn__
          }, () => {
            const Ae = ve === void 0 ? Se : ve;
            return [typeof Ae == "object" && Ao(Ae) || typeof Ae != "object" ? Ae : null];
          });
          ve = go(Ce);
        }
        e.transformCellText && (ve = e.transformCellText({
          text: ve,
          record: I,
          index: w,
          column: se.__originColumn__
        }));
      }
      typeof ve == "object" && !Array.isArray(ve) && !ci(ve) && (ve = null), K && (A || G) && (ve = h("span", {
        class: `${ie}-content`
      }, [ve])), Array.isArray(ve) && ve.length === 1 && (ve = ve[0]);
      const fe = te || {}, {
        colSpan: ge,
        rowSpan: Me,
        style: ze,
        class: Ke
      } = fe, He = DQ(fe, ["colSpan", "rowSpan", "style", "class"]), Re = (S = ge !== void 0 ? ge : l.value) !== null && S !== void 0 ? S : 1, Xe = (C = Me !== void 0 ? Me : s.value) !== null && C !== void 0 ? C : 1;
      if (Re === 0 || Xe === 0)
        return null;
      const De = {}, Be = typeof H == "number" && c.value, Ve = typeof L == "number" && c.value;
      Be && (De.position = "sticky", De.left = `${H}px`), Ve && (De.position = "sticky", De.right = `${L}px`);
      const ot = {};
      q && (ot.textAlign = q);
      let je;
      const Pe = K === !0 ? {
        showTitle: !0
      } : K;
      Pe && (Pe.showTitle || U === "header") && (typeof ve == "string" || typeof ve == "number" ? je = ve.toString() : ci(ve) && (je = p([ve])));
      const Ge = O(O(O({
        title: je
      }, He), W), {
        colSpan: Re !== 1 ? Re : null,
        rowSpan: Xe !== 1 ? Xe : null,
        class: _e(ie, {
          [`${ie}-fix-left`]: Be && c.value,
          [`${ie}-fix-left-first`]: B && c.value,
          [`${ie}-fix-left-last`]: A && c.value,
          [`${ie}-fix-right`]: Ve && c.value,
          [`${ie}-fix-right-first`]: G && c.value,
          [`${ie}-fix-right-last`]: j && c.value,
          [`${ie}-ellipsis`]: K,
          [`${ie}-with-append`]: Z,
          [`${ie}-fix-sticky`]: (Be || Ve) && ae && c.value
        }, W.class, Ke),
        onMouseenter: (Se) => {
          d(Se, Xe);
        },
        onMouseleave: f,
        style: [W.style, ot, De, ze]
      });
      return h(R, Q(Q({}, Ge), {}, {
        ref: v
      }), {
        default: () => [Z, ve, (P = n.dragHandle) === null || P === void 0 ? void 0 : P.call(n)]
      });
    };
  }
});
function Sx(e, t, n, o, i) {
  const r = n[e] || {}, a = n[t] || {};
  let l, s;
  r.fixed === "left" ? l = o.left[e] : a.fixed === "right" && (s = o.right[t]);
  let u = !1, c = !1, d = !1, f = !1;
  const p = n[t + 1], v = n[e - 1];
  return i === "rtl" ? l !== void 0 ? f = !(v && v.fixed === "left") : s !== void 0 && (d = !(p && p.fixed === "right")) : l !== void 0 ? u = !(p && p.fixed === "left") : s !== void 0 && (c = !(v && v.fixed === "right")), {
    fixLeft: l,
    fixRight: s,
    lastFixLeft: u,
    firstFixRight: c,
    lastFixRight: d,
    firstFixLeft: f,
    isSticky: o.isSticky
  };
}
const r$ = {
  mouse: {
    move: "mousemove",
    stop: "mouseup"
  },
  touch: {
    move: "touchmove",
    stop: "touchend"
  }
}, a$ = 50, NQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "DragHandle",
  props: {
    prefixCls: String,
    width: {
      type: Number,
      required: !0
    },
    minWidth: {
      type: Number,
      default: a$
    },
    maxWidth: {
      type: Number,
      default: 1 / 0
    },
    column: {
      type: Object,
      default: void 0
    }
  },
  setup(e) {
    let t = 0, n = {
      remove: () => {
      }
    }, o = {
      remove: () => {
      }
    };
    const i = () => {
      n.remove(), o.remove();
    };
    Vo(() => {
      i();
    }), It(() => {
      dn(!isNaN(e.width), "Table", "width must be a number when use resizable");
    });
    const {
      onResizeColumn: r
    } = IQ(), a = E(() => typeof e.minWidth == "number" && !isNaN(e.minWidth) ? e.minWidth : a$), l = E(() => typeof e.maxWidth == "number" && !isNaN(e.maxWidth) ? e.maxWidth : 1 / 0), s = fi();
    let u = 0;
    const c = $e(!1);
    let d;
    const f = (C) => {
      let P = 0;
      C.touches ? C.touches.length ? P = C.touches[0].pageX : P = C.changedTouches[0].pageX : P = C.pageX;
      const $ = t - P;
      let I = Math.max(u - $, a.value);
      I = Math.min(I, l.value), Vt.cancel(d), d = Vt(() => {
        r(I, e.column.__originColumn__);
      });
    }, p = (C) => {
      f(C);
    }, v = (C) => {
      c.value = !1, f(C), i();
    }, g = (C, P) => {
      c.value = !0, i(), u = s.vnode.el.parentNode.getBoundingClientRect().width, !(C instanceof MouseEvent && C.which !== 1) && (C.stopPropagation && C.stopPropagation(), t = C.touches ? C.touches[0].pageX : C.pageX, n = Ho(document.documentElement, P.move, p), o = Ho(document.documentElement, P.stop, v));
    }, m = (C) => {
      C.stopPropagation(), C.preventDefault(), g(C, r$.mouse);
    }, x = (C) => {
      C.stopPropagation(), C.preventDefault(), g(C, r$.touch);
    }, S = (C) => {
      C.stopPropagation(), C.preventDefault();
    };
    return () => {
      const {
        prefixCls: C
      } = e, P = {
        [Fo ? "onTouchstartPassive" : "onTouchstart"]: ($) => x($)
      };
      return h("div", Q(Q({
        class: `${C}-resize-handle ${c.value ? "dragging" : ""}`,
        onMousedown: m
      }, P), {}, {
        onClick: S
      }), [h("div", {
        class: `${C}-resize-handle-line`
      }, null)]);
    };
  }
}), zQ = be({
  name: "HeaderRow",
  props: ["cells", "stickyOffsets", "flattenColumns", "rowComponent", "cellComponent", "index", "customHeaderRow"],
  setup(e) {
    const t = ua();
    return () => {
      const {
        prefixCls: n,
        direction: o
      } = t, {
        cells: i,
        stickyOffsets: r,
        flattenColumns: a,
        rowComponent: l,
        cellComponent: s,
        customHeaderRow: u,
        index: c
      } = e;
      let d;
      u && (d = u(i.map((p) => p.column), c));
      const f = rg(i.map((p) => p.column));
      return h(l, d, {
        default: () => [i.map((p, v) => {
          const {
            column: g
          } = p, m = Sx(p.colStart, p.colEnd, a, r, o);
          let x;
          g && g.customHeaderCell && (x = p.column.customHeaderCell(g));
          const S = g;
          return h(ag, Q(Q(Q({}, p), {}, {
            cellType: "header",
            ellipsis: g.ellipsis,
            align: g.align,
            component: s,
            prefixCls: n,
            key: f[v]
          }, m), {}, {
            additionalProps: x,
            rowType: "header",
            column: g
          }), {
            default: () => g.title,
            dragHandle: () => S.resizable ? h(NQ, {
              prefixCls: n,
              width: S.width,
              minWidth: S.minWidth,
              maxWidth: S.maxWidth,
              column: S
            }, null) : null
          });
        })]
      });
    };
  }
});
function BQ(e) {
  const t = [];
  function n(i, r) {
    let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
    t[a] = t[a] || [];
    let l = r;
    return i.filter(Boolean).map((u) => {
      const c = {
        key: u.key,
        class: _e(u.className, u.class),
        // children: column.title,
        column: u,
        colStart: l
      };
      let d = 1;
      const f = u.children;
      return f && f.length > 0 && (d = n(f, l, a + 1).reduce((p, v) => p + v, 0), c.hasSubColumns = !0), "colSpan" in u && ({
        colSpan: d
      } = u), "rowSpan" in u && (c.rowSpan = u.rowSpan), c.colSpan = d, c.colEnd = c.colStart + d - 1, t[a].push(c), l += d, d;
    });
  }
  n(e, 0);
  const o = t.length;
  for (let i = 0; i < o; i += 1)
    t[i].forEach((r) => {
      !("rowSpan" in r) && !r.hasSubColumns && (r.rowSpan = o - i);
    });
  return t;
}
const l$ = be({
  name: "TableHeader",
  inheritAttrs: !1,
  props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow"],
  setup(e) {
    const t = ua(), n = E(() => BQ(e.columns));
    return () => {
      const {
        prefixCls: o,
        getComponent: i
      } = t, {
        stickyOffsets: r,
        flattenColumns: a,
        customHeaderRow: l
      } = e, s = i(["header", "wrapper"], "thead"), u = i(["header", "row"], "tr"), c = i(["header", "cell"], "th");
      return h(s, {
        class: `${o}-thead`
      }, {
        default: () => [n.value.map((d, f) => h(zQ, {
          key: f,
          flattenColumns: a,
          cells: d,
          stickyOffsets: r,
          rowComponent: u,
          cellComponent: c,
          customHeaderRow: l,
          index: f
        }, null))]
      });
    };
  }
}), w2 = Symbol("ExpandedRowProps"), FQ = (e) => {
  Ft(w2, e);
}, LQ = () => zt(w2, {}), S2 = be({
  name: "ExpandedRow",
  inheritAttrs: !1,
  props: ["prefixCls", "component", "cellComponent", "expanded", "colSpan", "isEmpty"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const i = ua(), r = LQ(), {
      fixHeader: a,
      fixColumn: l,
      componentWidth: s,
      horizonScroll: u
    } = r;
    return () => {
      const {
        prefixCls: c,
        component: d,
        cellComponent: f,
        expanded: p,
        colSpan: v,
        isEmpty: g
      } = e;
      return h(d, {
        class: o.class,
        style: {
          display: p ? null : "none"
        }
      }, {
        default: () => [h(ag, {
          component: f,
          prefixCls: c,
          colSpan: v
        }, {
          default: () => {
            var m;
            let x = (m = n.default) === null || m === void 0 ? void 0 : m.call(n);
            return (g ? u.value : l.value) && (x = h("div", {
              style: {
                width: `${s.value - (a.value ? i.scrollbarSize : 0)}px`,
                position: "sticky",
                left: 0,
                overflow: "hidden"
              },
              class: `${c}-expanded-row-fixed`
            }, [x])), x;
          }
        })]
      });
    };
  }
}), HQ = be({
  name: "MeasureCell",
  props: ["columnKey"],
  setup(e, t) {
    let {
      emit: n
    } = t;
    const o = le();
    return At(() => {
      o.value && n("columnResize", e.columnKey, o.value.offsetWidth);
    }), () => h(Al, {
      onResize: (i) => {
        let {
          offsetWidth: r
        } = i;
        n("columnResize", e.columnKey, r);
      }
    }, {
      default: () => [h("td", {
        ref: o,
        style: {
          padding: 0,
          border: 0,
          height: 0
        }
      }, [h("div", {
        style: {
          height: 0,
          overflow: "hidden"
        }
      }, [Le(" ")])])]
    });
  }
}), C2 = Symbol("BodyContextProps"), VQ = (e) => {
  Ft(C2, e);
}, $2 = () => zt(C2, {}), jQ = be({
  name: "BodyRow",
  inheritAttrs: !1,
  props: ["record", "index", "renderIndex", "recordKey", "expandedKeys", "rowComponent", "cellComponent", "customRow", "rowExpandable", "indent", "rowKey", "getRowKey", "childrenColumnName"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const o = ua(), i = $2(), r = $e(!1), a = E(() => e.expandedKeys && e.expandedKeys.has(e.recordKey));
    It(() => {
      a.value && (r.value = !0);
    });
    const l = E(() => i.expandableType === "row" && (!e.rowExpandable || e.rowExpandable(e.record))), s = E(() => i.expandableType === "nest"), u = E(() => e.childrenColumnName && e.record && e.record[e.childrenColumnName]), c = E(() => l.value || s.value), d = (m, x) => {
      i.onTriggerExpand(m, x);
    }, f = E(() => {
      var m;
      return ((m = e.customRow) === null || m === void 0 ? void 0 : m.call(e, e.record, e.index)) || {};
    }), p = function(m) {
      var x, S;
      i.expandRowByClick && c.value && d(e.record, m);
      for (var C = arguments.length, P = new Array(C > 1 ? C - 1 : 0), $ = 1; $ < C; $++)
        P[$ - 1] = arguments[$];
      (S = (x = f.value) === null || x === void 0 ? void 0 : x.onClick) === null || S === void 0 || S.call(x, m, ...P);
    }, v = E(() => {
      const {
        record: m,
        index: x,
        indent: S
      } = e, {
        rowClassName: C
      } = i;
      return typeof C == "string" ? C : typeof C == "function" ? C(m, x, S) : "";
    }), g = E(() => rg(i.flattenColumns));
    return () => {
      const {
        class: m,
        style: x
      } = n, {
        record: S,
        index: C,
        rowKey: P,
        indent: $ = 0,
        rowComponent: I,
        cellComponent: w
      } = e, {
        prefixCls: M,
        fixedInfoList: _,
        transformCellText: N
      } = o, {
        flattenColumns: R,
        expandedRowClassName: H,
        indentSize: L,
        expandIcon: B,
        expandedRowRender: A,
        expandIconColumnIndex: G
      } = i, j = h(I, Q(Q({}, f.value), {}, {
        "data-row-key": P,
        class: _e(m, `${M}-row`, `${M}-row-level-${$}`, v.value, f.value.class),
        style: [x, f.value.style],
        onClick: p
      }), {
        default: () => [R.map((W, K) => {
          const {
            customRender: q,
            dataIndex: U,
            className: ae
          } = W, se = g[K], re = _[K];
          let ie;
          W.customCell && (ie = W.customCell(S, C, W));
          const te = K === (G || 0) && s.value ? h(Je, null, [h("span", {
            style: {
              paddingLeft: `${L * $}px`
            },
            class: `${M}-row-indent indent-level-${$}`
          }, null), B({
            prefixCls: M,
            expanded: a.value,
            expandable: u.value,
            record: S,
            onExpand: d
          })]) : null;
          return h(ag, Q(Q({
            cellType: "body",
            class: ae,
            ellipsis: W.ellipsis,
            align: W.align,
            component: w,
            prefixCls: M,
            key: se,
            record: S,
            index: C,
            renderIndex: e.renderIndex,
            dataIndex: U,
            customRender: q
          }, re), {}, {
            additionalProps: ie,
            column: W,
            transformCellText: N,
            appendNode: te
          }), null);
        })]
      });
      let Z;
      if (l.value && (r.value || a.value)) {
        const W = A({
          record: S,
          index: C,
          indent: $ + 1,
          expanded: a.value
        }), K = H && H(S, C, $);
        Z = h(S2, {
          expanded: a.value,
          class: _e(`${M}-expanded-row`, `${M}-expanded-row-level-${$ + 1}`, K),
          prefixCls: M,
          component: I,
          cellComponent: w,
          colSpan: R.length,
          isEmpty: !1
        }, {
          default: () => [W]
        });
      }
      return h(Je, null, [j, Z]);
    };
  }
});
function P2(e, t, n, o, i, r) {
  const a = [];
  a.push({
    record: e,
    indent: t,
    index: r
  });
  const l = i(e), s = o?.has(l);
  if (e && Array.isArray(e[n]) && s)
    for (let u = 0; u < e[n].length; u += 1) {
      const c = P2(e[n][u], t + 1, n, o, i, u);
      a.push(...c);
    }
  return a;
}
function WQ(e, t, n, o) {
  return E(() => {
    const r = t.value, a = n.value, l = e.value;
    if (a?.size) {
      const s = [];
      for (let u = 0; u < l?.length; u += 1) {
        const c = l[u];
        s.push(...P2(c, 0, r, a, o.value, u));
      }
      return s;
    }
    return l?.map((s, u) => ({
      record: s,
      indent: 0,
      index: u
    }));
  });
}
const O2 = Symbol("ResizeContextProps"), KQ = (e) => {
  Ft(O2, e);
}, qQ = () => zt(O2, {
  onColumnResize: () => {
  }
}), YQ = be({
  name: "TableBody",
  props: ["data", "getRowKey", "measureColumnWidth", "expandedKeys", "customRow", "rowExpandable", "childrenColumnName"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = qQ(), i = ua(), r = $2(), a = WQ(Kt(e, "data"), Kt(e, "childrenColumnName"), Kt(e, "expandedKeys"), Kt(e, "getRowKey")), l = $e(-1), s = $e(-1);
    let u;
    return MQ({
      startRow: l,
      endRow: s,
      onHover: (c, d) => {
        clearTimeout(u), u = setTimeout(() => {
          l.value = c, s.value = d;
        }, 100);
      }
    }), () => {
      var c;
      const {
        data: d,
        getRowKey: f,
        measureColumnWidth: p,
        expandedKeys: v,
        customRow: g,
        rowExpandable: m,
        childrenColumnName: x
      } = e, {
        onColumnResize: S
      } = o, {
        prefixCls: C,
        getComponent: P
      } = i, {
        flattenColumns: $
      } = r, I = P(["body", "wrapper"], "tbody"), w = P(["body", "row"], "tr"), M = P(["body", "cell"], "td");
      let _;
      d.length ? _ = a.value.map((R, H) => {
        const {
          record: L,
          indent: B,
          index: A
        } = R, G = f(L, H);
        return h(jQ, {
          key: G,
          rowKey: G,
          record: L,
          recordKey: G,
          index: H,
          renderIndex: A,
          rowComponent: w,
          cellComponent: M,
          expandedKeys: v,
          customRow: g,
          getRowKey: f,
          rowExpandable: m,
          childrenColumnName: x,
          indent: B
        }, null);
      }) : _ = h(S2, {
        expanded: !0,
        class: `${C}-placeholder`,
        prefixCls: C,
        component: w,
        cellComponent: M,
        colSpan: $.length,
        isEmpty: !0
      }, {
        default: () => [(c = n.emptyNode) === null || c === void 0 ? void 0 : c.call(n)]
      });
      const N = rg($);
      return h(I, {
        class: `${C}-tbody`
      }, {
        default: () => [p && h("tr", {
          "aria-hidden": "true",
          class: `${C}-measure-row`,
          style: {
            height: 0,
            fontSize: 0
          }
        }, [N.map((R) => h(HQ, {
          key: R,
          columnKey: R,
          onColumnResize: S
        }, null))]), _]
      });
    };
  }
}), Yr = {};
var GQ = 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 Db(e) {
  return e.reduce((t, n) => {
    const {
      fixed: o
    } = n, i = o === !0 ? "left" : o, r = n.children;
    return r && r.length > 0 ? [...t, ...Db(r).map((a) => O({
      fixed: i
    }, a))] : [...t, O(O({}, n), {
      fixed: i
    })];
  }, []);
}
function UQ(e) {
  let t = !0;
  for (let o = 0; o < e.length; o += 1) {
    const i = e[o];
    if (t && i.fixed !== "left")
      t = !1;
    else if (!t && i.fixed === "left") {
      wn(!1, `Index ${o - 1} of \`columns\` missing \`fixed='left'\` prop.`);
      break;
    }
  }
  let n = !0;
  for (let o = e.length - 1; o >= 0; o -= 1) {
    const i = e[o];
    if (n && i.fixed !== "right")
      n = !1;
    else if (!n && i.fixed === "right") {
      wn(!1, `Index ${o + 1} of \`columns\` missing \`fixed='right'\` prop.`);
      break;
    }
  }
}
function XQ(e) {
  return e.map((t) => {
    const {
      fixed: n
    } = t, o = GQ(t, ["fixed"]);
    let i = n;
    return n === "left" ? i = "right" : n === "right" && (i = "left"), O({
      fixed: i
    }, o);
  });
}
function QQ(e, t) {
  let {
    prefixCls: n,
    columns: o,
    // children,
    expandable: i,
    expandedKeys: r,
    getRowKey: a,
    onTriggerExpand: l,
    expandIcon: s,
    rowExpandable: u,
    expandIconColumnIndex: c,
    direction: d,
    expandRowByClick: f,
    expandColumnWidth: p,
    expandFixed: v
  } = e;
  const g = wx(), m = E(() => {
    if (i.value) {
      let C = o.value.slice();
      if (process.env.NODE_ENV !== "production" && c.value >= 0 && wn(!1, "`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead."), !C.includes(Yr)) {
        const L = c.value || 0;
        L >= 0 && C.splice(L, 0, Yr);
      }
      process.env.NODE_ENV !== "production" && C.filter((L) => L === Yr).length > 1 && wn(!1, "There exist more than one `EXPAND_COLUMN` in `columns`.");
      const P = C.indexOf(Yr);
      C = C.filter((L, B) => L !== Yr || B === P);
      const $ = o.value[P];
      let I;
      (v.value === "left" || v.value) && !c.value ? I = "left" : (v.value === "right" || v.value) && c.value === o.value.length ? I = "right" : I = $ ? $.fixed : null;
      const w = r.value, M = u.value, _ = s.value, N = n.value, R = f.value, H = {
        [zu]: {
          class: `${n.value}-expand-icon-col`,
          columnType: "EXPAND_COLUMN"
        },
        title: Dh(g.value, "expandColumnTitle", {}, () => [""]),
        fixed: I,
        class: `${n.value}-row-expand-icon-cell`,
        width: p.value,
        customRender: (L) => {
          let {
            record: B,
            index: A
          } = L;
          const G = a.value(B, A), j = w.has(G), Z = M ? M(B) : !0, W = _({
            prefixCls: N,
            expanded: j,
            expandable: Z,
            record: B,
            onExpand: l
          });
          return R ? h("span", {
            onClick: (K) => K.stopPropagation()
          }, [W]) : W;
        }
      };
      return C.map((L) => L === Yr ? H : L);
    }
    return process.env.NODE_ENV !== "production" && o.value.includes(Yr) && wn(!1, "`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`."), o.value.filter((C) => C !== Yr);
  }), x = E(() => {
    let C = m.value;
    return t.value && (C = t.value(C)), C.length || (C = [{
      customRender: () => null
    }]), C;
  }), S = E(() => d.value === "rtl" ? XQ(Db(x.value)) : Db(x.value));
  return process.env.NODE_ENV !== "production" && It(() => {
    setTimeout(() => {
      UQ(S.value);
    });
  }), [x, S];
}
function k2(e) {
  const t = $e(e);
  let n;
  const o = $e([]);
  function i(r) {
    o.value.push(r), Vt.cancel(n), n = Vt(() => {
      const a = o.value;
      o.value = [], a.forEach((l) => {
        t.value = l(t.value);
      });
    });
  }
  return qt(() => {
    Vt.cancel(n);
  }), [t, i];
}
function ZQ(e) {
  const t = le(null), n = le();
  function o() {
    clearTimeout(n.value);
  }
  function i(a) {
    t.value = a, o(), n.value = setTimeout(() => {
      t.value = null, n.value = void 0;
    }, 100);
  }
  function r() {
    return t.value;
  }
  return qt(() => {
    o();
  }), [i, r];
}
function JQ(e, t, n) {
  return E(() => {
    const i = [], r = [];
    let a = 0, l = 0;
    const s = e.value, u = t.value, c = n.value;
    for (let d = 0; d < u; d += 1)
      if (c === "rtl") {
        r[d] = l, l += s[d] || 0;
        const f = u - d - 1;
        i[f] = a, a += s[f] || 0;
      } else {
        i[d] = a, a += s[d] || 0;
        const f = u - d - 1;
        r[f] = l, l += s[f] || 0;
      }
    return {
      left: i,
      right: r
    };
  });
}
var eZ = 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 I2(e) {
  let {
    colWidths: t,
    columns: n,
    columCount: o
  } = e;
  const i = [], r = o || n.length;
  let a = !1;
  for (let l = r - 1; l >= 0; l -= 1) {
    const s = t[l], u = n && n[l], c = u && u[zu];
    if (s || c || a) {
      const d = c || {}, {
        columnType: f
      } = d, p = eZ(d, ["columnType"]);
      i.unshift(h("col", Q({
        key: l,
        style: {
          width: typeof s == "number" ? `${s}px` : s
        }
      }, p), null)), a = !0;
    }
  }
  return h("colgroup", null, [i]);
}
function Ab(e, t) {
  let {
    slots: n
  } = t;
  var o;
  return h("div", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
}
Ab.displayName = "Panel";
let tZ = 0;
const nZ = be({
  name: "TableSummary",
  props: ["fixed"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = ua(), i = `table-summary-uni-key-${++tZ}`, r = E(() => e.fixed === "" || e.fixed);
    return It(() => {
      o.summaryCollect(i, r.value);
    }), qt(() => {
      o.summaryCollect(i, !1);
    }), () => {
      var a;
      return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
    };
  }
}), oZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATableSummaryRow",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("tr", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
    };
  }
}), M2 = Symbol("SummaryContextProps"), iZ = (e) => {
  Ft(M2, e);
}, rZ = () => zt(M2, {}), aZ = be({
  name: "ATableSummaryCell",
  props: ["index", "colSpan", "rowSpan", "align"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = ua(), r = rZ();
    return () => {
      const {
        index: a,
        colSpan: l = 1,
        rowSpan: s,
        align: u
      } = e, {
        prefixCls: c,
        direction: d
      } = i, {
        scrollColumnIndex: f,
        stickyOffsets: p,
        flattenColumns: v
      } = r, m = a + l - 1 + 1 === f ? l + 1 : l, x = Sx(a, a + m - 1, v, p, d);
      return h(ag, Q({
        class: n.class,
        index: a,
        component: "td",
        prefixCls: c,
        record: null,
        dataIndex: null,
        align: u,
        colSpan: m,
        rowSpan: s,
        customRender: () => {
          var S;
          return (S = o.default) === null || S === void 0 ? void 0 : S.call(o);
        }
      }, x), null);
    };
  }
}), zf = be({
  name: "TableFooter",
  inheritAttrs: !1,
  props: ["stickyOffsets", "flattenColumns"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = ua();
    return iZ($n({
      stickyOffsets: Kt(e, "stickyOffsets"),
      flattenColumns: Kt(e, "flattenColumns"),
      scrollColumnIndex: E(() => {
        const i = e.flattenColumns.length - 1, r = e.flattenColumns[i];
        return r?.scrollbar ? i : null;
      })
    })), () => {
      var i;
      const {
        prefixCls: r
      } = o;
      return h("tfoot", {
        class: `${r}-summary`
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
    };
  }
}), lZ = nZ;
function sZ(e) {
  let {
    prefixCls: t,
    record: n,
    onExpand: o,
    expanded: i,
    expandable: r
  } = e;
  const a = `${t}-row-expand-icon`;
  if (!r)
    return h("span", {
      class: [a, `${t}-row-spaced`]
    }, null);
  const l = (s) => {
    o(n, s), s.stopPropagation();
  };
  return h("span", {
    class: {
      [a]: !0,
      [`${t}-row-expanded`]: i,
      [`${t}-row-collapsed`]: !i
    },
    onClick: l
  }, null);
}
function uZ(e, t, n) {
  const o = [];
  function i(r) {
    (r || []).forEach((a, l) => {
      o.push(t(a, l)), i(a[n]);
    });
  }
  return i(e), o;
}
const cZ = be({
  name: "StickyScrollBar",
  inheritAttrs: !1,
  props: ["offsetScroll", "container", "scrollBodyRef", "scrollBodySizeInfo"],
  emits: ["scroll"],
  setup(e, t) {
    let {
      emit: n,
      expose: o
    } = t;
    const i = ua(), r = $e(0), a = $e(0), l = $e(0);
    It(() => {
      r.value = e.scrollBodySizeInfo.scrollWidth || 0, a.value = e.scrollBodySizeInfo.clientWidth || 0, l.value = r.value && a.value * (a.value / r.value);
    }, {
      flush: "post"
    });
    const s = $e(), [u, c] = k2({
      scrollLeft: 0,
      isHiddenScrollBar: !0
    }), d = le({
      delta: 0,
      x: 0
    }), f = $e(!1), p = () => {
      f.value = !1;
    }, v = (w) => {
      d.value = {
        delta: w.pageX - u.value.scrollLeft,
        x: 0
      }, f.value = !0, w.preventDefault();
    }, g = (w) => {
      const {
        buttons: M
      } = w || window?.event;
      if (!f.value || M === 0) {
        f.value && (f.value = !1);
        return;
      }
      let _ = d.value.x + w.pageX - d.value.x - d.value.delta;
      _ <= 0 && (_ = 0), _ + l.value >= a.value && (_ = a.value - l.value), n("scroll", {
        scrollLeft: _ / a.value * (r.value + 2)
      }), d.value.x = w.pageX;
    }, m = () => {
      if (!e.scrollBodyRef.value)
        return;
      const w = W1(e.scrollBodyRef.value).top, M = w + e.scrollBodyRef.value.offsetHeight, _ = e.container === window ? document.documentElement.scrollTop + window.innerHeight : W1(e.container).top + e.container.clientHeight;
      M - Rp() <= _ || w >= _ - e.offsetScroll ? c((N) => O(O({}, N), {
        isHiddenScrollBar: !0
      })) : c((N) => O(O({}, N), {
        isHiddenScrollBar: !1
      }));
    };
    o({
      setScrollLeft: (w) => {
        c((M) => O(O({}, M), {
          scrollLeft: w / r.value * a.value || 0
        }));
      }
    });
    let S = null, C = null, P = null, $ = null;
    At(() => {
      S = Ho(document.body, "mouseup", p, !1), C = Ho(document.body, "mousemove", g, !1), P = Ho(window, "resize", m, !1);
    }), DP(() => {
      Yt(() => {
        m();
      });
    }), At(() => {
      setTimeout(() => {
        Ie([l, f], () => {
          m();
        }, {
          immediate: !0,
          flush: "post"
        });
      });
    }), Ie(() => e.container, () => {
      $?.remove(), $ = Ho(e.container, "scroll", m, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), qt(() => {
      S?.remove(), C?.remove(), $?.remove(), P?.remove();
    }), Ie(() => O({}, u.value), (w, M) => {
      w.isHiddenScrollBar !== M?.isHiddenScrollBar && !w.isHiddenScrollBar && c((_) => {
        const N = e.scrollBodyRef.value;
        return N ? O(O({}, _), {
          scrollLeft: N.scrollLeft / N.scrollWidth * N.clientWidth
        }) : _;
      });
    }, {
      immediate: !0
    });
    const I = Rp();
    return () => {
      if (r.value <= a.value || !l.value || u.value.isHiddenScrollBar)
        return null;
      const {
        prefixCls: w
      } = i;
      return h("div", {
        style: {
          height: `${I}px`,
          width: `${a.value}px`,
          bottom: `${e.offsetScroll}px`
        },
        class: `${w}-sticky-scroll`
      }, [h("div", {
        onMousedown: v,
        ref: s,
        class: _e(`${w}-sticky-scroll-bar`, {
          [`${w}-sticky-scroll-bar-active`]: f.value
        }),
        style: {
          width: `${l.value}px`,
          transform: `translate3d(${u.value.scrollLeft}px, 0, 0)`
        }
      }, null)]);
    };
  }
}), s$ = xi() ? window : null;
function dZ(e, t) {
  return E(() => {
    const {
      offsetHeader: n = 0,
      offsetSummary: o = 0,
      offsetScroll: i = 0,
      getContainer: r = () => s$
    } = typeof e.value == "object" ? e.value : {}, a = r() || s$, l = !!e.value;
    return {
      isSticky: l,
      stickyClassName: l ? `${t.value}-sticky-holder` : "",
      offsetHeader: n,
      offsetSummary: o,
      offsetScroll: i,
      container: a
    };
  });
}
function fZ(e, t) {
  return E(() => {
    const n = [], o = e.value, i = t.value;
    for (let r = 0; r < i; r += 1) {
      const a = o[r];
      if (a !== void 0)
        n[r] = a;
      else
        return null;
    }
    return n;
  });
}
const u$ = be({
  name: "FixedHolder",
  inheritAttrs: !1,
  props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow", "noData", "maxContentScroll", "colWidths", "columCount", "direction", "fixHeader", "stickyTopOffset", "stickyBottomOffset", "stickyClassName"],
  emits: ["scroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i
    } = t;
    const r = ua(), a = E(() => r.isSticky && !e.fixHeader ? 0 : r.scrollbarSize), l = le(), s = (g) => {
      const {
        currentTarget: m,
        deltaX: x
      } = g;
      x && (i("scroll", {
        currentTarget: m,
        scrollLeft: m.scrollLeft + x
      }), g.preventDefault());
    }, u = le();
    At(() => {
      Yt(() => {
        u.value = Ho(l.value, "wheel", s);
      });
    }), qt(() => {
      var g;
      (g = u.value) === null || g === void 0 || g.remove();
    });
    const c = E(() => e.flattenColumns.every((g) => g.width && g.width !== 0 && g.width !== "0px")), d = le([]), f = le([]);
    It(() => {
      const g = e.flattenColumns[e.flattenColumns.length - 1], m = {
        fixed: g ? g.fixed : null,
        scrollbar: !0,
        customHeaderCell: () => ({
          class: `${r.prefixCls}-cell-scrollbar`
        })
      };
      d.value = a.value ? [...e.columns, m] : e.columns, f.value = a.value ? [...e.flattenColumns, m] : e.flattenColumns;
    });
    const p = E(() => {
      const {
        stickyOffsets: g,
        direction: m
      } = e, {
        right: x,
        left: S
      } = g;
      return O(O({}, g), {
        left: m === "rtl" ? [...S.map((C) => C + a.value), 0] : S,
        right: m === "rtl" ? x : [...x.map((C) => C + a.value), 0],
        isSticky: r.isSticky
      });
    }), v = fZ(Kt(e, "colWidths"), Kt(e, "columCount"));
    return () => {
      var g;
      const {
        noData: m,
        columCount: x,
        stickyTopOffset: S,
        stickyBottomOffset: C,
        stickyClassName: P,
        maxContentScroll: $
      } = e, {
        isSticky: I
      } = r;
      return h("div", {
        style: O({
          overflow: "hidden"
        }, I ? {
          top: `${S}px`,
          bottom: `${C}px`
        } : {}),
        ref: l,
        class: _e(n.class, {
          [P]: !!P
        })
      }, [h("table", {
        style: {
          tableLayout: "fixed",
          visibility: m || v.value ? null : "hidden"
        }
      }, [(!m || !$ || c.value) && h(I2, {
        colWidths: v.value ? [...v.value, a.value] : [],
        columCount: x + 1,
        columns: f.value
      }, null), (g = o.default) === null || g === void 0 ? void 0 : g.call(o, O(O({}, e), {
        stickyOffsets: p.value,
        columns: d.value,
        flattenColumns: f.value
      }))])]);
    };
  }
});
function c$(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(RE(n.map((i) => [i, Kt(e, i)])));
}
const pZ = [], hZ = {}, Rb = "rc-table-internal-hook", gZ = be({
  name: "VcTable",
  inheritAttrs: !1,
  props: ["prefixCls", "data", "columns", "rowKey", "tableLayout", "scroll", "rowClassName", "title", "footer", "id", "showHeader", "components", "customRow", "customHeaderRow", "direction", "expandFixed", "expandColumnWidth", "expandedRowKeys", "defaultExpandedRowKeys", "expandedRowRender", "expandRowByClick", "expandIcon", "onExpand", "onExpandedRowsChange", "onUpdate:expandedRowKeys", "defaultExpandAllRows", "indentSize", "expandIconColumnIndex", "expandedRowClassName", "childrenColumnName", "rowExpandable", "sticky", "transformColumns", "internalHooks", "internalRefs", "canExpandable", "onUpdateInternalRefs", "transformCellText"],
  emits: ["expand", "expandedRowsChange", "updateInternalRefs", "update:expandedRowKeys"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i
    } = t;
    const r = E(() => e.data || pZ), a = E(() => !!r.value.length), l = E(() => PQ(e.components, {})), s = (Ce, Ae) => m2(l.value, Ce) || Ae, u = E(() => {
      const Ce = e.rowKey;
      return typeof Ce == "function" ? Ce : (Ae) => {
        const qe = Ae && Ae[Ce];
        return process.env.NODE_ENV !== "production" && wn(qe !== void 0, "Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key."), qe;
      };
    }), c = E(() => e.expandIcon || sZ), d = E(() => e.childrenColumnName || "children"), f = E(() => e.expandedRowRender ? "row" : e.canExpandable || r.value.some((Ce) => Ce && typeof Ce == "object" && Ce[d.value]) ? "nest" : !1), p = $e([]);
    It(() => {
      e.defaultExpandedRowKeys && (p.value = e.defaultExpandedRowKeys), e.defaultExpandAllRows && (p.value = uZ(r.value, u.value, d.value));
    })();
    const g = E(() => new Set(e.expandedRowKeys || p.value || [])), m = (Ce) => {
      const Ae = u.value(Ce, r.value.indexOf(Ce));
      let qe;
      const We = g.value.has(Ae);
      We ? (g.value.delete(Ae), qe = [...g.value]) : qe = [...g.value, Ae], p.value = qe, i("expand", !We, Ce), i("update:expandedRowKeys", qe), i("expandedRowsChange", qe);
    };
    process.env.NODE_ENV !== "production" && e.expandedRowRender && r.value.some((Ce) => Array.isArray(Ce?.[d.value])) && wn(!1, "`expandedRowRender` should not use with nested Table");
    const x = le(0), [S, C] = QQ(O(O({}, ys(e)), {
      // children,
      expandable: E(() => !!e.expandedRowRender),
      expandedKeys: g,
      getRowKey: u,
      onTriggerExpand: m,
      expandIcon: c
    }), E(() => e.internalHooks === Rb ? e.transformColumns : null)), P = E(() => ({
      columns: S.value,
      flattenColumns: C.value
    })), $ = le(), I = le(), w = le(), M = le({
      scrollWidth: 0,
      clientWidth: 0
    }), _ = le(), [N, R] = Cn(!1), [H, L] = Cn(!1), [B, A] = k2(/* @__PURE__ */ new Map()), G = E(() => rg(C.value)), j = E(() => G.value.map((Ce) => B.value.get(Ce))), Z = E(() => C.value.length), W = JQ(j, Z, Kt(e, "direction")), K = E(() => e.scroll && _b(e.scroll.y)), q = E(() => e.scroll && _b(e.scroll.x) || !!e.expandFixed), U = E(() => q.value && C.value.some((Ce) => {
      let {
        fixed: Ae
      } = Ce;
      return Ae;
    })), ae = le(), se = dZ(Kt(e, "sticky"), Kt(e, "prefixCls")), re = $n({}), ie = E(() => {
      const Ce = Object.values(re)[0];
      return (K.value || se.value.isSticky) && Ce;
    }), te = (Ce, Ae) => {
      Ae ? re[Ce] = Ae : delete re[Ce];
    }, ve = le({}), ce = le({}), fe = le({});
    It(() => {
      K.value && (ce.value = {
        overflowY: "scroll",
        maxHeight: cs(e.scroll.y)
      }), q.value && (ve.value = {
        overflowX: "auto"
      }, K.value || (ce.value = {
        overflowY: "hidden"
      }), fe.value = {
        width: e.scroll.x === !0 ? "auto" : cs(e.scroll.x),
        minWidth: "100%"
      });
    });
    const ge = (Ce, Ae) => {
      Ah($.value) && A((qe) => {
        if (qe.get(Ce) !== Ae) {
          const We = new Map(qe);
          return We.set(Ce, Ae), We;
        }
        return qe;
      });
    }, [Me, ze] = ZQ();
    function Ke(Ce, Ae) {
      if (!Ae)
        return;
      if (typeof Ae == "function") {
        Ae(Ce);
        return;
      }
      const qe = Ae.$el || Ae;
      qe.scrollLeft !== Ce && (qe.scrollLeft = Ce);
    }
    const He = (Ce) => {
      let {
        currentTarget: Ae,
        scrollLeft: qe
      } = Ce;
      var We;
      const tt = e.direction === "rtl", Ee = typeof qe == "number" ? qe : Ae.scrollLeft, Ne = Ae || hZ;
      if ((!ze() || ze() === Ne) && (Me(Ne), Ke(Ee, I.value), Ke(Ee, w.value), Ke(Ee, _.value), Ke(Ee, (We = ae.value) === null || We === void 0 ? void 0 : We.setScrollLeft)), Ae) {
        const {
          scrollWidth: Fe,
          clientWidth: it
        } = Ae;
        tt ? (R(-Ee < Fe - it), L(-Ee > 0)) : (R(Ee > 0), L(Ee < Fe - it));
      }
    }, Re = () => {
      q.value && w.value ? He({
        currentTarget: w.value
      }) : (R(!1), L(!1));
    };
    let Xe;
    const De = (Ce) => {
      Ce !== x.value && (Re(), x.value = $.value ? $.value.offsetWidth : Ce);
    }, Be = (Ce) => {
      let {
        width: Ae
      } = Ce;
      if (clearTimeout(Xe), x.value === 0) {
        De(Ae);
        return;
      }
      Xe = setTimeout(() => {
        De(Ae);
      }, 100);
    };
    Ie([q, () => e.data, () => e.columns], () => {
      q.value && Re();
    }, {
      flush: "post"
    });
    const [Ve, ot] = Cn(0);
    _Q(), At(() => {
      Yt(() => {
        var Ce, Ae;
        Re(), ot(g5(w.value).width), M.value = {
          scrollWidth: ((Ce = w.value) === null || Ce === void 0 ? void 0 : Ce.scrollWidth) || 0,
          clientWidth: ((Ae = w.value) === null || Ae === void 0 ? void 0 : Ae.clientWidth) || 0
        };
      });
    }), Ya(() => {
      Yt(() => {
        var Ce, Ae;
        const qe = ((Ce = w.value) === null || Ce === void 0 ? void 0 : Ce.scrollWidth) || 0, We = ((Ae = w.value) === null || Ae === void 0 ? void 0 : Ae.clientWidth) || 0;
        (M.value.scrollWidth !== qe || M.value.clientWidth !== We) && (M.value = {
          scrollWidth: qe,
          clientWidth: We
        });
      });
    }), It(() => {
      e.internalHooks === Rb && e.internalRefs && e.onUpdateInternalRefs({
        body: w.value ? w.value.$el || w.value : null
      });
    }, {
      flush: "post"
    });
    const je = E(() => e.tableLayout ? e.tableLayout : U.value ? e.scroll.x === "max-content" ? "auto" : "fixed" : K.value || se.value.isSticky || C.value.some((Ce) => {
      let {
        ellipsis: Ae
      } = Ce;
      return Ae;
    }) ? "fixed" : "auto"), Pe = () => {
      var Ce;
      return a.value ? null : ((Ce = o.emptyText) === null || Ce === void 0 ? void 0 : Ce.call(o)) || "No Data";
    };
    CQ($n(O(O({}, ys(c$(e, "prefixCls", "direction", "transformCellText"))), {
      getComponent: s,
      scrollbarSize: Ve,
      fixedInfoList: E(() => C.value.map((Ce, Ae) => Sx(Ae, Ae, C.value, W.value, e.direction))),
      isSticky: E(() => se.value.isSticky),
      summaryCollect: te
    }))), VQ($n(O(O({}, ys(c$(e, "rowClassName", "expandedRowClassName", "expandRowByClick", "expandedRowRender", "expandIconColumnIndex", "indentSize"))), {
      columns: S,
      flattenColumns: C,
      tableLayout: je,
      expandIcon: c,
      expandableType: f,
      onTriggerExpand: m
    }))), KQ({
      onColumnResize: ge
    }), FQ({
      componentWidth: x,
      fixHeader: K,
      fixColumn: U,
      horizonScroll: q
    });
    const Ge = () => h(YQ, {
      data: r.value,
      measureColumnWidth: K.value || q.value || se.value.isSticky,
      expandedKeys: g.value,
      rowExpandable: e.rowExpandable,
      getRowKey: u.value,
      customRow: e.customRow,
      childrenColumnName: d.value
    }, {
      emptyNode: Pe
    }), Se = () => h(I2, {
      colWidths: C.value.map((Ce) => {
        let {
          width: Ae
        } = Ce;
        return Ae;
      }),
      columns: C.value
    }, null);
    return () => {
      var Ce;
      const {
        prefixCls: Ae,
        scroll: qe,
        tableLayout: We,
        direction: tt,
        // Additional Part
        title: Ee = o.title,
        footer: Ne = o.footer,
        // Customize
        id: Fe,
        showHeader: it,
        customHeaderRow: pt
      } = e, {
        isSticky: at,
        offsetHeader: ft,
        offsetSummary: wt,
        offsetScroll: Ct,
        stickyClassName: St,
        container: bt
      } = se.value, Ot = s(["table"], "table"), Wt = s(["body"]), Xt = (Ce = o.summary) === null || Ce === void 0 ? void 0 : Ce.call(o, {
        pageData: r.value
      });
      let ln = () => null;
      const pn = {
        colWidths: j.value,
        columCount: C.value.length,
        stickyOffsets: W.value,
        customHeaderRow: pt,
        fixHeader: K.value,
        scroll: qe
      };
      if (process.env.NODE_ENV !== "production" && typeof Wt == "function" && a.value && !K.value && wn(!1, "`components.body` with render props is only work on `scroll.y`."), K.value || at) {
        let hn = () => null;
        typeof Wt == "function" ? (hn = () => Wt(r.value, {
          scrollbarSize: Ve.value,
          ref: w,
          onScroll: He
        }), pn.colWidths = C.value.map((lo, Uo) => {
          let {
            width: Ue
          } = lo;
          const ht = Uo === S.value.length - 1 ? Ue - Ve.value : Ue;
          return typeof ht == "number" && !Number.isNaN(ht) ? ht : (wn(!1, "When use `components.body` with render props. Each column should have a fixed `width` value."), 0);
        })) : hn = () => h("div", {
          style: O(O({}, ve.value), ce.value),
          onScroll: He,
          ref: w,
          class: _e(`${Ae}-body`)
        }, [h(Ot, {
          style: O(O({}, fe.value), {
            tableLayout: je.value
          })
        }, {
          default: () => [Se(), Ge(), !ie.value && Xt && h(zf, {
            stickyOffsets: W.value,
            flattenColumns: C.value
          }, {
            default: () => [Xt]
          })]
        })]);
        const Wn = O(O(O({
          noData: !r.value.length,
          maxContentScroll: q.value && qe.x === "max-content"
        }, pn), P.value), {
          direction: tt,
          stickyClassName: St,
          onScroll: He
        });
        ln = () => h(Je, null, [it !== !1 && h(u$, Q(Q({}, Wn), {}, {
          stickyTopOffset: ft,
          class: `${Ae}-header`,
          ref: I
        }), {
          default: (lo) => h(Je, null, [h(l$, lo, null), ie.value === "top" && h(zf, lo, {
            default: () => [Xt]
          })])
        }), hn(), ie.value && ie.value !== "top" && h(u$, Q(Q({}, Wn), {}, {
          stickyBottomOffset: wt,
          class: `${Ae}-summary`,
          ref: _
        }), {
          default: (lo) => h(zf, lo, {
            default: () => [Xt]
          })
        }), at && w.value && h(cZ, {
          ref: ae,
          offsetScroll: Ct,
          scrollBodyRef: w,
          onScroll: He,
          container: bt,
          scrollBodySizeInfo: M.value
        }, null)]);
      } else
        ln = () => h("div", {
          style: O(O({}, ve.value), ce.value),
          class: _e(`${Ae}-content`),
          onScroll: He,
          ref: w
        }, [h(Ot, {
          style: O(O({}, fe.value), {
            tableLayout: je.value
          })
        }, {
          default: () => [Se(), it !== !1 && h(l$, Q(Q({}, pn), P.value), null), Ge(), Xt && h(zf, {
            stickyOffsets: W.value,
            flattenColumns: C.value
          }, {
            default: () => [Xt]
          })]
        })]);
      const gt = Fs(n, {
        aria: !0,
        data: !0
      }), En = () => h("div", Q(Q({}, gt), {}, {
        class: _e(Ae, {
          [`${Ae}-rtl`]: tt === "rtl",
          [`${Ae}-ping-left`]: N.value,
          [`${Ae}-ping-right`]: H.value,
          [`${Ae}-layout-fixed`]: We === "fixed",
          [`${Ae}-fixed-header`]: K.value,
          /** No used but for compatible */
          [`${Ae}-fixed-column`]: U.value,
          [`${Ae}-scroll-horizontal`]: q.value,
          [`${Ae}-has-fix-left`]: C.value[0] && C.value[0].fixed,
          [`${Ae}-has-fix-right`]: C.value[Z.value - 1] && C.value[Z.value - 1].fixed === "right",
          [n.class]: n.class
        }),
        style: n.style,
        id: Fe,
        ref: $
      }), [Ee && h(Ab, {
        class: `${Ae}-title`
      }, {
        default: () => [Ee(r.value)]
      }), h("div", {
        class: `${Ae}-container`
      }, [ln()]), Ne && h(Ab, {
        class: `${Ae}-footer`
      }, {
        default: () => [Ne(r.value)]
      })]);
      return q.value ? h(Al, {
        onResize: Be
      }, {
        default: En
      }) : En();
    };
  }
});
function vZ() {
  const e = O({}, arguments.length <= 0 ? void 0 : arguments[0]);
  for (let t = 1; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    n && Object.keys(n).forEach((o) => {
      const i = n[o];
      i !== void 0 && (e[o] = i);
    });
  }
  return e;
}
const Nb = 10;
function mZ(e, t) {
  const n = {
    current: e.current,
    pageSize: e.pageSize
  };
  return Object.keys(t && typeof t == "object" ? t : {}).forEach((i) => {
    const r = e[i];
    typeof r != "function" && (n[i] = r);
  }), n;
}
function bZ(e, t, n) {
  const o = E(() => t.value && typeof t.value == "object" ? t.value : {}), i = E(() => o.value.total || 0), [r, a] = Cn(() => ({
    current: "defaultCurrent" in o.value ? o.value.defaultCurrent : 1,
    pageSize: "defaultPageSize" in o.value ? o.value.defaultPageSize : Nb
  })), l = E(() => {
    const c = vZ(r.value, o.value, {
      total: i.value > 0 ? i.value : e.value
    }), d = Math.ceil((i.value || e.value) / c.pageSize);
    return c.current > d && (c.current = d || 1), c;
  }), s = (c, d) => {
    t.value !== !1 && a({
      current: c ?? 1,
      pageSize: d || l.value.pageSize
    });
  }, u = (c, d) => {
    var f, p;
    t.value && ((p = (f = o.value).onChange) === null || p === void 0 || p.call(f, c, d)), s(c, d), n(c, d || l.value.pageSize);
  };
  return [E(() => t.value === !1 ? {} : O(O({}, l.value), {
    onChange: u
  })), s];
}
function yZ(e, t, n) {
  const o = $e({});
  Ie([e, t, n], () => {
    const r = /* @__PURE__ */ new Map(), a = n.value, l = t.value;
    function s(u) {
      u.forEach((c, d) => {
        const f = a(c, d);
        r.set(f, c), c && typeof c == "object" && l in c && s(c[l] || []);
      });
    }
    s(e.value), o.value = {
      kvMap: r
    };
  }, {
    deep: !0,
    immediate: !0
  });
  function i(r) {
    return o.value.kvMap.get(r);
  }
  return [i];
}
const vr = {}, zb = "SELECT_ALL", Bb = "SELECT_INVERT", Fb = "SELECT_NONE", xZ = [];
function T2(e, t) {
  let n = [];
  return (t || []).forEach((o) => {
    n.push(o), o && typeof o == "object" && e in o && (n = [...n, ...T2(e, o[e])]);
  }), n;
}
function wZ(e, t) {
  const n = E(() => {
    const _ = e.value || {}, {
      checkStrictly: N = !0
    } = _;
    return O(O({}, _), {
      checkStrictly: N
    });
  }), [o, i] = li(n.value.selectedRowKeys || n.value.defaultSelectedRowKeys || xZ, {
    value: E(() => n.value.selectedRowKeys)
  }), r = $e(/* @__PURE__ */ new Map()), a = (_) => {
    if (n.value.preserveSelectedRowKeys) {
      const N = /* @__PURE__ */ new Map();
      _.forEach((R) => {
        let H = t.getRecordByKey(R);
        !H && r.value.has(R) && (H = r.value.get(R)), N.set(R, H);
      }), r.value = N;
    }
  };
  It(() => {
    a(o.value);
  });
  const l = E(() => n.value.checkStrictly ? null : tx(t.data.value, {
    externalGetKey: t.getRowKey.value,
    childrenPropName: t.childrenColumnName.value
  }).keyEntities), s = E(() => T2(t.childrenColumnName.value, t.pageData.value)), u = E(() => {
    const _ = /* @__PURE__ */ new Map(), N = t.getRowKey.value, R = n.value.getCheckboxProps;
    return s.value.forEach((H, L) => {
      const B = N(H, L), A = (R ? R(H) : null) || {};
      _.set(B, A), process.env.NODE_ENV !== "production" && ("checked" in A || "defaultChecked" in A) && dn(!1, "Table", "Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.");
    }), _;
  }), {
    maxLevel: c,
    levelEntities: d
  } = QT(l), f = (_) => {
    var N;
    return !!(!((N = u.value.get(t.getRowKey.value(_))) === null || N === void 0) && N.disabled);
  }, p = E(() => {
    if (n.value.checkStrictly)
      return [o.value || [], []];
    const {
      checkedKeys: _,
      halfCheckedKeys: N
    } = Ru(o.value, !0, l.value, c.value, d.value, f);
    return [_ || [], N];
  }), v = E(() => p.value[0]), g = E(() => p.value[1]), m = E(() => {
    const _ = n.value.type === "radio" ? v.value.slice(0, 1) : v.value;
    return new Set(_);
  }), x = E(() => n.value.type === "radio" ? /* @__PURE__ */ new Set() : new Set(g.value)), [S, C] = Cn(null), P = (_) => {
    let N, R;
    a(_);
    const {
      preserveSelectedRowKeys: H,
      onChange: L
    } = n.value, {
      getRecordByKey: B
    } = t;
    H ? (N = _, R = _.map((A) => r.value.get(A))) : (N = [], R = [], _.forEach((A) => {
      const G = B(A);
      G !== void 0 && (N.push(A), R.push(G));
    })), i(N), L?.(N, R);
  }, $ = (_, N, R, H) => {
    const {
      onSelect: L
    } = n.value, {
      getRecordByKey: B
    } = t || {};
    if (L) {
      const A = R.map((G) => B(G));
      L(B(_), N, A, H);
    }
    P(R);
  }, I = E(() => {
    const {
      onSelectInvert: _,
      onSelectNone: N,
      selections: R,
      hideSelectAll: H
    } = n.value, {
      data: L,
      pageData: B,
      getRowKey: A,
      locale: G
    } = t;
    return !R || H ? null : (R === !0 ? [zb, Bb, Fb] : R).map((Z) => Z === zb ? {
      key: "all",
      text: G.value.selectionAll,
      onSelect() {
        P(L.value.map((W, K) => A.value(W, K)).filter((W) => {
          const K = u.value.get(W);
          return !K?.disabled || m.value.has(W);
        }));
      }
    } : Z === Bb ? {
      key: "invert",
      text: G.value.selectInvert,
      onSelect() {
        const W = new Set(m.value);
        B.value.forEach((q, U) => {
          const ae = A.value(q, U), se = u.value.get(ae);
          se?.disabled || (W.has(ae) ? W.delete(ae) : W.add(ae));
        });
        const K = Array.from(W);
        _ && (dn(!1, "Table", "`onSelectInvert` will be removed in future. Please use `onChange` instead."), _(K)), P(K);
      }
    } : Z === Fb ? {
      key: "none",
      text: G.value.selectNone,
      onSelect() {
        N?.(), P(Array.from(m.value).filter((W) => {
          const K = u.value.get(W);
          return K?.disabled;
        }));
      }
    } : Z);
  }), w = E(() => s.value.length);
  return [(_) => {
    var N;
    const {
      onSelectAll: R,
      onSelectMultiple: H,
      columnWidth: L,
      type: B,
      fixed: A,
      renderCell: G,
      hideSelectAll: j,
      checkStrictly: Z
    } = n.value, {
      prefixCls: W,
      getRecordByKey: K,
      getRowKey: q,
      expandType: U,
      getPopupContainer: ae
    } = t;
    if (!e.value)
      return process.env.NODE_ENV !== "production" && dn(!_.includes(vr), "Table", "`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`."), _.filter((De) => De !== vr);
    let se = _.slice();
    const re = new Set(m.value), ie = s.value.map(q.value).filter((De) => !u.value.get(De).disabled), te = ie.every((De) => re.has(De)), ve = ie.some((De) => re.has(De)), ce = () => {
      const De = [];
      te ? ie.forEach((Ve) => {
        re.delete(Ve), De.push(Ve);
      }) : ie.forEach((Ve) => {
        re.has(Ve) || (re.add(Ve), De.push(Ve));
      });
      const Be = Array.from(re);
      R?.(!te, Be.map((Ve) => K(Ve)), De.map((Ve) => K(Ve))), P(Be);
    };
    let fe;
    if (B !== "radio") {
      let De;
      if (I.value) {
        const Pe = h(co, {
          getPopupContainer: ae.value
        }, {
          default: () => [I.value.map((Ge, Se) => {
            const {
              key: Ce,
              text: Ae,
              onSelect: qe
            } = Ge;
            return h(co.Item, {
              key: Ce || Se,
              onClick: () => {
                qe?.(ie);
              }
            }, {
              default: () => [Ae]
            });
          })]
        });
        De = h("div", {
          class: `${W.value}-selection-extra`
        }, [h(_i, {
          overlay: Pe,
          getPopupContainer: ae.value
        }, {
          default: () => [h("span", null, [h(Nd, null, null)])]
        })]);
      }
      const Be = s.value.map((Pe, Ge) => {
        const Se = q.value(Pe, Ge), Ce = u.value.get(Se) || {};
        return O({
          checked: re.has(Se)
        }, Ce);
      }).filter((Pe) => {
        let {
          disabled: Ge
        } = Pe;
        return Ge;
      }), Ve = !!Be.length && Be.length === w.value, ot = Ve && Be.every((Pe) => {
        let {
          checked: Ge
        } = Pe;
        return Ge;
      }), je = Ve && Be.some((Pe) => {
        let {
          checked: Ge
        } = Pe;
        return Ge;
      });
      fe = !j && h("div", {
        class: `${W.value}-selection`
      }, [h(Eo, {
        checked: Ve ? ot : !!w.value && te,
        indeterminate: Ve ? !ot && je : !te && ve,
        onChange: ce,
        disabled: w.value === 0 || Ve,
        "aria-label": De ? "Custom selection" : "Select all",
        skipGroup: !0
      }, null), De]);
    }
    let ge;
    B === "radio" ? ge = (De) => {
      let {
        record: Be,
        index: Ve
      } = De;
      const ot = q.value(Be, Ve), je = re.has(ot);
      return {
        node: h(Mo, Q(Q({}, u.value.get(ot)), {}, {
          checked: je,
          onClick: (Pe) => Pe.stopPropagation(),
          onChange: (Pe) => {
            re.has(ot) || $(ot, !0, [ot], Pe.nativeEvent);
          }
        }), null),
        checked: je
      };
    } : ge = (De) => {
      let {
        record: Be,
        index: Ve
      } = De;
      var ot;
      const je = q.value(Be, Ve), Pe = re.has(je), Ge = x.value.has(je), Se = u.value.get(je);
      let Ce;
      return U.value === "nest" ? (Ce = Ge, dn(typeof Se?.indeterminate != "boolean", "Table", "set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")) : Ce = (ot = Se?.indeterminate) !== null && ot !== void 0 ? ot : Ge, {
        node: h(Eo, Q(Q({}, Se), {}, {
          indeterminate: Ce,
          checked: Pe,
          skipGroup: !0,
          onClick: (Ae) => Ae.stopPropagation(),
          onChange: (Ae) => {
            let {
              nativeEvent: qe
            } = Ae;
            const {
              shiftKey: We
            } = qe;
            let tt = -1, Ee = -1;
            if (We && Z) {
              const Ne = /* @__PURE__ */ new Set([S.value, je]);
              ie.some((Fe, it) => {
                if (Ne.has(Fe))
                  if (tt === -1)
                    tt = it;
                  else
                    return Ee = it, !0;
                return !1;
              });
            }
            if (Ee !== -1 && tt !== Ee && Z) {
              const Ne = ie.slice(tt, Ee + 1), Fe = [];
              Pe ? Ne.forEach((pt) => {
                re.has(pt) && (Fe.push(pt), re.delete(pt));
              }) : Ne.forEach((pt) => {
                re.has(pt) || (Fe.push(pt), re.add(pt));
              });
              const it = Array.from(re);
              H?.(!Pe, it.map((pt) => K(pt)), Fe.map((pt) => K(pt))), P(it);
            } else {
              const Ne = v.value;
              if (Z) {
                const Fe = Pe ? Kr(Ne, je) : $a(Ne, je);
                $(je, !Pe, Fe, qe);
              } else {
                const Fe = Ru([...Ne, je], !0, l.value, c.value, d.value, f), {
                  checkedKeys: it,
                  halfCheckedKeys: pt
                } = Fe;
                let at = it;
                if (Pe) {
                  const ft = new Set(it);
                  ft.delete(je), at = Ru(Array.from(ft), {
                    halfCheckedKeys: pt
                  }, l.value, c.value, d.value, f).checkedKeys;
                }
                $(je, !Pe, at, qe);
              }
            }
            C(je);
          }
        }), null),
        checked: Pe
      };
    };
    const Me = (De) => {
      let {
        record: Be,
        index: Ve
      } = De;
      const {
        node: ot,
        checked: je
      } = ge({
        record: Be,
        index: Ve
      });
      return G ? G(je, Be, Ve, ot) : ot;
    };
    if (!se.includes(vr))
      if (se.findIndex((De) => {
        var Be;
        return ((Be = De[zu]) === null || Be === void 0 ? void 0 : Be.columnType) === "EXPAND_COLUMN";
      }) === 0) {
        const [De, ...Be] = se;
        se = [De, vr, ...Be];
      } else
        se = [vr, ...se];
    const ze = se.indexOf(vr);
    process.env.NODE_ENV !== "production" && se.filter((De) => De === vr).length > 1 && dn(!1, "Table", "Multiple `SELECTION_COLUMN` exist in `columns`."), se = se.filter((De, Be) => De !== vr || Be === ze);
    const Ke = se[ze - 1], He = se[ze + 1];
    let Re = A;
    Re === void 0 && (He?.fixed !== void 0 ? Re = He.fixed : Ke?.fixed !== void 0 && (Re = Ke.fixed)), Re && Ke && ((N = Ke[zu]) === null || N === void 0 ? void 0 : N.columnType) === "EXPAND_COLUMN" && Ke.fixed === void 0 && (Ke.fixed = Re);
    const Xe = {
      fixed: Re,
      width: L,
      className: `${W.value}-selection-column`,
      title: n.value.columnTitle || fe,
      customRender: Me,
      [zu]: {
        class: `${W.value}-selection-col`
      }
    };
    return se.map((De) => De === vr ? Xe : De);
  }, m];
}
var SZ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "outlined" };
function d$(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;
}
var Cx = function(t, n) {
  var o = d$({}, t, n.attrs);
  return h(an, d$({}, o, {
    icon: SZ
  }), null);
};
Cx.displayName = "CaretDownOutlined";
Cx.inheritAttrs = !1;
var $Z = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, name: "caret-up", theme: "outlined" };
function f$(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) {
      PZ(e, i, n[i]);
    });
  }
  return e;
}
function PZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var $x = function(t, n) {
  var o = f$({}, t, n.attrs);
  return h(an, f$({}, o, {
    icon: $Z
  }), null);
};
$x.displayName = "CaretUpOutlined";
$x.inheritAttrs = !1;
var OZ = 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 As(e, t) {
  return "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex : t;
}
function Gd(e, t) {
  return t ? `${t}-${e}` : `${e}`;
}
function Px(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function _2() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const t = go(e), n = [];
  return t.forEach((o) => {
    var i, r, a, l;
    if (!o)
      return;
    const s = o.key, u = ((i = o.props) === null || i === void 0 ? void 0 : i.style) || {}, c = ((r = o.props) === null || r === void 0 ? void 0 : r.class) || "", d = o.props || {};
    for (const [m, x] of Object.entries(d))
      d[_d(m)] = x;
    const f = o.children || {}, {
      default: p
    } = f, v = OZ(f, ["default"]), g = O(O(O({}, v), d), {
      style: u,
      class: c
    });
    if (s && (g.key = s), !((a = o.type) === null || a === void 0) && a.__ANT_TABLE_COLUMN_GROUP)
      g.children = _2(typeof p == "function" ? p() : p);
    else {
      const m = (l = o.children) === null || l === void 0 ? void 0 : l.default;
      g.customRender = g.customRender || m;
    }
    n.push(g);
  }), n;
}
const hp = "ascend", Dv = "descend";
function Zp(e) {
  return typeof e.sorter == "object" && typeof e.sorter.multiple == "number" ? e.sorter.multiple : !1;
}
function p$(e) {
  return typeof e == "function" ? e : e && typeof e == "object" && e.compare ? e.compare : !1;
}
function kZ(e, t) {
  return t ? e[e.indexOf(t) + 1] : e[0];
}
function Lb(e, t, n) {
  let o = [];
  function i(r, a) {
    o.push({
      column: r,
      key: As(r, a),
      multiplePriority: Zp(r),
      sortOrder: r.sortOrder
    });
  }
  return (e || []).forEach((r, a) => {
    const l = Gd(a, n);
    r.children ? ("sortOrder" in r && i(r, l), o = [...o, ...Lb(r.children, t, l)]) : r.sorter && ("sortOrder" in r ? i(r, l) : t && r.defaultSortOrder && o.push({
      column: r,
      key: As(r, l),
      multiplePriority: Zp(r),
      sortOrder: r.defaultSortOrder
    }));
  }), o;
}
function E2(e, t, n, o, i, r, a, l) {
  return (t || []).map((s, u) => {
    const c = Gd(u, l);
    let d = s;
    if (d.sorter) {
      const f = d.sortDirections || i, p = d.showSorterTooltip === void 0 ? a : d.showSorterTooltip, v = As(d, c), g = n.find((_) => {
        let {
          key: N
        } = _;
        return N === v;
      }), m = g ? g.sortOrder : null, x = kZ(f, m), S = f.includes(hp) && h($x, {
        class: _e(`${e}-column-sorter-up`, {
          active: m === hp
        }),
        role: "presentation"
      }, null), C = f.includes(Dv) && h(Cx, {
        role: "presentation",
        class: _e(`${e}-column-sorter-down`, {
          active: m === Dv
        })
      }, null), {
        cancelSort: P,
        triggerAsc: $,
        triggerDesc: I
      } = r || {};
      let w = P;
      x === Dv ? w = I : x === hp && (w = $);
      const M = typeof p == "object" ? p : {
        title: w
      };
      d = O(O({}, d), {
        className: _e(d.className, {
          [`${e}-column-sort`]: m
        }),
        title: (_) => {
          const N = h("div", {
            class: `${e}-column-sorters`
          }, [h("span", {
            class: `${e}-column-title`
          }, [Px(s.title, _)]), h("span", {
            class: _e(`${e}-column-sorter`, {
              [`${e}-column-sorter-full`]: !!(S && C)
            })
          }, [h("span", {
            class: `${e}-column-sorter-inner`
          }, [S, C])])]);
          return p ? h(Lo, M, {
            default: () => [N]
          }) : N;
        },
        customHeaderCell: (_) => {
          const N = s.customHeaderCell && s.customHeaderCell(_) || {}, R = N.onClick, H = N.onKeydown;
          return N.onClick = (L) => {
            o({
              column: s,
              key: v,
              sortOrder: x,
              multiplePriority: Zp(s)
            }), R && R(L);
          }, N.onKeydown = (L) => {
            L.keyCode === rt.ENTER && (o({
              column: s,
              key: v,
              sortOrder: x,
              multiplePriority: Zp(s)
            }), H?.(L));
          }, m && (N["aria-sort"] = m === "ascend" ? "ascending" : "descending"), N.class = _e(N.class, `${e}-column-has-sorters`), N.tabindex = 0, N;
        }
      });
    }
    return "children" in d && (d = O(O({}, d), {
      children: E2(e, d.children, n, o, i, r, a, c)
    })), d;
  });
}
function h$(e) {
  const {
    column: t,
    sortOrder: n
  } = e;
  return {
    column: t,
    order: n,
    field: t.dataIndex,
    columnKey: t.key
  };
}
function g$(e) {
  const t = e.filter((n) => {
    let {
      sortOrder: o
    } = n;
    return o;
  }).map(h$);
  return t.length === 0 && e.length ? O(O({}, h$(e[e.length - 1])), {
    column: void 0
  }) : t.length <= 1 ? t[0] || {} : t;
}
function Hb(e, t, n) {
  const o = t.slice().sort((a, l) => l.multiplePriority - a.multiplePriority), i = e.slice(), r = o.filter((a) => {
    let {
      column: {
        sorter: l
      },
      sortOrder: s
    } = a;
    return p$(l) && s;
  });
  return r.length ? i.sort((a, l) => {
    for (let s = 0; s < r.length; s += 1) {
      const u = r[s], {
        column: {
          sorter: c
        },
        sortOrder: d
      } = u, f = p$(c);
      if (f && d) {
        const p = f(a, l, d);
        if (p !== 0)
          return d === hp ? p : -p;
      }
    }
    return 0;
  }).map((a) => {
    const l = a[n];
    return l ? O(O({}, a), {
      [n]: Hb(l, t, n)
    }) : a;
  }) : i;
}
function IZ(e) {
  let {
    prefixCls: t,
    mergedColumns: n,
    onSorterChange: o,
    sortDirections: i,
    tableLocale: r,
    showSorterTooltip: a
  } = e;
  const [l, s] = Cn(Lb(n.value, !0)), u = E(() => {
    let v = !0;
    const g = Lb(n.value, !1);
    if (!g.length)
      return l.value;
    const m = [];
    function x(C) {
      v ? m.push(C) : m.push(O(O({}, C), {
        sortOrder: null
      }));
    }
    let S = null;
    return g.forEach((C) => {
      S === null ? (x(C), C.sortOrder && (C.multiplePriority === !1 ? v = !1 : S = !0)) : (S && C.multiplePriority !== !1 || (v = !1), x(C));
    }), m;
  }), c = E(() => {
    const v = u.value.map((g) => {
      let {
        column: m,
        sortOrder: x
      } = g;
      return {
        column: m,
        order: x
      };
    });
    return {
      sortColumns: v,
      // Legacy
      sortColumn: v[0] && v[0].column,
      sortOrder: v[0] && v[0].order
    };
  });
  function d(v) {
    let g;
    v.multiplePriority === !1 || !u.value.length || u.value[0].multiplePriority === !1 ? g = [v] : g = [...u.value.filter((m) => {
      let {
        key: x
      } = m;
      return x !== v.key;
    }), v], s(g), o(g$(g), g);
  }
  const f = (v) => E2(t.value, v, u.value, d, i.value, r.value, a.value), p = E(() => g$(u.value));
  return [f, u, c, p];
}
var MZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z" } }] }, name: "filter", theme: "filled" };
function v$(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) {
      TZ(e, i, n[i]);
    });
  }
  return e;
}
function TZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ox = function(t, n) {
  var o = v$({}, t, n.attrs);
  return h(an, v$({}, o, {
    icon: MZ
  }), null);
};
Ox.displayName = "FilterFilled";
Ox.inheritAttrs = !1;
const _Z = (e) => {
  const {
    keyCode: t
  } = e;
  t === rt.ENTER && e.stopPropagation();
}, EZ = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  return h("div", {
    onClick: (i) => i.stopPropagation(),
    onKeydown: _Z
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
}, m$ = be({
  compatConfig: {
    MODE: 3
  },
  name: "FilterSearch",
  inheritAttrs: !1,
  props: {
    value: rn(),
    onChange: et(),
    filterSearch: en([Boolean, Function]),
    tablePrefixCls: rn(),
    locale: _t()
  },
  setup(e) {
    return () => {
      const {
        value: t,
        onChange: n,
        filterSearch: o,
        tablePrefixCls: i,
        locale: r
      } = e;
      return o ? h("div", {
        class: `${i}-filter-dropdown-search`
      }, [h(kt, {
        placeholder: r.filterSearchPlaceholder,
        onChange: n,
        value: t,
        htmlSize: 1,
        class: `${i}-filter-dropdown-search-input`
      }, {
        prefix: () => h(zd, null, null)
      })]) : null;
    };
  }
});
var b$ = 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 DZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "MotionTreeNode",
  inheritAttrs: !1,
  props: O(O({}, YT), {
    active: Boolean,
    motion: Object,
    motionNodes: {
      type: Array
    },
    onMotionStart: Function,
    onMotionEnd: Function,
    motionType: String
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const i = $e(!0), r = J0(), a = $e(!1), l = E(() => e.motion ? e.motion : jh()), s = (u, c) => {
      var d, f, p, v;
      c === "appear" ? (f = (d = l.value) === null || d === void 0 ? void 0 : d.onAfterEnter) === null || f === void 0 || f.call(d, u) : c === "leave" && ((v = (p = l.value) === null || p === void 0 ? void 0 : p.onAfterLeave) === null || v === void 0 || v.call(p, u)), a.value || e.onMotionEnd(), a.value = !0;
    };
    return Ie(() => e.motionNodes, () => {
      e.motionNodes && e.motionType === "hide" && i.value && Yt(() => {
        i.value = !1;
      });
    }, {
      immediate: !0,
      flush: "post"
    }), At(() => {
      e.motionNodes && e.onMotionStart();
    }), qt(() => {
      e.motionNodes && s();
    }), () => {
      const {
        motion: u,
        motionNodes: c,
        motionType: d,
        active: f,
        eventKey: p
      } = e, v = b$(e, ["motion", "motionNodes", "motionType", "active", "eventKey"]);
      return c ? h(Ei, Q(Q({}, l.value), {}, {
        appear: d === "show",
        onAfterAppear: (g) => s(g, "appear"),
        onAfterLeave: (g) => s(g, "leave")
      }), {
        default: () => [er(h("div", {
          class: `${r.value.prefixCls}-treenode-motion`
        }, [c.map((g) => {
          const m = b$(g.data, []), {
            title: x,
            key: S,
            isStart: C,
            isEnd: P
          } = g;
          return delete m.children, h(db, Q(Q({}, m), {}, {
            title: x,
            active: f,
            data: g.data,
            key: S,
            eventKey: S,
            isStart: C,
            isEnd: P
          }), o);
        })]), [[Or, i.value]])]
      }) : h(db, Q(Q({
        class: n.class,
        style: n.style
      }, v), {}, {
        active: f,
        eventKey: p
      }), o);
    };
  }
});
function AZ() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  const n = e.length, o = t.length;
  if (Math.abs(n - o) !== 1)
    return {
      add: !1,
      key: null
    };
  function i(r, a) {
    const l = /* @__PURE__ */ new Map();
    r.forEach((u) => {
      l.set(u, !0);
    });
    const s = a.filter((u) => !l.has(u));
    return s.length === 1 ? s[0] : null;
  }
  return n < o ? {
    add: !0,
    key: i(e, t)
  } : {
    add: !1,
    key: i(t, e)
  };
}
function y$(e, t, n) {
  const o = e.findIndex((a) => a.key === n), i = e[o + 1], r = t.findIndex((a) => a.key === n);
  if (i) {
    const a = t.findIndex((l) => l.key === i.key);
    return t.slice(r + 1, a);
  }
  return t.slice(r + 1);
}
var x$ = 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 w$ = {
  width: 0,
  height: 0,
  display: "flex",
  overflow: "hidden",
  opacity: 0,
  border: 0,
  padding: 0,
  margin: 0
}, RZ = () => {
}, Rs = `RC_TREE_MOTION_${Math.random()}`, Vb = {
  key: Rs
}, D2 = {
  key: Rs,
  level: 0,
  index: 0,
  pos: "0",
  node: Vb,
  nodes: [Vb]
}, S$ = {
  parent: null,
  children: [],
  pos: D2.pos,
  data: Vb,
  title: null,
  key: Rs,
  /** Hold empty list here since we do not use it */
  isStart: [],
  isEnd: []
};
function C$(e, t, n, o) {
  return t === !1 || !n ? e : e.slice(0, Math.ceil(n / o) + 1);
}
function $$(e) {
  const {
    key: t,
    pos: n
  } = e;
  return Kd(t, n);
}
function NZ(e) {
  let t = String(e.key), n = e;
  for (; n.parent; )
    n = n.parent, t = `${n.key} > ${t}`;
  return t;
}
const zZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "NodeList",
  inheritAttrs: !1,
  props: TK,
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const i = le(), r = le(), {
      expandedKeys: a,
      flattenNodes: l
    } = qT();
    n({
      scrollTo: (g) => {
        i.value.scrollTo(g);
      },
      getIndentWidth: () => r.value.offsetWidth
    });
    const s = $e(l.value), u = $e([]), c = le(null);
    function d() {
      s.value = l.value, u.value = [], c.value = null, e.onListChangeEnd();
    }
    const f = J0();
    Ie([() => a.value.slice(), l], (g, m) => {
      let [x, S] = g, [C, P] = m;
      const $ = AZ(C, x);
      if ($.key !== null) {
        const {
          virtual: I,
          height: w,
          itemHeight: M
        } = e;
        if ($.add) {
          const _ = P.findIndex((H) => {
            let {
              key: L
            } = H;
            return L === $.key;
          }), N = C$(y$(P, S, $.key), I, w, M), R = P.slice();
          R.splice(_ + 1, 0, S$), s.value = R, u.value = N, c.value = "show";
        } else {
          const _ = S.findIndex((H) => {
            let {
              key: L
            } = H;
            return L === $.key;
          }), N = C$(y$(S, P, $.key), I, w, M), R = S.slice();
          R.splice(_ + 1, 0, S$), s.value = R, u.value = N, c.value = "hide";
        }
      } else P !== S && (s.value = S);
    }), Ie(() => f.value.dragging, (g) => {
      g || d();
    });
    const p = E(() => e.motion === void 0 ? s.value : l.value), v = () => {
      e.onActiveChange(null);
    };
    return () => {
      const g = O(O({}, e), o), {
        prefixCls: m,
        selectable: x,
        checkable: S,
        disabled: C,
        motion: P,
        height: $,
        itemHeight: I,
        virtual: w,
        focusable: M,
        activeItem: _,
        focused: N,
        tabindex: R,
        onKeydown: H,
        onFocus: L,
        onBlur: B,
        onListChangeStart: A,
        onListChangeEnd: G
      } = g, j = x$(g, ["prefixCls", "selectable", "checkable", "disabled", "motion", "height", "itemHeight", "virtual", "focusable", "activeItem", "focused", "tabindex", "onKeydown", "onFocus", "onBlur", "onListChangeStart", "onListChangeEnd"]);
      return h(Je, null, [N && _ && h("span", {
        style: w$,
        "aria-live": "assertive"
      }, [NZ(_)]), h("div", null, [h("input", {
        style: w$,
        disabled: M === !1 || C,
        tabindex: M !== !1 ? R : null,
        onKeydown: H,
        onFocus: L,
        onBlur: B,
        value: "",
        onChange: RZ,
        "aria-label": "for screen reader"
      }, null)]), h("div", {
        class: `${m}-treenode`,
        "aria-hidden": !0,
        style: {
          position: "absolute",
          pointerEvents: "none",
          visibility: "hidden",
          height: 0,
          overflow: "hidden"
        }
      }, [h("div", {
        class: `${m}-indent`
      }, [h("div", {
        ref: r,
        class: `${m}-indent-unit`
      }, null)])]), h(cM, Q(Q({}, Bn(j, ["onActiveChange"])), {}, {
        data: p.value,
        itemKey: $$,
        height: $,
        fullHeight: !1,
        virtual: w,
        itemHeight: I,
        prefixCls: `${m}-list`,
        ref: i,
        onVisibleChange: (Z, W) => {
          const K = new Set(Z);
          W.filter((U) => !K.has(U)).some((U) => $$(U) === Rs) && d();
        }
      }), {
        default: (Z) => {
          const {
            pos: W
          } = Z, K = x$(Z.data, []), {
            title: q,
            key: U,
            isStart: ae,
            isEnd: se
          } = Z, re = Kd(U, W);
          return delete K.key, delete K.children, h(DZ, Q(Q({}, K), {}, {
            eventKey: re,
            title: q,
            active: !!_ && U === _.key,
            data: Z.data,
            isStart: ae,
            isEnd: se,
            motion: P,
            motionNodes: U === Rs ? u.value : null,
            motionType: c.value,
            onMotionStart: A,
            onMotionEnd: d,
            onMousemove: v
          }), null);
        }
      })]);
    };
  }
});
function BZ(e) {
  let {
    dropPosition: t,
    dropLevelOffset: n,
    indent: o
  } = e;
  const i = {
    pointerEvents: "none",
    position: "absolute",
    right: 0,
    backgroundColor: "red",
    height: "2px"
  };
  switch (t) {
    case -1:
      i.top = 0, i.left = `${-n * o}px`;
      break;
    case 1:
      i.bottom = 0, i.left = `${-n * o}px`;
      break;
    case 0:
      i.bottom = 0, i.left = `${o}`;
      break;
  }
  return h("div", {
    style: i
  }, null);
}
const FZ = 10, LZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Tree",
  inheritAttrs: !1,
  props: _n(GT(), {
    prefixCls: "vc-tree",
    showLine: !1,
    showIcon: !0,
    selectable: !0,
    multiple: !1,
    checkable: !1,
    disabled: !1,
    checkStrictly: !1,
    draggable: !1,
    expandAction: !1,
    defaultExpandParent: !0,
    autoExpandParent: !1,
    defaultExpandAll: !1,
    defaultExpandedKeys: [],
    defaultCheckedKeys: [],
    defaultSelectedKeys: [],
    dropIndicatorRender: BZ,
    allowDrop: () => !0
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i
    } = t;
    const r = $e(!1);
    let a = {};
    const l = $e(), s = $e([]), u = $e([]), c = $e([]), d = $e([]), f = $e([]), p = $e([]), v = {}, g = $n({
      draggingNodeKey: null,
      dragChildrenKeys: [],
      // dropTargetKey is the key of abstract-drop-node
      // the abstract-drop-node is the real drop node when drag and drop
      // not the DOM drag over node
      dropTargetKey: null,
      dropPosition: null,
      dropContainerKey: null,
      dropLevelOffset: null,
      dropTargetPos: null,
      dropAllowed: !0,
      // the abstract-drag-over-node
      // if mouse is on the bottom of top dom node or no the top of the bottom dom node
      // abstract-drag-over-node is the top node
      dragOverNodeKey: null
    }), m = $e([]);
    Ie([() => e.treeData, () => e.children], () => {
      m.value = e.treeData !== void 0 ? e.treeData.slice() : pb(di(e.children));
    }, {
      immediate: !0,
      deep: !0
    });
    const x = $e({}), S = $e(!1), C = $e(null), P = $e(!1), $ = E(() => Zh(e.fieldNames)), I = $e();
    let w = null, M = null, _ = null;
    const N = E(() => ({
      expandedKeysSet: R.value,
      selectedKeysSet: H.value,
      loadedKeysSet: L.value,
      loadingKeysSet: B.value,
      checkedKeysSet: A.value,
      halfCheckedKeysSet: G.value,
      dragOverNodeKey: g.dragOverNodeKey,
      dropPosition: g.dropPosition,
      keyEntities: x.value
    })), R = E(() => new Set(p.value)), H = E(() => new Set(s.value)), L = E(() => new Set(d.value)), B = E(() => new Set(f.value)), A = E(() => new Set(u.value)), G = E(() => new Set(c.value));
    It(() => {
      if (m.value) {
        const Ee = tx(m.value, {
          fieldNames: $.value
        });
        x.value = O({
          [Rs]: D2
        }, Ee.keyEntities);
      }
    });
    let j = !1;
    Ie(
      [() => e.expandedKeys, () => e.autoExpandParent, x],
      // eslint-disable-next-line @typescript-eslint/no-unused-vars
      (Ee, Ne) => {
        let [Fe, it] = Ee, [pt, at] = Ne, ft = p.value;
        if (e.expandedKeys !== void 0 || j && it !== at)
          ft = e.autoExpandParent || !j && e.defaultExpandParent ? fb(e.expandedKeys, x.value) : e.expandedKeys;
        else if (!j && e.defaultExpandAll) {
          const wt = O({}, x.value);
          delete wt[Rs], ft = Object.keys(wt).map((Ct) => wt[Ct].key);
        } else !j && e.defaultExpandedKeys && (ft = e.autoExpandParent || e.defaultExpandParent ? fb(e.defaultExpandedKeys, x.value) : e.defaultExpandedKeys);
        ft && (p.value = ft), j = !0;
      },
      {
        immediate: !0
      }
    );
    const Z = $e([]);
    It(() => {
      Z.value = BK(m.value, p.value, $.value);
    }), It(() => {
      e.selectable && (e.selectedKeys !== void 0 ? s.value = sC(e.selectedKeys, e) : !j && e.defaultSelectedKeys && (s.value = sC(e.defaultSelectedKeys, e)));
    });
    const {
      maxLevel: W,
      levelEntities: K
    } = QT(x);
    It(() => {
      if (e.checkable) {
        let Ee;
        if (e.checkedKeys !== void 0 ? Ee = vv(e.checkedKeys) || {} : !j && e.defaultCheckedKeys ? Ee = vv(e.defaultCheckedKeys) || {} : m.value && (Ee = vv(e.checkedKeys) || {
          checkedKeys: u.value,
          halfCheckedKeys: c.value
        }), Ee) {
          let {
            checkedKeys: Ne = [],
            halfCheckedKeys: Fe = []
          } = Ee;
          e.checkStrictly || ({
            checkedKeys: Ne,
            halfCheckedKeys: Fe
          } = Ru(Ne, !0, x.value, W.value, K.value)), u.value = Ne, c.value = Fe;
        }
      }
    }), It(() => {
      e.loadedKeys && (d.value = e.loadedKeys);
    });
    const q = () => {
      O(g, {
        dragOverNodeKey: null,
        dropPosition: null,
        dropLevelOffset: null,
        dropTargetKey: null,
        dropContainerKey: null,
        dropTargetPos: null,
        dropAllowed: !1
      });
    }, U = (Ee) => {
      I.value.scrollTo(Ee);
    };
    Ie(() => e.activeKey, () => {
      e.activeKey !== void 0 && (C.value = e.activeKey);
    }, {
      immediate: !0
    }), Ie(C, (Ee) => {
      Yt(() => {
        Ee !== null && U({
          key: Ee
        });
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const ae = (Ee) => {
      e.expandedKeys === void 0 && (p.value = Ee);
    }, se = () => {
      g.draggingNodeKey !== null && O(g, {
        draggingNodeKey: null,
        dropPosition: null,
        dropContainerKey: null,
        dropTargetKey: null,
        dropLevelOffset: null,
        dropAllowed: !0,
        dragOverNodeKey: null
      }), w = null, _ = null;
    }, re = (Ee, Ne) => {
      const {
        onDragend: Fe
      } = e;
      g.dragOverNodeKey = null, se(), Fe?.({
        event: Ee,
        node: Ne.eventData
      }), M = null;
    }, ie = (Ee) => {
      re(Ee, null), window.removeEventListener("dragend", ie);
    }, te = (Ee, Ne) => {
      const {
        onDragstart: Fe
      } = e, {
        eventKey: it,
        eventData: pt
      } = Ne;
      M = Ne, w = {
        x: Ee.clientX,
        y: Ee.clientY
      };
      const at = Kr(p.value, it);
      g.draggingNodeKey = it, g.dragChildrenKeys = AK(it, x.value), l.value = I.value.getIndentWidth(), ae(at), window.addEventListener("dragend", ie), Fe && Fe({
        event: Ee,
        node: pt
      });
    }, ve = (Ee, Ne) => {
      const {
        onDragenter: Fe,
        onExpand: it,
        allowDrop: pt,
        direction: at
      } = e, {
        pos: ft,
        eventKey: wt
      } = Ne;
      if (_ !== wt && (_ = wt), !M) {
        q();
        return;
      }
      const {
        dropPosition: Ct,
        dropLevelOffset: St,
        dropTargetKey: bt,
        dropContainerKey: Ot,
        dropTargetPos: Wt,
        dropAllowed: Xt,
        dragOverNodeKey: ln
      } = lC(Ee, M, Ne, l.value, w, pt, Z.value, x.value, R.value, at);
      if (
        // don't allow drop inside its children
        g.dragChildrenKeys.indexOf(bt) !== -1 || // don't allow drop when drop is not allowed caculated by calcDropPosition
        !Xt
      ) {
        q();
        return;
      }
      if (a || (a = {}), Object.keys(a).forEach((pn) => {
        clearTimeout(a[pn]);
      }), M.eventKey !== Ne.eventKey && (a[ft] = window.setTimeout(() => {
        if (g.draggingNodeKey === null) return;
        let pn = p.value.slice();
        const gt = x.value[Ne.eventKey];
        gt && (gt.children || []).length && (pn = $a(p.value, Ne.eventKey)), ae(pn), it && it(pn, {
          node: Ne.eventData,
          expanded: !0,
          nativeEvent: Ee
        });
      }, 800)), M.eventKey === bt && St === 0) {
        q();
        return;
      }
      O(g, {
        dragOverNodeKey: ln,
        dropPosition: Ct,
        dropLevelOffset: St,
        dropTargetKey: bt,
        dropContainerKey: Ot,
        dropTargetPos: Wt,
        dropAllowed: Xt
      }), Fe && Fe({
        event: Ee,
        node: Ne.eventData,
        expandedKeys: p.value
      });
    }, ce = (Ee, Ne) => {
      const {
        onDragover: Fe,
        allowDrop: it,
        direction: pt
      } = e;
      if (!M)
        return;
      const {
        dropPosition: at,
        dropLevelOffset: ft,
        dropTargetKey: wt,
        dropContainerKey: Ct,
        dropAllowed: St,
        dropTargetPos: bt,
        dragOverNodeKey: Ot
      } = lC(Ee, M, Ne, l.value, w, it, Z.value, x.value, R.value, pt);
      g.dragChildrenKeys.indexOf(wt) !== -1 || !St || (M.eventKey === wt && ft === 0 ? g.dropPosition === null && g.dropLevelOffset === null && g.dropTargetKey === null && g.dropContainerKey === null && g.dropTargetPos === null && g.dropAllowed === !1 && g.dragOverNodeKey === null || q() : at === g.dropPosition && ft === g.dropLevelOffset && wt === g.dropTargetKey && Ct === g.dropContainerKey && bt === g.dropTargetPos && St === g.dropAllowed && Ot === g.dragOverNodeKey || O(g, {
        dropPosition: at,
        dropLevelOffset: ft,
        dropTargetKey: wt,
        dropContainerKey: Ct,
        dropTargetPos: bt,
        dropAllowed: St,
        dragOverNodeKey: Ot
      }), Fe && Fe({
        event: Ee,
        node: Ne.eventData
      }));
    }, fe = (Ee, Ne) => {
      _ === Ne.eventKey && !Ee.currentTarget.contains(Ee.relatedTarget) && (q(), _ = null);
      const {
        onDragleave: Fe
      } = e;
      Fe && Fe({
        event: Ee,
        node: Ne.eventData
      });
    }, ge = function(Ee, Ne) {
      let Fe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      var it;
      const {
        dragChildrenKeys: pt,
        dropPosition: at,
        dropTargetKey: ft,
        dropTargetPos: wt,
        dropAllowed: Ct
      } = g;
      if (!Ct) return;
      const {
        onDrop: St
      } = e;
      if (g.dragOverNodeKey = null, se(), ft === null) return;
      const bt = O(O({}, lp(ft, di(N.value))), {
        active: ((it = Ae.value) === null || it === void 0 ? void 0 : it.key) === ft,
        data: x.value[ft].node
      }), Ot = pt.indexOf(ft) !== -1;
      wn(!Ot, "Can not drop to dragNode's children node. Maybe this is a bug of ant-design-vue. Please report an issue.");
      const Wt = ex(wt), Xt = {
        event: Ee,
        node: sp(bt),
        dragNode: M ? M.eventData : null,
        dragNodesKeys: [M.eventKey].concat(pt),
        dropToGap: at !== 0,
        dropPosition: at + Number(Wt[Wt.length - 1])
      };
      Fe || St?.(Xt), M = null;
    }, Me = (Ee, Ne) => {
      const {
        expanded: Fe,
        key: it
      } = Ne, pt = Z.value.filter((ft) => ft.key === it)[0], at = sp(O(O({}, lp(it, N.value)), {
        data: pt.data
      }));
      ae(Fe ? Kr(p.value, it) : $a(p.value, it)), Pe(Ee, at);
    }, ze = (Ee, Ne) => {
      const {
        onClick: Fe,
        expandAction: it
      } = e;
      it === "click" && Me(Ee, Ne), Fe && Fe(Ee, Ne);
    }, Ke = (Ee, Ne) => {
      const {
        onDblclick: Fe,
        expandAction: it
      } = e;
      (it === "doubleclick" || it === "dblclick") && Me(Ee, Ne), Fe && Fe(Ee, Ne);
    }, He = (Ee, Ne) => {
      let Fe = s.value;
      const {
        onSelect: it,
        multiple: pt
      } = e, {
        selected: at
      } = Ne, ft = Ne[$.value.key], wt = !at;
      wt ? pt ? Fe = $a(Fe, ft) : Fe = [ft] : Fe = Kr(Fe, ft);
      const Ct = x.value, St = Fe.map((bt) => {
        const Ot = Ct[bt];
        return Ot ? Ot.node : null;
      }).filter((bt) => bt);
      e.selectedKeys === void 0 && (s.value = Fe), it && it(Fe, {
        event: "select",
        selected: wt,
        node: Ne,
        selectedNodes: St,
        nativeEvent: Ee
      });
    }, Re = (Ee, Ne, Fe) => {
      const {
        checkStrictly: it,
        onCheck: pt
      } = e, at = Ne[$.value.key];
      let ft;
      const wt = {
        event: "check",
        node: Ne,
        checked: Fe,
        nativeEvent: Ee
      }, Ct = x.value;
      if (it) {
        const St = Fe ? $a(u.value, at) : Kr(u.value, at), bt = Kr(c.value, at);
        ft = {
          checked: St,
          halfChecked: bt
        }, wt.checkedNodes = St.map((Ot) => Ct[Ot]).filter((Ot) => Ot).map((Ot) => Ot.node), e.checkedKeys === void 0 && (u.value = St);
      } else {
        let {
          checkedKeys: St,
          halfCheckedKeys: bt
        } = Ru([...u.value, at], !0, Ct, W.value, K.value);
        if (!Fe) {
          const Ot = new Set(St);
          Ot.delete(at), {
            checkedKeys: St,
            halfCheckedKeys: bt
          } = Ru(Array.from(Ot), {
            halfCheckedKeys: bt
          }, Ct, W.value, K.value);
        }
        ft = St, wt.checkedNodes = [], wt.checkedNodesPositions = [], wt.halfCheckedKeys = bt, St.forEach((Ot) => {
          const Wt = Ct[Ot];
          if (!Wt) return;
          const {
            node: Xt,
            pos: ln
          } = Wt;
          wt.checkedNodes.push(Xt), wt.checkedNodesPositions.push({
            node: Xt,
            pos: ln
          });
        }), e.checkedKeys === void 0 && (u.value = St, c.value = bt);
      }
      pt && pt(ft, wt);
    }, Xe = (Ee) => {
      const Ne = Ee[$.value.key], Fe = new Promise((it, pt) => {
        const {
          loadData: at,
          onLoad: ft
        } = e;
        if (!at || L.value.has(Ne) || B.value.has(Ne))
          return null;
        at(Ee).then(() => {
          const Ct = $a(d.value, Ne), St = Kr(f.value, Ne);
          ft && ft(Ct, {
            event: "load",
            node: Ee
          }), e.loadedKeys === void 0 && (d.value = Ct), f.value = St, it();
        }).catch((Ct) => {
          const St = Kr(f.value, Ne);
          if (f.value = St, v[Ne] = (v[Ne] || 0) + 1, v[Ne] >= FZ) {
            wn(!1, "Retry for `loadData` many times but still failed. No more retry.");
            const bt = $a(d.value, Ne);
            e.loadedKeys === void 0 && (d.value = bt), it();
          }
          pt(Ct);
        }), f.value = $a(f.value, Ne);
      });
      return Fe.catch(() => {
      }), Fe;
    }, De = (Ee, Ne) => {
      const {
        onMouseenter: Fe
      } = e;
      Fe && Fe({
        event: Ee,
        node: Ne
      });
    }, Be = (Ee, Ne) => {
      const {
        onMouseleave: Fe
      } = e;
      Fe && Fe({
        event: Ee,
        node: Ne
      });
    }, Ve = (Ee, Ne) => {
      const {
        onRightClick: Fe
      } = e;
      Fe && (Ee.preventDefault(), Fe({
        event: Ee,
        node: Ne
      }));
    }, ot = (Ee) => {
      const {
        onFocus: Ne
      } = e;
      S.value = !0, Ne && Ne(Ee);
    }, je = (Ee) => {
      const {
        onBlur: Ne
      } = e;
      S.value = !1, Ce(null), Ne && Ne(Ee);
    }, Pe = (Ee, Ne) => {
      let Fe = p.value;
      const {
        onExpand: it,
        loadData: pt
      } = e, {
        expanded: at
      } = Ne, ft = Ne[$.value.key];
      if (P.value)
        return;
      const wt = Fe.indexOf(ft), Ct = !at;
      if (wn(at && wt !== -1 || !at && wt === -1, "Expand state not sync with index check"), Ct ? Fe = $a(Fe, ft) : Fe = Kr(Fe, ft), ae(Fe), it && it(Fe, {
        node: Ne,
        expanded: Ct,
        nativeEvent: Ee
      }), Ct && pt) {
        const St = Xe(Ne);
        St && St.then(() => {
        }).catch((bt) => {
          const Ot = Kr(p.value, ft);
          ae(Ot), Promise.reject(bt);
        });
      }
    }, Ge = () => {
      P.value = !0;
    }, Se = () => {
      setTimeout(() => {
        P.value = !1;
      });
    }, Ce = (Ee) => {
      const {
        onActiveChange: Ne
      } = e;
      C.value !== Ee && (e.activeKey !== void 0 && (C.value = Ee), Ee !== null && U({
        key: Ee
      }), Ne && Ne(Ee));
    }, Ae = E(() => C.value === null ? null : Z.value.find((Ee) => {
      let {
        key: Ne
      } = Ee;
      return Ne === C.value;
    }) || null), qe = (Ee) => {
      let Ne = Z.value.findIndex((it) => {
        let {
          key: pt
        } = it;
        return pt === C.value;
      });
      Ne === -1 && Ee < 0 && (Ne = Z.value.length), Ne = (Ne + Ee + Z.value.length) % Z.value.length;
      const Fe = Z.value[Ne];
      if (Fe) {
        const {
          key: it
        } = Fe;
        Ce(it);
      } else
        Ce(null);
    }, We = E(() => sp(O(O({}, lp(C.value, N.value)), {
      data: Ae.value.data,
      active: !0
    }))), tt = (Ee) => {
      const {
        onKeydown: Ne,
        checkable: Fe,
        selectable: it
      } = e;
      switch (Ee.which) {
        case rt.UP: {
          qe(-1), Ee.preventDefault();
          break;
        }
        case rt.DOWN: {
          qe(1), Ee.preventDefault();
          break;
        }
      }
      const pt = Ae.value;
      if (pt && pt.data) {
        const at = pt.data.isLeaf === !1 || !!(pt.data.children || []).length, ft = We.value;
        switch (Ee.which) {
          // >>> Expand
          case rt.LEFT: {
            at && R.value.has(C.value) ? Pe({}, ft) : pt.parent && Ce(pt.parent.key), Ee.preventDefault();
            break;
          }
          case rt.RIGHT: {
            at && !R.value.has(C.value) ? Pe({}, ft) : pt.children && pt.children.length && Ce(pt.children[0].key), Ee.preventDefault();
            break;
          }
          // Selection
          case rt.ENTER:
          case rt.SPACE: {
            Fe && !ft.disabled && ft.checkable !== !1 && !ft.disableCheckbox ? Re({}, ft, !A.value.has(C.value)) : !Fe && it && !ft.disabled && ft.selectable !== !1 && He({}, ft);
            break;
          }
        }
      }
      Ne && Ne(Ee);
    };
    return i({
      onNodeExpand: Pe,
      scrollTo: U,
      onKeydown: tt,
      selectedKeys: E(() => s.value),
      checkedKeys: E(() => u.value),
      halfCheckedKeys: E(() => c.value),
      loadedKeys: E(() => d.value),
      loadingKeys: E(() => f.value),
      expandedKeys: E(() => p.value)
    }), Vo(() => {
      window.removeEventListener("dragend", ie), r.value = !0;
    }), IK({
      expandedKeys: p,
      selectedKeys: s,
      loadedKeys: d,
      loadingKeys: f,
      checkedKeys: u,
      halfCheckedKeys: c,
      expandedKeysSet: R,
      selectedKeysSet: H,
      loadedKeysSet: L,
      loadingKeysSet: B,
      checkedKeysSet: A,
      halfCheckedKeysSet: G,
      flattenNodes: Z
    }), () => {
      const {
        // focused,
        // flattenNodes,
        // keyEntities,
        draggingNodeKey: Ee,
        // activeKey,
        dropLevelOffset: Ne,
        dropContainerKey: Fe,
        dropTargetKey: it,
        dropPosition: pt,
        dragOverNodeKey: at
        // indent,
      } = g, {
        prefixCls: ft,
        showLine: wt,
        focusable: Ct,
        tabindex: St = 0,
        selectable: bt,
        showIcon: Ot,
        icon: Wt = o.icon,
        switcherIcon: Xt,
        draggable: ln,
        checkable: pn,
        checkStrictly: gt,
        disabled: En,
        motion: hn,
        loadData: Wn,
        filterTreeNode: lo,
        height: Uo,
        itemHeight: Ue,
        virtual: ht,
        dropIndicatorRender: vt,
        onContextmenu: Zt,
        onScroll: Qn,
        direction: Xn,
        rootClassName: $o,
        rootStyle: Sn
      } = e, {
        class: Mt,
        style: fo
      } = n, zo = Fs(O(O({}, e), n), {
        aria: !0,
        data: !0
      });
      let un;
      return ln ? typeof ln == "object" ? un = ln : typeof ln == "function" ? un = {
        nodeDraggable: ln
      } : un = {} : un = !1, h(kK, {
        value: {
          prefixCls: ft,
          selectable: bt,
          showIcon: Ot,
          icon: Wt,
          switcherIcon: Xt,
          draggable: un,
          draggingNodeKey: Ee,
          checkable: pn,
          customCheckable: o.checkable,
          checkStrictly: gt,
          disabled: En,
          keyEntities: x.value,
          dropLevelOffset: Ne,
          dropContainerKey: Fe,
          dropTargetKey: it,
          dropPosition: pt,
          dragOverNodeKey: at,
          dragging: Ee !== null,
          indent: l.value,
          direction: Xn,
          dropIndicatorRender: vt,
          loadData: Wn,
          filterTreeNode: lo,
          onNodeClick: ze,
          onNodeDoubleClick: Ke,
          onNodeExpand: Pe,
          onNodeSelect: He,
          onNodeCheck: Re,
          onNodeLoad: Xe,
          onNodeMouseEnter: De,
          onNodeMouseLeave: Be,
          onNodeContextMenu: Ve,
          onNodeDragStart: te,
          onNodeDragEnter: ve,
          onNodeDragOver: ce,
          onNodeDragLeave: fe,
          onNodeDragEnd: re,
          onNodeDrop: ge,
          slots: o
        }
      }, {
        default: () => [h("div", {
          role: "tree",
          class: _e(ft, Mt, $o, {
            [`${ft}-show-line`]: wt,
            [`${ft}-focused`]: S.value,
            [`${ft}-active-focused`]: C.value !== null
          }),
          style: Sn
        }, [h(zZ, Q({
          ref: I,
          prefixCls: ft,
          style: fo,
          disabled: En,
          selectable: bt,
          checkable: !!pn,
          motion: hn,
          height: Uo,
          itemHeight: Ue,
          virtual: ht,
          focusable: Ct,
          focused: S.value,
          tabindex: St,
          activeItem: Ae.value,
          onFocus: ot,
          onBlur: je,
          onKeydown: tt,
          onActiveChange: Ce,
          onListChangeStart: Ge,
          onListChangeEnd: Se,
          onContextmenu: Zt,
          onScroll: Qn
        }, zo), null)])]
      });
    };
  }
});
var HZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, name: "file", theme: "outlined" };
function P$(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 lg = function(t, n) {
  var o = P$({}, t, n.attrs);
  return h(an, P$({}, o, {
    icon: HZ
  }), null);
};
lg.displayName = "FileOutlined";
lg.inheritAttrs = !1;
var jZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { tag: "path", attrs: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, name: "minus-square", theme: "outlined" };
function O$(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 kx = function(t, n) {
  var o = O$({}, t, n.attrs);
  return h(an, O$({}, o, {
    icon: jZ
  }), null);
};
kx.displayName = "MinusSquareOutlined";
kx.inheritAttrs = !1;
var KZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { tag: "path", attrs: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, name: "plus-square", theme: "outlined" };
function k$(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) {
      qZ(e, i, n[i]);
    });
  }
  return e;
}
function qZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ix = function(t, n) {
  var o = k$({}, t, n.attrs);
  return h(an, k$({}, o, {
    icon: KZ
  }), null);
};
Ix.displayName = "PlusSquareOutlined";
Ix.inheritAttrs = !1;
var YZ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "filled" };
function I$(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 Mx = function(t, n) {
  var o = I$({}, t, n.attrs);
  return h(an, I$({}, o, {
    icon: YZ
  }), null);
};
Mx.displayName = "CaretDownFilled";
Mx.inheritAttrs = !1;
function UZ(e, t, n, o, i) {
  const {
    isLeaf: r,
    expanded: a,
    loading: l
  } = n;
  let s = t;
  if (l)
    return h(_r, {
      class: `${e}-switcher-loading-icon`
    }, null);
  let u;
  i && typeof i == "object" && (u = i.showLeafIcon);
  let c = null;
  const d = `${e}-switcher-icon`;
  return r ? i ? u && o ? o(n) : (typeof i == "object" && !u ? c = h("span", {
    class: `${e}-switcher-leaf-line`
  }, null) : c = h(lg, {
    class: `${e}-switcher-line-icon`
  }, null), c) : null : (c = h(Mx, {
    class: d
  }, null), i && (c = a ? h(kx, {
    class: `${e}-switcher-line-icon`
  }, null) : h(Ix, {
    class: `${e}-switcher-line-icon`
  }, null)), typeof t == "function" ? s = t(O(O({}, n), {
    defaultIcon: c,
    switcherCls: d
  })) : Ao(s) && (s = _l(s, {
    class: d
  })), s || c);
}
const M$ = 4;
function XZ(e) {
  const {
    dropPosition: t,
    dropLevelOffset: n,
    prefixCls: o,
    indent: i,
    direction: r = "ltr"
  } = e, a = r === "ltr" ? "left" : "right", l = r === "ltr" ? "right" : "left", s = {
    [a]: `${-n * i + M$}px`,
    [l]: 0
  };
  switch (t) {
    case -1:
      s.top = "-3px";
      break;
    case 1:
      s.bottom = "-3px";
      break;
    default:
      s.bottom = "-3px", s[a] = `${i + M$}px`;
      break;
  }
  return h("div", {
    style: s,
    class: `${o}-drop-indicator`
  }, null);
}
const QZ = new tn("ant-tree-node-fx-do-not-use", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), ZZ = (e, t) => ({
  [`.${e}-switcher-icon`]: {
    display: "inline-block",
    fontSize: 10,
    verticalAlign: "baseline",
    svg: {
      transition: `transform ${t.motionDurationSlow}`
    }
  }
}), JZ = (e, t) => ({
  [`.${e}-drop-indicator`]: {
    position: "absolute",
    // it should displayed over the following node
    zIndex: 1,
    height: 2,
    backgroundColor: t.colorPrimary,
    borderRadius: 1,
    pointerEvents: "none",
    "&:after": {
      position: "absolute",
      top: -3,
      insetInlineStart: -6,
      width: 8,
      height: 8,
      backgroundColor: "transparent",
      border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
      borderRadius: "50%",
      content: '""'
    }
  }
}), eJ = (e, t) => {
  const {
    treeCls: n,
    treeNodeCls: o,
    treeNodePadding: i,
    treeTitleHeight: r
  } = t, a = (r - t.fontSizeLG) / 2, l = t.paddingXS;
  return {
    [n]: O(O({}, fn(t)), {
      background: t.colorBgContainer,
      borderRadius: t.borderRadius,
      transition: `background-color ${t.motionDurationSlow}`,
      [`&${n}-rtl`]: {
        // >>> Switcher
        [`${n}-switcher`]: {
          "&_close": {
            [`${n}-switcher-icon`]: {
              svg: {
                transform: "rotate(90deg)"
              }
            }
          }
        }
      },
      [`&-focused:not(:hover):not(${n}-active-focused)`]: O({}, Wa(t)),
      // =================== Virtual List ===================
      [`${n}-list-holder-inner`]: {
        alignItems: "flex-start"
      },
      [`&${n}-block-node`]: {
        [`${n}-list-holder-inner`]: {
          alignItems: "stretch",
          // >>> Title
          [`${n}-node-content-wrapper`]: {
            flex: "auto"
          },
          // >>> Drag
          [`${o}.dragging`]: {
            position: "relative",
            "&:after": {
              position: "absolute",
              top: 0,
              insetInlineEnd: 0,
              bottom: i,
              insetInlineStart: 0,
              border: `1px solid ${t.colorPrimary}`,
              opacity: 0,
              animationName: QZ,
              animationDuration: t.motionDurationSlow,
              animationPlayState: "running",
              animationFillMode: "forwards",
              content: '""',
              pointerEvents: "none"
            }
          }
        }
      },
      // ===================== TreeNode =====================
      [`${o}`]: {
        display: "flex",
        alignItems: "flex-start",
        padding: `0 0 ${i}px 0`,
        outline: "none",
        "&-rtl": {
          direction: "rtl"
        },
        // Disabled
        "&-disabled": {
          // >>> Title
          [`${n}-node-content-wrapper`]: {
            color: t.colorTextDisabled,
            cursor: "not-allowed",
            "&:hover": {
              background: "transparent"
            }
          }
        },
        [`&-active ${n}-node-content-wrapper`]: O({}, Wa(t)),
        [`&:not(${o}-disabled).filter-node ${n}-title`]: {
          color: "inherit",
          fontWeight: 500
        },
        "&-draggable": {
          [`${n}-draggable-icon`]: {
            width: r,
            lineHeight: `${r}px`,
            textAlign: "center",
            visibility: "visible",
            opacity: 0.2,
            transition: `opacity ${t.motionDurationSlow}`,
            [`${o}:hover &`]: {
              opacity: 0.45
            }
          },
          [`&${o}-disabled`]: {
            [`${n}-draggable-icon`]: {
              visibility: "hidden"
            }
          }
        }
      },
      // >>> Indent
      [`${n}-indent`]: {
        alignSelf: "stretch",
        whiteSpace: "nowrap",
        userSelect: "none",
        "&-unit": {
          display: "inline-block",
          width: r
        }
      },
      // >>> Drag Handler
      [`${n}-draggable-icon`]: {
        visibility: "hidden"
      },
      // >>> Switcher
      [`${n}-switcher`]: O(O({}, ZZ(e, t)), {
        position: "relative",
        flex: "none",
        alignSelf: "stretch",
        width: r,
        margin: 0,
        lineHeight: `${r}px`,
        textAlign: "center",
        cursor: "pointer",
        userSelect: "none",
        "&-noop": {
          cursor: "default"
        },
        "&_close": {
          [`${n}-switcher-icon`]: {
            svg: {
              transform: "rotate(-90deg)"
            }
          }
        },
        "&-loading-icon": {
          color: t.colorPrimary
        },
        "&-leaf-line": {
          position: "relative",
          zIndex: 1,
          display: "inline-block",
          width: "100%",
          height: "100%",
          // https://github.com/ant-design/ant-design/issues/31884
          "&:before": {
            position: "absolute",
            top: 0,
            insetInlineEnd: r / 2,
            bottom: -i,
            marginInlineStart: -1,
            borderInlineEnd: `1px solid ${t.colorBorder}`,
            content: '""'
          },
          "&:after": {
            position: "absolute",
            width: r / 2 * 0.8,
            height: r / 2,
            borderBottom: `1px solid ${t.colorBorder}`,
            content: '""'
          }
        }
      }),
      // >>> Checkbox
      [`${n}-checkbox`]: {
        top: "initial",
        marginInlineEnd: l,
        marginBlockStart: a
      },
      // >>> Title
      // add `${treeCls}-checkbox + span` to cover checkbox `${checkboxCls} + span`
      [`${n}-node-content-wrapper, ${n}-checkbox + span`]: {
        position: "relative",
        zIndex: "auto",
        minHeight: r,
        margin: 0,
        padding: `0 ${t.paddingXS / 2}px`,
        color: "inherit",
        lineHeight: `${r}px`,
        background: "transparent",
        borderRadius: t.borderRadius,
        cursor: "pointer",
        transition: `all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,
        "&:hover": {
          backgroundColor: t.controlItemBgHover
        },
        [`&${n}-node-selected`]: {
          backgroundColor: t.controlItemBgActive
        },
        // Icon
        [`${n}-iconEle`]: {
          display: "inline-block",
          width: r,
          height: r,
          lineHeight: `${r}px`,
          textAlign: "center",
          verticalAlign: "top",
          "&:empty": {
            display: "none"
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/28217
      [`${n}-unselectable ${n}-node-content-wrapper:hover`]: {
        backgroundColor: "transparent"
      },
      // ==================== Draggable =====================
      [`${n}-node-content-wrapper`]: O({
        lineHeight: `${r}px`,
        userSelect: "none"
      }, JZ(e, t)),
      [`${o}.drop-container`]: {
        "> [draggable]": {
          boxShadow: `0 0 0 2px ${t.colorPrimary}`
        }
      },
      // ==================== Show Line =====================
      "&-show-line": {
        // ================ Indent lines ================
        [`${n}-indent`]: {
          "&-unit": {
            position: "relative",
            height: "100%",
            "&:before": {
              position: "absolute",
              top: 0,
              insetInlineEnd: r / 2,
              bottom: -i,
              borderInlineEnd: `1px solid ${t.colorBorder}`,
              content: '""'
            },
            "&-end": {
              "&:before": {
                display: "none"
              }
            }
          }
        },
        // ============== Cover Background ==============
        [`${n}-switcher`]: {
          background: "transparent",
          "&-line-icon": {
            // https://github.com/ant-design/ant-design/issues/32813
            verticalAlign: "-0.15em"
          }
        }
      },
      [`${o}-leaf-last`]: {
        [`${n}-switcher`]: {
          "&-leaf-line": {
            "&:before": {
              top: "auto !important",
              bottom: "auto !important",
              height: `${r / 2}px !important`
            }
          }
        }
      }
    })
  };
}, tJ = (e) => {
  const {
    treeCls: t,
    treeNodeCls: n,
    treeNodePadding: o
  } = e;
  return {
    [`${t}${t}-directory`]: {
      // ================== TreeNode ==================
      [n]: {
        position: "relative",
        // Hover color
        "&:before": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: o,
          insetInlineStart: 0,
          transition: `background-color ${e.motionDurationMid}`,
          content: '""',
          pointerEvents: "none"
        },
        "&:hover": {
          "&:before": {
            background: e.controlItemBgHover
          }
        },
        // Elements
        "> *": {
          zIndex: 1
        },
        // >>> Switcher
        [`${t}-switcher`]: {
          transition: `color ${e.motionDurationMid}`
        },
        // >>> Title
        [`${t}-node-content-wrapper`]: {
          borderRadius: 0,
          userSelect: "none",
          "&:hover": {
            background: "transparent"
          },
          [`&${t}-node-selected`]: {
            color: e.colorTextLightSolid,
            background: "transparent"
          }
        },
        // ============= Selected =============
        "&-selected": {
          "\n            &:hover::before,\n            &::before\n          ": {
            background: e.colorPrimary
          },
          // >>> Switcher
          [`${t}-switcher`]: {
            color: e.colorTextLightSolid
          },
          // >>> Title
          [`${t}-node-content-wrapper`]: {
            color: e.colorTextLightSolid,
            background: "transparent"
          }
        }
      }
    }
  };
}, nJ = (e, t) => {
  const n = `.${e}`, o = `${n}-treenode`, i = t.paddingXS / 2, r = t.controlHeightSM, a = Qt(t, {
    treeCls: n,
    treeNodeCls: o,
    treeNodePadding: i,
    treeTitleHeight: r
  });
  return [
    // Basic
    eJ(e, a),
    // Directory
    tJ(a)
  ];
}, oJ = On("Tree", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [{
    [e.componentCls]: p_(`${n}-checkbox`, e)
  }, nJ(n, e), Vh(e)];
}), A2 = () => {
  const e = GT();
  return O(O({}, e), {
    showLine: en([Boolean, Object]),
    /** 是否支持多选 */
    multiple: ct(),
    /** 是否自动展开父节点 */
    autoExpandParent: ct(),
    /** checkable状态下节点选择完全受控（父子节点选中状态不再关联）*/
    checkStrictly: ct(),
    /** 是否支持选中 */
    checkable: ct(),
    /** 是否禁用树 */
    disabled: ct(),
    /** 默认展开所有树节点 */
    defaultExpandAll: ct(),
    /** 默认展开对应树节点 */
    defaultExpandParent: ct(),
    /** 默认展开指定的树节点 */
    defaultExpandedKeys: Vn(),
    /** （受控）展开指定的树节点 */
    expandedKeys: Vn(),
    /** （受控）选中复选框的树节点 */
    checkedKeys: en([Array, Object]),
    /** 默认选中复选框的树节点 */
    defaultCheckedKeys: Vn(),
    /** （受控）设置选中的树节点 */
    selectedKeys: Vn(),
    /** 默认选中的树节点 */
    defaultSelectedKeys: Vn(),
    selectable: ct(),
    loadedKeys: Vn(),
    draggable: ct(),
    showIcon: ct(),
    icon: et(),
    switcherIcon: pe.any,
    prefixCls: String,
    /**
     * @default{title,key,children}
     * deprecated, please use `fieldNames` instead
     * 替换treeNode中 title,key,children字段为treeData中对应的字段
     */
    replaceFields: _t(),
    blockNode: ct(),
    openAnimation: pe.any,
    onDoubleclick: e.onDblclick,
    "onUpdate:selectedKeys": et(),
    "onUpdate:checkedKeys": et(),
    "onUpdate:expandedKeys": et()
  });
}, gp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATree",
  inheritAttrs: !1,
  props: _n(A2(), {
    checkable: !1,
    selectable: !0,
    showIcon: !1,
    blockNode: !1
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: i,
      slots: r
    } = t;
    wn(!(e.treeData === void 0 && r.default), "`children` of Tree is deprecated. Please use `treeData` instead.");
    const {
      prefixCls: a,
      direction: l,
      virtual: s
    } = Rt("tree", e), [u, c] = oJ(a), d = le();
    o({
      treeRef: d,
      onNodeExpand: function() {
        var m;
        (m = d.value) === null || m === void 0 || m.onNodeExpand(...arguments);
      },
      scrollTo: (m) => {
        var x;
        (x = d.value) === null || x === void 0 || x.scrollTo(m);
      },
      selectedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.selectedKeys;
      }),
      checkedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.checkedKeys;
      }),
      halfCheckedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.halfCheckedKeys;
      }),
      loadedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.loadedKeys;
      }),
      loadingKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.loadingKeys;
      }),
      expandedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.expandedKeys;
      })
    }), It(() => {
      dn(e.replaceFields === void 0, "Tree", "`replaceFields` is deprecated, please use fieldNames instead");
    });
    const p = (m, x) => {
      i("update:checkedKeys", m), i("check", m, x);
    }, v = (m, x) => {
      i("update:expandedKeys", m), i("expand", m, x);
    }, g = (m, x) => {
      i("update:selectedKeys", m), i("select", m, x);
    };
    return () => {
      const {
        showIcon: m,
        showLine: x,
        switcherIcon: S = r.switcherIcon,
        icon: C = r.icon,
        blockNode: P,
        checkable: $,
        selectable: I,
        fieldNames: w = e.replaceFields,
        motion: M = e.openAnimation,
        itemHeight: _ = 28,
        onDoubleclick: N,
        onDblclick: R
      } = e, H = O(O(O({}, n), Bn(e, ["onUpdate:checkedKeys", "onUpdate:expandedKeys", "onUpdate:selectedKeys", "onDoubleclick"])), {
        showLine: !!x,
        dropIndicatorRender: XZ,
        fieldNames: w,
        icon: C,
        itemHeight: _
      }), L = r.default ? Do(r.default()) : void 0;
      return u(h(LZ, Q(Q({}, H), {}, {
        virtual: s.value,
        motion: M,
        ref: d,
        prefixCls: a.value,
        class: _e({
          [`${a.value}-icon-hide`]: !m,
          [`${a.value}-block-node`]: P,
          [`${a.value}-unselectable`]: !I,
          [`${a.value}-rtl`]: l.value === "rtl"
        }, n.class, c.value),
        direction: l.value,
        checkable: $,
        selectable: I,
        switcherIcon: (B) => UZ(a.value, S, B, r.leafIcon, x),
        onCheck: p,
        onExpand: v,
        onSelect: g,
        onDblclick: R || N,
        children: L
      }), O(O({}, r), {
        checkable: () => h("span", {
          class: `${a.value}-checkbox-inner`
        }, null)
      })));
    };
  }
});
var iJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z" } }] }, name: "folder-open", theme: "outlined" };
function T$(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) {
      rJ(e, i, n[i]);
    });
  }
  return e;
}
function rJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Tx = function(t, n) {
  var o = T$({}, t, n.attrs);
  return h(an, T$({}, o, {
    icon: iJ
  }), null);
};
Tx.displayName = "FolderOpenOutlined";
Tx.inheritAttrs = !1;
var aJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, name: "folder", theme: "outlined" };
function _$(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) {
      lJ(e, i, n[i]);
    });
  }
  return e;
}
function lJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var _x = function(t, n) {
  var o = _$({}, t, n.attrs);
  return h(an, _$({}, o, {
    icon: aJ
  }), null);
};
_x.displayName = "FolderOutlined";
_x.inheritAttrs = !1;
var ka;
(function(e) {
  e[e.None = 0] = "None", e[e.Start = 1] = "Start", e[e.End = 2] = "End";
})(ka || (ka = {}));
function Ex(e, t, n) {
  function o(i) {
    const r = i[t.key], a = i[t.children];
    n(r, i) !== !1 && Ex(a || [], t, n);
  }
  e.forEach(o);
}
function sJ(e) {
  let {
    treeData: t,
    expandedKeys: n,
    startKey: o,
    endKey: i,
    fieldNames: r = {
      title: "title",
      key: "key",
      children: "children"
    }
  } = e;
  const a = [];
  let l = ka.None;
  if (o && o === i)
    return [o];
  if (!o || !i)
    return [];
  function s(u) {
    return u === o || u === i;
  }
  return Ex(t, r, (u) => {
    if (l === ka.End)
      return !1;
    if (s(u)) {
      if (a.push(u), l === ka.None)
        l = ka.Start;
      else if (l === ka.Start)
        return l = ka.End, !1;
    } else l === ka.Start && a.push(u);
    return n.includes(u);
  }), a;
}
function Av(e, t, n) {
  const o = [...t], i = [];
  return Ex(e, n, (r, a) => {
    const l = o.indexOf(r);
    return l !== -1 && (i.push(a), o.splice(l, 1)), !!o.length;
  }), i;
}
var uJ = 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 cJ = () => O(O({}, A2()), {
  expandAction: en([Boolean, String])
});
function dJ(e) {
  const {
    isLeaf: t,
    expanded: n
  } = e;
  return t ? h(lg, null, null) : n ? h(Tx, null, null) : h(_x, null, null);
}
const Rv = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADirectoryTree",
  inheritAttrs: !1,
  props: _n(cJ(), {
    showIcon: !0,
    expandAction: "click"
  }),
  slots: Object,
  // emits: [
  //   'update:selectedKeys',
  //   'update:checkedKeys',
  //   'update:expandedKeys',
  //   'expand',
  //   'select',
  //   'check',
  //   'doubleclick',
  //   'dblclick',
  //   'click',
  // ],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: i,
      expose: r
    } = t;
    var a;
    const l = le(e.treeData || pb(Do((a = o.default) === null || a === void 0 ? void 0 : a.call(o))));
    Ie(() => e.treeData, () => {
      l.value = e.treeData;
    }), Ya(() => {
      Yt(() => {
        var _;
        e.treeData === void 0 && o.default && (l.value = pb(Do((_ = o.default) === null || _ === void 0 ? void 0 : _.call(o))));
      });
    });
    const s = le(), u = le(), c = E(() => Zh(e.fieldNames)), d = le();
    r({
      scrollTo: (_) => {
        var N;
        (N = d.value) === null || N === void 0 || N.scrollTo(_);
      },
      selectedKeys: E(() => {
        var _;
        return (_ = d.value) === null || _ === void 0 ? void 0 : _.selectedKeys;
      }),
      checkedKeys: E(() => {
        var _;
        return (_ = d.value) === null || _ === void 0 ? void 0 : _.checkedKeys;
      }),
      halfCheckedKeys: E(() => {
        var _;
        return (_ = d.value) === null || _ === void 0 ? void 0 : _.halfCheckedKeys;
      }),
      loadedKeys: E(() => {
        var _;
        return (_ = d.value) === null || _ === void 0 ? void 0 : _.loadedKeys;
      }),
      loadingKeys: E(() => {
        var _;
        return (_ = d.value) === null || _ === void 0 ? void 0 : _.loadingKeys;
      }),
      expandedKeys: E(() => {
        var _;
        return (_ = d.value) === null || _ === void 0 ? void 0 : _.expandedKeys;
      })
    });
    const p = () => {
      const {
        keyEntities: _
      } = tx(l.value, {
        fieldNames: c.value
      });
      let N;
      return e.defaultExpandAll ? N = Object.keys(_) : e.defaultExpandParent ? N = fb(e.expandedKeys || e.defaultExpandedKeys || [], _) : N = e.expandedKeys || e.defaultExpandedKeys, N;
    }, v = le(e.selectedKeys || e.defaultSelectedKeys || []), g = le(p());
    Ie(() => e.selectedKeys, () => {
      e.selectedKeys !== void 0 && (v.value = e.selectedKeys);
    }, {
      immediate: !0
    }), Ie(() => e.expandedKeys, () => {
      e.expandedKeys !== void 0 && (g.value = e.expandedKeys);
    }, {
      immediate: !0
    });
    const x = zP((_, N) => {
      const {
        isLeaf: R
      } = N;
      R || _.shiftKey || _.metaKey || _.ctrlKey || d.value.onNodeExpand(_, N);
    }, 200, {
      leading: !0
    }), S = (_, N) => {
      e.expandedKeys === void 0 && (g.value = _), i("update:expandedKeys", _), i("expand", _, N);
    }, C = (_, N) => {
      const {
        expandAction: R
      } = e;
      R === "click" && x(_, N), i("click", _, N);
    }, P = (_, N) => {
      const {
        expandAction: R
      } = e;
      (R === "dblclick" || R === "doubleclick") && x(_, N), i("doubleclick", _, N), i("dblclick", _, N);
    }, $ = (_, N) => {
      const {
        multiple: R
      } = e, {
        node: H,
        nativeEvent: L
      } = N, B = H[c.value.key], A = O(O({}, N), {
        selected: !0
      }), G = L?.ctrlKey || L?.metaKey, j = L?.shiftKey;
      let Z;
      R && G ? (Z = _, s.value = B, u.value = Z, A.selectedNodes = Av(l.value, Z, c.value)) : R && j ? (Z = Array.from(/* @__PURE__ */ new Set([...u.value || [], ...sJ({
        treeData: l.value,
        expandedKeys: g.value,
        startKey: B,
        endKey: s.value,
        fieldNames: c.value
      })])), A.selectedNodes = Av(l.value, Z, c.value)) : (Z = [B], s.value = B, u.value = Z, A.selectedNodes = Av(l.value, Z, c.value)), i("update:selectedKeys", Z), i("select", Z, A), e.selectedKeys === void 0 && (v.value = Z);
    }, I = (_, N) => {
      i("update:checkedKeys", _), i("check", _, N);
    }, {
      prefixCls: w,
      direction: M
    } = Rt("tree", e);
    return () => {
      const _ = _e(`${w.value}-directory`, {
        [`${w.value}-directory-rtl`]: M.value === "rtl"
      }, n.class), {
        icon: N = o.icon,
        blockNode: R = !0
      } = e, H = uJ(e, ["icon", "blockNode"]);
      return h(gp, Q(Q(Q({}, n), {}, {
        icon: N || dJ,
        ref: d,
        blockNode: R
      }, H), {}, {
        prefixCls: w.value,
        class: _,
        expandedKeys: g.value,
        selectedKeys: v.value,
        onSelect: $,
        onClick: C,
        onDblclick: P,
        onExpand: S,
        onCheck: I
      }), o);
    };
  }
}), Nv = db, fJ = O(gp, {
  DirectoryTree: Rv,
  TreeNode: Nv,
  install: (e) => (e.component(gp.name, gp), e.component(Nv.name, Nv), e.component(Rv.name, Rv), e)
});
function E$(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const o = /* @__PURE__ */ new Set();
  function i(r, a) {
    let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
    const s = o.has(r);
    if (vi(!s, "Warning: There may be circular references"), s)
      return !1;
    if (r === a)
      return !0;
    if (n && l > 1)
      return !1;
    o.add(r);
    const u = l + 1;
    if (Array.isArray(r)) {
      if (!Array.isArray(a) || r.length !== a.length)
        return !1;
      for (let c = 0; c < r.length; c++)
        if (!i(r[c], a[c], u))
          return !1;
      return !0;
    }
    if (r && a && typeof r == "object" && typeof a == "object") {
      const c = Object.keys(r);
      return c.length !== Object.keys(a).length ? !1 : c.every((d) => i(r[d], a[d], u));
    }
    return !1;
  }
  return i(e, t);
}
const {
  SubMenu: pJ,
  Item: hJ
} = co;
function gJ(e) {
  return e.some((t) => {
    let {
      children: n
    } = t;
    return n && n.length > 0;
  });
}
function R2(e, t) {
  return typeof t == "string" || typeof t == "number" ? t?.toString().toLowerCase().includes(e.trim().toLowerCase()) : !1;
}
function N2(e) {
  let {
    filters: t,
    prefixCls: n,
    filteredKeys: o,
    filterMultiple: i,
    searchValue: r,
    filterSearch: a
  } = e;
  return t.map((l, s) => {
    const u = String(l.value);
    if (l.children)
      return h(pJ, {
        key: u || s,
        title: l.text,
        popupClassName: `${n}-dropdown-submenu`
      }, {
        default: () => [N2({
          filters: l.children,
          prefixCls: n,
          filteredKeys: o,
          filterMultiple: i,
          searchValue: r,
          filterSearch: a
        })]
      });
    const c = i ? Eo : Mo, d = h(hJ, {
      key: l.value !== void 0 ? u : s
    }, {
      default: () => [h(c, {
        checked: o.includes(u)
      }, null), h("span", null, [l.text])]
    });
    return r.trim() ? typeof a == "function" ? a(r, l) ? d : void 0 : R2(r, l.text) ? d : void 0 : d;
  });
}
const vJ = be({
  name: "FilterDropdown",
  props: ["tablePrefixCls", "prefixCls", "dropdownPrefixCls", "column", "filterState", "filterMultiple", "filterMode", "filterSearch", "columnKey", "triggerFilter", "locale", "getPopupContainer"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = wx(), i = E(() => {
      var U;
      return (U = e.filterMode) !== null && U !== void 0 ? U : "menu";
    }), r = E(() => {
      var U;
      return (U = e.filterSearch) !== null && U !== void 0 ? U : !1;
    }), a = E(() => e.column.filterDropdownOpen || e.column.filterDropdownVisible), l = E(() => e.column.onFilterDropdownOpenChange || e.column.onFilterDropdownVisibleChange);
    process.env.NODE_ENV !== "production" && [["filterDropdownVisible", "filterDropdownOpen", e.column.filterDropdownVisible], ["onFilterDropdownVisibleChange", "onFilterDropdownOpenChange", e.column.onFilterDropdownVisibleChange]].forEach((U) => {
      let [ae, se, re] = U;
      dn(re == null, "Table", `\`${ae}\` is deprecated. Please use \`${se}\` instead.`);
    });
    const s = $e(!1), u = E(() => {
      var U;
      return !!(e.filterState && (!((U = e.filterState.filteredKeys) === null || U === void 0) && U.length || e.filterState.forceFiltered));
    }), c = E(() => {
      var U;
      return sg((U = e.column) === null || U === void 0 ? void 0 : U.filters);
    }), d = E(() => {
      const {
        filterDropdown: U,
        slots: ae = {},
        customFilterDropdown: se
      } = e.column;
      return U || ae.filterDropdown && o.value[ae.filterDropdown] || se && o.value.customFilterDropdown;
    }), f = E(() => {
      const {
        filterIcon: U,
        slots: ae = {}
      } = e.column;
      return U || ae.filterIcon && o.value[ae.filterIcon] || o.value.customFilterIcon;
    }), p = (U) => {
      var ae;
      s.value = U, (ae = l.value) === null || ae === void 0 || ae.call(l, U);
    }, v = E(() => typeof a.value == "boolean" ? a.value : s.value), g = E(() => {
      var U;
      return (U = e.filterState) === null || U === void 0 ? void 0 : U.filteredKeys;
    }), m = $e([]), x = (U) => {
      let {
        selectedKeys: ae
      } = U;
      m.value = ae;
    }, S = (U, ae) => {
      let {
        node: se,
        checked: re
      } = ae;
      e.filterMultiple ? x({
        selectedKeys: U
      }) : x({
        selectedKeys: re && se.key ? [se.key] : []
      });
    };
    Ie(g, () => {
      s.value && x({
        selectedKeys: g.value || []
      });
    }, {
      immediate: !0
    });
    const C = $e([]), P = $e(), $ = (U) => {
      P.value = setTimeout(() => {
        C.value = U;
      });
    }, I = () => {
      clearTimeout(P.value);
    };
    qt(() => {
      clearTimeout(P.value);
    });
    const w = $e(""), M = (U) => {
      const {
        value: ae
      } = U.target;
      w.value = ae;
    };
    Ie(s, () => {
      s.value || (w.value = "");
    });
    const _ = (U) => {
      const {
        column: ae,
        columnKey: se,
        filterState: re
      } = e, ie = U && U.length ? U : null;
      if (ie === null && (!re || !re.filteredKeys) || E$(ie, re?.filteredKeys, !0))
        return null;
      e.triggerFilter({
        column: ae,
        key: se,
        filteredKeys: ie
      });
    }, N = () => {
      p(!1), _(m.value);
    }, R = function() {
      let {
        confirm: U,
        closeDropdown: ae
      } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
        confirm: !1,
        closeDropdown: !1
      };
      U && _([]), ae && p(!1), w.value = "", e.column.filterResetToDefaultFilteredValue ? m.value = (e.column.defaultFilteredValue || []).map((se) => String(se)) : m.value = [];
    }, H = function() {
      let {
        closeDropdown: U
      } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
        closeDropdown: !0
      };
      U && p(!1), _(m.value);
    }, L = (U) => {
      U && g.value !== void 0 && (m.value = g.value || []), p(U), !U && !d.value && N();
    }, {
      direction: B
    } = Rt("", e), A = (U) => {
      if (U.target.checked) {
        const ae = c.value;
        m.value = ae;
      } else
        m.value = [];
    }, G = (U) => {
      let {
        filters: ae
      } = U;
      return (ae || []).map((se, re) => {
        const ie = String(se.value), te = {
          title: se.text,
          key: se.value !== void 0 ? ie : re
        };
        return se.children && (te.children = G({
          filters: se.children
        })), te;
      });
    }, j = (U) => {
      var ae;
      return O(O({}, U), {
        text: U.title,
        value: U.key,
        children: ((ae = U.children) === null || ae === void 0 ? void 0 : ae.map((se) => j(se))) || []
      });
    }, Z = E(() => G({
      filters: e.column.filters
    })), W = E(() => _e({
      [`${e.dropdownPrefixCls}-menu-without-submenu`]: !gJ(e.column.filters || [])
    })), K = () => {
      const U = m.value, {
        column: ae,
        locale: se,
        tablePrefixCls: re,
        filterMultiple: ie,
        dropdownPrefixCls: te,
        getPopupContainer: ve,
        prefixCls: ce
      } = e;
      return (ae.filters || []).length === 0 ? h(fs, {
        image: fs.PRESENTED_IMAGE_SIMPLE,
        description: se.filterEmptyText,
        imageStyle: {
          height: 24
        },
        style: {
          margin: 0,
          padding: "16px 0"
        }
      }, null) : i.value === "tree" ? h(Je, null, [h(m$, {
        filterSearch: r.value,
        value: w.value,
        onChange: M,
        tablePrefixCls: re,
        locale: se
      }, null), h("div", {
        class: `${re}-filter-dropdown-tree`
      }, [ie ? h(Eo, {
        class: `${re}-filter-dropdown-checkall`,
        onChange: A,
        checked: U.length === c.value.length,
        indeterminate: U.length > 0 && U.length < c.value.length
      }, {
        default: () => [se.filterCheckall]
      }) : null, h(fJ, {
        checkable: !0,
        selectable: !1,
        blockNode: !0,
        multiple: ie,
        checkStrictly: !ie,
        class: `${te}-menu`,
        onCheck: S,
        checkedKeys: U,
        selectedKeys: U,
        showIcon: !1,
        treeData: Z.value,
        autoExpandParent: !0,
        defaultExpandAll: !0,
        filterTreeNode: w.value.trim() ? (fe) => typeof r.value == "function" ? r.value(w.value, j(fe)) : R2(w.value, fe.title) : void 0
      }, null)])]) : h(Je, null, [h(m$, {
        filterSearch: r.value,
        value: w.value,
        onChange: M,
        tablePrefixCls: re,
        locale: se
      }, null), h(co, {
        multiple: ie,
        prefixCls: `${te}-menu`,
        class: W.value,
        onClick: I,
        onSelect: x,
        onDeselect: x,
        selectedKeys: U,
        getPopupContainer: ve,
        openKeys: C.value,
        onOpenChange: $
      }, {
        default: () => N2({
          filters: ae.filters || [],
          filterSearch: r.value,
          prefixCls: ce,
          filteredKeys: m.value,
          filterMultiple: ie,
          searchValue: w.value
        })
      })]);
    }, q = E(() => {
      const U = m.value;
      return e.column.filterResetToDefaultFilteredValue ? E$((e.column.defaultFilteredValue || []).map((ae) => String(ae)), U, !0) : U.length === 0;
    });
    return () => {
      var U;
      const {
        tablePrefixCls: ae,
        prefixCls: se,
        column: re,
        dropdownPrefixCls: ie,
        locale: te,
        getPopupContainer: ve
      } = e;
      let ce;
      typeof d.value == "function" ? ce = d.value({
        prefixCls: `${ie}-custom`,
        setSelectedKeys: (Me) => x({
          selectedKeys: Me
        }),
        selectedKeys: m.value,
        confirm: H,
        clearFilters: R,
        filters: re.filters,
        visible: v.value,
        column: re.__originColumn__,
        close: () => {
          p(!1);
        }
      }) : d.value ? ce = d.value : ce = h(Je, null, [K(), h("div", {
        class: `${se}-dropdown-btns`
      }, [h(Bt, {
        type: "link",
        size: "small",
        disabled: q.value,
        onClick: () => R()
      }, {
        default: () => [te.filterReset]
      }), h(Bt, {
        type: "primary",
        size: "small",
        onClick: N
      }, {
        default: () => [te.filterConfirm]
      })])]);
      const fe = h(EZ, {
        class: `${se}-dropdown`
      }, {
        default: () => [ce]
      });
      let ge;
      return typeof f.value == "function" ? ge = f.value({
        filtered: u.value,
        column: re.__originColumn__
      }) : f.value ? ge = f.value : ge = h(Ox, null, null), h("div", {
        class: `${se}-column`
      }, [h("span", {
        class: `${ae}-column-title`
      }, [(U = n.default) === null || U === void 0 ? void 0 : U.call(n)]), h(_i, {
        overlay: fe,
        trigger: ["click"],
        open: v.value,
        onOpenChange: L,
        getPopupContainer: ve,
        placement: B.value === "rtl" ? "bottomLeft" : "bottomRight"
      }, {
        default: () => [h("span", {
          role: "button",
          tabindex: -1,
          class: _e(`${se}-trigger`, {
            active: u.value
          }),
          onClick: (Me) => {
            Me.stopPropagation();
          }
        }, [ge])]
      })]);
    };
  }
});
function jb(e, t, n) {
  let o = [];
  return (e || []).forEach((i, r) => {
    var a, l;
    const s = Gd(r, n), u = i.filterDropdown || ((a = i?.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || i.customFilterDropdown;
    if (i.filters || u || "onFilter" in i)
      if ("filteredValue" in i) {
        let c = i.filteredValue;
        u || (c = (l = c?.map(String)) !== null && l !== void 0 ? l : c), o.push({
          column: i,
          key: As(i, s),
          filteredKeys: c,
          forceFiltered: i.filtered
        });
      } else
        o.push({
          column: i,
          key: As(i, s),
          filteredKeys: t && i.defaultFilteredValue ? i.defaultFilteredValue : void 0,
          forceFiltered: i.filtered
        });
    "children" in i && (o = [...o, ...jb(i.children, t, s)]);
  }), o;
}
function z2(e, t, n, o, i, r, a, l) {
  return n.map((s, u) => {
    var c;
    const d = Gd(u, l), {
      filterMultiple: f = !0,
      filterMode: p,
      filterSearch: v
    } = s;
    let g = s;
    const m = s.filterDropdown || ((c = s?.slots) === null || c === void 0 ? void 0 : c.filterDropdown) || s.customFilterDropdown;
    if (g.filters || m) {
      const x = As(g, d), S = o.find((C) => {
        let {
          key: P
        } = C;
        return x === P;
      });
      g = O(O({}, g), {
        title: (C) => h(vJ, {
          tablePrefixCls: e,
          prefixCls: `${e}-filter`,
          dropdownPrefixCls: t,
          column: g,
          columnKey: x,
          filterState: S,
          filterMultiple: f,
          filterMode: p,
          filterSearch: v,
          triggerFilter: r,
          locale: i,
          getPopupContainer: a
        }, {
          default: () => [Px(s.title, C)]
        })
      });
    }
    return "children" in g && (g = O(O({}, g), {
      children: z2(e, t, g.children, o, i, r, a, d)
    })), g;
  });
}
function sg(e) {
  let t = [];
  return (e || []).forEach((n) => {
    let {
      value: o,
      children: i
    } = n;
    t.push(o), i && (t = [...t, ...sg(i)]);
  }), t;
}
function D$(e) {
  const t = {};
  return e.forEach((n) => {
    let {
      key: o,
      filteredKeys: i,
      column: r
    } = n;
    var a;
    const l = r.filterDropdown || ((a = r?.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || r.customFilterDropdown, {
      filters: s
    } = r;
    if (l)
      t[o] = i || null;
    else if (Array.isArray(i)) {
      const u = sg(s);
      t[o] = u.filter((c) => i.includes(String(c)));
    } else
      t[o] = null;
  }), t;
}
function A$(e, t) {
  return t.reduce((n, o) => {
    const {
      column: {
        onFilter: i,
        filters: r
      },
      filteredKeys: a
    } = o;
    return i && a && a.length ? n.filter((l) => a.some((s) => {
      const u = sg(r), c = u.findIndex((f) => String(f) === String(s)), d = c !== -1 ? u[c] : s;
      return i(d, l);
    })) : n;
  }, e);
}
function B2(e) {
  return e.flatMap((t) => "children" in t ? [t, ...B2(t.children || [])] : [t]);
}
function mJ(e) {
  let {
    prefixCls: t,
    dropdownPrefixCls: n,
    mergedColumns: o,
    locale: i,
    onFilterChange: r,
    getPopupContainer: a
  } = e;
  const l = E(() => B2(o.value)), [s, u] = Cn(jb(l.value, !0)), c = E(() => {
    const v = jb(l.value, !1);
    if (v.length === 0)
      return v;
    let g = !0, m = !0;
    if (v.forEach((x) => {
      let {
        filteredKeys: S
      } = x;
      S !== void 0 ? g = !1 : m = !1;
    }), g) {
      const x = (l.value || []).map((S, C) => As(S, Gd(C)));
      return s.value.filter((S) => {
        let {
          key: C
        } = S;
        return x.includes(C);
      }).map((S) => {
        const C = l.value[x.findIndex((P) => P === S.key)];
        return O(O({}, S), {
          column: O(O({}, S.column), C),
          forceFiltered: C.filtered
        });
      });
    }
    return dn(m, "Table", "Columns should all contain `filteredValue` or not contain `filteredValue`."), v;
  }), d = E(() => D$(c.value)), f = (v) => {
    const g = c.value.filter((m) => {
      let {
        key: x
      } = m;
      return x !== v.key;
    });
    g.push(v), u(g), r(D$(g), g);
  };
  return [(v) => z2(t.value, n.value, v, c.value, i.value, f, a.value), c, d];
}
function F2(e, t) {
  return e.map((n) => {
    const o = O({}, n);
    return o.title = Px(o.title, t), "children" in o && (o.children = F2(o.children, t)), o;
  });
}
function bJ(e) {
  return [(n) => F2(n, e.value)];
}
function yJ(e) {
  return function(n) {
    let {
      prefixCls: o,
      onExpand: i,
      record: r,
      expanded: a,
      expandable: l
    } = n;
    const s = `${o}-row-expand-icon`;
    return h("button", {
      type: "button",
      onClick: (u) => {
        i(r, u), u.stopPropagation();
      },
      class: _e(s, {
        [`${s}-spaced`]: !l,
        [`${s}-expanded`]: l && a,
        [`${s}-collapsed`]: l && !a
      }),
      "aria-label": a ? e.collapse : e.expand,
      "aria-expanded": a
    }, null);
  };
}
function L2(e, t) {
  const n = t.value;
  return e.map((o) => {
    var i;
    if (o === vr || o === Yr) return o;
    const r = O({}, o), {
      slots: a = {}
    } = r;
    return r.__originColumn__ = o, dn(!("slots" in r), "Table", "`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."), Object.keys(a).forEach((l) => {
      const s = a[l];
      r[l] === void 0 && n[s] && (r[l] = n[s]);
    }), t.value.headerCell && !(!((i = o.slots) === null || i === void 0) && i.title) && (r.title = Dh(t.value, "headerCell", {
      title: o.title,
      column: o
    }, () => [o.title])), "children" in r && Array.isArray(r.children) && (r.children = L2(r.children, t)), r;
  });
}
function xJ(e) {
  return [(n) => L2(n, e)];
}
const wJ = (e) => {
  const {
    componentCls: t
  } = e, n = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`, o = (i, r, a) => ({
    [`&${t}-${i}`]: {
      [`> ${t}-container`]: {
        [`> ${t}-content, > ${t}-body`]: {
          "> table > tbody > tr > td": {
            [`> ${t}-expanded-row-fixed`]: {
              margin: `-${r}px -${a + e.lineWidth}px`
            }
          }
        }
      }
    }
  });
  return {
    [`${t}-wrapper`]: {
      [`${t}${t}-bordered`]: O(O(O({
        // ============================ Title =============================
        [`> ${t}-title`]: {
          border: n,
          borderBottom: 0
        },
        // ============================ Content ============================
        [`> ${t}-container`]: {
          borderInlineStart: n,
          [`
            > ${t}-content,
            > ${t}-header,
            > ${t}-body,
            > ${t}-summary
          `]: {
            "> table": {
              // ============================= Cell =============================
              "\n                > thead > tr > th,\n                > tbody > tr > td,\n                > tfoot > tr > th,\n                > tfoot > tr > td\n              ": {
                borderInlineEnd: n
              },
              // ============================ Header ============================
              "> thead": {
                "> tr:not(:last-child) > th": {
                  borderBottom: n
                },
                "> tr > th::before": {
                  backgroundColor: "transparent !important"
                }
              },
              // Fixed right should provides additional border
              "\n                > thead > tr,\n                > tbody > tr,\n                > tfoot > tr\n              ": {
                [`> ${t}-cell-fix-right-first::after`]: {
                  borderInlineEnd: n
                }
              },
              // ========================== Expandable ==========================
              "> tbody > tr > td": {
                [`> ${t}-expanded-row-fixed`]: {
                  margin: `-${e.tablePaddingVertical}px -${e.tablePaddingHorizontal + e.lineWidth}px`,
                  "&::after": {
                    position: "absolute",
                    top: 0,
                    insetInlineEnd: e.lineWidth,
                    bottom: 0,
                    borderInlineEnd: n,
                    content: '""'
                  }
                }
              }
            }
          },
          [`
            > ${t}-content,
            > ${t}-header
          `]: {
            "> table": {
              borderTop: n
            }
          }
        },
        // ============================ Scroll ============================
        [`&${t}-scroll-horizontal`]: {
          [`> ${t}-container > ${t}-body`]: {
            "> table > tbody": {
              [`
                > tr${t}-expanded-row,
                > tr${t}-placeholder
              `]: {
                "> td": {
                  borderInlineEnd: 0
                }
              }
            }
          }
        }
      }, o("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle)), o("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall)), {
        // ============================ Footer ============================
        [`> ${t}-footer`]: {
          border: n,
          borderTop: 0
        }
      }),
      // ============================ Nested ============================
      [`${t}-cell`]: {
        [`${t}-container:first-child`]: {
          // :first-child to avoid the case when bordered and title is set
          borderTop: 0
        },
        // https://github.com/ant-design/ant-design/issues/35577
        "&-scrollbar:not([rowspan])": {
          boxShadow: `0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`
        }
      }
    }
  };
}, SJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-cell-ellipsis`]: O(O({}, Va), {
        wordBreak: "keep-all",
        // Fixed first or last should special process
        [`
          &${t}-cell-fix-left-last,
          &${t}-cell-fix-right-first
        `]: {
          overflow: "visible",
          [`${t}-cell-content`]: {
            display: "block",
            overflow: "hidden",
            textOverflow: "ellipsis"
          }
        },
        [`${t}-column-title`]: {
          overflow: "hidden",
          textOverflow: "ellipsis",
          wordBreak: "keep-all"
        }
      })
    }
  };
}, CJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-tbody > tr${t}-placeholder`]: {
        textAlign: "center",
        color: e.colorTextDisabled,
        "&:hover > td": {
          background: e.colorBgContainer
        }
      }
    }
  };
}, $J = (e) => {
  const {
    componentCls: t,
    antCls: n,
    controlInteractiveSize: o,
    motionDurationSlow: i,
    lineWidth: r,
    paddingXS: a,
    lineType: l,
    tableBorderColor: s,
    tableExpandIconBg: u,
    tableExpandColumnWidth: c,
    borderRadius: d,
    fontSize: f,
    fontSizeSM: p,
    lineHeight: v,
    tablePaddingVertical: g,
    tablePaddingHorizontal: m,
    tableExpandedRowBg: x,
    paddingXXS: S
  } = e, C = o / 2 - r, P = C * 2 + r * 3, $ = `${r}px ${l} ${s}`, I = S - r;
  return {
    [`${t}-wrapper`]: {
      [`${t}-expand-icon-col`]: {
        width: c
      },
      [`${t}-row-expand-icon-cell`]: {
        textAlign: "center",
        [`${t}-row-expand-icon`]: {
          display: "inline-flex",
          float: "none",
          verticalAlign: "sub"
        }
      },
      [`${t}-row-indent`]: {
        height: 1,
        float: "left"
      },
      [`${t}-row-expand-icon`]: O(O({}, D8(e)), {
        position: "relative",
        float: "left",
        boxSizing: "border-box",
        width: P,
        height: P,
        padding: 0,
        color: "inherit",
        lineHeight: `${P}px`,
        background: u,
        border: $,
        borderRadius: d,
        transform: `scale(${o / P})`,
        transition: `all ${i}`,
        userSelect: "none",
        "&:focus, &:hover, &:active": {
          borderColor: "currentcolor"
        },
        "&::before, &::after": {
          position: "absolute",
          background: "currentcolor",
          transition: `transform ${i} ease-out`,
          content: '""'
        },
        "&::before": {
          top: C,
          insetInlineEnd: I,
          insetInlineStart: I,
          height: r
        },
        "&::after": {
          top: I,
          bottom: I,
          insetInlineStart: C,
          width: r,
          transform: "rotate(90deg)"
        },
        // Motion effect
        "&-collapsed::before": {
          transform: "rotate(-180deg)"
        },
        "&-collapsed::after": {
          transform: "rotate(0deg)"
        },
        "&-spaced": {
          "&::before, &::after": {
            display: "none",
            content: "none"
          },
          background: "transparent",
          border: 0,
          visibility: "hidden"
        }
      }),
      [`${t}-row-indent + ${t}-row-expand-icon`]: {
        marginTop: (f * v - r * 3) / 2 - Math.ceil((p * 1.4 - r * 3) / 2),
        marginInlineEnd: a
      },
      [`tr${t}-expanded-row`]: {
        "&, &:hover": {
          "> td": {
            background: x
          }
        },
        // https://github.com/ant-design/ant-design/issues/25573
        [`${n}-descriptions-view`]: {
          display: "flex",
          table: {
            flex: "auto",
            width: "auto"
          }
        }
      },
      // With fixed
      [`${t}-expanded-row-fixed`]: {
        position: "relative",
        margin: `-${g}px -${m}px`,
        padding: `${g}px ${m}px`
      }
    }
  };
}, PJ = (e) => {
  const {
    componentCls: t,
    antCls: n,
    iconCls: o,
    tableFilterDropdownWidth: i,
    tableFilterDropdownSearchWidth: r,
    paddingXXS: a,
    paddingXS: l,
    colorText: s,
    lineWidth: u,
    lineType: c,
    tableBorderColor: d,
    tableHeaderIconColor: f,
    fontSizeSM: p,
    tablePaddingHorizontal: v,
    borderRadius: g,
    motionDurationSlow: m,
    colorTextDescription: x,
    colorPrimary: S,
    tableHeaderFilterActiveBg: C,
    colorTextDisabled: P,
    tableFilterDropdownBg: $,
    tableFilterDropdownHeight: I,
    controlItemBgHover: w,
    controlItemBgActive: M,
    boxShadowSecondary: _
  } = e, N = `${n}-dropdown`, R = `${t}-filter-dropdown`, H = `${n}-tree`, L = `${u}px ${c} ${d}`;
  return [
    {
      [`${t}-wrapper`]: {
        [`${t}-filter-column`]: {
          display: "flex",
          justifyContent: "space-between"
        },
        [`${t}-filter-trigger`]: {
          position: "relative",
          display: "flex",
          alignItems: "center",
          marginBlock: -a,
          marginInline: `${a}px ${-v / 2}px`,
          padding: `0 ${a}px`,
          color: f,
          fontSize: p,
          borderRadius: g,
          cursor: "pointer",
          transition: `all ${m}`,
          "&:hover": {
            color: x,
            background: C
          },
          "&.active": {
            color: S
          }
        }
      }
    },
    {
      // Dropdown
      [`${n}-dropdown`]: {
        [R]: O(O({}, fn(e)), {
          minWidth: i,
          backgroundColor: $,
          borderRadius: g,
          boxShadow: _,
          // Reset menu
          [`${N}-menu`]: {
            // https://github.com/ant-design/ant-design/issues/4916
            // https://github.com/ant-design/ant-design/issues/19542
            maxHeight: I,
            overflowX: "hidden",
            border: 0,
            boxShadow: "none",
            "&:empty::after": {
              display: "block",
              padding: `${l}px 0`,
              color: P,
              fontSize: p,
              textAlign: "center",
              content: '"Not Found"'
            }
          },
          [`${R}-tree`]: {
            paddingBlock: `${l}px 0`,
            paddingInline: l,
            [H]: {
              padding: 0
            },
            [`${H}-treenode ${H}-node-content-wrapper:hover`]: {
              backgroundColor: w
            },
            [`${H}-treenode-checkbox-checked ${H}-node-content-wrapper`]: {
              "&, &:hover": {
                backgroundColor: M
              }
            }
          },
          [`${R}-search`]: {
            padding: l,
            borderBottom: L,
            "&-input": {
              input: {
                minWidth: r
              },
              [o]: {
                color: P
              }
            }
          },
          [`${R}-checkall`]: {
            width: "100%",
            marginBottom: a,
            marginInlineStart: a
          },
          // Operation
          [`${R}-btns`]: {
            display: "flex",
            justifyContent: "space-between",
            padding: `${l - u}px ${l}px`,
            overflow: "hidden",
            backgroundColor: "inherit",
            borderTop: L
          }
        })
      }
    },
    // Dropdown Menu & SubMenu
    {
      // submenu of table filter dropdown
      [`${n}-dropdown ${R}, ${R}-submenu`]: {
        // Checkbox
        [`${n}-checkbox-wrapper + span`]: {
          paddingInlineStart: l,
          color: s
        },
        "> ul": {
          maxHeight: "calc(100vh - 130px)",
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    }
  ];
}, OJ = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    colorSplit: o,
    motionDurationSlow: i,
    zIndexTableFixed: r,
    tableBg: a,
    zIndexTableSticky: l
  } = e, s = o;
  return {
    [`${t}-wrapper`]: {
      [`
        ${t}-cell-fix-left,
        ${t}-cell-fix-right
      `]: {
        position: "sticky !important",
        zIndex: r,
        background: a
      },
      [`
        ${t}-cell-fix-left-first::after,
        ${t}-cell-fix-left-last::after
      `]: {
        position: "absolute",
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: -n,
        width: 30,
        transform: "translateX(100%)",
        transition: `box-shadow ${i}`,
        content: '""',
        pointerEvents: "none"
      },
      [`${t}-cell-fix-left-all::after`]: {
        display: "none"
      },
      [`
        ${t}-cell-fix-right-first::after,
        ${t}-cell-fix-right-last::after
      `]: {
        position: "absolute",
        top: 0,
        bottom: -n,
        left: {
          _skip_check_: !0,
          value: 0
        },
        width: 30,
        transform: "translateX(-100%)",
        transition: `box-shadow ${i}`,
        content: '""',
        pointerEvents: "none"
      },
      [`${t}-container`]: {
        "&::before, &::after": {
          position: "absolute",
          top: 0,
          bottom: 0,
          zIndex: l + 1,
          width: 30,
          transition: `box-shadow ${i}`,
          content: '""',
          pointerEvents: "none"
        },
        "&::before": {
          insetInlineStart: 0
        },
        "&::after": {
          insetInlineEnd: 0
        }
      },
      [`${t}-ping-left`]: {
        [`&:not(${t}-has-fix-left) ${t}-container`]: {
          position: "relative",
          "&::before": {
            boxShadow: `inset 10px 0 8px -8px ${s}`
          }
        },
        [`
          ${t}-cell-fix-left-first::after,
          ${t}-cell-fix-left-last::after
        `]: {
          boxShadow: `inset 10px 0 8px -8px ${s}`
        },
        [`${t}-cell-fix-left-last::before`]: {
          backgroundColor: "transparent !important"
        }
      },
      [`${t}-ping-right`]: {
        [`&:not(${t}-has-fix-right) ${t}-container`]: {
          position: "relative",
          "&::after": {
            boxShadow: `inset -10px 0 8px -8px ${s}`
          }
        },
        [`
          ${t}-cell-fix-right-first::after,
          ${t}-cell-fix-right-last::after
        `]: {
          boxShadow: `inset -10px 0 8px -8px ${s}`
        }
      }
    }
  };
}, kJ = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e;
  return {
    [`${t}-wrapper`]: {
      // ========================== Pagination ==========================
      [`${t}-pagination${n}-pagination`]: {
        margin: `${e.margin}px 0`
      },
      [`${t}-pagination`]: {
        display: "flex",
        flexWrap: "wrap",
        rowGap: e.paddingXS,
        "> *": {
          flex: "none"
        },
        "&-left": {
          justifyContent: "flex-start"
        },
        "&-center": {
          justifyContent: "center"
        },
        "&-right": {
          justifyContent: "flex-end"
        }
      }
    }
  };
}, IJ = (e) => {
  const {
    componentCls: t,
    tableRadius: n
  } = e;
  return {
    [`${t}-wrapper`]: {
      [t]: {
        // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
        [`${t}-title, ${t}-header`]: {
          borderRadius: `${n}px ${n}px 0 0`
        },
        [`${t}-title + ${t}-container`]: {
          borderStartStartRadius: 0,
          borderStartEndRadius: 0,
          table: {
            borderRadius: 0,
            "> thead > tr:first-child": {
              "th:first-child": {
                borderRadius: 0
              },
              "th:last-child": {
                borderRadius: 0
              }
            }
          }
        },
        "&-container": {
          borderStartStartRadius: n,
          borderStartEndRadius: n,
          "table > thead > tr:first-child": {
            "> *:first-child": {
              borderStartStartRadius: n
            },
            "> *:last-child": {
              borderStartEndRadius: n
            }
          }
        },
        "&-footer": {
          borderRadius: `0 0 ${n}px ${n}px`
        }
      }
    }
  };
}, MJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper-rtl`]: {
      direction: "rtl",
      table: {
        direction: "rtl"
      },
      [`${t}-pagination-left`]: {
        justifyContent: "flex-end"
      },
      [`${t}-pagination-right`]: {
        justifyContent: "flex-start"
      },
      [`${t}-row-expand-icon`]: {
        "&::after": {
          transform: "rotate(-90deg)"
        },
        "&-collapsed::before": {
          transform: "rotate(180deg)"
        },
        "&-collapsed::after": {
          transform: "rotate(0deg)"
        }
      }
    }
  };
}, TJ = (e) => {
  const {
    componentCls: t,
    antCls: n,
    iconCls: o,
    fontSizeIcon: i,
    paddingXS: r,
    tableHeaderIconColor: a,
    tableHeaderIconColorHover: l
  } = e;
  return {
    [`${t}-wrapper`]: {
      // ========================== Selections ==========================
      [`${t}-selection-col`]: {
        width: e.tableSelectionColumnWidth
      },
      [`${t}-bordered ${t}-selection-col`]: {
        width: e.tableSelectionColumnWidth + r * 2
      },
      [`
        table tr th${t}-selection-column,
        table tr td${t}-selection-column
      `]: {
        paddingInlineEnd: e.paddingXS,
        paddingInlineStart: e.paddingXS,
        textAlign: "center",
        [`${n}-radio-wrapper`]: {
          marginInlineEnd: 0
        }
      },
      [`table tr th${t}-selection-column${t}-cell-fix-left`]: {
        zIndex: e.zIndexTableFixed + 1
      },
      [`table tr th${t}-selection-column::after`]: {
        backgroundColor: "transparent !important"
      },
      [`${t}-selection`]: {
        position: "relative",
        display: "inline-flex",
        flexDirection: "column"
      },
      [`${t}-selection-extra`]: {
        position: "absolute",
        top: 0,
        zIndex: 1,
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        marginInlineStart: "100%",
        paddingInlineStart: `${e.tablePaddingHorizontal / 4}px`,
        [o]: {
          color: a,
          fontSize: i,
          verticalAlign: "baseline",
          "&:hover": {
            color: l
          }
        }
      }
    }
  };
}, _J = (e) => {
  const {
    componentCls: t
  } = e, n = (o, i, r, a) => ({
    [`${t}${t}-${o}`]: {
      fontSize: a,
      [`
        ${t}-title,
        ${t}-footer,
        ${t}-thead > tr > th,
        ${t}-tbody > tr > td,
        tfoot > tr > th,
        tfoot > tr > td
      `]: {
        padding: `${i}px ${r}px`
      },
      [`${t}-filter-trigger`]: {
        marginInlineEnd: `-${r / 2}px`
      },
      [`${t}-expanded-row-fixed`]: {
        margin: `-${i}px -${r}px`
      },
      [`${t}-tbody`]: {
        // ========================= Nest Table ===========================
        [`${t}-wrapper:only-child ${t}`]: {
          marginBlock: `-${i}px`,
          marginInline: `${e.tableExpandColumnWidth - r}px -${r}px`
        }
      },
      // https://github.com/ant-design/ant-design/issues/35167
      [`${t}-selection-column`]: {
        paddingInlineStart: `${r / 4}px`
      }
    }
  });
  return {
    [`${t}-wrapper`]: O(O({}, n("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle, e.tableFontSizeMiddle)), n("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall, e.tableFontSizeSmall))
  };
}, EJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper ${t}-resize-handle`]: {
      position: "absolute",
      top: 0,
      height: "100% !important",
      bottom: 0,
      left: " auto !important",
      right: " -8px",
      cursor: "col-resize",
      touchAction: "none",
      userSelect: "auto",
      width: "16px",
      zIndex: 1,
      "&-line": {
        display: "block",
        width: "1px",
        marginLeft: "7px",
        height: "100% !important",
        backgroundColor: e.colorPrimary,
        opacity: 0
      },
      "&:hover &-line": {
        opacity: 1
      }
    },
    [`${t}-wrapper  ${t}-resize-handle.dragging`]: {
      overflow: "hidden",
      [`${t}-resize-handle-line`]: {
        opacity: 1
      },
      "&:before": {
        position: "absolute",
        top: 0,
        bottom: 0,
        content: '" "',
        width: "200vw",
        transform: "translateX(-50%)",
        opacity: 0
      }
    }
  };
}, DJ = (e) => {
  const {
    componentCls: t,
    marginXXS: n,
    fontSizeIcon: o,
    tableHeaderIconColor: i,
    tableHeaderIconColorHover: r
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-thead th${t}-column-has-sorters`]: {
        outline: "none",
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        "&:hover": {
          background: e.tableHeaderSortHoverBg,
          "&::before": {
            backgroundColor: "transparent !important"
          }
        },
        "&:focus-visible": {
          color: e.colorPrimary
        },
        // https://github.com/ant-design/ant-design/issues/30969
        [`
          &${t}-cell-fix-left:hover,
          &${t}-cell-fix-right:hover
        `]: {
          background: e.tableFixedHeaderSortActiveBg
        }
      },
      [`${t}-thead th${t}-column-sort`]: {
        background: e.tableHeaderSortBg,
        "&::before": {
          backgroundColor: "transparent !important"
        }
      },
      [`td${t}-column-sort`]: {
        background: e.tableBodySortBg
      },
      [`${t}-column-title`]: {
        position: "relative",
        zIndex: 1,
        flex: 1
      },
      [`${t}-column-sorters`]: {
        display: "flex",
        flex: "auto",
        alignItems: "center",
        justifyContent: "space-between",
        "&::after": {
          position: "absolute",
          inset: 0,
          width: "100%",
          height: "100%",
          content: '""'
        }
      },
      [`${t}-column-sorter`]: {
        marginInlineStart: n,
        color: i,
        fontSize: 0,
        transition: `color ${e.motionDurationSlow}`,
        "&-inner": {
          display: "inline-flex",
          flexDirection: "column",
          alignItems: "center"
        },
        "&-up, &-down": {
          fontSize: o,
          "&.active": {
            color: e.colorPrimary
          }
        },
        [`${t}-column-sorter-up + ${t}-column-sorter-down`]: {
          marginTop: "-0.3em"
        }
      },
      [`${t}-column-sorters:hover ${t}-column-sorter`]: {
        color: r
      }
    }
  };
}, AJ = (e) => {
  const {
    componentCls: t,
    opacityLoading: n,
    tableScrollThumbBg: o,
    tableScrollThumbBgHover: i,
    tableScrollThumbSize: r,
    tableScrollBg: a,
    zIndexTableSticky: l
  } = e, s = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;
  return {
    [`${t}-wrapper`]: {
      [`${t}-sticky`]: {
        "&-holder": {
          position: "sticky",
          zIndex: l,
          background: e.colorBgContainer
        },
        "&-scroll": {
          position: "sticky",
          bottom: 0,
          height: `${r}px !important`,
          zIndex: l,
          display: "flex",
          alignItems: "center",
          background: a,
          borderTop: s,
          opacity: n,
          "&:hover": {
            transformOrigin: "center bottom"
          },
          // fake scrollbar style of sticky
          "&-bar": {
            height: r,
            backgroundColor: o,
            borderRadius: 100,
            transition: `all ${e.motionDurationSlow}, transform none`,
            position: "absolute",
            bottom: 0,
            "&:hover, &-active": {
              backgroundColor: i
            }
          }
        }
      }
    }
  };
}, R$ = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    tableBorderColor: o
  } = e, i = `${n}px ${e.lineType} ${o}`;
  return {
    [`${t}-wrapper`]: {
      [`${t}-summary`]: {
        position: "relative",
        zIndex: e.zIndexTableFixed,
        background: e.tableBg,
        "> tr": {
          "> th, > td": {
            borderBottom: i
          }
        }
      },
      [`div${t}-summary`]: {
        boxShadow: `0 -${n}px 0 ${o}`
      }
    }
  };
}, RJ = (e) => {
  const {
    componentCls: t,
    fontWeightStrong: n,
    tablePaddingVertical: o,
    tablePaddingHorizontal: i,
    lineWidth: r,
    lineType: a,
    tableBorderColor: l,
    tableFontSize: s,
    tableBg: u,
    tableRadius: c,
    tableHeaderTextColor: d,
    motionDurationMid: f,
    tableHeaderBg: p,
    tableHeaderCellSplitColor: v,
    tableRowHoverBg: g,
    tableSelectedRowBg: m,
    tableSelectedRowHoverBg: x,
    tableFooterTextColor: S,
    tableFooterBg: C,
    paddingContentVerticalLG: P
  } = e, $ = `${r}px ${a} ${l}`;
  return {
    [`${t}-wrapper`]: O(O({
      clear: "both",
      maxWidth: "100%"
    }, ja()), {
      [t]: O(O({}, fn(e)), {
        fontSize: s,
        background: u,
        borderRadius: `${c}px ${c}px 0 0`
      }),
      // https://github.com/ant-design/ant-design/issues/17611
      table: {
        width: "100%",
        textAlign: "start",
        borderRadius: `${c}px ${c}px 0 0`,
        borderCollapse: "separate",
        borderSpacing: 0
      },
      // ============================= Cell =============================
      [`
          ${t}-thead > tr > th,
          ${t}-tbody > tr > td,
          tfoot > tr > th,
          tfoot > tr > td
        `]: {
        position: "relative",
        padding: `${P}px ${i}px`,
        overflowWrap: "break-word"
      },
      // ============================ Title =============================
      [`${t}-title`]: {
        padding: `${o}px ${i}px`
      },
      // ============================ Header ============================
      [`${t}-thead`]: {
        "\n          > tr > th,\n          > tr > td\n        ": {
          position: "relative",
          color: d,
          fontWeight: n,
          textAlign: "start",
          background: p,
          borderBottom: $,
          transition: `background ${f} ease`,
          "&[colspan]:not([colspan='1'])": {
            textAlign: "center"
          },
          [`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]: {
            position: "absolute",
            top: "50%",
            insetInlineEnd: 0,
            width: 1,
            height: "1.6em",
            backgroundColor: v,
            transform: "translateY(-50%)",
            transition: `background-color ${f}`,
            content: '""'
          }
        },
        "> tr:not(:last-child) > th[colspan]": {
          borderBottom: 0
        }
      },
      // ============================ Body ============================
      // Borderless Table has unique hover style, which would be implemented with `borderTop`.
      [`${t}:not(${t}-bordered)`]: {
        [`${t}-tbody`]: {
          "> tr": {
            "> td": {
              borderTop: $,
              borderBottom: "transparent"
            },
            "&:last-child > td": {
              borderBottom: $
            },
            [`&:first-child > td,
              &${t}-measure-row + tr > td`]: {
              borderTop: "none",
              borderTopColor: "transparent"
            }
          }
        }
      },
      // Bordered Table remains simple `borderBottom`.
      // Ref issue: https://github.com/ant-design/ant-design/issues/38724
      [`${t}${t}-bordered`]: {
        [`${t}-tbody`]: {
          "> tr": {
            "> td": {
              borderBottom: $
            }
          }
        }
      },
      [`${t}-tbody`]: {
        "> tr": {
          "> td": {
            transition: `background ${f}, border-color ${f}`,
            // ========================= Nest Table ===========================
            [`
              > ${t}-wrapper:only-child,
              > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
            `]: {
              [t]: {
                marginBlock: `-${o}px`,
                marginInline: `${e.tableExpandColumnWidth - i}px -${i}px`,
                [`${t}-tbody > tr:last-child > td`]: {
                  borderBottom: 0,
                  "&:first-child, &:last-child": {
                    borderRadius: 0
                  }
                }
              }
            }
          },
          [`
            &${t}-row:hover > td,
            > td${t}-cell-row-hover
          `]: {
            background: g
          },
          [`&${t}-row-selected`]: {
            "> td": {
              background: m
            },
            "&:hover > td": {
              background: x
            }
          }
        }
      },
      // ============================ Footer ============================
      [`${t}-footer`]: {
        padding: `${o}px ${i}px`,
        color: S,
        background: C
      }
    })
  };
}, NJ = On("Table", (e) => {
  const {
    controlItemBgActive: t,
    controlItemBgActiveHover: n,
    colorTextPlaceholder: o,
    colorTextHeading: i,
    colorSplit: r,
    colorBorderSecondary: a,
    fontSize: l,
    padding: s,
    paddingXS: u,
    paddingSM: c,
    controlHeight: d,
    colorFillAlter: f,
    colorIcon: p,
    colorIconHover: v,
    opacityLoading: g,
    colorBgContainer: m,
    borderRadiusLG: x,
    colorFillContent: S,
    colorFillSecondary: C,
    controlInteractiveSize: P
  } = e, $ = new In(p), I = new In(v), w = t, M = 2, _ = new In(C).onBackground(m).toHexString(), N = new In(S).onBackground(m).toHexString(), R = new In(f).onBackground(m).toHexString(), H = Qt(e, {
    tableFontSize: l,
    tableBg: m,
    tableRadius: x,
    tablePaddingVertical: s,
    tablePaddingHorizontal: s,
    tablePaddingVerticalMiddle: c,
    tablePaddingHorizontalMiddle: u,
    tablePaddingVerticalSmall: u,
    tablePaddingHorizontalSmall: u,
    tableBorderColor: a,
    tableHeaderTextColor: i,
    tableHeaderBg: R,
    tableFooterTextColor: i,
    tableFooterBg: R,
    tableHeaderCellSplitColor: a,
    tableHeaderSortBg: _,
    tableHeaderSortHoverBg: N,
    tableHeaderIconColor: $.clone().setAlpha($.getAlpha() * g).toRgbString(),
    tableHeaderIconColorHover: I.clone().setAlpha(I.getAlpha() * g).toRgbString(),
    tableBodySortBg: R,
    tableFixedHeaderSortActiveBg: _,
    tableHeaderFilterActiveBg: S,
    tableFilterDropdownBg: m,
    tableRowHoverBg: R,
    tableSelectedRowBg: w,
    tableSelectedRowHoverBg: n,
    zIndexTableFixed: M,
    zIndexTableSticky: M + 1,
    tableFontSizeMiddle: l,
    tableFontSizeSmall: l,
    tableSelectionColumnWidth: d,
    tableExpandIconBg: m,
    tableExpandColumnWidth: P + 2 * e.padding,
    tableExpandedRowBg: f,
    // Dropdown
    tableFilterDropdownWidth: 120,
    tableFilterDropdownHeight: 264,
    tableFilterDropdownSearchWidth: 140,
    // Virtual Scroll Bar
    tableScrollThumbSize: 8,
    tableScrollThumbBg: o,
    tableScrollThumbBgHover: i,
    tableScrollBg: r
  });
  return [RJ(H), kJ(H), R$(H), DJ(H), PJ(H), wJ(H), IJ(H), $J(H), R$(H), CJ(H), TJ(H), OJ(H), AJ(H), SJ(H), _J(H), EJ(H), MJ(H)];
}), zJ = [], H2 = () => ({
  prefixCls: rn(),
  columns: Vn(),
  rowKey: en([String, Function]),
  tableLayout: rn(),
  rowClassName: en([String, Function]),
  title: et(),
  footer: et(),
  id: rn(),
  showHeader: ct(),
  components: _t(),
  customRow: et(),
  customHeaderRow: et(),
  direction: rn(),
  expandFixed: en([Boolean, String]),
  expandColumnWidth: Number,
  expandedRowKeys: Vn(),
  defaultExpandedRowKeys: Vn(),
  expandedRowRender: et(),
  expandRowByClick: ct(),
  expandIcon: et(),
  onExpand: et(),
  onExpandedRowsChange: et(),
  "onUpdate:expandedRowKeys": et(),
  defaultExpandAllRows: ct(),
  indentSize: Number,
  /** @deprecated Please use `EXPAND_COLUMN` in `columns` directly */
  expandIconColumnIndex: Number,
  showExpandColumn: ct(),
  expandedRowClassName: et(),
  childrenColumnName: rn(),
  rowExpandable: et(),
  sticky: en([Boolean, Object]),
  dropdownPrefixCls: String,
  dataSource: Vn(),
  pagination: en([Boolean, Object]),
  loading: en([Boolean, Object]),
  size: rn(),
  bordered: ct(),
  locale: _t(),
  onChange: et(),
  onResizeColumn: et(),
  rowSelection: _t(),
  getPopupContainer: et(),
  scroll: _t(),
  sortDirections: Vn(),
  showSorterTooltip: en([Boolean, Object], !0),
  transformCellText: et()
}), BJ = be({
  name: "InternalTable",
  inheritAttrs: !1,
  props: _n(O(O({}, H2()), {
    contextSlots: _t()
  }), {
    rowKey: "key"
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i,
      emit: r
    } = t;
    dn(!(typeof e.rowKey == "function" && e.rowKey.length > 1), "Table", "`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."), OQ(E(() => e.contextSlots)), kQ({
      onResizeColumn: (Re, Xe) => {
        r("resizeColumn", Re, Xe);
      }
    });
    const a = PM(), l = E(() => {
      const Re = new Set(Object.keys(a.value).filter((Xe) => a.value[Xe]));
      return e.columns.filter((Xe) => !Xe.responsive || Xe.responsive.some((De) => Re.has(De)));
    }), {
      size: s,
      renderEmpty: u,
      direction: c,
      prefixCls: d,
      configProvider: f
    } = Rt("table", e), [p, v] = NJ(d), g = E(() => {
      var Re;
      return e.transformCellText || ((Re = f.transformCellText) === null || Re === void 0 ? void 0 : Re.value);
    }), [m] = Nl("Table", La.Table, Kt(e, "locale")), x = E(() => e.dataSource || zJ), S = E(() => f.getPrefixCls("dropdown", e.dropdownPrefixCls)), C = E(() => e.childrenColumnName || "children"), P = E(() => x.value.some((Re) => Re?.[C.value]) ? "nest" : e.expandedRowRender ? "row" : null), $ = $n({
      body: null
    }), I = (Re) => {
      O($, Re);
    }, w = E(() => typeof e.rowKey == "function" ? e.rowKey : (Re) => Re?.[e.rowKey]), [M] = yZ(x, C, w), _ = {}, N = function(Re, Xe) {
      let De = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      const {
        pagination: Be,
        scroll: Ve,
        onChange: ot
      } = e, je = O(O({}, _), Re);
      De && (_.resetPagination(), je.pagination.current && (je.pagination.current = 1), Be && Be.onChange && Be.onChange(1, je.pagination.pageSize)), Ve && Ve.scrollToFirstRowOnChange !== !1 && $.body && Q8(0, {
        getContainer: () => $.body
      }), ot?.(je.pagination, je.filters, je.sorter, {
        currentDataSource: A$(Hb(x.value, je.sorterStates, C.value), je.filterStates),
        action: Xe
      });
    }, R = (Re, Xe) => {
      N({
        sorter: Re,
        sorterStates: Xe
      }, "sort", !1);
    }, [H, L, B, A] = IZ({
      prefixCls: d,
      mergedColumns: l,
      onSorterChange: R,
      sortDirections: E(() => e.sortDirections || ["ascend", "descend"]),
      tableLocale: m,
      showSorterTooltip: Kt(e, "showSorterTooltip")
    }), G = E(() => Hb(x.value, L.value, C.value)), j = (Re, Xe) => {
      N({
        filters: Re,
        filterStates: Xe
      }, "filter", !0);
    }, [Z, W, K] = mJ({
      prefixCls: d,
      locale: m,
      dropdownPrefixCls: S,
      mergedColumns: l,
      onFilterChange: j,
      getPopupContainer: Kt(e, "getPopupContainer")
    }), q = E(() => A$(G.value, W.value)), [U] = xJ(Kt(e, "contextSlots")), ae = E(() => {
      const Re = {}, Xe = K.value;
      return Object.keys(Xe).forEach((De) => {
        Xe[De] !== null && (Re[De] = Xe[De]);
      }), O(O({}, B.value), {
        filters: Re
      });
    }), [se] = bJ(ae), re = (Re, Xe) => {
      N({
        pagination: O(O({}, _.pagination), {
          current: Re,
          pageSize: Xe
        })
      }, "paginate");
    }, [ie, te] = bZ(E(() => q.value.length), Kt(e, "pagination"), re);
    It(() => {
      _.sorter = A.value, _.sorterStates = L.value, _.filters = K.value, _.filterStates = W.value, _.pagination = e.pagination === !1 ? {} : mZ(ie.value, e.pagination), _.resetPagination = te;
    });
    const ve = E(() => {
      if (e.pagination === !1 || !ie.value.pageSize)
        return q.value;
      const {
        current: Re = 1,
        total: Xe,
        pageSize: De = Nb
      } = ie.value;
      return dn(Re > 0, "Table", "`current` should be positive number."), q.value.length < Xe ? q.value.length > De ? q.value.slice((Re - 1) * De, Re * De) : q.value : q.value.slice((Re - 1) * De, Re * De);
    });
    It(() => {
      Yt(() => {
        const {
          total: Re,
          pageSize: Xe = Nb
        } = ie.value;
        q.value.length < Re && q.value.length > Xe && dn(!1, "Table", "`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.");
      });
    }, {
      flush: "post"
    });
    const ce = E(() => e.showExpandColumn === !1 ? -1 : P.value === "nest" && e.expandIconColumnIndex === void 0 ? e.rowSelection ? 1 : 0 : e.expandIconColumnIndex > 0 && e.rowSelection ? e.expandIconColumnIndex - 1 : e.expandIconColumnIndex), fe = le();
    Ie(() => e.rowSelection, () => {
      fe.value = e.rowSelection ? O({}, e.rowSelection) : e.rowSelection;
    }, {
      deep: !0,
      immediate: !0
    });
    const [ge, Me] = wZ(fe, {
      prefixCls: d,
      data: q,
      pageData: ve,
      getRowKey: w,
      getRecordByKey: M,
      expandType: P,
      childrenColumnName: C,
      locale: m,
      getPopupContainer: E(() => e.getPopupContainer)
    }), ze = (Re, Xe, De) => {
      let Be;
      const {
        rowClassName: Ve
      } = e;
      return typeof Ve == "function" ? Be = _e(Ve(Re, Xe, De)) : Be = _e(Ve), _e({
        [`${d.value}-row-selected`]: Me.value.has(w.value(Re, Xe))
      }, Be);
    };
    i({
      selectedKeySet: Me
    });
    const Ke = E(() => typeof e.indentSize == "number" ? e.indentSize : 15), He = (Re) => se(ge(Z(H(U(Re)))));
    return () => {
      var Re;
      const {
        expandIcon: Xe = o.expandIcon || yJ(m.value),
        pagination: De,
        loading: Be,
        bordered: Ve
      } = e;
      let ot, je;
      if (De !== !1 && (!((Re = ie.value) === null || Re === void 0) && Re.total)) {
        let Ce;
        ie.value.size ? Ce = ie.value.size : Ce = s.value === "small" || s.value === "middle" ? "small" : void 0;
        const Ae = (tt) => h(FX, Q(Q({}, ie.value), {}, {
          class: [`${d.value}-pagination ${d.value}-pagination-${tt}`, ie.value.class],
          size: Ce
        }), null), qe = c.value === "rtl" ? "left" : "right", {
          position: We
        } = ie.value;
        if (We !== null && Array.isArray(We)) {
          const tt = We.find((Fe) => Fe.includes("top")), Ee = We.find((Fe) => Fe.includes("bottom")), Ne = We.every((Fe) => `${Fe}` == "none");
          !tt && !Ee && !Ne && (je = Ae(qe)), tt && (ot = Ae(tt.toLowerCase().replace("top", ""))), Ee && (je = Ae(Ee.toLowerCase().replace("bottom", "")));
        } else
          je = Ae(qe);
      }
      let Pe;
      typeof Be == "boolean" ? Pe = {
        spinning: Be
      } : typeof Be == "object" && (Pe = O({
        spinning: !0
      }, Be));
      const Ge = _e(`${d.value}-wrapper`, {
        [`${d.value}-wrapper-rtl`]: c.value === "rtl"
      }, n.class, v.value), Se = Bn(e, ["columns"]);
      return p(h("div", {
        class: Ge,
        style: n.style
      }, [h(Xo, Q({
        spinning: !1
      }, Pe), {
        default: () => [ot, h(gZ, Q(Q(Q({}, n), Se), {}, {
          expandedRowKeys: e.expandedRowKeys,
          defaultExpandedRowKeys: e.defaultExpandedRowKeys,
          expandIconColumnIndex: ce.value,
          indentSize: Ke.value,
          expandIcon: Xe,
          columns: l.value,
          direction: c.value,
          prefixCls: d.value,
          class: _e({
            [`${d.value}-middle`]: s.value === "middle",
            [`${d.value}-small`]: s.value === "small",
            [`${d.value}-bordered`]: Ve,
            [`${d.value}-empty`]: x.value.length === 0
          }),
          data: ve.value,
          rowKey: w.value,
          rowClassName: ze,
          internalHooks: Rb,
          internalRefs: $,
          onUpdateInternalRefs: I,
          transformColumns: He,
          transformCellText: g.value
        }), O(O({}, o), {
          emptyText: () => {
            var Ce, Ae;
            return ((Ce = o.emptyText) === null || Ce === void 0 ? void 0 : Ce.call(o)) || ((Ae = e.locale) === null || Ae === void 0 ? void 0 : Ae.emptyText) || u("Table");
          }
        })), je]
      })]));
    };
  }
}), zv = be({
  name: "ATable",
  inheritAttrs: !1,
  props: _n(H2(), {
    rowKey: "key"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: i
    } = t;
    const r = le();
    return i({
      table: r
    }), () => {
      var a;
      const l = e.columns || _2((a = o.default) === null || a === void 0 ? void 0 : a.call(o));
      return h(BJ, Q(Q(Q({
        ref: r
      }, n), e), {}, {
        columns: l || [],
        expandedRowRender: o.expandedRowRender || e.expandedRowRender,
        contextSlots: O({}, o)
      }), o);
    };
  }
}), Bv = be({
  name: "ATableColumn",
  slots: Object,
  render() {
    return null;
  }
}), Fv = be({
  name: "ATableColumnGroup",
  slots: Object,
  __ANT_TABLE_COLUMN_GROUP: !0,
  render() {
    return null;
  }
}), Wb = oZ, Kb = aZ, Lv = O(lZ, {
  Cell: Kb,
  Row: Wb,
  name: "ATableSummary"
}), FJ = O(zv, {
  SELECTION_ALL: zb,
  SELECTION_INVERT: Bb,
  SELECTION_NONE: Fb,
  SELECTION_COLUMN: vr,
  EXPAND_COLUMN: Yr,
  Column: Bv,
  ColumnGroup: Fv,
  Summary: Lv,
  install: (e) => (e.component(Lv.name, Lv), e.component(Kb.name, Kb), e.component(Wb.name, Wb), e.component(zv.name, zv), e.component(Bv.name, Bv), e.component(Fv.name, Fv), e)
}), V2 = Symbol("appConfigContext"), LJ = (e) => Ft(V2, e), HJ = () => zt(V2, {}), j2 = Symbol("appContext"), VJ = (e) => Ft(j2, e), jJ = $n({
  message: {},
  notification: {},
  modal: {}
}), WJ = () => zt(j2, jJ), KJ = (e) => {
  const {
    componentCls: t,
    colorText: n,
    fontSize: o,
    lineHeight: i,
    fontFamily: r
  } = e;
  return {
    [t]: {
      color: n,
      fontSize: o,
      lineHeight: i,
      fontFamily: r
    }
  };
}, qJ = On("App", (e) => [KJ(e)]), YJ = () => ({
  rootClassName: String,
  message: _t(),
  notification: _t()
}), GJ = () => WJ(), id = be({
  name: "AApp",
  props: _n(YJ(), {}),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = Rt("app", e), [i, r] = qJ(o), a = E(() => _e(r.value, o.value, e.rootClassName)), l = HJ(), s = E(() => ({
      message: O(O({}, l.message), e.message),
      notification: O(O({}, l.notification), e.notification)
    }));
    LJ(s.value);
    const [u, c] = b_(s.value.message), [d, f] = __(s.value.notification), [p, v] = i2(), g = E(() => ({
      message: u,
      notification: d,
      modal: p
    }));
    return VJ(g.value), () => {
      var m;
      return i(h("div", {
        class: a.value
      }, [v(), c(), f(), (m = n.default) === null || m === void 0 ? void 0 : m.call(n)]));
    };
  }
});
id.useApp = GJ;
id.install = function(e) {
  e.component(id.name, id);
};
const vl = (e, t) => new In(e).setAlpha(t).toRgbString(), du = (e, t) => new In(e).lighten(t).toHexString(), UJ = (e) => {
  const t = Ha(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],
  };
}, XJ = (e, t) => {
  const n = e || "#000", o = t || "#fff";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: vl(o, 0.85),
    colorTextSecondary: vl(o, 0.65),
    colorTextTertiary: vl(o, 0.45),
    colorTextQuaternary: vl(o, 0.25),
    colorFill: vl(o, 0.18),
    colorFillSecondary: vl(o, 0.12),
    colorFillTertiary: vl(o, 0.08),
    colorFillQuaternary: vl(o, 0.04),
    colorBgElevated: du(n, 12),
    colorBgContainer: du(n, 8),
    colorBgLayout: du(n, 0),
    colorBgSpotlight: du(n, 26),
    colorBorder: du(n, 26),
    colorBorderSecondary: du(n, 19)
  };
}, QJ = (e, t) => {
  const n = Object.keys(jy).map((i) => {
    const r = Ha(e[i], {
      theme: "dark"
    });
    return new Array(10).fill(1).reduce((a, l, s) => (a[`${i}-${s + 1}`] = r[s], a), {});
  }).reduce((i, r) => (i = O(O({}, i), r), i), {}), o = t ?? Wy(e);
  return O(O(O({}, o), n), SI(e, {
    generateColorPalettes: UJ,
    generateNeutralColorPalettes: XJ
  }));
}, N$ = {
  /** Default seedToken */
  defaultSeed: qy.token,
  defaultAlgorithm: Wy,
  darkAlgorithm: QJ
}, ZJ = typeof window < "u";
var z$;
ZJ && ((z$ = window?.navigator) != null && z$.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function ki(e) {
  return e == null;
}
function W2() {
}
const JJ = 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(JJ)));
function eee() {
  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 B$(e, t = 16) {
  if (typeof e != "function")
    return W2;
  const n = (...r) => {
    e(...r);
  };
  if (t <= 0)
    return K2(n);
  let o = 0, i;
  return function(...r) {
    const a = Date.now(), l = a - o;
    clearTimeout(i), l >= t ? (o = a, n(...r)) : i = setTimeout(
      () => {
        o = Date.now(), n(...r);
      },
      Math.max(0, t - l)
    );
  };
}
function tee(e, t = 100) {
  if (typeof e != "function")
    return W2;
  const n = (...i) => {
    e(...i);
  };
  if (t <= 0)
    return K2(n);
  let o;
  return function(...i) {
    clearTimeout(o), o = setTimeout(() => {
      n(...i);
    }, t);
  };
}
function K2(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 rd = /* @__PURE__ */ new Set(), q2 = /* @__PURE__ */ new WeakMap();
function nee() {
  rd.forEach((e) => {
    e(...q2.get(e));
  }), rd.clear();
}
function oi(e, ...t) {
  if (typeof e != "function")
    return e;
  q2.set(e, t), !rd.has(e) && (rd.add(e), rd.size === 1 && Promise.resolve().then(nee));
}
const Y2 = Symbol("LAYOUT_KEY"), G2 = Symbol("EMITTER_KEY");
function oee(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 qb(e) {
  const t = Array(e.length);
  for (let n = 0, o = e.length; n < o; n++)
    t[n] = iee(e[n]);
  return t;
}
function iee(e) {
  return { ...e };
}
function U2(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 yu(e, t, n) {
  const o = Q2(e), i = Z2(e), r = Array(e.length);
  for (let a = 0, l = i.length; a < l; a++) {
    let s = i[a];
    s.static || (s = ree(o, s, t, n), o.push(s)), r[e.findIndex((u) => u.i === s.i)] = s, s.moved = !1;
  }
  return r;
}
function ree(e, t, n, o) {
  if (n)
    for (; t.y > 0 && !ad(e, t); )
      t.y--;
  else if (o) {
    const r = o[t.i].y;
    for (; t.y > r && !ad(e, t); )
      t.y--;
  }
  let i;
  for (; i = ad(e, t); )
    t.y = i.y + i.h;
  return t;
}
function aee(e, t) {
  const n = Q2(e);
  for (let o = 0, i = e.length; o < i; o++) {
    const r = e[o];
    if (r.x + r.w > t.cols && (r.x = t.cols - r.w), r.x < 0 && (r.x = 0, r.w = t.cols), !r.static) n.push(r);
    else
      for (; ad(n, r); )
        r.y++;
  }
  return e;
}
function F$(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (e[n].i === t) return e[n];
}
function ad(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (U2(e[n], t)) return e[n];
}
function X2(e, t) {
  return e.filter((n) => U2(n, t));
}
function Q2(e) {
  return e.filter((t) => t.static);
}
function Yb(e, t, n, o, i = !1, r = !1) {
  if (t.static) return e;
  const a = 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 = Z2(e);
  s && (u = u.reverse());
  const c = X2(u, t);
  if (r && c.length)
    return t.x = a, t.y = l, t.moved = !1, e;
  for (let d = 0, f = c.length; d < f; d++) {
    const p = c[d];
    p.moved || t.y > p.y && t.y - p.y > p.h / 4 || (p.static ? e = L$(e, p, t, i) : e = L$(e, t, p, i));
  }
  return e;
}
function L$(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), !ad(e, i))
      return Yb(e, n, void 0, i.y, !1);
  }
  return Yb(e, n, void 0, n.y + 1, !1);
}
function lee(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 see(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 uee(e, t, n, o) {
  return {
    top: e + "px",
    left: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function cee(e, t, n, o) {
  return {
    top: e + "px",
    right: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function Z2(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 dee(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, r = e.length; i < r; i++) {
    const a = e[i];
    for (let l = 0; l < n.length; l++)
      if (typeof a[n[l]] != "number")
        throw new Error(
          "VueGridLayout: " + t + "[" + i + "]." + n[l] + " must be a number!"
        );
    if (a.i === void 0 || a.i === null)
      throw new Error("VueGridLayout: " + t + "[" + i + "].i cannot be null!");
    if (typeof a.i != "number" && typeof a.i != "string")
      throw new Error("VueGridLayout: " + t + "[" + i + "].i must be a string or number!");
    if (o.indexOf(a.i) >= 0)
      throw new Error("VueGridLayout: " + t + "[" + i + "].i must be unique!");
    if (o.push(a.i), a.static !== void 0 && typeof a.static != "boolean")
      throw new Error("VueGridLayout: " + t + "[" + i + "].static must be a boolean!");
  }
}
function fee(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 H$(e) {
  return pee(e);
}
function pee(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, r = e.clientY + n.scrollTop - o.top;
  return { x: i, y: r };
}
function V$(e, t, n, o) {
  return hee(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 hee(e) {
  return typeof e == "number" && !Number.isNaN(e);
}
function gee(e, t) {
  const n = eE(e);
  let o = n[0];
  for (let i = 1, r = n.length; i < r; i++) {
    const a = n[i];
    t > e[a] && (o = a);
  }
  return o;
}
function J2(e, t) {
  if (!t[e])
    throw new Error(
      "ResponsiveGridLayout: `cols` entry for breakpoint " + e + " is missing!"
    );
  return t[e];
}
function vee(e, t, n, o, i, r, a) {
  if (t[o]) return qb(t[o]);
  let l = e;
  const s = eE(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 = qb(l || []), yu(aee(l, { cols: r }), a);
}
function eE(e) {
  return Object.keys(e).sort((t, n) => e[t] - e[n]);
}
let mee = "auto";
function bee() {
  return typeof document < "u";
}
function j$() {
  return bee() ? typeof document.dir < "u" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir") : mee;
}
var Wc = { exports: {} }, yee = Wc.exports, W$;
function xee() {
  return W$ || (W$ = 1, (function(e, t) {
    (function(n, o) {
      e.exports = o();
    })(yee, (function() {
      function n(b, y) {
        var k = Object.keys(b);
        if (Object.getOwnPropertySymbols) {
          var D = Object.getOwnPropertySymbols(b);
          y && (D = D.filter((function(z) {
            return Object.getOwnPropertyDescriptor(b, z).enumerable;
          }))), k.push.apply(k, D);
        }
        return k;
      }
      function o(b) {
        for (var y = 1; y < arguments.length; y++) {
          var k = arguments[y] != null ? arguments[y] : {};
          y % 2 ? n(Object(k), !0).forEach((function(D) {
            s(b, D, k[D]);
          })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(b, Object.getOwnPropertyDescriptors(k)) : n(Object(k)).forEach((function(D) {
            Object.defineProperty(b, D, Object.getOwnPropertyDescriptor(k, D));
          }));
        }
        return b;
      }
      function i(b) {
        return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
          return typeof y;
        } : function(y) {
          return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
        }, i(b);
      }
      function r(b, y) {
        if (!(b instanceof y)) throw new TypeError("Cannot call a class as a function");
      }
      function a(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          D.enumerable = D.enumerable || !1, D.configurable = !0, "value" in D && (D.writable = !0), Object.defineProperty(b, g(D.key), D);
        }
      }
      function l(b, y, k) {
        return y && a(b.prototype, y), Object.defineProperty(b, "prototype", { writable: !1 }), b;
      }
      function s(b, y, k) {
        return (y = g(y)) in b ? Object.defineProperty(b, y, { value: k, enumerable: !0, configurable: !0, writable: !0 }) : b[y] = k, b;
      }
      function u(b, y) {
        if (typeof y != "function" && y !== null) throw new TypeError("Super expression must either be null or a function");
        b.prototype = Object.create(y && y.prototype, { constructor: { value: b, writable: !0, configurable: !0 } }), Object.defineProperty(b, "prototype", { writable: !1 }), y && d(b, y);
      }
      function c(b) {
        return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(y) {
          return y.__proto__ || Object.getPrototypeOf(y);
        }, c(b);
      }
      function d(b, y) {
        return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(k, D) {
          return k.__proto__ = D, k;
        }, d(b, y);
      }
      function f(b) {
        if (b === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return b;
      }
      function p(b) {
        var y = (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 k, D = c(b);
          if (y) {
            var z = c(this).constructor;
            k = Reflect.construct(D, arguments, z);
          } else k = D.apply(this, arguments);
          return (function(V, X) {
            if (X && (typeof X == "object" || typeof X == "function")) return X;
            if (X !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
            return f(V);
          })(this, k);
        };
      }
      function v() {
        return v = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(b, y, k) {
          var D = (function(V, X) {
            for (; !Object.prototype.hasOwnProperty.call(V, X) && (V = c(V)) !== null; ) ;
            return V;
          })(b, y);
          if (D) {
            var z = Object.getOwnPropertyDescriptor(D, y);
            return z.get ? z.get.call(arguments.length < 3 ? b : k) : z.value;
          }
        }, v.apply(this, arguments);
      }
      function g(b) {
        var y = (function(k, D) {
          if (typeof k != "object" || k === null) return k;
          var z = k[Symbol.toPrimitive];
          if (z !== void 0) {
            var V = z.call(k, D);
            if (typeof V != "object") return V;
            throw new TypeError("@@toPrimitive must return a primitive value.");
          }
          return String(k);
        })(b, "string");
        return typeof y == "symbol" ? y : y + "";
      }
      var m = function(b) {
        return !(!b || !b.Window) && b instanceof b.Window;
      }, x = void 0, S = void 0;
      function C(b) {
        x = b;
        var y = b.document.createTextNode("");
        y.ownerDocument !== b.document && typeof b.wrap == "function" && b.wrap(y) === y && (b = b.wrap(b)), S = b;
      }
      function P(b) {
        return m(b) ? b : (b.ownerDocument || b).defaultView || S.window;
      }
      typeof window < "u" && window && C(window);
      var $ = function(b) {
        return !!b && i(b) === "object";
      }, I = function(b) {
        return typeof b == "function";
      }, w = { window: function(b) {
        return b === S || m(b);
      }, docFrag: function(b) {
        return $(b) && b.nodeType === 11;
      }, object: $, func: I, number: function(b) {
        return typeof b == "number";
      }, bool: function(b) {
        return typeof b == "boolean";
      }, string: function(b) {
        return typeof b == "string";
      }, element: function(b) {
        if (!b || i(b) !== "object") return !1;
        var y = P(b) || S;
        return /object|function/.test(typeof Element > "u" ? "undefined" : i(Element)) ? b instanceof Element || b instanceof y.Element : b.nodeType === 1 && typeof b.nodeName == "string";
      }, plainObject: function(b) {
        return $(b) && !!b.constructor && /function Object\b/.test(b.constructor.toString());
      }, array: function(b) {
        return $(b) && b.length !== void 0 && I(b.splice);
      } };
      function M(b) {
        var y = b.interaction;
        if (y.prepared.name === "drag") {
          var k = y.prepared.axis;
          k === "x" ? (y.coords.cur.page.y = y.coords.start.page.y, y.coords.cur.client.y = y.coords.start.client.y, y.coords.velocity.client.y = 0, y.coords.velocity.page.y = 0) : k === "y" && (y.coords.cur.page.x = y.coords.start.page.x, y.coords.cur.client.x = y.coords.start.client.x, y.coords.velocity.client.x = 0, y.coords.velocity.page.x = 0);
        }
      }
      function _(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "drag") {
          var D = k.prepared.axis;
          if (D === "x" || D === "y") {
            var z = D === "x" ? "y" : "x";
            y.page[z] = k.coords.start.page[z], y.client[z] = k.coords.start.client[z], y.delta[z] = 0;
          }
        }
      }
      var N = { id: "actions/drag", install: function(b) {
        var y = b.actions, k = b.Interactable, D = b.defaults;
        k.prototype.draggable = N.draggable, y.map.drag = N, y.methodDict.drag = "draggable", D.actions.drag = N.defaults;
      }, listeners: { "interactions:before-action-move": M, "interactions:action-resume": M, "interactions:action-move": _, "auto-start:check": function(b) {
        var y = b.interaction, k = b.interactable, D = b.buttons, z = k.options.drag;
        if (z && z.enabled && (!y.pointerIsDown || !/mouse|pointer/.test(y.pointerType) || (D & k.options.drag.mouseButtons) != 0)) return b.action = { name: "drag", axis: z.lockAxis === "start" ? z.startAxis : z.lockAxis }, !1;
      } }, draggable: function(b) {
        return w.object(b) ? (this.options.drag.enabled = b.enabled !== !1, this.setPerAction("drag", b), this.setOnEvents("drag", b), /^(xy|x|y|start)$/.test(b.lockAxis) && (this.options.drag.lockAxis = b.lockAxis), /^(xy|x|y)$/.test(b.startAxis) && (this.options.drag.startAxis = b.startAxis), this) : w.bool(b) ? (this.options.drag.enabled = b, this) : this.options.drag;
      }, beforeMove: M, move: _, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
        return "move";
      }, filterEventType: function(b) {
        return b.search("drag") === 0;
      } }, R = N, H = { init: function(b) {
        var y = b;
        H.document = y.document, H.DocumentFragment = y.DocumentFragment || L, H.SVGElement = y.SVGElement || L, H.SVGSVGElement = y.SVGSVGElement || L, H.SVGElementInstance = y.SVGElementInstance || L, H.Element = y.Element || L, H.HTMLElement = y.HTMLElement || H.Element, H.Event = y.Event, H.Touch = y.Touch || L, H.PointerEvent = y.PointerEvent || y.MSPointerEvent;
      }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
      function L() {
      }
      var B = H, A = { init: function(b) {
        var y = B.Element, k = b.navigator || {};
        A.supportsTouch = "ontouchstart" in b || w.func(b.DocumentTouch) && B.document instanceof b.DocumentTouch, A.supportsPointerEvent = k.pointerEnabled !== !1 && !!B.PointerEvent, A.isIOS = /iP(hone|od|ad)/.test(k.platform), A.isIOS7 = /iP(hone|od|ad)/.test(k.platform) && /OS 7[^\d]/.test(k.appVersion), A.isIe9 = /MSIE 9/.test(k.userAgent), A.isOperaMobile = k.appName === "Opera" && A.supportsTouch && /Presto/.test(k.userAgent), A.prefixedMatchesSelector = "matches" in y.prototype ? "matches" : "webkitMatchesSelector" in y.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in y.prototype ? "mozMatchesSelector" : "oMatchesSelector" in y.prototype ? "oMatchesSelector" : "msMatchesSelector", A.pEventTypes = A.supportsPointerEvent ? B.PointerEvent === b.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 = B.document && "onmousewheel" in B.document ? "mousewheel" : "wheel";
      }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, G = A;
      function j(b, y) {
        if (b.contains) return b.contains(y);
        for (; y; ) {
          if (y === b) return !0;
          y = y.parentNode;
        }
        return !1;
      }
      function Z(b, y) {
        for (; w.element(b); ) {
          if (K(b, y)) return b;
          b = W(b);
        }
        return null;
      }
      function W(b) {
        var y = b.parentNode;
        if (w.docFrag(y)) {
          for (; (y = y.host) && w.docFrag(y); ) ;
          return y;
        }
        return y;
      }
      function K(b, y) {
        return S !== x && (y = y.replace(/\/deep\//g, " ")), b[G.prefixedMatchesSelector](y);
      }
      var q = function(b) {
        return b.parentNode || b.host;
      };
      function U(b, y) {
        for (var k, D = [], z = b; (k = q(z)) && z !== y && k !== z.ownerDocument; ) D.unshift(z), z = k;
        return D;
      }
      function ae(b, y, k) {
        for (; w.element(b); ) {
          if (K(b, y)) return !0;
          if ((b = W(b)) === k) return K(b, y);
        }
        return !1;
      }
      function se(b) {
        return b.correspondingUseElement || b;
      }
      function re(b) {
        var y = b instanceof B.SVGElement ? b.getBoundingClientRect() : b.getClientRects()[0];
        return y && { left: y.left, right: y.right, top: y.top, bottom: y.bottom, width: y.width || y.right - y.left, height: y.height || y.bottom - y.top };
      }
      function ie(b) {
        var y, k = re(b);
        if (!G.isIOS7 && k) {
          var D = { x: (y = (y = P(b)) || S).scrollX || y.document.documentElement.scrollLeft, y: y.scrollY || y.document.documentElement.scrollTop };
          k.left += D.x, k.right += D.x, k.top += D.y, k.bottom += D.y;
        }
        return k;
      }
      function te(b) {
        for (var y = []; b; ) y.push(b), b = W(b);
        return y;
      }
      function ve(b) {
        return !!w.string(b) && (B.document.querySelector(b), !0);
      }
      function ce(b, y) {
        for (var k in y) b[k] = y[k];
        return b;
      }
      function fe(b, y, k) {
        return b === "parent" ? W(k) : b === "self" ? y.getRect(k) : Z(k, b);
      }
      function ge(b, y, k, D) {
        var z = b;
        return w.string(z) ? z = fe(z, y, k) : w.func(z) && (z = z.apply(void 0, D)), w.element(z) && (z = ie(z)), z;
      }
      function Me(b) {
        return b && { x: "x" in b ? b.x : b.left, y: "y" in b ? b.y : b.top };
      }
      function ze(b) {
        return !b || "x" in b && "y" in b || ((b = ce({}, b)).x = b.left || 0, b.y = b.top || 0, b.width = b.width || (b.right || 0) - b.x, b.height = b.height || (b.bottom || 0) - b.y), b;
      }
      function Ke(b, y, k) {
        b.left && (y.left += k.x), b.right && (y.right += k.x), b.top && (y.top += k.y), b.bottom && (y.bottom += k.y), y.width = y.right - y.left, y.height = y.bottom - y.top;
      }
      function He(b, y, k) {
        var D = k && b.options[k];
        return Me(ge(D && D.origin || b.options.origin, b, y, [b && y])) || { x: 0, y: 0 };
      }
      function Re(b, y) {
        var k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(ue) {
          return !0;
        }, D = arguments.length > 3 ? arguments[3] : void 0;
        if (D = D || {}, w.string(b) && b.search(" ") !== -1 && (b = Xe(b)), w.array(b)) return b.forEach((function(ue) {
          return Re(ue, y, k, D);
        })), D;
        if (w.object(b) && (y = b, b = ""), w.func(y) && k(b)) D[b] = D[b] || [], D[b].push(y);
        else if (w.array(y)) for (var z = 0, V = y; z < V.length; z++) {
          var X = V[z];
          Re(b, X, k, D);
        }
        else if (w.object(y)) for (var J in y)
          Re(Xe(J).map((function(ue) {
            return "".concat(b).concat(ue);
          })), y[J], k, D);
        return D;
      }
      function Xe(b) {
        return b.trim().split(/ +/);
      }
      var De = function(b, y) {
        return Math.sqrt(b * b + y * y);
      }, Be = ["webkit", "moz"];
      function Ve(b, y) {
        b.__set || (b.__set = {});
        var k = function(z) {
          if (Be.some((function(V) {
            return z.indexOf(V) === 0;
          }))) return 1;
          typeof b[z] != "function" && z !== "__set" && Object.defineProperty(b, z, { get: function() {
            return z in b.__set ? b.__set[z] : b.__set[z] = y[z];
          }, set: function(V) {
            b.__set[z] = V;
          }, configurable: !0 });
        };
        for (var D in y) k(D);
        return b;
      }
      function ot(b, y) {
        b.page = b.page || {}, b.page.x = y.page.x, b.page.y = y.page.y, b.client = b.client || {}, b.client.x = y.client.x, b.client.y = y.client.y, b.timeStamp = y.timeStamp;
      }
      function je(b) {
        b.page.x = 0, b.page.y = 0, b.client.x = 0, b.client.y = 0;
      }
      function Pe(b) {
        return b instanceof B.Event || b instanceof B.Touch;
      }
      function Ge(b, y, k) {
        return b = b || "page", (k = k || {}).x = y[b + "X"], k.y = y[b + "Y"], k;
      }
      function Se(b, y) {
        return y = y || { x: 0, y: 0 }, G.isOperaMobile && Pe(b) ? (Ge("screen", b, y), y.x += window.scrollX, y.y += window.scrollY) : Ge("page", b, y), y;
      }
      function Ce(b) {
        return w.number(b.pointerId) ? b.pointerId : b.identifier;
      }
      function Ae(b, y, k) {
        var D = y.length > 1 ? We(y) : y[0];
        Se(D, b.page), (function(z, V) {
          V = V || {}, G.isOperaMobile && Pe(z) ? Ge("screen", z, V) : Ge("client", z, V);
        })(D, b.client), b.timeStamp = k;
      }
      function qe(b) {
        var y = [];
        return w.array(b) ? (y[0] = b[0], y[1] = b[1]) : b.type === "touchend" ? b.touches.length === 1 ? (y[0] = b.touches[0], y[1] = b.changedTouches[0]) : b.touches.length === 0 && (y[0] = b.changedTouches[0], y[1] = b.changedTouches[1]) : (y[0] = b.touches[0], y[1] = b.touches[1]), y;
      }
      function We(b) {
        for (var y = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, k = 0; k < b.length; k++) {
          var D = b[k];
          for (var z in y) y[z] += D[z];
        }
        for (var V in y) y[V] /= b.length;
        return y;
      }
      function tt(b) {
        if (!b.length) return null;
        var y = qe(b), k = Math.min(y[0].pageX, y[1].pageX), D = Math.min(y[0].pageY, y[1].pageY), z = Math.max(y[0].pageX, y[1].pageX), V = Math.max(y[0].pageY, y[1].pageY);
        return { x: k, y: D, left: k, top: D, right: z, bottom: V, width: z - k, height: V - D };
      }
      function Ee(b, y) {
        var k = y + "X", D = y + "Y", z = qe(b), V = z[0][k] - z[1][k], X = z[0][D] - z[1][D];
        return De(V, X);
      }
      function Ne(b, y) {
        var k = y + "X", D = y + "Y", z = qe(b), V = z[1][k] - z[0][k], X = z[1][D] - z[0][D];
        return 180 * Math.atan2(X, V) / Math.PI;
      }
      function Fe(b) {
        return w.string(b.pointerType) ? b.pointerType : w.number(b.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][b.pointerType] : /touch/.test(b.type || "") || b instanceof B.Touch ? "touch" : "mouse";
      }
      function it(b) {
        var y = w.func(b.composedPath) ? b.composedPath() : b.path;
        return [se(y ? y[0] : b.target), se(b.currentTarget)];
      }
      var pt = (function() {
        function b(y) {
          r(this, b), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = y;
        }
        return l(b, [{ key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), b;
      })();
      Object.defineProperty(pt.prototype, "interaction", { get: function() {
        return this._interaction._proxy;
      }, set: function() {
      } });
      var at = function(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          b.push(D);
        }
        return b;
      }, ft = function(b) {
        return at([], b);
      }, wt = function(b, y) {
        for (var k = 0; k < b.length; k++) if (y(b[k], k, b)) return k;
        return -1;
      }, Ct = function(b, y) {
        return b[wt(b, y)];
      }, St = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V) {
          var X;
          r(this, k), (X = y.call(this, z._interaction)).dropzone = void 0, X.dragEvent = void 0, X.relatedTarget = void 0, X.draggable = void 0, X.propagationStopped = !1, X.immediatePropagationStopped = !1;
          var J = V === "dragleave" ? D.prev : D.cur, ue = J.element, we = J.dropzone;
          return X.type = V, X.target = ue, X.currentTarget = ue, X.dropzone = we, X.dragEvent = z, X.relatedTarget = z.target, X.draggable = z.interactable, X.timeStamp = z.timeStamp, X;
        }
        return l(k, [{ key: "reject", value: function() {
          var D = this, z = this._interaction.dropState;
          if (this.type === "dropactivate" || this.dropzone && z.cur.dropzone === this.dropzone && z.cur.element === this.target) if (z.prev.dropzone = this.dropzone, z.prev.element = this.target, z.rejected = !0, z.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
            var V = z.activeDrops, X = wt(V, (function(ue) {
              var we = ue.dropzone, de = ue.element;
              return we === D.dropzone && de === D.target;
            }));
            z.activeDrops.splice(X, 1);
            var J = new k(z, this.dragEvent, "dropdeactivate");
            J.dropzone = this.dropzone, J.target = this.target, this.dropzone.fire(J);
          } else this.dropzone.fire(new k(z, this.dragEvent, "dragleave"));
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), k;
      })(pt);
      function bt(b, y) {
        for (var k = 0, D = b.slice(); k < D.length; k++) {
          var z = D[k], V = z.dropzone, X = z.element;
          y.dropzone = V, y.target = X, V.fire(y), y.propagationStopped = y.immediatePropagationStopped = !1;
        }
      }
      function Ot(b, y) {
        for (var k = (function(V, X) {
          for (var J = [], ue = 0, we = V.interactables.list; ue < we.length; ue++) {
            var de = we[ue];
            if (de.options.drop.enabled) {
              var Oe = de.options.drop.accept;
              if (!(w.element(Oe) && Oe !== X || w.string(Oe) && !K(X, Oe) || w.func(Oe) && !Oe({ dropzone: de, draggableElement: X }))) for (var Te = 0, Ye = de.getAllElements(); Te < Ye.length; Te++) {
                var Qe = Ye[Te];
                Qe !== X && J.push({ dropzone: de, element: Qe, rect: de.getRect(Qe) });
              }
            }
          }
          return J;
        })(b, y), D = 0; D < k.length; D++) {
          var z = k[D];
          z.rect = z.dropzone.getRect(z.element);
        }
        return k;
      }
      function Wt(b, y, k) {
        for (var D = b.dropState, z = b.interactable, V = b.element, X = [], J = 0, ue = D.activeDrops; J < ue.length; J++) {
          var we = ue[J], de = we.dropzone, Oe = we.element, Te = we.rect, Ye = de.dropCheck(y, k, z, V, Oe, Te);
          X.push(Ye ? Oe : null);
        }
        var Qe = (function(Ze) {
          for (var lt, st, xt, Nt = [], Gt = 0; Gt < Ze.length; Gt++) {
            var Tt = Ze[Gt], jt = Ze[lt];
            if (Tt && Gt !== lt) if (jt) {
              var Rn = q(Tt), xn = q(jt);
              if (Rn !== Tt.ownerDocument) if (xn !== Tt.ownerDocument) if (Rn !== xn) {
                Nt = Nt.length ? Nt : U(jt);
                var Fn = void 0;
                if (jt instanceof B.HTMLElement && Tt instanceof B.SVGElement && !(Tt instanceof B.SVGSVGElement)) {
                  if (Tt === xn) continue;
                  Fn = Tt.ownerSVGElement;
                } else Fn = Tt;
                for (var qn = U(Fn, jt.ownerDocument), uo = 0; qn[uo] && qn[uo] === Nt[uo]; ) uo++;
                var dr = [qn[uo - 1], qn[uo], Nt[uo]];
                if (dr[0]) for (var hi = dr[0].lastChild; hi; ) {
                  if (hi === dr[1]) {
                    lt = Gt, Nt = qn;
                    break;
                  }
                  if (hi === dr[2]) break;
                  hi = hi.previousSibling;
                }
              } else xt = jt, (parseInt(P(st = Tt).getComputedStyle(st).zIndex, 10) || 0) >= (parseInt(P(xt).getComputedStyle(xt).zIndex, 10) || 0) && (lt = Gt);
              else lt = Gt;
            } else lt = Gt;
          }
          return lt;
        })(X);
        return D.activeDrops[Qe] || null;
      }
      function Xt(b, y, k) {
        var D = b.dropState, z = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
        return k.type === "dragstart" && (z.activate = new St(D, k, "dropactivate"), z.activate.target = null, z.activate.dropzone = null), k.type === "dragend" && (z.deactivate = new St(D, k, "dropdeactivate"), z.deactivate.target = null, z.deactivate.dropzone = null), D.rejected || (D.cur.element !== D.prev.element && (D.prev.dropzone && (z.leave = new St(D, k, "dragleave"), k.dragLeave = z.leave.target = D.prev.element, k.prevDropzone = z.leave.dropzone = D.prev.dropzone), D.cur.dropzone && (z.enter = new St(D, k, "dragenter"), k.dragEnter = D.cur.element, k.dropzone = D.cur.dropzone)), k.type === "dragend" && D.cur.dropzone && (z.drop = new St(D, k, "drop"), k.dropzone = D.cur.dropzone, k.relatedTarget = D.cur.element), k.type === "dragmove" && D.cur.dropzone && (z.move = new St(D, k, "dropmove"), k.dropzone = D.cur.dropzone)), z;
      }
      function ln(b, y) {
        var k = b.dropState, D = k.activeDrops, z = k.cur, V = k.prev;
        y.leave && V.dropzone.fire(y.leave), y.enter && z.dropzone.fire(y.enter), y.move && z.dropzone.fire(y.move), y.drop && z.dropzone.fire(y.drop), y.deactivate && bt(D, y.deactivate), k.prev.dropzone = z.dropzone, k.prev.element = z.element;
      }
      function pn(b, y) {
        var k = b.interaction, D = b.iEvent, z = b.event;
        if (D.type === "dragmove" || D.type === "dragend") {
          var V = k.dropState;
          y.dynamicDrop && (V.activeDrops = Ot(y, k.element));
          var X = D, J = Wt(k, X, z);
          V.rejected = V.rejected && !!J && J.dropzone === V.cur.dropzone && J.element === V.cur.element, V.cur.dropzone = J && J.dropzone, V.cur.element = J && J.element, V.events = Xt(k, 0, X);
        }
      }
      var gt = { id: "actions/drop", install: function(b) {
        var y = b.actions, k = b.interactStatic, D = b.Interactable, z = b.defaults;
        b.usePlugin(R), D.prototype.dropzone = function(V) {
          return (function(X, J) {
            if (w.object(J)) {
              if (X.options.drop.enabled = J.enabled !== !1, J.listeners) {
                var ue = Re(J.listeners), we = Object.keys(ue).reduce((function(Oe, Te) {
                  return Oe[/^(enter|leave)/.test(Te) ? "drag".concat(Te) : /^(activate|deactivate|move)/.test(Te) ? "drop".concat(Te) : Te] = ue[Te], Oe;
                }), {}), de = X.options.drop.listeners;
                de && X.off(de), X.on(we), X.options.drop.listeners = we;
              }
              return w.func(J.ondrop) && X.on("drop", J.ondrop), w.func(J.ondropactivate) && X.on("dropactivate", J.ondropactivate), w.func(J.ondropdeactivate) && X.on("dropdeactivate", J.ondropdeactivate), w.func(J.ondragenter) && X.on("dragenter", J.ondragenter), w.func(J.ondragleave) && X.on("dragleave", J.ondragleave), w.func(J.ondropmove) && X.on("dropmove", J.ondropmove), /^(pointer|center)$/.test(J.overlap) ? X.options.drop.overlap = J.overlap : w.number(J.overlap) && (X.options.drop.overlap = Math.max(Math.min(1, J.overlap), 0)), "accept" in J && (X.options.drop.accept = J.accept), "checker" in J && (X.options.drop.checker = J.checker), X;
            }
            return w.bool(J) ? (X.options.drop.enabled = J, X) : X.options.drop;
          })(this, V);
        }, D.prototype.dropCheck = function(V, X, J, ue, we, de) {
          return (function(Oe, Te, Ye, Qe, Ze, lt, st) {
            var xt = !1;
            if (!(st = st || Oe.getRect(lt))) return !!Oe.options.drop.checker && Oe.options.drop.checker(Te, Ye, xt, Oe, lt, Qe, Ze);
            var Nt = Oe.options.drop.overlap;
            if (Nt === "pointer") {
              var Gt = He(Qe, Ze, "drag"), Tt = Se(Te);
              Tt.x += Gt.x, Tt.y += Gt.y;
              var jt = Tt.x > st.left && Tt.x < st.right, Rn = Tt.y > st.top && Tt.y < st.bottom;
              xt = jt && Rn;
            }
            var xn = Qe.getRect(Ze);
            if (xn && Nt === "center") {
              var Fn = xn.left + xn.width / 2, qn = xn.top + xn.height / 2;
              xt = Fn >= st.left && Fn <= st.right && qn >= st.top && qn <= st.bottom;
            }
            return xn && w.number(Nt) && (xt = Math.max(0, Math.min(st.right, xn.right) - Math.max(st.left, xn.left)) * Math.max(0, Math.min(st.bottom, xn.bottom) - Math.max(st.top, xn.top)) / (xn.width * xn.height) >= Nt), Oe.options.drop.checker && (xt = Oe.options.drop.checker(Te, Ye, xt, Oe, lt, Qe, Ze)), xt;
          })(this, V, X, J, ue, we, de);
        }, k.dynamicDrop = function(V) {
          return w.bool(V) ? (b.dynamicDrop = V, k) : b.dynamicDrop;
        }, ce(y.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), y.methodDict.drop = "dropzone", b.dynamicDrop = !1, z.actions.drop = gt.defaults;
      }, listeners: { "interactions:before-action-start": function(b) {
        var y = b.interaction;
        y.prepared.name === "drag" && (y.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
      }, "interactions:after-action-start": function(b, y) {
        var k = b.interaction, D = (b.event, b.iEvent);
        if (k.prepared.name === "drag") {
          var z = k.dropState;
          z.activeDrops = [], z.events = {}, z.activeDrops = Ot(y, k.element), z.events = Xt(k, 0, D), z.events.activate && (bt(z.activeDrops, z.events.activate), y.fire("actions/drop:start", { interaction: k, dragEvent: D }));
        }
      }, "interactions:action-move": pn, "interactions:after-action-move": function(b, y) {
        var k = b.interaction, D = b.iEvent;
        if (k.prepared.name === "drag") {
          var z = k.dropState;
          ln(k, z.events), y.fire("actions/drop:move", { interaction: k, dragEvent: D }), z.events = {};
        }
      }, "interactions:action-end": function(b, y) {
        if (b.interaction.prepared.name === "drag") {
          var k = b.interaction, D = b.iEvent;
          pn(b, y), ln(k, k.dropState.events), y.fire("actions/drop:end", { interaction: k, dragEvent: D });
        }
      }, "interactions:stop": function(b) {
        var y = b.interaction;
        if (y.prepared.name === "drag") {
          var k = y.dropState;
          k && (k.activeDrops = null, k.events = null, k.cur.dropzone = null, k.cur.element = null, k.prev.dropzone = null, k.prev.element = null, k.rejected = !1);
        }
      } }, getActiveDrops: Ot, getDrop: Wt, getDropEvents: Xt, fireDropEvents: ln, filterEventType: function(b) {
        return b.search("drag") === 0 || b.search("drop") === 0;
      }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, En = gt;
      function hn(b) {
        var y = b.interaction, k = b.iEvent, D = b.phase;
        if (y.prepared.name === "gesture") {
          var z = y.pointers.map((function(we) {
            return we.pointer;
          })), V = D === "start", X = D === "end", J = y.interactable.options.deltaSource;
          if (k.touches = [z[0], z[1]], V) k.distance = Ee(z, J), k.box = tt(z), k.scale = 1, k.ds = 0, k.angle = Ne(z, J), k.da = 0, y.gesture.startDistance = k.distance, y.gesture.startAngle = k.angle;
          else if (X || y.pointers.length < 2) {
            var ue = y.prevEvent;
            k.distance = ue.distance, k.box = ue.box, k.scale = ue.scale, k.ds = 0, k.angle = ue.angle, k.da = 0;
          } else k.distance = Ee(z, J), k.box = tt(z), k.scale = k.distance / y.gesture.startDistance, k.angle = Ne(z, J), k.ds = k.scale - y.gesture.scale, k.da = k.angle - y.gesture.angle;
          y.gesture.distance = k.distance, y.gesture.angle = k.angle, w.number(k.scale) && k.scale !== 1 / 0 && !isNaN(k.scale) && (y.gesture.scale = k.scale);
        }
      }
      var Wn = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(b) {
        var y = b.actions, k = b.Interactable, D = b.defaults;
        k.prototype.gesturable = function(z) {
          return w.object(z) ? (this.options.gesture.enabled = z.enabled !== !1, this.setPerAction("gesture", z), this.setOnEvents("gesture", z), this) : w.bool(z) ? (this.options.gesture.enabled = z, this) : this.options.gesture;
        }, y.map.gesture = Wn, y.methodDict.gesture = "gesturable", D.actions.gesture = Wn.defaults;
      }, listeners: { "interactions:action-start": hn, "interactions:action-move": hn, "interactions:action-end": hn, "interactions:new": function(b) {
        b.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
      }, "auto-start:check": function(b) {
        if (!(b.interaction.pointers.length < 2)) {
          var y = b.interactable.options.gesture;
          if (y && y.enabled) return b.action = { name: "gesture" }, !1;
        }
      } }, defaults: {}, getCursor: function() {
        return "";
      }, filterEventType: function(b) {
        return b.search("gesture") === 0;
      } }, lo = Wn;
      function Uo(b, y, k, D, z, V, X) {
        if (!y) return !1;
        if (y === !0) {
          var J = w.number(V.width) ? V.width : V.right - V.left, ue = w.number(V.height) ? V.height : V.bottom - V.top;
          if (X = Math.min(X, Math.abs((b === "left" || b === "right" ? J : ue) / 2)), J < 0 && (b === "left" ? b = "right" : b === "right" && (b = "left")), ue < 0 && (b === "top" ? b = "bottom" : b === "bottom" && (b = "top")), b === "left") {
            var we = J >= 0 ? V.left : V.right;
            return k.x < we + X;
          }
          if (b === "top") {
            var de = ue >= 0 ? V.top : V.bottom;
            return k.y < de + X;
          }
          if (b === "right") return k.x > (J >= 0 ? V.right : V.left) - X;
          if (b === "bottom") return k.y > (ue >= 0 ? V.bottom : V.top) - X;
        }
        return !!w.element(D) && (w.element(y) ? y === D : ae(D, y, z));
      }
      function Ue(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "resize" && k.resizeAxes) {
          var D = y;
          k.interactable.options.resize.square ? (k.resizeAxes === "y" ? D.delta.x = D.delta.y : D.delta.y = D.delta.x, D.axes = "xy") : (D.axes = k.resizeAxes, k.resizeAxes === "x" ? D.delta.y = 0 : k.resizeAxes === "y" && (D.delta.x = 0));
        }
      }
      var ht, vt, Zt = { id: "actions/resize", before: ["actions/drag"], install: function(b) {
        var y = b.actions, k = b.browser, D = b.Interactable, z = b.defaults;
        Zt.cursors = (function(V) {
          return V.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" };
        })(k), Zt.defaultMargin = k.supportsTouch || k.supportsPointerEvent ? 20 : 10, D.prototype.resizable = function(V) {
          return (function(X, J, ue) {
            return w.object(J) ? (X.options.resize.enabled = J.enabled !== !1, X.setPerAction("resize", J), X.setOnEvents("resize", J), w.string(J.axis) && /^x$|^y$|^xy$/.test(J.axis) ? X.options.resize.axis = J.axis : J.axis === null && (X.options.resize.axis = ue.defaults.actions.resize.axis), w.bool(J.preserveAspectRatio) ? X.options.resize.preserveAspectRatio = J.preserveAspectRatio : w.bool(J.square) && (X.options.resize.square = J.square), X) : w.bool(J) ? (X.options.resize.enabled = J, X) : X.options.resize;
          })(this, V, b);
        }, y.map.resize = Zt, y.methodDict.resize = "resizable", z.actions.resize = Zt.defaults;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.resizeAxes = "xy";
      }, "interactions:action-start": function(b) {
        (function(y) {
          var k = y.iEvent, D = y.interaction;
          if (D.prepared.name === "resize" && D.prepared.edges) {
            var z = k, V = D.rect;
            D._rects = { start: ce({}, V), corrected: ce({}, V), previous: ce({}, V), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, z.edges = D.prepared.edges, z.rect = D._rects.corrected, z.deltaRect = D._rects.delta;
          }
        })(b), Ue(b);
      }, "interactions:action-move": function(b) {
        (function(y) {
          var k = y.iEvent, D = y.interaction;
          if (D.prepared.name === "resize" && D.prepared.edges) {
            var z = k, V = D.interactable.options.resize.invert, X = V === "reposition" || V === "negate", J = D.rect, ue = D._rects, we = ue.start, de = ue.corrected, Oe = ue.delta, Te = ue.previous;
            if (ce(Te, de), X) {
              if (ce(de, J), V === "reposition") {
                if (de.top > de.bottom) {
                  var Ye = de.top;
                  de.top = de.bottom, de.bottom = Ye;
                }
                if (de.left > de.right) {
                  var Qe = de.left;
                  de.left = de.right, de.right = Qe;
                }
              }
            } else de.top = Math.min(J.top, we.bottom), de.bottom = Math.max(J.bottom, we.top), de.left = Math.min(J.left, we.right), de.right = Math.max(J.right, we.left);
            for (var Ze in de.width = de.right - de.left, de.height = de.bottom - de.top, de) Oe[Ze] = de[Ze] - Te[Ze];
            z.edges = D.prepared.edges, z.rect = de, z.deltaRect = Oe;
          }
        })(b), Ue(b);
      }, "interactions:action-end": function(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "resize" && k.prepared.edges) {
          var D = y;
          D.edges = k.prepared.edges, D.rect = k._rects.corrected, D.deltaRect = k._rects.delta;
        }
      }, "auto-start:check": function(b) {
        var y = b.interaction, k = b.interactable, D = b.element, z = b.rect, V = b.buttons;
        if (z) {
          var X = ce({}, y.coords.cur.page), J = k.options.resize;
          if (J && J.enabled && (!y.pointerIsDown || !/mouse|pointer/.test(y.pointerType) || (V & J.mouseButtons) != 0)) {
            if (w.object(J.edges)) {
              var ue = { left: !1, right: !1, top: !1, bottom: !1 };
              for (var we in ue) ue[we] = Uo(we, J.edges[we], X, y._latestPointer.eventTarget, D, z, J.margin || Zt.defaultMargin);
              ue.left = ue.left && !ue.right, ue.top = ue.top && !ue.bottom, (ue.left || ue.right || ue.top || ue.bottom) && (b.action = { name: "resize", edges: ue });
            } else {
              var de = J.axis !== "y" && X.x > z.right - Zt.defaultMargin, Oe = J.axis !== "x" && X.y > z.bottom - Zt.defaultMargin;
              (de || Oe) && (b.action = { name: "resize", axes: (de ? "x" : "") + (Oe ? "y" : "") });
            }
            return !b.action && void 0;
          }
        }
      } }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(b) {
        var y = b.edges, k = b.axis, D = b.name, z = Zt.cursors, V = null;
        if (k) V = z[D + k];
        else if (y) {
          for (var X = "", J = 0, ue = ["top", "bottom", "left", "right"]; J < ue.length; J++) {
            var we = ue[J];
            y[we] && (X += we);
          }
          V = z[X];
        }
        return V;
      }, filterEventType: function(b) {
        return b.search("resize") === 0;
      }, defaultMargin: null }, Qn = Zt, Xn = { id: "actions", install: function(b) {
        b.usePlugin(lo), b.usePlugin(Qn), b.usePlugin(R), b.usePlugin(En);
      } }, $o = 0, Sn = { request: function(b) {
        return ht(b);
      }, cancel: function(b) {
        return vt(b);
      }, init: function(b) {
        if (ht = b.requestAnimationFrame, vt = b.cancelAnimationFrame, !ht) for (var y = ["ms", "moz", "webkit", "o"], k = 0; k < y.length; k++) {
          var D = y[k];
          ht = b["".concat(D, "RequestAnimationFrame")], vt = b["".concat(D, "CancelAnimationFrame")] || b["".concat(D, "CancelRequestAnimationFrame")];
        }
        ht = ht && ht.bind(b), vt = vt && vt.bind(b), ht || (ht = function(z) {
          var V = Date.now(), X = Math.max(0, 16 - (V - $o)), J = b.setTimeout((function() {
            z(V + X);
          }), X);
          return $o = V + X, J;
        }, vt = function(z) {
          return clearTimeout(z);
        });
      } }, Mt = { 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(b) {
        Mt.isScrolling = !0, Sn.cancel(Mt.i), b.autoScroll = Mt, Mt.interaction = b, Mt.prevTime = Mt.now(), Mt.i = Sn.request(Mt.scroll);
      }, stop: function() {
        Mt.isScrolling = !1, Mt.interaction && (Mt.interaction.autoScroll = null), Sn.cancel(Mt.i);
      }, scroll: function() {
        var b = Mt.interaction, y = b.interactable, k = b.element, D = b.prepared.name, z = y.options[D].autoScroll, V = fo(z.container, y, k), X = Mt.now(), J = (X - Mt.prevTime) / 1e3, ue = z.speed * J;
        if (ue >= 1) {
          var we = { x: Mt.x * ue, y: Mt.y * ue };
          if (we.x || we.y) {
            var de = zo(V);
            w.window(V) ? V.scrollBy(we.x, we.y) : V && (V.scrollLeft += we.x, V.scrollTop += we.y);
            var Oe = zo(V), Te = { x: Oe.x - de.x, y: Oe.y - de.y };
            (Te.x || Te.y) && y.fire({ type: "autoscroll", target: k, interactable: y, delta: Te, interaction: b, container: V });
          }
          Mt.prevTime = X;
        }
        Mt.isScrolling && (Sn.cancel(Mt.i), Mt.i = Sn.request(Mt.scroll));
      }, check: function(b, y) {
        var k;
        return (k = b.options[y].autoScroll) == null ? void 0 : k.enabled;
      }, onInteractionMove: function(b) {
        var y = b.interaction, k = b.pointer;
        if (y.interacting() && Mt.check(y.interactable, y.prepared.name)) if (y.simulation) Mt.x = Mt.y = 0;
        else {
          var D, z, V, X, J = y.interactable, ue = y.element, we = y.prepared.name, de = J.options[we].autoScroll, Oe = fo(de.container, J, ue);
          if (w.window(Oe)) X = k.clientX < Mt.margin, D = k.clientY < Mt.margin, z = k.clientX > Oe.innerWidth - Mt.margin, V = k.clientY > Oe.innerHeight - Mt.margin;
          else {
            var Te = re(Oe);
            X = k.clientX < Te.left + Mt.margin, D = k.clientY < Te.top + Mt.margin, z = k.clientX > Te.right - Mt.margin, V = k.clientY > Te.bottom - Mt.margin;
          }
          Mt.x = z ? 1 : X ? -1 : 0, Mt.y = V ? 1 : D ? -1 : 0, Mt.isScrolling || (Mt.margin = de.margin, Mt.speed = de.speed, Mt.start(y));
        }
      } };
      function fo(b, y, k) {
        return (w.string(b) ? fe(b, y, k) : b) || P(k);
      }
      function zo(b) {
        return w.window(b) && (b = window.document.body), { x: b.scrollLeft, y: b.scrollTop };
      }
      var un = { id: "auto-scroll", install: function(b) {
        var y = b.defaults, k = b.actions;
        b.autoScroll = Mt, Mt.now = function() {
          return b.now();
        }, k.phaselessTypes.autoscroll = !0, y.perAction.autoScroll = Mt.defaults;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.autoScroll = null;
      }, "interactions:destroy": function(b) {
        b.interaction.autoScroll = null, Mt.stop(), Mt.interaction && (Mt.interaction = null);
      }, "interactions:stop": Mt.stop, "interactions:action-move": function(b) {
        return Mt.onInteractionMove(b);
      } } }, Dn = un;
      function cn(b, y) {
        var k = !1;
        return function() {
          return k || (S.console.warn(y), k = !0), b.apply(this, arguments);
        };
      }
      function An(b, y) {
        return b.name = y.name, b.axis = y.axis, b.edges = y.edges, b;
      }
      function Jo(b) {
        return w.bool(b) ? (this.options.styleCursor = b, this) : b === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
      }
      function Zn(b) {
        return w.func(b) ? (this.options.actionChecker = b, this) : b === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
      }
      var pi = { id: "auto-start/interactableMethods", install: function(b) {
        var y = b.Interactable;
        y.prototype.getAction = function(k, D, z, V) {
          var X = (function(J, ue, we, de, Oe) {
            var Te = J.getRect(de), Ye = ue.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[ue.button], Qe = { action: null, interactable: J, interaction: we, element: de, rect: Te, buttons: Ye };
            return Oe.fire("auto-start:check", Qe), Qe.action;
          })(this, D, z, V, b);
          return this.options.actionChecker ? this.options.actionChecker(k, D, X, this, V, z) : X;
        }, y.prototype.ignoreFrom = cn((function(k) {
          return this._backCompatOption("ignoreFrom", k);
        }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), y.prototype.allowFrom = cn((function(k) {
          return this._backCompatOption("allowFrom", k);
        }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), y.prototype.actionChecker = Zn, y.prototype.styleCursor = Jo;
      } };
      function jo(b, y, k, D, z) {
        return y.testIgnoreAllow(y.options[b.name], k, D) && y.options[b.name].enabled && Dr(y, k, b, z) ? b : null;
      }
      function ca(b, y, k, D, z, V, X) {
        for (var J = 0, ue = D.length; J < ue; J++) {
          var we = D[J], de = z[J], Oe = we.getAction(y, k, b, de);
          if (Oe) {
            var Te = jo(Oe, we, de, V, X);
            if (Te) return { action: Te, interactable: we, element: de };
          }
        }
        return { action: null, interactable: null, element: null };
      }
      function da(b, y, k, D, z) {
        var V = [], X = [], J = D;
        function ue(de) {
          V.push(de), X.push(J);
        }
        for (; w.element(J); ) {
          V = [], X = [], z.interactables.forEachMatch(J, ue);
          var we = ca(b, y, k, V, X, D, z);
          if (we.action && !we.interactable.options[we.action.name].manualStart) return we;
          J = W(J);
        }
        return { action: null, interactable: null, element: null };
      }
      function ar(b, y, k) {
        var D = y.action, z = y.interactable, V = y.element;
        D = D || { name: null }, b.interactable = z, b.element = V, An(b.prepared, D), b.rect = z && D.name ? z.getRect(V) : null, Za(b, k), k.fire("autoStart:prepared", { interaction: b });
      }
      function Dr(b, y, k, D) {
        var z = b.options, V = z[k.name].max, X = z[k.name].maxPerElement, J = D.autoStart.maxInteractions, ue = 0, we = 0, de = 0;
        if (!(V && X && J)) return !1;
        for (var Oe = 0, Te = D.interactions.list; Oe < Te.length; Oe++) {
          var Ye = Te[Oe], Qe = Ye.prepared.name;
          if (Ye.interacting() && (++ue >= J || Ye.interactable === b && ((we += Qe === k.name ? 1 : 0) >= V || Ye.element === y && (de++, Qe === k.name && de >= X))))
            return !1;
        }
        return J > 0;
      }
      function Qa(b, y) {
        return w.number(b) ? (y.autoStart.maxInteractions = b, this) : y.autoStart.maxInteractions;
      }
      function Ar(b, y, k) {
        var D = k.autoStart.cursorElement;
        D && D !== b && (D.style.cursor = ""), b.ownerDocument.documentElement.style.cursor = y, b.style.cursor = y, k.autoStart.cursorElement = y ? b : null;
      }
      function Za(b, y) {
        var k = b.interactable, D = b.element, z = b.prepared;
        if (b.pointerType === "mouse" && k && k.options.styleCursor) {
          var V = "";
          if (z.name) {
            var X = k.options[z.name].cursorChecker;
            V = w.func(X) ? X(z, k, D, b._interacting) : y.actions.map[z.name].getCursor(z);
          }
          Ar(b.element, V || "", y);
        } else y.autoStart.cursorElement && Ar(y.autoStart.cursorElement, "", y);
      }
      var lr = { id: "auto-start/base", before: ["actions"], install: function(b) {
        var y = b.interactStatic, k = b.defaults;
        b.usePlugin(pi), k.base.actionChecker = null, k.base.styleCursor = !0, ce(k.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), y.maxInteractions = function(D) {
          return Qa(D, b);
        }, b.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: Dr, cursorElement: null };
      }, listeners: { "interactions:down": function(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget;
        k.interacting() || ar(k, da(k, D, z, V, y), y);
      }, "interactions:move": function(b, y) {
        (function(k, D) {
          var z = k.interaction, V = k.pointer, X = k.event, J = k.eventTarget;
          z.pointerType !== "mouse" || z.pointerIsDown || z.interacting() || ar(z, da(z, V, X, J, D), D);
        })(b, y), (function(k, D) {
          var z = k.interaction;
          if (z.pointerIsDown && !z.interacting() && z.pointerWasMoved && z.prepared.name) {
            D.fire("autoStart:before-start", k);
            var V = z.interactable, X = z.prepared.name;
            X && V && (V.options[X].manualStart || !Dr(V, z.element, z.prepared, D) ? z.stop() : (z.start(z.prepared, V, z.element), Za(z, D)));
          }
        })(b, y);
      }, "interactions:stop": function(b, y) {
        var k = b.interaction, D = k.interactable;
        D && D.options.styleCursor && Ar(k.element, "", y);
      } }, maxInteractions: Qa, withinInteractionLimit: Dr, validateAction: jo }, Rr = lr, Hl = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(b, y) {
        var k = b.interaction, D = b.eventTarget, z = b.dx, V = b.dy;
        if (k.prepared.name === "drag") {
          var X = Math.abs(z), J = Math.abs(V), ue = k.interactable.options.drag, we = ue.startAxis, de = X > J ? "x" : X < J ? "y" : "xy";
          if (k.prepared.axis = ue.lockAxis === "start" ? de[0] : ue.lockAxis, de !== "xy" && we !== "xy" && we !== de) {
            k.prepared.name = null;
            for (var Oe = D, Te = function(Qe) {
              if (Qe !== k.interactable) {
                var Ze = k.interactable.options.drag;
                if (!Ze.manualStart && Qe.testIgnoreAllow(Ze, Oe, D)) {
                  var lt = Qe.getAction(k.downPointer, k.downEvent, k, Oe);
                  if (lt && lt.name === "drag" && (function(st, xt) {
                    if (!xt) return !1;
                    var Nt = xt.options.drag.startAxis;
                    return st === "xy" || Nt === "xy" || Nt === st;
                  })(de, Qe) && Rr.validateAction(lt, Qe, Oe, D, y)) return Qe;
                }
              }
            }; w.element(Oe); ) {
              var Ye = y.interactables.forEachMatch(Oe, Te);
              if (Ye) {
                k.prepared.name = "drag", k.interactable = Ye, k.element = Oe;
                break;
              }
              Oe = W(Oe);
            }
          }
        }
      } } };
      function ei(b) {
        var y = b.prepared && b.prepared.name;
        if (!y) return null;
        var k = b.interactable.options;
        return k[y].hold || k[y].delay;
      }
      var Ks = { id: "auto-start/hold", install: function(b) {
        var y = b.defaults;
        b.usePlugin(Rr), y.perAction.hold = 0, y.perAction.delay = 0;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.autoStartHoldTimer = null;
      }, "autoStart:prepared": function(b) {
        var y = b.interaction, k = ei(y);
        k > 0 && (y.autoStartHoldTimer = setTimeout((function() {
          y.start(y.prepared, y.interactable, y.element);
        }), k));
      }, "interactions:move": function(b) {
        var y = b.interaction, k = b.duplicate;
        y.autoStartHoldTimer && y.pointerWasMoved && !k && (clearTimeout(y.autoStartHoldTimer), y.autoStartHoldTimer = null);
      }, "autoStart:before-start": function(b) {
        var y = b.interaction;
        ei(y) > 0 && (y.prepared.name = null);
      } }, getHoldDuration: ei }, Vl = Ks, Ja = { id: "auto-start", install: function(b) {
        b.usePlugin(Rr), b.usePlugin(Vl), b.usePlugin(Hl);
      } }, jl = function(b) {
        return /^(always|never|auto)$/.test(b) ? (this.options.preventDefault = b, this) : w.bool(b) ? (this.options.preventDefault = b ? "always" : "never", this) : this.options.preventDefault;
      };
      function Wl(b) {
        var y = b.interaction, k = b.event;
        y.interactable && y.interactable.checkAndPreventDefault(k);
      }
      var el = { id: "core/interactablePreventDefault", install: function(b) {
        var y = b.Interactable;
        y.prototype.preventDefault = jl, y.prototype.checkAndPreventDefault = function(k) {
          return (function(D, z, V) {
            var X = D.options.preventDefault;
            if (X !== "never") if (X !== "always") {
              if (z.events.supportsPassive && /^touch(start|move)$/.test(V.type)) {
                var J = P(V.target).document, ue = z.getDocOptions(J);
                if (!ue || !ue.events || ue.events.passive !== !1) return;
              }
              /^(mouse|pointer|touch)*(down|start)/i.test(V.type) || w.element(V.target) && K(V.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || V.preventDefault();
            } else V.preventDefault();
          })(this, b, k);
        }, b.interactions.docEvents.push({ type: "dragstart", listener: function(k) {
          for (var D = 0, z = b.interactions.list; D < z.length; D++) {
            var V = z[D];
            if (V.element && (V.element === k.target || j(V.element, k.target))) return void V.interactable.checkAndPreventDefault(k);
          }
        } });
      }, listeners: ["down", "move", "up", "cancel"].reduce((function(b, y) {
        return b["interactions:".concat(y)] = Wl, b;
      }), {}) };
      function tl(b, y) {
        if (y.phaselessTypes[b]) return !0;
        for (var k in y.map) if (b.indexOf(k) === 0 && b.substr(k.length) in y.phases) return !0;
        return !1;
      }
      function oo(b) {
        var y = {};
        for (var k in b) {
          var D = b[k];
          w.plainObject(D) ? y[k] = oo(D) : w.array(D) ? y[k] = ft(D) : y[k] = D;
        }
        return y;
      }
      var ti = (function() {
        function b(y) {
          r(this, b), 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 = y, this.result = fa(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
        }
        return l(b, [{ key: "start", value: function(y, k) {
          var D, z, V = y.phase, X = this.interaction, J = (function(we) {
            var de = we.interactable.options[we.prepared.name], Oe = de.modifiers;
            return Oe && Oe.length ? Oe : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(Te) {
              var Ye = de[Te];
              return Ye && Ye.enabled && { options: Ye, methods: Ye._methods };
            })).filter((function(Te) {
              return !!Te;
            }));
          })(X);
          this.prepareStates(J), this.startEdges = ce({}, X.edges), this.edges = ce({}, this.startEdges), this.startOffset = (D = X.rect, z = k, D ? { left: z.x - D.left, top: z.y - D.top, right: D.right - z.x, bottom: D.bottom - z.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
          var ue = this.fillArg({ phase: V, pageCoords: k, preEnd: !1 });
          return this.result = fa(), this.startAll(ue), this.result = this.setAll(ue);
        } }, { key: "fillArg", value: function(y) {
          var k = this.interaction;
          return y.interaction = k, y.interactable = k.interactable, y.element = k.element, y.rect || (y.rect = k.rect), y.edges || (y.edges = this.startEdges), y.startOffset = this.startOffset, y;
        } }, { key: "startAll", value: function(y) {
          for (var k = 0, D = this.states; k < D.length; k++) {
            var z = D[k];
            z.methods.start && (y.state = z, z.methods.start(y));
          }
        } }, { key: "setAll", value: function(y) {
          var k = y.phase, D = y.preEnd, z = y.skipModifiers, V = y.rect, X = y.edges;
          y.coords = ce({}, y.pageCoords), y.rect = ce({}, V), y.edges = ce({}, X);
          for (var J = z ? this.states.slice(z) : this.states, ue = fa(y.coords, y.rect), we = 0; we < J.length; we++) {
            var de, Oe = J[we], Te = Oe.options, Ye = ce({}, y.coords), Qe = null;
            (de = Oe.methods) != null && de.set && this.shouldDo(Te, D, k) && (y.state = Oe, Qe = Oe.methods.set(y), Ke(y.edges, y.rect, { x: y.coords.x - Ye.x, y: y.coords.y - Ye.y })), ue.eventProps.push(Qe);
          }
          ce(this.edges, y.edges), ue.delta.x = y.coords.x - y.pageCoords.x, ue.delta.y = y.coords.y - y.pageCoords.y, ue.rectDelta.left = y.rect.left - V.left, ue.rectDelta.right = y.rect.right - V.right, ue.rectDelta.top = y.rect.top - V.top, ue.rectDelta.bottom = y.rect.bottom - V.bottom;
          var Ze = this.result.coords, lt = this.result.rect;
          if (Ze && lt) {
            var st = ue.rect.left !== lt.left || ue.rect.right !== lt.right || ue.rect.top !== lt.top || ue.rect.bottom !== lt.bottom;
            ue.changed = st || Ze.x !== ue.coords.x || Ze.y !== ue.coords.y;
          }
          return ue;
        } }, { key: "applyToInteraction", value: function(y) {
          var k = this.interaction, D = y.phase, z = k.coords.cur, V = k.coords.start, X = this.result, J = this.startDelta, ue = X.delta;
          D === "start" && ce(this.startDelta, X.delta);
          for (var we = 0, de = [[V, J], [z, ue]]; we < de.length; we++) {
            var Oe = de[we], Te = Oe[0], Ye = Oe[1];
            Te.page.x += Ye.x, Te.page.y += Ye.y, Te.client.x += Ye.x, Te.client.y += Ye.y;
          }
          var Qe = this.result.rectDelta, Ze = y.rect || k.rect;
          Ze.left += Qe.left, Ze.right += Qe.right, Ze.top += Qe.top, Ze.bottom += Qe.bottom, Ze.width = Ze.right - Ze.left, Ze.height = Ze.bottom - Ze.top;
        } }, { key: "setAndApply", value: function(y) {
          var k = this.interaction, D = y.phase, z = y.preEnd, V = y.skipModifiers, X = this.setAll(this.fillArg({ preEnd: z, phase: D, pageCoords: y.modifiedCoords || k.coords.cur.page }));
          if (this.result = X, !X.changed && (!V || V < this.states.length) && k.interacting()) return !1;
          if (y.modifiedCoords) {
            var J = k.coords.cur.page, ue = { x: y.modifiedCoords.x - J.x, y: y.modifiedCoords.y - J.y };
            X.coords.x += ue.x, X.coords.y += ue.y, X.delta.x += ue.x, X.delta.y += ue.y;
          }
          this.applyToInteraction(y);
        } }, { key: "beforeEnd", value: function(y) {
          var k = y.interaction, D = y.event, z = this.states;
          if (z && z.length) {
            for (var V = !1, X = 0; X < z.length; X++) {
              var J = z[X];
              y.state = J;
              var ue = J.options, we = J.methods, de = we.beforeEnd && we.beforeEnd(y);
              if (de) return this.endResult = de, !1;
              V = V || !V && this.shouldDo(ue, !0, y.phase, !0);
            }
            V && k.move({ event: D, preEnd: !0 });
          }
        } }, { key: "stop", value: function(y) {
          var k = y.interaction;
          if (this.states && this.states.length) {
            var D = ce({ states: this.states, interactable: k.interactable, element: k.element, rect: null }, y);
            this.fillArg(D);
            for (var z = 0, V = this.states; z < V.length; z++) {
              var X = V[z];
              D.state = X, X.methods.stop && X.methods.stop(D);
            }
            this.states = null, this.endResult = null;
          }
        } }, { key: "prepareStates", value: function(y) {
          this.states = [];
          for (var k = 0; k < y.length; k++) {
            var D = y[k], z = D.options, V = D.methods, X = D.name;
            this.states.push({ options: z, methods: V, index: k, name: X });
          }
          return this.states;
        } }, { key: "restoreInteractionCoords", value: function(y) {
          var k = y.interaction, D = k.coords, z = k.rect, V = k.modification;
          if (V.result) {
            for (var X = V.startDelta, J = V.result, ue = J.delta, we = J.rectDelta, de = 0, Oe = [[D.start, X], [D.cur, ue]]; de < Oe.length; de++) {
              var Te = Oe[de], Ye = Te[0], Qe = Te[1];
              Ye.page.x -= Qe.x, Ye.page.y -= Qe.y, Ye.client.x -= Qe.x, Ye.client.y -= Qe.y;
            }
            z.left -= we.left, z.right -= we.right, z.top -= we.top, z.bottom -= we.bottom;
          }
        } }, { key: "shouldDo", value: function(y, k, D, z) {
          return !(!y || y.enabled === !1 || z && !y.endOnly || y.endOnly && !k || D === "start" && !y.setStart);
        } }, { key: "copyFrom", value: function(y) {
          this.startOffset = y.startOffset, this.startDelta = y.startDelta, this.startEdges = y.startEdges, this.edges = y.edges, this.states = y.states.map((function(k) {
            return oo(k);
          })), this.result = fa(ce({}, y.result.coords), ce({}, y.result.rect));
        } }, { key: "destroy", value: function() {
          for (var y in this) this[y] = null;
        } }]), b;
      })();
      function fa(b, y) {
        return { rect: y, coords: b, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
      }
      function ni(b, y) {
        var k = b.defaults, D = { start: b.start, set: b.set, beforeEnd: b.beforeEnd, stop: b.stop }, z = function(V) {
          var X = V || {};
          for (var J in X.enabled = X.enabled !== !1, k) J in X || (X[J] = k[J]);
          var ue = { options: X, methods: D, name: y, enable: function() {
            return X.enabled = !0, ue;
          }, disable: function() {
            return X.enabled = !1, ue;
          } };
          return ue;
        };
        return y && typeof y == "string" && (z._defaults = k, z._methods = D), z;
      }
      function Bo(b) {
        var y = b.iEvent, k = b.interaction.modification.result;
        k && (y.modifiers = k.eventProps);
      }
      var nl = { id: "modifiers/base", before: ["actions"], install: function(b) {
        b.defaults.perAction.modifiers = [];
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.modification = new ti(y);
      }, "interactions:before-action-start": function(b) {
        var y = b.interaction, k = b.interaction.modification;
        k.start(b, y.coords.start.page), y.edges = k.edges, k.applyToInteraction(b);
      }, "interactions:before-action-move": function(b) {
        var y = b.interaction, k = y.modification, D = k.setAndApply(b);
        return y.edges = k.edges, D;
      }, "interactions:before-action-end": function(b) {
        var y = b.interaction, k = y.modification, D = k.beforeEnd(b);
        return y.edges = k.startEdges, D;
      }, "interactions:action-start": Bo, "interactions:action-move": Bo, "interactions:action-end": Bo, "interactions:after-action-start": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:after-action-move": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:stop": function(b) {
        return b.interaction.modification.stop(b);
      } } }, ol = nl, il = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Nr = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V, X, J, ue, we) {
          var de;
          r(this, k), (de = y.call(this, D)).relatedTarget = null, de.screenX = void 0, de.screenY = void 0, de.button = void 0, de.buttons = void 0, de.ctrlKey = void 0, de.shiftKey = void 0, de.altKey = void 0, de.metaKey = void 0, de.page = void 0, de.client = void 0, de.delta = void 0, de.rect = void 0, de.x0 = void 0, de.y0 = void 0, de.t0 = void 0, de.dt = void 0, de.duration = void 0, de.clientX0 = void 0, de.clientY0 = void 0, de.velocity = void 0, de.speed = void 0, de.swipe = void 0, de.axes = void 0, de.preEnd = void 0, J = J || D.element;
          var Oe = D.interactable, Te = (Oe && Oe.options || il).deltaSource, Ye = He(Oe, J, V), Qe = X === "start", Ze = X === "end", lt = Qe ? f(de) : D.prevEvent, st = Qe ? D.coords.start : Ze ? { page: lt.page, client: lt.client, timeStamp: D.coords.cur.timeStamp } : D.coords.cur;
          return de.page = ce({}, st.page), de.client = ce({}, st.client), de.rect = ce({}, D.rect), de.timeStamp = st.timeStamp, Ze || (de.page.x -= Ye.x, de.page.y -= Ye.y, de.client.x -= Ye.x, de.client.y -= Ye.y), de.ctrlKey = z.ctrlKey, de.altKey = z.altKey, de.shiftKey = z.shiftKey, de.metaKey = z.metaKey, de.button = z.button, de.buttons = z.buttons, de.target = J, de.currentTarget = J, de.preEnd = ue, de.type = we || V + (X || ""), de.interactable = Oe, de.t0 = Qe ? D.pointers[D.pointers.length - 1].downTime : lt.t0, de.x0 = D.coords.start.page.x - Ye.x, de.y0 = D.coords.start.page.y - Ye.y, de.clientX0 = D.coords.start.client.x - Ye.x, de.clientY0 = D.coords.start.client.y - Ye.y, de.delta = Qe || Ze ? { x: 0, y: 0 } : { x: de[Te].x - lt[Te].x, y: de[Te].y - lt[Te].y }, de.dt = D.coords.delta.timeStamp, de.duration = de.timeStamp - de.t0, de.velocity = ce({}, D.coords.velocity[Te]), de.speed = De(de.velocity.x, de.velocity.y), de.swipe = Ze || X === "inertiastart" ? de.getSwipe() : null, de;
        }
        return l(k, [{ key: "getSwipe", value: function() {
          var D = this._interaction;
          if (D.prevEvent.speed < 600 || this.timeStamp - D.prevEvent.timeStamp > 150) return null;
          var z = 180 * Math.atan2(D.prevEvent.velocityY, D.prevEvent.velocityX) / Math.PI;
          z < 0 && (z += 360);
          var V = 112.5 <= z && z < 247.5, X = 202.5 <= z && z < 337.5;
          return { up: X, down: !X && 22.5 <= z && z < 157.5, left: V, right: !V && (292.5 <= z || z < 67.5), angle: z, speed: D.prevEvent.speed, velocity: { x: D.prevEvent.velocityX, y: D.prevEvent.velocityY } };
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }]), k;
      })(pt);
      Object.defineProperties(Nr.prototype, { pageX: { get: function() {
        return this.page.x;
      }, set: function(b) {
        this.page.x = b;
      } }, pageY: { get: function() {
        return this.page.y;
      }, set: function(b) {
        this.page.y = b;
      } }, clientX: { get: function() {
        return this.client.x;
      }, set: function(b) {
        this.client.x = b;
      } }, clientY: { get: function() {
        return this.client.y;
      }, set: function(b) {
        this.client.y = b;
      } }, dx: { get: function() {
        return this.delta.x;
      }, set: function(b) {
        this.delta.x = b;
      } }, dy: { get: function() {
        return this.delta.y;
      }, set: function(b) {
        this.delta.y = b;
      } }, velocityX: { get: function() {
        return this.velocity.x;
      }, set: function(b) {
        this.velocity.x = b;
      } }, velocityY: { get: function() {
        return this.velocity.y;
      }, set: function(b) {
        this.velocity.y = b;
      } } });
      var qs = l((function b(y, k, D, z, V) {
        r(this, b), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = y, this.pointer = k, this.event = D, this.downTime = z, this.downTarget = V;
      })), Kl = (function(b) {
        return b.interactable = "", b.element = "", b.prepared = "", b.pointerIsDown = "", b.pointerWasMoved = "", b._proxy = "", b;
      })({}), Ud = (function(b) {
        return b.start = "", b.move = "", b.end = "", b.stop = "", b.interacting = "", b;
      })({}), rl = 0, Ys = (function() {
        function b(y) {
          var k = this, D = y.pointerType, z = y.scopeFire;
          r(this, b), 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 = cn((function(de) {
            this.move(de);
          }), "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 = rl++, this._scopeFire = z, this.pointerType = D;
          var V = this;
          this._proxy = {};
          var X = function(de) {
            Object.defineProperty(k._proxy, de, { get: function() {
              return V[de];
            } });
          };
          for (var J in Kl) X(J);
          var ue = function(de) {
            Object.defineProperty(k._proxy, de, { value: function() {
              return V[de].apply(V, arguments);
            } });
          };
          for (var we in Ud) ue(we);
          this._scopeFire("interactions:new", { interaction: this });
        }
        return l(b, [{ key: "pointerMoveTolerance", get: function() {
          return 1;
        } }, { key: "pointerDown", value: function(y, k, D) {
          var z = this.updatePointer(y, k, D, !0), V = this.pointers[z];
          this._scopeFire("interactions:down", { pointer: y, event: k, eventTarget: D, pointerIndex: z, pointerInfo: V, type: "down", interaction: this });
        } }, { key: "start", value: function(y, k, D) {
          return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (y.name === "gesture" ? 2 : 1) || !k.options[y.name].enabled) && (An(this.prepared, y), this.interactable = k, this.element = D, this.rect = k.getRect(D), this.edges = this.prepared.edges ? ce({}, 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(y, k, D) {
          this.simulation || this.modification && this.modification.endResult || this.updatePointer(y, k, D, !1);
          var z, V, X = 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 && (z = this.coords.cur.client.x - this.coords.start.client.x, V = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = De(z, V) > this.pointerMoveTolerance);
          var J, ue, we, de = this.getPointerIndex(y), Oe = { pointer: y, pointerIndex: de, pointerInfo: this.pointers[de], event: k, type: "move", eventTarget: D, dx: z, dy: V, duplicate: X, interaction: this };
          X || (J = this.coords.velocity, ue = this.coords.delta, we = Math.max(ue.timeStamp / 1e3, 1e-3), J.page.x = ue.page.x / we, J.page.y = ue.page.y / we, J.client.x = ue.client.x / we, J.client.y = ue.client.y / we, J.timeStamp = we), this._scopeFire("interactions:move", Oe), X || this.simulation || (this.interacting() && (Oe.type = null, this.move(Oe)), this.pointerWasMoved && ot(this.coords.prev, this.coords.cur));
        } }, { key: "move", value: function(y) {
          y && y.event || je(this.coords.delta), (y = ce({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, y || {})).phase = "move", this._doPhase(y);
        } }, { key: "pointerUp", value: function(y, k, D, z) {
          var V = this.getPointerIndex(y);
          V === -1 && (V = this.updatePointer(y, k, D, !1));
          var X = /cancel$/i.test(k.type) ? "cancel" : "up";
          this._scopeFire("interactions:".concat(X), { pointer: y, pointerIndex: V, pointerInfo: this.pointers[V], event: k, eventTarget: D, type: X, curEventTarget: z, interaction: this }), this.simulation || this.end(k), this.removePointer(y, k);
        } }, { key: "documentBlur", value: function(y) {
          this.end(y), this._scopeFire("interactions:blur", { event: y, type: "blur", interaction: this });
        } }, { key: "end", value: function(y) {
          var k;
          this._ending = !0, y = y || this._latestPointer.event, this.interacting() && (k = this._doPhase({ event: y, interaction: this, phase: "end" })), this._ending = !1, k === !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(y) {
          var k = Ce(y);
          return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : wt(this.pointers, (function(D) {
            return D.id === k;
          }));
        } }, { key: "getPointerInfo", value: function(y) {
          return this.pointers[this.getPointerIndex(y)];
        } }, { key: "updatePointer", value: function(y, k, D, z) {
          var V, X, J, ue = Ce(y), we = this.getPointerIndex(y), de = this.pointers[we];
          return z = z !== !1 && (z || /(down|start)$/i.test(k.type)), de ? de.pointer = y : (de = new qs(ue, y, k, null, null), we = this.pointers.length, this.pointers.push(de)), Ae(this.coords.cur, this.pointers.map((function(Oe) {
            return Oe.pointer;
          })), this._now()), V = this.coords.delta, X = this.coords.prev, J = this.coords.cur, V.page.x = J.page.x - X.page.x, V.page.y = J.page.y - X.page.y, V.client.x = J.client.x - X.client.x, V.client.y = J.client.y - X.client.y, V.timeStamp = J.timeStamp - X.timeStamp, z && (this.pointerIsDown = !0, de.downTime = this.coords.cur.timeStamp, de.downTarget = D, Ve(this.downPointer, y), this.interacting() || (ot(this.coords.start, this.coords.cur), ot(this.coords.prev, this.coords.cur), this.downEvent = k, this.pointerWasMoved = !1)), this._updateLatestPointer(y, k, D), this._scopeFire("interactions:update-pointer", { pointer: y, event: k, eventTarget: D, down: z, pointerInfo: de, pointerIndex: we, interaction: this }), we;
        } }, { key: "removePointer", value: function(y, k) {
          var D = this.getPointerIndex(y);
          if (D !== -1) {
            var z = this.pointers[D];
            this._scopeFire("interactions:remove-pointer", { pointer: y, event: k, eventTarget: null, pointerIndex: D, pointerInfo: z, interaction: this }), this.pointers.splice(D, 1), this.pointerIsDown = !1;
          }
        } }, { key: "_updateLatestPointer", value: function(y, k, D) {
          this._latestPointer.pointer = y, this._latestPointer.event = k, this._latestPointer.eventTarget = D;
        } }, { key: "destroy", value: function() {
          this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
        } }, { key: "_createPreparedEvent", value: function(y, k, D, z) {
          return new Nr(this, y, this.prepared.name, k, this.element, D, z);
        } }, { key: "_fireEvent", value: function(y) {
          var k;
          (k = this.interactable) == null || k.fire(y), (!this.prevEvent || y.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = y);
        } }, { key: "_doPhase", value: function(y) {
          var k = y.event, D = y.phase, z = y.preEnd, V = y.type, X = this.rect;
          if (X && D === "move" && (Ke(this.edges, X, this.coords.delta[this.interactable.options.deltaSource]), X.width = X.right - X.left, X.height = X.bottom - X.top), this._scopeFire("interactions:before-action-".concat(D), y) === !1) return !1;
          var J = y.iEvent = this._createPreparedEvent(k, D, z, V);
          return this._scopeFire("interactions:action-".concat(D), y), D === "start" && (this.prevEvent = J), this._fireEvent(J), this._scopeFire("interactions:after-action-".concat(D), y), !0;
        } }, { key: "_now", value: function() {
          return Date.now();
        } }]), b;
      })();
      function Gs(b) {
        al(b.interaction);
      }
      function al(b) {
        if (!(function(k) {
          return !(!k.offset.pending.x && !k.offset.pending.y);
        })(b)) return !1;
        var y = b.offset.pending;
        return zr(b.coords.cur, y), zr(b.coords.delta, y), Ke(b.edges, b.rect, y), y.x = 0, y.y = 0, !0;
      }
      function ug(b) {
        var y = b.x, k = b.y;
        this.offset.pending.x += y, this.offset.pending.y += k, this.offset.total.x += y, this.offset.total.y += k;
      }
      function zr(b, y) {
        var k = b.page, D = b.client, z = y.x, V = y.y;
        k.x += z, k.y += V, D.x += z, D.y += V;
      }
      Ud.offsetBy = "";
      var cg = { id: "offset", before: ["modifiers", "pointer-events", "actions", "inertia"], install: function(b) {
        b.Interaction.prototype.offsetBy = ug;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
      }, "interactions:update-pointer": function(b) {
        return (function(y) {
          y.pointerIsDown && (zr(y.coords.cur, y.offset.total), y.offset.pending.x = 0, y.offset.pending.y = 0);
        })(b.interaction);
      }, "interactions:before-action-start": Gs, "interactions:before-action-move": Gs, "interactions:before-action-end": function(b) {
        var y = b.interaction;
        if (al(y)) return y.move({ offset: !0 }), y.end(), !1;
      }, "interactions:stop": function(b) {
        var y = b.interaction;
        y.offset.total.x = 0, y.offset.total.y = 0, y.offset.pending.x = 0, y.offset.pending.y = 0;
      } } }, mc = cg, bc = (function() {
        function b(y) {
          r(this, b), 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 = y;
        }
        return l(b, [{ key: "start", value: function(y) {
          var k = this.interaction, D = ll(k);
          if (!D || !D.enabled) return !1;
          var z = k.coords.velocity.client, V = De(z.x, z.y), X = this.modification || (this.modification = new ti(k));
          if (X.copyFrom(k.modification), this.t0 = k._now(), this.allowResume = D.allowResume, this.v0 = V, this.currentOffset = { x: 0, y: 0 }, this.startCoords = k.coords.cur.page, this.modifierArg = X.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - k.coords.cur.timeStamp < 50 && V > D.minSpeed && V > D.endSpeed) this.startInertia();
          else {
            if (X.result = X.setAll(this.modifierArg), !X.result.changed) return !1;
            this.startSmoothEnd();
          }
          return k.modification.result.rect = null, k.offsetBy(this.targetOffset), k._doPhase({ interaction: k, event: y, phase: "inertiastart" }), k.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), k.modification.result.rect = null, this.active = !0, k.simulation = this, !0;
        } }, { key: "startInertia", value: function() {
          var y = this, k = this.interaction.coords.velocity.client, D = ll(this.interaction), z = D.resistance, V = -Math.log(D.endSpeed / this.v0) / z;
          this.targetOffset = { x: (k.x - V) / z, y: (k.y - V) / z }, this.te = V, this.lambda_v0 = z / this.v0, this.one_ve_v0 = 1 - D.endSpeed / this.v0;
          var X = this.modification, J = this.modifierArg;
          J.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, X.result = X.setAll(J), X.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + X.result.delta.x, y: this.targetOffset.y + X.result.delta.y }), this.onNextFrame((function() {
            return y.inertiaTick();
          }));
        } }, { key: "startSmoothEnd", value: function() {
          var y = 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 y.smoothEndTick();
          }));
        } }, { key: "onNextFrame", value: function(y) {
          var k = this;
          this.timeout = Sn.request((function() {
            k.active && y();
          }));
        } }, { key: "inertiaTick", value: function() {
          var y, k, D, z, V, X, J, ue = this, we = this.interaction, de = ll(we).resistance, Oe = (we._now() - this.t0) / 1e3;
          if (Oe < this.te) {
            var Te, Ye = 1 - (Math.exp(-de * Oe) - this.lambda_v0) / this.one_ve_v0;
            this.isModified ? (y = 0, k = 0, D = this.targetOffset.x, z = this.targetOffset.y, V = this.modifiedOffset.x, X = this.modifiedOffset.y, Te = { x: pa(J = Ye, y, D, V), y: pa(J, k, z, X) }) : Te = { x: this.targetOffset.x * Ye, y: this.targetOffset.y * Ye };
            var Qe = { x: Te.x - this.currentOffset.x, y: Te.y - this.currentOffset.y };
            this.currentOffset.x += Qe.x, this.currentOffset.y += Qe.y, we.offsetBy(Qe), we.move(), this.onNextFrame((function() {
              return ue.inertiaTick();
            }));
          } else we.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "smoothEndTick", value: function() {
          var y = this, k = this.interaction, D = k._now() - this.t0, z = ll(k).smoothEndDuration;
          if (D < z) {
            var V = { x: ha(D, 0, this.targetOffset.x, z), y: ha(D, 0, this.targetOffset.y, z) }, X = { x: V.x - this.currentOffset.x, y: V.y - this.currentOffset.y };
            this.currentOffset.x += X.x, this.currentOffset.y += X.y, k.offsetBy(X), k.move({ skipModifiers: this.modifierCount }), this.onNextFrame((function() {
              return y.smoothEndTick();
            }));
          } else k.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "resume", value: function(y) {
          var k = y.pointer, D = y.event, z = y.eventTarget, V = this.interaction;
          V.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), V.updatePointer(k, D, z, !0), V._doPhase({ interaction: V, event: D, phase: "resume" }), ot(V.coords.prev, V.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, Sn.cancel(this.timeout);
        } }]), b;
      })();
      function ll(b) {
        var y = b.interactable, k = b.prepared;
        return y && y.options && k.name && y.options[k.name].inertia;
      }
      var yc = { id: "inertia", before: ["modifiers", "actions"], install: function(b) {
        var y = b.defaults;
        b.usePlugin(mc), b.usePlugin(ol), b.actions.phases.inertiastart = !0, b.actions.phases.resume = !0, y.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.inertia = new bc(y);
      }, "interactions:before-action-end": function(b) {
        var y = b.interaction, k = b.event;
        return (!y._interacting || y.simulation || !y.inertia.start(k)) && null;
      }, "interactions:down": function(b) {
        var y = b.interaction, k = b.eventTarget, D = y.inertia;
        if (D.active) for (var z = k; w.element(z); ) {
          if (z === y.element) {
            D.resume(b);
            break;
          }
          z = W(z);
        }
      }, "interactions:stop": function(b) {
        var y = b.interaction.inertia;
        y.active && y.stop();
      }, "interactions:before-action-resume": function(b) {
        var y = b.interaction.modification;
        y.stop(b), y.start(b, b.interaction.coords.cur.page), y.applyToInteraction(b);
      }, "interactions:before-action-inertiastart": function(b) {
        return b.interaction.modification.setAndApply(b);
      }, "interactions:action-resume": Bo, "interactions:action-inertiastart": Bo, "interactions:after-action-inertiastart": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:after-action-resume": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      } } };
      function pa(b, y, k, D) {
        var z = 1 - b;
        return z * z * y + 2 * z * b * k + b * b * D;
      }
      function ha(b, y, k, D) {
        return -k * (b /= D) * (b - 2) + y;
      }
      var Xd = yc;
      function xc(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          if (b.immediatePropagationStopped) break;
          D(b);
        }
      }
      var ga = (function() {
        function b(y) {
          r(this, b), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = ce({}, y || {});
        }
        return l(b, [{ key: "fire", value: function(y) {
          var k, D = this.global;
          (k = this.types[y.type]) && xc(y, k), !y.propagationStopped && D && (k = D[y.type]) && xc(y, k);
        } }, { key: "on", value: function(y, k) {
          var D = Re(y, k);
          for (y in D) this.types[y] = at(this.types[y] || [], D[y]);
        } }, { key: "off", value: function(y, k) {
          var D = Re(y, k);
          for (y in D) {
            var z = this.types[y];
            if (z && z.length) for (var V = 0, X = D[y]; V < X.length; V++) {
              var J = X[V], ue = z.indexOf(J);
              ue !== -1 && z.splice(ue, 1);
            }
          }
        } }, { key: "getRect", value: function(y) {
          return null;
        } }]), b;
      })(), sl = (function() {
        function b(y) {
          r(this, b), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = y, Ve(this, y);
        }
        return l(b, [{ key: "preventOriginalDefault", value: function() {
          this.originalEvent.preventDefault();
        } }, { key: "stopPropagation", value: function() {
          this.originalEvent.stopPropagation();
        } }, { key: "stopImmediatePropagation", value: function() {
          this.originalEvent.stopImmediatePropagation();
        } }]), b;
      })();
      function ul(b) {
        return w.object(b) ? { capture: !!b.capture, passive: !!b.passive } : { capture: !!b, passive: !1 };
      }
      function ql(b, y) {
        return b === y || (typeof b == "boolean" ? !!y.capture === b && !y.passive : !!b.capture == !!y.capture && !!b.passive == !!y.passive);
      }
      var Kn = { id: "events", install: function(b) {
        var y, k = [], D = {}, z = [], V = { add: X, remove: J, addDelegate: function(de, Oe, Te, Ye, Qe) {
          var Ze = ul(Qe);
          if (!D[Te]) {
            D[Te] = [];
            for (var lt = 0; lt < z.length; lt++) {
              var st = z[lt];
              X(st, Te, ue), X(st, Te, we, !0);
            }
          }
          var xt = D[Te], Nt = Ct(xt, (function(Gt) {
            return Gt.selector === de && Gt.context === Oe;
          }));
          Nt || (Nt = { selector: de, context: Oe, listeners: [] }, xt.push(Nt)), Nt.listeners.push({ func: Ye, options: Ze });
        }, removeDelegate: function(de, Oe, Te, Ye, Qe) {
          var Ze, lt = ul(Qe), st = D[Te], xt = !1;
          if (st)
            for (Ze = st.length - 1; Ze >= 0; Ze--) {
              var Nt = st[Ze];
              if (Nt.selector === de && Nt.context === Oe) {
                for (var Gt = Nt.listeners, Tt = Gt.length - 1; Tt >= 0; Tt--) {
                  var jt = Gt[Tt];
                  if (jt.func === Ye && ql(jt.options, lt)) {
                    Gt.splice(Tt, 1), Gt.length || (st.splice(Ze, 1), J(Oe, Te, ue), J(Oe, Te, we, !0)), xt = !0;
                    break;
                  }
                }
                if (xt) break;
              }
            }
        }, delegateListener: ue, delegateUseCapture: we, delegatedEvents: D, documents: z, targets: k, supportsOptions: !1, supportsPassive: !1 };
        function X(de, Oe, Te, Ye) {
          if (de.addEventListener) {
            var Qe = ul(Ye), Ze = Ct(k, (function(lt) {
              return lt.eventTarget === de;
            }));
            Ze || (Ze = { eventTarget: de, events: {} }, k.push(Ze)), Ze.events[Oe] || (Ze.events[Oe] = []), Ct(Ze.events[Oe], (function(lt) {
              return lt.func === Te && ql(lt.options, Qe);
            })) || (de.addEventListener(Oe, Te, V.supportsOptions ? Qe : Qe.capture), Ze.events[Oe].push({ func: Te, options: Qe }));
          }
        }
        function J(de, Oe, Te, Ye) {
          if (de.addEventListener && de.removeEventListener) {
            var Qe = wt(k, (function(Rn) {
              return Rn.eventTarget === de;
            })), Ze = k[Qe];
            if (Ze && Ze.events) if (Oe !== "all") {
              var lt = !1, st = Ze.events[Oe];
              if (st) {
                if (Te === "all") {
                  for (var xt = st.length - 1; xt >= 0; xt--) {
                    var Nt = st[xt];
                    J(de, Oe, Nt.func, Nt.options);
                  }
                  return;
                }
                for (var Gt = ul(Ye), Tt = 0; Tt < st.length; Tt++) {
                  var jt = st[Tt];
                  if (jt.func === Te && ql(jt.options, Gt)) {
                    de.removeEventListener(Oe, Te, V.supportsOptions ? Gt : Gt.capture), st.splice(Tt, 1), st.length === 0 && (delete Ze.events[Oe], lt = !0);
                    break;
                  }
                }
              }
              lt && !Object.keys(Ze.events).length && k.splice(Qe, 1);
            } else for (Oe in Ze.events) Ze.events.hasOwnProperty(Oe) && J(de, Oe, "all");
          }
        }
        function ue(de, Oe) {
          for (var Te = ul(Oe), Ye = new sl(de), Qe = D[de.type], Ze = it(de)[0], lt = Ze; w.element(lt); ) {
            for (var st = 0; st < Qe.length; st++) {
              var xt = Qe[st], Nt = xt.selector, Gt = xt.context;
              if (K(lt, Nt) && j(Gt, Ze) && j(Gt, lt)) {
                var Tt = xt.listeners;
                Ye.currentTarget = lt;
                for (var jt = 0; jt < Tt.length; jt++) {
                  var Rn = Tt[jt];
                  ql(Rn.options, Te) && Rn.func(Ye);
                }
              }
            }
            lt = W(lt);
          }
        }
        function we(de) {
          return ue(de, !0);
        }
        return (y = b.document) == null || y.createElement("div").addEventListener("test", null, { get capture() {
          return V.supportsOptions = !0;
        }, get passive() {
          return V.supportsPassive = !0;
        } }), b.events = V, V;
      } }, Ln = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(b) {
        for (var y = 0, k = Ln.methodOrder; y < k.length; y++) {
          var D = k[y], z = Ln[D](b);
          if (z) return z;
        }
        return null;
      }, simulationResume: function(b) {
        var y = b.pointerType, k = b.eventType, D = b.eventTarget, z = b.scope;
        if (!/down|start/i.test(k)) return null;
        for (var V = 0, X = z.interactions.list; V < X.length; V++) {
          var J = X[V], ue = D;
          if (J.simulation && J.simulation.allowResume && J.pointerType === y) for (; ue; ) {
            if (ue === J.element) return J;
            ue = W(ue);
          }
        }
        return null;
      }, mouseOrPen: function(b) {
        var y, k = b.pointerId, D = b.pointerType, z = b.eventType, V = b.scope;
        if (D !== "mouse" && D !== "pen") return null;
        for (var X = 0, J = V.interactions.list; X < J.length; X++) {
          var ue = J[X];
          if (ue.pointerType === D) {
            if (ue.simulation && !sr(ue, k)) continue;
            if (ue.interacting()) return ue;
            y || (y = ue);
          }
        }
        if (y) return y;
        for (var we = 0, de = V.interactions.list; we < de.length; we++) {
          var Oe = de[we];
          if (!(Oe.pointerType !== D || /down/i.test(z) && Oe.simulation)) return Oe;
        }
        return null;
      }, hasPointer: function(b) {
        for (var y = b.pointerId, k = 0, D = b.scope.interactions.list; k < D.length; k++) {
          var z = D[k];
          if (sr(z, y)) return z;
        }
        return null;
      }, idle: function(b) {
        for (var y = b.pointerType, k = 0, D = b.scope.interactions.list; k < D.length; k++) {
          var z = D[k];
          if (z.pointers.length === 1) {
            var V = z.interactable;
            if (V && (!V.options.gesture || !V.options.gesture.enabled)) continue;
          } else if (z.pointers.length >= 2) continue;
          if (!z.interacting() && y === z.pointerType) return z;
        }
        return null;
      } };
      function sr(b, y) {
        return b.pointers.some((function(k) {
          return k.id === y;
        }));
      }
      var Po = Ln, po = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
      function mo(b, y) {
        return function(k) {
          var D = y.interactions.list, z = Fe(k), V = it(k), X = V[0], J = V[1], ue = [];
          if (/^touch/.test(k.type)) {
            y.prevTouchTime = y.now();
            for (var we = 0, de = k.changedTouches; we < de.length; we++) {
              var Oe = de[we], Te = { pointer: Oe, pointerId: Ce(Oe), pointerType: z, eventType: k.type, eventTarget: X, curEventTarget: J, scope: y }, Ye = Hn(Te);
              ue.push([Te.pointer, Te.eventTarget, Te.curEventTarget, Ye]);
            }
          } else {
            var Qe = !1;
            if (!G.supportsPointerEvent && /mouse/.test(k.type)) {
              for (var Ze = 0; Ze < D.length && !Qe; Ze++) Qe = D[Ze].pointerType !== "mouse" && D[Ze].pointerIsDown;
              Qe = Qe || y.now() - y.prevTouchTime < 500 || k.timeStamp === 0;
            }
            if (!Qe) {
              var lt = { pointer: k, pointerId: Ce(k), pointerType: z, eventType: k.type, curEventTarget: J, eventTarget: X, scope: y }, st = Hn(lt);
              ue.push([lt.pointer, lt.eventTarget, lt.curEventTarget, st]);
            }
          }
          for (var xt = 0; xt < ue.length; xt++) {
            var Nt = ue[xt], Gt = Nt[0], Tt = Nt[1], jt = Nt[2];
            Nt[3][b](Gt, k, Tt, jt);
          }
        };
      }
      function Hn(b) {
        var y = b.pointerType, k = b.scope, D = { interaction: Po.search(b), searchDetails: b };
        return k.fire("interactions:find", D), D.interaction || k.interactions.new({ pointerType: y });
      }
      function Br(b, y) {
        var k = b.doc, D = b.scope, z = b.options, V = D.interactions.docEvents, X = D.events, J = X[y];
        for (var ue in D.browser.isIOS && !z.events && (z.events = { passive: !1 }), X.delegatedEvents) J(k, ue, X.delegateListener), J(k, ue, X.delegateUseCapture, !0);
        for (var we = z && z.events, de = 0; de < V.length; de++) {
          var Oe = V[de];
          J(k, Oe.type, Oe.listener, we);
        }
      }
      var Us = { id: "core/interactions", install: function(b) {
        for (var y = {}, k = 0; k < po.length; k++) {
          var D = po[k];
          y[D] = mo(D, b);
        }
        var z, V = G.pEventTypes;
        function X() {
          for (var J = 0, ue = b.interactions.list; J < ue.length; J++) {
            var we = ue[J];
            if (we.pointerIsDown && we.pointerType === "touch" && !we._interacting) for (var de = function() {
              var Ye = Te[Oe];
              b.documents.some((function(Qe) {
                return j(Qe.doc, Ye.downTarget);
              })) || we.removePointer(Ye.pointer, Ye.event);
            }, Oe = 0, Te = we.pointers; Oe < Te.length; Oe++) de();
          }
        }
        (z = B.PointerEvent ? [{ type: V.down, listener: X }, { type: V.down, listener: y.pointerDown }, { type: V.move, listener: y.pointerMove }, { type: V.up, listener: y.pointerUp }, { type: V.cancel, listener: y.pointerUp }] : [{ type: "mousedown", listener: y.pointerDown }, { type: "mousemove", listener: y.pointerMove }, { type: "mouseup", listener: y.pointerUp }, { type: "touchstart", listener: X }, { type: "touchstart", listener: y.pointerDown }, { type: "touchmove", listener: y.pointerMove }, { type: "touchend", listener: y.pointerUp }, { type: "touchcancel", listener: y.pointerUp }]).push({ type: "blur", listener: function(J) {
          for (var ue = 0, we = b.interactions.list; ue < we.length; ue++)
            we[ue].documentBlur(J);
        } }), b.prevTouchTime = 0, b.Interaction = (function(J) {
          u(we, J);
          var ue = p(we);
          function we() {
            return r(this, we), ue.apply(this, arguments);
          }
          return l(we, [{ key: "pointerMoveTolerance", get: function() {
            return b.interactions.pointerMoveTolerance;
          }, set: function(de) {
            b.interactions.pointerMoveTolerance = de;
          } }, { key: "_now", value: function() {
            return b.now();
          } }]), we;
        })(Ys), b.interactions = { list: [], new: function(J) {
          J.scopeFire = function(we, de) {
            return b.fire(we, de);
          };
          var ue = new b.Interaction(J);
          return b.interactions.list.push(ue), ue;
        }, listeners: y, docEvents: z, pointerMoveTolerance: 1 }, b.usePlugin(el);
      }, listeners: { "scope:add-document": function(b) {
        return Br(b, "add");
      }, "scope:remove-document": function(b) {
        return Br(b, "remove");
      }, "interactable:unset": function(b, y) {
        for (var k = b.interactable, D = y.interactions.list.length - 1; D >= 0; D--) {
          var z = y.interactions.list[D];
          z.interactable === k && (z.stop(), y.fire("interactions:destroy", { interaction: z }), z.destroy(), y.interactions.list.length > 2 && y.interactions.list.splice(D, 1));
        }
      } }, onDocSignal: Br, doOnInteractions: mo, methodNames: po }, dg = Us, Wo = (function(b) {
        return b[b.On = 0] = "On", b[b.Off = 1] = "Off", b;
      })(Wo || {}), Fi = (function() {
        function b(y, k, D, z) {
          r(this, b), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new ga(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = k.actions, this.target = y, this._context = k.context || D, this._win = P(ve(y) ? this._context : y), this._doc = this._win.document, this._scopeEvents = z, this.set(k);
        }
        return l(b, [{ key: "_defaults", get: function() {
          return { base: {}, perAction: {}, actions: {} };
        } }, { key: "setOnEvents", value: function(y, k) {
          return w.func(k.onstart) && this.on("".concat(y, "start"), k.onstart), w.func(k.onmove) && this.on("".concat(y, "move"), k.onmove), w.func(k.onend) && this.on("".concat(y, "end"), k.onend), w.func(k.oninertiastart) && this.on("".concat(y, "inertiastart"), k.oninertiastart), this;
        } }, { key: "updatePerActionListeners", value: function(y, k, D) {
          var z, V = this, X = (z = this._actions.map[y]) == null ? void 0 : z.filterEventType, J = function(ue) {
            return (X == null || X(ue)) && tl(ue, V._actions);
          };
          (w.array(k) || w.object(k)) && this._onOff(Wo.Off, y, k, void 0, J), (w.array(D) || w.object(D)) && this._onOff(Wo.On, y, D, void 0, J);
        } }, { key: "setPerAction", value: function(y, k) {
          var D = this._defaults;
          for (var z in k) {
            var V = z, X = this.options[y], J = k[V];
            V === "listeners" && this.updatePerActionListeners(y, X.listeners, J), w.array(J) ? X[V] = ft(J) : w.plainObject(J) ? (X[V] = ce(X[V] || {}, oo(J)), w.object(D.perAction[V]) && "enabled" in D.perAction[V] && (X[V].enabled = J.enabled !== !1)) : w.bool(J) && w.object(D.perAction[V]) ? X[V].enabled = J : X[V] = J;
          }
        } }, { key: "getRect", value: function(y) {
          return y = y || (w.element(this.target) ? this.target : null), w.string(this.target) && (y = y || this._context.querySelector(this.target)), ie(y);
        } }, { key: "rectChecker", value: function(y) {
          var k = this;
          return w.func(y) ? (this.getRect = function(D) {
            var z = ce({}, y.apply(k, D));
            return "width" in z || (z.width = z.right - z.left, z.height = z.bottom - z.top), z;
          }, this) : y === null ? (delete this.getRect, this) : this.getRect;
        } }, { key: "_backCompatOption", value: function(y, k) {
          if (ve(k) || w.object(k)) {
            for (var D in this.options[y] = k, this._actions.map) this.options[D][y] = k;
            return this;
          }
          return this.options[y];
        } }, { key: "origin", value: function(y) {
          return this._backCompatOption("origin", y);
        } }, { key: "deltaSource", value: function(y) {
          return y === "page" || y === "client" ? (this.options.deltaSource = y, this) : this.options.deltaSource;
        } }, { key: "getAllElements", value: function() {
          var y = this.target;
          return w.string(y) ? Array.from(this._context.querySelectorAll(y)) : w.func(y) && y.getAllElements ? y.getAllElements() : w.element(y) ? [y] : [];
        } }, { key: "context", value: function() {
          return this._context;
        } }, { key: "inContext", value: function(y) {
          return this._context === y.ownerDocument || j(this._context, y);
        } }, { key: "testIgnoreAllow", value: function(y, k, D) {
          return !this.testIgnore(y.ignoreFrom, k, D) && this.testAllow(y.allowFrom, k, D);
        } }, { key: "testAllow", value: function(y, k, D) {
          return !y || !!w.element(D) && (w.string(y) ? ae(D, y, k) : !!w.element(y) && j(y, D));
        } }, { key: "testIgnore", value: function(y, k, D) {
          return !(!y || !w.element(D)) && (w.string(y) ? ae(D, y, k) : !!w.element(y) && j(y, D));
        } }, { key: "fire", value: function(y) {
          return this.events.fire(y), this;
        } }, { key: "_onOff", value: function(y, k, D, z, V) {
          w.object(k) && !w.array(k) && (z = D, D = null);
          var X = Re(k, D, V);
          for (var J in X) {
            J === "wheel" && (J = G.wheelEvent);
            for (var ue = 0, we = X[J]; ue < we.length; ue++) {
              var de = we[ue];
              tl(J, this._actions) ? this.events[y === Wo.On ? "on" : "off"](J, de) : w.string(this.target) ? this._scopeEvents[y === Wo.On ? "addDelegate" : "removeDelegate"](this.target, this._context, J, de, z) : this._scopeEvents[y === Wo.On ? "add" : "remove"](this.target, J, de, z);
            }
          }
          return this;
        } }, { key: "on", value: function(y, k, D) {
          return this._onOff(Wo.On, y, k, D);
        } }, { key: "off", value: function(y, k, D) {
          return this._onOff(Wo.Off, y, k, D);
        } }, { key: "set", value: function(y) {
          var k = this._defaults;
          for (var D in w.object(y) || (y = {}), this.options = oo(k.base), this._actions.methodDict) {
            var z = D, V = this._actions.methodDict[z];
            this.options[z] = {}, this.setPerAction(z, ce(ce({}, k.perAction), k.actions[z])), this[V](y[z]);
          }
          for (var X in y) X !== "getRect" ? w.func(this[X]) && this[X](y[X]) : this.rectChecker(y.getRect);
          return this;
        } }, { key: "unset", value: function() {
          if (w.string(this.target)) for (var y in this._scopeEvents.delegatedEvents) for (var k = this._scopeEvents.delegatedEvents[y], D = k.length - 1; D >= 0; D--) {
            var z = k[D], V = z.selector, X = z.context, J = z.listeners;
            V === this.target && X === this._context && k.splice(D, 1);
            for (var ue = J.length - 1; ue >= 0; ue--) this._scopeEvents.removeDelegate(this.target, this._context, y, J[ue][0], J[ue][1]);
          }
          else this._scopeEvents.remove(this.target, "all");
        } }]), b;
      })(), fg = (function() {
        function b(y) {
          var k = this;
          r(this, b), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = y, y.addListeners({ "interactable:unset": function(D) {
            var z = D.interactable, V = z.target, X = w.string(V) ? k.selectorMap[V] : V[k.scope.id], J = wt(X, (function(ue) {
              return ue === z;
            }));
            X.splice(J, 1);
          } });
        }
        return l(b, [{ key: "new", value: function(y, k) {
          k = ce(k || {}, { actions: this.scope.actions });
          var D = new this.scope.Interactable(y, k, this.scope.document, this.scope.events);
          return this.scope.addDocument(D._doc), this.list.push(D), w.string(y) ? (this.selectorMap[y] || (this.selectorMap[y] = []), this.selectorMap[y].push(D)) : (D.target[this.scope.id] || Object.defineProperty(y, this.scope.id, { value: [], configurable: !0 }), y[this.scope.id].push(D)), this.scope.fire("interactable:new", { target: y, options: k, interactable: D, win: this.scope._win }), D;
        } }, { key: "getExisting", value: function(y, k) {
          var D = k && k.context || this.scope.document, z = w.string(y), V = z ? this.selectorMap[y] : y[this.scope.id];
          if (V) return Ct(V, (function(X) {
            return X._context === D && (z || X.inContext(y));
          }));
        } }, { key: "forEachMatch", value: function(y, k) {
          for (var D = 0, z = this.list; D < z.length; D++) {
            var V = z[D], X = void 0;
            if ((w.string(V.target) ? w.element(y) && K(y, V.target) : y === V.target) && V.inContext(y) && (X = k(V)), X !== void 0) return X;
          }
        } }]), b;
      })(), pg = (function() {
        function b() {
          var y = this;
          r(this, b), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = G, this.defaults = oo(il), this.Eventable = ga, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(D) {
            var z = function V(X, J) {
              var ue = D.interactables.getExisting(X, J);
              return ue || ((ue = D.interactables.new(X, J)).events.global = V.globalEvents), ue;
            };
            return z.getPointerAverage = We, z.getTouchBBox = tt, z.getTouchDistance = Ee, z.getTouchAngle = Ne, z.getElementRect = ie, z.getElementClientRect = re, z.matchesSelector = K, z.closest = Z, z.globalEvents = {}, z.version = "1.10.27", z.scope = D, z.use = function(V, X) {
              return this.scope.usePlugin(V, X), this;
            }, z.isSet = function(V, X) {
              return !!this.scope.interactables.get(V, X && X.context);
            }, z.on = cn((function(V, X, J) {
              if (w.string(V) && V.search(" ") !== -1 && (V = V.trim().split(/ +/)), w.array(V)) {
                for (var ue = 0, we = V; ue < we.length; ue++) {
                  var de = we[ue];
                  this.on(de, X, J);
                }
                return this;
              }
              if (w.object(V)) {
                for (var Oe in V) this.on(Oe, V[Oe], X);
                return this;
              }
              return tl(V, this.scope.actions) ? this.globalEvents[V] ? this.globalEvents[V].push(X) : this.globalEvents[V] = [X] : this.scope.events.add(this.scope.document, V, X, { options: J }), this;
            }), "The interact.on() method is being deprecated"), z.off = cn((function(V, X, J) {
              if (w.string(V) && V.search(" ") !== -1 && (V = V.trim().split(/ +/)), w.array(V)) {
                for (var ue = 0, we = V; ue < we.length; ue++) {
                  var de = we[ue];
                  this.off(de, X, J);
                }
                return this;
              }
              if (w.object(V)) {
                for (var Oe in V) this.off(Oe, V[Oe], X);
                return this;
              }
              var Te;
              return tl(V, this.scope.actions) ? V in this.globalEvents && (Te = this.globalEvents[V].indexOf(X)) !== -1 && this.globalEvents[V].splice(Te, 1) : this.scope.events.remove(this.scope.document, V, X, J), this;
            }), "The interact.off() method is being deprecated"), z.debug = function() {
              return this.scope;
            }, z.supportsTouch = function() {
              return G.supportsTouch;
            }, z.supportsPointerEvent = function() {
              return G.supportsPointerEvent;
            }, z.stop = function() {
              for (var V = 0, X = this.scope.interactions.list; V < X.length; V++) X[V].stop();
              return this;
            }, z.pointerMoveTolerance = function(V) {
              return w.number(V) ? (this.scope.interactions.pointerMoveTolerance = V, this) : this.scope.interactions.pointerMoveTolerance;
            }, z.addDocument = function(V, X) {
              this.scope.addDocument(V, X);
            }, z.removeDocument = function(V) {
              this.scope.removeDocument(V);
            }, z;
          })(this), this.InteractEvent = Nr, this.Interactable = void 0, this.interactables = new fg(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(D) {
            return y.removeDocument(D.target);
          };
          var k = this;
          this.Interactable = (function(D) {
            u(V, D);
            var z = p(V);
            function V() {
              return r(this, V), z.apply(this, arguments);
            }
            return l(V, [{ key: "_defaults", get: function() {
              return k.defaults;
            } }, { key: "set", value: function(X) {
              return v(c(V.prototype), "set", this).call(this, X), k.fire("interactable:set", { options: X, interactable: this }), this;
            } }, { key: "unset", value: function() {
              v(c(V.prototype), "unset", this).call(this);
              var X = k.interactables.list.indexOf(this);
              X < 0 || (k.interactables.list.splice(X, 1), k.fire("interactable:unset", { interactable: this }));
            } }]), V;
          })(Fi);
        }
        return l(b, [{ key: "addListeners", value: function(y, k) {
          this.listenerMaps.push({ id: k, map: y });
        } }, { key: "fire", value: function(y, k) {
          for (var D = 0, z = this.listenerMaps; D < z.length; D++) {
            var V = z[D].map[y];
            if (V && V(k, this, y) === !1) return !1;
          }
        } }, { key: "init", value: function(y) {
          return this.isInitialized ? this : (function(k, D) {
            return k.isInitialized = !0, w.window(D) && C(D), B.init(D), G.init(D), Sn.init(D), k.window = D, k.document = D.document, k.usePlugin(dg), k.usePlugin(Kn), k;
          })(this, y);
        } }, { key: "pluginIsInstalled", value: function(y) {
          var k = y.id;
          return k ? !!this._plugins.map[k] : this._plugins.list.indexOf(y) !== -1;
        } }, { key: "usePlugin", value: function(y, k) {
          if (!this.isInitialized) return this;
          if (this.pluginIsInstalled(y)) return this;
          if (y.id && (this._plugins.map[y.id] = y), this._plugins.list.push(y), y.install && y.install(this, k), y.listeners && y.before) {
            for (var D = 0, z = this.listenerMaps.length, V = y.before.reduce((function(J, ue) {
              return J[ue] = !0, J[Qd(ue)] = !0, J;
            }), {}); D < z; D++) {
              var X = this.listenerMaps[D].id;
              if (X && (V[X] || V[Qd(X)])) break;
            }
            this.listenerMaps.splice(D, 0, { id: y.id, map: y.listeners });
          } else y.listeners && this.listenerMaps.push({ id: y.id, map: y.listeners });
          return this;
        } }, { key: "addDocument", value: function(y, k) {
          if (this.getDocIndex(y) !== -1) return !1;
          var D = P(y);
          k = k ? ce({}, k) : {}, this.documents.push({ doc: y, options: k }), this.events.documents.push(y), y !== this.document && this.events.add(D, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: y, window: D, scope: this, options: k });
        } }, { key: "removeDocument", value: function(y) {
          var k = this.getDocIndex(y), D = P(y), z = this.documents[k].options;
          this.events.remove(D, "unload", this.onWindowUnload), this.documents.splice(k, 1), this.events.documents.splice(k, 1), this.fire("scope:remove-document", { doc: y, window: D, scope: this, options: z });
        } }, { key: "getDocIndex", value: function(y) {
          for (var k = 0; k < this.documents.length; k++) if (this.documents[k].doc === y) return k;
          return -1;
        } }, { key: "getDocOptions", value: function(y) {
          var k = this.getDocIndex(y);
          return k === -1 ? null : this.documents[k].options;
        } }, { key: "now", value: function() {
          return (this.window.Date || Date).now();
        } }]), b;
      })();
      function Qd(b) {
        return b && b.replace(/\/.*$/, "");
      }
      var Zd = new pg(), Jn = Zd.interactStatic, Fr = typeof globalThis < "u" ? globalThis : window;
      Zd.init(Fr);
      var va = Object.freeze({ __proto__: null, edgeTarget: function() {
      }, elements: function() {
      }, grid: function(b) {
        var y = [["x", "y"], ["left", "top"], ["right", "bottom"], ["width", "height"]].filter((function(D) {
          var z = D[0], V = D[1];
          return z in b || V in b;
        })), k = function(D, z) {
          for (var V = b.range, X = b.limits, J = X === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : X, ue = b.offset, we = ue === void 0 ? { x: 0, y: 0 } : ue, de = { range: V, grid: b, x: null, y: null }, Oe = 0; Oe < y.length; Oe++) {
            var Te = y[Oe], Ye = Te[0], Qe = Te[1], Ze = Math.round((D - we.x) / b[Ye]), lt = Math.round((z - we.y) / b[Qe]);
            de[Ye] = Math.max(J.left, Math.min(J.right, Ze * b[Ye] + we.x)), de[Qe] = Math.max(J.top, Math.min(J.bottom, lt * b[Qe] + we.y));
          }
          return de;
        };
        return k.grid = b, k.coordFields = y, k;
      } }), cl = { id: "snappers", install: function(b) {
        var y = b.interactStatic;
        y.snappers = ce(y.snappers || {}, va), y.createSnapGrid = y.snappers.grid;
      } }, hg = cl, Li = { start: function(b) {
        var y = b.state, k = b.rect, D = b.edges, z = b.pageCoords, V = y.options, X = V.ratio, J = V.enabled, ue = y.options, we = ue.equalDelta, de = ue.modifiers;
        X === "preserve" && (X = k.width / k.height), y.startCoords = ce({}, z), y.startRect = ce({}, k), y.ratio = X, y.equalDelta = we;
        var Oe = y.linkedEdges = { top: D.top || D.left && !D.bottom, left: D.left || D.top && !D.right, bottom: D.bottom || D.right && !D.top, right: D.right || D.bottom && !D.left };
        if (y.xIsPrimaryAxis = !(!D.left && !D.right), y.equalDelta) {
          var Te = (Oe.left ? 1 : -1) * (Oe.top ? 1 : -1);
          y.edgeSign = { x: Te, y: Te };
        } else y.edgeSign = { x: Oe.left ? -1 : 1, y: Oe.top ? -1 : 1 };
        if (J !== !1 && ce(D, Oe), de != null && de.length) {
          var Ye = new ti(b.interaction);
          Ye.copyFrom(b.interaction.modification), Ye.prepareStates(de), y.subModification = Ye, Ye.startAll(o({}, b));
        }
      }, set: function(b) {
        var y = b.state, k = b.rect, D = b.coords, z = y.linkedEdges, V = ce({}, D), X = y.equalDelta ? gg : Jd;
        if (ce(b.edges, z), X(y, y.xIsPrimaryAxis, D, k), !y.subModification) return null;
        var J = ce({}, k);
        Ke(z, J, { x: D.x - V.x, y: D.y - V.y });
        var ue = y.subModification.setAll(o(o({}, b), {}, { rect: J, edges: z, pageCoords: D, prevCoords: D, prevRect: J })), we = ue.delta;
        return ue.changed && (X(y, Math.abs(we.x) > Math.abs(we.y), ue.coords, ue.rect), ce(D, ue.coords)), ue.eventProps;
      }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
      function gg(b, y, k) {
        var D = b.startCoords, z = b.edgeSign;
        y ? k.y = D.y + (k.x - D.x) * z.y : k.x = D.x + (k.y - D.y) * z.x;
      }
      function Jd(b, y, k, D) {
        var z = b.startRect, V = b.startCoords, X = b.ratio, J = b.edgeSign;
        if (y) {
          var ue = D.width / X;
          k.y = V.y + (ue - z.height) * J.y;
        } else {
          var we = D.height * X;
          k.x = V.x + (we - z.width) * J.x;
        }
      }
      var ef = ni(Li, "aspectRatio"), dl = function() {
      };
      dl._defaults = {};
      var Lr = dl;
      function ma(b, y, k) {
        return w.func(b) ? ge(b, y.interactable, y.element, [k.x, k.y, y]) : ge(b, y.interactable, y.element);
      }
      var fl = { start: function(b) {
        var y = b.rect, k = b.startOffset, D = b.state, z = b.interaction, V = b.pageCoords, X = D.options, J = X.elementRect, ue = ce({ left: 0, top: 0, right: 0, bottom: 0 }, X.offset || {});
        if (y && J) {
          var we = ma(X.restriction, z, V);
          if (we) {
            var de = we.right - we.left - y.width, Oe = we.bottom - we.top - y.height;
            de < 0 && (ue.left += de, ue.right += de), Oe < 0 && (ue.top += Oe, ue.bottom += Oe);
          }
          ue.left += k.left - y.width * J.left, ue.top += k.top - y.height * J.top, ue.right += k.right - y.width * (1 - J.right), ue.bottom += k.bottom - y.height * (1 - J.bottom);
        }
        D.offset = ue;
      }, set: function(b) {
        var y = b.coords, k = b.interaction, D = b.state, z = D.options, V = D.offset, X = ma(z.restriction, k, y);
        if (X) {
          var J = (function(ue) {
            return !ue || "left" in ue && "top" in ue || ((ue = ce({}, ue)).left = ue.x || 0, ue.top = ue.y || 0, ue.right = ue.right || ue.left + ue.width, ue.bottom = ue.bottom || ue.top + ue.height), ue;
          })(X);
          y.x = Math.max(Math.min(J.right - V.right, y.x), J.left + V.left), y.y = Math.max(Math.min(J.bottom - V.bottom, y.y), J.top + V.top);
        }
      }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, vg = ni(fl, "restrict"), Hr = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, ur = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
      function pl(b, y) {
        for (var k = 0, D = ["top", "left", "bottom", "right"]; k < D.length; k++) {
          var z = D[k];
          z in b || (b[z] = y[z]);
        }
        return b;
      }
      var hl = { noInner: Hr, noOuter: ur, start: function(b) {
        var y, k = b.interaction, D = b.startOffset, z = b.state, V = z.options;
        V && (y = Me(ma(V.offset, k, k.coords.start.page))), y = y || { x: 0, y: 0 }, z.offset = { top: y.y + D.top, left: y.x + D.left, bottom: y.y - D.bottom, right: y.x - D.right };
      }, set: function(b) {
        var y = b.coords, k = b.edges, D = b.interaction, z = b.state, V = z.offset, X = z.options;
        if (k) {
          var J = ce({}, y), ue = ma(X.inner, D, J) || {}, we = ma(X.outer, D, J) || {};
          pl(ue, Hr), pl(we, ur), k.top ? y.y = Math.min(Math.max(we.top + V.top, J.y), ue.top + V.top) : k.bottom && (y.y = Math.max(Math.min(we.bottom + V.bottom, J.y), ue.bottom + V.bottom)), k.left ? y.x = Math.min(Math.max(we.left + V.left, J.x), ue.left + V.left) : k.right && (y.x = Math.max(Math.min(we.right + V.right, J.x), ue.right + V.right));
        }
      }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, wc = ni(hl, "restrictEdges"), Sc = ce({ get elementRect() {
        return { top: 0, left: 0, bottom: 1, right: 1 };
      }, set elementRect(b) {
      } }, fl.defaults), Xs = ni({ start: fl.start, set: fl.set, defaults: Sc }, "restrictRect"), tf = { width: -1 / 0, height: -1 / 0 }, nf = { width: 1 / 0, height: 1 / 0 }, of = ni({ start: function(b) {
        return hl.start(b);
      }, set: function(b) {
        var y = b.interaction, k = b.state, D = b.rect, z = b.edges, V = k.options;
        if (z) {
          var X = ze(ma(V.min, y, b.coords)) || tf, J = ze(ma(V.max, y, b.coords)) || nf;
          k.options = { endOnly: V.endOnly, inner: ce({}, hl.noInner), outer: ce({}, hl.noOuter) }, z.top ? (k.options.inner.top = D.bottom - X.height, k.options.outer.top = D.bottom - J.height) : z.bottom && (k.options.inner.bottom = D.top + X.height, k.options.outer.bottom = D.top + J.height), z.left ? (k.options.inner.left = D.right - X.width, k.options.outer.left = D.right - J.width) : z.right && (k.options.inner.right = D.left + X.width, k.options.outer.right = D.left + J.width), hl.set(b), k.options = V;
        }
      }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Qs = { start: function(b) {
        var y, k = b.interaction, D = b.interactable, z = b.element, V = b.rect, X = b.state, J = b.startOffset, ue = X.options, we = ue.offsetWithOrigin ? (function(Te) {
          var Ye = Te.interaction.element, Qe = Me(ge(Te.state.options.origin, null, null, [Ye])), Ze = Qe || He(Te.interactable, Ye, Te.interaction.prepared.name);
          return Ze;
        })(b) : { x: 0, y: 0 };
        if (ue.offset === "startCoords") y = { x: k.coords.start.page.x, y: k.coords.start.page.y };
        else {
          var de = ge(ue.offset, D, z, [k]);
          (y = Me(de) || { x: 0, y: 0 }).x += we.x, y.y += we.y;
        }
        var Oe = ue.relativePoints;
        X.offsets = V && Oe && Oe.length ? Oe.map((function(Te, Ye) {
          return { index: Ye, relativePoint: Te, x: J.left - V.width * Te.x + y.x, y: J.top - V.height * Te.y + y.y };
        })) : [{ index: 0, relativePoint: null, x: y.x, y: y.y }];
      }, set: function(b) {
        var y = b.interaction, k = b.coords, D = b.state, z = D.options, V = D.offsets, X = He(y.interactable, y.element, y.prepared.name), J = ce({}, k), ue = [];
        z.offsetWithOrigin || (J.x -= X.x, J.y -= X.y);
        for (var we = 0, de = V; we < de.length; we++) for (var Oe = de[we], Te = J.x - Oe.x, Ye = J.y - Oe.y, Qe = 0, Ze = z.targets.length; Qe < Ze; Qe++) {
          var lt = z.targets[Qe], st = void 0;
          (st = w.func(lt) ? lt(Te, Ye, y._proxy, Oe, Qe) : lt) && ue.push({ x: (w.number(st.x) ? st.x : Te) + Oe.x, y: (w.number(st.y) ? st.y : Ye) + Oe.y, range: w.number(st.range) ? st.range : z.range, source: lt, index: Qe, offset: Oe });
        }
        for (var xt = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, Nt = 0; Nt < ue.length; Nt++) {
          var Gt = ue[Nt], Tt = Gt.range, jt = Gt.x - J.x, Rn = Gt.y - J.y, xn = De(jt, Rn), Fn = xn <= Tt;
          Tt === 1 / 0 && xt.inRange && xt.range !== 1 / 0 && (Fn = !1), xt.target && !(Fn ? xt.inRange && Tt !== 1 / 0 ? xn / Tt < xt.distance / xt.range : Tt === 1 / 0 && xt.range !== 1 / 0 || xn < xt.distance : !xt.inRange && xn < xt.distance) || (xt.target = Gt, xt.distance = xn, xt.range = Tt, xt.inRange = Fn, xt.delta.x = jt, xt.delta.y = Rn);
        }
        return xt.inRange && (k.x = xt.target.x, k.y = xt.target.y), D.closest = xt, xt;
      }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, rf = ni(Qs, "snap"), Yl = { start: function(b) {
        var y = b.state, k = b.edges, D = y.options;
        if (!k) return null;
        b.state = { options: { targets: null, relativePoints: [{ x: k.left ? 0 : 1, y: k.top ? 0 : 1 }], offset: D.offset || "self", origin: { x: 0, y: 0 }, range: D.range } }, y.targetFields = y.targetFields || [["width", "height"], ["x", "y"]], Qs.start(b), y.offsets = b.state.offsets, b.state = y;
      }, set: function(b) {
        var y = b.interaction, k = b.state, D = b.coords, z = k.options, V = k.offsets, X = { x: D.x - V[0].x, y: D.y - V[0].y };
        k.options = ce({}, z), k.options.targets = [];
        for (var J = 0, ue = z.targets || []; J < ue.length; J++) {
          var we = ue[J], de = void 0;
          if (de = w.func(we) ? we(X.x, X.y, y) : we) {
            for (var Oe = 0, Te = k.targetFields; Oe < Te.length; Oe++) {
              var Ye = Te[Oe], Qe = Ye[0], Ze = Ye[1];
              if (Qe in de || Ze in de) {
                de.x = de[Qe], de.y = de[Ze];
                break;
              }
            }
            k.options.targets.push(de);
          }
        }
        var lt = Qs.set(b);
        return k.options = z, lt;
      }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, mg = ni(Yl, "snapSize"), Zs = { aspectRatio: ef, restrictEdges: wc, restrict: vg, restrictRect: Xs, restrictSize: of, snapEdges: ni({ start: function(b) {
        var y = b.edges;
        return y ? (b.state.targetFields = b.state.targetFields || [[y.left ? "left" : "right", y.top ? "top" : "bottom"]], Yl.start(b)) : null;
      }, set: Yl.set, defaults: ce(oo(Yl.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: rf, snapSize: mg, spring: Lr, avoid: Lr, transform: Lr, rubberband: Lr }, af = { id: "modifiers", install: function(b) {
        var y = b.interactStatic;
        for (var k in b.usePlugin(ol), b.usePlugin(hg), y.modifiers = Zs, Zs) {
          var D = Zs[k], z = D._defaults, V = D._methods;
          z._methods = V, b.defaults.perAction[k] = z;
        }
      } }, gl = af, Gl = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V, X, J, ue) {
          var we;
          if (r(this, k), Ve(f(we = y.call(this, J)), V), V !== z && Ve(f(we), z), we.timeStamp = ue, we.originalEvent = V, we.type = D, we.pointerId = Ce(z), we.pointerType = Fe(z), we.target = X, we.currentTarget = null, D === "tap") {
            var de = J.getPointerIndex(z);
            we.dt = we.timeStamp - J.pointers[de].downTime;
            var Oe = we.timeStamp - J.tapTime;
            we.double = !!J.prevTap && J.prevTap.type !== "doubletap" && J.prevTap.target === we.target && Oe < 500;
          } else D === "doubletap" && (we.dt = z.timeStamp - J.tapTime, we.double = !0);
          return we;
        }
        return l(k, [{ key: "_subtractOrigin", value: function(D) {
          var z = D.x, V = D.y;
          return this.pageX -= z, this.pageY -= V, this.clientX -= z, this.clientY -= V, this;
        } }, { key: "_addOrigin", value: function(D) {
          var z = D.x, V = D.y;
          return this.pageX += z, this.pageY += V, this.clientX += z, this.clientY += V, this;
        } }, { key: "preventDefault", value: function() {
          this.originalEvent.preventDefault();
        } }]), k;
      })(pt), io = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(b) {
        b.pointerEvents = io, b.defaults.actions.pointerEvents = io.defaults, ce(b.actions.phaselessTypes, io.types);
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.prevTap = null, y.tapTime = 0;
      }, "interactions:update-pointer": function(b) {
        var y = b.down, k = b.pointerInfo;
        !y && k.hold || (k.hold = { duration: 1 / 0, timeout: null });
      }, "interactions:move": function(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget;
        b.duplicate || k.pointerIsDown && !k.pointerWasMoved || (k.pointerIsDown && Js(b), cr({ interaction: k, pointer: D, event: z, eventTarget: V, type: "move" }, y));
      }, "interactions:down": function(b, y) {
        (function(k, D) {
          for (var z = k.interaction, V = k.pointer, X = k.event, J = k.eventTarget, ue = k.pointerIndex, we = z.pointers[ue].hold, de = te(J), Oe = { interaction: z, pointer: V, event: X, eventTarget: J, type: "hold", targets: [], path: de, node: null }, Te = 0; Te < de.length; Te++) {
            var Ye = de[Te];
            Oe.node = Ye, D.fire("pointerEvents:collect-targets", Oe);
          }
          if (Oe.targets.length) {
            for (var Qe = 1 / 0, Ze = 0, lt = Oe.targets; Ze < lt.length; Ze++) {
              var st = lt[Ze].eventable.options.holdDuration;
              st < Qe && (Qe = st);
            }
            we.duration = Qe, we.timeout = setTimeout((function() {
              cr({ interaction: z, eventTarget: J, pointer: V, event: X, type: "hold" }, D);
            }), Qe);
          }
        })(b, y), cr(b, y);
      }, "interactions:up": function(b, y) {
        Js(b), cr(b, y), (function(k, D) {
          var z = k.interaction, V = k.pointer, X = k.event, J = k.eventTarget;
          z.pointerWasMoved || cr({ interaction: z, eventTarget: J, pointer: V, event: X, type: "tap" }, D);
        })(b, y);
      }, "interactions:cancel": function(b, y) {
        Js(b), cr(b, y);
      } }, PointerEvent: Gl, fire: cr, collectEventTargets: so, 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 cr(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget, X = b.type, J = b.targets, ue = J === void 0 ? so(b, y) : J, we = new Gl(X, D, z, V, k, y.now());
        y.fire("pointerEvents:new", { pointerEvent: we });
        for (var de = { interaction: k, pointer: D, event: z, eventTarget: V, targets: ue, type: X, pointerEvent: we }, Oe = 0; Oe < ue.length; Oe++) {
          var Te = ue[Oe];
          for (var Ye in Te.props || {}) we[Ye] = Te.props[Ye];
          var Qe = He(Te.eventable, Te.node);
          if (we._subtractOrigin(Qe), we.eventable = Te.eventable, we.currentTarget = Te.node, Te.eventable.fire(we), we._addOrigin(Qe), we.immediatePropagationStopped || we.propagationStopped && Oe + 1 < ue.length && ue[Oe + 1].node !== we.currentTarget) break;
        }
        if (y.fire("pointerEvents:fired", de), X === "tap") {
          var Ze = we.double ? cr({ interaction: k, pointer: D, event: z, eventTarget: V, type: "doubletap" }, y) : we;
          k.prevTap = Ze, k.tapTime = Ze.timeStamp;
        }
        return we;
      }
      function so(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget, X = b.type, J = k.getPointerIndex(D), ue = k.pointers[J];
        if (X === "tap" && (k.pointerWasMoved || !ue || ue.downTarget !== V)) return [];
        for (var we = te(V), de = { interaction: k, pointer: D, event: z, eventTarget: V, type: X, path: we, targets: [], node: null }, Oe = 0; Oe < we.length; Oe++) {
          var Te = we[Oe];
          de.node = Te, y.fire("pointerEvents:collect-targets", de);
        }
        return X === "hold" && (de.targets = de.targets.filter((function(Ye) {
          var Qe, Ze;
          return Ye.eventable.options.holdDuration === ((Qe = k.pointers[J]) == null || (Ze = Qe.hold) == null ? void 0 : Ze.duration);
        }))), de.targets;
      }
      function Js(b) {
        var y = b.interaction, k = b.pointerIndex, D = y.pointers[k].hold;
        D && D.timeout && (clearTimeout(D.timeout), D.timeout = null);
      }
      var Cc = Object.freeze({ __proto__: null, default: io });
      function Ul(b) {
        var y = b.interaction;
        y.holdIntervalHandle && (clearInterval(y.holdIntervalHandle), y.holdIntervalHandle = null);
      }
      var bg = { id: "pointer-events/holdRepeat", install: function(b) {
        b.usePlugin(io);
        var y = b.pointerEvents;
        y.defaults.holdRepeatInterval = 0, y.types.holdrepeat = b.actions.phaselessTypes.holdrepeat = !0;
      }, listeners: ["move", "up", "cancel", "endall"].reduce((function(b, y) {
        return b["pointerEvents:".concat(y)] = Ul, b;
      }), { "pointerEvents:new": function(b) {
        var y = b.pointerEvent;
        y.type === "hold" && (y.count = (y.count || 0) + 1);
      }, "pointerEvents:fired": function(b, y) {
        var k = b.interaction, D = b.pointerEvent, z = b.eventTarget, V = b.targets;
        if (D.type === "hold" && V.length) {
          var X = V[0].eventable.options.holdRepeatInterval;
          X <= 0 || (k.holdIntervalHandle = setTimeout((function() {
            y.pointerEvents.fire({ interaction: k, eventTarget: z, type: "hold", pointer: D, event: D }, y);
          }), X));
        }
      } }) }, yg = bg, $c = { id: "pointer-events/interactableTargets", install: function(b) {
        var y = b.Interactable;
        y.prototype.pointerEvents = function(D) {
          return ce(this.events.options, D), this;
        };
        var k = y.prototype._backCompatOption;
        y.prototype._backCompatOption = function(D, z) {
          var V = k.call(this, D, z);
          return V === this && (this.events.options[D] = z), V;
        };
      }, listeners: { "pointerEvents:collect-targets": function(b, y) {
        var k = b.targets, D = b.node, z = b.type, V = b.eventTarget;
        y.interactables.forEachMatch(D, (function(X) {
          var J = X.events, ue = J.options;
          J.types[z] && J.types[z].length && X.testIgnoreAllow(ue, D, V) && k.push({ node: D, eventable: J, props: { interactable: X } });
        }));
      }, "interactable:new": function(b) {
        var y = b.interactable;
        y.events.getRect = function(k) {
          return y.getRect(k);
        };
      }, "interactable:set": function(b, y) {
        var k = b.interactable, D = b.options;
        ce(k.events.options, y.pointerEvents.defaults), ce(k.events.options, D.pointerEvents || {});
      } } }, Y = $c, ee = { id: "pointer-events", install: function(b) {
        b.usePlugin(Cc), b.usePlugin(yg), b.usePlugin(Y);
      } }, me = ee, ye = { id: "reflow", install: function(b) {
        var y = b.Interactable;
        b.actions.phases.reflow = !0, y.prototype.reflow = function(k) {
          return (function(D, z, V) {
            for (var X = D.getAllElements(), J = V.window.Promise, ue = J ? [] : null, we = function() {
              var Oe = X[de], Te = D.getRect(Oe);
              if (!Te) return 1;
              var Ye, Qe = Ct(V.interactions.list, (function(st) {
                return st.interacting() && st.interactable === D && st.element === Oe && st.prepared.name === z.name;
              }));
              if (Qe) Qe.move(), ue && (Ye = Qe._reflowPromise || new J((function(st) {
                Qe._reflowResolve = st;
              })));
              else {
                var Ze = ze(Te), lt = /* @__PURE__ */ (function(st) {
                  return { coords: st, 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: Ze.x, y: Ze.y }, client: { x: Ze.x, y: Ze.y }, timeStamp: V.now() });
                Ye = (function(st, xt, Nt, Gt, Tt) {
                  var jt = st.interactions.new({ pointerType: "reflow" }), Rn = { interaction: jt, event: Tt, pointer: Tt, eventTarget: Nt, phase: "reflow" };
                  jt.interactable = xt, jt.element = Nt, jt.prevEvent = Tt, jt.updatePointer(Tt, Tt, Nt, !0), je(jt.coords.delta), An(jt.prepared, Gt), jt._doPhase(Rn);
                  var xn = st.window, Fn = xn.Promise, qn = Fn ? new Fn((function(uo) {
                    jt._reflowResolve = uo;
                  })) : void 0;
                  return jt._reflowPromise = qn, jt.start(Gt, xt, Nt), jt._interacting ? (jt.move(Rn), jt.end(Tt)) : (jt.stop(), jt._reflowResolve()), jt.removePointer(Tt, Tt), qn;
                })(V, D, Oe, z, lt);
              }
              ue && ue.push(Ye);
            }, de = 0; de < X.length && !we(); de++) ;
            return ue && J.all(ue).then((function() {
              return D;
            }));
          })(this, k, b);
        };
      }, listeners: { "interactions:stop": function(b, y) {
        var k = b.interaction;
        k.pointerType === "reflow" && (k._reflowResolve && k._reflowResolve(), (function(D, z) {
          D.splice(D.indexOf(z), 1);
        })(y.interactions.list, k));
      } } }, ke = ye;
      if (Jn.use(el), Jn.use(mc), Jn.use(me), Jn.use(Xd), Jn.use(gl), Jn.use(Ja), Jn.use(Xn), Jn.use(Dn), Jn.use(ke), Jn.default = Jn, i(e) === "object" && e) try {
        e.exports = Jn;
      } catch {
      }
      return Jn.default = Jn, Jn;
    }));
  })(Wc, Wc.exports)), Wc.exports;
}
var wee = /* @__PURE__ */ xee();
const K$ = /* @__PURE__ */ uz(wee), q$ = /* @__PURE__ */ be({
  __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, r = zt(Y2), a = zt(G2);
    if (!r)
      throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");
    const l = $e(null), s = $n({
      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, p = NaN, v = NaN, g = -1, m = -1, x = -1, S = -1, C = o.x, P = o.y, $ = o.w, I = o.h;
    const w = le(), M = $n({
      i: Kt(o, "i"),
      state: s,
      wrapper: w,
      calcXY: ge
    });
    function _(Pe) {
      Re(Pe);
    }
    function N() {
      Xe();
    }
    function R(Pe) {
      ki(o.isDraggable) && (s.draggable = Pe);
    }
    function H(Pe) {
      ki(o.isResizable) && (s.resizable = Pe);
    }
    function L(Pe) {
      ki(o.isBounded) && (s.bounded = Pe);
    }
    function B(Pe) {
      s.transformScale = Pe;
    }
    function A(Pe) {
      s.rowHeight = Pe;
    }
    function G(Pe) {
      s.maxRows = Pe;
    }
    function j() {
      s.rtl = j$() === "rtl", Xe();
    }
    function Z(Pe) {
      s.cols = Math.floor(Pe);
    }
    r.increaseItem(M), th(() => {
      s.rtl = j$() === "rtl";
    }), At(() => {
      r.responsive && r.lastBreakpoint ? s.cols = J2(r.lastBreakpoint, r.cols) : s.cols = r.colNum, s.rowHeight = r.rowHeight, s.containerWidth = r.width !== null ? r.width : 100, s.margin = r.margin !== void 0 ? r.margin.map(Number) : [10, 10], s.maxRows = r.maxRows, ki(o.isDraggable) ? s.draggable = r.isDraggable : s.draggable = o.isDraggable, ki(o.isResizable) ? s.resizable = r.isResizable : s.resizable = o.isResizable, ki(o.isBounded) ? s.bounded = r.isBounded : s.bounded = o.isBounded, s.transformScale = r.transformScale, s.useCssTransforms = r.useCssTransforms, s.useStyleCursor = r.useStyleCursor, It(() => {
        C = o.x, P = o.y, I = o.h, $ = o.w, oi(ie);
      }), a.on("updateWidth", _), a.on("compact", N), a.on("setDraggable", R), a.on("setResizable", H), a.on("setBounded", L), a.on("setTransformScale", B), a.on("setRowHeight", A), a.on("setMaxRows", G), a.on("directionchange", j), a.on("setColNum", Z);
    }), qt(() => {
      a.off("updateWidth", _), a.off("compact", N), a.off("setDraggable", R), a.off("setResizable", H), a.off("setBounded", L), a.off("setTransformScale", B), a.off("setRowHeight", A), a.off("setMaxRows", G), a.off("directionchange", j), a.off("setColNum", Z), l.value && (l.value.unset(), l.value = null), r.decreaseItem(M);
    }), t({ state: s, wrapper: w });
    const W = typeof navigator < "u" ? navigator.userAgent.toLowerCase().includes("android") : !1, K = E(() => s.resizable && !o.static), q = E(() => r.isMirrored ? !s.rtl : s.rtl), U = E(() => (s.draggable || s.resizable) && !o.static), ae = fee("item"), se = E(() => ({
      [ae.b()]: !0,
      [ae.bm("resizable")]: K.value,
      [ae.bm("static")]: o.static,
      [ae.bm("resizing")]: s.isResizing,
      [ae.bm("dragging")]: s.isDragging,
      [ae.bm("transform")]: s.useCssTransforms,
      [ae.bm("rtl")]: q.value,
      [ae.bm("no-touch")]: W && U.value
    })), re = E(() => [ae.be("resizer"), q.value && ae.bem("resizer", "rtl")].filter(Boolean));
    Ie(
      () => o.isDraggable,
      (Pe) => {
        s.draggable = Pe;
      }
    ), Ie(
      () => o.static,
      () => {
        oi(Ve), oi(je);
      }
    ), Ie(
      () => s.draggable,
      () => {
        oi(Ve);
      }
    ), Ie(
      () => o.isResizable,
      (Pe) => {
        s.resizable = Pe;
      }
    ), Ie(
      () => o.isBounded,
      (Pe) => {
        s.bounded = Pe;
      }
    ), Ie(
      () => s.resizable,
      () => {
        oi(je);
      }
    ), Ie(
      () => s.rowHeight,
      () => {
        oi(ie), oi(te);
      }
    ), Ie([() => s.cols, () => s.containerWidth], () => {
      oi(je), oi(ie), oi(te);
    }), Ie([() => o.minH, () => o.maxH, () => o.minW, () => o.maxW], () => {
      oi(je);
    }), Ie(q, () => {
      oi(je), oi(ie);
    }), Ie([() => r.margin, () => r.margin[0], () => r.margin[1]], () => {
      const Pe = r.margin;
      !Pe || Pe[0] === s.margin[0] && Pe[1] === s.margin[1] || (s.margin = Pe.map(Number), oi(ie), oi(te));
    });
    function ie() {
      o.x + o.w > s.cols ? (C = 0, $ = o.w > s.cols ? s.cols : o.w) : (C = o.x, $ = o.w);
      const Pe = fe(C, P, $, I);
      s.isDragging && (Pe.top = s.dragging.top, q.value ? Pe.right = s.dragging.left : Pe.left = s.dragging.left), s.isResizing && (Pe.width = s.resizing.width, Pe.height = s.resizing.height);
      let Ge;
      s.useCssTransforms ? q.value ? Ge = see(Pe.top, Pe.right, Pe.width, Pe.height) : Ge = lee(Pe.top, Pe.left, Pe.width, Pe.height) : q.value ? Ge = cee(Pe.top, Pe.right, Pe.width, Pe.height) : Ge = uee(Pe.top, Pe.left, Pe.width, Pe.height), s.style = Ge;
    }
    function te() {
      const Pe = {};
      for (const Ge of ["width", "height"]) {
        const Se = s.style[Ge].match(/^(\d+)px$/);
        if (!Se)
          return;
        Pe[Ge] = Se[1];
      }
      i("container-resized", o.i, o.h, o.w, Pe.height, Pe.width);
    }
    function ve(Pe) {
      if (o.static) return;
      const Ge = Pe.type;
      if (Ge === "resizestart" && s.isResizing || Ge !== "resizestart" && !s.isResizing)
        return;
      const Se = H$(Pe);
      if (ki(Se)) return;
      const { x: Ce, y: Ae } = Se, qe = { width: 0, height: 0 };
      let We;
      switch (Ge) {
        case "resizestart": {
          je(), g = $, m = I, We = fe(C, P, $, I), qe.width = We.width, qe.height = We.height, s.resizing = qe, s.isResizing = !0;
          break;
        }
        case "resizemove": {
          !Pe.edges.right && !Pe.edges.left && (p = Ce), !Pe.edges.top && !Pe.edges.bottom && (v = Ae);
          const tt = V$(p, v, Ce, Ae);
          q.value ? qe.width = s.resizing.width - tt.deltaX / s.transformScale : qe.width = s.resizing.width + tt.deltaX / s.transformScale, qe.height = s.resizing.height + tt.deltaY / s.transformScale, s.resizing = qe;
          break;
        }
        case "resizeend": {
          We = fe(C, P, $, I), qe.width = We.width, qe.height = We.height, s.resizing = { width: -1, height: -1 }, s.isResizing = !1;
          break;
        }
      }
      We = He(qe.height, qe.width), We.w < o.minW && (We.w = o.minW), We.w > o.maxW && (We.w = o.maxW), We.h < o.minH && (We.h = o.minH), We.h > o.maxH && (We.h = o.maxH), We.h < 1 && (We.h = 1), We.w < 1 && (We.w = 1), p = Ce, v = Ae, ($ !== We.w || I !== We.h) && i("resize", o.i, We.h, We.w, qe.height, qe.width), Pe.type === "resizeend" && (g !== $ || m !== I) && i("resized", o.i, We.h, We.w, qe.height, qe.width), a.emit("resizeEvent", Pe.type, o.i, C, P, We.h, We.w);
    }
    function ce(Pe) {
      if (o.static || s.isResizing) return;
      const Ge = Pe.type;
      if (Ge === "dragstart" && s.isDragging || Ge !== "dragstart" && !s.isDragging)
        return;
      const Se = H$(Pe);
      if (ki(Se)) return;
      const { x: Ce, y: Ae } = Se, qe = Pe.target;
      if (!qe.offsetParent) return;
      const We = { top: 0, left: 0 };
      switch (Ge) {
        case "dragstart": {
          x = C, S = P;
          const Ee = qe.offsetParent.getBoundingClientRect(), Ne = qe.getBoundingClientRect(), Fe = Ne.left / s.transformScale, it = Ee.left / s.transformScale, pt = Ne.right / s.transformScale, at = Ee.right / s.transformScale, ft = Ne.top / s.transformScale, wt = Ee.top / s.transformScale;
          q.value ? We.left = (pt - at) * -1 : We.left = Fe - it, We.top = ft - wt, s.dragging = We, s.isDragging = !0;
          break;
        }
        case "dragmove": {
          const Ee = V$(d, f, Ce, Ae);
          if (q.value ? We.left = s.dragging.left - Ee.deltaX / s.transformScale : We.left = s.dragging.left + Ee.deltaX / s.transformScale, We.top = s.dragging.top + Ee.deltaY / s.transformScale, s.bounded) {
            const Ne = qe.offsetParent.clientHeight - ze(o.h, s.rowHeight, s.margin[1]);
            We.top = Ke(We.top, 0, Ne);
            const Fe = Me(), it = s.containerWidth - ze(o.w, Fe, s.margin[0]);
            We.left = Ke(We.left, 0, it);
          }
          s.dragging = We;
          break;
        }
        case "dragend": {
          const Ee = qe.offsetParent.getBoundingClientRect(), Ne = qe.getBoundingClientRect(), Fe = Ne.left / s.transformScale, it = Ee.left / s.transformScale, pt = Ne.right / s.transformScale, at = Ee.right / s.transformScale, ft = Ne.top / s.transformScale, wt = Ee.top / s.transformScale;
          q.value ? We.left = (pt - at) * -1 : We.left = Fe - it, We.top = ft - wt, s.dragging = { top: -1, left: -1 }, s.isDragging = !1;
          break;
        }
      }
      let tt;
      q.value, tt = ge(We.top, We.left), d = Ce, f = Ae, (C !== tt.x || P !== tt.y) && i("move", o.i, tt.x, tt.y), Pe.type === "dragend" && (x !== C || S !== P) && i("moved", o.i, tt.x, tt.y), a.emit("dragEvent", Pe.type, o.i, tt.x, tt.y, I, $);
    }
    function fe(Pe, Ge, Se, Ce) {
      const Ae = Me();
      let qe;
      return q.value ? qe = {
        right: Math.round(Ae * Pe + (Pe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ge + (Ge + 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: Se === 1 / 0 ? Se : Math.round(Ae * Se + Math.max(0, Se - 1) * s.margin[0]),
        height: Ce === 1 / 0 ? Ce : Math.round(s.rowHeight * Ce + Math.max(0, Ce - 1) * s.margin[1])
      } : qe = {
        left: Math.round(Ae * Pe + (Pe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ge + (Ge + 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: Se === 1 / 0 ? Se : Math.round(Ae * Se + Math.max(0, Se - 1) * s.margin[0]),
        height: Ce === 1 / 0 ? Ce : Math.round(s.rowHeight * Ce + Math.max(0, Ce - 1) * s.margin[1])
      }, qe;
    }
    function ge(Pe, Ge) {
      const Se = Me();
      let Ce = Math.round((Ge - s.margin[0]) / (Se + s.margin[0])), Ae = Math.round((Pe - s.margin[1]) / (s.rowHeight + s.margin[1]));
      return Ce = Math.max(Math.min(Ce, s.cols - $), 0), Ae = Math.max(Math.min(Ae, s.maxRows - I), 0), { x: Ce, y: Ae };
    }
    function Me() {
      return (s.containerWidth - s.margin[0] * (s.cols + 1)) / s.cols;
    }
    function ze(Pe, Ge, Se) {
      return Number.isFinite(Pe) ? Math.round(Ge * Pe + Math.max(0, Pe - 1) * Se) : Pe;
    }
    function Ke(Pe, Ge, Se) {
      return Math.max(Math.min(Pe, Se), Ge);
    }
    function He(Pe, Ge, Se = !1) {
      const Ce = Me();
      let Ae = Math.round((Ge + s.margin[0]) / (Ce + s.margin[0])), qe = 0;
      return Se ? qe = Math.ceil((Pe + s.margin[1]) / (s.rowHeight + s.margin[1])) : qe = Math.round((Pe + s.margin[1]) / (s.rowHeight + s.margin[1])), Ae = Math.max(Math.min(Ae, s.cols - C), 0), qe = Math.max(Math.min(qe, s.maxRows - P), 0), { w: Ae, h: qe };
    }
    function Re(Pe, Ge) {
      s.containerWidth = Pe;
    }
    function Xe() {
      ie();
    }
    function De() {
      !l.value && w.value && (l.value = K$(w.value), s.useStyleCursor || l.value.styleCursor(!1));
    }
    const Be = B$(ce);
    function Ve() {
      if (De(), !!l.value)
        if (s.draggable && !o.static) {
          const Pe = {
            ignoreFrom: o.dragIgnoreFrom,
            allowFrom: o.dragAllowFrom,
            ...o.dragOption
          };
          l.value.draggable(Pe), u || (u = !0, l.value.on("dragstart dragmove dragend", (Ge) => {
            Ge.type === "dragmove" ? Be(Ge) : ce(Ge);
          }));
        } else
          l.value.draggable({ enabled: !1 });
    }
    const ot = B$(ve);
    function je() {
      if (De(), !!l.value)
        if (s.resizable && !o.static) {
          const Pe = fe(0, 0, o.maxW, o.maxH), Ge = fe(0, 0, o.minW, o.minH), Se = {
            edges: {
              left: q.value ? `.${re.value[0]}` : !1,
              right: q.value ? !1 : `.${re.value[0]}`,
              bottom: `.${re.value[0]}`,
              top: !1
            },
            ignoreFrom: o.resizeIgnoreFrom,
            restrictSize: {
              min: {
                height: Ge.height * s.transformScale,
                width: Ge.width * s.transformScale
              },
              max: {
                height: Pe.height * s.transformScale,
                width: Pe.width * s.transformScale
              }
            },
            ...o.resizeOption
          };
          o.preserveAspectRatio && (Se.modifiers = [K$.modifiers.aspectRatio({ ratio: "preserve" })]), l.value.resizable(Se), c || (c = !0, l.value.on("resizestart resizemove resizeend", (Ce) => {
            Ce.type === "resizemove" ? ot(Ce) : ve(Ce);
          }));
        } else
          l.value.resizable({ enabled: !1 });
    }
    return (Pe, Ge) => (ne(), xe("section", {
      ref_key: "wrapper",
      ref: w,
      class: Pt(se.value),
      style: Ht(s.style)
    }, [
      ai(Pe.$slots, "default"),
      K.value ? (ne(), xe("span", {
        key: 0,
        class: Pt(re.value)
      }, null, 2)) : nt("", !0)
    ], 6));
  }
}), Ws = typeof window < "u";
var Y$;
Ws && (Y$ = window?.navigator) != null && Y$.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function G$(e) {
  return e != null;
}
function U$() {
}
const See = 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(See)));
const Cee = Ws && ("ontouchstart" in window || $ee() > 0), X$ = Cee ? "pointerdown" : "click";
function $ee() {
  return typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints) || 0;
}
function Pee(e, t, n = window.Event) {
  const { type: o, bubbles: i = !1, cancelable: r = !1, ...a } = t;
  if (!G$(o) || o === "") return !1;
  let l;
  return G$(n) ? l = new n(o, { bubbles: i, cancelable: r }) : (l = document.createEvent("HTMLEvents"), l.initEvent(o, i, r)), Object.assign(l, a), e.dispatchEvent(l);
}
const Oee = "clickoutside", kee = /* @__PURE__ */ new Set();
let Hv = null;
function Iee(e, t) {
  return e instanceof Node ? t === e || t.contains(e) || !!t.__transferElement && (t.__transferElement === e || t.__transferElement.contains(e)) : !1;
}
Ws && (X$ === "click" && document.addEventListener(
  "pointerdown",
  (e) => {
    Hv = e.target;
  },
  !0
), document.addEventListener(
  X$,
  (e) => {
    const t = Hv;
    Hv = null, kee.forEach((n) => {
      if (t && Iee(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)) && Pee(n, { type: Oee });
    });
  },
  !0
));
const Mee = [
  [
    "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 vp;
if (Ws) {
  for (const e of Mee)
    if (e[1] in document) {
      vp = e;
      break;
    }
}
E(() => !1);
const Tee = /* @__PURE__ */ new Set(), _ee = /* @__PURE__ */ new WeakMap();
if (Ws && vp) {
  const e = vp[2], t = vp[4];
  document.addEventListener(
    t,
    () => {
      if (Tee.forEach((n) => {
        n.value = !1;
      }), document[e]) {
        const n = _ee.get(document[e]);
        n && (n.value = !0);
      }
    },
    !1
  );
}
const tE = /* @__PURE__ */ new Map();
tE.set("x", 0);
tE.set("y", 0);
var Ps = [], Eee = function() {
  return Ps.some(function(e) {
    return e.activeTargets.length > 0;
  });
}, Dee = function() {
  return Ps.some(function(e) {
    return e.skippedTargets.length > 0;
  });
}, Q$ = "ResizeObserver loop completed with undelivered notifications.", Aee = function() {
  var e;
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
    message: Q$
  }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = Q$), window.dispatchEvent(e);
}, Od;
(function(e) {
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
})(Od || (Od = {}));
var Os = function(e) {
  return Object.freeze(e);
}, Ree = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.inlineSize = t, this.blockSize = n, Os(this);
  }
  return e;
})(), nE = (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, Os(this);
  }
  return e.prototype.toJSON = function() {
    var t = this, n = t.x, o = t.y, i = t.top, r = t.right, a = t.bottom, l = t.left, s = t.width, u = t.height;
    return { x: n, y: o, top: i, right: r, bottom: a, left: l, width: s, height: u };
  }, e.fromRect = function(t) {
    return new e(t.x, t.y, t.width, t.height);
  }, e;
})(), Dx = function(e) {
  return e instanceof SVGElement && "getBBox" in e;
}, oE = function(e) {
  if (Dx(e)) {
    var t = e.getBBox(), n = t.width, o = t.height;
    return !n && !o;
  }
  var i = e, r = i.offsetWidth, a = i.offsetHeight;
  return !(r || a || e.getClientRects().length);
}, Z$ = 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);
}, Nee = 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;
}, ld = typeof window < "u" ? window : {}, Bf = /* @__PURE__ */ new WeakMap(), J$ = /auto|scroll/, zee = /^tb|vertical/, Bee = /msie|trident/i.test(ld.navigator && ld.navigator.userAgent), jr = function(e) {
  return parseFloat(e || "0");
}, Bu = function(e, t, n) {
  return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new Ree((n ? t : e) || 0, (n ? e : t) || 0);
}, eP = Os({
  devicePixelContentBoxSize: Bu(),
  borderBoxSize: Bu(),
  contentBoxSize: Bu(),
  contentRect: new nE(0, 0, 0, 0)
}), iE = function(e, t) {
  if (t === void 0 && (t = !1), Bf.has(e) && !t)
    return Bf.get(e);
  if (oE(e))
    return Bf.set(e, eP), eP;
  var n = getComputedStyle(e), o = Dx(e) && e.ownerSVGElement && e.getBBox(), i = !Bee && n.boxSizing === "border-box", r = zee.test(n.writingMode || ""), a = !o && J$.test(n.overflowY || ""), l = !o && J$.test(n.overflowX || ""), s = o ? 0 : jr(n.paddingTop), u = o ? 0 : jr(n.paddingRight), c = o ? 0 : jr(n.paddingBottom), d = o ? 0 : jr(n.paddingLeft), f = o ? 0 : jr(n.borderTopWidth), p = o ? 0 : jr(n.borderRightWidth), v = o ? 0 : jr(n.borderBottomWidth), g = o ? 0 : jr(n.borderLeftWidth), m = d + u, x = s + c, S = g + p, C = f + v, P = l ? e.offsetHeight - C - e.clientHeight : 0, $ = a ? e.offsetWidth - S - e.clientWidth : 0, I = i ? m + S : 0, w = i ? x + C : 0, M = o ? o.width : jr(n.width) - I - $, _ = o ? o.height : jr(n.height) - w - P, N = M + m + $ + S, R = _ + x + P + C, H = Os({
    devicePixelContentBoxSize: Bu(Math.round(M * devicePixelRatio), Math.round(_ * devicePixelRatio), r),
    borderBoxSize: Bu(N, R, r),
    contentBoxSize: Bu(M, _, r),
    contentRect: new nE(d, s, M, _)
  });
  return Bf.set(e, H), H;
}, rE = function(e, t, n) {
  var o = iE(e, n), i = o.borderBoxSize, r = o.contentBoxSize, a = o.devicePixelContentBoxSize;
  switch (t) {
    case Od.DEVICE_PIXEL_CONTENT_BOX:
      return a;
    case Od.BORDER_BOX:
      return i;
    default:
      return r;
  }
}, Fee = /* @__PURE__ */ (function() {
  function e(t) {
    var n = iE(t);
    this.target = t, this.contentRect = n.contentRect, this.borderBoxSize = Os([n.borderBoxSize]), this.contentBoxSize = Os([n.contentBoxSize]), this.devicePixelContentBoxSize = Os([n.devicePixelContentBoxSize]);
  }
  return e;
})(), aE = function(e) {
  if (oE(e))
    return 1 / 0;
  for (var t = 0, n = e.parentNode; n; )
    t += 1, n = n.parentNode;
  return t;
}, Lee = function() {
  var e = 1 / 0, t = [];
  Ps.forEach(function(r) {
    if (r.activeTargets.length !== 0) {
      var a = [];
      r.activeTargets.forEach(function(l) {
        var s = new Fee(l.target), u = aE(l.target);
        a.push(s), l.lastReportedSize = rE(l.target, l.observedBox), u < e && (e = u);
      }), t.push(function() {
        r.callback.call(r.observer, a, r.observer);
      }), r.activeTargets.splice(0, r.activeTargets.length);
    }
  });
  for (var n = 0, o = t; n < o.length; n++) {
    var i = o[n];
    i();
  }
  return e;
}, tP = function(e) {
  Ps.forEach(function(t) {
    t.activeTargets.splice(0, t.activeTargets.length), t.skippedTargets.splice(0, t.skippedTargets.length), t.observationTargets.forEach(function(n) {
      n.isActive() && (aE(n.target) > e ? t.activeTargets.push(n) : t.skippedTargets.push(n));
    });
  });
}, Hee = function() {
  var e = 0;
  for (tP(e); Eee(); )
    e = Lee(), tP(e);
  return Dee() && Aee(), e > 0;
}, Vv, lE = [], Vee = function() {
  return lE.splice(0).forEach(function(e) {
    return e();
  });
}, jee = function(e) {
  if (!Vv) {
    var t = 0, n = document.createTextNode(""), o = { characterData: !0 };
    new MutationObserver(function() {
      return Vee();
    }).observe(n, o), Vv = function() {
      n.textContent = "".concat(t ? t-- : t++);
    };
  }
  lE.push(e), Vv();
}, Wee = function(e) {
  jee(function() {
    requestAnimationFrame(e);
  });
}, mp = 0, Kee = function() {
  return !!mp;
}, qee = 250, Yee = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, nP = [
  "resize",
  "load",
  "transitionend",
  "animationend",
  "animationstart",
  "animationiteration",
  "keyup",
  "keydown",
  "mouseup",
  "mousedown",
  "mouseover",
  "mouseout",
  "blur",
  "focus"
], oP = function(e) {
  return e === void 0 && (e = 0), Date.now() + e;
}, jv = !1, Gee = (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 = qee), !jv) {
      jv = !0;
      var o = oP(t);
      Wee(function() {
        var i = !1;
        try {
          i = Hee();
        } finally {
          if (jv = !1, t = o - oP(), !Kee())
            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, Yee);
    };
    document.body ? n() : ld.addEventListener("DOMContentLoaded", n);
  }, e.prototype.start = function() {
    var t = this;
    this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), nP.forEach(function(n) {
      return ld.addEventListener(n, t.listener, !0);
    }));
  }, e.prototype.stop = function() {
    var t = this;
    this.stopped || (this.observer && this.observer.disconnect(), nP.forEach(function(n) {
      return ld.removeEventListener(n, t.listener, !0);
    }), this.stopped = !0);
  }, e;
})(), Gb = new Gee(), iP = function(e) {
  !mp && e > 0 && Gb.start(), mp += e, !mp && Gb.stop();
}, Uee = function(e) {
  return !Dx(e) && !Nee(e) && getComputedStyle(e).display === "inline";
}, Xee = (function() {
  function e(t, n) {
    this.target = t, this.observedBox = n || Od.CONTENT_BOX, this.lastReportedSize = {
      inlineSize: 0,
      blockSize: 0
    };
  }
  return e.prototype.isActive = function() {
    var t = rE(this.target, this.observedBox, !0);
    return Uee(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
  }, e;
})(), Qee = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = n;
  }
  return e;
})(), Ff = /* @__PURE__ */ new WeakMap(), rP = function(e, t) {
  for (var n = 0; n < e.length; n += 1)
    if (e[n].target === t)
      return n;
  return -1;
}, Lf = (function() {
  function e() {
  }
  return e.connect = function(t, n) {
    var o = new Qee(t, n);
    Ff.set(t, o);
  }, e.observe = function(t, n, o) {
    var i = Ff.get(t), r = i.observationTargets.length === 0;
    rP(i.observationTargets, n) < 0 && (r && Ps.push(i), i.observationTargets.push(new Xee(n, o && o.box)), iP(1), Gb.schedule());
  }, e.unobserve = function(t, n) {
    var o = Ff.get(t), i = rP(o.observationTargets, n), r = o.observationTargets.length === 1;
    i >= 0 && (r && Ps.splice(Ps.indexOf(o), 1), o.observationTargets.splice(i, 1), iP(-1));
  }, e.disconnect = function(t) {
    var n = this, o = Ff.get(t);
    o.observationTargets.slice().forEach(function(i) {
      return n.unobserve(t, i.target);
    }), o.activeTargets.splice(0, o.activeTargets.length);
  }, e;
})(), Zee = (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.");
    Lf.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 (!Z$(t))
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Lf.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 (!Z$(t))
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Lf.unobserve(this, t);
  }, e.prototype.disconnect = function() {
    Lf.disconnect(this);
  }, e.toString = function() {
    return "function ResizeObserver () { [polyfill code] }";
  }, e;
})();
const Jp = /* @__PURE__ */ new WeakMap();
function Jee(e) {
  var t;
  for (let n = 0, o = e.length; n < o; ++n) {
    const i = e[n], r = Jp.get(i.target);
    if (typeof r == "function") {
      const { inlineSize: a, blockSize: l } = ((t = i.borderBoxSize) == null ? void 0 : t[0]) ?? {}, { offsetWidth: s, offsetHeight: u } = i.target;
      r(
        Object.assign(i, {
          offsetWidth: s,
          offsetHeight: u,
          width: a ?? s,
          height: l ?? u
        })
      );
    }
  }
}
const sE = new (Ws && window.ResizeObserver || Zee)(
  Jee
);
function aP(e, t) {
  Jp.set(e, t), sE.observe(e);
}
function lP(e) {
  Jp.has(e) && (sE.unobserve(e), Jp.delete(e));
}
function ete(e = {}) {
  let t = U$;
  const n = Ie(
    () => T(e.target),
    (i) => {
      t(), !(!i || typeof e.onResize != "function") && (aP(i, e.onResize), t = () => {
        lP(i), t = U$;
      });
    },
    { immediate: !0 }
  ), o = () => {
    n(), t();
  };
  return _P() && EP(o), {
    /**
     * @deprecated Will be removed in next major version, please directly use `observeResize` from imports.
     */
    observeResize: aP,
    /**
     * @deprecated Will be removed in next major version, please directly use `unobserveResize` from imports.
     */
    unobserveResize: lP,
    unobserve: o
  };
}
const tte = le(!1);
E(() => tte.value);
const sP = "__theme_style__", Wv = "__theme_observer__", uP = $n(/* @__PURE__ */ new Map()), cP = /* @__PURE__ */ new Map();
Ie(uP, () => {
  if (!Ws) return;
  cP.clear();
  const e = document.head.querySelector(`#${sP}`);
  e && document.head.removeChild(e);
  const t = document.createElement("style");
  let n = `.${Wv} { width: 1px }`, o = 1;
  for (const [i, [r, a]] of uP.entries())
    n += ` html.${r} .${Wv}, .${a} .${Wv} { width: ${++o}px }`, cP.set(o, i);
  t.textContent = n, t.id = sP, document.head.appendChild(t);
});
const nte = /* @__PURE__ */ be({
  __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, r = $n({
      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
    }), a = /* @__PURE__ */ new Map(), l = le(o.layout), s = le(), { observeResize: u, unobserveResize: c } = ete(), d = eee();
    d.on("resizeEvent", f), d.on("dragEvent", p), th(() => {
      i("layout-before-mount", l.value);
    }), At(() => {
      i("layout-mounted", l.value), Yt(() => {
        dee(l.value), r.originalLayout = l.value, Yt(() => {
          _(), s.value && u(s.value, tee(C, 16)), yu(l.value, o.verticalCompact), i("layout-updated", l.value), S(), C();
        });
      });
    }), qt(() => {
      d.clearAll(), s.value && c(s.value);
    });
    function f(R, H, L, B, A, G) {
      w(R, H, L, B, A, G);
    }
    function p(R, H, L, B, A, G) {
      I(R, H, L, B, A, G);
    }
    Ie(
      () => r.width,
      (R, H) => {
        Yt(() => {
          d.emit("updateWidth", R), H === -1 && Yt(() => {
            i("layout-ready", l.value);
          }), S();
        });
      }
    ), Ie(
      () => [o.layout, o.layout.length],
      () => {
        l.value = o.layout, x();
      }
    ), Ie(
      () => o.colNum,
      (R) => {
        d.emit("setColNum", R);
      }
    ), Ie(
      () => o.rowHeight,
      (R) => {
        d.emit("setRowHeight", R);
      }
    ), Ie(
      () => o.isDraggable,
      (R) => {
        d.emit("setDraggable", R);
      }
    ), Ie(
      () => o.isResizable,
      (R) => {
        d.emit("setResizable", R);
      }
    ), Ie(
      () => o.isBounded,
      (R) => {
        d.emit("setBounded", R);
      }
    ), Ie(
      () => o.transformScale,
      (R) => {
        d.emit("setTransformScale", R);
      }
    ), Ie(
      () => o.responsive,
      (R) => {
        R || (i("update:layout", r.originalLayout), d.emit("setColNum", o.colNum)), C();
      }
    ), Ie(
      () => o.maxRows,
      (R) => {
        d.emit("setMaxRows", R);
      }
    ), Ie([() => o.margin, () => o.margin[1]], S), Ft(
      Y2,
      $n({
        ...ys(o),
        ...ys(r),
        increaseItem: v,
        decreaseItem: g
      })
    ), Ft(G2, d), t({ state: r, getItem: m, resizeEvent: w, dragEvent: I, layoutUpdate: x });
    function v(R) {
      a.set(R.i, R);
    }
    function g(R) {
      a.delete(R.i);
    }
    function m(R) {
      return a.get(R);
    }
    function x() {
      if (!ki(l.value) && !ki(r.originalLayout)) {
        if (l.value.length !== r.originalLayout.length) {
          const R = N(l.value, r.originalLayout);
          if (R.length > 0)
            if (l.value.length > r.originalLayout.length)
              r.originalLayout = r.originalLayout.concat(R);
            else {
              const H = new Set(R.map((L) => L.i));
              r.originalLayout = r.originalLayout.filter((L) => !H.has(L.i));
            }
          r.lastLayoutLength = l.value.length, _();
        }
        yu(l.value, o.verticalCompact), d.emit("updateWidth", r.width), S(), i("layout-updated", l.value);
      }
    }
    function S() {
      r.mergedStyle = {
        height: P()
      };
    }
    function C() {
      s.value && (r.width = s.value.offsetWidth), d.emit("resizeEvent");
    }
    function P() {
      if (!o.autoSize) return;
      const R = parseFloat(o.margin[1]);
      return oee(l.value) * (o.rowHeight + R) + R + "px";
    }
    let $;
    function I(R, H, L, B, A, G) {
      let j = F$(l.value, H);
      ki(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" }), R === "dragstart" && !o.verticalCompact && ($ = l.value.reduce(
        (Z, { i: W, x: K, y: q }) => ({
          ...Z,
          [W]: { x: K, y: q }
        }),
        {}
      )), R === "dragmove" || R === "dragstart" ? (r.placeholder.i = H, r.placeholder.x = j.x, r.placeholder.y = j.y, r.placeholder.w = G, r.placeholder.h = A, Yt(() => {
        r.isDragging = !0;
      }), d.emit("updateWidth", r.width)) : Yt(() => {
        r.isDragging = !1;
      }), l.value = Yb(l.value, j, L, B, !0, o.preventCollision), o.restoreOnDrag ? (j.static = !0, yu(l.value, o.verticalCompact, $), j.static = !1) : yu(l.value, o.verticalCompact), d.emit("compact"), S(), R === "dragend" && ($ = void 0, i("layout-updated", l.value));
    }
    function w(R, H, L, B, A, G) {
      let j = F$(l.value, H);
      ki(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" });
      let Z;
      if (o.preventCollision) {
        const W = X2(l.value, { ...j, w: G, h: A }).filter(
          (K) => K.i !== j.i
        );
        if (Z = W.length > 0, Z) {
          let K = 1 / 0, q = 1 / 0;
          W.forEach((U) => {
            U.x > j.x && (K = Math.min(K, U.x)), U.y > j.y && (q = Math.min(q, U.y));
          }), Number.isFinite(K) && (j.w = K - j.x), Number.isFinite(q) && (j.h = q - j.y);
        }
      }
      Z || (j.w = G, j.h = A), R === "resizestart" || R === "resizemove" ? (r.placeholder.i = H, r.placeholder.x = L, r.placeholder.y = B, r.placeholder.w = j.w, r.placeholder.h = j.h, Yt(() => {
        r.isDragging = !0;
      }), d.emit("updateWidth", r.width)) : R && Yt(() => {
        r.isDragging = !1;
      }), o.responsive && M(), yu(l.value, o.verticalCompact), d.emit("compact"), S(), R === "resizeend" && i("layout-updated", l.value);
    }
    function M() {
      const R = gee(o.breakpoints, r.width);
      if (R === r.lastBreakpoint)
        return;
      const H = J2(R, o.cols);
      !ki(r.lastBreakpoint) && !r.layouts[r.lastBreakpoint] && (r.layouts[r.lastBreakpoint] = qb(l.value));
      const L = vee(
        r.originalLayout,
        r.layouts,
        o.breakpoints,
        R,
        r.lastBreakpoint,
        H,
        o.verticalCompact
      );
      r.layouts[R] = L, r.lastBreakpoint !== R && i("breakpoint-changed", R, L), l.value = L, i("update:layout", L), r.lastBreakpoint = R, d.emit("setColNum", H);
    }
    function _() {
      r.layouts = Object.assign({}, o.responsiveLayouts);
    }
    function N(R, H) {
      const L = new Set(H.map((j) => j.i)), B = new Set(R.map((j) => j.i)), A = R.filter((j) => !L.has(j.i)), G = H.filter((j) => !B.has(j.i));
      return A.concat(G);
    }
    return (R, H) => (ne(), xe("div", {
      ref_key: "wrapper",
      ref: s,
      class: "vgl-layout",
      style: Ht(r.mergedStyle)
    }, [
      R.$slots.default ? ai(R.$slots, "default", { key: 0 }) : (ne(!0), xe(Je, { key: 1 }, Ut(l.value, (L) => (ne(), dt(q$, EE({
        key: L.i,
        ref_for: !0
      }, L), {
        default: he(() => [
          ai(R.$slots, "item", { item: L })
        ]),
        _: 2
      }, 1040))), 128)),
      er(h(q$, {
        class: "vgl-item--placeholder",
        x: r.placeholder.x,
        y: r.placeholder.y,
        w: r.placeholder.w,
        h: r.placeholder.h,
        i: r.placeholder.i
      }, null, 8, ["x", "y", "w", "h", "i"]), [
        [Or, r.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 ote = {
  class: "px-12px py-15px",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, ite = {
  class: "flex items-center justify-between px-4 py-3 w-full",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, Ax = /* @__PURE__ */ be({
  __name: "AppOverlay",
  props: {
    open: { type: Boolean },
    title: {},
    mode: { default: "modal" },
    width: { default: 520 },
    bodyHeight: {},
    footer: { type: Boolean, default: !0 },
    headerBorder: { type: Boolean, default: !0 },
    footerBorder: { type: Boolean, default: !0 },
    destroyOnClose: { type: Boolean, default: !1 },
    mask: { type: Boolean, default: !0 }
  },
  emits: ["close"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = ta(), r = E(() => i.isDark ? "#141414" : "#ffffff"), a = E(() => i.isDark ? "#303030" : "#e8e8e8");
    function l() {
      let f = 0;
      return document.querySelectorAll("div").forEach((p) => {
        const v = window.getComputedStyle(p);
        if (v.position === "static")
          return;
        const g = Number.parseInt(v.zIndex);
        !Number.isNaN(g) && g > f && (f = g);
      }), f;
    }
    const s = le(1e3);
    Ie(() => n.open, (f) => {
      f && (s.value = Math.max(l(), 1e3));
    });
    const u = E(() => ({
      wrapper: { padding: 0 },
      content: { padding: 0, background: r.value },
      header: {
        padding: "10px 16px",
        margin: 0,
        background: r.value,
        ...n.headerBorder ? { borderBottom: `1px solid ${a.value}` } : {}
      },
      body: {
        padding: 0,
        background: r.value,
        display: "flex",
        flexDirection: "column",
        ...n.bodyHeight != null ? { height: n.bodyHeight } : {}
      },
      footer: {
        margin: 0,
        padding: "10px 16px",
        ...n.footerBorder ? { borderTop: `1px solid ${a.value}` } : {}
      }
    })), c = le();
    function d() {
      return c.value ?? document.body;
    }
    return (f, p) => e.mode === "modal" ? (ne(), dt(T(Go), {
      key: 0,
      "mask-style": { background: "rgba(0, 0, 0, 0.2" },
      open: e.open,
      width: e.width,
      "z-index": s.value,
      styles: u.value,
      "destroy-on-close": e.destroyOnClose,
      footer: e.footer ? void 0 : null,
      class: "no-content-padding-modal",
      "body-style": { padding: 0, display: "flex", height: e.bodyHeight, flexDirection: "column" },
      onCancel: p[0] || (p[0] = (v) => o("close"))
    }, Nx({
      default: he(() => [
        F("div", {
          ref_key: "popupContainerRef",
          ref: c,
          style: { position: "relative", flex: "1", "min-height": "0", display: "flex", "flex-direction": "column" }
        }, [
          h(T(Ba), { "get-popup-container": d }, {
            default: he(() => [
              ai(f.$slots, "default")
            ]),
            _: 3
          })
        ], 512)
      ]),
      _: 2
    }, [
      f.$slots.title || e.title ? {
        name: "title",
        fn: he(() => [
          F("div", ote, [
            ai(f.$slots, "title", {}, () => [
              Le(oe(e.title) + " " + oe(e.footer), 1)
            ])
          ])
        ]),
        key: "0"
      } : void 0,
      f.$slots.footer ? {
        name: "footer",
        fn: he(() => [
          F("div", ite, [
            ai(f.$slots, "footer")
          ])
        ]),
        key: "1"
      } : void 0
    ]), 1032, ["open", "width", "z-index", "styles", "destroy-on-close", "footer", "body-style"])) : (ne(), dt(T(aU), {
      key: 1,
      open: e.open,
      title: e.title,
      width: e.width,
      "z-index": s.value,
      mask: e.mask,
      "root-style": { zIndex: s.value },
      placement: "right",
      "mask-style": { background: "rgba(0, 0, 0, 0.2)" },
      "body-style": { padding: 0, background: r.value, display: "flex", flexDirection: "column", flex: 1, minHeight: 0 },
      "header-style": { padding: "10px 16px", background: r.value, ...e.headerBorder ? { borderBottom: `1px solid ${a.value}` } : {} },
      "footer-style": { padding: "10px 16px", ...e.footerBorder ? { borderTop: `1px solid ${a.value}` } : {} },
      "destroy-on-close": e.destroyOnClose,
      onClose: p[1] || (p[1] = (v) => o("close"))
    }, Nx({
      default: he(() => [
        F("div", {
          ref_key: "popupContainerRef",
          ref: c,
          style: { position: "relative", flex: "1", "min-height": "0", display: "flex", "flex-direction": "column" }
        }, [
          h(T(Ba), { "get-popup-container": d }, {
            default: he(() => [
              ai(f.$slots, "default")
            ]),
            _: 3
          })
        ], 512)
      ]),
      _: 2
    }, [
      f.$slots.title ? {
        name: "title",
        fn: he(() => [
          ai(f.$slots, "title")
        ]),
        key: "0"
      } : void 0,
      f.$slots.footer && e.footer ? {
        name: "footer",
        fn: he(() => [
          ai(f.$slots, "footer")
        ]),
        key: "1"
      } : void 0
    ]), 1032, ["open", "title", "width", "z-index", "mask", "root-style", "body-style", "header-style", "footer-style", "destroy-on-close"]));
  }
});
function uE(e, t, n = 1e3, o) {
  const i = le(null), r = le(!1), a = le(null), { config: l } = nc(), s = Is(), u = E(() => s.resolveAll()), c = E(() => {
    const v = e();
    return [
      JSON.stringify(v.map((g) => g.dataSource)),
      JSON.stringify(u.value),
      o?.() ?? 0
    ].join("|");
  });
  let d = !1;
  async function f() {
    const v = e().filter((P) => P.enabled !== !1);
    if (v.length === 0) {
      i.value = null, r.value = !1;
      return;
    }
    const g = t(), m = Math.max(
      Math.ceil((g.to - g.from) / n),
      1e3
    ), x = { from: g.from, to: g.to }, S = l.value.datasourceConfig ?? [], C = new Map(S.map((P) => [P.uid, P]));
    d = !1, r.value = !0, a.value = null;
    try {
      const P = [];
      for (const $ of v) {
        const I = $.dataSource, w = $p(I.type);
        if (!w)
          continue;
        const M = "datasourceId" in I ? C.get(I.datasourceId ?? "") : void 0, _ = await w.query({
          requestId: $.id,
          range: x,
          intervalMs: m,
          maxDataPoints: n,
          targets: [I],
          scopedVars: u.value,
          _dsCfg: M,
          _variableStates: s.variables
        });
        P.push(..._.data);
      }
      d || (i.value = { data: P, state: "Done" }, a.value = null);
    } catch (P) {
      d || (a.value = P?.message ?? String(P));
    } finally {
      d || (r.value = !1);
    }
  }
  Ie(c, f, { immediate: !0 }), Ie(
    () => {
      const v = t();
      return `${v.from}|${v.to}`;
    },
    f
  );
  function p() {
    d = !0;
  }
  return { response: i, loading: r, error: a, abort: p };
}
const cE = Symbol("panelEditor");
function rte(e) {
  Ft(cE, e);
}
function vc() {
  const e = zt(cE);
  if (!e)
    throw new Error("usePanelEditor must be used within a PanelEditorProvider");
  return e;
}
function ate(e, t, { signal: n, edges: o } = {}) {
  let i, r = null;
  const a = o != null && o.includes("leading"), l = o == null || o.includes("trailing"), s = () => {
    r !== null && (e.apply(i, r), i = void 0, r = null);
  }, u = () => {
    l && s(), p();
  };
  let c = null;
  const d = () => {
    c != null && clearTimeout(c), c = setTimeout(() => {
      c = null, u();
    }, t);
  }, f = () => {
    c !== null && (clearTimeout(c), c = null);
  }, p = () => {
    f(), i = void 0, r = null;
  }, v = () => {
    s();
  }, g = function(...m) {
    if (n?.aborted)
      return;
    i = this, r = m;
    const x = c == null;
    d(), a && x && s();
  };
  return g.schedule = d, g.cancel = p, g.flush = v, n?.addEventListener("abort", p, { once: !0 }), g;
}
function lte() {
}
function mr(e, t, n) {
  return n == null ? Math.min(e, t) : Math.min(Math.max(e, t), n);
}
function dP(e) {
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
function fP(e) {
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
const ste = "[object RegExp]", ute = "[object String]", cte = "[object Number]", dte = "[object Boolean]", pP = "[object Arguments]", fte = "[object Symbol]", pte = "[object Date]", hte = "[object Map]", gte = "[object Set]", vte = "[object Array]", mte = "[object Function]", bte = "[object ArrayBuffer]", Kv = "[object Object]", yte = "[object Error]", xte = "[object DataView]", wte = "[object Uint8Array]", Ste = "[object Uint8ClampedArray]", Cte = "[object Uint16Array]", $te = "[object Uint32Array]", Pte = "[object BigUint64Array]", Ote = "[object Int8Array]", kte = "[object Int16Array]", Ite = "[object Int32Array]", Mte = "[object BigInt64Array]", Tte = "[object Float32Array]", _te = "[object Float64Array]";
function hP(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 Ete(e, t) {
  return e === t || Number.isNaN(e) && Number.isNaN(t);
}
function Dte(e, t, n) {
  return Kc(e, t, void 0, void 0, void 0, void 0, n);
}
function Kc(e, t, n, o, i, r, a) {
  const l = a(e, t, n, o, i, r);
  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 sd(e, t, r, a);
    }
  return sd(e, t, r, a);
}
function sd(e, t, n, o) {
  if (Object.is(e, t))
    return !0;
  let i = fP(e), r = fP(t);
  if (i === pP && (i = Kv), r === pP && (r = Kv), i !== r)
    return !1;
  switch (i) {
    case ute:
      return e.toString() === t.toString();
    case cte: {
      const s = e.valueOf(), u = t.valueOf();
      return Ete(s, u);
    }
    case dte:
    case pte:
    case fte:
      return Object.is(e.valueOf(), t.valueOf());
    case ste:
      return e.source === t.source && e.flags === t.flags;
    case mte:
      return e === t;
  }
  n = n ?? /* @__PURE__ */ new Map();
  const a = n.get(e), l = n.get(t);
  if (a != null && l != null)
    return a === t;
  n.set(e, t), n.set(t, e);
  try {
    switch (i) {
      case hte: {
        if (e.size !== t.size)
          return !1;
        for (const [s, u] of e.entries())
          if (!t.has(s) || !Kc(u, t.get(s), s, e, t, n, o))
            return !1;
        return !0;
      }
      case gte: {
        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((p) => Kc(d, p, void 0, e, t, n, o));
          if (f === -1)
            return !1;
          u.splice(f, 1);
        }
        return !0;
      }
      case vte:
      case wte:
      case Ste:
      case Cte:
      case $te:
      case Pte:
      case Ote:
      case kte:
      case Ite:
      case Mte:
      case Tte:
      case _te: {
        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 (!Kc(e[s], t[s], s, e, t, n, o))
            return !1;
        return !0;
      }
      case bte:
        return e.byteLength !== t.byteLength ? !1 : sd(new Uint8Array(e), new Uint8Array(t), n, o);
      case xte:
        return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : sd(new Uint8Array(e), new Uint8Array(t), n, o);
      case yte:
        return e.name === t.name && e.message === t.message;
      case Kv: {
        if (!(sd(e.constructor, t.constructor, n, o) || hP(e) && hP(t)))
          return !1;
        const s = [...Object.keys(e), ...dP(e)], u = [...Object.keys(t), ...dP(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 p = t[d];
          if (!Kc(f, p, d, e, t, n, o))
            return !1;
        }
        return !0;
      }
      default:
        return !1;
    }
  } finally {
    n.delete(e), n.delete(t);
  }
}
function Ate(e, t) {
  return Dte(e, t, lte);
}
const Rte = "_splitView_pzp7c_6", Nte = "_sashContainer_pzp7c_13", zte = "_sash_pzp7c_13", Bte = "_splitViewContainer_pzp7c_24", Fte = "_splitViewView_pzp7c_31", Lte = "_vertical_pzp7c_37", Hte = "_horizontal_pzp7c_41", Vte = "_separatorBorder_pzp7c_45", xl = {
  splitView: Rte,
  sashContainer: Nte,
  sash: zte,
  splitViewContainer: Bte,
  splitViewView: Fte,
  vertical: Lte,
  horizontal: Hte,
  separatorBorder: Vte
};
let dE = !1, fE = !1, Rc;
typeof navigator == "object" && (Rc = navigator.userAgent, fE = Rc.includes("Macintosh"), dE = (Rc.includes("Macintosh") || Rc.includes("iPad") || Rc.includes("iPhone")) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
const pE = dE, jte = fE;
class Wte {
  _size;
  getSize() {
    return this._size;
  }
  setSize(t) {
    this._size = t;
  }
}
function Hf(e, t) {
  const n = e.length, o = n - t.length;
  return o >= 0 && e.slice(o, n) === t;
}
function Kte(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var gP = { exports: {} }, vP;
function qte() {
  return vP || (vP = 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 r(s, u, c, d, f) {
      if (typeof c != "function")
        throw new TypeError("The listener must be a function");
      var p = new i(c, d || s, f), v = n ? n + u : u;
      return s._events[v] ? s._events[v].fn ? s._events[v] = [s._events[v], p] : s._events[v].push(p) : (s._events[v] = p, s._eventsCount++), s;
    }
    function a(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, p = new Array(f); d < f; d++)
        p[d] = c[d].fn;
      return p;
    }, 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, p) {
      var v = n ? n + s : s;
      if (!this._events[v]) return !1;
      var g = this._events[v], m = arguments.length, x, S;
      if (g.fn) {
        switch (g.once && this.removeListener(s, g.fn, void 0, !0), m) {
          case 1:
            return g.fn.call(g.context), !0;
          case 2:
            return g.fn.call(g.context, u), !0;
          case 3:
            return g.fn.call(g.context, u, c), !0;
          case 4:
            return g.fn.call(g.context, u, c, d), !0;
          case 5:
            return g.fn.call(g.context, u, c, d, f), !0;
          case 6:
            return g.fn.call(g.context, u, c, d, f, p), !0;
        }
        for (S = 1, x = new Array(m - 1); S < m; S++)
          x[S - 1] = arguments[S];
        g.fn.apply(g.context, x);
      } else {
        var C = g.length, P;
        for (S = 0; S < C; S++)
          switch (g[S].once && this.removeListener(s, g[S].fn, void 0, !0), m) {
            case 1:
              g[S].fn.call(g[S].context);
              break;
            case 2:
              g[S].fn.call(g[S].context, u);
              break;
            case 3:
              g[S].fn.call(g[S].context, u, c);
              break;
            case 4:
              g[S].fn.call(g[S].context, u, c, d);
              break;
            default:
              if (!x) for (P = 1, x = new Array(m - 1); P < m; P++)
                x[P - 1] = arguments[P];
              g[S].fn.apply(g[S].context, x);
          }
      }
      return !0;
    }, l.prototype.on = function(s, u, c) {
      return r(this, s, u, c, !1);
    }, l.prototype.once = function(s, u, c) {
      return r(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 a(this, f), this;
      var p = this._events[f];
      if (p.fn)
        p.fn === u && (!d || p.once) && (!c || p.context === c) && a(this, f);
      else {
        for (var v = 0, g = [], m = p.length; v < m; v++)
          (p[v].fn !== u || d && !p[v].once || c && p[v].context !== c) && g.push(p[v]);
        g.length ? this._events[f] = g.length === 1 ? g[0] : g : a(this, f);
      }
      return this;
    }, l.prototype.removeAllListeners = function(s) {
      var u;
      return s ? (u = n ? n + s : s, this._events[u] && a(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;
  })(gP)), gP.exports;
}
var Yte = qte();
const Rx = /* @__PURE__ */ Kte(Yte);
function mP(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.unshift(t));
}
function qv(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.push(t));
}
function Ki(e, t, n = 1) {
  const o = Math.max(0, Math.ceil((t - e) / n)), i = Array.from({ length: o });
  let r = -1;
  for (; ++r < o; )
    i[r] = e + r * n;
  return i;
}
const Gte = "_sash_j5cmb_7", Ute = "_disabled_j5cmb_15", Xte = "_mac_j5cmb_19", Qte = "_vertical_j5cmb_19", Zte = "_minimum_j5cmb_23", Jte = "_maximum_j5cmb_27", ene = "_horizontal_j5cmb_31", tne = "_hover_j5cmb_126", nne = "_active_j5cmb_127", ii = {
  sash: Gte,
  disabled: Ute,
  mac: Xte,
  vertical: Qte,
  minimum: Zte,
  maximum: Jte,
  horizontal: ene,
  hover: tne,
  active: nne
};
var yr = /* @__PURE__ */ ((e) => (e[e.Vertical = 0] = "Vertical", e[e.Horizontal = 1] = "Horizontal", e))(yr || {}), ss = /* @__PURE__ */ ((e) => (e[e.Disabled = 0] = "Disabled", e[e.Minimum = 1] = "Minimum", e[e.Maximum = 2] = "Maximum", e[e.Enabled = 3] = "Enabled", e))(ss || {});
let hE = pE ? 20 : 8;
const gE = new Rx();
function one(e) {
  hE = e, gE.emit("onDidChangeGlobalSize", e);
}
class bP extends Rx {
  el;
  layoutProvider;
  orientation;
  size;
  hoverDelay = 300;
  hoverDelayerFunc = (t) => t.classList.add("sash-hover", ii.hover);
  hoverDelayer = ate(
    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(
      ii.disabled,
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      "sash-disabled",
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      ii.minimum,
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      "sash-minimum",
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      ii.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", ii.sash), this.el.dataset.testid = "sash", t.append(this.el), jte && this.el.classList.add("sash-mac", ii.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 = hE, gE.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", ii.horizontal), this.el.classList.remove("sash-vertical", ii.vertical)) : (this.el.classList.remove("sash-horizontal", ii.horizontal), this.el.classList.add("sash-vertical", ii.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", ii.active), this.emit("start", i), this.el.setPointerCapture(t.pointerId);
    const r = (l) => {
      l.preventDefault();
      const s = {
        startX: n,
        currentX: l.pageX,
        startY: o,
        currentY: l.pageY
      };
      this.emit("change", s);
    }, a = (l) => {
      l.preventDefault(), this.el.classList.remove("sash-active", ii.active), this.hoverDelayer.cancel(), this.emit("end"), this.el.releasePointerCapture(l.pointerId), globalThis.removeEventListener("pointermove", r), globalThis.removeEventListener("pointerup", a);
    };
    globalThis.addEventListener("pointermove", r), globalThis.addEventListener("pointerup", a);
  };
  onPointerDoublePress = () => {
    this.emit("reset");
  };
  onMouseEnter = () => {
    this.el.classList.contains(ii.active) ? (this.hoverDelayer.cancel(), this.el.classList.add("sash-hover", ii.hover)) : this.hoverDelayer(this.el);
  };
  onMouseLeave = () => {
    this.hoverDelayer.cancel(), this.el.classList.remove("sash-hover", ii.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 vE = {
  /**
   * 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 eh = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Low = 1] = "Low", e[e.High = 2] = "High", e))(eh || {});
class mE {
  container;
  view;
  _size;
  _cachedVisibleSize = void 0;
  constructor(t, n, o) {
    this.container = t, this.view = n, this.container.classList.add("split-view-view", xl.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 = mr(
      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 ine extends mE {
  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 rne extends mE {
  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 ane extends Rx {
  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, r) {
    if (super(), this._orientation = n.orientation ?? yr.Vertical, this._proportionalLayout = n.proportionalLayout ?? !0, this.getSashOrthogonalSize = n.getSashOrthogonalSize, o && (this.onDidChange = o), i && (this.onDidDragStart = i), r && (this.onDidDragEnd = r), this.sashContainer = document.createElement("div"), this.sashContainer.classList.add("sash-container", xl.sashContainer), t.prepend(this.sashContainer), n.descriptor) {
      this.size = n.descriptor.size;
      for (const [a, l] of n.descriptor.views.entries()) {
        const s = l.size, u = l.container, c = l.view;
        this.addView(u, c, s, a, !0);
      }
      this.contentSize = this.viewItems.reduce((a, l) => a + l.size, 0), this.saveProportions();
    }
  }
  addView(t, n, o, i = this.viewItems.length, r) {
    let a;
    typeof o == "number" ? a = o : o.type === "split" ? a = this.getViewSize(o.index) / 2 : o.type === "invisible" ? a = { cachedVisibleSize: o.cachedVisibleSize } : a = n.minimumSize;
    const l = this.orientation === yr.Vertical ? new ine(t, n, a) : new rne(t, n, a);
    if (this.viewItems.splice(i, 0, l), this.viewItems.length > 1) {
      const s = this.orientation === yr.Vertical ? new bP(
        this.sashContainer,
        {
          getHorizontalSashTop: (d) => this.getSashPosition(d),
          getHorizontalSashWidth: this.getSashOrthogonalSize
        },
        { orientation: yr.Horizontal }
      ) : new bP(
        this.sashContainer,
        {
          getVerticalSashLeft: (d) => this.getSashPosition(d),
          getVerticalSashHeight: this.getSashOrthogonalSize
        },
        { orientation: yr.Vertical }
      ), u = this.orientation === yr.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((p) => p.size);
        this.onDidDragStart?.(f);
      }), s.on("change", (d) => this.onSashChange(u(d))), s.on("end", () => {
        this.emit("sashDragEnd");
        let d = this.sashItems.findIndex((p) => p.sash === s);
        if (d === -1) {
          const p = s.el;
          p && (d = this.sashItems.findIndex((v) => v.sash.el === p));
        }
        this.onSashEnd(d);
        const f = this.viewItems.map((p) => p.size);
        this.onDidDragEnd?.(f);
      }), s.on("reset", () => {
        let d = this.sashItems.findIndex((m) => m.sash === s);
        if (d === -1) {
          const m = s.el;
          m && (d = this.sashItems.findIndex((x) => x.sash.el === m));
        }
        const f = Ki(d, -1, -1), p = Ki(d + 1, this.viewItems.length), v = this.findFirstSnapIndex(f), g = this.findFirstSnapIndex(p);
        typeof v == "number" && !this.viewItems[v].visible || typeof g == "number" && !this.viewItems[g].visible || this.emit("sashreset", d);
      });
      const c = { sash: s };
      this.sashItems.splice(i - 1, 0, c);
    }
    r || this.relayout(), !r && 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), r = i === void 0 ? this.getViewSize(n) : vE.Invisible(i), a = this.removeView(n);
    this.addView(t, a, r, 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 = mr(
          Math.round(this.proportions[o] * t),
          i.minimumSize,
          i.maximumSize
        ));
      }
    else {
      const o = Ki(0, this.viewItems.length), i = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 1
        /* Low */
      ), r = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 2
        /* High */
      );
      this.resize(
        this.viewItems.length - 1,
        t - n,
        void 0,
        i,
        r
      );
    }
    this.distributeEmptySpace(), this.layoutViews();
  }
  resizeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      return;
    const o = Ki(0, this.viewItems.length).filter((l) => l !== t), i = [
      ...o.filter(
        (l) => this.viewItems[l].priority === 1
        /* Low */
      ),
      t
    ], r = o.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    ), a = this.viewItems[t];
    n = Math.round(n), n = mr(n, a.minimumSize, Math.min(a.maximumSize, this.size)), a.size = n, this.relayout(i, r);
  }
  resizeViews(t) {
    for (let [n, o] of t.entries()) {
      const i = this.viewItems[n];
      o = Math.round(o), o = mr(
        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 = mr(o, l.minimumSize, l.maximumSize);
    const i = Ki(0, this.viewItems.length), r = i.filter(
      (l) => this.viewItems[l].priority === 1
      /* Low */
    ), a = i.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    );
    this.relayout(r, a);
  }
  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((v) => v.sash === t);
    if (i === -1) {
      const v = t.el;
      v && (i = this.sashItems.findIndex((g) => g.sash.el === v));
    }
    const r = this.viewItems.map((v) => v.size), a = Ki(i, -1, -1), l = Ki(i + 1, this.viewItems.length), s = this.getMinDelta(a, l, r), u = this.getMaxDelta(a, l, r);
    let c, d;
    const f = this.findFirstSnapIndex(a), p = this.findFirstSnapIndex(l);
    if (typeof f == "number") {
      const v = this.viewItems[f], g = Math.floor(v.minimumSize / 2);
      c = {
        index: f,
        limitDelta: v.visible ? s - g : s + g,
        size: v.size
      };
    }
    if (typeof p == "number") {
      const v = this.viewItems[p], g = Math.floor(v.minimumSize / 2);
      d = {
        index: p,
        limitDelta: v.visible ? u + g : u - g,
        size: v.size
      };
    }
    this.sashDragState = {
      index: i,
      start: n,
      current: o,
      sizes: r,
      minDelta: s,
      maxDelta: u,
      snapBefore: c,
      snapAfter: d
    };
  }
  onSashChange({ current: t }) {
    const { index: n, start: o, sizes: i, minDelta: r, maxDelta: a, snapBefore: l, snapAfter: s } = this.sashDragState, u = t - o;
    this.resize(n, u, i, void 0, void 0, r, a, 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(
      (a, l) => a + (this.viewItems[l].minimumSize - o[l]),
      0
    ), r = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].maximumSize),
      0
    );
    return Math.max(i, r);
  }
  getMaxDelta(t, n, o) {
    const i = t.reduce(
      (a, l) => a + (this.viewItems[l].maximumSize - o[l]),
      0
    ), r = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].minimumSize),
      0
    );
    return Math.min(r, i);
  }
  resize(t, n, o, i, r, a = Number.NEGATIVE_INFINITY, l = Number.POSITIVE_INFINITY, s, u) {
    if (t < 0 || t >= this.viewItems.length || this.viewItems.length === 0)
      return 0;
    const c = Ki(t, -1, -1), d = Ki(t + 1, this.viewItems.length);
    if (r)
      for (const M of r)
        mP(c, M), mP(d, M);
    if (i)
      for (const M of i)
        qv(c, M), qv(d, M);
    const f = o ?? this.viewItems.map((M) => M?.size || 0), p = c.map((M) => this.viewItems[M]), v = c.map((M) => f[M]), g = d.map((M) => this.viewItems[M]), m = d.map((M) => f[M]), x = c.reduce(
      (M, _) => M + (this.viewItems[_].minimumSize - f[_]),
      0
    ), S = c.reduce(
      (M, _) => M + (this.viewItems[_].maximumSize - f[_]),
      0
    ), C = d.length === 0 ? Number.POSITIVE_INFINITY : d.reduce(
      (M, _) => M + (f[_] - this.viewItems[_].minimumSize),
      0
    ), P = d.length === 0 ? Number.NEGATIVE_INFINITY : d.reduce(
      (M, _) => M + (f[_] - this.viewItems[_].maximumSize),
      0
    ), $ = Math.max(x, P, a), I = Math.min(C, S, l);
    let w = !1;
    if (s) {
      const M = this.viewItems[s.index], _ = n >= s.limitDelta;
      w = _ !== M.visible, M.setVisible(_, s.size);
    }
    if (!w && u) {
      const M = this.viewItems[u.index], _ = n < u.limitDelta;
      w = _ !== M.visible, M.setVisible(_, u.size);
    }
    if (w)
      return this.resize(
        t,
        n,
        o,
        i,
        r,
        a,
        l
      );
    n = mr(n, $, I);
    for (let M = 0, _ = n; M < p.length; M++) {
      const N = p[M];
      if (!N)
        continue;
      const R = mr(
        v[M] + _,
        N.minimumSize,
        N.maximumSize
      ), H = R - v[M];
      _ -= H, N.size = R;
    }
    for (let M = 0, _ = n; M < g.length; M++) {
      const N = g[M];
      if (!N)
        continue;
      const R = mr(
        m[M] - _,
        N.minimumSize,
        N.maximumSize
      ), H = R - m[M];
      _ += H, N.size = R;
    }
    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 = Ki(0, this.viewItems.length), r = [], a = 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 */
    );
    r.push(
      ...s,
      ...l,
      ...a
    ), typeof t == "number" && qv(r, t);
    for (let u = 0; o !== 0 && u < r.length; u++) {
      const c = this.viewItems[r[u]];
      if (!c)
        continue;
      const d = mr(
        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, r) => i + r.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 r = 0; r < this.sashItems.length; r++)
          if ((this.sashItems[r].sash.el || this.sashItems[r].sash) === i) {
            n = r;
            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 r = i.map((s) => t = s.size - s.minimumSize > 0 || t).toReversed();
    t = !1;
    const a = 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] && a[s + 1]), f = !(o[s] && r[s + 1]);
      if (d && f) {
        const p = Ki(s, -1, -1), v = Ki(s + 1, this.viewItems.length), g = this.findFirstSnapIndex(p), m = this.findFirstSnapIndex(v), x = typeof g == "number" && !this.viewItems[g].visible, S = typeof m == "number" && !this.viewItems[m].visible;
        x && r[s] && (l > 0 || this.startSnappingEnabled) ? u.state = ss.Minimum : S && n[s] && (l < this.contentSize || this.endSnappingEnabled) ? u.state = ss.Maximum : u.state = ss.Disabled;
      } else d && !f ? u.state = ss.Minimum : !d && f ? u.state = ss.Maximum : u.state = ss.Enabled;
    }
  }
}
class fu {
  size;
  constructor(t) {
    this.size = t;
  }
  getPreferredSize() {
    return this.size;
  }
}
class yP {
  proportion;
  layoutService;
  constructor(t, n) {
    this.proportion = t, this.layoutService = n;
  }
  getPreferredSize() {
    return this.proportion * this.layoutService.getSize();
  }
}
class Vf {
  getPreferredSize() {
  }
}
class xP {
  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 fu(t);
    else if (typeof t == "string") {
      const n = t.trim();
      if (Hf(n, "%")) {
        const o = Number(n.slice(0, -1)) / 100;
        this.layoutStrategy = new yP(
          o,
          this.layoutService
        );
      } else if (Hf(n, "px")) {
        const o = Number(n.slice(0, -2));
        this.layoutStrategy = new fu(o);
      } else if (typeof Number.parseFloat(n) == "number") {
        const o = Number.parseFloat(n);
        this.layoutStrategy = new fu(o);
      } else
        this.layoutStrategy = new Vf();
    } else
      this.layoutStrategy = new Vf();
  }
  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 fu(n.preferredSize);
    else if (typeof n.preferredSize == "string") {
      const o = n.preferredSize.trim();
      if (Hf(o, "%")) {
        const i = Number(o.slice(0, -1)) / 100;
        this.layoutStrategy = new yP(
          i,
          this.layoutService
        );
      } else if (Hf(o, "px")) {
        const i = Number(o.slice(0, -2));
        this.layoutStrategy = new fu(i);
      } else if (typeof Number.parseFloat(o) == "number") {
        const i = Number.parseFloat(o);
        this.layoutStrategy = new fu(i);
      } else
        this.layoutStrategy = new Vf();
    } else
      this.layoutStrategy = new Vf();
    this.priority = n.priority ?? eh.Normal;
  }
  layout(t) {
  }
}
function lne(e) {
  const t = mr(e, 4, 20), n = mr(e, 1, 8);
  document.documentElement.style.setProperty("--sash-size", `${t}px`), document.documentElement.style.setProperty(
    "--sash-hover-size",
    `${n}px`
  ), one(t);
}
const sne = ["id"], une = /* @__PURE__ */ be({
  __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, r = le(), a = le(), l = le(!1), s = le(null), u = $n(/* @__PURE__ */ new Map()), c = $n(/* @__PURE__ */ new Map()), d = le(new Wte()), f = le([]), p = le([]), v = le(null), g = DE();
    Ft("allotment", {
      registerPane: (w, M, _) => {
        u.set(w, M), c.set(w, _), l.value && Yt(() => {
          $();
        });
      },
      unregisterPane: (w) => {
        u.delete(w), c.delete(w);
      },
      registerNonPane: (w, M) => {
        u.set(w, M), c.set(w, {});
      }
    });
    const m = E(() => {
      const w = g.default?.({}) || [], M = (_) => {
        const N = [];
        for (const R of _)
          Array.isArray(R.children) ? N.push(...M(R.children)) : R.type && N.push(R);
        return N;
      };
      return M(w);
    });
    function x(w) {
      const M = f.value?.[w];
      return typeof M?.preferredSize != "number" ? !1 : (s.value?.resizeView(w, Math.round(M.preferredSize)), !0);
    }
    function S() {
      if (i("reset"), !!s.value) {
        s.value.distributeViewSizes();
        for (let w = 0; w < f.value.length; w++)
          x(w);
      }
    }
    function C(w) {
      s.value?.resizeViews(w);
    }
    t({
      reset: S,
      resize: C
    });
    function P() {
      if (!r.value)
        return;
      let w = !0;
      o.defaultSizes && u.size !== o.defaultSizes.length && (w = !1, console.warn(
        `Expected ${o.defaultSizes.length} children based on defaultSizes but found ${u.size}`
      ));
      const M = o.vertical ? r.value.clientHeight : r.value.clientWidth;
      d.value.setSize(M);
      let _ = o.defaultSizes;
      if (!o.defaultSizes && u.size > 0) {
        const R = Math.floor(M / u.size);
        _ = Array.from({ length: u.size }, () => R), _[_.length - 1] += M - R * u.size, w = !0, p.value = m.value.map(
          (H) => H.key
        );
      } else if (o.defaultSizes) {
        const R = o.defaultSizes.reduce((H, L) => H + L, 0);
        if (M > 0 && R > 0 && Math.abs(M - R) > 1) {
          const H = M / R;
          _ = o.defaultSizes.map((L) => Math.round(L * H));
        }
        p.value = m.value.map(
          (H) => H.key
        );
      }
      f.value = [];
      const N = {
        orientation: o.vertical ? yr.Vertical : yr.Horizontal,
        proportionalLayout: o.proportionalLayout,
        ...w && _ && {
          descriptor: {
            size: _.reduce((R, H) => R + H, 0),
            views: _.map((R, H) => {
              const L = [...u.keys()][H], B = c.get(L), A = new xP(d.value, {
                element: document.createElement("div"),
                minimumSize: B?.minSize ?? o.minSize,
                maximumSize: B?.maxSize ?? o.maxSize,
                priority: B?.priority ?? eh.Normal,
                ...B?.preferredSize && {
                  preferredSize: B?.preferredSize
                },
                snap: B?.snap ?? o.snap
              });
              return f.value.push(A), {
                container: [...u.values()][H],
                size: R,
                view: A
              };
            })
          }
        }
      };
      if (s.value = new ane(
        r.value,
        N,
        (R) => i("change", R),
        (R) => i("dragStart", R),
        (R) => i("dragEnd", R)
      ), s.value.on("sashDragStart", () => {
        r.value?.classList.add("split-view-sash-dragging");
      }), s.value.on("sashDragEnd", () => {
        r.value?.classList.remove("split-view-sash-dragging");
      }), s.value.on("sashchange", (R) => {
        if (s.value) {
          const H = m.value.map((L) => L.key);
          for (const [L, B] of H.entries()) {
            const A = c.get(B);
            A?.visible !== void 0 && A.visible !== s.value.isViewVisible(L) && i("visibleChange", L, s.value.isViewVisible(L));
          }
        }
      }), s.value?.on("sashreset", (R) => {
        i("reset"), !x(R) && (x(R + 1) || s.value?.distributeViewSizes());
      }), M > 0) {
        s.value.layout(M);
        for (let R = 0; R < f.value.length; R++)
          x(R);
      }
    }
    function $() {
      if (!l.value || !s.value)
        return;
      const w = m.value.map((H) => H.key), M = [...p.value], _ = w.filter((H) => !p.value.includes(H)), N = w.filter((H) => p.value.includes(H)), R = p.value.map((H, L) => ({ key: H, index: L, shouldExit: !w.includes(H) }));
      for (let H = R.length - 1; H >= 0; H--)
        R[H].shouldExit && (s.value.removeView(R[H].index), M.splice(R[H].index, 1), f.value.splice(R[H].index, 1));
      for (const H of _) {
        const L = c.get(H), B = new xP(d.value, {
          element: document.createElement("div"),
          minimumSize: L?.minSize ?? o.minSize,
          maximumSize: L?.maxSize ?? o.maxSize,
          priority: L?.priority ?? eh.Normal,
          ...L?.preferredSize && {
            preferredSize: L?.preferredSize
          },
          snap: L?.snap ?? o.snap
        }), A = w.indexOf(H);
        s.value.addView(
          u.get(H),
          B,
          vE.Distribute,
          A
        ), M.splice(A, 0, H), f.value.splice(A, 0, B);
      }
      for (; !Ate(w, M); )
        for (const [H, L] of w.entries()) {
          const B = M.indexOf(L);
          if (B !== H) {
            s.value.moveView(
              u.get(L),
              B,
              H
            );
            const A = M[B];
            M.splice(B, 1), M.splice(H, 0, A);
            const G = f.value[B];
            f.value.splice(B, 1), f.value.splice(H, 0, G);
            break;
          }
        }
      for (const H of [..._, ...N]) {
        const L = c.get(H), B = w.indexOf(H);
        if (L) {
          L.visible !== void 0 && s.value.isViewVisible(B) !== L.visible && s.value.setViewVisible(B, L.visible), L.preferredSize !== void 0 && f.value[B].preferredSize !== L.preferredSize && (f.value[B].preferredSize = L.preferredSize, x(B));
          let A = !1;
          L.minSize !== void 0 && f.value[B].minimumSize !== L.minSize && (f.value[B].minimumSize = L.minSize, A = !0), L.maxSize !== void 0 && f.value[B].maximumSize !== L.maxSize && (f.value[B].maximumSize = L.maxSize, A = !0), A && s.value.layout();
        }
      }
      (_.length > 0 || R.some((H) => H.shouldExit)) && (p.value = w);
    }
    function I() {
      r.value && (v.value = new ResizeObserver(() => {
        if (r.value) {
          const w = o.vertical ? r.value.clientHeight : r.value.clientWidth;
          w > 0 && (s.value?.layout(w), d.value.setSize(w), l.value || (l.value = !0));
        }
      }), v.value.observe(r.value));
    }
    return At(() => {
      pE && lne(20), Yt(() => {
        P(), I(), setTimeout(() => {
          if (r.value && s.value) {
            const w = o.vertical ? r.value.clientHeight : r.value.clientWidth;
            w > 0 && s.value.layout(w);
          }
        }, 50);
      });
    }), Ie(m, () => {
      Yt(() => {
        $();
      });
    }, { deep: !0 }), Ie(() => o.vertical, (w) => {
      s.value && (s.value.orientation = w ? yr.Vertical : yr.Horizontal, s.value.layout());
    }), Ie(() => o.proportionalLayout, (w) => {
      s.value && (s.value.proportionalLayout = w);
    }), Vo(() => {
      v.value?.disconnect(), s.value?.dispose();
    }), (w, M) => (ne(), xe("div", {
      id: w.id,
      ref_key: "containerRef",
      ref: r,
      class: Pt(["split-view", [
        w.vertical ? "split-view-vertical" : "split-view-horizontal",
        { "split-view-separator-border": w.separator },
        T(xl).splitView,
        w.vertical ? T(xl).vertical : T(xl).horizontal,
        { [T(xl).separatorBorder]: w.separator },
        w.className
      ]])
    }, [
      F("div", {
        ref_key: "splitViewContainerRef",
        ref: a,
        class: Pt(["split-view-container", [T(xl).splitViewContainer]])
      }, [
        ai(w.$slots, "default", {}, void 0, !0)
      ], 2)
    ], 10, sne));
  }
}), cne = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
}, wP = /* @__PURE__ */ cne(une, [["__scopeId", "data-v-e77a1ca4"]]), jf = /* @__PURE__ */ be({
  __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 = fi(), r = zt("allotment");
    function a() {
      return i?.vnode.key || `pane-${Math.random().toString(36).slice(2, 11)}`;
    }
    const l = a();
    return At(() => {
      r && o.value && r.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) => {
      r && o.value && r.registerPane(l, o.value, {
        minSize: s.minSize,
        maxSize: s.maxSize,
        preferredSize: s.preferredSize,
        priority: s.priority,
        snap: s.snap,
        visible: s.visible
      });
    }, { deep: !0 }), Vo(() => {
      r && r.unregisterPane(l);
    }), t({
      element: o
    }), (s, u) => (ne(), xe("div", {
      ref_key: "paneRef",
      ref: o,
      class: Pt(["split-view-view", [
        s.visible && "split-view-view-visible",
        T(xl).splitViewView,
        s.className
      ]])
    }, [
      ai(s.$slots, "default")
    ], 2));
  }
}), dne = { class: "flex flex-col gap-3" }, fne = { class: "text-xs text-secondary mb-1" }, pne = { class: "text-xs text-secondary mb-1" }, hne = { class: "text-xs text-secondary mb-1" }, gne = { class: "text-xs text-secondary mb-1" }, vne = { class: "text-xs text-secondary mb-1" }, mne = { class: "text-xs text-secondary mb-1" }, bne = ["value"], yne = { class: "text-xs text-secondary mb-1" }, xne = { class: "text-xs text-secondary mb-1" }, wne = { class: "text-xs text-secondary mb-1" }, Sne = { class: "text-xs text-secondary mb-1" }, Cne = { class: "text-xs text-secondary mb-1" }, $ne = { class: "text-xs text-secondary mb-1" }, Pne = ["value"], One = { class: "text-xs text-secondary mb-1" }, kne = { class: "text-xs text-secondary mb-1" }, Ine = { key: 0 }, Mne = { class: "text-xs text-secondary mb-1" }, Tne = ["value"], _ne = { class: "text-xs text-secondary mb-1" }, Ene = /* @__PURE__ */ be({
  __name: "AxesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const i = yn("a-radio-button"), r = yn("a-radio-group"), a = yn("a-switch");
      return ne(), xe("div", dne, [
        F("div", null, [
          F("div", fne, oe(T(t)("config.field.axisPlacement")), 1),
          h(r, {
            size: "small",
            value: e.panel.axisPlacement ?? "left",
            onChange: o[0] || (o[0] = (l) => e.onChange({ axisPlacement: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "left" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.placement.left")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "right" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.placement.right")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.placement.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", pne, oe(T(t)("config.field.axisLabel")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.axisLabel ?? "",
            placeholder: T(t)("config.axis.label.placeholder"),
            onChange: o[1] || (o[1] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        F("div", null, [
          F("div", hne, oe(T(t)("config.field.axisName")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.axisName ?? "",
            placeholder: T(t)("config.axis.name.placeholder"),
            onChange: o[2] || (o[2] = (l) => e.onChange({ axisName: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        F("div", null, [
          F("div", gne, oe(T(t)("config.field.axisWidth")), 1),
          h(T(To), {
            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"])
        ]),
        F("div", null, [
          F("div", vne, oe(T(t)("config.field.showGridLines")), 1),
          h(r, {
            size: "small",
            value: e.panel.showGridLines ?? "all",
            onChange: o[4] || (o[4] = (l) => e.onChange({ showGridLines: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "x" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.x")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "y" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.y")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", mne, oe(T(t)("config.field.gridColor")), 1),
          F("input", {
            type: "color",
            value: e.panel.gridColor ?? "#e8e8e8",
            onInput: o[5] || (o[5] = (l) => e.onChange({ gridColor: l.target.value }))
          }, null, 40, bne)
        ]),
        F("div", null, [
          F("div", yne, oe(T(t)("config.field.scaleDistribution")), 1),
          h(r, {
            size: "small",
            value: e.panel.scaleDistribution ?? "linear",
            onChange: o[6] || (o[6] = (l) => e.onChange({ scaleDistribution: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "linear" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.scale.linear")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "logarithmic" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.scale.logarithmic")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", xne, oe(T(t)("config.field.softMin")), 1),
          h(T(To), {
            size: "small",
            value: e.panel.softMin ?? void 0,
            style: { width: "100%" },
            onChange: o[7] || (o[7] = (l) => e.onChange({ softMin: l }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", wne, oe(T(t)("config.field.softMax")), 1),
          h(T(To), {
            size: "small",
            value: e.panel.softMax ?? void 0,
            style: { width: "100%" },
            onChange: o[8] || (o[8] = (l) => e.onChange({ softMax: l }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Sne, oe(T(t)("config.field.centeredZero")), 1),
          h(a, {
            size: "small",
            checked: e.panel.centeredZero,
            onChange: o[9] || (o[9] = (l) => e.onChange({ centeredZero: l }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", Cne, oe(T(t)("config.field.axisLine")), 1),
          h(r, {
            size: "small",
            value: e.panel.axisLabel ?? "all",
            onChange: o[10] || (o[10] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "x" }, {
                default: he(() => [...o[16] || (o[16] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(i, { value: "y" }, {
                default: he(() => [...o[17] || (o[17] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(i, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", $ne, oe(T(t)("config.field.axisLineColor")), 1),
          F("input", {
            type: "color",
            value: e.panel.axisLabelColor ?? "#666666",
            onInput: o[11] || (o[11] = (l) => e.onChange({ axisLabelColor: l.target.value }))
          }, null, 40, Pne)
        ]),
        F("div", null, [
          F("div", One, oe(T(t)("config.field.axisTickShow")), 1),
          h(r, {
            size: "small",
            value: e.panel.axisTick ?? "hidden",
            onChange: o[12] || (o[12] = (l) => e.onChange({ axisTick: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "x" }, {
                default: he(() => [...o[18] || (o[18] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(i, { value: "y" }, {
                default: he(() => [...o[19] || (o[19] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(i, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", kne, oe(T(t)("config.field.axisBorder")), 1),
          h(r, {
            size: "small",
            value: e.panel.axisBorder ?? "hidden",
            onChange: o[13] || (o[13] = (l) => e.onChange({ axisBorder: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "x" }, {
                default: he(() => [...o[20] || (o[20] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(i, { value: "y" }, {
                default: he(() => [...o[21] || (o[21] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(i, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.axisBorder && e.panel.axisBorder !== "hidden" ? (ne(), xe("div", Ine, [
          F("div", Mne, oe(T(t)("config.field.axisBorderColor")), 1),
          F("input", {
            type: "color",
            value: e.panel.axisBorderColor ?? "#cccccc",
            onInput: o[14] || (o[14] = (l) => e.onChange({ axisBorderColor: l.target.value }))
          }, null, 40, Tne)
        ])) : nt("", !0),
        F("div", null, [
          F("div", _ne, oe(T(t)("config.field.logScale")), 1),
          h(a, {
            size: "small",
            checked: e.panel.scaleDistribution === "logarithmic",
            onChange: o[15] || (o[15] = (l) => e.onChange({ scaleDistribution: l ? "logarithmic" : "linear" }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), Dne = { class: "flex flex-col gap-3" }, Ane = { class: "text-xs text-secondary mb-1" }, Rne = { class: "text-xs text-secondary mb-1" }, Nne = { class: "text-xs text-secondary mb-1" }, zne = { class: "text-xs text-secondary mb-1" }, Bne = { class: "text-xs text-secondary mb-1" }, Fne = { class: "text-xs text-secondary mb-1" }, Lne = { class: "text-xs text-secondary mb-1" }, Hne = /* @__PURE__ */ be({
  __name: "BarStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const i = yn("a-radio-button"), r = yn("a-radio-group"), a = yn("a-switch"), l = yn("a-input-number");
      return ne(), xe("div", Dne, [
        F("div", null, [
          F("div", Ane, oe(T(t)("config.field.barShowValues")), 1),
          h(r, {
            size: "small",
            value: e.panel.barShowValues ?? "auto",
            onChange: o[0] || (o[0] = (s) => e.onChange({ barShowValues: s.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "auto" }, {
                default: he(() => [
                  Le(oe(T(t)("config.showValues.auto")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "always" }, {
                default: he(() => [
                  Le(oe(T(t)("config.showValues.always")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "never" }, {
                default: he(() => [
                  Le(oe(T(t)("config.showValues.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Rne, oe(T(t)("config.field.barGroupWidth")), 1),
          h(T(bi), {
            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"])
        ]),
        F("div", null, [
          F("div", Nne, oe(T(t)("config.field.barWidth")), 1),
          h(T(bi), {
            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"])
        ]),
        F("div", null, [
          F("div", zne, oe(T(t)("config.field.stacked")), 1),
          h(a, {
            size: "small",
            checked: e.panel.stacked,
            onChange: o[3] || (o[3] = (s) => e.onChange({ stacked: s }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", Bne, oe(T(t)("config.field.lineWidth")), 1),
          h(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"])
        ]),
        F("div", null, [
          F("div", Fne, oe(T(t)("config.field.fillOpacity")), 1),
          h(T(bi), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (s) => e.onChange({ fillOpacity: s }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Lne, oe(T(t)("config.field.xTickRotation")), 1),
          h(a, {
            size: "small",
            checked: e.panel.barXTickRotation ?? !1,
            onChange: o[6] || (o[6] = (s) => e.onChange({ barXTickRotation: s }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), Vne = { class: "flex flex-col gap-3" }, jne = { class: "text-xs text-secondary mb-1" }, Wne = { class: "text-xs text-secondary mb-1" }, Kne = { class: "text-xs text-secondary mb-1" }, qne = ["value"], Yne = { class: "text-xs text-secondary mb-1" }, Gne = { class: "text-xs text-secondary mb-1" }, Une = { class: "text-xs text-secondary mb-1" }, Xne = { class: "text-xs text-secondary mb-1" }, Qne = { class: "text-xs text-secondary mb-1" }, Zne = { key: 0 }, Jne = { class: "text-xs text-secondary mb-1" }, eoe = ["value"], toe = { class: "text-xs text-secondary mb-1" }, noe = { class: "text-xs text-secondary mb-1" }, ooe = { class: "text-xs text-secondary mb-1" }, ioe = { class: "text-xs text-secondary mb-1" }, roe = { class: "text-xs text-secondary mb-1" }, aoe = { class: "text-xs text-secondary mb-1" }, loe = /* @__PURE__ */ be({
  __name: "GaugeStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const i = yn("a-switch"), r = yn("a-radio-button"), a = yn("a-radio-group");
      return ne(), xe("div", Vne, [
        F("div", null, [
          F("div", jne, oe(T(t)("config.gauge.fillWidth")), 1),
          h(T(bi), {
            min: 1,
            max: 100,
            value: e.panel.gaugeFillWidth ?? T(Yn).fillWidth,
            onChange: o[0] || (o[0] = (l) => e.onChange({ gaugeFillWidth: l }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Wne, oe(T(t)("config.gauge.trackWidth")), 1),
          h(T(bi), {
            min: 1,
            max: 100,
            value: e.panel.gaugeTrackWidth ?? T(Yn).trackWidth,
            onChange: o[1] || (o[1] = (l) => e.onChange({ gaugeTrackWidth: l }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Kne, oe(T(t)("config.gauge.trackColor")), 1),
          F("input", {
            type: "color",
            value: e.panel.gaugeTrackColor ?? "#222222",
            onInput: o[2] || (o[2] = (l) => e.onChange({ gaugeTrackColor: l.target.value }))
          }, null, 40, qne)
        ]),
        F("div", null, [
          F("div", Yne, oe(T(t)("config.gauge.arcSweep")), 1),
          h(T(bi), {
            min: 30,
            max: 360,
            value: e.panel.sweepAngle ?? T(Yn).sweepAngle,
            onChange: o[3] || (o[3] = (l) => e.onChange({ sweepAngle: l }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Gne, oe(T(t)("config.gauge.paddingX")), 1),
          h(T(bi), {
            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"])
        ]),
        F("div", null, [
          F("div", Une, oe(T(t)("config.gauge.paddingY")), 1),
          h(T(bi), {
            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"])
        ]),
        F("div", null, [
          F("div", Xne, oe(T(t)("config.gauge.capRound")), 1),
          h(i, {
            size: "small",
            checked: e.panel.gaugeCapRound ?? T(Yn).capRound,
            onChange: o[6] || (o[6] = (l) => e.onChange({ gaugeCapRound: l }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", Qne, oe(T(t)("config.gauge.valueVisible")), 1),
          h(i, {
            size: "small",
            checked: e.panel.gaugeValueVisible ?? T(Yn).valueVisible,
            onChange: o[7] || (o[7] = (l) => e.onChange({ gaugeValueVisible: l }))
          }, null, 8, ["checked"])
        ]),
        e.panel.gaugeValueVisible !== !1 ? (ne(), xe("div", Zne, [
          F("div", Jne, oe(T(t)("config.gauge.valueColor")), 1),
          F("input", {
            type: "color",
            value: e.panel.gaugeValueColor ?? "#ffffff",
            onInput: o[8] || (o[8] = (l) => e.onChange({ gaugeValueColor: l.target.value }))
          }, null, 40, eoe)
        ])) : nt("", !0),
        F("div", null, [
          F("div", toe, oe(T(t)("config.gauge.valueSize")), 1),
          h(T(To), {
            size: "small",
            min: 8,
            max: 80,
            value: e.panel.gaugeValueSize ?? T(Yn).valueSize,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[9] || (o[9] = (l) => e.onChange({ gaugeValueSize: l ?? T(Yn).valueSize }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", noe, oe(T(t)("config.gauge.valueOffsetY")), 1),
          h(T(To), {
            size: "small",
            min: -50,
            max: 50,
            value: e.panel.gaugeValueOffsetY ?? T(Yn).valueOffsetY,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[10] || (o[10] = (l) => e.onChange({ gaugeValueOffsetY: l ?? T(Yn).valueOffsetY }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", ooe, oe(T(t)("config.gauge.colorFromScheme")), 1),
          h(i, {
            size: "small",
            checked: e.panel.gaugeColorFromScheme ?? !1,
            onChange: o[11] || (o[11] = (l) => e.onChange({ gaugeColorFromScheme: l }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", ioe, oe(T(t)("config.gauge.thresholdDisplay")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeThresholdDisplay ?? T(Yn).thresholdDisplay,
            onChange: o[12] || (o[12] = (l) => e.onChange({ gaugeThresholdDisplay: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdDisplayNone")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "marker" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdDisplayMarker")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "track" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdDisplayTrack")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", roe, oe(T(t)("config.gauge.thresholdLabelDisplay")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeThresholdLabelDisplay ?? "none",
            onChange: o[13] || (o[13] = (l) => e.onChange({ gaugeThresholdLabelDisplay: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelNone")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "label" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelLabel")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "value" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelValue")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "both" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelBoth")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", aoe, oe(T(t)("config.gauge.orientation")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeOrientation ?? T(Yn).orientation,
            onChange: o[14] || (o[14] = (l) => e.onChange({ gaugeOrientation: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "auto" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.orientationAuto")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "horizontal" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.orientationHorizontal")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "vertical" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.orientationVertical")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])
      ]);
    };
  }
}), mt = {
  // 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"
}, soe = { class: "inline-flex gap-0.5 items-center" }, uoe = /* @__PURE__ */ be({
  __name: "PaletteSwatches",
  props: {
    colors: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("span", soe, [
      (ne(!0), xe(Je, null, Ut(e.colors, (o, i) => (ne(), xe("span", {
        key: `${o}-${i}`,
        class: "inline-block rounded-sm flex-shrink-0",
        style: Ht({ width: "12px", height: "12px", background: o })
      }, null, 4))), 128))
    ]));
  }
}), coe = [
  { value: "classic", colors: Il.slice(0, 8) },
  { value: "tableau10", colors: qi.tableau10.slice(0, 8) },
  { value: "grafana-classic", colors: qi["grafana-classic"].slice(0, 8) },
  { value: "green-yellow-red", colors: qi["green-yellow-red"] },
  { value: "red-yellow-green", colors: qi["red-yellow-green"] },
  { value: "blue-yellow-red", colors: qi["blue-yellow-red"] },
  { value: "blue-purple", colors: qi["blue-purple"] },
  { value: "yellow-blue", colors: qi["yellow-blue"] },
  { value: "blues", colors: qi.blues },
  { value: "reds", colors: qi.reds },
  { value: "GrYlRd", colors: qi.GrYlRd },
  { value: "purple-orange", colors: qi["purple-orange"] },
  { value: "fixed", colors: [] },
  { value: "thresholds", colors: [] }
], doe = { class: "flex flex-col gap-3" }, foe = { class: "text-xs text-secondary mb-1" }, poe = { class: "text-xs text-secondary mb-1" }, hoe = { class: "text-xs text-secondary mb-1" }, goe = { class: "inline-flex items-center gap-1.5" }, voe = { key: 0 }, moe = { class: "text-xs text-secondary mb-1" }, boe = ["value"], yoe = { key: 1 }, xoe = { class: "text-xs text-secondary mb-1" }, woe = { class: "text-xs text-secondary mb-1" }, Soe = { class: "flex gap-1 items-center" }, Coe = { class: "flex items-center gap-1" }, $oe = { class: "text-xs text-secondary" }, SP = /* @__PURE__ */ be({
  __name: "GeneralSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = coe.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 r(l) {
      const s = (t.panel.links ?? []).filter((u, c) => c !== l);
      t.onChange({ links: s });
    }
    function a(l, s) {
      const u = (t.panel.links ?? []).map((c, d) => d === l ? { ...c, ...s } : c);
      t.onChange({ links: u });
    }
    return (l, s) => {
      const u = yn("a-switch");
      return ne(), xe("div", doe, [
        F("div", null, [
          F("div", foe, oe(T(n)("config.field.title")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.title,
            onChange: s[0] || (s[0] = (c) => e.onChange({ title: c.target.value }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", poe, oe(T(n)("config.field.description")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.description,
            onChange: s[1] || (s[1] = (c) => e.onChange({ description: c.target.value }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", hoe, oe(T(n)("config.field.colorScheme")), 1),
          h(T(Et), {
            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: he(() => [
              (ne(!0), xe(Je, null, Ut(T(o), (c) => (ne(), dt(T(Et).Option, {
                key: c.value,
                value: c.value
              }, {
                default: he(() => [
                  F("span", goe, [
                    c.colors.length ? (ne(), dt(uoe, {
                      key: 0,
                      colors: c.colors
                    }, null, 8, ["colors"])) : nt("", !0),
                    F("span", null, oe(c.label), 1)
                  ])
                ]),
                _: 2
              }, 1032, ["value"]))), 128))
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.colorScheme === "fixed" ? (ne(), xe("div", voe, [
          F("div", moe, oe(T(n)("config.field.colorSingle")), 1),
          F("input", {
            type: "color",
            value: e.panel.colorSingleValue ?? "#4096ff",
            onInput: s[3] || (s[3] = (c) => e.onChange({ colorSingleValue: c.target.value }))
          }, null, 40, boe)
        ])) : nt("", !0),
        e.panel.colorScheme && e.panel.colorScheme !== "fixed" && e.panel.colorScheme !== "thresholds" ? (ne(), xe("div", yoe, [
          F("div", xoe, oe(T(n)("config.field.colorDistribution")), 1),
          h(T(Et), {
            size: "small",
            value: e.panel.colorDistribution ?? "sequential",
            options: [
              { value: "sequential", label: T(n)("config.colorDist.sequential") },
              { value: "distributed", label: T(n)("config.colorDist.distributed") }
            ],
            style: { width: "100%" },
            onChange: s[4] || (s[4] = (c) => e.onChange({ colorDistribution: c }))
          }, null, 8, ["value", "options"])
        ])) : nt("", !0),
        F("div", null, [
          F("div", woe, oe(T(n)("config.section.links", { n: (e.panel.links ?? []).length })), 1),
          (ne(!0), xe(Je, null, Ut(e.panel.links ?? [], (c, d) => (ne(), xe("div", {
            key: d,
            class: "mb-2 flex flex-col gap-1"
          }, [
            F("div", Soe, [
              h(T(kt), {
                size: "small",
                value: c.title,
                placeholder: "Title",
                style: { flex: "1" },
                onChange: (f) => a(d, { title: f.target.value })
              }, null, 8, ["value", "onChange"]),
              h(T(Bt), {
                type: "text",
                danger: "",
                size: "small",
                onClick: (f) => r(d)
              }, {
                default: he(() => [
                  F("span", {
                    class: Pt(T(mt).delete)
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["onClick"])
            ]),
            h(T(kt), {
              size: "small",
              value: c.url,
              placeholder: "https://",
              onChange: (f) => a(d, { url: f.target.value })
            }, null, 8, ["value", "onChange"]),
            F("div", Coe, [
              h(u, {
                size: "small",
                checked: c.newTab,
                onChange: (f) => a(d, { newTab: f })
              }, null, 8, ["checked", "onChange"]),
              F("span", $oe, oe(T(n)("config.link.newTab")), 1)
            ])
          ]))), 128)),
          h(T(Bt), {
            type: "dashed",
            size: "small",
            block: "",
            onClick: i
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).plus, "mr-1"])
              }, null, 2),
              Le(oe(T(n)("config.link.add")), 1)
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
}), Poe = { class: "flex flex-col gap-3" }, Ooe = { class: "text-xs text-secondary mb-1" }, koe = { class: "text-xs text-secondary mb-1" }, Ioe = { class: "text-xs text-secondary mb-1" }, Moe = { class: "text-xs text-secondary mb-1" }, Toe = { class: "text-xs text-secondary mb-1" }, _oe = { class: "text-xs text-secondary mb-1" }, Eoe = /* @__PURE__ */ be({
  __name: "HistogramStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const i = yn("a-input-number"), r = yn("a-switch");
      return ne(), xe("div", Poe, [
        F("div", null, [
          F("div", Ooe, oe(T(t)("config.field.histBucketCount")), 1),
          h(i, {
            size: "small",
            min: 1,
            max: 500,
            value: e.panel.histBucketCount ?? 30,
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (a) => e.onChange({ histBucketCount: a ?? 30 }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", koe, oe(T(t)("config.field.histBucketSize")), 1),
          h(i, {
            size: "small",
            min: 0,
            value: e.panel.histBucketSize,
            placeholder: T(t)("config.hist.bucketSizePlaceholder"),
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (a) => e.onChange({ histBucketSize: a }))
          }, null, 8, ["value", "placeholder"])
        ]),
        F("div", null, [
          F("div", Ioe, oe(T(t)("config.field.histBucketOffset")), 1),
          h(i, {
            size: "small",
            min: 0,
            value: e.panel.histBucketOffset ?? 0,
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (a) => e.onChange({ histBucketOffset: a ?? 0 }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Moe, oe(T(t)("config.field.histCombineSeries")), 1),
          h(r, {
            size: "small",
            checked: e.panel.histCombineSeries ?? !1,
            onChange: o[3] || (o[3] = (a) => e.onChange({ histCombineSeries: a }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", Toe, oe(T(t)("config.field.lineWidth")), 1),
          h(i, {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.lineWidth,
            style: { width: "100%" },
            onChange: o[4] || (o[4] = (a) => e.onChange({ lineWidth: a ?? 1 }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", _oe, oe(T(t)("config.field.fillOpacity")), 1),
          h(T(bi), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (a) => e.onChange({ fillOpacity: a }))
          }, null, 8, ["value"])
        ])
      ]);
    };
  }
}), Doe = { class: "flex flex-col gap-3" }, Aoe = { class: "override-rule-header" }, Roe = { class: "override-props" }, Noe = /* @__PURE__ */ be({
  __name: "OverridesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), 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" }
    ], r = E(() => t.panel.fieldConfigOverrides ?? []);
    function a() {
      const f = {
        id: crypto.randomUUID(),
        matcher: { id: "byName", options: "" },
        properties: []
      };
      t.onChange({ fieldConfigOverrides: [...r.value, f] });
    }
    function l(f) {
      t.onChange({
        fieldConfigOverrides: r.value.filter((p) => p.id !== f)
      });
    }
    function s(f, p) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (v) => v.id === f ? { ...v, matcher: { ...v.matcher, ...p } } : v
        )
      });
    }
    function u(f) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (p) => p.id === f ? { ...p, properties: [...p.properties, { id: "displayName", value: "" }] } : p
        )
      });
    }
    function c(f, p, v) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (g) => g.id === f ? {
            ...g,
            properties: g.properties.map(
              (m, x) => x === p ? { ...m, ...v } : m
            )
          } : g
        )
      });
    }
    function d(f, p) {
      t.onChange({
        fieldConfigOverrides: r.value.map(
          (v) => v.id === f ? { ...v, properties: v.properties.filter((g, m) => m !== p) } : v
        )
      });
    }
    return (f, p) => (ne(), xe("div", Doe, [
      (ne(!0), xe(Je, null, Ut(r.value, (v) => (ne(), xe("div", {
        key: v.id,
        class: "override-rule"
      }, [
        F("div", Aoe, [
          h(T(Et), {
            size: "small",
            value: v.matcher.id,
            options: o,
            style: { flex: "1" },
            onChange: (g) => s(v.id, { id: g })
          }, null, 8, ["value", "onChange"]),
          h(T(kt), {
            size: "small",
            value: v.matcher.options ?? "",
            placeholder: T(n)("editor.overrides.matcherValue"),
            style: { flex: "1" },
            onChange: (g) => s(v.id, { options: g.target.value })
          }, null, 8, ["value", "placeholder", "onChange"]),
          h(T(Bt), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (g) => l(v.id)
          }, {
            default: he(() => [
              F("span", {
                class: Pt(T(mt).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]),
        F("div", Roe, [
          (ne(!0), xe(Je, null, Ut(v.properties, (g, m) => (ne(), xe("div", {
            key: m,
            class: "override-prop-row"
          }, [
            h(T(Et), {
              size: "small",
              value: g.id,
              options: i,
              style: { width: "140px" },
              onChange: (x) => c(v.id, m, { id: x })
            }, null, 8, ["value", "onChange"]),
            h(T(kt), {
              size: "small",
              value: String(g.value ?? ""),
              placeholder: T(n)("editor.overrides.propValue"),
              style: { flex: "1" },
              onChange: (x) => c(v.id, m, { value: x.target.value })
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(T(Bt), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (x) => d(v.id, m)
            }, {
              default: he(() => [
                F("span", {
                  class: Pt(T(mt).closeCircle)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ]))), 128)),
          h(T(Bt), {
            type: "dashed",
            size: "small",
            style: { width: "100%", "margin-top": "4px" },
            onClick: (g) => u(v.id)
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).plus, "mr-1"])
              }, null, 2),
              Le(" " + oe(T(n)("editor.overrides.addProperty")), 1)
            ]),
            _: 1
          }, 8, ["onClick"])
        ])
      ]))), 128)),
      h(T(Bt), {
        type: "dashed",
        size: "small",
        style: { width: "100%" },
        onClick: a
      }, {
        default: he(() => [
          F("span", {
            class: Pt([T(mt).plus, "mr-1"])
          }, null, 2),
          Le(" " + oe(T(n)("editor.overrides.addOverride")), 1)
        ]),
        _: 1
      })
    ]));
  }
}), wi = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, i] of t)
    n[o] = i;
  return n;
}, CP = /* @__PURE__ */ wi(Noe, [["__scopeId", "data-v-2396374b"]]), zoe = { class: "flex flex-col gap-3" }, Boe = { class: "text-xs text-secondary mb-1" }, Foe = { class: "text-xs text-secondary mb-1" }, Loe = { class: "text-xs text-secondary mb-1" }, Hoe = { class: "flex flex-col gap-1" }, Voe = { class: "text-xs" }, joe = { class: "text-xs text-secondary mb-1" }, Woe = { key: 0 }, Koe = { class: "text-xs text-secondary mb-1" }, qoe = { class: "text-xs text-secondary mb-1" }, Yoe = { class: "text-xs text-secondary mb-1" }, Goe = { class: "flex flex-col gap-1" }, Uoe = { class: "text-xs" }, Xoe = /* @__PURE__ */ be({
  __name: "PieStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = E(() => t.panel.pieLabels ?? []), i = E(() => t.panel.legendValues ?? []);
    function r(l, s) {
      const u = s ? [...o.value, l] : o.value.filter((c) => c !== l);
      t.onChange({ pieLabels: u });
    }
    function a(l, s) {
      const u = s ? [...i.value, l] : i.value.filter((c) => c !== l);
      t.onChange({ legendValues: u });
    }
    return (l, s) => {
      const u = yn("a-radio-button"), c = yn("a-radio-group"), d = yn("a-checkbox");
      return ne(), xe("div", zoe, [
        F("div", null, [
          F("div", Boe, oe(T(n)("config.field.pieType")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieType ?? "pie",
            onChange: s[0] || (s[0] = (f) => e.onChange({ pieType: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "pie" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieType.pie")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "donut" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieType.donut")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Foe, oe(T(n)("config.field.pieSliceSorting")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieSliceSorting ?? "desc",
            onChange: s[1] || (s[1] = (f) => e.onChange({ pieSliceSorting: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "desc" }, {
                default: he(() => [
                  Le(oe(T(n)("config.sort.desc")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "asc" }, {
                default: he(() => [
                  Le(oe(T(n)("config.sort.asc")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(n)("config.sort.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Loe, oe(T(n)("config.field.pieLabels")), 1),
          F("div", Hoe, [
            (ne(), xe(Je, null, Ut(["name", "percent", "value"], (f) => F("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              h(d, {
                checked: o.value.includes(f),
                onChange: (p) => r(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              F("span", Voe, oe(T(n)(`config.pieLabel.${f}`)), 1)
            ])), 64))
          ])
        ]),
        F("div", null, [
          F("div", joe, oe(T(n)("config.field.pieShow")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieShow ?? "calculate",
            onChange: s[2] || (s[2] = (f) => e.onChange({ pieShow: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "calculate" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieShow.calculate")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieShow.all")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.pieShow ?? "calculate") === "calculate" ? (ne(), xe("div", Woe, [
          F("div", Koe, oe(T(n)("config.field.reducer")), 1),
          h(T(Et), {
            size: "small",
            value: e.panel.pieCalculation ?? "lastNotNull",
            options: [
              { value: "lastNotNull", label: T(n)("config.reducer.lastNotNull") },
              { value: "last", label: T(n)("config.reducer.last") },
              { value: "mean", label: T(n)("config.reducer.mean") },
              { value: "min", label: T(n)("config.reducer.min") },
              { value: "max", label: T(n)("config.reducer.max") },
              { value: "sum", label: T(n)("config.reducer.sum") }
            ],
            style: { width: "100%" },
            onChange: s[3] || (s[3] = (f) => e.onChange({ pieCalculation: f }))
          }, null, 8, ["value", "options"])
        ])) : nt("", !0),
        F("div", null, [
          F("div", qoe, oe(T(n)("config.field.legendMode")), 1),
          h(c, {
            size: "small",
            value: e.panel.legendMode ?? "list",
            onChange: s[4] || (s[4] = (f) => e.onChange({ legendMode: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "list" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legendMode.list")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "table" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legendMode.table")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Yoe, oe(T(n)("config.field.legendValues")), 1),
          F("div", Goe, [
            (ne(), xe(Je, null, Ut(["min", "max", "mean", "sum", "last"], (f) => F("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              h(d, {
                checked: i.value.includes(f),
                onChange: (p) => a(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              F("span", Uoe, oe(T(n)(`config.legendValue.${f}`)), 1)
            ])), 64))
          ])
        ])
      ]);
    };
  }
}), Qoe = { class: "flex flex-col gap-3" }, Zoe = { class: "text-xs text-secondary mb-1" }, Joe = { class: "text-xs text-secondary mb-1" }, eie = { class: "text-xs text-secondary mb-1" }, tie = { class: "text-xs text-secondary mb-1" }, nie = /* @__PURE__ */ be({
  __name: "StatStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const i = yn("a-switch");
      return ne(), xe("div", Qoe, [
        F("div", null, [
          F("div", Zoe, oe(T(t)("config.field.orientation")), 1),
          h(T(Et), {
            size: "small",
            value: e.panel.statOrientation ?? "vertical",
            options: [
              { value: "vertical", label: T(t)("config.orientation.vertical") },
              { value: "horizontal", label: T(t)("config.orientation.horizontal") }
            ],
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (r) => e.onChange({ statOrientation: r }))
          }, null, 8, ["value", "options"])
        ]),
        F("div", null, [
          F("div", Joe, oe(T(t)("config.field.textMode")), 1),
          h(T(Et), {
            size: "small",
            value: e.panel.statTextMode ?? "value_and_name",
            options: [
              { value: "value_and_name", label: T(t)("config.textMode.valueAndName") },
              { value: "value", label: T(t)("config.textMode.value") },
              { value: "name", label: T(t)("config.textMode.name") },
              { value: "none", label: T(t)("config.textMode.none") }
            ],
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (r) => e.onChange({ statTextMode: r }))
          }, null, 8, ["value", "options"])
        ]),
        F("div", null, [
          F("div", eie, oe(T(t)("config.field.colorMode")), 1),
          h(T(Et), {
            size: "small",
            value: e.panel.statColorMode ?? "value",
            options: [
              { value: "value", label: T(t)("config.colorMode.value") },
              { value: "background_solid", label: T(t)("config.colorMode.backgroundSolid") },
              { value: "background", label: T(t)("config.colorMode.background") }
            ],
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (r) => e.onChange({ statColorMode: r }))
          }, null, 8, ["value", "options"])
        ]),
        F("div", null, [
          F("div", tie, oe(T(t)("config.field.percentChange")), 1),
          h(i, {
            size: "small",
            checked: e.panel.showPercentChange ?? !1,
            onChange: o[3] || (o[3] = (r) => e.onChange({ showPercentChange: r }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), oie = { class: "flex flex-col gap-3" }, iie = { key: 0 }, rie = { class: "text-xs text-secondary mb-1" }, aie = { key: 1 }, lie = { class: "text-xs text-secondary mb-1" }, sie = { key: 2 }, uie = { class: "text-xs text-secondary mb-1" }, cie = { key: 3 }, die = { class: "text-xs text-secondary mb-1" }, fie = { class: "text-xs text-secondary mb-1" }, pie = { class: "text-xs text-secondary mb-1" }, hie = { class: "text-xs text-secondary mb-1" }, gie = { class: "flex items-center gap-2" }, vie = { class: "text-xs text-secondary mb-1" }, mie = { class: "flex items-center gap-2" }, bie = { key: 5 }, yie = { class: "text-xs text-secondary mb-1" }, xie = { key: 6 }, wie = { class: "text-xs text-secondary mb-1" }, Sie = { class: "text-xs text-secondary mb-1" }, Cie = { key: 7 }, $ie = { class: "text-xs text-secondary mb-1" }, Pie = /* @__PURE__ */ be({
  __name: "StyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = t.panel.type === "timeseries", i = t.panel.drawStyle ?? "lines", r = i === "lines", a = i === "points", l = t.panel.showPointsMode ?? "auto", s = t.panel.spanNulls ?? !1, u = t.panel.insertNulls ?? !1;
    return (c, d) => {
      const f = yn("a-radio-button"), p = yn("a-radio-group"), v = yn("a-input-number"), g = yn("a-switch");
      return ne(), xe("div", oie, [
        o ? (ne(), xe("div", iie, [
          F("div", rie, oe(T(n)("config.field.drawStyle")), 1),
          h(p, {
            size: "small",
            value: e.panel.drawStyle ?? "lines",
            onChange: d[0] || (d[0] = (m) => e.onChange({ drawStyle: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "lines" }, {
                default: he(() => [
                  Le(oe(T(n)("config.drawStyle.lines")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "bars" }, {
                default: he(() => [
                  Le(oe(T(n)("config.drawStyle.bars")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "points" }, {
                default: he(() => [
                  Le(oe(T(n)("config.drawStyle.points")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        a ? nt("", !0) : (ne(), xe("div", aie, [
          F("div", lie, oe(T(n)("config.field.lineWidth")), 1),
          h(T(bi), {
            min: 0.5,
            max: 4,
            step: 0.5,
            value: e.panel.lineWidth,
            onChange: d[1] || (d[1] = (m) => e.onChange({ lineWidth: m }))
          }, null, 8, ["value"])
        ])),
        a ? nt("", !0) : (ne(), xe("div", sie, [
          F("div", uie, oe(T(n)("config.field.fillOpacity")), 1),
          h(T(bi), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: d[2] || (d[2] = (m) => e.onChange({ fillOpacity: m }))
          }, null, 8, ["value"])
        ])),
        a ? nt("", !0) : (ne(), xe("div", cie, [
          F("div", die, oe(T(n)("config.field.gradientMode")), 1),
          h(p, {
            size: "small",
            value: e.panel.gradientMode ?? "none",
            onChange: d[3] || (d[3] = (m) => e.onChange({ gradientMode: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.none")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "opacity" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.opacity")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "hue" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.hue")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "scheme" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.scheme")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])),
        o && r ? (ne(), xe(Je, { key: 4 }, [
          F("div", null, [
            F("div", fie, oe(T(n)("config.field.interpolation")), 1),
            h(p, {
              size: "small",
              value: e.panel.lineInterpolation,
              onChange: d[4] || (d[4] = (m) => e.onChange({ lineInterpolation: m.target.value }))
            }, {
              default: he(() => [
                h(f, { value: "linear" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.interp.linear")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "smooth" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.interp.smooth")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "step" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.interp.step")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          F("div", null, [
            F("div", pie, oe(T(n)("config.field.lineStyle")), 1),
            h(p, {
              size: "small",
              value: e.panel.lineStyle,
              onChange: d[5] || (d[5] = (m) => e.onChange({ lineStyle: m.target.value }))
            }, {
              default: he(() => [
                h(f, { value: "solid" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.linestyle.solid")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "dashed" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.linestyle.dashed")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "dotted" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.linestyle.dotted")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          F("div", null, [
            F("div", hie, oe(T(n)("config.field.spanNulls")), 1),
            F("div", gie, [
              h(p, {
                size: "small",
                value: T(s) === !0 ? "always" : typeof T(s) == "number" ? "threshold" : "never",
                onChange: d[6] || (d[6] = (m) => {
                  m.target.value === "never" ? e.onChange({ spanNulls: !1 }) : m.target.value === "always" ? e.onChange({ spanNulls: !0 }) : e.onChange({ spanNulls: 3600 });
                })
              }, {
                default: he(() => [
                  h(f, { value: "never" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "always" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.always")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "threshold" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof T(s) == "number" ? (ne(), dt(v, {
                key: 0,
                size: "small",
                min: 1,
                value: T(s),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[7] || (d[7] = (m) => e.onChange({ spanNulls: m ?? 3600 }))
              }, null, 8, ["value"])) : nt("", !0)
            ])
          ]),
          F("div", null, [
            F("div", vie, oe(T(n)("config.field.insertNulls")), 1),
            F("div", mie, [
              h(p, {
                size: "small",
                value: typeof T(u) == "number" ? "threshold" : "never",
                onChange: d[8] || (d[8] = (m) => {
                  m.target.value === "never" ? e.onChange({ insertNulls: !1 }) : e.onChange({ insertNulls: 3600 });
                })
              }, {
                default: he(() => [
                  h(f, { value: "never" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "threshold" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof T(u) == "number" ? (ne(), dt(v, {
                key: 0,
                size: "small",
                min: 1,
                value: T(u),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[9] || (d[9] = (m) => e.onChange({ insertNulls: m ?? 3600 }))
              }, null, 8, ["value"])) : nt("", !0)
            ])
          ])
        ], 64)) : nt("", !0),
        o && !a ? (ne(), xe("div", bie, [
          F("div", yie, oe(T(n)("config.field.showPoints")), 1),
          h(p, {
            size: "small",
            value: T(l),
            onChange: d[10] || (d[10] = (m) => e.onChange({ showPointsMode: m.target.value, showPoints: m.target.value === "always" }))
          }, {
            default: he(() => [
              h(f, { value: "auto" }, {
                default: he(() => [
                  Le(oe(T(n)("config.points.auto")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "always" }, {
                default: he(() => [
                  Le(oe(T(n)("config.points.always")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "never" }, {
                default: he(() => [
                  Le(oe(T(n)("config.points.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        o ? (ne(), xe("div", xie, [
          F("div", wie, oe(T(n)("config.field.stackSeries")), 1),
          h(p, {
            size: "small",
            value: e.panel.stackingMode ?? "none",
            onChange: d[11] || (d[11] = (m) => e.onChange({ stackingMode: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(n)("config.stack.none")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "normal" }, {
                default: he(() => [
                  Le(oe(T(n)("config.stack.normal")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "percent" }, {
                default: he(() => [
                  Le(oe(T(n)("config.stack.percent")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        F("div", null, [
          F("div", Sie, oe(T(n)("config.field.legendPosition")), 1),
          h(p, {
            size: "small",
            value: e.panel.legendPosition,
            onChange: d[12] || (d[12] = (m) => e.onChange({ legendPosition: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "bottom" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legend.bottom")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "right" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legend.right")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legend.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.type === "bar" ? (ne(), xe("div", Cie, [
          F("div", $ie, oe(T(n)("config.field.stacked")), 1),
          h(g, {
            size: "small",
            checked: e.panel.stacked,
            onChange: d[13] || (d[13] = (m) => e.onChange({ stacked: m }))
          }, null, 8, ["checked"])
        ])) : nt("", !0)
      ]);
    };
  }
}), Oie = { class: "flex flex-col gap-3" }, kie = { class: "text-xs text-secondary mb-1" }, Iie = { class: "text-xs text-secondary mb-1" }, Mie = { class: "text-xs text-secondary mb-1" }, Tie = { class: "text-xs text-secondary mb-1" }, _ie = { class: "text-xs text-secondary mb-1" }, Eie = { class: "text-xs text-secondary mb-1" }, Die = { key: 0 }, Aie = { class: "text-xs text-secondary mb-1" }, Rie = { class: "text-xs text-secondary mb-1" }, Nie = { key: 1 }, zie = { class: "text-xs text-secondary mb-1" }, Bie = { key: 2 }, Fie = { class: "text-xs text-secondary mb-1" }, Lie = /* @__PURE__ */ be({
  __name: "TableStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn();
    function o(i) {
      t.onChange({ tableFooterReducers: i ? [i] : [] });
    }
    return (i, r) => {
      const a = yn("a-switch"), l = yn("a-radio-button"), s = yn("a-radio-group");
      return ne(), xe("div", Oie, [
        F("div", null, [
          F("div", kie, oe(T(n)("config.field.tableShowHeader")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableShowHeader ?? !0,
            onChange: r[0] || (r[0] = (u) => e.onChange({ tableShowHeader: u }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", Iie, oe(T(n)("config.field.tableCellHeight")), 1),
          h(s, {
            size: "small",
            value: e.panel.tableCellHeight ?? "medium",
            onChange: r[1] || (r[1] = (u) => e.onChange({ tableCellHeight: u.target.value }))
          }, {
            default: he(() => [
              h(l, { value: "small" }, {
                default: he(() => [
                  Le(oe(T(n)("config.tableHeight.small")), 1)
                ]),
                _: 1
              }),
              h(l, { value: "medium" }, {
                default: he(() => [
                  Le(oe(T(n)("config.tableHeight.medium")), 1)
                ]),
                _: 1
              }),
              h(l, { value: "large" }, {
                default: he(() => [
                  Le(oe(T(n)("config.tableHeight.large")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Mie, oe(T(n)("config.field.tableFrozenColumns")), 1),
          h(T(To), {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.tableFrozenColumns ?? 0,
            style: { width: "100%" },
            onChange: r[2] || (r[2] = (u) => e.onChange({ tableFrozenColumns: u ?? 0 }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Tie, oe(T(n)("config.field.tableColumnFilter")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableColumnFilter ?? !1,
            onChange: r[3] || (r[3] = (u) => e.onChange({ tableColumnFilter: u }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", _ie, oe(T(n)("config.field.tableWrapText")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableWrapText ?? !1,
            onChange: r[4] || (r[4] = (u) => e.onChange({ tableWrapText: u }))
          }, null, 8, ["checked"])
        ]),
        F("div", null, [
          F("div", Eie, oe(T(n)("config.field.tableEnablePagination")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableEnablePagination ?? !1,
            onChange: r[5] || (r[5] = (u) => e.onChange({ tableEnablePagination: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableEnablePagination ? (ne(), xe("div", Die, [
          F("div", Aie, oe(T(n)("config.field.tablePageSize")), 1),
          h(T(To), {
            size: "small",
            min: 5,
            max: 500,
            value: e.panel.tablePageSize ?? 20,
            style: { width: "100%" },
            onChange: r[6] || (r[6] = (u) => e.onChange({ tablePageSize: u ?? 20 }))
          }, null, 8, ["value"])
        ])) : nt("", !0),
        F("div", null, [
          F("div", Rie, oe(T(n)("config.field.tableFooterEnabled")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableFooterEnabled ?? !1,
            onChange: r[7] || (r[7] = (u) => e.onChange({ tableFooterEnabled: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableFooterEnabled ? (ne(), xe("div", Nie, [
          F("div", zie, oe(T(n)("config.field.tableFooterReducers")), 1),
          h(T(Et), {
            size: "small",
            value: e.panel.tableFooterReducers?.[0],
            options: [
              { value: "min", label: T(n)("config.reducer.min") },
              { value: "max", label: T(n)("config.reducer.max") },
              { value: "mean", label: T(n)("config.reducer.mean") },
              { value: "sum", label: T(n)("config.reducer.sum") },
              { value: "count", label: T(n)("config.reducer.count") }
            ],
            "allow-clear": "",
            style: { width: "100%" },
            onChange: r[8] || (r[8] = (u) => o(u))
          }, null, 8, ["value", "options"])
        ])) : nt("", !0),
        e.panel.tableFooterEnabled && e.panel.tableFooterReducers?.[0] ? (ne(), xe("div", Bie, [
          F("div", Fie, oe(T(n)("config.field.tableFooterFields")), 1),
          h(T(Et), {
            size: "small",
            mode: "multiple",
            "allow-clear": "",
            placeholder: T(n)("config.field.tableFooterFieldsPlaceholder"),
            value: e.panel.tableFooterFields ?? [],
            options: (e.numericFieldNames ?? []).map((u) => ({ value: u, label: u })),
            style: { width: "100%" },
            onChange: r[9] || (r[9] = (u) => e.onChange({ tableFooterFields: u.length > 0 ? u : void 0 }))
          }, null, 8, ["placeholder", "value", "options"])
        ])) : nt("", !0)
      ]);
    };
  }
}), Hie = { class: "flex flex-col gap-1" }, Vie = { class: "mb-2" }, jie = { class: "text-xs text-secondary mb-1" }, Wie = ["value", "onInput"], Kie = { class: "flex items-center gap-1.5 mb-1" }, qie = ["value"], Yie = { class: "text-xs text-secondary flex-1" }, Gie = /* @__PURE__ */ be({
  __name: "ThresholdsEditor",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = ["#52c41a", "#faad14", "#ff4d4f", "#1677ff", "#722ed1", "#13c2c2", "#fa8c16"], i = le(t.panel.thresholdMode ?? "absolute"), r = E(() => i.value === "percentage"), a = E(() => [...t.panel.thresholds].sort((f, p) => p.value - f.value));
    function l() {
      const f = [t.panel.thresholdBaseColor, ...t.panel.thresholds.map((p) => p.color)];
      return o.find((p) => !f.includes(p)) ?? "#cccccc";
    }
    function s() {
      const f = t.panel.thresholds.length > 0 ? Math.max(...t.panel.thresholds.map((m) => m.value)) : 0, v = { value: r.value ? Math.min(100, f + 20) : f + 10, color: l(), label: "" }, g = [...t.panel.thresholds, v].sort((m, x) => m.value - x.value);
      t.onChange({ thresholds: g });
    }
    function u(f) {
      t.onChange({ thresholds: t.panel.thresholds.filter((p) => p.value !== f) });
    }
    function c(f, p) {
      const v = t.panel.thresholds.map((g) => g.value === f ? { ...g, ...p } : g).sort((g, m) => g.value - m.value);
      t.onChange({ thresholds: v });
    }
    function d(f) {
      i.value = f, t.onChange({ thresholdMode: f });
    }
    return (f, p) => {
      const v = yn("a-input");
      return ne(), xe("div", Hie, [
        F("div", Vie, [
          F("div", jie, oe(T(n)("config.threshold.mode")), 1),
          h(T(Mo).Group, {
            size: "small",
            value: i.value,
            onChange: p[0] || (p[0] = (g) => d(g.target.value))
          }, {
            default: he(() => [
              h(T(Mo).Button, { value: "absolute" }, {
                default: he(() => [
                  Le(oe(T(n)("config.threshold.modeAbsolute")), 1)
                ]),
                _: 1
              }),
              h(T(Mo).Button, { value: "percentage" }, {
                default: he(() => [
                  Le(oe(T(n)("config.threshold.modePercentage")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (ne(!0), xe(Je, null, Ut(a.value, (g) => (ne(), xe("div", {
          key: g.value,
          class: "flex items-center gap-1.5 mb-1"
        }, [
          F("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: g.color,
            onInput: (m) => c(g.value, { color: m.target.value })
          }, null, 40, Wie),
          h(T(To), {
            size: "small",
            value: g.value,
            min: r.value ? 0 : void 0,
            max: r.value ? 100 : void 0,
            style: { width: "80px" },
            onChange: (m) => c(g.value, { value: m ?? 0 })
          }, null, 8, ["value", "min", "max", "onChange"]),
          h(v, {
            size: "small",
            value: g.label,
            placeholder: "Label",
            style: { flex: "1" },
            onChange: (m) => c(g.value, { label: m.target.value })
          }, null, 8, ["value", "onChange"]),
          h(T(Bt), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (m) => u(g.value)
          }, {
            default: he(() => [
              F("span", {
                class: Pt(T(mt).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]))), 128)),
        F("div", Kie, [
          F("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: e.panel.thresholdBaseColor,
            onInput: p[1] || (p[1] = (g) => e.onChange({ thresholdBaseColor: g.target.value }))
          }, null, 40, qie),
          F("span", Yie, oe(T(n)("config.threshold.base")), 1)
        ]),
        h(T(Bt), {
          type: "dashed",
          size: "small",
          block: "",
          onClick: s
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(n)("config.threshold.add")), 1)
          ]),
          _: 1
        })
      ]);
    };
  }
}), Uie = { class: "flex flex-col gap-3" }, Xie = { class: "text-xs text-secondary mb-1" }, Qie = { key: 0 }, Zie = { class: "text-xs text-secondary mb-1" }, Jie = { key: 1 }, ere = { class: "text-xs text-secondary mb-1" }, tre = { class: "text-xs text-secondary mb-1" }, nre = /* @__PURE__ */ be({
  __name: "TooltipSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const i = yn("a-radio-button"), r = yn("a-radio-group"), a = yn("a-switch");
      return ne(), xe("div", Uie, [
        F("div", null, [
          F("div", Xie, oe(T(t)("config.field.tooltipMode")), 1),
          h(r, {
            size: "small",
            value: e.panel.tooltipMode ?? "multi",
            onChange: o[0] || (o[0] = (l) => e.onChange({ tooltipMode: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "single" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.single")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "multi" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.multi")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ne(), xe("div", Qie, [
          F("div", Zie, oe(T(t)("config.field.tooltipSort")), 1),
          h(r, {
            size: "small",
            value: e.panel.tooltipSort ?? "none",
            onChange: o[1] || (o[1] = (l) => e.onChange({ tooltipSort: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.sortNone")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "asc" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.sortAsc")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "desc" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.sortDesc")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : nt("", !0),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ne(), xe("div", Jie, [
          F("div", ere, oe(T(t)("config.field.tooltipMaxHeight")), 1),
          h(T(To), {
            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"])
        ])) : nt("", !0),
        F("div", null, [
          F("div", tre, oe(T(t)("config.field.axisPointer")), 1),
          h(a, {
            size: "small",
            checked: e.panel.showAxisPointer ?? !0,
            onChange: o[3] || (o[3] = (l) => e.onChange({ showAxisPointer: l }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), ore = { class: "flex items-center gap-2" }, ire = /* @__PURE__ */ be({
  __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 } = sn();
    function r(p) {
      return Math.min(n.max, Math.max(n.min, p));
    }
    const a = E(() => n.value ?? n.min), l = E(() => n.placeholder ?? i("common.auto")), s = E(() => {
      const p = n.value !== void 0 ? n.unit ? `${n.value}${n.unit}` : String(n.value) : l.value;
      try {
        const v = document.createElement("canvas").getContext("2d");
        return v ? (v.font = "14px system-ui, -apple-system, sans-serif", `${Math.ceil(v.measureText(p).width) + 24}px`) : "6ch";
      } catch {
        return "6ch";
      }
    });
    function u(p) {
      typeof p == "number" && o("change", r(p));
    }
    function c(p) {
      p != null && o("change", r(Number(p)));
    }
    function d() {
      o("change", void 0);
    }
    function f(p) {
      const v = p.shiftKey, g = n.step * (v ? n.shiftMultiplier : 1);
      p.key === "ArrowRight" || p.key === "ArrowUp" ? (p.preventDefault(), o("change", r(a.value + g))) : (p.key === "ArrowLeft" || p.key === "ArrowDown") && (p.preventDefault(), o("change", r(a.value - g)));
    }
    return (p, v) => (ne(), xe("div", ore, [
      h(T(bi), {
        min: e.min,
        max: e.max,
        step: e.step,
        value: a.value,
        style: { flex: "1" },
        "tooltip-formatter": e.unit ? ((g) => `${g}${e.unit}`) : void 0,
        onChange: u
      }, null, 8, ["min", "max", "step", "value", "tooltip-formatter"]),
      h(T(Jr).Compact, { size: "small" }, {
        default: he(() => [
          h(T(To), {
            size: "small",
            controls: !1,
            min: e.min,
            max: e.max,
            step: e.step,
            value: e.value ?? void 0,
            placeholder: l.value,
            style: Ht({ 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 ? (ne(), dt(T(Bt), {
            key: 0,
            onClick: d
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).closeCircle, "text-xs text-gray-400 cursor-pointer"])
              }, null, 2)
            ]),
            _: 1
          })) : nt("", !0)
        ]),
        _: 1
      })
    ]));
  }
}), rre = { class: "flex flex-col gap-3" }, are = { key: 0 }, lre = { class: "text-xs text-secondary mb-1" }, sre = { class: "text-xs text-secondary mb-1" }, ure = { class: "text-xs text-secondary mb-1" }, cre = { key: 1 }, dre = { class: "text-xs text-secondary mb-1" }, fre = { key: 2 }, pre = { class: "text-xs text-secondary mb-1" }, hre = /* @__PURE__ */ be({
  __name: "ValueSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), i = ["", "ms", "s", "bytes", "percent", "percentunit", "reqps", "ops", "bps", "Bps"].map((s) => ({
      value: s,
      label: n(s ? `config.unit.${s}` : "config.unit.none")
    })), r = [
      { 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") }
    ], a = t.panel.type === "gauge", l = t.panel.type !== "timeseries";
    return (s, u) => (ne(), xe("div", rre, [
      l ? (ne(), xe("div", are, [
        F("div", lre, oe(T(n)("config.field.reducer")), 1),
        h(T(Et), {
          size: "small",
          value: e.panel.statReducer ?? "lastNotNull",
          options: r,
          style: { width: "100%" },
          onChange: u[0] || (u[0] = (c) => e.onChange({ statReducer: c }))
        }, null, 8, ["value"])
      ])) : nt("", !0),
      F("div", null, [
        F("div", sre, oe(T(n)("config.field.unit")), 1),
        h(T(Et), {
          size: "small",
          value: e.panel.unit || "",
          options: T(i),
          style: { width: "100%" },
          onChange: u[1] || (u[1] = (c) => e.onChange({ unit: c }))
        }, null, 8, ["value", "options"])
      ]),
      F("div", null, [
        F("div", ure, oe(T(n)("config.field.decimals")), 1),
        h(ire, {
          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"])
      ]),
      a ? (ne(), xe("div", cre, [
        F("div", dre, oe(T(n)("config.field.min")), 1),
        h(T(To), {
          size: "small",
          value: e.panel.min,
          style: { width: "100%" },
          onChange: u[3] || (u[3] = (c) => e.onChange({ min: c ?? 0 }))
        }, null, 8, ["value"])
      ])) : nt("", !0),
      a ? (ne(), xe("div", fre, [
        F("div", pre, oe(T(n)("config.field.max")), 1),
        h(T(To), {
          size: "small",
          value: e.panel.max,
          style: { width: "100%" },
          onChange: u[4] || (u[4] = (c) => e.onChange({ max: c ?? 100 }))
        }, null, 8, ["value"])
      ])) : nt("", !0)
    ]));
  }
}), gre = { class: "h-full flex flex-col overflow-hidden" }, vre = {
  class: "flex-shrink-0 px-2 bg-primary/10 py-1",
  style: { "border-bottom": "1px solid #eee" }
}, mre = { class: "flex-1 overflow-y-auto" }, bre = /* @__PURE__ */ be({
  __name: "OptionsPane",
  setup(e) {
    const t = [
      "timeseries",
      "bar",
      "histogram",
      "stat",
      "gauge",
      "table",
      "pie"
    ], { t: n } = sn(), { panel: o, onChange: i, numericFieldNames: r, allFieldNames: a } = vc(), l = E(
      () => t.map((p) => ({
        value: p,
        label: n(`config.type.${p}`)
      }))
    ), s = le(""), u = {
      general: SP,
      style: Pie,
      tooltip: nre,
      axes: Ene,
      value: hre,
      // timeseries / bar / histogram
      "bar-style": Hne,
      "histogram-style": Eoe,
      // stat
      "stat-style": nie,
      // gauge
      "gauge-style": loe,
      // pie
      "pie-style": Xoe,
      // table
      "table-style": Lie,
      // overrides
      overrides: CP
    }, c = E(() => {
      const v = (Vz(o.value.type)?.optionCategories ?? []).map((g) => ({
        key: g.key,
        label: n(g.labelKey),
        component: u[g.key] ?? SP
      }));
      return v.push({
        key: "thresholds",
        label: n("config.section.thresholds", { n: o.value.thresholds.length }),
        component: Gie
      }), v.push({
        key: "overrides",
        label: n("config.section.overrides"),
        component: CP
      }), v;
    }), d = E(() => {
      if (!s.value.trim())
        return c.value;
      const p = s.value.toLowerCase();
      return c.value.filter(
        (v) => typeof v.label == "string" && v.label.toLowerCase().includes(p)
      );
    }), f = le(["general"]);
    return (p, v) => (ne(), xe("div", gre, [
      F("div", vre, [
        h(T(Et), {
          class: "text-primary",
          bordered: !1,
          value: T(o).type,
          size: "small",
          variant: "filled",
          options: l.value,
          "onUpdate:value": v[0] || (v[0] = (g) => T(i)({ type: g }))
        }, null, 8, ["value", "options"])
      ]),
      F("div", mre, [
        h(T(Ml), {
          "active-key": f.value,
          "onUpdate:activeKey": v[1] || (v[1] = (g) => f.value = g),
          bordered: !1,
          accordion: "",
          size: "small"
        }, {
          default: he(() => [
            (ne(!0), xe(Je, null, Ut(d.value, (g) => (ne(), dt(T(Ml).Panel, {
              key: g.key,
              header: g.label
            }, {
              default: he(() => [
                (ne(), dt(AP(g.component), {
                  panel: T(o),
                  "on-change": T(i),
                  "numeric-field-names": T(r),
                  "all-field-names": T(a)
                }, null, 40, ["panel", "on-change", "numeric-field-names", "all-field-names"]))
              ]),
              _: 2
            }, 1032, ["header"]))), 128))
          ]),
          _: 1
        }, 8, ["active-key"])
      ])
    ]));
  }
}), bE = /* @__PURE__ */ be({
  __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 = E(() => t.links.filter((i) => i.url));
    return (i, r) => o.value.length === 0 ? (ne(), xe(Je, { key: 0 }, [], 64)) : o.value.length === 1 ? (ne(), dt(T(Lo), {
      key: 1,
      title: o.value[0].title || o.value[0].url,
      placement: "bottom"
    }, {
      default: he(() => [
        F("span", {
          class: Pt([T(mt).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: Ht({ color: e.iconColor }),
          onClick: r[0] || (r[0] = ui((a) => n(o.value[0]), ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }, 8, ["title"])) : (ne(), dt(T(_i), {
      key: 2,
      trigger: ["hover", "click"],
      placement: "bottomLeft"
    }, {
      overlay: he(() => [
        h(T(co), null, {
          default: he(() => [
            (ne(!0), xe(Je, null, Ut(o.value, (a, l) => (ne(), dt(T(co).Item, {
              key: l,
              onClick: (s) => n(a)
            }, {
              default: he(() => [
                Le(oe(a.title || a.url), 1)
              ]),
              _: 2
            }, 1032, ["onClick"]))), 128))
          ]),
          _: 1
        })
      ]),
      default: he(() => [
        F("span", {
          class: Pt([T(mt).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: Ht({ color: e.iconColor }),
          onClick: r[1] || (r[1] = ui(() => {
          }, ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }));
  }
}), yre = {
  key: 0,
  class: "legend-search-container"
}, xre = ["value"], wre = { class: "legend-table-wrap" }, Sre = { class: "legend-table" }, Cre = ["data-legend-item-id"], $re = { class: "legend-table-td legend-table-name-col" }, Pre = ["data-legend-tooltip"], Ore = { class: "legend-label" }, kre = {
  key: 0,
  class: "legend-search-container"
}, Ire = ["value"], Mre = {
  key: 1,
  class: "legend-empty-state"
}, Tre = { class: "virtuoso-grid-list" }, _re = ["data-legend-item-id"], Ere = ["data-legend-tooltip"], Dre = { class: "legend-label" }, Are = {
  key: 0,
  class: "legend-item-values"
}, Rre = { class: "legend-item-value-key" }, Nre = { class: "legend-item-value-num" }, zre = ["data-legend-tooltip", "onClick"], Bre = {
  key: 0,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, Fre = {
  key: 1,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, Lre = /* @__PURE__ */ be({
  __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), r = le(!1), a = le(), l = le({});
    function s(_) {
      const N = {};
      _.series.forEach((R, H) => {
        H !== 0 && (N[H] = R.show ?? !0);
      }), l.value = { ...N };
    }
    function u(_, N, R) {
      !N || typeof R.show != "boolean" || (l.value = { ...l.value, [N]: R.show });
    }
    Ie(
      () => t.uPlotInstance,
      (_, N) => {
        if (N && (N.hooks.setSeries = (N.hooks.setSeries ?? []).filter(
          (R) => R.__legendSync !== !0
        )), _) {
          s(_);
          const R = (H, L, B) => u(H, L, B);
          R.__legendSync = !0, _.hooks.setSeries = [..._.hooks.setSeries ?? [], R];
        } else
          l.value = {};
      },
      { immediate: !0 }
    );
    const c = {
      last: "Last *",
      first: "First *",
      min: "Min",
      max: "Max",
      mean: "Avg",
      sum: "Sum"
    };
    function d(_) {
      const N = _.filter(
        (H) => H != null && !Number.isNaN(H)
      );
      if (N.length === 0)
        return { last: null, first: null, min: null, max: null, mean: null, sum: null };
      const R = N.reduce((H, L) => H + L, 0);
      return {
        last: N[N.length - 1],
        first: N[0],
        min: Math.min(...N),
        max: Math.max(...N),
        mean: R / N.length,
        sum: R
      };
    }
    function f(_, N) {
      return _ === null ? "—" : Math.abs(_) >= 1e6 ? N !== void 0 ? `${(_ / 1e6).toFixed(N)}M` : `${_ / 1e6}M` : Math.abs(_) >= 1e3 ? N !== void 0 ? `${(_ / 1e3).toFixed(N)}K` : `${_ / 1e3}K` : N !== void 0 ? _.toFixed(N) : String(_);
    }
    const p = E(
      () => Object.values(t.items).map((_) => ({
        ..._,
        show: l.value[_.seriesIndex] ?? _.show ?? !0
      }))
    ), v = E(() => {
      if (t.position !== "right" || !o.value.trim())
        return p.value;
      const _ = o.value.trim().toLowerCase();
      return p.value.filter((N) => N.label?.toLowerCase().includes(_));
    }), g = E(() => t.position !== "right" || !o.value.trim() ? !1 : v.value.length === 0), m = E(() => {
      if (!t.data || t.values.length === 0)
        return {};
      const _ = {};
      return p.value.forEach((N) => {
        const R = t.data[N.seriesIndex];
        _[N.seriesIndex] = d(R ?? []);
      }), _;
    }), { onToggleSeriesOnOff: x, onToggleSeriesVisibility: S } = {
      onToggleSeriesOnOff(_) {
        const N = t.uPlotInstance;
        if (!N)
          return;
        const R = N.series[_];
        R && N.setSeries(_, { show: !R.show });
      },
      onToggleSeriesVisibility(_) {
        const N = t.uPlotInstance;
        if (!N)
          return;
        const R = n.value === _;
        N.series.forEach((H, L) => {
          L !== 0 && N.setSeries(L, { show: R || L === _ });
        }), n.value = R ? null : _;
      }
    };
    function C(_) {
      const N = _.target.closest("[data-legend-item-id]");
      if (!N)
        return null;
      const R = Number(N.dataset.legendItemId);
      return Number.isNaN(R) ? null : R;
    }
    function P(_) {
      const N = C(_);
      if (N === null)
        return;
      if (!!_.target.dataset.isLegendMarker) {
        x(N);
        return;
      }
      S(N);
    }
    async function $(_, N) {
      try {
        await navigator.clipboard.writeText(N), i.value = _, setTimeout(() => {
          i.value = null;
        }, 2e3);
      } catch {
      }
    }
    function I(_) {
      const N = _.target;
      o.value = N.value;
    }
    function w() {
      if (!a.value || t.position !== "bottom") {
        r.value = !1;
        return;
      }
      const N = a.value.clientWidth;
      if (N === 0)
        return;
      const R = p.value.length * (t.averageLegendWidth + 16);
      r.value = Math.ceil(R / N) <= 1;
    }
    let M = null;
    return At(() => {
      w(), a.value && t.position === "bottom" && (M = new ResizeObserver(w), M.observe(a.value));
    }), Vo(() => {
      M && M.disconnect();
    }), Ie([() => t.averageLegendWidth, () => p.value.length, () => t.position], () => {
      w();
    }), (_, N) => e.mode === "table" && e.values.length > 0 ? (ne(), xe("div", {
      key: 0,
      ref_key: "legendContainerRef",
      ref: a,
      class: "legend-container legend-table-mode",
      onClick: P
    }, [
      e.position === "right" ? (ne(), xe("div", yre, [
        F("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: I
        }, null, 40, xre)
      ])) : nt("", !0),
      F("div", wre, [
        F("table", Sre, [
          F("thead", null, [
            F("tr", null, [
              N[0] || (N[0] = F("th", { class: "legend-table-th legend-table-name-col" }, " Name ", -1)),
              (ne(!0), xe(Je, null, Ut(e.values, (R) => (ne(), xe("th", {
                key: R,
                class: "legend-table-th legend-table-val-col"
              }, oe(c[R]), 1))), 128))
            ])
          ]),
          F("tbody", null, [
            (ne(!0), xe(Je, null, Ut(v.value, (R) => (ne(), xe("tr", {
              key: R.seriesIndex,
              "data-legend-item-id": R.seriesIndex,
              class: Pt(["legend-table-row", [
                R.show ? "" : "legend-item-off",
                n.value === R.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              F("td", $re, [
                F("div", {
                  class: "legend-item-label-trigger",
                  "data-legend-tooltip": R.label
                }, [
                  F("div", {
                    class: "legend-marker",
                    style: Ht({ borderColor: R.color }),
                    "data-is-legend-marker": !0
                  }, null, 4),
                  F("span", Ore, oe(R.label), 1)
                ], 8, Pre)
              ]),
              (ne(!0), xe(Je, null, Ut(e.values, (H) => (ne(), xe("td", {
                key: H,
                class: "legend-table-td legend-table-val-col"
              }, oe(m.value[R.seriesIndex] ? f(m.value[R.seriesIndex][H], e.decimals) : "—"), 1))), 128))
            ], 10, Cre))), 128))
          ])
        ])
      ])
    ], 512)) : (ne(), xe("div", {
      key: 1,
      ref_key: "legendContainerRef",
      ref: a,
      class: Pt(["legend-container", [e.position === "bottom" ? "legend-container-bottom" : ""]]),
      style: Ht({ "--legend-average-width": `${e.averageLegendWidth + 16}px` }),
      onClick: P
    }, [
      e.position === "right" ? (ne(), xe("div", kre, [
        F("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: I
        }, null, 40, Ire)
      ])) : nt("", !0),
      g.value ? (ne(), xe("div", Mre, ' No series found matching "' + oe(o.value) + '" ', 1)) : (ne(), xe("div", {
        key: 2,
        class: Pt(["legend-virtuoso-container", [
          `legend-virtuoso-container-${e.position}`,
          r.value ? "legend-virtuoso-container-single-row" : ""
        ]])
      }, [
        F("div", Tre, [
          (ne(!0), xe(Je, null, Ut(v.value, (R) => (ne(), xe("div", {
            key: R.seriesIndex,
            class: "virtuoso-grid-item"
          }, [
            F("div", {
              "data-legend-item-id": R.seriesIndex,
              class: Pt(["legend-item", [
                `legend-item-${e.position}`,
                R.show ? "" : "legend-item-off",
                n.value === R.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              F("div", {
                class: "legend-item-label-trigger",
                "data-legend-tooltip": R.label
              }, [
                F("div", {
                  class: "legend-marker",
                  style: Ht({ borderColor: R.color }),
                  "data-is-legend-marker": !0
                }, null, 4),
                F("span", Dre, oe(R.label), 1)
              ], 8, Ere),
              m.value[R.seriesIndex] && e.values.length > 0 ? (ne(), xe("span", Are, [
                (ne(!0), xe(Je, null, Ut(e.values, (H) => (ne(), xe("span", {
                  key: H,
                  class: "legend-item-value-badge"
                }, [
                  F("span", Rre, oe(c[H]) + ":", 1),
                  F("span", Nre, oe(f(m.value[R.seriesIndex][H], e.decimals)), 1)
                ]))), 128))
              ])) : nt("", !0),
              F("button", {
                type: "button",
                class: "legend-copy-button",
                "data-legend-tooltip": i.value === R.seriesIndex ? "Copied" : "Copy",
                onClick: ui((H) => $(R.seriesIndex, R.label ?? ""), ["stop"])
              }, [
                i.value === R.seriesIndex ? (ne(), xe("svg", Bre, [...N[1] || (N[1] = [
                  F("path", { d: "M20 6L9 17l-5-5" }, null, -1)
                ])])) : (ne(), xe("svg", Fre, [...N[2] || (N[2] = [
                  F("rect", {
                    x: "9",
                    y: "9",
                    width: "13",
                    height: "13",
                    rx: "2",
                    ry: "2"
                  }, null, -1),
                  F("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, zre)
            ], 10, _re)
          ]))), 128))
        ])
      ], 2))
    ], 6));
  }
}), yE = /* @__PURE__ */ wi(Lre, [["__scopeId", "data-v-85a1707f"]]), Hre = { class: "footer" }, Vre = {
  key: 0,
  class: "hint"
}, jre = { class: "kbd active" }, Wre = {
  key: 1,
  class: "hint-list"
}, Kre = {
  class: "hint",
  "data-active": "false"
}, qre = { class: "kbd" }, Yre = /* @__PURE__ */ be({
  __name: "TooltipFooter",
  props: {
    isPinned: { type: Boolean },
    pinKey: { default: "P" }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = t;
    return (o, i) => (ne(), xe("div", Hre, [
      F("div", null, [
        e.isPinned ? (ne(), xe("div", Vre, [
          i[1] || (i[1] = F("span", null, "按", -1)),
          F("kbd", jre, oe(e.pinKey), 1),
          i[2] || (i[2] = F("span", null, "或", -1)),
          i[3] || (i[3] = F("kbd", { class: "kbd active" }, "Esc", -1)),
          i[4] || (i[4] = F("span", null, "取消固定", -1))
        ])) : (ne(), xe("div", Wre, [
          F("div", Kre, [
            i[5] || (i[5] = F("span", null, "按", -1)),
            F("kbd", qre, oe(e.pinKey), 1),
            i[6] || (i[6] = F("span", null, "固定提示框", -1))
          ])
        ]))
      ]),
      e.isPinned ? (ne(), xe("button", {
        key: 0,
        class: "unpin-btn",
        onClick: i[0] || (i[0] = (r) => n("dismiss"))
      }, [...i[7] || (i[7] = [
        F("svg", {
          width: "10",
          height: "10",
          viewBox: "0 0 24 24",
          fill: "none",
          stroke: "currentColor",
          "stroke-width": "2"
        }, [
          F("path", { d: "M18 6L6 18" }),
          F("path", { d: "M6 6l12 12" })
        ], -1),
        F("span", null, "取消固定", -1)
      ])])) : nt("", !0)
    ]));
  }
}), Gre = /* @__PURE__ */ wi(Yre, [["__scopeId", "data-v-75c52e2f"]]), Ure = ["data-is-active"], Xre = { class: "tooltip-item-label" }, Qre = /* @__PURE__ */ be({
  __name: "TooltipItem",
  props: {
    item: {},
    isItemActive: { type: Boolean }
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", {
      class: "tooltip-item",
      "data-is-active": e.isItemActive
    }, [
      F("div", {
        class: "tooltip-item-marker",
        style: Ht({ borderColor: e.item.color })
      }, null, 4),
      F("div", {
        class: "tooltip-item-content",
        style: Ht({ color: e.item.color })
      }, [
        F("span", Xre, oe(e.item.label), 1),
        F("span", {
          class: "tooltip-item-separator",
          style: Ht({ borderColor: e.item.color })
        }, null, 4),
        F("span", null, oe(e.item.tooltipValue), 1)
      ], 4)
    ], 8, Ure));
  }
}), xE = /* @__PURE__ */ wi(Qre, [["__scopeId", "data-v-3b1d92d5"]]), Zre = { class: "header-container" }, Jre = {
  key: 0,
  class: "header-row"
}, eae = {
  key: 0,
  class: "header-status"
}, tae = {
  key: 1,
  class: "header-pinned-item"
}, nae = /* @__PURE__ */ be({
  __name: "TooltipHeader",
  props: {
    uPlotInstance: {},
    showTooltipHeader: { type: Boolean },
    isPinned: { type: Boolean },
    activeItem: {},
    headerTitle: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", Zre, [
      e.showTooltipHeader && e.headerTitle ? (ne(), xe("div", Jre, [
        F("span", null, oe(e.headerTitle), 1),
        e.isPinned ? (ne(), xe("div", eae, [...n[0] || (n[0] = [
          F("svg", {
            width: "12",
            height: "12",
            viewBox: "0 0 24 24",
            fill: "none",
            stroke: "currentColor",
            "stroke-width": "2"
          }, [
            F("path", { d: "M12 2v4" }),
            F("path", { d: "M19 10h-7l-5 5v7h10v-7l-5-5z" })
          ], -1),
          F("span", null, "已固定", -1)
        ])])) : nt("", !0)
      ])) : nt("", !0),
      e.activeItem ? (ne(), xe("div", tae, [
        h(xE, {
          item: e.activeItem,
          "is-item-active": !0
        }, null, 8, ["item"])
      ])) : nt("", !0)
    ]));
  }
}), oae = /* @__PURE__ */ wi(nae, [["__scopeId", "data-v-efb4cf97"]]), iae = /* @__PURE__ */ be({
  __name: "TooltipList",
  props: {
    content: {},
    maxHeight: { default: 300 }
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", {
      class: "tooltip-list",
      style: Ht({ maxHeight: `${e.maxHeight}px`, overflowY: "auto" })
    }, [
      (ne(!0), xe(Je, null, Ut(e.content, (o) => (ne(), dt(xE, {
        key: o.label,
        item: o,
        "is-item-active": !1
      }, null, 8, ["item"]))), 128))
    ], 4));
  }
}), rae = /* @__PURE__ */ wi(iae, [["__scopeId", "data-v-fa17493a"]]), aae = {
  key: 1,
  class: "tooltip-divider"
}, lae = /* @__PURE__ */ be({
  __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 = E(() => n.content.find((s) => s.isActive) ?? null), r = E(() => n.showTooltipHeader || i.value != null), a = E(() => n.content.length > 1), l = E(() => a.value && r.value);
    return (s, u) => (ne(), xe("div", {
      class: Pt(["tooltip-container", { pinned: e.isPinned }])
    }, [
      r.value ? (ne(), dt(oae, {
        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"])) : nt("", !0),
      l.value ? (ne(), xe("span", aae)) : nt("", !0),
      a.value ? (ne(), dt(rae, {
        key: 2,
        content: e.content,
        "max-height": e.tooltipMaxHeight
      }, null, 8, ["content", "max-height"])) : nt("", !0),
      e.canPinTooltip ? (ne(), dt(Gre, {
        key: 3,
        "is-pinned": e.isPinned,
        style: Ht({ pointerEvents: e.isPinned ? "auto" : "none" }),
        onDismiss: u[0] || (u[0] = (c) => o("dismiss"))
      }, null, 8, ["is-pinned", "style"])) : nt("", !0)
    ], 2));
  }
}), sae = /* @__PURE__ */ wi(lae, [["__scopeId", "data-v-4b92f289"]]), pu = 14, wE = /* @__PURE__ */ be({
  __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), r = le(""), a = le([]), l = {
      hoverActive: !1,
      pinned: !1,
      focusedSeriesIndex: null,
      seriesIndexes: [],
      mouseWithinPlot: !1,
      windowWidth: window.innerWidth - 16,
      windowHeight: window.innerHeight - 16,
      tooltipW: 0,
      tooltipH: 0,
      // offset state with memory — mirrors React's horizontalOffset/verticalOffset
      horizontalOffset: 0,
      verticalOffset: 0,
      cursorDrivenBySync: !1
    };
    let s = null;
    function u() {
      s === null && (s = requestAnimationFrame(() => {
        s = null, S();
      }));
    }
    function c(A, G, j) {
      return typeof A == "function" ? String(A(G, j)) : typeof A == "string" ? A : "#cccccc";
    }
    function d(A, G, j) {
      const Z = j !== void 0 ? A.toFixed(j) : String(Math.round(A * 1e3) / 1e3);
      return G ? `${Z} ${G}` : Z;
    }
    function f(A) {
      if (t.tooltipMode === "none")
        return [];
      const G = A.cursor.idx, j = [];
      for (let Z = 1; Z < A.series.length; Z++) {
        const W = A.series[Z];
        if (!W?.show)
          continue;
        let K = l.seriesIndexes[Z] ?? null;
        if (t.tooltipMode === "single") {
          if (Z !== l.focusedSeriesIndex)
            continue;
          K = G ?? K;
        } else
          K = K ?? G ?? null;
        if (K === null)
          continue;
        const q = A.data[Z]?.[K];
        q == null || !Number.isFinite(q) || j.push({
          label: String(W.label ?? `Series ${Z}`),
          value: q,
          tooltipValue: d(q, t.unit, t.decimals),
          color: c(W.stroke, A, Z),
          isActive: Z === l.focusedSeriesIndex
        });
      }
      return t.tooltipSort === "asc" && j.sort((Z, W) => Z.value - W.value), t.tooltipSort === "desc" && j.sort((Z, W) => W.value - Z.value), j;
    }
    function p(A) {
      if (!t.showTooltipHeader)
        return "";
      const G = A.cursor.idx;
      if (G == null)
        return "";
      const j = A.data[0]?.[G];
      return j == null ? "" : A.scales.x?.time ? new Date(j * 1e3).toLocaleString() : String(j);
    }
    function v(A, G, j) {
      const Z = j + pu;
      return A !== 0 ? G + Z < l.windowWidth || G - Z < 0 ? 0 : A !== -Z ? -Z : A : G + Z > l.windowWidth && G - Z >= 0 ? -Z : 0;
    }
    function g(A, G, j) {
      const Z = j + pu;
      return A !== 0 ? G + Z < l.windowHeight || G - Z < 0 ? 0 : A !== -Z ? -Z : A : G + Z > l.windowHeight && G - Z >= 0 ? -Z : 0;
    }
    function m(A, G, j, Z) {
      const W = A + (j === 0 ? pu : -pu), K = G + (Z === 0 ? pu : -pu);
      return `translateX(${W}px) ${j === 0 ? "" : "translateX(-100%)"} translateY(${K}px) ${Z === 0 ? "" : "translateY(-100%)"}`;
    }
    function x(A) {
      if (l.cursorDrivenBySync = A.cursor.event == null, l.pinned || !l.hoverActive)
        return;
      const G = n.value, { left: j = -1, top: Z = -1 } = A.cursor;
      if (j < 0 || Z < 0)
        return;
      const W = A.rect.left + j, K = A.rect.top + Z, q = G ? G.offsetWidth : l.tooltipW, U = G ? G.offsetHeight : l.tooltipH;
      l.tooltipW = q, l.tooltipH = U, l.horizontalOffset = v(l.horizontalOffset, W, q), l.verticalOffset = g(l.verticalOffset, K, U);
      const ae = m(W, K, l.horizontalOffset, l.verticalOffset);
      G && (G.style.transform = ae);
    }
    function S() {
      const A = t.uPlotInstance;
      if (!A || !l.hoverActive && !l.pinned) {
        o.value = !1;
        return;
      }
      const G = f(A);
      if (G.length === 0) {
        l.pinned || (o.value = !1);
        return;
      }
      if (a.value = G, r.value = p(A), i.value = l.pinned, !l.pinned) {
        const j = n.value, { left: Z = -1, top: W = -1 } = A.cursor;
        if (j && Z >= 0 && W >= 0) {
          const K = A.rect.left + Z, q = A.rect.top + W;
          j.style.transform = m(K, q, l.horizontalOffset, l.verticalOffset);
        }
      }
      o.value = !0;
    }
    function C(A) {
      if (l.pinned)
        return;
      const G = A.cursor.idxs;
      if (!G)
        return;
      const j = l.cursorDrivenBySync;
      l.cursorDrivenBySync = A.cursor.event == null, l.seriesIndexes = [...G];
      const Z = l.seriesIndexes.some((q, U) => U > 0 && q != null), W = l.hoverActive;
      l.hoverActive = l.cursorDrivenBySync ? Z : l.focusedSeriesIndex != null, (l.hoverActive !== W || l.cursorDrivenBySync !== j) && u();
    }
    function P(A, G, j) {
      !("focus" in j) || l.pinned || (l.focusedSeriesIndex = G ?? null, l.cursorDrivenBySync = A.cursor.event == null, l.hoverActive = l.focusedSeriesIndex != null, u());
    }
    function $() {
      const A = t.uPlotInstance;
      !A || !l.hoverActive || (l.pinned = !0, A.cursor._lock = !0, i.value = !0, document.addEventListener("mousedown", w, !0));
    }
    function I() {
      const A = t.uPlotInstance;
      l.pinned = !1, l.hoverActive = !1, A && (A.cursor._lock = !1), i.value = !1, o.value = !1, document.removeEventListener("mousedown", w, !0);
    }
    function w(A) {
      n.value && !n.value.contains(A.target) && I();
    }
    function M(A) {
      if (A.key === "Escape") {
        l.pinned && I();
        return;
      }
      A.key.toLowerCase() === "p" && l.mouseWithinPlot && (l.pinned ? I() : $());
    }
    function _() {
      l.mouseWithinPlot = !0;
    }
    function N() {
      l.mouseWithinPlot = !1;
    }
    function R() {
      l.windowWidth = window.innerWidth - 16, l.windowHeight = window.innerHeight - 16, l.pinned || (l.hoverActive = !1);
    }
    let H = [];
    function L(A) {
      const G = (W) => C(W), j = (W, K, q) => P(W, K, q), Z = (W) => x(W);
      A.hooks.setLegend = [...A.hooks.setLegend ?? [], G], A.hooks.setSeries = [...A.hooks.setSeries ?? [], j], A.hooks.setCursor = [...A.hooks.setCursor ?? [], Z], A.root.addEventListener("mouseenter", _), A.root.addEventListener("mouseleave", N), H = [
        () => {
          A.hooks.setLegend = (A.hooks.setLegend ?? []).filter(
            (W) => W !== G
          ), A.hooks.setSeries = (A.hooks.setSeries ?? []).filter(
            (W) => W !== j
          ), A.hooks.setCursor = (A.hooks.setCursor ?? []).filter(
            (W) => W !== Z
          ), A.root.removeEventListener("mouseenter", _), A.root.removeEventListener("mouseleave", N);
        }
      ];
    }
    function B() {
      H.forEach((A) => A()), H = [], document.removeEventListener("mousedown", w, !0), l.hoverActive = !1, l.pinned = !1, l.focusedSeriesIndex = null, l.horizontalOffset = 0, l.verticalOffset = 0, l.cursorDrivenBySync = !1, o.value = !1, i.value = !1, s !== null && (cancelAnimationFrame(s), s = null);
    }
    return Ie(
      () => t.uPlotInstance,
      (A, G) => {
        G && B(), A && L(A);
      },
      { immediate: !0 }
    ), At(() => {
      document.addEventListener("keydown", M, !0), window.addEventListener("resize", R);
    }), Vo(() => {
      B(), document.removeEventListener("keydown", M, !0), window.removeEventListener("resize", R);
    }), (A, G) => (ne(), dt(nh, { to: "body" }, [
      er(F("div", {
        ref_key: "containerRef",
        ref: n,
        style: { position: "fixed", top: "0", left: "0", "z-index": "1070", "pointer-events": "none" }
      }, [
        e.uPlotInstance ? (ne(), dt(sae, {
          key: 0,
          "u-plot-instance": e.uPlotInstance,
          content: a.value,
          "header-title": r.value,
          "is-pinned": i.value,
          "can-pin-tooltip": e.canPinTooltip,
          "show-tooltip-header": e.showTooltipHeader,
          "tooltip-max-height": e.tooltipMaxHeight,
          onDismiss: I
        }, null, 8, ["u-plot-instance", "content", "header-title", "is-pinned", "can-pin-tooltip", "show-tooltip-header", "tooltip-max-height"])) : nt("", !0)
      ], 512), [
        [Or, o.value && e.tooltipMode !== "none"]
      ])
    ]));
  }
}), SE = Symbol("plotContext");
function uae() {
  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 r() {
    const c = e.value;
    if (!c || !t.value)
      return;
    const d = c.series.map((f) => ({
      label: f.label ?? "",
      show: f.show ?? !0
    }));
    l4(t.value, d);
  }
  function a(c) {
    const d = e.value;
    if (!d)
      return;
    const f = o === c;
    o = f ? void 0 : c, d.batch(() => {
      d.series.forEach((p, v) => {
        v !== 0 && d.setSeries(v, {
          show: f || v === c
        });
      }), t.value && n.value && r();
    });
  }
  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 && r());
  }
  function s(c) {
    const d = e.value;
    d && d.batch(() => {
      d.series.forEach((f, p) => {
        p !== 0 && d.setSeries(p, {
          show: c === null || p === c
        });
      });
    });
  }
  const u = {
    uPlotInstance: e,
    id: t,
    shouldSaveSelectionPreference: n,
    setPlotContextInitialState: i,
    onToggleSeriesVisibility: a,
    onToggleSeriesOnOff: l,
    onFocusSeries: s,
    syncSeriesVisibilityToLocalStorage: r
  };
  return Ft(SE, u), u;
}
function ofe() {
  const e = zt(SE);
  if (!e)
    throw new Error("usePlotContext must be used within a PlotContextProvider");
  return e;
}
const cae = { style: { position: "relative", overflow: "hidden" } }, CE = /* @__PURE__ */ be({
  __name: "UPlotChart",
  props: {
    config: {},
    data: {},
    width: {},
    height: {},
    plotRef: {},
    onDestroy: {}
  },
  emits: ["plotReady"],
  setup(e, { expose: t, emit: n }) {
    const o = e, i = n, { setPlotContextInitialState: r } = uae(), a = 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, r({ uPlotInstance: null }), o.plotRef && o.plotRef(null));
    }
    function p($) {
      if ($ === null || typeof $ != "object")
        return $;
      const I = di($);
      if (I instanceof Date)
        return new Date(I.getTime());
      if (I instanceof RegExp)
        return new RegExp(I.source, I.flags);
      if (typeof I == "function")
        return I;
      if (Array.isArray(I)) {
        const M = [];
        for (let _ = 0; _ < I.length; _++)
          M.push(p(di(I[_])));
        return M;
      }
      const w = {};
      for (const M in I)
        Object.prototype.hasOwnProperty.call(I, M) && (w[M] = p(di(I[M])));
      return w;
    }
    function v() {
      if (f(), !a.value || o.width === 0 || o.height === 0)
        return;
      const $ = o.config.getConfig(), w = p({
        ...$,
        width: Math.floor(o.width),
        height: Math.floor(o.height),
        series: $.series ?? []
      }), M = m(o.data, o.config), _ = new xo(w, M, a.value);
      o.plotRef && o.plotRef(_), r({
        uPlotInstance: _,
        id: o.config.getId(),
        shouldSaveSelectionPreference: o.config.getShouldSaveSelectionPreference()
      }), l.value = _, i("plotReady", _), s.value = JSON.stringify(o.config.getConfig()), u.value = JSON.stringify(o.data), c.value = o.width, d.value = o.height;
    }
    function g($) {
      return JSON.parse(JSON.stringify($));
    }
    function m($, I) {
      const w = g($), M = I.getSeriesSpanGapsOptions();
      return M.length > 0 ? OB(w, M) : w;
    }
    function x() {
      return o.width === c.value && o.height === d.value;
    }
    function S() {
      return JSON.stringify(o.data) === u.value;
    }
    function C() {
      return JSON.stringify(o.config.getConfig()) === s.value;
    }
    const P = E(() => !!(o.data && o.data[0] && o.data[0].length === 0));
    return Ie(P, ($) => {
      $ && f();
    }), It(($) => {
      if ($(() => {
        f(), s.value = "", u.value = "", c.value = 0, d.value = 0;
      }), !a.value || o.width === 0 || o.height === 0)
        return;
      if (!s.value) {
        v();
        return;
      }
      const I = !!l.value && (!a.value || l.value.root.parentElement !== a.value);
      if (!x() && l.value && !I && l.value.setSize({
        width: Math.floor(o.width),
        height: Math.floor(o.height)
      }), !C() || I)
        v();
      else if (!S() && l.value) {
        const w = m(o.data, o.config);
        l.value.setData(w);
      }
    }), qt(() => {
      f();
    }), t({ plotInstance: l }), ($, I) => (ne(), xe("div", cae, [
      P.value ? (ne(), xe("div", {
        key: 0,
        class: "flex flex-col items-center justify-center not-found",
        style: Ht({
          width: `${e.width}px`,
          height: `${e.height}px`
        })
      }, [
        F("div", {
          class: Pt([T(mt).chartLine, "mb-2"]),
          style: { "font-size": "48px" }
        }, null, 2),
        I[0] || (I[0] = F("div", { class: "text-gray-400 text-sm" }, " No Data ", -1))
      ], 4)) : (ne(), xe("div", {
        key: 1,
        ref_key: "containerRef",
        ref: a,
        class: "w-full h-full"
      }, null, 512)),
      ai($.$slots, "default")
    ]));
  }
}), dae = {
  key: 0,
  class: "flex items-center justify-center h-full text-gray-400 select-none"
}, $E = /* @__PURE__ */ be({
  __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 r(m) {
      i = new ResizeObserver((x) => {
        const S = x[0];
        if (S) {
          const { width: C, height: P } = S.contentRect;
          setTimeout(() => {
            o.value = { width: Math.floor(C), height: Math.floor(P) };
          }, 300);
        }
      }), i.observe(m), requestAnimationFrame(() => {
        const { width: x, height: S } = m.getBoundingClientRect();
        o.value = { width: Math.floor(x), height: Math.floor(S) };
      });
    }
    At(() => {
      n.value && r(n.value);
    }), Ie(n, (m) => {
      i?.disconnect(), m && r(m);
    }), qt(() => {
      i?.disconnect();
    });
    const a = E(() => {
      const m = new Ik({ id: t.panelId ?? "chart" }), x = t.scaleDistribution ?? "linear", S = t.stackingMode !== "none";
      m.addScale({ scaleKey: "x", time: t.xAxisTime }), m.addScale({
        scaleKey: "y",
        distribution: x === "logarithmic" ? ws.Logarithmic : x === "symlog" ? ws.Symlog : ws.Linear,
        softMin: S && t.stackingMode === "percent" ? 0 : t.softMin ?? void 0,
        softMax: S && t.stackingMode === "percent" ? 100 : t.softMax ?? void 0,
        ...t.centeredZero ? {
          range: (fe, ge, Me) => {
            const ze = Math.max(Math.abs(ge), Math.abs(Me));
            return [-ze, ze];
          }
        } : {}
      });
      const C = t.gridColor ?? "#E8E9EA", P = t.showGridLines === "all" || t.showGridLines === "x", $ = t.showGridLines === "all" || t.showGridLines === "y", I = t.axisLabel === "all" || t.axisLabel === "x", w = t.axisLabel === "all" || t.axisLabel === "y", M = I ? t.axisLabelColor ?? "#666666" : "transparent", _ = w ? t.axisLabelColor ?? "#666666" : "transparent", N = t.axisTick === "all" || t.axisTick === "x", R = t.axisTick === "all" || t.axisTick === "y", H = N ? t.axisTickColor ?? "#666666" : "transparent", L = R ? t.axisTickColor ?? "#666666" : "transparent", B = t.axisBorder === "all" || t.axisBorder === "x", A = t.axisBorder === "all" || t.axisBorder === "y", G = t.axisBorderColor ?? "#666666";
      m.addAxis({
        scaleKey: "x",
        side: 2,
        size: 28,
        stroke: M,
        grid: { show: P, stroke: C },
        ticks: { show: N, stroke: H, width: 0.5 },
        border: { show: B, stroke: G }
      });
      const j = t.axisPlacement === "right" ? 1 : 3, Z = t.axisPlacement !== "hidden", W = (() => {
        if (t.axisWidth !== void 0 && t.axisWidth !== null)
          return t.axisWidth;
        const fe = t.data.series.reduce((He, Re) => He.concat(Re.values.filter((Xe) => Xe !== null && Number.isFinite(Xe))), []);
        if (fe.length === 0)
          return 56;
        const ge = fe.reduce((He, Re) => Math.max(He, Math.abs(Re)), 0), Me = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15, Ke = ((He) => {
          if (Math.abs(He) >= 1e6) {
            const Xe = Me !== void 0 ? (He / 1e6).toFixed(Me) : String(He / 1e6);
            return t.unit ? `${Xe}M ${t.unit}` : `${Xe}M`;
          }
          if (Math.abs(He) >= 1e3) {
            const Xe = Me !== void 0 ? (He / 1e3).toFixed(Me) : String(He / 1e3);
            return t.unit ? `${Xe}K ${t.unit}` : `${Xe}K`;
          }
          const Re = Me !== void 0 ? He.toFixed(Me) : String(Math.round(He * 100) / 100);
          return t.unit ? `${Re} ${t.unit}` : Re;
        })(ge);
        try {
          const He = document.createElement("canvas").getContext("2d");
          if (!He)
            return 56;
          He.font = "12px system-ui, sans-serif";
          const Re = He.measureText(Ke).width;
          return Math.ceil(Re) + 14;
        } catch {
          return 56;
        }
      })(), K = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15;
      m.addAxis({
        scaleKey: "y",
        side: j,
        show: Z,
        label: t.axisName || void 0,
        size: W,
        stroke: _,
        grid: { show: $, stroke: C },
        ticks: { show: R, stroke: L, width: 0.5 },
        border: { show: A, stroke: G },
        isDarkMode: !0,
        yAxisUnit: t.unit,
        decimalPrecision: K,
        isLogScale: x === "logarithmic" || x === "symlog"
      });
      const q = BO(
        t.colorScheme,
        t.data.series.length,
        t.colorDistribution ?? "sequential",
        t.colorSingleValue
      ), U = t.drawStyle === "bars", ae = t.drawStyle === "points", se = t.data.series.length, re = t.barGroupWidth ?? 0.7, ie = t.barWidth ?? (t.stackingMode !== "none" ? 1 : 1 / Math.max(se, 1)), te = U ? re * ie : void 0, ve = ae || t.showPointsMode === "always" ? !0 : t.showPointsMode === "never" ? !1 : t.showPoints, ce = S ? "none" : t.fillOpacity > 0 ? t.gradientMode !== "none" ? "gradient" : "solid" : "none";
      if (t.data.series.forEach((fe, ge) => {
        const Me = q[ge] ?? Il[ge % Il.length];
        m.addSeries({
          scaleKey: "y",
          label: fe.label,
          drawStyle: U ? "bars" : ae ? "points" : "lines",
          lineColor: Me,
          lineWidth: t.lineWidth,
          lineInterpolation: t.lineInterpolation,
          lineStyle: t.lineStyle,
          fillColor: Me,
          fillOpacity: t.fillOpacity,
          fillMode: ce,
          showPoints: ve,
          pointSize: ve ? 4 : 0,
          spanGaps: t.spanNulls ?? !1,
          ...te !== void 0 ? { barWidthFactor: te } : {}
        });
      }), S && t.data.series.length > 0 && t.fillOpacity > 0) {
        const fe = q.length > 0 ? q : [...Il], ge = 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((ze, Ke) => ({
          series: [Ke + 1, Ke],
          fill: `${fe[Ke % fe.length]}${ge}`
        }));
        Me.length > 0 && (Me[0] = { series: [1, 0], fill: `${fe[0]}${ge}` }), m.setBands(Me);
      }
      return t.syncKey && m.setCursor({ sync: { key: t.syncKey, setSeries: !0 } }), t.showAxisPointer || m.setCursor({ x: !1, y: !1 }), m.setCursor({
        drag: { setScale: !0 },
        points: {
          one: !0,
          size: (fe, ge) => (fe.series[ge]?.points?.size ?? 0) * 3,
          width: (fe, ge, Me) => Me / 4,
          stroke: (fe, ge) => {
            const Me = fe.series[ge]?.points, ze = typeof Me?.stroke == "function" ? Me.stroke : void 0;
            return `${ze !== void 0 ? ze(fe, ge) : typeof Me?.stroke == "string" ? Me.stroke : ""}90`;
          },
          fill: "#fff"
        },
        focus: {
          prox: 30
        },
        hover: {
          prox: 30,
          bias: 0
        }
      }), m;
    }), l = E(() => {
      const m = t.data?.timestamps ?? [], x = JSON.parse(JSON.stringify(m));
      if (x.length === 0 || !t.data)
        return [[]];
      const S = t.data.series.map((C) => JSON.parse(JSON.stringify(C.values.map((P) => P ?? 0))));
      if (t.stackingMode !== "none" && t.data.series.length > 0) {
        const C = x.length, P = Array.from({ length: C }, () => 0), $ = [];
        for (const I of t.data.series) {
          const w = Array.from({ length: C });
          for (let M = 0; M < C; M++) {
            if (t.stackingMode === "percent") {
              let _ = 0;
              for (const N of t.data.series)
                _ += N.values[M] ?? 0;
              P[M] = P[M] + (I.values[M] ?? 0) / (_ || 1) * 100;
            } else
              P[M] = P[M] + (I.values[M] ?? 0);
            w[M] = P[M];
          }
          $.push(w);
        }
        return [x, ...$];
      }
      return [x, ...S];
    }), s = E(() => !t.data || t.data.timestamps.length === 0 || t.data.series.length === 0), u = le(null);
    function c(m) {
      u.value = m;
    }
    const d = E(() => t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15), f = E(() => t.legendPosition === "right"), p = E(() => t.legendPosition !== "hidden" && t.data.series.length > 0), v = E(() => f.value && p.value ? Math.max(o.value.width - 160, 100) : o.value.width), g = E(() => Math.max(o.value.height, 50));
    return (m, x) => (ne(), xe("div", {
      class: Pt(["w-full h-full flex overflow-hidden relative", f.value ? "flex-row" : "flex-col"])
    }, [
      s.value ? (ne(), xe("div", dae, [...x[0] || (x[0] = [
        F("span", { class: "text-xs" }, "No data", -1)
      ])])) : nt("", !0),
      F("div", {
        ref_key: "chartAreaRef",
        ref: n,
        class: "flex-1 min-h-0 min-w-0 relative overflow-hidden"
      }, [
        h(CE, {
          config: a.value,
          data: l.value,
          width: v.value,
          height: g.value,
          onPlotReady: c
        }, {
          default: he(() => [
            h(wE, {
              "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"])
      ], 512),
      p.value ? (ne(), xe("div", {
        key: 1,
        style: Ht(
          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" }
        )
      }, [
        h(yE, {
          items: a.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)) : nt("", !0)
    ], 2));
  }
}), fae = /* @__PURE__ */ be({
  __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) => (ne(), dt($E, {
      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"]));
  }
}), pae = {
  key: 0,
  style: { "text-align": "center", "font-size": "11px", color: "#888", padding: "2px 4px 4px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
}, Yv = 2, hae = /* @__PURE__ */ be({
  __name: "GaugePanel",
  props: {
    series: {},
    value: { default: 0 },
    title: {},
    min: { default: Yn.min },
    max: { default: Yn.max },
    unit: {},
    thresholds: {},
    thresholdBaseColor: {},
    capRound: { type: Boolean, default: Yn.capRound },
    trackWidth: { default: Yn.trackWidth },
    fillWidth: { default: Yn.fillWidth },
    trackColor: { default: Yn.trackColor },
    sweepAngle: { default: Yn.sweepAngle },
    valueColor: { default: Yn.valueColor },
    valueSize: { default: Yn.valueSize },
    valueVisible: { type: Boolean, default: Yn.valueVisible },
    paddingX: { default: Yn.paddingX },
    paddingY: { default: Yn.paddingY },
    activeColorOverride: {},
    thresholdDisplay: { default: Yn.thresholdDisplay },
    thresholdLabelDisplay: { default: Yn.thresholdLabelDisplay },
    valueOffsetY: { default: Yn.valueOffsetY },
    orientation: { default: Yn.orientation }
  },
  setup(e) {
    const t = e, n = le(), o = le({ w: 0, h: 0 });
    let i = null;
    function r(S, C, P = 2) {
      const $ = S.toFixed(P);
      return C === "percent" ? `${$}%` : C === "bytes" ? S >= 1024 * 1024 ? `${(S / 1024 / 1024).toFixed(1)} MB` : S >= 1024 ? `${(S / 1024).toFixed(1)} KB` : `${S} B` : C ? `${$} ${C}` : $;
    }
    function a(S, C, P) {
      const $ = [...P].sort((w, M) => w.value - M.value);
      let I = C;
      for (const w of $)
        S >= w.value && (I = w.color);
      return I;
    }
    function l(S, C) {
      const P = S.match(/^#([0-9a-f]{6})([0-9a-f]{2})?$/i);
      if (P) {
        const I = Number.parseInt(P[1].slice(0, 2), 16), w = Number.parseInt(P[1].slice(2, 4), 16), M = Number.parseInt(P[1].slice(4, 6), 16);
        return `rgba(${I},${w},${M},${C})`;
      }
      const $ = S.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
      return $ ? `rgba(${$[1]},${$[2]},${$[3]},${C})` : S;
    }
    function s(S, C, P, $, I, w, M, _, N, R, H, L, B, A, G, j, Z, W, K, q, U, ae) {
      const se = S.getContext("2d");
      if (!se)
        return;
      const re = window.devicePixelRatio || 1, ie = S.clientWidth, te = S.clientHeight;
      if (ie === 0 || te === 0)
        return;
      S.width = ie * re, S.height = te * re, se.scale(re, re), se.clearRect(0, 0, ie, te);
      const ve = L * Math.PI / 180, ce = (L + B) * Math.PI / 180;
      let fe, ge, Me, ze;
      if (B >= 360)
        fe = -1, ge = 1, Me = -1, ze = 1;
      else {
        fe = Math.cos(ve), ge = Math.cos(ve), Me = Math.sin(ve), ze = Math.sin(ve);
        const bt = (Wt) => {
          fe = Math.min(fe, Math.cos(Wt)), ge = Math.max(ge, Math.cos(Wt)), Me = Math.min(Me, Math.sin(Wt)), ze = Math.max(ze, Math.sin(Wt));
        };
        bt(ce);
        const Ot = [0, 90, 180, 270, 360, 450, 540].map((Wt) => Wt * Math.PI / 180);
        for (const Wt of Ot) {
          const Xt = (En) => (En % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), ln = Xt(ve), pn = Xt(ce), gt = Xt(Wt);
          (ln <= pn ? gt >= ln && gt <= pn : gt >= ln || gt <= pn) && bt(Wt);
        }
      }
      const Ke = ge - fe, He = ze - Me, Re = Math.min(ie, te), Xe = Re / 300, De = Z * Xe, Be = W * Xe, Ve = Math.max(0, ie - 2 * De), ot = Math.max(0, te - 2 * Be), je = De, Pe = Be, Ge = N * Xe, Se = R * Xe, Ce = q === "marker", Ae = q === "track", qe = Ce ? Math.max(2, Re * 0.04) : 0, We = Ce ? Math.max(Ge, Se) / 2 + 2 + qe : Math.max(Ge, Se) / 2, tt = Math.min((Ve - We * 2) / Ke, (ot - We * 2) / He);
      if (tt < 10)
        return;
      const Ee = je + Ve / 2 - (fe + ge) / 2 * tt, Ne = Pe + ot / 2 - (Me + ze) / 2 * tt, Fe = $ - P || 1, it = Math.max(P, Math.min($, C)), pt = (it - P) / Fe, at = ve + pt * (ce - ve), ft = K ?? a(it, M, w), wt = _ ? "round" : "butt";
      se.beginPath(), se.arc(Ee, Ne, tt, ve, ce), se.strokeStyle = H, se.lineWidth = Ge, se.lineCap = wt, se.stroke();
      const Ct = [...w].sort((bt, Ot) => bt.value - Ot.value), St = [];
      if (Ct.length === 0)
        St.push({ from: P, to: $, color: M });
      else {
        St.push({ from: P, to: Ct[0].value, color: M });
        for (let bt = 0; bt < Ct.length; bt++)
          St.push({ from: Ct[bt].value, to: bt + 1 < Ct.length ? Ct[bt + 1].value : $, color: Ct[bt].color });
      }
      if (Ae) {
        const bt = (ce - ve) / (2 * Math.PI), Ot = se.createConicGradient(ve, Ee, Ne);
        for (const Wt of St) {
          const Xt = Math.min(1, (Math.max(P, Wt.from) - P) / Fe * bt), ln = Math.min(1, (Math.min($, Wt.to) - P) / Fe * bt);
          Ot.addColorStop(Xt, l(Wt.color, 0.25)), Ot.addColorStop(ln, l(Wt.color, 0.25));
        }
        Ot.addColorStop(1, l(St[0].color, 0.25)), se.beginPath(), se.arc(Ee, Ne, tt, ve, ce), se.strokeStyle = Ot, se.lineWidth = Ge, se.lineCap = wt, se.stroke();
      }
      if (pt > 0 && (se.beginPath(), se.arc(Ee, Ne, tt, ve, at), se.strokeStyle = ft, se.lineWidth = Se, se.lineCap = wt, se.stroke()), Ce && St.length > 0) {
        const bt = tt + Math.max(Ge, Se) / 2 + qe / 2 + 2, Ot = (ce - ve) / (2 * Math.PI), Wt = se.createConicGradient(ve, Ee, Ne);
        for (const Xt of St) {
          const ln = Math.min(1, (Math.max(P, Xt.from) - P) / Fe * Ot), pn = Math.min(1, (Math.min($, Xt.to) - P) / Fe * Ot);
          Wt.addColorStop(ln, Xt.color), Wt.addColorStop(pn, Xt.color);
        }
        Wt.addColorStop(1, St[0].color), se.beginPath(), se.arc(Ee, Ne, bt, ve, ce), se.strokeStyle = Wt, se.lineWidth = qe, se.lineCap = wt, se.stroke();
      }
      if (ae !== "none" && w.length > 0) {
        const bt = Math.max(8, 11 * Xe), Ot = tt + Math.max(Ge, Se) / 2 + (Ce ? qe + 4 : 4) + bt * 0.6, Wt = $ - P || 1;
        se.font = `${bt}px system-ui, sans-serif`, se.textBaseline = "middle";
        for (const Xt of w) {
          const ln = (Xt.value - P) / Wt;
          if (ln < 0 || ln > 1)
            continue;
          const pn = ve + ln * (ce - ve), gt = Ee + Math.cos(pn) * Ot, En = Ne + Math.sin(pn) * Ot, hn = gt - Ee;
          if (se.textAlign = hn > 1 ? "left" : hn < -1 ? "right" : "center", se.fillStyle = Xt.color, ae === "label" || ae === "both") {
            const Wn = Xt.label || String(Xt.value);
            ae === "both" ? (se.fillText(Wn, gt, En - bt * 0.6), se.fillText(r(Xt.value, I, 1), gt, En + bt * 0.6)) : se.fillText(Wn, gt, En);
          } else
            se.fillText(r(Xt.value, I, 1), gt, En);
        }
      }
      if (j) {
        const bt = Math.max(4, G * Xe), Ot = r(it, I, 2), Wt = Ne + Me * tt - Se / 2, Xt = Ne + ze * tt + Se / 2, ln = (Wt + Xt) / 2;
        se.textAlign = "center", se.textBaseline = "middle", se.fillStyle = A, se.font = `600 ${bt}px system-ui, sans-serif`, se.fillText(Ot, Ee, ln + U * Xe);
      }
    }
    function u(S, C, P) {
      const $ = Math.ceil(Math.sqrt(P * S / C));
      return Math.floor($ * C / S) * $ < P ? C / Math.ceil($ * C / S) : S / $;
    }
    function c(S, C, P, $) {
      const I = Math.max(u(S, C, $), u(C, S, $));
      let w = Math.max(1, Math.floor(S / I));
      const M = Math.ceil($ / w);
      return w = Math.ceil($ / M), { xCount: w, yCount: M, cellW: S / w - P + P / w, cellH: C / M - P + P / M };
    }
    const d = E(
      () => t.series && t.series.length > 0 ? t.series : [{ label: t.title ?? "", value: t.value ?? 0, activeColorOverride: t.activeColorOverride }]
    ), f = E(() => d.value.length), p = E(() => t.thresholds && t.thresholds.length > 0 ? t.thresholds : []), v = E(() => t.thresholdBaseColor ?? "#52c41a"), g = E(() => {
      const S = o.value.w, C = o.value.h;
      return S <= 0 || C <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: f.value, yCount: 1, cellW: (S - Yv * (f.value - 1)) / f.value, cellH: C } : t.orientation === "vertical" ? { xCount: 1, yCount: f.value, cellW: S, cellH: (C - Yv * (f.value - 1)) / f.value } : c(S, C, Yv, f.value);
    });
    At(() => {
      n.value && (i = new ResizeObserver((S) => {
        const C = S[0].contentRect;
        o.value = { w: C.width, h: C.height };
      }), i.observe(n.value));
    }), Vo(() => {
      i?.disconnect();
    });
    const m = le({});
    function x() {
      Yt(() => {
        for (let S = 0; S < d.value.length; S++) {
          const C = m.value[S];
          if (!C)
            continue;
          const P = d.value[S];
          s(
            C,
            P.value,
            t.min,
            t.max,
            t.unit,
            p.value,
            v.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,
            P.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
    ], x, { deep: !0, immediate: !0 }), (S, C) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: n,
      style: Ht([{ width: "100%", height: "100%", display: "grid", gap: "2px" }, {
        gridTemplateColumns: `repeat(${g.value.xCount}, 1fr)`,
        gridTemplateRows: `repeat(${g.value.yCount}, 1fr)`
      }])
    }, [
      (ne(!0), xe(Je, null, Ut(d.value, (P, $) => (ne(), xe("div", {
        key: `${P.label}-${$}`,
        style: { width: "100%", height: "100%", display: "flex", "flex-direction": "column", overflow: "hidden" }
      }, [
        F("canvas", {
          ref_for: !0,
          ref: (I) => {
            I && (m.value[$] = I);
          },
          style: { flex: "1", width: "100%", height: "0", display: "block", "min-height": "0" }
        }, null, 512),
        f.value > 1 && P.label ? (ne(), xe("div", pae, oe(P.label), 1)) : nt("", !0)
      ]))), 128))
    ], 4));
  }
}), gae = { class: "w-full h-full flex flex-col overflow-hidden" }, vae = {
  key: 0,
  style: { "flex-shrink": "0", padding: "2px 4px", overflow: "auto", "max-height": "140px" }
}, mae = /* @__PURE__ */ be({
  __name: "HistogramPanel",
  props: {
    seriesValues: {},
    seriesLabels: {},
    bucketSize: {},
    bucketCount: {},
    bucketOffset: {},
    combineSeries: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    lineWidth: { default: 1 },
    fillOpacity: { default: 80 },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    unit: { default: "" }
  },
  setup(e) {
    const t = e;
    function n(f, p) {
      const v = f.filter((_) => Number.isFinite(_));
      if (v.length === 0)
        return { bucketStarts: [], counts: [] };
      const g = v.reduce((_, N) => Math.min(_, N), 1 / 0), m = v.reduce((_, N) => Math.max(_, N), -1 / 0), x = m - g || 1, S = p.bucketOffset ?? 0, C = p.bucketCount ?? 30, P = p.bucketSize ?? x / C, $ = Math.floor((g - S) / P) * P + S, I = [], w = [];
      let M = $;
      for (; M <= m; )
        I.push(M), w.push(0), M += P;
      for (const _ of v) {
        const N = Math.floor((_ - $) / P), R = Math.min(N, w.length - 1);
        R >= 0 && w[R]++;
      }
      return { bucketStarts: I, counts: w };
    }
    const o = E(() => {
      const f = { bucketSize: t.bucketSize, bucketCount: t.bucketCount, bucketOffset: t.bucketOffset };
      if (t.combineSeries || t.seriesValues.length === 0) {
        const { bucketStarts: m, counts: x } = n(t.seriesValues.flat(), f);
        return { bucketStarts: m, countSeries: [x], labels: ["combined"] };
      }
      const { bucketStarts: p } = n(t.seriesValues.flat(), f), v = p.length > 1 ? p[1] - p[0] : void 0, g = t.seriesValues.map((m) => {
        const { counts: x } = n(m, { ...f, bucketSize: v });
        return Array.from({ length: p.length }, (S, C) => x[C] ?? 0);
      });
      return { bucketStarts: p, countSeries: g, labels: t.seriesLabels };
    }), i = E(() => {
      const { countSeries: f, labels: p } = o.value, v = new Ik({ id: "histogram" });
      v.addScale({ scaleKey: "x", time: !1 }), v.addScale({ scaleKey: "y", auto: !0 }), v.addAxis({
        scaleKey: "x",
        side: 2,
        stroke: "#666",
        grid: { show: !1 },
        isTimeAxis: !1
      }), v.addAxis({
        scaleKey: "y",
        side: 3,
        stroke: "#666",
        grid: { show: !0, stroke: "rgba(128,128,128,0.15)", width: 1 },
        size: 50,
        isDarkMode: !0,
        yAxisUnit: t.unit
      });
      const g = BO(
        t.colorScheme,
        f.length,
        t.colorDistribution ?? "sequential",
        t.colorSingleValue
      ), m = {};
      p.forEach((S, C) => {
        m[S] = g[C % g.length];
      });
      const x = Math.round(t.fillOpacity / 100 * 255).toString(16).padStart(2, "0");
      return f.forEach((S, C) => {
        const P = g[C % g.length];
        v.addSeries({
          scaleKey: "y",
          label: p[C] ?? `series-${C + 1}`,
          drawStyle: Xr.Histogram,
          lineColor: P,
          lineWidth: t.lineWidth,
          fillColor: `${P}${x}`,
          fillOpacity: t.fillOpacity,
          fillMode: Yc.Solid,
          colorMapping: m,
          isDarkMode: !0
        });
      }), v;
    }), r = E(() => {
      const { bucketStarts: f, countSeries: p } = o.value;
      return [f, ...p];
    }), a = le(), l = le({ width: 0, height: 0 }), s = le(null);
    let u = null;
    At(() => {
      const f = a.value;
      f && (u = new ResizeObserver((p) => {
        const { width: v, height: g } = p[0].contentRect;
        v > 0 && g > 0 && (l.value = { width: Math.floor(v), height: Math.floor(g) });
      }), u.observe(f), requestAnimationFrame(() => {
        const { width: p, height: v } = f.getBoundingClientRect();
        p > 0 && v > 0 && (l.value = { width: Math.floor(p), height: Math.floor(v) });
      }));
    }), qt(() => u?.disconnect());
    const c = E(
      () => !t.combineSeries && o.value.countSeries.length > 1
    ), d = E(() => Math.max(l.value.height, 50));
    return (f, p) => (ne(), xe("div", gae, [
      F("div", {
        ref_key: "chartAreaRef",
        ref: a,
        class: "flex-1 min-h-0 min-w-0 relative overflow-hidden"
      }, [
        l.value.width > 0 && l.value.height > 0 ? (ne(), dt(CE, {
          key: 0,
          config: i.value,
          data: r.value,
          width: l.value.width,
          height: d.value,
          onPlotReady: p[0] || (p[0] = (v) => s.value = v)
        }, {
          default: he(() => [
            h(wE, {
              "u-plot-instance": s.value,
              unit: e.unit,
              "can-pin-tooltip": !0,
              "tooltip-mode": e.tooltipMode,
              "tooltip-sort": e.tooltipSort
            }, null, 8, ["u-plot-instance", "unit", "tooltip-mode", "tooltip-sort"])
          ]),
          _: 1
        }, 8, ["config", "data", "width", "height"])) : nt("", !0)
      ], 512),
      c.value ? (ne(), xe("div", vae, [
        h(yE, {
          items: i.value.getLegendItems(),
          "u-plot-instance": s.value,
          position: "bottom",
          mode: "list",
          values: [],
          data: r.value,
          unit: e.unit
        }, null, 8, ["items", "u-plot-instance", "data", "unit"])
      ])) : nt("", !0)
    ]));
  }
}), bae = ["width", "height"], yae = ["d", "fill", "stroke", "opacity", "onMousemove"], xae = ["x", "y"], wae = ["onClick"], Sae = { style: { width: "100%", "border-collapse": "collapse" } }, Cae = ["onClick"], $ae = { class: "flex items-center gap-1" }, Pae = {
  class: "overflow-hidden text-ellipsis whitespace-nowrap",
  style: { "max-width": "80px" }
}, Oae = { class: "flex items-center gap-1.5" }, kae = /* @__PURE__ */ be({
  __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 = ta(), o = le(), i = le({ width: 0, height: 0 });
    let r = null;
    At(() => {
      if (!o.value)
        return;
      r = new ResizeObserver((q) => {
        const { width: U, height: ae } = q[0].contentRect;
        i.value = { width: Math.floor(U), height: Math.floor(ae) };
      }), r.observe(o.value);
      const { width: W, height: K } = o.value.getBoundingClientRect();
      i.value = { width: Math.floor(W), height: Math.floor(K) };
    }), qt(() => {
      r?.disconnect();
    });
    const a = E(() => n.isDark), l = E(() => a.value ? "#d9d9d9" : "#141414"), s = E(() => a.value ? "#8c8c8c" : "#595959"), u = E(() => a.value ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"), c = E(() => a.value ? "rgba(0,0,0,0.6)" : "rgba(255,255,255,0.8)"), d = E(() => {
      const W = t.legendValues.length > 0;
      return t.legendMode === "table" ? W ? 120 + t.legendValues.length * 64 : 160 : 140;
    }), f = E(
      () => t.legendPosition === "bottom" ? t.legendMode === "table" ? Math.min(t.slices.length * 24 + 28, 120) : 28 : 0
    ), p = E(() => t.legendPosition === "right" ? d.value : 0), v = E(() => Math.max(i.value.width - p.value, 10)), g = E(() => Math.max(i.value.height - f.value, 10)), m = E(() => v.value / 2), x = E(() => g.value / 2), S = E(() => Math.min(m.value, x.value) * 0.85), C = E(() => t.pieType === "donut" ? S.value * 0.55 : 0), P = le(null), $ = le({ x: 0, y: 0 }), I = le(/* @__PURE__ */ new Set()), w = E(() => t.slices.filter((W) => !I.value.has(W.label))), M = E(() => w.value.reduce((W, K) => W + K.value, 0));
    function _(W, K, q, U) {
      const ae = (U - 90) * Math.PI / 180;
      return { x: W + q * Math.cos(ae), y: K + q * Math.sin(ae) };
    }
    function N(W, K, q, U, ae, se) {
      const re = Math.min(se - ae, 359.9999), ie = re > 180 ? 1 : 0, te = _(W, K, q, ae), ve = _(W, K, q, ae + re);
      if (U <= 0)
        return [
          `M ${W} ${K}`,
          `L ${te.x} ${te.y}`,
          `A ${q} ${q} 0 ${ie} 1 ${ve.x} ${ve.y}`,
          "Z"
        ].join(" ");
      const ce = _(W, K, U, ae + re), fe = _(W, K, U, ae);
      return [
        `M ${te.x} ${te.y}`,
        `A ${q} ${q} 0 ${ie} 1 ${ve.x} ${ve.y}`,
        `L ${ce.x} ${ce.y}`,
        `A ${U} ${U} 0 ${ie} 0 ${fe.x} ${fe.y}`,
        "Z"
      ].join(" ");
    }
    const R = E(() => {
      const W = M.value;
      if (W === 0 || i.value.width === 0)
        return [];
      let K = 0;
      return w.value.map((q) => {
        const U = q.value / W * 360, ae = q.value / W * 100, se = K;
        K += U;
        const re = K, ie = se + U / 2, te = (S.value + C.value) / 2 || S.value * 0.65, ve = _(m.value, x.value, te, ie), ce = N(m.value, x.value, S.value, C.value, se, re);
        return { ...q, angle: U, pct: ae, startAngle: se, endAngle: re, midAngle: ie, labelPos: ve, path: ce };
      });
    });
    function H(W) {
      const K = W.toFixed(t.decimals);
      return t.unit ? `${K} ${t.unit}` : K;
    }
    function L(W, K) {
      return W.rawValues && W.rawValues.length > 0 ? zc(W.rawValues, K) : W.value;
    }
    function B(W) {
      const K = new Set(I.value);
      if (K.has(W))
        K.delete(W);
      else {
        if (t.slices.filter((U) => !K.has(U.label)).length <= 1)
          return;
        K.add(W);
      }
      I.value = K;
    }
    function A(W, K) {
      P.value = K;
      const q = o.value?.getBoundingClientRect();
      q && ($.value = { x: W.clientX - q.left, y: W.clientY - q.top });
    }
    function G() {
      P.value = null;
    }
    const j = E(() => {
      if (!P.value || t.tooltipMode === "none")
        return [];
      const W = M.value;
      if (t.tooltipMode === "single") {
        const q = w.value.find((U) => U.label === P.value);
        return q ? [{ ...q, percent: W > 0 ? q.value / W * 100 : 0 }] : [];
      }
      let K = w.value.map((q) => ({ ...q, percent: W > 0 ? q.value / W * 100 : 0 }));
      return t.tooltipSort === "desc" && (K = [...K].sort((q, U) => U.value - q.value)), t.tooltipSort === "asc" && (K = [...K].sort((q, U) => q.value - U.value)), K;
    }), Z = E(() => {
      const W = t.tooltipMode === "multi" ? 180 : 140, K = t.tooltipMode === "multi" ? j.value.length * 22 + 32 : 72, q = Math.min($.value.x + 14, i.value.width - W - 4), U = Math.min($.value.y - 8, i.value.height - K - 4);
      return { left: Math.max(4, q), top: Math.max(4, U) };
    });
    return (W, K) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: o,
      class: "w-full h-full relative overflow-hidden",
      style: Ht({
        display: "flex",
        flexDirection: e.legendPosition === "bottom" ? "column" : "row"
      })
    }, [
      i.value.width > 0 ? (ne(), xe("svg", {
        key: 0,
        width: v.value,
        height: g.value,
        style: { "flex-shrink": "0" }
      }, [
        (ne(!0), xe(Je, null, Ut(R.value, (q) => (ne(), xe("g", {
          key: q.label
        }, [
          q.angle > 0.3 ? (ne(), xe("path", {
            key: 0,
            d: q.path,
            fill: q.color,
            stroke: c.value,
            "stroke-width": "1.5",
            opacity: P.value && P.value !== q.label ? 0.6 : 1,
            style: { cursor: "pointer", transition: "opacity 0.15s" },
            onMousemove: (U) => A(U, q.label),
            onMouseleave: G
          }, null, 40, yae)) : nt("", !0),
          e.pieLabels.length > 0 && q.angle > 20 ? (ne(), xe("text", {
            key: 1,
            x: q.labelPos.x,
            y: q.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)" }
          }, oe([
            e.pieLabels.includes("name") ? q.label : null,
            e.pieLabels.includes("percent") ? `${q.pct.toFixed(1)}%` : null,
            e.pieLabels.includes("value") ? H(q.value) : null
          ].filter(Boolean).join(" ")), 9, xae)) : nt("", !0)
        ]))), 128))
      ], 8, bae)) : nt("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "list" ? (ne(), xe("div", {
        key: 1,
        style: Ht({
          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" ? `${p.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0
        })
      }, [
        (ne(!0), xe(Je, null, Ut(e.slices, (q) => (ne(), xe("div", {
          key: q.label,
          class: "flex items-center gap-1 text-xs whitespace-nowrap cursor-pointer select-none",
          style: Ht({
            color: l.value,
            opacity: I.value.has(q.label) ? 0.35 : 1,
            textDecoration: I.value.has(q.label) ? "line-through" : "none"
          }),
          onClick: (U) => B(q.label)
        }, [
          F("span", {
            class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
            style: Ht({ background: q.color })
          }, null, 4),
          F("span", null, oe(q.label), 1),
          e.legendValues.length > 0 ? (ne(), xe("span", {
            key: 0,
            class: "ml-1",
            style: Ht({ color: s.value })
          }, oe(e.legendValues.map((U) => H(L(q, U))).join(" / ")), 5)) : nt("", !0)
        ], 12, wae))), 128))
      ], 4)) : nt("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "table" ? (ne(), xe("div", {
        key: 2,
        style: Ht({
          width: e.legendPosition === "right" ? `${p.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0,
          overflowY: "auto",
          flexShrink: 0,
          fontSize: "11px"
        })
      }, [
        F("table", Sae, [
          F("thead", null, [
            F("tr", null, [
              F("th", {
                style: Ht({ textAlign: "left", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Name ", 4),
              F("th", {
                style: Ht({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Value ", 4),
              (ne(!0), xe(Je, null, Ut(e.legendValues, (q) => (ne(), xe("th", {
                key: q,
                style: Ht({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}`, minWidth: "56px" })
              }, oe(q.charAt(0).toUpperCase() + q.slice(1)), 5))), 128))
            ])
          ]),
          F("tbody", null, [
            (ne(!0), xe(Je, null, Ut(e.slices, (q) => (ne(), xe("tr", {
              key: q.label,
              class: "cursor-pointer select-none",
              style: Ht({ opacity: I.value.has(q.label) ? 0.35 : 1 }),
              onClick: (U) => B(q.label)
            }, [
              F("td", {
                style: Ht({ padding: "2px 6px", color: l.value })
              }, [
                F("div", $ae, [
                  F("span", {
                    class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
                    style: Ht({ background: q.color })
                  }, null, 4),
                  F("span", Pae, oe(q.label), 1)
                ])
              ], 4),
              F("td", {
                style: Ht({ textAlign: "right", padding: "2px 6px", color: l.value, fontVariantNumeric: "tabular-nums" })
              }, oe(H(q.value)), 5),
              (ne(!0), xe(Je, null, Ut(e.legendValues, (U) => (ne(), xe("td", {
                key: U,
                style: Ht({ textAlign: "right", padding: "2px 6px", color: s.value, fontVariantNumeric: "tabular-nums" })
              }, oe(H(L(q, U))), 5))), 128))
            ], 12, Cae))), 128))
          ])
        ])
      ], 4)) : nt("", !0),
      P.value && e.tooltipMode !== "none" && j.value.length > 0 ? (ne(), xe("div", {
        key: 3,
        class: "absolute z-50 pointer-events-none rounded shadow-lg text-xs",
        style: Ht({
          left: `${Z.value.left}px`,
          top: `${Z.value.top}px`,
          background: a.value ? "#1f1f1f" : "#fff",
          border: a.value ? "1px solid #333" : "1px solid #e8e8e8",
          minWidth: "140px"
        })
      }, [
        F("div", {
          class: "px-2 pt-1.5 pb-0 text-xs font-medium",
          style: Ht({ color: a.value ? "#d9d9d9" : "#141414" })
        }, oe(e.tooltipMode === "multi" ? `${H(M.value)} total` : j.value[0]?.label), 5),
        F("div", {
          class: "border-t my-1",
          style: Ht({ borderColor: a.value ? "#333" : "#e8e8e8" })
        }, null, 4),
        (ne(!0), xe(Je, null, Ut(j.value, (q) => (ne(), xe("div", {
          key: q.label,
          class: "px-2 py-0.5 flex items-center justify-between gap-2"
        }, [
          F("div", Oae, [
            F("span", {
              class: "inline-block w-2 h-2 rounded-sm",
              style: Ht({ background: q.color })
            }, null, 4),
            F("span", {
              style: Ht({ color: a.value ? "#d9d9d9" : "#141414" })
            }, oe(e.tooltipMode === "multi" ? q.label : `${q.percent.toFixed(1)}%`), 5)
          ]),
          F("span", {
            class: "font-mono",
            style: Ht({ color: q.color })
          }, oe(H(q.value)), 5)
        ]))), 128))
      ], 4)) : nt("", !0)
    ], 4));
  }
}), Wf = 36, os = 1.2, $P = 1, Iae = /* @__PURE__ */ be({
  __name: "StatPanel",
  props: {
    title: {},
    unit: {},
    series: {},
    trend: {},
    thresholds: {},
    thresholdBaseColor: {},
    orientation: {},
    textMode: {},
    colorMode: {}
  },
  setup(e) {
    const t = e, n = ta(), o = le(), i = le({ w: 0, h: 0 });
    let r = null;
    const a = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function l(P) {
      return P >= 1e6 ? `${(P / 1e6).toFixed(1)}M` : P >= 1e3 ? `${(P / 1e3).toFixed(1)}K` : P % 1 === 0 ? String(P) : P.toFixed(1);
    }
    function s(P, $, I, w) {
      const M = I ?? w ?? a[0];
      if ($ && $.length > 0) {
        let _ = M;
        for (const N of $)
          P >= N.value && (_ = N.color);
        return _;
      }
      return M;
    }
    function u(P, $) {
      if (P.startsWith("rgb("))
        return P.replace("rgb(", "rgba(").replace(")", `, ${$})`);
      if (P.startsWith("rgba("))
        return P.replace(/,\s*[\d.]+\)$/, `, ${$})`);
      const I = P.replace("#", ""), w = I.length === 3 ? I.split("").map((R) => R + R).join("") : I.slice(0, 6), M = Number.parseInt(w.slice(0, 2), 16), _ = Number.parseInt(w.slice(2, 4), 16), N = Number.parseInt(w.slice(4, 6), 16);
      return `rgba(${M}, ${_}, ${N}, ${$})`;
    }
    function c(P, $, I) {
      switch ($) {
        case "background_solid":
          return Dt(P).toString();
        case "background": {
          const w = I ? 1 : -0.7, M = Dt(P).darken(15 * w).spin(8).toRgbString(), _ = Dt(P).darken(5 * w).spin(-8).toRgbString();
          return `linear-gradient(120deg, ${M}, ${_})`;
        }
        default:
          return "transparent";
      }
    }
    function d(P) {
      return Dt(P).isLight() ? "#1a1a1a" : "#ffffff";
    }
    function f(P, $, I) {
      if (P === 0 || $ === 0)
        return { isWide: !1, showSparkline: !1, valueFontSize: 24, titleFontSize: 12, chartHeight: 0, padding: 8 };
      const w = $ > 100 ? 12 : 8, M = P - w * 2, _ = $ - w * 2, N = P / $ > 2.5, R = I && (N ? $ > 50 : $ > 100), H = Math.max(10, Math.min(13, _ * (N ? 0.22 : 0.18)));
      let L, B = 0;
      if (N)
        L = R ? Math.min(_ * 0.62, M * 0.42, Wf) : Math.min(_ * 0.7, M * 0.38, Wf), R && (B = $ * 0.5);
      else {
        const A = H * os;
        L = Math.min(R ? (_ - A) * 0.65 : (_ - A) * 0.85, M * 0.9, Wf), R && (B = Math.max(0, Math.min($ - H * os - L * os - w, $ * 0.5)));
      }
      return {
        isWide: N,
        showSparkline: R,
        valueFontSize: Math.max(11, L),
        titleFontSize: H,
        chartHeight: B,
        padding: w
      };
    }
    function p(P, $, I) {
      const w = Math.ceil(Math.sqrt(I * P / $));
      return Math.floor(w * $ / P) * w < I ? $ / Math.ceil(w * $ / P) : P / w;
    }
    function v(P, $, I, w) {
      const M = Math.max(p(P, $, w), p($, P, w));
      let _ = Math.max(1, Math.floor(P / M));
      const N = Math.ceil(w / _);
      return _ = Math.ceil(w / N), {
        xCount: _,
        yCount: N,
        cellW: P / _ - I + I / _,
        cellH: $ / N - I + I / N
      };
    }
    function g(P, $, I) {
      const w = P.getContext("2d");
      if (!w)
        return;
      const M = window.devicePixelRatio || 1, _ = P.getBoundingClientRect();
      if (_.width === 0 || _.height === 0)
        return;
      P.width = _.width * M, P.height = _.height * M, w.scale(M, M);
      const N = _.width, R = _.height, H = $.reduce((j, Z) => Math.min(j, Z), 1 / 0), B = $.reduce((j, Z) => Math.max(j, Z), -1 / 0) - H || 1;
      w.clearRect(0, 0, N, R);
      const A = w.createLinearGradient(0, 0, 0, R);
      A.addColorStop(0, u(I, 0.25)), A.addColorStop(1, u(I, 0));
      const G = $.map((j, Z) => ({
        x: Z / ($.length - 1) * N,
        y: R - 2 - (j - H) / B * (R - 4)
      }));
      w.beginPath(), G.forEach(({ x: j, y: Z }, W) => W === 0 ? w.moveTo(j, Z) : w.lineTo(j, Z)), w.lineTo(N, R), w.lineTo(0, R), w.fillStyle = A, w.fill(), w.beginPath(), G.forEach(({ x: j, y: Z }, W) => W === 0 ? w.moveTo(j, Z) : w.lineTo(j, Z)), w.strokeStyle = I, w.lineWidth = 1.5, w.stroke();
    }
    const m = E(() => Math.max(t.series.length, 1)), x = E(() => {
      const P = i.value.w, $ = i.value.h;
      return P <= 0 || $ <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: 1, yCount: m.value, cellW: P, cellH: ($ - $P * (m.value - 1)) / m.value } : v(P, $, $P, m.value);
    }), S = E(() => n.isDark ? "#303030" : "#fff");
    At(() => {
      o.value && (r = new ResizeObserver((P) => {
        const $ = P[0].contentRect;
        (i.value.w !== $.width || i.value.h !== $.height) && (i.value = { w: $.width, h: $.height });
      }), r.observe(o.value));
    }), Vo(() => {
      r?.disconnect();
    });
    const C = be({
      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(P) {
        const $ = le(), I = ta();
        function w() {
          Yt(() => {
            $.value && P.sparkline && P.sparkline.length > 1 && g($.value, P.sparkline, P.color ?? "#1677ff");
          });
        }
        return Ie(() => [P.sparkline, P.color, P.width, P.height], w, { immediate: !0 }), () => {
          const M = P, _ = I.isDark, N = M.sparkline != null && M.sparkline.length > 1, R = f(M.width ?? 0, M.height ?? 0, N), H = M.textMode === "value_and_name" || M.textMode === "name", L = M.textMode === "value_and_name" || M.textMode === "value", B = Math.max(10, R.valueFontSize * 0.44), A = M.colorMode === "background_solid" || M.colorMode === "background", G = A ? c(M.color ?? "#1677ff", M.colorMode ?? "value", _) : "transparent", j = A ? d(M.color ?? "#1677ff") : M.color ?? "#d9d9d9", Z = A ? j : "#888", W = A ? j : "#666", K = M.percentChange != null ? (M.percentChange > 0 ? "+" : "") + M.percentChange.toLocaleString(void 0, { style: "percent", minimumFractionDigits: 1, maximumFractionDigits: 2 }) : null, q = M.percentChange != null ? M.percentChange > 0 ? "#52c41a" : M.percentChange < 0 ? "#ff4d4f" : "#888" : "", U = M.percentChange != null ? M.percentChange > 0 ? "↑" : M.percentChange < 0 ? "↓" : "" : "", ae = M.mappedLabel ?? l(M.value ?? 0), se = [
            ko("span", {
              style: {
                color: j,
                fontSize: `${R.valueFontSize}px`,
                fontWeight: 500,
                fontFamily: "monospace",
                lineHeight: os
              }
            }, ae)
          ];
          M.mappedLabel || se.push(ko("span", {
            style: { color: W, fontSize: `${B}px`, lineHeight: os }
          }, M.unit)), K && se.push(ko("span", {
            style: { color: q, fontSize: `${B}px`, marginLeft: "2px", lineHeight: os }
          }, `${U}${K}`));
          const re = H ? ko("div", {
            style: {
              color: Z,
              fontSize: `${R.titleFontSize}px`,
              lineHeight: os,
              ...R.isWide ? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } : { marginBottom: "2px" }
            }
          }, M.label) : null, ie = L ? ko("div", {
            style: {
              display: "flex",
              alignItems: "baseline",
              gap: R.isWide ? "3px" : "4px",
              flexWrap: "wrap"
            }
          }, se) : null, te = ko("div", {
            style: R.isWide ? { flex: 1, minWidth: 0, position: "relative", zIndex: 1 } : { position: "relative", zIndex: 1 }
          }, [re, ie]), ve = R.showSparkline ? ko("canvas", {
            ref: (fe) => {
              $.value = fe;
            },
            style: R.isWide ? { position: "absolute", right: 0, bottom: 0, left: 0, width: "100%", height: `${R.chartHeight}px`, opacity: 0.7 } : { position: "absolute", bottom: 0, left: 0, right: 0, width: "100%", height: `${R.chartHeight}px`, opacity: 0.6 }
          }) : null, ce = R.isWide ? {
            width: "100%",
            height: "100%",
            display: "flex",
            alignItems: "center",
            padding: `0 ${R.padding}px`,
            gap: "8px",
            overflow: "hidden",
            position: "relative",
            background: G
          } : {
            width: "100%",
            height: "100%",
            display: "flex",
            flexDirection: "column",
            justifyContent: "center",
            padding: `${R.padding}px`,
            overflow: "hidden",
            position: "relative",
            background: G
          };
          return ko("div", { style: ce }, R.isWide ? [ve, te] : [ve, te]);
        };
      }
    });
    return (P, $) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: o,
      style: Ht([{ width: "100%", height: "100%", display: "grid", gap: "1px" }, {
        gridTemplateColumns: e.orientation === "horizontal" ? "1fr" : `repeat(${x.value.xCount}, 1fr)`,
        gridTemplateRows: e.orientation === "horizontal" ? `repeat(${m.value}, 1fr)` : `repeat(${x.value.yCount}, 1fr)`,
        background: S.value
      }])
    }, [
      (ne(!0), xe(Je, null, Ut(e.series, (I, w) => (ne(), dt(T(C), {
        key: `${I.label}-${w}`,
        label: m.value === 1 ? e.title : I.label,
        value: I.displayValue ?? (I.values.length > 0 ? I.values[I.values.length - 1] ?? 0 : 0),
        unit: I.units ?? e.unit,
        "mapped-label": I.valueMap !== void 0 ? I.valueMap[String(I.displayValue ?? (I.values.length > 0 ? I.values[I.values.length - 1] ?? 0 : 0))] : void 0,
        sparkline: I.values.length > 1 ? I.values : void 0,
        "percent-change": I.percentChange,
        "text-mode": e.textMode,
        "color-mode": e.colorMode,
        color: s(
          I.displayValue ?? I.values[I.values.length - 1] ?? 0,
          e.thresholds,
          e.thresholdBaseColor,
          a[w % a.length]
        ),
        width: x.value.cellW,
        height: x.value.cellH
      }, null, 8, ["label", "value", "unit", "mapped-label", "sparkline", "percent-change", "text-mode", "color-mode", "color", "width", "height"]))), 128))
    ], 4));
  }
}), Mae = {
  key: 0,
  class: "flex-center h-full text-secondary"
}, Tae = {
  key: 1,
  class: "flex-center h-full"
}, _ae = {
  key: 2,
  class: "flex-center h-full text-red-500 text-xs"
}, Eae = {
  key: 3,
  class: "w-full h-full relative"
}, Dae = {
  key: 0,
  class: "absolute inset-0 z-10 flex items-center justify-center",
  style: { "backdrop-filter": "blur(1px)", "border-radius": "4px" }
}, Aae = {
  key: 0,
  class: "w-full h-full"
}, Rae = {
  key: 0,
  class: "w-full h-full overflow-auto"
}, Ub = /* @__PURE__ */ be({
  __name: "PanelRenderer",
  props: {
    panelId: {},
    panelConfig: { default: void 0 }
  },
  setup(e) {
    const t = e, n = aa(), { t: o } = sn(), i = E(() => t.panelConfig ?? n.panels[t.panelId]);
    let r = null;
    const a = le(null), l = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function s($, I) {
      u();
      const w = $.seriesCount ?? 1, M = zO(
        { from: I.from / 1e3, to: I.to / 1e3 },
        15,
        w,
        $.pattern,
        $.labels
      ), _ = Array.from({ length: w }, (R, H) => 20 + (H * 37 + 13) % 60), N = Array.from({ length: w }, (R, H) => 10 + (H * 53 + 7) % 40);
      a.value = {
        timestamps: [...M.timestamps],
        seriesValues: M.series.map((R) => [...R.values])
      }, r = setInterval(() => {
        const R = a.value;
        if (!R)
          return;
        const H = Math.floor(Date.now() / 1e3), L = [...R.timestamps.slice(1), H], B = R.seriesValues.map((A, G) => {
          const j = A[A.length - 1], Z = Nz(j, _[G], N[G] * 0.1, N[G] + _[G] * 1.8);
          return [...A.slice(1), Z];
        });
        a.value = { timestamps: L, seriesValues: B };
      }, 1e3);
    }
    function u() {
      r && (clearInterval(r), r = null), a.value = null;
    }
    Vo(u);
    const c = E(() => {
      const $ = i.value;
      return $ ? $.queries.some((I) => I.enabled !== !1 && I.dataSource?.type === "mock" && I.dataSource?.pattern === "live") : !1;
    });
    Ie([i, () => n.timeRange], () => {
      const $ = i.value;
      if (!$ || !c.value) {
        u();
        return;
      }
      const I = $.queries.find((w) => w.enabled !== !1 && w.dataSource?.type === "mock" && w.dataSource?.pattern === "live");
      I && s(I.dataSource, n.timeRange);
    }, { immediate: !0, deep: !0 });
    const d = E(() => {
      const $ = i.value;
      return $ ? $.queries.filter((I) => I.enabled !== !1 && !(I.dataSource?.type === "mock" && I.dataSource?.pattern === "live")) : [];
    }), { response: f, loading: p, error: v } = uE(
      () => d.value,
      () => n.timeRange,
      1e3,
      () => n.panelRefreshKeys[t.panelId]
    );
    function g($) {
      return typeof $?.toArray == "function" ? $.toArray() : Array.isArray($) ? $ : [];
    }
    function m($, I) {
      if (!$ || $.data.length === 0)
        return null;
      if (I.type === "timeseries" || I.type === "bar") {
        const w = g($.data[0].fields[0]?.values), M = $.data.flatMap(
          (_) => _.fields.filter((N) => N.type === "number").map((N) => ({
            label: N.config?.displayNameFromDS ?? N.name,
            values: g(N.values)
          }))
        );
        return { timestamps: w.map((_) => _ / 1e3), series: M };
      }
      if (I.type === "histogram") {
        const w = $.data.flatMap(
          (_) => _.fields.filter((N) => N.type === "number").map((N) => g(N.values))
        ), M = $.data.flatMap(
          (_) => _.fields.filter((N) => N.type === "number").map((N) => N.config?.displayNameFromDS ?? N.name)
        );
        return { seriesValues: w, seriesLabels: M };
      }
      if (I.type === "stat" || I.type === "gauge") {
        const w = $.data.flatMap(
          (M) => M.fields.filter((_) => _.type === "number").map((_) => {
            const N = g(_.values);
            return {
              label: _.config?.displayNameFromDS ?? _.name,
              values: N,
              displayValue: zc(N, I.statReducer ?? "lastNotNull"),
              percentChange: I.showPercentChange ? uf(N) : void 0
            };
          })
        );
        return {
          series: w,
          value: w[0]?.values[w[0].values.length - 1] ?? 0,
          values: w.map((M) => M.values[M.values.length - 1] ?? 0),
          unit: I.unit ?? I.statUnit ?? "",
          trend: I.statTrend ?? "flat",
          percentChange: I.showPercentChange ? uf(w[0]?.values ?? []) : void 0
        };
      }
      if (I.type === "pie")
        return $.data.flatMap(
          (w, M) => w.fields.filter((_) => _.type === "number").map((_, N) => ({
            label: _.config?.displayNameFromDS ?? _.name,
            value: zc(g(_.values), I.statReducer ?? "lastNotNull"),
            color: l[(M + N) % l.length],
            rawValues: g(_.values)
          }))
        );
      if (I.type === "table") {
        const w = $.data[0], M = w.fields.map((R) => ({
          key: R.name,
          title: R.config?.displayNameFromDS ?? R.name,
          dataIndex: R.name
        })), _ = g(w.fields[0]?.values).length, N = Array.from({ length: _ }, (R, H) => {
          const L = { key: H };
          return w.fields.forEach((B) => {
            const A = g(B.values)[H];
            L[B.name] = B.type === "time" ? new Date(A).toLocaleString() : A;
          }), L;
        });
        return { columns: M, dataSource: N };
      }
      return null;
    }
    const x = E(() => {
      const $ = i.value;
      return $ ? m(f.value, $) : null;
    }), S = E(() => {
      const $ = a.value, I = i.value;
      return !$ || !I ? null : I.type === "timeseries" ? {
        timestamps: $.timestamps,
        series: $.seriesValues.map((w, M) => ({ label: `series-${M + 1}`, values: w }))
      } : I.type === "stat" || I.type === "gauge" ? {
        series: $.seriesValues.map((M, _) => ({
          label: `series-${_ + 1}`,
          values: M,
          displayValue: zc(M, I.statReducer ?? "lastNotNull"),
          percentChange: I.showPercentChange ? uf(M) : void 0
        })),
        value: $.seriesValues[0]?.[$.seriesValues[0].length - 1] ?? 0,
        values: $.seriesValues.map((M) => M[M.length - 1] ?? 0),
        unit: I.statUnit ?? "",
        trend: I.statTrend ?? "flat",
        percentChange: I.showPercentChange ? uf($.seriesValues[0] ?? []) : void 0
      } : I.type === "pie" ? $.seriesValues.map((w, M) => ({
        label: `series-${M + 1}`,
        value: zc(w, I.statReducer ?? "lastNotNull"),
        color: l[M % l.length],
        rawValues: w
      })) : I.type === "histogram" ? {
        seriesValues: $.seriesValues,
        seriesLabels: $.seriesValues.map((w, M) => `series-${M + 1}`)
      } : null;
    }), C = E(() => S.value ?? x.value), P = be({
      name: "NoDataPlaceholder",
      setup() {
        const { t: $ } = sn();
        return () => ko("div", { class: "flex flex-col items-center justify-center h-full gap-1.5 text-gray-400 select-none" }, [
          ko("span", { class: [mt.databaseOff, "text-7", "opacity-50"] }),
          ko("span", { class: "text-xs" }, $("panel.noData"))
        ]);
      }
    });
    return ($, I) => i.value ? T(p) && !a.value ? (ne(), xe("div", Tae, [
      h(T(Xo))
    ])) : T(v) ? (ne(), xe("div", _ae, oe(T(v)), 1)) : (ne(), xe("div", Eae, [
      T(p) && a.value ? (ne(), xe("div", Dae, [
        h(T(Xo))
      ])) : nt("", !0),
      i.value.type === "timeseries" ? (ne(), xe(Je, { key: 1 }, [
        C.value && C.value.series?.length > 0 ? (ne(), xe("div", Aae, [
          h($E, {
            data: C.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"])
        ])) : (ne(), dt(T(P), { key: 1 }))
      ], 64)) : i.value.type === "bar" ? (ne(), xe(Je, { key: 2 }, [
        C.value && C.value.series?.length > 0 ? (ne(), dt(fae, {
          key: 0,
          data: C.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"])) : (ne(), dt(T(P), { key: 1 }))
      ], 64)) : i.value.type === "stat" ? (ne(), xe(Je, { key: 3 }, [
        C.value ? (ne(), dt(Iae, {
          key: 0,
          title: i.value.title,
          unit: C.value.unit,
          series: C.value.series,
          trend: C.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"])) : (ne(), dt(T(P), { key: 1 }))
      ], 64)) : i.value.type === "gauge" ? (ne(), xe(Je, { key: 4 }, [
        C.value ? (ne(), dt(hae, {
          key: 0,
          series: C.value.series?.map((w, M) => ({
            label: w.label,
            value: w.displayValue ?? w.values[w.values.length - 1] ?? 0,
            activeColorOverride: l[M % l.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"])) : (ne(), dt(T(P), { key: 1 }))
      ], 64)) : i.value.type === "table" ? (ne(), xe(Je, { key: 5 }, [
        C.value ? (ne(), xe("div", Rae, [
          h(T(FJ), {
            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"])
        ])) : (ne(), dt(T(P), { key: 1 }))
      ], 64)) : i.value.type === "pie" ? (ne(), xe(Je, { key: 6 }, [
        C.value && C.value.length > 0 ? (ne(), dt(kae, {
          key: 0,
          slices: C.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"])) : (ne(), dt(T(P), { key: 1 }))
      ], 64)) : i.value.type === "histogram" ? (ne(), xe(Je, { key: 7 }, [
        C.value && C.value.seriesValues?.length > 0 ? (ne(), dt(mae, {
          key: 0,
          "series-values": C.value.seriesValues,
          "series-labels": C.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"])) : (ne(), dt(T(P), { key: 1 }))
      ], 64)) : nt("", !0)
    ])) : (ne(), xe("div", Mae, oe(T(o)("panel.noData")), 1));
  }
}), Nae = { class: "w-full h-full flex flex-col" }, zae = { class: "flex-1 min-h-0" }, Bae = {
  key: 1,
  class: "flex-center h-full text-secondary text-sm"
}, Fae = /* @__PURE__ */ be({
  __name: "ChartPreview",
  setup(e) {
    const { panel: t } = vc(), n = E(() => {
      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) => (ne(), xe("div", Nae, [
      F("div", zae, [
        T(t).id ? (ne(), dt(Ub, {
          key: n.value,
          "panel-id": T(t).id,
          "panel-config": T(t)
        }, null, 8, ["panel-id", "panel-config"])) : (ne(), xe("div", Bae, " No preview available "))
      ])
    ]));
  }
}), Lae = { class: "w-full h-full flex flex-col" }, Hae = { class: "flex-1 min-h-0" }, Vae = /* @__PURE__ */ be({
  __name: "PanelChrome",
  setup(e) {
    const t = ta(), { panel: n } = vc(), o = E(() => t.isDark), i = E(() => o.value ? "#303030" : "#e8e8e8"), r = E(() => o.value ? "#d9d9d9" : "#141414"), a = E(() => o.value ? "#666" : "#bbb");
    return (l, s) => (ne(), xe("div", Lae, [
      F("div", {
        class: "flex items-center px-2.5 py-1.5 flex-shrink-0 gap-1.5 h-32px",
        style: Ht({ borderBottom: `1px solid ${i.value}` })
      }, [
        F("span", {
          class: "text-xs font-medium truncate",
          style: Ht({ color: r.value })
        }, oe(T(n).title || "—"), 5),
        T(n).description ? (ne(), dt(T(Lo), {
          key: 0,
          title: T(n).description,
          placement: "bottom"
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).info, "text-xs"]),
              style: Ht({ color: a.value })
            }, null, 6)
          ]),
          _: 1
        }, 8, ["title"])) : nt("", !0),
        h(bE, {
          links: T(n).links ?? [],
          "icon-color": a.value
        }, null, 8, ["links", "icon-color"])
      ], 4),
      F("div", Hae, [
        h(Fae)
      ])
    ]));
  }
}), PE = /* @__PURE__ */ be({
  __name: "TimeRangePicker",
  setup(e) {
    const { RangePicker: t } = LG, n = aa(), 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 }
    ], r = le(!1), a = Math.round((n.timeRange.to - n.timeRange.from) / 6e4), l = o.find((c) => c.minutes === a);
    function s(c) {
      const d = Date.now();
      n.setTimeRange({ from: d - c * 60 * 1e3, to: d }), r.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) => (ne(), dt(T(Jr), null, {
      default: he(() => [
        h(T(Jr).Compact, null, {
          default: he(() => [
            r.value ? (ne(), dt(T(t), {
              key: 1,
              "show-time": "",
              "allow-clear": !1,
              style: { width: "320px" },
              value: [T(yo)(T(n).timeRange.from), T(yo)(T(n).timeRange.to)],
              onChange: d[1] || (d[1] = (f) => {
                f?.[0] && f?.[1] && T(n).setTimeRange({ from: f[0].valueOf(), to: f[1].valueOf() });
              })
            }, null, 8, ["value"])) : (ne(), dt(T(Et), {
              key: 0,
              value: T(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"])),
            h(T(Bt), {
              onClick: d[2] || (d[2] = (f) => r.value = !r.value)
            }, {
              default: he(() => [
                Le(oe(r.value ? "收起" : "自定义"), 1)
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(T(Jr).Compact, null, {
          default: he(() => [
            h(T(Bt), { onClick: u }, {
              default: he(() => [
                F("span", {
                  class: Pt([T(mt).refresh, "mr-1"])
                }, null, 2),
                d[4] || (d[4] = Le(" 刷新 ", -1))
              ]),
              _: 1
            }),
            h(T(Et), {
              value: T(n).autoRefresh,
              options: i,
              "popup-match-select-width": "false",
              onChange: d[3] || (d[3] = (f) => T(n).setAutoRefresh(f))
            }, null, 8, ["value"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), jae = { class: "font-semibold mb-3" }, Wae = /* @__PURE__ */ be({
  __name: "ConstantOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = sn(), r = E(() => n.config.constantValueType ?? "string"), a = E(() => !n.config.constantValue || r.value === "number" && Number.isNaN(Number(n.config.constantValue)) ? "error" : ""), l = E(() => n.config.constantValue ? r.value === "number" && Number.isNaN(Number(n.config.constantValue)) ? i("variable.constant.value.notNumber") : "" : i("variable.constant.value.required"));
    return (s, u) => {
      const c = yn("a-form-item");
      return ne(), xe("div", null, [
        F("div", jae, oe(T(i)("variable.constant.title")), 1),
        h(c, {
          label: T(i)("variable.constant.valueType")
        }, {
          default: he(() => [
            h(T(IT), {
              value: r.value,
              onChange: u[0] || (u[0] = (d) => o("change", { constantValueType: d.target.value }))
            }, {
              default: he(() => [
                h(T(Mo), { value: "string" }, {
                  default: he(() => [
                    Le(oe(T(i)("variable.constant.valueType.string")), 1)
                  ]),
                  _: 1
                }),
                h(T(Mo), { value: "number" }, {
                  default: he(() => [
                    Le(oe(T(i)("variable.constant.valueType.number")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(c, {
          label: T(i)("variable.constant.value"),
          required: "",
          "validate-status": a.value,
          help: l.value
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.constantValue ?? "",
              placeholder: r.value === "number" ? "42" : T(i)("variable.constant.value"),
              onChange: u[1] || (u[1] = (d) => o("change", { constantValue: d.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label", "validate-status", "help"]),
        h(T(Eo), {
          checked: e.config.hideFromVariableList ?? !1,
          onChange: u[2] || (u[2] = (d) => o("change", { hideFromVariableList: d.target.checked }))
        }, {
          default: he(() => [
            Le(oe(T(i)("variable.constant.hideFromList")), 1)
          ]),
          _: 1
        }, 8, ["checked"])
      ]);
    };
  }
}), Kae = { class: "font-semibold mb-3" }, qae = {
  class: "grid mb-1",
  style: { "grid-template-columns": "1fr 1fr 32px", gap: "4px 8px" }
}, Yae = { class: "text-xs text-secondary" }, Gae = { class: "text-xs text-secondary" }, Uae = { class: "mt-3" }, Xae = { class: "mt-1" }, Qae = { class: "mt-1" }, Zae = { class: "mt-1" }, Jae = /* @__PURE__ */ be({
  __name: "CustomOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = sn();
    function r(a, l, s) {
      const u = (n.config.customOptions ?? []).map(
        (c, d) => d === a ? { ...c, [l]: s } : c
      );
      o("change", { customOptions: u });
    }
    return (a, l) => {
      const s = yn("a-form-item");
      return ne(), xe("div", null, [
        F("div", Kae, oe(T(i)("variable.custom.title")), 1),
        F("div", qae, [
          F("div", Yae, oe(T(i)("variable.custom.col.text")), 1),
          F("div", Gae, oe(T(i)("variable.custom.col.value")), 1),
          l[6] || (l[6] = F("div", null, null, -1)),
          (ne(!0), xe(Je, null, Ut(e.config.customOptions ?? [], (u, c) => (ne(), xe(Je, { key: c }, [
            h(T(kt), {
              size: "small",
              value: u.text,
              placeholder: T(i)("variable.custom.text.placeholder"),
              onChange: (d) => r(c, "text", d.target.value)
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(T(kt), {
              size: "small",
              value: u.value,
              placeholder: T(i)("variable.custom.value.placeholder"),
              onChange: (d) => r(c, "value", d.target.value)
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(T(Bt), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (d) => o("change", { customOptions: (e.config.customOptions ?? []).filter((f, p) => p !== c) })
            }, {
              default: he(() => [
                F("span", {
                  class: Pt(T(mt).delete)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ], 64))), 128))
        ]),
        h(T(Bt), {
          type: "dashed",
          size: "small",
          onClick: l[0] || (l[0] = (u) => o("change", { customOptions: [...e.config.customOptions ?? [], { text: "", value: "" }] }))
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(i)("variable.custom.addOption")), 1)
          ]),
          _: 1
        }),
        F("div", Uae, [
          h(T(Eo), {
            checked: e.config.multi,
            onChange: l[1] || (l[1] = (u) => o("change", { multi: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(i)("variable.custom.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        F("div", Xae, [
          h(T(Eo), {
            checked: e.config.includeAll,
            onChange: l[2] || (l[2] = (u) => o("change", { includeAll: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(i)("variable.custom.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        e.config.includeAll ? (ne(), dt(s, {
          key: 0,
          label: T(i)("variable.custom.allValue"),
          class: "mt-3"
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.allValue ?? "",
              placeholder: T(i)("variable.custom.allValue.placeholder"),
              onChange: l[3] || (l[3] = (u) => o("change", { allValue: u.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])) : nt("", !0),
        F("div", Qae, [
          h(T(Eo), {
            checked: e.config.allowCustomValue ?? !1,
            onChange: l[4] || (l[4] = (u) => o("change", { allowCustomValue: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(i)("variable.custom.allowCustomValue")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        F("div", Zae, [
          h(T(Eo), {
            checked: e.config.allowClear ?? !1,
            onChange: l[5] || (l[5] = (u) => o("change", { allowClear: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(i)("variable.custom.allowClear")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ])
      ]);
    };
  }
}), ele = { class: "font-semibold mb-3" }, tle = /* @__PURE__ */ be({
  __name: "DataSourceOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), i = [
      { label: "Zabbix", value: "zabbix" },
      { label: "Prometheus", value: "prometheus" },
      { label: "MySQL", value: "mysql" }
    ];
    return (r, a) => {
      const l = yn("a-form-item");
      return ne(), xe("div", null, [
        F("div", ele, oe(T(o)("variable.ds.title")), 1),
        h(l, {
          label: T(o)("variable.ds.type")
        }, {
          default: he(() => [
            h(T(Et), {
              value: e.config.dsType,
              options: i,
              placeholder: T(o)("variable.ds.type.placeholder"),
              onChange: a[0] || (a[0] = (s) => n("change", { dsType: s }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(l, {
          label: T(o)("variable.ds.filterRegex")
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.instanceFilterRegex ?? "",
              placeholder: "/regex/",
              onChange: a[1] || (a[1] = (s) => n("change", { instanceFilterRegex: s.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(l, null, {
          default: he(() => [
            h(T(Eo), {
              checked: e.config.multi,
              onChange: a[2] || (a[2] = (s) => n("change", { multi: s.target.checked }))
            }, {
              default: he(() => [
                Le(oe(T(o)("variable.ds.multi")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        }),
        h(l, null, {
          default: he(() => [
            h(T(Eo), {
              checked: e.config.includeAll,
              onChange: a[3] || (a[3] = (s) => n("change", { includeAll: s.target.checked }))
            }, {
              default: he(() => [
                Le(oe(T(o)("variable.ds.includeAll")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        })
      ]);
    };
  }
}), nle = { class: "font-semibold mb-3" }, ole = { class: "grid grid-cols-2 gap-x-4" }, ile = /* @__PURE__ */ be({
  __name: "GeneralSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), 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.datasource"), value: "datasource" },
      { label: o("variable.type.constant"), value: "constant" }
    ], r = [
      { 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 a(l) {
      n("change", {
        type: l,
        dsType: void 0,
        instanceFilterRegex: void 0,
        targetDsUid: void 0,
        queryType: void 0,
        extractRegex: void 0,
        sortMode: void 0,
        customOptions: void 0,
        allValue: void 0,
        inputWidth: void 0,
        constantValue: void 0,
        hideFromVariableList: void 0
      });
    }
    return (l, s) => {
      const u = yn("a-form-item");
      return ne(), xe("div", null, [
        F("div", nle, oe(T(o)("variable.general.title")), 1),
        F("div", ole, [
          h(u, {
            label: T(o)("variable.general.type"),
            required: "",
            "validate-status": e.config.type ? "" : "error",
            help: e.config.type ? "" : T(o)("variable.general.type.required")
          }, {
            default: he(() => [
              h(T(Et), {
                value: e.config.type,
                options: i,
                style: { width: "100%" },
                onChange: a
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label", "validate-status", "help"]),
          h(u, {
            label: T(o)("variable.general.name"),
            required: "",
            "validate-status": e.config.name ? "" : "error",
            help: e.config.name ? "" : T(o)("variable.general.name.required")
          }, {
            default: he(() => [
              h(T(kt), {
                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", "validate-status", "help"]),
          h(u, {
            label: T(o)("variable.general.label")
          }, {
            default: he(() => [
              h(T(kt), {
                value: e.config.label,
                placeholder: T(o)("variable.general.label.placeholder"),
                onChange: s[1] || (s[1] = (c) => n("change", { label: c.target.value }))
              }, null, 8, ["value", "placeholder"])
            ]),
            _: 1
          }, 8, ["label"]),
          h(u, {
            label: T(o)("variable.general.showOn")
          }, {
            default: he(() => [
              h(T(Et), {
                value: e.config.showOnDashboard ?? "label-and-value",
                options: r,
                style: { width: "100%" },
                onChange: s[2] || (s[2] = (c) => n("change", { showOnDashboard: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        h(u, {
          label: T(o)("variable.general.description")
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.description ?? "",
              placeholder: T(o)("variable.general.description.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { description: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), rle = { class: "font-semibold mb-3" }, ale = { class: "grid grid-cols-2 gap-x-4" }, lle = { class: "mb-2" }, sle = { class: "mb-2" }, ule = {
  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" }
}, cle = /* @__PURE__ */ be({
  __name: "QueryOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), 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" }
    ], r = [
      { label: o("variable.query.sort.disabled"), value: "disabled" },
      { label: o("variable.query.sort.alphabetical"), value: "alphabetical" },
      { label: o("variable.query.sort.numeric"), value: "numeric" }
    ], a = [
      { label: o("variable.query.refresh.onLoad"), value: "onLoad" },
      { label: o("variable.query.refresh.onTimeChange"), value: "onTimeChange" }
    ];
    return (l, s) => {
      const u = yn("a-form-item");
      return ne(), xe("div", null, [
        F("div", rle, oe(T(o)("variable.query.title")), 1),
        h(u, {
          label: T(o)("variable.query.dsUid")
        }, {
          default: he(() => [
            h(T(kt), {
              size: "small",
              value: e.config.targetDsUid ?? "",
              placeholder: T(o)("variable.query.dsUid.placeholder"),
              onChange: s[0] || (s[0] = (c) => n("change", { targetDsUid: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: T(o)("variable.query.queryType")
        }, {
          default: he(() => [
            h(T(Et), {
              size: "small",
              value: e.config.queryType,
              options: i,
              style: { width: "100%" },
              placeholder: T(o)("variable.query.queryType.placeholder"),
              onChange: s[1] || (s[1] = (c) => n("change", { queryType: c }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: T(o)("variable.query.query")
        }, {
          default: he(() => [
            h(T(kt), {
              size: "small",
              value: e.config.query ?? "",
              placeholder: T(o)("variable.query.query.placeholder"),
              onChange: s[2] || (s[2] = (c) => n("change", { query: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: T(o)("variable.query.regex")
        }, {
          default: he(() => [
            h(T(kt), {
              size: "small",
              value: e.config.extractRegex ?? "",
              placeholder: T(o)("variable.query.regex.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { extractRegex: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        F("div", ale, [
          h(u, {
            label: T(o)("variable.query.sort")
          }, {
            default: he(() => [
              h(T(Et), {
                size: "small",
                value: e.config.sortMode ?? "disabled",
                options: r,
                style: { width: "100%" },
                onChange: s[4] || (s[4] = (c) => n("change", { sortMode: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          h(u, {
            label: T(o)("variable.query.refresh")
          }, {
            default: he(() => [
              h(T(Et), {
                size: "small",
                value: e.config.refresh,
                options: a,
                style: { width: "100%" },
                onChange: s[5] || (s[5] = (c) => n("change", { refresh: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        F("div", lle, [
          h(T(Eo), {
            checked: e.config.multi,
            onChange: s[6] || (s[6] = (c) => n("change", { multi: c.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(o)("variable.query.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        F("div", sle, [
          h(T(Eo), {
            checked: e.config.includeAll,
            onChange: s[7] || (s[7] = (c) => n("change", { includeAll: c.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(o)("variable.query.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        h(u, {
          label: T(o)("variable.query.preview")
        }, {
          default: he(() => [
            F("div", ule, oe(T(o)("variable.query.preview.placeholder")), 1)
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), dle = { class: "font-semibold mb-3" }, fle = /* @__PURE__ */ be({
  __name: "TextBoxOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn();
    return (i, r) => {
      const a = yn("a-form-item");
      return ne(), xe("div", null, [
        F("div", dle, oe(T(o)("variable.textbox.title")), 1),
        h(a, {
          label: T(o)("variable.textbox.default")
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.defaultValue ?? "",
              placeholder: T(o)("variable.textbox.default.placeholder"),
              onChange: r[0] || (r[0] = (l) => n("change", { defaultValue: l.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(a, {
          label: T(o)("variable.textbox.width")
        }, {
          default: he(() => [
            h(T(To), {
              value: e.config.inputWidth,
              min: 60,
              max: 800,
              placeholder: "e.g. 200",
              onChange: r[1] || (r[1] = (l) => n("change", { inputWidth: l ?? void 0 }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), ple = /* @__PURE__ */ be({
  __name: "VariableForm",
  props: {
    draft: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t;
    sn();
    function o(i) {
      n("change", i);
    }
    return (i, r) => (ne(), dt(T(yl), {
      layout: "vertical",
      class: "px-5 py-4 overflow-y-auto flex-1"
    }, {
      default: he(() => [
        h(ile, {
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"]),
        r[0] || (r[0] = F("div", {
          class: "my-4",
          style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
        }, null, -1)),
        e.draft.config.type === "query" ? (ne(), dt(cle, {
          key: 0,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "datasource" ? (ne(), dt(tle, {
          key: 1,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "custom" ? (ne(), dt(Jae, {
          key: 2,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "textbox" ? (ne(), dt(fle, {
          key: 3,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0),
        e.draft.config.type === "constant" ? (ne(), dt(Wae, {
          key: 4,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : nt("", !0)
      ]),
      _: 1
    }));
  }
}), hle = {
  class: "w-45 flex flex-col h-full",
  style: { "border-right": "1px solid var(--ant-color-border-secondary)" }
}, gle = {
  class: "px-3 py-2 text-xs text-secondary",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, vle = { class: "flex-1 overflow-y-auto" }, mle = ["onClick"], ble = { key: 0 }, yle = {
  key: 1,
  class: "text-secondary"
}, xle = {
  class: "p-2",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, wle = /* @__PURE__ */ be({
  __name: "VariableNavList",
  props: {
    drafts: {},
    selectedId: {}
  },
  emits: ["select", "add"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn();
    return (i, r) => (ne(), xe("div", hle, [
      F("div", gle, oe(T(o)("variable.nav.count", { n: e.drafts.length })), 1),
      F("div", vle, [
        (ne(!0), xe(Je, null, Ut(e.drafts, (a) => (ne(), xe("div", {
          key: a.id,
          class: Pt(["px-3 py-2 cursor-pointer text-sm transition-colors", a.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", a.id)
        }, [
          a.config.name ? (ne(), xe("span", ble, oe(a.config.name), 1)) : (ne(), xe("span", yle, oe(T(o)("variable.nav.unnamed")), 1))
        ], 10, mle))), 128))
      ]),
      F("div", xle, [
        h(T(Bt), {
          type: "dashed",
          block: "",
          onClick: r[0] || (r[0] = (a) => n("add"))
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(o)("variable.modal.add")), 1)
          ]),
          _: 1
        })
      ])
    ]));
  }
}), Sle = { class: "flex flex-1 overflow-hidden" }, Cle = { class: "flex-1 overflow-hidden flex flex-col" }, $le = {
  key: 1,
  class: "flex-1 flex-center text-secondary text-sm"
}, Ple = { class: "flex items-center justify-between w-full" }, Ole = { class: "flex gap-2" }, kle = /* @__PURE__ */ be({
  __name: "VariableConfigModal",
  props: {
    open: { type: Boolean }
  },
  emits: ["close"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = Is(), { t: r } = sn(), a = le([]), l = le(""), s = () => `new-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
    function u(g) {
      return {
        id: "",
        name: g,
        label: "",
        type: "custom",
        hide: !1,
        refresh: "onLoad",
        multi: !1,
        includeAll: !1,
        showOnDashboard: "label-and-value"
      };
    }
    Ie(
      () => n.open,
      (g) => {
        if (g) {
          const m = Object.values(i.variables).map((x) => ({
            id: x.config.id,
            isNew: !1,
            config: JSON.parse(JSON.stringify(x.config))
          }));
          a.value = m, l.value = m[0]?.id ?? "";
        }
      }
    );
    const c = E(
      () => a.value.find((g) => g.id === l.value) ?? null
    );
    function d() {
      const m = `variable_${a.value.length + 1}`, x = s(), S = {
        id: x,
        isNew: !0,
        config: u(m)
      };
      a.value = [...a.value, S], l.value = x;
    }
    function f() {
      if (!c.value)
        return;
      const g = a.value.findIndex((m) => m.id === l.value);
      a.value = a.value.filter((m) => m.id !== l.value), a.value.length > 0 ? l.value = a.value[Math.min(g, a.value.length - 1)].id : l.value = "";
    }
    function p(g) {
      c.value && (a.value = a.value.map(
        (m) => m.id === l.value ? { ...m, config: { ...m.config, ...g } } : m
      ));
    }
    function v() {
      const g = i.variables, m = new Set(a.value.map((S) => S.id)), x = new Set(Object.keys(g));
      for (const S of x)
        m.has(S) || i.removeVariable(S);
      for (const S of a.value) {
        const C = { ...S.config, id: S.id };
        C.hide = C.showOnDashboard === "nothing" || !!C.hideFromVariableList, C.customOptions && (C.customValues = C.customOptions.map((P) => P.value).join(",")), S.isNew || !x.has(S.id) ? i.addVariable(C) : i.updateVariable(S.id, C);
      }
      o("close");
    }
    return (g, m) => (ne(), dt(Ax, {
      mode: "modal",
      open: e.open,
      title: T(r)("variable.modal.title"),
      width: 780,
      "body-height": "480px",
      onClose: m[2] || (m[2] = (x) => o("close"))
    }, {
      footer: he(() => [
        F("div", Ple, [
          h(T(Bt), {
            danger: "",
            disabled: !c.value,
            onClick: f
          }, {
            default: he(() => [
              Le(oe(T(r)("variable.modal.delete")), 1)
            ]),
            _: 1
          }, 8, ["disabled"]),
          F("div", Ole, [
            h(T(Bt), {
              onClick: m[1] || (m[1] = (x) => o("close"))
            }, {
              default: he(() => [
                Le(oe(T(r)("variable.modal.cancel")), 1)
              ]),
              _: 1
            }),
            h(T(Bt), {
              type: "primary",
              onClick: v
            }, {
              default: he(() => [
                Le(oe(T(r)("variable.modal.save")), 1)
              ]),
              _: 1
            })
          ])
        ])
      ]),
      default: he(() => [
        F("div", Sle, [
          h(wle, {
            drafts: a.value,
            "selected-id": l.value,
            onSelect: m[0] || (m[0] = (x) => l.value = x),
            onAdd: d
          }, null, 8, ["drafts", "selected-id"]),
          F("div", Cle, [
            c.value ? (ne(), dt(ple, {
              key: 0,
              draft: c.value,
              onChange: p
            }, null, 8, ["draft"])) : (ne(), xe("div", $le, oe(T(r)("variable.modal.placeholder")), 1))
          ])
        ])
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), Ile = {
  key: 0,
  class: "flex items-center gap-3 flex-wrap",
  style: { padding: "0 8px" }
}, Mle = {
  key: 0,
  class: "flex items-center gap-1"
}, Tle = {
  key: 1,
  class: "flex items-center gap-1"
}, _le = {
  key: 2,
  class: "flex items-center gap-1"
}, OE = /* @__PURE__ */ be({
  __name: "VariableBar",
  setup(e) {
    const t = Is(), n = aa(), o = ta(), { t: i } = sn(), r = le(!1), a = E(
      () => Object.entries(t.variables).filter(([, u]) => !u.config.hide).map(([u, c]) => ({ id: u, state: c })).sort((u, c) => u.state.config.name.localeCompare(c.state.config.name))
    ), l = E(() => o.isDark ? "#888" : "#555");
    function s(u, c) {
      console.warn("var", c), t.setValue(u, c);
      const d = t.variables[u];
      if (d) {
        const f = t.getDependents(d.config.name);
        for (const p of f)
          for (const [v, g] of Object.entries(t.variables))
            if (g.config.name === p) {
              t.refreshVariable(v);
              break;
            }
      }
    }
    return (u, c) => a.value.length > 0 || T(n).isEditing ? (ne(), xe("div", Ile, [
      (ne(!0), xe(Je, null, Ut(a.value, (d) => (ne(), xe(Je, {
        key: d.id
      }, [
        d.state.config.type === "textbox" ? (ne(), xe("div", Mle, [
          F("span", {
            class: "text-sm",
            style: Ht({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label), 5),
          h(T(kt), {
            size: "small",
            style: { width: "160px" },
            value: Array.isArray(d.state.current) ? d.state.current[0] || "" : d.state.current,
            placeholder: "Enter value...",
            onChange: (f) => s(d.id, f.target.value)
          }, null, 8, ["value", "onChange"])
        ])) : d.state.config.type === "constant" ? (ne(), xe("div", Tle, [
          d.state.config.label ? (ne(), xe("span", {
            key: 0,
            class: "text-sm",
            style: Ht({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label), 5)) : nt("", !0),
          h(T(Pr), { style: { margin: "0", "font-size": "12px" } }, {
            default: he(() => [
              Le(oe(d.state.config.constantValue ?? ""), 1)
            ]),
            _: 2
          }, 1024)
        ])) : (ne(), xe("div", _le, [
          F("span", {
            class: "text-sm",
            style: Ht({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label || d.state.config.name) + ": ", 5),
          h(T(Et), {
            value: d.state.current,
            mode: d.state.config.allowCustomValue ? d.state.config.multi ? "tags" : "SECRET_COMBOBOX_MODE_DO_NOT_USE" : d.state.config.multi ? "multiple" : void 0,
            loading: d.state.loading,
            style: { minWidth: "120px" },
            size: "small",
            "show-search": "",
            "allow-clear": d.state.config.allowClear ?? !1,
            "filter-option": (f, p) => (p?.label ?? "").toLowerCase().includes(f.toLowerCase()),
            placeholder: `Select ${d.state.config.label || d.state.config.name}`,
            onChange: (f) => s(d.id, f)
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(d.state.options, (f) => (ne(), dt(T(hj), {
                key: f.value,
                value: f.value,
                label: f.label === "$__all" ? T(i)("common.all") : f.label
              }, {
                default: he(() => [
                  Le(oe(f.label === "$__all" ? T(i)("common.all") : f.label), 1)
                ]),
                _: 2
              }, 1032, ["value", "label"]))), 128))
            ]),
            _: 2
          }, 1032, ["value", "mode", "loading", "allow-clear", "filter-option", "placeholder", "onChange"]),
          d.state.error ? (ne(), dt(T(Pr), {
            key: 0,
            color: "red",
            style: { "font-size": "10px", margin: "0" }
          }, {
            default: he(() => [
              Le(oe(d.state.error), 1)
            ]),
            _: 2
          }, 1024)) : nt("", !0)
        ]))
      ], 64))), 128)),
      T(n).isEditing ? (ne(), dt(T(Bt), {
        key: 0,
        size: "small",
        type: "text",
        class: "ml-auto",
        onClick: c[0] || (c[0] = (d) => r.value = !0)
      }, {
        default: he(() => [
          F("span", {
            class: Pt([T(mt).settings, "text-base"])
          }, null, 2)
        ]),
        _: 1
      })) : nt("", !0),
      h(kle, {
        open: r.value,
        onClose: c[1] || (c[1] = (d) => r.value = !1)
      }, null, 8, ["open"])
    ])) : nt("", !0);
  }
}), Ele = /* @__PURE__ */ be({
  __name: "DatasourceSelect",
  props: {
    value: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { config: o } = nc(), i = E(() => {
      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;
    }), r = E(
      () => i.value.map((l) => ({ value: l.value, label: l.label }))
    );
    function a(l) {
      const s = i.value.find((u) => u.value === l);
      s && n("change", s);
    }
    return (l, s) => (ne(), dt(T(Et), {
      size: "small",
      style: { "min-width": "140px" },
      value: e.value,
      options: r.value,
      onChange: a
    }, null, 8, ["value", "options"]));
  }
}), Dle = {
  key: 0,
  class: ""
}, Ale = {
  key: 1,
  class: "pt-2 px-2 text-xs text-secondary"
}, Rle = /* @__PURE__ */ be({
  __name: "QueryEditorRow",
  props: {
    entry: {},
    index: {},
    isChart: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["update", "remove"],
  setup(e, { emit: t }) {
    const n = e, o = t, i = E(() => "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n.index] ?? String(n.index + 1)), r = E(() => $p(n.entry.dataSource.type)), a = E(() => r.value?.QueryEditor ?? null), l = E(() => {
      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 = $p(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) => (ne(), dt(T(Ml), {
      size: "small",
      collapsible: "icon",
      bordered: !0,
      "default-active-key": [e.entry.id]
    }, {
      default: he(() => [
        (ne(), dt(T(Ml).Panel, {
          key: e.entry.id
        }, {
          header: he(() => [
            F("div", {
              class: "flex items-center gap-2",
              onClick: d[3] || (d[3] = ui(() => {
              }, ["stop"]))
            }, [
              h(T(Pr), {
                color: "blue",
                style: { "font-size": "12px", "font-weight": "600", margin: "0", "min-width": "24px", "text-align": "center", "line-height": "20px" }
              }, {
                default: he(() => [
                  Le(oe(i.value), 1)
                ]),
                _: 1
              }),
              h(T(Pa), {
                size: "small",
                checked: e.entry.enabled,
                onChange: d[0] || (d[0] = (f) => o("update", { enabled: f })),
                onClick: d[1] || (d[1] = ui(() => {
                }, ["stop"]))
              }, null, 8, ["checked"]),
              d[5] || (d[5] = F("div", { class: "flex-1" }, null, -1)),
              d[6] || (d[6] = F("span", { style: { "font-size": "11px", color: "var(--ant-color-text-secondary)" } }, "数据源", -1)),
              h(Ele, {
                value: l.value,
                onClick: d[2] || (d[2] = ui(() => {
                }, ["stop"])),
                onChange: s
              }, null, 8, ["value"])
            ])
          ]),
          extra: he(() => [
            e.canDelete ? (ne(), dt(T(Bt), {
              key: 0,
              type: "text",
              danger: "",
              size: "small",
              onClick: d[4] || (d[4] = ui((f) => o("remove"), ["stop"]))
            }, {
              default: he(() => [
                F("span", {
                  class: Pt(T(mt).delete)
                }, null, 2)
              ]),
              _: 1
            })) : nt("", !0)
          ]),
          default: he(() => [
            e.entry.enabled && a.value ? (ne(), xe("div", Dle, [
              (ne(), dt(AP(a.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 && !a.value ? (ne(), xe("div", Ale, " No query editor available for datasource type: " + oe(e.entry.dataSource.type), 1)) : nt("", !0)
          ]),
          _: 1
        }))
      ]),
      _: 1
    }, 8, ["default-active-key"]));
  }
}), Nle = {
  class: "px-4 py-3 flex flex-col gap-2",
  style: { "min-width": "300px" }
}, zle = { class: "flex items-center gap-2" }, Ble = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, Fle = { class: "flex items-center gap-2" }, Lle = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, Hle = { class: "flex items-center gap-2" }, Vle = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, jle = {
  class: "text-xs",
  style: { color: "var(--ant-color-text-quaternary)" }
}, Wle = { class: "flex items-center gap-2" }, Kle = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, qle = { class: "flex items-center gap-2" }, Yle = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, PP = 1e3, Gle = /* @__PURE__ */ be({
  __name: "QueryOptionsPanel",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = vc(), i = aa();
    function r(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 a(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 = E(() => {
      const u = n.value.queryOptions?.maxDataPoints ?? PP, c = i.timeRange, d = c.to - c.from;
      return Math.max(Math.ceil(d / u), 1e3);
    }), s = E(() => {
      const u = n.value.queryOptions?.minIntervalMs;
      return u != null ? r(u) : "";
    });
    return (u, c) => (ne(), xe("div", Nle, [
      F("div", zle, [
        F("span", Ble, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.maxDataPoints")
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.maxDataPoints")), 1)
        ]),
        h(T(To), {
          size: "small",
          style: { width: "100px" },
          min: 1,
          value: T(n).queryOptions?.maxDataPoints,
          placeholder: String(PP),
          onChange: c[0] || (c[0] = (d) => T(o)({ queryOptions: { ...T(n).queryOptions, maxDataPoints: d ?? void 0 } }))
        }, null, 8, ["value", "placeholder"])
      ]),
      F("div", Fle, [
        F("span", Lle, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.minInterval")
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.minInterval")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          value: s.value,
          placeholder: T(t)("qb.queryOptions.minIntervalPlaceholder"),
          onChange: c[1] || (c[1] = (d) => {
            const f = d.target.value.trim();
            if (!f) {
              T(o)({ queryOptions: { ...T(n).queryOptions, minIntervalMs: void 0 } });
              return;
            }
            const p = a(f);
            p !== void 0 && T(o)({ queryOptions: { ...T(n).queryOptions, minIntervalMs: p } });
          })
        }, null, 8, ["value", "placeholder"])
      ]),
      F("div", Hle, [
        F("span", Vle, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.interval")
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.interval")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          value: r(l.value),
          readonly: ""
        }, null, 8, ["value"]),
        F("span", jle, " = " + oe(T(t)("qb.queryOptions.intervalHint")), 1)
      ]),
      F("div", Wle, [
        F("span", Kle, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.relativeTime")
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.relativeTime")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: T(n).queryOptions?.relativeTime ?? "",
          onChange: c[2] || (c[2] = (d) => T(o)({ queryOptions: { ...T(n).queryOptions, relativeTime: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ]),
      F("div", qle, [
        F("span", Yle, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.timeShift")
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.timeShift")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: T(n).queryOptions?.timeShift ?? "",
          onChange: c[3] || (c[3] = (d) => T(o)({ queryOptions: { ...T(n).queryOptions, timeShift: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ])
    ]));
  }
}), Ule = { class: "flex flex-col h-full" }, Xle = {
  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)" }
}, Qle = { class: "flex-1 overflow-y-auto px-3 py-2 flex flex-col gap-2" }, Zle = {
  key: 0,
  class: "text-center text-secondary text-sm py-8"
}, Jle = /* @__PURE__ */ be({
  __name: "QueryEditorPane",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = vc(), i = E(() => ["timeseries", "bar", "histogram"].includes(n.value.type)), r = E(() => n.value.queries ?? []), a = le(!1), l = le("mock");
    function s(d, f) {
      o({ queries: r.value.map((p, v) => v === d ? { ...p, ...f } : p) });
    }
    function u(d) {
      o({ queries: r.value.filter((f, p) => p !== d) });
    }
    function c() {
      if (r.value.length >= 26)
        return;
      const d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[r.value.length] ?? String(r.value.length + 1), [f, p = ""] = l.value.split(":"), v = $p(f);
      if (!v?.defaultQuery)
        return;
      const g = {
        ...v.defaultQuery(),
        ...p ? { datasourceId: p } : {},
        // Non-chart types: each query = 1 series; seriesCount controlled by query count
        ...!i.value && "seriesCount" in v.defaultQuery() ? { seriesCount: 1 } : {}
      };
      o({
        queries: [...r.value, { id: d, enabled: !0, dataSource: g }]
      });
    }
    return (d, f) => (ne(), xe("div", Ule, [
      F("div", Xle, [
        h(OE),
        f[1] || (f[1] = F("div", { class: "flex-1" }, null, -1)),
        h(PE),
        h(T(KG), {
          type: "vertical",
          style: { margin: "0" }
        }),
        h(T(Jr).Compact, null, {
          default: he(() => [
            h(T(Bt), {
              type: "primary",
              disabled: r.value.length >= 26,
              onClick: c
            }, {
              default: he(() => [
                F("span", {
                  class: Pt([T(mt).plus, "mr-1"])
                }, null, 2),
                Le(" " + oe(T(t)("qb.addQuery")), 1)
              ]),
              _: 1
            }, 8, ["disabled"]),
            h(T(Qj), {
              open: a.value,
              "onUpdate:open": f[0] || (f[0] = (p) => a.value = p),
              trigger: "click",
              placement: "bottomRight",
              "overlay-inner-style": { padding: 0, minWidth: "320px" }
            }, {
              content: he(() => [
                h(Gle)
              ]),
              default: he(() => [
                h(T(Bt), { class: "text-12px cursor-pointer hover:op-90 active:op-80 underline" }, {
                  default: he(() => [
                    Le(oe(T(t)("qb.queryOptions")) + " ", 1),
                    F("span", {
                      class: Pt([T(mt).chevronDown, ""])
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["open"])
          ]),
          _: 1
        })
      ]),
      F("div", Qle, [
        (ne(!0), xe(Je, null, Ut(r.value, (p, v) => (ne(), dt(Rle, {
          key: p.id,
          entry: p,
          index: v,
          "is-chart": i.value,
          "can-delete": r.value.length > 1,
          onUpdate: (g) => s(v, g),
          onRemove: () => u(v)
        }, null, 8, ["entry", "index", "is-chart", "can-delete", "onUpdate", "onRemove"]))), 128)),
        r.value.length === 0 ? (ne(), xe("div", Zle, ' No queries. Click "' + oe(T(t)("qb.addQuery")) + '" to start. ', 1)) : nt("", !0)
      ])
    ]));
  }
}), ese = { class: "w-full h-full" }, tse = { class: "w-full h-full" }, nse = /* @__PURE__ */ be({
  __name: "PanelEditorLayout",
  setup(e) {
    const n = ta().isDark ? "#303030" : "#e8e8e8";
    return (o, i) => (ne(), dt(T(wP), { style: { height: "100%" } }, {
      default: he(() => [
        h(T(jf), { "min-size": 200 }, {
          default: he(() => [
            h(T(wP), {
              vertical: "",
              "default-sizes": [100, 200]
            }, {
              default: he(() => [
                h(T(jf), { "min-size": 100 }, {
                  default: he(() => [
                    F("div", ese, [
                      h(Vae)
                    ])
                  ]),
                  _: 1
                }),
                h(T(jf), { "min-size": 60 }, {
                  default: he(() => [
                    F("div", tse, [
                      h(Jle)
                    ])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(T(jf), {
          "preferred-size": "35%",
          "min-size": 200
        }, {
          default: he(() => [
            F("div", {
              class: "w-full h-full overflow-y-auto",
              style: Ht({ borderLeft: `1px solid ${T(n)}` })
            }, [
              h(bre)
            ], 4)
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), ose = { class: "font-medium text-sm" }, ise = { class: "flex justify-end gap-2 py-1" }, rse = /* @__PURE__ */ be({
  __name: "PanelEditorModal",
  setup(e) {
    const t = aa(), { t: n } = sn(), o = le(null), i = E(() => {
      const v = t.editingPanelId;
      return v ? t.panels[v] : null;
    }), r = E(() => o.value ?? i.value), { response: a } = uE(
      () => r.value?.queries ?? [],
      () => t.timeRange,
      800
    ), l = E(() => {
      const v = a.value?.data?.[0];
      return v ? v.fields.filter((g) => g.type === "number").map((g) => g.name) : [];
    }), s = E(() => {
      const v = a.value?.data?.[0];
      return v ? v.fields.map((g) => g.config?.displayNameFromDS ?? g.name) : [];
    });
    function u(v) {
      r.value && (o.value = { ...r.value, ...v });
    }
    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, (v) => {
      v || (o.value = null);
    });
    const f = E(() => !!t.editingPanelId && !!i.value), p = le(!1);
    return Ie(f, (v) => {
      v && !p.value && setTimeout(() => {
        p.value = !0;
      }, 0);
    }), rte({
      panel: E(() => r.value),
      onChange: u,
      previewData: a,
      numericFieldNames: l,
      allFieldNames: s
    }), (v, g) => (ne(), dt(Ax, {
      mode: "drawer",
      open: f.value,
      width: "71vw",
      mask: !0,
      "destroy-on-close": !1,
      onClose: d
    }, {
      title: he(() => [
        F("span", ose, "Edit: " + oe(r.value?.title ?? ""), 1)
      ]),
      footer: he(() => [
        F("div", ise, [
          h(T(Bt), { onClick: d }, {
            default: he(() => [
              Le(oe(T(n)("dashboard.cancel")), 1)
            ]),
            _: 1
          }),
          h(T(Bt), {
            type: "primary",
            onClick: c
          }, {
            default: he(() => [
              Le(oe(T(n)("dashboard.save")), 1)
            ]),
            _: 1
          })
        ])
      ]),
      default: he(() => [
        r.value && p.value ? (ne(), dt(nse, { key: 0 })) : nt("", !0)
      ]),
      _: 1
    }, 8, ["open"]));
  }
}), ase = {
  key: 0,
  class: "panel-container w-full h-full flex flex-col rounded overflow-hidden bg-white dark:bg-[#1f1f1f] border border-[#e8e8e8] dark:border-[#303030]"
}, lse = { class: "flex items-center gap-2 min-w-0 lh-1 flex-1 text-[#666] dark:text-[#666]" }, sse = {
  key: 0,
  class: "drag-handle flex-shrink-0 cursor-grab"
}, use = { class: "text-sm truncate text-[#141414] dark:text-[#d9d9d9]" }, cse = { class: "panel-actions flex items-center gap-10px lh-1 flex-shrink-0 text-[#444] dark:text-[#666]" }, dse = { class: "panel-content flex-1 overflow-hidden" }, fse = { class: "w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f]" }, pse = { class: "panel-content flex-1 overflow-hidden" }, hse = /* @__PURE__ */ be({
  __name: "PanelContainer",
  props: {
    panelId: {},
    menuMode: { default: "inline" }
  },
  setup(e) {
    const t = e, n = aa(), o = ta(), { t: i } = sn(), r = le(!1), a = le(!1), l = E(() => n.panels[t.panelId]), s = E(() => o.isDark), u = E(() => s.value ? "#666" : "#bbb"), c = E(() => {
      const v = (g) => ko("span", { class: g });
      return n.isEditing ? [
        { key: "edit", label: i("panel.menu.edit"), icon: () => v(mt.edit) },
        { key: "clone", label: i("panel.menu.clone"), icon: () => v(mt.clone) },
        { key: "fullscreen", label: i("panel.menu.fullscreen"), icon: () => v(mt.fullscreen) },
        { type: "divider" },
        { key: "remove", label: i("panel.menu.remove"), icon: () => v(mt.delete), danger: !0 }
      ] : [
        { key: "fullscreen", label: i("panel.menu.fullscreen"), icon: () => v(mt.fullscreen) }
      ];
    });
    function d(v) {
      switch (v) {
        case "edit":
          n.setEditingPanel(t.panelId);
          break;
        case "clone":
          n.clonePanel(t.panelId);
          break;
        case "remove":
          Go.confirm({
            title: i("panel.remove.title", { title: l.value?.title ?? "" }),
            content: i("panel.remove.content"),
            okText: i("panel.remove.ok"),
            cancelText: i("panel.remove.cancel"),
            maskStyle: { background: "rgba(0, 0, 0, 0.2)" },
            zIndex: 2001,
            okButtonProps: { danger: !0 },
            onOk: () => n.removePanel(t.panelId)
          });
          break;
        case "fullscreen":
          r.value = !0;
          break;
      }
    }
    function f(v) {
      a.value = !1, d(String(v.key));
    }
    function p(v) {
      v.stopPropagation(), n.refreshPanel(t.panelId);
    }
    return (v, g) => (ne(), xe(Je, null, [
      l.value && !r.value ? (ne(), xe("div", ase, [
        F("div", {
          class: "panel-header flex items-center px-3 py-2 flex-shrink-0 border-b border-[#e8e8e8] dark:border-[#303030]",
          onDblclick: g[6] || (g[6] = (m) => T(n).isEditing && T(n).setEditingPanel(t.panelId))
        }, [
          F("div", lse, [
            T(n).isEditing ? (ne(), xe("span", sse, [
              F("span", {
                class: Pt(T(mt).dragVertical)
              }, null, 2)
            ])) : nt("", !0),
            F("span", use, oe(l.value.title), 1),
            l.value.description ? (ne(), dt(T(Lo), {
              key: 1,
              title: l.value.description,
              placement: "bottom"
            }, {
              default: he(() => [
                F("span", {
                  class: Pt([T(mt).info, "flex-shrink-0"])
                }, null, 2)
              ]),
              _: 1
            }, 8, ["title"])) : nt("", !0),
            h(bE, {
              links: l.value.links ?? [],
              "icon-color": u.value
            }, null, 8, ["links", "icon-color"])
          ]),
          F("div", cse, [
            h(T(Lo), {
              title: T(i)("panel.menu.refresh")
            }, {
              default: he(() => [
                F("span", {
                  class: Pt([T(mt).refresh, "panel-refresh-btn cursor-pointer"]),
                  onMousedown: g[0] || (g[0] = ui(() => {
                  }, ["stop"])),
                  onClick: p
                }, null, 34)
              ]),
              _: 1
            }, 8, ["title"]),
            t.menuMode === "inline" ? (ne(), xe(Je, { key: 0 }, [
              T(n).isEditing ? (ne(), dt(T(Lo), {
                key: 0,
                title: T(i)("panel.menu.edit")
              }, {
                default: he(() => [
                  F("span", {
                    class: Pt([T(mt).edit, "cursor-pointer"]),
                    onClick: g[1] || (g[1] = (m) => d("edit"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : nt("", !0),
              T(n).isEditing ? (ne(), dt(T(Lo), {
                key: 1,
                title: T(i)("panel.menu.clone")
              }, {
                default: he(() => [
                  F("span", {
                    class: Pt([T(mt).clone, "cursor-pointer"]),
                    onClick: g[2] || (g[2] = (m) => d("clone"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : nt("", !0),
              T(n).isEditing ? (ne(), dt(T(Lo), {
                key: 2,
                title: T(i)("panel.menu.remove")
              }, {
                default: he(() => [
                  F("span", {
                    class: Pt([T(mt).delete, "cursor-pointer text-red-500"]),
                    onClick: g[3] || (g[3] = (m) => d("remove"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : nt("", !0)
            ], 64)) : (ne(), dt(T(_i), {
              key: 1,
              open: a.value,
              "onUpdate:open": g[5] || (g[5] = (m) => a.value = m),
              trigger: "click"
            }, {
              overlay: he(() => [
                h(T(co), {
                  items: c.value,
                  onClick: f
                }, null, 8, ["items"])
              ]),
              default: he(() => [
                F("span", {
                  class: "cursor-pointer p-[2px_4px]",
                  onClick: g[4] || (g[4] = ui(() => {
                  }, ["prevent"]))
                }, [
                  F("span", {
                    class: Pt(T(mt).dotsVertical)
                  }, null, 2)
                ])
              ]),
              _: 1
            }, 8, ["open"]))
          ])
        ], 32),
        F("div", dse, [
          ai(v.$slots, "default", {}, void 0, !0)
        ])
      ])) : nt("", !0),
      r.value ? (ne(), dt(T(Go), {
        key: 1,
        open: !0,
        title: l.value?.title,
        footer: null,
        width: "92vw",
        "body-style": { height: "82vh", padding: 0 },
        closable: !1,
        onCancel: g[7] || (g[7] = (m) => r.value = !1)
      }, {
        default: he(() => [
          F("div", fse, [
            F("div", pse, [
              ai(v.$slots, "default", {}, void 0, !0)
            ])
          ])
        ]),
        _: 3
      }, 8, ["title"])) : nt("", !0)
    ], 64));
  }
}), OP = /* @__PURE__ */ wi(hse, [["__scopeId", "data-v-548b9131"]]), gse = { class: "font-medium text-sm" }, vse = { class: "text-xs text-secondary mt-1" }, mse = /* @__PURE__ */ be({
  __name: "AddPanelModal",
  setup(e) {
    const t = aa(), { t: n } = sn(), o = [
      { type: "timeseries", icon: mt.chartLine, descKey: "panel.type.desc.timeseries" },
      { type: "bar", icon: mt.chartBar, descKey: "panel.type.desc.bar" },
      { type: "histogram", icon: mt.chartArea, descKey: "panel.type.desc.histogram" },
      { type: "stat", icon: mt.stat, descKey: "panel.type.desc.stat" },
      { type: "gauge", icon: mt.gauge, descKey: "panel.type.desc.gauge" },
      { type: "table", icon: mt.table, descKey: "panel.type.desc.table" },
      { type: "pie", icon: mt.chartPie, descKey: "panel.type.desc.pie" }
    ];
    function i(r) {
      t.addPanel(r);
    }
    return (r, a) => (ne(), dt(Ax, {
      open: T(t).addPanelModalOpen,
      title: T(n)("dashboard.addPanel"),
      footer: !1,
      onClose: a[0] || (a[0] = (l) => T(t).addPanelModalOpen = !1)
    }, {
      default: he(() => [
        h(T(QX), {
          gutter: [16, 16],
          class: "mt-4 px-4 pb-4"
        }, {
          default: he(() => [
            (ne(), xe(Je, null, Ut(o, (l) => h(T(SY), {
              key: l.type,
              span: 8
            }, {
              default: he(() => [
                h(T(Au), {
                  hoverable: "",
                  class: "text-center cursor-pointer",
                  onClick: (s) => i(l.type)
                }, {
                  default: he(() => [
                    F("div", {
                      class: Pt(["text-2xl mb-2 text-blue", l.icon])
                    }, null, 2),
                    F("div", gse, oe(T(n)(`config.type.${l.type}`)), 1),
                    F("div", vse, oe(T(n)(l.descKey)), 1)
                  ]),
                  _: 2
                }, 1032, ["onClick"])
              ]),
              _: 2
            }, 1024)), 64))
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), bse = { style: { display: "flex", "align-items": "center", "flex-wrap": "wrap", gap: "8px", padding: "0 4px" } }, yse = { class: "" }, xse = { style: { margin: "0" } }, wse = { style: { margin: "0" } }, Sse = /* @__PURE__ */ be({
  __name: "DashboardHeader",
  setup(e) {
    const t = aa(), { t: n } = sn(), { config: o } = nc(), { message: i } = id.useApp(), r = le(!1), a = le(!1), l = le(null);
    function s() {
      t.confirmSave(o.value.onSave);
    }
    function u() {
      t.isDirty ? r.value = !0 : t.discardChanges();
    }
    function c() {
      r.value = !1, t.discardChanges();
    }
    function d() {
      const S = t.exportJSON(), C = new Blob([S], { type: "application/json" }), P = URL.createObjectURL(C), $ = document.createElement("a");
      $.href = P, $.download = "dashboard.json", $.click(), URL.revokeObjectURL(P), i.success(n("dashboard.exportSuccess"));
    }
    function f() {
      l.value?.click();
    }
    function p(S) {
      const C = S.target.files?.[0];
      C && (C.text().then((P) => {
        t.importJSON(P) ? i.success(n("dashboard.importSuccess")) : i.error(n("dashboard.importError"));
      }), S.target.value = "");
    }
    function v(S) {
      t.importJSON(S) ? i.success(n("dashboard.importSuccess")) : i.error(n("dashboard.importError"));
    }
    const g = E(() => {
      const S = Hz(), C = (o.value.presets ?? []).map((P) => ({ label: P.label, value: P.config }));
      return [{ label: "内置模板", value: S }, ...C];
    }), m = E(() => [
      { key: "export", label: n("dashboard.export"), icon: mt.export },
      { key: "import", label: n("dashboard.import"), icon: mt.import },
      { type: "divider" },
      { key: "clear", label: n("dashboard.clearPanels"), icon: mt.delete, danger: !0 }
    ]);
    function x(S) {
      S === "export" ? d() : S === "import" ? f() : S === "clear" && (a.value = !0);
    }
    return (S, C) => (ne(), xe("div", bse, [
      T(t).isEditing ? (ne(), xe(Je, { key: 0 }, [
        h(T(Jr).Compact, null, {
          default: he(() => [
            h(T(Bt), {
              onClick: C[0] || (C[0] = (P) => T(t).addPanelModalOpen = !0)
            }, {
              default: he(() => [
                F("span", {
                  class: Pt([T(mt).plus, "mr-1"])
                }, null, 2),
                Le(" " + oe(T(n)("dashboard.addPanel")), 1)
              ]),
              _: 1
            }),
            h(T(Et), {
              placeholder: "预设",
              "popup-match-select-width": !1,
              options: g.value,
              style: { "min-width": "80px" },
              onSelect: C[1] || (C[1] = (P) => v(P))
            }, null, 8, ["options"]),
            F("input", {
              ref_key: "fileInputRef",
              ref: l,
              type: "file",
              accept: ".json",
              style: { display: "none" },
              onChange: p
            }, null, 544),
            h(T(_i), { trigger: ["click"] }, {
              overlay: he(() => [
                h(T(co), {
                  onClick: C[2] || (C[2] = ({ key: P }) => x(P))
                }, {
                  default: he(() => [
                    (ne(!0), xe(Je, null, Ut(m.value, (P) => (ne(), xe(Je, {
                      key: P.key ?? P.type
                    }, [
                      P.type === "divider" ? (ne(), dt(T(co).Divider, { key: 0 })) : (ne(), dt(T(co).Item, {
                        key: P.key,
                        danger: P.danger
                      }, {
                        default: he(() => [
                          F("span", {
                            class: Pt([P.icon, "mr-1"])
                          }, null, 2),
                          Le(oe(P.label), 1)
                        ]),
                        _: 2
                      }, 1032, ["danger"]))
                    ], 64))), 128))
                  ]),
                  _: 1
                })
              ]),
              default: he(() => [
                h(T(Bt), null, {
                  default: he(() => [
                    F("span", {
                      class: Pt(T(mt).dotsVertical)
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(T(Bt), {
          type: "primary",
          ghost: "",
          onClick: s
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).save, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(n)("dashboard.save")), 1)
          ]),
          _: 1
        }),
        h(T(Bt), {
          danger: T(t).isDirty,
          onClick: u
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).cancel, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(n)("dashboard.cancel")), 1)
          ]),
          _: 1
        }, 8, ["danger"])
      ], 64)) : (ne(), dt(T(Bt), {
        key: 1,
        onClick: T(t).startEditing
      }, {
        default: he(() => [
          F("span", {
            class: Pt([T(mt).edit, "mr-1"])
          }, null, 2),
          F("span", yse, oe(T(n)("dashboard.edit")), 1)
        ]),
        _: 1
      }, 8, ["onClick"])),
      h(T(Go), {
        open: r.value,
        "onUpdate:open": C[3] || (C[3] = (P) => r.value = P),
        title: T(n)("dashboard.cancelConfirmTitle"),
        "ok-text": T(n)("dashboard.cancelConfirmOk"),
        "cancel-text": T(n)("dashboard.cancelConfirmCancel"),
        "ok-button-props": { danger: !0 },
        onOk: c,
        onCancel: C[4] || (C[4] = (P) => r.value = !1)
      }, {
        default: he(() => [
          F("p", xse, oe(T(n)("dashboard.cancelConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text", "cancel-text"]),
      h(T(Go), {
        open: a.value,
        "onUpdate:open": C[5] || (C[5] = (P) => a.value = P),
        title: T(n)("dashboard.clearConfirmTitle"),
        "ok-text": T(n)("dashboard.clearConfirmOk"),
        "ok-button-props": { danger: !0 },
        onOk: C[6] || (C[6] = () => {
          T(t).clearPanels(), a.value = !1;
        }),
        onCancel: C[7] || (C[7] = (P) => a.value = !1)
      }, {
        default: he(() => [
          F("p", wse, oe(T(n)("dashboard.clearConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text"])
    ]));
  }
}), Cse = { class: "w-full h-full flex flex-col" }, $se = {
  key: 1,
  class: "dashboad-content h-full"
}, Pse = {
  key: 1,
  class: "flex-center h-full"
}, Ose = { class: "text-center text-gray-400" }, kse = { class: "text-14px" }, Ise = { class: "mt-2 text-12px text-blue/90" }, Mse = 30, Gv = 8, Tse = 768, _se = /* @__PURE__ */ be({
  __name: "DashboardPage",
  setup(e) {
    const { t } = sn(), n = aa(), o = ta(), { config: i } = nc(), r = E(() => i.value.canEdit !== !1), a = $e([...n.layouts]);
    Ie(
      () => n.layouts,
      (m) => {
        const x = a.value;
        x.length === m.length && x.every(
          (S, C) => S.i === m[C].i && S.x === m[C].x && S.y === m[C].y && S.w === m[C].w && S.h === m[C].h
        ) || (a.value = [...m]);
      }
    );
    function l(m) {
      a.value = m, n.setLayouts(m);
    }
    const s = le(), u = le(0), c = E(() => u.value > 0 && u.value < Tse);
    let d = null;
    At(() => {
      s.value && (d = new ResizeObserver((m) => {
        u.value = m[0].contentRect.width;
      }), d.observe(s.value), u.value = s.value.getBoundingClientRect().width);
    }), Vo(() => {
      d?.disconnect();
    });
    let f = null;
    function p() {
      v(), n.autoRefresh > 0 && (f = setInterval(() => {
        n.refresh();
      }, n.autoRefresh * 1e3));
    }
    function v() {
      f && (clearInterval(f), f = null);
    }
    Ie(() => n.autoRefresh, p);
    const g = E(() => Object.keys(n.panels).length === 0);
    return (m, x) => (ne(), xe("div", Cse, [
      F("div", {
        class: "flex items-center gap-2 flex-wrap px-2 sticky top-0 z-10",
        style: Ht({
          background: T(o).isDark ? "#1a1a1a" : "#f5f5f5",
          border: `1px solid ${T(o).isDark ? "#303030" : "#e8e8e8"}`,
          height: "42px"
        })
      }, [
        h(OE),
        x[0] || (x[0] = F("div", { class: "flex-1" }, null, -1)),
        h(PE),
        r.value ? (ne(), dt(Sse, { key: 0 })) : nt("", !0)
      ], 4),
      F("div", {
        ref_key: "containerRef",
        ref: s,
        class: "flex-1 overflow-auto"
      }, [
        c.value ? (ne(), xe("div", {
          key: 0,
          class: "flex flex-col",
          style: Ht({ gap: `${Gv}px`, padding: "8px" })
        }, [
          (ne(!0), xe(Je, null, Ut(Object.keys(T(n).panels), (S) => (ne(), xe("div", { key: S }, [
            h(OP, { "panel-id": S }, {
              default: he(() => [
                h(Ub, { "panel-id": S }, null, 8, ["panel-id"])
              ]),
              _: 2
            }, 1032, ["panel-id"])
          ]))), 128))
        ], 4)) : (ne(), xe("div", $se, [
          u.value > 0 && !g.value ? (ne(), dt(T(nte), {
            key: 0,
            layout: a.value,
            "col-num": 12,
            "row-height": Mse,
            margin: [Gv, Gv],
            "is-draggable": r.value && T(n).isEditing,
            "is-resizable": r.value && T(n).isEditing,
            "vertical-compact": !0,
            onLayoutUpdated: l
          }, {
            item: he(({ item: S }) => [
              h(OP, {
                "panel-id": String(S.i)
              }, {
                default: he(() => [
                  h(Ub, {
                    "panel-id": String(S.i)
                  }, null, 8, ["panel-id"])
                ]),
                _: 2
              }, 1032, ["panel-id"])
            ]),
            _: 1
          }, 8, ["layout", "margin", "is-draggable", "is-resizable"])) : nt("", !0),
          g.value ? (ne(), xe("div", Pse, [
            F("div", Ose, [
              x[1] || (x[1] = F("div", { class: "text-4xl mb-4" }, [
                F("div", { class: "i-carbon:chart-combo-stacked" })
              ], -1)),
              F("div", kse, oe(T(t)("dashboard.empty")), 1),
              F("div", Ise, oe(T(t)("dashboard.emptyHint")), 1)
            ])
          ])) : nt("", !0)
        ]))
      ], 512),
      h(mse),
      h(rse)
    ]));
  }
}), Ese = { class: "flex justify-between items-center gap-2" }, Dse = { style: { "font-size": "12px" } }, Ase = { style: { "font-size": "10px", color: "var(--ant-color-text-quaternary)" } }, Uv = /* @__PURE__ */ be({
  __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(""), r = le([]), a = 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 () => {
          a.value = !0;
          try {
            const f = new Set(n.groupBy.map((v) => v.name)), p = await eD(n.cfg, {
              signal: n.signal,
              metricName: n.metricName,
              search: i.value
            });
            r.value = p.filter((v) => !f.has(v.name));
          } catch {
            r.value = [];
          } finally {
            a.value = !1;
          }
        }, 300));
      }
    );
    const u = E(() => n.groupBy.map((f) => f.name));
    function c(f) {
      const v = (Array.isArray(f) ? f : [f]).map((g) => {
        const m = r.value.find((S) => S.name === g), x = n.groupBy.find((S) => S.name === g);
        return m ?? x ?? { name: g, fieldDataType: "string", fieldContext: "tag" };
      });
      o("change", v);
    }
    const d = E(() => a.value ? ko(Xo, { size: "small" }) : null);
    return (f, p) => (ne(), dt(T(Et), {
      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: p[0] || (p[0] = (v) => i.value = v),
      onFocus: p[1] || (p[1] = () => l.value = !0),
      onBlur: p[2] || (p[2] = () => {
        l.value = !1, i.value = "";
      }),
      onChange: c
    }, {
      default: he(() => [
        (ne(!0), xe(Je, null, Ut(r.value, (v) => (ne(), dt(T(Et).Option, {
          key: v.name,
          value: v.name
        }, {
          default: he(() => [
            F("div", Ese, [
              F("span", Dse, oe(v.name), 1),
              F("span", Ase, oe([v.fieldContext, v.fieldDataType].filter(Boolean).join(" · ")), 1)
            ])
          ]),
          _: 2
        }, 1032, ["value"]))), 128))
      ]),
      _: 1
    }, 8, ["value", "disabled", "not-found-content"]));
  }
}), Rse = { class: "flex flex-wrap gap-1 items-center" }, Nse = { class: "font-medium" }, kP = /* @__PURE__ */ be({
  __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" }
    ], r = [{ value: "timeShift", label: "Time Shift" }], a = {
      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 = E(
      () => n.signal === "logs" || n.signal === "traces" ? r : i
    );
    function s(d) {
      const f = a[d];
      o("change", [...n.functions, { name: d, args: f?.showInput ? [{ value: "" }] : [] }]);
    }
    function u(d) {
      o("change", n.functions.filter((f, p) => p !== d));
    }
    function c(d, f) {
      o("change", n.functions.map((p, v) => v === d ? { ...p, args: [{ value: f }] } : p));
    }
    return (d, f) => (ne(), xe("div", Rse, [
      (ne(!0), xe(Je, null, Ut(e.functions, (p, v) => (ne(), xe("div", {
        key: v,
        class: "inline-flex items-center gap-1 rounded px-1.5",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        F("span", Nse, oe(p.name) + "(", 1),
        a[p.name]?.showInput ? (ne(), dt(T(kt), {
          key: 0,
          class: "text-center",
          size: "small",
          bordered: !1,
          variant: "borderless",
          style: { width: "40px", padding: "0 2px", height: "20px" },
          placeholder: a[p.name]?.placeholder ?? "value",
          value: p.args[0]?.value ?? "",
          onChange: (g) => c(v, g.target.value)
        }, null, 8, ["placeholder", "value", "onChange"])) : nt("", !0),
        f[1] || (f[1] = F("span", null, ")", -1)),
        h(T(Bt), {
          class: "p-0!",
          type: "link",
          size: "small",
          danger: "",
          onClick: (g) => u(v)
        }, {
          default: he(() => [
            F("span", {
              class: Pt(T(mt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      h(T(_i), { trigger: "click" }, {
        overlay: he(() => [
          h(T(co), {
            onClick: f[0] || (f[0] = ({ key: p }) => s(String(p)))
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(l.value, (p) => (ne(), dt(T(co).Item, {
                key: p.value
              }, {
                default: he(() => [
                  Le(oe(p.label), 1)
                ]),
                _: 2
              }, 1024))), 128))
            ]),
            _: 1
          })
        ]),
        default: he(() => [
          h(T(Bt), {
            size: "small",
            type: "dashed"
          }, {
            default: he(() => [
              F("span", {
                class: Pt([T(mt).plus, "mr-0.5"])
              }, null, 2),
              f[2] || (f[2] = Le("函数 ", -1))
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), zse = {
  class: "bg-white p-2",
  style: { border: "1px solid #eee", "border-radius": "6px", "margin-bottom": "6px" }
}, Bse = { class: "flex items-center gap-1 select-none" }, Fse = { class: "flex gap-2 ml-1" }, Lse = {
  key: 0,
  style: { "border-top": "1px solid var(--ant-color-border)" }
}, Hse = {
  key: 0,
  class: "flex flex-col gap-2 p-2"
}, Vse = { class: "flex flex-col gap-0.5" }, jse = { class: "flex items-center gap-1.5" }, Wse = { class: "flex flex-col gap-0.5" }, Kse = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, qse = { class: "flex flex-col gap-0.5" }, Yse = { class: "flex flex-col gap-0.5" }, Gse = { class: "flex flex-col gap-0.5" }, Use = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, Xse = { class: "flex flex-col gap-0.5" }, Qse = { class: "flex items-center gap-1" }, Zse = { class: "flex flex-col gap-0.5" }, Jse = { class: "flex items-center gap-1" }, eue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, tue = { class: "flex flex-col gap-0.5" }, nue = { class: "flex flex-col gap-0.5" }, oue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, iue = { class: "flex flex-col gap-0.5" }, rue = { class: "flex flex-col gap-0.5" }, aue = {
  key: 1,
  class: "flex flex-col gap-2 p-2"
}, lue = { class: "flex flex-col gap-0.5" }, sue = { class: "flex flex-col gap-0.5" }, uue = { class: "flex flex-col gap-1" }, cue = { class: "flex flex-col gap-0.5" }, due = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, fue = { class: "flex flex-col gap-0.5" }, pue = { class: "flex flex-col gap-0.5" }, hue = { class: "flex flex-col gap-0.5" }, gue = {
  key: 2,
  class: "flex flex-col gap-1.5 p-2"
}, vue = { class: "flex items-center gap-1.5" }, mue = {
  key: 3,
  class: "flex flex-col gap-2 p-2"
}, bue = { class: "flex flex-col gap-0.5" }, yue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, xue = { class: "flex flex-col gap-0.5" }, wue = { class: "flex flex-col gap-0.5" }, Sue = /* @__PURE__ */ be({
  __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 = E(() => n.item.type === "builder_formula"), r = E(() => n.item.spec.disabled), a = E(() => 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(L) {
      o("change", L);
    }
    function d(L) {
      if (n.item.type !== "builder_query")
        return;
      const B = L === "metrics" ? [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }] : [{ expression: "count()" }];
      c({ ...n.item, spec: { ...n.item.spec, signal: L, aggregations: B } });
    }
    function f(L) {
      n.item.type === "builder_query" && (l.value = L, c({ ...n.item, queryType: L }));
    }
    const p = le([]), v = le(!1);
    Ie(
      [() => n.cfg?.url, () => n.cfg?.token],
      async ([L, B]) => {
        v.value = !0;
        try {
          p.value = await JE({ url: L ?? "", token: B ?? "" });
        } catch {
          p.value = [];
        } finally {
          v.value = !1;
        }
      },
      { immediate: !0 }
    );
    const g = E(
      () => n.item.type === "builder_query" ? n.item.spec : null
    ), m = E(
      () => g.value?.aggregations?.[0] ?? { metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }
    ), x = E(
      () => m.value.metricType === "histogram" || m.value.metricType === "exponential_histogram"
    ), S = E(
      () => x.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" }]
    ), C = E(() => x.value ? [] : m.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 P(L, B) {
      g.value && c({ ...n.item, spec: { ...g.value, [L]: B } });
    }
    function $(L) {
      g.value && P("aggregations", [{ ...m.value, ...L }]);
    }
    function I(L) {
      const A = p.value.find((G) => G.metricName === L)?.type ?? "";
      $({
        metricName: L,
        metricType: A,
        timeAggregation: A === "" ? "" : A === "gauge" ? "latest" : "rate",
        spaceAggregation: A === "histogram" || A === "exponential_histogram" ? "p99" : "sum"
      });
    }
    const w = E(
      () => g.value?.aggregations ?? []
    );
    function M() {
      g.value && P("aggregations", [...w.value, { expression: "count()" }]);
    }
    function _(L) {
      g.value && P("aggregations", w.value.filter((B, A) => A !== L));
    }
    function N(L, B) {
      g.value && P("aggregations", w.value.map((A, G) => G === L ? { expression: B } : A));
    }
    function R(L) {
      if (!L) {
        P("order", []);
        return;
      }
      const B = L.split(" "), A = B[B.length - 1], j = { key: { name: B.slice(0, -1).join(" ") }, direction: A };
      P("order", [j]);
    }
    function H(L) {
      n.item.type === "builder_formula" && o("change", { ...n.item, spec: { ...n.item.spec, ...L } });
    }
    return (L, B) => (ne(), xe("div", zse, [
      F("div", Bse, [
        F("span", {
          class: "flex items-center gap-1.5 flex-1 cursor-pointer",
          onClick: B[2] || (B[2] = (A) => o("toggleCollapse"))
        }, [
          F("span", {
            class: Pt([e.collapsed ? T(mt).chevronRight : T(mt).chevronDown, "text-16px"])
          }, null, 2),
          h(T(Pr), {
            color: i.value ? "purple" : "cyan",
            style: { margin: "0", "font-weight": "600", "font-size": "12px", "line-height": "18px", padding: "0 6px" }
          }, {
            default: he(() => [
              Le(oe(a.value), 1)
            ]),
            _: 1
          }, 8, ["color"]),
          i.value ? nt("", !0) : (ne(), xe(Je, { key: 0 }, [
            F("div", Fse, [
              (ne(), xe(Je, null, Ut(s, (A) => h(T(Bt), {
                key: A.value,
                size: "small",
                type: l.value === A.value ? "primary" : "default",
                style: { "font-size": "12px", height: "22px" },
                onClick: ui((G) => f(A.value), ["stop"])
              }, {
                default: he(() => [
                  Le(oe(A.label), 1)
                ]),
                _: 2
              }, 1032, ["type", "onClick"])), 64))
            ]),
            l.value === "builder" ? (ne(), dt(T(Et), {
              key: 0,
              size: "small",
              style: { width: "80px" },
              value: e.item.spec.signal,
              options: u,
              onClick: B[0] || (B[0] = ui(() => {
              }, ["stop"])),
              onChange: B[1] || (B[1] = (A) => d(A))
            }, null, 8, ["value"])) : nt("", !0),
            B[32] || (B[32] = F("div", { class: "flex-1" }, null, -1))
          ], 64))
        ]),
        h(T(Bt), {
          class: "p-0!",
          size: "small",
          type: "link",
          onClick: B[3] || (B[3] = ui((A) => o("toggleDisabled"), ["stop"]))
        }, {
          default: he(() => [
            F("span", {
              class: Pt(r.value ? T(mt).viewOff : T(mt).view)
            }, null, 2)
          ]),
          _: 1
        }),
        h(T(Bt), {
          class: "p-0!",
          size: "small",
          type: "link",
          danger: "",
          disabled: !e.canDelete,
          onClick: B[4] || (B[4] = (A) => o("delete"))
        }, {
          default: he(() => [
            F("span", {
              class: Pt(T(mt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled"])
      ]),
      e.collapsed ? nt("", !0) : (ne(), xe("div", Lse, [
        e.item.type === "builder_query" && l.value === "builder" && e.item.spec.signal === "metrics" && g.value ? (ne(), xe("div", Hse, [
          F("div", Vse, [
            B[33] || (B[33] = F("span", { class: "text-xs text-secondary" }, "指标名称", -1)),
            F("div", jse, [
              Le(oe(v.value) + " ", 1),
              h(T(Et), {
                "show-search": "",
                "allow-clear": "",
                loading: v.value,
                size: "small",
                style: { flex: "1" },
                placeholder: "指标名称",
                value: m.value.metricName || void 0,
                options: p.value.map((A) => ({
                  value: A.metricName,
                  label: A.metricName
                })),
                "filter-option": (A, G) => String(G?.value ?? "").toLowerCase().includes(A.toLowerCase()),
                onChange: B[5] || (B[5] = (A) => I(A)),
                onClear: B[6] || (B[6] = () => $({
                  metricName: "",
                  metricType: "",
                  timeAggregation: "rate",
                  spaceAggregation: "sum"
                }))
              }, null, 8, ["loading", "value", "options", "filter-option"]),
              m.value.metricType ? (ne(), dt(T(Pr), {
                key: 0,
                style: { "font-size": "10px", margin: "0" }
              }, {
                default: he(() => [
                  Le(oe(m.value.metricType), 1)
                ]),
                _: 1
              })) : nt("", !0)
            ])
          ]),
          F("div", Wse, [
            B[34] || (B[34] = F("span", { class: "text-xs text-secondary" }, "源数据筛选", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "如 host.name = 'my-host'",
              value: g.value.filter.expression,
              onChange: B[7] || (B[7] = (A) => P("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          x.value ? (ne(), xe(Je, { key: 0 }, [
            F("div", Kse, [
              F("div", qse, [
                B[35] || (B[35] = F("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                h(T(Et), {
                  size: "small",
                  value: m.value.spaceAggregation || void 0,
                  options: S.value,
                  disabled: !m.value.metricType,
                  onChange: B[8] || (B[8] = (A) => $({ spaceAggregation: A }))
                }, null, 8, ["value", "options", "disabled"])
              ]),
              F("div", Yse, [
                B[36] || (B[36] = F("span", { class: "text-xs text-secondary" }, "分组", -1)),
                h(Uv, {
                  "group-by": g.value.groupBy,
                  cfg: e.cfg,
                  signal: "metrics",
                  "metric-name": m.value.metricName,
                  disabled: !m.value.metricName,
                  onChange: B[9] || (B[9] = (A) => P("groupBy", A))
                }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
              ])
            ]),
            F("div", Gse, [
              B[37] || (B[37] = F("span", { class: "text-xs text-secondary" }, "步长（秒）", -1)),
              h(T(To), {
                size: "small",
                style: { width: "100%" },
                placeholder: "自动",
                value: g.value.stepInterval ?? void 0,
                min: 1,
                onChange: B[10] || (B[10] = (A) => P("stepInterval", A ?? null))
              }, null, 8, ["value"])
            ])
          ], 64)) : (ne(), xe(Je, { key: 1 }, [
            F("div", Use, [
              F("div", Xse, [
                B[40] || (B[40] = F("span", { class: "text-xs text-secondary" }, "时序内聚合", -1)),
                F("div", Qse, [
                  h(T(Et), {
                    size: "small",
                    style: { flex: "1" },
                    value: m.value.timeAggregation || void 0,
                    options: C.value,
                    disabled: !m.value.metricType,
                    onChange: B[11] || (B[11] = (A) => $({ timeAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  B[38] || (B[38] = F("span", { class: "text-xs text-secondary whitespace-nowrap" }, "每隔", -1)),
                  h(T(To), {
                    size: "small",
                    style: { width: "60px" },
                    placeholder: "自动",
                    value: g.value.stepInterval ?? void 0,
                    min: 1,
                    onChange: B[12] || (B[12] = (A) => P("stepInterval", A ?? null))
                  }, null, 8, ["value"]),
                  B[39] || (B[39] = F("span", { class: "text-xs text-secondary" }, "秒", -1))
                ])
              ]),
              F("div", Zse, [
                B[41] || (B[41] = F("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                F("div", Jse, [
                  h(T(Et), {
                    size: "small",
                    style: { width: "80px" },
                    value: m.value.spaceAggregation || void 0,
                    options: S.value,
                    disabled: !m.value.metricType,
                    onChange: B[13] || (B[13] = (A) => $({ spaceAggregation: A }))
                  }, null, 8, ["value", "options", "disabled"]),
                  h(Uv, {
                    "group-by": g.value.groupBy,
                    cfg: e.cfg,
                    signal: "metrics",
                    "metric-name": m.value.metricName,
                    disabled: !m.value.metricName,
                    onChange: B[14] || (B[14] = (A) => P("groupBy", A))
                  }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
                ])
              ])
            ]),
            F("div", eue, [
              F("div", tue, [
                B[42] || (B[42] = F("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
                h(T(kt), {
                  size: "small",
                  placeholder: "如 sum > 100",
                  value: g.value.having?.expression ?? "",
                  onChange: B[15] || (B[15] = (A) => P("having", { expression: A.target.value }))
                }, null, 8, ["value"])
              ]),
              F("div", nue, [
                B[43] || (B[43] = F("span", { class: "text-xs text-secondary" }, "条数", -1)),
                h(T(To), {
                  size: "small",
                  style: { width: "80px" },
                  placeholder: "∞",
                  value: g.value.limit ?? void 0,
                  min: 1,
                  onChange: B[16] || (B[16] = (A) => P("limit", A ?? void 0))
                }, null, 8, ["value"])
              ])
            ]),
            F("div", oue, [
              F("div", iue, [
                B[44] || (B[44] = F("span", { class: "text-xs text-secondary" }, "排序", -1)),
                h(T(Et), {
                  size: "small",
                  "allow-clear": "",
                  placeholder: "字段 升序/降序",
                  value: g.value.order[0] ? `${g.value.order[0].key.name} ${g.value.order[0].direction}` : void 0,
                  options: [
                    { value: "value asc", label: "值 升序" },
                    { value: "value desc", label: "值 降序" }
                  ],
                  onChange: B[17] || (B[17] = (A) => R(A)),
                  onClear: B[18] || (B[18] = () => P("order", []))
                }, null, 8, ["value"])
              ]),
              F("div", rue, [
                B[45] || (B[45] = F("span", { class: "text-xs text-secondary" }, "图例", -1)),
                h(T(kt), {
                  size: "small",
                  placeholder: "{{label}}",
                  value: g.value.legend,
                  onChange: B[19] || (B[19] = (A) => P("legend", A.target.value))
                }, null, 8, ["value"])
              ])
            ])
          ], 64)),
          h(kP, {
            functions: g.value.functions,
            signal: g.value.signal,
            onChange: B[20] || (B[20] = (A) => P("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value === "builder" && g.value ? (ne(), xe("div", aue, [
          F("div", lue, [
            B[46] || (B[46] = F("span", { class: "text-xs text-secondary" }, "过滤条件", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "过滤表达式",
              value: g.value.filter.expression,
              onChange: B[21] || (B[21] = (A) => P("filter", { expression: A.target.value }))
            }, null, 8, ["value"])
          ]),
          F("div", sue, [
            B[49] || (B[49] = F("span", { class: "text-xs text-secondary" }, "聚合表达式", -1)),
            F("div", uue, [
              (ne(!0), xe(Je, null, Ut(w.value, (A, G) => (ne(), xe("div", {
                key: G,
                class: "flex items-center gap-1"
              }, [
                h(T(kt), {
                  size: "small",
                  style: { flex: "1" },
                  placeholder: "如 count() / avg(body)",
                  value: A.expression,
                  onChange: (j) => N(G, j.target.value)
                }, null, 8, ["value", "onChange"]),
                w.value.length > 1 ? (ne(), dt(T(Bt), {
                  key: 0,
                  size: "small",
                  type: "text",
                  danger: "",
                  onClick: (j) => _(G)
                }, {
                  default: he(() => [...B[47] || (B[47] = [
                    Le(" × ", -1)
                  ])]),
                  _: 1
                }, 8, ["onClick"])) : nt("", !0)
              ]))), 128)),
              h(T(Bt), {
                size: "small",
                type: "dashed",
                style: { "align-self": "flex-start" },
                onClick: M
              }, {
                default: he(() => [
                  F("span", {
                    class: Pt([T(mt).plus, "mr-0.5"])
                  }, null, 2),
                  B[48] || (B[48] = Le("添加聚合 ", -1))
                ]),
                _: 1
              })
            ])
          ]),
          F("div", cue, [
            B[50] || (B[50] = F("span", { class: "text-xs text-secondary" }, "分组", -1)),
            h(Uv, {
              "group-by": g.value.groupBy,
              cfg: e.cfg,
              signal: g.value.signal,
              onChange: B[22] || (B[22] = (A) => P("groupBy", A))
            }, null, 8, ["group-by", "cfg", "signal"])
          ]),
          F("div", due, [
            F("div", fue, [
              B[51] || (B[51] = F("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
              h(T(kt), {
                size: "small",
                placeholder: "如 count > 100",
                value: g.value.having?.expression ?? "",
                onChange: B[23] || (B[23] = (A) => P("having", { expression: A.target.value }))
              }, null, 8, ["value"])
            ]),
            F("div", pue, [
              B[52] || (B[52] = F("span", { class: "text-xs text-secondary" }, "条数", -1)),
              h(T(To), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: g.value.limit ?? void 0,
                min: 1,
                onChange: B[24] || (B[24] = (A) => P("limit", A ?? void 0))
              }, null, 8, ["value"])
            ])
          ]),
          F("div", hue, [
            B[53] || (B[53] = F("span", { class: "text-xs text-secondary" }, "图例", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "{{label}}",
              value: g.value.legend,
              onChange: B[25] || (B[25] = (A) => P("legend", A.target.value))
            }, null, 8, ["value"])
          ]),
          h(kP, {
            functions: g.value.functions,
            signal: g.value.signal,
            onChange: B[26] || (B[26] = (A) => P("functions", A))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value !== "builder" ? (ne(), xe("div", gue, [
          h(T(kt).TextArea, {
            rows: 4,
            placeholder: l.value === "promql" ? "输入 PromQL 查询语句…" : "输入 ClickHouse SQL 查询语句…",
            value: e.item.rawQuery ?? "",
            style: { "font-family": "monospace", "font-size": "12px" },
            onChange: B[27] || (B[27] = (A) => o("change", { ...e.item, rawQuery: A.target.value }))
          }, null, 8, ["placeholder", "value"]),
          F("div", vue, [
            B[54] || (B[54] = F("span", { class: "text-xs text-secondary whitespace-nowrap" }, "图例格式", -1)),
            h(T(kt), {
              size: "small",
              style: { flex: "1" },
              placeholder: "{{label}}",
              value: e.item.rawLegend ?? "",
              onChange: B[28] || (B[28] = (A) => o("change", { ...e.item, rawLegend: A.target.value }))
            }, null, 8, ["value"])
          ])
        ])) : e.item.type === "builder_formula" ? (ne(), xe("div", mue, [
          F("div", bue, [
            B[55] || (B[55] = F("span", { class: "text-xs text-secondary" }, "表达式", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "如 A + B",
              value: e.item.spec.expression,
              onChange: B[29] || (B[29] = (A) => o("change", {
                ...e.item,
                spec: { ...e.item.spec, expression: A.target.value }
              }))
            }, null, 8, ["value"])
          ]),
          F("div", yue, [
            F("div", xue, [
              B[56] || (B[56] = F("span", { class: "text-xs text-secondary" }, "图例", -1)),
              h(T(kt), {
                size: "small",
                placeholder: "图例格式",
                value: e.item.spec.legend,
                onChange: B[30] || (B[30] = (A) => H({ legend: A.target.value }))
              }, null, 8, ["value"])
            ]),
            F("div", wue, [
              B[57] || (B[57] = F("span", { class: "text-xs text-secondary" }, "条数", -1)),
              h(T(To), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: e.item.spec.limit ?? void 0,
                min: 1,
                onChange: B[31] || (B[31] = (A) => H({ limit: A ?? void 0 }))
              }, null, 8, ["value"])
            ])
          ])
        ])) : nt("", !0)
      ]))
    ]));
  }
}), Cue = { class: "flex flex-col gap-2 p-1" }, $ue = {
  key: 0,
  class: "flex items-center gap-2 mb-1"
}, Pue = { class: "flex gap-1.5 mt-1" }, Oue = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", kue = /* @__PURE__ */ be({
  __name: "ArgusQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { config: i } = nc(), r = E(
      () => (i.value.datasourceConfig ?? []).filter((x) => x.type === "argus")
    ), a = le(/* @__PURE__ */ new Set());
    function l(x) {
      return {
        name: x,
        signal: "metrics",
        stepInterval: null,
        disabled: !1,
        filter: { expression: "" },
        having: { expression: "" },
        groupBy: [],
        order: [],
        legend: "",
        functions: [],
        aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
      };
    }
    function s(x) {
      return { name: x, expression: "", disabled: !1, legend: "", order: [] };
    }
    function u(x, S) {
      o("change", { ...n.query, [x]: S });
    }
    function c() {
      const x = n.query.queries.filter((P) => P.type === "builder_query"), S = Oue[x.length] ?? `Q${x.length}`, C = { type: "builder_query", spec: l(S) };
      o("change", { ...n.query, queries: [...n.query.queries, C] });
    }
    function d() {
      const S = `F${n.query.queries.filter((P) => P.type === "builder_formula").length + 1}`, C = { type: "builder_formula", spec: s(S) };
      o("change", { ...n.query, queries: [...n.query.queries, C] });
    }
    function f(x) {
      o("change", { ...n.query, queries: n.query.queries.filter((S) => S.spec.name !== x) });
    }
    function p(x) {
      o("change", {
        ...n.query,
        queries: n.query.queries.map((S) => S.spec.name === x.spec.name ? x : S)
      });
    }
    function v(x) {
      const S = new Set(a.value);
      S.has(x) ? S.delete(x) : S.add(x), a.value = S;
    }
    function g(x) {
      p({ ...x, spec: { ...x.spec, disabled: !x.spec.disabled } });
    }
    const m = E(() => {
      const x = (i.value.datasourceConfig ?? []).filter((C) => C.type === "argus");
      if (!x.length)
        return null;
      const S = x.find((C) => C.uid === n.datasourceId) ?? x.find((C) => C.default) ?? x[0];
      return { url: S.url, token: S.token };
    });
    return (x, S) => (ne(), xe("div", Cue, [
      r.value.length > 1 ? (ne(), xe("div", $ue, [
        S[1] || (S[1] = F("span", { class: "text-xs text-secondary whitespace-nowrap" }, "数据源", -1)),
        h(T(Et), {
          size: "small",
          style: { width: "180px" },
          value: e.query.datasourceId,
          options: r.value.map((C) => ({ value: C.uid, label: C.name })),
          onChange: S[0] || (S[0] = (C) => u("datasourceId", C))
        }, null, 8, ["value", "options"])
      ])) : nt("", !0),
      (ne(!0), xe(Je, null, Ut(e.query.queries, (C) => (ne(), dt(Sue, {
        key: C.spec.name,
        item: C,
        cfg: m.value,
        collapsed: a.value.has(C.spec.name),
        "can-delete": e.query.queries.length > 1,
        onToggleCollapse: () => v(C.spec.name),
        onToggleDisabled: () => g(C),
        onDelete: () => f(C.spec.name),
        onChange: p
      }, null, 8, ["item", "cfg", "collapsed", "can-delete", "onToggleCollapse", "onToggleDisabled", "onDelete"]))), 128)),
      F("div", Pue, [
        h(T(Bt), {
          size: "small",
          type: "dashed",
          onClick: c
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).plus, "mr-1"])
            }, null, 2),
            S[2] || (S[2] = Le("基础查询 ", -1))
          ]),
          _: 1
        }),
        h(T(Bt), {
          size: "small",
          type: "dashed",
          onClick: d
        }, {
          default: he(() => [
            F("span", {
              class: Pt([T(mt).plus, "mr-1"])
            }, null, 2),
            S[3] || (S[3] = Le("衍生算式 ", -1))
          ]),
          _: 1
        })
      ])
    ]));
  }
}), Iue = { style: { "padding-top": "6px" } }, Mue = { class: "inline-flex items-center gap-1.5 mb-2" }, Tue = { class: "text-xs text-secondary" }, _ue = {
  key: 0,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, Eue = { class: "text-xs text-secondary" }, Due = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, Aue = { class: "text-xs text-secondary" }, Rue = {
  class: "text-xs text-secondary",
  style: { "min-width": "28px" }
}, Nue = /* @__PURE__ */ be({
  __name: "MockQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), i = E(() => [
      { 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 (r, a) => (ne(), xe("div", Iue, [
      F("div", Mue, [
        F("span", Tue, oe(T(o)("qb.pattern")), 1),
        h(T(Et), {
          size: "small",
          style: { width: "140px" },
          value: e.query.pattern,
          options: i.value,
          onChange: a[0] || (a[0] = (l) => n("change", { ...e.query, pattern: l }))
        }, null, 8, ["value", "options"])
      ]),
      e.isChart ? (ne(), xe("div", _ue, [
        F("span", Eue, oe(T(o)("qb.seriesCount")), 1),
        h(T(bi), {
          min: 1,
          max: 8,
          value: e.query.seriesCount ?? 1,
          style: { width: "200px" },
          onChange: a[1] || (a[1] = (l) => n("change", { ...e.query, seriesCount: l }))
        }, null, 8, ["value"])
      ])) : nt("", !0),
      e.query.pattern === "live" ? (ne(), xe("div", Due, [
        F("span", Aue, oe(T(o)("qb.liveAmplitude")), 1),
        h(T(bi), {
          min: 0.1,
          max: 5,
          step: 0.1,
          value: e.query.liveAmplitude ?? 1,
          style: { width: "160px" },
          onChange: a[2] || (a[2] = (l) => n("change", { ...e.query, liveAmplitude: l }))
        }, null, 8, ["value"]),
        F("span", Rue, oe((e.query.liveAmplitude ?? 1).toFixed(1)) + "x ", 1)
      ])) : nt("", !0)
    ]));
  }
}), is = /* @__PURE__ */ be({
  __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 r(s, u) {
      return s.toLowerCase().includes(u.toLowerCase());
    }
    const a = E(() => {
      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((p) => r(p.label, s)) })).filter((f) => f.options.length > 0) : n.groups;
      return [...c, ...d];
    }), l = E(
      () => a.value.map((s) => ({
        label: s.label,
        options: s.options
      }))
    );
    return (s, u) => (ne(), dt(T(Et), {
      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"]));
  }
}), zue = { class: "flex flex-wrap items-center gap-1.5 mt-1" }, Bue = { class: "text-xs text-secondary" }, Fue = { class: "font-medium text-blue lh-1" }, Lue = /* @__PURE__ */ be({
  __name: "FunctionsEditor",
  props: {
    functions: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = sn();
    function r(p, v) {
      return v.length === 0 ? `${p.name}()` : `${p.name}(${v.join(", ")})`;
    }
    function a(p) {
      return { def: p, params: [...p.defaultParams], text: r(p, p.defaultParams) };
    }
    function l(p) {
      const v = p.filter((m) => m.def.category === "Alias");
      return [...p.filter((m) => m.def.category !== "Alias"), ...v];
    }
    function s(p) {
      const v = qw.find((m) => m.name === p);
      if (!v)
        return;
      const g = a(v);
      o("change", l([...n.functions, g]));
    }
    function u(p, v, g) {
      const m = n.functions.map((x, S) => {
        if (S !== p)
          return x;
        const C = [...x.params];
        return C[v] = g, { ...x, params: C, text: r(x.def, C) };
      });
      o("change", m);
    }
    function c(p) {
      o("change", n.functions.filter((v, g) => g !== p));
    }
    function d(p, v) {
      const g = p + v;
      if (g < 0 || g >= n.functions.length)
        return;
      const m = [...n.functions];
      [m[p], m[g]] = [m[g], m[p]], o("change", m);
    }
    const f = E(
      () => lF.map((p) => ({
        key: p,
        label: p,
        children: qw.filter((v) => v.category === p).map((v) => ({ key: v.name, label: v.name }))
      }))
    );
    return (p, v) => (ne(), xe("div", zue, [
      F("span", Bue, oe(T(i)("qb.functions")), 1),
      (ne(!0), xe(Je, null, Ut(e.functions, (g, m) => (ne(), xe("div", {
        key: m,
        class: "inline-flex items-center gap-0.5 rounded px-1",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        h(T(Bt), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: m === 0,
          onClick: (x) => d(m, -1)
        }, {
          default: he(() => [
            F("span", {
              class: Pt(T(mt).chevronLeft)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        F("span", Fue, oe(g.def.name), 1),
        v[1] || (v[1] = F("span", { class: "text-yellow" }, "(", -1)),
        (ne(!0), xe(Je, null, Ut(g.def.params, (x, S) => (ne(), xe(Je, { key: S }, [
          x.options ? (ne(), dt(T(Et), {
            key: 0,
            size: "small",
            value: String(g.params[S] ?? x.options[0]),
            options: x.options.map((C) => ({ value: String(C), label: String(C) })),
            "popup-match-select-width": "false",
            bordered: !1,
            variant: "borderless",
            style: { "min-width": "60px" },
            onChange: (C) => u(m, S, C)
          }, null, 8, ["value", "options", "onChange"])) : (ne(), dt(T(kt), {
            key: 1,
            class: "text-green text-center",
            size: "small",
            bordered: !1,
            value: String(g.params[S] ?? ""),
            style: { width: "40px", padding: "0 4px", height: "20px" },
            variant: "borderless",
            onChange: (C) => u(m, S, C.target.value)
          }, null, 8, ["value", "onChange"]))
        ], 64))), 128)),
        v[2] || (v[2] = F("span", { class: "text-yellow font-medium" }, ")", -1)),
        h(T(Bt), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: m === e.functions.length - 1,
          onClick: (x) => d(m, 1)
        }, {
          default: he(() => [
            F("span", {
              class: Pt(T(mt).chevronRight)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        h(T(Bt), {
          type: "text",
          size: "small",
          class: "p-0!",
          danger: "",
          onClick: (x) => c(m)
        }, {
          default: he(() => [
            F("span", {
              class: Pt(T(mt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      h(T(_i), { trigger: ["click"] }, {
        overlay: he(() => [
          h(T(co), {
            onClick: v[0] || (v[0] = ({ key: g }) => s(String(g)))
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(f.value, (g) => (ne(), dt(T(co).SubMenu, {
                key: g.key,
                title: g.label
              }, {
                default: he(() => [
                  (ne(!0), xe(Je, null, Ut(g.children, (m) => (ne(), dt(T(co).Item, {
                    key: m.key
                  }, {
                    default: he(() => [
                      Le(oe(m.label), 1)
                    ]),
                    _: 2
                  }, 1024))), 128))
                ]),
                _: 2
              }, 1032, ["title"]))), 128))
            ]),
            _: 1
          })
        ]),
        default: he(() => [
          h(T(Bt), {
            size: "small",
            type: "dashed"
          }, {
            default: he(() => [
              Le(" + " + oe(T(i)("qb.functions.add")), 1)
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), Hue = { class: "flex flex-wrap items-center gap-0 mt-3" }, Vue = { class: "text-xs text-secondary font-medium" }, jue = { class: "text-xs" }, Wue = { class: "inline-flex items-center gap-1.5 mr-3" }, Kue = { class: "text-xs text-secondary whitespace-nowrap" }, que = { class: "inline-flex items-center gap-1.5 mr-3" }, Yue = { class: "text-xs text-secondary whitespace-nowrap" }, Gue = { class: "inline-flex items-center gap-1.5 mr-3" }, Uue = { class: "text-xs text-secondary whitespace-nowrap" }, Xue = { class: "inline-flex items-center gap-1.5 mr-3" }, Que = { class: "text-xs text-secondary whitespace-nowrap" }, Zue = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mr-3"
}, Jue = { class: "text-xs text-secondary whitespace-nowrap" }, ece = { class: "inline-flex items-center gap-1.5 mr-3" }, tce = { class: "text-xs text-secondary whitespace-nowrap" }, nce = { class: "inline-flex items-center gap-1.5 mr-3" }, oce = { class: "text-xs text-secondary whitespace-nowrap" }, ice = { class: "inline-flex items-center gap-1.5 mr-3" }, rce = { class: "text-xs text-secondary whitespace-nowrap" }, ace = { class: "inline-flex items-center gap-1.5 mr-3" }, lce = { class: "text-xs text-secondary whitespace-nowrap" }, sce = { class: "inline-flex items-center gap-1.5 mr-3" }, uce = { class: "text-xs text-secondary whitespace-nowrap" }, cce = { class: "inline-flex items-center gap-1.5 mr-3" }, dce = { class: "text-xs text-secondary whitespace-nowrap" }, fce = { class: "inline-flex items-center gap-1.5 mr-3" }, pce = { class: "text-xs text-secondary whitespace-nowrap" }, hce = { class: "inline-flex items-center gap-1.5 mr-3" }, gce = { class: "text-xs text-secondary whitespace-nowrap" }, vce = /* @__PURE__ */ be({
  __name: "OptionsEditor",
  props: {
    queryType: {},
    options: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = sn(), r = le(!0);
    function a(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) => (ne(), xe("div", Hue, [
      F("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) => r.value = !r.value)
      }, [
        F("span", Vue, oe(T(i)("qb.options")), 1),
        F("span", jue, oe(r.value ? "▸" : "▾"), 1)
      ]),
      F("div", {
        class: "flex flex-wrap items-center overflow-hidden transition-all",
        style: Ht({ maxHeight: r.value ? "200px" : "0" })
      }, [
        e.queryType === "metrics" || e.queryType === "itemid" || e.queryType === "services" ? (ne(), xe(Je, { key: 0 }, [
          F("div", Wue, [
            F("span", Kue, oe(T(i)("qb.options.trends")), 1),
            h(T(Et), {
              size: "small",
              style: { width: "100px" },
              value: e.options.useTrends ?? "default",
              options: u,
              onChange: d[1] || (d[1] = (f) => a({ useTrends: f }))
            }, null, 8, ["value"])
          ]),
          F("div", que, [
            F("span", Yue, oe(T(i)("qb.options.showDisabled")), 1),
            h(T(Pa), {
              size: "small",
              checked: !!e.options.showDisabledItems,
              onChange: d[2] || (d[2] = (f) => a({ showDisabledItems: f }))
            }, null, 8, ["checked"])
          ]),
          F("div", Gue, [
            F("span", Uue, oe(T(i)("qb.options.valueMapping")), 1),
            h(T(Pa), {
              size: "small",
              checked: !!e.options.useZabbixValueMapping,
              onChange: d[3] || (d[3] = (f) => a({ useZabbixValueMapping: f }))
            }, null, 8, ["checked"])
          ]),
          F("div", Xue, [
            F("span", Que, oe(T(i)("qb.options.disableAlignment")), 1),
            h(T(Pa), {
              size: "small",
              checked: !!e.options.disableDataAlignment,
              onChange: d[4] || (d[4] = (f) => a({ disableDataAlignment: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : nt("", !0),
        e.queryType === "text" ? (ne(), xe("div", Zue, [
          F("span", Jue, oe(T(i)("qb.options.showDisabled")), 1),
          h(T(Pa), {
            size: "small",
            checked: !!e.options.showDisabledItems,
            onChange: d[5] || (d[5] = (f) => a({ showDisabledItems: f }))
          }, null, 8, ["checked"])
        ])) : nt("", !0),
        e.queryType === "problems" ? (ne(), xe(Je, { key: 2 }, [
          F("div", ece, [
            F("span", tce, oe(T(i)("qb.options.acknowledged")), 1),
            h(T(Et), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[6] || (d[6] = (f) => a({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          F("div", nce, [
            F("span", oce, oe(T(i)("qb.options.sortBy")), 1),
            h(T(Et), {
              size: "small",
              style: { width: "120px" },
              value: e.options.sortProblems ?? "default",
              options: s,
              onChange: d[7] || (d[7] = (f) => a({ sortProblems: f }))
            }, null, 8, ["value"])
          ]),
          F("div", ice, [
            F("span", rce, oe(T(i)("qb.options.useTimeRange")), 1),
            h(T(Pa), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[8] || (d[8] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ]),
          F("div", ace, [
            F("span", lce, oe(T(i)("qb.options.hostsInMaintenance")), 1),
            h(T(Pa), {
              size: "small",
              checked: !!e.options.hostsInMaintenance,
              onChange: d[9] || (d[9] = (f) => a({ hostsInMaintenance: f }))
            }, null, 8, ["checked"])
          ]),
          F("div", sce, [
            F("span", uce, oe(T(i)("qb.options.hostProxy")), 1),
            h(T(Pa), {
              size: "small",
              checked: !!e.options.hostProxy,
              onChange: d[10] || (d[10] = (f) => a({ hostProxy: f }))
            }, null, 8, ["checked"])
          ]),
          F("div", cce, [
            F("span", dce, oe(T(i)("qb.options.limit")), 1),
            h(T(kt), {
              size: "small",
              type: "number",
              style: { width: "80px" },
              value: e.options.limit ?? 100,
              onChange: d[11] || (d[11] = (f) => a({ limit: Number(f.target.value) }))
            }, null, 8, ["value"])
          ])
        ], 64)) : nt("", !0),
        e.queryType === "triggers" ? (ne(), xe(Je, { key: 3 }, [
          F("div", fce, [
            F("span", pce, oe(T(i)("qb.options.acknowledged")), 1),
            h(T(Et), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[12] || (d[12] = (f) => a({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          F("div", hce, [
            F("span", gce, oe(T(i)("qb.options.useTimeRange")), 1),
            h(T(Pa), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[13] || (d[13] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : nt("", !0)
      ], 4)
    ]));
  }
});
function kE(e) {
  const t = Is();
  return E(() => {
    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 r = i.current, a = Array.isArray(r) ? r : [r];
    return a.includes("$__all") ? i.options.map((l) => l.value).filter((l) => l !== "$__all") : a.filter(Boolean);
  });
}
function mce(e, t) {
  const n = le([]), o = le([]), i = le(!1), r = le(!1), a = kE(() => 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 qB({ url: l, token: s });
        } catch {
        } finally {
          i.value = !1;
        }
      }
    },
    { immediate: !0, deep: !0 }
  ), Ie(
    [a, () => t().url, () => t().token],
    async ([l, s, u]) => {
      if (!s || l.length === 0) {
        o.value = [];
        return;
      }
      r.value = !0, o.value = [];
      try {
        o.value = await YB(l, void 0, { url: s, token: u });
      } catch {
      } finally {
        r.value = !1;
      }
    },
    { immediate: !0 }
  ), { groups: n, hosts: o, loadingGroups: i, loadingHosts: r, resolvedGroupIds: a };
}
function bce(e) {
  const { config: t } = nc(), n = E(() => (t.value.datasourceConfig ?? []).filter((a) => a.type === "zabbix").map((a, l) => ({
    uid: a.uid || String(l),
    name: a.name,
    url: a.url,
    token: a.token,
    isDefault: !!a.default
  }))), o = E(() => {
    const r = AE(e);
    return n.value.find((l) => l.uid === r) ?? n.value[0] ?? { url: "", token: "" };
  }), i = E(
    () => n.value.find((r) => r.isDefault)?.uid ?? n.value[0]?.uid ?? ""
  );
  return { sources: n, cfg: o, defaultUid: i };
}
const yce = {
  class: "flex flex-col gap-3 p-2",
  style: { "font-size": "12px" }
}, xce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, wce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Sce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Cce = { key: 0 }, $ce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Pce = {
  key: 1,
  style: { "max-width": "400px" }
}, Oce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, kce = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, Ice = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Mce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Tce = { class: "flex items-center gap-2" }, _ce = {
  class: "text-secondary",
  style: { "font-size": "11px" }
}, Ece = { key: 3 }, Dce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Ace = { key: 4 }, Rce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Nce = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, zce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Bce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Fce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Lce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Hce = { class: "flex flex-wrap gap-1" }, Vce = {
  key: 6,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, jce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Wce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Kce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, qce = { key: 7 }, Yce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Gce = {
  key: 8,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, Uce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Xce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Qce = /* @__PURE__ */ be({
  __name: "ZabbixQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: i } = sn(), { cfg: r } = bce(() => n.datasourceId), a = Is();
    function l(re) {
      o("change", { ...n.query, ...re });
    }
    const s = E(
      () => Object.values(a.variables).map((re) => ({
        value: `$${re.config.name}`,
        label: `$${re.config.name}`
      }))
    );
    function u(re, ie) {
      const te = [];
      return s.value.length > 0 && te.push({ label: "── 变量 ──", options: s.value }), te.push({ label: re, options: ie }), te;
    }
    function c(re) {
      return typeof re == "string" && re.startsWith("$");
    }
    const { groups: d, hosts: f, loadingGroups: p, loadingHosts: v } = mce(
      () => n.query,
      () => r.value
    ), g = kE(() => n.query.hostId), m = E(
      () => d.value.map((re) => ({ value: re.groupid, label: re.name }))
    ), x = E(
      () => f.value.map((re) => ({ value: re.hostid, label: re.name || re.host }))
    ), S = le([]), C = le(!1);
    Ie(
      [
        g,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([re, ie, te, ve]) => {
        if (ve !== "metrics") {
          S.value = [];
          return;
        }
        if (!re.length || !ie) {
          S.value = [];
          return;
        }
        C.value = !0;
        try {
          S.value = (await Promise.all(
            re.map(
              (ce) => Tk([ce], void 0, void 0, { url: ie, token: te })
            )
          )).flat();
        } catch {
          S.value = [];
        } finally {
          C.value = !1;
        }
      },
      { immediate: !0 }
    );
    const P = E(() => {
      const re = /* @__PURE__ */ new Set();
      return S.value.flatMap(
        (ie) => (ie.tags ?? []).map((te) => XB(te))
      ).filter((ie) => re.has(ie) ? !1 : (re.add(ie), !0)).map((ie) => ({ value: ie, label: ie }));
    }), $ = E(() => {
      if (!n.query.itemTagsFilter)
        return S.value;
      const [re, ie] = n.query.itemTagsFilter.split(":").map((te) => te.trim());
      return S.value.filter(
        (te) => (te.tags ?? []).some(
          (ve) => ve.tag === re && (ie ? ve.value === ie : !0)
        )
      );
    }), I = E(() => {
      const re = /* @__PURE__ */ new Set();
      return $.value.map((ie) => ie.name).filter((ie) => re.has(ie) ? !1 : (re.add(ie), !0)).map((ie) => ({ value: ie, label: ie }));
    }), w = le([]), M = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([re, ie, te, ve]) => {
        if (ve !== "text" || !re || !ie) {
          w.value = [];
          return;
        }
        M.value = !0;
        try {
          w.value = await QB([re], void 0, { url: ie, token: te });
        } catch {
          w.value = [];
        } finally {
          M.value = !1;
        }
      },
      { immediate: !0 }
    );
    const _ = E(() => {
      const re = /* @__PURE__ */ new Set();
      return w.value.map((ie) => ie.name).filter((ie) => re.has(ie) ? !1 : (re.add(ie), !0)).map((ie) => ({ value: ie, label: ie }));
    }), N = le([]), R = le(!1);
    Ie(
      [() => r.value.url, () => r.value.token, () => n.query.queryType],
      async ([re, ie, te]) => {
        if (!(te !== "services" || !re)) {
          R.value = !0;
          try {
            N.value = await JB({ url: re, token: ie });
          } catch {
            N.value = [];
          } finally {
            R.value = !1;
          }
        }
      },
      { immediate: !0 }
    );
    const H = le([]), L = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([re, ie, te, ve]) => {
        if (ve !== "macros" || !re || !ie) {
          H.value = [];
          return;
        }
        L.value = !0;
        try {
          H.value = await ZB([re], { url: ie, token: te });
        } catch {
          H.value = [];
        } finally {
          L.value = !1;
        }
      },
      { immediate: !0 }
    );
    const B = le([]), A = le(!1), G = le([]), j = le(!1);
    Ie(
      [
        () => n.query.hostId,
        () => r.value.url,
        () => r.value.token,
        () => n.query.queryType
      ],
      async ([re, ie, te, ve]) => {
        if (ve !== "lld" || !re || re.startsWith("$") || !ie) {
          B.value = [];
          return;
        }
        A.value = !0;
        try {
          B.value = await nF([re], { url: ie, token: te });
        } catch {
          B.value = [];
        } finally {
          A.value = !1;
        }
      },
      { immediate: !0 }
    ), Ie(
      [() => n.query.lldRuleId, () => r.value.url, () => r.value.token],
      async ([re, ie, te]) => {
        if (!re || !ie) {
          G.value = [];
          return;
        }
        j.value = !0;
        try {
          const ve = /* @__PURE__ */ new Set();
          G.value = (await oF(re, { url: ie, token: te })).map((ce) => {
            const fe = ce.key_.includes("[") ? ce.key_.slice(0, ce.key_.indexOf("[")) : ce.key_;
            return { value: fe, label: `${ce.name} (${fe})` };
          }).filter((ce) => ve.has(ce.value) ? !1 : (ve.add(ce.value), !0));
        } catch {
          G.value = [];
        } finally {
          j.value = !1;
        }
      },
      { immediate: !0 }
    );
    const Z = [
      "metrics",
      "text",
      "services",
      "itemid",
      "triggers",
      "problems",
      "macros",
      "lld"
    ], W = [
      "problems",
      "recent",
      "history"
    ], K = {
      problems: "Problems",
      recent: "Recent problems",
      history: "History"
    }, q = [
      { 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" }
    ], U = [
      { value: "status", label: "Status" },
      { value: "sli", label: "SLI" },
      { value: "uptime", label: "Uptime" },
      { value: "downtime", label: "Downtime" },
      { value: "error_budget", label: "Error budget" }
    ], ae = [
      { 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" }
    ], se = E(
      () => ["metrics", "text", "triggers", "problems", "macros", "lld"].includes(
        n.query.queryType
      )
    );
    return (re, ie) => (ne(), xe("div", yce, [
      F("div", null, [
        F("div", xce, oe(T(i)("qb.queryType")), 1),
        h(T(Et), {
          size: "small",
          style: { width: "100%" },
          value: e.query.queryType,
          options: Z.map((te) => ({
            value: te,
            label: T(i)(`qb.queryType.${te}`)
          })),
          onChange: ie[0] || (ie[0] = (te) => l({ queryType: te, itemIds: [], itemNames: [], itemids: "" }))
        }, null, 8, ["value", "options"])
      ]),
      se.value ? (ne(), xe("div", {
        key: 0,
        class: "grid gap-3",
        style: Ht({ gridTemplateColumns: e.query.queryType === "metrics" ? "repeat(3, 1fr)" : "repeat(2, 1fr)" })
      }, [
        F("div", null, [
          F("div", wce, oe(T(i)("panel.group")), 1),
          h(T(Xo), {
            spinning: T(p),
            size: "small"
          }, {
            default: he(() => [
              h(is, {
                value: e.query.groupId || void 0,
                "display-value": e.query.groupName || void 0,
                placeholder: T(i)("panel.group.placeholder"),
                groups: u("── 主机组 ──", m.value),
                onChange: ie[1] || (ie[1] = (te) => l({ groupId: te, groupName: c(te) ? te : T(d).find((ve) => ve.groupid === te)?.name ?? te, hostId: "", hostName: "", itemIds: [], itemNames: [] })),
                onClear: ie[2] || (ie[2] = () => l({ groupId: "", groupName: "", hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        F("div", null, [
          F("div", Sce, oe(T(i)("panel.host")), 1),
          h(T(Xo), {
            spinning: T(v),
            size: "small"
          }, {
            default: he(() => [
              h(is, {
                value: e.query.hostId || void 0,
                "display-value": e.query.hostName || void 0,
                placeholder: T(i)("panel.host.placeholder"),
                groups: u("── 主机 ──", x.value),
                onChange: ie[3] || (ie[3] = (te) => l({ hostId: te, hostName: c(te) ? te : T(f).find((ve) => ve.hostid === te)?.name ?? te, itemIds: [], itemNames: [] })),
                onClear: ie[4] || (ie[4] = () => l({ hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        e.query.queryType === "metrics" ? (ne(), xe("div", Cce, [
          F("div", $ce, oe(T(i)("panel.itemTag")), 1),
          h(T(Xo), {
            spinning: C.value,
            size: "small"
          }, {
            default: he(() => [
              h(is, {
                value: e.query.itemTagsFilter || void 0,
                placeholder: T(i)("panel.itemTag.placeholder"),
                groups: u("── 标签 ──", P.value),
                onChange: ie[5] || (ie[5] = (te) => l({ itemTagsFilter: te ?? "", itemIds: [], itemNames: [] })),
                onClear: ie[6] || (ie[6] = () => l({ itemTagsFilter: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])) : nt("", !0)
      ], 4)) : nt("", !0),
      e.query.queryType === "metrics" ? (ne(), xe("div", Pce, [
        F("div", Oce, oe(T(i)("panel.items")), 1),
        h(is, {
          value: e.query.itemNames[0] || void 0,
          placeholder: T(i)("panel.items.placeholder"),
          groups: u("── 监控项 ──", I.value),
          onChange: ie[7] || (ie[7] = (te) => l({ itemNames: [te], itemIds: [] })),
          onClear: ie[8] || (ie[8] = () => l({ itemNames: [], itemIds: [] }))
        }, null, 8, ["value", "placeholder", "groups"])
      ])) : nt("", !0),
      e.query.queryType === "text" ? (ne(), xe(Je, { key: 2 }, [
        F("div", kce, [
          F("div", null, [
            F("div", Ice, oe(T(i)("panel.items")), 1),
            h(T(Xo), {
              spinning: M.value,
              size: "small"
            }, {
              default: he(() => [
                h(is, {
                  value: e.query.itemNames[0] || void 0,
                  placeholder: T(i)("panel.items.placeholder"),
                  disabled: !e.query.hostId,
                  groups: u("── 监控项 ──", _.value),
                  onChange: ie[9] || (ie[9] = (te) => l({ itemNames: [te], itemIds: [] })),
                  onClear: ie[10] || (ie[10] = () => l({ itemNames: [], itemIds: [] }))
                }, null, 8, ["value", "placeholder", "disabled", "groups"])
              ]),
              _: 1
            }, 8, ["spinning"])
          ]),
          F("div", null, [
            F("div", Mce, oe(T(i)("qb.textFilter")), 1),
            h(T(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.textFilter,
              onChange: ie[11] || (ie[11] = (te) => l({ textFilter: te.target.value }))
            }, null, 8, ["value"])
          ])
        ]),
        F("div", Tce, [
          h(T(Eo), {
            checked: e.query.useCaptureGroups,
            onChange: ie[12] || (ie[12] = (te) => l({ useCaptureGroups: te.target.checked }))
          }, null, 8, ["checked"]),
          F("span", _ce, oe(T(i)("qb.useCaptureGroups")), 1)
        ])
      ], 64)) : nt("", !0),
      e.query.queryType === "itemid" ? (ne(), xe("div", Ece, [
        F("div", Dce, oe(T(i)("qb.itemIds")), 1),
        h(T(kt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.itemids,
          placeholder: T(i)("qb.itemIds.placeholder"),
          onChange: ie[13] || (ie[13] = (te) => l({ itemids: te.target.value }))
        }, null, 8, ["value", "placeholder"])
      ])) : nt("", !0),
      e.query.queryType === "triggers" ? (ne(), xe("div", Ace, [
        F("div", Rce, oe(T(i)("qb.triggerFilter")), 1),
        h(T(kt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.triggerFilter,
          onChange: ie[14] || (ie[14] = (te) => l({ triggerFilter: te.target.value }))
        }, null, 8, ["value"])
      ])) : nt("", !0),
      e.query.queryType === "problems" ? (ne(), xe(Je, { key: 5 }, [
        F("div", Nce, [
          F("div", null, [
            F("div", zce, oe(T(i)("qb.problemName")), 1),
            h(T(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.triggerFilter,
              onChange: ie[15] || (ie[15] = (te) => l({ triggerFilter: te.target.value }))
            }, null, 8, ["value"])
          ]),
          F("div", null, [
            F("div", Bce, oe(T(i)("qb.tags")), 1),
            h(T(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.tagsFilter,
              onChange: ie[16] || (ie[16] = (te) => l({ tagsFilter: te.target.value }))
            }, null, 8, ["value"])
          ]),
          F("div", null, [
            F("div", Fce, oe(T(i)("qb.show")), 1),
            h(T(Et), {
              size: "small",
              style: { width: "100%" },
              value: e.query.showProblems,
              options: W.map((te) => ({ value: te, label: K[te] })),
              onChange: ie[17] || (ie[17] = (te) => l({ showProblems: te }))
            }, null, 8, ["value", "options"])
          ])
        ]),
        F("div", null, [
          F("div", Lce, oe(T(i)("qb.severity")), 1),
          F("div", Hce, [
            (ne(), xe(Je, null, Ut(q, (te) => h(T(Pr), {
              key: te.value,
              color: e.query.severities.includes(te.value) ? te.color : void 0,
              class: "cursor-pointer select-none",
              style: Ht({ opacity: e.query.severities.includes(te.value) ? 1 : 0.4 }),
              onClick: () => l({ severities: e.query.severities.includes(te.value) ? e.query.severities.filter((ve) => ve !== te.value) : [...e.query.severities, te.value] })
            }, {
              default: he(() => [
                Le(oe(te.label), 1)
              ]),
              _: 2
            }, 1032, ["color", "style", "onClick"])), 64))
          ])
        ])
      ], 64)) : nt("", !0),
      e.query.queryType === "services" ? (ne(), xe("div", Vce, [
        F("div", null, [
          F("div", jce, oe(T(i)("qb.itService")), 1),
          h(T(Xo), {
            spinning: R.value,
            size: "small"
          }, {
            default: he(() => [
              h(is, {
                value: e.query.itServiceFilter || void 0,
                placeholder: T(i)("qb.itService.placeholder"),
                groups: u("── 服务 ──", N.value.map((te) => ({ value: te.name, label: te.name }))),
                onChange: ie[18] || (ie[18] = (te) => l({ itServiceFilter: te })),
                onClear: ie[19] || (ie[19] = () => l({ itServiceFilter: "" }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        F("div", null, [
          F("div", Wce, oe(T(i)("qb.slaProperty")), 1),
          h(T(Et), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaProperty,
            options: U,
            onChange: ie[20] || (ie[20] = (te) => l({ slaProperty: te }))
          }, null, 8, ["value"])
        ]),
        F("div", null, [
          F("div", Kce, oe(T(i)("qb.slaInterval")), 1),
          h(T(Et), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaInterval,
            options: ae,
            onChange: ie[21] || (ie[21] = (te) => l({ slaInterval: te }))
          }, null, 8, ["value"])
        ])
      ])) : nt("", !0),
      e.query.queryType === "macros" ? (ne(), xe("div", qce, [
        F("div", Yce, oe(T(i)("qb.macroFilter")), 1),
        h(T(Xo), {
          spinning: L.value,
          size: "small"
        }, {
          default: he(() => [
            h(is, {
              value: e.query.macroFilter || void 0,
              placeholder: "{$MACRO_NAME}",
              disabled: !e.query.hostId,
              groups: [{ label: "── 宏 ──", options: H.value.map((te) => ({ value: te.macro, label: `${te.macro} = ${te.value}` })) }],
              onChange: ie[22] || (ie[22] = (te) => l({ macroFilter: te })),
              onClear: ie[23] || (ie[23] = () => l({ macroFilter: "" }))
            }, null, 8, ["value", "disabled", "groups"])
          ]),
          _: 1
        }, 8, ["spinning"])
      ])) : nt("", !0),
      e.query.queryType === "lld" ? (ne(), xe("div", Gce, [
        F("div", null, [
          F("div", Uce, oe(T(i)("qb.lld.rule")), 1),
          h(T(Xo), {
            spinning: A.value,
            size: "small"
          }, {
            default: he(() => [
              h(T(Et), {
                size: "small",
                style: { width: "100%" },
                "allow-clear": "",
                "show-search": "",
                value: e.query.lldRuleId || void 0,
                placeholder: T(i)("qb.lld.rule.placeholder"),
                options: B.value.map((te) => ({ value: te.itemid, label: te.name })),
                onChange: ie[24] || (ie[24] = (te) => l({ lldRuleId: te, lldRuleName: B.value.find((ve) => ve.itemid === te)?.name ?? te, lldItemKeys: [] })),
                onClear: ie[25] || (ie[25] = () => l({ lldRuleId: "", lldRuleName: "", lldItemKeys: [] }))
              }, null, 8, ["value", "placeholder", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        F("div", null, [
          F("div", Xce, oe(T(i)("qb.lld.itemKeys")), 1),
          h(T(Xo), {
            spinning: j.value,
            size: "small"
          }, {
            default: he(() => [
              h(T(Et), {
                size: "small",
                style: { width: "100%" },
                mode: "multiple",
                "allow-clear": "",
                value: e.query.lldItemKeys ?? [],
                options: G.value,
                onChange: ie[26] || (ie[26] = (te) => l({ lldItemKeys: te }))
              }, null, 8, ["value", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])
      ])) : nt("", !0),
      ["metrics", "itemid", "services"].includes(e.query.queryType) ? (ne(), dt(Lue, {
        key: 9,
        functions: e.query.functions ?? [],
        onChange: ie[27] || (ie[27] = (te) => l({ functions: te }))
      }, null, 8, ["functions"])) : nt("", !0),
      ["macros", "lld"].includes(e.query.queryType) ? nt("", !0) : (ne(), dt(vce, {
        key: 10,
        "query-type": e.query.queryType,
        options: e.query.options ?? {},
        onChange: ie[28] || (ie[28] = (te) => l({ options: te }))
      }, null, 8, ["query-type", "options"]))
    ]));
  }
});
class Zce {
  type = "argus";
  meta = { type: "argus", displayName: "Argus", icon: "📊" };
  QueryEditor = kue;
  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 Jce {
  type = "zabbix";
  meta = { type: "zabbix", displayName: "Zabbix", icon: "" };
  QueryEditor = Qce;
  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(t) {
    const { range: n, targets: o, maxDataPoints: i, scopedVars: r, _dsCfg: a } = t;
    if (!a)
      return { data: [], state: "Done" };
    const l = { url: a.url, token: a.token }, s = Math.floor(n.from / 1e3), u = Math.ceil(n.to / 1e3), c = r ?? {}, d = t._variableStates ?? {}, f = [];
    for (const p of o) {
      const v = uF(p, c, d);
      let g = [];
      if (v.queryType === "itemid" && v.itemids?.trim()) {
        const L = v.itemids.split(",").map((B) => B.trim()).filter(Boolean);
        g = await GB(L, l);
      } else if (v.hostIds.length > 0 && p.itemNames.length > 0) {
        const L = (await Promise.all(
          v.hostIds.map(
            (A) => Tk([A], void 0, void 0, l, v.itemTagsFilter || void 0)
          )
        )).flat(), B = new Set(p.itemNames.filter((A) => !A.startsWith("$")));
        g = L.filter((A) => B.has(A.name));
      }
      if (g.length === 0)
        continue;
      const [m, x] = await Promise.all([
        eF(
          g.map((L) => L.itemid),
          s,
          u,
          l
        ),
        p.options?.useZabbixValueMapping ? tF(l) : Promise.resolve([])
      ]);
      if (m.length === 0)
        continue;
      const S = /* @__PURE__ */ new Map();
      for (const L of x) {
        const B = {};
        for (const A of L.mappings)
          B[A.value] = A.newvalue;
        S.set(L.valuemapid, B);
      }
      const C = iF(m, g.map((L) => L.itemid)), P = Math.max(Math.ceil((u - s) / i), 60), $ = new Map(
        Array.from(C.entries()).map(([L, B]) => [
          L,
          B.length > i ? aF(B, P * 1e3) : B
        ])
      ), I = new Map(
        Array.from($.entries()).map(([L, B]) => [
          L,
          TB(B, s, u, P)
        ])
      ), w = (I.get(g[0].itemid) ?? []).map((L) => L.ts / 1e3), M = {
        timestamps: w,
        series: g.map((L) => {
          const B = I.get(L.itemid) ?? [];
          return { label: L.name, values: B.map((A) => A.value) };
        })
      }, _ = jB(M, p.functions ?? []), N = /* @__PURE__ */ new Map();
      _.series.forEach((L, B) => {
        const A = g[B];
        A && N.set(
          A.itemid,
          L.values.map((G, j) => ({ ts: w[j] * 1e3, value: G }))
        );
      });
      const R = g.slice(0, _.series.length), H = WB(N, R, S, p.datasourceId || "A");
      _.series.forEach((L, B) => {
        const A = H.fields[B + 1];
        A?.config && (A.config.displayNameFromDS = L.label);
      }), f.push(H);
    }
    return { data: f, state: "Done" };
  }
}
let IP = !1;
function ede() {
  if (IP)
    return;
  IP = !0, Xz();
  const e = new zz();
  e.QueryEditor = Nue, Ig(e), Ig(new Zce()), Ig(new Jce());
}
const ife = /* @__PURE__ */ be({
  __name: "ArgusBoard",
  props: {
    hideHeader: { type: Boolean, default: !1 },
    canEdit: { type: Boolean, default: !0 },
    theme: { default: null },
    lang: { default: null },
    isEditing: { type: [Boolean, null], default: null },
    initialEditingPanelId: { default: null },
    datasourceConfig: { default: null },
    initialConfig: {},
    renderDefaultDashboard: { type: Boolean },
    presets: {}
  },
  emits: ["save"],
  setup(e, { emit: t }) {
    const n = e, o = t;
    At(() => {
      console.warn(
        "%c ArgusBoard %c v1.0.2 %c 2026/7/9 09:00:42",
        "background:#4096ff;color:#fff;padding:2px 4px;border-radius:3px 0 0 3px;font-weight:bold",
        "background:#1f1f1f;color:#4096ff;padding:2px 4px;font-weight:bold",
        "background:#1f1f1f;color:#888;padding:2px 4px;border-radius:0 3px 3px 0"
      );
    }), ede(), ZE(() => ({
      hideHeader: n.hideHeader,
      canEdit: n.canEdit,
      theme: n.theme ?? null,
      lang: n.lang ?? null,
      isEditing: n.isEditing ?? null,
      initialEditingPanelId: n.initialEditingPanelId ?? null,
      datasourceConfig: n.datasourceConfig ?? null,
      initialConfig: n.initialConfig,
      renderDefaultDashboard: n.renderDefaultDashboard,
      presets: n.presets,
      onSave: (c) => o("save", c)
    }));
    const i = ta();
    n.theme && i.setTheme(n.theme);
    const r = E(() => n.theme ?? i.theme);
    Ie(r, (c) => {
      document.documentElement.dataset.theme = c, document.body.dataset.theme = c;
    }, { immediate: !0 });
    const a = le(n.lang ?? "zh");
    XE(a), Ie(() => n.lang, (c) => {
      c && (a.value = c);
    });
    const l = aa();
    function s(c) {
      c ? l.importJSON(
        typeof c == "string" ? c : JSON.stringify(c)
      ) : n.renderDefaultDashboard === !1 && l.importJSON(JSON.stringify({ title: "", panels: {}, layouts: [] }));
    }
    At(() => {
      n.canEdit === !1 ? l.setEditing(!1) : n.isEditing !== null && l.setEditing(n.isEditing ?? !0), s(n.initialConfig), n.initialEditingPanelId && l.setEditingPanel(n.initialEditingPanelId);
    }), Ie(() => n.initialConfig, (c) => {
      s(c);
    });
    const u = E(() => ({
      algorithm: r.value === "dark" ? N$.darkAlgorithm : N$.defaultAlgorithm,
      token: { colorPrimary: "#1677ff", borderRadius: 4 },
      getPopupContainer: () => document.body
    }));
    return (c, d) => (ne(), dt(T(Ba), { theme: u.value }, {
      default: he(() => [
        h(_se)
      ]),
      _: 1
    }, 8, ["theme"]));
  }
}), tde = { class: "log-toolbar" }, nde = { class: "log-scroller" }, ode = { class: "log-time" }, ide = { class: "log-message" }, rde = {
  key: 0,
  class: "log-empty"
}, ade = /* @__PURE__ */ be({
  __name: "LogViewer",
  props: {
    logs: {},
    maxHeight: { default: 400 }
  },
  setup(e) {
    const t = e, n = le(""), o = le([]), i = E(() => t.logs.filter((a) => !(o.value.length > 0 && !o.value.includes(a.level) || n.value && !a.message.toLowerCase().includes(n.value.toLowerCase())))), r = {
      error: "#ff4d4f",
      warn: "#faad14",
      info: "#52c41a",
      debug: "#8c8c8c"
    };
    return (a, l) => {
      const s = yn("a-input"), u = yn("a-select");
      return ne(), xe("div", {
        class: "log-viewer",
        style: Ht({ maxHeight: `${e.maxHeight}px` })
      }, [
        F("div", tde, [
          h(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"]),
          h(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"])
        ]),
        F("div", nde, [
          (ne(!0), xe(Je, null, Ut(i.value, (c) => (ne(), xe("div", {
            key: c.id,
            class: "log-entry"
          }, [
            F("span", ode, oe(new Date(c.timestamp).toLocaleTimeString()), 1),
            F("span", {
              class: "log-level",
              style: Ht({ color: r[c.level] })
            }, oe(c.level.toUpperCase()), 5),
            F("span", ide, oe(c.message), 1)
          ]))), 128))
        ]),
        i.value.length === 0 ? (ne(), xe("div", rde, " No log entries ")) : nt("", !0)
      ], 4);
    };
  }
}), rfe = /* @__PURE__ */ wi(ade, [["__scopeId", "data-v-22a0d40d"]]), lde = {
  key: 0,
  class: "topology-empty"
}, sde = ["width", "height"], ude = { class: "edges" }, cde = ["x1", "y1", "x2", "y2"], dde = ["cx", "cy", "fill", "stroke"], fde = ["x", "y"], pde = ["x", "y"], hde = /* @__PURE__ */ be({
  __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 a = Math.ceil(Math.sqrt(t.nodes.length)), l = t.width / a, s = t.height / Math.ceil(t.nodes.length / a), u = {};
      t.nodes.forEach((c, d) => {
        const f = d % a, p = Math.floor(d / a);
        u[c.id] = {
          x: f * l + l / 2,
          y: p * s + s / 2
        };
      }), o.value = u;
    }
    At(i);
    function r(a) {
      return a ? a > 0.05 ? "#ff4d4f" : a > 0.01 ? "#faad14" : "#52c41a" : "#52c41a";
    }
    return (a, l) => (ne(), xe("div", {
      class: "service-topology",
      style: Ht({ width: `${e.width}px`, height: `${e.height}px` })
    }, [
      e.nodes.length === 0 ? (ne(), xe("div", lde, " No topology data ")) : (ne(), xe("svg", {
        key: 1,
        ref_key: "svgRef",
        ref: n,
        width: e.width,
        height: e.height
      }, [
        F("g", ude, [
          (ne(!0), xe(Je, null, Ut(e.edges, (s) => (ne(), xe("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, cde))), 128))
        ]),
        l[0] || (l[0] = F("defs", null, [
          F("marker", {
            id: "arrowhead",
            markerWidth: "10",
            markerHeight: "7",
            refX: "10",
            refY: "3.5",
            orient: "auto"
          }, [
            F("polygon", {
              points: "0 0, 10 3.5, 0 7",
              fill: "var(--ant-color-border)"
            })
          ])
        ], -1)),
        (ne(!0), xe(Je, null, Ut(e.nodes, (s) => (ne(), xe("g", {
          key: s.id,
          class: "topology-node"
        }, [
          F("circle", {
            cx: o.value[s.id]?.x ?? 0,
            cy: o.value[s.id]?.y ?? 0,
            r: "24",
            fill: r(s.errorRate),
            "fill-opacity": "0.15",
            stroke: r(s.errorRate),
            "stroke-width": "2"
          }, null, 8, dde),
          F("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)"
          }, oe(s.name), 9, fde),
          s.latency !== void 0 ? (ne(), xe("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)"
          }, oe(s.latency) + "ms ", 9, pde)) : nt("", !0)
        ]))), 128))
      ], 8, sde))
    ], 4));
  }
}), afe = /* @__PURE__ */ wi(hde, [["__scopeId", "data-v-da85d863"]]), gde = { class: "trace-waterfall" }, vde = {
  key: 0,
  class: "trace-empty"
}, mde = { class: "trace-name-col" }, bde = { class: "trace-service" }, yde = { class: "trace-op" }, xde = { class: "trace-bar-col" }, wde = { class: "trace-dur-col" }, Sde = /* @__PURE__ */ be({
  __name: "TraceWaterfall",
  props: {
    spans: { default: () => [] },
    startTime: {},
    endTime: {}
  },
  setup(e) {
    const t = e, n = E(() => t.startTime ?? Math.min(...t.spans.map((u) => u.startTime))), o = E(() => t.endTime ?? Math.max(...t.spans.map((u) => u.startTime + u.duration))), i = E(() => o.value - n.value);
    function r(u) {
      return (u.startTime - n.value) / i.value * 100;
    }
    function a(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) => (ne(), xe("div", gde, [
      e.spans.length === 0 ? (ne(), xe("div", vde, " No trace data ")) : (ne(), xe(Je, { key: 1 }, [
        c[0] || (c[0] = F("div", { class: "trace-header" }, [
          F("div", { class: "trace-name-col" }, " Operation "),
          F("div", { class: "trace-bar-col" }, " Timeline "),
          F("div", { class: "trace-dur-col" }, " Duration ")
        ], -1)),
        (ne(!0), xe(Je, null, Ut(e.spans, (d) => (ne(), xe("div", {
          key: d.spanId,
          class: "trace-row"
        }, [
          F("div", mde, [
            F("span", bde, oe(d.serviceName), 1),
            F("span", yde, oe(d.operationName), 1)
          ]),
          F("div", xde, [
            F("div", {
              class: "trace-bar",
              style: Ht({
                left: `${r(d)}%`,
                width: `${a(d)}%`,
                background: s[d.status ?? "unset"]
              })
            }, null, 4)
          ]),
          F("div", wde, oe(l(d.duration)), 1)
        ]))), 128))
      ], 64))
    ]));
  }
}), lfe = /* @__PURE__ */ wi(Sde, [["__scopeId", "data-v-0212681c"]]), sfe = /* @__PURE__ */ be({
  __name: "SimpleChart",
  props: {
    options: {},
    data: {}
  },
  setup(e) {
    const t = e, n = le(), o = le(null), i = le({ width: 0, height: 0 });
    let r = null;
    function a() {
      o.value && (o.value.destroy(), o.value = null);
    }
    return qt(() => {
      r?.disconnect(), a();
    }), It((l) => {
      n.value && (r = 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) });
      }), r.observe(n.value), i.value = {
        width: Math.floor(n.value.getBoundingClientRect().width),
        height: Math.floor(n.value.getBoundingClientRect().height)
      }, l(() => {
        r?.disconnect();
      }));
    }), It((l) => {
      !n.value || i.value.width <= 0 || i.value.height <= 0 || (a(), o.value = new xo(
        { ...t.options, width: i.value.width, height: i.value.height },
        t.data,
        n.value
      ), l(() => {
        a();
      }));
    }), (l, s) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: n,
      class: "w-full h-full"
    }, null, 512));
  }
}), Cde = { class: "kbd-key" }, $de = /* @__PURE__ */ be({
  __name: "Kbd",
  props: {
    char: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("kbd", Cde, [
      ai(t.$slots, "default", {}, () => [
        Le(oe(e.char), 1)
      ], !0)
    ]));
  }
}), ufe = /* @__PURE__ */ wi($de, [["__scopeId", "data-v-94fb4749"]]), Pde = ["href", "target"], Ode = {
  key: 1,
  class: "panel-links-icon",
  style: { cursor: "pointer" }
}, kde = { style: { "font-size": "10px", "margin-left": "2px" } }, Ide = /* @__PURE__ */ be({
  __name: "PanelLinksIcon",
  props: {
    panel: {}
  },
  setup(e) {
    return (t, n) => e.panel.links && e.panel.links.length > 0 ? (ne(), dt(T(Lo), {
      key: 0,
      title: e.panel.links.map((o) => o.title ?? o.url).join(", ")
    }, {
      default: he(() => [
        e.panel.links.length === 1 ? (ne(), xe("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] = ui(() => {
          }, ["stop"]))
        }, [...n[1] || (n[1] = [
          F("span", {
            class: "i-mdi-link",
            style: { "font-size": "14px" }
          }, null, -1)
        ])], 8, Pde)) : (ne(), xe("span", Ode, [
          n[2] || (n[2] = F("span", {
            class: "i-mdi-link-variant",
            style: { "font-size": "14px" }
          }, null, -1)),
          F("span", kde, oe(e.panel.links.length), 1)
        ]))
      ]),
      _: 1
    }, 8, ["title"])) : nt("", !0);
  }
}), cfe = /* @__PURE__ */ wi(Ide, [["__scopeId", "data-v-6925a5a2"]]), Mde = { class: "viz-picker" }, Tde = { class: "viz-picker-title" }, _de = { class: "viz-picker-grid" }, Ede = ["onClick"], Dde = { class: "viz-picker-label" }, Ade = /* @__PURE__ */ be({
  __name: "VizPickerPane",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = vc(), i = [
      { type: "timeseries", icon: mt.chartLine, labelKey: "config.type.timeseries" },
      { type: "bar", icon: mt.chartBar, labelKey: "config.type.bar" },
      { type: "stat", icon: mt.stat, labelKey: "config.type.stat" },
      { type: "gauge", icon: mt.gauge, labelKey: "config.type.gauge" },
      { type: "pie", icon: mt.chartPie, labelKey: "config.type.pie" },
      { type: "table", icon: mt.table, labelKey: "config.type.table" },
      { type: "histogram", icon: mt.chartArea, labelKey: "config.type.histogram" }
    ];
    return (r, a) => (ne(), xe("div", Mde, [
      F("div", Tde, oe(T(t)("editor.vizPicker.title")), 1),
      F("div", _de, [
        (ne(), xe(Je, null, Ut(i, (l) => F("button", {
          key: l.type,
          class: Pt(["viz-picker-item", { "viz-picker-item--active": T(n).type === l.type }]),
          onClick: (s) => T(o)({ type: l.type })
        }, [
          F("span", {
            class: Pt(["viz-picker-icon", [l.icon]])
          }, null, 2),
          F("span", Dde, oe(T(t)(l.labelKey)), 1)
        ], 10, Ede)), 64))
      ])
    ]));
  }
}), dfe = /* @__PURE__ */ wi(Ade, [["__scopeId", "data-v-1d0d144f"]]);
export {
  mse as AddPanelModal,
  $E as AgChart,
  ife as ArgusBoard,
  kue as ArgusQueryEditor,
  Sse as DashboardHeader,
  _se as DashboardPage,
  ufe as Kbd,
  rfe as LogViewer,
  Nue as MockQueryEditor,
  OP as PanelContainer,
  nse as PanelEditorLayout,
  rse as PanelEditorModal,
  cfe as PanelLinksIcon,
  Ub as PanelRenderer,
  afe as ServiceTopology,
  sfe as SimpleChart,
  PE as TimeRangePicker,
  lfe as TraceWaterfall,
  CE as UPlotChart,
  OE as VariableBar,
  kle as VariableConfigModal,
  dfe as VizPickerPane,
  ZE as provideArgusBoardConfig,
  uae as providePlotContext,
  ede as registerAllPlugins,
  nc as useArgusBoardConfig,
  ofe as usePlotContext
};
