import { defineComponent, ref, reactive, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, createVNode, createTextVNode, toRefs, unref, createCommentVNode, useCssVars, computed, isRef, withDirectives, vShow } from "vue";
import { b3 as RequestParamsTypeEnum, y as useDesignStore, a_ as SettingItemBox, b4 as SettingItem, i as icon, _ as _export_sfc, ba as RequestContentTypeEnum, bc as RequestBodyEnumList, bd as RequestBodyEnum, a$ as RequestHttpEnum, be as isDev } from "./index-67bc0910.js";
import { u as useTargetData } from "./useTargetData.hook-83638ed4.js";
import { s as selectTimeOptions, a as selectTypeOptions } from "./index-904b39c1.js";
import { M as MonacoEditor } from "./EditorWorker-e8a74551.js";
const _hoisted_1$3 = /* @__PURE__ */ createElementVNode("thead", null, [
  /* @__PURE__ */ createElementVNode("tr", null, [
    /* @__PURE__ */ createElementVNode("th"),
    /* @__PURE__ */ createElementVNode("th", null, "Key"),
    /* @__PURE__ */ createElementVNode("th", null, "Value"),
    /* @__PURE__ */ createElementVNode("th", null, "操作"),
    /* @__PURE__ */ createElementVNode("th", null, "结果")
  ])
], -1);
const _hoisted_2$1 = { style: { "width": "80px" } };
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    target: {
      type: Object,
      required: true,
      default: () => {
      }
    },
    editDisabled: {
      type: Boolean,
      required: false,
      default: false
    }
  },
  emits: ["update"],
  setup(__props, { emit: emits }) {
    const props = __props;
    ref(false);
    const defaultItem = {
      key: "",
      value: "",
      error: false
    };
    const tableArray = reactive({ content: [] });
    const blur = () => {
      let successNum = 0;
      tableArray.content.forEach((item) => {
        if (item.key !== "" && item.value == "" || item.key === "" && item.value !== "") {
          item.error = true;
        } else {
          successNum++;
          item.error = false;
        }
      });
      if (successNum == tableArray.content.length) {
        const updateObj = {};
        tableArray.content.forEach((e) => {
          if (e.key)
            updateObj[e.key] = e.value;
        });
        emits("update", updateObj);
      }
    };
    const add = (index) => {
      tableArray.content.splice(index + 1, 0, {
        key: "",
        value: "",
        error: false
      });
    };
    const remove = (index) => {
      if (tableArray.content.length !== 1) {
        tableArray.content.splice(index, 1);
      }
      blur();
    };
    watch(
      () => props.target,
      (target) => {
        tableArray.content = [];
        for (const k in target) {
          tableArray.content.push({
            key: k,
            value: target[k],
            error: false
          });
        }
        if (!tableArray.content.length)
          tableArray.content = [JSON.parse(JSON.stringify(defaultItem))];
      },
      {
        immediate: true,
        deep: true
      }
    );
    return (_ctx, _cache) => {
      const _component_n_input = resolveComponent("n-input");
      const _component_n_button = resolveComponent("n-button");
      const _component_n_table = resolveComponent("n-table");
      return openBlock(), createBlock(_component_n_table, {
        class: "go-request-header-table-box",
        "single-line": false,
        size: "small"
      }, {
        default: withCtx(() => [
          _hoisted_1$3,
          createElementVNode("tbody", null, [
            (openBlock(true), createElementBlock(Fragment, null, renderList(tableArray.content, (item, index) => {
              return openBlock(), createElementBlock("tr", { key: index }, [
                createElementVNode("td", null, toDisplayString(index + 1), 1),
                createElementVNode("td", null, [
                  createVNode(_component_n_input, {
                    value: item.key,
                    "onUpdate:value": ($event) => item.key = $event,
                    disabled: __props.editDisabled,
                    type: "text",
                    size: "small",
                    onBlur: blur
                  }, null, 8, ["value", "onUpdate:value", "disabled"])
                ]),
                createElementVNode("td", null, [
                  createVNode(_component_n_input, {
                    value: item.value,
                    "onUpdate:value": ($event) => item.value = $event,
                    disabled: __props.editDisabled,
                    type: "text",
                    size: "small",
                    onBlur: blur
                  }, null, 8, ["value", "onUpdate:value", "disabled"])
                ]),
                createElementVNode("td", null, [
                  createElementVNode("div", _hoisted_2$1, [
                    createVNode(_component_n_button, {
                      class: "go-ml-2",
                      type: "primary",
                      size: "small",
                      ghost: "",
                      disabled: __props.editDisabled,
                      onClick: ($event) => add(index)
                    }, {
                      default: withCtx(() => [
                        createTextVNode("+")
                      ]),
                      _: 2
                    }, 1032, ["disabled", "onClick"]),
                    createVNode(_component_n_button, {
                      class: "go-ml-2",
                      type: "warning",
                      size: "small",
                      ghost: "",
                      disabled: index === 0 && __props.editDisabled,
                      onClick: ($event) => remove(index)
                    }, {
                      default: withCtx(() => [
                        createTextVNode(" - ")
                      ]),
                      _: 2
                    }, 1032, ["disabled", "onClick"])
                  ])
                ]),
                createElementVNode("td", null, [
                  item.error ? (openBlock(), createBlock(_component_n_button, {
                    key: 0,
                    class: "go-ml-2",
                    text: "",
                    type: "error"
                  }, {
                    default: withCtx(() => [
                      createTextVNode(" 格式错误 ")
                    ]),
                    _: 1
                  })) : (openBlock(), createBlock(_component_n_button, {
                    key: 1,
                    class: "go-ml-2",
                    text: "",
                    type: "primary"
                  }, {
                    default: withCtx(() => [
                      createTextVNode(" 格式通过 ")
                    ]),
                    _: 1
                  }))
                ])
              ]);
            }), 128))
          ])
        ]),
        _: 1
      });
    };
  }
});
const index_vue_vue_type_style_index_0_lang = "";
const _hoisted_1$2 = { class: "go-mt-3" };
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    editDisabled: {
      type: Boolean,
      default: true
    }
  },
  setup(__props) {
    const { chartEditStore } = useTargetData();
    const { requestParams } = toRefs(chartEditStore.getRequestGlobalConfig);
    const tabValue = ref(RequestParamsTypeEnum.HEADER);
    const tabs = [RequestParamsTypeEnum.HEADER];
    const updateRequestParams = (paramsObj) => {
      if (tabValue.value === RequestParamsTypeEnum.HEADER) {
        requestParams.value[tabValue.value] = paramsObj;
      }
    };
    return (_ctx, _cache) => {
      const _component_n_tab = resolveComponent("n-tab");
      const _component_n_tabs = resolveComponent("n-tabs");
      return openBlock(), createElementBlock("div", null, [
        createVNode(_component_n_tabs, {
          type: "line",
          animated: "",
          value: tabValue.value,
          "onUpdate:value": _cache[0] || (_cache[0] = ($event) => tabValue.value = $event)
        }, {
          default: withCtx(() => [
            (openBlock(), createElementBlock(Fragment, null, renderList(tabs, (item) => {
              return createVNode(_component_n_tab, {
                key: item,
                name: item,
                tab: item
              }, {
                default: withCtx(() => [
                  createTextVNode(toDisplayString(item), 1)
                ]),
                _: 2
              }, 1032, ["name", "tab"]);
            }), 64))
          ]),
          _: 1
        }, 8, ["value"]),
        createElementVNode("div", _hoisted_1$2, [
          tabValue.value === unref(RequestParamsTypeEnum).HEADER ? (openBlock(), createBlock(unref(_sfc_main$4), {
            key: 0,
            editDisabled: __props.editDisabled,
            target: unref(requestParams)[tabValue.value],
            onUpdate: updateRequestParams
          }, null, 8, ["editDisabled", "target"])) : createCommentVNode("", true)
        ])
      ]);
    };
  }
});
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
  __name: "index",
  setup(__props) {
    useCssVars((_ctx) => ({
      "17e515f4": themeColor.value
    }));
    const { PencilIcon, ChevronDownOutlineIcon, ChevronUpOutlineIcon } = icon.ionicons5;
    const { chartEditStore } = useTargetData();
    const { requestOriginUrl, requestInterval, requestIntervalUnit } = toRefs(chartEditStore.getRequestGlobalConfig);
    const editDisabled = ref(true);
    const designStore = useDesignStore();
    const showTable = ref(false);
    const themeColor = computed(() => {
      return designStore.getAppTheme;
    });
    return (_ctx, _cache) => {
      const _component_n_tag = resolveComponent("n-tag");
      const _component_n_input = resolveComponent("n-input");
      const _component_n_input_number = resolveComponent("n-input-number");
      const _component_n_select = resolveComponent("n-select");
      const _component_n_input_group = resolveComponent("n-input-group");
      const _component_n_icon = resolveComponent("n-icon");
      const _component_n_button = resolveComponent("n-button");
      const _component_n_collapse_transition = resolveComponent("n-collapse-transition");
      const _component_n_tooltip = resolveComponent("n-tooltip");
      const _component_n_card = resolveComponent("n-card");
      return openBlock(), createBlock(_component_n_card, { class: "n-card-shallow" }, {
        default: withCtx(() => [
          createVNode(_component_n_tag, {
            type: "info",
            bordered: false,
            style: { "border-radius": "5px" }
          }, {
            default: withCtx(() => [
              createTextVNode(" 全局公共配置 ")
            ]),
            _: 1
          }),
          createVNode(unref(SettingItemBox), {
            name: "服务",
            itemRightStyle: {
              gridTemplateColumns: "5fr 2fr 1fr"
            }
          }, {
            default: withCtx(() => [
              createVNode(unref(SettingItem), { name: "前置 URL" }, {
                default: withCtx(() => [
                  createVNode(_component_n_input, {
                    value: unref(requestOriginUrl),
                    "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(requestOriginUrl) ? requestOriginUrl.value = $event : null),
                    valueModifiers: { trim: true },
                    disabled: editDisabled.value,
                    placeholder: "例：http://127.0.0.1/"
                  }, null, 8, ["value", "disabled"])
                ]),
                _: 1
              }),
              createVNode(unref(SettingItem), { name: "更新间隔，为 0 只会初始化" }, {
                default: withCtx(() => [
                  createVNode(_component_n_input_group, null, {
                    default: withCtx(() => [
                      createVNode(_component_n_input_number, {
                        class: "select-time-number",
                        value: unref(requestInterval),
                        "onUpdate:value": _cache[1] || (_cache[1] = ($event) => isRef(requestInterval) ? requestInterval.value = $event : null),
                        valueModifiers: { trim: true },
                        min: "0",
                        "show-button": false,
                        disabled: editDisabled.value,
                        placeholder: "请输入数字"
                      }, null, 8, ["value", "disabled"]),
                      createVNode(_component_n_select, {
                        class: "select-time-options",
                        value: unref(requestIntervalUnit),
                        "onUpdate:value": _cache[2] || (_cache[2] = ($event) => isRef(requestIntervalUnit) ? requestIntervalUnit.value = $event : null),
                        options: unref(selectTimeOptions),
                        disabled: editDisabled.value
                      }, null, 8, ["value", "options", "disabled"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }),
              withDirectives(createVNode(_component_n_button, {
                type: "primary",
                ghost: "",
                onClick: _cache[3] || (_cache[3] = ($event) => editDisabled.value = false)
              }, {
                icon: withCtx(() => [
                  createVNode(_component_n_icon, null, {
                    default: withCtx(() => [
                      createVNode(unref(PencilIcon))
                    ]),
                    _: 1
                  })
                ]),
                default: withCtx(() => [
                  createTextVNode(" 编辑配置 ")
                ]),
                _: 1
              }, 512), [
                [vShow, editDisabled.value]
              ])
            ]),
            _: 1
          }),
          createVNode(_component_n_collapse_transition, { show: showTable.value }, {
            default: withCtx(() => [
              createVNode(unref(_sfc_main$3), { editDisabled: editDisabled.value }, null, 8, ["editDisabled"])
            ]),
            _: 1
          }, 8, ["show"]),
          showTable.value ? (openBlock(), createElementBlock("div", {
            key: 0,
            class: "go-flex-center go-mt-3 down",
            onClick: _cache[4] || (_cache[4] = ($event) => showTable.value = false)
          }, [
            createVNode(_component_n_icon, { size: "32" }, {
              default: withCtx(() => [
                createVNode(unref(ChevronUpOutlineIcon))
              ]),
              _: 1
            })
          ])) : (openBlock(), createElementBlock("div", {
            key: 1,
            class: "go-flex-center go-mt-3 down",
            onClick: _cache[5] || (_cache[5] = ($event) => showTable.value = true)
          }, [
            createVNode(_component_n_tooltip, {
              trigger: "hover",
              placement: "top",
              "keep-alive-on-hover": false
            }, {
              trigger: withCtx(() => [
                createVNode(_component_n_icon, { size: "32" }, {
                  default: withCtx(() => [
                    createVNode(unref(ChevronDownOutlineIcon))
                  ]),
                  _: 1
                })
              ]),
              default: withCtx(() => [
                createTextVNode(" 展开 ")
              ]),
              _: 1
            })
          ]))
        ]),
        _: 1
      });
    };
  }
});
const index_vue_vue_type_style_index_0_scoped_1a5167a8_lang = "";
const RequestGlobalConfig = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1a5167a8"]]);
const _hoisted_1$1 = { style: { "width": "600px" } };
const _hoisted_2 = { class: "go-mt-3" };
const _hoisted_3 = { key: 0 };
const _hoisted_4 = { key: 1 };
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    targetDataRequest: Object
  },
  setup(__props) {
    const props = __props;
    const { requestHttpType, requestContentType, requestSQLContent, requestParams, requestParamsBodyType } = toRefs(
      props.targetDataRequest
    );
    const tabValue = ref(RequestParamsTypeEnum.PARAMS);
    const updateRequestParams = (paramsObj) => {
      if (tabValue.value !== RequestParamsTypeEnum.BODY) {
        requestParams.value[tabValue.value] = paramsObj;
      }
    };
    const updateRequestBodyTable = (paramsObj) => {
      if (tabValue.value === RequestParamsTypeEnum.BODY && // 仅有两种类型有 body
      (requestParamsBodyType.value === RequestBodyEnum.FORM_DATA || requestParamsBodyType.value === RequestBodyEnum.X_WWW_FORM_URLENCODED)) {
        requestParams.value[RequestParamsTypeEnum.BODY][requestParamsBodyType.value] = paramsObj;
      }
    };
    return (_ctx, _cache) => {
      const _component_n_tab = resolveComponent("n-tab");
      const _component_n_tabs = resolveComponent("n-tabs");
      const _component_n_radio = resolveComponent("n-radio");
      const _component_n_space = resolveComponent("n-space");
      const _component_n_radio_group = resolveComponent("n-radio-group");
      const _component_n_text = resolveComponent("n-text");
      const _component_n_card = resolveComponent("n-card");
      const _component_n_tag = resolveComponent("n-tag");
      return openBlock(), createBlock(_component_n_space, { vertical: "" }, {
        default: withCtx(() => [
          createElementVNode("div", _hoisted_1$1, [
            createVNode(_component_n_tabs, {
              value: unref(requestContentType),
              "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(requestContentType) ? requestContentType.value = $event : null),
              type: "segment",
              size: "small"
            }, {
              default: withCtx(() => [
                createVNode(_component_n_tab, {
                  name: unref(RequestContentTypeEnum).DEFAULT,
                  tab: "普通请求"
                }, null, 8, ["name"]),
                createVNode(_component_n_tab, {
                  name: unref(RequestContentTypeEnum).SQL,
                  tab: "SQL 请求"
                }, null, 8, ["name"])
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          withDirectives(createElementVNode("div", null, [
            createVNode(_component_n_tabs, {
              type: "line",
              animated: "",
              value: tabValue.value,
              "onUpdate:value": _cache[1] || (_cache[1] = ($event) => tabValue.value = $event)
            }, {
              default: withCtx(() => [
                (openBlock(true), createElementBlock(Fragment, null, renderList(unref(RequestParamsTypeEnum), (item) => {
                  return openBlock(), createBlock(_component_n_tab, {
                    key: item,
                    name: item,
                    tab: item
                  }, {
                    default: withCtx(() => [
                      createTextVNode(toDisplayString(item), 1)
                    ]),
                    _: 2
                  }, 1032, ["name", "tab"]);
                }), 128))
              ]),
              _: 1
            }, 8, ["value"]),
            createElementVNode("div", _hoisted_2, [
              tabValue.value !== unref(RequestParamsTypeEnum).BODY ? (openBlock(), createElementBlock("div", _hoisted_3, [
                createVNode(unref(_sfc_main$4), {
                  target: unref(requestParams)[tabValue.value],
                  onUpdate: updateRequestParams
                }, null, 8, ["target"])
              ])) : (openBlock(), createElementBlock("div", _hoisted_4, [
                createVNode(_component_n_radio_group, {
                  value: unref(requestParamsBodyType),
                  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => isRef(requestParamsBodyType) ? requestParamsBodyType.value = $event : null),
                  name: "radiogroup"
                }, {
                  default: withCtx(() => [
                    createVNode(_component_n_space, null, {
                      default: withCtx(() => [
                        (openBlock(true), createElementBlock(Fragment, null, renderList(unref(RequestBodyEnumList), (bodyEnum) => {
                          return openBlock(), createBlock(_component_n_radio, {
                            key: bodyEnum,
                            value: bodyEnum
                          }, {
                            default: withCtx(() => [
                              createTextVNode(toDisplayString(bodyEnum), 1)
                            ]),
                            _: 2
                          }, 1032, ["value"]);
                        }), 128))
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                }, 8, ["value"]),
                unref(requestParamsBodyType) === unref(RequestBodyEnum)["NONE"] ? (openBlock(), createBlock(_component_n_card, {
                  key: 0,
                  class: "go-mt-3 go-pb-3"
                }, {
                  default: withCtx(() => [
                    createVNode(_component_n_text, { depth: "3" }, {
                      default: withCtx(() => [
                        createTextVNode("该接口没有 Body 体")
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                })) : unref(requestParamsBodyType) === unref(RequestBodyEnum)["FORM_DATA"] || unref(requestParamsBodyType) === unref(RequestBodyEnum)["X_WWW_FORM_URLENCODED"] ? (openBlock(), createBlock(unref(_sfc_main$4), {
                  key: 1,
                  class: "go-mt-3",
                  target: unref(requestParams)[unref(RequestParamsTypeEnum).BODY][unref(requestParamsBodyType)],
                  onUpdate: updateRequestBodyTable
                }, null, 8, ["target"])) : unref(requestParamsBodyType) === unref(RequestBodyEnum)["JSON"] ? (openBlock(), createBlock(unref(MonacoEditor), {
                  key: 2,
                  modelValue: unref(requestParams)[unref(RequestParamsTypeEnum).BODY][unref(requestParamsBodyType)],
                  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(requestParams)[unref(RequestParamsTypeEnum).BODY][unref(requestParamsBodyType)] = $event),
                  width: "600px",
                  height: "200px",
                  language: "json"
                }, null, 8, ["modelValue"])) : unref(requestParamsBodyType) === unref(RequestBodyEnum)["XML"] ? (openBlock(), createBlock(unref(MonacoEditor), {
                  key: 3,
                  modelValue: unref(requestParams)[unref(RequestParamsTypeEnum).BODY][unref(requestParamsBodyType)],
                  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(requestParams)[unref(RequestParamsTypeEnum).BODY][unref(requestParamsBodyType)] = $event),
                  width: "600px",
                  height: "200px",
                  language: "html"
                }, null, 8, ["modelValue"])) : createCommentVNode("", true)
              ]))
            ])
          ], 512), [
            [vShow, unref(requestContentType) === unref(RequestContentTypeEnum).DEFAULT]
          ]),
          withDirectives(createElementVNode("div", null, [
            unref(requestHttpType) === unref(RequestHttpEnum).GET ? (openBlock(), createBlock(_component_n_text, { key: 0 }, {
              default: withCtx(() => [
                createTextVNode("SQL 类型不支持 Get 请求，请使用其它方式")
              ]),
              _: 1
            })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
              createVNode(_component_n_tag, { type: "warning" }, {
                default: withCtx(() => [
                  createTextVNode("需要后台提供专门处理 sql 的接口")
                ]),
                _: 1
              }),
              createVNode(unref(SettingItemBox), { name: "键名" }, {
                default: withCtx(() => [
                  createVNode(_component_n_tag, {
                    type: "primary",
                    bordered: false,
                    style: { "width": "40px", "font-size": "16px" }
                  }, {
                    default: withCtx(() => [
                      createTextVNode(" sql ")
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }),
              createVNode(unref(SettingItemBox), { name: "键值" }, {
                default: withCtx(() => [
                  createVNode(unref(MonacoEditor), {
                    modelValue: unref(requestSQLContent)["sql"],
                    "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(requestSQLContent)["sql"] = $event),
                    width: "600px",
                    height: "200px",
                    language: "sql"
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              })
            ], 64))
          ], 512), [
            [vShow, unref(requestContentType) === unref(RequestContentTypeEnum).SQL]
          ])
        ]),
        _: 1
      });
    };
  }
});
const index_vue_vue_type_style_index_0_scoped_00740feb_lang = "";
const RequestHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-00740feb"]]);
const xAxis = [
  "12a",
  "1a",
  "2a",
  "3a",
  "4a",
  "5a",
  "6a",
  "7a",
  "8a",
  "9a",
  "10a",
  "11a",
  "12p",
  "1p",
  "2p",
  "3p",
  "4p",
  "5p",
  "6p",
  "7p",
  "8p",
  "9p",
  "10p",
  "11p"
];
const yAxis = [
  "Saturday",
  "Friday",
  "Thursday",
  "Wednesday",
  "Tuesday",
  "Monday",
  "Sunday"
];
const seriesData = [
  [
    0,
    0,
    "@integer(0, 10)"
  ],
  [
    1,
    0,
    "@integer(0, 10)"
  ],
  [
    2,
    0,
    "-"
  ],
  [
    3,
    0,
    "-"
  ],
  [
    4,
    0,
    "-"
  ],
  [
    5,
    0,
    "-"
  ],
  [
    6,
    0,
    "-"
  ],
  [
    7,
    0,
    "-"
  ],
  [
    8,
    0,
    "-"
  ],
  [
    9,
    0,
    "-"
  ],
  [
    10,
    0,
    "-"
  ],
  [
    11,
    0,
    "@integer(0, 10)"
  ],
  [
    12,
    0,
    "@integer(0, 10)"
  ],
  [
    13,
    0,
    "@integer(0, 10)"
  ],
  [
    14,
    0,
    "@integer(0, 10)"
  ],
  [
    15,
    0,
    "@integer(0, 10)"
  ],
  [
    16,
    0,
    "@integer(0, 10)"
  ],
  [
    17,
    0,
    "@integer(0, 10)"
  ],
  [
    18,
    0,
    "@integer(0, 10)"
  ],
  [
    19,
    0,
    "@integer(0, 10)"
  ],
  [
    20,
    0,
    "@integer(0, 10)"
  ],
  [
    21,
    0,
    "@integer(0, 10)"
  ],
  [
    22,
    0,
    "@integer(0, 10)"
  ],
  [
    23,
    0,
    "@integer(0, 10)"
  ],
  [
    0,
    1,
    7
  ],
  [
    1,
    1,
    "-"
  ],
  [
    2,
    1,
    "-"
  ],
  [
    3,
    1,
    "-"
  ],
  [
    4,
    1,
    "-"
  ],
  [
    5,
    1,
    "-"
  ],
  [
    6,
    1,
    "-"
  ],
  [
    7,
    1,
    "-"
  ],
  [
    8,
    1,
    "-"
  ],
  [
    9,
    1,
    "-"
  ],
  [
    10,
    1,
    "@integer(0, 10)"
  ],
  [
    11,
    1,
    "@integer(0, 10)"
  ],
  [
    12,
    1,
    "@integer(0, 10)"
  ],
  [
    13,
    1,
    "@integer(0, 10)"
  ],
  [
    14,
    1,
    "@integer(0, 10)"
  ],
  [
    15,
    1,
    "@integer(0, 10)"
  ],
  [
    16,
    1,
    "@integer(0, 10)"
  ],
  [
    17,
    1,
    "@integer(0, 10)"
  ],
  [
    18,
    1,
    "@integer(0, 10)"
  ],
  [
    19,
    1,
    "@integer(0, 10)"
  ],
  [
    20,
    1,
    "@integer(0, 10)"
  ],
  [
    21,
    1,
    "@integer(0, 10)"
  ],
  [
    22,
    1,
    "@integer(0, 10)"
  ],
  [
    23,
    1,
    "@integer(0, 10)"
  ],
  [
    0,
    2,
    1
  ],
  [
    1,
    2,
    1
  ],
  [
    2,
    2,
    "-"
  ],
  [
    3,
    2,
    "-"
  ],
  [
    4,
    2,
    "-"
  ],
  [
    5,
    2,
    "-"
  ],
  [
    6,
    2,
    "-"
  ],
  [
    7,
    2,
    "-"
  ],
  [
    8,
    2,
    "-"
  ],
  [
    9,
    2,
    "-"
  ],
  [
    10,
    2,
    "@integer(0, 10)"
  ],
  [
    11,
    2,
    "@integer(0, 10)"
  ],
  [
    12,
    2,
    "@integer(0, 10)"
  ],
  [
    13,
    2,
    "@integer(0, 10)"
  ],
  [
    14,
    2,
    "@integer(0, 10)"
  ],
  [
    15,
    2,
    "@integer(0, 10)"
  ],
  [
    16,
    2,
    "@integer(0, 10)"
  ],
  [
    17,
    2,
    "@integer(0, 10)"
  ],
  [
    18,
    2,
    "@integer(0, 10)"
  ],
  [
    19,
    2,
    "@integer(0, 10)"
  ],
  [
    20,
    2,
    "@integer(0, 10)"
  ],
  [
    21,
    2,
    "@integer(0, 10)"
  ],
  [
    22,
    2,
    "@integer(0, 10)"
  ],
  [
    23,
    2,
    "@integer(0, 10)"
  ],
  [
    0,
    3,
    7
  ],
  [
    1,
    3,
    3
  ],
  [
    2,
    3,
    "-"
  ],
  [
    3,
    3,
    "-"
  ],
  [
    4,
    3,
    "-"
  ],
  [
    5,
    3,
    "-"
  ],
  [
    6,
    3,
    "-"
  ],
  [
    7,
    3,
    "-"
  ],
  [
    8,
    3,
    1
  ],
  [
    9,
    3,
    "-"
  ],
  [
    10,
    3,
    "@integer(0, 10)"
  ],
  [
    11,
    3,
    "@integer(0, 10)"
  ],
  [
    12,
    3,
    "@integer(0, 10)"
  ],
  [
    13,
    3,
    "@integer(0, 10)"
  ],
  [
    14,
    3,
    "@integer(0, 10)"
  ],
  [
    15,
    3,
    "@integer(0, 10)"
  ],
  [
    16,
    3,
    "@integer(0, 10)"
  ],
  [
    17,
    3,
    "@integer(0, 10)"
  ],
  [
    18,
    3,
    "@integer(0, 10)"
  ],
  [
    19,
    3,
    "@integer(0, 10)"
  ],
  [
    20,
    3,
    "@integer(0, 10)"
  ],
  [
    21,
    3,
    "@integer(0, 10)"
  ],
  [
    22,
    3,
    "@integer(0, 10)"
  ],
  [
    23,
    3,
    "@integer(0, 10)"
  ],
  [
    0,
    4,
    "@integer(0, 10)"
  ],
  [
    1,
    4,
    "@integer(0, 10)"
  ],
  [
    2,
    4,
    "-"
  ],
  [
    3,
    4,
    "-"
  ],
  [
    4,
    4,
    "-"
  ],
  [
    5,
    4,
    "@integer(0, 10)"
  ],
  [
    6,
    4,
    "-"
  ],
  [
    7,
    4,
    "-"
  ],
  [
    8,
    4,
    "-"
  ],
  [
    9,
    4,
    "@integer(0, 10)"
  ],
  [
    10,
    4,
    "@integer(0, 10)"
  ],
  [
    11,
    4,
    "@integer(0, 10)"
  ],
  [
    12,
    4,
    "@integer(0, 10)"
  ],
  [
    13,
    4,
    "@integer(0, 10)"
  ],
  [
    14,
    4,
    "@integer(0, 10)"
  ],
  [
    15,
    4,
    "@integer(0, 10)"
  ],
  [
    16,
    4,
    "@integer(0, 10)"
  ],
  [
    17,
    4,
    "@integer(0, 10)"
  ],
  [
    18,
    4,
    "@integer(0, 10)"
  ],
  [
    19,
    4,
    "@integer(0, 10)"
  ],
  [
    20,
    4,
    "@integer(0, 10)"
  ],
  [
    21,
    4,
    "@integer(0, 10)"
  ],
  [
    22,
    4,
    "@integer(0, 10)"
  ],
  [
    23,
    4,
    "-"
  ],
  [
    0,
    5,
    "@integer(0, 10)"
  ],
  [
    1,
    5,
    "@integer(0, 10)"
  ],
  [
    2,
    5,
    "-"
  ],
  [
    3,
    5,
    "@integer(0, 10)"
  ],
  [
    4,
    5,
    "-"
  ],
  [
    5,
    5,
    "-"
  ],
  [
    6,
    5,
    "-"
  ],
  [
    7,
    5,
    "-"
  ],
  [
    8,
    5,
    "@integer(0, 10)"
  ],
  [
    9,
    5,
    "-"
  ],
  [
    10,
    5,
    "@integer(0, 10)"
  ],
  [
    11,
    5,
    "@integer(0, 10)"
  ],
  [
    12,
    5,
    "@integer(0, 10)"
  ],
  [
    13,
    5,
    "@integer(0, 10)"
  ],
  [
    14,
    5,
    "@integer(0, 10)"
  ],
  [
    15,
    5,
    "@integer(0, 10)"
  ],
  [
    16,
    5,
    "@integer(0, 10)"
  ],
  [
    17,
    5,
    "@integer(0, 10)"
  ],
  [
    18,
    5,
    "-"
  ],
  [
    19,
    5,
    "@integer(0, 10)"
  ],
  [
    20,
    5,
    "@integer(0, 10)"
  ],
  [
    21,
    5,
    "@integer(0, 10)"
  ],
  [
    22,
    5,
    "@integer(0, 10)"
  ],
  [
    23,
    5,
    "-"
  ],
  [
    0,
    6,
    "@integer(0, 10)"
  ],
  [
    1,
    6,
    "-"
  ],
  [
    2,
    6,
    "-"
  ],
  [
    3,
    6,
    "-"
  ],
  [
    4,
    6,
    "-"
  ],
  [
    5,
    6,
    "-"
  ],
  [
    6,
    6,
    "-"
  ],
  [
    7,
    6,
    "-"
  ],
  [
    8,
    6,
    "-"
  ],
  [
    9,
    6,
    "-"
  ],
  [
    10,
    6,
    "@integer(0, 10)"
  ],
  [
    11,
    6,
    "-"
  ],
  [
    12,
    6,
    "@integer(0, 10)"
  ],
  [
    13,
    6,
    "@integer(0, 10)"
  ],
  [
    14,
    6,
    "@integer(0, 10)"
  ],
  [
    15,
    6,
    "@integer(0, 10)"
  ],
  [
    16,
    6,
    "-"
  ],
  [
    17,
    6,
    "-"
  ],
  [
    18,
    6,
    "-"
  ],
  [
    19,
    6,
    "-"
  ],
  [
    20,
    6,
    "@integer(0, 10)"
  ],
  [
    21,
    6,
    "@integer(0, 10)"
  ],
  [
    22,
    6,
    "@integer(0, 10)"
  ],
  [
    23,
    6,
    "@integer(0, 10)"
  ]
];
const heatmapJson = {
  xAxis,
  yAxis,
  seriesData
};
const scatterJson = [
  {
    dimensions: [
      "data1"
    ],
    source: [
      [
        10,
        "@integer(0, 100)"
      ],
      [
        8.07,
        "@integer(0, 100)"
      ],
      [
        13,
        "@integer(0, 100)"
      ],
      [
        9.05,
        "@integer(0, 100)"
      ],
      [
        11,
        "@integer(0, 100)"
      ],
      [
        14,
        "@integer(0, 100)"
      ],
      [
        13.4,
        "@integer(0, 100)"
      ],
      [
        10,
        "@integer(0, 100)"
      ],
      [
        14,
        "@integer(0, 100)"
      ],
      [
        12.5,
        "@integer(0, 100)"
      ],
      [
        9.15,
        "@integer(0, 100)"
      ],
      [
        11.5,
        "@integer(0, 100)"
      ],
      [
        3.03,
        "@integer(0, 100)"
      ],
      [
        12.2,
        "@integer(0, 100)"
      ],
      [
        2.02,
        "@integer(0, 100)"
      ],
      [
        1.05,
        "@integer(0, 100)"
      ],
      [
        4.05,
        "@integer(0, 100)"
      ],
      [
        6.03,
        "@integer(0, 100)"
      ],
      [
        12,
        "@integer(0, 100)"
      ],
      [
        12,
        "@integer(0, 100)"
      ],
      [
        7.08,
        "@integer(0, 100)"
      ],
      [
        5.02,
        "@integer(0, 100)"
      ]
    ]
  },
  {
    dimensions: [
      "data2"
    ],
    source: [
      [
        10,
        "@integer(0, 70)"
      ],
      [
        8.07,
        "@integer(0, 70)"
      ],
      [
        13,
        "@integer(0, 70)"
      ],
      [
        9.05,
        "@integer(0, 70)"
      ],
      [
        11,
        "@integer(0, 70)"
      ],
      [
        14,
        "@integer(0, 70)"
      ],
      [
        13.4,
        "@integer(0, 70)"
      ],
      [
        10,
        "@integer(0, 70)"
      ],
      [
        14,
        "@integer(0, 70)"
      ],
      [
        12.5,
        "@integer(0, 70)"
      ],
      [
        9.15,
        "@integer(0, 70)"
      ],
      [
        11.5,
        "@integer(0, 70)"
      ],
      [
        3.03,
        "@integer(0, 70)"
      ],
      [
        12.2,
        "@integer(0, 70)"
      ],
      [
        2.02,
        "@integer(0, 70)"
      ],
      [
        1.05,
        "@integer(0, 70)"
      ],
      [
        4.05,
        "@integer(0, 70)"
      ],
      [
        6.03,
        "@integer(0, 70)"
      ],
      [
        12,
        "@integer(0, 70)"
      ],
      [
        12,
        "@integer(0, 70)"
      ],
      [
        7.08,
        "@integer(0, 70)"
      ],
      [
        5.02,
        "@integer(0, 70)"
      ]
    ]
  }
];
const mapJson = {
  "markers|50": [
    {
      name: "某某地市",
      value: "@integer(2, 20)",
      position: [
        "@float(115, 117, 1, 6)",
        "@float(38, 40, 1, 6)"
      ]
    }
  ]
};
const tTreemapJson = [
  {
    name: "@name",
    value: "@integer(0, 1000)",
    children: [
      {
        name: "@name",
        value: "@integer(0, 500)"
      },
      {
        name: "@name",
        value: "@integer(0, 500)"
      }
    ]
  },
  {
    name: "@name",
    value: "@integer(0, 1000)",
    children: [
      {
        name: "@name",
        value: "@integer(0, 00)"
      },
      {
        name: "@name",
        value: "@integer(0, 500)"
      }
    ]
  },
  {
    name: "@name",
    value: "@integer(0, 1000)",
    children: [
      {
        name: "@name",
        value: "@integer(0, 1000)"
      }
    ]
  },
  {
    name: "@name",
    value: "@integer(0, 1000)",
    children: [
      {
        name: "@name",
        value: "@integer(0, 1000)"
      }
    ]
  }
];
const label = [
  {
    name: "a"
  },
  {
    name: "b"
  },
  {
    name: "a1"
  },
  {
    name: "a2"
  },
  {
    name: "b1"
  },
  {
    name: "b2"
  }
];
const links$1 = [
  {
    source: "a",
    target: "a1",
    value: "@integer(0, 10)"
  },
  {
    source: "a",
    target: "a2",
    value: "@integer(0, 10)"
  },
  {
    source: "b",
    target: "b1",
    value: "@integer(0, 10)"
  },
  {
    source: "a",
    target: "b1",
    value: "@integer(0, 10)"
  },
  {
    source: "b1",
    target: "a1",
    value: "@integer(0, 10)"
  },
  {
    source: "b1",
    target: "b2",
    value: "@integer(0, 10)"
  }
];
const levels = [
  {
    depth: 0,
    itemStyle: {
      color: "#decbe4"
    },
    lineStyle: {
      color: "source",
      opacity: 0.9
    }
  },
  {
    depth: 1,
    itemStyle: {
      color: "#b3cde3"
    },
    lineStyle: {
      color: "source",
      opacity: 0.6
    }
  },
  {
    depth: 2,
    itemStyle: {
      color: "#ccebc5"
    },
    lineStyle: {
      color: "source",
      opacity: 0.6
    }
  }
];
const sankeyJson = {
  label,
  links: links$1,
  levels
};
const nodes = [
  {
    id: "0",
    name: "Myriel",
    symbolSize: "@integer(0, 50)",
    x: -266.82776,
    y: 299.6904,
    value: "@integer(0, 50)",
    category: 3
  },
  {
    id: "1",
    name: "Napoleon",
    symbolSize: "@integer(0, 50)",
    x: -418.08344,
    y: 446.8853,
    value: "@integer(0, 50)",
    category: 5
  },
  {
    id: "2",
    name: "MlleBaptistine",
    symbolSize: "@integer(0, 50)",
    x: -212.76357,
    y: 245.29176,
    value: "@integer(0, 50)",
    category: 1
  },
  {
    id: "3",
    name: "MmeMagloire",
    symbolSize: "@integer(0, 50)",
    x: -242.82404,
    y: 235.26283,
    value: "@integer(0, 50)",
    category: 1
  },
  {
    id: "4",
    name: "CountessDeLo",
    symbolSize: "@integer(0, 50)",
    x: -379.30386,
    y: 429.06424,
    value: "@integer(0, 50)",
    category: 0
  }
];
const links = [
  {
    source: "1",
    target: "@integer(2, 4)"
  },
  {
    source: "2",
    target: "@integer(3, 4)"
  },
  {
    source: "3",
    target: "@integer(0, 2)"
  },
  {
    source: "3",
    target: "@integer(0, 1)"
  },
  {
    source: "4",
    target: "@integer(0, 3)"
  }
];
const categories = [
  {
    name: "A"
  },
  {
    name: "B"
  },
  {
    name: "C"
  },
  {
    name: "D"
  },
  {
    name: "E"
  },
  {
    name: "F"
  },
  {
    name: "G"
  },
  {
    name: "H"
  },
  {
    name: "I"
  }
];
const graphDataJson = {
  nodes,
  links,
  categories
};
const test = {
  // 单图表
  fetchMockSingleData: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: {
      dimensions: ["product", "dataOne"],
      "source|20": [
        {
          product: "@name",
          "dataOne|0-900": 3
        }
      ]
    }
  },
  // 胶囊图
  fetchCapsule: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: {
      dimensions: ["name", "value"],
      "source|2-5": [
        { "name|+1": ["厦门", "福州", "北京", "上海", "新疆", "郑州", "湖南", "内蒙古"], "value|0-40": 20 }
      ]
    }
  },
  // 图表
  fetchMockData: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: {
      dimensions: ["product", "dataOne", "dataTwo", "dataThree"],
      "source|20": [
        {
          product: "@name",
          "dataOne|100-900": 3,
          "dataTwo|100-900": 3,
          "dataThree|100-900": 3
        }
      ]
    }
  },
  // 排名列表
  fetchRankList: {
    code: 0,
    status: 200,
    msg: "请求成功",
    "data|50": [{ name: "@name", "value|100-900": 5 }]
  },
  // 轮播表格
  fetchScrollBoard: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: [
      ["行1列1", "行1列2", "1"],
      ["行2列1", "行2列2", "2"],
      ["行3列1", "行3列2", "3"],
      ["行4列1", "行4列2", "4"],
      ["行5列1", "行5列2", "5"],
      ["行6列1", "行6列2", "6"],
      ["行7列1", "行7列2", "行7列3"],
      ["行8列1", "行8列2", "行8列3"],
      ["行9列1", "行9列2", "行9列3"],
      ["行10列1", "行10列2", "行10列3"]
    ]
  },
  // 获取数字-浮点型
  fetchNumberFloat: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: "@float(0, 0.99, 1, 4)"
  },
  // 获取数字-整型
  fetchNumberInt: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: "@integer(0, 100)"
  },
  // 文字
  fetchText: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: "@paragraph(1, 10)"
  },
  // 图片
  fetchImage: (num) => ({
    code: 0,
    status: 200,
    msg: "请求成功",
    data: `https://robohash.org/${num}`
  }),
  // 雷达
  fetchRadar: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: {
      radarIndicator: [
        { name: "@name", max: 1e4 },
        { name: "@name", max: 1e4 },
        { name: "@name", max: 1e4 },
        { name: "@name", max: 1e4 },
        { name: "@name", max: 1e4 },
        { name: "@name", max: 1e4 }
      ],
      seriesData: [
        {
          value: [
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)"
          ],
          name: "data1"
        },
        {
          value: [
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)",
            "@integer(0, 10000)"
          ],
          name: "data2"
        }
      ]
    }
  },
  // 热力图
  fetchHeatmap: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: heatmapJson
  },
  // 散点图
  fetchScatterBasic: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: scatterJson
  },
  // 中国地图
  fetchMap: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: mapJson
  },
  // 词云
  fetchWordCloud: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: [
      {
        name: "@name",
        value: 8e3,
        textStyle: {
          color: "#78fbb2"
        },
        emphasis: {
          textStyle: {
            color: "red"
          }
        }
      },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" },
      { name: "@name", value: "@integer(10, 8000)" }
    ]
  },
  // 树图
  fetchTreemap: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: tTreemapJson
  },
  // 三维地球
  threeEarth01Data: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: [
      {
        startArray: { name: "@name", N: "@integer(10, 100)", E: "@integer(10, 100)" },
        "endArray|10": [{ name: "@name", N: "@integer(10, 100)", E: "@integer(10, 100)" }]
      }
    ]
  },
  // 桑基图
  fetchSankey: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: sankeyJson
  },
  // 关系图
  graphData: {
    code: 0,
    status: 200,
    msg: "请求成功",
    data: graphDataJson
  }
};
const chartDataUrl = "/mock/chartData";
const chartSingleDataUrl = "/mock/chartSingleData";
const numberFloatUrl = "/mock/number/float";
const numberIntUrl = "/mock/number/int";
const textUrl = "/mock/text";
const imageUrl = "/mock/image";
const rankListUrl = "/mock/rankList";
const scrollBoardUrl = "/mock/scrollBoard";
const radarUrl = "/mock/radarData";
const heatMapUrl = "/mock/heatMapData";
const scatterBasicUrl = "/mock/scatterBasic";
const mapUrl = "/mock/map";
const capsuleUrl = "/mock/capsule";
const wordCloudUrl = "/mock/wordCloud";
const treemapUrl = "/mock/treemap";
const threeEarth01Url = "/mock/threeEarth01Data";
const sankeyUrl = "/mock/sankey";
const graphUrl = "/mock/graphData";
[
  {
    // 正则
    // url: /\/mock\/mockData(|\?\S*)$/,
    url: chartDataUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchMockData
  },
  {
    url: chartSingleDataUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchMockSingleData
  },
  {
    url: numberFloatUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchNumberFloat
  },
  {
    url: numberIntUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchNumberInt
  },
  {
    url: textUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchText
  },
  {
    url: imageUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchImage(Math.round(Math.random() * 10))
  },
  {
    url: rankListUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchRankList
  },
  {
    url: scrollBoardUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchScrollBoard
  },
  {
    url: radarUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchRadar
  },
  {
    url: heatMapUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchHeatmap
  },
  {
    url: scatterBasicUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchScatterBasic
  },
  {
    url: mapUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchMap
  },
  {
    url: capsuleUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchCapsule
  },
  {
    url: wordCloudUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchWordCloud
  },
  {
    url: treemapUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchTreemap
  },
  {
    url: threeEarth01Url,
    method: RequestHttpEnum.GET,
    response: () => test.threeEarth01Data
  },
  {
    url: sankeyUrl,
    method: RequestHttpEnum.GET,
    response: () => test.fetchSankey
  },
  {
    url: graphUrl,
    method: RequestHttpEnum.GET,
    response: () => test.graphData
  }
];
const _hoisted_1 = { class: "go-pl-0" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    targetDataRequest: Object
  },
  setup(__props) {
    const props = __props;
    const { HelpOutlineIcon } = icon.ionicons5;
    const { chartEditStore } = useTargetData();
    const { requestOriginUrl } = toRefs(chartEditStore.getRequestGlobalConfig);
    const { requestInterval, requestIntervalUnit, requestHttpType, requestUrl } = toRefs(
      props.targetDataRequest
    );
    const apiList = [
      {
        value: `【图表】${chartDataUrl}`
      },
      {
        value: `【单数据图表】${chartSingleDataUrl}`
      },
      {
        value: `【文本】${textUrl}`
      },
      {
        value: `【0~100 整数】${numberIntUrl}`
      },
      {
        value: `【0~1小数】${numberFloatUrl}`
      },
      {
        value: `【图片地址】${imageUrl}`
      },
      {
        value: `【排名列表】${rankListUrl}`
      },
      {
        value: `【滚动表格】${scrollBoardUrl}`
      },
      {
        value: `【雷达】${radarUrl}`
      },
      {
        value: `【热力图】${heatMapUrl}`
      },
      {
        value: `【基础散点图】${scatterBasicUrl}`
      },
      {
        value: `【地图数据】${mapUrl}`
      },
      {
        value: `【胶囊柱图】${capsuleUrl}`
      },
      {
        value: `【词云】${wordCloudUrl}`
      },
      {
        value: `【树图】${treemapUrl}`
      },
      {
        value: `【三维地球】${threeEarth01Url}`
      },
      {
        value: `【桑基图】${sankeyUrl}`
      },
      {
        value: `【关系图】${graphUrl}`
      }
    ];
    return (_ctx, _cache) => {
      const _component_n_divider = resolveComponent("n-divider");
      const _component_n_icon = resolveComponent("n-icon");
      const _component_n_text = resolveComponent("n-text");
      const _component_n_tooltip = resolveComponent("n-tooltip");
      const _component_n_select = resolveComponent("n-select");
      const _component_n_input = resolveComponent("n-input");
      const _component_n_input_group = resolveComponent("n-input-group");
      const _component_n_input_number = resolveComponent("n-input-number");
      return openBlock(), createElementBlock(Fragment, null, [
        createVNode(_component_n_divider, {
          class: "go-my-3",
          "title-placement": "left"
        }),
        createVNode(unref(SettingItemBox), {
          itemRightStyle: {
            gridTemplateColumns: "6fr 2fr"
          },
          style: { "padding-right": "25px" }
        }, {
          name: withCtx(() => [
            createTextVNode(" 地址 "),
            unref(isDev)() ? (openBlock(), createBlock(_component_n_tooltip, {
              key: 0,
              trigger: "hover"
            }, {
              trigger: withCtx(() => [
                createVNode(_component_n_icon, {
                  size: "21",
                  depth: 3
                }, {
                  default: withCtx(() => [
                    createVNode(unref(HelpOutlineIcon))
                  ]),
                  _: 1
                })
              ]),
              default: withCtx(() => [
                createElementVNode("ul", _hoisted_1, [
                  createTextVNode(" 开发环境使用 mock 数据，请输入 "),
                  (openBlock(), createElementBlock(Fragment, null, renderList(apiList, (item) => {
                    return createElementVNode("li", {
                      key: item.value
                    }, [
                      createVNode(_component_n_text, { type: "info" }, {
                        default: withCtx(() => [
                          createTextVNode(toDisplayString(item.value), 1)
                        ]),
                        _: 2
                      }, 1024)
                    ]);
                  }), 64))
                ])
              ]),
              _: 1
            })) : createCommentVNode("", true)
          ]),
          default: withCtx(() => [
            createVNode(unref(SettingItem), { name: "请求方式 & URL 地址" }, {
              default: withCtx(() => [
                createVNode(_component_n_input_group, null, {
                  default: withCtx(() => [
                    createVNode(_component_n_select, {
                      class: "select-type-options",
                      value: unref(requestHttpType),
                      "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(requestHttpType) ? requestHttpType.value = $event : null),
                      options: unref(selectTypeOptions)
                    }, null, 8, ["value", "options"]),
                    createVNode(_component_n_input, {
                      value: unref(requestUrl),
                      "onUpdate:value": _cache[1] || (_cache[1] = ($event) => isRef(requestUrl) ? requestUrl.value = $event : null),
                      valueModifiers: { trim: true },
                      min: 1,
                      placeholder: "请输入地址（去除前置URL）"
                    }, {
                      prefix: withCtx(() => [
                        createVNode(_component_n_text, null, {
                          default: withCtx(() => [
                            createTextVNode(toDisplayString(unref(requestOriginUrl)), 1)
                          ]),
                          _: 1
                        }),
                        createVNode(_component_n_divider, { vertical: "" })
                      ]),
                      _: 1
                    }, 8, ["value"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            createVNode(unref(SettingItem), { name: "更新间隔，为 0 只会初始化" }, {
              default: withCtx(() => [
                createVNode(_component_n_input_group, null, {
                  default: withCtx(() => [
                    createVNode(_component_n_input_number, {
                      value: unref(requestInterval),
                      "onUpdate:value": _cache[2] || (_cache[2] = ($event) => isRef(requestInterval) ? requestInterval.value = $event : null),
                      valueModifiers: { trim: true },
                      class: "select-time-number",
                      min: "0",
                      "show-button": false,
                      placeholder: "默认使用全局数据"
                    }, null, 8, ["value"]),
                    createVNode(_component_n_select, {
                      class: "select-time-options",
                      value: unref(requestIntervalUnit),
                      "onUpdate:value": _cache[3] || (_cache[3] = ($event) => isRef(requestIntervalUnit) ? requestIntervalUnit.value = $event : null),
                      options: unref(selectTimeOptions)
                    }, null, 8, ["value", "options"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        createVNode(unref(SettingItemBox), {
          name: "选择方式",
          class: "go-mt-0"
        }, {
          default: withCtx(() => [
            createVNode(unref(RequestHeader), { targetDataRequest: __props.targetDataRequest }, null, 8, ["targetDataRequest"])
          ]),
          _: 1
        })
      ], 64);
    };
  }
});
const index_vue_vue_type_style_index_0_scoped_ccb89b17_lang = "";
const RequestTargetConfig = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ccb89b17"]]);
const index_vue_vue_type_style_index_0_scoped_6ace1718_lang = "";
const pondIndex_vue_vue_type_style_index_0_scoped_de860d6d_lang = "";
export {
  RequestGlobalConfig as R,
  RequestTargetConfig as a
};
