import{C as ya,a as ga,P as ft,V as ha}from"./styles-DC9heXnH.js";import{n as ba,D as wa,d as It,r as pt,s as _a,v as Dt,al as Sa,am as ka,a as ct,L as mt,M as $a,an as ce,o as $,b as D,f as o,w as d,a4 as vt,ao as H,T as yt,ap as At,e as g,aq as Fe,ar as Ne,c as J,t as B,as as xa,a7 as Pt,aj as se,g as y,at as Bt,au as Oa,u as Ea,W as za,y as c,av as Ia,a5 as z,K as Da,k as gt,h as u,a6 as re,ak as me,a3 as Ce,B as Aa,aw as Pa,S as ht,ai as bt,a8 as Ba}from"./index-BJD7BFLS.js";import{c as Na}from"./copyToClipboard-Dl-9eYgs.js";import{t as Ca,e as La,Z as Va,d as Nt,b as Ma,B as x,s as Ua,p as Ra,h as Ha,c as ja,f as qa,$ as Fa,g as Ja,i as Wa,j as Ka,k as Ga,l as Ya,T as le,M as w,D as q,I as ve,a as wt,O as _t}from"./index-DR269vK4.js";import{P as Ta,T as V,a as Je,G as Xa,L as St}from"./index-tLM7xysn.js";import{G as Za,S as kt}from"./index-BekCP-pf.js";import{S as Qa}from"./index-BVSAzRjT.js";import{T as en,a as $t}from"./index-UU4FlV3Q.js";import{N as tn,c as xt}from"./index-_z56Lj0y.js";import{N as an}from"./Spin-DAeNWeu4.js";import{N as nn,a as rn}from"./Flex-CMmms5TP.js";import{N as ln,a as Ot}from"./CollapseItem-BbXbtF9-.js";import{r as sn,N as on,s as We}from"./remove-UtZ-f6EU.js";import{g as F,i as un,t as dn,a as fn}from"./get-BbDDeVzm.js";import{i as Ge,a as pn,g as Te,u as cn,b as mn,c as vn,d as yn,s as gn,e as Ct,f as hn,r as bn,o as Lt,n as Vt,m as wn,h as _n,j as Sn,k as kn,l as $n,p as xn,q as On,t as Mt,v as En,w as zn,x as In,y as Ut}from"./isTypedArray-B1rZa9GE.js";import"./vue.runtime.esm-bundler-Bq_JOG-p.js";import"./Popselect-D5MN8Kyb.js";import"./get-slot-Bk_rJcZu.js";const Dn=ba("input-group-label",`
 position: relative;
 user-select: none;
 -webkit-user-select: none;
 box-sizing: border-box;
 padding: 0 12px;
 display: inline-block;
 border-radius: var(--n-border-radius);
 background-color: var(--n-group-label-color);
 color: var(--n-group-label-text-color);
 font-size: var(--n-font-size);
 line-height: var(--n-height);
 height: var(--n-height);
 flex-shrink: 0;
 white-space: nowrap;
 transition: 
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
`,[wa("border",`
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 border-radius: inherit;
 border: var(--n-group-label-border);
 transition: border-color .3s var(--n-bezier);
 `)]),An=Object.assign(Object.assign({},Dt.props),{size:String,bordered:{type:Boolean,default:void 0}}),Pn=It({name:"InputGroupLabel",props:An,setup(e){const{mergedBorderedRef:a,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:f}=_a(e),p=Dt("Input","-input-group-label",Dn,Sa,e,n),{mergedSizeRef:l}=ka(e,{mergedSize(b){var E,O;if(e.size!==void 0)return e.size;if(b)return b.mergedSize.value;const N=(O=(E=f?.value)===null||E===void 0?void 0:E.Input)===null||O===void 0?void 0:O.size;return N||"medium"}}),m=ct(()=>{const{value:b}=l,{common:{cubicBezierEaseInOut:E},self:{groupLabelColor:O,borderRadius:N,groupLabelTextColor:S,lineHeight:k,groupLabelBorder:C,[mt("fontSize",b)]:X,[mt("height",b)]:U}}=p.value;return{"--n-bezier":E,"--n-group-label-color":O,"--n-group-label-border":C,"--n-border-radius":N,"--n-group-label-text-color":S,"--n-font-size":X,"--n-line-height":k,"--n-height":U}}),h=r?$a("input-group-label",ct(()=>l.value[0]),m,e):void 0;return{mergedClsPrefix:n,mergedBordered:a,cssVars:r?void 0:m,themeClass:h?.themeClass,onRender:h?.onRender}},render(){var e,a,n;const{mergedClsPrefix:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),pt("div",{class:[`${r}-input-group-label`,this.themeClass],style:this.cssVars},(n=(a=this.$slots).default)===null||n===void 0?void 0:n.call(a),this.mergedBordered?pt("div",{class:`${r}-input-group-label__border`}):null)}}),Bn=({state:e,designConfig:a,props:n,constants:r})=>()=>{var f;return e.width?e.width+"px":n.width||((f=a?.constants)==null?void 0:f.DEFAULT_WIDTH)||r.DEFAULT_WIDTH},Nn=({state:e,designConfig:a,props:n,constants:r})=>()=>{var f;return e.height?e.height+"px":n.height||((f=a?.constants)==null?void 0:f.DEFAULT_HEIGHT)||r.DEFAULT_HEIGHT},Cn=({api:e})=>(a=!0)=>{e.handleClose("close",typeof a=="boolean"?a:!1)},Ln=({state:e,emit:a})=>()=>{e.visible||a("closed")},Vn=({props:e,parent:a,api:n})=>r=>{if(r?n.open():n.close(),r){const f=a.$el;e.appendToBody&&document.body.appendChild(f)}},Mn=({state:e,emit:a,vm:n})=>()=>{e.visible||setTimeout(()=>{e.visible=!0,a("open",n),a("update:visible",!0)},0)},Un=({api:e})=>()=>{e.handleClose("confirm")},Rn=({emit:e,props:a,state:n})=>(r,f)=>{const p=r==="mask"&&!a.maskClosable,l=!f&&typeof a.beforeClose=="function"&&a.beforeClose(r)===!1;p||l||n.visible&&(n.visible=!1,setTimeout(()=>{e("update:visible",!1),e(["close","confirm"].includes(r)?r:"close")},200))},Hn=({api:e,state:a,props:n})=>r=>{a.visible&&n.closeOnPressEscape&&(r.key==="Escape"||r.key==="Esc")&&e.handleClose("esc",!0)},jn=({api:e})=>()=>{document.addEventListener("keydown",e.keydown)},qn=({api:e})=>()=>{document.removeEventListener("keydown",e.keydown)},Fn=({state:e,vm:a})=>n=>{n.preventDefault();const r=n.touches?n.touches[0]:n,f=a.$refs.drawerBox;e.dragEvent.isDrag=!0,e.dragEvent.x=r.clientX,e.dragEvent.y=r.clientY,e.dragEvent.offsetWidth=f.offsetWidth,e.dragEvent.offsetHeight=f.offsetHeight},Jn=({state:e,props:a,emit:n})=>Va(1,r=>{if(!e.dragEvent.isDrag)return;r.preventDefault();const{placement:f}=a,{dragEvent:{x:p,y:l,offsetWidth:m,offsetHeight:h}}=e,{touches:b,targetTouches:E,changedTouches:O}=r,N=b&&b[0]||E&&E[0]||O&&O[0],{clientX:S,clientY:k}=N||r,C=S-p,X=k-l;if(f==="left")e.width=m+C;else if(f==="right")e.width=m-C;else if(f==="top"){const U=h+X;e.height=U>10?U:10}else if(f==="bottom"){const U=h-X;e.height=U>10?U:10}n("drag",{width:e.width,height:e.height})}),Wn=({state:e})=>a=>{e.dragEvent.isDrag&&(a.preventDefault(),e.dragEvent.isDrag=!1)},Kn=({api:e,vm:a})=>()=>{const n=a.$refs.dragBar;n.addEventListener("mousedown",e.mousedown),document.addEventListener("mousemove",e.mousemove),document.addEventListener("mouseup",e.mouseup),n.addEventListener("touchstart",e.mousedown),n.addEventListener("touchmove",e.mousemove),n.addEventListener("touchend",e.mouseup)},Gn=({api:e,vm:a})=>()=>{const n=a.$refs.dragBar;n.removeEventListener("mousedown",e.mousedown),document.removeEventListener("mousemove",e.mousemove),document.removeEventListener("mouseup",e.mouseup),n.removeEventListener("touchstart",e.mousedown),n.removeEventListener("touchmove",e.mousemove),n.removeEventListener("touchend",e.mouseup)},Yn=e=>()=>{La(document.body,e)},Tn=e=>()=>{Ca(document.body,e)},Xn=["state","close","closed","confirm","handleClose","open"],Zn=(e,{reactive:a,watch:n,onMounted:r,onBeforeUnmount:f,computed:p},{emit:l,vm:m,mode:h,parent:b,constants:E,designConfig:O})=>{const N=E.SCROLL_LOCK_CLASS(h),S={},k=a({visible:!1,width:0,height:0,dragEvent:{x:0,y:0,isDrag:!1,offsetWidth:0,offsetHeight:0},computedWidth:p(()=>S.computedWidth()),computedHeight:p(()=>S.computedHeight())});return Object.assign(S,{state:k,open:Mn({state:k,emit:l,vm:m}),confirm:Un({api:S}),close:Cn({api:S}),closed:Ln({state:k,emit:l}),handleClose:Rn({emit:l,props:e,state:k}),mousedown:Fn({state:k,vm:m}),mousemove:Jn({state:k,props:e,emit:l}),mouseup:Wn({state:k}),keydown:Hn({api:S,state:k,props:e}),addKeydownEvent:jn({api:S}),removeKeydownEvent:qn({api:S}),addDragEvent:Kn({api:S,vm:m}),removeDragEvent:Gn({api:S,vm:m}),watchVisible:Vn({props:e,parent:b,api:S}),showScrollbar:Yn(N),hideScrollbar:Tn(N),computedWidth:Bn({state:k,designConfig:O,props:e,constants:E}),computedHeight:Nn({state:k,designConfig:O,props:e,constants:E})}),r(()=>{const C=b.$el;e.appendToBody&&C&&C.parentNode!==document.body&&document.body.appendChild(C),e.dragable&&S.addDragEvent(),S.addKeydownEvent(),e.lockScroll&&e.visible&&S.showScrollbar()}),f(()=>{e.dragable&&S.removeDragEvent(),S.removeKeydownEvent(),e.lockScroll&&S.hideScrollbar();const C=b.$el;e.appendToBody&&C&&C.parentNode&&C.parentNode.removeChild(C)}),n(()=>e.visible,S.watchVisible,{immediate:!0}),n(()=>e.width,()=>k.width=0),S};function Qn(e,a){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=er(e))||a){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function er(e,a){if(e){if(typeof e=="string")return Et(e,a);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Et(e,a):void 0}}function Et(e,a){(a==null||a>e.length)&&(a=e.length);for(var n=0,r=Array(a);n<a;n++)r[n]=e[n];return r}var tr=function(a,n){for(var r=a.__vccOpts||a,f=Qn(n),p;!(p=f()).done;){var l=p.value,m=l[0],h=l[1];r[m]=h}return r},ar=Nt({components:{TinyButton:x,TinyTooltip:Ma,IconClose:qa(),IconHelpCircle:ja(),SlotWrapper:{props:["node"],render:function(){var a=this.node;return typeof a=="function"?a(Ha):a}}},props:[].concat(Ra,["visible","appendToBody","title","showHeader","showFooter","customClass","placement","width","height","mask","dragable","maskClosable","lockScroll","flex","showClose","zIndex","beforeClose","tipsProps","customSlots","closeOnPressEscape"]),emits:["update:visible","open","close","closed","confirm","drag"],setup:function(a,n){return Ua({props:a,context:n,renderless:Zn,api:Xn})}}),nr={"data-tag":"tiny-drawer",class:"tiny-drawer"},rr={class:"tiny-drawer__box"},lr={key:0,"data-tag":"drawer-header",ref:"header",class:"tiny-drawer__header-wrapper"},sr={key:1,class:"tiny-drawer__header"},or={class:"tiny-drawer__header-left"},ir={key:0,class:"tiny-drawer__title"},ur={class:"tiny-drawer__header-right"},dr={key:1,"data-tag":"drawer-footer",ref:"footer",class:"tiny-drawer__footer"};function fr(e,a,n,r,f,p){var l=ce("slot-wrapper"),m=ce("icon-help-circle"),h=ce("tiny-tooltip"),b=ce("icon-close"),E=ce("tiny-button");return $(),D("div",nr,[o(yt,{name:"drawer-fade"},{default:d(function(){return[e.mask&&e.state.visible?($(),D("div",{key:0,ref:"mask","aria-hidden":"true",class:"tiny-drawer__mask show-bg-color",style:vt({zIndex:e.zIndex}),onClick:a[0]||(a[0]=function(O){return e.handleClose("mask")})},null,4)):H("v-if",!0)]}),_:1}),o(yt,{name:"drawer-slide-"+e.placement,onAfterLeave:e.closed,persisted:""},{default:d(function(){return[At(g("div",{"data-tag":"tiny-drawer-main",ref:"drawerBox","aria-modal":"true",role:"dialog",class:Fe(["tiny-drawer__main",{"is-left":e.placement==="left","is-right":e.placement==="right","is-top":e.placement==="top","is-bottom":e.placement==="bottom","drag-effects":!e.state.dragEvent.isDrag,toggle:e.state.visible},"tiny-drawer-main",e.customClass]),style:vt({width:["left","right"].includes(e.placement)?e.state.computedWidth:null,height:["top","bottom","left","right"].includes(e.placement)||e.dragable?e.state.computedHeight:null,zIndex:e.zIndex,transform:e.state.visible?"none":null})},[e.dragable?($(),D("div",{key:0,"data-tag":"drawer-drag-bar",ref:"dragBar",class:Fe(["tiny-drawer__drag-bar",["left","right"].includes(e.placement)&&"p-left-Right",["top","bottom"].includes(e.placement)&&"p-top-Bottom",e.placement==="left"&&"p-left",e.placement==="right"&&"p-right",e.placement==="top"&&"p-top",e.placement==="bottom"&&"p-bottom"])},null,2)):H("v-if",!0),g("div",rr,[e.showHeader?($(),D("div",lr,[Ne(e.$slots,"header",{},function(){var O;return[(O=e.customSlots)!=null&&O.header?($(),J(l,{key:0,node:e.customSlots.header},null,8,["node"])):($(),D("div",sr,[g("div",or,[e.title?($(),D("div",ir,B(e.title),1)):H("v-if",!0),e.tipsProps?($(),J(h,xa(Pt({key:1},e.tipsProps)),{default:d(function(){return[o(m,{class:"tiny-drawer__help-icon"})]}),_:1},16)):H("v-if",!0)]),g("div",ur,[Ne(e.$slots,"header-right",{},function(){var N;return[(N=e.customSlots)!=null&&N.headerRight?($(),J(l,{key:0,node:e.customSlots.headerRight},null,8,["node"])):H("v-if",!0)]})])]))]}),e.showClose?($(),D("button",{key:0,type:"button",class:"tiny-drawer__headerbtn","aria-label":"Close",onClick:a[1]||(a[1]=function(O){return e.handleClose("close")})},[o(b,{role:"img","aria-label":"close",class:"tiny-svg-size tiny-drawer__close"})])):H("v-if",!0)],512)):H("v-if",!0),g("div",{"data-tag":"drawer-body",ref:"body",class:Fe(["tiny-drawer__body",{"flex flex-col":e.flex},"drawer-body"])},[Ne(e.$slots,"default",{},function(){var O;return[o(l,{node:(O=e.customSlots)==null?void 0:O.default},null,8,["node"])]})],2),e.showFooter?($(),D("div",dr,[Ne(e.$slots,"footer",{},function(){var O;return[(O=e.customSlots)!=null&&O.footer?($(),J(l,{key:0,node:e.customSlots.footer},null,8,["node"])):($(),D(se,{key:1},[o(E,{class:"tiny-drawer__cancel-btn",onClick:a[2]||(a[2]=function(N){return e.handleClose("cancel")})},{default:d(function(){return[y(B(e.t("ui.button.cancel")),1)]}),_:1}),o(E,{type:"primary",class:"tiny-drawer__confirm-btn",onClick:a[3]||(a[3]=function(N){return e.handleClose("confirm")})},{default:d(function(){return[y(B(e.t("ui.button.confirm")),1)]}),_:1})],64))]})],512)):H("v-if",!0)])],6),[[Bt,e.state.visible]])]}),_:3},8,["name","onAfterLeave"])])}var Ke=tr(ar,[["render",fr]]),pr={TINY_MODE:"pc"};function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var n=arguments[a];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(null,arguments)}var cr=function(a){var n,r=typeof process=="object"?(n=pr)==null?void 0:n.TINY_MODE:null;return Ke},Rt={SCROLL_LOCK_CLASS:function(a){var n={"mobile-first":"overflow-hidden",pc:"popup-parent--hidden dialog-box__scroll-lock"};return n[a]||""},DEFAULT_WIDTH:"500px",DEFAULT_HEIGHT:"100vh"},mr=ye({},Wa,{_constants:{type:Object,default:function(){return Rt}},appendToBody:{type:Boolean,default:function(){return!1}},visible:{type:Boolean,default:!1},customClass:[String,Object,Array],placement:{type:String,default:"right"},width:{type:String},height:{type:String},title:String,showClose:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},dragable:Boolean,lockScroll:{type:Boolean,default:!0},flex:{type:Boolean,default:!1},zIndex:{type:Number,default:2e3},beforeClose:Function,tipsProps:Object,customSlots:Object}),W=Nt({name:Ja+"Drawer",props:mr,setup:function(a,n){return Fa({props:a,context:n,template:cr})}}),vr={customClass:null,placement:"right",width:null,height:null,title:"",showClose:!0,showHeader:!0,showFooter:!1,mask:!0,maskClosable:!0,dragable:!1,lockScroll:!0,flex:!1,zIndex:2e3,beforeClose:null,tipsProps:null},Ht=function(a){var n;a===void 0&&(a={});var r={onOpen:function(h){var b;typeof((b=a.events)==null?void 0:b.open)=="function"&&a.events.open(h)},onClose:function(h){var b;typeof((b=a.events)==null?void 0:b.close)=="function"&&a.events.close(h)},onConfirm:function(h){var b;typeof((b=a.events)==null?void 0:b.confirm)=="function"&&a.events.confirm(h)}},f=ye({},vr,a,r),p=Ga({component:W,propsData:ye({},f,{_constants:Rt,tiny_mode:a.tiny_mode||((n=Ya().tiny_mode)==null?void 0:n.value)}),el:document.createElement("div")}),l=document.body;return l.appendChild(p.$el),Oa(function(){p.open()}),p},yr="3.undefined";W.model={prop:"visible",event:"update:visible"};W.service=Ht;W.install=function(e){e.component(W.name,W)};W.version=yr;Ka.TINYDrawer={init:function(a){var n=a.$apiPrefix||"$";a[n+"drawer"]=Ht}};function jt(e){return e}function gr(e){return function(a){return F(a,e)}}function hr(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function zt(e,a){return e===a||Number.isNaN(e)&&Number.isNaN(a)}function qt(e,a,n){return typeof n!="function"?qt(e,a,()=>{}):Ye(e,a,function r(f,p,l,m,h,b){const E=n(f,p,l,m,h,b);return E!==void 0?!!E:Ye(f,p,r,b)},new Map)}function Ye(e,a,n,r){if(a===e)return!0;switch(typeof a){case"object":return br(e,a,n,r);case"function":return Object.keys(a).length>0?Ye(e,{...a},n,r):zt(e,a);default:return hr(e)?typeof a=="string"?a==="":!0:zt(e,a)}}function br(e,a,n,r){if(a==null)return!0;if(Array.isArray(a))return Ft(e,a,n,r);if(a instanceof Map)return wr(e,a,n,r);if(a instanceof Set)return _r(e,a,n,r);const f=Object.keys(a);if(e==null||Ge(e))return f.length===0;if(f.length===0)return!0;if(r?.has(a))return r.get(a)===e;r?.set(a,e);try{for(let p=0;p<f.length;p++){const l=f[p];if(!Ge(e)&&!(l in e)||a[l]===void 0&&e[l]!==void 0||a[l]===null&&e[l]!==null||!n(e[l],a[l],l,e,a,r))return!1}return!0}finally{r?.delete(a)}}function wr(e,a,n,r){if(a.size===0)return!0;if(!(e instanceof Map))return!1;for(const[f,p]of a.entries()){const l=e.get(f);if(n(l,p,f,e,a,r)===!1)return!1}return!0}function Ft(e,a,n,r){if(a.length===0)return!0;if(!Array.isArray(e))return!1;const f=new Set;for(let p=0;p<a.length;p++){const l=a[p];let m=!1;for(let h=0;h<e.length;h++){if(f.has(h))continue;const b=e[h];let E=!1;if(n(b,l,p,e,a,r)&&(E=!0),E){f.add(h),m=!0;break}}if(!m)return!1}return!0}function _r(e,a,n,r){return a.size===0?!0:e instanceof Set?Ft([...e],[...a],n,r):!1}function Jt(e,a){return qt(e,a,()=>{})}function Sr(e){return Object.getOwnPropertySymbols(e).filter(a=>Object.prototype.propertyIsEnumerable.call(e,a))}function kr(e,a){return T(e,void 0,e,new Map,a)}function T(e,a,n,r=new Map,f=void 0){const p=f?.(e,a,n,r);if(p!==void 0)return p;if(Ge(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const l=new Array(e.length);r.set(e,l);for(let m=0;m<e.length;m++)l[m]=T(e[m],m,n,r,f);return Object.hasOwn(e,"index")&&(l.index=e.index),Object.hasOwn(e,"input")&&(l.input=e.input),l}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const l=new RegExp(e.source,e.flags);return l.lastIndex=e.lastIndex,l}if(e instanceof Map){const l=new Map;r.set(e,l);for(const[m,h]of e)l.set(m,T(h,m,n,r,f));return l}if(e instanceof Set){const l=new Set;r.set(e,l);for(const m of e)l.add(T(m,void 0,n,r,f));return l}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(pn(e)){const l=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,l);for(let m=0;m<e.length;m++)l[m]=T(e[m],m,n,r,f);return l}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const l=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,l),M(l,e,n,r,f),l}if(typeof File<"u"&&e instanceof File){const l=new File([e],e.name,{type:e.type});return r.set(e,l),M(l,e,n,r,f),l}if(typeof Blob<"u"&&e instanceof Blob){const l=new Blob([e],{type:e.type});return r.set(e,l),M(l,e,n,r,f),l}if(e instanceof Error){const l=new e.constructor;return r.set(e,l),l.message=e.message,l.name=e.name,l.stack=e.stack,l.cause=e.cause,M(l,e,n,r,f),l}if(e instanceof Boolean){const l=new Boolean(e.valueOf());return r.set(e,l),M(l,e,n,r,f),l}if(e instanceof Number){const l=new Number(e.valueOf());return r.set(e,l),M(l,e,n,r,f),l}if(e instanceof String){const l=new String(e.valueOf());return r.set(e,l),M(l,e,n,r,f),l}if(typeof e=="object"&&$r(e)){const l=Object.create(Object.getPrototypeOf(e));return r.set(e,l),M(l,e,n,r,f),l}return e}function M(e,a,n=e,r,f){const p=[...Object.keys(a),...Sr(a)];for(let l=0;l<p.length;l++){const m=p[l],h=Object.getOwnPropertyDescriptor(e,m);(h==null||h.writable)&&(e[m]=T(a[m],m,n,r,f))}}function $r(e){switch(Te(e)){case Ut:case In:case zn:case En:case Mt:case On:case xn:case $n:case kn:case Sn:case _n:case wn:case Vt:case Lt:case bn:case hn:case Ct:case gn:case yn:case vn:case mn:case cn:return!0;default:return!1}}function xr(e){return T(e,void 0,e,new Map,void 0)}function Or(e){return e=xr(e),a=>Jt(a,e)}function Er(e,a){return kr(e,(n,r,f,p)=>{if(typeof e=="object"){if(Te(e)===Lt&&typeof e.constructor!="function"){const l={};return p.set(e,l),M(l,e,f,p),l}switch(Object.prototype.toString.call(e)){case Vt:case Ct:case Mt:{const l=new e.constructor(e?.valueOf());return M(l,e),l}case Ut:{const l={};return M(l,e),l.length=e.length,l[Symbol.iterator]=e[Symbol.iterator],l}default:return}}})}function zr(e){return Er(e)}const Ir=/^(?:0|[1-9]\d*)$/;function Dr(e,a=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<a;case"symbol":return!1;case"string":return Ir.test(e)}}function Ar(e){return e!==null&&typeof e=="object"&&Te(e)==="[object Arguments]"}function Pr(e,a){let n;if(Array.isArray(a)?n=a:typeof a=="string"&&un(a)&&e?.[a]==null?n=dn(a):n=[a],n.length===0)return!1;let r=e;for(let f=0;f<n.length;f++){const p=n[f];if((r==null||!Object.hasOwn(r,p))&&!((Array.isArray(r)||Ar(r))&&Dr(p)&&p<r.length))return!1;r=r[p]}return!0}function Br(e,a){switch(typeof e){case"object":{Object.is(e?.valueOf(),-0)&&(e="-0");break}case"number":{e=fn(e);break}}return a=zr(a),function(n){const r=F(n,e);return r===void 0?Pr(n,e):a===void 0?r===void 0:Jt(r,a)}}function Nr(e){if(e==null)return jt;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?Br(e[0],e[1]):Or(e);case"string":case"symbol":case"number":return gr(e)}}function Cr(e,a=jt){return sn(e,Nr(a))}const Lr={style:{width:"40%","margin-bottom":"10px",display:"flex"}},Vr={style:{"margin-right":"10px",width:"90vw"}},Mr={style:{height:"250px"}},Ur={style:{"margin-top":"10px"}},Rr={style:{width:"30%","margin-bottom":"10px",display:"flex"}},Hr={style:{"margin-right":"10px"}},jr={style:{height:"90%"}},qr={id:"tiny-basic-loading",style:{width:"100%",height:"100%"}},Fr={class:"split-v-model"},Jr={style:{padding:"10px"}},Wr={style:{height:"35vh"}},Kr={style:{height:"35vh"}},Gr={style:{height:"35vh"}},Yr={style:{"margin-top":"10px","margin-left":"10px"}},Tr={style:{"margin-top":"5px"}},Xr={style:{"margin-top":"10px"}},Zr={style:{"margin-top":"10px"}},Qr={style:{"margin-top":"5px"}},el={style:{"margin-top":"10px"}},tl={style:{"margin-top":"5px"}},al={key:0,style:{"margin-top":"15px"}},nl={style:{"max-height":"60vh"}},rl=It({name:"apimanager",__name:"index",setup(e){const{routerPushByKey:a}=Ea(),{protocol:n,hostname:r,port:f}=za(),p=`${n}://${r}:${f}`,l={automaticLayout:!0,formatOnType:!0,formatOnPaste:!0};c("// some code...");const m=Ia(),h=i=>m.value=i,b=c(!1),E={name:[{required:!0,message:"名称必填"},{min:3,max:50,message:"名称长度在 3 到 50 个字符"}],parames:[{required:!0,message:"参数必填"}]},O=c(1),N=c({seqSerial:!0,editConfig:{trigger:"click",mode:"cell",showStatus:!0},editRules:E,validConfig:{message:"tooltip"},fetchData:{api:X},toolbar:{size:"small",resizable:!0,component:Za,buttons:[{code:"reload",name:"刷新",type:"info"},{code:"copy",name:"复制"},{code:"delete",name:"删除"},{code:"cancel",name:"取消选择"},{code:"save",name:"保存"},{code:"debug",name:"运行",type:"success"},{code:"mcp",name:"发布为智能体工具",type:"success"}]},events:{toolbarButtonClick:U},pager:{component:Ta,attrs:{currentPage:1,pageSize:10,pageSizes:[10,20,50],total:0,layout:"total, sizes, prev, pager, next, jumper"}},columns:[{type:"selection",width:"50"},{field:"name",title:"名称",showOverflow:!0,editor:{component:"input",autoselect:!0},width:"250"},{field:"code",title:"编码"},{field:"typeName",title:"类型",renderer:{component:le,attrs:{size:"small ",effect:"dark"}}},{field:"detail",title:"",renderer:{component:x,attrs:{type:"success",text:"查看",size:"small"}},width:"120"},{field:"edit",title:"",renderer:{component:x,attrs:{type:"info",text:"再次编辑",size:"small"}},width:"140"},{field:"addbiz",title:"",renderer:{component:x,attrs:{type:"success",text:"加入业务模块",size:"small"}}}]}),S=c(""),k=c();function C(i){O.value=i.currentPage}function X({page:i}){const{currentPage:t,pageSize:_}=i,v=(t-1)*_;return new Promise(async A=>{const P=await z({url:`${p}/api/apimanager/queryPage`,method:"get",params:{limit:_,offset:v,searchVal:S.value,type:"all"}});P.data.forEach(s=>{s.type=="1"||s.type=="2"?s.typeName="数据组件":s.typeName="工作流"}),k.value.clearScroll(),A({result:P.data,page:{total:P.response.data.total}})})}async function U({code:i,$grid:t}){const _=t.getData(),v=t.getSelectRecords(),A=t.getUpdateRecords().concat(t.getInsertRecords());switch(i){case"reload":{t.handleFetch("reload"),w.success("刷新成功");break}case"insert":k.value.insert({});break;case"copy":{if(v.length===0){V.alert("请至少选中一条记录");break}v.forEach(P=>{delete P._RID,delete P.code}),t.insert(v),w.success("复制成功");break}case"cancel":{t.clearSelection();break}case"delete":{if(v.length===0){V.alert("请至少选中一条记录");break}b.value=!0;try{v.forEach(async P=>{await z({url:`${p}/api/apimanager/delete`,method:"post",data:{code:P.code}})}),b.value=!1}catch{b.value=!1}w.success("删除成功"),t.removeSelecteds();break}case"save":{if(A.length===0){V.alert("没有修改记录");break}k.value.validate(P=>{if(P){b.value=!0;try{A.forEach(async s=>{await z({url:`${p}/api/apimanager/save`,method:"post",data:s})}),b.value=!1}catch{b.value=!1}w.success("保存成功")}else V.alert("校验不通过")});break}case"debug":{if(ie.value=!1,v.length===0||v.length>1){V.alert("请选中一条记录");break}const P=JSON.parse(v[0].parames);Z.value=JSON.stringify(P,null,4),be.value=v[0].code,v[0].simplify&&v[0].simplify.length>0?L.value=nt(JSON.parse(v[0].simplify)):L.value=[],j.value=!0;break}case"code":{if(v.length===0||v.length>1){V.alert("请选中一条记录");break}oe.value=!0;break}case"edit":break;case"export":{k.value.exportCsv({filename:"table.csv",original:!0,isHeader:!1,useTabs:!1,data:_});break}case"mcp":{if(v.length===0||v.length>1){V.alert("请选中一条记录");break}ae.value="",fe.value="",te.value=!0;break}}}function Wt(){k.value.handleFetch("reload")}const Le=c(!1);function Kt(){Le.value=!1}function Xe(i){if(typeof i=="string")try{const t=JSON.parse(i);return!!(typeof t=="object"&&t)}catch{return!1}}const ge=c(""),Ze=c({}),Qe=c();function Gt(){Xe(ge.value)&&(Ze.value=JSON.parse(ge.value),Qe.value=xt.createId())}const he=c(""),et=c({}),tt=c();function Yt(i){Xe(he.value)&&(et.value=i,tt.value=xt.createId(),Pe.value=he.value)}const oe=c(!1),j=c(!1),at=c(.4),be=c(""),Z=c(""),R=c(null),ie=c(!1);async function Tt(){if(!ie.value){const i=k.value.getSelectRecords();if(i.length===0||i.length>1){V.alert("请选中一条记录");return}}try{R.value=St.service({target:document.getElementById("tiny-basic-loading")});let i=null,t=!1,_="";try{const v={inputs:JSON.parse(Z.value)};let A=!0;bt(L.value)&&L.value.forEach(s=>{(!s.key||s.key.length==0)&&(A=!1),(!s.value||s.value.length==0)&&(A=!1)}),A&&(We(v,"inputs",de(L.value)),he.value=JSON.stringify(de(L.value))),Yt(de(L.value)),i=(await z({url:ie.value?`${p}/api/proxy/${st.value}/${ot.value}`:`${p}/api/execution/${be.value}`,method:"post",data:v})).response.data}catch(v){t=!0,_=v}t?ge.value=JSON.stringify({message:_}):(ge.value=JSON.stringify(i),Be.value=JSON.stringify(i)),Gt(),R.value.close()}catch{R.value.close(),w.error("失败")}}const Q=c(!1),ee=c(""),we=c(""),Ve=c(""),_e=c(!1),Se=c("0"),ue=c(""),Me=c("");function Xt(i){if(ee.value=i.row.code,we.value=i.row.parames,Se.value=i.row.type,ue.value=i.row.sourceType,Me.value="execution",i.columnIndex==4){if(_e.value=!1,Se.value=="2"){_e.value=!0;const t=JSON.parse(i.row.flow_data);Ve.value=`数据源编码：${t.poolCode}  语句：${t.sql}`}Q.value=!0}i.columnIndex==5&&(Se.value=="3"?Zt():V.alert("此类型不支持编辑")),i.columnIndex==6&&(ua(),Y.value="",ze.value=!0)}const ke=i=>{Na(i)};function Zt(){a("flowedit",{query:{code:ee.value}})}Da(()=>{k.value.clearScroll(),G()});const L=c([]);async function Qt(){try{if(R.value=St.service({target:document.getElementById("tiny-basic-loading")}),!bt(L.value)){V.alert("请先填写简化参数池"),R.value.close();return}let i=!0;if(L.value.forEach(_=>{(!_.key||_.key.length==0)&&(i=!1),(!_.value||_.value.length==0)&&(i=!1)}),!i){V.alert("存在空值，请检查"),R.value.close();return}if(ie.value){await z({url:`${p}/api/apimanager/save`,method:"post",data:{code:be.value,simplify:JSON.stringify(de(L.value))}}),R.value.close();return}const t=k.value.getSelectRecords();if(t.length===0||t.length>1){V.alert("请选中一条记录");return}We(t[0],"simplify",JSON.stringify(de(L.value))),We(t[0],"parames",Z.value),await z({url:`${p}/api/apimanager/save`,method:"post",data:t[0]}),k.value.handleFetch(),j.value=!j.value,R.value.close()}catch{R.value.close()}}function de(i){return i.reduce((t,_)=>(t[_.key]=_.value,t),{})}function nt(i){return Object.entries(i).map(([t,_])=>({key:t,value:_}))}const te=c(!1),ae=c(""),fe=c("");async function ea(){if(ae.value.length==0){w.info("请输入名称");return}if(fe.value.length==0){w.info("请输入描述");return}try{const i=k.value.getSelectRecords();let t;!i[0].simplify||i[0].simplify.length==0||i[0].simplify=="[]"?t="{}":t=i[0].simplify;const v=(await z({url:`${p}/api/openai/transText`,method:"post",data:{textInput:ae.value}})).data.res;if(!v||v.length==0){w.info("保存失败，请检查大模型配置");return}await z({url:`${p}/api/mcpmanager/save`,method:"post",data:{name:ae.value,description:fe.value,paramsSchema:t,code:i[0].code,transText:v}}),w.success("保存成功")}catch{w.error("保存失败")}te.value=!1}const Ue=c("biz"),$e=c(1),K=c(!1),rt=c([]);gt(Ue,(i,t)=>{i=="biz"&&t=="all"&&G()});async function G(){K.value=!0;try{const i=await z({url:`${p}/api/apiProxymanager/queryPage`,method:"get",params:{searchVal:Re.value,limit:6,offset:($e.value-1)*6}});K.value=!1,i.data&&(rt.value=i.data);const t=i.response.data.total;t&&(lt.value=t<=6?1:Math.floor(t/6)+1)}catch{K.value=!1,w.error("查询失败")}}gt($e,(i,t)=>{G()});const xe=c(""),Oe=c(""),ne=c(!1),lt=c(1);async function ta(){if(xe.value.length==0){w.info("请输入模块名称");return}if(Oe.value.length==0){w.info("请输入一级路径");return}try{await z({url:`${p}/api/apiProxymanager/save`,method:"post",data:{name:xe.value,path1:Oe.value}}),w.success("保存成功")}catch{w.error("保存失败")}ne.value=!1,G()}const Re=c("");function aa(){G()}const pe=c(!1),He=c([]);async function na(i){Y.value=i;try{const t=await z({url:`${p}/api/apiProxyDetail/queryAll`,method:"get",params:{path1:i}});t.data&&(He.value=t.data),pe.value=!0}catch{w.error("查询失败")}}async function ra(i,t,_){try{const v=await z({url:`${p}/api/apimanager/queryByCode`,method:"post",data:{code:i}});v.data&&(ee.value=_,we.value=v.data[0].parames,Se.value=v.data[0].type,ue.value=v.data[0].sourceType,Me.value=`proxy/${t}`,_e.value=!1,Q.value=!0)}catch{w.error("查询失败")}}const st=c(""),ot=c("");async function la(i,t,_,v){ie.value=!0,Ae.value=null,Pe.value="",Be.value="";try{const A=await z({url:`${p}/api/apimanager/queryByCode`,method:"post",data:{code:i}});if(A.data){const P=JSON.parse(A.data[0].parames);Z.value=JSON.stringify(P,null,4),be.value=A.data[0].code,st.value=t,ot.value=_,A.data[0].simplify&&A.data[0].simplify.length>0?L.value=nt(JSON.parse(A.data[0].simplify)):L.value=[],Ae.value=v,j.value=!0}}catch{w.error("查询失败")}}async function sa(i){try{const t=await z({url:`${p}/api/apimanager/queryByCode`,method:"post",data:{code:i}});if(t.data&&t.data[0].sourceType&&t.data[0].sourceType.length>0){w.info("数据组件类型暂不支持编辑");return}}catch{w.error("查询失败")}a("flowedit",{query:{code:i}})}async function oa(i,t,_){try{await z({url:`${p}/api/apiProxyDetail/save`,method:"post",data:{id:i,path2:t,name:_}}),w.success("保存成功")}catch{w.error("保存失败")}}async function ia(i){try{await z({url:`${p}/api/apiProxyDetail/delete`,method:"post",data:{id:i}}),w.success("删除成功"),Cr(He.value,{id:i})}catch{w.error("删除失败")}}const Y=c(""),je=c([]),Ee=c(""),ze=c(!1);async function ua(){je.value=[];const i=await z({url:`${p}/api/apiProxymanager/queryAll`,method:"get",params:{}});i.data&&i.data.forEach(t=>{je.value.push({value:F(t,"path1"),label:F(t,"name"),disabled:!1})})}async function da(){if(Y.value.length==0){w.info("请选择业务模块");return}if(Ee.value.length==0){w.info("请输入接口二级路径");return}try{const i=await z({url:`${p}/api/apimanager/queryByCode`,method:"post",data:{code:ee.value}});i.data&&(await z({url:`${p}/api/apimanager/saveToProxy`,method:"post",data:{name:i.data[0].name,code:i.data[0].code,path1:Y.value,path2:Ee.value}}),ze.value=!1,w.info("添加成功"))}catch{w.error("添加失败")}}async function fa(i){K.value=!0;try{await z({url:`${p}/api/apiProxymanager/deleteAll`,method:"post",data:{path1:i}}),G(),K.value=!1,w.info("删除成功")}catch{K.value=!1,w.error("删除失败")}}const Ie=c(""),De=c(!1),it=c(),ut=c(),qe=c([]);async function pa(i,t){it.value=i,ut.value=t,De.value=!0,ma()}async function ca(){if(Ie.value.length==0){w.warning("请选择AppId/AppSecret");return}try{const t=await(await fetch(`${p}/api/openapi/exportMarkDown`,{method:"POST",headers:{"Content-Type":"application/json;charset=utf-8"},body:JSON.stringify({base:p,port:f,path1:it.value,toSelectAppId:Ie.value})})).blob(),_=URL.createObjectURL(t),v=document.createElement("a");v.href=_,v.download=`${ut.value}-接口文档.md`,document.body.appendChild(v),v.click(),document.body.removeChild(v),URL.revokeObjectURL(_),De.value=!1}catch{}}async function ma(){qe.value=[];const i=await z({url:`${p}/api/appmanager/queryPage`,method:"get",params:{limit:1e3,offset:0}});i.data&&i.data.forEach(t=>{qe.value.push({value:`${F(t,"appId")}-${F(t,"appSecret")}`,label:`${F(t,"appId")}#${F(t,"remark")}`,disabled:!1})})}const Ae=c(),Pe=c(""),Be=c("");async function va(){if(!Ae.value||Pe.value.length==0||Be.value.length==0){w.warning("请先点击 [运行] 完成测试");return}try{await z({url:`${p}/api/apiProxyDetail/save`,method:"post",data:{id:Ae.value,parames:Pe.value,resp:Be.value}}),w.success("保存成功")}catch{w.error("保存失败")}}return(i,t)=>{const _=Aa,v=ga,A=ya,P=Pn;return $(),D("div",null,[o(u(Ce),null,{default:d(()=>[o(u(re),null,{default:d(()=>[o(u(en),{modelValue:Ue.value,"onUpdate:modelValue":t[5]||(t[5]=s=>Ue.value=s),"tab-style":"button-card"},{default:d(()=>[o(u($t),{title:"业务模块",name:"biz"},{default:d(()=>[g("div",Lr,[o(u(kt),{modelValue:Re.value,"onUpdate:modelValue":t[0]||(t[0]=s=>Re.value=s),placeholder:"请输入模块名称/一级路径进行搜索",onSearch:aa,clearable:""},null,8,["modelValue"]),o(u(x),{type:"success",style:{"margin-left":"10px"},onClick:G},{default:d(()=>t[35]||(t[35]=[y("刷 新")])),_:1,__:[35]}),o(u(x),{type:"success",style:{"margin-left":"10px"},onClick:t[1]||(t[1]=s=>ne.value=!0)},{default:d(()=>t[36]||(t[36]=[y("创建模块")])),_:1,__:[36]})]),g("div",Vr,[o(u(an),{show:K.value,style:{height:"680px"}},{default:d(()=>[o(u(nn),null,{default:d(()=>[($(!0),D(se,null,me(rt.value,s=>($(),D("div",{style:{"min-width":"400px"},key:s.id},[o(u(Ce),{title:s.name,"content-scrollable":"",style:{height:"320px"},segmented:"",embedded:"",hoverable:""},{footer:d(()=>[o(u(x),{type:"info",onClick:I=>na(s.path1)},{default:d(()=>t[41]||(t[41]=[y("编辑")])),_:2,__:[41]},1032,["onClick"]),o(u(Je),{style:{"margin-left":"10px"},title:"确认删除？",type:"info",trigger:"click",onConfirm:I=>fa(s.path1)},{reference:d(()=>[o(u(x),{type:"danger"},{default:d(()=>t[42]||(t[42]=[y("删除")])),_:1,__:[42]})]),_:2},1032,["onConfirm"]),o(u(Je),{style:{"margin-left":"10px"},title:"没有示例参数的接口不会导出，确认？",type:"info",trigger:"click",onConfirm:I=>pa(s.path1,s.name)},{reference:d(()=>[o(u(x),{type:"success"},{default:d(()=>t[43]||(t[43]=[y("导出MD")])),_:1,__:[43]})]),_:2},1032,["onConfirm"])]),default:d(()=>[g("div",Mr,[($(!0),D(se,null,me(s.details,I=>($(),D("div",{key:I.id,style:{"margin-bottom":"10px"}},[y(" /"+B(I.path1)+"/"+B(I.path2)+" ",1),o(_,{strong:"",secondary:"",round:"",size:"tiny",style:{"margin-left":"10px"},onClick:dt=>ra(I.target,I.path1,I.path2)},{default:d(()=>t[37]||(t[37]=[y("查看")])),_:2,__:[37]},1032,["onClick"]),o(_,{strong:"",secondary:"",round:"",size:"tiny",style:{"margin-left":"10px"},onClick:dt=>la(I.target,I.path1,I.path2,I.id)},{default:d(()=>t[38]||(t[38]=[y("调试")])),_:2,__:[38]},1032,["onClick"]),o(_,{strong:"",secondary:"",round:"",size:"tiny",style:{"margin-left":"10px"},onClick:dt=>sa(I.target)},{default:d(()=>t[39]||(t[39]=[y("编辑")])),_:2,__:[39]},1032,["onClick"]),t[40]||(t[40]=g("br",null,null,-1))]))),128))])]),_:2},1032,["title"])]))),128))]),_:1})]),_:1},8,["show"]),g("div",Ur,[o(u(rn),{page:$e.value,"onUpdate:page":t[2]||(t[2]=s=>$e.value=s),"page-count":lt.value},null,8,["page","page-count"])])])]),_:1}),o(u($t),{title:"全部",name:"all"},{default:d(()=>[g("div",Rr,[o(u(kt),{modelValue:S.value,"onUpdate:modelValue":t[3]||(t[3]=s=>S.value=s),placeholder:"请输入名称/编码进行搜索",onSearch:Wt,clearable:""},null,8,["modelValue"])]),g("div",Hr,[o(u(Xa),Pt({height:"auto",resizable:"",ref_key:"basicGridRef",ref:k},N.value,{loading:b.value,onCellClick:t[4]||(t[4]=s=>{Xt(s)}),onPageChange:C,"column-width":220,size:"small","auto-resize":!0}),null,16,["loading"])])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),o(u(W),{title:"响应数据",visible:Le.value,"onUpdate:visible":t[6]||(t[6]=s=>Le.value=s),onConfirm:Kt},{default:d(()=>[g("div",jr,[o(u(re))])]),_:1},8,["visible"]),o(u(q),{visible:oe.value,"onUpdate:visible":t[8]||(t[8]=s=>oe.value=s),title:"API",width:"50%"},{footer:d(()=>[o(u(x),{type:"primary",onClick:t[7]||(t[7]=s=>oe.value=!oe.value)},{default:d(()=>t[44]||(t[44]=[y("确 定")])),_:1,__:[44]})]),default:d(()=>[t[45]||(t[45]=g("div",null,null,-1))]),_:1,__:[45]},8,["visible"]),o(u(q),{visible:j.value,"onUpdate:visible":t[14]||(t[14]=s=>j.value=s),title:"调试",width:"85vw",top:"50","max-height":"92vh"},{footer:d(()=>[o(u(x),{type:"success",onClick:Tt},{default:d(()=>t[52]||(t[52]=[y("运 行")])),_:1,__:[52]}),o(u(x),{type:"primary",onClick:t[13]||(t[13]=s=>j.value=!j.value)},{default:d(()=>t[53]||(t[53]=[y("关 闭")])),_:1,__:[53]})]),default:d(()=>[g("div",qr,[g("div",Fr,[o(u(Qa),{modelValue:at.value,"onUpdate:modelValue":t[12]||(t[12]=s=>at.value=s)},{left:d(()=>[o(u(re),null,{default:d(()=>[g("div",Jr,[o(u(ln),{"default-expanded-names":"1",accordion:""},{default:d(()=>[o(u(Ot),{title:"参数池",name:"1"},{"header-extra":d(()=>t[47]||(t[47]=[g("div",{style:{color:"green"}},"点击展开",-1)])),default:d(()=>[g("div",Wr,[o(u(ha),{value:Z.value,"onUpdate:value":t[9]||(t[9]=s=>Z.value=s),language:"json",options:l,onMount:h,style:{height:"35vh"}},{default:d(()=>t[46]||(t[46]=[y(" 初始化... ")])),_:1,__:[46]},8,["value"])])]),_:1}),o(u(Ot),{title:"简化参数池",name:"2"},{"header-extra":d(()=>t[49]||(t[49]=[g("div",{style:{color:"green"}},"点击展开",-1)])),default:d(()=>[g("div",Kr,[o(u(tn),{value:L.value,"onUpdate:value":t[10]||(t[10]=s=>L.value=s),preset:"pair","key-placeholder":"参数名","value-placeholder":"参数值"},null,8,["value"]),o(u(x),{type:"primary",style:{padding:"10px","margin-top":"5px"},onClick:Qt},{default:d(()=>t[48]||(t[48]=[y("保存简化参数池")])),_:1,__:[48]})])]),_:1})]),_:1})])]),_:1})]),right:d(()=>[g("div",null,[o(A,{"default-active-key":["2"]},{default:d(()=>[o(v,{header:"请求参数",key:"1"},{default:d(()=>[g("div",null,[o(_,{strong:"",secondary:"",round:"",type:"info",onClick:t[11]||(t[11]=s=>ke(he.value))},{default:d(()=>t[50]||(t[50]=[y(" 复制 ")])),_:1,__:[50]}),($(),J(u(ft),{key:tt.value,data:et.value},null,8,["data"]))])]),_:1}),o(v,{header:"返回结果",key:"2"},{default:d(()=>[g("div",Gr,[o(u(re),null,{default:d(()=>[($(),J(u(ft),{key:Qe.value,data:Ze.value},null,8,["data"]))]),_:1})])]),_:1})]),_:1}),g("div",Yr,[o(u(x),{type:"primary",onClick:va},{default:d(()=>t[51]||(t[51]=[y("保存为示例参数")])),_:1,__:[51]})])])]),_:1},8,["modelValue"])])])]),_:1},8,["visible"]),o(u(q),{visible:Q.value,"onUpdate:visible":t[19]||(t[19]=s=>Q.value=s),title:"详情",width:"68vw",top:"50","max-height":"92vh"},{footer:d(()=>[o(u(x),{type:"primary",onClick:t[18]||(t[18]=s=>Q.value=!Q.value)},{default:d(()=>t[62]||(t[62]=[y("关 闭")])),_:1,__:[62]})]),default:d(()=>[g("div",null,[o(u(Ce),null,{default:d(()=>[o(u(re),null,{default:d(()=>[g("div",null,[o(u(le),{size:"medium",type:"success"},{default:d(()=>t[54]||(t[54]=[y(" API地址 ")])),_:1,__:[54]})]),g("div",Tr,[y(B(u(n))+"://"+B(u(r))+":"+B(u(f))+"/api/"+B(Me.value)+"/"+B(ee.value)+" ",1),o(u(x),{type:"info",size:"mini",style:{"margin-left":"5px"},onClick:t[15]||(t[15]=s=>ke(`${u(n)}://${u(r)}:${u(f)}/api/{{cellPath1}}/${ee.value}`))},{default:d(()=>t[55]||(t[55]=[y("复制")])),_:1,__:[55]})]),g("div",Xr,[o(u(le),{size:"medium",type:"success"},{default:d(()=>t[56]||(t[56]=[y(" 请求类型 ")])),_:1,__:[56]})]),t[61]||(t[61]=g("div",{style:{"margin-top":"5px"}},"POST",-1)),g("div",Zr,[o(u(le),{size:"medium",type:"success"},{default:d(()=>t[57]||(t[57]=[y(" 请求参数 ")])),_:1,__:[57]})]),g("div",Qr,[y(B(we.value)+" ",1),o(u(x),{type:"info",size:"mini",style:{"margin-left":"5px"},onClick:t[16]||(t[16]=s=>ke(we.value))},{default:d(()=>t[58]||(t[58]=[y("复制")])),_:1,__:[58]})]),At(g("div",null,[g("div",el,[o(u(le),{size:"medium",type:"success"},{default:d(()=>t[59]||(t[59]=[y(" 配置 ")])),_:1,__:[59]})]),g("div",tl,[y(B(Ve.value)+" ",1),o(u(x),{type:"info",size:"mini",style:{"margin-left":"5px"},onClick:t[17]||(t[17]=s=>ke(Ve.value))},{default:d(()=>t[60]||(t[60]=[y("复制")])),_:1,__:[60]})])],512),[[Bt,_e.value]]),ue.value&&ue.value.length>0?($(),D("div",al,[o(u(le),{effect:"dark",size:"medium "},{default:d(()=>[y(B(ue.value),1)]),_:1})])):H("",!0)]),_:1,__:[61]})]),_:1})])]),_:1},8,["visible"]),o(u(q),{visible:te.value,"onUpdate:visible":t[23]||(t[23]=s=>te.value=s),title:"发布智能体工具",width:"50vw",top:"50","max-height":"92vh"},{footer:d(()=>[o(u(x),{type:"success",onClick:ea},{default:d(()=>t[63]||(t[63]=[y("发 布")])),_:1,__:[63]}),o(u(x),{type:"primary",onClick:t[22]||(t[22]=s=>te.value=!te.value)},{default:d(()=>t[64]||(t[64]=[y("关 闭")])),_:1,__:[64]})]),default:d(()=>[g("div",null,[o(u(ve),{modelValue:ae.value,"onUpdate:modelValue":t[20]||(t[20]=s=>ae.value=s),placeholder:"输入名称"},null,8,["modelValue"]),o(u(ve),{modelValue:fe.value,"onUpdate:modelValue":t[21]||(t[21]=s=>fe.value=s),placeholder:"输入描述",style:{"margin-top":"10px"},type:"textarea"},null,8,["modelValue"])])]),_:1},8,["visible"]),o(u(q),{visible:ne.value,"onUpdate:visible":t[27]||(t[27]=s=>ne.value=s),title:"新建业务模块",width:"40vw",top:"50","max-height":"92vh"},{footer:d(()=>[o(u(x),{type:"success",onClick:ta},{default:d(()=>t[65]||(t[65]=[y("确 定")])),_:1,__:[65]}),o(u(x),{type:"primary",onClick:t[26]||(t[26]=s=>ne.value=!ne.value)},{default:d(()=>t[66]||(t[66]=[y("关 闭")])),_:1,__:[66]})]),default:d(()=>[g("div",null,[o(u(ve),{modelValue:xe.value,"onUpdate:modelValue":t[24]||(t[24]=s=>xe.value=s),placeholder:"输入模块名称"},null,8,["modelValue"]),o(u(ve),{modelValue:Oe.value,"onUpdate:modelValue":t[25]||(t[25]=s=>Oe.value=s),placeholder:"输入接口一级路径",style:{"margin-top":"10px"}},null,8,["modelValue"])])]),_:1},8,["visible"]),o(u(q),{visible:pe.value,"onUpdate:visible":t[29]||(t[29]=s=>pe.value=s),title:"模块编辑",width:"68vw",top:"50","max-height":"80vh"},{footer:d(()=>[o(u(x),{type:"primary",onClick:t[28]||(t[28]=s=>pe.value=!pe.value)},{default:d(()=>t[72]||(t[72]=[y("关 闭")])),_:1,__:[72]})]),default:d(()=>[g("div",nl,[o(u(on),{"show-icon":!1,style:{"margin-bottom":"10px"},type:"info"},{default:d(()=>[t[67]||(t[67]=y(" base url:")),t[68]||(t[68]=g("br",null,null,-1)),y(" "+B(u(n))+"://"+B(u(r))+":"+B(u(f))+"/api/proxy/"+B(Y.value)+"/ ",1)]),_:1,__:[67,68]}),o(u(Ce),null,{default:d(()=>[o(u(re),null,{default:d(()=>[($(!0),D(se,null,me(He.value,s=>($(),D("div",{key:s.id,style:{"margin-bottom":"20px"}},[o(u(Pa),{style:{width:"65%","margin-left":"20px"}},{default:d(()=>[o(u(ht),{value:s.name,"onUpdate:value":I=>s.name=I,style:{width:"50%"}},null,8,["value","onUpdate:value"]),o(P,null,{default:d(()=>t[69]||(t[69]=[y("base url")])),_:1,__:[69]}),o(u(ht),{value:s.path2,"onUpdate:value":I=>s.path2=I,style:{width:"35%"}},null,8,["value","onUpdate:value"])]),_:2},1024),o(_,{type:"success",size:"small",style:{"margin-left":"20px"},onClick:I=>oa(s.id,s.path2,s.name)},{default:d(()=>t[70]||(t[70]=[y("保存")])),_:2,__:[70]},1032,["onClick"]),o(u(Je),{style:{"margin-left":"20px"},title:"确认删除？",type:"info",trigger:"click",onConfirm:I=>ia(s.id)},{reference:d(()=>[o(u(x),{type:"danger",size:"small"},{default:d(()=>t[71]||(t[71]=[y("删除")])),_:1,__:[71]})]),_:2},1032,["onConfirm"])]))),128))]),_:1})]),_:1})])]),_:1},8,["visible"]),o(u(q),{visible:ze.value,"onUpdate:visible":t[32]||(t[32]=s=>ze.value=s),title:"加入到业务模块",width:"30%"},{footer:d(()=>[o(u(x),{type:"primary",onClick:da},{default:d(()=>t[73]||(t[73]=[y("确 定")])),_:1,__:[73]})]),default:d(()=>[t[74]||(t[74]=g("p",{style:{"margin-top":"20px"}},"选择加入已有的业务模块",-1)),o(u(wt),{clearable:"",modelValue:Y.value,"onUpdate:modelValue":t[30]||(t[30]=s=>Y.value=s),style:{"margin-top":"10px"},searchable:!0,placeholder:"选择业务模块"},{default:d(()=>[($(!0),D(se,null,me(je.value,s=>($(),J(u(_t),{key:s.value,label:s.label,value:s.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(u(ve),{modelValue:Ee.value,"onUpdate:modelValue":t[31]||(t[31]=s=>Ee.value=s),placeholder:"输入接口二级路径",style:{"margin-top":"10px"}},null,8,["modelValue"])]),_:1,__:[74]},8,["visible"]),o(u(q),{visible:De.value,"onUpdate:visible":t[34]||(t[34]=s=>De.value=s),title:"选择使用的AppId/AppSecret",width:"30%"},{footer:d(()=>[o(u(x),{type:"primary",onClick:ca},{default:d(()=>t[75]||(t[75]=[y("确 定")])),_:1,__:[75]})]),default:d(()=>[o(u(wt),{clearable:"",modelValue:Ie.value,"onUpdate:modelValue":t[33]||(t[33]=s=>Ie.value=s),style:{"margin-top":"10px"},searchable:!0},{default:d(()=>[($(!0),D(se,null,me(qe.value,s=>($(),J(u(_t),{key:s.value,label:s.label,value:s.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["visible"])])}}}),kl=Ba(rl,[["__scopeId","data-v-4e72b73e"]]);export{kl as default};
