import{o as d,c as y,w as a,u as o,g as _,h as p,b as l,a as e,f as s,d as m,e as r}from"./app-SC54XQDl.js";import{P as x}from"./app-BGgVpkqZ.js";import{i as v,c as V}from"./app-Ba7ZqSpq.js";import{_ as $}from"./app-DWUwCFNm.js";import{_ as h}from"./app-CVQkwzlf.js";import{_ as u}from"./app-FlPLZh9D.js";import{_ as N}from"./app-DFulsyXy.js";import{C as f}from"./app-Ciy_QwIW.js";import{_ as b}from"./app-B2dMDOgF.js";import{_ as w}from"./app-huVLEujn.js";import{_ as C}from"./app-BvNab7uU.js";import{_ as R}from"./app-BJA9o9q8.js";import{_ as S}from"./app-CFVaWhUS.js";import{_ as k}from"./app-Dm_s2Shu.js";import{D as P}from"./app-ZeVDYyDS.js";import"./app-yUrwy8EY.js";import"./app-CNHjdV6U.js";import"./app-DnXuoh8P.js";import"./app-DZaelcLs.js";import"./app-PPG0ZS4d.js";import"./app-DoVkxbmA.js";import"./app-C2mBgI5Z.js";import"./app-Br6sp3du.js";import"./app-T1ysvErZ.js";import"./app-PrSv7rSt.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-CCkWSX4Q.js";import"./app-BxWqoSpr.js";function B(){v(this),this.shouldReplace=!1,this.headerName="",this.selectHeader=function(c){this.headerName=c}}const g={key:0},D={key:1},T=["value"],X=["value"],H=e("td",{class:"title"},[s("报头名称"),e("em",null,"（Name）"),s(" *")],-1),I={class:"comment"},L=e("td",null,[s("值"),e("em",null,"（Value）")],-1),U=e("p",{class:"comment"},"可以包含请求变量。",-1),q={colspan:"2"},A=e("td",null,"支持的状态码",-1),E=e("p",{class:"comment"},"不填表示支持所有的状态码。",-1),O=e("td",null,"支持的请求方法",-1),Y=e("td",null,"支持的域名",-1),j=e("td",null,"只附加不替换",-1),z=e("p",{class:"comment"},"选中后表示如果已经存在同名的报头，则只会附加在原有的报头之后，不会覆盖。",-1),F=e("td",null,"不在跳转时启用",-1),G=e("p",{class:"comment"},"选中后表示在30X跳转时不启用当前报头。",-1),J=e("td",{class:"color-border"},"启用内容替换",-1),K=e("p",{class:"comment"},"可以替换原有报头中的内容。",-1),M=e("td",{class:"color-border"},"替换内容",-1),Be={__name:"createSetPopup",setup(c){const t=V(new B);return(Q,n)=>(d(),y(x,null,{default:a(()=>[o(t).type=="request"?(d(),_("header",g,"添加自定义请求报头")):p("",!0),o(t).type=="response"?(d(),_("header",D,"添加自定义响应报头")):p("",!0),l(N,{action:"$",onSuccess:o(t).success},{default:a(()=>[e("input",{type:"hidden",name:"headerPolicyId",value:o(t).headerPolicyId},null,8,T),e("input",{type:"hidden",name:"type",value:o(t).type},null,8,X),l(P,null,{default:a(()=>[e("tbody",null,[e("tr",null,[H,e("td",null,[l(h,{type:"text",name:"name",value:"",maxlength:"200",placeholder:"类似于Server、Content-Type之类",autofocus:"",modelValue:o(t).headerName,"onUpdate:modelValue":n[0]||(n[0]=i=>o(t).headerName=i),autocomplete:"off",class:"w-full"},null,8,["modelValue"]),e("p",I,[l(b,{"v-type":o(t).type,"v-value":o(t).headerName,onSelect:o(t).selectHeader,class:"my-1"},null,8,["v-type","v-value","onSelect"]),s("请注意报头名称的大小写，如无特殊需求，报头名称的格式通常为"),l(f,null,{default:a(()=>[s("Xxx")]),_:1}),s("或者"),l(f,null,{default:a(()=>[s("Xxx-Yyy")]),_:1}),s("。")])])]),e("tr",null,[L,e("td",null,[l(h,{type:"text",name:"value",maxlength:"500",class:"w-full"}),U])]),e("tr",null,[e("td",q,[l(w,null,{default:a(()=>[s("更多选项")]),_:1})])])]),m(e("tbody",null,[m(e("tr",null,[A,e("td",null,[l(R),E])],512),[[r,o(t).type=="response"]]),e("tr",null,[O,e("td",null,[l(S)])]),e("tr",null,[Y,e("td",null,[l(C)])]),e("tr",null,[j,e("td",null,[l(u,{name:"shouldAppend"}),z])]),m(e("tr",null,[F,e("td",null,[l(u,{name:"disableRedirect"}),G])],512),[[r,o(t).type=="response"]]),e("tr",null,[J,e("td",null,[l(u,{name:"shouldReplace",modelValue:o(t).shouldReplace,"onUpdate:modelValue":n[1]||(n[1]=i=>o(t).shouldReplace=i)},null,8,["modelValue"]),K])]),m(e("tr",null,[M,e("td",null,[l(k)])],512),[[r,o(t).shouldReplace]])],512),[[r,o(t).moreOptionsVisible]])]),_:1}),l($)]),_:1},8,["onSuccess"])]),_:1}))}};export{Be as default};
