@blueking/bkflow-canvas-editor 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Oe=require("bkui-vue/lib/icon"),ye=require("@antv/x6"),Mr=require("@antv/x6-plugin-selection"),Lr=require("@antv/x6-plugin-clipboard"),Pr=require("@antv/x6-plugin-snapline"),Vo=require("@antv/x6-vue-shape"),ve=require("lodash"),dn=require("bkui-vue/lib/message"),Or=require("@antv/x6-plugin-minimap"),un=require("vue-router"),jn=require("bkui-vue/lib"),Rr=require("monaco-editor"),No=require("bkui-vue");function $r(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const Lt=$r(Rr);function ya(t,n){return function(){return t.apply(n,arguments)}}const{toString:zr}=Object.prototype,{getPrototypeOf:ro}=Object,{iterator:yn,toStringTag:wa}=Symbol,wn=(t=>n=>{const o=zr.call(n);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),He=t=>(t=t.toLowerCase(),n=>wn(n)===t),bn=t=>n=>typeof n===t,{isArray:Bt}=Array,$t=bn("undefined");function jt(t){return t!==null&&!$t(t)&&t.constructor!==null&&!$t(t.constructor)&&Te(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ba=He("ArrayBuffer");function Fr(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&ba(t.buffer),n}const Ir=bn("string"),Te=bn("function"),ka=bn("number"),Gt=t=>t!==null&&typeof t=="object",Ur=t=>t===!0||t===!1,on=t=>{if(wn(t)!=="object")return!1;const n=ro(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(wa in t)&&!(yn in t)},jr=t=>{if(!Gt(t)||jt(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Gr=He("Date"),qr=He("File"),Hr=He("Blob"),Wr=He("FileList"),Jr=t=>Gt(t)&&Te(t.pipe),Yr=t=>{let n;return t&&(typeof FormData=="function"&&t instanceof FormData||Te(t.append)&&((n=wn(t))==="formdata"||n==="object"&&Te(t.toString)&&t.toString()==="[object FormData]"))},Zr=He("URLSearchParams"),[Kr,Qr,Xr,ei]=["ReadableStream","Request","Response","Headers"].map(He),ti=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qt(t,n,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let a,r;if(typeof t!="object"&&(t=[t]),Bt(t))for(a=0,r=t.length;a<r;a++)n.call(null,t[a],a,t);else{if(jt(t))return;const s=o?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let l;for(a=0;a<i;a++)l=s[a],n.call(null,t[l],l,t)}}function Ca(t,n){if(jt(t))return null;n=n.toLowerCase();const o=Object.keys(t);let a=o.length,r;for(;a-- >0;)if(r=o[a],n===r.toLowerCase())return r;return null}const pt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_a=t=>!$t(t)&&t!==pt;function Gn(){const{caseless:t}=_a(this)&&this||{},n={},o=(a,r)=>{const s=t&&Ca(n,r)||r;on(n[s])&&on(a)?n[s]=Gn(n[s],a):on(a)?n[s]=Gn({},a):Bt(a)?n[s]=a.slice():n[s]=a};for(let a=0,r=arguments.length;a<r;a++)arguments[a]&&qt(arguments[a],o);return n}const ni=(t,n,o,{allOwnKeys:a}={})=>(qt(n,(r,s)=>{o&&Te(r)?t[s]=ya(r,o):t[s]=r},{allOwnKeys:a}),t),oi=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ai=(t,n,o,a)=>{t.prototype=Object.create(n.prototype,a),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:n.prototype}),o&&Object.assign(t.prototype,o)},ri=(t,n,o,a)=>{let r,s,i;const l={};if(n=n||{},t==null)return n;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)i=r[s],(!a||a(i,t,n))&&!l[i]&&(n[i]=t[i],l[i]=!0);t=o!==!1&&ro(t)}while(t&&(!o||o(t,n))&&t!==Object.prototype);return n},ii=(t,n,o)=>{t=String(t),(o===void 0||o>t.length)&&(o=t.length),o-=n.length;const a=t.indexOf(n,o);return a!==-1&&a===o},si=t=>{if(!t)return null;if(Bt(t))return t;let n=t.length;if(!ka(n))return null;const o=new Array(n);for(;n-- >0;)o[n]=t[n];return o},li=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&ro(Uint8Array)),ci=(t,n)=>{const a=(t&&t[yn]).call(t);let r;for(;(r=a.next())&&!r.done;){const s=r.value;n.call(t,s[0],s[1])}},di=(t,n)=>{let o;const a=[];for(;(o=t.exec(n))!==null;)a.push(o);return a},ui=He("HTMLFormElement"),pi=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,r){return a.toUpperCase()+r}),Bo=(({hasOwnProperty:t})=>(n,o)=>t.call(n,o))(Object.prototype),fi=He("RegExp"),xa=(t,n)=>{const o=Object.getOwnPropertyDescriptors(t),a={};qt(o,(r,s)=>{let i;(i=n(r,s,t))!==!1&&(a[s]=i||r)}),Object.defineProperties(t,a)},mi=t=>{xa(t,(n,o)=>{if(Te(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const a=t[o];if(Te(a)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},vi=(t,n)=>{const o={},a=r=>{r.forEach(s=>{o[s]=!0})};return Bt(t)?a(t):a(String(t).split(n)),o},hi=()=>{},gi=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function yi(t){return!!(t&&Te(t.append)&&t[wa]==="FormData"&&t[yn])}const wi=t=>{const n=new Array(10),o=(a,r)=>{if(Gt(a)){if(n.indexOf(a)>=0)return;if(jt(a))return a;if(!("toJSON"in a)){n[r]=a;const s=Bt(a)?[]:{};return qt(a,(i,l)=>{const c=o(i,r+1);!$t(c)&&(s[l]=c)}),n[r]=void 0,s}}return a};return o(t,0)},bi=He("AsyncFunction"),ki=t=>t&&(Gt(t)||Te(t))&&Te(t.then)&&Te(t.catch),Aa=((t,n)=>t?setImmediate:n?((o,a)=>(pt.addEventListener("message",({source:r,data:s})=>{r===pt&&s===o&&a.length&&a.shift()()},!1),r=>{a.push(r),pt.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Te(pt.postMessage)),Ci=typeof queueMicrotask<"u"?queueMicrotask.bind(pt):typeof process<"u"&&process.nextTick||Aa,_i=t=>t!=null&&Te(t[yn]),B={isArray:Bt,isArrayBuffer:ba,isBuffer:jt,isFormData:Yr,isArrayBufferView:Fr,isString:Ir,isNumber:ka,isBoolean:Ur,isObject:Gt,isPlainObject:on,isEmptyObject:jr,isReadableStream:Kr,isRequest:Qr,isResponse:Xr,isHeaders:ei,isUndefined:$t,isDate:Gr,isFile:qr,isBlob:Hr,isRegExp:fi,isFunction:Te,isStream:Jr,isURLSearchParams:Zr,isTypedArray:li,isFileList:Wr,forEach:qt,merge:Gn,extend:ni,trim:ti,stripBOM:oi,inherits:ai,toFlatObject:ri,kindOf:wn,kindOfTest:He,endsWith:ii,toArray:si,forEachEntry:ci,matchAll:di,isHTMLForm:ui,hasOwnProperty:Bo,hasOwnProp:Bo,reduceDescriptors:xa,freezeMethods:mi,toObjectSet:vi,toCamelCase:pi,noop:hi,toFiniteNumber:gi,findKey:Ca,global:pt,isContextDefined:_a,isSpecCompliantForm:yi,toJSONObject:wi,isAsyncFn:bi,isThenable:ki,setImmediate:Aa,asap:Ci,isIterable:_i};function ce(t,n,o,a,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",n&&(this.code=n),o&&(this.config=o),a&&(this.request=a),r&&(this.response=r,this.status=r.status?r.status:null)}B.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.status}}});const Ea=ce.prototype,Va={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Va[t]={value:t}});Object.defineProperties(ce,Va);Object.defineProperty(Ea,"isAxiosError",{value:!0});ce.from=(t,n,o,a,r,s)=>{const i=Object.create(Ea);return B.toFlatObject(t,i,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),ce.call(i,t.message,n,o,a,r),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};const xi=null;function qn(t){return B.isPlainObject(t)||B.isArray(t)}function Na(t){return B.endsWith(t,"[]")?t.slice(0,-2):t}function Do(t,n,o){return t?t.concat(n).map(function(r,s){return r=Na(r),!o&&s?"["+r+"]":r}).join(o?".":""):n}function Ai(t){return B.isArray(t)&&!t.some(qn)}const Ei=B.toFlatObject(B,{},null,function(n){return/^is[A-Z]/.test(n)});function kn(t,n,o){if(!B.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,o=B.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,f){return!B.isUndefined(f[g])});const a=o.metaTokens,r=o.visitor||u,s=o.dots,i=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(n);if(!B.isFunction(r))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(B.isDate(m))return m.toISOString();if(B.isBoolean(m))return m.toString();if(!c&&B.isBlob(m))throw new ce("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(m)||B.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,g,f){let b=m;if(m&&!f&&typeof m=="object"){if(B.endsWith(g,"{}"))g=a?g:g.slice(0,-2),m=JSON.stringify(m);else if(B.isArray(m)&&Ai(m)||(B.isFileList(m)||B.endsWith(g,"[]"))&&(b=B.toArray(m)))return g=Na(g),b.forEach(function(_,p){!(B.isUndefined(_)||_===null)&&n.append(i===!0?Do([g],p,s):i===null?g:g+"[]",d(_))}),!1}return qn(m)?!0:(n.append(Do(f,g,s),d(m)),!1)}const v=[],w=Object.assign(Ei,{defaultVisitor:u,convertValue:d,isVisitable:qn});function h(m,g){if(!B.isUndefined(m)){if(v.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));v.push(m),B.forEach(m,function(b,y){(!(B.isUndefined(b)||b===null)&&r.call(n,b,B.isString(y)?y.trim():y,g,w))===!0&&h(b,g?g.concat(y):[y])}),v.pop()}}if(!B.isObject(t))throw new TypeError("data must be an object");return h(t),n}function To(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(a){return n[a]})}function io(t,n){this._pairs=[],t&&kn(t,this,n)}const Ba=io.prototype;Ba.append=function(n,o){this._pairs.push([n,o])};Ba.toString=function(n){const o=n?function(a){return n.call(this,a,To)}:To;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Vi(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Da(t,n,o){if(!n)return t;const a=o&&o.encode||Vi;B.isFunction(o)&&(o={serialize:o});const r=o&&o.serialize;let s;if(r?s=r(n,o):s=B.isURLSearchParams(n)?n.toString():new io(n,o).toString(a),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class So{constructor(){this.handlers=[]}use(n,o,a){return this.handlers.push({fulfilled:n,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){B.forEach(this.handlers,function(a){a!==null&&n(a)})}}const Ta={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ni=typeof URLSearchParams<"u"?URLSearchParams:io,Bi=typeof FormData<"u"?FormData:null,Di=typeof Blob<"u"?Blob:null,Ti={isBrowser:!0,classes:{URLSearchParams:Ni,FormData:Bi,Blob:Di},protocols:["http","https","file","blob","url","data"]},so=typeof window<"u"&&typeof document<"u",Hn=typeof navigator=="object"&&navigator||void 0,Si=so&&(!Hn||["ReactNative","NativeScript","NS"].indexOf(Hn.product)<0),Mi=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Li=so&&window.location.href||"http://localhost",Pi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:so,hasStandardBrowserEnv:Si,hasStandardBrowserWebWorkerEnv:Mi,navigator:Hn,origin:Li},Symbol.toStringTag,{value:"Module"})),Ve={...Pi,...Ti};function Oi(t,n){return kn(t,new Ve.classes.URLSearchParams,{visitor:function(o,a,r,s){return Ve.isNode&&B.isBuffer(o)?(this.append(a,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...n})}function Ri(t){return B.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function $i(t){const n={},o=Object.keys(t);let a;const r=o.length;let s;for(a=0;a<r;a++)s=o[a],n[s]=t[s];return n}function Sa(t){function n(o,a,r,s){let i=o[s++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),c=s>=o.length;return i=!i&&B.isArray(r)?r.length:i,c?(B.hasOwnProp(r,i)?r[i]=[r[i],a]:r[i]=a,!l):((!r[i]||!B.isObject(r[i]))&&(r[i]=[]),n(o,a,r[i],s)&&B.isArray(r[i])&&(r[i]=$i(r[i])),!l)}if(B.isFormData(t)&&B.isFunction(t.entries)){const o={};return B.forEachEntry(t,(a,r)=>{n(Ri(a),r,o,0)}),o}return null}function zi(t,n,o){if(B.isString(t))try{return(n||JSON.parse)(t),B.trim(t)}catch(a){if(a.name!=="SyntaxError")throw a}return(o||JSON.stringify)(t)}const Ht={transitional:Ta,adapter:["xhr","http","fetch"],transformRequest:[function(n,o){const a=o.getContentType()||"",r=a.indexOf("application/json")>-1,s=B.isObject(n);if(s&&B.isHTMLForm(n)&&(n=new FormData(n)),B.isFormData(n))return r?JSON.stringify(Sa(n)):n;if(B.isArrayBuffer(n)||B.isBuffer(n)||B.isStream(n)||B.isFile(n)||B.isBlob(n)||B.isReadableStream(n))return n;if(B.isArrayBufferView(n))return n.buffer;if(B.isURLSearchParams(n))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let l;if(s){if(a.indexOf("application/x-www-form-urlencoded")>-1)return Oi(n,this.formSerializer).toString();if((l=B.isFileList(n))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return kn(l?{"files[]":n}:n,c&&new c,this.formSerializer)}}return s||r?(o.setContentType("application/json",!1),zi(n)):n}],transformResponse:[function(n){const o=this.transitional||Ht.transitional,a=o&&o.forcedJSONParsing,r=this.responseType==="json";if(B.isResponse(n)||B.isReadableStream(n))return n;if(n&&B.isString(n)&&(a&&!this.responseType||r)){const i=!(o&&o.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(l){if(i)throw l.name==="SyntaxError"?ce.from(l,ce.ERR_BAD_RESPONSE,this,null,this.response):l}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ve.classes.FormData,Blob:Ve.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],t=>{Ht.headers[t]={}});const Fi=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ii=t=>{const n={};let o,a,r;return t&&t.split(`
2
- `).forEach(function(i){r=i.indexOf(":"),o=i.substring(0,r).trim().toLowerCase(),a=i.substring(r+1).trim(),!(!o||n[o]&&Fi[o])&&(o==="set-cookie"?n[o]?n[o].push(a):n[o]=[a]:n[o]=n[o]?n[o]+", "+a:a)}),n},Mo=Symbol("internals");function Tt(t){return t&&String(t).trim().toLowerCase()}function an(t){return t===!1||t==null?t:B.isArray(t)?t.map(an):String(t)}function Ui(t){const n=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=o.exec(t);)n[a[1]]=a[2];return n}const ji=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function On(t,n,o,a,r){if(B.isFunction(a))return a.call(this,n,o);if(r&&(n=o),!!B.isString(n)){if(B.isString(a))return n.indexOf(a)!==-1;if(B.isRegExp(a))return a.test(n)}}function Gi(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,o,a)=>o.toUpperCase()+a)}function qi(t,n){const o=B.toCamelCase(" "+n);["get","set","has"].forEach(a=>{Object.defineProperty(t,a+o,{value:function(r,s,i){return this[a].call(this,n,r,s,i)},configurable:!0})})}let Se=class{constructor(n){n&&this.set(n)}set(n,o,a){const r=this;function s(l,c,d){const u=Tt(c);if(!u)throw new Error("header name must be a non-empty string");const v=B.findKey(r,u);(!v||r[v]===void 0||d===!0||d===void 0&&r[v]!==!1)&&(r[v||c]=an(l))}const i=(l,c)=>B.forEach(l,(d,u)=>s(d,u,c));if(B.isPlainObject(n)||n instanceof this.constructor)i(n,o);else if(B.isString(n)&&(n=n.trim())&&!ji(n))i(Ii(n),o);else if(B.isObject(n)&&B.isIterable(n)){let l={},c,d;for(const u of n){if(!B.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[d=u[0]]=(c=l[d])?B.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(l,o)}else n!=null&&s(o,n,a);return this}get(n,o){if(n=Tt(n),n){const a=B.findKey(this,n);if(a){const r=this[a];if(!o)return r;if(o===!0)return Ui(r);if(B.isFunction(o))return o.call(this,r,a);if(B.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,o){if(n=Tt(n),n){const a=B.findKey(this,n);return!!(a&&this[a]!==void 0&&(!o||On(this,this[a],a,o)))}return!1}delete(n,o){const a=this;let r=!1;function s(i){if(i=Tt(i),i){const l=B.findKey(a,i);l&&(!o||On(a,a[l],l,o))&&(delete a[l],r=!0)}}return B.isArray(n)?n.forEach(s):s(n),r}clear(n){const o=Object.keys(this);let a=o.length,r=!1;for(;a--;){const s=o[a];(!n||On(this,this[s],s,n,!0))&&(delete this[s],r=!0)}return r}normalize(n){const o=this,a={};return B.forEach(this,(r,s)=>{const i=B.findKey(a,s);if(i){o[i]=an(r),delete o[s];return}const l=n?Gi(s):String(s).trim();l!==s&&delete o[s],o[l]=an(r),a[l]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const o=Object.create(null);return B.forEach(this,(a,r)=>{a!=null&&a!==!1&&(o[r]=n&&B.isArray(a)?a.join(", "):a)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,o])=>n+": "+o).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...o){const a=new this(n);return o.forEach(r=>a.set(r)),a}static accessor(n){const a=(this[Mo]=this[Mo]={accessors:{}}).accessors,r=this.prototype;function s(i){const l=Tt(i);a[l]||(qi(r,i),a[l]=!0)}return B.isArray(n)?n.forEach(s):s(n),this}};Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(Se.prototype,({value:t},n)=>{let o=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(a){this[o]=a}}});B.freezeMethods(Se);function Rn(t,n){const o=this||Ht,a=n||o,r=Se.from(a.headers);let s=a.data;return B.forEach(t,function(l){s=l.call(o,s,r.normalize(),n?n.status:void 0)}),r.normalize(),s}function Ma(t){return!!(t&&t.__CANCEL__)}function Dt(t,n,o){ce.call(this,t??"canceled",ce.ERR_CANCELED,n,o),this.name="CanceledError"}B.inherits(Dt,ce,{__CANCEL__:!0});function La(t,n,o){const a=o.config.validateStatus;!o.status||!a||a(o.status)?t(o):n(new ce("Request failed with status code "+o.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function Hi(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function Wi(t,n){t=t||10;const o=new Array(t),a=new Array(t);let r=0,s=0,i;return n=n!==void 0?n:1e3,function(c){const d=Date.now(),u=a[s];i||(i=d),o[r]=c,a[r]=d;let v=s,w=0;for(;v!==r;)w+=o[v++],v=v%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),d-i<n)return;const h=u&&d-u;return h?Math.round(w*1e3/h):void 0}}function Ji(t,n){let o=0,a=1e3/n,r,s;const i=(d,u=Date.now())=>{o=u,r=null,s&&(clearTimeout(s),s=null),t(...d)};return[(...d)=>{const u=Date.now(),v=u-o;v>=a?i(d,u):(r=d,s||(s=setTimeout(()=>{s=null,i(r)},a-v)))},()=>r&&i(r)]}const pn=(t,n,o=3)=>{let a=0;const r=Wi(50,250);return Ji(s=>{const i=s.loaded,l=s.lengthComputable?s.total:void 0,c=i-a,d=r(c),u=i<=l;a=i;const v={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-i)/d:void 0,event:s,lengthComputable:l!=null,[n?"download":"upload"]:!0};t(v)},o)},Lo=(t,n)=>{const o=t!=null;return[a=>n[0]({lengthComputable:o,total:t,loaded:a}),n[1]]},Po=t=>(...n)=>B.asap(()=>t(...n)),Yi=Ve.hasStandardBrowserEnv?((t,n)=>o=>(o=new URL(o,Ve.origin),t.protocol===o.protocol&&t.host===o.host&&(n||t.port===o.port)))(new URL(Ve.origin),Ve.navigator&&/(msie|trident)/i.test(Ve.navigator.userAgent)):()=>!0,Zi=Ve.hasStandardBrowserEnv?{write(t,n,o,a,r,s){const i=[t+"="+encodeURIComponent(n)];B.isNumber(o)&&i.push("expires="+new Date(o).toGMTString()),B.isString(a)&&i.push("path="+a),B.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ki(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Qi(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function Pa(t,n,o){let a=!Ki(n);return t&&(a||o==!1)?Qi(t,n):n}const Oo=t=>t instanceof Se?{...t}:t;function vt(t,n){n=n||{};const o={};function a(d,u,v,w){return B.isPlainObject(d)&&B.isPlainObject(u)?B.merge.call({caseless:w},d,u):B.isPlainObject(u)?B.merge({},u):B.isArray(u)?u.slice():u}function r(d,u,v,w){if(B.isUndefined(u)){if(!B.isUndefined(d))return a(void 0,d,v,w)}else return a(d,u,v,w)}function s(d,u){if(!B.isUndefined(u))return a(void 0,u)}function i(d,u){if(B.isUndefined(u)){if(!B.isUndefined(d))return a(void 0,d)}else return a(void 0,u)}function l(d,u,v){if(v in n)return a(d,u);if(v in t)return a(void 0,d)}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(d,u,v)=>r(Oo(d),Oo(u),v,!0)};return B.forEach(Object.keys({...t,...n}),function(u){const v=c[u]||r,w=v(t[u],n[u],u);B.isUndefined(w)&&v!==l||(o[u]=w)}),o}const Oa=t=>{const n=vt({},t);let{data:o,withXSRFToken:a,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:l}=n;n.headers=i=Se.from(i),n.url=Da(Pa(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(B.isFormData(o)){if(Ve.hasStandardBrowserEnv||Ve.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[d,...u]=c?c.split(";").map(v=>v.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(Ve.hasStandardBrowserEnv&&(a&&B.isFunction(a)&&(a=a(n)),a||a!==!1&&Yi(n.url))){const d=r&&s&&Zi.read(s);d&&i.set(r,d)}return n},Xi=typeof XMLHttpRequest<"u",es=Xi&&function(t){return new Promise(function(o,a){const r=Oa(t);let s=r.data;const i=Se.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=r,u,v,w,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout;function b(){if(!f)return;const _=Se.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),k={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:_,config:t,request:f};La(function(E){o(E),g()},function(E){a(E),g()},k),f=null}"onloadend"in f?f.onloadend=b:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(b)},f.onabort=function(){f&&(a(new ce("Request aborted",ce.ECONNABORTED,t,f)),f=null)},f.onerror=function(){a(new ce("Network Error",ce.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let p=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const k=r.transitional||Ta;r.timeoutErrorMessage&&(p=r.timeoutErrorMessage),a(new ce(p,k.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,t,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&B.forEach(i.toJSON(),function(p,k){f.setRequestHeader(k,p)}),B.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),l&&l!=="json"&&(f.responseType=r.responseType),d&&([w,m]=pn(d,!0),f.addEventListener("progress",w)),c&&f.upload&&([v,h]=pn(c),f.upload.addEventListener("progress",v),f.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(u=_=>{f&&(a(!_||_.type?new Dt(null,t,f):_),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const y=Hi(r.url);if(y&&Ve.protocols.indexOf(y)===-1){a(new ce("Unsupported protocol "+y+":",ce.ERR_BAD_REQUEST,t));return}f.send(s||null)})},ts=(t,n)=>{const{length:o}=t=t?t.filter(Boolean):[];if(n||o){let a=new AbortController,r;const s=function(d){if(!r){r=!0,l();const u=d instanceof Error?d:this.reason;a.abort(u instanceof ce?u:new Dt(u instanceof Error?u.message:u))}};let i=n&&setTimeout(()=>{i=null,s(new ce(`timeout ${n} of ms exceeded`,ce.ETIMEDOUT))},n);const l=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),t=null)};t.forEach(d=>d.addEventListener("abort",s));const{signal:c}=a;return c.unsubscribe=()=>B.asap(l),c}},ns=function*(t,n){let o=t.byteLength;if(o<n){yield t;return}let a=0,r;for(;a<o;)r=a+n,yield t.slice(a,r),a=r},os=async function*(t,n){for await(const o of as(t))yield*ns(o,n)},as=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:o,value:a}=await n.read();if(o)break;yield a}}finally{await n.cancel()}},Ro=(t,n,o,a)=>{const r=os(t,n);let s=0,i,l=c=>{i||(i=!0,a&&a(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await r.next();if(d){l(),c.close();return}let v=u.byteLength;if(o){let w=s+=v;o(w)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},Cn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ra=Cn&&typeof ReadableStream=="function",rs=Cn&&(typeof TextEncoder=="function"?(t=>n=>t.encode(n))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),$a=(t,...n)=>{try{return!!t(...n)}catch{return!1}},is=Ra&&$a(()=>{let t=!1;const n=new Request(Ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!n}),$o=64*1024,Wn=Ra&&$a(()=>B.isReadableStream(new Response("").body)),fn={stream:Wn&&(t=>t.body)};Cn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!fn[n]&&(fn[n]=B.isFunction(t[n])?o=>o[n]():(o,a)=>{throw new ce(`Response type '${n}' is not supported`,ce.ERR_NOT_SUPPORT,a)})})})(new Response);const ss=async t=>{if(t==null)return 0;if(B.isBlob(t))return t.size;if(B.isSpecCompliantForm(t))return(await new Request(Ve.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(B.isArrayBufferView(t)||B.isArrayBuffer(t))return t.byteLength;if(B.isURLSearchParams(t)&&(t=t+""),B.isString(t))return(await rs(t)).byteLength},ls=async(t,n)=>{const o=B.toFiniteNumber(t.getContentLength());return o??ss(n)},cs=Cn&&(async t=>{let{url:n,method:o,data:a,signal:r,cancelToken:s,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:d,headers:u,withCredentials:v="same-origin",fetchOptions:w}=Oa(t);d=d?(d+"").toLowerCase():"text";let h=ts([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let f;try{if(c&&is&&o!=="get"&&o!=="head"&&(f=await ls(u,a))!==0){let k=new Request(n,{method:"POST",body:a,duplex:"half"}),C;if(B.isFormData(a)&&(C=k.headers.get("content-type"))&&u.setContentType(C),k.body){const[E,I]=Lo(f,pn(Po(c)));a=Ro(k.body,$o,E,I)}}B.isString(v)||(v=v?"include":"omit");const b="credentials"in Request.prototype;m=new Request(n,{...w,signal:h,method:o.toUpperCase(),headers:u.normalize().toJSON(),body:a,duplex:"half",credentials:b?v:void 0});let y=await fetch(m,w);const _=Wn&&(d==="stream"||d==="response");if(Wn&&(l||_&&g)){const k={};["status","statusText","headers"].forEach(z=>{k[z]=y[z]});const C=B.toFiniteNumber(y.headers.get("content-length")),[E,I]=l&&Lo(C,pn(Po(l),!0))||[];y=new Response(Ro(y.body,$o,E,()=>{I&&I(),g&&g()}),k)}d=d||"text";let p=await fn[B.findKey(fn,d)||"text"](y,t);return!_&&g&&g(),await new Promise((k,C)=>{La(k,C,{data:p,headers:Se.from(y.headers),status:y.status,statusText:y.statusText,config:t,request:m})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,t,m),{cause:b.cause||b}):ce.from(b,b&&b.code,t,m)}}),Jn={http:xi,xhr:es,fetch:cs};B.forEach(Jn,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const zo=t=>`- ${t}`,ds=t=>B.isFunction(t)||t===null||t===!1,za={getAdapter:t=>{t=B.isArray(t)?t:[t];const{length:n}=t;let o,a;const r={};for(let s=0;s<n;s++){o=t[s];let i;if(a=o,!ds(o)&&(a=Jn[(i=String(o)).toLowerCase()],a===void 0))throw new ce(`Unknown adapter '${i}'`);if(a)break;r[i||"#"+s]=a}if(!a){const s=Object.entries(r).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=n?s.length>1?`since :
4
- `+s.map(zo).join(`
5
- `):" "+zo(s[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return a},adapters:Jn};function $n(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dt(null,t)}function Fo(t){return $n(t),t.headers=Se.from(t.headers),t.data=Rn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),za.getAdapter(t.adapter||Ht.adapter)(t).then(function(a){return $n(t),a.data=Rn.call(t,t.transformResponse,a),a.headers=Se.from(a.headers),a},function(a){return Ma(a)||($n(t),a&&a.response&&(a.response.data=Rn.call(t,t.transformResponse,a.response),a.response.headers=Se.from(a.response.headers))),Promise.reject(a)})}const Fa="1.11.0",_n={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{_n[t]=function(a){return typeof a===t||"a"+(n<1?"n ":" ")+t}});const Io={};_n.transitional=function(n,o,a){function r(s,i){return"[Axios v"+Fa+"] Transitional option '"+s+"'"+i+(a?". "+a:"")}return(s,i,l)=>{if(n===!1)throw new ce(r(i," has been removed"+(o?" in "+o:"")),ce.ERR_DEPRECATED);return o&&!Io[i]&&(Io[i]=!0,console.warn(r(i," has been deprecated since v"+o+" and will be removed in the near future"))),n?n(s,i,l):!0}};_n.spelling=function(n){return(o,a)=>(console.warn(`${a} is likely a misspelling of ${n}`),!0)};function us(t,n,o){if(typeof t!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const a=Object.keys(t);let r=a.length;for(;r-- >0;){const s=a[r],i=n[s];if(i){const l=t[s],c=l===void 0||i(l,s,t);if(c!==!0)throw new ce("option "+s+" must be "+c,ce.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new ce("Unknown option "+s,ce.ERR_BAD_OPTION)}}const rn={assertOptions:us,validators:_n},Ye=rn.validators;let ft=class{constructor(n){this.defaults=n||{},this.interceptors={request:new So,response:new So}}async request(n,o){try{return await this._request(n,o)}catch(a){if(a instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{a.stack?s&&!String(a.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(a.stack+=`
6
- `+s):a.stack=s}catch{}}throw a}}_request(n,o){typeof n=="string"?(o=o||{},o.url=n):o=n||{},o=vt(this.defaults,o);const{transitional:a,paramsSerializer:r,headers:s}=o;a!==void 0&&rn.assertOptions(a,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),r!=null&&(B.isFunction(r)?o.paramsSerializer={serialize:r}:rn.assertOptions(r,{encode:Ye.function,serialize:Ye.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),rn.assertOptions(o,{baseUrl:Ye.spelling("baseURL"),withXsrfToken:Ye.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let i=s&&B.merge(s.common,s[o.method]);s&&B.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),o.headers=Se.concat(i,s);const l=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(o)===!1||(c=c&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let u,v=0,w;if(!c){const m=[Fo.bind(this),void 0];for(m.unshift(...l),m.push(...d),w=m.length,u=Promise.resolve(o);v<w;)u=u.then(m[v++],m[v++]);return u}w=l.length;let h=o;for(v=0;v<w;){const m=l[v++],g=l[v++];try{h=m(h)}catch(f){g.call(this,f);break}}try{u=Fo.call(this,h)}catch(m){return Promise.reject(m)}for(v=0,w=d.length;v<w;)u=u.then(d[v++],d[v++]);return u}getUri(n){n=vt(this.defaults,n);const o=Pa(n.baseURL,n.url,n.allowAbsoluteUrls);return Da(o,n.params,n.paramsSerializer)}};B.forEach(["delete","get","head","options"],function(n){ft.prototype[n]=function(o,a){return this.request(vt(a||{},{method:n,url:o,data:(a||{}).data}))}});B.forEach(["post","put","patch"],function(n){function o(a){return function(s,i,l){return this.request(vt(l||{},{method:n,headers:a?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}ft.prototype[n]=o(),ft.prototype[n+"Form"]=o(!0)});let ps=class Ia{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const a=this;this.promise.then(r=>{if(!a._listeners)return;let s=a._listeners.length;for(;s-- >0;)a._listeners[s](r);a._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(l=>{a.subscribe(l),s=l}).then(r);return i.cancel=function(){a.unsubscribe(s)},i},n(function(s,i,l){a.reason||(a.reason=new Dt(s,i,l),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const o=this._listeners.indexOf(n);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const n=new AbortController,o=a=>{n.abort(a)};return this.subscribe(o),n.signal.unsubscribe=()=>this.unsubscribe(o),n.signal}static source(){let n;return{token:new Ia(function(r){n=r}),cancel:n}}};function fs(t){return function(o){return t.apply(null,o)}}function ms(t){return B.isObject(t)&&t.isAxiosError===!0}const Yn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yn).forEach(([t,n])=>{Yn[n]=t});function Ua(t){const n=new ft(t),o=ya(ft.prototype.request,n);return B.extend(o,ft.prototype,n,{allOwnKeys:!0}),B.extend(o,n,null,{allOwnKeys:!0}),o.create=function(r){return Ua(vt(t,r))},o}const we=Ua(Ht);we.Axios=ft;we.CanceledError=Dt;we.CancelToken=ps;we.isCancel=Ma;we.VERSION=Fa;we.toFormData=kn;we.AxiosError=ce;we.Cancel=we.CanceledError;we.all=function(n){return Promise.all(n)};we.spread=fs;we.isAxiosError=ms;we.mergeConfig=vt;we.AxiosHeaders=Se;we.formToJSON=t=>Sa(B.isHTMLForm(t)?new FormData(t):t);we.getAdapter=za.getAdapter;we.HttpStatusCode=Yn;we.default=we;const{Axios:Ev,AxiosError:Vv,CanceledError:Nv,isCancel:Bv,CancelToken:Dv,VERSION:Tv,all:Sv,Cancel:Mv,isAxiosError:Lv,spread:Pv,toFormData:Ov,AxiosHeaders:Rv,HttpStatusCode:$v,formToJSON:zv,getAdapter:Fv,mergeConfig:Iv}=we;function vs(t){if(t.axiosInstance)return t.axiosInstance;const n={baseURL:t.baseURL||window.API_HOST,xsrfCookieName:"bk-incident_csrftoken",xsrfHeaderName:"X-CSRFToken",withCredentials:!0,...t.axiosConfig};return we.create(n)}function hs(t){const n=vs(t),{scopeData:o}=t,a=r=>({...r,...o});return{async fetchFlowDetail(r){return(await n.get(`/bkflow/template/${r}/fetch_template/`,{params:o})).data},async fetchSpaceFlowConfig(r){return(await n.get(`/bkflow/template/${r}/get_space_related_configs/`,{params:o})).data},async fetchSystemVariables(r){const s=await n.get("/bkflow/variable/system_variables/",{params:{template_id:r,...o}});return Object.values(s.data)},async saveFlow(r,s){await n.put(`/bkflow/template/${r}/update_template/`,a(s))},async fetchPluginCategoryList(){return(await n.get("/metas/category/list_categories/",{params:o})).data},async fetchCategoryPlugins(r){return(await n.post("/metas/plugin/list_plugins/",a({category:r}))).data.apis},async fetchPluginDetail(r){return(await n.get("/metas/plugin/get_plugin/",{params:{plugin_id:r,...o}})).data},async fetchApplyInstructionData(r){return(await n.post("/metas/plugin/apply_instruction/",a(r))).data},async fetchVariableRef(r){return{data:(await n.post("/bkflow/template/analysis_constants_ref/",a(r))).data}},async fetchCustomVariableTypes(){return{data:(await n.get("/bkflow/variable/variable_class_list/",{params:o})).data}},async fetchFlowOperateRecord(r){return{data:(await n.get(`/bkflow/template/${r}/operation_record/`,{params:o})).data}},async createFlowTask(r){return{data:(await n.post("/bkflow/template/create_task/",a(r))).data}},async executeFlowTask(r){await n.post("/bkflow/template/operate_task/",a(r))}}}function lo(t){const n=hs(t);return{fetchFlowDetail:n.fetchFlowDetail,fetchSpaceFlowConfig:n.fetchSpaceFlowConfig,fetchSystemVariables:n.fetchSystemVariables,fetchUserApi:t.fetchUserApi,fetchVariableRef:n.fetchVariableRef,fetchCustomVariableTypes:n.fetchCustomVariableTypes,fetchFlowOperateRecord:n.fetchFlowOperateRecord,createFlowTask:n.createFlowTask,executeFlowTask:n.executeFlowTask,saveFlow:n.saveFlow,fetchPluginCategoryList:n.fetchPluginCategoryList,fetchCategoryPlugins:n.fetchCategoryPlugins,fetchPluginDetail:n.fetchPluginDetail,fetchApplyInstructionData:n.fetchApplyInstructionData}}const gs={class:"container-layout"},ys={class:"container-layout-header"},ws={class:"title-area"},bs={class:"title"},ks={class:"desc"},Cs={class:"container-layout-main"},_s={class:"container-main-wrapper"},xs=e.defineComponent({__name:"index",props:{title:{default:""},desc:{default:""},showBackIcon:{type:Boolean,default:!1},showEditIcon:{type:Boolean,default:!1}},emits:["back","edit"],setup(t,{emit:n}){e.useSlots();const o=t,a=n,r=()=>{a("back")},s=()=>{a("edit")};return(i,l)=>(e.openBlock(),e.createElementBlock("div",gs,[e.createElementVNode("section",ys,[e.renderSlot(i.$slots,"header",{},()=>[e.createElementVNode("div",ws,[o.showBackIcon?(e.openBlock(),e.createBlock(e.unref(Oe.ArrowsLeft),{key:0,class:"back-btn",onClick:r})):e.createCommentVNode("",!0),e.createElementVNode("h3",bs,e.toDisplayString(o.title),1),e.createElementVNode("p",ks,e.toDisplayString(o.desc),1),o.showEditIcon?(e.openBlock(),e.createBlock(e.unref(Oe.EditLine),{key:1,class:"edit-btn",onClick:s})):e.createCommentVNode("",!0)])],!0),e.renderSlot(i.$slots,"extend",{},void 0,!0)]),e.createElementVNode("section",Cs,[e.createElementVNode("div",_s,[e.renderSlot(i.$slots,"default",{},void 0,!0)])])]))}}),oe=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},ja=oe(xs,[["__scopeId","data-v-cdc3b151"]]);function As(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var sn={exports:{}},Es=sn.exports,Uo;function Vs(){return Uo||(Uo=1,(function(t,n){(function(o,a){t.exports=a()})(Es,(function(){var o=1e3,a=6e4,r=36e5,s="millisecond",i="second",l="minute",c="hour",d="day",u="week",v="month",w="quarter",h="year",m="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var D=["th","st","nd","rd"],T=S%100;return"["+S+(D[(T-20)%10]||D[T]||D[0])+"]"}},_=function(S,D,T){var N=String(S);return!N||N.length>=D?S:""+Array(D+1-N.length).join(T)+S},p={s:_,z:function(S){var D=-S.utcOffset(),T=Math.abs(D),N=Math.floor(T/60),O=T%60;return(D<=0?"+":"-")+_(N,2,"0")+":"+_(O,2,"0")},m:function S(D,T){if(D.date()<T.date())return-S(T,D);var N=12*(T.year()-D.year())+(T.month()-D.month()),O=D.clone().add(N,v),Z=T-O<0,A=D.clone().add(N+(Z?-1:1),v);return+(-(N+(T-O)/(Z?O-A:A-O))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:v,y:h,w:u,d,D:m,h:c,m:l,s:i,ms:s,Q:w}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},k="en",C={};C[k]=y;var E="$isDayjsObject",I=function(S){return S instanceof X||!(!S||!S[E])},z=function S(D,T,N){var O;if(!D)return k;if(typeof D=="string"){var Z=D.toLowerCase();C[Z]&&(O=Z),T&&(C[Z]=T,O=Z);var A=D.split("-");if(!O&&A.length>1)return S(A[0])}else{var M=D.name;C[M]=D,O=M}return!N&&O&&(k=O),O||!N&&k},V=function(S,D){if(I(S))return S.clone();var T=typeof D=="object"?D:{};return T.date=S,T.args=arguments,new X(T)},P=p;P.l=z,P.i=I,P.w=function(S,D){return V(S,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var X=(function(){function S(T){this.$L=z(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[E]=!0}var D=S.prototype;return D.parse=function(T){this.$d=(function(N){var O=N.date,Z=N.utc;if(O===null)return new Date(NaN);if(P.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var A=O.match(f);if(A){var M=A[2]-1||0,R=(A[7]||"0").substring(0,3);return Z?new Date(Date.UTC(A[1],M,A[3]||1,A[4]||0,A[5]||0,A[6]||0,R)):new Date(A[1],M,A[3]||1,A[4]||0,A[5]||0,A[6]||0,R)}}return new Date(O)})(T),this.init()},D.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},D.$utils=function(){return P},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(T,N){var O=V(T);return this.startOf(N)<=O&&O<=this.endOf(N)},D.isAfter=function(T,N){return V(T)<this.startOf(N)},D.isBefore=function(T,N){return this.endOf(N)<V(T)},D.$g=function(T,N,O){return P.u(T)?this[N]:this.set(O,T)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(T,N){var O=this,Z=!!P.u(N)||N,A=P.p(T),M=function(j,Y){var K=P.w(O.$u?Date.UTC(O.$y,Y,j):new Date(O.$y,Y,j),O);return Z?K:K.endOf(d)},R=function(j,Y){return P.w(O.toDate()[j].apply(O.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(Y)),O)},W=this.$W,q=this.$M,J=this.$D,x="set"+(this.$u?"UTC":"");switch(A){case h:return Z?M(1,0):M(31,11);case v:return Z?M(1,q):M(0,q+1);case u:var U=this.$locale().weekStart||0,F=(W<U?W+7:W)-U;return M(Z?J-F:J+(6-F),q);case d:case m:return R(x+"Hours",0);case c:return R(x+"Minutes",1);case l:return R(x+"Seconds",2);case i:return R(x+"Milliseconds",3);default:return this.clone()}},D.endOf=function(T){return this.startOf(T,!1)},D.$set=function(T,N){var O,Z=P.p(T),A="set"+(this.$u?"UTC":""),M=(O={},O[d]=A+"Date",O[m]=A+"Date",O[v]=A+"Month",O[h]=A+"FullYear",O[c]=A+"Hours",O[l]=A+"Minutes",O[i]=A+"Seconds",O[s]=A+"Milliseconds",O)[Z],R=Z===d?this.$D+(N-this.$W):N;if(Z===v||Z===h){var W=this.clone().set(m,1);W.$d[M](R),W.init(),this.$d=W.set(m,Math.min(this.$D,W.daysInMonth())).$d}else M&&this.$d[M](R);return this.init(),this},D.set=function(T,N){return this.clone().$set(T,N)},D.get=function(T){return this[P.p(T)]()},D.add=function(T,N){var O,Z=this;T=Number(T);var A=P.p(N),M=function(q){var J=V(Z);return P.w(J.date(J.date()+Math.round(q*T)),Z)};if(A===v)return this.set(v,this.$M+T);if(A===h)return this.set(h,this.$y+T);if(A===d)return M(1);if(A===u)return M(7);var R=(O={},O[l]=a,O[c]=r,O[i]=o,O)[A]||1,W=this.$d.getTime()+T*R;return P.w(W,this)},D.subtract=function(T,N){return this.add(-1*T,N)},D.format=function(T){var N=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var Z=T||"YYYY-MM-DDTHH:mm:ssZ",A=P.z(this),M=this.$H,R=this.$m,W=this.$M,q=O.weekdays,J=O.months,x=O.meridiem,U=function(Y,K,H,te){return Y&&(Y[K]||Y(N,Z))||H[K].slice(0,te)},F=function(Y){return P.s(M%12||12,Y,"0")},j=x||function(Y,K,H){var te=Y<12?"AM":"PM";return H?te.toLowerCase():te};return Z.replace(b,(function(Y,K){return K||(function(H){switch(H){case"YY":return String(N.$y).slice(-2);case"YYYY":return P.s(N.$y,4,"0");case"M":return W+1;case"MM":return P.s(W+1,2,"0");case"MMM":return U(O.monthsShort,W,J,3);case"MMMM":return U(J,W);case"D":return N.$D;case"DD":return P.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return U(O.weekdaysMin,N.$W,q,2);case"ddd":return U(O.weekdaysShort,N.$W,q,3);case"dddd":return q[N.$W];case"H":return String(M);case"HH":return P.s(M,2,"0");case"h":return F(1);case"hh":return F(2);case"a":return j(M,R,!0);case"A":return j(M,R,!1);case"m":return String(R);case"mm":return P.s(R,2,"0");case"s":return String(N.$s);case"ss":return P.s(N.$s,2,"0");case"SSS":return P.s(N.$ms,3,"0");case"Z":return A}return null})(Y)||A.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(T,N,O){var Z,A=this,M=P.p(N),R=V(T),W=(R.utcOffset()-this.utcOffset())*a,q=this-R,J=function(){return P.m(A,R)};switch(M){case h:Z=J()/12;break;case v:Z=J();break;case w:Z=J()/3;break;case u:Z=(q-W)/6048e5;break;case d:Z=(q-W)/864e5;break;case c:Z=q/r;break;case l:Z=q/a;break;case i:Z=q/o;break;default:Z=q}return O?Z:P.a(Z)},D.daysInMonth=function(){return this.endOf(v).$D},D.$locale=function(){return C[this.$L]},D.locale=function(T,N){if(!T)return this.$L;var O=this.clone(),Z=z(T,N,!0);return Z&&(O.$L=Z),O},D.clone=function(){return P.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},S})(),ee=X.prototype;return V.prototype=ee,[["$ms",s],["$s",i],["$m",l],["$H",c],["$W",d],["$M",v],["$y",h],["$D",m]].forEach((function(S){ee[S[1]]=function(D){return this.$g(D,S[0],S[1])}})),V.extend=function(S,D){return S.$i||(S(D,X,V),S.$i=!0),V},V.locale=z,V.isDayjs=I,V.unix=function(S){return V(1e3*S)},V.en=C[k],V.Ls=C,V.p={},V}))})(sn)),sn.exports}var Ns=Vs();const co=As(Ns),Bs=e.defineComponent({__name:"records-table",props:{data:{}},setup(t){const n=t;return(o,a)=>{const r=e.resolveComponent("bk-table-column"),s=e.resolveComponent("bk-table");return e.openBlock(),e.createBlock(s,{data:n.data,border:["outer"]},{default:e.withCtx(()=>[e.createVNode(r,{label:"操作时间",prop:"operate_date","min-width":200}),e.createVNode(r,{label:"操作名称",prop:"operate_type_name"}),e.createVNode(r,{label:"操作来源",prop:"operate_source_name"}),e.createVNode(r,{label:"操作人",prop:"operator"})]),_:1},8,["data"])}}}),Ds={class:"operate-records-slider"},Ts=e.defineComponent({__name:"index",props:{show:{type:Boolean},flowId:{},apiConfig:{}},emits:["close","update:show"],setup(t,{emit:n}){const o=t,a=n,r=e.shallowRef([]),s=e.shallowRef(!1);e.watch(()=>o.show,c=>{c&&i()});const i=async()=>{if(!o.apiConfig?.fetchFlowOperateRecord){console.warn("fetchFlowOperateRecord is not provided in apiConfig");return}s.value=!0;try{const c=await o.apiConfig.fetchFlowOperateRecord(o.flowId);c.data.data.forEach(d=>d.operate_date=co(d.operate_date).format("YYYY-MM-DD HH:mm:ss")),r.value=c.data.data}catch(c){console.error(c)}finally{s.value=!1}},l=()=>{a("close"),a("update:show",!1)};return(c,d)=>{const u=e.resolveComponent("bk-sideslider"),v=e.resolveDirective("bk-loading");return e.openBlock(),e.createBlock(u,{title:"操作记录","is-show":o.show,width:800,"esc-close":!1,"before-close":l},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Ds,[e.createVNode(Bs,{data:r.value},null,8,["data"])])),[[v,{loading:s.value}]])]),_:1},8,["is-show"])}}}),Ss=oe(Ts,[["__scopeId","data-v-4541c008"]]),jo=(t,n)=>{const{start_event:o,end_event:a,activities:r,gateways:s,flows:i,line:l}=n;return o.id===t?o:a.id===t?a:r[t]?r[t]:s[t]?s[t]:null},Zn=()=>({custom_type:"input",desc:"",index:0,key:"",name:"",show_type:"show",source_info:{},source_tag:"input.input",source_type:"custom",validation:"^.+$",pre_render_mako:!1,value:"",version:"legacy"}),Ms=(t,n={})=>ve.merge({id:t,component:{},error_ignorable:!1,incoming:[],name:"",optional:!0,outgoing:"",stage_name:"",type:"ServiceActivity",retryable:!0,skippable:!0,auto_retry:{enable:!1,interval:0,times:1},timeout_config:{enable:!1,seconds:10,action:"forced_fail"}},n),Ls=(t,n,o={})=>{const a={id:t,type:n,name:"",incoming:[],outgoing:[]};return["ExclusiveGateway","ConditionalParallelGateway"].includes(n)&&(a.conditions={},a.extra_info={parse_lang:"boolrule"}),n!=="ConvergeGateway"&&(a.converge_gateway_id=""),ve.merge(a,o)},Ps=(t,n)=>{const o=[];return t.forEach(a=>{const{id:r,x:s,y:i,type:l}=a,c=l==="tasknode",d=n[r]||{},{name:u,error_ignorable:v=!1,retryable:w=!1,skippable:h=!1,auto_retry:m,component:g={}}=d,f={id:r,shape:"custom-node",position:{x:s,y:i},size:{height:c?54:34,width:c?154:34},data:{name:u,error_ignorable:v,retryable:w,skippable:h,auto_retry:m,component:g,...a,type:l}};o.push(f)}),o},Go=t=>{const n=[];return t.forEach(o=>{const{id:a,source:r,target:s}=o;n.push({shape:"edge",id:a,source:{cell:r.id,port:`port_${r.arrow.toLowerCase()}`},target:{cell:s.id,port:`port_${s.arrow.toLowerCase()}`},attrs:{line:{stroke:"#a9adb6",strokeWidth:2,targetMarker:{name:"block",width:6,height:8},class:a}},zIndex:0,router:{name:"manhattan",args:{padding:1}},data:{}})}),n},tt={startpoint:"开始节点",endpoint:"结束节点",parallelgateway:"并行网关",conditionalparallelgateway:"条件并行网关",branchgateway:"分支网关",exclusivegateway:"分支网关",convergegateway:"汇聚网关",tasknode:"标准插件节点"},Kn={startpoint:{min_in:0,max_in:0,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway"],unique:!0},endpoint:{min_in:1,max_in:1e3,min_out:0,max_out:0,allowed_out:[],unique:!0},tasknode:{min_in:1,max_in:1e3,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},subflow:{min_in:1,max_in:1e3,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},branchgateway:{min_in:1,max_in:1e3,min_out:1,max_out:1e3,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},conditionalparallelgateway:{min_in:1,max_in:1e3,min_out:1,max_out:1e3,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},parallelgateway:{min_in:1,max_in:1e3,min_out:1,max_out:1e3,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway"],unique:!1},convergegateway:{min_in:1,max_in:1e3,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1}},Os=t=>{const n=[];return Object.keys(t).forEach(o=>{const a=t[o].component;(!a||!a.code)&&n.push(o)}),{valid:n.length===0,ids:n}},Rs=(t,n)=>{let o="";const a=[];return n.forEach(r=>{const s=Kn[r.type],i=tt[r.type];let l=0,c=0;t.forEach(d=>{d.source.id===r.id&&(c+=1),d.target.id===r.id&&(l+=1)}),l<s.min_in&&(o=`${i}至少需要${s.min_in}条输入连线`,a.push(r.id)),c<s.min_out&&(o=`${i}至少需要${s.min_out}条输出连线`,a.push(r.id))}),{valid:a.length===0,message:o,ids:a}},$s=t=>{const n=[];let o="";const a={},r=[];let s=[],i=[],l=new Set;const c=(u,v)=>{if(i.includes(u)){l.delete(v);return}i.push(u);const w=a[u]||[];if(w.length>1)l.delete(v),w.forEach(h=>{l.add(h),c(h,h)});else if(w.length===1)if(r.includes(u))s.includes(u)?l.delete(v):(s.push(u),l.size>1&&s.forEach(h=>{const m=a[h][0];c(m,v)}));else{const h=w[0];c(h,v)}},d=Object.keys(t).filter(u=>["ParallelGateway","ConditionalParallelGateway"].includes(t[u].type));for(const u of d){const v=t[u];if(i=[],s=[],l=new Set([u]),c(u,u),l.size>1){o=`${tt[v.type]}缺少对应的汇聚网关`,n.push(u);break}}return{valid:n.length===0,message:o,ids:n}},zs=(t,n,o)=>{const{source:a,target:r}=t,s=a.id,i=r.id,l=o.filter(g=>g.id===s)[0],c=o.filter(g=>g.id===i)[0],d=Kn[l.type],u=Kn[c.type];let v=0,w=0,h=!1;if(s===i){const f=`${tt[l.type]}节点不可连接自身`;return ze(!1,f)}if(d.max_out===0){const f=`${tt[l.type]}只能添加输入连线`;return ze(!1,f)}if(u.max_in===0){const f=`${tt[c.type]}只能添加输出连线`;return ze(!1,f)}if(!d.allowed_out.includes(c.type)){const f=`${tt[l.type]}不能连接${tt[c.type]}`;return ze(!1,f)}const m=n.some(g=>{let f=!1;return g.source.id===s&&(v+=1,g.target.id===i&&(f=!0)),g.target.id===i&&(w+=1),g.source.id===i&&g.target.id===s&&l.type!=="branchgateway"&&(h=!0),f});if(h)return ze(!1,"相同节点不能回连");if(m)return ze(!1,"重复添加连线");if(!m){if(v>=d.max_out){const b=`已达到${tt[l.type]}最大输出连线条数`;return ze(!1,b)}if(w>=u.max_in){const b=`已达到${tt[c.type]}最大输入连线条数`;return ze(!1,b)}}return ze(!0)},Ga=t=>{const{activities:n,gateways:o,line:a,location:r}=t;if(Object.keys(n).length===0)return ze(!1,"请添加任务节点");const s=Os(n);if(!s.valid)return ze(!1,"请为任务节点选择插件",s.ids);const i=Rs(a,r);if(!i.valid)return i;const l=$s(o);return l.valid?ze(!0):l},ze=(t,n="",o=[])=>({valid:t,message:n,ids:o}),Fs={groups:{top:{position:"top",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}},right:{position:"right",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}},bottom:{position:"bottom",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}},left:{position:"left",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}}},items:[{id:"port_top",group:"top"},{id:"port_right",group:"right"},{id:"port_bottom",group:"bottom"},{id:"port_left",group:"left"}]},Is=(t,n)=>{t.on("node:mouseenter",({cell:o})=>{if(!n)return;o.getPorts().forEach(r=>{o.setPortProp(r.id,"attrs/circle/style/visibility","visible")})}),t.on("node:mouseleave",({cell:o})=>{o.getPorts().forEach(r=>{o.setPortProp(r.id,"attrs/circle/style/visibility","hidden")})}),t.on("edge:mouseenter",({cell:o})=>{o.attr("line/stroke","#3a84ff"),n&&o.addTools([{name:"source-arrowhead",args:{tagName:"circle",attrs:{r:"6",fill:"#ffffff",stroke:"#a4deb1",strokeWidth:1}}},{name:"target-arrowhead",args:{tagName:"circle",attrs:{r:"6",fill:"#ffffff",stroke:"#a4deb1",strokeWidth:1}}}])}),t.on("edge:mouseleave",({cell:o})=>{o.attr("line/stroke","#a9adb6"),o.removeTools()})},qa=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1),qe=(t=8)=>{let n="";for(let o=0;o<t-1;o++)n+=qa();return n},mn=(t,n)=>{if(n.classList.contains(t))return!0;let o=n.parentNode;for(;o;){if(o.classList&&o.classList.contains(t))return!0;o=o.parentNode}return!1};var he=Zs(),vn=Ks(),Ha=Qs(),Wa=Xs(),qo={imagePlaceholder:void 0,cacheBust:!1},it={toSvg:Ja,toPng:js,toJpeg:Gs,toBlob:qs,toPixelData:Us,impl:{fontFaces:Ha,images:Wa,util:he,inliner:vn,options:{}}};function Ja(t,n){return n=n||{},Hs(n),Promise.resolve(t).then(function(a){return Ya(a,n.filter,!0)}).then(Ws).then(Js).then(o).then(function(a){return Ys(a,n.width||he.width(t),n.height||he.height(t))});function o(a){return n.bgcolor&&(a.style.backgroundColor=n.bgcolor),n.width&&(a.style.width=n.width+"px"),n.height&&(a.style.height=n.height+"px"),n.style&&Object.keys(n.style).forEach(function(r){a.style[r]=n.style[r]}),n.cloneBack&&n.cloneBack.call(this,a),a}}function Us(t,n){return xn(t,n||{}).then(function(o){return o.getContext("2d").getImageData(0,0,he.width(t),he.height(t)).data})}function js(t,n){return xn(t,n||{}).then(function(o){return o.toDataURL()})}function Gs(t,n){return n=n||{},xn(t,n).then(function(o){return o.toDataURL("image/jpeg",n.quality||1)})}function qs(t,n){return xn(t,n||{}).then(he.canvasToBlob)}function Hs(t){typeof t.imagePlaceholder>"u"?it.impl.options.imagePlaceholder=qo.imagePlaceholder:it.impl.options.imagePlaceholder=t.imagePlaceholder,typeof t.cacheBust>"u"?it.impl.options.cacheBust=qo.cacheBust:it.impl.options.cacheBust=t.cacheBust}function xn(t,n){return Ja(t,n).then(he.makeImage).then(he.delay(100)).then(function(a){var r=o(t);return r.getContext("2d").drawImage(a,0,0),r});function o(a){var r=document.createElement("canvas");if(r.width=n.width||he.width(a),r.height=n.height||he.height(a),n.bgcolor){var s=r.getContext("2d");s.fillStyle=n.bgcolor,s.fillRect(0,0,r.width,r.height)}return r}}function Ya(t,n,o){if(!o&&n&&!n(t))return Promise.resolve();return Promise.resolve(t).then(a).then(function(i){return r(t,i,n)}).then(function(i){return s(t,i)});function a(i){return i instanceof HTMLCanvasElement?he.makeImage(i.toDataURL()):i.cloneNode(!1)}function r(i,l,c){var d=i.childNodes;if(d.length===0)return Promise.resolve(l);return u(l,he.asArray(d),c).then(function(){return l});function u(v,w,h){var m=Promise.resolve();return w.forEach(function(g){m=m.then(function(){return Ya(g,h)}).then(function(f){f&&v.appendChild(f)})}),m}}function s(i,l){if(!(l instanceof Element))return l;return Promise.resolve().then(c).then(d).then(u).then(v).then(function(){return l});function c(){w(window.getComputedStyle(i),l.style);function w(h,m){h.cssText?m.cssText=h.cssText:g(h,m);function g(f,b){he.asArray(f).forEach(function(y){b.setProperty(y,f.getPropertyValue(y),f.getPropertyPriority(y))})}}}function d(){[":before",":after"].forEach(function(h){w(h)});function w(h){var m=window.getComputedStyle(i,h),g=m.getPropertyValue("content");if(g===""||g==="none")return;var f=he.uid();l.className=l.className+" "+f;var b=document.createElement("style");b.appendChild(y(f,h,m)),l.appendChild(b);function y(_,p,k){var C="."+_+":"+p,E=k.cssText?I(k):z(k);return document.createTextNode(C+"{"+E+"}");function I(V){var P=V.getPropertyValue("content");return V.cssText+" content: "+P+";"}function z(V){return he.asArray(V).map(P).join("; ")+";";function P(X){return X+": "+V.getPropertyValue(X)+(V.getPropertyPriority(X)?" !important":"")}}}}}function u(){i instanceof HTMLTextAreaElement&&(l.innerHTML=i.value),i instanceof HTMLInputElement&&l.setAttribute("value",i.value)}function v(){l instanceof SVGElement&&(l.setAttribute("xmlns","http://www.w3.org/2000/svg"),l instanceof SVGRectElement&&["width","height"].forEach(function(w){var h=l.getAttribute(w);h&&l.style.setProperty(w,h)}))}}}function Ws(t){return Ha.resolveAll().then(function(n){var o=document.createElement("style");return t.appendChild(o),o.appendChild(document.createTextNode(n)),t})}function Js(t){return Wa.inlineAll(t).then(function(){return t})}function Ys(t,n,o){return Promise.resolve(t).then(function(a){return a.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(a)}).then(he.escapeXhtml).then(function(a){return'<foreignObject x="0" y="0" width="100%" height="100%">'+a+"</foreignObject>"}).then(function(a){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+n+'" height="'+o+'">'+a+"</svg>"}).then(function(a){return"data:image/svg+xml;charset=utf-8,"+a})}function Zs(){return{escape:v,parseExtension:n,mimeType:o,dataAsUrl:u,isDataUrl:a,canvasToBlob:s,resolveUrl:i,getAndEncode:d,uid:l(),delay:w,asArray:h,escapeXhtml:m,makeImage:c,width:g,height:f};function t(){var y="application/font-woff",_="image/jpeg";return{woff:y,woff2:y,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:_,jpeg:_,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function n(y){var _=/\.([^\.\/]*?)$/g.exec(y);return _?_[1]:""}function o(y){var _=n(y).toLowerCase();return t()[_]||""}function a(y){return y.search(/^(data:)/)!==-1}function r(y){return new Promise(function(_){for(var p=window.atob(y.toDataURL().split(",")[1]),k=p.length,C=new Uint8Array(k),E=0;E<k;E++)C[E]=p.charCodeAt(E);_(new Blob([C],{type:"image/png"}))})}function s(y){return y.toBlob?new Promise(function(_){y.toBlob(_)}):r(y)}function i(y,_){var p=document.implementation.createHTMLDocument(),k=p.createElement("base");p.head.appendChild(k);var C=p.createElement("a");return p.body.appendChild(C),k.href=_,C.href=y,C.href}function l(){var y=0;return function(){return"u"+_()+y++;function _(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function c(y){return new Promise(function(_,p){var k=new Image;k.onload=function(){_(k)},k.onerror=p,k.src=y})}function d(y){var _=3e4;return it.impl.options.cacheBust&&(y+=(/\?/.test(y)?"&":"?")+new Date().getTime()),new Promise(function(p){var k=new XMLHttpRequest;k.onreadystatechange=I,k.ontimeout=z,k.responseType="blob",k.timeout=_,k.open("GET",y,!0),k.send();var C;if(it.impl.options.imagePlaceholder){var E=it.impl.options.imagePlaceholder.split(/,/);E&&E[1]&&(C=E[1])}function I(){if(k.readyState===4){if(k.status!==200){C?p(C):V("cannot fetch resource: "+y+", status: "+k.status);return}var P=new FileReader;P.onloadend=function(){var X=P.result.split(/,/)[1];p(X)},P.readAsDataURL(k.response)}}function z(){C?p(C):V("timeout of "+_+"ms occured while fetching resource: "+y)}function V(P){console.error(P),p("")}})}function u(y,_){return"data:"+_+";base64,"+y}function v(y){return y.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function w(y){return function(_){return new Promise(function(p){setTimeout(function(){p(_)},y)})}}function h(y){for(var _=[],p=y.length,k=0;k<p;k++)_.push(y[k]);return _}function m(y){return y.replace(/#/g,"%23").replace(/\n/g,"%0A")}function g(y){var _=b(y,"border-left-width"),p=b(y,"border-right-width");return y.scrollWidth+_+p}function f(y){var _=b(y,"border-top-width"),p=b(y,"border-bottom-width");return y.scrollHeight+_+p}function b(y,_){var p=window.getComputedStyle(y).getPropertyValue(_);return parseFloat(p.replace("px",""))}}function Ks(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:r,shouldProcess:n,impl:{readUrls:o,inline:a}};function n(s){return s.search(t)!==-1}function o(s){for(var i=[],l;(l=t.exec(s))!==null;)i.push(l[1]);return i.filter(function(c){return!he.isDataUrl(c)})}function a(s,i,l,c){return Promise.resolve(i).then(function(u){return l?he.resolveUrl(u,l):u}).then(c||he.getAndEncode).then(function(u){return he.dataAsUrl(u,he.mimeType(i))}).then(function(u){return s.replace(d(i),"$1"+u+"$3")});function d(u){return new RegExp(`(url\\(['"]?)(`+he.escape(u)+`)(['"]?\\))`,"g")}}function r(s,i,l){if(c())return Promise.resolve(s);return Promise.resolve(s).then(o).then(function(d){var u=Promise.resolve(s);return d.forEach(function(v){u=u.then(function(w){return a(w,v,i,l)})}),u});function c(){return!n(s)}}}function Qs(){return{resolveAll:t,impl:{readAll:n}};function t(){return n().then(function(o){return Promise.all(o.map(function(a){return a.resolve()}))}).then(function(o){return o.join(`
7
- `)})}function n(){return Promise.resolve(he.asArray(document.styleSheets)).then(a).then(o).then(function(s){return s.map(r)});function o(s){return s.filter(function(i){return i.type===CSSRule.FONT_FACE_RULE}).filter(function(i){return vn.shouldProcess(i.style.getPropertyValue("src"))})}function a(s){var i=[];return s.forEach(function(l){try{he.asArray(l.cssRules||[]).forEach(i.push.bind(i))}catch(c){console.log("Error while reading CSS rules from "+l.href,c.toString())}}),i}function r(s){return{resolve:function(){var l=(s.parentStyleSheet||{}).href;return vn.inlineAll(s.cssText,l)},src:function(){return s.style.getPropertyValue("src")}}}}}function Xs(){return{inlineAll:n,impl:{newImage:t}};function t(o){return{inline:a};function a(r){return he.isDataUrl(o.src)?Promise.resolve():Promise.resolve(o.src).then(r||he.getAndEncode).then(function(s){return he.dataAsUrl(s,he.mimeType(o.src))}).then(function(s){return new Promise(function(i,l){o.onload=i,o.onerror=l,o.src=s})})}}function n(o){if(!(o instanceof Element))return Promise.resolve(o);return a(o).then(function(){return o instanceof HTMLImageElement?t(o).inline():Promise.all(he.asArray(o.childNodes).map(function(r){return n(r)}))});function a(r){var s=r.style.getPropertyValue("background");return s?vn.inlineAll(s).then(function(i){r.style.setProperty("background",i,r.style.getPropertyPriority("background"))}).then(function(){return r}):Promise.resolve(r)}}}const el={class:"canvas-tools-wrapper"},tl={class:"tools-content"},nl={class:"zoom-wrapper"},ol={class:"zoom-ratio"},al=e.defineComponent({__name:"index",props:{instance:{}},emits:["download"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(100),s=e.ref(!1),i=e.ref(null);e.onMounted(()=>{o.instance.on("scale",d)});const l=()=>{o.instance.zoom(-.1),d()},c=()=>{o.instance.zoom(.1),d()},d=()=>{r.value=Math.round(o.instance.zoom()*100)},u=()=>{s.value=!s.value,e.nextTick(()=>{s.value&&i.value?o.instance.use(new Or.MiniMap({container:i.value,width:344,height:216,scalable:!1})):o.instance.disposePlugins("minimap")})},v=()=>{o.instance.zoomTo(1),o.instance.translate(0,0)};return(w,h)=>{const m=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",el,[e.createElementVNode("div",tl,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tool-icon",{"is-active":s.value}]),onClick:u},[...h[1]||(h[1]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-thumbnail-view"},null,-1)])],2)),[[m,{content:"缩略视图",placement:"bottom"}]]),e.createElementVNode("div",nl,[e.withDirectives(e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-zoom-minus",onClick:l},null,512),[[m,{content:"缩小",placement:"bottom"}]]),e.createElementVNode("p",ol,e.toDisplayString(r.value+"%"),1),e.withDirectives(e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-zoom-add",onClick:c},null,512),[[m,{content:"放大",placement:"bottom"}]])]),e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"tool-icon",onClick:v},[...h[2]||(h[2]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-reset"},null,-1)])])),[[m,{content:"复位",placement:"bottom"}]]),e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"tool-icon",onClick:h[0]||(h[0]=g=>a("download"))},[...h[3]||(h[3]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-export-canvas"},null,-1)])])),[[m,{content:"导出图片",placement:"bottom"}]])]),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"miniMapRef",ref:i,class:"canvas-minimap"},null,512)):e.createCommentVNode("",!0)])}}}),rl=oe(al,[["__scopeId","data-v-0e5cea87"]]),il=`.x6-widget-dnd {
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Oe=require("bkui-vue/lib/icon"),we=require("@antv/x6"),Rr=require("@antv/x6-plugin-selection"),zr=require("@antv/x6-plugin-clipboard"),Ir=require("@antv/x6-plugin-snapline"),Eo=require("@antv/x6-vue-shape"),ve=require("lodash"),un=require("bkui-vue/lib/message"),$r=require("@antv/x6-plugin-minimap"),pn=require("vue-router"),jn=require("bkui-vue/lib"),Ur=require("monaco-editor"),Bo=require("bkui-vue");function jr(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const Ot=jr(Ur);function Ca(t,n){return function(){return t.apply(n,arguments)}}const{toString:Gr}=Object.prototype,{getPrototypeOf:ao}=Object,{iterator:wn,toStringTag:_a}=Symbol,yn=(t=>n=>{const o=Gr.call(n);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),He=t=>(t=t.toLowerCase(),n=>yn(n)===t),bn=t=>n=>typeof n===t,{isArray:Tt}=Array,Et=bn("undefined");function Gt(t){return t!==null&&!Et(t)&&t.constructor!==null&&!Et(t.constructor)&&Te(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Aa=He("ArrayBuffer");function qr(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Aa(t.buffer),n}const Hr=bn("string"),Te=bn("function"),xa=bn("number"),qt=t=>t!==null&&typeof t=="object",Wr=t=>t===!0||t===!1,an=t=>{if(yn(t)!=="object")return!1;const n=ao(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(_a in t)&&!(wn in t)},Yr=t=>{if(!qt(t)||Gt(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Zr=He("Date"),Qr=He("File"),Jr=He("Blob"),Kr=He("FileList"),Xr=t=>qt(t)&&Te(t.pipe),es=t=>{let n;return t&&(typeof FormData=="function"&&t instanceof FormData||Te(t.append)&&((n=yn(t))==="formdata"||n==="object"&&Te(t.toString)&&t.toString()==="[object FormData]"))},ts=He("URLSearchParams"),[ns,os,as,rs]=["ReadableStream","Request","Response","Headers"].map(He),ss=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ht(t,n,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let a,r;if(typeof t!="object"&&(t=[t]),Tt(t))for(a=0,r=t.length;a<r;a++)n.call(null,t[a],a,t);else{if(Gt(t))return;const i=o?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let l;for(a=0;a<s;a++)l=i[a],n.call(null,t[l],l,t)}}function Ea(t,n){if(Gt(t))return null;n=n.toLowerCase();const o=Object.keys(t);let a=o.length,r;for(;a-- >0;)if(r=o[a],n===r.toLowerCase())return r;return null}const pt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ba=t=>!Et(t)&&t!==pt;function Gn(){const{caseless:t,skipUndefined:n}=Ba(this)&&this||{},o={},a=(r,i)=>{const s=t&&Ea(o,i)||i;an(o[s])&&an(r)?o[s]=Gn(o[s],r):an(r)?o[s]=Gn({},r):Tt(r)?o[s]=r.slice():(!n||!Et(r))&&(o[s]=r)};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ht(arguments[r],a);return o}const is=(t,n,o,{allOwnKeys:a}={})=>(Ht(n,(r,i)=>{o&&Te(r)?t[i]=Ca(r,o):t[i]=r},{allOwnKeys:a}),t),ls=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),cs=(t,n,o,a)=>{t.prototype=Object.create(n.prototype,a),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:n.prototype}),o&&Object.assign(t.prototype,o)},ds=(t,n,o,a)=>{let r,i,s;const l={};if(n=n||{},t==null)return n;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)s=r[i],(!a||a(s,t,n))&&!l[s]&&(n[s]=t[s],l[s]=!0);t=o!==!1&&ao(t)}while(t&&(!o||o(t,n))&&t!==Object.prototype);return n},us=(t,n,o)=>{t=String(t),(o===void 0||o>t.length)&&(o=t.length),o-=n.length;const a=t.indexOf(n,o);return a!==-1&&a===o},ps=t=>{if(!t)return null;if(Tt(t))return t;let n=t.length;if(!xa(n))return null;const o=new Array(n);for(;n-- >0;)o[n]=t[n];return o},fs=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&ao(Uint8Array)),ms=(t,n)=>{const a=(t&&t[wn]).call(t);let r;for(;(r=a.next())&&!r.done;){const i=r.value;n.call(t,i[0],i[1])}},vs=(t,n)=>{let o;const a=[];for(;(o=t.exec(n))!==null;)a.push(o);return a},hs=He("HTMLFormElement"),gs=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,r){return a.toUpperCase()+r}),Vo=(({hasOwnProperty:t})=>(n,o)=>t.call(n,o))(Object.prototype),ws=He("RegExp"),Va=(t,n)=>{const o=Object.getOwnPropertyDescriptors(t),a={};Ht(o,(r,i)=>{let s;(s=n(r,i,t))!==!1&&(a[i]=s||r)}),Object.defineProperties(t,a)},ys=t=>{Va(t,(n,o)=>{if(Te(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const a=t[o];if(Te(a)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},bs=(t,n)=>{const o={},a=r=>{r.forEach(i=>{o[i]=!0})};return Tt(t)?a(t):a(String(t).split(n)),o},ks=()=>{},Cs=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function _s(t){return!!(t&&Te(t.append)&&t[_a]==="FormData"&&t[wn])}const As=t=>{const n=new Array(10),o=(a,r)=>{if(qt(a)){if(n.indexOf(a)>=0)return;if(Gt(a))return a;if(!("toJSON"in a)){n[r]=a;const i=Tt(a)?[]:{};return Ht(a,(s,l)=>{const c=o(s,r+1);!Et(c)&&(i[l]=c)}),n[r]=void 0,i}}return a};return o(t,0)},xs=He("AsyncFunction"),Es=t=>t&&(qt(t)||Te(t))&&Te(t.then)&&Te(t.catch),Na=((t,n)=>t?setImmediate:n?((o,a)=>(pt.addEventListener("message",({source:r,data:i})=>{r===pt&&i===o&&a.length&&a.shift()()},!1),r=>{a.push(r),pt.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Te(pt.postMessage)),Bs=typeof queueMicrotask<"u"?queueMicrotask.bind(pt):typeof process<"u"&&process.nextTick||Na,Vs=t=>t!=null&&Te(t[wn]),M={isArray:Tt,isArrayBuffer:Aa,isBuffer:Gt,isFormData:es,isArrayBufferView:qr,isString:Hr,isNumber:xa,isBoolean:Wr,isObject:qt,isPlainObject:an,isEmptyObject:Yr,isReadableStream:ns,isRequest:os,isResponse:as,isHeaders:rs,isUndefined:Et,isDate:Zr,isFile:Qr,isBlob:Jr,isRegExp:ws,isFunction:Te,isStream:Xr,isURLSearchParams:ts,isTypedArray:fs,isFileList:Kr,forEach:Ht,merge:Gn,extend:is,trim:ss,stripBOM:ls,inherits:cs,toFlatObject:ds,kindOf:yn,kindOfTest:He,endsWith:us,toArray:ps,forEachEntry:ms,matchAll:vs,isHTMLForm:hs,hasOwnProperty:Vo,hasOwnProp:Vo,reduceDescriptors:Va,freezeMethods:ys,toObjectSet:bs,toCamelCase:gs,noop:ks,toFiniteNumber:Cs,findKey:Ea,global:pt,isContextDefined:Ba,isSpecCompliantForm:_s,toJSONObject:As,isAsyncFn:xs,isThenable:Es,setImmediate:Na,asap:Bs,isIterable:Vs};function ce(t,n,o,a,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",n&&(this.code=n),o&&(this.config=o),a&&(this.request=a),r&&(this.response=r,this.status=r.status?r.status:null)}M.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.status}}});const Da=ce.prototype,Ta={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Ta[t]={value:t}});Object.defineProperties(ce,Ta);Object.defineProperty(Da,"isAxiosError",{value:!0});ce.from=(t,n,o,a,r,i)=>{const s=Object.create(Da);M.toFlatObject(t,s,function(u){return u!==Error.prototype},d=>d!=="isAxiosError");const l=t&&t.message?t.message:"Error",c=n==null&&t?t.code:n;return ce.call(s,l,c,o,a,r),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",i&&Object.assign(s,i),s};const Ns=null;function qn(t){return M.isPlainObject(t)||M.isArray(t)}function Ma(t){return M.endsWith(t,"[]")?t.slice(0,-2):t}function No(t,n,o){return t?t.concat(n).map(function(r,i){return r=Ma(r),!o&&i?"["+r+"]":r}).join(o?".":""):n}function Ds(t){return M.isArray(t)&&!t.some(qn)}const Ts=M.toFlatObject(M,{},null,function(n){return/^is[A-Z]/.test(n)});function kn(t,n,o){if(!M.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,o=M.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,m){return!M.isUndefined(m[w])});const a=o.metaTokens,r=o.visitor||u,i=o.dots,s=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(n);if(!M.isFunction(r))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(M.isDate(p))return p.toISOString();if(M.isBoolean(p))return p.toString();if(!c&&M.isBlob(p))throw new ce("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(p)||M.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,w,m){let g=p;if(p&&!m&&typeof p=="object"){if(M.endsWith(w,"{}"))w=a?w:w.slice(0,-2),p=JSON.stringify(p);else if(M.isArray(p)&&Ds(p)||(M.isFileList(p)||M.endsWith(w,"[]"))&&(g=M.toArray(p)))return w=Ma(w),g.forEach(function(b,f){!(M.isUndefined(b)||b===null)&&n.append(s===!0?No([w],f,i):s===null?w:w+"[]",d(b))}),!1}return qn(p)?!0:(n.append(No(m,w,i),d(p)),!1)}const v=[],k=Object.assign(Ts,{defaultVisitor:u,convertValue:d,isVisitable:qn});function h(p,w){if(!M.isUndefined(p)){if(v.indexOf(p)!==-1)throw Error("Circular reference detected in "+w.join("."));v.push(p),M.forEach(p,function(g,y){(!(M.isUndefined(g)||g===null)&&r.call(n,g,M.isString(y)?y.trim():y,w,k))===!0&&h(g,w?w.concat(y):[y])}),v.pop()}}if(!M.isObject(t))throw new TypeError("data must be an object");return h(t),n}function Do(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(a){return n[a]})}function ro(t,n){this._pairs=[],t&&kn(t,this,n)}const Sa=ro.prototype;Sa.append=function(n,o){this._pairs.push([n,o])};Sa.toString=function(n){const o=n?function(a){return n.call(this,a,Do)}:Do;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Ms(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function La(t,n,o){if(!n)return t;const a=o&&o.encode||Ms;M.isFunction(o)&&(o={serialize:o});const r=o&&o.serialize;let i;if(r?i=r(n,o):i=M.isURLSearchParams(n)?n.toString():new ro(n,o).toString(a),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class To{constructor(){this.handlers=[]}use(n,o,a){return this.handlers.push({fulfilled:n,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){M.forEach(this.handlers,function(a){a!==null&&n(a)})}}const Pa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ss=typeof URLSearchParams<"u"?URLSearchParams:ro,Ls=typeof FormData<"u"?FormData:null,Ps=typeof Blob<"u"?Blob:null,Os={isBrowser:!0,classes:{URLSearchParams:Ss,FormData:Ls,Blob:Ps},protocols:["http","https","file","blob","url","data"]},so=typeof window<"u"&&typeof document<"u",Hn=typeof navigator=="object"&&navigator||void 0,Fs=so&&(!Hn||["ReactNative","NativeScript","NS"].indexOf(Hn.product)<0),Rs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zs=so&&window.location.href||"http://localhost",Is=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:so,hasStandardBrowserEnv:Fs,hasStandardBrowserWebWorkerEnv:Rs,navigator:Hn,origin:zs},Symbol.toStringTag,{value:"Module"})),Be={...Is,...Os};function $s(t,n){return kn(t,new Be.classes.URLSearchParams,{visitor:function(o,a,r,i){return Be.isNode&&M.isBuffer(o)?(this.append(a,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...n})}function Us(t){return M.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function js(t){const n={},o=Object.keys(t);let a;const r=o.length;let i;for(a=0;a<r;a++)i=o[a],n[i]=t[i];return n}function Oa(t){function n(o,a,r,i){let s=o[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),c=i>=o.length;return s=!s&&M.isArray(r)?r.length:s,c?(M.hasOwnProp(r,s)?r[s]=[r[s],a]:r[s]=a,!l):((!r[s]||!M.isObject(r[s]))&&(r[s]=[]),n(o,a,r[s],i)&&M.isArray(r[s])&&(r[s]=js(r[s])),!l)}if(M.isFormData(t)&&M.isFunction(t.entries)){const o={};return M.forEachEntry(t,(a,r)=>{n(Us(a),r,o,0)}),o}return null}function Gs(t,n,o){if(M.isString(t))try{return(n||JSON.parse)(t),M.trim(t)}catch(a){if(a.name!=="SyntaxError")throw a}return(o||JSON.stringify)(t)}const Wt={transitional:Pa,adapter:["xhr","http","fetch"],transformRequest:[function(n,o){const a=o.getContentType()||"",r=a.indexOf("application/json")>-1,i=M.isObject(n);if(i&&M.isHTMLForm(n)&&(n=new FormData(n)),M.isFormData(n))return r?JSON.stringify(Oa(n)):n;if(M.isArrayBuffer(n)||M.isBuffer(n)||M.isStream(n)||M.isFile(n)||M.isBlob(n)||M.isReadableStream(n))return n;if(M.isArrayBufferView(n))return n.buffer;if(M.isURLSearchParams(n))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let l;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return $s(n,this.formSerializer).toString();if((l=M.isFileList(n))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return kn(l?{"files[]":n}:n,c&&new c,this.formSerializer)}}return i||r?(o.setContentType("application/json",!1),Gs(n)):n}],transformResponse:[function(n){const o=this.transitional||Wt.transitional,a=o&&o.forcedJSONParsing,r=this.responseType==="json";if(M.isResponse(n)||M.isReadableStream(n))return n;if(n&&M.isString(n)&&(a&&!this.responseType||r)){const s=!(o&&o.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(l){if(s)throw l.name==="SyntaxError"?ce.from(l,ce.ERR_BAD_RESPONSE,this,null,this.response):l}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],t=>{Wt.headers[t]={}});const qs=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hs=t=>{const n={};let o,a,r;return t&&t.split(`
2
+ `).forEach(function(s){r=s.indexOf(":"),o=s.substring(0,r).trim().toLowerCase(),a=s.substring(r+1).trim(),!(!o||n[o]&&qs[o])&&(o==="set-cookie"?n[o]?n[o].push(a):n[o]=[a]:n[o]=n[o]?n[o]+", "+a:a)}),n},Mo=Symbol("internals");function St(t){return t&&String(t).trim().toLowerCase()}function rn(t){return t===!1||t==null?t:M.isArray(t)?t.map(rn):String(t)}function Ws(t){const n=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=o.exec(t);)n[a[1]]=a[2];return n}const Ys=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function On(t,n,o,a,r){if(M.isFunction(a))return a.call(this,n,o);if(r&&(n=o),!!M.isString(n)){if(M.isString(a))return n.indexOf(a)!==-1;if(M.isRegExp(a))return a.test(n)}}function Zs(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,o,a)=>o.toUpperCase()+a)}function Qs(t,n){const o=M.toCamelCase(" "+n);["get","set","has"].forEach(a=>{Object.defineProperty(t,a+o,{value:function(r,i,s){return this[a].call(this,n,r,i,s)},configurable:!0})})}let Me=class{constructor(n){n&&this.set(n)}set(n,o,a){const r=this;function i(l,c,d){const u=St(c);if(!u)throw new Error("header name must be a non-empty string");const v=M.findKey(r,u);(!v||r[v]===void 0||d===!0||d===void 0&&r[v]!==!1)&&(r[v||c]=rn(l))}const s=(l,c)=>M.forEach(l,(d,u)=>i(d,u,c));if(M.isPlainObject(n)||n instanceof this.constructor)s(n,o);else if(M.isString(n)&&(n=n.trim())&&!Ys(n))s(Hs(n),o);else if(M.isObject(n)&&M.isIterable(n)){let l={},c,d;for(const u of n){if(!M.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[d=u[0]]=(c=l[d])?M.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}s(l,o)}else n!=null&&i(o,n,a);return this}get(n,o){if(n=St(n),n){const a=M.findKey(this,n);if(a){const r=this[a];if(!o)return r;if(o===!0)return Ws(r);if(M.isFunction(o))return o.call(this,r,a);if(M.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,o){if(n=St(n),n){const a=M.findKey(this,n);return!!(a&&this[a]!==void 0&&(!o||On(this,this[a],a,o)))}return!1}delete(n,o){const a=this;let r=!1;function i(s){if(s=St(s),s){const l=M.findKey(a,s);l&&(!o||On(a,a[l],l,o))&&(delete a[l],r=!0)}}return M.isArray(n)?n.forEach(i):i(n),r}clear(n){const o=Object.keys(this);let a=o.length,r=!1;for(;a--;){const i=o[a];(!n||On(this,this[i],i,n,!0))&&(delete this[i],r=!0)}return r}normalize(n){const o=this,a={};return M.forEach(this,(r,i)=>{const s=M.findKey(a,i);if(s){o[s]=rn(r),delete o[i];return}const l=n?Zs(i):String(i).trim();l!==i&&delete o[i],o[l]=rn(r),a[l]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const o=Object.create(null);return M.forEach(this,(a,r)=>{a!=null&&a!==!1&&(o[r]=n&&M.isArray(a)?a.join(", "):a)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,o])=>n+": "+o).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...o){const a=new this(n);return o.forEach(r=>a.set(r)),a}static accessor(n){const a=(this[Mo]=this[Mo]={accessors:{}}).accessors,r=this.prototype;function i(s){const l=St(s);a[l]||(Qs(r,s),a[l]=!0)}return M.isArray(n)?n.forEach(i):i(n),this}};Me.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.reduceDescriptors(Me.prototype,({value:t},n)=>{let o=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(a){this[o]=a}}});M.freezeMethods(Me);function Fn(t,n){const o=this||Wt,a=n||o,r=Me.from(a.headers);let i=a.data;return M.forEach(t,function(l){i=l.call(o,i,r.normalize(),n?n.status:void 0)}),r.normalize(),i}function Fa(t){return!!(t&&t.__CANCEL__)}function Mt(t,n,o){ce.call(this,t??"canceled",ce.ERR_CANCELED,n,o),this.name="CanceledError"}M.inherits(Mt,ce,{__CANCEL__:!0});function Ra(t,n,o){const a=o.config.validateStatus;!o.status||!a||a(o.status)?t(o):n(new ce("Request failed with status code "+o.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function Js(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function Ks(t,n){t=t||10;const o=new Array(t),a=new Array(t);let r=0,i=0,s;return n=n!==void 0?n:1e3,function(c){const d=Date.now(),u=a[i];s||(s=d),o[r]=c,a[r]=d;let v=i,k=0;for(;v!==r;)k+=o[v++],v=v%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),d-s<n)return;const h=u&&d-u;return h?Math.round(k*1e3/h):void 0}}function Xs(t,n){let o=0,a=1e3/n,r,i;const s=(d,u=Date.now())=>{o=u,r=null,i&&(clearTimeout(i),i=null),t(...d)};return[(...d)=>{const u=Date.now(),v=u-o;v>=a?s(d,u):(r=d,i||(i=setTimeout(()=>{i=null,s(r)},a-v)))},()=>r&&s(r)]}const fn=(t,n,o=3)=>{let a=0;const r=Ks(50,250);return Xs(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,c=s-a,d=r(c),u=s<=l;a=s;const v={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-s)/d:void 0,event:i,lengthComputable:l!=null,[n?"download":"upload"]:!0};t(v)},o)},So=(t,n)=>{const o=t!=null;return[a=>n[0]({lengthComputable:o,total:t,loaded:a}),n[1]]},Lo=t=>(...n)=>M.asap(()=>t(...n)),ei=Be.hasStandardBrowserEnv?((t,n)=>o=>(o=new URL(o,Be.origin),t.protocol===o.protocol&&t.host===o.host&&(n||t.port===o.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0,ti=Be.hasStandardBrowserEnv?{write(t,n,o,a,r,i,s){if(typeof document>"u")return;const l=[`${t}=${encodeURIComponent(n)}`];M.isNumber(o)&&l.push(`expires=${new Date(o).toUTCString()}`),M.isString(a)&&l.push(`path=${a}`),M.isString(r)&&l.push(`domain=${r}`),i===!0&&l.push("secure"),M.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ni(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function oi(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function za(t,n,o){let a=!ni(n);return t&&(a||o==!1)?oi(t,n):n}const Po=t=>t instanceof Me?{...t}:t;function vt(t,n){n=n||{};const o={};function a(d,u,v,k){return M.isPlainObject(d)&&M.isPlainObject(u)?M.merge.call({caseless:k},d,u):M.isPlainObject(u)?M.merge({},u):M.isArray(u)?u.slice():u}function r(d,u,v,k){if(M.isUndefined(u)){if(!M.isUndefined(d))return a(void 0,d,v,k)}else return a(d,u,v,k)}function i(d,u){if(!M.isUndefined(u))return a(void 0,u)}function s(d,u){if(M.isUndefined(u)){if(!M.isUndefined(d))return a(void 0,d)}else return a(void 0,u)}function l(d,u,v){if(v in n)return a(d,u);if(v in t)return a(void 0,d)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(d,u,v)=>r(Po(d),Po(u),v,!0)};return M.forEach(Object.keys({...t,...n}),function(u){const v=c[u]||r,k=v(t[u],n[u],u);M.isUndefined(k)&&v!==l||(o[u]=k)}),o}const Ia=t=>{const n=vt({},t);let{data:o,withXSRFToken:a,xsrfHeaderName:r,xsrfCookieName:i,headers:s,auth:l}=n;if(n.headers=s=Me.from(s),n.url=La(za(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),M.isFormData(o)){if(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(M.isFunction(o.getHeaders)){const c=o.getHeaders(),d=["content-type","content-length"];Object.entries(c).forEach(([u,v])=>{d.includes(u.toLowerCase())&&s.set(u,v)})}}if(Be.hasStandardBrowserEnv&&(a&&M.isFunction(a)&&(a=a(n)),a||a!==!1&&ei(n.url))){const c=r&&i&&ti.read(i);c&&s.set(r,c)}return n},ai=typeof XMLHttpRequest<"u",ri=ai&&function(t){return new Promise(function(o,a){const r=Ia(t);let i=r.data;const s=Me.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=r,u,v,k,h,p;function w(){h&&h(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function g(){if(!m)return;const b=Me.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:t,request:m};Ra(function(S){o(S),w()},function(S){a(S),w()},_),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(a(new ce("Request aborted",ce.ECONNABORTED,t,m)),m=null)},m.onerror=function(f){const _=f&&f.message?f.message:"Network Error",B=new ce(_,ce.ERR_NETWORK,t,m);B.event=f||null,a(B),m=null},m.ontimeout=function(){let f=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const _=r.transitional||Pa;r.timeoutErrorMessage&&(f=r.timeoutErrorMessage),a(new ce(f,_.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,t,m)),m=null},i===void 0&&s.setContentType(null),"setRequestHeader"in m&&M.forEach(s.toJSON(),function(f,_){m.setRequestHeader(_,f)}),M.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),l&&l!=="json"&&(m.responseType=r.responseType),d&&([k,p]=fn(d,!0),m.addEventListener("progress",k)),c&&m.upload&&([v,h]=fn(c),m.upload.addEventListener("progress",v),m.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(u=b=>{m&&(a(!b||b.type?new Mt(null,t,m):b),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const y=Js(r.url);if(y&&Be.protocols.indexOf(y)===-1){a(new ce("Unsupported protocol "+y+":",ce.ERR_BAD_REQUEST,t));return}m.send(i||null)})},si=(t,n)=>{const{length:o}=t=t?t.filter(Boolean):[];if(n||o){let a=new AbortController,r;const i=function(d){if(!r){r=!0,l();const u=d instanceof Error?d:this.reason;a.abort(u instanceof ce?u:new Mt(u instanceof Error?u.message:u))}};let s=n&&setTimeout(()=>{s=null,i(new ce(`timeout ${n} of ms exceeded`,ce.ETIMEDOUT))},n);const l=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),t=null)};t.forEach(d=>d.addEventListener("abort",i));const{signal:c}=a;return c.unsubscribe=()=>M.asap(l),c}},ii=function*(t,n){let o=t.byteLength;if(o<n){yield t;return}let a=0,r;for(;a<o;)r=a+n,yield t.slice(a,r),a=r},li=async function*(t,n){for await(const o of ci(t))yield*ii(o,n)},ci=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:o,value:a}=await n.read();if(o)break;yield a}}finally{await n.cancel()}},Oo=(t,n,o,a)=>{const r=li(t,n);let i=0,s,l=c=>{s||(s=!0,a&&a(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await r.next();if(d){l(),c.close();return}let v=u.byteLength;if(o){let k=i+=v;o(k)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},Fo=64*1024,{isFunction:en}=M,di=(({Request:t,Response:n})=>({Request:t,Response:n}))(M.global),{ReadableStream:Ro,TextEncoder:zo}=M.global,Io=(t,...n)=>{try{return!!t(...n)}catch{return!1}},ui=t=>{t=M.merge.call({skipUndefined:!0},di,t);const{fetch:n,Request:o,Response:a}=t,r=n?en(n):typeof fetch=="function",i=en(o),s=en(a);if(!r)return!1;const l=r&&en(Ro),c=r&&(typeof zo=="function"?(p=>w=>p.encode(w))(new zo):async p=>new Uint8Array(await new o(p).arrayBuffer())),d=i&&l&&Io(()=>{let p=!1;const w=new o(Be.origin,{body:new Ro,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!w}),u=s&&l&&Io(()=>M.isReadableStream(new a("").body)),v={stream:u&&(p=>p.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!v[p]&&(v[p]=(w,m)=>{let g=w&&w[p];if(g)return g.call(w);throw new ce(`Response type '${p}' is not supported`,ce.ERR_NOT_SUPPORT,m)})});const k=async p=>{if(p==null)return 0;if(M.isBlob(p))return p.size;if(M.isSpecCompliantForm(p))return(await new o(Be.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(M.isArrayBufferView(p)||M.isArrayBuffer(p))return p.byteLength;if(M.isURLSearchParams(p)&&(p=p+""),M.isString(p))return(await c(p)).byteLength},h=async(p,w)=>{const m=M.toFiniteNumber(p.getContentLength());return m??k(w)};return async p=>{let{url:w,method:m,data:g,signal:y,cancelToken:b,timeout:f,onDownloadProgress:_,onUploadProgress:B,responseType:S,headers:T,withCredentials:V="same-origin",fetchOptions:L}=Ia(p),z=n||fetch;S=S?(S+"").toLowerCase():"text";let Z=si([y,b&&b.toAbortSignal()],f),Y=null;const P=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let x;try{if(B&&d&&m!=="get"&&m!=="head"&&(x=await h(T,g))!==0){let I=new o(w,{method:"POST",body:g,duplex:"half"}),G;if(M.isFormData(g)&&(G=I.headers.get("content-type"))&&T.setContentType(G),I.body){const[K,oe]=So(x,fn(Lo(B)));g=Oo(I.body,Fo,K,oe)}}M.isString(V)||(V=V?"include":"omit");const N=i&&"credentials"in o.prototype,C={...L,signal:Z,method:m.toUpperCase(),headers:T.normalize().toJSON(),body:g,duplex:"half",credentials:N?V:void 0};Y=i&&new o(w,C);let A=await(i?z(Y,L):z(w,C));const D=u&&(S==="stream"||S==="response");if(u&&(_||D&&P)){const I={};["status","statusText","headers"].forEach(ee=>{I[ee]=A[ee]});const G=M.toFiniteNumber(A.headers.get("content-length")),[K,oe]=_&&So(G,fn(Lo(_),!0))||[];A=new a(Oo(A.body,Fo,K,()=>{oe&&oe(),P&&P()}),I)}S=S||"text";let F=await v[M.findKey(v,S)||"text"](A,p);return!D&&P&&P(),await new Promise((I,G)=>{Ra(I,G,{data:F,headers:Me.from(A.headers),status:A.status,statusText:A.statusText,config:p,request:Y})})}catch(N){throw P&&P(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,p,Y),{cause:N.cause||N}):ce.from(N,N&&N.code,p,Y)}}},pi=new Map,$a=t=>{let n=t&&t.env||{};const{fetch:o,Request:a,Response:r}=n,i=[a,r,o];let s=i.length,l=s,c,d,u=pi;for(;l--;)c=i[l],d=u.get(c),d===void 0&&u.set(c,d=l?new Map:ui(n)),u=d;return d};$a();const io={http:Ns,xhr:ri,fetch:{get:$a}};M.forEach(io,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const $o=t=>`- ${t}`,fi=t=>M.isFunction(t)||t===null||t===!1;function mi(t,n){t=M.isArray(t)?t:[t];const{length:o}=t;let a,r;const i={};for(let s=0;s<o;s++){a=t[s];let l;if(r=a,!fi(a)&&(r=io[(l=String(a)).toLowerCase()],r===void 0))throw new ce(`Unknown adapter '${l}'`);if(r&&(M.isFunction(r)||(r=r.get(n))))break;i[l||"#"+s]=r}if(!r){const s=Object.entries(i).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=o?s.length>1?`since :
4
+ `+s.map($o).join(`
5
+ `):" "+$o(s[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r}const Ua={getAdapter:mi,adapters:io};function Rn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Mt(null,t)}function Uo(t){return Rn(t),t.headers=Me.from(t.headers),t.data=Fn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ua.getAdapter(t.adapter||Wt.adapter,t)(t).then(function(a){return Rn(t),a.data=Fn.call(t,t.transformResponse,a),a.headers=Me.from(a.headers),a},function(a){return Fa(a)||(Rn(t),a&&a.response&&(a.response.data=Fn.call(t,t.transformResponse,a.response),a.response.headers=Me.from(a.response.headers))),Promise.reject(a)})}const ja="1.13.2",Cn={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Cn[t]=function(a){return typeof a===t||"a"+(n<1?"n ":" ")+t}});const jo={};Cn.transitional=function(n,o,a){function r(i,s){return"[Axios v"+ja+"] Transitional option '"+i+"'"+s+(a?". "+a:"")}return(i,s,l)=>{if(n===!1)throw new ce(r(s," has been removed"+(o?" in "+o:"")),ce.ERR_DEPRECATED);return o&&!jo[s]&&(jo[s]=!0,console.warn(r(s," has been deprecated since v"+o+" and will be removed in the near future"))),n?n(i,s,l):!0}};Cn.spelling=function(n){return(o,a)=>(console.warn(`${a} is likely a misspelling of ${n}`),!0)};function vi(t,n,o){if(typeof t!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const a=Object.keys(t);let r=a.length;for(;r-- >0;){const i=a[r],s=n[i];if(s){const l=t[i],c=l===void 0||s(l,i,t);if(c!==!0)throw new ce("option "+i+" must be "+c,ce.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new ce("Unknown option "+i,ce.ERR_BAD_OPTION)}}const sn={assertOptions:vi,validators:Cn},Ze=sn.validators;let ft=class{constructor(n){this.defaults=n||{},this.interceptors={request:new To,response:new To}}async request(n,o){try{return await this._request(n,o)}catch(a){if(a instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=`
6
+ `+i):a.stack=i}catch{}}throw a}}_request(n,o){typeof n=="string"?(o=o||{},o.url=n):o=n||{},o=vt(this.defaults,o);const{transitional:a,paramsSerializer:r,headers:i}=o;a!==void 0&&sn.assertOptions(a,{silentJSONParsing:Ze.transitional(Ze.boolean),forcedJSONParsing:Ze.transitional(Ze.boolean),clarifyTimeoutError:Ze.transitional(Ze.boolean)},!1),r!=null&&(M.isFunction(r)?o.paramsSerializer={serialize:r}:sn.assertOptions(r,{encode:Ze.function,serialize:Ze.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),sn.assertOptions(o,{baseUrl:Ze.spelling("baseURL"),withXsrfToken:Ze.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let s=i&&M.merge(i.common,i[o.method]);i&&M.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),o.headers=Me.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(o)===!1||(c=c&&w.synchronous,l.unshift(w.fulfilled,w.rejected))});const d=[];this.interceptors.response.forEach(function(w){d.push(w.fulfilled,w.rejected)});let u,v=0,k;if(!c){const p=[Uo.bind(this),void 0];for(p.unshift(...l),p.push(...d),k=p.length,u=Promise.resolve(o);v<k;)u=u.then(p[v++],p[v++]);return u}k=l.length;let h=o;for(;v<k;){const p=l[v++],w=l[v++];try{h=p(h)}catch(m){w.call(this,m);break}}try{u=Uo.call(this,h)}catch(p){return Promise.reject(p)}for(v=0,k=d.length;v<k;)u=u.then(d[v++],d[v++]);return u}getUri(n){n=vt(this.defaults,n);const o=za(n.baseURL,n.url,n.allowAbsoluteUrls);return La(o,n.params,n.paramsSerializer)}};M.forEach(["delete","get","head","options"],function(n){ft.prototype[n]=function(o,a){return this.request(vt(a||{},{method:n,url:o,data:(a||{}).data}))}});M.forEach(["post","put","patch"],function(n){function o(a){return function(i,s,l){return this.request(vt(l||{},{method:n,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}ft.prototype[n]=o(),ft.prototype[n+"Form"]=o(!0)});let hi=class Ga{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const a=this;this.promise.then(r=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](r);a._listeners=null}),this.promise.then=r=>{let i;const s=new Promise(l=>{a.subscribe(l),i=l}).then(r);return s.cancel=function(){a.unsubscribe(i)},s},n(function(i,s,l){a.reason||(a.reason=new Mt(i,s,l),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const o=this._listeners.indexOf(n);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const n=new AbortController,o=a=>{n.abort(a)};return this.subscribe(o),n.signal.unsubscribe=()=>this.unsubscribe(o),n.signal}static source(){let n;return{token:new Ga(function(r){n=r}),cancel:n}}};function gi(t){return function(o){return t.apply(null,o)}}function wi(t){return M.isObject(t)&&t.isAxiosError===!0}const Wn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Wn).forEach(([t,n])=>{Wn[n]=t});function qa(t){const n=new ft(t),o=Ca(ft.prototype.request,n);return M.extend(o,ft.prototype,n,{allOwnKeys:!0}),M.extend(o,n,null,{allOwnKeys:!0}),o.create=function(r){return qa(vt(t,r))},o}const ye=qa(Wt);ye.Axios=ft;ye.CanceledError=Mt;ye.CancelToken=hi;ye.isCancel=Fa;ye.VERSION=ja;ye.toFormData=kn;ye.AxiosError=ce;ye.Cancel=ye.CanceledError;ye.all=function(n){return Promise.all(n)};ye.spread=gi;ye.isAxiosError=wi;ye.mergeConfig=vt;ye.AxiosHeaders=Me;ye.formToJSON=t=>Oa(M.isHTMLForm(t)?new FormData(t):t);ye.getAdapter=Ua.getAdapter;ye.HttpStatusCode=Wn;ye.default=ye;const{Axios:W2,AxiosError:Y2,CanceledError:Z2,isCancel:Q2,CancelToken:J2,VERSION:K2,all:X2,Cancel:em,isAxiosError:tm,spread:nm,toFormData:om,AxiosHeaders:am,HttpStatusCode:rm,formToJSON:sm,getAdapter:im,mergeConfig:lm}=ye;function yi(t){if(t.axiosInstance)return t.axiosInstance;const n={baseURL:t.baseURL||window.API_HOST,xsrfCookieName:"bk-incident_csrftoken",xsrfHeaderName:"X-CSRFToken",withCredentials:!0,...t.axiosConfig};return ye.create(n)}const bi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,12%20L3,12%20C2.72385763,12%202.5,12.2238576%202.5,12.5%20C2.5,12.7761424%202.72385763,13%203,13%20L13,13%20C13.2761424,13%2013.5,12.7761424%2013.5,12.5%20C13.5,12.2238576%2013.2761424,12%2013,12%20Z%20M5,6.5%20L4,6.5%20C3.72385763,6.5%203.5,6.72385763%203.5,7%20L3.5,10.5%20C3.5,10.7761424%203.72385763,11%204,11%20L5,11%20C5.27614237,11%205.5,10.7761424%205.5,10.5%20L5.5,7%20C5.5,6.72385763%205.27614237,6.5%205,6.5%20Z%20M8.5,3.5%20L7.5,3.5%20C7.22385763,3.5%207,3.72385763%207,4%20L7,10.5%20C7,10.7761424%207.22385763,11%207.5,11%20L8.5,11%20C8.77614237,11%209,10.7761424%209,10.5%20L9,4%20C9,3.72385763%208.77614237,3.5%208.5,3.5%20Z%20M12,5%20L11,5%20C10.7238576,5%2010.5,5.22385763%2010.5,5.5%20L10.5,10.5%20C10.5,10.7761424%2010.7238576,11%2011,11%20L12,11%20C12.2761424,11%2012.5,10.7761424%2012.5,10.5%20L12.5,5.5%20C12.5,5.22385763%2012.2761424,5%2012,5%20Z'%20fill='%23F8A54F'%20fill-rule='evenodd'/%3e%3c/svg%3e",ki="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='19loczb8h__f71x3hmpea'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.5,2.5%20C6.17779929,2.5%204.26643215,4.28054945%204.02558864,6.56651687%20L4.026,6.558%20L4.03,6.54%20L3.99928094,6.75189877%20C3.76394842,8.11436335%203.07389664,8.46527789%203.00547979,8.87325046%20L3,8.93829715%20C3,9.39912427%204.33397403,9.2134945%204.33397403,9.69904945%20L4.33397403,10.9924271%20C4.33401331,11.5290486%204.757596,11.9699791%205.29378397,11.9915459%20C5.90300757,12.0163699%206.26264111,12.0687043%206.37268552,12.1485262%20C6.45725813,12.2098718%206.51932943,12.4266274%206.55889942,12.7987929%20L6.57276328,12.9456332%20C6.61875295,13.4959998%207.10219523,13.904878%207.65256183,13.8588884%20C7.70929358,13.8541478%207.76551689,13.8445713%207.82061902,13.8302632%20L10.1746185,13.2277878%20C10.5547586,13.1298644%2010.8424468,12.818586%2010.9101698,12.431922%20C11.0509156,11.6378879%2011.2333254,10.9899099%2011.4579782,10.4880363%20C12.402959,9.65300356%2013,8.42466038%2013,7.05516145%20C13,4.53941525%2010.9852814,2.5%208.5,2.5%20Z%20M8.9876109,3.8125%20C9.12361371,3.8219246%209.2572817,3.84136285%209.38686376,3.87081473%20L9.51119251,4.49813988%20C9.7435063,4.58296131%209.9565579,4.70842634%2010.1410081,4.86687748%20L10.7410548,4.6624814%20C10.8461213,4.77852183%2010.9412649,4.90339782%2011.0247344,5.03652034%20L11.1333032,5.22560144%20C11.2050986,5.36461434%2011.2658038,5.51128472%2011.3125,5.66384549%20L10.8356146,6.08677455%20C10.8560442,6.20399306%2010.8665509,6.32474578%2010.8665509,6.4484437%20C10.8665509,6.57390873%2010.8554605,6.69642857%2010.8344472,6.81541419%20L11.3101652,7.23775422%20C11.1934246,7.61473834%2010.9949656,7.95579117%2010.7358014,8.2391183%20L10.135171,8.03413318%20C9.95188828,8.19022817%209.74117149,8.31392609%209.51177621,8.39815848%20L9.38744747,9.02607267%20C9.20182991,9.06789435%209.00920792,9.09027778%208.81133259,9.09027778%20C8.61579208,9.09027778%208.4249212,9.06848338%208.24163845,9.02725074%20L8.11730971,8.40051463%20C7.88616332,8.31628224%207.67369542,8.19199529%207.48924527,8.03531126%20L6.88803117,8.24029638%20C6.79055277,8.13368056%206.70182991,8.0188182%206.6224463,7.89747644%20L6.47068352,7.63240947%20C6.408811,7.50753348%206.35569402,7.37676711%206.31366741,7.24128844%20L6.78938536,6.81894841%20C6.76778835,6.69878472%206.75669799,6.57449777%206.75669799,6.44785466%20C6.75669799,6.32297867%206.76778835,6.20045883%206.78880166,6.08147321%20L6.3125,5.65913318%20C6.3504407,5.53661334%206.39713694,5.41821677%206.45142132,5.30394345%20L6.64696183,4.96230159%20C6.719341,4.8562748%206.79814091,4.75496032%206.88452895,4.66071429%20L7.48457565,4.8656994%20C7.67077691,4.70665923%207.88499591,4.58060516%208.11906082,4.49578373%20L8.24338956,3.86904762%20C8.37122052,3.84077381%208.50197,3.82133557%208.63622169,3.8125%20Z%20M8.8119163,5.50598338%20C8.29592283,5.50598338%207.87799148,5.92773437%207.87799148,6.4484437%20C7.87799148,6.96915303%208.29592283,7.39090402%208.8119163,7.39090402%20C9.32790976,7.39090402%209.74584112,6.96915303%209.74584112,6.4484437%20C9.74584112,5.92773437%209.32790976,5.50598338%208.8119163,5.50598338%20Z%20M8.8119163,5.88296751%20C9.12139176,5.88296751%209.37227119,6.13613982%209.37227119,6.4484437%20C9.37227119,6.76074758%209.12139176,7.01391989%208.8119163,7.01391989%20C8.50244084,7.01391989%208.25156141,6.76074758%208.25156141,6.4484437%20C8.25156141,6.13613982%208.50244084,5.88296751%208.8119163,5.88296751%20Z'%20fill='url(%2319loczb8h__f71x3hmpea)'%20fill-rule='evenodd'/%3e%3c/svg%3e",Ci="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.03846154,2.5%20C7.295,2.5%206.6923077,3.10269231%206.6923077,3.84615384%20L6.6923077,4.42307693%20L4.38461538,4.42307693%20C4.17230769,4.42307693%204,4.59538461%204,4.8076923%20L4,6.92307693%20L4.57692308,6.92307693%20C5.32038461,6.92307693%205.92307693,7.52576923%205.92307693,8.26923077%20C5.92307693,9.0126923%205.32038461,9.61538461%204.57692308,9.61538461%20L4,9.61538461%20L4,12.1153846%20C4,12.3276923%204.17230769,12.5%204.38461538,12.5%20L6.6923077,12.5%20L6.6923077,11.9230769%20C6.6923077,11.1796154%207.295,10.5769231%208.03846154,10.5769231%20C8.78192307,10.5769231%209.38461539,11.1796154%209.38461539,11.9230769%20L9.38461539,12.5%20L11.6923077,12.5%20C11.9046154,12.5%2012.0769231,12.3276923%2012.0769231,12.1153846%20L12.0769231,9.61538461%20L12.6538462,9.61538461%20C13.3973077,9.61538461%2014,9.0126923%2014,8.26923077%20C14,7.52576923%2013.3973077,6.92307693%2012.6538462,6.92307693%20L12.0769231,6.92307693%20L12.0769231,4.8076923%20C12.0769231,4.59538461%2011.9046154,4.42307693%2011.6923077,4.42307693%20L9.38461539,4.42307693%20L9.38461539,3.84615384%20C9.38461539,3.10269231%208.78192307,2.5%208.03846154,2.5%20Z'%20fill='%235AB88E'%20fill-rule='evenodd'/%3e%3c/svg%3e",_i="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='vgdxp7v4l__zvhmfdo4ha'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.44875881,3.88645164%20C7.88887563,4.38553286%207.31548649,5.06473362%206.78138741,5.85400744%20C6.4216379,5.88402737%206.07416654,5.92655559%205.74142896,5.98159211%20C5.68126606,5.77270348%205.6321535,5.570069%205.59409127,5.37619034%20C5.50937211,4.9434031%205.48727146,4.57065572%205.52901714,4.29797476%20C5.55848467,4.10784858%205.61741973,3.97275892%205.6935442,3.92772904%20C5.81878123,3.85393006%206.26447771,3.90646492%207.05027868,4.63319723%20L7.64454064,3.96650477%20C7.22094482,3.57499494%206.82067746,3.29856148%206.45356107,3.14470937%20C6.13432943,3.01087055%205.66653229,2.90329916%205.25153116,3.14721103%20C4.84512474,3.38611959%204.42398453,3.99777552%204.72725459,5.55130656%20C4.76531682,5.74893772%204.81442938,5.95282302%204.87336445,6.16421332%20C4.66586389,6.21799902%204.46818584,6.27678802%204.2815581,6.34183119%20C2.80940913,6.85216989%202.5,7.528869%202.5,8.0066861%20C2.5,8.49826234%202.82905415,8.85850142%203.10654011,9.07364421%20C3.42454394,9.32130857%203.86532916,9.53770219%204.41661765,9.71532006%20L4.68428111,8.85725059%20C3.65660079,8.5257806%203.38525389,8.1555349%203.38525389,8.0066861%20C3.38525389,7.91787716%203.46997306,7.79654664%203.61731074,7.67646695%20C3.82849474,7.50385239%204.15754889,7.33749199%204.56641096,7.19489735%20C4.75058305,7.13110501%204.9470333,7.07356682%205.15330604,7.02228279%20C5.27240401,7.34374613%205.41114699,7.67271446%205.56585156,8.00543527%20C5.34975629,8.47074408%205.16558418,8.93230041%205.01824651,9.37384344%20C4.76040556,10.1518598%204.62534603,10.8610805%204.62780166,11.4227032%20C4.63025729,11.9092761%204.74076054,12.5522028%205.25521461,12.8549037%20C5.43570327,12.9612243%205.62478661,13%205.80895872,13%20C6.05083808,13%206.2804393,12.9312044%206.46338358,12.8549037%20C6.8329556,12.6998008%207.23567859,12.4196148%207.66050223,12.0243525%20L7.06501244,11.3589109%20C6.27184459,12.0956498%205.82369249,12.1494355%205.69722765,12.0743857%20C5.60882504,12.0218508%205.51428337,11.8229689%205.51182774,11.4176999%20C5.50937211,10.9536419%205.62847006,10.3457385%205.85561565,9.66028354%20C5.92437324,9.45264574%206.00172552,9.24125546%206.08890031,9.02611266%20C6.10363407,9.05112927%206.11714004,9.07614586%206.13187381,9.1024133%20C6.59967093,9.92671036%207.13254221,10.6947201%207.67400818,11.321386%20C8.20687945,11.9380452%208.74220636,12.4121098%209.22105382,12.691045%20C9.49240072,12.8499004%209.84601114,13%2010.2008494,13%20C10.3874771,13%2010.5753327,12.9587226%2010.7533657,12.8536529%20C11.2678198,12.550952%2011.378323,11.9067745%2011.3807786,11.4202015%20C11.3832343,10.8585788%2011.2481747,10.1493581%2010.9903338,9.37009095%20C10.8589577,8.97232696%2010.6956584,8.55705136%2010.5065751,8.13802326%20L9.70235691,8.5170248%20C9.87916211,8.9072838%2010.0301832,9.29128866%2010.1517368,9.66028354%20C10.3788824,10.3457385%2010.4979804,10.9536419%2010.4955247,11.4189507%20C10.4942969,11.8242197%2010.3985274,12.0243525%2010.3101248,12.0756365%20C10.2217222,12.1281714%2010.0043991,12.1119106%209.65938341,11.910527%20C9.2640273,11.6803742%208.80605269,11.2713527%208.33702774,10.7272417%20C7.833624,10.1443548%207.33513152,9.42762914%206.89680191,8.65336529%20C6.77402052,8.43697167%206.658606,8.22182889%206.55055837,8.00543527%20C6.65983383,7.78654%206.77647615,7.56889555%206.89925754,7.35250195%20C7.02081114,7.13735916%207.14604815,6.92847053%207.27496864,6.72583605%20C7.51316455,6.71332774%207.7550439,6.70707359%208.00060669,6.70707359%20C9.30454518,6.70707359%2010.5249923,6.88093898%2011.4348024,7.19614818%20C11.8448923,7.33749199%2012.1727187,7.50385239%2012.3839027,7.67771778%20C12.5312403,7.7990483%2012.6159595,7.91912799%2012.6159595,8.00793694%20C12.6159595,8.10425085%2012.5189622,8.23433719%2012.3495239,8.36567435%20C12.111328,8.54954639%2011.7442116,8.72341178%2011.2886926,8.86850806%20L11.5526726,9.72782838%20C12.1125558,9.55021049%2012.5607079,9.33256604%2012.883623,9.08365086%20C13.1647924,8.86725724%2013.5,8.50451651%2013.5,8.00793694%20C13.5012134,7.528869%2013.1918043,6.85216989%2011.7196553,6.34183119%20C10.7202147,5.99535125%209.39908685,5.80522507%208.00060669,5.80522507%20L7.91097628,5.80522507%20C8.2805483,5.31740132%208.66117063,4.89587157%209.03197046,4.56440157%20C9.35734117,4.27420898%209.66306686,4.06782201%209.91599654,3.9677556%20C10.0928018,3.89770911%2010.2376838,3.88394998%2010.3138083,3.92772904%20C10.3960718,3.97651141%2010.4586903,4.12786186%2010.4844744,4.34425547%20C10.5213088,4.64945802%2010.4844744,5.06348279%2010.3776546,5.54129991%20L11.23958,5.7401819%20C11.3697283,5.15354257%2011.411474,4.64695636%2011.3611336,4.23418242%20C11.3181601,3.87519417%2011.1781893,3.39612623%2010.7545935,3.14721103%20C10.3481871,2.90830248%209.61886555,2.84200848%208.44875881,3.88645164%20Z%20M8.42307307,6.91304349%20C7.83892612,6.91304349%207.36538145,7.39969049%207.36538145,8%20C7.36538145,8.60030951%207.83892612,9.08695653%208.42307307,9.08695653%20C9.00722001,9.08695653%209.48076468,8.60030951%209.48076468,8%20C9.48076468,7.39969049%209.00722001,6.91304349%208.42307307,6.91304349%20Z'%20fill='url(%23vgdxp7v4l__zvhmfdo4ha)'%20fill-rule='evenodd'/%3e%3c/svg%3e",Ai="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='7doce0e6d__r8m44v5xza'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M11,3.5%20L5,3.5%20C3.8954305,3.5%203,4.3954305%203,5.5%20L3,9.5%20C3,10.6045695%203.8954305,11.5%205,11.5%20L9.536,11.5%20L12.0312272,13.0147852%20L11.4996566,11.5%20L11.0252355,11.4998441%20C12.1181756,11.4863297%2013,10.5961454%2013,9.5%20L13,5.5%20C13,4.3954305%2012.1045695,3.5%2011,3.5%20Z%20M8,9%20C8.27614237,9%208.5,9.22385763%208.5,9.5%20C8.5,9.77614237%208.27614237,10%208,10%20L5,10%20C4.72385763,10%204.5,9.77614237%204.5,9.5%20C4.5,9.22385763%204.72385763,9%205,9%20Z%20M11,7%20C11.2761424,7%2011.5,7.22385763%2011.5,7.5%20C11.5,7.77614237%2011.2761424,8%2011,8%20L5,8%20C4.72385763,8%204.5,7.77614237%204.5,7.5%20C4.5,7.22385763%204.72385763,7%205,7%20Z%20M11,5%20C11.2761424,5%2011.5,5.22385763%2011.5,5.5%20C11.5,5.77614237%2011.2761424,6%2011,6%20L5,6%20C4.72385763,6%204.5,5.77614237%204.5,5.5%20C4.5,5.22385763%204.72385763,5%205,5%20Z'%20fill='url(%237doce0e6d__r8m44v5xza)'%20fill-rule='evenodd'/%3e%3c/svg%3e",Yn={bkflow:Ci,data:bi,agent:ki,model:_i,output:Ai};function xi(t){const n=yi(t),{scopeData:o}=t,a=l=>({...l,...o}),r=async()=>(await n.get("/bkflow/plugin/tags/",{params:{...o}})).data,i=async()=>[...(await n.get("/metas/category/list_categories/",{params:o})).data.map(c=>({...c,iconUrl:Yn[c.name]})),{id:"bkflow",name:"bkflow",alias:"插件",properties:{},iconUrl:Yn.bkflow}],s=async l=>(await n.post("/metas/plugin/list_plugins/",a({category:l}))).data.apis;return{async fetchFlowDetail(l){return(await n.get(`/bkflow/template/${l}/fetch_template/`,{params:o})).data},async fetchSpaceFlowConfig(l){return(await n.get(`/bkflow/template/${l}/get_space_related_configs/`,{params:o})).data},async fetchSystemVariables(l){const c=await n.get("/bkflow/variable/system_variables/",{params:{template_id:l,...o}});return Object.values(c.data)},async saveFlow(l,c){await n.put(`/bkflow/template/${l}/update_template/`,a(c))},async fetchBkFlowInnerPluginList(){return(await n.get("/bkflow/inner_plugin/plugins/",{params:{...o}})).data},async fetchBkFlowInnerPluginDetail(l,c){return(await n.get(`/bkflow/inner_plugin/${l}/plugin_detail/`,{params:{version:c,...o}})).data},async fetchBkFlowPluginTags(){return r()},async fetchBkFlowThirdPartyPluginList(l){return(await n.get("/bkflow/plugin/list_plugins/",{params:{tag:l,...o}})).data.plugins},async fetchBkFlowPluginMeta(l){return(await n.get("/bkflow/plugin/meta/",{params:{plugin_code:l,...o}})).data},async fetchBkFlowPluginDetail(l,c){return(await n.get("/bkflow/plugin/plugin_detail/",{params:{plugin_code:l,plugin_version:c,with_app_detail:!0,...o}})).data},async fetchPluginCategoryList(){return i()},async fetchCategoryPlugins(l){return s(l)},async fetchPluginDetail(l){return(await n.get("/metas/plugin/get_plugin/",{params:{plugin_id:l,...o}})).data},async fetchAllPluginGroups(){const[l,c]=await Promise.all([i(),r()]),d={code_name:"INNER",id:0,name:"内置",priority:1},u=l.map(async k=>{if(k.name==="bkflow")return{...k,children:[d,...c]};const h=await s(k.name);return{...k,children:h.map(p=>({...p,category_id:k.id}))}}),v=await Promise.all(u);return console.log(v),v},async fetchApplyInstructionData(l){return(await n.post("/metas/plugin/apply_instruction/",a(l))).data},async fetchVariableRef(l){return{data:(await n.post("/bkflow/template/analysis_constants_ref/",a(l))).data}},async fetchCustomVariableTypes(){return{data:(await n.get("/bkflow/variable/variable_class_list/",{params:o})).data}},async fetchFlowOperateRecord(l){return{data:(await n.get(`/bkflow/template/${l}/operation_record/`,{params:o})).data}},async createFlowTask(l){return{data:(await n.post("/bkflow/template/create_task/",a(l))).data}},async executeFlowTask(l){await n.post("/bkflow/template/operate_task/",a(l))}}}function Ha(t){const n=xi(t);return{fetchFlowDetail:n.fetchFlowDetail,fetchSpaceFlowConfig:n.fetchSpaceFlowConfig,fetchSystemVariables:n.fetchSystemVariables,fetchUserApi:t.fetchUserApi,fetchVariableRef:n.fetchVariableRef,fetchCustomVariableTypes:n.fetchCustomVariableTypes,fetchFlowOperateRecord:n.fetchFlowOperateRecord,createFlowTask:n.createFlowTask,executeFlowTask:n.executeFlowTask,saveFlow:n.saveFlow,fetchBkFlowInnerPluginList:n.fetchBkFlowInnerPluginList,fetchBkFlowInnerPluginDetail:n.fetchBkFlowInnerPluginDetail,fetchBkFlowThirdPartyPluginList:n.fetchBkFlowThirdPartyPluginList,fetchBkFlowPluginTags:n.fetchBkFlowPluginTags,fetchBkFlowPluginMeta:n.fetchBkFlowPluginMeta,fetchBkFlowPluginDetail:n.fetchBkFlowPluginDetail,fetchPluginCategoryList:n.fetchPluginCategoryList,fetchCategoryPlugins:n.fetchCategoryPlugins,fetchPluginDetail:n.fetchPluginDetail,fetchApplyInstructionData:n.fetchApplyInstructionData,fetchAllPluginGroups:n.fetchAllPluginGroups}}const Wa=Symbol("flow-api-config");function _n(t){let n;return"fetchFlowDetail"in t?n=t:n=Ha(t),e.provide(Wa,n),n}function at(){const t=e.inject(Wa,null);if(!t){const n="useFlowApiConfig: apiConfig is not provided. Please ensure FlowEdit, FlowView, or FlowExecute component is used as parent component.";throw new Error(n)}return t}function Ei(){return at()}function Bi(){return at()}const Vi={class:"bkflow-canvans-editor-container-layout"},Ni={class:"container-layout-header"},Di={class:"title-area"},Ti={class:"title"},Mi={class:"desc"},Si={class:"container-layout-main"},Li={class:"container-main-wrapper"},Pi=e.defineComponent({__name:"index",props:{title:{default:""},desc:{default:""},showBackIcon:{type:Boolean,default:!1},showEditIcon:{type:Boolean,default:!1}},emits:["back","edit"],setup(t,{emit:n}){e.useSlots();const o=t,a=n,r=()=>{a("back")},i=()=>{a("edit")};return(s,l)=>(e.openBlock(),e.createElementBlock("div",Vi,[e.createElementVNode("section",Ni,[e.renderSlot(s.$slots,"header",{},()=>[e.createElementVNode("div",Di,[o.showBackIcon?(e.openBlock(),e.createBlock(e.unref(Oe.ArrowsLeft),{key:0,class:"back-btn",onClick:r})):e.createCommentVNode("",!0),e.createElementVNode("h3",Ti,e.toDisplayString(o.title),1),e.createElementVNode("p",Mi,e.toDisplayString(o.desc),1),o.showEditIcon?(e.openBlock(),e.createBlock(e.unref(Oe.EditLine),{key:1,class:"edit-btn",onClick:i})):e.createCommentVNode("",!0)])],!0),e.renderSlot(s.$slots,"extend",{},void 0,!0)]),e.createElementVNode("section",Si,[e.createElementVNode("div",Li,[e.renderSlot(s.$slots,"default",{},void 0,!0)])])]))}}),te=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},Ya=te(Pi,[["__scopeId","data-v-6d58adcc"]]);function Oi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ln={exports:{}},Fi=ln.exports,Go;function Ri(){return Go||(Go=1,(function(t,n){(function(o,a){t.exports=a()})(Fi,(function(){var o=1e3,a=6e4,r=36e5,i="millisecond",s="second",l="minute",c="hour",d="day",u="week",v="month",k="quarter",h="year",p="date",w="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var x=["th","st","nd","rd"],N=P%100;return"["+P+(x[(N-20)%10]||x[N]||x[0])+"]"}},b=function(P,x,N){var C=String(P);return!C||C.length>=x?P:""+Array(x+1-C.length).join(N)+P},f={s:b,z:function(P){var x=-P.utcOffset(),N=Math.abs(x),C=Math.floor(N/60),A=N%60;return(x<=0?"+":"-")+b(C,2,"0")+":"+b(A,2,"0")},m:function P(x,N){if(x.date()<N.date())return-P(N,x);var C=12*(N.year()-x.year())+(N.month()-x.month()),A=x.clone().add(C,v),D=N-A<0,F=x.clone().add(C+(D?-1:1),v);return+(-(C+(N-A)/(D?A-F:F-A))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:v,y:h,w:u,d,D:p,h:c,m:l,s,ms:i,Q:k}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},_="en",B={};B[_]=y;var S="$isDayjsObject",T=function(P){return P instanceof Z||!(!P||!P[S])},V=function P(x,N,C){var A;if(!x)return _;if(typeof x=="string"){var D=x.toLowerCase();B[D]&&(A=D),N&&(B[D]=N,A=D);var F=x.split("-");if(!A&&F.length>1)return P(F[0])}else{var I=x.name;B[I]=x,A=I}return!C&&A&&(_=A),A||!C&&_},L=function(P,x){if(T(P))return P.clone();var N=typeof x=="object"?x:{};return N.date=P,N.args=arguments,new Z(N)},z=f;z.l=V,z.i=T,z.w=function(P,x){return L(P,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var Z=(function(){function P(N){this.$L=V(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[S]=!0}var x=P.prototype;return x.parse=function(N){this.$d=(function(C){var A=C.date,D=C.utc;if(A===null)return new Date(NaN);if(z.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var F=A.match(m);if(F){var I=F[2]-1||0,G=(F[7]||"0").substring(0,3);return D?new Date(Date.UTC(F[1],I,F[3]||1,F[4]||0,F[5]||0,F[6]||0,G)):new Date(F[1],I,F[3]||1,F[4]||0,F[5]||0,F[6]||0,G)}}return new Date(A)})(N),this.init()},x.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},x.$utils=function(){return z},x.isValid=function(){return this.$d.toString()!==w},x.isSame=function(N,C){var A=L(N);return this.startOf(C)<=A&&A<=this.endOf(C)},x.isAfter=function(N,C){return L(N)<this.startOf(C)},x.isBefore=function(N,C){return this.endOf(C)<L(N)},x.$g=function(N,C,A){return z.u(N)?this[C]:this.set(A,N)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(N,C){var A=this,D=!!z.u(C)||C,F=z.p(N),I=function(q,W){var Q=z.w(A.$u?Date.UTC(A.$y,W,q):new Date(A.$y,W,q),A);return D?Q:Q.endOf(d)},G=function(q,W){return z.w(A.toDate()[q].apply(A.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(W)),A)},K=this.$W,oe=this.$M,ee=this.$D,E="set"+(this.$u?"UTC":"");switch(F){case h:return D?I(1,0):I(31,11);case v:return D?I(1,oe):I(0,oe+1);case u:var U=this.$locale().weekStart||0,$=(K<U?K+7:K)-U;return I(D?ee-$:ee+(6-$),oe);case d:case p:return G(E+"Hours",0);case c:return G(E+"Minutes",1);case l:return G(E+"Seconds",2);case s:return G(E+"Milliseconds",3);default:return this.clone()}},x.endOf=function(N){return this.startOf(N,!1)},x.$set=function(N,C){var A,D=z.p(N),F="set"+(this.$u?"UTC":""),I=(A={},A[d]=F+"Date",A[p]=F+"Date",A[v]=F+"Month",A[h]=F+"FullYear",A[c]=F+"Hours",A[l]=F+"Minutes",A[s]=F+"Seconds",A[i]=F+"Milliseconds",A)[D],G=D===d?this.$D+(C-this.$W):C;if(D===v||D===h){var K=this.clone().set(p,1);K.$d[I](G),K.init(),this.$d=K.set(p,Math.min(this.$D,K.daysInMonth())).$d}else I&&this.$d[I](G);return this.init(),this},x.set=function(N,C){return this.clone().$set(N,C)},x.get=function(N){return this[z.p(N)]()},x.add=function(N,C){var A,D=this;N=Number(N);var F=z.p(C),I=function(oe){var ee=L(D);return z.w(ee.date(ee.date()+Math.round(oe*N)),D)};if(F===v)return this.set(v,this.$M+N);if(F===h)return this.set(h,this.$y+N);if(F===d)return I(1);if(F===u)return I(7);var G=(A={},A[l]=a,A[c]=r,A[s]=o,A)[F]||1,K=this.$d.getTime()+N*G;return z.w(K,this)},x.subtract=function(N,C){return this.add(-1*N,C)},x.format=function(N){var C=this,A=this.$locale();if(!this.isValid())return A.invalidDate||w;var D=N||"YYYY-MM-DDTHH:mm:ssZ",F=z.z(this),I=this.$H,G=this.$m,K=this.$M,oe=A.weekdays,ee=A.months,E=A.meridiem,U=function(W,Q,H,ne){return W&&(W[Q]||W(C,D))||H[Q].slice(0,ne)},$=function(W){return z.s(I%12||12,W,"0")},q=E||function(W,Q,H){var ne=W<12?"AM":"PM";return H?ne.toLowerCase():ne};return D.replace(g,(function(W,Q){return Q||(function(H){switch(H){case"YY":return String(C.$y).slice(-2);case"YYYY":return z.s(C.$y,4,"0");case"M":return K+1;case"MM":return z.s(K+1,2,"0");case"MMM":return U(A.monthsShort,K,ee,3);case"MMMM":return U(ee,K);case"D":return C.$D;case"DD":return z.s(C.$D,2,"0");case"d":return String(C.$W);case"dd":return U(A.weekdaysMin,C.$W,oe,2);case"ddd":return U(A.weekdaysShort,C.$W,oe,3);case"dddd":return oe[C.$W];case"H":return String(I);case"HH":return z.s(I,2,"0");case"h":return $(1);case"hh":return $(2);case"a":return q(I,G,!0);case"A":return q(I,G,!1);case"m":return String(G);case"mm":return z.s(G,2,"0");case"s":return String(C.$s);case"ss":return z.s(C.$s,2,"0");case"SSS":return z.s(C.$ms,3,"0");case"Z":return F}return null})(W)||F.replace(":","")}))},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(N,C,A){var D,F=this,I=z.p(C),G=L(N),K=(G.utcOffset()-this.utcOffset())*a,oe=this-G,ee=function(){return z.m(F,G)};switch(I){case h:D=ee()/12;break;case v:D=ee();break;case k:D=ee()/3;break;case u:D=(oe-K)/6048e5;break;case d:D=(oe-K)/864e5;break;case c:D=oe/r;break;case l:D=oe/a;break;case s:D=oe/o;break;default:D=oe}return A?D:z.a(D)},x.daysInMonth=function(){return this.endOf(v).$D},x.$locale=function(){return B[this.$L]},x.locale=function(N,C){if(!N)return this.$L;var A=this.clone(),D=V(N,C,!0);return D&&(A.$L=D),A},x.clone=function(){return z.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},P})(),Y=Z.prototype;return L.prototype=Y,[["$ms",i],["$s",s],["$m",l],["$H",c],["$W",d],["$M",v],["$y",h],["$D",p]].forEach((function(P){Y[P[1]]=function(x){return this.$g(x,P[0],P[1])}})),L.extend=function(P,x){return P.$i||(P(x,Z,L),P.$i=!0),L},L.locale=V,L.isDayjs=T,L.unix=function(P){return L(1e3*P)},L.en=B[_],L.Ls=B,L.p={},L}))})(ln)),ln.exports}var zi=Ri();const lo=Oi(zi),Ii=e.defineComponent({__name:"records-table",props:{data:{}},setup(t){const n=t;return(o,a)=>{const r=e.resolveComponent("bk-table-column"),i=e.resolveComponent("bk-table");return e.openBlock(),e.createBlock(i,{data:n.data,border:["outer"]},{default:e.withCtx(()=>[e.createVNode(r,{label:"操作时间",prop:"operate_date","min-width":200}),e.createVNode(r,{label:"操作名称",prop:"operate_type_name"}),e.createVNode(r,{label:"操作来源",prop:"operate_source_name"}),e.createVNode(r,{label:"操作人",prop:"operator"})]),_:1},8,["data"])}}}),$i={class:"operate-records-slider"},Ui=e.defineComponent({__name:"index",props:{show:{type:Boolean},flowId:{}},emits:["close","update:show"],setup(t,{emit:n}){const o=t,a=at(),r=n,i=e.shallowRef([]),s=e.shallowRef(!1);e.watch(()=>o.show,d=>{d&&l()});const l=async()=>{if(!a?.fetchFlowOperateRecord){console.warn("fetchFlowOperateRecord is not provided in api");return}s.value=!0;try{const d=await a.fetchFlowOperateRecord(o.flowId);d.data.data.forEach(u=>u.operate_date=lo(u.operate_date).format("YYYY-MM-DD HH:mm:ss")),i.value=d.data.data}catch(d){console.error(d)}finally{s.value=!1}},c=()=>{r("close"),r("update:show",!1)};return(d,u)=>{const v=e.resolveComponent("bk-sideslider"),k=e.resolveDirective("bk-loading");return e.openBlock(),e.createBlock(v,{title:"操作记录","is-show":o.show,width:800,"esc-close":!1,"before-close":c},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",$i,[e.createVNode(Ii,{data:i.value},null,8,["data"])])),[[k,{loading:s.value}]])]),_:1},8,["is-show"])}}}),ji=te(Ui,[["__scopeId","data-v-66a242e2"]]),qo=(t,n)=>{const{start_event:o,end_event:a,activities:r,gateways:i,flows:s,line:l}=n;return o.id===t?o:a.id===t?a:r[t]?r[t]:i[t]?i[t]:null},Zn=()=>({custom_type:"input",desc:"",index:0,key:"",name:"",show_type:"show",source_info:{},source_tag:"input.input",source_type:"custom",validation:"^.+$",pre_render_mako:!1,value:"",version:"legacy"}),Gi=(t,n={})=>ve.merge({id:t,component:{},error_ignorable:!1,incoming:[],name:"",optional:!0,outgoing:"",stage_name:"",type:"ServiceActivity",retryable:!0,skippable:!0,auto_retry:{enable:!1,interval:0,times:1},timeout_config:{enable:!1,seconds:10,action:"forced_fail"}},n),qi=(t,n,o={})=>{const a={id:t,type:n,name:"",incoming:[],outgoing:[]};return["ExclusiveGateway","ConditionalParallelGateway"].includes(n)&&(a.conditions={},a.extra_info={parse_lang:"boolrule"}),n!=="ConvergeGateway"&&(a.converge_gateway_id=""),ve.merge(a,o)},Hi=(t,n)=>{const o=[];return t.forEach(a=>{const{id:r,x:i,y:s,type:l}=a,c=l==="tasknode",d=n[r]||{},{name:u,error_ignorable:v=!1,retryable:k=!1,skippable:h=!1,auto_retry:p,component:w={}}=d,m={id:r,shape:"custom-node",position:{x:i,y:s},size:{height:c?54:34,width:c?154:34},data:{name:u,error_ignorable:v,retryable:k,skippable:h,auto_retry:p,component:w,...a,type:l}};o.push(m)}),o},Ho=t=>{const n=[];return t.forEach(o=>{const{id:a,source:r,target:i}=o;n.push({shape:"edge",id:a,source:{cell:r.id,port:`port_${r.arrow.toLowerCase()}`},target:{cell:i.id,port:`port_${i.arrow.toLowerCase()}`},attrs:{line:{stroke:"#a9adb6",strokeWidth:2,targetMarker:{name:"block",width:6,height:8},class:a}},zIndex:0,router:{name:"manhattan",args:{padding:1}},data:{}})}),n},tt={startpoint:"开始节点",endpoint:"结束节点",parallelgateway:"并行网关",conditionalparallelgateway:"条件并行网关",branchgateway:"分支网关",exclusivegateway:"分支网关",convergegateway:"汇聚网关",tasknode:"标准插件节点"},Qn={startpoint:{min_in:0,max_in:0,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway"],unique:!0},endpoint:{min_in:1,max_in:1e3,min_out:0,max_out:0,allowed_out:[],unique:!0},tasknode:{min_in:1,max_in:1e3,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},subflow:{min_in:1,max_in:1e3,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},branchgateway:{min_in:1,max_in:1e3,min_out:1,max_out:1e3,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},conditionalparallelgateway:{min_in:1,max_in:1e3,min_out:1,max_out:1e3,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1},parallelgateway:{min_in:1,max_in:1e3,min_out:1,max_out:1e3,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway"],unique:!1},convergegateway:{min_in:1,max_in:1e3,min_out:1,max_out:1,allowed_out:["tasknode","branchgateway","parallelgateway","conditionalparallelgateway","convergegateway","endpoint"],unique:!1}},Wi=t=>{const n=[];return Object.keys(t).forEach(o=>{const a=t[o].component;(!a||!a.code)&&n.push(o)}),{valid:n.length===0,ids:n}},Yi=(t,n)=>{let o="";const a=[];return n.forEach(r=>{const i=Qn[r.type],s=tt[r.type];let l=0,c=0;t.forEach(d=>{d.source.id===r.id&&(c+=1),d.target.id===r.id&&(l+=1)}),l<i.min_in&&(o=`${s}至少需要${i.min_in}条输入连线`,a.push(r.id)),c<i.min_out&&(o=`${s}至少需要${i.min_out}条输出连线`,a.push(r.id))}),{valid:a.length===0,message:o,ids:a}},Zi=t=>{const n=[];let o="";const a={},r=[];let i=[],s=[],l=new Set;const c=(u,v)=>{if(s.includes(u)){l.delete(v);return}s.push(u);const k=a[u]||[];if(k.length>1)l.delete(v),k.forEach(h=>{l.add(h),c(h,h)});else if(k.length===1)if(r.includes(u))i.includes(u)?l.delete(v):(i.push(u),l.size>1&&i.forEach(h=>{const p=a[h][0];c(p,v)}));else{const h=k[0];c(h,v)}},d=Object.keys(t).filter(u=>["ParallelGateway","ConditionalParallelGateway"].includes(t[u].type));for(const u of d){const v=t[u];if(s=[],i=[],l=new Set([u]),c(u,u),l.size>1){o=`${tt[v.type]}缺少对应的汇聚网关`,n.push(u);break}}return{valid:n.length===0,message:o,ids:n}},Qi=(t,n,o)=>{const{source:a,target:r}=t,i=a.id,s=r.id,l=o.filter(w=>w.id===i)[0],c=o.filter(w=>w.id===s)[0],d=Qn[l.type],u=Qn[c.type];let v=0,k=0,h=!1;if(i===s){const m=`${tt[l.type]}节点不可连接自身`;return ze(!1,m)}if(d.max_out===0){const m=`${tt[l.type]}只能添加输入连线`;return ze(!1,m)}if(u.max_in===0){const m=`${tt[c.type]}只能添加输出连线`;return ze(!1,m)}if(!d.allowed_out.includes(c.type)){const m=`${tt[l.type]}不能连接${tt[c.type]}`;return ze(!1,m)}const p=n.some(w=>{let m=!1;return w.source.id===i&&(v+=1,w.target.id===s&&(m=!0)),w.target.id===s&&(k+=1),w.source.id===s&&w.target.id===i&&l.type!=="branchgateway"&&(h=!0),m});if(h)return ze(!1,"相同节点不能回连");if(p)return ze(!1,"重复添加连线");if(!p){if(v>=d.max_out){const g=`已达到${tt[l.type]}最大输出连线条数`;return ze(!1,g)}if(k>=u.max_in){const g=`已达到${tt[c.type]}最大输入连线条数`;return ze(!1,g)}}return ze(!0)},Za=t=>{const{activities:n,gateways:o,line:a,location:r}=t;if(Object.keys(n).length===0)return ze(!1,"请添加任务节点");const i=Wi(n);if(!i.valid)return ze(!1,"请为任务节点选择插件",i.ids);const s=Yi(a,r);if(!s.valid)return s;const l=Zi(o);return l.valid?ze(!0):l},ze=(t,n="",o=[])=>({valid:t,message:n,ids:o}),Ji={groups:{top:{position:"top",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}},right:{position:"right",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}},bottom:{position:"bottom",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}},left:{position:"left",attrs:{circle:{r:6,magnet:!0,stroke:"#5F95FF",strokeWidth:1,fill:"#fff",style:{visibility:"hidden"}}}}},items:[{id:"port_top",group:"top"},{id:"port_right",group:"right"},{id:"port_bottom",group:"bottom"},{id:"port_left",group:"left"}]},Ki=(t,n)=>{t.on("node:mouseenter",({cell:o})=>{if(!n)return;o.getPorts().forEach(r=>{o.setPortProp(r.id,"attrs/circle/style/visibility","visible")})}),t.on("node:mouseleave",({cell:o})=>{o.getPorts().forEach(r=>{o.setPortProp(r.id,"attrs/circle/style/visibility","hidden")})}),t.on("edge:mouseenter",({cell:o})=>{o.attr("line/stroke","#3a84ff"),n&&o.addTools([{name:"source-arrowhead",args:{tagName:"circle",attrs:{r:"6",fill:"#ffffff",stroke:"#a4deb1",strokeWidth:1}}},{name:"target-arrowhead",args:{tagName:"circle",attrs:{r:"6",fill:"#ffffff",stroke:"#a4deb1",strokeWidth:1}}}])}),t.on("edge:mouseleave",({cell:o})=>{o.attr("line/stroke","#a9adb6"),o.removeTools()})},Qa=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1),qe=(t=8)=>{let n="";for(let o=0;o<t-1;o++)n+=Qa();return n},mn=(t,n)=>{if(n.classList.contains(t))return!0;let o=n.parentNode;for(;o;){if(o.classList&&o.classList.contains(t))return!0;o=o.parentNode}return!1};var he=il(),vn=ll(),Ja=cl(),Ka=dl(),Wo={imagePlaceholder:void 0,cacheBust:!1},it={toSvg:Xa,toPng:el,toJpeg:tl,toBlob:nl,toPixelData:Xi,impl:{fontFaces:Ja,images:Ka,util:he,inliner:vn,options:{}}};function Xa(t,n){return n=n||{},ol(n),Promise.resolve(t).then(function(a){return er(a,n.filter,!0)}).then(al).then(rl).then(o).then(function(a){return sl(a,n.width||he.width(t),n.height||he.height(t))});function o(a){return n.bgcolor&&(a.style.backgroundColor=n.bgcolor),n.width&&(a.style.width=n.width+"px"),n.height&&(a.style.height=n.height+"px"),n.style&&Object.keys(n.style).forEach(function(r){a.style[r]=n.style[r]}),n.cloneBack&&n.cloneBack.call(this,a),a}}function Xi(t,n){return An(t,n||{}).then(function(o){return o.getContext("2d").getImageData(0,0,he.width(t),he.height(t)).data})}function el(t,n){return An(t,n||{}).then(function(o){return o.toDataURL()})}function tl(t,n){return n=n||{},An(t,n).then(function(o){return o.toDataURL("image/jpeg",n.quality||1)})}function nl(t,n){return An(t,n||{}).then(he.canvasToBlob)}function ol(t){typeof t.imagePlaceholder>"u"?it.impl.options.imagePlaceholder=Wo.imagePlaceholder:it.impl.options.imagePlaceholder=t.imagePlaceholder,typeof t.cacheBust>"u"?it.impl.options.cacheBust=Wo.cacheBust:it.impl.options.cacheBust=t.cacheBust}function An(t,n){return Xa(t,n).then(he.makeImage).then(he.delay(100)).then(function(a){var r=o(t);return r.getContext("2d").drawImage(a,0,0),r});function o(a){var r=document.createElement("canvas");if(r.width=n.width||he.width(a),r.height=n.height||he.height(a),n.bgcolor){var i=r.getContext("2d");i.fillStyle=n.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}}function er(t,n,o){if(!o&&n&&!n(t))return Promise.resolve();return Promise.resolve(t).then(a).then(function(s){return r(t,s,n)}).then(function(s){return i(t,s)});function a(s){return s instanceof HTMLCanvasElement?he.makeImage(s.toDataURL()):s.cloneNode(!1)}function r(s,l,c){var d=s.childNodes;if(d.length===0)return Promise.resolve(l);return u(l,he.asArray(d),c).then(function(){return l});function u(v,k,h){var p=Promise.resolve();return k.forEach(function(w){p=p.then(function(){return er(w,h)}).then(function(m){m&&v.appendChild(m)})}),p}}function i(s,l){if(!(l instanceof Element))return l;return Promise.resolve().then(c).then(d).then(u).then(v).then(function(){return l});function c(){k(window.getComputedStyle(s),l.style);function k(h,p){h.cssText?p.cssText=h.cssText:w(h,p);function w(m,g){he.asArray(m).forEach(function(y){g.setProperty(y,m.getPropertyValue(y),m.getPropertyPriority(y))})}}}function d(){[":before",":after"].forEach(function(h){k(h)});function k(h){var p=window.getComputedStyle(s,h),w=p.getPropertyValue("content");if(w===""||w==="none")return;var m=he.uid();l.className=l.className+" "+m;var g=document.createElement("style");g.appendChild(y(m,h,p)),l.appendChild(g);function y(b,f,_){var B="."+b+":"+f,S=_.cssText?T(_):V(_);return document.createTextNode(B+"{"+S+"}");function T(L){var z=L.getPropertyValue("content");return L.cssText+" content: "+z+";"}function V(L){return he.asArray(L).map(z).join("; ")+";";function z(Z){return Z+": "+L.getPropertyValue(Z)+(L.getPropertyPriority(Z)?" !important":"")}}}}}function u(){s instanceof HTMLTextAreaElement&&(l.innerHTML=s.value),s instanceof HTMLInputElement&&l.setAttribute("value",s.value)}function v(){l instanceof SVGElement&&(l.setAttribute("xmlns","http://www.w3.org/2000/svg"),l instanceof SVGRectElement&&["width","height"].forEach(function(k){var h=l.getAttribute(k);h&&l.style.setProperty(k,h)}))}}}function al(t){return Ja.resolveAll().then(function(n){var o=document.createElement("style");return t.appendChild(o),o.appendChild(document.createTextNode(n)),t})}function rl(t){return Ka.inlineAll(t).then(function(){return t})}function sl(t,n,o){return Promise.resolve(t).then(function(a){return a.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(a)}).then(he.escapeXhtml).then(function(a){return'<foreignObject x="0" y="0" width="100%" height="100%">'+a+"</foreignObject>"}).then(function(a){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+n+'" height="'+o+'">'+a+"</svg>"}).then(function(a){return"data:image/svg+xml;charset=utf-8,"+a})}function il(){return{escape:v,parseExtension:n,mimeType:o,dataAsUrl:u,isDataUrl:a,canvasToBlob:i,resolveUrl:s,getAndEncode:d,uid:l(),delay:k,asArray:h,escapeXhtml:p,makeImage:c,width:w,height:m};function t(){var y="application/font-woff",b="image/jpeg";return{woff:y,woff2:y,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:b,jpeg:b,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function n(y){var b=/\.([^\.\/]*?)$/g.exec(y);return b?b[1]:""}function o(y){var b=n(y).toLowerCase();return t()[b]||""}function a(y){return y.search(/^(data:)/)!==-1}function r(y){return new Promise(function(b){for(var f=window.atob(y.toDataURL().split(",")[1]),_=f.length,B=new Uint8Array(_),S=0;S<_;S++)B[S]=f.charCodeAt(S);b(new Blob([B],{type:"image/png"}))})}function i(y){return y.toBlob?new Promise(function(b){y.toBlob(b)}):r(y)}function s(y,b){var f=document.implementation.createHTMLDocument(),_=f.createElement("base");f.head.appendChild(_);var B=f.createElement("a");return f.body.appendChild(B),_.href=b,B.href=y,B.href}function l(){var y=0;return function(){return"u"+b()+y++;function b(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function c(y){return new Promise(function(b,f){var _=new Image;_.onload=function(){b(_)},_.onerror=f,_.src=y})}function d(y){var b=3e4;return it.impl.options.cacheBust&&(y+=(/\?/.test(y)?"&":"?")+new Date().getTime()),new Promise(function(f){var _=new XMLHttpRequest;_.onreadystatechange=T,_.ontimeout=V,_.responseType="blob",_.timeout=b,_.open("GET",y,!0),_.send();var B;if(it.impl.options.imagePlaceholder){var S=it.impl.options.imagePlaceholder.split(/,/);S&&S[1]&&(B=S[1])}function T(){if(_.readyState===4){if(_.status!==200){B?f(B):L("cannot fetch resource: "+y+", status: "+_.status);return}var z=new FileReader;z.onloadend=function(){var Z=z.result.split(/,/)[1];f(Z)},z.readAsDataURL(_.response)}}function V(){B?f(B):L("timeout of "+b+"ms occured while fetching resource: "+y)}function L(z){console.error(z),f("")}})}function u(y,b){return"data:"+b+";base64,"+y}function v(y){return y.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function k(y){return function(b){return new Promise(function(f){setTimeout(function(){f(b)},y)})}}function h(y){for(var b=[],f=y.length,_=0;_<f;_++)b.push(y[_]);return b}function p(y){return y.replace(/#/g,"%23").replace(/\n/g,"%0A")}function w(y){var b=g(y,"border-left-width"),f=g(y,"border-right-width");return y.scrollWidth+b+f}function m(y){var b=g(y,"border-top-width"),f=g(y,"border-bottom-width");return y.scrollHeight+b+f}function g(y,b){var f=window.getComputedStyle(y).getPropertyValue(b);return parseFloat(f.replace("px",""))}}function ll(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:r,shouldProcess:n,impl:{readUrls:o,inline:a}};function n(i){return i.search(t)!==-1}function o(i){for(var s=[],l;(l=t.exec(i))!==null;)s.push(l[1]);return s.filter(function(c){return!he.isDataUrl(c)})}function a(i,s,l,c){return Promise.resolve(s).then(function(u){return l?he.resolveUrl(u,l):u}).then(c||he.getAndEncode).then(function(u){return he.dataAsUrl(u,he.mimeType(s))}).then(function(u){return i.replace(d(s),"$1"+u+"$3")});function d(u){return new RegExp(`(url\\(['"]?)(`+he.escape(u)+`)(['"]?\\))`,"g")}}function r(i,s,l){if(c())return Promise.resolve(i);return Promise.resolve(i).then(o).then(function(d){var u=Promise.resolve(i);return d.forEach(function(v){u=u.then(function(k){return a(k,v,s,l)})}),u});function c(){return!n(i)}}}function cl(){return{resolveAll:t,impl:{readAll:n}};function t(){return n().then(function(o){return Promise.all(o.map(function(a){return a.resolve()}))}).then(function(o){return o.join(`
7
+ `)})}function n(){return Promise.resolve(he.asArray(document.styleSheets)).then(a).then(o).then(function(i){return i.map(r)});function o(i){return i.filter(function(s){return s.type===CSSRule.FONT_FACE_RULE}).filter(function(s){return vn.shouldProcess(s.style.getPropertyValue("src"))})}function a(i){var s=[];return i.forEach(function(l){try{he.asArray(l.cssRules||[]).forEach(s.push.bind(s))}catch(c){console.log("Error while reading CSS rules from "+l.href,c.toString())}}),s}function r(i){return{resolve:function(){var l=(i.parentStyleSheet||{}).href;return vn.inlineAll(i.cssText,l)},src:function(){return i.style.getPropertyValue("src")}}}}}function dl(){return{inlineAll:n,impl:{newImage:t}};function t(o){return{inline:a};function a(r){return he.isDataUrl(o.src)?Promise.resolve():Promise.resolve(o.src).then(r||he.getAndEncode).then(function(i){return he.dataAsUrl(i,he.mimeType(o.src))}).then(function(i){return new Promise(function(s,l){o.onload=s,o.onerror=l,o.src=i})})}}function n(o){if(!(o instanceof Element))return Promise.resolve(o);return a(o).then(function(){return o instanceof HTMLImageElement?t(o).inline():Promise.all(he.asArray(o.childNodes).map(function(r){return n(r)}))});function a(r){var i=r.style.getPropertyValue("background");return i?vn.inlineAll(i).then(function(s){r.style.setProperty("background",s,r.style.getPropertyPriority("background"))}).then(function(){return r}):Promise.resolve(r)}}}const ul={class:"canvas-tools-wrapper"},pl={class:"tools-content"},fl={class:"zoom-wrapper"},ml={class:"zoom-ratio"},vl=e.defineComponent({__name:"index",props:{instance:{}},emits:["download"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(100),i=e.ref(!1),s=e.ref(null);e.onMounted(()=>{o.instance.on("scale",d)});const l=()=>{o.instance.zoom(-.1),d()},c=()=>{o.instance.zoom(.1),d()},d=()=>{r.value=Math.round(o.instance.zoom()*100)},u=()=>{i.value=!i.value,e.nextTick(()=>{i.value&&s.value?o.instance.use(new $r.MiniMap({container:s.value,width:344,height:216,scalable:!1})):o.instance.disposePlugins("minimap")})},v=()=>{o.instance.zoomTo(1),o.instance.translate(0,0)};return(k,h)=>{const p=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",ul,[e.createElementVNode("div",pl,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tool-icon",{"is-active":i.value}]),onClick:u},[...h[1]||(h[1]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-thumbnail-view"},null,-1)])],2)),[[p,{content:"缩略视图",placement:"bottom"}]]),e.createElementVNode("div",fl,[e.withDirectives(e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-zoom-minus",onClick:l},null,512),[[p,{content:"缩小",placement:"bottom"}]]),e.createElementVNode("p",ml,e.toDisplayString(r.value+"%"),1),e.withDirectives(e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-zoom-add",onClick:c},null,512),[[p,{content:"放大",placement:"bottom"}]])]),e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"tool-icon",onClick:v},[...h[2]||(h[2]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-reset"},null,-1)])])),[[p,{content:"复位",placement:"bottom"}]]),e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"tool-icon",onClick:h[0]||(h[0]=w=>a("download"))},[...h[3]||(h[3]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-export-canvas"},null,-1)])])),[[p,{content:"导出图片",placement:"bottom"}]])]),i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"miniMapRef",ref:s,class:"canvas-minimap"},null,512)):e.createCommentVNode("",!0)])}}}),hl=te(vl,[["__scopeId","data-v-0e5cea87"]]),gl=`.x6-widget-dnd {
8
8
  position: absolute;
9
9
  top: -10000px;
10
10
  left: -10000px;
@@ -27,26 +27,26 @@
27
27
  .x6-widget-dnd .x6-graph .x6-graph-svg-viewport {
28
28
  transform: translate(7px, 7px);
29
29
  }
30
- `;let Qn=class Xn extends ye.View{get targetScroller(){const{target:n}=this.options;return n.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){const{target:n}=this.options;return n.getPlugin("snapline")}constructor(n){super(),this.name="dnd",this.options=Object.assign(Object.assign({},Xn.defaults),n),this.init()}init(){ye.CssLoader.ensure(this.name,il),this.container=document.createElement("div"),ye.Dom.addClass(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new ye.Graph(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),ye.Dom.append(this.container,this.draggingGraph.container)}start(n,o){const a=o;a.preventDefault(),this.targetModel.startBatch("dnd"),ye.Dom.addClass(this.container,"dragging"),ye.Dom.appendTo(this.container,this.options.draggingContainer||document.body),this.sourceNode=n,this.prepareDragging(n,a.clientX,a.clientY);const r=this.updateNodePosition(a.clientX,a.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:a,node:n,cell:n,view:this.draggingView,x:r.x,y:r.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(Xn.documentEvents,a.data)}isSnaplineEnabled(){return this.snapline&&this.snapline.isEnabled()}prepareDragging(n,o,a){const{draggingGraph:r}=this,s=r.model,i=this.options.getDragNode(n,{sourceNode:n,draggingGraph:r,targetGraph:this.targetGraph});i.position(0,0);let l=5;if(this.isSnaplineEnabled()&&(l+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const u=this.targetGraph.transform.getScale();r.scale(u.sx,u.sy),l*=Math.max(u.sx,u.sy)}else r.scale(1,1);this.clearDragging(),s.resetCells([i]);const c=r.findViewByCell(i);c.undelegateEvents(),c.cell.off("changed"),r.fitToContent({padding:l,allowNewOrigin:"any",useCellGeometry:!1});const d=c.getBBox();this.geometryBBox=c.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(d.getTopLeft()),this.draggingNode=i,this.draggingView=c,this.draggingBBox=i.getBBox(),this.padding=l,this.originOffset=this.updateGraphPosition(o,a)}updateGraphPosition(n,o){const a=document.body.scrollTop||document.documentElement.scrollTop,{delta:r}=this,s=this.geometryBBox,i=this.padding||5,l={left:n-r.x-s.width/2-i,top:o-r.y-s.height/2-i+a};return this.draggingGraph&&ye.Dom.css(this.container,{left:`${l.left}px`,top:`${l.top}px`}),l}updateNodePosition(n,o){const a=this.targetGraph.clientToLocal(n,o),r=this.draggingBBox;return a.x-=r.width/2,a.y-=r.height/2,this.draggingNode.position(a.x,a.y),a}snap({cell:n,current:o,options:a}){const r=n;if(a.snapped){const s=this.draggingBBox;r.position(s.x+a.tx,s.y+a.ty,{silent:!0}),this.draggingView.translate(),r.position(o.x,o.y,{silent:!0}),this.snapOffset={x:a.tx,y:a.ty}}else this.snapOffset=null}onDragging(n){const{draggingView:o}=this;if(o){n.preventDefault();const a=this.normalizeEvent(n),{clientX:r}=a,{clientY:s}=a;this.updateGraphPosition(r,s);const i=this.updateNodePosition(r,s),l=this.targetGraph.options.embedding.enabled,c=(l||this.isSnaplineEnabled())&&this.isInsideValidArea({x:r,y:s});if(l){o.setEventData(a,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const d=o.getEventData(a);c?o.processEmbedding(a,d):o.clearEmbedding(d),this.candidateEmbedView=d.candidateEmbedView}this.options.nodeDragging?.(n,this.sourceNode),this.isSnaplineEnabled()&&(c?this.snapline.snapOnMoving({e:a,view:o,x:i.x,y:i.y}):this.snapline.hide())}}onDragEnd(n){const{draggingNode:o}=this;if(o){const a=this.normalizeEvent(n),{draggingView:r}=this,{draggingBBox:s}=this,{snapOffset:i}=this;let{x:l}=s,{y:c}=s;i&&(l+=i.x,c+=i.y),o.position(l,c,{silent:!0});const d=this.drop(o,{x:a.clientX,y:a.clientY}),u=v=>{v?(this.onDropped(o),this.targetGraph.options.embedding.enabled&&r&&(r.setEventData(a,{cell:v,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),r.finalizeEmbedding(a,r.getEventData(a)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};this.options.nodeDragEnd?.(n,this.sourceNode),ye.FunctionExt.isAsync(d)?(this.undelegateDocumentEvents(),d.then(u)):u(d)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.originOffset=null,this.undelegateDocumentEvents())}onDropped(n){this.draggingNode===n&&(this.clearDragging(),ye.Dom.removeClass(this.container,"dragging"),ye.Dom.remove(this.container))}onDropInvalid(){const{draggingNode:n}=this;n&&this.onDropped(n)}isInsideValidArea(n){let o,a=null;const{targetGraph:r}=this,{targetScroller:s}=this;this.options.dndContainer&&(a=this.getDropArea(this.options.dndContainer));const i=a&&a.containsPoint(n);if(s)if(s.options.autoResize)o=this.getDropArea(s.container);else{const l=this.getDropArea(s.container);o=this.getDropArea(r.container).intersectsWithRect(l)}else o=this.getDropArea(r.container);return!i&&o&&o.containsPoint(n)}getDropArea(n){const o=ye.Dom.offset(n),a=document.body.scrollTop||document.documentElement.scrollTop,r=document.body.scrollLeft||document.documentElement.scrollLeft;return ye.Rectangle.create({x:o.left+parseInt(ye.Dom.css(n,"border-left-width"),10)-r,y:o.top+parseInt(ye.Dom.css(n,"border-top-width"),10)-a,width:n.clientWidth,height:n.clientHeight})}drop(n,o){if(this.isInsideValidArea(o)){const{targetGraph:a}=this,r=a.model,s=a.clientToLocal(o),{sourceNode:i}=this,l=this.options.getDropNode(n,{sourceNode:i,draggingNode:n,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),c=l.getBBox();s.x+=c.x-c.width/2,s.y+=c.y-c.height/2;const d=this.snapOffset?1:a.getGridSize();l.position(ye.GeometryUtil.snapToGrid(s.x,d),ye.GeometryUtil.snapToGrid(s.y,d)),l.removeZIndex();const{validateNode:u}=this.options,v=u?u(l,{sourceNode:i,draggingNode:n,droppingNode:l,targetGraph:a,draggingGraph:this.draggingGraph}):!0;return typeof v=="boolean"?v?(r.addCell(l,{stencil:this.cid}),l):null:ye.FunctionExt.toDeferredBoolean(v).then(w=>w?(r.addCell(l,{stencil:this.cid}),l):null)}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove(),ye.CssLoader.clean(this.name)}};(function(t){t.defaults={getDragNode:n=>n.clone(),getDropNode:n=>n.clone()},t.documentEvents={mousemove:"onDragging",touchmove:"onDragging",mouseup:"onDragEnd",touchend:"onDragEnd",touchcancel:"onDragEnd"}})(Qn||(Qn={}));const sl=["data-type"],ll=e.defineComponent({__name:"index",props:{instance:{}},emits:["dragging","dragEnd"],setup(t,{emit:n}){const o=[{id:"startpoint",icon:"startpoint-zh",name:"开始节点"},{id:"endpoint",icon:"endpoint-zh",name:"结束节点"},{id:"tasknode",icon:"tasknode",name:"任务节点"},{id:"branchgateway",icon:"branchgateway",name:"分支网关"},{id:"parallelgateway",icon:"parallelgateway",name:"并行网关"},{id:"conditionalparallelgateway",icon:"conditionalparallelgateway",name:"条件并行网关"},{id:"convergegateway",icon:"convergegateway",name:"汇聚节点"}],a=t,r=n,s=e.shallowRef(),i=e.shallowRef(),l=e.ref(),c=e.ref();e.onMounted(()=>{s.value=new Qn({target:a.instance,scaled:!1,dndContainer:c.value,nodeDragging:(f,b)=>d(f,b),nodeDragEnd:(f,b)=>u(f,b),getDragNode:f=>f.clone({keepId:!0}),getDropNode:f=>f.clone({keepId:!0})}),a.instance.on("node:added",({node:f})=>{const b=f.shape==="custom-group-node"?1:2;f.setZIndex(b)}),l.value.addEventListener("mousedown",v)});const d=(f,b)=>{r("dragging",{e:f,node:b})},u=(f,b)=>{r("dragEnd",{e:f,node:b})},v=f=>{(mn("node-item",f.target)||mn("entry-item",f.target))&&(i.value=f,document.addEventListener("mousemove",w),document.addEventListener("mouseup",h))},w=f=>{if(!i.value)return;const{pageX:b,pageY:y}=i.value;Math.max(f.pageX-b,f.pageY-y)>3&&(m(i.value),document.removeEventListener("mousemove",w))},h=()=>{i.value=null,document.removeEventListener("mouseup",h)},m=f=>{const b=g(f.target),y=b.type==="tasknode",_=a.instance.createNode({id:`node${qe()}`,shape:"custom-node",width:y?154:34,height:y?54:34,data:b,zIndex:5});s.value.start(_,f)},g=f=>{const b=f.getAttribute("data-type");return b?{type:b}:{}};return(f,b)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dndPanel",ref:l,class:"dnd-panel"},[e.createElementVNode("ul",{ref_key:"containerRef",ref:c,class:"nodes-wrapper"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,y=>e.createElementVNode("li",{key:y.id,class:e.normalizeClass(["node-item",`bkflow-canvas-icon bkflow-canvas-node-${y.icon}`,{disabled:["startpoint","endpoint"].includes(y.id)}]),"data-type":y.id},null,10,sl)),64))],512)],512))}}),cl=oe(ll,[["__scopeId","data-v-61aa5064"]]),dl={name:"Start",props:{node:{type:Object,default:()=>({})}},data(){return{}}};function ul(t,n,o,a,r,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item circle-node",{ready:o.node.ready}])}," 开始 ",2)}const pl=oe(dl,[["render",ul]]),fl={name:"End",props:{node:{type:Object,default:()=>({})}},data(){return{}}};function ml(t,n,o,a,r,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item circle-node",{ready:o.node.ready}])}," 结束 ",2)}const vl=oe(fl,[["render",ml]]),hl=["CMDB","JOB","BK","Nodeman","Monitor","GCLOUD","TCM","WechatWork"],Ho={bk_http_request:"bkflow-canvas-icon bkflow-canvas-bk-plugin-http",bk_notify:"bkflow-canvas-icon bkflow-canvas-bk-plugin-notify",sleep_timer:"bkflow-canvas-icon bkflow-canvas-bk-plugin-timer",pause_node:"bkflow-canvas-icon bkflow-canvas-bk-plugin-pause"},gl={name:"Task",props:{node:{type:Object,default:()=>({})}},data(){return{phaseStr:{1:"当前插件即将停止维护,请更新插件版本",2:"当前插件已停止维护,请更新插件版本"}}},computed:{isEmptyNode(){return!this.node.component||!this.node.component.code}},methods:{getIconCls(t){const{code:n,group:o}=t;if(Ho[n])return Ho[n];if(n==="remote_plugin")return"bkflow-canvas-icon bkflow-canvas-sys-third-party";const a=hl.find(r=>new RegExp(r).test(o));return a?`bkflow-canvas-icon bkflow-canvas-sys-${a.toLowerCase()}`:"bkflow-canvas-icon bkflow-canvas-sys-default"}}},yl={class:"node-status-block"},wl=["src"],bl={key:2,class:"stage-name"},kl={class:"node-name"},Cl={class:"name-text"};function _l(t,n,o,a,r,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item task-node",{"empty-node":s.isEmptyNode}])},[e.createElementVNode("div",yl,[o.node.icon?(e.openBlock(),e.createElementBlock("img",{key:0,class:"node-icon",src:o.node.icon},null,8,wl)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["node-icon-font",s.getIconCls(o.node)])},null,2)),o.node.stage_name?(e.openBlock(),e.createElementBlock("div",bl,e.toDisplayString(o.node.stage_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",kl,[e.createElementVNode("div",Cl,e.toDisplayString(s.isEmptyNode?"- 节点未配置 -":o.node.name),1)])],2)}const xl=oe(gl,[["render",_l],["__scopeId","data-v-53ab1e5c"]]),Al={name:"BranchGateway",props:{node:{type:Object,default:()=>({})}}};function El(t,n,o,a,r,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{"fail-skip":o.node.status==="FINISHED"&&o.node.skip},{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-branchgateway"},null,-1)])],2)}const Vl=oe(Al,[["render",El]]),Nl={name:"ParallelGateway",props:{node:{type:Object,default:()=>({})}}};function Bl(t,n,o,a,r,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-parallelgateway"},null,-1)])],2)}const Dl=oe(Nl,[["render",Bl]]),Tl={name:"ConditionalParallelGateway",props:{node:{type:Object,default:()=>({})}}};function Sl(t,n,o,a,r,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{"fail-skip":o.node.status==="FINISHED"&&o.node.skip},{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-conditionalparallelgateway"},null,-1)])],2)}const Ml=oe(Tl,[["render",Sl]]),Ll={name:"ConvergeGateway",props:{node:{type:Object,default:()=>({})}}};function Pl(t,n,o,a,r,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-convergegateway"},null,-1)])],2)}const Ol=oe(Ll,[["render",Pl]]),Rl={class:"node-config-flags"},$l={key:0,class:"error-handle-icon"},zl={key:1,class:"error-handle-icon"},Fl={key:2,class:"error-handle-icon"},Il={key:3,class:"error-handle-icon"},Ul={key:1,class:"mock-label"},jl=e.defineComponent({__name:"node-config-flags",props:{node:{},editable:{type:Boolean}},setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createElementBlock("div",Rl,[n.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.node.error_ignorable?(e.openBlock(),e.createElementBlock("span",$l,[...a[0]||(a[0]=[e.createElementVNode("span",{class:"text"},"AS",-1)])])):e.createCommentVNode("",!0),n.node.skippable?(e.openBlock(),e.createElementBlock("span",zl,[...a[1]||(a[1]=[e.createElementVNode("span",{class:"text"},"MS",-1)])])):e.createCommentVNode("",!0),n.node.retryable?(e.openBlock(),e.createElementBlock("span",Fl,[...a[2]||(a[2]=[e.createElementVNode("span",{class:"text"},"MR",-1)])])):e.createCommentVNode("",!0),n.node.auto_retry?.enable?(e.openBlock(),e.createElementBlock("span",Il,[...a[3]||(a[3]=[e.createElementVNode("span",{class:"text"},"AR",-1)])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),n.node.create_method==="mock"?(e.openBlock(),e.createElementBlock("span",Ul,"MOCK")):e.createCommentVNode("",!0)]))}}),Gl=oe(jl,[["__scopeId","data-v-077f8bb9"]]),ql={class:"node-operate-actions"},Hl={key:0,class:"more-btn-list"},Wl=["onClick"],Jl={class:"action-name"},Yl=e.defineComponent({__name:"index",emits:["delete","moreBtnClick"],setup(t,{emit:n}){const o=n,a=e.ref(!1),r=e.computed(()=>[{id:"copyNode",name:"复制节点",icon:"incident-fuzhijiedian"},{id:"copyNodeAndInsert",name:"复制并插入",icon:"incident-fuzhibingcharu"},{id:"detachEdges",name:"解除连线",icon:"incident-jiechulianxian"}]),s=()=>{a.value=!0},i=l=>{o("moreBtnClick",l)};return(l,c)=>{const d=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",ql,[e.withDirectives(e.createElementVNode("i",{class:"delete-btn bk-incident-icon incident-shanchujiedian",onClick:c[0]||(c[0]=u=>o("delete"))},null,512),[[d,"删除节点"]]),e.createElementVNode("i",{class:"more-btn bkflow-canvas-icon bkflow-canvas-more-fill",onClick:s}),a.value?(e.openBlock(),e.createElementBlock("div",Hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,u=>(e.openBlock(),e.createElementBlock("div",{class:"more-btn-item",key:u.id,onClick:v=>i(u.id)},[e.createElementVNode("i",{class:e.normalizeClass(["bk-incident-icon",u.icon])},null,2),e.createElementVNode("span",Jl,e.toDisplayString(u.name),1)],8,Wl))),128))])):e.createCommentVNode("",!0)])}}}),Zl=oe(Yl,[["__scopeId","data-v-31512fe2"]]),Kl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,3.5%20L10,3.5%20L10,4.5%20L11.3962161,4.50116386%20C9.643609,6.49502964%208.38728573,7.5%207.76574712,7.5%20L2.98331185,7.5%20L2.98331185,8.5%20L7.76574712,8.5%20C8.38739048,8.5%209.64403252,9.50530916%2011.3971023,11.4998444%20L10,11.5%20L10,12.5%20L13,12.5%20L13,9.5%20L12,9.5%20L11.9990374,10.6691668%20C10.8673578,9.39340572%209.92128001,8.50479286%209.13199729,8.00043657%20C9.92138242,7.4953138%2010.8676033,6.60639761%2011.9994779,5.33034326%20L12,6.5%20L13,6.5%20L13,3.5%20Z'%20fill='%236EC3D5'%20fill-rule='evenodd'/%3e%3c/svg%3e",Ql="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,12%20L3,12%20C2.72385763,12%202.5,12.2238576%202.5,12.5%20C2.5,12.7761424%202.72385763,13%203,13%20L13,13%20C13.2761424,13%2013.5,12.7761424%2013.5,12.5%20C13.5,12.2238576%2013.2761424,12%2013,12%20Z%20M5,6.5%20L4,6.5%20C3.72385763,6.5%203.5,6.72385763%203.5,7%20L3.5,10.5%20C3.5,10.7761424%203.72385763,11%204,11%20L5,11%20C5.27614237,11%205.5,10.7761424%205.5,10.5%20L5.5,7%20C5.5,6.72385763%205.27614237,6.5%205,6.5%20Z%20M8.5,3.5%20L7.5,3.5%20C7.22385763,3.5%207,3.72385763%207,4%20L7,10.5%20C7,10.7761424%207.22385763,11%207.5,11%20L8.5,11%20C8.77614237,11%209,10.7761424%209,10.5%20L9,4%20C9,3.72385763%208.77614237,3.5%208.5,3.5%20Z%20M12,5%20L11,5%20C10.7238576,5%2010.5,5.22385763%2010.5,5.5%20L10.5,10.5%20C10.5,10.7761424%2010.7238576,11%2011,11%20L12,11%20C12.2761424,11%2012.5,10.7761424%2012.5,10.5%20L12.5,5.5%20C12.5,5.22385763%2012.2761424,5%2012,5%20Z'%20fill='%23F8A54F'%20fill-rule='evenodd'/%3e%3c/svg%3e",Xl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='19loczb8h__f71x3hmpea'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.5,2.5%20C6.17779929,2.5%204.26643215,4.28054945%204.02558864,6.56651687%20L4.026,6.558%20L4.03,6.54%20L3.99928094,6.75189877%20C3.76394842,8.11436335%203.07389664,8.46527789%203.00547979,8.87325046%20L3,8.93829715%20C3,9.39912427%204.33397403,9.2134945%204.33397403,9.69904945%20L4.33397403,10.9924271%20C4.33401331,11.5290486%204.757596,11.9699791%205.29378397,11.9915459%20C5.90300757,12.0163699%206.26264111,12.0687043%206.37268552,12.1485262%20C6.45725813,12.2098718%206.51932943,12.4266274%206.55889942,12.7987929%20L6.57276328,12.9456332%20C6.61875295,13.4959998%207.10219523,13.904878%207.65256183,13.8588884%20C7.70929358,13.8541478%207.76551689,13.8445713%207.82061902,13.8302632%20L10.1746185,13.2277878%20C10.5547586,13.1298644%2010.8424468,12.818586%2010.9101698,12.431922%20C11.0509156,11.6378879%2011.2333254,10.9899099%2011.4579782,10.4880363%20C12.402959,9.65300356%2013,8.42466038%2013,7.05516145%20C13,4.53941525%2010.9852814,2.5%208.5,2.5%20Z%20M8.9876109,3.8125%20C9.12361371,3.8219246%209.2572817,3.84136285%209.38686376,3.87081473%20L9.51119251,4.49813988%20C9.7435063,4.58296131%209.9565579,4.70842634%2010.1410081,4.86687748%20L10.7410548,4.6624814%20C10.8461213,4.77852183%2010.9412649,4.90339782%2011.0247344,5.03652034%20L11.1333032,5.22560144%20C11.2050986,5.36461434%2011.2658038,5.51128472%2011.3125,5.66384549%20L10.8356146,6.08677455%20C10.8560442,6.20399306%2010.8665509,6.32474578%2010.8665509,6.4484437%20C10.8665509,6.57390873%2010.8554605,6.69642857%2010.8344472,6.81541419%20L11.3101652,7.23775422%20C11.1934246,7.61473834%2010.9949656,7.95579117%2010.7358014,8.2391183%20L10.135171,8.03413318%20C9.95188828,8.19022817%209.74117149,8.31392609%209.51177621,8.39815848%20L9.38744747,9.02607267%20C9.20182991,9.06789435%209.00920792,9.09027778%208.81133259,9.09027778%20C8.61579208,9.09027778%208.4249212,9.06848338%208.24163845,9.02725074%20L8.11730971,8.40051463%20C7.88616332,8.31628224%207.67369542,8.19199529%207.48924527,8.03531126%20L6.88803117,8.24029638%20C6.79055277,8.13368056%206.70182991,8.0188182%206.6224463,7.89747644%20L6.47068352,7.63240947%20C6.408811,7.50753348%206.35569402,7.37676711%206.31366741,7.24128844%20L6.78938536,6.81894841%20C6.76778835,6.69878472%206.75669799,6.57449777%206.75669799,6.44785466%20C6.75669799,6.32297867%206.76778835,6.20045883%206.78880166,6.08147321%20L6.3125,5.65913318%20C6.3504407,5.53661334%206.39713694,5.41821677%206.45142132,5.30394345%20L6.64696183,4.96230159%20C6.719341,4.8562748%206.79814091,4.75496032%206.88452895,4.66071429%20L7.48457565,4.8656994%20C7.67077691,4.70665923%207.88499591,4.58060516%208.11906082,4.49578373%20L8.24338956,3.86904762%20C8.37122052,3.84077381%208.50197,3.82133557%208.63622169,3.8125%20Z%20M8.8119163,5.50598338%20C8.29592283,5.50598338%207.87799148,5.92773437%207.87799148,6.4484437%20C7.87799148,6.96915303%208.29592283,7.39090402%208.8119163,7.39090402%20C9.32790976,7.39090402%209.74584112,6.96915303%209.74584112,6.4484437%20C9.74584112,5.92773437%209.32790976,5.50598338%208.8119163,5.50598338%20Z%20M8.8119163,5.88296751%20C9.12139176,5.88296751%209.37227119,6.13613982%209.37227119,6.4484437%20C9.37227119,6.76074758%209.12139176,7.01391989%208.8119163,7.01391989%20C8.50244084,7.01391989%208.25156141,6.76074758%208.25156141,6.4484437%20C8.25156141,6.13613982%208.50244084,5.88296751%208.8119163,5.88296751%20Z'%20fill='url(%2319loczb8h__f71x3hmpea)'%20fill-rule='evenodd'/%3e%3c/svg%3e",ec={class:"option-item"},tc=["src"],nc={class:"option-name"},oc=e.defineComponent({__name:"option-item",props:{option:{}},setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createElementBlock("div",ec,[e.createElementVNode("img",{class:"option-img",src:n.option.iconUrl},null,8,tc),e.createElementVNode("div",nc,e.toDisplayString(n.option.name),1),n.option.type==="group"?(e.openBlock(),e.createBlock(e.unref(Oe.AngleRight),{key:0,class:"angle-icon"})):e.createCommentVNode("",!0),n.option.type==="link"?(e.openBlock(),e.createBlock(e.unref(Oe.ArrowsRight),{key:1,class:"arrow-icon"})):e.createCommentVNode("",!0)]))}}),Xt=oe(oc,[["__scopeId","data-v-0470b67d"]]),ac={key:0},rc=e.defineComponent({__name:"index",props:{isSearch:{type:Boolean,default:!1},title:{}},emits:["clear"],setup(t,{emit:n}){const o=t,a=n,r=e.computed(()=>o.isSearch?"搜索结果为空":o.title||"暂无数据");return(s,i)=>{const l=e.resolveComponent("bk-exception");return e.openBlock(),e.createBlock(l,{scene:"part",type:o.isSearch?"search-empty":"empty",title:r.value},{default:e.withCtx(()=>[o.isSearch?(e.openBlock(),e.createElementBlock("div",ac,[i[1]||(i[1]=e.createTextVNode(" 可以尝试 调整关键词 或 ",-1)),e.createElementVNode("span",{class:"clear-button",onClick:i[0]||(i[0]=c=>a("clear"))},"清空筛选条件")])):e.createCommentVNode("",!0)]),_:1},8,["type","title"])}}}),st=oe(rc,[["__scopeId","data-v-01a0dc2e"]]),ic={class:"quick-edit-popover"},sc={class:"search-input"},lc={class:"plugin-option-list"},cc={class:"nodes-list"},dc=["onClick"],uc={class:"data-plugin-list"},pc=["onClick"],fc={class:"data-plugin-name"},mc={class:"agent-plugin-list"},vc={class:"list-wrapper"},hc=["onClick"],gc={class:"agent-name"},yc={class:"agent-en-name"},wc=e.defineComponent({__name:"index",props:{dataGroupPlugins:{default:()=>[]},agentGroupPlugins:{default:()=>[]}},emits:["addNode","addPlugin","openPluginSelect","deleteEdge","deleteNode","copyNode","copyNodeAndInsert","detachEdges"],setup(t,{emit:n}){const o=[{id:"branchgateway",name:"分支网关",icon:"incident-node-branchgateway-shortcut"},{id:"parallelgateway",name:"并行网关",icon:"incident-node-parallelgateway-shortcut"},{id:"conditionalparallelgateway",name:"条件并行网关",icon:"incident-node-conditionalparallelgateway-shortcut"},{id:"convergegateway",name:"汇聚网关",icon:"incident-node-convergegateway-shortcut"}],a={alert_plugin:"incident-gaojing",query_promql_metric_plugin:"incident-zhibiao",trace_plugin:"incident-trace",事件:"incident-shijian",log_plugin:"incident-rizhi",profling:"incident-profling",图谱:"incident-tupu"},r=un.useRouter(),s=un.useRoute(),i=t,l=n,c=e.shallowRef(i.dataGroupPlugins.map(p=>({id:p.id,name:p.alias,icon:a[p.name]}))),d=e.shallowRef(i.agentGroupPlugins.map(p=>({id:p.id,name:p.alias,enName:p.name}))),u=[{id:"logic",name:"逻辑",iconUrl:Kl,type:"group",children:o},{id:"data",name:"数据",iconUrl:Ql,type:"group",children:c.value},{id:"agent",name:"智能体",iconUrl:Xl,type:"group",children:d.value}],v=e.ref(""),w=e.shallowRef([...u]),h=e.computed(()=>(i.agentGroupPlugins.length||0)>10),m=p=>{const k=p.trim().toLowerCase();if(k===""){w.value=[...u];return}const C=[];u.forEach(E=>{if(E.name.toLowerCase().includes(k))C.push(E);else if(E.type==="group"){const I=[];E.children?.forEach(z=>{z.name.toLowerCase().includes(k)&&I.push(z)}),I.length>0&&C.push({...E,children:I})}}),w.value=C},g=()=>{v.value="",w.value=[...u]},f=p=>{l("addNode",p)},b=(p,k)=>{l("addPlugin",p,k)},y=p=>{l("openPluginSelect",p)},_=()=>{if(h.value)y("agent");else{const{href:p}=r.resolve({name:"spaceResource",params:s.params});window.open(p,"_blank")}};return(p,k)=>{const C=e.resolveComponent("bk-input"),E=e.resolveComponent("bk-popover"),I=e.resolveComponent("bk-button"),z=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",ic,[e.createElementVNode("div",sc,[e.createVNode(C,{modelValue:v.value,"onUpdate:modelValue":k[0]||(k[0]=V=>v.value=V),placeholder:"搜索节点",type:"search",clearable:!0,onClear:g,onInput:m},null,8,["modelValue"])]),e.createElementVNode("div",lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,V=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V.id},[V.id==="logic"?(e.openBlock(),e.createBlock(E,{key:0,theme:"light",placement:"right-start","ext-cls":"plugin-child-popover",boundary:"parent",arrow:!1,width:88,"popover-delay":[0,100]},{content:e.withCtx(()=>[e.createElementVNode("div",cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.children,P=>e.withDirectives((e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["bk-incident-icon",P.icon]),key:P.id,onClick:X=>f(P.id)},null,10,dc)),[[z,{content:P.name,placement:"top"}]])),128))])]),default:e.withCtx(()=>[e.createVNode(Xt,{option:V},null,8,["option"])]),_:2},1024)):V.id==="data"?(e.openBlock(),e.createBlock(E,{key:1,theme:"light",placement:"right-start","ext-cls":"plugin-child-popover",boundary:"parent",arrow:!1,width:160,"popover-delay":[0,100]},{content:e.withCtx(()=>[e.createElementVNode("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.children,P=>(e.openBlock(),e.createElementBlock("div",{class:"data-plugin-item",key:P.id,onClick:X=>b(P.id,"data")},[e.createElementVNode("i",{class:e.normalizeClass(["bk-incident-icon",P.icon])},null,2),e.createElementVNode("div",fc,e.toDisplayString(P.name),1)],8,pc))),128))]),V.children&&V.children.length===0?(e.openBlock(),e.createBlock(st,{key:0,class:"group-empty-exception",title:"暂无数据插件"})):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(Xt,{option:V},null,8,["option"])]),_:2},1024)):V.id==="agent"?(e.openBlock(),e.createBlock(E,{key:2,theme:"light",placement:"right-start","ext-cls":"plugin-child-popover",boundary:"parent",arrow:!1,width:280,"popover-delay":[0,100]},{content:e.withCtx(()=>[e.createElementVNode("div",mc,[e.createElementVNode("div",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.children,P=>(e.openBlock(),e.createElementBlock("div",{class:"agent-plugin-item",key:P.id,onClick:X=>b(P.id,"agent")},[e.createElementVNode("span",gc,e.toDisplayString(P.name),1),e.createElementVNode("span",yc,"("+e.toDisplayString(P.enName)+")",1)],8,hc))),128))]),V.children&&V.children.length===0?(e.openBlock(),e.createBlock(st,{key:0,class:"group-empty-exception",title:"暂无智能体插件"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"list-footer",onClick:_},[e.createVNode(I,{theme:"primary",text:"",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value?"更多":"申请更多权限"),1)]),_:1}),k[1]||(k[1]=e.createElementVNode("i",{class:"bk-incident-icon incident-arrow2"},null,-1))])])]),default:e.withCtx(()=>[e.createVNode(Xt,{option:V},null,8,["option"])]),_:2},1024)):(e.openBlock(),e.createBlock(Xt,{key:3,option:V,onClick:P=>y(V.id)},null,8,["option","onClick"]))],64))),128)),w.value.length===0?(e.openBlock(),e.createBlock(st,{key:0,"is-search":v.value.length>0,onClear:g},null,8,["is-search"])):e.createCommentVNode("",!0)])])}}}),bc=oe(wc,[["__scopeId","data-v-483a0c2d"]]),kc={class:"custom-node"},Cc={key:0,class:"add-node-popover"},_c=e.defineComponent({__name:"index",props:{editable:{type:Boolean},pluginGroupList:{default:()=>[]},dataGroupPlugins:{default:()=>[]},agentGroupPlugins:{default:()=>[]}},emits:["addNode","addPlugin","addNodeAndSelectPlugin","addBtnClick","deleteBtnClick","copyNodeClick","copyNodeAndInsertClick","detachEdgesClick"],setup(t,{emit:n}){const o={startpoint:pl,endpoint:vl,tasknode:xl,branchgateway:Vl,parallelgateway:Dl,conditionalparallelgateway:Ml,convergegateway:Ol},a=e.inject("getNode");if(!a)throw new Error("getNode is not defined");const r=t,s=n,i=e.ref({id:"",type:"",name:""}),l=e.ref(),c=e.ref(!1),d=e.computed(()=>{const f=a(),{type:b}=f.getData();return o[b]});e.onMounted(()=>{const f=a();i.value=f.getData(),f.on("change:data",({current:b})=>{i.value=b})}),e.onBeforeUnmount(()=>{l.value?.resetPopover()});const u=f=>{s("addNode",i.value.id,f),l.value.hide()},v=(f,b)=>{s("addPlugin",i.value.id,f,b),l.value.hide()},w=f=>{s("addNodeAndSelectPlugin",i.value.id,f),l.value.hide()},h=()=>{c.value=!0,s("addBtnClick",i.value.id)},m=()=>{s("deleteBtnClick",i.value.id)},g=f=>{f==="copyNode"?s("copyNodeClick",i.value.id):f==="copyNodeAndInsert"?s("copyNodeAndInsertClick",i.value.id):f==="detachEdges"&&s("detachEdgesClick",i.value.id)};return(f,b)=>{const y=e.resolveComponent("bk-popover");return e.openBlock(),e.createElementBlock("div",kc,[["task","tasknode"].includes(i.value.type)?(e.openBlock(),e.createBlock(Gl,{key:0,node:i.value,editable:r.editable},null,8,["node","editable"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(y,{ref_key:"popoverRef",ref:l,"ext-cls":"custom-node-popover",placement:"bottom-end",theme:"light",disabled:!r.editable||i.value.type==="endpoint",content:i.value.name,key:i.value.id,arrow:!1,onAfterHidden:b[0]||(b[0]=_=>c.value=!1)},{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["add-btn",i.value.type==="tasknode"?"type-task-node":""])},[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-add-fill",onClick:h}),c.value?(e.openBlock(),e.createElementBlock("div",Cc,[e.createVNode(bc,{"plugin-group-list":r.pluginGroupList,"data-group-plugins":r.dataGroupPlugins,"agent-group-plugins":r.agentGroupPlugins,onAddNode:u,onOpenPluginSelect:w,onAddPlugin:v},null,8,["plugin-group-list","data-group-plugins","agent-group-plugins"])])):e.createCommentVNode("",!0)],2),e.createVNode(Zl,{onDelete:m,onMoreBtnClick:g})]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{node:i.value,class:e.normalizeClass(i.value.status?i.value.status.toLowerCase():"")},null,8,["node","class"]))]),_:1},8,["disabled","content"]))])}}}),Za=oe(_c,[["__scopeId","data-v-3039608d"]]),xc=e.defineComponent({__name:"canvas",props:{pipelineTree:{},editable:{type:Boolean}},emits:["nodeMoving","nodeMoved","nodeClick","edgeClick","edgeLabelClick","edgeLabelUpdate","nodeDbClick","nodeMouseenter","nodeMouseleave","edgeMouseenter","edgeMouseleave","updatePipelineTree","addNode","deleteNode","copyNode","copyNodeAndInsert","detachEdges","deleteEdge"],setup(t,{expose:n,emit:o}){const a=e.useSlots(),r=Vo.getTeleport(),s=t,i=o,l=e.shallowRef(null),c=e.shallowRef(),d=e.ref(ve.cloneDeep(s.pipelineTree)),u=e.ref(!1);e.watch(()=>s.pipelineTree,()=>{d.value=ve.cloneDeep(s.pipelineTree)}),e.onMounted(()=>{v(),w();const{x,y:U}=l.value.getContentArea();l.value.positionPoint({x,y:U},40,134)});const v=()=>{l.value=new ye.Graph({container:c.value,grid:{size:1,visible:!1},panning:!0,mousewheel:{enabled:!0,modifiers:["ctrl"]},scaling:{min:.25,max:1.5},virtual:!1,connecting:{allowBlank:!1,allowLoop:!1,allowNode:!1,allowEdge:!1,allowMulti:!1,highlight:!1,snap:{radius:15},router:{name:"manhattan",args:{padding:1}},connector:{name:"rounded",args:{radius:6}},connectionPoint:"anchor",createEdge(){return new ye.Shape.Edge({id:`line${qe()}`,attrs:{line:{stroke:"#a9adb6",strokeWidth:2,targetMarker:{name:"block",width:6,height:8}}},data:{},zIndex:0})},validateEdge:m},interacting:{nodeMovable:s.editable,edgeLabelMovable:s.editable,arrowheadMovable:s.editable},highlighting:{magnetAvailable:{name:"stroke",args:{attrs:{fill:"#fff",stroke:"#31d0c6","stroke-width":1}}},magnetAdsorbed:{name:"stroke",args:{attrs:{fill:"#fff",stroke:"#3a84ff","stroke-width":2}}}},onEdgeLabelRendered:x=>{const{label:U}=x.label,F=x.selectors.foContent;if(F){const j=document.createElement("div");return j.classList.add("branch-condition"),U.isDefault&&j.classList.add("default-branch"),j.innerText=U.name,j.title=U.name,Array.isArray(F)?F.length>0&&F[0].appendChild(j):F.appendChild(j),()=>{Array.isArray(F)?F.length>0&&F[0].contains(j)&&F[0].removeChild(j):F.contains(j)&&F.removeChild(j)}}}}),window.__x6_instances__=[l.value],l.value.use(new Pr.Snapline({enabled:!0,className:"custom-snap-line",tolerance:2})),l.value.use(new Lr.Clipboard({enabled:!0})),l.value.use(new Mr.Selection({enabled:!1,multiple:!0,rubberband:!1,showNodeSelectionBox:!0,pointerEvents:"none"})),h(),Is(l.value,s.editable),l.value.on("node:moving",g),l.value.on("node:moved",b),l.value.on("node:click",ve.debounce(_,200)),l.value.on("node:dblclick",p),l.value.on("node:mouseenter",k),l.value.on("node:mouseleave",C),l.value.on("edge:click",ve.debounce(E,200)),l.value.on("edge:mouseenter",I),l.value.on("edge:click",z),l.value.on("edge:added",V),l.value.on("edge:change:labels",X),l.value.on("edge:mouseenter",({cell:x})=>{s.editable&&x.addTools([{name:"button-remove",args:{distance:.5,onClick:()=>{i("deleteEdge",x)}}}])}),l.value.on("edge:mouseleave",({cell:x})=>{x.removeTools()})},w=()=>{const x=Ps(d.value.location,d.value.activities),U=Go(d.value.line);l.value?.addNodes(x),l.value?.addEdges(U)},h=()=>{Vo.register({shape:"custom-node",ports:{...Fs},component:a.customNode?e.h("div",{style:{width:"100%",height:"100%"}},a.customNode()):e.h(Za,{editable:s.editable,onAddBtnClick:x=>{i("addNode",x)},onDeleteBtnClick:x=>{i("deleteNode",x)},onCopyNodeClick:x=>{i("copyNode",x)},onCopyNodeAndInsertClick:x=>{i("copyNodeAndInsert",x)},onDetachEdgesClick:x=>{i("detachEdges",x)}})})},m=({edge:x})=>{const U=d.value.line.filter(ae=>ae.id!==x.id),F=x.source,j=x.target,Y=F.port.split("_")[1]||"",K=j.port?.split("_")[1]||"",H={id:x.id,source:{id:F.cell,arrow:`${Y.charAt(0).toUpperCase()}${Y.slice(1)}`},target:{id:j.cell,arrow:`${K.charAt(0).toUpperCase()}${K.slice(1)}`}},te=zs(H,U,d.value.location);if(te.valid){const ae=x.id in s.pipelineTree.flows;if(console.log(ae),ae){const le=d.value.line.find(ie=>ie.id===x.id);N(le,H)}else T([H]),V({cell:x})}else dn({message:te.message,theme:"warning"});return te.valid},g=({node:x})=>{i("nodeMoving",x)},f=({node:x})=>{},b=({node:x})=>{const U=x.position(),F=[...d.value.location],j=F.findIndex(Y=>Y.id===x.id);F.splice(j,1,{...F[j],x:U.x,y:U.y}),d.value={...d.value,location:F},J(),i("nodeMoved",x)},y=({node:x})=>{const U=l.value?.getCellById(x.id);if(U){const F=U.getData().type,j=U.position();F==="tasknode"?S(x.id,j):D(x.id,F,j)}},_=({e:x,node:U})=>{x.detail===1&&i("nodeClick",U)},p=({node:x})=>{i("nodeDbClick",x)},k=({node:x})=>{i("nodeMouseenter",x)},C=({node:x,e:U})=>{i("nodeMouseleave",x,U)},E=({e:x,edge:U})=>{if(mn("branch-condition",x.target)){i("edgeLabelClick",U);return}i("edgeClick",U,x)},I=({edge:x})=>{i("edgeMouseenter",x)},z=({edge:x})=>{i("edgeMouseleave",x)},V=({cell:x})=>{e.nextTick(()=>{const U=x.source?.cell||x.source,j=ee(U)[x.id];if(j){const Y=document.createElement("span");Y.innerText=j.name,Y.style.fontSize="12px",Y.style.padding="0 6px",document.body.appendChild(Y);let{width:K=0}=Y.getBoundingClientRect();K>112?K=112:K<60&&(K=60),document.body.removeChild(Y);const H=j.loc||-K/2-20;x.appendLabel({markup:ye.Markup.getForeignObjectMarkup(),attrs:{fo:{width:K,height:26,x:-K,y:-13}},label:{...j,lineId:x.id,sourceId:U},position:{distance:H,offset:{x:K/2,y:0}}})}})},P=x=>{const F=l.value.getEdges().find(j=>j.id===x);F&&(F.removeLabelAt(0),V({cell:F}))},X=({edge:x,current:U,previous:F})=>{if(!F||!F.length||!U.length)return;const K=l.value.findViewByCell(x.id).container.querySelector(`.${x.id}`).getTotalLength();U.forEach(H=>{const{width:te}=H.attrs.fo;H.position.offset={x:te/2,y:0};const ae=(te/2+20)/K,le=1-ae,ie=Math.max(ae,Math.min(le,H.position.distance));H.position.distance=ie;const{sourceId:de,isDefault:ge=!1}=H.label;W(x.id,de,ge,ie)})},ee=x=>{const U=d.value.gateways[x];let F={};if(U){const{conditions:j,default_condition:Y}=U;j&&(F={...j}),Y&&Y.flow_id&&(F[Y.flow_id]={...Y,isDefault:!0})}return F},S=(x,U,F={})=>{const j={...d.value.activities},Y=[...d.value.location],K=Ms(x,F),{name:H,error_ignorable:te,retryable:ae,skippable:le,auto_retry:ie,component:de={}}=K;R(x,{id:x,name:H,error_ignorable:te,retryable:ae,skippable:le,auto_retry:ie,component:de,type:"tasknode"}),j[x]=K,Y.push({id:x,type:"tasknode",x:U.x,y:U.y,name:H}),d.value={...d.value,activities:j,location:Y},J()},D=(x,U,F,j={})=>{const K={branchgateway:"ExclusiveGateway",parallelgateway:"ParallelGateway",conditionalparallelgateway:"ConditionalParallelGateway",convergegateway:"ConvergeGateway"}[U],H={...d.value.gateways},te=[...d.value.location],ae=Ls(x,K,j);console.log("gateway: ",ae),R(x,{id:x}),H[x]=ae,te.push({id:x,type:U,x:F.x,y:F.y}),d.value={...d.value,gateways:H,location:te},J()},T=x=>{const{start_event:U,end_event:F,activities:j,gateways:Y,flows:K,location:H,line:te}=ve.cloneDeep(d.value);x.forEach(ae=>{const{id:le,source:ie,target:de}=ae;te.push(ae),K[ae.id]={id:le,source:ie.id,target:de.id,is_default:!1};const ge=H.find(fe=>fe.id===ie.id),Ce=H.find(fe=>fe.id===de.id);if(ge){if(ge.type==="startpoint")U.outgoing=le;else if(ge.type==="tasknode")j[ie.id].outgoing=le;else if(ge.type.includes("gateway")){const fe=Y[ie.id];if(Array.isArray(fe.outgoing)?fe.outgoing.push(le):fe.outgoing=le,["ExclusiveGateway","ConditionalParallelGateway"].includes(fe.type)){const xe={...fe.conditions||{}},Ne=Object.keys(xe).length;xe[le]={name:`条件${Ne+1}`,tag:`branch_${ie.id}_${de.id}`,evaluate:Ne>0?"1 == 0":"1 == 1"},fe.conditions=xe}}}Ce&&(Ce.type==="endpoint"?F.incoming.push(le):Ce.type==="tasknode"?j[de.id].incoming.push(le):Ce.type.includes("gateway")&&Y[de.id].incoming.push(le))}),d.value={...d.value,start_event:U,end_event:F,activities:j,gateways:Y,flows:K,line:te},J()},N=(x,U)=>{const F=U.id,j=ve.cloneDeep(d.value),Y=x.source.id!==U.source.id,K=Y?x.source.id:x.target.id,H=Y?U.source.id:U.target.id;Y?j.flows[F].source=H:j.flows[F].target=H;const te=j.line.findIndex(de=>de.id===F);te>-1&&j.line.splice(te,1,U);const ae=jo(H,j),le=jo(K,j),ie=Y?"outgoing":"incoming";Array.isArray(ae[ie])?ae[ie].push(F):ae[ie]=F,Array.isArray(le[ie])?le[ie]=le[ie].filter(de=>de!==F):le[ie]="",d.value=j,J()},O=x=>{const U=Go(x);l.value?.addEdges(U),T(x)},Z=x=>{l.value?.removeNode(x);const U=[];d.value.line.forEach(ie=>{(ie.source.id===x||ie.target.id===x)&&U.push(ie.id)});const F=M(U),{activities:j,gateways:Y,flows:K,location:H,line:te,start_event:ae,end_event:le}=F;j[x]?delete j[x]:Y[x]&&delete Y[x],H.splice(H.findIndex(ie=>ie.id===x),1),d.value={...d.value,activities:j,gateways:Y,flows:K,location:H,line:te,start_event:ae,end_event:le},J()},A=x=>{x.forEach(U=>{l.value?.removeEdge(U)}),d.value=M(x),J()},M=x=>{const U={...d.value.activities},F={...d.value.gateways},j={...d.value.flows},Y=[...d.value.line],K={...d.value.start_event},H={...d.value.end_event};return x.forEach(te=>{delete j[te],Y.splice(Y.findIndex(ae=>ae.id===te),1),Object.keys(U).forEach(ae=>{if(U[ae].incoming.includes(te)||U[ae].outgoing===te){const le=ve.cloneDeep(U[ae]),{incoming:ie,outgoing:de}=le;ie.includes(te)&&ie.splice(ie.findIndex(ge=>ge===te),1),de===te&&(le.outgoing=""),U[ae]=le}}),Object.keys(F).forEach(ae=>{const le=ve.cloneDeep(F[ae]),{incoming:ie,outgoing:de,conditions:ge,default_condition:Ce}=le;F[ae].incoming.includes(te)&&ie.includes(te)&&ie.splice(ie.findIndex(fe=>fe===te),1),Array.isArray(de)?de.includes(te)&&de.splice(de.findIndex(fe=>fe===te),1):de===te&&(le.outgoing=""),ge&&ge[te]&&delete ge[te],Ce&&Ce.flow_id===te&&delete le.default_condition,F[ae]=le}),K.outgoing===te&&(K.outgoing=""),H.incoming.includes(te)&&(H.incoming=H.incoming.filter(ae=>ae!==te))}),{...d.value,activities:U,gateways:F,flows:j,line:Y,start_event:K,end_event:H}},R=(x,U)=>{const F=l.value?.getCellById(x),j=F?.data.type;F&&F.setData({...F.data,...U,type:j})},W=ve.debounce((x,U,F,j)=>{const Y={...d.value.gateways};if(Y[U]){const K=ve.cloneDeep(Y[U]);F&&K.default_condition?K.default_condition={...K.default_condition,loc:j}:K.conditions&&K.conditions[x]&&(K.conditions[x]={...K.conditions[x],loc:j}),Y[U]=K,d.value={...d.value,gateways:Y},J()}},300),q=async()=>{if(u.value)return;const x=200,U=s.pipelineTree.location.map(_e=>_e.x),F=s.pipelineTree.location.map(_e=>_e.y),j=Math.min(...U),Y=Math.max(...U),K=Math.min(...F),H=Math.max(...F),te=j<0?-j:0,ae=K<0?-K:0;let le=0;const ie=document.documentElement.offsetWidth-60,de=document.documentElement.offsetHeight-60-50;j<0?le=Y>ie?Y-j:ie-j:le=Y>ie?Y:ie;let ge=0;K<0?ge=H>de?H-K:de-K:ge=H>de?H:de;const Ce=ge+x+30,fe=le+x+80,xe=await it.toJpeg(c.value,{bgcolor:"#ffffff",height:Ce,width:fe,cloneBack:_e=>{const je=_e.querySelector(".x6-graph-svg");je.style.width=`${fe}px`,je.style.height=`${Ce}px`;const We=_e.querySelector(".x6-graph-svg-viewport");We.style.transform=`translate(${`${te+30}px`}, ${`${ae+30}px`})`}});u.value=!0;const Ne=document.createElement("a");Ne.download=`bkflow_template_canvas_${+new Date}.png`,Ne.href=xe,Ne.click(),u.value=!1},J=()=>{i("updatePipelineTree",d.value)};return n({graph:l,createActivity:S,createGateway:D,deleteNode:Z,deleteEdges:A,insertEdgesToCanvas:O,updateEdgeLabel:P,updateNodeData:R}),(x,U)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["bkflow-canvas-container",{"bkflow-canvas-view":!s.editable}])},[l.value?(e.openBlock(),e.createBlock(rl,{key:0,instance:l.value,onDownload:q},null,8,["instance"])):e.createCommentVNode("",!0),l.value&&s.editable?(e.openBlock(),e.createBlock(cl,{key:1,instance:l.value,onDragging:f,onDragEnd:y},null,8,["instance"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"graphContainerRef",ref:c,class:"graph-container"},null,512),e.createVNode(e.unref(r))],2))}}),Ac=oe(xc,[["__scopeId","data-v-5a816e44"]]),Ka=t=>"default"in t?t.default:["list"].includes(t.type)?[]:"",Ec={class:"bkflow-variable-table"},Vc={class:"operate-wrapper"},Nc={class:"btns-list"},Bc={class:"toggle-system-variables"},Dc={class:"variable-table-wrapper"},Tc={class:"var-check-cell"},Sc={key:0,class:"bkflow-canvas-icon bkflow-canvas-lock-disable"},Mc={class:"cell-text"},Lc={class:"cell-text"},Pc={class:"copy-icon-wrapper"},Oc={class:"table-row-actions"},Rc=["onClick"],$c=["onClick"],zc=e.defineComponent({__name:"global-variable-table",props:{constants:{default:()=>({})},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0},outputs:{default:()=>[]},customVariableTypes:{default:()=>[]},variablesReference:{default:()=>({defined:{},nodefined:{}})}},emits:["create","edit","clone","delete","outputChange","updateConstants"],setup(t,{emit:n}){const o=t;e.watch(()=>o.outputs,p=>{console.log("outputs",p)});const a=n,r=e.ref(!1),s=e.ref([]),i=e.computed(()=>{const p=Object.values(o.constants).sort((k,C)=>k.index-C.index);return r.value?p:[...o.systemVariables,...p]}),l={cellFn:p=>{const k=s.value.length,C=Object.values(o.constants).length,E=C>0&&k===C,I=k>0&&k<C;if(p.index===0)return e.createVNode(e.Fragment,null,[e.createVNode(e.resolveComponent("bk-checkbox"),{modelValue:E,indeterminate:I,disabled:!o.editable,onChange:v},null)]);if(["reference","outputs"].includes(p.column.prop)){const z={content:p.column.prop==="reference"?"直接引用全局变量的节点数量,点击数字查看引用详情":"表示该变量会作为该流程模板的输出参数,在被其他流程模板当做子流程节点时可以引用。",placement:"top"};return e.createVNode("div",{class:"thead-custom"},[p.column.label,e.withDirectives(e.createVNode(Oe.Info,{class:"info-icon"},null),[[e.resolveDirective("bk-tooltips"),z]])])}return p.column.label}},c=p=>p.source_type==="system"?"系统变量":p.source_type==="custom"?o.customVariableTypes.find(C=>C.code===p.custom_type)?.name||"自定义":"组件",d=p=>{const k=p.length>1?`确认删除所选的${p.length}个变量?`:`确认删除全局变量"${p[0]}"?`;jn.InfoBox({title:k,content:"若该变量被节点引用,请及时检查并更新节点配置",width:450,headerAlign:"center",footerAlign:"center",confirmText:"确认",cancelText:"取消",onConfirm:()=>{const C={...o.constants};p.slice().forEach(E=>{delete C[E];const I=s.value.indexOf(E);I!==-1&&s.value.splice(I,1)}),a("updateConstants",C),_(p)},onCancel:()=>{}})},u=(p,k)=>{a("edit",k)},v=p=>{p?s.value=Object.keys(o.constants):s.value=[]},w=(p,k)=>{const C=s.value.indexOf(k);p?C===-1&&s.value.push(k):C!==-1&&s.value.splice(C,1)},h=p=>{if(o.variablesReference?.defined&&p in o.variablesReference.defined){const{activities:k,conditions:C,constants:E}=o.variablesReference.defined[p];return k.length+C.length+E.length}return 0},m=()=>{d(s.value)},g=p=>{d([p.key])},f=p=>{const k=document.createElement("textarea");k.value=p.toString(),document.body.appendChild(k),k.select(),document.execCommand("copy"),document.body.removeChild(k),jn.Message({theme:"success",message:"复制成功"})},b=(p,k)=>{const C={...o.constants};C[p.key]={...p,show_type:k?"show":"hide"},a("updateConstants",C)},y=(p,k)=>{a("outputChange",p,k)},_=p=>{a("delete",p)};return(p,k)=>{const C=e.resolveComponent("bk-button"),E=e.resolveComponent("bk-checkbox"),I=e.resolveComponent("bk-table-column"),z=e.resolveComponent("bk-overflow-title"),V=e.resolveComponent("bk-switcher"),P=e.resolveComponent("bk-popover"),X=e.resolveComponent("bk-table"),ee=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",Ec,[e.createElementVNode("div",Vc,[e.createElementVNode("div",Nc,[e.createVNode(C,{theme:"primary",onClick:k[0]||(k[0]=S=>a("create"))},{default:e.withCtx(()=>[...k[7]||(k[7]=[e.createTextVNode("新建",-1)])]),_:1}),s.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{onClick:m},{default:e.withCtx(()=>[...k[8]||(k[8]=[e.createTextVNode("删除",-1)])]),_:1}),e.createElementVNode("span",null,"已选择"+e.toDisplayString(s.value.length)+"项",1),e.createVNode(C,{class:"clear-checked-btn",theme:"primary",size:"small",text:"",onClick:k[1]||(k[1]=S=>s.value=[])},{default:e.withCtx(()=>[...k[9]||(k[9]=[e.createTextVNode(" 清空 ",-1)])]),_:1})],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Bc,[e.createVNode(E,{modelValue:r.value,"onUpdate:modelValue":k[2]||(k[2]=S=>r.value=S)},{default:e.withCtx(()=>[...k[10]||(k[10]=[e.createTextVNode("隐藏系统变量",-1)])]),_:1},8,["modelValue"])])]),e.createElementVNode("div",Dc,[e.createVNode(X,{data:i.value,border:["outer"],thead:l,onRowClick:u},{default:e.withCtx(()=>[e.createVNode(I,{"min-width":40,width:40},{default:e.withCtx(({row:S})=>[e.createElementVNode("div",Tc,[S.source_type==="system"?(e.openBlock(),e.createElementBlock("i",Sc)):(e.openBlock(),e.createElementBlock("span",{key:1,onClick:k[3]||(k[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(E,{"model-value":s.value.includes(S.key),disabled:!o.editable,onChange:D=>w(D,S.key)},null,8,["model-value","disabled","onChange"])]))])]),_:1}),e.createVNode(I,{label:"名称",prop:"name",width:150},{default:e.withCtx(({row:S})=>[e.createElementVNode("div",Mc,[e.createVNode(z,{type:"tips"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.name),1)]),_:2},1024)])]),_:1}),e.createVNode(I,{label:"KEY",prop:"key","min-width":120},{default:e.withCtx(({row:S})=>[e.createElementVNode("div",Lc,[e.createVNode(z,{type:"tips"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.key),1)]),_:2},1024)]),e.createElementVNode("span",Pc,[e.withDirectives(e.createVNode(e.unref(Oe.CopyShape),{onClick:e.withModifiers(D=>f(S.key),["stop"])},null,8,["onClick"]),[[ee,{content:"复制",placement:"top"}]])])]),_:1}),e.createVNode(I,{label:"引用",prop:"reference",width:70,"min-width":60},{default:e.withCtx(({row:S})=>[e.createTextVNode(e.toDisplayString(h(S.key)),1)]),_:1}),e.createVNode(I,{label:"类型",prop:"type",width:80,"min-width":80},{default:e.withCtx(({row:S})=>[e.createTextVNode(e.toDisplayString(c(S)),1)]),_:1}),e.createVNode(I,{label:"显示(入参)",prop:"value",width:110},{default:e.withCtx(({row:S})=>[e.createVNode(V,{theme:"primary",size:"small",value:S.show_type==="show",disabled:!o.editable||["system","component_outputs"].includes(S.source_type),onClick:k[4]||(k[4]=e.withModifiers(()=>{},["stop"])),onChange:D=>b(S,D)},null,8,["value","disabled","onChange"])]),_:1}),e.createVNode(I,{label:"输出",prop:"outputs",width:70,"min-width":60},{default:e.withCtx(({row:S})=>[e.createVNode(V,{theme:"primary",size:"small",value:o.outputs.includes(S.key),disabled:!o.editable||S.source_type==="system",onClick:k[5]||(k[5]=e.withModifiers(()=>{},["stop"])),onChange:D=>y(S.key,D)},null,8,["value","disabled","onChange"])]),_:1}),e.createVNode(I,{label:"操作",prop:"description",width:70,"min-width":70,fixed:"right"},{default:e.withCtx(({row:S})=>[e.createElementVNode("div",Oc,[o.editable&&S.source_type!=="system"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{theme:"primary",size:"small",text:"",onClick:e.withModifiers(D=>a("edit",S),["stop"])},{default:e.withCtx(()=>[...k[11]||(k[11]=[e.createTextVNode(" 编辑 ",-1)])]),_:2},1032,["onClick"]),e.createVNode(P,{placement:"bottom",theme:"light","ext-cls":"varibale-table-action-popover",width:90},{content:e.withCtx(()=>[e.createElementVNode("div",{class:"more-action-item",onClick:D=>a("clone",S)},"克隆",8,Rc),e.createElementVNode("div",{class:"more-action-item",onClick:D=>g(S)},"删除",8,$c)]),default:e.withCtx(()=>[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-more-fill row-action-more",onClick:k[6]||(k[6]=e.withModifiers(()=>{},["stop"]))})]),_:2},1024)],64)):(e.openBlock(),e.createBlock(C,{key:1,theme:"primary",size:"small",text:""},{default:e.withCtx(()=>[...k[12]||(k[12]=[e.createTextVNode("查看",-1)])]),_:1}))])]),_:1})]),_:1},8,["data"])])])}}}),Fc=oe(zc,[["__scopeId","data-v-49065388"]]),Ic=e.defineComponent({__name:"input",props:{modelValue:{type:[String,Number,Boolean],default:""},variable:{},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(o.modelValue),s=e.computed(()=>o.variable.custom_type==="int"?"number":o.variable.custom_type==="textarea"?"textarea":"text");e.watch(()=>o.modelValue,l=>{r.value=l});const i=()=>{a("update:modelValue",r.value),a("change",r.value)};return(l,c)=>{const d=e.resolveComponent("bk-input");return e.openBlock(),e.createBlock(d,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=u=>r.value=u),type:s.value,rows:5,min:0,precision:0,disabled:o.disabled,onBlur:i},null,8,["modelValue","type","disabled"])}}});function An(){if(typeof self>"u")return;const t=self;t.MonacoEnvironment||(t.MonacoEnvironment={getWorker(n,o){const r={json:"monaco-editor/esm/vs/language/json/json.worker.js",css:"monaco-editor/esm/vs/language/css/css.worker.js",scss:"monaco-editor/esm/vs/language/css/css.worker.js",less:"monaco-editor/esm/vs/language/css/css.worker.js",html:"monaco-editor/esm/vs/language/html/html.worker.js",handlebars:"monaco-editor/esm/vs/language/html/html.worker.js",razor:"monaco-editor/esm/vs/language/html/html.worker.js",typescript:"monaco-editor/esm/vs/language/typescript/ts.worker.js",javascript:"monaco-editor/esm/vs/language/typescript/ts.worker.js"}[o]||"monaco-editor/esm/vs/editor/editor.worker.js";return new Worker(r,{type:"module"})}})}An();const Uc={class:"code-editor"},jc=e.defineComponent({__name:"code",props:{modelValue:{default:""},language:{default:"json"},theme:{default:"vs-dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","blur","save"],setup(t,{emit:n}){An();const o={language:"json",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},wordWrap:"on",wrappingIndent:"same"},a=t,r=n,s=e.ref(),i=e.shallowRef();e.watch(()=>a.modelValue,d=>{const u=i.value?.getValue();d!==u&&i.value?.setValue(d)}),e.watch(()=>a.disabled,d=>{i.value&&i.value.updateOptions({...o,readOnly:d})}),e.onMounted(()=>{l()}),e.onBeforeUnmount(()=>{i.value&&i.value.dispose()});const l=()=>{i.value=Lt.editor.create(s.value,{...o,readOnly:a.disabled,value:a.modelValue,language:a.language});const d=i.value.getModel();d&&(d.setEOL(0),d.onDidChangeContent(()=>{const u=i.value?.getValue();c(u)})),i.value.onDidBlurEditorText(()=>{r("blur")})},c=d=>{r("update:modelValue",d),r("change",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("div",Uc,[e.createElementVNode("div",{ref_key:"monacoContainerRef",ref:s,class:"editor-instance-container"},null,512)]))}}),Gc=oe(jc,[["__scopeId","data-v-47cfd638"]]),qc={class:"bkflow-plugin-form-render-form"},Hc={class:"render-form-item-label"},Wc={class:"render-form-item-content"},Jc=e.defineComponent({__name:"index",props:{variables:{},editable:{type:Boolean,default:!0}},emits:["change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref({});e.watch(()=>o.variables,c=>{r.value=c.reduce((d,u)=>(d[u.key]=u.value===void 0?"":u.value,d),{})},{immediate:!0});const s=(c,d)=>{r.value[c]=d,a("change",r.value)},i=c=>["textarea","input","int"].includes(c.custom_type)?Ic:["json_variable"].includes(c.custom_type)?Gc:null,l=c=>{const d={textarea:"文本",input:"输入框",int:"整数",json_variable:"JSON 变量"};return c.name||d[c.custom_type]};return(c,d)=>(e.openBlock(),e.createElementBlock("div",qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.variables,u=>(e.openBlock(),e.createElementBlock("div",{key:u.key,class:"render-form-item"},[e.createElementVNode("div",Hc,e.toDisplayString(l(u)),1),e.createElementVNode("div",Wc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(u)),{"model-value":r.value[u.key],variable:u,disabled:!o.editable,onChange:v=>s(u.key,v)},null,40,["model-value","variable","disabled","onChange"]))])]))),128))]))}}),Qa=oe(Jc,[["__scopeId","data-v-5e149c0f"]]),Yc={class:"bkflow-variable-edit"},Zc={class:"basic-info-section"},Kc=e.defineComponent({__name:"global-variable-edit",props:{variable:{},editable:{type:Boolean,default:!0},variablesReference:{default:()=>({defined:{},nodefined:{}})},customVariableTypes:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(ve.cloneDeep(a.variable)),i=e.ref(a.variable.key),l=e.ref(),c={name:[{required:!0,message:"请输入变量名称"}],key:[{validator:b=>b.trim().length>0,message:"KEY不能为空",trigger:"blur"},{validator:b=>/(^\${(?!_env_|_system\.)[a-zA-Z_]\w*}$)|(^(?!_env_|_system\.)[a-zA-Z_]\w*$)/.test(b),message:"变量KEY由英文字母、数字、下划线组成,不允许使用系统变量及业务环境变量命名规则,且不能以数字开头",trigger:"blur"}],validation:[{required:!0,message:"请输入正则校验"}]},d=e.computed(()=>a.variable.source_type!=="custom"?[{value:"component_inputs",label:"组件"},{value:"component_outputs",label:"组件"}]:a.customVariableTypes.filter(b=>["textarea","input","int","json_variable"].includes(b.code)).map(b=>({value:b.code,label:b.name}))),u=e.computed(()=>({...s.value,key:i.value})),v=e.computed(()=>{if(a.variable.key.length>0&&a.variablesReference?.defined&&a.variablesReference.defined[a.variable.key]){const{activities:b,conditions:y,constants:_}=a.variablesReference.defined[a.variable.key];return b.length+y.length+_.length>0}return!1}),w=()=>{s.value.key=i.value,f()},h=b=>{s.value.custom_type=b,["textarea","input"].includes(b)?s.value.validation="^.+$":s.value.validation="",s.value.source_tag=`${b}.${b}`,f()},m=b=>{s.value.value=b[s.value.key],r("change",ve.cloneDeep(s.value))},g=()=>l.value.validate().then(()=>!0).catch(()=>!1),f=()=>{r("change",ve.cloneDeep(s.value))};return n({validate:g}),(b,y)=>{const _=e.resolveComponent("bk-input"),p=e.resolveComponent("bk-form-item"),k=e.resolveComponent("bk-select"),C=e.resolveComponent("bk-option"),E=e.resolveComponent("bk-form"),I=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",Yc,[e.createElementVNode("div",Zc,[y[5]||(y[5]=e.createElementVNode("h4",{class:"variable-edit-section-title"},"基础信息",-1)),e.createVNode(E,{ref_key:"basicInfoFormRef",ref:l,"label-width":130,model:u.value,rules:c},{default:e.withCtx(()=>[e.createVNode(p,{label:"名称",required:"",property:"name"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:s.value.name,"onUpdate:modelValue":y[0]||(y[0]=z=>s.value.name=z),disabled:!a.editable,onChange:f},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(p,{label:"KEY",required:"",property:"key"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":y[1]||(y[1]=z=>i.value=z),disabled:!a.editable||v.value,onBlur:w},null,8,["modelValue","disabled"]),[[I,{content:"变量已被引用,KEY不可修改",disabled:a.editable&&!v.value}]])]),_:1}),e.createVNode(p,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(k,{"model-value":s.value.source_type==="custom"?s.value.custom_type:s.value.source_type,clearable:!1,list:d.value,disabled:!a.editable||s.value.source_type==="component_outputs",onChange:h},null,8,["model-value","list","disabled"])]),_:1}),s.value.custom_type==="input"?(e.openBlock(),e.createBlock(p,{key:0,label:"正则校验",property:"validation"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:s.value.validation,"onUpdate:modelValue":y[2]||(y[2]=z=>s.value.validation=z),disabled:!a.editable,onChange:f},null,8,["modelValue","disabled"])]),_:1})):e.createCommentVNode("",!0),s.value.source_type!=="system"?(e.openBlock(),e.createBlock(p,{key:1,label:"执行时显示",description:"配置为「显示」可在执行时做为任务入参使用,配置为「隐藏」则仅能在流程内部使用"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:s.value.show_type,"onUpdate:modelValue":y[3]||(y[3]=z=>s.value.show_type=z),disabled:!a.editable||s.value.source_type==="component_outputs",clearable:!1,onChange:f},{default:e.withCtx(()=>[e.createVNode(C,{id:"show",name:"显示(入参)"}),e.createVNode(C,{id:"hide",name:"隐藏(非入参)"})]),_:1},8,["modelValue","disabled"])]),_:1})):e.createCommentVNode("",!0),s.value.source_type!=="system"?(e.openBlock(),e.createBlock(p,{key:2,label:"说明"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:s.value.desc,"onUpdate:modelValue":y[4]||(y[4]=z=>s.value.desc=z),type:"textarea",rows:4,resize:!1,disabled:!a.editable,onChange:f},null,8,["modelValue","disabled"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])]),["components_input","custom"].includes(s.value.source_type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y[6]||(y[6]=e.createElementVNode("h4",{class:"variable-edit-section-title"},"默认值",-1)),e.createVNode(Qa,{variables:[s.value],editable:a.editable,onChange:m},null,8,["variables","editable"])],64)):e.createCommentVNode("",!0)])}}}),Qc=oe(Kc,[["__scopeId","data-v-46dd3716"]]),Xc={class:"slider-title"},ed={key:0},td={class:"sub-title-text"},nd={class:"global-variable-slider"},od={class:"sideslider-footer-buttons"},ad=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1},flowData:{},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0},apiConfig:{}},emits:["close","update:show","outputChange","change"],setup(t,{emit:n}){const o={create:"新建",edit:"编辑",clone:"克隆",view:"查看"},a=t,r=n,s=e.shallowRef({defined:{},nodefined:{}}),i=e.shallowRef(!1),l=e.shallowRef({type:"create",data:Zn(),oldKey:""}),c=e.ref([]),d=e.ref(),u=e.computed(()=>Object.keys(a.flowData.pipeline_tree.constants).length);e.watch(()=>a.show,C=>{C&&(w(),v())});const v=async()=>{if(a.apiConfig?.fetchCustomVariableTypes){const C=await a.apiConfig.fetchCustomVariableTypes();c.value=C.data}},w=async()=>{if(a.apiConfig?.fetchVariableRef){const{activities:C,constants:E,gateways:I}=a.flowData.pipeline_tree,z=await a.apiConfig.fetchVariableRef({template_id:a.flowData.id,activities:C,constants:E,gateways:I});s.value=z.data}},h=()=>{const C=Zn();C.index=u.value,l.value={type:"create",data:C},i.value=!0},m=C=>{l.value={type:!a.editable||C.source_type==="system"?"view":"edit",data:ve.cloneDeep(C),oldKey:C.key},i.value=!0},g=C=>{const E=ve.cloneDeep(C);E.key="",l.value={type:"clone",data:E},i.value=!0},f=C=>{l.value={...l.value,data:C}},b=async()=>{if(await d.value?.validate()){const E={...a.flowData.pipeline_tree.constants};let I=l.value.data.key.trim();/^\$\{\w+\}$/.test(I)||(I=`\${${I}}`,l.value.data.key=I),E[I]=l.value.data,l.value.type==="edit"&&l.value.oldKey!==l.value.data.key&&delete E[l.value.oldKey],i.value=!1,p(E)}},y=(C,E)=>{r("outputChange",C,E)},_=()=>{},p=C=>{r("change",C)},k=()=>{r("close"),r("update:show",!1),i.value=!1};return(C,E)=>{const I=e.resolveComponent("bk-button"),z=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(z,{title:"全局变量","is-show":a.show,width:800,"esc-close":!1,"before-close":k},e.createSlots({header:e.withCtx(()=>[e.createElementVNode("div",Xc,[e.createElementVNode("span",{class:e.normalizeClass([i.value?"main-title-text":""]),onClick:E[0]||(E[0]=V=>i.value=!1)},"全局变量",2),i.value?(e.openBlock(),e.createElementBlock("span",ed,[E[3]||(E[3]=e.createElementVNode("span",null,">",-1)),e.createElementVNode("span",td,e.toDisplayString(o[l.value.type]),1)])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",nd,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fc,{key:0,constants:a.flowData.pipeline_tree.constants,"system-variables":a.systemVariables,outputs:a.flowData.pipeline_tree.outputs,"variables-reference":s.value,"custom-variable-types":c.value,editable:a.editable,onCreate:h,onEdit:m,onClone:g,onDelete:_,onUpdateConstants:p,onOutputChange:y},null,8,["constants","system-variables","outputs","variables-reference","custom-variable-types","editable"])),i.value?(e.openBlock(),e.createBlock(Qc,{key:1,ref_key:"variableEditRef",ref:d,editable:a.editable&&l.value.type!=="view",variable:l.value.data,"variables-reference":s.value,"custom-variable-types":c.value,onChange:f},null,8,["editable","variable","variables-reference","custom-variable-types"])):e.createCommentVNode("",!0)])]),_:2},[i.value?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",od,[a.editable&&l.value.type!=="view"&&l.value.data.source_type!=="system"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(I,{theme:"primary",onClick:b},{default:e.withCtx(()=>[...E[4]||(E[4]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(I,{onClick:E[1]||(E[1]=V=>i.value=!1)},{default:e.withCtx(()=>[...E[5]||(E[5]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(I,{key:1,theme:"primary",onClick:E[2]||(E[2]=V=>i.value=!1)},{default:e.withCtx(()=>[...E[6]||(E[6]=[e.createTextVNode("返回",-1)])]),_:1}))])]),key:"0"}:void 0]),1032,["is-show"])}}}),rd=oe(ad,[["__scopeId","data-v-89db2471"]]),id={key:0,class:"desc"},sd={class:"section-content"},ld=e.defineComponent({__name:"index",props:{title:{},desc:{}},setup(t){const n=t,o=e.ref(!1),a=()=>{o.value=!o.value},r=c=>{const d=c;d.style.height="0",d.offsetHeight,d.style.height=`${c.scrollHeight}px`},s=c=>{const d=c;d.style.height=""},i=c=>{const d=c;d.style.height=`${d.scrollHeight}px`,d.offsetHeight,d.style.height="0"},l=c=>{const d=c;d.style.height=""};return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["section-container",{fold:o.value}])},[e.createElementVNode("div",{class:"section-title",onClick:a},[e.createVNode(e.unref(Oe.AngleUpFill),{class:"arrow-icon"}),e.createTextVNode(" "+e.toDisplayString(n.title)+" ",1),n.desc?(e.openBlock(),e.createElementBlock("span",id,e.toDisplayString(n.desc),1)):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"fold",css:!0,onEnter:r,onAfterEnter:s,onLeave:i,onAfterLeave:l},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",sd,[e.renderSlot(c.$slots,"default",{},void 0,!0)],512),[[e.vShow,!o.value]])]),_:3})],2))}}),xt=oe(ld,[["__scopeId","data-v-c8f4294f"]]),cd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAG%20yUlEQVRo3u2Zf2yVVxnHP897bymMArdjFV00zgGbLmFuiRkIjs0y3R9uWcyIzDmTVcqaOLUm8mMb%20WdAExF/ZIALK1oFCoSyLxmVGwqIIGkZNlmFrBTp+DDfnipEVNgrt7X2fr3+8t7e3t/f29uemSb/J%20Se59z/M+53zPec7z47wwjnGM4/8aNtwXa06tHrB/68x1/3sEciZtQAKYmvXMgXeAC+8VmaIEHjrx%20WPRDYDGbCHwSuBmYCXwY+GCWrm7gLHAGOAkcAVoUKuwZ6anZ33/vCCx79VEkEcSCacDngCXATcBH%20gNIiui8CbwAvA78EGj30DjPj6evWjz2BZa2PQowAZ76ZfQe4Aygb5jjngH2SthBwmBB/+vrRIZGX%20QPWxR7DArgDuB1ZizB6V0cQJ4EfAbrku1X3iB6NPoProKghsokENsAYoH5XJ96Id+J5gK67Ouht+%20OCJl8X6MjLjEg4LvEnmZ3MHPAFOAjwGxAnpD4DXgXeCanEUoJ9KdNKOO6OAPG0H2n6rmlbjzGbmW%20IyWQyGptSGuQFiN9FWkvkufIkH62Ny2zOP1OW45MQq5vuzO3qnnliHagD4Eg4EqkpUgz5SKn/Umu%20HcBpoFGurXJ15JHrkOvnQCNwWq6dcv05Vw5pFlJ1EHDlqBCoalqBxE0Sd/dfVJBISYRhtxN251v4%20TJNEchBygcQXJG6oaloxbALZZ6BErs9iNi2vpFQJVAEvAFfJVQNMxixXrgz4JpH9vynXPcCtkb9Q%20rtbpwC2e8sM1p1aHPQ+HErkzo1c1rZgG/BqoHEC+nehwlhFF4mKH+HxarhxIEqUYbRivGtaGcQ6j%20JV4aP2iBdWIk6aKTkjSRWcWJ9BL46/IKoJne1GC00A0cscAag5LY60E8KDOzG4GrMSqAacDbRFG7%20FXEYaDKzVndPwsDpR4bAg0eWfwBoASpGPGWlTcWsCeM38YnxVBAL5gC3m1kFBQKoEIgQOAH8FngO%20eEWuFEC+6J05A3KJKJscDYTA3ljcdsYmxhcBX5RUEXFTsXdjwMfT7W7gZxjbPfR38gn3ulEplcdf%20D6c5UkOsNPZMrDT+MKIaUYFgGO16xFrEOjObUX3skcIEJLokmuUa/txdyDkUlMQaglhQK2mhpCBP%20rBh8k8rkqkGsAsqWtqzKb0JInRIHgfuRCnmXYjhrAZuCeHCXXAtz+oTRbNgeYIpQFeJDWf0dGA2G%20HRW6A3EnvV6uBKgGjprZNrJMPTsSO9J+pMYRmM/z8dJ4iFiCCHLMoQNnbZgKf+yhr8XZntP/Is7j%20YTLciLMGcSKnfwriIUmzv9bcG/gyBHbc8iQSZyTqJS6kzWHwTZyT+CPGnXIl+puDu9zPmwiRknJ/%20N6e/Q+6XzHC5X5R7d44pIfeb5X5b9rxzs1EhNSBuBJaB+mWrBSFOx0pjb8n1qZyd7cFkoggNIgHc%20lxOZeyL9y4jFwLV9+pWZ7+eB3UQVX18C9Z/ewAMv1V4QWgfMAO6hcLTtZ/9BPDCkQvVDDLgLuD1N%20MLe6uxpYD3SlyZYU0DOHqJy92MeEMiTmb8SwNxHLEfWIDknF3J3k+lf6KFiRBG6qRFmB/kkSCYmS%20AXSUS72Lmm+rqV+wEeA1Scvl2obTXczdITrTv21EbrN483TQzdhUfpOWkPgPUgfFr18MmIWUZIQV%201iBwMnuMoJDU7lt/ikJdJWeBnLgcEMcRmxB1iD8gTiHOpz3RhFRn+G+J18d0B8Q+iY6iO7Dk918H%20aR5wLfAPsJ2CX0n8HSgxYzpRPj8ZmAS8nUqm/hmU2CHEQgZ/+AcP4w2kFy0IMjswkJuMIaYTuazt%204CexoDtdv3QDl4hS4F79ZuDUA18Crhvl6XcitgCv7Jj7RObhQARM0vPALgssBQYSeyo3DzjKAy/V%20ngKeAH6C0q5y2FfI9Ph/x3gB+IUF1ueMDUQgRVRRFZ107nsSu5CuAb4FXNG/khwyhX1gj5vRtnPe%20hr6rPCLVBfCVQ7XgKhOsIrogG26R1An8DnjMYkHrrvkb+gkEQ9U4GOxasBGMi0jrkWqRDiB1DdXj%20IL2F9KQZrXj+Wmv0PUUaf9v2F+ZUze1OJGi5fJkDwHGkONGtXg96ripC4DLpm4z0wk5COGK/p/xY%20w22b8o4zJiaUjS8fjPI3urqMCRPKkGYouqL/aLpBdNtxnCjfPytpAbAUmAfUIVbvqdycN0COOYEM%20kQPf6B3UDDOjtDT6xJBMJnH3TL1sZnjoCeBeoFzSM88u2tL+vhIYKu7b/zDt7e0kEompwOVnF23J%20uwNjcohHA3sqN5NIJCD65jbW+dU4xjGO9wv/BfVAV6WfUfulAAAAJXRFWHRkYXRlOmNyZWF0ZQAy%20MDI0LTEwLTE2VDA5OjM5OjAzKzAyOjAwmO75JgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0xMC0x%20NlQwOTozOTowMyswMjowMOmzQZoAAAAASUVORK5CYII='%20/%3e%3c/svg%3e",dd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAG%20XklEQVRo3u3Za4xVVxUH8N+ducPADMggUCullJaSipRaAV/F1GKoreKHprZa0ajRItH6ikkj1pQq%20qRofMbY+GiB9aB8qGGqJr7a0aInNqGDBkaZpSbEPaGGGDjq8Zi53jh/WmblnLsPceZImspKdOXfv%20c/Ze/7X22mv993BKTsn/t+SGPMPK1srvrJjwKgNwvNI55FFd1l9AcSTBDAxAT8VPw1mYkrbXpS0r%20z6ftWbyI3egcTiCVAfRUuhpvw7sxH29Jla8kLdiOv+IP+Dvau0eHAKa/APK4AJ/C5Tj7BN8maavq%20Y8Zd2Ijb0IRjQwHRN4BQfiKWYpnYMtlvDuFl7MN+sU06MAZT0SC22lTUlgHdhR/jbrQML4DStnkD%20voIlGJVZfDc24c/YgZ0pgKRspomYiQtxMRZhcmb8INbiRuwZjCfyfYydh+/hfUpb4r/4BX6GJ/Gf%20Hl+UL76ydX8KrBG/wjxci8UYm7aPi9i6oRvEkDwQ1j8Dq/DejPL/xDfxWxw+odInkpJXG3AVlmNG%202lfEPbgezQPxQs9gi0XG4gt4TzqeYDOuE+4+3K34QNxdevcA7sBnsCXtq8Y1whs1g/fAytYcrsRP%20RfARx9+12DJsSajkjUvxExEn8G98GI39Xav8uJuCT2eU34ebMpYaHikp9wi+ji5E04Wn6/o7VQlA%20WGUuLkp7EqzDo2WLDieITtyP9ZmRi/HWftVYenqgFpeIGCBKgF+ibcSKsZj3CO5Fc9o7BW/XzzIn%20C2AM3pk+J+LUGb5937dsx2Ppcx7n4zUDBdCAc9LnAh7H0RFXPQzUiqcyvacPBsAUpcTWgadOkvUJ%20j78gDEdUteMGCqBGad8V8crJ0t6KCST5vZL8Y5LqRqV6qqKcqJSoFltqxGXOxvjbsueGnaPrmlYV%20i+OP7tn1nepjHafvHiiA51PkhDdmWNk6onQwI3MnTfnRNzAbHQ2TH7gzn7fxH/34MLuFWsU+JI7U%20uY6niCMho0Wmf7/gGeclnZYXOszp8k5/ARzF37JWwaz+JpTBSjG8Pb2su0GUF1WVvs++0I4/isQC%2054q6KD9SIJItLB6lvS7X65F9GcZU8kIWQCI466b09yhRHV5kmCXZEg3jvlvnE78epwZfFmXLi+lr%20i7Gw0lzl1Sh8FLeiK3ofEqXvsxh0UCc9y8Ec5uCT+BhWzzlgeS4Y3JtFPHxIHCzLmhpbtuksC8dU%20j6peOh/AfbrIdpS8K3GmoV+ETRPl8i3pGtcJgn/LvxYh2NtGQXaWoTpJRr3LkfoZqWHn68mtew2S%20Nnw7tXyXta7BGpw9mHhIrT9XVLdrUsVnCwr5A7wETYuiiXjYkMu59OknGveoPbpBMMTf40sypKcv%20Uj8vtdSCzMhnsVr5bVtPDx5/c3ewQfLB3G2Ca2SNdju+iEO5+T0/mf1QnR2P75+sqn01yRWZoecw%2034oJLfRN6remk9+NWWlfg6jhq1GfGuBYarFiL94ZhTFVY1sLojjLKn9ITmOyy6Gqq45ffEfjbqqO%20ziwzIJE3ug3fO4AVE7qs2CTufWaJLL1NnNlXiGOuNh3fLpLg3nSGKlFRvhELOlWtV+MeBQvxepDY%20muz1p+KDFJZSs+Y4LfIi/iaV9W9WOuorXmxNFYxpvuCrawXZWGBgWfqRc+ue+9wzCy+cJ3GJKm3J%20TtuLD5slyvbfSbdlvkhu+gEk5wumNlPEyrbUoPeiqWu75issPEGJn04WtxWj098H00VHi6Dq7UAo%20igR5wc7D05fk1iY3J1fn7jdNR/H7TlNvCT4i7qDuQ3NbvQ7V4ycpHvia4Oa34+d4RnD0HvFXCcBE%20JYpZn/5twV/SSVvwJkGEztGTjDeLgHsaT5C8oF0BHZox2ktYIa5Ybhbn/qP1R2y9uu2utnV1V9bS%20+VXcld0y5XmoEoAWUeRNSy3+cGqpjeJ+hxIVrCyvPaDrtCks7c78d+Bb4tSb15nTvuqVz687o/jy%20TT8cf/2TOtuKvSneJZVioEZkxQ/gwbTt62vCgUphqempEc7MdB/OJy7PnVXY7Ma+77kqeaCA36SK%20D/w6sX+yX/DhLID8sZx8JeWpVK6GoonBXif2T45gg9iiXbJJ3HhXlEoeOBmM7JhIls14h7jxXq9U%20lfYpQ/8v5TBIYWn3Y63I9AV6TW6vTgBlIPRX+VNySk4J/wPavNXBV0/3hwAAACV0RVh0ZGF0ZTpj%20cmVhdGUAMjAyNC0xMC0xNlQwNzozODowMyswMDowMCfDViMAAAAldEVYdGRhdGU6bW9kaWZ5ADIw%20MjQtMTAtMTZUMDc6Mzg6MDMrMDA6MDBWnu6fAAAAAElFTkSuQmCC'%20/%3e%3c/svg%3e",ud="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABdFBMVEUAAAD80if2uSH1uCDO%20GQD//2L1tiD2uyH0sh/4wCPxpRz3wCL//3r1tSD3viLwohv80if80if80if80if80if80if80if8%200if80if80if80if80if80if80if//zj80if80if80ifwohvwoRv80if80ifwohvwohvwohv80if8%200if80ifwohvwohvwohvwohvwoBv80if80if80ifwohvwohvwohvwohv+2Cn80if80if80ifwohvw%20ohvwohvwoRv80if80if80ifwohvwohv91Sj80if80if80ifwohvwohvvnxr80if80if80ifwohvw%20ohvwohv91Sj80if80ifwohvwohvwohvqixX80if80if80ifwohvwohvwohv80yf80if80ifwohvw%20ohvwohvslBf//zr80if80ifwohvwohvwoRv80ifwohvwohvwohvwohvwohvwohvwohvwohvwohvw%20ohvwohvwohv80ifwohv///9tjhRAAAAAeXRSTlMAAAAAAAAAAAAAAAAAAAAABBIWT9bpTWzzZBRj%202P4BM6j1IBNw23CkKD6z+YH+0F8OF3zhf++XJANJvPv9xVMHH4btjiIGTMP8vkwGKJDu5YMbC17U%20+rtBAiue8N94GAxp1/eyNwIBOKfbbBQL9ag01GP2gNbpBBIWNnChdAAAAAFiS0dEe0/StfwAAAAH%20dElNRQfoChAHJgNz8rhqAAABhElEQVRIx+3R6TNCURzG8UTaEdlKlvZQKu0iQnRbRCXtaFW0W/r9%209ZbhSF05Xpjxou/Lc57PnLlzKZRBf9UQZghM8CYx4k2gB6b40xjxZxCYnWtjNDePgEC4IPppLloQ%208hCgLi4tr/TfrywvLQ6jjxZLqAKprN9eJhVQJWIE5ArlCE21uvbdfG1VRRtRKuQIrKs1G9pRnX6T%20fL+p141qNzTqdQQMAEaTmW6x2rZ651s2q4VuNhkBDJ0A7Ns7DsbunrN779zbZTh2tu3QDV4e2T9g%20HrqOjjvnx0euQ+bBvvFt0A3A7iY8LK/P/7n3+7wsD+G2AzkAOAmcss+Cofe/KAoFz9ingZOPWxIA%204fPIBScai7/u47Eo5yJyHoZ+ACCRTNHTl1ft9tVlmp5KJjquyAFcZ7K5fKFYLORz2cw1/AwAbkpl%207u0tt1y6+Xr+LYC7SnVsrFq5A1wAUKvXaz2H/QA0GvA7QNYA/DfQxANNBIjWPUYtAoGHxyeMHh8Q%20GMeMMuivegZPNwJ6UuK61QAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNC0xMC0xNlQwNzozODowMysw%20MDowMCfDViMAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjQtMTAtMTZUMDc6Mzg6MDMrMDA6MDBWnu6f%20AAAAAElFTkSuQmCC'%20/%3e%3c/svg%3e",pd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABF1BMVEUAAAAhqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvf////t18AcAAAAW3RSTlMAAA84XHh/%20CjSAwNzxCEKl6vsjiOYCQANM19giwQv5jA3n6UMJDOs5+obDEs+dn948hf7Gee9aFdn2m5L9Ne7l%20MxShFuI/Ab0d1boyHKDkkwYvfLz4tXUuMFNoR3rSMgAAAAFiS0dEXOrYAJcAAAAHdElNRQfoChAL%20JgN66EEOAAABqklEQVRIx9WVaVuCQBCAXbxYFBXxQoWKjLQ0UyvTssvu+7BS5///j7JHEFhksU/1%20fmTm3WVhdsbn+wcgC16yGX8gGPomGPAzNAehMIu5SBR+iEY4zIbdDMTH4gkBTAiJeIxHc5dPiikg%20SIlJ501QOsMJ4IDAZdIOBsrmJJiDlMsicv35+ROD2ANl8uBCPmMTUKEIrhQLFgPJouIuKEvLZgPF%20VoCCumoWSnFaPkB8zbQBm6AL2vpsC4TLdEGozASGo+cDbGwagj8yfVatbRHUqtNgfdsQAtN6hkZJ%20Jig1psFowBCCTS9CM2gIGLy8EmBDCHk5M0Dl9wL2JmDy0FBucUULXMv4p80d8rOClmRsJDU9trtH%20/jhQ28hGW9Vj+6xDaXS6Bza6HT3GMU7F1zy0YRxPwKZq7R3Rv9HxiekGnap04axkunF9unB+cbmQ%20oIgyWki4ura0Gaog+a2NjCYQrZIi3BDN2FVQbu+IVtx36Ut1fE8OFPlB1TmytCjl8an37DRN5L7O%20y+ubpA0myQNNev/45B3nlaWg+eFoPBm749GQ9zKqfYvM9T/BF26JhjZ0x+78AAAAJXRFWHRkYXRl%20OmNyZWF0ZQAyMDI0LTEwLTE2VDA5OjM4OjAzKzAyOjAwdyySGAAAACV0RVh0ZGF0ZTptb2RpZnkA%20MjAyNC0xMC0xNlQwOTozODowMyswMjowMAZxKqQAAAAASUVORK5CYII='%20/%3e%3c/svg%3e",fd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABzlBMVEUAAAAzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAP///8ahhZ5AAAA%20mHRSTlMAAA84XHh/DDmNwtzxCkOl6/0rkOgDSMYIYN4E59/+9Pcp82k9ZqHXDfyfe140heny0ps3%20QLLlr6z61uxnnvvOTAYBzDtUivDROjza+bh+EsRYg4TgfdMqKM+nJpww1NkuIsiAQeEvc+ZTAhOa%20tUmB9WPj7iBx+AWHTcuwGg5s9tBhMz6iGzViB1Lbox9Qs1umRM12kld67xKguDoAAAABYktHRJkB%201jaoAAAAB3RJTUUH6AoQCycDY/NwTwAAArVJREFUSMfVlflbEkEYxxkOWQ5hAbkRgUQgTQyxQswC%20aS0js7Iyiy5Syw4tyuzU7ssOO+fPbXd2dphdlpLf6n0enmfnZT7zvvPOd97RaP4DAzLbymytTm9o%20482g12n/xgBgZExmixUis1rMJsb4BwKAdpuddUDKHKzd1t4MAcDp6oAN1uFyqhPA7fE6oIo5vB63%20CgF8/gBsYgG/r4EAQX8INrWQP6gkgKdTNiXcZY1Qw06PAgBRr3zN2LbueE8iTMbeqIwASVdKDkS2%209/Y5d/RbpHHKlaQJYEs3Jj6wMzOYHZIWSttowGgXvbt278Glyg3nhdRHontHMWE3UgEYFvn27S8U%20s2Poky0d4BIQjrdFhzDAMvUQwIQCHzwkaG3isPBdPjLJMJkItI5k8T5SpjpwdArt85ggAVCMi/Uc%20TR+PnojA6cGTZZEwawkwgRI/dRotAWbO4CRGZ89moONc5bw4tOgIoEd6vnBRzO/SZalO5aouAROV%20Hqx2PQEM6IBiV1CEYHycVHZungsP9OEcwway56r494IbhbtaP4rcwrU87O3GF6oq7XqRw8d/XfDc%20oA/vZmkYcrcwsCQBYEl0LN8WPNk7FJBjc7CrhiXFLSpSglN3eaJwL9ZE5CQlvGkIVybvAw0wri6r%20zq9vGpeVt9CDIh/Q2K9KUGXVERU/nOdPGyRXhaxW5tgwDVAHpzWTsI8eC8STp4G19WfPX3A1CqCk%20gcUnmOPlK0FQ7tdvKkUA3r57T+bT4pPkjfwfNoQYqEfyv4/kGGl5kwuEiE/82uSfwqzkpy+Q4oqu%20f6431OAX7JRfUUUTqLlmpJw2p3FceRNQtpnU128bPp4Ibo7hyiraTGMjK1u+/2BKPyVdNTQytVYZ%20zv+SPlVaZcvNuPV23/qD0vqTpWn5UdS0/uxKzNYf9n/BfgOj3RPg/kA9xAAAACV0RVh0ZGF0ZTpj%20cmVhdGUAMjAyNC0xMC0xNlQwOTozOTowMyswMjowMJju+SYAAAAldEVYdGRhdGU6bW9kaWZ5ADIw%20MjQtMTAtMTZUMDk6Mzk6MDMrMDI6MDDps0GaAAAAAElFTkSuQmCC'%20/%3e%3c/svg%3e",en={},En={setInstance(t,n,o){en[t]||(en[t]={}),en[t][n]=o},getInstance(t,n){return en[t][n]}};let md=0;function Xa(t,n={},o={}){return new Promise((a,r)=>{const s=`USER_LIST_CALLBACK_${md+=1}`;window[s]=c=>{document.body.removeChild(i),delete window[s],a(c)};const i=document.createElement("script");i.onerror=c=>{document.body.removeChild(i),delete window[s],r("Get user list failed.")};const l=[];for(const c in n)l.push(`${c}=${n[c]}`);i.src=`${t}?${l.join("&")}&callback=${s}`,o.timeout&&setTimeout(()=>{document.body.removeChild(i),delete window[s],r("Get user list timeout.")},o.timeout),document.body.appendChild(i)})}const zn=new Map;function uo(t){if(zn.has(t))return zn.get(t);const n=new Map;return zn.set(t,n),n}function er(t,n){const o=uo(t);n.forEach(a=>o.set(a.username,a))}function Wo(t,n){const o=uo(t),a=[];return n.forEach(r=>{o.has(r)&&a.push(o.get(r))}),a}async function Jo(t,n,o){const a=uo(t),r=[...new Set(n)].filter(i=>!a.has(i));if(!r.length)return Promise.resolve(Wo(t,n));const s=[];r.reduce((i,l,c)=>i.length<100?(i.push(l),c===r.length-1&&s.push(i),i):(s.push(i),[]),[]);try{(await Promise.all(s.map(l=>Xa(t,{app_code:"bk-magicbox",exact_lookups:l.join(","),page_size:100,page:1},o)))).forEach(l=>{l.code===0&&er(t,l.data.results||[])})}catch(i){console.error(i)}return Promise.resolve(Wo(t,n))}function vd(t){const n={setup(){const{proxy:r}=e.getCurrentInstance();En.setInstance("exactSearch",t,r);const s=e.ref("");s.value=t;const i=e.ref([]);e.watch(()=>i,d=>{d.value.length&&c()},{deep:!0});const l=d=>new Promise(u=>{i.value.push({resolve:u,usernames:d})}),c=async()=>{const d=[...i.value];i.value=[];try{const u=d.reduce((h,{usernames:m})=>h.concat(m),[]),v=await Mt.exactSearch(s.value,u),w={};v.forEach(h=>{w[h.username]=h}),d.forEach(({resolve:h,usernames:m})=>{const g=[];m.forEach(f=>{w.hasOwnProperty(f)&&g.push(w[f])}),h(g)})}catch(u){d.forEach(({resolve:v})=>{v([])}),console.error(u)}};return{api:s,queue:i,search:l,dispatchSeach:c}},render(){return null}},o=e.createApp(n),a=document.createElement("div");return o.mount(a),o}const Mt={async fuzzySearch(t,n,o){const a={};try{const r=await Xa(t,n,o);if(r.code!==0)throw new Error(r);a.count=r.data.count,a.results=r.data.results||[],er(t,a.results)}catch(r){console.error(r.message),a.count=0,a.results=[]}return a},async exactSearch(t,n,o){const a=Array.isArray(n),s=await Jo(t,a?n:[n],o);return a?s:s[0]},pasteValidate(t,n,o){return Jo(t,n,o)},scheduleExactSearch(t,n){const o=Array.isArray(n)?n:[n];return vd(t),En.getInstance("exactSearch",t).search(o)}};var Me="top",Ie="bottom",Ue="right",Le="left",po="auto",Wt=[Me,Ie,Ue,Le],At="start",zt="end",hd="clippingParents",tr="viewport",St="popper",gd="reference",Yo=Wt.reduce(function(t,n){return t.concat([n+"-"+At,n+"-"+zt])},[]),nr=[].concat(Wt,[po]).reduce(function(t,n){return t.concat([n,n+"-"+At,n+"-"+zt])},[]),yd="beforeRead",wd="read",bd="afterRead",kd="beforeMain",Cd="main",_d="afterMain",xd="beforeWrite",Ad="write",Ed="afterWrite",Vd=[yd,wd,bd,kd,Cd,_d,xd,Ad,Ed];function Qe(t){return t?(t.nodeName||"").toLowerCase():null}function Re(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function ht(t){var n=Re(t).Element;return t instanceof n||t instanceof Element}function Fe(t){var n=Re(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function fo(t){if(typeof ShadowRoot>"u")return!1;var n=Re(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function Nd(t){var n=t.state;Object.keys(n.elements).forEach(function(o){var a=n.styles[o]||{},r=n.attributes[o]||{},s=n.elements[o];!Fe(s)||!Qe(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(i){var l=r[i];l===!1?s.removeAttribute(i):s.setAttribute(i,l===!0?"":l)}))})}function Bd(t){var n=t.state,o={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,o.popper),n.styles=o,n.elements.arrow&&Object.assign(n.elements.arrow.style,o.arrow),function(){Object.keys(n.elements).forEach(function(a){var r=n.elements[a],s=n.attributes[a]||{},i=Object.keys(n.styles.hasOwnProperty(a)?n.styles[a]:o[a]),l=i.reduce(function(c,d){return c[d]="",c},{});!Fe(r)||!Qe(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(c){r.removeAttribute(c)}))})}}const or={name:"applyStyles",enabled:!0,phase:"write",fn:Nd,effect:Bd,requires:["computeStyles"]};function Ke(t){return t.split("-")[0]}var mt=Math.max,hn=Math.min,Et=Math.round;function eo(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function ar(){return!/^((?!chrome|android).)*safari/i.test(eo())}function Vt(t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);var a=t.getBoundingClientRect(),r=1,s=1;n&&Fe(t)&&(r=t.offsetWidth>0&&Et(a.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Et(a.height)/t.offsetHeight||1);var i=ht(t)?Re(t):window,l=i.visualViewport,c=!ar()&&o,d=(a.left+(c&&l?l.offsetLeft:0))/r,u=(a.top+(c&&l?l.offsetTop:0))/s,v=a.width/r,w=a.height/s;return{width:v,height:w,top:u,right:d+v,bottom:u+w,left:d,x:d,y:u}}function mo(t){var n=Vt(t),o=t.offsetWidth,a=t.offsetHeight;return Math.abs(n.width-o)<=1&&(o=n.width),Math.abs(n.height-a)<=1&&(a=n.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:a}}function rr(t,n){var o=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(o&&fo(o)){var a=n;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function ot(t){return Re(t).getComputedStyle(t)}function Dd(t){return["table","td","th"].indexOf(Qe(t))>=0}function lt(t){return((ht(t)?t.ownerDocument:t.document)||window.document).documentElement}function Vn(t){return Qe(t)==="html"?t:t.assignedSlot||t.parentNode||(fo(t)?t.host:null)||lt(t)}function Zo(t){return!Fe(t)||ot(t).position==="fixed"?null:t.offsetParent}function Td(t){var n=/firefox/i.test(eo()),o=/Trident/i.test(eo());if(o&&Fe(t)){var a=ot(t);if(a.position==="fixed")return null}var r=Vn(t);for(fo(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Qe(r))<0;){var s=ot(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||n&&s.willChange==="filter"||n&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Jt(t){for(var n=Re(t),o=Zo(t);o&&Dd(o)&&ot(o).position==="static";)o=Zo(o);return o&&(Qe(o)==="html"||Qe(o)==="body"&&ot(o).position==="static")?n:o||Td(t)||n}function vo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Pt(t,n,o){return mt(t,hn(n,o))}function Sd(t,n,o){var a=Pt(t,n,o);return a>o?o:a}function ir(){return{top:0,right:0,bottom:0,left:0}}function sr(t){return Object.assign({},ir(),t)}function lr(t,n){return n.reduce(function(o,a){return o[a]=t,o},{})}var Md=function(n,o){return n=typeof n=="function"?n(Object.assign({},o.rects,{placement:o.placement})):n,sr(typeof n!="number"?n:lr(n,Wt))};function Ld(t){var n,o=t.state,a=t.name,r=t.options,s=o.elements.arrow,i=o.modifiersData.popperOffsets,l=Ke(o.placement),c=vo(l),d=[Le,Ue].indexOf(l)>=0,u=d?"height":"width";if(!(!s||!i)){var v=Md(r.padding,o),w=mo(s),h=c==="y"?Me:Le,m=c==="y"?Ie:Ue,g=o.rects.reference[u]+o.rects.reference[c]-i[c]-o.rects.popper[u],f=i[c]-o.rects.reference[c],b=Jt(s),y=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,_=g/2-f/2,p=v[h],k=y-w[u]-v[m],C=y/2-w[u]/2+_,E=Pt(p,C,k),I=c;o.modifiersData[a]=(n={},n[I]=E,n.centerOffset=E-C,n)}}function Pd(t){var n=t.state,o=t.options,a=o.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||rr(n.elements.popper,r)&&(n.elements.arrow=r))}const Od={name:"arrow",enabled:!0,phase:"main",fn:Ld,effect:Pd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nt(t){return t.split("-")[1]}var Rd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $d(t,n){var o=t.x,a=t.y,r=n.devicePixelRatio||1;return{x:Et(o*r)/r||0,y:Et(a*r)/r||0}}function Ko(t){var n,o=t.popper,a=t.popperRect,r=t.placement,s=t.variation,i=t.offsets,l=t.position,c=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,v=t.isFixed,w=i.x,h=w===void 0?0:w,m=i.y,g=m===void 0?0:m,f=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=f.x,g=f.y;var b=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),_=Le,p=Me,k=window;if(d){var C=Jt(o),E="clientHeight",I="clientWidth";if(C===Re(o)&&(C=lt(o),ot(C).position!=="static"&&l==="absolute"&&(E="scrollHeight",I="scrollWidth")),C=C,r===Me||(r===Le||r===Ue)&&s===zt){p=Ie;var z=v&&C===k&&k.visualViewport?k.visualViewport.height:C[E];g-=z-a.height,g*=c?1:-1}if(r===Le||(r===Me||r===Ie)&&s===zt){_=Ue;var V=v&&C===k&&k.visualViewport?k.visualViewport.width:C[I];h-=V-a.width,h*=c?1:-1}}var P=Object.assign({position:l},d&&Rd),X=u===!0?$d({x:h,y:g},Re(o)):{x:h,y:g};if(h=X.x,g=X.y,c){var ee;return Object.assign({},P,(ee={},ee[p]=y?"0":"",ee[_]=b?"0":"",ee.transform=(k.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",ee))}return Object.assign({},P,(n={},n[p]=y?g+"px":"",n[_]=b?h+"px":"",n.transform="",n))}function zd(t){var n=t.state,o=t.options,a=o.gpuAcceleration,r=a===void 0?!0:a,s=o.adaptive,i=s===void 0?!0:s,l=o.roundOffsets,c=l===void 0?!0:l,d={placement:Ke(n.placement),variation:Nt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,Ko(Object.assign({},d,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:c})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Ko(Object.assign({},d,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const Fd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zd,data:{}};var tn={passive:!0};function Id(t){var n=t.state,o=t.instance,a=t.options,r=a.scroll,s=r===void 0?!0:r,i=a.resize,l=i===void 0?!0:i,c=Re(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return s&&d.forEach(function(u){u.addEventListener("scroll",o.update,tn)}),l&&c.addEventListener("resize",o.update,tn),function(){s&&d.forEach(function(u){u.removeEventListener("scroll",o.update,tn)}),l&&c.removeEventListener("resize",o.update,tn)}}const Ud={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Id,data:{}};var jd={left:"right",right:"left",bottom:"top",top:"bottom"};function ln(t){return t.replace(/left|right|bottom|top/g,function(n){return jd[n]})}var Gd={start:"end",end:"start"};function Qo(t){return t.replace(/start|end/g,function(n){return Gd[n]})}function ho(t){var n=Re(t),o=n.pageXOffset,a=n.pageYOffset;return{scrollLeft:o,scrollTop:a}}function go(t){return Vt(lt(t)).left+ho(t).scrollLeft}function qd(t,n){var o=Re(t),a=lt(t),r=o.visualViewport,s=a.clientWidth,i=a.clientHeight,l=0,c=0;if(r){s=r.width,i=r.height;var d=ar();(d||!d&&n==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}return{width:s,height:i,x:l+go(t),y:c}}function Hd(t){var n,o=lt(t),a=ho(t),r=(n=t.ownerDocument)==null?void 0:n.body,s=mt(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=mt(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-a.scrollLeft+go(t),c=-a.scrollTop;return ot(r||o).direction==="rtl"&&(l+=mt(o.clientWidth,r?r.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function yo(t){var n=ot(t),o=n.overflow,a=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+a)}function cr(t){return["html","body","#document"].indexOf(Qe(t))>=0?t.ownerDocument.body:Fe(t)&&yo(t)?t:cr(Vn(t))}function Ot(t,n){var o;n===void 0&&(n=[]);var a=cr(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),s=Re(a),i=r?[s].concat(s.visualViewport||[],yo(a)?a:[]):a,l=n.concat(i);return r?l:l.concat(Ot(Vn(i)))}function to(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Wd(t,n){var o=Vt(t,!1,n==="fixed");return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}function Xo(t,n,o){return n===tr?to(qd(t,o)):ht(n)?Wd(n,o):to(Hd(lt(t)))}function Jd(t){var n=Ot(Vn(t)),o=["absolute","fixed"].indexOf(ot(t).position)>=0,a=o&&Fe(t)?Jt(t):t;return ht(a)?n.filter(function(r){return ht(r)&&rr(r,a)&&Qe(r)!=="body"}):[]}function Yd(t,n,o,a){var r=n==="clippingParents"?Jd(t):[].concat(n),s=[].concat(r,[o]),i=s[0],l=s.reduce(function(c,d){var u=Xo(t,d,a);return c.top=mt(u.top,c.top),c.right=hn(u.right,c.right),c.bottom=hn(u.bottom,c.bottom),c.left=mt(u.left,c.left),c},Xo(t,i,a));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function dr(t){var n=t.reference,o=t.element,a=t.placement,r=a?Ke(a):null,s=a?Nt(a):null,i=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2,c;switch(r){case Me:c={x:i,y:n.y-o.height};break;case Ie:c={x:i,y:n.y+n.height};break;case Ue:c={x:n.x+n.width,y:l};break;case Le:c={x:n.x-o.width,y:l};break;default:c={x:n.x,y:n.y}}var d=r?vo(r):null;if(d!=null){var u=d==="y"?"height":"width";switch(s){case At:c[d]=c[d]-(n[u]/2-o[u]/2);break;case zt:c[d]=c[d]+(n[u]/2-o[u]/2);break}}return c}function Ft(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=a===void 0?t.placement:a,s=o.strategy,i=s===void 0?t.strategy:s,l=o.boundary,c=l===void 0?hd:l,d=o.rootBoundary,u=d===void 0?tr:d,v=o.elementContext,w=v===void 0?St:v,h=o.altBoundary,m=h===void 0?!1:h,g=o.padding,f=g===void 0?0:g,b=sr(typeof f!="number"?f:lr(f,Wt)),y=w===St?gd:St,_=t.rects.popper,p=t.elements[m?y:w],k=Yd(ht(p)?p:p.contextElement||lt(t.elements.popper),c,u,i),C=Vt(t.elements.reference),E=dr({reference:C,element:_,placement:r}),I=to(Object.assign({},_,E)),z=w===St?I:C,V={top:k.top-z.top+b.top,bottom:z.bottom-k.bottom+b.bottom,left:k.left-z.left+b.left,right:z.right-k.right+b.right},P=t.modifiersData.offset;if(w===St&&P){var X=P[r];Object.keys(V).forEach(function(ee){var S=[Ue,Ie].indexOf(ee)>=0?1:-1,D=[Me,Ie].indexOf(ee)>=0?"y":"x";V[ee]+=X[D]*S})}return V}function Zd(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=o.boundary,s=o.rootBoundary,i=o.padding,l=o.flipVariations,c=o.allowedAutoPlacements,d=c===void 0?nr:c,u=Nt(a),v=u?l?Yo:Yo.filter(function(m){return Nt(m)===u}):Wt,w=v.filter(function(m){return d.indexOf(m)>=0});w.length===0&&(w=v);var h=w.reduce(function(m,g){return m[g]=Ft(t,{placement:g,boundary:r,rootBoundary:s,padding:i})[Ke(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}function Kd(t){if(Ke(t)===po)return[];var n=ln(t);return[Qo(t),n,Qo(n)]}function Qd(t){var n=t.state,o=t.options,a=t.name;if(!n.modifiersData[a]._skip){for(var r=o.mainAxis,s=r===void 0?!0:r,i=o.altAxis,l=i===void 0?!0:i,c=o.fallbackPlacements,d=o.padding,u=o.boundary,v=o.rootBoundary,w=o.altBoundary,h=o.flipVariations,m=h===void 0?!0:h,g=o.allowedAutoPlacements,f=n.options.placement,b=Ke(f),y=b===f,_=c||(y||!m?[ln(f)]:Kd(f)),p=[f].concat(_).reduce(function(q,J){return q.concat(Ke(J)===po?Zd(n,{placement:J,boundary:u,rootBoundary:v,padding:d,flipVariations:m,allowedAutoPlacements:g}):J)},[]),k=n.rects.reference,C=n.rects.popper,E=new Map,I=!0,z=p[0],V=0;V<p.length;V++){var P=p[V],X=Ke(P),ee=Nt(P)===At,S=[Me,Ie].indexOf(X)>=0,D=S?"width":"height",T=Ft(n,{placement:P,boundary:u,rootBoundary:v,altBoundary:w,padding:d}),N=S?ee?Ue:Le:ee?Ie:Me;k[D]>C[D]&&(N=ln(N));var O=ln(N),Z=[];if(s&&Z.push(T[X]<=0),l&&Z.push(T[N]<=0,T[O]<=0),Z.every(function(q){return q})){z=P,I=!1;break}E.set(P,Z)}if(I)for(var A=m?3:1,M=function(J){var x=p.find(function(U){var F=E.get(U);if(F)return F.slice(0,J).every(function(j){return j})});if(x)return z=x,"break"},R=A;R>0;R--){var W=M(R);if(W==="break")break}n.placement!==z&&(n.modifiersData[a]._skip=!0,n.placement=z,n.reset=!0)}}const Xd={name:"flip",enabled:!0,phase:"main",fn:Qd,requiresIfExists:["offset"],data:{_skip:!1}};function ea(t,n,o){return o===void 0&&(o={x:0,y:0}),{top:t.top-n.height-o.y,right:t.right-n.width+o.x,bottom:t.bottom-n.height+o.y,left:t.left-n.width-o.x}}function ta(t){return[Me,Ue,Ie,Le].some(function(n){return t[n]>=0})}function eu(t){var n=t.state,o=t.name,a=n.rects.reference,r=n.rects.popper,s=n.modifiersData.preventOverflow,i=Ft(n,{elementContext:"reference"}),l=Ft(n,{altBoundary:!0}),c=ea(i,a),d=ea(l,r,s),u=ta(c),v=ta(d);n.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:v},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":v})}const tu={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eu};function nu(t,n,o){var a=Ke(t),r=[Le,Me].indexOf(a)>=0?-1:1,s=typeof o=="function"?o(Object.assign({},n,{placement:t})):o,i=s[0],l=s[1];return i=i||0,l=(l||0)*r,[Le,Ue].indexOf(a)>=0?{x:l,y:i}:{x:i,y:l}}function ou(t){var n=t.state,o=t.options,a=t.name,r=o.offset,s=r===void 0?[0,0]:r,i=nr.reduce(function(u,v){return u[v]=nu(v,n.rects,s),u},{}),l=i[n.placement],c=l.x,d=l.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=c,n.modifiersData.popperOffsets.y+=d),n.modifiersData[a]=i}const au={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ou};function ru(t){var n=t.state,o=t.name;n.modifiersData[o]=dr({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})}const iu={name:"popperOffsets",enabled:!0,phase:"read",fn:ru,data:{}};function su(t){return t==="x"?"y":"x"}function lu(t){var n=t.state,o=t.options,a=t.name,r=o.mainAxis,s=r===void 0?!0:r,i=o.altAxis,l=i===void 0?!1:i,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,v=o.padding,w=o.tether,h=w===void 0?!0:w,m=o.tetherOffset,g=m===void 0?0:m,f=Ft(n,{boundary:c,rootBoundary:d,padding:v,altBoundary:u}),b=Ke(n.placement),y=Nt(n.placement),_=!y,p=vo(b),k=su(p),C=n.modifiersData.popperOffsets,E=n.rects.reference,I=n.rects.popper,z=typeof g=="function"?g(Object.assign({},n.rects,{placement:n.placement})):g,V=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),P=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,X={x:0,y:0};if(C){if(s){var ee,S=p==="y"?Me:Le,D=p==="y"?Ie:Ue,T=p==="y"?"height":"width",N=C[p],O=N+f[S],Z=N-f[D],A=h?-I[T]/2:0,M=y===At?E[T]:I[T],R=y===At?-I[T]:-E[T],W=n.elements.arrow,q=h&&W?mo(W):{width:0,height:0},J=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:ir(),x=J[S],U=J[D],F=Pt(0,E[T],q[T]),j=_?E[T]/2-A-F-x-V.mainAxis:M-F-x-V.mainAxis,Y=_?-E[T]/2+A+F+U+V.mainAxis:R+F+U+V.mainAxis,K=n.elements.arrow&&Jt(n.elements.arrow),H=K?p==="y"?K.clientTop||0:K.clientLeft||0:0,te=(ee=P?.[p])!=null?ee:0,ae=N+j-te-H,le=N+Y-te,ie=Pt(h?hn(O,ae):O,N,h?mt(Z,le):Z);C[p]=ie,X[p]=ie-N}if(l){var de,ge=p==="x"?Me:Le,Ce=p==="x"?Ie:Ue,fe=C[k],xe=k==="y"?"height":"width",Ne=fe+f[ge],_e=fe-f[Ce],je=[Me,Le].indexOf(b)!==-1,We=(de=P?.[k])!=null?de:0,ct=je?Ne:fe-E[xe]-I[xe]-We+V.altAxis,Je=je?fe+E[xe]+I[xe]-We-V.altAxis:_e,dt=h&&je?Sd(ct,fe,Je):Pt(h?ct:Ne,fe,h?Je:_e);C[k]=dt,X[k]=dt-fe}n.modifiersData[a]=X}}const cu={name:"preventOverflow",enabled:!0,phase:"main",fn:lu,requiresIfExists:["offset"]};function du(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function uu(t){return t===Re(t)||!Fe(t)?ho(t):du(t)}function pu(t){var n=t.getBoundingClientRect(),o=Et(n.width)/t.offsetWidth||1,a=Et(n.height)/t.offsetHeight||1;return o!==1||a!==1}function fu(t,n,o){o===void 0&&(o=!1);var a=Fe(n),r=Fe(n)&&pu(n),s=lt(n),i=Vt(t,r,o),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!o)&&((Qe(n)!=="body"||yo(s))&&(l=uu(n)),Fe(n)?(c=Vt(n,!0),c.x+=n.clientLeft,c.y+=n.clientTop):s&&(c.x=go(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function mu(t){var n=new Map,o=new Set,a=[];t.forEach(function(s){n.set(s.name,s)});function r(s){o.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!o.has(l)){var c=n.get(l);c&&r(c)}}),a.push(s)}return t.forEach(function(s){o.has(s.name)||r(s)}),a}function vu(t){var n=mu(t);return Vd.reduce(function(o,a){return o.concat(n.filter(function(r){return r.phase===a}))},[])}function hu(t){var n;return function(){return n||(n=new Promise(function(o){Promise.resolve().then(function(){n=void 0,o(t())})})),n}}function gu(t){var n=t.reduce(function(o,a){var r=o[a.name];return o[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,o},{});return Object.keys(n).map(function(o){return n[o]})}var na={placement:"bottom",modifiers:[],strategy:"absolute"};function oa(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return!n.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function yu(t){t===void 0&&(t={});var n=t,o=n.defaultModifiers,a=o===void 0?[]:o,r=n.defaultOptions,s=r===void 0?na:r;return function(l,c,d){d===void 0&&(d=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},na,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},v=[],w=!1,h={state:u,setOptions:function(b){var y=typeof b=="function"?b(u.options):b;g(),u.options=Object.assign({},s,u.options,y),u.scrollParents={reference:ht(l)?Ot(l):l.contextElement?Ot(l.contextElement):[],popper:Ot(c)};var _=vu(gu([].concat(a,u.options.modifiers)));return u.orderedModifiers=_.filter(function(p){return p.enabled}),m(),h.update()},forceUpdate:function(){if(!w){var b=u.elements,y=b.reference,_=b.popper;if(oa(y,_)){u.rects={reference:fu(y,Jt(_),u.options.strategy==="fixed"),popper:mo(_)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(V){return u.modifiersData[V.name]=Object.assign({},V.data)});for(var p=0;p<u.orderedModifiers.length;p++){if(u.reset===!0){u.reset=!1,p=-1;continue}var k=u.orderedModifiers[p],C=k.fn,E=k.options,I=E===void 0?{}:E,z=k.name;typeof C=="function"&&(u=C({state:u,options:I,name:z,instance:h})||u)}}}},update:hu(function(){return new Promise(function(f){h.forceUpdate(),f(u)})}),destroy:function(){g(),w=!0}};if(!oa(l,c))return h;h.setOptions(d).then(function(f){!w&&d.onFirstUpdate&&d.onFirstUpdate(f)});function m(){u.orderedModifiers.forEach(function(f){var b=f.name,y=f.options,_=y===void 0?{}:y,p=f.effect;if(typeof p=="function"){var k=p({state:u,name:b,instance:h,options:_}),C=function(){};v.push(k||C)}})}function g(){v.forEach(function(f){return f()}),v=[]}return h}}var wu=[Ud,iu,Fd,or,au,Xd,cu,Od,tu],bu=yu({defaultModifiers:wu}),ku="tippy-box",ur="tippy-content",Cu="tippy-backdrop",pr="tippy-arrow",fr="tippy-svg-arrow",ut={passive:!0,capture:!0},mr=function(){return document.body};function _u(t,n){return{}.hasOwnProperty.call(t,n)}function Fn(t,n,o){if(Array.isArray(t)){var a=t[n];return a??(Array.isArray(o)?o[n]:o)}return t}function wo(t,n){var o={}.toString.call(t);return o.indexOf("[object")===0&&o.indexOf(n+"]")>-1}function vr(t,n){return typeof t=="function"?t.apply(void 0,n):t}function aa(t,n){if(n===0)return t;var o;return function(a){clearTimeout(o),o=setTimeout(function(){t(a)},n)}}function xu(t,n){var o=Object.assign({},t);return n.forEach(function(a){delete o[a]}),o}function Au(t){return t.split(/\s+/).filter(Boolean)}function _t(t){return[].concat(t)}function ra(t,n){t.indexOf(n)===-1&&t.push(n)}function Eu(t){return t.filter(function(n,o){return t.indexOf(n)===o})}function Vu(t){return t.split("-")[0]}function gn(t){return[].slice.call(t)}function ia(t){return Object.keys(t).reduce(function(n,o){return t[o]!==void 0&&(n[o]=t[o]),n},{})}function Rt(){return document.createElement("div")}function It(t){return["Element","Fragment"].some(function(n){return wo(t,n)})}function Nu(t){return wo(t,"NodeList")}function Bu(t){return wo(t,"MouseEvent")}function hr(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Du(t){return It(t)?[t]:Nu(t)?gn(t):Array.isArray(t)?t:gn(document.querySelectorAll(t))}function In(t,n){t.forEach(function(o){o&&(o.style.transitionDuration=n+"ms")})}function sa(t,n){t.forEach(function(o){o&&o.setAttribute("data-state",n)})}function Tu(t){var n,o=_t(t),a=o[0];return a!=null&&(n=a.ownerDocument)!=null&&n.body?a.ownerDocument:document}function Su(t,n){var o=n.clientX,a=n.clientY;return t.every(function(r){var s=r.popperRect,i=r.popperState,l=r.props,c=l.interactiveBorder,d=Vu(i.placement),u=i.modifiersData.offset;if(!u)return!0;var v=d==="bottom"?u.top.y:0,w=d==="top"?u.bottom.y:0,h=d==="right"?u.left.x:0,m=d==="left"?u.right.x:0,g=s.top-a+v>c,f=a-s.bottom-w>c,b=s.left-o+h>c,y=o-s.right-m>c;return g||f||b||y})}function Un(t,n,o){var a=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){t[a](r,o)})}function la(t,n){for(var o=n;o;){var a;if(t.contains(o))return!0;o=o.getRootNode==null||(a=o.getRootNode())==null?void 0:a.host}return!1}var Ze={isTouch:!1},ca=0;function Mu(){Ze.isTouch||(Ze.isTouch=!0,window.performance&&document.addEventListener("mousemove",gr))}function gr(){var t=performance.now();t-ca<20&&(Ze.isTouch=!1,document.removeEventListener("mousemove",gr)),ca=t}function Lu(){var t=document.activeElement;if(hr(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}function Pu(){document.addEventListener("touchstart",Mu,ut),window.addEventListener("blur",Lu)}var Ou=typeof window<"u"&&typeof document<"u",Ru=Ou?!!window.msCrypto:!1;function Ct(t){var n=t==="destroy"?"n already-":" ";return[t+"() was called on a"+n+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function da(t){var n=/[ \t]{2,}/g,o=/^[ \t]*/gm;return t.replace(n," ").replace(o,"").trim()}function $u(t){return da(`
30
+ `;let Jn=class Kn extends we.View{get targetScroller(){const{target:n}=this.options;return n.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){const{target:n}=this.options;return n.getPlugin("snapline")}constructor(n){super(),this.name="dnd",this.options=Object.assign(Object.assign({},Kn.defaults),n),this.init()}init(){we.CssLoader.ensure(this.name,gl),this.container=document.createElement("div"),we.Dom.addClass(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new we.Graph(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),we.Dom.append(this.container,this.draggingGraph.container)}start(n,o){const a=o;a.preventDefault(),this.targetModel.startBatch("dnd"),we.Dom.addClass(this.container,"dragging"),we.Dom.appendTo(this.container,this.options.draggingContainer||document.body),this.sourceNode=n,this.prepareDragging(n,a.clientX,a.clientY);const r=this.updateNodePosition(a.clientX,a.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:a,node:n,cell:n,view:this.draggingView,x:r.x,y:r.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(Kn.documentEvents,a.data)}isSnaplineEnabled(){return this.snapline&&this.snapline.isEnabled()}prepareDragging(n,o,a){const{draggingGraph:r}=this,i=r.model,s=this.options.getDragNode(n,{sourceNode:n,draggingGraph:r,targetGraph:this.targetGraph});s.position(0,0);let l=5;if(this.isSnaplineEnabled()&&(l+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const u=this.targetGraph.transform.getScale();r.scale(u.sx,u.sy),l*=Math.max(u.sx,u.sy)}else r.scale(1,1);this.clearDragging(),i.resetCells([s]);const c=r.findViewByCell(s);c.undelegateEvents(),c.cell.off("changed"),r.fitToContent({padding:l,allowNewOrigin:"any",useCellGeometry:!1});const d=c.getBBox();this.geometryBBox=c.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(d.getTopLeft()),this.draggingNode=s,this.draggingView=c,this.draggingBBox=s.getBBox(),this.padding=l,this.originOffset=this.updateGraphPosition(o,a)}updateGraphPosition(n,o){const a=document.body.scrollTop||document.documentElement.scrollTop,{delta:r}=this,i=this.geometryBBox,s=this.padding||5,l={left:n-r.x-i.width/2-s,top:o-r.y-i.height/2-s+a};return this.draggingGraph&&we.Dom.css(this.container,{left:`${l.left}px`,top:`${l.top}px`}),l}updateNodePosition(n,o){const a=this.targetGraph.clientToLocal(n,o),r=this.draggingBBox;return a.x-=r.width/2,a.y-=r.height/2,this.draggingNode.position(a.x,a.y),a}snap({cell:n,current:o,options:a}){const r=n;if(a.snapped){const i=this.draggingBBox;r.position(i.x+a.tx,i.y+a.ty,{silent:!0}),this.draggingView.translate(),r.position(o.x,o.y,{silent:!0}),this.snapOffset={x:a.tx,y:a.ty}}else this.snapOffset=null}onDragging(n){const{draggingView:o}=this;if(o){n.preventDefault();const a=this.normalizeEvent(n),{clientX:r}=a,{clientY:i}=a;this.updateGraphPosition(r,i);const s=this.updateNodePosition(r,i),l=this.targetGraph.options.embedding.enabled,c=(l||this.isSnaplineEnabled())&&this.isInsideValidArea({x:r,y:i});if(l){o.setEventData(a,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const d=o.getEventData(a);c?o.processEmbedding(a,d):o.clearEmbedding(d),this.candidateEmbedView=d.candidateEmbedView}this.options.nodeDragging?.(n,this.sourceNode),this.isSnaplineEnabled()&&(c?this.snapline.snapOnMoving({e:a,view:o,x:s.x,y:s.y}):this.snapline.hide())}}onDragEnd(n){const{draggingNode:o}=this;if(o){const a=this.normalizeEvent(n),{draggingView:r}=this,{draggingBBox:i}=this,{snapOffset:s}=this;let{x:l}=i,{y:c}=i;s&&(l+=s.x,c+=s.y),o.position(l,c,{silent:!0});const d=this.drop(o,{x:a.clientX,y:a.clientY}),u=v=>{v?(this.onDropped(o),this.targetGraph.options.embedding.enabled&&r&&(r.setEventData(a,{cell:v,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),r.finalizeEmbedding(a,r.getEventData(a)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};this.options.nodeDragEnd?.(n,this.sourceNode),we.FunctionExt.isAsync(d)?(this.undelegateDocumentEvents(),d.then(u)):u(d)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.originOffset=null,this.undelegateDocumentEvents())}onDropped(n){this.draggingNode===n&&(this.clearDragging(),we.Dom.removeClass(this.container,"dragging"),we.Dom.remove(this.container))}onDropInvalid(){const{draggingNode:n}=this;n&&this.onDropped(n)}isInsideValidArea(n){let o,a=null;const{targetGraph:r}=this,{targetScroller:i}=this;this.options.dndContainer&&(a=this.getDropArea(this.options.dndContainer));const s=a&&a.containsPoint(n);if(i)if(i.options.autoResize)o=this.getDropArea(i.container);else{const l=this.getDropArea(i.container);o=this.getDropArea(r.container).intersectsWithRect(l)}else o=this.getDropArea(r.container);return!s&&o&&o.containsPoint(n)}getDropArea(n){const o=we.Dom.offset(n),a=document.body.scrollTop||document.documentElement.scrollTop,r=document.body.scrollLeft||document.documentElement.scrollLeft;return we.Rectangle.create({x:o.left+parseInt(we.Dom.css(n,"border-left-width"),10)-r,y:o.top+parseInt(we.Dom.css(n,"border-top-width"),10)-a,width:n.clientWidth,height:n.clientHeight})}drop(n,o){if(this.isInsideValidArea(o)){const{targetGraph:a}=this,r=a.model,i=a.clientToLocal(o),{sourceNode:s}=this,l=this.options.getDropNode(n,{sourceNode:s,draggingNode:n,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),c=l.getBBox();i.x+=c.x-c.width/2,i.y+=c.y-c.height/2;const d=this.snapOffset?1:a.getGridSize();l.position(we.GeometryUtil.snapToGrid(i.x,d),we.GeometryUtil.snapToGrid(i.y,d)),l.removeZIndex();const{validateNode:u}=this.options,v=u?u(l,{sourceNode:s,draggingNode:n,droppingNode:l,targetGraph:a,draggingGraph:this.draggingGraph}):!0;return typeof v=="boolean"?v?(r.addCell(l,{stencil:this.cid}),l):null:we.FunctionExt.toDeferredBoolean(v).then(k=>k?(r.addCell(l,{stencil:this.cid}),l):null)}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove(),we.CssLoader.clean(this.name)}};(function(t){t.defaults={getDragNode:n=>n.clone(),getDropNode:n=>n.clone()},t.documentEvents={mousemove:"onDragging",touchmove:"onDragging",mouseup:"onDragEnd",touchend:"onDragEnd",touchcancel:"onDragEnd"}})(Jn||(Jn={}));const wl=["data-type"],yl=e.defineComponent({__name:"index",props:{instance:{}},emits:["dragging","dragEnd"],setup(t,{emit:n}){const o=[{id:"startpoint",icon:"startpoint-zh",name:"开始节点"},{id:"endpoint",icon:"endpoint-zh",name:"结束节点"},{id:"tasknode",icon:"tasknode",name:"任务节点"},{id:"branchgateway",icon:"branchgateway",name:"分支网关"},{id:"parallelgateway",icon:"parallelgateway",name:"并行网关"},{id:"conditionalparallelgateway",icon:"conditionalparallelgateway",name:"条件并行网关"},{id:"convergegateway",icon:"convergegateway",name:"汇聚节点"}],a=t,r=n,i=e.shallowRef(),s=e.shallowRef(),l=e.ref(),c=e.ref();e.onMounted(()=>{i.value=new Jn({target:a.instance,scaled:!1,dndContainer:c.value,nodeDragging:(m,g)=>d(m,g),nodeDragEnd:(m,g)=>u(m,g),getDragNode:m=>m.clone({keepId:!0}),getDropNode:m=>m.clone({keepId:!0})}),a.instance.on("node:added",({node:m})=>{const g=m.shape==="custom-group-node"?1:2;m.setZIndex(g)}),l.value.addEventListener("mousedown",v)});const d=(m,g)=>{r("dragging",{e:m,node:g})},u=(m,g)=>{r("dragEnd",{e:m,node:g})},v=m=>{(mn("node-item",m.target)||mn("entry-item",m.target))&&(s.value=m,document.addEventListener("mousemove",k),document.addEventListener("mouseup",h))},k=m=>{if(!s.value)return;const{pageX:g,pageY:y}=s.value;Math.max(m.pageX-g,m.pageY-y)>3&&(p(s.value),document.removeEventListener("mousemove",k))},h=()=>{s.value=null,document.removeEventListener("mouseup",h)},p=m=>{const g=w(m.target),y=g.type==="tasknode",b=a.instance.createNode({id:`node${qe()}`,shape:"custom-node",width:y?154:34,height:y?54:34,data:g,zIndex:5});i.value.start(b,m)},w=m=>{const g=m.getAttribute("data-type");return g?{type:g}:{}};return(m,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dndPanel",ref:l,class:"dnd-panel"},[e.createElementVNode("ul",{ref_key:"containerRef",ref:c,class:"nodes-wrapper"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,y=>e.createElementVNode("li",{key:y.id,class:e.normalizeClass(["node-item",`bkflow-canvas-icon bkflow-canvas-node-${y.icon}`,{disabled:["startpoint","endpoint"].includes(y.id)}]),"data-type":y.id},null,10,wl)),64))],512)],512))}}),bl=te(yl,[["__scopeId","data-v-61aa5064"]]),kl={name:"Start",props:{node:{type:Object,default:()=>({})}},data(){return{}}};function Cl(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item circle-node",{ready:o.node.ready}])}," 开始 ",2)}const _l=te(kl,[["render",Cl]]),Al={name:"End",props:{node:{type:Object,default:()=>({})}},data(){return{}}};function xl(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item circle-node",{ready:o.node.ready}])}," 结束 ",2)}const El=te(Al,[["render",xl]]),Bl=["CMDB","JOB","BK","Nodeman","Monitor","GCLOUD","TCM","WechatWork"],Yo={bk_http_request:"bkflow-canvas-icon bkflow-canvas-bk-plugin-http",bk_notify:"bkflow-canvas-icon bkflow-canvas-bk-plugin-notify",sleep_timer:"bkflow-canvas-icon bkflow-canvas-bk-plugin-timer",pause_node:"bkflow-canvas-icon bkflow-canvas-bk-plugin-pause"},Vl={name:"Task",props:{node:{type:Object,default:()=>({})}},data(){return{phaseStr:{1:"当前插件即将停止维护,请更新插件版本",2:"当前插件已停止维护,请更新插件版本"}}},computed:{isEmptyNode(){return!this.node.component||!this.node.component.code}},methods:{getIconCls(t){const{code:n,group:o}=t;if(Yo[n])return Yo[n];if(n==="remote_plugin")return"bkflow-canvas-icon bkflow-canvas-sys-third-party";const a=Bl.find(r=>new RegExp(r).test(o));return a?`bkflow-canvas-icon bkflow-canvas-sys-${a.toLowerCase()}`:"bkflow-canvas-icon bkflow-canvas-sys-default"}}},Nl={class:"node-status-block"},Dl=["src"],Tl={key:2,class:"stage-name"},Ml={class:"node-name"},Sl={class:"name-text"};function Ll(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item task-node",{"empty-node":i.isEmptyNode}])},[e.createElementVNode("div",Nl,[o.node.icon?(e.openBlock(),e.createElementBlock("img",{key:0,class:"node-icon",src:o.node.icon},null,8,Dl)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["node-icon-font",i.getIconCls(o.node)])},null,2)),o.node.stage_name?(e.openBlock(),e.createElementBlock("div",Tl,e.toDisplayString(o.node.stage_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ml,[e.createElementVNode("div",Sl,e.toDisplayString(i.isEmptyNode?"- 节点未配置 -":o.node.name),1)])],2)}const Pl=te(Vl,[["render",Ll],["__scopeId","data-v-53ab1e5c"]]),Ol={name:"BranchGateway",props:{node:{type:Object,default:()=>({})}}};function Fl(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{"fail-skip":o.node.status==="FINISHED"&&o.node.skip},{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-branchgateway"},null,-1)])],2)}const Rl=te(Ol,[["render",Fl]]),zl={name:"ParallelGateway",props:{node:{type:Object,default:()=>({})}}};function Il(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-parallelgateway"},null,-1)])],2)}const $l=te(zl,[["render",Il]]),Ul={name:"ConditionalParallelGateway",props:{node:{type:Object,default:()=>({})}}};function jl(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{"fail-skip":o.node.status==="FINISHED"&&o.node.skip},{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-conditionalparallelgateway"},null,-1)])],2)}const Gl=te(Ul,[["render",jl]]),ql={name:"ConvergeGateway",props:{node:{type:Object,default:()=>({})}}};function Hl(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["node-item gateway-node",{ready:o.node.ready}])},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"bpmn-flow-icon bkflow-canvas-icon bkflow-canvas-node-convergegateway"},null,-1)])],2)}const Wl=te(ql,[["render",Hl]]),Yl={class:"node-config-flags"},Zl={key:0,class:"error-handle-icon"},Ql={key:1,class:"error-handle-icon"},Jl={key:2,class:"error-handle-icon"},Kl={key:3,class:"error-handle-icon"},Xl={key:1,class:"mock-label"},ec=e.defineComponent({__name:"node-config-flags",props:{node:{},editable:{type:Boolean}},setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createElementBlock("div",Yl,[n.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.node.error_ignorable?(e.openBlock(),e.createElementBlock("span",Zl,[...a[0]||(a[0]=[e.createElementVNode("span",{class:"text"},"AS",-1)])])):e.createCommentVNode("",!0),n.node.skippable?(e.openBlock(),e.createElementBlock("span",Ql,[...a[1]||(a[1]=[e.createElementVNode("span",{class:"text"},"MS",-1)])])):e.createCommentVNode("",!0),n.node.retryable?(e.openBlock(),e.createElementBlock("span",Jl,[...a[2]||(a[2]=[e.createElementVNode("span",{class:"text"},"MR",-1)])])):e.createCommentVNode("",!0),n.node.auto_retry?.enable?(e.openBlock(),e.createElementBlock("span",Kl,[...a[3]||(a[3]=[e.createElementVNode("span",{class:"text"},"AR",-1)])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),n.node.create_method==="mock"?(e.openBlock(),e.createElementBlock("span",Xl,"MOCK")):e.createCommentVNode("",!0)]))}}),tc=te(ec,[["__scopeId","data-v-077f8bb9"]]),nc={class:"node-operate-actions"},oc={key:0,class:"more-btn-list"},ac=["onClick"],rc={class:"action-name"},sc=e.defineComponent({__name:"index",emits:["delete","moreBtnClick"],setup(t,{emit:n}){const o=n,a=e.ref(!1),r=e.computed(()=>[{id:"copyNode",name:"复制节点",icon:"incident-fuzhijiedian"},{id:"copyNodeAndInsert",name:"复制并插入",icon:"incident-fuzhibingcharu"},{id:"detachEdges",name:"解除连线",icon:"incident-jiechulianxian"}]),i=()=>{a.value=!0},s=l=>{o("moreBtnClick",l)};return(l,c)=>{const d=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",nc,[e.withDirectives(e.createElementVNode("i",{class:"delete-btn bk-incident-icon incident-shanchujiedian",onClick:c[0]||(c[0]=u=>o("delete"))},null,512),[[d,"删除节点"]]),e.createElementVNode("i",{class:"more-btn bkflow-canvas-icon bkflow-canvas-more-fill",onClick:i}),a.value?(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,u=>(e.openBlock(),e.createElementBlock("div",{class:"more-btn-item",key:u.id,onClick:v=>s(u.id)},[e.createElementVNode("i",{class:e.normalizeClass(["bk-incident-icon",u.icon])},null,2),e.createElementVNode("span",rc,e.toDisplayString(u.name),1)],8,ac))),128))])):e.createCommentVNode("",!0)])}}}),ic=te(sc,[["__scopeId","data-v-31512fe2"]]),lc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,3.5%20L10,3.5%20L10,4.5%20L11.3962161,4.50116386%20C9.643609,6.49502964%208.38728573,7.5%207.76574712,7.5%20L2.98331185,7.5%20L2.98331185,8.5%20L7.76574712,8.5%20C8.38739048,8.5%209.64403252,9.50530916%2011.3971023,11.4998444%20L10,11.5%20L10,12.5%20L13,12.5%20L13,9.5%20L12,9.5%20L11.9990374,10.6691668%20C10.8673578,9.39340572%209.92128001,8.50479286%209.13199729,8.00043657%20C9.92138242,7.4953138%2010.8676033,6.60639761%2011.9994779,5.33034326%20L12,6.5%20L13,6.5%20L13,3.5%20Z'%20fill='%236EC3D5'%20fill-rule='evenodd'/%3e%3c/svg%3e",cc={class:"option-item"},dc=["src"],uc={class:"option-name"},pc=e.defineComponent({__name:"option-item",props:{option:{}},setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createElementBlock("div",cc,[e.createElementVNode("img",{class:"option-img",src:n.option.iconUrl},null,8,dc),e.createElementVNode("div",uc,e.toDisplayString(n.option.name),1),n.option.type==="group"?(e.openBlock(),e.createBlock(e.unref(Oe.AngleRight),{key:0,class:"angle-icon"})):e.createCommentVNode("",!0),n.option.type==="link"?(e.openBlock(),e.createBlock(e.unref(Oe.ArrowsRight),{key:1,class:"arrow-icon"})):e.createCommentVNode("",!0)]))}}),Zo=te(pc,[["__scopeId","data-v-0470b67d"]]),fc={key:0},mc=e.defineComponent({__name:"index",props:{isSearch:{type:Boolean,default:!1},title:{}},emits:["clear"],setup(t,{emit:n}){const o=t,a=n,r=e.computed(()=>o.isSearch?"搜索结果为空":o.title||"暂无数据");return(i,s)=>{const l=e.resolveComponent("bk-exception");return e.openBlock(),e.createBlock(l,{scene:"part",type:o.isSearch?"search-empty":"empty",title:r.value},{default:e.withCtx(()=>[o.isSearch?(e.openBlock(),e.createElementBlock("div",fc,[s[1]||(s[1]=e.createTextVNode(" 可以尝试 调整关键词 或 ",-1)),e.createElementVNode("span",{class:"clear-button",onClick:s[0]||(s[0]=c=>a("clear"))},"清空筛选条件")])):e.createCommentVNode("",!0)]),_:1},8,["type","title"])}}}),ht=te(mc,[["__scopeId","data-v-01a0dc2e"]]),vc={class:"quick-edit-popover"},hc={class:"search-input"},gc={class:"plugin-option-list"},wc={key:0,class:"nodes-list"},yc=["onClick"],bc={key:1,class:"data-plugin-list"},kc=["onClick"],Cc={class:"data-plugin-name"},_c={key:2,class:"agent-plugin-list"},Ac={class:"list-wrapper"},xc=["onClick"],Ec={class:"agent-name"},Bc={class:"agent-en-name"},Vc={key:3,class:"bkflow-tag-list"},Nc=["onClick"],Dc=["onClick"],Tc=e.defineComponent({__name:"index",props:{pluginGroupList:{default:()=>[]}},emits:["addNode","addPlugin","openPluginSelect","deleteEdge","deleteNode","copyNode","copyNodeAndInsert","detachEdges"],setup(t,{emit:n}){const o=[{id:"branchgateway",name:"分支网关",icon:"incident-node-branchgateway-shortcut"},{id:"parallelgateway",name:"并行网关",icon:"incident-node-parallelgateway-shortcut"},{id:"conditionalparallelgateway",name:"条件并行网关",icon:"incident-node-conditionalparallelgateway-shortcut"},{id:"convergegateway",name:"汇聚网关",icon:"incident-node-convergegateway-shortcut"}],a={alert_plugin:"incident-gaojing",query_promql_metric_plugin:"incident-zhibiao",trace_plugin:"incident-trace",事件:"incident-shijian",log_plugin:"incident-rizhi",profling:"incident-profling",图谱:"incident-tupu"},r=pn.useRouter(),i=pn.useRoute(),s=t,l=n,c=e.shallowRef([]),d=e.ref(""),u=e.shallowRef([...c.value||[]]),v=e.computed(()=>(s.pluginGroupList.find(y=>y.name==="agent")?.children.length||0)>10);e.watch(()=>s.pluginGroupList,y=>{const b=[{id:"logic",name:"逻辑",iconUrl:lc,type:"group",width:88,children:o}];y.forEach(f=>{b.push({id:f.name,name:f.alias,iconUrl:f.iconUrl,type:"group",width:f.name==="data"?160:280,children:f.children.map(_=>{if(f.name==="data"){const{id:B,name:S,alias:T}=_;return{id:B,name:T,icon:a[S]}}else if(f.name==="agent"){const{id:B,alias:S,name:T}=_;return{id:B,name:S,enName:T}}else if(f.name==="bkflow"){const{id:B,name:S}=_;return{id:B,name:S}}return _})})}),c.value=b,u.value=[...c.value]},{immediate:!0});const k=y=>{const b=y.trim().toLowerCase();if(b===""){u.value=[...c.value];return}const f=[];c.value.forEach(_=>{if(_.name.toLowerCase().includes(b))f.push(_);else if(_.type==="group"){const B=[];_.children?.forEach(S=>{S.name.toLowerCase().includes(b)&&B.push(S)}),B.length>0&&f.push({..._,children:B})}}),u.value=f},h=()=>{d.value="",u.value=[...c.value]},p=y=>{l("addNode",y)},w=(y,b)=>{b==="bkflow"?m("bkflow",y):l("addPlugin",y,b)},m=(y,b=0)=>{l("openPluginSelect",y,b)},g=y=>{if(y==="agent"&&!v.value){const{href:b}=r.resolve({name:"spaceResource",params:i.params});window.open(b,"_blank")}else m(y)};return(y,b)=>{const f=e.resolveComponent("bk-input"),_=e.resolveComponent("bk-button"),B=e.resolveComponent("bk-popover"),S=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",vc,[e.createElementVNode("div",hc,[e.createVNode(f,{modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=T=>d.value=T),placeholder:"搜索节点",type:"search",clearable:!0,onClear:h,onInput:k},null,8,["modelValue"])]),e.createElementVNode("div",gc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,T=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:T.id},[T.type==="group"?(e.openBlock(),e.createBlock(B,{key:0,theme:"light",placement:"right-start","ext-cls":"plugin-child-popover",boundary:"parent",arrow:!1,width:T.width,"popover-delay":[0,100]},{content:e.withCtx(()=>[T.id==="logic"?(e.openBlock(),e.createElementBlock("div",wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.children,V=>e.withDirectives((e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["bk-incident-icon",V.icon]),key:V.id,onClick:L=>p(V.id)},null,10,yc)),[[S,{content:V.name,placement:"top"}]])),128))])):T.id==="data"?(e.openBlock(),e.createElementBlock("div",bc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.children?.slice(0,10),V=>(e.openBlock(),e.createElementBlock("div",{class:"data-plugin-item",key:V.id,onClick:L=>w(V.id,"data")},[e.createElementVNode("i",{class:e.normalizeClass(["bk-incident-icon",V.icon])},null,2),e.createElementVNode("div",Cc,e.toDisplayString(V.name),1)],8,kc))),128))])):T.id==="agent"?(e.openBlock(),e.createElementBlock("div",_c,[e.createElementVNode("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.children?.slice(0,10),V=>(e.openBlock(),e.createElementBlock("div",{class:"agent-plugin-item",key:V.id,onClick:L=>w(V.id,"agent")},[e.createElementVNode("span",Ec,e.toDisplayString(V.name),1),e.createElementVNode("span",Bc,"("+e.toDisplayString(V.enName)+")",1)],8,xc))),128))])])):T.id==="bkflow"?(e.openBlock(),e.createElementBlock("div",Vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.children?.slice(0,10),V=>(e.openBlock(),e.createElementBlock("div",{class:"bkflow-tag-item",key:V.id,onClick:L=>w(V.id,"bkflow")},e.toDisplayString(V.name),9,Nc))),128))])):e.createCommentVNode("",!0),T.children&&T.children.length===0?(e.openBlock(),e.createBlock(ht,{key:4,class:"group-empty-exception",title:`暂无${T.name}插件`},null,8,["title"])):e.createCommentVNode("",!0),T.id==="agent"||T.children&&T.children.length>10?(e.openBlock(),e.createElementBlock("div",{key:5,class:"list-footer",onClick:V=>g(T.id)},[e.createVNode(_,{theme:"primary",text:"",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.id==="agent"&&!v.value?"申请更多权限":"更多"),1)]),_:2},1024),b[1]||(b[1]=e.createElementVNode("i",{class:"bk-incident-icon incident-arrow2"},null,-1))],8,Dc)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(Zo,{option:T},null,8,["option"])]),_:2},1032,["width"])):(e.openBlock(),e.createBlock(Zo,{key:1,option:T,onClick:V=>m(T.id)},null,8,["option","onClick"]))],64))),128)),u.value.length===0?(e.openBlock(),e.createBlock(ht,{key:0,"is-search":d.value.length>0,onClear:h},null,8,["is-search"])):e.createCommentVNode("",!0)])])}}}),Mc=te(Tc,[["__scopeId","data-v-dc52fe1c"]]),Sc={class:"custom-node"},Lc={key:0,class:"add-node-popover"},Pc=e.defineComponent({__name:"index",props:{editable:{type:Boolean},pluginGroupList:{default:()=>[]}},emits:["addNode","addPlugin","addNodeAndSelectPlugin","addBtnClick","deleteBtnClick","copyNodeClick","copyNodeAndInsertClick","detachEdgesClick"],setup(t,{emit:n}){const o={startpoint:_l,endpoint:El,tasknode:Pl,branchgateway:Rl,parallelgateway:$l,conditionalparallelgateway:Gl,convergegateway:Wl},a=e.inject("getNode");if(!a)throw new Error("getNode is not defined");const r=t,i=n,s=e.ref({id:"",type:"",name:""}),l=e.ref(),c=e.ref(!1),d=e.computed(()=>{const m=a(),{type:g}=m.getData();return o[g]});e.onMounted(()=>{const m=a();s.value=m.getData(),m.on("change:data",({current:g})=>{s.value=g})}),e.onBeforeUnmount(()=>{l.value?.resetPopover()});const u=m=>{i("addNode",s.value.id,m),l.value.hide()},v=(m,g)=>{i("addPlugin",s.value.id,m,g),l.value.hide()},k=(m,g=0)=>{i("addNodeAndSelectPlugin",s.value.id,m,g),l.value.hide()},h=()=>{c.value=!0,i("addBtnClick",s.value.id)},p=()=>{i("deleteBtnClick",s.value.id)},w=m=>{m==="copyNode"?i("copyNodeClick",s.value.id):m==="copyNodeAndInsert"?i("copyNodeAndInsertClick",s.value.id):m==="detachEdges"&&i("detachEdgesClick",s.value.id)};return(m,g)=>{const y=e.resolveComponent("bk-popover");return e.openBlock(),e.createElementBlock("div",Sc,[["task","tasknode"].includes(s.value.type)?(e.openBlock(),e.createBlock(tc,{key:0,node:s.value,editable:r.editable},null,8,["node","editable"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(y,{ref_key:"popoverRef",ref:l,"ext-cls":"custom-node-popover",placement:"bottom-end",theme:"light",disabled:!r.editable||s.value.type==="endpoint",content:s.value.name,key:s.value.id,arrow:!1,onAfterHidden:g[0]||(g[0]=b=>c.value=!1)},{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["add-btn",s.value.type==="tasknode"?"type-task-node":""])},[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-add-fill",onClick:h}),c.value?(e.openBlock(),e.createElementBlock("div",Lc,[e.createVNode(Mc,{"plugin-group-list":r.pluginGroupList,onAddNode:u,onOpenPluginSelect:k,onAddPlugin:v},null,8,["plugin-group-list"])])):e.createCommentVNode("",!0)],2),e.createVNode(ic,{onDelete:p,onMoreBtnClick:w})]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{node:s.value,class:e.normalizeClass(s.value.status?s.value.status.toLowerCase():"")},null,8,["node","class"]))]),_:1},8,["disabled","content"]))])}}}),tr=te(Pc,[["__scopeId","data-v-2eb82156"]]),Oc=e.defineComponent({__name:"canvas",props:{pipelineTree:{},editable:{type:Boolean}},emits:["nodeMoving","nodeMoved","nodeClick","edgeClick","edgeLabelClick","edgeLabelUpdate","nodeDbClick","nodeMouseenter","nodeMouseleave","edgeMouseenter","edgeMouseleave","updatePipelineTree","addNode","deleteNode","copyNode","copyNodeAndInsert","detachEdges","deleteEdge"],setup(t,{expose:n,emit:o}){const a=e.useSlots(),r=Eo.getTeleport(),i=t,s=o,l=e.shallowRef(null),c=e.shallowRef(),d=e.ref(ve.cloneDeep(i.pipelineTree)),u=e.ref(!1);e.watch(()=>i.pipelineTree,()=>{d.value=ve.cloneDeep(i.pipelineTree)}),e.onMounted(()=>{v(),k();const{x:E,y:U}=l.value.getContentArea();l.value.positionPoint({x:E,y:U},40,134)});const v=()=>{l.value=new we.Graph({container:c.value,grid:{size:1,visible:!1},panning:!0,mousewheel:{enabled:!0,modifiers:["ctrl"]},scaling:{min:.25,max:1.5},virtual:!1,connecting:{allowBlank:!1,allowLoop:!1,allowNode:!1,allowEdge:!1,allowMulti:!1,highlight:!1,snap:{radius:15},router:{name:"manhattan",args:{padding:1}},connector:{name:"rounded",args:{radius:6}},connectionPoint:"anchor",createEdge(){return new we.Shape.Edge({id:`line${qe()}`,attrs:{line:{stroke:"#a9adb6",strokeWidth:2,targetMarker:{name:"block",width:6,height:8}}},data:{},zIndex:0})},validateEdge:p},interacting:{nodeMovable:i.editable,edgeLabelMovable:i.editable,arrowheadMovable:i.editable},highlighting:{magnetAvailable:{name:"stroke",args:{attrs:{fill:"#fff",stroke:"#31d0c6","stroke-width":1}}},magnetAdsorbed:{name:"stroke",args:{attrs:{fill:"#fff",stroke:"#3a84ff","stroke-width":2}}}},onEdgeLabelRendered:E=>{const{label:U}=E.label,$=E.selectors.foContent;if($){const q=document.createElement("div");return q.classList.add("branch-condition"),U.isDefault&&q.classList.add("default-branch"),q.innerText=U.name,q.title=U.name,Array.isArray($)?$.length>0&&$[0].appendChild(q):$.appendChild(q),()=>{Array.isArray($)?$.length>0&&$[0].contains(q)&&$[0].removeChild(q):$.contains(q)&&$.removeChild(q)}}}}),window.__x6_instances__=[l.value],l.value.use(new Ir.Snapline({enabled:!0,className:"custom-snap-line",tolerance:2})),l.value.use(new zr.Clipboard({enabled:!0})),l.value.use(new Rr.Selection({enabled:!1,multiple:!0,rubberband:!1,showNodeSelectionBox:!0,pointerEvents:"none"})),h(),Ki(l.value,i.editable),l.value.on("node:moving",w),l.value.on("node:moved",g),l.value.on("node:click",ve.debounce(b,200)),l.value.on("node:dblclick",f),l.value.on("node:mouseenter",_),l.value.on("node:mouseleave",B),l.value.on("edge:click",ve.debounce(S,200)),l.value.on("edge:mouseenter",T),l.value.on("edge:click",V),l.value.on("edge:added",L),l.value.on("edge:change:labels",Z),l.value.on("edge:mouseenter",({cell:E})=>{i.editable&&E.addTools([{name:"button-remove",args:{distance:.5,onClick:()=>{s("deleteEdge",E)}}}])}),l.value.on("edge:mouseleave",({cell:E})=>{E.removeTools()})},k=()=>{const E=Hi(d.value.location,d.value.activities),U=Ho(d.value.line);l.value?.addNodes(E),l.value?.addEdges(U)},h=()=>{Eo.register({shape:"custom-node",ports:{...Ji},component:a.customNode?e.h("div",{style:{width:"100%",height:"100%"}},a.customNode()):e.h(tr,{editable:i.editable,onAddBtnClick:E=>{s("addNode",E)},onDeleteBtnClick:E=>{s("deleteNode",E)},onCopyNodeClick:E=>{s("copyNode",E)},onCopyNodeAndInsertClick:E=>{s("copyNodeAndInsert",E)},onDetachEdgesClick:E=>{s("detachEdges",E)}})})},p=({edge:E})=>{const U=d.value.line.filter(ie=>ie.id!==E.id),$=E.source,q=E.target,W=$.port.split("_")[1]||"",Q=q.port?.split("_")[1]||"",H={id:E.id,source:{id:$.cell,arrow:`${W.charAt(0).toUpperCase()}${W.slice(1)}`},target:{id:q.cell,arrow:`${Q.charAt(0).toUpperCase()}${Q.slice(1)}`}},ne=Qi(H,U,d.value.location);if(ne.valid){const ie=E.id in i.pipelineTree.flows;if(console.log(ie),ie){const le=d.value.line.find(re=>re.id===E.id);C(le,H)}else N([H]),L({cell:E})}else un({message:ne.message,theme:"warning"});return ne.valid},w=({node:E})=>{s("nodeMoving",E)},m=({node:E})=>{},g=({node:E})=>{const U=E.position(),$=[...d.value.location],q=$.findIndex(W=>W.id===E.id);$.splice(q,1,{...$[q],x:U.x,y:U.y}),d.value={...d.value,location:$},ee(),s("nodeMoved",E)},y=({node:E})=>{const U=l.value?.getCellById(E.id);if(U){const $=U.getData().type,q=U.position();$==="tasknode"?P(E.id,q):x(E.id,$,q)}},b=({e:E,node:U})=>{E.detail===1&&s("nodeClick",U)},f=({node:E})=>{s("nodeDbClick",E)},_=({node:E})=>{s("nodeMouseenter",E)},B=({node:E,e:U})=>{s("nodeMouseleave",E,U)},S=({e:E,edge:U})=>{if(mn("branch-condition",E.target)){s("edgeLabelClick",U);return}s("edgeClick",U,E)},T=({edge:E})=>{s("edgeMouseenter",E)},V=({edge:E})=>{s("edgeMouseleave",E)},L=({cell:E})=>{e.nextTick(()=>{const U=E.source?.cell||E.source,q=Y(U)[E.id];if(q){const W=document.createElement("span");W.innerText=q.name,W.style.fontSize="12px",W.style.padding="0 6px",document.body.appendChild(W);let{width:Q=0}=W.getBoundingClientRect();Q>112?Q=112:Q<60&&(Q=60),document.body.removeChild(W);const H=q.loc||-Q/2-20;E.appendLabel({markup:we.Markup.getForeignObjectMarkup(),attrs:{fo:{width:Q,height:26,x:-Q,y:-13}},label:{...q,lineId:E.id,sourceId:U},position:{distance:H,offset:{x:Q/2,y:0}}})}})},z=E=>{const $=l.value.getEdges().find(q=>q.id===E);$&&($.removeLabelAt(0),L({cell:$}))},Z=({edge:E,current:U,previous:$})=>{if(!$||!$.length||!U.length)return;const Q=l.value.findViewByCell(E.id).container.querySelector(`.${E.id}`).getTotalLength();U.forEach(H=>{const{width:ne}=H.attrs.fo;H.position.offset={x:ne/2,y:0};const ie=(ne/2+20)/Q,le=1-ie,re=Math.max(ie,Math.min(le,H.position.distance));H.position.distance=re;const{sourceId:de,isDefault:ge=!1}=H.label;K(E.id,de,ge,re)})},Y=E=>{const U=d.value.gateways[E];let $={};if(U){const{conditions:q,default_condition:W}=U;q&&($={...q}),W&&W.flow_id&&($[W.flow_id]={...W,isDefault:!0})}return $},P=(E,U,$={})=>{const q={...d.value.activities},W=[...d.value.location],Q=Gi(E,$),{name:H,error_ignorable:ne,retryable:ie,skippable:le,auto_retry:re,component:de={}}=Q;G(E,{id:E,name:H,error_ignorable:ne,retryable:ie,skippable:le,auto_retry:re,component:de,type:"tasknode"}),q[E]=Q,W.push({id:E,type:"tasknode",x:U.x,y:U.y,name:H}),d.value={...d.value,activities:q,location:W},ee()},x=(E,U,$,q={})=>{const Q={branchgateway:"ExclusiveGateway",parallelgateway:"ParallelGateway",conditionalparallelgateway:"ConditionalParallelGateway",convergegateway:"ConvergeGateway"}[U],H={...d.value.gateways},ne=[...d.value.location],ie=qi(E,Q,q);console.log("gateway: ",ie),G(E,{id:E}),H[E]=ie,ne.push({id:E,type:U,x:$.x,y:$.y}),d.value={...d.value,gateways:H,location:ne},ee()},N=E=>{const{start_event:U,end_event:$,activities:q,gateways:W,flows:Q,location:H,line:ne}=ve.cloneDeep(d.value);E.forEach(ie=>{const{id:le,source:re,target:de}=ie;ne.push(ie),Q[ie.id]={id:le,source:re.id,target:de.id,is_default:!1};const ge=H.find(fe=>fe.id===re.id),Ce=H.find(fe=>fe.id===de.id);if(ge){if(ge.type==="startpoint")U.outgoing=le;else if(ge.type==="tasknode")q[re.id].outgoing=le;else if(ge.type.includes("gateway")){const fe=W[re.id];if(Array.isArray(fe.outgoing)?fe.outgoing.push(le):fe.outgoing=le,["ExclusiveGateway","ConditionalParallelGateway"].includes(fe.type)){const Ae={...fe.conditions||{}},Ve=Object.keys(Ae).length;Ae[le]={name:`条件${Ve+1}`,tag:`branch_${re.id}_${de.id}`,evaluate:Ve>0?"1 == 0":"1 == 1"},fe.conditions=Ae}}}Ce&&(Ce.type==="endpoint"?$.incoming.push(le):Ce.type==="tasknode"?q[de.id].incoming.push(le):Ce.type.includes("gateway")&&W[de.id].incoming.push(le))}),d.value={...d.value,start_event:U,end_event:$,activities:q,gateways:W,flows:Q,line:ne},ee()},C=(E,U)=>{const $=U.id,q=ve.cloneDeep(d.value),W=E.source.id!==U.source.id,Q=W?E.source.id:E.target.id,H=W?U.source.id:U.target.id;W?q.flows[$].source=H:q.flows[$].target=H;const ne=q.line.findIndex(de=>de.id===$);ne>-1&&q.line.splice(ne,1,U);const ie=qo(H,q),le=qo(Q,q),re=W?"outgoing":"incoming";Array.isArray(ie[re])?ie[re].push($):ie[re]=$,Array.isArray(le[re])?le[re]=le[re].filter(de=>de!==$):le[re]="",d.value=q,ee()},A=E=>{const U=Ho(E);l.value?.addEdges(U),N(E)},D=E=>{l.value?.removeNode(E);const U=[];d.value.line.forEach(re=>{(re.source.id===E||re.target.id===E)&&U.push(re.id)});const $=I(U),{activities:q,gateways:W,flows:Q,location:H,line:ne,start_event:ie,end_event:le}=$;q[E]?delete q[E]:W[E]&&delete W[E],H.splice(H.findIndex(re=>re.id===E),1),d.value={...d.value,activities:q,gateways:W,flows:Q,location:H,line:ne,start_event:ie,end_event:le},ee()},F=E=>{E.forEach(U=>{l.value?.removeEdge(U)}),d.value=I(E),ee()},I=E=>{const U={...d.value.activities},$={...d.value.gateways},q={...d.value.flows},W=[...d.value.line],Q={...d.value.start_event},H={...d.value.end_event};return E.forEach(ne=>{delete q[ne],W.splice(W.findIndex(ie=>ie.id===ne),1),Object.keys(U).forEach(ie=>{if(U[ie].incoming.includes(ne)||U[ie].outgoing===ne){const le=ve.cloneDeep(U[ie]),{incoming:re,outgoing:de}=le;re.includes(ne)&&re.splice(re.findIndex(ge=>ge===ne),1),de===ne&&(le.outgoing=""),U[ie]=le}}),Object.keys($).forEach(ie=>{const le=ve.cloneDeep($[ie]),{incoming:re,outgoing:de,conditions:ge,default_condition:Ce}=le;$[ie].incoming.includes(ne)&&re.includes(ne)&&re.splice(re.findIndex(fe=>fe===ne),1),Array.isArray(de)?de.includes(ne)&&de.splice(de.findIndex(fe=>fe===ne),1):de===ne&&(le.outgoing=""),ge&&ge[ne]&&delete ge[ne],Ce&&Ce.flow_id===ne&&delete le.default_condition,$[ie]=le}),Q.outgoing===ne&&(Q.outgoing=""),H.incoming.includes(ne)&&(H.incoming=H.incoming.filter(ie=>ie!==ne))}),{...d.value,activities:U,gateways:$,flows:q,line:W,start_event:Q,end_event:H}},G=(E,U)=>{const $=l.value?.getCellById(E),q=$?.data.type;$&&$.setData({...$.data,...U,type:q})},K=ve.debounce((E,U,$,q)=>{const W={...d.value.gateways};if(W[U]){const Q=ve.cloneDeep(W[U]);$&&Q.default_condition?Q.default_condition={...Q.default_condition,loc:q}:Q.conditions&&Q.conditions[E]&&(Q.conditions[E]={...Q.conditions[E],loc:q}),W[U]=Q,d.value={...d.value,gateways:W},ee()}},300),oe=async()=>{if(u.value)return;const E=200,U=i.pipelineTree.location.map(_e=>_e.x),$=i.pipelineTree.location.map(_e=>_e.y),q=Math.min(...U),W=Math.max(...U),Q=Math.min(...$),H=Math.max(...$),ne=q<0?-q:0,ie=Q<0?-Q:0;let le=0;const re=document.documentElement.offsetWidth-60,de=document.documentElement.offsetHeight-60-50;q<0?le=W>re?W-q:re-q:le=W>re?W:re;let ge=0;Q<0?ge=H>de?H-Q:de-Q:ge=H>de?H:de;const Ce=ge+E+30,fe=le+E+80,Ae=await it.toJpeg(c.value,{bgcolor:"#ffffff",height:Ce,width:fe,cloneBack:_e=>{const je=_e.querySelector(".x6-graph-svg");je.style.width=`${fe}px`,je.style.height=`${Ce}px`;const We=_e.querySelector(".x6-graph-svg-viewport");We.style.transform=`translate(${`${ne+30}px`}, ${`${ie+30}px`})`}});u.value=!0;const Ve=document.createElement("a");Ve.download=`bkflow_template_canvas_${+new Date}.png`,Ve.href=Ae,Ve.click(),u.value=!1},ee=()=>{s("updatePipelineTree",d.value)};return n({graph:l,createActivity:P,createGateway:x,deleteNode:D,deleteEdges:F,insertEdgesToCanvas:A,updateEdgeLabel:z,updateNodeData:G}),(E,U)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["bkflow-canvas-container",{"bkflow-canvas-view":!i.editable}])},[l.value?(e.openBlock(),e.createBlock(hl,{key:0,instance:l.value,onDownload:oe},null,8,["instance"])):e.createCommentVNode("",!0),l.value&&i.editable?(e.openBlock(),e.createBlock(bl,{key:1,instance:l.value,onDragging:m,onDragEnd:y},null,8,["instance"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"graphContainerRef",ref:c,class:"graph-container"},null,512),e.createVNode(e.unref(r))],2))}}),Fc=te(Oc,[["__scopeId","data-v-5a816e44"]]),nr=t=>"default"in t?t.default:["list"].includes(t.type)?[]:"",Rc={class:"bkflow-variable-table"},zc={class:"operate-wrapper"},Ic={class:"btns-list"},$c={class:"toggle-system-variables"},Uc={class:"variable-table-wrapper"},jc={class:"var-check-cell"},Gc={key:0,class:"bkflow-canvas-icon bkflow-canvas-lock-disable"},qc={class:"cell-text"},Hc={class:"cell-text"},Wc={class:"copy-icon-wrapper"},Yc={class:"table-row-actions"},Zc=["onClick"],Qc=["onClick"],Jc=e.defineComponent({__name:"global-variable-table",props:{constants:{default:()=>({})},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0},outputs:{default:()=>[]},customVariableTypes:{default:()=>[]},variablesReference:{default:()=>({defined:{},nodefined:{}})}},emits:["create","edit","clone","delete","outputChange","updateConstants"],setup(t,{emit:n}){const o=t;e.watch(()=>o.outputs,f=>{console.log("outputs",f)});const a=n,r=e.ref(!1),i=e.ref([]),s=e.computed(()=>{const f=Object.values(o.constants).sort((_,B)=>_.index-B.index);return r.value?f:[...o.systemVariables,...f]}),l={cellFn:f=>{const _=i.value.length,B=Object.values(o.constants).length,S=B>0&&_===B,T=_>0&&_<B;if(f.index===0)return e.createVNode(e.Fragment,null,[e.createVNode(e.resolveComponent("bk-checkbox"),{modelValue:S,indeterminate:T,disabled:!o.editable,onChange:v},null)]);if(["reference","outputs"].includes(f.column.prop)){const V={content:f.column.prop==="reference"?"直接引用全局变量的节点数量,点击数字查看引用详情":"表示该变量会作为该流程模板的输出参数,在被其他流程模板当做子流程节点时可以引用。",placement:"top"};return e.createVNode("div",{class:"thead-custom"},[f.column.label,e.withDirectives(e.createVNode(Oe.Info,{class:"info-icon"},null),[[e.resolveDirective("bk-tooltips"),V]])])}return f.column.label}},c=f=>f.source_type==="system"?"系统变量":f.source_type==="custom"?o.customVariableTypes.find(B=>B.code===f.custom_type)?.name||"自定义":"组件",d=f=>{const _=f.length>1?`确认删除所选的${f.length}个变量?`:`确认删除全局变量"${f[0]}"?`;jn.InfoBox({title:_,content:"若该变量被节点引用,请及时检查并更新节点配置",width:450,headerAlign:"center",footerAlign:"center",confirmText:"确认",cancelText:"取消",onConfirm:()=>{const B={...o.constants};f.slice().forEach(S=>{delete B[S];const T=i.value.indexOf(S);T!==-1&&i.value.splice(T,1)}),a("updateConstants",B),b(f)},onCancel:()=>{}})},u=(f,_)=>{a("edit",_)},v=f=>{f?i.value=Object.keys(o.constants):i.value=[]},k=(f,_)=>{const B=i.value.indexOf(_);f?B===-1&&i.value.push(_):B!==-1&&i.value.splice(B,1)},h=f=>{if(o.variablesReference?.defined&&f in o.variablesReference.defined){const{activities:_,conditions:B,constants:S}=o.variablesReference.defined[f];return _.length+B.length+S.length}return 0},p=()=>{d(i.value)},w=f=>{d([f.key])},m=f=>{const _=document.createElement("textarea");_.value=f.toString(),document.body.appendChild(_),_.select(),document.execCommand("copy"),document.body.removeChild(_),jn.Message({theme:"success",message:"复制成功"})},g=(f,_)=>{const B={...o.constants};B[f.key]={...f,show_type:_?"show":"hide"},a("updateConstants",B)},y=(f,_)=>{a("outputChange",f,_)},b=f=>{a("delete",f)};return(f,_)=>{const B=e.resolveComponent("bk-button"),S=e.resolveComponent("bk-checkbox"),T=e.resolveComponent("bk-table-column"),V=e.resolveComponent("bk-overflow-title"),L=e.resolveComponent("bk-switcher"),z=e.resolveComponent("bk-popover"),Z=e.resolveComponent("bk-table"),Y=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",Rc,[e.createElementVNode("div",zc,[e.createElementVNode("div",Ic,[e.createVNode(B,{theme:"primary",onClick:_[0]||(_[0]=P=>a("create"))},{default:e.withCtx(()=>[..._[7]||(_[7]=[e.createTextVNode("新建",-1)])]),_:1}),i.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(B,{onClick:p},{default:e.withCtx(()=>[..._[8]||(_[8]=[e.createTextVNode("删除",-1)])]),_:1}),e.createElementVNode("span",null,"已选择"+e.toDisplayString(i.value.length)+"项",1),e.createVNode(B,{class:"clear-checked-btn",theme:"primary",size:"small",text:"",onClick:_[1]||(_[1]=P=>i.value=[])},{default:e.withCtx(()=>[..._[9]||(_[9]=[e.createTextVNode(" 清空 ",-1)])]),_:1})],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",$c,[e.createVNode(S,{modelValue:r.value,"onUpdate:modelValue":_[2]||(_[2]=P=>r.value=P)},{default:e.withCtx(()=>[..._[10]||(_[10]=[e.createTextVNode("隐藏系统变量",-1)])]),_:1},8,["modelValue"])])]),e.createElementVNode("div",Uc,[e.createVNode(Z,{data:s.value,border:["outer"],thead:l,onRowClick:u},{default:e.withCtx(()=>[e.createVNode(T,{"min-width":40,width:40},{default:e.withCtx(({row:P})=>[e.createElementVNode("div",jc,[P.source_type==="system"?(e.openBlock(),e.createElementBlock("i",Gc)):(e.openBlock(),e.createElementBlock("span",{key:1,onClick:_[3]||(_[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(S,{"model-value":i.value.includes(P.key),disabled:!o.editable,onChange:x=>k(x,P.key)},null,8,["model-value","disabled","onChange"])]))])]),_:1}),e.createVNode(T,{label:"名称",prop:"name",width:150},{default:e.withCtx(({row:P})=>[e.createElementVNode("div",qc,[e.createVNode(V,{type:"tips"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(P.name),1)]),_:2},1024)])]),_:1}),e.createVNode(T,{label:"KEY",prop:"key","min-width":120},{default:e.withCtx(({row:P})=>[e.createElementVNode("div",Hc,[e.createVNode(V,{type:"tips"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(P.key),1)]),_:2},1024)]),e.createElementVNode("span",Wc,[e.withDirectives(e.createVNode(e.unref(Oe.CopyShape),{onClick:e.withModifiers(x=>m(P.key),["stop"])},null,8,["onClick"]),[[Y,{content:"复制",placement:"top"}]])])]),_:1}),e.createVNode(T,{label:"引用",prop:"reference",width:70,"min-width":60},{default:e.withCtx(({row:P})=>[e.createTextVNode(e.toDisplayString(h(P.key)),1)]),_:1}),e.createVNode(T,{label:"类型",prop:"type",width:80,"min-width":80},{default:e.withCtx(({row:P})=>[e.createTextVNode(e.toDisplayString(c(P)),1)]),_:1}),e.createVNode(T,{label:"显示(入参)",prop:"value",width:110},{default:e.withCtx(({row:P})=>[e.createVNode(L,{theme:"primary",size:"small",value:P.show_type==="show",disabled:!o.editable||["system","component_outputs"].includes(P.source_type),onClick:_[4]||(_[4]=e.withModifiers(()=>{},["stop"])),onChange:x=>g(P,x)},null,8,["value","disabled","onChange"])]),_:1}),e.createVNode(T,{label:"输出",prop:"outputs",width:70,"min-width":60},{default:e.withCtx(({row:P})=>[e.createVNode(L,{theme:"primary",size:"small",value:o.outputs.includes(P.key),disabled:!o.editable||P.source_type==="system",onClick:_[5]||(_[5]=e.withModifiers(()=>{},["stop"])),onChange:x=>y(P.key,x)},null,8,["value","disabled","onChange"])]),_:1}),e.createVNode(T,{label:"操作",prop:"description",width:70,"min-width":70,fixed:"right"},{default:e.withCtx(({row:P})=>[e.createElementVNode("div",Yc,[o.editable&&P.source_type!=="system"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(B,{theme:"primary",size:"small",text:"",onClick:e.withModifiers(x=>a("edit",P),["stop"])},{default:e.withCtx(()=>[..._[11]||(_[11]=[e.createTextVNode(" 编辑 ",-1)])]),_:1},8,["onClick"]),e.createVNode(z,{placement:"bottom",theme:"light","ext-cls":"varibale-table-action-popover",width:90},{content:e.withCtx(()=>[e.createElementVNode("div",{class:"more-action-item",onClick:x=>a("clone",P)},"克隆",8,Zc),e.createElementVNode("div",{class:"more-action-item",onClick:x=>w(P)},"删除",8,Qc)]),default:e.withCtx(()=>[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-more-fill row-action-more",onClick:_[6]||(_[6]=e.withModifiers(()=>{},["stop"]))})]),_:2},1024)],64)):(e.openBlock(),e.createBlock(B,{key:1,theme:"primary",size:"small",text:""},{default:e.withCtx(()=>[..._[12]||(_[12]=[e.createTextVNode("查看",-1)])]),_:1}))])]),_:1})]),_:1},8,["data"])])])}}}),Kc=te(Jc,[["__scopeId","data-v-49065388"]]),Xc=e.defineComponent({__name:"input",props:{modelValue:{type:[String,Number,Boolean],default:""},variable:{},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(o.modelValue),i=e.computed(()=>o.variable.custom_type==="int"?"number":o.variable.custom_type==="textarea"?"textarea":"text");e.watch(()=>o.modelValue,l=>{r.value=l});const s=()=>{a("update:modelValue",r.value),a("change",r.value)};return(l,c)=>{const d=e.resolveComponent("bk-input");return e.openBlock(),e.createBlock(d,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=u=>r.value=u),type:i.value,rows:5,min:0,precision:0,disabled:o.disabled,onBlur:s},null,8,["modelValue","type","disabled"])}}});function xn(){if(typeof self>"u")return;const t=self;t.MonacoEnvironment||(t.MonacoEnvironment={getWorker(n,o){const r={json:"monaco-editor/esm/vs/language/json/json.worker.js",css:"monaco-editor/esm/vs/language/css/css.worker.js",scss:"monaco-editor/esm/vs/language/css/css.worker.js",less:"monaco-editor/esm/vs/language/css/css.worker.js",html:"monaco-editor/esm/vs/language/html/html.worker.js",handlebars:"monaco-editor/esm/vs/language/html/html.worker.js",razor:"monaco-editor/esm/vs/language/html/html.worker.js",typescript:"monaco-editor/esm/vs/language/typescript/ts.worker.js",javascript:"monaco-editor/esm/vs/language/typescript/ts.worker.js"}[o]||"monaco-editor/esm/vs/editor/editor.worker.js";return new Worker(r,{type:"module"})}})}xn();const ed={class:"code-editor"},td=e.defineComponent({__name:"code",props:{modelValue:{default:""},language:{default:"json"},theme:{default:"vs-dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","blur","save"],setup(t,{emit:n}){xn();const o={language:"json",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},wordWrap:"on",wrappingIndent:"same"},a=t,r=n,i=e.ref(),s=e.shallowRef();e.watch(()=>a.modelValue,d=>{const u=s.value?.getValue();d!==u&&s.value?.setValue(d)}),e.watch(()=>a.disabled,d=>{s.value&&s.value.updateOptions({...o,readOnly:d})}),e.onMounted(()=>{l()}),e.onBeforeUnmount(()=>{s.value&&s.value.dispose()});const l=()=>{s.value=Ot.editor.create(i.value,{...o,readOnly:a.disabled,value:a.modelValue,language:a.language});const d=s.value.getModel();d&&(d.setEOL(0),d.onDidChangeContent(()=>{const u=s.value?.getValue();c(u)})),s.value.onDidBlurEditorText(()=>{r("blur")})},c=d=>{r("update:modelValue",d),r("change",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("div",ed,[e.createElementVNode("div",{ref_key:"monacoContainerRef",ref:i,class:"editor-instance-container"},null,512)]))}}),nd=te(td,[["__scopeId","data-v-47cfd638"]]),od={class:"bkflow-plugin-form-render-form"},ad={class:"render-form-item-label"},rd={class:"render-form-item-content"},sd=e.defineComponent({__name:"index",props:{variables:{},editable:{type:Boolean,default:!0}},emits:["change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref({});e.watch(()=>o.variables,c=>{r.value=c.reduce((d,u)=>(d[u.key]=u.value===void 0?"":u.value,d),{})},{immediate:!0});const i=(c,d)=>{r.value[c]=d,a("change",r.value)},s=c=>["textarea","input","int"].includes(c.custom_type)?Xc:["json_variable"].includes(c.custom_type)?nd:null,l=c=>{const d={textarea:"文本",input:"输入框",int:"整数",json_variable:"JSON 变量"};return c.name||d[c.custom_type]};return(c,d)=>(e.openBlock(),e.createElementBlock("div",od,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.variables,u=>(e.openBlock(),e.createElementBlock("div",{key:u.key,class:"render-form-item"},[e.createElementVNode("div",ad,e.toDisplayString(l(u)),1),e.createElementVNode("div",rd,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(u)),{"model-value":r.value[u.key],variable:u,disabled:!o.editable,onChange:v=>i(u.key,v)},null,40,["model-value","variable","disabled","onChange"]))])]))),128))]))}}),or=te(sd,[["__scopeId","data-v-5e149c0f"]]),id={class:"bkflow-variable-edit"},ld={class:"basic-info-section"},cd=e.defineComponent({__name:"global-variable-edit",props:{variable:{},editable:{type:Boolean,default:!0},variablesReference:{default:()=>({defined:{},nodefined:{}})},customVariableTypes:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref(ve.cloneDeep(a.variable)),s=e.ref(a.variable.key),l=e.ref(),c={name:[{required:!0,message:"请输入变量名称"}],key:[{validator:g=>g.trim().length>0,message:"KEY不能为空",trigger:"blur"},{validator:g=>/(^\${(?!_env_|_system\.)[a-zA-Z_]\w*}$)|(^(?!_env_|_system\.)[a-zA-Z_]\w*$)/.test(g),message:"变量KEY由英文字母、数字、下划线组成,不允许使用系统变量及业务环境变量命名规则,且不能以数字开头",trigger:"blur"}],validation:[{required:!0,message:"请输入正则校验"}]},d=e.computed(()=>a.variable.source_type!=="custom"?[{value:"component_inputs",label:"组件"},{value:"component_outputs",label:"组件"}]:a.customVariableTypes.filter(g=>["textarea","input","int","json_variable"].includes(g.code)).map(g=>({value:g.code,label:g.name}))),u=e.computed(()=>({...i.value,key:s.value})),v=e.computed(()=>{if(a.variable.key.length>0&&a.variablesReference?.defined&&a.variablesReference.defined[a.variable.key]){const{activities:g,conditions:y,constants:b}=a.variablesReference.defined[a.variable.key];return g.length+y.length+b.length>0}return!1}),k=()=>{i.value.key=s.value,m()},h=g=>{i.value.custom_type=g,["textarea","input"].includes(g)?i.value.validation="^.+$":i.value.validation="",i.value.source_tag=`${g}.${g}`,m()},p=g=>{i.value.value=g[i.value.key],r("change",ve.cloneDeep(i.value))},w=()=>l.value.validate().then(()=>!0).catch(()=>!1),m=()=>{r("change",ve.cloneDeep(i.value))};return n({validate:w}),(g,y)=>{const b=e.resolveComponent("bk-input"),f=e.resolveComponent("bk-form-item"),_=e.resolveComponent("bk-select"),B=e.resolveComponent("bk-option"),S=e.resolveComponent("bk-form"),T=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",id,[e.createElementVNode("div",ld,[y[5]||(y[5]=e.createElementVNode("h4",{class:"variable-edit-section-title"},"基础信息",-1)),e.createVNode(S,{ref_key:"basicInfoFormRef",ref:l,"label-width":130,model:u.value,rules:c},{default:e.withCtx(()=>[e.createVNode(f,{label:"名称",required:"",property:"name"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:i.value.name,"onUpdate:modelValue":y[0]||(y[0]=V=>i.value.name=V),disabled:!a.editable,onChange:m},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(f,{label:"KEY",required:"",property:"key"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(b,{modelValue:s.value,"onUpdate:modelValue":y[1]||(y[1]=V=>s.value=V),disabled:!a.editable||v.value,onBlur:k},null,8,["modelValue","disabled"]),[[T,{content:"变量已被引用,KEY不可修改",disabled:a.editable&&!v.value}]])]),_:1}),e.createVNode(f,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(_,{"model-value":i.value.source_type==="custom"?i.value.custom_type:i.value.source_type,clearable:!1,list:d.value,disabled:!a.editable||i.value.source_type==="component_outputs",onChange:h},null,8,["model-value","list","disabled"])]),_:1}),i.value.custom_type==="input"?(e.openBlock(),e.createBlock(f,{key:0,label:"正则校验",property:"validation"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:i.value.validation,"onUpdate:modelValue":y[2]||(y[2]=V=>i.value.validation=V),disabled:!a.editable,onChange:m},null,8,["modelValue","disabled"])]),_:1})):e.createCommentVNode("",!0),i.value.source_type!=="system"?(e.openBlock(),e.createBlock(f,{key:1,label:"执行时显示",description:"配置为「显示」可在执行时做为任务入参使用,配置为「隐藏」则仅能在流程内部使用"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:i.value.show_type,"onUpdate:modelValue":y[3]||(y[3]=V=>i.value.show_type=V),disabled:!a.editable||i.value.source_type==="component_outputs",clearable:!1,onChange:m},{default:e.withCtx(()=>[e.createVNode(B,{id:"show",name:"显示(入参)"}),e.createVNode(B,{id:"hide",name:"隐藏(非入参)"})]),_:1},8,["modelValue","disabled"])]),_:1})):e.createCommentVNode("",!0),i.value.source_type!=="system"?(e.openBlock(),e.createBlock(f,{key:2,label:"说明"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:i.value.desc,"onUpdate:modelValue":y[4]||(y[4]=V=>i.value.desc=V),type:"textarea",rows:4,resize:!1,disabled:!a.editable,onChange:m},null,8,["modelValue","disabled"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])]),["components_input","custom"].includes(i.value.source_type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y[6]||(y[6]=e.createElementVNode("h4",{class:"variable-edit-section-title"},"默认值",-1)),e.createVNode(or,{variables:[i.value],editable:a.editable,onChange:p},null,8,["variables","editable"])],64)):e.createCommentVNode("",!0)])}}}),dd=te(cd,[["__scopeId","data-v-46dd3716"]]),ud={class:"slider-title"},pd={key:0},fd={class:"sub-title-text"},md={class:"global-variable-slider"},vd={class:"sideslider-footer-buttons"},hd=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1},flowData:{},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0}},emits:["close","update:show","outputChange","change"],setup(t,{emit:n}){const o={create:"新建",edit:"编辑",clone:"克隆",view:"查看"},a=t,r=at(),i=n,s=e.shallowRef({defined:{},nodefined:{}}),l=e.shallowRef(!1),c=e.shallowRef({type:"create",data:Zn(),oldKey:""}),d=e.ref([]),u=e.ref(),v=e.computed(()=>Object.keys(a.flowData.pipeline_tree.constants).length);e.watch(()=>a.show,S=>{S&&(h(),k())});const k=async()=>{if(r?.fetchCustomVariableTypes){const S=await r.fetchCustomVariableTypes();d.value=S.data}},h=async()=>{if(r?.fetchVariableRef){const{activities:S,constants:T,gateways:V}=a.flowData.pipeline_tree,L=await r.fetchVariableRef({template_id:a.flowData.id,activities:S,constants:T,gateways:V});s.value=L.data}},p=()=>{const S=Zn();S.index=v.value,c.value={type:"create",data:S},l.value=!0},w=S=>{c.value={type:!a.editable||S.source_type==="system"?"view":"edit",data:ve.cloneDeep(S),oldKey:S.key},l.value=!0},m=S=>{const T=ve.cloneDeep(S);T.key="",c.value={type:"clone",data:T},l.value=!0},g=S=>{c.value={...c.value,data:S}},y=async()=>{if(await u.value?.validate()){const T={...a.flowData.pipeline_tree.constants};let V=c.value.data.key.trim();/^\$\{\w+\}$/.test(V)||(V=`\${${V}}`,c.value.data.key=V),T[V]=c.value.data,c.value.type==="edit"&&c.value.oldKey!==c.value.data.key&&delete T[c.value.oldKey],l.value=!1,_(T)}},b=(S,T)=>{i("outputChange",S,T)},f=()=>{},_=S=>{i("change",S)},B=()=>{i("close"),i("update:show",!1),l.value=!1};return(S,T)=>{const V=e.resolveComponent("bk-button"),L=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(L,{title:"全局变量","is-show":a.show,width:800,"esc-close":!1,"before-close":B},e.createSlots({header:e.withCtx(()=>[e.createElementVNode("div",ud,[e.createElementVNode("span",{class:e.normalizeClass([l.value?"main-title-text":""]),onClick:T[0]||(T[0]=z=>l.value=!1)},"全局变量",2),l.value?(e.openBlock(),e.createElementBlock("span",pd,[T[3]||(T[3]=e.createElementVNode("span",null,">",-1)),e.createElementVNode("span",fd,e.toDisplayString(o[c.value.type]),1)])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",md,[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Kc,{key:0,constants:a.flowData.pipeline_tree.constants,"system-variables":a.systemVariables,outputs:a.flowData.pipeline_tree.outputs,"variables-reference":s.value,"custom-variable-types":d.value,editable:a.editable,onCreate:p,onEdit:w,onClone:m,onDelete:f,onUpdateConstants:_,onOutputChange:b},null,8,["constants","system-variables","outputs","variables-reference","custom-variable-types","editable"])),l.value?(e.openBlock(),e.createBlock(dd,{key:1,ref_key:"variableEditRef",ref:u,editable:a.editable&&c.value.type!=="view",variable:c.value.data,"variables-reference":s.value,"custom-variable-types":d.value,onChange:g},null,8,["editable","variable","variables-reference","custom-variable-types"])):e.createCommentVNode("",!0)])]),_:2},[l.value?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",vd,[a.editable&&c.value.type!=="view"&&c.value.data.source_type!=="system"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(V,{theme:"primary",onClick:y},{default:e.withCtx(()=>[...T[4]||(T[4]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(V,{onClick:T[1]||(T[1]=z=>l.value=!1)},{default:e.withCtx(()=>[...T[5]||(T[5]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(V,{key:1,theme:"primary",onClick:T[2]||(T[2]=z=>l.value=!1)},{default:e.withCtx(()=>[...T[6]||(T[6]=[e.createTextVNode("返回",-1)])]),_:1}))])]),key:"0"}:void 0]),1032,["is-show"])}}}),gd=te(hd,[["__scopeId","data-v-7400bcc9"]]),wd={key:0,class:"desc"},yd={class:"section-content"},bd=e.defineComponent({__name:"index",props:{title:{},desc:{}},setup(t){const n=t,o=e.ref(!1),a=()=>{o.value=!o.value},r=c=>{const d=c;d.style.height="0",d.offsetHeight,d.style.height=`${c.scrollHeight}px`},i=c=>{const d=c;d.style.height=""},s=c=>{const d=c;d.style.height=`${d.scrollHeight}px`,d.offsetHeight,d.style.height="0"},l=c=>{const d=c;d.style.height=""};return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["section-container",{fold:o.value}])},[e.createElementVNode("div",{class:"section-title",onClick:a},[e.createVNode(e.unref(Oe.AngleUpFill),{class:"arrow-icon"}),e.createTextVNode(" "+e.toDisplayString(n.title)+" ",1),n.desc?(e.openBlock(),e.createElementBlock("span",wd,e.toDisplayString(n.desc),1)):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"fold",css:!0,onEnter:r,onAfterEnter:i,onLeave:s,onAfterLeave:l},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",yd,[e.renderSlot(c.$slots,"default",{},void 0,!0)],512),[[e.vShow,!o.value]])]),_:3})],2))}}),xt=te(bd,[["__scopeId","data-v-c8f4294f"]]),kd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAG%20yUlEQVRo3u2Zf2yVVxnHP897bymMArdjFV00zgGbLmFuiRkIjs0y3R9uWcyIzDmTVcqaOLUm8mMb%20WdAExF/ZIALK1oFCoSyLxmVGwqIIGkZNlmFrBTp+DDfnipEVNgrt7X2fr3+8t7e3t/f29uemSb/J%20Se59z/M+53zPec7z47wwjnGM4/8aNtwXa06tHrB/68x1/3sEciZtQAKYmvXMgXeAC+8VmaIEHjrx%20WPRDYDGbCHwSuBmYCXwY+GCWrm7gLHAGOAkcAVoUKuwZ6anZ33/vCCx79VEkEcSCacDngCXATcBH%20gNIiui8CbwAvA78EGj30DjPj6evWjz2BZa2PQowAZ76ZfQe4Aygb5jjngH2SthBwmBB/+vrRIZGX%20QPWxR7DArgDuB1ZizB6V0cQJ4EfAbrku1X3iB6NPoProKghsokENsAYoH5XJ96Id+J5gK67Ouht+%20OCJl8X6MjLjEg4LvEnmZ3MHPAFOAjwGxAnpD4DXgXeCanEUoJ9KdNKOO6OAPG0H2n6rmlbjzGbmW%20IyWQyGptSGuQFiN9FWkvkufIkH62Ny2zOP1OW45MQq5vuzO3qnnliHagD4Eg4EqkpUgz5SKn/Umu%20HcBpoFGurXJ15JHrkOvnQCNwWq6dcv05Vw5pFlJ1EHDlqBCoalqBxE0Sd/dfVJBISYRhtxN251v4%20TJNEchBygcQXJG6oaloxbALZZ6BErs9iNi2vpFQJVAEvAFfJVQNMxixXrgz4JpH9vynXPcCtkb9Q%20rtbpwC2e8sM1p1aHPQ+HErkzo1c1rZgG/BqoHEC+nehwlhFF4mKH+HxarhxIEqUYbRivGtaGcQ6j%20JV4aP2iBdWIk6aKTkjSRWcWJ9BL46/IKoJne1GC00A0cscAag5LY60E8KDOzG4GrMSqAacDbRFG7%20FXEYaDKzVndPwsDpR4bAg0eWfwBoASpGPGWlTcWsCeM38YnxVBAL5gC3m1kFBQKoEIgQOAH8FngO%20eEWuFEC+6J05A3KJKJscDYTA3ljcdsYmxhcBX5RUEXFTsXdjwMfT7W7gZxjbPfR38gn3ulEplcdf%20D6c5UkOsNPZMrDT+MKIaUYFgGO16xFrEOjObUX3skcIEJLokmuUa/txdyDkUlMQaglhQK2mhpCBP%20rBh8k8rkqkGsAsqWtqzKb0JInRIHgfuRCnmXYjhrAZuCeHCXXAtz+oTRbNgeYIpQFeJDWf0dGA2G%20HRW6A3EnvV6uBKgGjprZNrJMPTsSO9J+pMYRmM/z8dJ4iFiCCHLMoQNnbZgKf+yhr8XZntP/Is7j%20YTLciLMGcSKnfwriIUmzv9bcG/gyBHbc8iQSZyTqJS6kzWHwTZyT+CPGnXIl+puDu9zPmwiRknJ/%20N6e/Q+6XzHC5X5R7d44pIfeb5X5b9rxzs1EhNSBuBJaB+mWrBSFOx0pjb8n1qZyd7cFkoggNIgHc%20lxOZeyL9y4jFwLV9+pWZ7+eB3UQVX18C9Z/ewAMv1V4QWgfMAO6hcLTtZ/9BPDCkQvVDDLgLuD1N%20MLe6uxpYD3SlyZYU0DOHqJy92MeEMiTmb8SwNxHLEfWIDknF3J3k+lf6KFiRBG6qRFmB/kkSCYmS%20AXSUS72Lmm+rqV+wEeA1Scvl2obTXczdITrTv21EbrN483TQzdhUfpOWkPgPUgfFr18MmIWUZIQV%201iBwMnuMoJDU7lt/ikJdJWeBnLgcEMcRmxB1iD8gTiHOpz3RhFRn+G+J18d0B8Q+iY6iO7Dk918H%20aR5wLfAPsJ2CX0n8HSgxYzpRPj8ZmAS8nUqm/hmU2CHEQgZ/+AcP4w2kFy0IMjswkJuMIaYTuazt%204CexoDtdv3QDl4hS4F79ZuDUA18Crhvl6XcitgCv7Jj7RObhQARM0vPALgssBQYSeyo3DzjKAy/V%20ngKeAH6C0q5y2FfI9Ph/x3gB+IUF1ueMDUQgRVRRFZ107nsSu5CuAb4FXNG/khwyhX1gj5vRtnPe%20hr6rPCLVBfCVQ7XgKhOsIrogG26R1An8DnjMYkHrrvkb+gkEQ9U4GOxasBGMi0jrkWqRDiB1DdXj%20IL2F9KQZrXj+Wmv0PUUaf9v2F+ZUze1OJGi5fJkDwHGkONGtXg96ripC4DLpm4z0wk5COGK/p/xY%20w22b8o4zJiaUjS8fjPI3urqMCRPKkGYouqL/aLpBdNtxnCjfPytpAbAUmAfUIVbvqdycN0COOYEM%20kQPf6B3UDDOjtDT6xJBMJnH3TL1sZnjoCeBeoFzSM88u2tL+vhIYKu7b/zDt7e0kEompwOVnF23J%20uwNjcohHA3sqN5NIJCD65jbW+dU4xjGO9wv/BfVAV6WfUfulAAAAJXRFWHRkYXRlOmNyZWF0ZQAy%20MDI0LTEwLTE2VDA5OjM5OjAzKzAyOjAwmO75JgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0xMC0x%20NlQwOTozOTowMyswMjowMOmzQZoAAAAASUVORK5CYII='%20/%3e%3c/svg%3e",Cd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAG%20XklEQVRo3u3Za4xVVxUH8N+ducPADMggUCullJaSipRaAV/F1GKoreKHprZa0ajRItH6ikkj1pQq%20qRofMbY+GiB9aB8qGGqJr7a0aInNqGDBkaZpSbEPaGGGDjq8Zi53jh/WmblnLsPceZImspKdOXfv%20c/Ze/7X22mv993BKTsn/t+SGPMPK1srvrJjwKgNwvNI55FFd1l9AcSTBDAxAT8VPw1mYkrbXpS0r%20z6ftWbyI3egcTiCVAfRUuhpvw7sxH29Jla8kLdiOv+IP+Dvau0eHAKa/APK4AJ/C5Tj7BN8maavq%20Y8Zd2Ijb0IRjQwHRN4BQfiKWYpnYMtlvDuFl7MN+sU06MAZT0SC22lTUlgHdhR/jbrQML4DStnkD%20voIlGJVZfDc24c/YgZ0pgKRspomYiQtxMRZhcmb8INbiRuwZjCfyfYydh+/hfUpb4r/4BX6GJ/Gf%20Hl+UL76ydX8KrBG/wjxci8UYm7aPi9i6oRvEkDwQ1j8Dq/DejPL/xDfxWxw+odInkpJXG3AVlmNG%202lfEPbgezQPxQs9gi0XG4gt4TzqeYDOuE+4+3K34QNxdevcA7sBnsCXtq8Y1whs1g/fAytYcrsRP%20RfARx9+12DJsSajkjUvxExEn8G98GI39Xav8uJuCT2eU34ebMpYaHikp9wi+ji5E04Wn6/o7VQlA%20WGUuLkp7EqzDo2WLDieITtyP9ZmRi/HWftVYenqgFpeIGCBKgF+ibcSKsZj3CO5Fc9o7BW/XzzIn%20C2AM3pk+J+LUGb5937dsx2Ppcx7n4zUDBdCAc9LnAh7H0RFXPQzUiqcyvacPBsAUpcTWgadOkvUJ%20j78gDEdUteMGCqBGad8V8crJ0t6KCST5vZL8Y5LqRqV6qqKcqJSoFltqxGXOxvjbsueGnaPrmlYV%20i+OP7tn1nepjHafvHiiA51PkhDdmWNk6onQwI3MnTfnRNzAbHQ2TH7gzn7fxH/34MLuFWsU+JI7U%20uY6niCMho0Wmf7/gGeclnZYXOszp8k5/ARzF37JWwaz+JpTBSjG8Pb2su0GUF1WVvs++0I4/isQC%2054q6KD9SIJItLB6lvS7X65F9GcZU8kIWQCI466b09yhRHV5kmCXZEg3jvlvnE78epwZfFmXLi+lr%20i7Gw0lzl1Sh8FLeiK3ofEqXvsxh0UCc9y8Ec5uCT+BhWzzlgeS4Y3JtFPHxIHCzLmhpbtuksC8dU%20j6peOh/AfbrIdpS8K3GmoV+ETRPl8i3pGtcJgn/LvxYh2NtGQXaWoTpJRr3LkfoZqWHn68mtew2S%20Nnw7tXyXta7BGpw9mHhIrT9XVLdrUsVnCwr5A7wETYuiiXjYkMu59OknGveoPbpBMMTf40sypKcv%20Uj8vtdSCzMhnsVr5bVtPDx5/c3ewQfLB3G2Ca2SNdju+iEO5+T0/mf1QnR2P75+sqn01yRWZoecw%2034oJLfRN6remk9+NWWlfg6jhq1GfGuBYarFiL94ZhTFVY1sLojjLKn9ITmOyy6Gqq45ffEfjbqqO%20ziwzIJE3ug3fO4AVE7qs2CTufWaJLL1NnNlXiGOuNh3fLpLg3nSGKlFRvhELOlWtV+MeBQvxepDY%20muz1p+KDFJZSs+Y4LfIi/iaV9W9WOuorXmxNFYxpvuCrawXZWGBgWfqRc+ue+9wzCy+cJ3GJKm3J%20TtuLD5slyvbfSbdlvkhu+gEk5wumNlPEyrbUoPeiqWu75issPEGJn04WtxWj098H00VHi6Dq7UAo%20igR5wc7D05fk1iY3J1fn7jdNR/H7TlNvCT4i7qDuQ3NbvQ7V4ycpHvia4Oa34+d4RnD0HvFXCcBE%20JYpZn/5twV/SSVvwJkGEztGTjDeLgHsaT5C8oF0BHZox2ktYIa5Ybhbn/qP1R2y9uu2utnV1V9bS%20+VXcld0y5XmoEoAWUeRNSy3+cGqpjeJ+hxIVrCyvPaDrtCks7c78d+Bb4tSb15nTvuqVz687o/jy%20TT8cf/2TOtuKvSneJZVioEZkxQ/gwbTt62vCgUphqempEc7MdB/OJy7PnVXY7Ma+77kqeaCA36SK%20D/w6sX+yX/DhLID8sZx8JeWpVK6GoonBXif2T45gg9iiXbJJ3HhXlEoeOBmM7JhIls14h7jxXq9U%20lfYpQ/8v5TBIYWn3Y63I9AV6TW6vTgBlIPRX+VNySk4J/wPavNXBV0/3hwAAACV0RVh0ZGF0ZTpj%20cmVhdGUAMjAyNC0xMC0xNlQwNzozODowMyswMDowMCfDViMAAAAldEVYdGRhdGU6bW9kaWZ5ADIw%20MjQtMTAtMTZUMDc6Mzg6MDMrMDA6MDBWnu6fAAAAAElFTkSuQmCC'%20/%3e%3c/svg%3e",_d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABdFBMVEUAAAD80if2uSH1uCDO%20GQD//2L1tiD2uyH0sh/4wCPxpRz3wCL//3r1tSD3viLwohv80if80if80if80if80if80if80if8%200if80if80if80if80if80if80if//zj80if80if80ifwohvwoRv80if80ifwohvwohvwohv80if8%200if80ifwohvwohvwohvwohvwoBv80if80if80ifwohvwohvwohvwohv+2Cn80if80if80ifwohvw%20ohvwohvwoRv80if80if80ifwohvwohv91Sj80if80if80ifwohvwohvvnxr80if80if80ifwohvw%20ohvwohv91Sj80if80ifwohvwohvwohvqixX80if80if80ifwohvwohvwohv80yf80if80ifwohvw%20ohvwohvslBf//zr80if80ifwohvwohvwoRv80ifwohvwohvwohvwohvwohvwohvwohvwohvwohvw%20ohvwohvwohv80ifwohv///9tjhRAAAAAeXRSTlMAAAAAAAAAAAAAAAAAAAAABBIWT9bpTWzzZBRj%202P4BM6j1IBNw23CkKD6z+YH+0F8OF3zhf++XJANJvPv9xVMHH4btjiIGTMP8vkwGKJDu5YMbC17U%20+rtBAiue8N94GAxp1/eyNwIBOKfbbBQL9ag01GP2gNbpBBIWNnChdAAAAAFiS0dEe0/StfwAAAAH%20dElNRQfoChAHJgNz8rhqAAABhElEQVRIx+3R6TNCURzG8UTaEdlKlvZQKu0iQnRbRCXtaFW0W/r9%209ZbhSF05Xpjxou/Lc57PnLlzKZRBf9UQZghM8CYx4k2gB6b40xjxZxCYnWtjNDePgEC4IPppLloQ%208hCgLi4tr/TfrywvLQ6jjxZLqAKprN9eJhVQJWIE5ArlCE21uvbdfG1VRRtRKuQIrKs1G9pRnX6T%20fL+p141qNzTqdQQMAEaTmW6x2rZ651s2q4VuNhkBDJ0A7Ns7DsbunrN779zbZTh2tu3QDV4e2T9g%20HrqOjjvnx0euQ+bBvvFt0A3A7iY8LK/P/7n3+7wsD+G2AzkAOAmcss+Cofe/KAoFz9ingZOPWxIA%204fPIBScai7/u47Eo5yJyHoZ+ACCRTNHTl1ft9tVlmp5KJjquyAFcZ7K5fKFYLORz2cw1/AwAbkpl%207u0tt1y6+Xr+LYC7SnVsrFq5A1wAUKvXaz2H/QA0GvA7QNYA/DfQxANNBIjWPUYtAoGHxyeMHh8Q%20GMeMMuivegZPNwJ6UuK61QAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNC0xMC0xNlQwNzozODowMysw%20MDowMCfDViMAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjQtMTAtMTZUMDc6Mzg6MDMrMDA6MDBWnu6f%20AAAAAElFTkSuQmCC'%20/%3e%3c/svg%3e",Ad="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABF1BMVEUAAAAhqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvch%20qvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvchqvf////t18AcAAAAW3RSTlMAAA84XHh/%20CjSAwNzxCEKl6vsjiOYCQANM19giwQv5jA3n6UMJDOs5+obDEs+dn948hf7Gee9aFdn2m5L9Ne7l%20MxShFuI/Ab0d1boyHKDkkwYvfLz4tXUuMFNoR3rSMgAAAAFiS0dEXOrYAJcAAAAHdElNRQfoChAL%20JgN66EEOAAABqklEQVRIx9WVaVuCQBCAXbxYFBXxQoWKjLQ0UyvTssvu+7BS5///j7JHEFhksU/1%20fmTm3WVhdsbn+wcgC16yGX8gGPomGPAzNAehMIu5SBR+iEY4zIbdDMTH4gkBTAiJeIxHc5dPiikg%20SIlJ501QOsMJ4IDAZdIOBsrmJJiDlMsicv35+ROD2ANl8uBCPmMTUKEIrhQLFgPJouIuKEvLZgPF%20VoCCumoWSnFaPkB8zbQBm6AL2vpsC4TLdEGozASGo+cDbGwagj8yfVatbRHUqtNgfdsQAtN6hkZJ%20Jig1psFowBCCTS9CM2gIGLy8EmBDCHk5M0Dl9wL2JmDy0FBucUULXMv4p80d8rOClmRsJDU9trtH%20/jhQ28hGW9Vj+6xDaXS6Bza6HT3GMU7F1zy0YRxPwKZq7R3Rv9HxiekGnap04axkunF9unB+cbmQ%20oIgyWki4ura0Gaog+a2NjCYQrZIi3BDN2FVQbu+IVtx36Ut1fE8OFPlB1TmytCjl8an37DRN5L7O%20y+ubpA0myQNNev/45B3nlaWg+eFoPBm749GQ9zKqfYvM9T/BF26JhjZ0x+78AAAAJXRFWHRkYXRl%20OmNyZWF0ZQAyMDI0LTEwLTE2VDA5OjM4OjAzKzAyOjAwdyySGAAAACV0RVh0ZGF0ZTptb2RpZnkA%20MjAyNC0xMC0xNlQwOTozODowMyswMjowMAZxKqQAAAAASUVORK5CYII='%20/%3e%3c/svg%3e",xd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='48px'%20height='48px'%20viewBox='0%200%2048%2048'%20enable-background='new%200%200%2048%2048'%20xml:space='preserve'%3e%3cimage%20id='image0'%20width='48'%20height='48'%20x='0'%20y='0'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJN%20AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABzlBMVEUAAAAzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMz%20zAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAMzzAP///8ahhZ5AAAA%20mHRSTlMAAA84XHh/DDmNwtzxCkOl6/0rkOgDSMYIYN4E59/+9Pcp82k9ZqHXDfyfe140heny0ps3%20QLLlr6z61uxnnvvOTAYBzDtUivDROjza+bh+EsRYg4TgfdMqKM+nJpww1NkuIsiAQeEvc+ZTAhOa%20tUmB9WPj7iBx+AWHTcuwGg5s9tBhMz6iGzViB1Lbox9Qs1umRM12kld67xKguDoAAAABYktHRJkB%201jaoAAAAB3RJTUUH6AoQCycDY/NwTwAAArVJREFUSMfVlflbEkEYxxkOWQ5hAbkRgUQgTQyxQswC%20aS0js7Iyiy5Syw4tyuzU7ssOO+fPbXd2dphdlpLf6n0enmfnZT7zvvPOd97RaP4DAzLbymytTm9o%20482g12n/xgBgZExmixUis1rMJsb4BwKAdpuddUDKHKzd1t4MAcDp6oAN1uFyqhPA7fE6oIo5vB63%20CgF8/gBsYgG/r4EAQX8INrWQP6gkgKdTNiXcZY1Qw06PAgBRr3zN2LbueE8iTMbeqIwASVdKDkS2%209/Y5d/RbpHHKlaQJYEs3Jj6wMzOYHZIWSttowGgXvbt278Glyg3nhdRHontHMWE3UgEYFvn27S8U%20s2Poky0d4BIQjrdFhzDAMvUQwIQCHzwkaG3isPBdPjLJMJkItI5k8T5SpjpwdArt85ggAVCMi/Uc%20TR+PnojA6cGTZZEwawkwgRI/dRotAWbO4CRGZ89moONc5bw4tOgIoEd6vnBRzO/SZalO5aouAROV%20Hqx2PQEM6IBiV1CEYHycVHZungsP9OEcwway56r494IbhbtaP4rcwrU87O3GF6oq7XqRw8d/XfDc%20oA/vZmkYcrcwsCQBYEl0LN8WPNk7FJBjc7CrhiXFLSpSglN3eaJwL9ZE5CQlvGkIVybvAw0wri6r%20zq9vGpeVt9CDIh/Q2K9KUGXVERU/nOdPGyRXhaxW5tgwDVAHpzWTsI8eC8STp4G19WfPX3A1CqCk%20gcUnmOPlK0FQ7tdvKkUA3r57T+bT4pPkjfwfNoQYqEfyv4/kGGl5kwuEiE/82uSfwqzkpy+Q4oqu%20f6431OAX7JRfUUUTqLlmpJw2p3FceRNQtpnU128bPp4Ibo7hyiraTGMjK1u+/2BKPyVdNTQytVYZ%20zv+SPlVaZcvNuPV23/qD0vqTpWn5UdS0/uxKzNYf9n/BfgOj3RPg/kA9xAAAACV0RVh0ZGF0ZTpj%20cmVhdGUAMjAyNC0xMC0xNlQwOTozOTowMyswMjowMJju+SYAAAAldEVYdGRhdGU6bW9kaWZ5ADIw%20MjQtMTAtMTZUMDk6Mzk6MDMrMDI6MDDps0GaAAAAAElFTkSuQmCC'%20/%3e%3c/svg%3e",tn={},En={setInstance(t,n,o){tn[t]||(tn[t]={}),tn[t][n]=o},getInstance(t,n){return tn[t][n]}};let Ed=0;function ar(t,n={},o={}){return new Promise((a,r)=>{const i=`USER_LIST_CALLBACK_${Ed+=1}`;window[i]=c=>{document.body.removeChild(s),delete window[i],a(c)};const s=document.createElement("script");s.onerror=c=>{document.body.removeChild(s),delete window[i],r("Get user list failed.")};const l=[];for(const c in n)l.push(`${c}=${n[c]}`);s.src=`${t}?${l.join("&")}&callback=${i}`,o.timeout&&setTimeout(()=>{document.body.removeChild(s),delete window[i],r("Get user list timeout.")},o.timeout),document.body.appendChild(s)})}const zn=new Map;function co(t){if(zn.has(t))return zn.get(t);const n=new Map;return zn.set(t,n),n}function rr(t,n){const o=co(t);n.forEach(a=>o.set(a.username,a))}function Qo(t,n){const o=co(t),a=[];return n.forEach(r=>{o.has(r)&&a.push(o.get(r))}),a}async function Jo(t,n,o){const a=co(t),r=[...new Set(n)].filter(s=>!a.has(s));if(!r.length)return Promise.resolve(Qo(t,n));const i=[];r.reduce((s,l,c)=>s.length<100?(s.push(l),c===r.length-1&&i.push(s),s):(i.push(s),[]),[]);try{(await Promise.all(i.map(l=>ar(t,{app_code:"bk-magicbox",exact_lookups:l.join(","),page_size:100,page:1},o)))).forEach(l=>{l.code===0&&rr(t,l.data.results||[])})}catch(s){console.error(s)}return Promise.resolve(Qo(t,n))}function Bd(t){const n={setup(){const{proxy:r}=e.getCurrentInstance();En.setInstance("exactSearch",t,r);const i=e.ref("");i.value=t;const s=e.ref([]);e.watch(()=>s,d=>{d.value.length&&c()},{deep:!0});const l=d=>new Promise(u=>{s.value.push({resolve:u,usernames:d})}),c=async()=>{const d=[...s.value];s.value=[];try{const u=d.reduce((h,{usernames:p})=>h.concat(p),[]),v=await Pt.exactSearch(i.value,u),k={};v.forEach(h=>{k[h.username]=h}),d.forEach(({resolve:h,usernames:p})=>{const w=[];p.forEach(m=>{k.hasOwnProperty(m)&&w.push(k[m])}),h(w)})}catch(u){d.forEach(({resolve:v})=>{v([])}),console.error(u)}};return{api:i,queue:s,search:l,dispatchSeach:c}},render(){return null}},o=e.createApp(n),a=document.createElement("div");return o.mount(a),o}const Pt={async fuzzySearch(t,n,o){const a={};try{const r=await ar(t,n,o);if(r.code!==0)throw new Error(r);a.count=r.data.count,a.results=r.data.results||[],rr(t,a.results)}catch(r){console.error(r.message),a.count=0,a.results=[]}return a},async exactSearch(t,n,o){const a=Array.isArray(n),i=await Jo(t,a?n:[n],o);return a?i:i[0]},pasteValidate(t,n,o){return Jo(t,n,o)},scheduleExactSearch(t,n){const o=Array.isArray(n)?n:[n];return Bd(t),En.getInstance("exactSearch",t).search(o)}};var Se="top",$e="bottom",Ue="right",Le="left",uo="auto",Yt=[Se,$e,Ue,Le],Bt="start",It="end",Vd="clippingParents",sr="viewport",Lt="popper",Nd="reference",Ko=Yt.reduce(function(t,n){return t.concat([n+"-"+Bt,n+"-"+It])},[]),ir=[].concat(Yt,[uo]).reduce(function(t,n){return t.concat([n,n+"-"+Bt,n+"-"+It])},[]),Dd="beforeRead",Td="read",Md="afterRead",Sd="beforeMain",Ld="main",Pd="afterMain",Od="beforeWrite",Fd="write",Rd="afterWrite",zd=[Dd,Td,Md,Sd,Ld,Pd,Od,Fd,Rd];function Ke(t){return t?(t.nodeName||"").toLowerCase():null}function Fe(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function gt(t){var n=Fe(t).Element;return t instanceof n||t instanceof Element}function Ie(t){var n=Fe(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function po(t){if(typeof ShadowRoot>"u")return!1;var n=Fe(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function Id(t){var n=t.state;Object.keys(n.elements).forEach(function(o){var a=n.styles[o]||{},r=n.attributes[o]||{},i=n.elements[o];!Ie(i)||!Ke(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var l=r[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function $d(t){var n=t.state,o={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,o.popper),n.styles=o,n.elements.arrow&&Object.assign(n.elements.arrow.style,o.arrow),function(){Object.keys(n.elements).forEach(function(a){var r=n.elements[a],i=n.attributes[a]||{},s=Object.keys(n.styles.hasOwnProperty(a)?n.styles[a]:o[a]),l=s.reduce(function(c,d){return c[d]="",c},{});!Ie(r)||!Ke(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(c){r.removeAttribute(c)}))})}}const lr={name:"applyStyles",enabled:!0,phase:"write",fn:Id,effect:$d,requires:["computeStyles"]};function Je(t){return t.split("-")[0]}var mt=Math.max,hn=Math.min,Vt=Math.round;function Xn(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function cr(){return!/^((?!chrome|android).)*safari/i.test(Xn())}function Nt(t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);var a=t.getBoundingClientRect(),r=1,i=1;n&&Ie(t)&&(r=t.offsetWidth>0&&Vt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Vt(a.height)/t.offsetHeight||1);var s=gt(t)?Fe(t):window,l=s.visualViewport,c=!cr()&&o,d=(a.left+(c&&l?l.offsetLeft:0))/r,u=(a.top+(c&&l?l.offsetTop:0))/i,v=a.width/r,k=a.height/i;return{width:v,height:k,top:u,right:d+v,bottom:u+k,left:d,x:d,y:u}}function fo(t){var n=Nt(t),o=t.offsetWidth,a=t.offsetHeight;return Math.abs(n.width-o)<=1&&(o=n.width),Math.abs(n.height-a)<=1&&(a=n.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:a}}function dr(t,n){var o=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(o&&po(o)){var a=n;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function ot(t){return Fe(t).getComputedStyle(t)}function Ud(t){return["table","td","th"].indexOf(Ke(t))>=0}function lt(t){return((gt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Bn(t){return Ke(t)==="html"?t:t.assignedSlot||t.parentNode||(po(t)?t.host:null)||lt(t)}function Xo(t){return!Ie(t)||ot(t).position==="fixed"?null:t.offsetParent}function jd(t){var n=/firefox/i.test(Xn()),o=/Trident/i.test(Xn());if(o&&Ie(t)){var a=ot(t);if(a.position==="fixed")return null}var r=Bn(t);for(po(r)&&(r=r.host);Ie(r)&&["html","body"].indexOf(Ke(r))<0;){var i=ot(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||n&&i.willChange==="filter"||n&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Zt(t){for(var n=Fe(t),o=Xo(t);o&&Ud(o)&&ot(o).position==="static";)o=Xo(o);return o&&(Ke(o)==="html"||Ke(o)==="body"&&ot(o).position==="static")?n:o||jd(t)||n}function mo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ft(t,n,o){return mt(t,hn(n,o))}function Gd(t,n,o){var a=Ft(t,n,o);return a>o?o:a}function ur(){return{top:0,right:0,bottom:0,left:0}}function pr(t){return Object.assign({},ur(),t)}function fr(t,n){return n.reduce(function(o,a){return o[a]=t,o},{})}var qd=function(n,o){return n=typeof n=="function"?n(Object.assign({},o.rects,{placement:o.placement})):n,pr(typeof n!="number"?n:fr(n,Yt))};function Hd(t){var n,o=t.state,a=t.name,r=t.options,i=o.elements.arrow,s=o.modifiersData.popperOffsets,l=Je(o.placement),c=mo(l),d=[Le,Ue].indexOf(l)>=0,u=d?"height":"width";if(!(!i||!s)){var v=qd(r.padding,o),k=fo(i),h=c==="y"?Se:Le,p=c==="y"?$e:Ue,w=o.rects.reference[u]+o.rects.reference[c]-s[c]-o.rects.popper[u],m=s[c]-o.rects.reference[c],g=Zt(i),y=g?c==="y"?g.clientHeight||0:g.clientWidth||0:0,b=w/2-m/2,f=v[h],_=y-k[u]-v[p],B=y/2-k[u]/2+b,S=Ft(f,B,_),T=c;o.modifiersData[a]=(n={},n[T]=S,n.centerOffset=S-B,n)}}function Wd(t){var n=t.state,o=t.options,a=o.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||dr(n.elements.popper,r)&&(n.elements.arrow=r))}const Yd={name:"arrow",enabled:!0,phase:"main",fn:Hd,effect:Wd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Dt(t){return t.split("-")[1]}var Zd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qd(t,n){var o=t.x,a=t.y,r=n.devicePixelRatio||1;return{x:Vt(o*r)/r||0,y:Vt(a*r)/r||0}}function ea(t){var n,o=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,l=t.position,c=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,v=t.isFixed,k=s.x,h=k===void 0?0:k,p=s.y,w=p===void 0?0:p,m=typeof u=="function"?u({x:h,y:w}):{x:h,y:w};h=m.x,w=m.y;var g=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Le,f=Se,_=window;if(d){var B=Zt(o),S="clientHeight",T="clientWidth";if(B===Fe(o)&&(B=lt(o),ot(B).position!=="static"&&l==="absolute"&&(S="scrollHeight",T="scrollWidth")),B=B,r===Se||(r===Le||r===Ue)&&i===It){f=$e;var V=v&&B===_&&_.visualViewport?_.visualViewport.height:B[S];w-=V-a.height,w*=c?1:-1}if(r===Le||(r===Se||r===$e)&&i===It){b=Ue;var L=v&&B===_&&_.visualViewport?_.visualViewport.width:B[T];h-=L-a.width,h*=c?1:-1}}var z=Object.assign({position:l},d&&Zd),Z=u===!0?Qd({x:h,y:w},Fe(o)):{x:h,y:w};if(h=Z.x,w=Z.y,c){var Y;return Object.assign({},z,(Y={},Y[f]=y?"0":"",Y[b]=g?"0":"",Y.transform=(_.devicePixelRatio||1)<=1?"translate("+h+"px, "+w+"px)":"translate3d("+h+"px, "+w+"px, 0)",Y))}return Object.assign({},z,(n={},n[f]=y?w+"px":"",n[b]=g?h+"px":"",n.transform="",n))}function Jd(t){var n=t.state,o=t.options,a=o.gpuAcceleration,r=a===void 0?!0:a,i=o.adaptive,s=i===void 0?!0:i,l=o.roundOffsets,c=l===void 0?!0:l,d={placement:Je(n.placement),variation:Dt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,ea(Object.assign({},d,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:c})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,ea(Object.assign({},d,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const Kd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Jd,data:{}};var nn={passive:!0};function Xd(t){var n=t.state,o=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,l=s===void 0?!0:s,c=Fe(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&d.forEach(function(u){u.addEventListener("scroll",o.update,nn)}),l&&c.addEventListener("resize",o.update,nn),function(){i&&d.forEach(function(u){u.removeEventListener("scroll",o.update,nn)}),l&&c.removeEventListener("resize",o.update,nn)}}const eu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Xd,data:{}};var tu={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(t){return t.replace(/left|right|bottom|top/g,function(n){return tu[n]})}var nu={start:"end",end:"start"};function ta(t){return t.replace(/start|end/g,function(n){return nu[n]})}function vo(t){var n=Fe(t),o=n.pageXOffset,a=n.pageYOffset;return{scrollLeft:o,scrollTop:a}}function ho(t){return Nt(lt(t)).left+vo(t).scrollLeft}function ou(t,n){var o=Fe(t),a=lt(t),r=o.visualViewport,i=a.clientWidth,s=a.clientHeight,l=0,c=0;if(r){i=r.width,s=r.height;var d=cr();(d||!d&&n==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}return{width:i,height:s,x:l+ho(t),y:c}}function au(t){var n,o=lt(t),a=vo(t),r=(n=t.ownerDocument)==null?void 0:n.body,i=mt(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=mt(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-a.scrollLeft+ho(t),c=-a.scrollTop;return ot(r||o).direction==="rtl"&&(l+=mt(o.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:l,y:c}}function go(t){var n=ot(t),o=n.overflow,a=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+a)}function mr(t){return["html","body","#document"].indexOf(Ke(t))>=0?t.ownerDocument.body:Ie(t)&&go(t)?t:mr(Bn(t))}function Rt(t,n){var o;n===void 0&&(n=[]);var a=mr(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),i=Fe(a),s=r?[i].concat(i.visualViewport||[],go(a)?a:[]):a,l=n.concat(s);return r?l:l.concat(Rt(Bn(s)))}function eo(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ru(t,n){var o=Nt(t,!1,n==="fixed");return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}function na(t,n,o){return n===sr?eo(ou(t,o)):gt(n)?ru(n,o):eo(au(lt(t)))}function su(t){var n=Rt(Bn(t)),o=["absolute","fixed"].indexOf(ot(t).position)>=0,a=o&&Ie(t)?Zt(t):t;return gt(a)?n.filter(function(r){return gt(r)&&dr(r,a)&&Ke(r)!=="body"}):[]}function iu(t,n,o,a){var r=n==="clippingParents"?su(t):[].concat(n),i=[].concat(r,[o]),s=i[0],l=i.reduce(function(c,d){var u=na(t,d,a);return c.top=mt(u.top,c.top),c.right=hn(u.right,c.right),c.bottom=hn(u.bottom,c.bottom),c.left=mt(u.left,c.left),c},na(t,s,a));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function vr(t){var n=t.reference,o=t.element,a=t.placement,r=a?Je(a):null,i=a?Dt(a):null,s=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2,c;switch(r){case Se:c={x:s,y:n.y-o.height};break;case $e:c={x:s,y:n.y+n.height};break;case Ue:c={x:n.x+n.width,y:l};break;case Le:c={x:n.x-o.width,y:l};break;default:c={x:n.x,y:n.y}}var d=r?mo(r):null;if(d!=null){var u=d==="y"?"height":"width";switch(i){case Bt:c[d]=c[d]-(n[u]/2-o[u]/2);break;case It:c[d]=c[d]+(n[u]/2-o[u]/2);break}}return c}function $t(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=a===void 0?t.placement:a,i=o.strategy,s=i===void 0?t.strategy:i,l=o.boundary,c=l===void 0?Vd:l,d=o.rootBoundary,u=d===void 0?sr:d,v=o.elementContext,k=v===void 0?Lt:v,h=o.altBoundary,p=h===void 0?!1:h,w=o.padding,m=w===void 0?0:w,g=pr(typeof m!="number"?m:fr(m,Yt)),y=k===Lt?Nd:Lt,b=t.rects.popper,f=t.elements[p?y:k],_=iu(gt(f)?f:f.contextElement||lt(t.elements.popper),c,u,s),B=Nt(t.elements.reference),S=vr({reference:B,element:b,placement:r}),T=eo(Object.assign({},b,S)),V=k===Lt?T:B,L={top:_.top-V.top+g.top,bottom:V.bottom-_.bottom+g.bottom,left:_.left-V.left+g.left,right:V.right-_.right+g.right},z=t.modifiersData.offset;if(k===Lt&&z){var Z=z[r];Object.keys(L).forEach(function(Y){var P=[Ue,$e].indexOf(Y)>=0?1:-1,x=[Se,$e].indexOf(Y)>=0?"y":"x";L[Y]+=Z[x]*P})}return L}function lu(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=o.boundary,i=o.rootBoundary,s=o.padding,l=o.flipVariations,c=o.allowedAutoPlacements,d=c===void 0?ir:c,u=Dt(a),v=u?l?Ko:Ko.filter(function(p){return Dt(p)===u}):Yt,k=v.filter(function(p){return d.indexOf(p)>=0});k.length===0&&(k=v);var h=k.reduce(function(p,w){return p[w]=$t(t,{placement:w,boundary:r,rootBoundary:i,padding:s})[Je(w)],p},{});return Object.keys(h).sort(function(p,w){return h[p]-h[w]})}function cu(t){if(Je(t)===uo)return[];var n=cn(t);return[ta(t),n,ta(n)]}function du(t){var n=t.state,o=t.options,a=t.name;if(!n.modifiersData[a]._skip){for(var r=o.mainAxis,i=r===void 0?!0:r,s=o.altAxis,l=s===void 0?!0:s,c=o.fallbackPlacements,d=o.padding,u=o.boundary,v=o.rootBoundary,k=o.altBoundary,h=o.flipVariations,p=h===void 0?!0:h,w=o.allowedAutoPlacements,m=n.options.placement,g=Je(m),y=g===m,b=c||(y||!p?[cn(m)]:cu(m)),f=[m].concat(b).reduce(function(oe,ee){return oe.concat(Je(ee)===uo?lu(n,{placement:ee,boundary:u,rootBoundary:v,padding:d,flipVariations:p,allowedAutoPlacements:w}):ee)},[]),_=n.rects.reference,B=n.rects.popper,S=new Map,T=!0,V=f[0],L=0;L<f.length;L++){var z=f[L],Z=Je(z),Y=Dt(z)===Bt,P=[Se,$e].indexOf(Z)>=0,x=P?"width":"height",N=$t(n,{placement:z,boundary:u,rootBoundary:v,altBoundary:k,padding:d}),C=P?Y?Ue:Le:Y?$e:Se;_[x]>B[x]&&(C=cn(C));var A=cn(C),D=[];if(i&&D.push(N[Z]<=0),l&&D.push(N[C]<=0,N[A]<=0),D.every(function(oe){return oe})){V=z,T=!1;break}S.set(z,D)}if(T)for(var F=p?3:1,I=function(ee){var E=f.find(function(U){var $=S.get(U);if($)return $.slice(0,ee).every(function(q){return q})});if(E)return V=E,"break"},G=F;G>0;G--){var K=I(G);if(K==="break")break}n.placement!==V&&(n.modifiersData[a]._skip=!0,n.placement=V,n.reset=!0)}}const uu={name:"flip",enabled:!0,phase:"main",fn:du,requiresIfExists:["offset"],data:{_skip:!1}};function oa(t,n,o){return o===void 0&&(o={x:0,y:0}),{top:t.top-n.height-o.y,right:t.right-n.width+o.x,bottom:t.bottom-n.height+o.y,left:t.left-n.width-o.x}}function aa(t){return[Se,Ue,$e,Le].some(function(n){return t[n]>=0})}function pu(t){var n=t.state,o=t.name,a=n.rects.reference,r=n.rects.popper,i=n.modifiersData.preventOverflow,s=$t(n,{elementContext:"reference"}),l=$t(n,{altBoundary:!0}),c=oa(s,a),d=oa(l,r,i),u=aa(c),v=aa(d);n.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:v},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":v})}const fu={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:pu};function mu(t,n,o){var a=Je(t),r=[Le,Se].indexOf(a)>=0?-1:1,i=typeof o=="function"?o(Object.assign({},n,{placement:t})):o,s=i[0],l=i[1];return s=s||0,l=(l||0)*r,[Le,Ue].indexOf(a)>=0?{x:l,y:s}:{x:s,y:l}}function vu(t){var n=t.state,o=t.options,a=t.name,r=o.offset,i=r===void 0?[0,0]:r,s=ir.reduce(function(u,v){return u[v]=mu(v,n.rects,i),u},{}),l=s[n.placement],c=l.x,d=l.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=c,n.modifiersData.popperOffsets.y+=d),n.modifiersData[a]=s}const hu={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vu};function gu(t){var n=t.state,o=t.name;n.modifiersData[o]=vr({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})}const wu={name:"popperOffsets",enabled:!0,phase:"read",fn:gu,data:{}};function yu(t){return t==="x"?"y":"x"}function bu(t){var n=t.state,o=t.options,a=t.name,r=o.mainAxis,i=r===void 0?!0:r,s=o.altAxis,l=s===void 0?!1:s,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,v=o.padding,k=o.tether,h=k===void 0?!0:k,p=o.tetherOffset,w=p===void 0?0:p,m=$t(n,{boundary:c,rootBoundary:d,padding:v,altBoundary:u}),g=Je(n.placement),y=Dt(n.placement),b=!y,f=mo(g),_=yu(f),B=n.modifiersData.popperOffsets,S=n.rects.reference,T=n.rects.popper,V=typeof w=="function"?w(Object.assign({},n.rects,{placement:n.placement})):w,L=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),z=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,Z={x:0,y:0};if(B){if(i){var Y,P=f==="y"?Se:Le,x=f==="y"?$e:Ue,N=f==="y"?"height":"width",C=B[f],A=C+m[P],D=C-m[x],F=h?-T[N]/2:0,I=y===Bt?S[N]:T[N],G=y===Bt?-T[N]:-S[N],K=n.elements.arrow,oe=h&&K?fo(K):{width:0,height:0},ee=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:ur(),E=ee[P],U=ee[x],$=Ft(0,S[N],oe[N]),q=b?S[N]/2-F-$-E-L.mainAxis:I-$-E-L.mainAxis,W=b?-S[N]/2+F+$+U+L.mainAxis:G+$+U+L.mainAxis,Q=n.elements.arrow&&Zt(n.elements.arrow),H=Q?f==="y"?Q.clientTop||0:Q.clientLeft||0:0,ne=(Y=z?.[f])!=null?Y:0,ie=C+q-ne-H,le=C+W-ne,re=Ft(h?hn(A,ie):A,C,h?mt(D,le):D);B[f]=re,Z[f]=re-C}if(l){var de,ge=f==="x"?Se:Le,Ce=f==="x"?$e:Ue,fe=B[_],Ae=_==="y"?"height":"width",Ve=fe+m[ge],_e=fe-m[Ce],je=[Se,Le].indexOf(g)!==-1,We=(de=z?.[_])!=null?de:0,ct=je?Ve:fe-S[Ae]-T[Ae]-We+L.altAxis,Ye=je?fe+S[Ae]+T[Ae]-We-L.altAxis:_e,dt=h&&je?Gd(ct,fe,Ye):Ft(h?ct:Ve,fe,h?Ye:_e);B[_]=dt,Z[_]=dt-fe}n.modifiersData[a]=Z}}const ku={name:"preventOverflow",enabled:!0,phase:"main",fn:bu,requiresIfExists:["offset"]};function Cu(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function _u(t){return t===Fe(t)||!Ie(t)?vo(t):Cu(t)}function Au(t){var n=t.getBoundingClientRect(),o=Vt(n.width)/t.offsetWidth||1,a=Vt(n.height)/t.offsetHeight||1;return o!==1||a!==1}function xu(t,n,o){o===void 0&&(o=!1);var a=Ie(n),r=Ie(n)&&Au(n),i=lt(n),s=Nt(t,r,o),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!o)&&((Ke(n)!=="body"||go(i))&&(l=_u(n)),Ie(n)?(c=Nt(n,!0),c.x+=n.clientLeft,c.y+=n.clientTop):i&&(c.x=ho(i))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function Eu(t){var n=new Map,o=new Set,a=[];t.forEach(function(i){n.set(i.name,i)});function r(i){o.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!o.has(l)){var c=n.get(l);c&&r(c)}}),a.push(i)}return t.forEach(function(i){o.has(i.name)||r(i)}),a}function Bu(t){var n=Eu(t);return zd.reduce(function(o,a){return o.concat(n.filter(function(r){return r.phase===a}))},[])}function Vu(t){var n;return function(){return n||(n=new Promise(function(o){Promise.resolve().then(function(){n=void 0,o(t())})})),n}}function Nu(t){var n=t.reduce(function(o,a){var r=o[a.name];return o[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,o},{});return Object.keys(n).map(function(o){return n[o]})}var ra={placement:"bottom",modifiers:[],strategy:"absolute"};function sa(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return!n.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Du(t){t===void 0&&(t={});var n=t,o=n.defaultModifiers,a=o===void 0?[]:o,r=n.defaultOptions,i=r===void 0?ra:r;return function(l,c,d){d===void 0&&(d=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ra,i),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},v=[],k=!1,h={state:u,setOptions:function(g){var y=typeof g=="function"?g(u.options):g;w(),u.options=Object.assign({},i,u.options,y),u.scrollParents={reference:gt(l)?Rt(l):l.contextElement?Rt(l.contextElement):[],popper:Rt(c)};var b=Bu(Nu([].concat(a,u.options.modifiers)));return u.orderedModifiers=b.filter(function(f){return f.enabled}),p(),h.update()},forceUpdate:function(){if(!k){var g=u.elements,y=g.reference,b=g.popper;if(sa(y,b)){u.rects={reference:xu(y,Zt(b),u.options.strategy==="fixed"),popper:fo(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(L){return u.modifiersData[L.name]=Object.assign({},L.data)});for(var f=0;f<u.orderedModifiers.length;f++){if(u.reset===!0){u.reset=!1,f=-1;continue}var _=u.orderedModifiers[f],B=_.fn,S=_.options,T=S===void 0?{}:S,V=_.name;typeof B=="function"&&(u=B({state:u,options:T,name:V,instance:h})||u)}}}},update:Vu(function(){return new Promise(function(m){h.forceUpdate(),m(u)})}),destroy:function(){w(),k=!0}};if(!sa(l,c))return h;h.setOptions(d).then(function(m){!k&&d.onFirstUpdate&&d.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var g=m.name,y=m.options,b=y===void 0?{}:y,f=m.effect;if(typeof f=="function"){var _=f({state:u,name:g,instance:h,options:b}),B=function(){};v.push(_||B)}})}function w(){v.forEach(function(m){return m()}),v=[]}return h}}var Tu=[eu,wu,Kd,lr,hu,uu,ku,Yd,fu],Mu=Du({defaultModifiers:Tu}),Su="tippy-box",hr="tippy-content",Lu="tippy-backdrop",gr="tippy-arrow",wr="tippy-svg-arrow",ut={passive:!0,capture:!0},yr=function(){return document.body};function Pu(t,n){return{}.hasOwnProperty.call(t,n)}function In(t,n,o){if(Array.isArray(t)){var a=t[n];return a??(Array.isArray(o)?o[n]:o)}return t}function wo(t,n){var o={}.toString.call(t);return o.indexOf("[object")===0&&o.indexOf(n+"]")>-1}function br(t,n){return typeof t=="function"?t.apply(void 0,n):t}function ia(t,n){if(n===0)return t;var o;return function(a){clearTimeout(o),o=setTimeout(function(){t(a)},n)}}function Ou(t,n){var o=Object.assign({},t);return n.forEach(function(a){delete o[a]}),o}function Fu(t){return t.split(/\s+/).filter(Boolean)}function At(t){return[].concat(t)}function la(t,n){t.indexOf(n)===-1&&t.push(n)}function Ru(t){return t.filter(function(n,o){return t.indexOf(n)===o})}function zu(t){return t.split("-")[0]}function gn(t){return[].slice.call(t)}function ca(t){return Object.keys(t).reduce(function(n,o){return t[o]!==void 0&&(n[o]=t[o]),n},{})}function zt(){return document.createElement("div")}function Ut(t){return["Element","Fragment"].some(function(n){return wo(t,n)})}function Iu(t){return wo(t,"NodeList")}function $u(t){return wo(t,"MouseEvent")}function kr(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Uu(t){return Ut(t)?[t]:Iu(t)?gn(t):Array.isArray(t)?t:gn(document.querySelectorAll(t))}function $n(t,n){t.forEach(function(o){o&&(o.style.transitionDuration=n+"ms")})}function da(t,n){t.forEach(function(o){o&&o.setAttribute("data-state",n)})}function ju(t){var n,o=At(t),a=o[0];return a!=null&&(n=a.ownerDocument)!=null&&n.body?a.ownerDocument:document}function Gu(t,n){var o=n.clientX,a=n.clientY;return t.every(function(r){var i=r.popperRect,s=r.popperState,l=r.props,c=l.interactiveBorder,d=zu(s.placement),u=s.modifiersData.offset;if(!u)return!0;var v=d==="bottom"?u.top.y:0,k=d==="top"?u.bottom.y:0,h=d==="right"?u.left.x:0,p=d==="left"?u.right.x:0,w=i.top-a+v>c,m=a-i.bottom-k>c,g=i.left-o+h>c,y=o-i.right-p>c;return w||m||g||y})}function Un(t,n,o){var a=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){t[a](r,o)})}function ua(t,n){for(var o=n;o;){var a;if(t.contains(o))return!0;o=o.getRootNode==null||(a=o.getRootNode())==null?void 0:a.host}return!1}var Qe={isTouch:!1},pa=0;function qu(){Qe.isTouch||(Qe.isTouch=!0,window.performance&&document.addEventListener("mousemove",Cr))}function Cr(){var t=performance.now();t-pa<20&&(Qe.isTouch=!1,document.removeEventListener("mousemove",Cr)),pa=t}function Hu(){var t=document.activeElement;if(kr(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}function Wu(){document.addEventListener("touchstart",qu,ut),window.addEventListener("blur",Hu)}var Yu=typeof window<"u"&&typeof document<"u",Zu=Yu?!!window.msCrypto:!1;function _t(t){var n=t==="destroy"?"n already-":" ";return[t+"() was called on a"+n+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function fa(t){var n=/[ \t]{2,}/g,o=/^[ \t]*/gm;return t.replace(n," ").replace(o,"").trim()}function Qu(t){return fa(`
31
31
  %ctippy.js
32
32
 
33
- %c`+da(t)+`
33
+ %c`+fa(t)+`
34
34
 
35
35
  %c👷‍ This is a development-only message. It will be removed in production.
36
- `)}function yr(t){return[$u(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ut;process.env.NODE_ENV!=="production"&&zu();function zu(){Ut=new Set}function nt(t,n){if(t&&!Ut.has(n)){var o;Ut.add(n),(o=console).warn.apply(o,yr(n))}}function no(t,n){if(t&&!Ut.has(n)){var o;Ut.add(n),(o=console).error.apply(o,yr(n))}}function Fu(t){var n=!t,o=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;no(n,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),no(o,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var wr={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Iu={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Pe=Object.assign({appendTo:mr,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},wr,Iu),Uu=Object.keys(Pe),ju=function(n){process.env.NODE_ENV!=="production"&&kr(n,[]);var o=Object.keys(n);o.forEach(function(a){Pe[a]=n[a]})};function br(t){var n=t.plugins||[],o=n.reduce(function(a,r){var s=r.name,i=r.defaultValue;if(s){var l;a[s]=t[s]!==void 0?t[s]:(l=Pe[s])!=null?l:i}return a},{});return Object.assign({},t,o)}function Gu(t,n){var o=n?Object.keys(br(Object.assign({},Pe,{plugins:n}))):Uu,a=o.reduce(function(r,s){var i=(t.getAttribute("data-tippy-"+s)||"").trim();if(!i)return r;if(s==="content")r[s]=i;else try{r[s]=JSON.parse(i)}catch{r[s]=i}return r},{});return a}function ua(t,n){var o=Object.assign({},n,{content:vr(n.content,[t])},n.ignoreAttributes?{}:Gu(t,n.plugins));return o.aria=Object.assign({},Pe.aria,o.aria),o.aria={expanded:o.aria.expanded==="auto"?n.interactive:o.aria.expanded,content:o.aria.content==="auto"?n.interactive?null:"describedby":o.aria.content},o}function kr(t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var o=Object.keys(t);o.forEach(function(a){var r=xu(Pe,Object.keys(wr)),s=!_u(r,a);s&&(s=n.filter(function(i){return i.name===a}).length===0),nt(s,["`"+a+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
36
+ `)}function _r(t){return[Qu(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var jt;process.env.NODE_ENV!=="production"&&Ju();function Ju(){jt=new Set}function nt(t,n){if(t&&!jt.has(n)){var o;jt.add(n),(o=console).warn.apply(o,_r(n))}}function to(t,n){if(t&&!jt.has(n)){var o;jt.add(n),(o=console).error.apply(o,_r(n))}}function Ku(t){var n=!t,o=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;to(n,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),to(o,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Ar={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Xu={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Pe=Object.assign({appendTo:yr,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ar,Xu),ep=Object.keys(Pe),tp=function(n){process.env.NODE_ENV!=="production"&&Er(n,[]);var o=Object.keys(n);o.forEach(function(a){Pe[a]=n[a]})};function xr(t){var n=t.plugins||[],o=n.reduce(function(a,r){var i=r.name,s=r.defaultValue;if(i){var l;a[i]=t[i]!==void 0?t[i]:(l=Pe[i])!=null?l:s}return a},{});return Object.assign({},t,o)}function np(t,n){var o=n?Object.keys(xr(Object.assign({},Pe,{plugins:n}))):ep,a=o.reduce(function(r,i){var s=(t.getAttribute("data-tippy-"+i)||"").trim();if(!s)return r;if(i==="content")r[i]=s;else try{r[i]=JSON.parse(s)}catch{r[i]=s}return r},{});return a}function ma(t,n){var o=Object.assign({},n,{content:br(n.content,[t])},n.ignoreAttributes?{}:np(t,n.plugins));return o.aria=Object.assign({},Pe.aria,o.aria),o.aria={expanded:o.aria.expanded==="auto"?n.interactive:o.aria.expanded,content:o.aria.content==="auto"?n.interactive?null:"describedby":o.aria.content},o}function Er(t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var o=Object.keys(t);o.forEach(function(a){var r=Ou(Pe,Object.keys(Ar)),i=!Pu(r,a);i&&(i=n.filter(function(s){return s.name===a}).length===0),nt(i,["`"+a+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
37
37
 
38
38
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
39
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var qu=function(){return"innerHTML"};function oo(t,n){t[qu()]=n}function pa(t){var n=Rt();return t===!0?n.className=pr:(n.className=fr,It(t)?n.appendChild(t):oo(n,t)),n}function fa(t,n){It(n.content)?(oo(t,""),t.appendChild(n.content)):typeof n.content!="function"&&(n.allowHTML?oo(t,n.content):t.textContent=n.content)}function ao(t){var n=t.firstElementChild,o=gn(n.children);return{box:n,content:o.find(function(a){return a.classList.contains(ur)}),arrow:o.find(function(a){return a.classList.contains(pr)||a.classList.contains(fr)}),backdrop:o.find(function(a){return a.classList.contains(Cu)})}}function Cr(t){var n=Rt(),o=Rt();o.className=ku,o.setAttribute("data-state","hidden"),o.setAttribute("tabindex","-1");var a=Rt();a.className=ur,a.setAttribute("data-state","hidden"),fa(a,t.props),n.appendChild(o),o.appendChild(a),r(t.props,t.props);function r(s,i){var l=ao(n),c=l.box,d=l.content,u=l.arrow;i.theme?c.setAttribute("data-theme",i.theme):c.removeAttribute("data-theme"),typeof i.animation=="string"?c.setAttribute("data-animation",i.animation):c.removeAttribute("data-animation"),i.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof i.maxWidth=="number"?i.maxWidth+"px":i.maxWidth,i.role?c.setAttribute("role",i.role):c.removeAttribute("role"),(s.content!==i.content||s.allowHTML!==i.allowHTML)&&fa(d,t.props),i.arrow?u?s.arrow!==i.arrow&&(c.removeChild(u),c.appendChild(pa(i.arrow))):c.appendChild(pa(i.arrow)):u&&c.removeChild(u)}return{popper:n,onUpdate:r}}Cr.$$tippy=!0;var Hu=1,nn=[],cn=[];function Wu(t,n){var o=ua(t,Object.assign({},Pe,br(ia(n)))),a,r,s,i=!1,l=!1,c=!1,d=!1,u,v,w,h=[],m=aa(ae,o.interactiveDebounce),g,f=Hu++,b=null,y=Eu(o.plugins),_={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},p={id:f,reference:t,popper:Rt(),popperInstance:b,props:o,state:_,plugins:y,clearDelayTimeouts:ct,setProps:Je,setContent:dt,show:yt,hide:Nn,hideWithInteractivity:Bn,enable:je,disable:We,unmount:Dn,destroy:Tn};if(!o.render)return process.env.NODE_ENV!=="production"&&no(!0,"render() function has not been supplied."),p;var k=o.render(p),C=k.popper,E=k.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+p.id,p.popper=C,t._tippy=p,C._tippy=p;var I=y.map(function(L){return L.fn(p)}),z=t.hasAttribute("aria-expanded");return K(),A(),N(),O("onCreate",[p]),o.showOnCreate&&Ne(),C.addEventListener("mouseenter",function(){p.props.interactive&&p.state.isVisible&&p.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){p.props.interactive&&p.props.trigger.indexOf("mouseenter")>=0&&S().addEventListener("mousemove",m)}),p;function V(){var L=p.props.touch;return Array.isArray(L)?L:[L,0]}function P(){return V()[0]==="hold"}function X(){var L;return!!((L=p.props.render)!=null&&L.$$tippy)}function ee(){return g||t}function S(){var L=ee().parentNode;return L?Tu(L):document}function D(){return ao(C)}function T(L){return p.state.isMounted&&!p.state.isVisible||Ze.isTouch||u&&u.type==="focus"?0:Fn(p.props.delay,L?0:1,Pe.delay)}function N(L){L===void 0&&(L=!1),C.style.pointerEvents=p.props.interactive&&!L?"":"none",C.style.zIndex=""+p.props.zIndex}function O(L,ne,se){if(se===void 0&&(se=!0),I.forEach(function(ue){ue[L]&&ue[L].apply(ue,ne)}),se){var pe;(pe=p.props)[L].apply(pe,ne)}}function Z(){var L=p.props.aria;if(L.content){var ne="aria-"+L.content,se=C.id,pe=_t(p.props.triggerTarget||t);pe.forEach(function(ue){var Ae=ue.getAttribute(ne);if(p.state.isVisible)ue.setAttribute(ne,Ae?Ae+" "+se:se);else{var De=Ae&&Ae.replace(se,"").trim();De?ue.setAttribute(ne,De):ue.removeAttribute(ne)}})}}function A(){if(!(z||!p.props.aria.expanded)){var L=_t(p.props.triggerTarget||t);L.forEach(function(ne){p.props.interactive?ne.setAttribute("aria-expanded",p.state.isVisible&&ne===ee()?"true":"false"):ne.removeAttribute("aria-expanded")})}}function M(){S().removeEventListener("mousemove",m),nn=nn.filter(function(L){return L!==m})}function R(L){if(!(Ze.isTouch&&(c||L.type==="mousedown"))){var ne=L.composedPath&&L.composedPath()[0]||L.target;if(!(p.props.interactive&&la(C,ne))){if(_t(p.props.triggerTarget||t).some(function(se){return la(se,ne)})){if(Ze.isTouch||p.state.isVisible&&p.props.trigger.indexOf("click")>=0)return}else O("onClickOutside",[p,L]);p.props.hideOnClick===!0&&(p.clearDelayTimeouts(),p.hide(),l=!0,setTimeout(function(){l=!1}),p.state.isMounted||x())}}}function W(){c=!0}function q(){c=!1}function J(){var L=S();L.addEventListener("mousedown",R,!0),L.addEventListener("touchend",R,ut),L.addEventListener("touchstart",q,ut),L.addEventListener("touchmove",W,ut)}function x(){var L=S();L.removeEventListener("mousedown",R,!0),L.removeEventListener("touchend",R,ut),L.removeEventListener("touchstart",q,ut),L.removeEventListener("touchmove",W,ut)}function U(L,ne){j(L,function(){!p.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&ne()})}function F(L,ne){j(L,ne)}function j(L,ne){var se=D().box;function pe(ue){ue.target===se&&(Un(se,"remove",pe),ne())}if(L===0)return ne();Un(se,"remove",v),Un(se,"add",pe),v=pe}function Y(L,ne,se){se===void 0&&(se=!1);var pe=_t(p.props.triggerTarget||t);pe.forEach(function(ue){ue.addEventListener(L,ne,se),h.push({node:ue,eventType:L,handler:ne,options:se})})}function K(){P()&&(Y("touchstart",te,{passive:!0}),Y("touchend",le,{passive:!0})),Au(p.props.trigger).forEach(function(L){if(L!=="manual")switch(Y(L,te),L){case"mouseenter":Y("mouseleave",le);break;case"focus":Y(Ru?"focusout":"blur",ie);break;case"focusin":Y("focusout",ie);break}})}function H(){h.forEach(function(L){var ne=L.node,se=L.eventType,pe=L.handler,ue=L.options;ne.removeEventListener(se,pe,ue)}),h=[]}function te(L){var ne,se=!1;if(!(!p.state.isEnabled||de(L)||l)){var pe=((ne=u)==null?void 0:ne.type)==="focus";u=L,g=L.currentTarget,A(),!p.state.isVisible&&Bu(L)&&nn.forEach(function(ue){return ue(L)}),L.type==="click"&&(p.props.trigger.indexOf("mouseenter")<0||i)&&p.props.hideOnClick!==!1&&p.state.isVisible?se=!0:Ne(L),L.type==="click"&&(i=!se),se&&!pe&&_e(L)}}function ae(L){var ne=L.target,se=ee().contains(ne)||C.contains(ne);if(!(L.type==="mousemove"&&se)){var pe=xe().concat(C).map(function(ue){var Ae,De=ue._tippy,at=(Ae=De.popperInstance)==null?void 0:Ae.state;return at?{popperRect:ue.getBoundingClientRect(),popperState:at,props:o}:null}).filter(Boolean);Su(pe,L)&&(M(),_e(L))}}function le(L){var ne=de(L)||p.props.trigger.indexOf("click")>=0&&i;if(!ne){if(p.props.interactive){p.hideWithInteractivity(L);return}_e(L)}}function ie(L){p.props.trigger.indexOf("focusin")<0&&L.target!==ee()||p.props.interactive&&L.relatedTarget&&C.contains(L.relatedTarget)||_e(L)}function de(L){return Ze.isTouch?P()!==L.type.indexOf("touch")>=0:!1}function ge(){Ce();var L=p.props,ne=L.popperOptions,se=L.placement,pe=L.offset,ue=L.getReferenceClientRect,Ae=L.moveTransition,De=X()?ao(C).arrow:null,at=ue?{getBoundingClientRect:ue,contextElement:ue.contextElement||ee()}:t,wt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(rt){var $e=rt.state;if(X()){var Sn=D(),Ge=Sn.box;["placement","reference-hidden","escaped"].forEach(function(kt){kt==="placement"?Ge.setAttribute("data-placement",$e.placement):$e.attributes.popper["data-popper-"+kt]?Ge.setAttribute("data-"+kt,""):Ge.removeAttribute("data-"+kt)}),$e.attributes.popper={}}}},Xe=[{name:"offset",options:{offset:pe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ae}},wt];X()&&De&&Xe.push({name:"arrow",options:{element:De,padding:3}}),Xe.push.apply(Xe,ne?.modifiers||[]),p.popperInstance=bu(at,C,Object.assign({},ne,{placement:se,onFirstUpdate:w,modifiers:Xe}))}function Ce(){p.popperInstance&&(p.popperInstance.destroy(),p.popperInstance=null)}function fe(){var L=p.props.appendTo,ne,se=ee();p.props.interactive&&L===mr||L==="parent"?ne=se.parentNode:ne=vr(L,[se]),ne.contains(C)||ne.appendChild(C),p.state.isMounted=!0,ge(),process.env.NODE_ENV!=="production"&&nt(p.props.interactive&&L===Pe.appendTo&&se.nextElementSibling!==C,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
39
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var op=function(){return"innerHTML"};function no(t,n){t[op()]=n}function va(t){var n=zt();return t===!0?n.className=gr:(n.className=wr,Ut(t)?n.appendChild(t):no(n,t)),n}function ha(t,n){Ut(n.content)?(no(t,""),t.appendChild(n.content)):typeof n.content!="function"&&(n.allowHTML?no(t,n.content):t.textContent=n.content)}function oo(t){var n=t.firstElementChild,o=gn(n.children);return{box:n,content:o.find(function(a){return a.classList.contains(hr)}),arrow:o.find(function(a){return a.classList.contains(gr)||a.classList.contains(wr)}),backdrop:o.find(function(a){return a.classList.contains(Lu)})}}function Br(t){var n=zt(),o=zt();o.className=Su,o.setAttribute("data-state","hidden"),o.setAttribute("tabindex","-1");var a=zt();a.className=hr,a.setAttribute("data-state","hidden"),ha(a,t.props),n.appendChild(o),o.appendChild(a),r(t.props,t.props);function r(i,s){var l=oo(n),c=l.box,d=l.content,u=l.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&ha(d,t.props),s.arrow?u?i.arrow!==s.arrow&&(c.removeChild(u),c.appendChild(va(s.arrow))):c.appendChild(va(s.arrow)):u&&c.removeChild(u)}return{popper:n,onUpdate:r}}Br.$$tippy=!0;var ap=1,on=[],dn=[];function rp(t,n){var o=ma(t,Object.assign({},Pe,xr(ca(n)))),a,r,i,s=!1,l=!1,c=!1,d=!1,u,v,k,h=[],p=ia(ie,o.interactiveDebounce),w,m=ap++,g=null,y=Ru(o.plugins),b={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},f={id:m,reference:t,popper:zt(),popperInstance:g,props:o,state:b,plugins:y,clearDelayTimeouts:ct,setProps:Ye,setContent:dt,show:yt,hide:Vn,hideWithInteractivity:Nn,enable:je,disable:We,unmount:Dn,destroy:Tn};if(!o.render)return process.env.NODE_ENV!=="production"&&to(!0,"render() function has not been supplied."),f;var _=o.render(f),B=_.popper,S=_.onUpdate;B.setAttribute("data-tippy-root",""),B.id="tippy-"+f.id,f.popper=B,t._tippy=f,B._tippy=f;var T=y.map(function(O){return O.fn(f)}),V=t.hasAttribute("aria-expanded");return Q(),F(),C(),A("onCreate",[f]),o.showOnCreate&&Ve(),B.addEventListener("mouseenter",function(){f.props.interactive&&f.state.isVisible&&f.clearDelayTimeouts()}),B.addEventListener("mouseleave",function(){f.props.interactive&&f.props.trigger.indexOf("mouseenter")>=0&&P().addEventListener("mousemove",p)}),f;function L(){var O=f.props.touch;return Array.isArray(O)?O:[O,0]}function z(){return L()[0]==="hold"}function Z(){var O;return!!((O=f.props.render)!=null&&O.$$tippy)}function Y(){return w||t}function P(){var O=Y().parentNode;return O?ju(O):document}function x(){return oo(B)}function N(O){return f.state.isMounted&&!f.state.isVisible||Qe.isTouch||u&&u.type==="focus"?0:In(f.props.delay,O?0:1,Pe.delay)}function C(O){O===void 0&&(O=!1),B.style.pointerEvents=f.props.interactive&&!O?"":"none",B.style.zIndex=""+f.props.zIndex}function A(O,X,se){if(se===void 0&&(se=!0),T.forEach(function(ue){ue[O]&&ue[O].apply(ue,X)}),se){var pe;(pe=f.props)[O].apply(pe,X)}}function D(){var O=f.props.aria;if(O.content){var X="aria-"+O.content,se=B.id,pe=At(f.props.triggerTarget||t);pe.forEach(function(ue){var xe=ue.getAttribute(X);if(f.state.isVisible)ue.setAttribute(X,xe?xe+" "+se:se);else{var De=xe&&xe.replace(se,"").trim();De?ue.setAttribute(X,De):ue.removeAttribute(X)}})}}function F(){if(!(V||!f.props.aria.expanded)){var O=At(f.props.triggerTarget||t);O.forEach(function(X){f.props.interactive?X.setAttribute("aria-expanded",f.state.isVisible&&X===Y()?"true":"false"):X.removeAttribute("aria-expanded")})}}function I(){P().removeEventListener("mousemove",p),on=on.filter(function(O){return O!==p})}function G(O){if(!(Qe.isTouch&&(c||O.type==="mousedown"))){var X=O.composedPath&&O.composedPath()[0]||O.target;if(!(f.props.interactive&&ua(B,X))){if(At(f.props.triggerTarget||t).some(function(se){return ua(se,X)})){if(Qe.isTouch||f.state.isVisible&&f.props.trigger.indexOf("click")>=0)return}else A("onClickOutside",[f,O]);f.props.hideOnClick===!0&&(f.clearDelayTimeouts(),f.hide(),l=!0,setTimeout(function(){l=!1}),f.state.isMounted||E())}}}function K(){c=!0}function oe(){c=!1}function ee(){var O=P();O.addEventListener("mousedown",G,!0),O.addEventListener("touchend",G,ut),O.addEventListener("touchstart",oe,ut),O.addEventListener("touchmove",K,ut)}function E(){var O=P();O.removeEventListener("mousedown",G,!0),O.removeEventListener("touchend",G,ut),O.removeEventListener("touchstart",oe,ut),O.removeEventListener("touchmove",K,ut)}function U(O,X){q(O,function(){!f.state.isVisible&&B.parentNode&&B.parentNode.contains(B)&&X()})}function $(O,X){q(O,X)}function q(O,X){var se=x().box;function pe(ue){ue.target===se&&(Un(se,"remove",pe),X())}if(O===0)return X();Un(se,"remove",v),Un(se,"add",pe),v=pe}function W(O,X,se){se===void 0&&(se=!1);var pe=At(f.props.triggerTarget||t);pe.forEach(function(ue){ue.addEventListener(O,X,se),h.push({node:ue,eventType:O,handler:X,options:se})})}function Q(){z()&&(W("touchstart",ne,{passive:!0}),W("touchend",le,{passive:!0})),Fu(f.props.trigger).forEach(function(O){if(O!=="manual")switch(W(O,ne),O){case"mouseenter":W("mouseleave",le);break;case"focus":W(Zu?"focusout":"blur",re);break;case"focusin":W("focusout",re);break}})}function H(){h.forEach(function(O){var X=O.node,se=O.eventType,pe=O.handler,ue=O.options;X.removeEventListener(se,pe,ue)}),h=[]}function ne(O){var X,se=!1;if(!(!f.state.isEnabled||de(O)||l)){var pe=((X=u)==null?void 0:X.type)==="focus";u=O,w=O.currentTarget,F(),!f.state.isVisible&&$u(O)&&on.forEach(function(ue){return ue(O)}),O.type==="click"&&(f.props.trigger.indexOf("mouseenter")<0||s)&&f.props.hideOnClick!==!1&&f.state.isVisible?se=!0:Ve(O),O.type==="click"&&(s=!se),se&&!pe&&_e(O)}}function ie(O){var X=O.target,se=Y().contains(X)||B.contains(X);if(!(O.type==="mousemove"&&se)){var pe=Ae().concat(B).map(function(ue){var xe,De=ue._tippy,rt=(xe=De.popperInstance)==null?void 0:xe.state;return rt?{popperRect:ue.getBoundingClientRect(),popperState:rt,props:o}:null}).filter(Boolean);Gu(pe,O)&&(I(),_e(O))}}function le(O){var X=de(O)||f.props.trigger.indexOf("click")>=0&&s;if(!X){if(f.props.interactive){f.hideWithInteractivity(O);return}_e(O)}}function re(O){f.props.trigger.indexOf("focusin")<0&&O.target!==Y()||f.props.interactive&&O.relatedTarget&&B.contains(O.relatedTarget)||_e(O)}function de(O){return Qe.isTouch?z()!==O.type.indexOf("touch")>=0:!1}function ge(){Ce();var O=f.props,X=O.popperOptions,se=O.placement,pe=O.offset,ue=O.getReferenceClientRect,xe=O.moveTransition,De=Z()?oo(B).arrow:null,rt=ue?{getBoundingClientRect:ue,contextElement:ue.contextElement||Y()}:t,bt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(st){var Re=st.state;if(Z()){var Mn=x(),Ge=Mn.box;["placement","reference-hidden","escaped"].forEach(function(Ct){Ct==="placement"?Ge.setAttribute("data-placement",Re.placement):Re.attributes.popper["data-popper-"+Ct]?Ge.setAttribute("data-"+Ct,""):Ge.removeAttribute("data-"+Ct)}),Re.attributes.popper={}}}},Xe=[{name:"offset",options:{offset:pe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!xe}},bt];Z()&&De&&Xe.push({name:"arrow",options:{element:De,padding:3}}),Xe.push.apply(Xe,X?.modifiers||[]),f.popperInstance=Mu(rt,B,Object.assign({},X,{placement:se,onFirstUpdate:k,modifiers:Xe}))}function Ce(){f.popperInstance&&(f.popperInstance.destroy(),f.popperInstance=null)}function fe(){var O=f.props.appendTo,X,se=Y();f.props.interactive&&O===yr||O==="parent"?X=se.parentNode:X=br(O,[se]),X.contains(B)||X.appendChild(B),f.state.isMounted=!0,ge(),process.env.NODE_ENV!=="production"&&nt(f.props.interactive&&O===Pe.appendTo&&se.nextElementSibling!==B,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
40
40
 
41
41
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
42
42
 
43
43
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
44
44
 
45
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function xe(){return gn(C.querySelectorAll("[data-tippy-root]"))}function Ne(L){p.clearDelayTimeouts(),L&&O("onTrigger",[p,L]),J();var ne=T(!0),se=V(),pe=se[0],ue=se[1];Ze.isTouch&&pe==="hold"&&ue&&(ne=ue),ne?a=setTimeout(function(){p.show()},ne):p.show()}function _e(L){if(p.clearDelayTimeouts(),O("onUntrigger",[p,L]),!p.state.isVisible){x();return}if(!(p.props.trigger.indexOf("mouseenter")>=0&&p.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(L.type)>=0&&i)){var ne=T(!1);ne?r=setTimeout(function(){p.state.isVisible&&p.hide()},ne):s=requestAnimationFrame(function(){p.hide()})}}function je(){p.state.isEnabled=!0}function We(){p.hide(),p.state.isEnabled=!1}function ct(){clearTimeout(a),clearTimeout(r),cancelAnimationFrame(s)}function Je(L){if(process.env.NODE_ENV!=="production"&&nt(p.state.isDestroyed,Ct("setProps")),!p.state.isDestroyed){O("onBeforeUpdate",[p,L]),H();var ne=p.props,se=ua(t,Object.assign({},ne,ia(L),{ignoreAttributes:!0}));p.props=se,K(),ne.interactiveDebounce!==se.interactiveDebounce&&(M(),m=aa(ae,se.interactiveDebounce)),ne.triggerTarget&&!se.triggerTarget?_t(ne.triggerTarget).forEach(function(pe){pe.removeAttribute("aria-expanded")}):se.triggerTarget&&t.removeAttribute("aria-expanded"),A(),N(),E&&E(ne,se),p.popperInstance&&(ge(),xe().forEach(function(pe){requestAnimationFrame(pe._tippy.popperInstance.forceUpdate)})),O("onAfterUpdate",[p,L])}}function dt(L){p.setProps({content:L})}function yt(){process.env.NODE_ENV!=="production"&&nt(p.state.isDestroyed,Ct("show"));var L=p.state.isVisible,ne=p.state.isDestroyed,se=!p.state.isEnabled,pe=Ze.isTouch&&!p.props.touch,ue=Fn(p.props.duration,0,Pe.duration);if(!(L||ne||se||pe)&&!ee().hasAttribute("disabled")&&(O("onShow",[p],!1),p.props.onShow(p)!==!1)){if(p.state.isVisible=!0,X()&&(C.style.visibility="visible"),N(),J(),p.state.isMounted||(C.style.transition="none"),X()){var Ae=D(),De=Ae.box,at=Ae.content;In([De,at],0)}w=function(){var Xe;if(!(!p.state.isVisible||d)){if(d=!0,C.offsetHeight,C.style.transition=p.props.moveTransition,X()&&p.props.animation){var bt=D(),rt=bt.box,$e=bt.content;In([rt,$e],ue),sa([rt,$e],"visible")}Z(),A(),ra(cn,p),(Xe=p.popperInstance)==null||Xe.forceUpdate(),O("onMount",[p]),p.props.animation&&X()&&F(ue,function(){p.state.isShown=!0,O("onShown",[p])})}},fe()}}function Nn(){process.env.NODE_ENV!=="production"&&nt(p.state.isDestroyed,Ct("hide"));var L=!p.state.isVisible,ne=p.state.isDestroyed,se=!p.state.isEnabled,pe=Fn(p.props.duration,1,Pe.duration);if(!(L||ne||se)&&(O("onHide",[p],!1),p.props.onHide(p)!==!1)){if(p.state.isVisible=!1,p.state.isShown=!1,d=!1,i=!1,X()&&(C.style.visibility="hidden"),M(),x(),N(!0),X()){var ue=D(),Ae=ue.box,De=ue.content;p.props.animation&&(In([Ae,De],pe),sa([Ae,De],"hidden"))}Z(),A(),p.props.animation?X()&&U(pe,p.unmount):p.unmount()}}function Bn(L){process.env.NODE_ENV!=="production"&&nt(p.state.isDestroyed,Ct("hideWithInteractivity")),S().addEventListener("mousemove",m),ra(nn,m),m(L)}function Dn(){process.env.NODE_ENV!=="production"&&nt(p.state.isDestroyed,Ct("unmount")),p.state.isVisible&&p.hide(),p.state.isMounted&&(Ce(),xe().forEach(function(L){L._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),cn=cn.filter(function(L){return L!==p}),p.state.isMounted=!1,O("onHidden",[p]))}function Tn(){process.env.NODE_ENV!=="production"&&nt(p.state.isDestroyed,Ct("destroy")),!p.state.isDestroyed&&(p.clearDelayTimeouts(),p.unmount(),H(),delete t._tippy,p.state.isDestroyed=!0,O("onDestroy",[p]))}}function gt(t,n){n===void 0&&(n={});var o=Pe.plugins.concat(n.plugins||[]);process.env.NODE_ENV!=="production"&&(Fu(t),kr(n,o)),Pu();var a=Object.assign({},n,{plugins:o}),r=Du(t);if(process.env.NODE_ENV!=="production"){var s=It(a.content),i=r.length>1;nt(s&&i,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
45
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ae(){return gn(B.querySelectorAll("[data-tippy-root]"))}function Ve(O){f.clearDelayTimeouts(),O&&A("onTrigger",[f,O]),ee();var X=N(!0),se=L(),pe=se[0],ue=se[1];Qe.isTouch&&pe==="hold"&&ue&&(X=ue),X?a=setTimeout(function(){f.show()},X):f.show()}function _e(O){if(f.clearDelayTimeouts(),A("onUntrigger",[f,O]),!f.state.isVisible){E();return}if(!(f.props.trigger.indexOf("mouseenter")>=0&&f.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(O.type)>=0&&s)){var X=N(!1);X?r=setTimeout(function(){f.state.isVisible&&f.hide()},X):i=requestAnimationFrame(function(){f.hide()})}}function je(){f.state.isEnabled=!0}function We(){f.hide(),f.state.isEnabled=!1}function ct(){clearTimeout(a),clearTimeout(r),cancelAnimationFrame(i)}function Ye(O){if(process.env.NODE_ENV!=="production"&&nt(f.state.isDestroyed,_t("setProps")),!f.state.isDestroyed){A("onBeforeUpdate",[f,O]),H();var X=f.props,se=ma(t,Object.assign({},X,ca(O),{ignoreAttributes:!0}));f.props=se,Q(),X.interactiveDebounce!==se.interactiveDebounce&&(I(),p=ia(ie,se.interactiveDebounce)),X.triggerTarget&&!se.triggerTarget?At(X.triggerTarget).forEach(function(pe){pe.removeAttribute("aria-expanded")}):se.triggerTarget&&t.removeAttribute("aria-expanded"),F(),C(),S&&S(X,se),f.popperInstance&&(ge(),Ae().forEach(function(pe){requestAnimationFrame(pe._tippy.popperInstance.forceUpdate)})),A("onAfterUpdate",[f,O])}}function dt(O){f.setProps({content:O})}function yt(){process.env.NODE_ENV!=="production"&&nt(f.state.isDestroyed,_t("show"));var O=f.state.isVisible,X=f.state.isDestroyed,se=!f.state.isEnabled,pe=Qe.isTouch&&!f.props.touch,ue=In(f.props.duration,0,Pe.duration);if(!(O||X||se||pe)&&!Y().hasAttribute("disabled")&&(A("onShow",[f],!1),f.props.onShow(f)!==!1)){if(f.state.isVisible=!0,Z()&&(B.style.visibility="visible"),C(),ee(),f.state.isMounted||(B.style.transition="none"),Z()){var xe=x(),De=xe.box,rt=xe.content;$n([De,rt],0)}k=function(){var Xe;if(!(!f.state.isVisible||d)){if(d=!0,B.offsetHeight,B.style.transition=f.props.moveTransition,Z()&&f.props.animation){var kt=x(),st=kt.box,Re=kt.content;$n([st,Re],ue),da([st,Re],"visible")}D(),F(),la(dn,f),(Xe=f.popperInstance)==null||Xe.forceUpdate(),A("onMount",[f]),f.props.animation&&Z()&&$(ue,function(){f.state.isShown=!0,A("onShown",[f])})}},fe()}}function Vn(){process.env.NODE_ENV!=="production"&&nt(f.state.isDestroyed,_t("hide"));var O=!f.state.isVisible,X=f.state.isDestroyed,se=!f.state.isEnabled,pe=In(f.props.duration,1,Pe.duration);if(!(O||X||se)&&(A("onHide",[f],!1),f.props.onHide(f)!==!1)){if(f.state.isVisible=!1,f.state.isShown=!1,d=!1,s=!1,Z()&&(B.style.visibility="hidden"),I(),E(),C(!0),Z()){var ue=x(),xe=ue.box,De=ue.content;f.props.animation&&($n([xe,De],pe),da([xe,De],"hidden"))}D(),F(),f.props.animation?Z()&&U(pe,f.unmount):f.unmount()}}function Nn(O){process.env.NODE_ENV!=="production"&&nt(f.state.isDestroyed,_t("hideWithInteractivity")),P().addEventListener("mousemove",p),la(on,p),p(O)}function Dn(){process.env.NODE_ENV!=="production"&&nt(f.state.isDestroyed,_t("unmount")),f.state.isVisible&&f.hide(),f.state.isMounted&&(Ce(),Ae().forEach(function(O){O._tippy.unmount()}),B.parentNode&&B.parentNode.removeChild(B),dn=dn.filter(function(O){return O!==f}),f.state.isMounted=!1,A("onHidden",[f]))}function Tn(){process.env.NODE_ENV!=="production"&&nt(f.state.isDestroyed,_t("destroy")),!f.state.isDestroyed&&(f.clearDelayTimeouts(),f.unmount(),H(),delete t._tippy,f.state.isDestroyed=!0,A("onDestroy",[f]))}}function wt(t,n){n===void 0&&(n={});var o=Pe.plugins.concat(n.plugins||[]);process.env.NODE_ENV!=="production"&&(Ku(t),Er(n,o)),Wu();var a=Object.assign({},n,{plugins:o}),r=Uu(t);if(process.env.NODE_ENV!=="production"){var i=Ut(a.content),s=r.length>1;nt(i&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
46
46
 
47
47
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
48
48
 
49
49
  `,`1) content: element.innerHTML
50
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var l=r.reduce(function(c,d){var u=d&&Wu(d,a);return u&&c.push(u),c},[]);return It(t)?l[0]:l}gt.defaultProps=Pe;gt.setDefaultProps=ju;gt.currentInput=Ze;var Ju=function(n){var o=n===void 0?{}:n,a=o.exclude,r=o.duration;cn.forEach(function(s){var i=!1;if(a&&(i=hr(a)?s.reference===a:s.popper===a.popper),!i){var l=s.props.duration;s.setProps({duration:r}),s.hide(),s.state.isDestroyed||s.setProps({duration:l})}})};Object.assign({},or,{effect:function(n){var o=n.state,a={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(o.elements.popper.style,a.popper),o.styles=a,o.elements.arrow&&Object.assign(o.elements.arrow.style,a.arrow)}});gt.setDefaultProps({render:Cr});const _r={name:"render-avatar",props:["user","urlMethod"],setup(t){const n=e.ref("");e.onMounted(async()=>{try{typeof t.user=="string"?n.value=await t.urlMethod(t.user):typeof t.user=="object"&&(n.value=t.user.avatar||t.user.logo||await t.urlMethod(t.user.username))}catch{}});const o=e.ref(null);return e.watch(n,a=>{a&&(o.value.style.backgroundImage=`url(${n.value})`)}),()=>e.createVNode("span",{ref:o,class:"user-selector-avatar"},null)}},Yu={name:"render-list",props:{selector:{type:Object},user:{type:Object},keyword:{type:String},index:{type:Number},disabled:{type:Boolean}},setup(t){return()=>t.selector.renderList(e.h,{user:t.user,index:t.index,keyword:t.keyword,disabled:t.disabled})}},Zu={mounted(t,n){const o=typeof n.value=="object"?n.value:{disabled:!1,content:n.value},a=gt(t,Object.assign({appendTo:document.body},o));o.disabled&&a.disable()},unmounted(t){t._tippy?.destroy()},updated(t,n){const o=typeof n.value=="object"?n.value:{disabled:!1,content:n.value};o.disabled?t._tippy.disable():t._tippy.enable(),t._tippy.setContent(o.content)}},ma=e.defineComponent({name:"AlternateItem",directives:{tooltips:Zu},props:{selector:{type:Object},user:{type:Object},keyword:{type:String},index:{type:Number}},setup(t){const{selector:n,user:o,keyword:a}=e.toRefs(t);return{disabled:e.computed(()=>n.value.disabledUsers.includes(o.value.username)),getItemContent:()=>{const[l,c]=o.value.username.split("@");let d=l;a.value&&(d=d.replace(new RegExp(a.value,"g"),`<span>${a.value}</span>`));const u=n.value.displayDomain&&c?`${d}@${c}`:d,v=o.value.display_name;return v?`${u}(${v})`:u},getTitle:()=>n.value.getDisplayText(o.value)}},render(){return e.createVNode("li",{class:["alternate-item",this.index===this.selector.highlightIndex?"highlight":"",this.disabled&&!this.selector.renderList?"disabled":""],onClick:t=>t.stopPropagation(),onMousedown:e.withModifiers(()=>this.selector.handleUserMousedown(this.user,this.disabled),["left","stop"]),onMouseup:e.withModifiers(()=>this.selector.handleUserMouseup(this.user,this.disabled),["left","stop"])},[this.selector.renderList?e.createVNode(e.Fragment,null,[e.createVNode(Yu,{selector:this.selector,keyword:this.keyword,user:this.user,disabled:this.disabled},null)]):e.createVNode(e.Fragment,null,[this.selector.tagType==="avatar"?e.createVNode(e.Fragment,null,[e.createVNode(_r,{class:"item-avatar",user:this.user,urlMethod:this.selector.avatarUrl},null)]):null,this.selector.displayListTips&&this.user.category_name?e.createVNode(e.Fragment,null,[e.withDirectives(e.createVNode("span",{class:"item-folder"},[this.user.category_name]),[[e.resolveDirective("tooltips"),{placement:"right",interactive:!0,theme:"light list-item-tips",content:this.user.category_name,offset:[0,18]}]])]):null,e.createVNode("span",{class:"item-name",title:this.getTitle(),innerHTML:this.getItemContent()},null)])])}}),Ku=e.defineComponent({setup(){const{proxy:t}=e.getCurrentInstance();En.setInstance("alternateContent","alternateList",t);const n=e.ref(null),o=e.ref(""),a=e.ref(!0),r=e.ref(!0),s=e.ref([]),i=e.computed(()=>{const m={};return n.value?.panelWidth&&(m.width=`${parseInt(n.value.panelWidth,10)}px`),m}),l=e.computed(()=>{const m={"max-height":"192px"};if(n.value){const g=parseInt(n.value.listScrollHeight,10);isNaN(g)||(m["max-height"]=`${g}px`)}return m}),c=(m,g=0)=>{let f=0;return s.value.slice(0,m).forEach(b=>{b.hasOwnProperty("children")?f+=b.children.length:f+=1}),f+g},d=()=>{if(Ju({exclude:n.value.inputRef,duration:0}),r.value||!a.value)return!1;const m=v.value;m.scrollTop+m.clientHeight>m.scrollHeight-32&&n.value.search(o.value,a.value)};e.watch(o,()=>{w.value=[],e.nextTick(()=>{v.value.scrollTop=0})});const u=e.ref(null),v=e.ref(null),w=e.ref([]);return{selector:n,keyword:o,next:a,loading:r,matchedUsers:s,wrapperStyle:i,listStyle:l,getIndex:c,handleScroll:d,alternateListContainer:u,alternateList:v,alternateItem:w,setRef:m=>{w.value.push(m)}}},render(){return e.createVNode("div",{ref:"alternateListContainer",class:["user-selector-alternate-list-wrapper",this.selector?.displayListTips?"has-folder":"",this.loading?"is-loading":""],style:this.wrapperStyle},[e.createVNode("ul",{class:"alternate-list",ref:"alternateList",style:this.listStyle,onScroll:()=>void this.handleScroll()},[this.matchedUsers.map((t,n)=>t.hasOwnProperty("children")?e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"alternate-group",onClick:o=>o.stopPropagation(),onMousedown:e.withModifiers(()=>void this.selector.handleGroupMousedown(),["left","stop"]),onMouseup:e.withModifiers(()=>void this.selector.handleGroupMouseup(),["left","stop"])},[`${t.display_name}(${t.children.length})`]),t.children.map((o,a)=>e.createVNode(e.Fragment,null,[e.createVNode(ma,{ref:r=>void this.setRef(r),index:this.getIndex(n,a),selector:this.selector,user:o,keyword:this.keyword},null)]))]):e.createVNode(e.Fragment,null,[e.createVNode(ma,{ref:o=>void this.setRef(o),selector:this.selector,user:t,index:this.getIndex(n),keyword:this.keyword},null)]))]),!this.loading&&!this.matchedUsers.length?e.createVNode(e.Fragment,null,[e.createVNode("p",{class:"alternate-empty"},[this.selector.emptyText])]):null])}}),Qu={name:"render-tag",props:["username","user","index"],setup(t){const n=e.inject("parentSelector");return()=>n.renderTag(e.h,{username:t.username,index:t.index,user:t.user})}},Xu=e.defineComponent({name:"BkUserSelector",components:{RenderTag:Qu,RenderAvatar:_r},props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入"},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},exclude:{type:Boolean,default:!0},focusRowLimit:{type:Number,default:6},defaultAlternate:{type:[String,Array,Function],validator(t){return t==="history"||typeof t=="function"||t instanceof Array}},searchFromDefaultAlternate:{type:Boolean,default:!0},historyKey:String,historyLabel:{type:String,default:"最近选择"},historyRecord:{type:Number,default:5},displayListTips:Boolean,fuzzySearchMethod:Function,exactSearchMethod:Function,emptyText:{type:String,default:"无匹配人员"},tagClearable:{type:Boolean,default:!0},fastClear:Boolean,renderList:Function,renderTag:Function,displayTagTips:Boolean,tagTipsContent:Function,tagTipsDelay:{type:Number,default:300},tagType:{type:String,default:"tag",validator(t){return["tag","avatar"].includes(t)}},avatarUrl:{type:Function,default:()=>null},fixedHeight:{type:Boolean,default:!0},disabledUsers:{type:Array,default:()=>[]},listScrollHeight:[Number,String],api:String,searchLimit:{type:Number,default:20},pasteFormatter:{type:Function,default(t){return t.replace(/\(.*/,"")}},pasteValidator:Function,panelWidth:{type:[Number,String],validator(t){return parseInt(t,10)>=190}},displayDomain:{type:Boolean,default:!0},type:{type:String,default:"selector",validator(t){return["selector","info"].includes(t)}}},emits:["update:modelValue","change","remove-selected","select-user","keydown","focus","blur","clear"],setup(t,n){const{modelValue:o,disabled:a,multiple:r,exclude:s,focusRowLimit:i,defaultAlternate:l,searchFromDefaultAlternate:c,historyKey:d,historyLabel:u,historyRecord:v,fuzzySearchMethod:w,exactSearchMethod:h,displayTagTips:m,tagTipsContent:g,tagTipsDelay:f,fixedHeight:b,disabledUsers:y,api:_,searchLimit:p,pasteFormatter:k,pasteValidator:C,displayDomain:E,type:I}=e.toRefs(t),z=async($,G)=>{try{const Q=xe();Ne(),Q.setContent(x.value.$refs.alternateListContainer),ct(),x.value.loading=!!$;const{results:re,next:me}=await new Promise(async(Ee,Kt)=>{if($){const Qt=[(w.value||ge)($,G)];c.value&&Qt.push(ie($));const[Ao,Eo]=await Promise.all(Qt);Eo&&Ao.results.unshift(...Eo.results),Ee(Ao)}else{const Qt=ie();Ee(Qt)}});if(!Z.value)return;const{matched:be,flattened:ke}=de(re);if(!$&&!ke.length){Je();return}R.value=G?[...R.value,...be]:be,W.value=G?[...W.value,...ke]:ke,N.value=ke.length&&D.value?0:-1,x.value.next=me,x.value.keyword=$,x.value.matchedUsers=R.value,x.value.loading=!1}catch(Q){if(Q.type==="reset")return;R.value=[],W.value=[],console.error(Q)}},V=e.ref(null),P=e.ref(null),{proxy:X}=e.getCurrentInstance();e.provide("parentSelector",X);const ee=e.ref(32),S=e.ref(30),D=e.ref(""),T=e.ref(0),N=e.ref(-1),O=e.ref(!0),Z=e.ref(!1),A=e.ref(null),M=e.ref([]),R=e.ref([]),W=e.ref([]),q=ve.throttle(z,800,{leading:!1}),J=e.ref(null),x=e.ref(null),U=e.ref({}),F=e.ref(null),j=e.ref(!1),Y=e.computed(()=>I.value==="selector"),K=e.computed(()=>{const $={};return Z.value?$.maxHeight=b.value?`${i.value*S.value}px`:"auto":b.value&&($.height=`${S.value}px`),$}),H=e.ref([]);H.value=[...o.value];const te=e.computed(()=>H.value.map($=>M.value.find(Q=>Q.username===$)||{username:$})),ae=e.computed(()=>te.value.map($=>yt($)).join(";")),le=async()=>{try{_.value?M.value=await Mt.scheduleExactSearch(_.value,H.value):h.value?M.value=await h.value(H.value):console.warn("No exact search method has been set")}catch($){console.error($)}},ie=async $=>{let G=[];const Q=(re,me)=>re.username.toLowerCase().indexOf(me.toString().toLowerCase())>-1;if(l.value==="history"?G=[{display_name:u.value,children:_e()}]:l.value instanceof Array?G=l.value:typeof l.value=="function"&&(G=await l.value()),$){const re=[];G.forEach(me=>{if(me.hasOwnProperty("children")){const be=me.children.filter(ke=>Q(ke,$));be.length&&re.push({...me,children:be})}else Q(me,$)&&re.push(me)}),G=re}return Promise.resolve({results:G,next:!1})},de=$=>{const G=[],Q=[];return $.forEach(re=>{if(re.hasOwnProperty("children")){const ke=re.children.filter(Ee=>!Q.some(Kt=>Kt.username===Ee.username));if(r.value){const Ee=ke.filter(Kt=>!H.value.includes(Kt.username));Ee.length&&(re.children=Ee,G.push(re),Q.push(...Ee))}else G.push(re),Q.push(...ke);return}const me=H.value.includes(re.username),be=Q.some(ke=>ke.username===re.username);(!r.value||!me)&&!be&&(G.push(re),Q.push(re))}),{matched:G,flattened:Q}},ge=async($,G)=>{if(_.value){const Q={app_code:"bk-magicbox",page:G||1,page_size:p.value,fuzzy_lookups:$},{count:re,results:me}=await Mt.fuzzySearch(_.value,Q);return{next:re>Q.page*Q.page_size?Q.page+1:!1,results:me}}return w.value?w.value($,G):(console.warn("No fuzzy search method has been set"),Promise.resolve({next:!1,results:[]}))},Ce=async($,G)=>{try{const Q=document.createElement("span");if(typeof g.value=="function"){const re=await g.value(G);Q.innerHTML=re}else{const re=await(h.value||fe)(G);Q.innerHTML=re?re.category_name:"Non existing user"}$.setContent(Q)}catch(Q){console.error(Q),$.setContent(Q.message)}},fe=$=>_.value?Mt.exactSearch(_.value,$):h.value?h.value($):(console.warn("No exact search method has been set"),Promise.resolve({})),xe=()=>(J.value||(J.value=gt(P.value,{theme:"light user-selector-popover",appendTo:document.body,trigger:"manual",placement:"bottom-start",offset:[0,5],arrow:!1,hideOnClick:!1,content:"",interactive:!0,onHide:()=>{dt()},onShow:()=>Z.value})),J.value),Ne=()=>{if(!x.value){const $=e.createApp(Ku),G=document.createElement("div");$.mount(G),x.value=En.getInstance("alternateContent","alternateList"),x.value.selector=X}},_e=()=>{try{if(d.value)return(JSON.parse(window.localStorage.getItem(d.value))||[]).filter(G=>!y.value.includes(G.username));throw new Error("History key not provide")}catch($){return console.error($),[]}},je=$=>{if(d.value)try{const G=_e(),Q=G.findIndex(me=>me.username===$.username);Q>-1&&G.splice(Q,1),Array.isArray($)?G.unshift(...$):G.unshift($);const re=G.filter(me=>!y.value.includes(me.username)).slice(0,v.value);window.localStorage.setItem(d.value,JSON.stringify(re))}catch(G){console.error(G)}},We=()=>{J.value?.popperInstance?.update()},ct=()=>{We(),J.value?.show(0)},Je=()=>{J.value?.hide(0)},dt=()=>{e.nextTick(()=>{R.value=[],W.value=[],x.value.matchedUsers=[]})},yt=$=>{const G=typeof $=="object";let Q=G?$.username:$;return Q=E.value?Q:Q.replace(/@.*/,""),G&&$.display_name&&(Q+=`(${$.display_name})`),Q},Nn=()=>{if(a.value)return!1;Pn(),T.value=H.value.length,!r.value&&o.value.length?(D.value=yt(o.value[0]),P.value.innerHTML=D.value,Be(0,{selectRange:!0})):Be(0)},Bn=$=>{J.value?.state.isVisible&&$.preventDefault()},Dn=($,G)=>{if(a.value)return!1;O.value=!1},Tn=($,G)=>{if(a.value)return!1;if(r.value){const Q=$.target,{offsetWidth:re}=Q,me=$.offsetX;T.value=me>re/2?G+1:G,Be(0)}else D.value=yt(o.value[0]),P.value.innerHTML=D.value,Be(0,{selectRange:!0})},L=($,{username:G})=>{if(!m.value)return!1;const Q=$.currentTarget;if(Q._user_tips_)return!1;U.value[G]=setTimeout(()=>{Q._user_tips_=gt(Q,{theme:"light small-arrow user-selected-tips",offset:[0,5],appendTo:document.body,arrow:!0,content:"loading...",placement:"top",interactive:!0,onShow:re=>{Ce(re,G)}}),Q._user_tips_.show(),delete U.value[G]},f.value)},ne=($,{username:G})=>{m.value&&U.value[G]&&clearTimeout(U.value[G])},se=()=>{O.value=!1},pe=({username:$},G)=>{if(a.value)return!1;const Q=[...H.value];Q.splice(G,1),H.value=Q,et(),Z.value?Be(G>=T.value?0:-1):Ge(),n.emit("remove-selected",$)},ue=($,G)=>{O.value=!1},Ae=($,G)=>{if(G||G.value)return Be(0),!1;if(je($),M.value.push($),r.value){const Q=[...H.value];Q.splice(T.value,0,$.username),H.value=Q,setTimeout(()=>{Be(1),wt({reset:!0}),z()},0)}else H.value=[$.username],et(),Ge();n.emit("select-user",$)},De=()=>{O.value=!1},at=()=>{Be(0)},wt=($={})=>{$.reset&&et(),Z.value=!0,O.value=!0,e.nextTick(()=>{const G=P.value;if(!G)return;G.focus();const Q=window.getSelection();Q.selectAllChildren(G),!$.selectRange&&Q.collapseToEnd()})},Xe=$=>{if(j.value){$.preventDefault(),$.stopPropagation();return}const{key:G}=$,Q={Enter:bt,Backspace:rt,Delete:rt,ArrowLeft:$e,ArrowRight:$e,ArrowUp:$e,ArrowDown:$e};Q.hasOwnProperty(G)&&Q[G]($),n.emit("keydown",$)},bt=$=>{if($.preventDefault(),$.stopPropagation(),O.value=!1,N.value!==-1){const{username:G}=W.value[N.value];if(y.value.includes(G))return!1;if(r.value){const re=[...H.value];re.splice(T.value,0,G),H.value=re,Be(1,{reset:!0})}else H.value=[G],et(),Ge()}else if(D.value)if(!s.value&&!H.value.includes(D.value))if(r.value){const G=[...H.value];G.splice(T.value,0,D.value),H.value=G,Be(1,{reset:!0})}else H.value=[D.value],et(),Ge();else et();else et(),Ge();Je()},rt=$=>{if(D.value||!H.value.length||!T.value)return!0;O.value=!1;const G=[...H.value];G.splice(T.value-1,1),H.value=G,Be(-1),z()},$e=$=>{const G=$.key;if(["ArrowLeft","ArrowRight"].includes(G)){if(D.value||!H.value.length)return!0;G==="ArrowLeft"&&T.value!==0?Be(-1):G==="ArrowRight"&&T.value!==H.value.length&&Be(1)}else W.value.length&&($.preventDefault(),G==="ArrowDown"?N.value<W.value.length-1?N.value+=1:x.value.next?(x.value.$refs.alternateList.scrollTop+=32,x.value.handleScroll()):N.value=0:G==="ArrowUp"&&N.value!==-1&&(N.value-=1))},Sn=$=>{if(j.value){$.preventDefault(),$.stopPropagation();return}D.value=P.value.textContent.trim()},Ge=()=>{if(!O.value)return!0;Z.value=!1,Je()},kt=$=>W.value.find(Q=>{const re=Q.username,me=Q.display_name,be=[re,me].some(Ee=>Ee.toLowerCase()===$.toLowerCase()),ke=H.value.includes(re);return be&&!ke}),ko=async $=>{if(_.value){const Q=(await Mt.pasteValidate(_.value,$)).map(re=>re.username);return s.value?Q:[...new Set(Q.concat($))]}return C.value?C.value(values):(console.warn("No paste validator has been set"),Promise.resolve([]))},Tr=async $=>{Je(),j.value&&($.preventDefault(),$.stopPropagation());try{j.value=!0;const Q=$.clipboardData.getData("text").replace(/\s/g,"").split(/,|;/).map(Ee=>k.value(Ee)).filter(Ee=>Ee.length),re=[...new Set(Q)];if(!re.length)return;const me=await(C.value||ko)(re),be=me.filter(Ee=>!H.value.includes(Ee));if(!me.length)return;const ke=[...H.value];ke.splice(T.value,0,...be),H.value=ke,r.value?Z.value&&Be(be.length,{reset:!0}):Ge()}catch(G){console.error(G)}finally{j.value=!1}},Yt=()=>Array.from(V.value.querySelectorAll(".user-selector-selected")),Be=($,G={})=>{T.value=T.value+$,e.nextTick(()=>{const re=Yt()[T.value]||null;V.value.insertBefore(P.value,re),wt(G),We()})},Mn=()=>{if(!x.value||!Y.value)return!1;e.nextTick(()=>{const{highlightIndex:$}=X,G=x.value.$refs.alternateList;if(!G)return!1;if($!==-1){const Q=x.value.alternateItem[$].$el,re=G.clientHeight,me=G.scrollTop,be=Q.offsetTop,ke=Q.offsetHeight;if(be>=me&&be+ke<=me+re)return!1;be<=me?G.scrollTop=be:be+ke>me+re&&(G.scrollTop=be+ke-re)}else G.scrollTop=0})},Ln=e.ref(0),Zt=()=>{if(!Y.value||(xo(),!b.value||Z.value||H.value.length<2))return!1;Pn(),Ln.value=setTimeout(()=>{const $=Yt(),G=$.findIndex((Q,re)=>re?$[re-1].offsetTop!==Q.offsetTop:!1);G>-1?A.value=G:A.value=null,V.value.scrollTop=0,Co()},0)},Pn=()=>{Ln.value&&clearTimeout(Ln.value)},Co=()=>{if(!A.value)return;_o();const $=Yt(),G=$[A.value];if(G)F.value.textContent=`+${H.value.length-A.value}`,V.value.insertBefore(F.value,G);else{A.value=null;return}setTimeout(()=>{const Q=$[A.value-1];F.value.offsetTop!==Q.offsetTop&&(A.value-=1,V.value.insertBefore(F.value,F.value.previousSibling),F.value.textContent=`+${H.value.length-A.value}`)},0)},_o=()=>{if(F.value)return F.value;const $=document.createElement("span");$.className="user-selector-overflow-tag",F.value=$},xo=()=>{F.value&&F.value.parentNode===V.value&&V.value.removeChild(F.value)},Sr=()=>{H.value=[],n.emit("clear")},et=()=>{O.value=!0,N.value=-1,D.value="",P.value.innerHTML=""};return e.watch(D,$=>{$.length?(N.value=-1,Mn(),q($)):Z.value&&z()}),e.watch(Z,$=>{$?(z(),n.emit("focus")):(et(),n.emit("blur")),Zt()}),e.watch(N,()=>{Mn()}),e.watch(H,$=>{n.emit("update:modelValue",$),n.emit("change",$),Zt(),le()}),e.onMounted(()=>{Zt(),le()}),{selectorHeight:ee,singleRowHeight:S,inputValue:D,inputIndex:T,highlightIndex:N,shouldUpdate:O,isFocus:Z,overflowTagIndex:A,currentUsers:M,matchedUsers:R,flattenedUsers:W,scheduleSearch:q,popoverInstance:J,alternateContent:x,selectedTipsTimer:U,overflowTagNode:F,loading:j,isSelector:Y,containerStyle:K,localValue:H,localValueUsers:te,userInfo:ae,getCurrentUsers:le,search:z,getDefaultAlternateData:ie,filterUsers:de,defaultFuzzySearchMethod:ge,getUserTips:Ce,defaultExactSearchMethod:fe,getPopoverInstance:xe,getAlternateContent:Ne,getHistoryUsers:_e,updateHistoryUsers:je,updatePopover:We,showPopover:ct,hidePopover:Je,handlePopoverHide:dt,getDisplayText:yt,focus:Nn,handleContainerScroll:Bn,handleSelectedMousedown:Dn,handleSelectedMouseup:Tn,handleSelectedMouseenter:L,handleSelectedMouseleave:ne,handleRemoveMouseDown:se,handleRemoveSelected:pe,handleUserMousedown:ue,handleUserMouseup:Ae,handleGroupMousedown:De,handleGroupMouseup:at,setSelection:wt,handleKeydown:Xe,handleEnter:bt,handleBackspace:rt,handleArrow:$e,handleInput:Sn,handleBlur:Ge,getMatchedUser:kt,defaultPasteValidator:ko,handlePaste:Tr,getSelectedDOM:Yt,moveInput:Be,updateScroller:Mn,calcOverflow:Zt,clearOverflowTimer:Pn,insertOverflowTag:Co,getOverflowTagNode:_o,removeOverflowTagNode:xo,handleFastClear:Sr,reset:et,containerRef:V,inputRef:P}}}),ep={class:"user-selector-layout"},tp=["data-placeholder"],np=["onMousedown","onMouseup","onMouseenter","onMouseleave"],op={class:"user-selector-selected-value"},ap=["onClick"],rp={key:1,class:"user-selector user-selector-info"};function ip(t,n,o,a,r,s){const i=e.resolveComponent("render-tag"),l=e.resolveComponent("render-avatar");return t.isSelector?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:"user-selector"},t.$attrs,{style:{height:t.fixedHeight?t.selectorHeight+"px":"auto"},onMousedown:n[10]||(n[10]=c=>t.shouldUpdate=!1),onClick:n[11]||(n[11]=(...c)=>t.focus&&t.focus(...c))}),[e.createElementVNode("div",ep,[e.createElementVNode("div",{class:e.normalizeClass(["user-selector-container",{focus:t.isFocus,disabled:t.disabled,placeholder:!t.localValue.length&&!t.isFocus,"is-fast-clear":t.fastClear,"has-avatar":t.tagType==="avatar","is-loading":t.loading,"is-flex-height":!t.fixedHeight}]),ref:"containerRef",style:e.normalizeStyle(t.containerStyle),"data-placeholder":t.placeholder,onMousewheel:n[8]||(n[8]=(...c)=>t.handleContainerScroll&&t.handleContainerScroll(...c))},[t.multiple||!t.isFocus?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.localValueUsers,(c,d)=>(e.openBlock(),e.createElementBlock("span",{class:"user-selector-selected",key:c.username,onClick:n[2]||(n[2]=e.withModifiers(()=>{},["stop"])),onMousedown:e.withModifiers(u=>t.handleSelectedMousedown(u,d),["left","stop"]),onMouseup:e.withModifiers(u=>t.handleSelectedMouseup(u,d),["left","stop"]),onMouseenter:u=>t.handleSelectedMouseenter(u,c),onMouseleave:u=>t.handleSelectedMouseleave(u,c)},[t.renderTag?(e.openBlock(),e.createBlock(i,{key:0,user:c,username:c.username,index:d},null,8,["user","username","index"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.tagType==="avatar"?(e.openBlock(),e.createBlock(l,{key:0,class:"user-selector-selected-avatar",user:c,"url-method":t.avatarUrl},null,8,["user","url-method"])):e.createCommentVNode("",!0),e.createElementVNode("span",op,e.toDisplayString(t.getDisplayText(c)),1)],64)),t.tagClearable&&t.tagType==="tag"?(e.openBlock(),e.createElementBlock("i",{key:2,class:"user-selector-selected-clear bk-biz-components-icon bk-biz-icon-close",onMouseup:n[0]||(n[0]=e.withModifiers(()=>{},["left","stop"])),onMousedown:n[1]||(n[1]=e.withModifiers((...u)=>t.handleRemoveMouseDown&&t.handleRemoveMouseDown(...u),["left","stop"])),onClick:e.withModifiers(u=>t.handleRemoveSelected(c,d),["stop","prevent"])},null,40,ap)):e.createCommentVNode("",!0)],40,np))),128)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("span",{ref:"inputRef",class:"user-selector-input",spellcheck:"false",contenteditable:"",onClick:n[3]||(n[3]=e.withModifiers(()=>{},["stop"])),onInput:n[4]||(n[4]=c=>t.handleInput(c)),onBlur:n[5]||(n[5]=(...c)=>t.handleBlur&&t.handleBlur(...c)),onPaste:n[6]||(n[6]=e.withModifiers(c=>t.handlePaste(c),["prevent","stop"])),onKeydown:n[7]||(n[7]=c=>t.handleKeydown(c))},null,544),[[e.vShow,t.isFocus]])],46,tp),t.fastClear&&!t.disabled&&t.localValue.length?(e.openBlock(),e.createElementBlock("i",{key:0,class:"user-selector-clear bk-biz-components-icon bk-biz-icon-close-circle-shape",onClick:n[9]||(n[9]=e.withModifiers((...c)=>t.handleFastClear&&t.handleFastClear(...c),["stop"]))})):e.createCommentVNode("",!0)])],16)):(e.openBlock(),e.createElementBlock("span",rp,e.toDisplayString(t.userInfo),1))}const sp=oe(Xu,[["render",ip]]),lp=e.defineComponent({__name:"index",props:{modelValue:{},multiple:{type:Boolean,default:!0},placeholder:{default:""},disabled:{type:Boolean,default:!1},fetchUserApi:{default:""}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref([]);e.watch(()=>o.modelValue,()=>{r.value=[...o.modelValue]});const s=i=>{a("update:modelValue",i.slice()),a("change",i.slice())};return(i,l)=>(e.openBlock(),e.createBlock(e.unref(sp),{modelValue:o.modelValue,"onUpdate:modelValue":l[0]||(l[0]=c=>o.modelValue=c),api:o.fetchUserApi,"fix-height":!0,multiple:o.multiple,placeholder:o.placeholder,disabled:o.disabled,onChange:s},null,8,["modelValue","api","multiple","placeholder","disabled"]))}}),cp={class:"notify-type-wrapper"},dp={key:1},up=e.defineComponent({__name:"notify-config-forms",props:{config:{},editable:{type:Boolean,default:!0},fetchUserApi:{default:""}},emits:["change"],setup(t,{emit:n}){const o=[{label:"任务状态"},{label:"微信",type:"weixin",icon:cd},{label:"企业微信",type:"rtx",icon:dd},{label:"邮件",type:"mail",icon:ud},{label:"短信",type:"sms",icon:pd},{label:"语音",type:"voice",icon:fd}],a=t,r=n,s=[[],[]],i=e.ref([]),l=e.ref([]),c=e.ref([]);e.watch(()=>a.config,()=>{const{notify_type:h,notify_receivers:m}=a.config;i.value=[...h.success],l.value=[...h.fail],c.value=m.more_receiver?m.more_receiver.split(","):[]},{immediate:!0});const d=h=>{const m=o[h];return m.type?e.createVNode("div",{class:"notify-table-header"},[e.createVNode("img",{class:"notify-icon",src:m.icon},null),e.createVNode("p",{class:"label-text"},[m.label])]):e.createVNode("p",{class:"label-text"},[m.label])},u=(h,m)=>h===0?i.value.includes(m):l.value.includes(m),v=(h,m,g)=>{const f=h===0?i.value:l.value;if(g)f.includes(m)||f.push(m);else{const b=f.findIndex(y=>y===m);b>-1&&f.splice(b,1)}w()},w=()=>{r("change",{notify_type:{success:i.value,fail:l.value},notify_receivers:{more_receiver:c.value.join(","),receiver_group:[]}})};return(h,m)=>{const g=e.resolveComponent("bk-switcher"),f=e.resolveComponent("bk-table-column"),b=e.resolveComponent("bk-table"),y=e.resolveComponent("bk-form-item");return e.openBlock(),e.createElementBlock("div",cp,[e.createVNode(y,{label:"通知方式"},{default:e.withCtx(()=>[e.createVNode(b,{class:"notify-type-table",data:s,border:["outer"]},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,_=>e.createVNode(f,{key:_.type,label:d},{default:e.withCtx(({index:p})=>[_.type?(e.openBlock(),e.createBlock(g,{key:0,size:"small",theme:"primary",disabled:!a.editable,value:u(p,_.type),onChange:k=>v(p,_.type,k)},null,8,["disabled","value","onChange"])):(e.openBlock(),e.createElementBlock("span",dp,e.toDisplayString(p===0?"成功":"失败"),1))]),_:2},1024)),64))]),_:1})]),_:1}),e.createVNode(y,{label:"通知人"},{default:e.withCtx(()=>[e.createVNode(lp,{modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=_=>c.value=_),class:"receivers-selector",placeholder:"请选择通知人","fetch-user-api":a.fetchUserApi,disabled:!a.editable,onChange:w},null,8,["modelValue","fetch-user-api","disabled"])]),_:1})])}}}),pp=oe(up,[["__scopeId","data-v-9ca32fa9"]]),fp={class:"template-settings"},mp=e.defineComponent({__name:"index",props:{settings:{},editable:{type:Boolean,default:!0},fetchUserApi:{default:""}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(ve.cloneDeep(a.settings)),i=e.ref(),l={name:[{required:!0,message:"请输入流程名称"}]};e.watch(()=>a.settings,v=>{s.value=ve.cloneDeep(v)});const c=v=>{s.value.notify_config=v,u()},d=()=>i.value.validate().then(()=>!0).catch(()=>!1),u=()=>{r("change",s.value)};return n({validate:d}),(v,w)=>{const h=e.resolveComponent("bk-input"),m=e.resolveComponent("bk-form-item"),g=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("div",fp,[e.createVNode(g,{ref_key:"formRef",ref:i,"label-width":140,model:s.value,rules:l},{default:e.withCtx(()=>[e.createVNode(xt,{title:"基础"},{default:e.withCtx(()=>[e.createVNode(m,{label:"流程名称",property:"name",required:!0},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:s.value.name,"onUpdate:modelValue":w[0]||(w[0]=f=>s.value.name=f),"show-word-limit":"",maxlength:50,disabled:!a.editable,onChange:u},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(xt,{title:"通知",desc:"选择通知方式后,将默认通知到任务执行人"},{default:e.withCtx(()=>[e.createVNode(pp,{config:s.value.notify_config,editable:a.editable,"fetch-user-api":a.fetchUserApi,onChange:c},null,8,["config","editable","fetch-user-api"])]),_:1}),e.createVNode(xt,{title:"其他"},{default:e.withCtx(()=>[e.createVNode(m,{label:"备注"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:s.value.desc,"onUpdate:modelValue":w[1]||(w[1]=f=>s.value.desc=f),type:"textarea",placeholder:"请输入流程模板备注信息",rows:5,resize:!1,disabled:!a.editable,onChange:u},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1},8,["model"])])}}}),vp=oe(mp,[["__scopeId","data-v-7141b698"]]),hp={class:"basic-setting-slider"},gp={class:"sideslider-footer-buttons"},yp=e.defineComponent({__name:"index",props:{editable:{type:Boolean,default:!0},show:{type:Boolean},settings:{},fetchUserApi:{default:""}},emits:["change","close","update:show"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(ve.cloneDeep(o.settings)),s=e.ref();e.watch(()=>o.settings,d=>{r.value=ve.cloneDeep(d)});const i=d=>{r.value=d},l=async()=>{await s.value?.validate()&&(a("change",r.value),c())},c=()=>{a("close"),a("update:show",!1)};return(d,u)=>{const v=e.resolveComponent("bk-button"),w=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(w,{title:"基础信息","is-show":o.show,width:800,"quick-close":!o.editable,"esc-close":!1,"before-close":c},{footer:e.withCtx(()=>[e.createElementVNode("div",gp,[o.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v,{theme:"primary",onClick:l},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(v,{onClick:c},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(v,{key:1,theme:"primary",onClick:c},{default:e.withCtx(()=>[...u[2]||(u[2]=[e.createTextVNode("关闭",-1)])]),_:1}))])]),default:e.withCtx(()=>[e.createElementVNode("div",hp,[e.createVNode(vp,{ref_key:"templateSettingsRef",ref:s,settings:r.value,editable:o.editable,"fetch-user-api":o.fetchUserApi,onChange:i},null,8,["settings","editable","fetch-user-api"])])]),_:1},8,["is-show","quick-close"])}}}),wp=oe(yp,[["__scopeId","data-v-e2a7edd9"]]),bp={class:"editor-header"},kp=e.defineComponent({__name:"index",props:{modelValue:{},options:{}},emits:["update:modelValue","change","blur","save"],setup(t,{emit:n}){An();const o={language:"javascript",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},wordWrap:"on",wrappingIndent:"same"},a=t,r=n,s=e.ref(),i=e.shallowRef(),l=e.shallowRef(!1);e.watch(()=>a.modelValue,m=>{const g=i.value?.getValue();m!==g&&i.value?.setValue(m)}),e.watch(()=>a.options,m=>{i.value?.updateOptions({...o,...m})},{deep:!0}),e.onMounted(()=>{c()}),e.onBeforeUnmount(()=>{i.value&&i.value.dispose()});const c=()=>{i.value=Lt.editor.create(s.value,{...o,...a.options,value:a.modelValue});const m=i.value.getModel();if(m&&(m.setEOL(0),m.onDidChangeContent(()=>{const g=i.value?.getValue();h(g)})),a.modelValue.indexOf(`\r
51
- `)>-1){const g=document.createElement("textarea");g.value=a.modelValue,h(g.value)}i.value.onDidBlurEditorText(()=>{r("blur")}),i.value.addCommand(Lt.KeyMod.CtrlCmd|Lt.KeyCode.KeyS,()=>{const g=i.value?.getValue();r("save",g)})},d=()=>{const m=document.createElement("textarea");m.value=i.value.getValue(),document.body.appendChild(m),m.select(),document.execCommand("copy"),document.body.removeChild(m),dn({theme:"success",message:"复制成功"})},u=()=>{l.value=!0,window.addEventListener("keydown",w,{once:!0}),dn({theme:"primary",message:"按 Esc 即可退出全屏模式"})},v=()=>{l.value=!1,window.removeEventListener("keydown",w)},w=m=>{m.code==="Escape"&&(l.value=!1)},h=m=>{r("update:modelValue",m),r("change",m)};return(m,g)=>{const f=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createBlock(e.Teleport,{disabled:!l.value,to:"body"},[e.createElementVNode("div",{class:e.normalizeClass(["bkflow-code-editor",{fullscreen:l.value}])},[e.createElementVNode("div",bp,[e.withDirectives(e.createVNode(e.unref(Oe.Copy),{class:"copy-icon",onClick:d},null,512),[[f,{content:"复制",placement:"top",distance:20}]]),l.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(Oe.UnfullScreen),{key:1,class:"fullscreen-icon",onClick:v},null,512)),[[f,{content:"退出全屏",placement:"top",distance:20}]]):e.withDirectives((e.openBlock(),e.createBlock(e.unref(Oe.FilliscreenLine),{key:0,class:"fullscreen-icon",onClick:u},null,512)),[[f,{content:"全屏",placement:"top",distance:20}]])]),e.createElementVNode("div",{ref_key:"monacoContainerRef",ref:s,class:"editor-instance-container"},null,512)],2)],8,["disabled"])}}}),xr=oe(kp,[["__scopeId","data-v-67af4661"]]),Cp={class:"pipeline-tree-code"},_p=e.defineComponent({__name:"pipeline-tree-code",props:{pipelineTree:{}},setup(t){const n=t,o=e.computed(()=>JSON.stringify(n.pipelineTree,null,4)),a=e.ref({readOnly:!0,language:"json"});return(r,s)=>(e.openBlock(),e.createElementBlock("div",Cp,[e.createVNode(xr,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=i=>o.value=i),options:a.value},null,8,["modelValue","options"])]))}}),xp=oe(_p,[["__scopeId","data-v-3b34a5ab"]]),Ap={class:"pipeline-tree-code-slider"},Ep={class:"sideslider-footer-buttons"},Vp=e.defineComponent({__name:"index",props:{show:{type:Boolean},pipelineTree:{},editable:{type:Boolean,default:!0}},emits:["close","update:show"],setup(t,{emit:n}){const o=t,a=n,r=()=>{a("close"),a("update:show",!1)};return(s,i)=>{const l=e.resolveComponent("bk-button"),c=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(c,{title:"Code","is-show":o.show,width:800,"esc-close":!1,"before-close":r},{footer:e.withCtx(()=>[e.createElementVNode("div",Ep,[e.createVNode(l,{theme:"primary",onClick:r},{default:e.withCtx(()=>[...i[0]||(i[0]=[e.createTextVNode("关闭",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",Ap,[o.show?(e.openBlock(),e.createBlock(xp,{key:0,"pipeline-tree":o.pipelineTree},null,8,["pipeline-tree"])):e.createCommentVNode("",!0)])]),_:1},8,["is-show"])}}}),Np=oe(Vp,[["__scopeId","data-v-8fcc9638"]]),Bp={class:"flow-info-sliders"},Dp={class:"icons"},Tp=e.defineComponent({__name:"index",props:{flowData:{},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0},fetchUserApi:{default:""},apiConfig:{}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(!1),i=e.ref(!1),l=e.ref({show:!1,settings:{name:"",desc:"",notify_config:{notify_type:{success:[],fail:[]},notify_receivers:{more_receiver:"",receiver_group:[]}}}}),c=e.ref(!1),d=()=>{const{name:h,desc:m,notify_config:g}=a.flowData,{notify_type:f={success:[],fail:[]},notify_receivers:b={more_receiver:"",receiver_group:[]}}=g;l.value={show:!0,settings:{name:h,desc:m,notify_config:{notify_type:f,notify_receivers:b}}}},u=h=>{l.value.settings=h,r("change",{...a.flowData,...h})},v=h=>{const m={...a.flowData.pipeline_tree,constants:h};r("change",{...a.flowData,pipeline_tree:m})},w=(h,m)=>{const g=[...a.flowData.pipeline_tree.outputs],f=g.indexOf(h);m?f===-1&&g.push(h):f>-1&&g.splice(f,1);const b={...a.flowData.pipeline_tree,outputs:g};r("change",{...a.flowData,pipeline_tree:b})};return n({openBasicSetting:d}),(h,m)=>{const g=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",Bp,[e.createElementVNode("span",Dp,[e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-caozuojilu",onClick:m[0]||(m[0]=f=>s.value=!0)},null,512),[[g,"操作记录"]]),e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-quanjubianliang",onClick:m[1]||(m[1]=f=>i.value=!0)},null,512),[[g,"全局变量"]]),e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-jichuxinxi",onClick:d},null,512),[[g,"基础信息"]]),e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-code",onClick:m[2]||(m[2]=f=>c.value=!0)},null,512),[[g,"Code"]])]),e.createVNode(Ss,{show:s.value,"onUpdate:show":m[3]||(m[3]=f=>s.value=f),"flow-id":a.flowData.id,"api-config":a.apiConfig},null,8,["show","flow-id","api-config"]),e.createVNode(rd,{show:i.value,"onUpdate:show":m[4]||(m[4]=f=>i.value=f),"flow-data":a.flowData,"system-variables":a.systemVariables,editable:a.editable,"api-config":a.apiConfig,onOutputChange:w,onChange:v},null,8,["show","flow-data","system-variables","editable","api-config"]),e.createVNode(wp,{show:l.value.show,"onUpdate:show":m[5]||(m[5]=f=>l.value.show=f),settings:l.value.settings,editable:a.editable,"fetch-user-api":a.fetchUserApi,onChange:u},null,8,["show","settings","editable","fetch-user-api"]),e.createVNode(Np,{show:c.value,"onUpdate:show":m[6]||(m[6]=f=>c.value=f),"pipeline-tree":a.flowData.pipeline_tree,editable:a.editable},null,8,["show","pipeline-tree","editable"])])}}}),Ar=oe(Tp,[["__scopeId","data-v-0a1b3dbf"]]),Sp={class:"expression-guidance"},Mp=e.defineComponent({__name:"expression-guidance",props:{parseLang:{default:"boolrule"}},setup(t){const n=t;return(o,a)=>{const r=e.resolveComponent("bk-link");return e.openBlock(),e.createElementBlock("div",Sp,[n.parseLang==="MAKO"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a[0]||(a[0]=e.createStaticVNode('<p data-v-dd71ced7>makoOperates</p><p data-v-dd71ced7>支持 &quot;and、or、not、True、False&quot; 等 MAKO 关键字语法</p><br data-v-dd71ced7><p data-v-dd71ced7>支持直接引用全局变量</p><p data-v-dd71ced7>使用内置函数、datetime、re、hashlib、random、time、os.path模块处理全局变量</p><br data-v-dd71ced7><p data-v-dd71ced7>示例:</p><p data-v-dd71ced7>假设 key 是值为 &quot;3&quot; 的全局变量</p><p data-v-dd71ced7>字符串比较:<code class="code" data-v-dd71ced7>key == &quot;3&quot;</code></p><p data-v-dd71ced7>数值比较:<code class="code" data-v-dd71ced7>int(key) &gt;= 3</code></p><p data-v-dd71ced7>包含:<code class="code" data-v-dd71ced7>int(key) in (1,2,3)</code></p>',11))],64)):n.parseLang==="FEEL"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a[1]||(a[1]=e.createStaticVNode('<p data-v-dd71ced7>feelOperates</p><p data-v-dd71ced7>支持 &quot;and、or、true、false&quot; 等关键字语法</p><p data-v-dd71ced7>支持 FEEL (Friendly Enough Expression Language) 基础语法</p><br data-v-dd71ced7><p data-v-dd71ced7>支持使用全局变量,如<code class="code" data-v-dd71ced7>${key}</code>、<code class="code" data-v-dd71ced7>${int(key)}</code></p><p data-v-dd71ced7>${}中支持使用内置函数、datetime、re、hashlib、random、time、os.path模块处理全局变量</p><br data-v-dd71ced7><p data-v-dd71ced7>示例:</p><p data-v-dd71ced7>字符串比较:<code class="code" data-v-dd71ced7>&quot;${key}&quot; = &quot;my string&quot;</code></p><p data-v-dd71ced7>数值比较:<code class="code" data-v-dd71ced7>${int(key)} &gt;= 3</code></p><p data-v-dd71ced7>包含:<code class="code" data-v-dd71ced7>list contains([1, 2, 3], ${int(key)})</code></p>',11))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[a[4]||(a[4]=e.createElementVNode("p",null,"makoOperates",-1)),a[5]||(a[5]=e.createElementVNode("p",null,'支持 "and、or、True/true、False/false" 等关键字语法',-1)),e.createElementVNode("p",null,[a[3]||(a[3]=e.createTextVNode(" 表达式更多细节请参考 ",-1)),e.createVNode(r,{theme:"primary",href:"https://boolrule.readthedocs.io/en/latest/expressions.html#basic-comparison-operators",target:"_blank"},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode(" 'boolrule' ",-1)])]),_:1})]),a[6]||(a[6]=e.createStaticVNode('<br data-v-dd71ced7><p data-v-dd71ced7>支持使用全局变量,如<code class="code" data-v-dd71ced7>${key}</code>、<code class="code" data-v-dd71ced7>${int(key)}</code></p><p data-v-dd71ced7>支持使用内置函数、datetime、re、hashlib、random、time、os.path模块处理全局变量</p><br data-v-dd71ced7><p data-v-dd71ced7>示例:</p><p data-v-dd71ced7>字符串比较:<code class="code" data-v-dd71ced7>&quot;${key}&quot; == &quot;my string&quot;</code></p><p data-v-dd71ced7>数值比较:<code class="code" data-v-dd71ced7>${int(key)} &gt;= 3</code></p><p data-v-dd71ced7>包含:<code class="code" data-v-dd71ced7>${key} in (1,2,3)</code></p>',8))],64))])}}}),Lp=oe(Mp,[["__scopeId","data-v-dd71ced7"]]),Pp={class:"bkflow-branch-condition"},Op={class:"expression-value-editor"},Rp=e.defineComponent({__name:"index",props:{condition:{},isDefault:{type:Boolean},hasDefaultBranch:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref({...a.condition}),i=e.shallowRef(a.isDefault),l=e.ref(),c={name:[{required:!0,message:"请输入分支名称"}],evaluate:[{required:!0,message:"请输入表达式"}]};e.watch(()=>a.condition,w=>{s.value={...w}}),e.watch(()=>a.isDefault,w=>{i.value=w});const d=()=>{"evaluate"in s.value||(s.value.evaluate="")},u=()=>{r("change",{...s.value},i.value)};return n({validate:()=>l.value.validate().then(()=>!0).catch(()=>!1)}),(w,h)=>{const m=e.resolveComponent("bk-input"),g=e.resolveComponent("bk-form-item"),f=e.resolveComponent("bk-radio"),b=e.resolveComponent("bk-radio-group"),y=e.resolveComponent("bk-form"),_=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(y,{ref_key:"formRef",ref:l,"form-type":"vertical",model:s.value,rules:c},{default:e.withCtx(()=>[e.createVNode(g,{label:"分支名称",property:"name",required:!0},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:s.value.name,"onUpdate:modelValue":h[0]||(h[0]=p=>s.value.name=p),disabled:!a.editable,onChange:u},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(g,{label:"分支类型",required:!0},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=p=>i.value=p),onChange:d},{default:e.withCtx(()=>[e.createVNode(f,{label:!1,disabled:!a.editable},{default:e.withCtx(()=>[...h[3]||(h[3]=[e.createTextVNode("自定义分支",-1)])]),_:1},8,["disabled"]),e.createVNode(f,{label:!0,disabled:!a.editable||a.hasDefaultBranch&&!a.isDefault},{default:e.withCtx(()=>[h[4]||(h[4]=e.createTextVNode(" 默认分支 ",-1)),e.withDirectives(e.createVNode(e.unref(Oe.Info),{class:"radio-tips"},null,512),[[_,{content:"所有分支均不匹配时执行,类似switch-case-default里面的default",width:216,placement:"top"}]])]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1}),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:0,label:"表达式",property:"evaluate",required:!0},{default:e.withCtx(()=>[e.createVNode(Lp),e.createElementVNode("div",Op,[e.createVNode(xr,{modelValue:s.value.evaluate,"onUpdate:modelValue":h[2]||(h[2]=p=>s.value.evaluate=p),options:{readOnly:!a.editable},onChange:u},null,8,["modelValue","options"])])]),_:1}))]),_:1},8,["model"])])}}}),$p=oe(Rp,[["__scopeId","data-v-83ccbcd3"]]),zp={class:"branch-condition-slider"},Fp={class:"sideslider-footer-buttons"},Ip=e.defineComponent({__name:"index",props:{show:{type:Boolean},condition:{},hasDefaultBranch:{type:Boolean,default:!0},isDefault:{type:Boolean},editable:{type:Boolean,default:!0}},emits:["close","update:show","confirm"],setup(t,{emit:n}){const o=t,a=n,r=e.shallowRef({...o.condition}),s=e.shallowRef(o.isDefault),i=e.shallowRef();e.watch(()=>o.show,u=>{u&&(r.value={...o.condition},s.value=o.isDefault)});const l=(u,v)=>{r.value=u,s.value=v},c=async()=>{await i.value?.validate()&&(a("confirm",r.value,s.value),d())},d=()=>{a("close"),a("update:show",!1)};return(u,v)=>{const w=e.resolveComponent("bk-button"),h=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(h,{title:"分支条件","is-show":o.show,width:800,"esc-close":!1,"before-close":d},{footer:e.withCtx(()=>[e.createElementVNode("div",Fp,[o.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{theme:"primary",onClick:c},{default:e.withCtx(()=>[...v[0]||(v[0]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(w,{onClick:d},{default:e.withCtx(()=>[...v[1]||(v[1]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(w,{key:1,theme:"primary",onClick:d},{default:e.withCtx(()=>[...v[2]||(v[2]=[e.createTextVNode("关闭",-1)])]),_:1}))])]),default:e.withCtx(()=>[e.createElementVNode("div",zp,[e.createVNode($p,{ref_key:"branchConditionRef",ref:i,condition:r.value,"has-default-branch":o.hasDefaultBranch,"is-default":s.value,editable:o.editable,onChange:l},null,8,["condition","has-default-branch","is-default","editable"])])]),_:1},8,["is-show"])}}}),Up=oe(Ip,[["__scopeId","data-v-c257ae64"]]),jp={class:"node-config-basic-info"},Gp={class:"plugin-select"},qp={class:"error-handler-options"},Hp={class:"auto-retry-forms"},Wp={class:"timeout-config-forms"},Jp={class:"timeout-input"},Yp=e.defineComponent({__name:"basic-info",props:{node:{},editable:{type:Boolean,default:!0},uniformApiMethods:{default:()=>[]}},emits:["change","selectPlugin"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(),i=e.ref(ve.cloneDeep(a.node)),l={};e.watch(()=>a.node,g=>{i.value=ve.cloneDeep(g)});const c=e.computed(()=>a.node.component.code==="uniform_api"),d=e.computed(()=>{const{component:g,name:f}=i.value,{code:b="",version:y="",data:_={}}=g;let p=b==="uniform_api"&&_.uniform_api_plugin_method?.value||"";return{name:f,code:b,version:y,method:p}}),u=g=>{i.value.component.data?.uniform_api_plugin_method&&(i.value.component.data.uniform_api_plugin_method.value=g,m())},v=(g,f)=>{f==="auto_retry"?(i.value.retryable=!0,i.value.auto_retry.interval=0,i.value.auto_retry.times=1):(f==="retryable"&&(i.value.auto_retry={enable:!1,interval:0,times:1}),f==="error_ignorable"&&g&&(i.value.skippable=!0,i.value.retryable=!1,i.value.auto_retry={enable:!1,interval:0,times:1})),g&&["auto_retry","error_ignorable"].includes(f)&&(i.value.timeout_config={enable:!1,seconds:10,action:"forced_fail"})},w=g=>{g||(i.value.timeout_config.seconds=10,i.value.timeout_config.action="forced_fail"),m()},h=()=>s.value.validate().then(()=>!0).catch(()=>!1),m=()=>{r("change",i.value)};return n({validate:h}),(g,f)=>{const b=e.resolveComponent("bk-input"),y=e.resolveComponent("bk-button"),_=e.resolveComponent("bk-form-item"),p=e.resolveComponent("bk-option"),k=e.resolveComponent("bk-select"),C=e.resolveComponent("bk-checkbox"),E=e.resolveComponent("bk-switcher"),I=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("section",jp,[e.createVNode(I,{ref_key:"formRef",ref:s,model:d.value,rules:l,"label-width":94},{default:e.withCtx(()=>[e.createVNode(_,{label:c.value?"API":"标准插件",required:"",property:"code"},{default:e.withCtx(()=>[e.createElementVNode("div",Gp,[c.value?(e.openBlock(),e.createBlock(b,{key:0,"model-value":a.node.component.api_meta?.alias,readonly:!0},null,8,["model-value"])):(e.openBlock(),e.createBlock(b,{key:1,"model-value":a.node.component.code,readonly:!0},null,8,["model-value"])),e.createVNode(y,{outline:"",theme:"primary",disabled:!a.editable,onClick:f[0]||(f[0]=z=>r("selectPlugin"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.node.component.code?"重选":"选择"),1)]),_:1},8,["disabled"])])]),_:1},8,["label"]),c.value?(e.openBlock(),e.createBlock(_,{key:0,label:"请求方法",required:"",property:"method"},{default:e.withCtx(()=>[e.createVNode(k,{"model-value":i.value.component.data?.uniform_api_plugin_method?.value,clearable:!1,disabled:!a.editable,onChange:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.uniformApiMethods,z=>(e.openBlock(),e.createBlock(p,{key:z,id:z,label:z},null,8,["id","label"]))),128))]),_:1},8,["model-value","disabled"])]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,label:"插件版本",required:"",property:"version"},{default:e.withCtx(()=>[e.createVNode(k,{"model-value":a.node.component.version,clearable:!1,disabled:!a.editable,onChange:m},null,8,["model-value","disabled"])]),_:1})),e.createVNode(_,{label:"节点名称",required:"",property:"name"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:i.value.name,"onUpdate:modelValue":f[1]||(f[1]=z=>i.value.name=z),disabled:!a.editable,onBlur:m},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(_,{label:"失败处理"},{default:e.withCtx(()=>[e.createElementVNode("div",qp,[e.createVNode(C,{modelValue:i.value.error_ignorable,"onUpdate:modelValue":f[2]||(f[2]=z=>i.value.error_ignorable=z),disabled:!a.editable||i.value.auto_retry.enable||i.value.timeout_config.enable,onChange:f[3]||(f[3]=z=>v(z,"error_ignorable"))},{default:e.withCtx(()=>[...f[15]||(f[15]=[e.createElementVNode("span",{class:"option-flag"},"AS",-1),e.createTextVNode("自动跳过 ",-1)])]),_:1},8,["modelValue","disabled"]),e.createVNode(C,{modelValue:i.value.skippable,"onUpdate:modelValue":f[4]||(f[4]=z=>i.value.skippable=z),disabled:!a.editable||i.value.error_ignorable,onChange:f[5]||(f[5]=z=>v(z,"skippable"))},{default:e.withCtx(()=>[...f[16]||(f[16]=[e.createElementVNode("span",{class:"option-flag"},"MS",-1),e.createTextVNode("手动跳过 ",-1)])]),_:1},8,["modelValue","disabled"]),e.createVNode(C,{modelValue:i.value.retryable,"onUpdate:modelValue":f[6]||(f[6]=z=>i.value.retryable=z),disabled:!a.editable||i.value.error_ignorable||i.value.auto_retry.enable,onChange:f[7]||(f[7]=z=>v(z,"retryable"))},{default:e.withCtx(()=>[...f[17]||(f[17]=[e.createElementVNode("span",{class:"option-flag"},"MR",-1),e.createTextVNode("手动重试 ",-1)])]),_:1},8,["modelValue","disabled"]),e.createVNode(C,{modelValue:i.value.auto_retry.enable,"onUpdate:modelValue":f[8]||(f[8]=z=>i.value.auto_retry.enable=z),disabled:!a.editable||i.value.error_ignorable||i.value.timeout_config.enable,onChange:f[9]||(f[9]=z=>v(z,"auto_retry"))},{default:e.withCtx(()=>[...f[18]||(f[18]=[e.createElementVNode("span",{class:"option-flag"},"AR",-1)])]),_:1},8,["modelValue","disabled"]),e.createElementVNode("span",Hp,[f[19]||(f[19]=e.createTextVNode(" 在 ",-1)),e.createVNode(b,{modelValue:i.value.auto_retry.interval,"onUpdate:modelValue":f[10]||(f[10]=z=>i.value.auto_retry.interval=z),type:"number",placeholder:" ",min:0,precision:0,disabled:!a.editable||!i.value.auto_retry.enable,onBlur:m},null,8,["modelValue","disabled"]),f[20]||(f[20]=e.createTextVNode(" 秒后,自动重试 ",-1)),e.createVNode(b,{modelValue:i.value.auto_retry.times,"onUpdate:modelValue":f[11]||(f[11]=z=>i.value.auto_retry.times=z),type:"number",placeholder:" ",min:0,precision:0,disabled:!a.editable||!i.value.auto_retry.enable,onBlur:m},null,8,["modelValue","disabled"]),f[21]||(f[21]=e.createTextVNode(" 次 ",-1))])])]),_:1}),e.createVNode(_,{label:"超时控制"},{default:e.withCtx(()=>[e.createElementVNode("div",Wp,[e.createVNode(E,{modelValue:i.value.timeout_config.enable,"onUpdate:modelValue":f[12]||(f[12]=z=>i.value.timeout_config.enable=z),theme:"primary",size:"small",disabled:!a.editable,onChange:w},null,8,["modelValue","disabled"]),i.value.timeout_config.enable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f[23]||(f[23]=e.createTextVNode(" 超时 ",-1)),e.createElementVNode("span",Jp,[e.createVNode(b,{modelValue:i.value.timeout_config.seconds,"onUpdate:modelValue":f[13]||(f[13]=z=>i.value.timeout_config.seconds=z),type:"number",precision:0,min:0,disabled:!a.editable,onBlur:m},null,8,["modelValue","disabled"]),f[22]||(f[22]=e.createElementVNode("span",{class:"unit"},"秒",-1))]),f[24]||(f[24]=e.createTextVNode(" 后,则 ",-1)),e.createVNode(k,{modelValue:i.value.timeout_config.action,"onUpdate:modelValue":f[14]||(f[14]=z=>i.value.timeout_config.action=z),clearable:!1,disabled:!a.editable,onChange:m},{default:e.withCtx(()=>[e.createVNode(p,{id:"forced_fail",label:"强制终止"}),e.createVNode(p,{id:"forced_fail_and_skip",label:"强制终止后跳过"})]),_:1},8,["modelValue","disabled"])],64)):e.createCommentVNode("",!0)])]),_:1})]),_:1},8,["model"])])}}}),Zp=oe(Yp,[["__scopeId","data-v-15ce826f"]]),Kp=["onMousedown"],Qp={class:"dropdown-item-content"},Xp={class:"option-key"},ef={class:"option-name"},tf={key:0,class:"dropdown-item empty"},nf=e.defineComponent({__name:"index",props:{modelValue:{default:""},options:{default:()=>[]},type:{default:"text"},placeholder:{default:""},disabled:{type:Boolean,default:!1},rows:{default:3},resize:{type:Boolean,default:!1}},emits:["update:modelValue","change","blur"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(),s=e.ref(),i=e.ref(),l=e.ref(o.modelValue),c=e.ref(!1),d=e.ref(0),u=e.ref({top:0,left:0}),v=e.ref(""),w=e.computed(()=>({top:`${u.value.top}px`,left:`${u.value.left}px`})),h=e.computed(()=>{if(!v.value)return o.options;const V=v.value.toLowerCase();return o.options.filter(P=>P.key.toLowerCase().includes(V))}),m=V=>V.key,g=()=>{const V=s.value?.$el?.querySelector("input, textarea");if(!V)return;const P=V.tagName==="TEXTAREA";if(!r.value?.getBoundingClientRect())return;let ee=0,S=0;if(P){const D=V,N=D.value.substring(0,D.selectionStart).split(`
52
- `),O=N.length-1,Z=parseInt(getComputedStyle(D).lineHeight)||20,A=document.createElement("canvas").getContext("2d");A?(A.font=getComputedStyle(D).font,S=A.measureText(N[O]||"").width):S=(N[O]||"").length*8,ee=O*Z+Z}else{const D=V,T=D.value.substring(0,D.selectionStart||0),N=document.createElement("canvas").getContext("2d");N?(N.font=getComputedStyle(D).font,S=N.measureText(T).width):S=T.length*8,ee=D.offsetHeight}u.value={top:ee+(P?8:0),left:S+(P?8:0)}},f=()=>{if(!i.value||!r.value)return;const V=i.value.getBoundingClientRect(),P=r.value.getBoundingClientRect(),X=s.value?.$el?.querySelector("input, textarea");if(!X)return;const ee=window.innerWidth,S=V.width,D=X.offsetWidth;let T=u.value.left;const N=D;if(T+S>N&&(T=N-S,T<0&&(T=0)),P.left+T+S>ee){const M=ee-S-P.left;M>=0?T=M:T=0}P.left+T<0&&(T=0),u.value={...u.value,left:T}},b=()=>{const V=s.value?.$el?.querySelector("input, textarea");if(!V)return;const P=V.selectionStart||0,X=l.value.substring(0,P),ee=X.lastIndexOf("$");if(ee===-1){c.value=!1;return}const S=X.substring(ee+1);if(S.includes("}")){c.value=!1;return}let D=S;D.startsWith("{")&&(D=D.substring(1)),v.value=D,g(),c.value=!0,d.value=0,setTimeout(()=>{f()},0)},y=()=>{a("update:modelValue",l.value),a("change",l.value),e.nextTick(()=>{b()})},_=()=>{e.nextTick(()=>{b()})},p=V=>{setTimeout(()=>{const P=V.relatedTarget;i.value?.contains(P)||(c.value=!1)},200),a("blur",V)},k=V=>{const P=s.value?.$el?.querySelector("input, textarea");if(!P)return;const X=P.selectionStart||0,ee=l.value,S=ee.substring(0,X),D=ee.substring(X),T=S.lastIndexOf("$");if(T===-1)return;let N=m(V);N.startsWith("${")&&N.endsWith("}")&&(N=N.slice(2,-1));const O=ee.substring(0,T)+`\${${N}}`+D;l.value=O,a("update:modelValue",O),a("change",O),c.value=!1,e.nextTick(()=>{const Z=T+N.length+3;P.focus(),P.setSelectionRange(Z,Z)})},C=()=>{e.nextTick(()=>{const V=s.value?.$el?.querySelector("input, textarea");V&&(V.removeEventListener("keydown",E),V.addEventListener("keydown",E,!0))})},E=V=>{if(V instanceof KeyboardEvent){if(c.value&&h.value.length>0&&(V.key==="ArrowDown"||V.key==="ArrowUp"||V.key==="Enter")){switch(V.preventDefault(),V.stopPropagation(),V.stopImmediatePropagation(),V.key){case"ArrowDown":d.value=(d.value+1)%h.value.length,I();break;case"ArrowUp":d.value=d.value<=0?h.value.length-1:d.value-1,I();break;case"Enter":d.value>=0&&k(h.value[d.value]);break}return!1}if(V.key==="Escape"&&c.value)return V.preventDefault(),V.stopPropagation(),V.stopImmediatePropagation(),c.value=!1,!1}},I=()=>{e.nextTick(()=>{if(!i.value)return;const P=i.value.querySelectorAll(".dropdown-item:not(.empty)")[d.value];if(P){const X=i.value,ee=P.offsetTop,S=P.offsetHeight,D=X.scrollTop,T=X.clientHeight;ee<D?X.scrollTop=ee:ee+S>D+T&&(X.scrollTop=ee+S-T)}})};e.watch(()=>o.modelValue,V=>{V!==l.value&&(l.value=V)}),e.watch(()=>c.value,()=>{C()});const z=V=>{r.value&&!r.value.contains(V.target)&&i.value&&!i.value.contains(V.target)&&(c.value=!1)};return e.onMounted(()=>{document.addEventListener("click",z),C()}),e.onBeforeUnmount(()=>{document.removeEventListener("click",z);const V=s.value?.$el?.querySelector("input, textarea");V&&V.removeEventListener("keydown",E,!0)}),(V,P)=>{const X=e.resolveComponent("bk-input");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:r,class:"variable-input-wrapper"},[e.createVNode(X,{ref_key:"inputRef",ref:s,modelValue:l.value,"onUpdate:modelValue":P[0]||(P[0]=ee=>l.value=ee),type:V.type,placeholder:V.placeholder,disabled:V.disabled,rows:V.rows,resize:V.resize,onInput:y,onFocus:_,onBlur:p},null,8,["modelValue","type","placeholder","disabled","rows","resize"]),c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:i,class:"variable-dropdown",style:e.normalizeStyle(w.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(ee,S)=>(e.openBlock(),e.createElementBlock("div",{key:ee.key,class:e.normalizeClass(["dropdown-item",{active:S===d.value}]),onMousedown:e.withModifiers(D=>k(ee),["prevent"])},[e.createElementVNode("div",Qp,[e.createElementVNode("span",Xp,e.toDisplayString(ee.key),1),e.createElementVNode("span",ef,e.toDisplayString(ee.name),1)])],42,Kp))),128)),h.value.length===0?(e.openBlock(),e.createElementBlock("div",tf,"无匹配项")):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],512)}}}),Er=oe(nf,[["__scopeId","data-v-ccd4bdfb"]]),of={class:"input-field-form"},af=e.defineComponent({__name:"input",props:{modelValue:{default:""},config:{},disabled:{type:Boolean,default:!1},fullVariableList:{default:()=>[]}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(o.modelValue),s=e.computed(()=>{const{type:l,form_type:c=""}=o.config;return c==="textarea"?"textarea":["int","integer","number"].includes(l)?"number":"text"});e.watch(()=>o.modelValue,l=>{r.value=l});const i=()=>{a("update:modelValue",r.value),a("change",r.value)};return(l,c)=>(e.openBlock(),e.createElementBlock("div",of,[e.createVNode(Er,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=d=>r.value=d),type:s.value,rows:5,min:0,precision:0,disabled:o.disabled,options:o.fullVariableList,onBlur:i},null,8,["modelValue","type","disabled","options"])]))}}),va=oe(af,[["__scopeId","data-v-b6b3c278"]]),rf=e.defineComponent({__name:"switcher",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=e.ref(o.modelValue);e.watch(()=>o.modelValue,i=>{a.value=i});const r=n,s=i=>{r("update:modelValue",i),r("change",i)};return(i,l)=>{const c=e.resolveComponent("bk-switcher");return e.openBlock(),e.createBlock(c,{"model-value":i.modelValue,theme:"primary",size:"small",disabled:i.disabled,onChange:s},null,8,["model-value","disabled"])}}}),sf={class:"code-editor"},lf=e.defineComponent({__name:"code",props:{modelValue:{default:""},language:{default:"json"},theme:{default:"vs-dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","blur","save"],setup(t,{emit:n}){An();const o={language:"json",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},wordWrap:"on",wrappingIndent:"same"},a=t,r=n,s=e.ref(),i=e.shallowRef();e.watch(()=>a.modelValue,d=>{const u=i.value?.getValue();d!==u&&i.value?.setValue(d)}),e.watch(()=>a.disabled,d=>{i.value&&i.value.updateOptions({...o,readOnly:d})}),e.onMounted(()=>{l()}),e.onBeforeUnmount(()=>{i.value&&i.value.dispose()});const l=()=>{i.value=Lt.editor.create(s.value,{...o,readOnly:a.disabled,value:a.modelValue,language:a.language});const d=i.value.getModel();d&&(d.setEOL(0),d.onDidChangeContent(()=>{const u=i.value?.getValue();c(u)})),i.value.onDidBlurEditorText(()=>{r("blur")})},c=d=>{r("update:modelValue",d),r("change",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("div",sf,[e.createElementVNode("div",{ref_key:"monacoContainerRef",ref:s,class:"editor-instance-container"},null,512)]))}}),ha=oe(lf,[["__scopeId","data-v-8534e38a"]]),cf={class:"bkflow-plugin-uniform-api-form"},df=e.defineComponent({__name:"index",props:{inputData:{default:()=>({})},inputs:{default:()=>[]},editable:{type:Boolean,default:!0},fullVariableList:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(),i=e.ref({}),l=e.ref({});e.watch(()=>a.inputData,()=>{Object.keys(a.inputData).forEach(w=>{i.value[w]=a.inputData[w].value})},{immediate:!0}),e.watch(()=>a.inputs,()=>{a.inputs.forEach(w=>{w.required?l.value[w.key]=[{required:!0,message:"必填项",trigger:"blur"}]:(w.type==="json"||w.form_type==="json")&&(l.value[w.key]=[{validator:h=>{if(h.trim().length===0)return!0;try{return JSON.parse(h),!0}catch{return!1}},message:"请输入正确的 JSON 格式数据",trigger:"blur"}])})},{immediate:!0});const c=w=>{const{type:h,form_type:m=""}=w;if(m){if(["textarea","input"].includes(m))return va;if(["json"].includes(m))return ha}else{if(["string","int","integer","number"].includes(h))return va;if(["boolean","bool"].includes(h))return rf;if(["json","dict"].includes(h))return ha}return e.h("div","暂不支持该类型")},d=(w,h)=>{i.value[w]=h,v()},u=async()=>s.value.validate().then(()=>!0).catch(()=>!1),v=()=>{const w={...a.inputData};Object.keys(i.value).forEach(h=>{w[h]={value:i.value[h],hook:!1,need_render:!0}}),r("change",w)};return n({validate:u}),(w,h)=>{const m=e.resolveComponent("bk-form-item"),g=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("div",cf,[e.createVNode(g,{ref_key:"formRef",ref:s,rules:l.value,model:i.value,"label-width":94},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.inputs,f=>(e.openBlock(),e.createBlock(m,{key:f.key,label:f.name,required:f.required,desc:f.desc,property:f.key},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(f)),{"model-value":i.value[f.key],disabled:!a.editable,config:f,"full-variable-list":a.fullVariableList,onChange:b=>d(f.key,b)},null,40,["model-value","disabled","config","full-variable-list","onChange"]))]),_:2},1032,["label","required","desc","property"]))),128))]),_:1},8,["rules","model"])])}}}),ga=oe(df,[["__scopeId","data-v-cb961ebd"]]),uf={class:"plugin-agent"},pf=e.defineComponent({__name:"index",props:{inputData:{},pluginDetail:{},editable:{type:Boolean},fullVariableList:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(),i=e.ref({content:""});e.watch(()=>a.inputData,()=>{"value"in a.inputData.content&&(i.value.content=a.inputData.content.value)},{immediate:!0});const l={content:[{required:!0,message:"请输入提问内容",trigger:"blur"}]},c=async()=>s.value.validate().then(()=>!0).catch(()=>!1),d=()=>{const u={...a.inputData};u.content={value:i.value.content,hook:!1,need_render:!0},r("change",u)};return n({validate:c}),(u,v)=>{const w=e.resolveComponent("bk-form-item"),h=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("div",uf,[e.createVNode(h,{ref_key:"formRef",ref:s,rules:l,model:i.value,"label-width":94},{default:e.withCtx(()=>[e.createVNode(w,{label:"用户提问",required:"",property:"content"},{default:e.withCtx(()=>[e.createVNode(Er,{modelValue:i.value.content,"onUpdate:modelValue":v[0]||(v[0]=m=>i.value.content=m),options:a.fullVariableList,type:"textarea",placeholder:"请输入",rows:6,resize:!1,disabled:!a.editable,onBlur:d},null,8,["modelValue","options","disabled"])]),_:1})]),_:1},8,["model"])])}}}),ff=oe(pf,[["__scopeId","data-v-b4b06bc3"]]),mf={class:"node-config-input-params"},vf=e.defineComponent({__name:"input-params",props:{node:{},uniformApiPluginDetail:{},inputs:{default:()=>[]},editable:{type:Boolean,default:!0},fullVariableList:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a={uniform_api_plugin:ga,agent:ff},r=t,s=o,i=e.ref(),l=e.computed(()=>r.node.component.code==="uniform_api"&&r.uniformApiPluginDetail?.config?.resource==="bk-incident"),c=e.computed(()=>{const v=r.uniformApiPluginDetail?.category;return l.value&&v&&v in a?a[v]:ga}),d=v=>{const w={...r.node.component.data.bk_display_message};w.value=v,s("change",{...r.node.component.data,bk_display_message:w})};return n({validate:()=>l.value&&i.value&&i.value.validate?i.value.validate():!0}),(v,w)=>{const h=e.resolveComponent("bk-input"),m=e.resolveComponent("bk-form-item"),g=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("section",mf,[l.value&&r.uniformApiPluginDetail?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{key:0,ref_key:"incidentPluginComponentRef",ref:i,node:r.node,"plugin-detail":r.uniformApiPluginDetail,"plugin-id":r.node.component.api_meta?.id||"","input-data":r.node.component.data,inputs:r.inputs,editable:r.editable,"full-variable-list":r.fullVariableList,onChange:w[0]||(w[0]=f=>s("change",f))},null,40,["node","plugin-detail","plugin-id","input-data","inputs","editable","full-variable-list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[r.node.component.code==="bk_display"?(e.openBlock(),e.createBlock(g,{key:0,"label-width":94},{default:e.withCtx(()=>[e.createVNode(m,{label:"展示内容"},{default:e.withCtx(()=>[e.createVNode(h,{"model-value":r.node.component.data.bk_display_message.value,type:"textarea",rows:4,disabled:!r.editable,resize:!1,onChange:d},null,8,["model-value","disabled"])]),_:1})]),_:1})):e.createCommentVNode("",!0)],64))])}}}),hf=oe(vf,[["__scopeId","data-v-290c6a69"]]),gf={class:"node-config-output-params"},yf={class:"params-key-wrappper"},wf={class:"key-text"},bf={class:"create-variable-cell"},kf=["onClick"],Cf=e.defineComponent({__name:"output-params",props:{node:{},outputsForms:{},constants:{default:()=>({})},editable:{type:Boolean,default:!0}},emits:["updateConstants"],setup(t,{emit:n}){const o=t,a=n,r=e.shallowRef({}),s=e.computed(()=>o.outputsForms.map(c=>({...c,hookedKey:i(c.key)})));e.watch(()=>o.constants,c=>{r.value={...c}},{immediate:!0});const i=c=>{const u=Object.values(r.value).find(v=>v.source_info[o.node.id]&&v.source_info[o.node.id].includes(c));return u?u.key:""},l=c=>{if(!o.editable)return;const d=i(c.key);if(d){const u={...r.value[d],source_info:{...r.value[d].source_info,[o.node.id]:r.value[d].source_info[o.node.id].filter(v=>v!==c.key)}};r.value={...r.value,[d]:u}}else{const u=`\${${c.key}}`,v=o.constants[u]?`\${${c.key}_${qa()}}`:u;r.value={...r.value,[v]:{index:Object.values(r.value).length,name:c.name,key:v,desc:"",custom_type:"",show_type:"hide",source_type:"component_outputs",source_info:{[o.node.id]:[c.key]},source_tag:"",validation:"",plugin_code:"",value:""}}}a("updateConstants",r.value)};return(c,d)=>{const u=e.resolveComponent("bk-table-column"),v=e.resolveComponent("bk-input"),w=e.resolveComponent("bk-table"),h=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("section",gf,[e.createVNode(w,{"empty-text":"暂无参数",data:s.value,border:["outer"]},{default:e.withCtx(()=>[e.createVNode(u,{label:"名称",width:180,"min-width":180,prop:"name"},{default:e.withCtx(({row:m})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["params-name",{"has-desc":m.description!==""}])},[e.createTextVNode(e.toDisplayString(m.name),1)],2)),[[h,{disabled:m.description==="",content:m.description}]])]),_:1}),e.createVNode(u,{label:"KEY",prop:"key"},{default:e.withCtx(({row:m})=>[e.createElementVNode("div",yf,[e.createElementVNode("span",wf,e.toDisplayString(m.key),1),m.hookedKey?(e.openBlock(),e.createBlock(v,{key:0,class:"variable-key-input","model-value":m.hookedKey,readonly:e.readonly},null,8,["model-value"])):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(u,{label:"勾选为全局变量",width:120,"min-width":120},{default:e.withCtx(({row:m})=>[e.createElementVNode("div",bf,[e.withDirectives((e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["btn",{"is-hooked":!!m.hookedKey,"is-disabled":!o.editable,"is-disabled-tooltip":!o.editable}]),onClick:g=>l(m)},[...d[0]||(d[0]=[e.createElementVNode("i",{class:"bk-incident-icon incident-quanjubianliang-2"},null,-1)])],10,kf)),[[h,{placement:"top",content:m.hookedKey?"取消接收输出":"使用变量接收输出"}]])])]),_:1})]),_:1},8,["data"])])}}}),_f=oe(Cf,[["__scopeId","data-v-a4414ab7"]]),xf={output:[{name:"响应内容",key:"data",type:"object",schema:{type:"object",description:"HTTP 请求响应内容,内部结构不固定",enum:[],properties:{}}},{name:"状态码",key:"status_code",type:"int",schema:{type:"int",description:"HTTP 请求响应状态码",enum:[]}},{name:"执行结果",key:"_result",type:"boolean",schema:{type:"boolean",description:"执行结果的布尔值,True or False",enum:[]}},{name:"循环次数",key:"_loop",type:"int",schema:{type:"int",description:"循环执行次数",enum:[]}},{name:"当前流程循环次数",key:"_inner_loop",type:"int",schema:{type:"int",description:"在当前流程节点循环执行次数,由父流程重新进入时会重置(仅支持新版引擎)",enum:[]}}]},Af={data:xf},Ef={class:"bkflow-node-config"},Vf=e.defineComponent({__name:"index",props:{node:{},systemVariables:{default:()=>[]},constants:{default:()=>({})},editable:{type:Boolean,default:!0},apiConfig:{}},emits:["change","selectPlugin","updateConstants"],setup(t,{expose:n,emit:o}){const a=e.useSlots(),r=t,s=o,i=e.ref(),l=e.ref(),c=e.ref(null),d=e.ref(!0),u=e.shallowRef([]),v=e.shallowRef([]),w=e.shallowRef([]),h=e.ref(!1),m=e.computed(()=>c.value?.methods||[]),g=e.computed(()=>[...w.value]),f=e.computed(()=>[...r.systemVariables,...Object.values(r.constants)].map(E=>({key:E.key,name:E.name})));e.onMounted(()=>{h.value=!1,r.node.component.code==="uniform_api"?(b(),y()):d.value=!1});const b=async()=>{if(!r.apiConfig?.fetchPluginDetail){console.error("API CONFIG ERROR: fetchPluginDetail is not provided in apiConfig"),d.value=!1;return}d.value=!0;const E=r.node.component.api_meta?.id;if(E)try{const I=await r.apiConfig.fetchPluginDetail(E),{inputs:z,outputs:V,url:P,methods:X}=I;u.value=z,v.value=V.map(S=>({description:S.desc,key:S.key,type:S.type,name:S.name})),c.value=I,d.value=!1;const{data:ee}=r.node.component;if(!ee||!("uniform_api_plugin_url"in ee)||!("uniform_api_plugin_method"in ee)){const S={uniform_api_plugin_url:{value:P,hook:!1},uniform_api_plugin_method:{value:X[0],hook:!1}};z.forEach(T=>{S[T.key]={value:Ka(T),need_render:!0,hook:!1}});const D={...r.node,component:{...r.node.component,data:S}};p(D)}}catch(I){I.includes("1211011")&&(h.value=!0)}finally{d.value=!1}},y=()=>{w.value=Af.data.output.map(E=>({description:E.schema.description,key:E.key,type:E.type,name:E.name}))},_=E=>{const I={...r.node,component:{...r.node.component,data:E}};p(I)},p=E=>{s("change",E)},k=E=>{_(E)};return n({isPluginNotExist:h,uniformApiPluginDetailLoading:d,validate:async()=>{if(!!a.inputParams)return await i.value?.validate()??!0;const[I,z]=await Promise.all([i.value?.validate(),l.value?.validate()]);return!(!I||!z)},updateInputParams:k}),(E,I)=>{const z=e.resolveComponent("bk-button"),V=e.resolveComponent("bk-exception"),P=e.resolveDirective("bk-loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",Ef,[h.value?(e.openBlock(),e.createBlock(V,{key:0,class:"plugin-not-exist-exception",type:"500",title:"未找到可用插件或可用版本",scene:"part"},{default:e.withCtx(()=>[r.editable?(e.openBlock(),e.createBlock(z,{key:0,text:"",theme:"primary",onClick:I[0]||(I[0]=X=>s("selectPlugin"))},{default:e.withCtx(()=>[...I[3]||(I[3]=[e.createTextVNode("重新选择",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(xt,{title:"基础信息"},{default:e.withCtx(()=>[e.createVNode(Zp,{ref_key:"basicInfoRef",ref:i,node:r.node,editable:r.editable,"uniform-api-methods":m.value,onSelectPlugin:I[1]||(I[1]=X=>s("selectPlugin")),onChange:p},null,8,["node","editable","uniform-api-methods"])]),_:1}),e.createVNode(xt,{title:"输入参数"},{default:e.withCtx(()=>[d.value?e.createCommentVNode("",!0):e.renderSlot(E.$slots,"inputParams",{key:0,node:r.node,uniformApiPluginDetail:c.value,inputs:u.value,editable:r.editable,fullVariableList:f.value,updateInputParams:k},()=>[e.createVNode(hf,{ref_key:"inputParamsRef",ref:l,node:r.node,"uniform-api-plugin-detail":c.value,inputs:u.value,editable:r.editable,"full-variable-list":f.value,onChange:_},null,8,["node","uniform-api-plugin-detail","inputs","editable","full-variable-list"])],!0)]),_:3}),e.createVNode(xt,{title:"输出参数"},{default:e.withCtx(()=>[d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_f,{key:0,node:r.node,"outputs-forms":g.value,constants:r.constants,editable:r.editable,onUpdateConstants:I[2]||(I[2]=X=>s("updateConstants",X))},null,8,["node","outputs-forms","constants","editable"]))]),_:1})],64))])),[[P,{loading:d.value}]])}}}),Nf=oe(Vf,[["__scopeId","data-v-6dc46eaf"]]),Bf={class:"node-config-slider"},Df={key:0,class:"sideslider-footer-buttons"},Tf=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1},node:{},constants:{default:()=>({})},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0},apiConfig:{}},emits:["close","update:show","confirm","selectPlugin"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(),i=e.ref(!0),l=e.ref(ve.cloneDeep(a.node)),c=e.shallowRef({...a.constants});e.watch(()=>a.show,()=>{l.value=ve.cloneDeep(a.node),c.value={...a.constants}}),e.watchEffect(()=>{s.value?.isPluginNotExist||s.value?.uniformApiPluginDetailLoading?i.value=!1:i.value=!0});const d=m=>{l.value=m},u=async()=>{await s.value?.validate()&&r("confirm",l.value,c.value)},v=()=>{if(a.editable)return new Promise(m=>{jn.InfoBox({title:"确认离开?",content:"离开将会导致未保存信息丢失",confirmText:"离开",cancelText:"取消",width:320,onConfirm:()=>{w(),m(!0)},onCancel:()=>{m(!1)}})});w()},w=()=>{r("close"),r("update:show",!1)};return n({updateNodeInputParams:m=>{s.value&&s.value.updateInputParams?.(m)}}),(m,g)=>{const f=e.resolveComponent("bk-button"),b=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(b,{title:"节点配置","is-show":a.show,width:960,"esc-close":!1,"before-close":v},{footer:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",Df,[a.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{theme:"primary",onClick:u},{default:e.withCtx(()=>[...g[2]||(g[2]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(f,{onClick:w},{default:e.withCtx(()=>[...g[3]||(g[3]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(f,{key:1,theme:"primary",onClick:w},{default:e.withCtx(()=>[...g[4]||(g[4]=[e.createTextVNode("关闭",-1)])]),_:1}))])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Bf,[a.show?(e.openBlock(),e.createBlock(Nf,{key:0,ref_key:"nodeConfigRef",ref:s,node:l.value,editable:a.editable,constants:c.value,"system-variables":a.systemVariables,"api-config":a.apiConfig,onSelectPlugin:g[0]||(g[0]=y=>r("selectPlugin")),onUpdateConstants:g[1]||(g[1]=y=>c.value=y),onChange:d},{inputParams:e.withCtx(y=>[e.renderSlot(m.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps(y)),void 0,!0)]),_:3},8,["node","editable","constants","system-variables","api-config"])):e.createCommentVNode("",!0)])]),_:3},8,["is-show"])}}}),Sf=oe(Tf,[["__scopeId","data-v-7bb8be5a"]]),Mf={class:"plugin-group-aside"},Lf={class:"group-list"},Pf=["onClick"],Of=["src"],Rf={class:"group-text"},$f=e.defineComponent({__name:"plugin-groups-aside",props:{actived:{},groups:{}},emits:["update:actived","change"],setup(t,{emit:n}){const o=t,a=n,r=s=>{a("update:actived",s),a("change",s)};return(s,i)=>(e.openBlock(),e.createElementBlock("section",Mf,[e.createElementVNode("div",Lf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.groups,l=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["group-item",{actived:o.actived===l.name}]),key:l.id,onClick:c=>r(l.name)},[e.createElementVNode("img",{class:"group-icon",src:l.iconUrl},null,8,Of),e.createElementVNode("span",Rf,e.toDisplayString(l.alias),1)],10,Pf))),128))])]))}}),zf=oe($f,[["__scopeId","data-v-6c7ab9b0"]]),Ff="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/告警%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/告警'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(20,%2018)'%20fill='%23FFFFFF'%3e%3cpath%20d='M23.8214286,25.9259259%20L23.8214286,14.5185185%20C23.8280822,12.0419907%2022.8443395,9.66585559%2021.0897321,7.92037037%20C19.3290179,6.16064815%2016.9889509,5.18515161%2014.5,5.18515161%20C12.026631,5.17852307%209.65352669,6.16352209%207.91026786,7.92037037%20C6.15279018,9.68333333%205.17857143,12.0263889%205.17857143,14.5185185%20L5.17857143,25.9259259%20L2.07142857,25.9259259%20L2.07142857,28%20L26.9285714,28%20L26.9285714,25.9259259%20L23.8214286,25.9259259%20Z%20M15.225,10.9083333%20L16.6879464,12.3731481%20L14.5356027,14.5314815%20L17.3708705,17.3703704%20L13.8138393,21.3305556%20L12.2732143,19.9435185%20L14.516183,17.4449074%20L11.6064732,14.5314815%20L15.225,10.9083333%20Z%20M29,13.4814815%20L29,15.5555556%20L24.8571429,15.5555556%20L24.8571429,13.4814815%20L29,13.4814815%20Z%20M4.14285714,13.4814815%20L4.14285714,15.5555556%20L0,15.5555556%20L0,13.4814815%20L4.14285714,13.4814815%20Z%20M5.01594524,3.53359279%20L7.94538762,6.46677647%20L6.48066643,7.93336831%20L3.55122405,5.00018463%20L5.01594524,3.53359279%20Z%20M23.9784806,3.5274069%20L25.4432018,4.99399875%20L22.5137594,7.92718243%20L21.0490382,6.46059059%20L23.9784806,3.5274069%20Z%20M15.5357143,0%20L15.5357143,4.14814815%20L13.4642857,4.14814815%20L13.4642857,0%20L15.5357143,0%20Z'%20id='形状'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",If="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/事件%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/事件'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3crect%20id='矩形-2'%20fill='%233A84FF'%20fill-rule='nonzero'%20x='5'%20y='5'%20width='40'%20height='40'%20rx='3'%3e%3c/rect%3e%3crect%20id='矩形'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20x='10'%20y='10'%20width='44'%20height='44'%20rx='3'%3e%3c/rect%3e%3cg%20id='alert-告警'%20transform='translate(16.25,%2016.25)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M9,0%20L9,2.25%20L22.5,2.25%20L22.5,0%20L27,0%20L27,2.25%20L29.25,2.25%20C30.4926407,2.25%2031.5,3.25735931%2031.5,4.5%20L31.5,29.25%20C31.5,30.4926407%2030.4926407,31.5%2029.25,31.5%20L2.25,31.5%20C1.00735931,31.5%200,30.4926407%200,29.25%20L0,4.5%20C0,3.25735931%201.00735931,2.25%202.25,2.25%20L4.5,2.25%20L4.5,0%20L9,0%20Z%20M29.25,10.125%20L2.25,10.125%20L2.25,29.25%20L29.25,29.25%20L29.25,10.125%20Z%20M11.25,13.5%20L11.25,18%20L5.625,18%20L5.625,13.5%20L11.25,13.5%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",Uf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/图谱%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/图谱'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(18.25,%2018.25)'%20fill='%23FFFFFF'%3e%3cpath%20d='M27.5625,0%20C29.7371212,0%2031.5,1.7628788%2031.5,3.9375%20C31.5,6.1121212%2029.7371212,7.875%2027.5625,7.875%20C26.8821072,7.875%2026.2420211,7.70242627%2025.6836253,7.39866233%20L21.2480235,11.8331927%20C22.0362649,12.9376649%2022.5,14.2896769%2022.5,15.75%20C22.5,17.2076792%2022.0379426,18.5574391%2021.2523016,19.6608059%20L24.7142478,23.1229218%20C25.3841532,22.7271229%2026.1655529,22.5%2027,22.5%20C29.4852814,22.5%2031.5,24.5147186%2031.5,27%20C31.5,29.4852814%2029.4852814,31.5%2027,31.5%20C24.5147186,31.5%2022.5,29.4852814%2022.5,27%20C22.5,26.1655529%2022.7271229,25.3841532%2023.1229218,24.7142478%20L19.6608059,21.2523016%20C18.5574391,22.0379426%2017.2076792,22.5%2015.75,22.5%20C14.2923208,22.5%2012.9425609,22.0379426%2011.8391941,21.2523016%20L8.73675688,24.3548271%20C8.9071608,24.8296846%209,25.3415004%209,25.875%20C9,28.3602814%206.98528137,30.375%204.5,30.375%20C2.01471863,30.375%200,28.3602814%200,25.875%20C0,23.3897186%202.01471863,21.375%204.5,21.375%20C5.62390208,21.375%206.6515713,21.7870218%207.44020055,22.4682583%20L10.2476984,19.6608059%20C9.46205741,18.5574391%209,17.2076792%209,15.75%20C9,14.2927614%209.46177809,12.9433769%2010.246986,11.8401948%20L6.9225844,8.53381806%20C6.36863781,8.83126977%205.73527343,9%205.0625,9%20C2.8878788,9%201.125,7.2371212%201.125,5.0625%20C1.125,2.8878788%202.8878788,1.125%205.0625,1.125%20C7.2371212,1.125%209,2.8878788%209,5.0625%20C9,5.74577587%208.82596068,6.38840267%208.51979386,6.94846859%20L11.8381935,10.2484109%20C12.9417448,9.46233681%2014.2918801,9%2015.75,9%20C17.2050353,9%2018.5525424,9.46038278%2019.6547997,10.2434266%20L24.0949001,5.80449226%20C23.7951367,5.24890576%2023.625,4.61307166%2023.625,3.9375%20C23.625,1.7628788%2025.3878788,0%2027.5625,0%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",jf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/日志%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/日志'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3crect%20id='矩形-2'%20fill='%233A84FF'%20fill-rule='nonzero'%20x='5'%20y='5'%20width='40'%20height='40'%20rx='3'%3e%3c/rect%3e%3crect%20id='矩形'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20x='10'%20y='10'%20width='44'%20height='44'%20rx='3'%3e%3c/rect%3e%3cg%20id='alert-告警'%20transform='translate(17.375,%2017.375)'%20fill='%23FFFFFF'%3e%3cpath%20d='M28.25,0%20C28.8022847,0%2029.25,0.44771525%2029.25,1%20L29.25,28.25%20C29.25,28.8022847%2028.8022847,29.25%2028.25,29.25%20L1,29.25%20C0.44771525,29.25%200,28.8022847%200,28.25%20L0,1%20C0,0.44771525%200.44771525,1.11022302e-16%201,0%20L28.25,0%20Z%20M14.625,19.125%20C14.0036797,19.125%2013.5,19.6286797%2013.5,20.25%20C13.5,20.8713203%2014.0036797,21.375%2014.625,21.375%20C15.2463203,21.375%2015.75,20.8713203%2015.75,20.25%20C15.75,19.6286797%2015.2463203,19.125%2014.625,19.125%20Z%20M8.4375,7.875%20C5.02023811,7.875%202.25,10.6452381%202.25,14.0625%20C2.25,17.4797619%205.02023811,20.25%208.4375,20.25%20C11.8547619,20.25%2014.625,17.4797619%2014.625,14.0625%20C14.625,10.6452381%2011.8547619,7.875%208.4375,7.875%20Z%20M20.8125,7.875%20C17.3952381,7.875%2014.625,10.6452381%2014.625,14.0625%20C14.625,17.4797619%2017.3952381,20.25%2020.8125,20.25%20C24.2297619,20.25%2027,17.4797619%2027,14.0625%20C27,10.6452381%2024.2297619,7.875%2020.8125,7.875%20Z%20M8.4375,10.125%20C10.6121212,10.125%2012.375,11.8878788%2012.375,14.0625%20C12.375,16.2371212%2010.6121212,18%208.4375,18%20C6.2628788,18%204.5,16.2371212%204.5,14.0625%20C4.5,11.8878788%206.2628788,10.125%208.4375,10.125%20Z%20M20.8125,10.125%20C22.9871212,10.125%2024.75,11.8878788%2024.75,14.0625%20C24.75,16.2371212%2022.9871212,18%2020.8125,18%20C18.6378788,18%2016.875,16.2371212%2016.875,14.0625%20C16.875,11.8878788%2018.6378788,10.125%2020.8125,10.125%20Z%20M21.5,12.9375%20L20.125,12.9375%20C19.5727153,12.9375%2019.125,13.3852153%2019.125,13.9375%20L19.125,14.1875%20C19.125,14.7397847%2019.5727153,15.1875%2020.125,15.1875%20L21.5,15.1875%20C22.0522847,15.1875%2022.5,14.7397847%2022.5,14.1875%20L22.5,13.9375%20C22.5,13.3852153%2022.0522847,12.9375%2021.5,12.9375%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",Gf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/指标%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/指标'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(20.0022,%2019)'%20fill='%23FFFFFF'%3e%3cpath%20d='M26.9978016,9%20L26.9978016,26%20L22.9857822,26%20L22.9857822,9%20L26.9978016,9%20Z%20M19.9767677,15%20L19.9767677,26%20L15.9647484,26%20L15.9647484,15%20L19.9767677,15%20Z%20M12.9557339,12%20L12.9557339,26%20L8.9437145,26%20L8.9437145,12%20L12.9557339,12%20Z%20M5.93469998,17%20L5.93469998,26%20L1.92268063,26%20L1.92268063,17%20L5.93469998,17%20Z%20M26.9978016,0%20L26.9978016,8%20L23.6568016,4.67%20L16.9918102,11.3355632%20L11.3179511,5.6617042%20L1.41846305,15.561206%20L3.55271368e-15,14.1427429%20L11.3137085,2.82903444%20L16.9875333,8.50285925%20L22.2358016,3.253%20L18.9737629,0%20L26.9978016,0%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",qf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/Profiling%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/Profiling'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(19.375,%2016)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M10.3813948,-3.55271368e-15%20C17.257736,1.52410383%2022.3838329,6.97063848%2023.2188935,13.6207878%20C24.020884,11.6579106%2025.6982065,10.1856528%2027.7485185,9.64494215%20C27.1633902,11.2491122%2027.1633902,13.0083535%2027.7485185,14.6125236%20C27.7485185,14.6125236%2033.0597887,25.1085424%2026.6837718,31.6233741%20L24.0521736,28.9989243%20C27.3425616,24.7791508%2027.0291913,18.684516%2023.1138432,14.7781096%20C18.7284397,10.4016526%2011.6811693,10.5583362%207.45245097,14.9347932%20C3.22373261,19.3094697%203.53710289,26.4991091%207.9225064,30.562199%20C11.8378545,34.1552382%2017.6316437,34.3119218%2021.8603621,31.1853723%20L24.2302248,33.5498699%20C23.1560051,34.1931262%2022.0151369,34.7178845%2020.8276645,35.1149251%20C20.8276645,35.1149251%2016.914097,36.7173707%2011.2876759,35.6099027%20C11.2876759,35.6099027%20-5.60939232,32.1361567%201.9435438,14.8956223%20C2.71450593,15.6701377%203.23085471,16.6583125%203.42136957,17.7337316%20C4.27570623,15.1161605%205.73197932,12.7354096%207.67323457,10.7826785%20C10.1623917,8.55705961%2012.6960617,2.27013128%2010.3813948,-3.55271368e-15%20Z%20M8.86261726,17.9028786%20C10.3191865,15.8450628%2012.6836372,14.6218537%2015.2048045,14.6218537%20C17.7259718,14.6218537%2020.0904225,15.8450628%2021.5469918,17.9028786%20C23.5838986,20.5593773%2023.5838986,24.3108806%2021.5469918,27.1240629%20C20.0904225,29.1818787%2017.7259718,30.4050878%2015.2048045,30.4050878%20C12.6836372,30.4050878%2010.3191865,29.1818787%208.86261726,27.1240629%20C6.8257104,24.4675642%206.8257104,20.5593773%208.86261726,17.9028786%20Z%20M20.475123,17.8049514%20L9.79204502,17.8049514%20L9.79204502,21.3659416%20L11.572558,21.3659416%20L11.572558,24.9269319%20L13.353071,24.9269319%20L13.353071,23.1464368%20L15.133584,23.1464368%20L15.133584,26.7074271%20L16.914097,26.7074271%20L16.914097,28.4879222%20L18.69461,28.4879222%20L18.69461,23.1464368%20L20.475123,23.1464368%20L20.475123,17.8049514%20L20.475123,17.8049514%20Z'%20id='形状'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",Hf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/Trace%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/Trace'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(18.25,%2018.25)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M15.75,0%20C16.36875,0%2016.875,0.50625%2016.875,1.125%20L16.875,2.29647656%20C23.4334688,2.83756641%2028.6624336,8.06653125%2029.2035234,14.625%20L30.375,14.625%20C30.99375,14.625%2031.5,15.13125%2031.5,15.75%20C31.5,16.36875%2030.99375,16.875%2030.375,16.875%20L29.2035234,16.875%20C28.6624336,23.4334688%2023.4334688,28.6624336%2016.875,29.2035234%20L16.875,30.375%20C16.875,30.99375%2016.36875,31.5%2015.75,31.5%20C15.13125,31.5%2014.625,30.99375%2014.625,30.375%20L14.625,29.2035234%20C8.06653125,28.6624336%202.83756641,23.4334688%202.29647656,16.875%20L1.125,16.875%20C0.50625,16.875%200,16.36875%200,15.75%20C0,15.13125%200.50625,14.625%201.125,14.625%20L2.29647656,14.625%20C2.83756641,8.06653125%208.06653125,2.83756641%2014.625,2.29647656%20L14.625,1.125%20C14.625,0.50625%2015.13125,0%2015.75,0%20Z%20M16.875,4.55582812%20L16.875,5.625%20C16.875,6.24375%2016.36875,6.75%2015.75,6.75%20C15.13125,6.75%2014.625,6.24375%2014.625,5.625%20L14.625,4.55582812%20C9.31011328,5.08355859%205.08355859,9.31011328%204.55582812,14.625%20L5.625,14.625%20C6.24375,14.625%206.75,15.13125%206.75,15.75%20C6.75,16.36875%206.24375,16.875%205.625,16.875%20L4.55582812,16.875%20C5.08355859,22.1898867%209.31011328,26.4164414%2014.625,26.9441719%20L14.625,25.875%20C14.625,25.25625%2015.13125,24.75%2015.75,24.75%20C16.36875,24.75%2016.875,25.25625%2016.875,25.875%20L16.875,26.9441719%20C22.1898867,26.4164414%2026.4164414,22.1898867%2026.9441719,16.875%20L25.875,16.875%20C25.25625,16.875%2024.75,16.36875%2024.75,15.75%20C24.75,15.13125%2025.25625,14.625%2025.875,14.625%20L26.9441719,14.625%20C26.4164414,9.31011328%2022.1898867,5.08355859%2016.875,4.55582812%20Z%20M15.75,10.125%20C18.8566017,10.125%2021.375,12.6433983%2021.375,15.75%20C21.375,18.8566017%2018.8566017,21.375%2015.75,21.375%20C12.6433983,21.375%2010.125,18.8566017%2010.125,15.75%20C10.125,12.6433983%2012.6433983,10.125%2015.75,10.125%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",Wf={class:"data-plugin-group"},Jf={class:"plugin-list"},Yf=["onClick"],Zf=["src"],Kf={class:"plugin-name"},Qf=e.defineComponent({__name:"data-plugin-group",props:{plugins:{}},emits:["select"],setup(t,{emit:n}){const o=t,a=n,r={alert_plugin:Ff,log_plugin:jf,trace_plugin:Hf,query_promql_metric_plugin:Gf,事件查询:If,Profiling查询:qf,图谱查询:Uf},s=e.computed(()=>o.plugins.map(i=>({id:i.id,name:i.alias,icon:r[i.name]})));return(i,l)=>(e.openBlock(),e.createElementBlock("div",Wf,[e.createElementVNode("div",Jf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,c=>(e.openBlock(),e.createElementBlock("div",{class:"plugin-item",key:c.id,onClick:d=>a("select",c.id)},[e.createElementVNode("img",{class:"plugin-img",src:c.icon},null,8,Zf),e.createElementVNode("h4",Kf,e.toDisplayString(c.name),1)],8,Yf))),128))]),s.value.length===0?(e.openBlock(),e.createBlock(st,{key:0,title:"暂无数据插件"})):e.createCommentVNode("",!0)]))}}),Xf=oe(Qf,[["__scopeId","data-v-8c06845e"]]),em={class:"search-select-wrapper"},tm=e.defineComponent({__name:"index",props:{modelValue:{default:()=>[]},placeholder:{default:"请选择"},options:{default:()=>[]}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.shallowRef([...o.modelValue]);e.watch(()=>o.modelValue,i=>{r.value=[...i]},{deep:!0});const s=i=>{r.value=i,a("update:modelValue",i),a("change",i)};return(i,l)=>{const c=e.resolveComponent("bk-search-select");return e.openBlock(),e.createElementBlock("div",em,[e.createVNode(c,{modelValue:r.value,"onUpdate:modelValue":[l[0]||(l[0]=d=>r.value=d),s],"value-behavior":"need-key",data:o.options,placeholder:o.placeholder,uniqueSelect:!0,clearable:!0},null,8,["modelValue","data","placeholder"])])}}}),nm={class:"agent-plugin-group"},om={class:"top-operate-area"},am={class:"buttons"},rm={class:"agent-content-area"},im={class:"agent-cards"},sm={class:"card-header"},lm=["src"],cm={class:"agent-summary"},dm={class:"main-info"},um={class:"name-text"},pm={class:"other-info"},fm=["title"],mm=["title"],vm=["title"],hm={class:"agent-desc"},gm={class:"agent-btns"},ym=e.defineComponent({__name:"agent-plugin-group",props:{properties:{},plugins:{}},emits:["select"],setup(t,{emit:n}){const o=un.useRouter(),a=un.useRoute(),r=[{id:"alias",name:"智能体名称"},{id:"created_by",name:"创建人"}],s=t,i=n,l=e.ref("all"),c=e.ref([]),d=e.computed(()=>Object.keys(s.properties).map(b=>({id:b,name:s.properties[b]}))),u=e.computed(()=>s.plugins.filter(b=>!b.display_content.hidden)),v=e.computed(()=>{const b=u.value.filter(y=>l.value!=="all"?y.group===l.value:!0);return c.value.length>0?b.filter(y=>c.value.some(_=>_.id==="alias"?y.alias.toLowerCase().includes(_.values[0].id.toLowerCase()):_.id==="agent_type"?(y.display_content?.agent_type||"")===_.values[0].id:_.id==="space_name"?(y.display_content?.space_name||"").toLowerCase().includes(_.values[0].id.toLowerCase()):_.id==="created_by"?(y.display_content?.created_by||"")===_.values[0].id:!0)):b}),w=()=>{const{href:b}=o.resolve({name:"spaceResource",params:a.params});window.open(b,"_blank")},h=()=>{const{href:b}=o.resolve({name:"spaceResource",params:a.params});window.open(b,"_blank")},m=b=>{c.value=b},g=b=>{b.display_content.fetch_url&&window.open(b.display_content.fetch_url,"_blank")},f=b=>b?co(b).format("YYYY-MM-DD HH:mm:ss"):"--";return(b,y)=>{const _=e.resolveComponent("bk-button"),p=e.resolveComponent("bk-alert"),k=e.resolveComponent("bk-radio-button"),C=e.resolveComponent("bk-radio-group");return e.openBlock(),e.createElementBlock("div",nm,[e.createVNode(p,null,{default:e.withCtx(()=>[y[3]||(y[3]=e.createTextVNode(" 如有需要,您可以申请更多的智能体权限 ",-1)),e.createVNode(_,{theme:"primary",text:"",size:"small",onClick:w},{default:e.withCtx(()=>[...y[2]||(y[2]=[e.createTextVNode("点击申请",-1)])]),_:1})]),_:1}),e.createElementVNode("div",om,[e.createElementVNode("div",am,[e.createVNode(_,{theme:"primary",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(Oe.Plus),{class:"add-icon"}),y[4]||(y[4]=e.createTextVNode(" 智能体 ",-1))]),_:1}),e.createVNode(C,{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=E=>l.value=E),type:"capsule"},{default:e.withCtx(()=>[e.createVNode(k,{label:"all"},{default:e.withCtx(()=>[...y[5]||(y[5]=[e.createTextVNode("全部",-1)])]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,E=>(e.openBlock(),e.createBlock(k,{key:E.id,label:E.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),e.createVNode(tm,{modelValue:c.value,options:r,placeholder:"搜索智能体名称、创建人",onChange:m},null,8,["modelValue"])]),e.createElementVNode("div",rm,[e.createElementVNode("div",im,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,E=>(e.openBlock(),e.createElementBlock("div",{class:"card-item",key:E.id},[e.createElementVNode("div",sm,[e.createElementVNode("img",{src:E.display_content.icon,alt:"",class:"agent-img"},null,8,lm),e.createElementVNode("div",cm,[e.createElementVNode("div",dm,[e.createElementVNode("div",um,e.toDisplayString(E.alias),1)]),e.createElementVNode("div",pm,[e.createElementVNode("span",{title:E.display_content.agent_code},"ID:"+e.toDisplayString(E.display_content.agent_code),9,fm),e.createElementVNode("span",{title:E.display_content.created_by},"创建人:"+e.toDisplayString(E.display_content.created_by),9,mm),e.createElementVNode("span",{title:f(E.display_content.created_at)}," 创建时间:"+e.toDisplayString(f(E.display_content.created_at)),9,vm)])])]),e.createElementVNode("p",hm,e.toDisplayString(E.display_content.description||"--"),1),e.createElementVNode("div",gm,[e.createVNode(_,{theme:"primary",size:"small",onClick:I=>i("select",E.id)},{default:e.withCtx(()=>[...y[6]||(y[6]=[e.createTextVNode("选择",-1)])]),_:2},1032,["onClick"]),e.createVNode(_,{size:"small",onClick:I=>g(E)},{default:e.withCtx(()=>[...y[7]||(y[7]=[e.createTextVNode("体验",-1)])]),_:2},1032,["onClick"])])]))),128))]),v.value.length===0?(e.openBlock(),e.createBlock(st,{key:0,"is-search":c.value.length>0,title:"暂无智能体",onClear:y[1]||(y[1]=E=>c.value=[])},null,8,["is-search"])):e.createCommentVNode("",!0)])])}}}),wm=oe(ym,[["__scopeId","data-v-6284e27a"]]),bm={class:"big-model-card"},km={class:"card-header"},Cm={class:"model-info"},_m={class:"model-name"},xm=["title"],Am={class:"version"},Em={key:0,class:"new-tag"},Vm={class:"other-info"},Nm={class:"other-info"},Bm={class:"model-desc"},Dm={class:"tag-list"},Tm=e.defineComponent({__name:"big-model-card",props:{card:{}},setup(t){const n=t;return(o,a)=>{const r=e.resolveComponent("bk-tag");return e.openBlock(),e.createElementBlock("div",bm,[e.createElementVNode("div",km,[a[0]||(a[0]=e.createElementVNode("img",{src:"",alt:"",class:"model-img"},null,-1)),e.createElementVNode("div",Cm,[e.createElementVNode("div",_m,[e.createElementVNode("div",{class:"name-text",title:n.card.name},e.toDisplayString(n.card.name),9,xm),e.createElementVNode("div",Am,"线上版本:"+e.toDisplayString(n.card.version),1),n.card.isNew?(e.openBlock(),e.createElementBlock("span",Em,"new")):e.createCommentVNode("",!0)]),e.createElementVNode("p",Vm,[e.createElementVNode("span",null,"基座模型: "+e.toDisplayString(n.card.baseModel),1),e.createElementVNode("span",null,"激活参数: "+e.toDisplayString(n.card.size),1),e.createElementVNode("span",null,"任务阶段: "+e.toDisplayString(n.card.taskStage),1)]),e.createElementVNode("p",Nm,[e.createElementVNode("span",null,"更新人: "+e.toDisplayString(n.card.updateBy),1),e.createElementVNode("span",null,"更新时间: "+e.toDisplayString(n.card.updateTime),1)])])]),e.createElementVNode("p",Bm,e.toDisplayString(n.card.desc),1),e.createElementVNode("div",Dm,[e.createVNode(r,null,{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode("tag1",-1)])]),_:1}),e.createVNode(r,null,{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode("tag2",-1)])]),_:1})])])}}}),Sm=oe(Tm,[["__scopeId","data-v-8a0aed6d"]]),Mm={class:"small-model-card"},Lm={class:"model-name"},Pm={class:"name-text"},Om={class:"en-name"},Rm={class:"extend-info"},$m={class:"model-desc"},zm=e.defineComponent({__name:"small-model-card",props:{card:{}},setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createElementBlock("div",Mm,[e.createElementVNode("div",Lm,[e.createElementVNode("span",Pm,e.toDisplayString(n.card.name),1),e.createElementVNode("span",Om,"("+e.toDisplayString(n.card.enName)+")",1)]),e.createElementVNode("p",Rm,[e.createElementVNode("span",null,"依赖历史数据长度 : "+e.toDisplayString(n.card.dataLength)+" 天",1),e.createElementVNode("span",null,"数据频率:"+e.toDisplayString(n.card.frequency)+" 秒",1),e.createElementVNode("span",null,"发布人:"+e.toDisplayString(n.card.publisher),1)]),e.createElementVNode("p",$m,e.toDisplayString(n.card.desc),1)]))}}),Fm=oe(zm,[["__scopeId","data-v-98fa588c"]]),Im={class:"model-plugin-group"},Um={class:"top-operate-area"},jm={class:"search-area"},Gm={class:"mode-content-area"},qm={class:"card-list"},Hm=e.defineComponent({__name:"index",setup(t){const n=[{id:1,name:"DeepSeek",version:"V1.0.1",isNew:!1,baseModel:"DeepSeek-R1",size:"51B",taskStage:"SFT",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然表程序中的对象。",updateBy:"harokoyang",updateTime:"2025-05-05 10:41:00"},{id:2,name:"DeepSeekDeepSeekDeepSeekDeepSeekDeepSeekDeepSeekDeepSeek",version:"V1.0.1",isNew:!0,baseModel:"DeepSeek-R1",size:"51B",taskStage:"SFT",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然表程序中的对象。",updateBy:"harokoyang",updateTime:"2025-05-05 10:41:00"},{id:3,name:"DeepSeek",version:"V1.0.1",isNew:!1,baseModel:"DeepSeek-R1",size:"51B",taskStage:"SFT",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种dfafasdfasd",updateBy:"harokoyang",updateTime:"2025-05-05 10:41:00"}],o=[{id:1,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"},{id:2,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"},{id:3,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"},{id:4,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"}],a=e.ref("big"),r=e.ref(""),s=e.computed(()=>a.value==="big"?"搜索 模型名称、基座模型、任务阶段、更新人、tag":"搜索 模型名称、发布人、描述");return(i,l)=>{const c=e.resolveComponent("bk-radio-button"),d=e.resolveComponent("bk-radio-group"),u=e.resolveComponent("bk-select"),v=e.resolveComponent("bk-input");return e.openBlock(),e.createElementBlock("div",Im,[e.createElementVNode("div",Um,[e.createVNode(d,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=w=>a.value=w),type:"capsule"},{default:e.withCtx(()=>[e.createVNode(c,{label:"big"},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("大模型",-1)])]),_:1}),e.createVNode(c,{label:"small"},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("小模型",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",jm,[a.value==="big"?(e.openBlock(),e.createBlock(u,{key:0,class:"order-select"},{prefix:e.withCtx(()=>[...l[4]||(l[4]=[e.createElementVNode("span",{class:"order-select-prefix"},"排序",-1)])]),_:1})):e.createCommentVNode("",!0),e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":l[1]||(l[1]=w=>r.value=w),class:"search-input",placeholder:s.value,type:"search"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",Gm,[e.createElementVNode("div",qm,[a.value==="big"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(n,w=>e.createVNode(Sm,{key:w.id,card:w},null,8,["card"])),64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(o,w=>e.createVNode(Fm,{key:w.id,card:w},null,8,["card"])),64))])])])}}}),Wm=oe(Hm,[["__scopeId","data-v-cd4ca0c5"]]),Jm={class:"plugin-group"},Ym=e.defineComponent({__name:"output-plugin-group",setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Jm,[e.createVNode(st,{title:"暂无结论输出插件"})]))}}),Zm=oe(Ym,[["__scopeId","data-v-474d5047"]]),Km={class:"plugin-group"},Qm=e.defineComponent({__name:"other-plugin-group",setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Km,[e.createVNode(st,{title:"暂无其他插件"})]))}}),Xm=oe(Qm,[["__scopeId","data-v-4b7330a1"]]),ev={class:"plugin-select-slider"},tv={key:0,class:"plugin-select-content"},nv=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1},flowId:{},actived:{default:""},pluginGroupList:{default:()=>[]},apiConfig:{}},emits:["close","update:show","select"],setup(t,{emit:n}){const o={data:Xf,agent:wm,model:Wm,other:Xm,output:Zm},a=t,r=n,s=e.ref(a.actived),i=e.shallowRef([]),l=e.ref(!1),c=e.computed(()=>o[s.value]||null),d=e.computed(()=>a.pluginGroupList.find(h=>h.name===s.value)?.properties||{});e.watch(()=>a.show,()=>{a.show&&(s.value=a.actived,u())});const u=async()=>{if(!a.apiConfig?.fetchCategoryPlugins){console.warn("fetchCategoryPlugins is not provided in apiConfig");return}l.value=!0;try{const h=await a.apiConfig.fetchCategoryPlugins(s.value),m=a.pluginGroupList.find(g=>g.name===s.value);m&&h.forEach(g=>{g.category_id=m.id}),i.value=h}catch(h){console.error(h)}finally{l.value=!1}},v=h=>{const m=i.value.find(g=>g.id===h);r("select",m)},w=()=>{r("close"),r("update:show",!1)};return(h,m)=>{const g=e.resolveComponent("bk-sideslider"),f=e.resolveDirective("bk-loading");return e.openBlock(),e.createBlock(g,{title:"节点选择","is-show":a.show,width:1200,"esc-close":!1,"before-close":w},{default:e.withCtx(()=>[e.createElementVNode("div",ev,[e.createVNode(zf,{actived:s.value,"onUpdate:actived":m[0]||(m[0]=b=>s.value=b),groups:a.pluginGroupList,onChange:u},null,8,["actived","groups"]),a.show?e.withDirectives((e.openBlock(),e.createElementBlock("section",tv,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{plugins:i.value,properties:d.value,onSelect:v},null,40,["plugins","properties"]))])),[[f,{loading:l.value}]]):e.createCommentVNode("",!0)])]),_:1},8,["is-show"])}}}),ov=oe(nv,[["__scopeId","data-v-822608d1"]]),av={class:"flow-canvas-container"},rv=e.defineComponent({__name:"index",props:{mode:{},flowId:{},pipelineTree:{},spaceFlowConfig:{},systemVariables:{default:()=>[]},pluginGroupList:{default:()=>[]},dataGroupPlugins:{default:()=>[]},agentGroupPlugins:{default:()=>[]},apiConfig:{}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,s=e.ref(),i=e.ref(),l=e.ref({show:!1,nodeId:"",edgeId:"",condition:null,hasDefaultBranch:!1,isDefault:!1}),c=e.ref({show:!1,node:null}),d=e.ref({show:!1,actived:a.pluginGroupList[0]?.name||"",node:null}),u=A=>{const M=a.pipelineTree.activities[A.id];M&&(c.value={show:!0,node:M})},v=A=>{},w=A=>{},h=(A,M)=>{},m=A=>{const M=a.pipelineTree.flows[A.id];if(M){const R=a.pipelineTree.gateways[M.source];if(R){const W=!!R.default_condition&&typeof R.default_condition.flow_id=="string";l.value.hasDefaultBranch=W,l.value.nodeId=M.source,l.value.edgeId=A.id;const{default_condition:q,conditions:J}=R;q&&q.flow_id===A.id?(l.value.condition=q,l.value.isDefault=!0):J&&J[A.id]&&(l.value.condition=J[A.id],l.value.isDefault=!1),l.value.show=!0}}},g=(A,M)=>{const W={x:a.pipelineTree.location.find(J=>J.id===A).x+200,y:C(A,M)},q=`node${qe()}`;I(A,{id:q,type:M,position:W,data:{id:q}})},f=(A,M,R)=>{const q=(R==="data"?a.dataGroupPlugins:a.agentGroupPlugins).find(ae=>ae.id===M);if(!q)return;const{id:J,name:x,alias:U,meta_url:F,api_key:j="incident",category_id:Y}=q,H={x:a.pipelineTree.location.find(ae=>ae.id===A).x+200,y:C(A,"tasknode")},te=`node${qe()}`;I(A,{id:te,type:"tasknode",position:H,data:{id:te,name:"",component:{code:"",data:{},version:""}}}),setTimeout(()=>{p(te);const ae=a.pipelineTree.activities[te];if(ae){const le={...ae,name:U||x,component:{code:"uniform_api",data:{},version:"v2.0.0",api_meta:{id:J,name:x,alias:U||x,meta_url:F,api_key:j,category:{id:Y,name:R}}}};c.value={show:!0,node:le}}},100)},b=(A,M)=>{const W={x:a.pipelineTree.location.find(J=>J.id===A).x+200,y:C(A,"tasknode")},q=`node${qe()}`;I(A,{id:q,type:"tasknode",position:W,data:{id:q,name:"",component:{code:"",data:{},version:""}}}),setTimeout(()=>{p(q);const J=a.pipelineTree.activities[q];J&&(d.value={show:!0,actived:M,node:J})},100)},y=A=>{const{id:M,type:R,position:W,data:q}=k(A);E(M,R,W,q)},_=A=>{const{id:M,type:R,position:W,data:q}=k(A);W.y=C(A,R),I(A,{id:M,type:R,position:W,data:q}),setTimeout(()=>{p(M)},100)},p=A=>{const M=s.value.graph.getCellById(A),{x:R,y:W}=M.position(),q=M.getBBox().width,J=a.pipelineTree.activities[A];if(J&&J.outgoing){const x=a.pipelineTree.flows[J.outgoing].target,U=s.value.graph.getCellById(x),{x:F,y:j}=U.position(),Y=F-R;if(Y<q+50&&Math.abs(j-W)<40){const K=F+q-Y+50;U.position(K,j);const H=[...a.pipelineTree.location],te=H.findIndex(ae=>ae.id===x);te>-1&&(H[te]={...H[te],x:K},O({...a.pipelineTree,location:H}))}}},k=A=>{const M=`node${qe()}`,R=a.pipelineTree.location.find(x=>x.id===A),W={x:R.x+200,y:R.y};let q,J={};if(a.pipelineTree.activities[A])J={...a.pipelineTree.activities[A],id:M,incoming:[],outgoing:""},q="tasknode";else{const x=a.pipelineTree.gateways[A];q=x.type==="ExclusiveGateway"?"branchgateway":x.type.toLowerCase(),J={incoming:[],outgoing:Array.isArray(x.outgoing)?[]:""}}return{id:M,type:q,position:W,data:J}},C=(A,M)=>{const R=a.pipelineTree.location.find(J=>J.id===A),W=R.type,q=R.y;if(W.includes("gateway")){const J=a.pipelineTree.gateways[A];return Array.isArray(J.outgoing)&&J.outgoing.length>0?J.outgoing.reduce((U,F)=>{const j=a.pipelineTree.flows[F].target,Y=a.pipelineTree.location.find(K=>K.id===j);return Math.max(U,Y.y)},0)+100:M.includes("gateway")?q:q-10}return M.includes("gateway")?q+10:q},E=(A,M,R,W={})=>{const q=M.includes("gateway"),J=s.value.graph.addNode({id:A,...R,shape:"custom-node",width:q?34:154,height:q?34:54,data:{type:M}});return J.setZIndex(a.pipelineTree.location.length),q?s.value.createGateway(A,M,R,W):s.value.createActivity(A,R,W),J},I=(A,M)=>{const R=E(M.id,M.type,M.position,M.data);setTimeout(()=>{z(A,R.id)},10)},z=(A,M)=>{const{activities:R,gateways:W,start_event:q,end_event:J,location:x}=a.pipelineTree,U=x.find(K=>K.id===A),F=x.find(K=>K.id===M);if(!U||!F)return;let j="";R[A]?j=R[A].outgoing:W[A]?j=W[A].outgoing:q.id===A&&(j=q.outgoing);const Y=V(j,A,M);s.value.insertEdgesToCanvas(Y)},V=(A,M,R)=>{const W=[];if(Array.isArray(A)){let q="Right";a.pipelineTree.gateways[M]&&A.length>0&&(q="Bottom"),W.push({id:`line${qe()}`,source:{arrow:q,id:M},target:{arrow:"Left",id:R}})}else if(A==="")W.push({id:`line${qe()}`,source:{arrow:"Right",id:M},target:{arrow:"Left",id:R}});else{const q=a.pipelineTree.flows[A];q&&(s.value.deleteEdges([A]),W.push({id:`line${qe()}`,source:{arrow:"Right",id:M},target:{arrow:"Left",id:R}},{id:`line${qe()}`,source:{arrow:"Right",id:R},target:{arrow:"Left",id:q.target}}))}return W},P=A=>{const M=[];if(a.pipelineTree.activities[A]){const R=a.pipelineTree.activities[A];M.push(...R.incoming),R.outgoing&&M.push(R.outgoing)}else if(a.pipelineTree.gateways[A]){const R=a.pipelineTree.gateways[A];M.push(...R.incoming),Array.isArray(R.outgoing)?M.push(...R.outgoing):R.outgoing&&M.push(R.outgoing)}s.value.deleteEdges(M)},X=A=>{s.value.deleteNode(A)},ee=A=>{s.value.deleteEdges([A.id])},S=(A,M)=>{const R={...a.pipelineTree.gateways};if(R[l.value.nodeId]){const W=ve.cloneDeep(R[l.value.nodeId]),q=W.conditions||{},{name:J,tag:x,evaluate:U="",loc:F}=A,j={name:J,tag:x,evaluate:U.trim()};F&&(j.loc=F),M?(delete j.evaluate,j.flow_id=l.value.edgeId,W.default_condition=j):q[l.value.edgeId]=j,!l.value.isDefault&&M?q[l.value.edgeId]&&delete q[l.value.edgeId]:l.value.isDefault&&!M&&W.default_condition&&delete W.default_condition,W.conditions=q,R[l.value.nodeId]=W}O({...a.pipelineTree,gateways:R}),setTimeout(()=>{s.value.updateEdgeLabel(l.value.edgeId)},10)},D=()=>{if(!c.value.node)return;const A=ve.cloneDeep(c.value.node);let M="";A.component.api_meta?.category.name?M=A.component.api_meta?.category.name:M=a.pluginGroupList[0]?.name||"",d.value={show:!0,actived:M,node:A},c.value={show:!1,node:null}},T=A=>{if(!d.value.node)return;const M=ve.cloneDeep(d.value.node);if(A.plugin_type==="uniform_api"){const{id:R,name:W,alias:q,meta_url:J,api_key:x="incident",category:U,category_id:F}=A;M.component={code:"uniform_api",data:{},version:"v2.0.0",api_meta:{id:R,name:W,alias:q||W,meta_url:J,api_key:x,category:{id:F,name:U}}},M.name=q}c.value={show:!0,node:M},d.value.show=!1},N=(A,M)=>{const R={...a.pipelineTree.activities},W=[...a.pipelineTree.location],q=W.findIndex(J=>J.id===A.id);if(R[A.id]=A,q>-1){const J=W[q];J.name=A.name,W[q]=J}c.value={show:!1,node:null},O({...a.pipelineTree,activities:R,location:W,constants:M}),setTimeout(()=>{s.value.updateNodeData(A.id,A)},10)},O=A=>{r("change",A)};return n({updateNodeInputParams:A=>{i.value&&c.value.show&&i.value.updateNodeInputParams?.(A)}}),(A,M)=>(e.openBlock(),e.createElementBlock("div",av,[e.createVNode(e.unref(Ac),{ref_key:"bkflowCanvasRef",ref:s,editable:a.mode==="edit","pipeline-tree":a.pipelineTree,onNodeClick:u,onNodeDbClick:v,onNodeMouseenter:w,onNodeMouseleave:h,onEdgeLabelClick:m,onUpdatePipelineTree:O,onDeleteEdge:ee},{customNode:e.withCtx(()=>[e.createVNode(Za,{editable:a.mode==="edit","plugin-group-list":a.pluginGroupList,"data-group-plugins":a.dataGroupPlugins,"agent-group-plugins":a.agentGroupPlugins,onAddNode:g,onAddPlugin:f,onAddNodeAndSelectPlugin:b,onDeleteBtnClick:X,onCopyNodeClick:y,onCopyNodeAndInsertClick:_,onDetachEdgesClick:P},null,8,["editable","plugin-group-list","data-group-plugins","agent-group-plugins"])]),_:1},8,["editable","pipeline-tree"]),l.value.condition?(e.openBlock(),e.createBlock(Up,{key:0,show:l.value.show,"onUpdate:show":M[0]||(M[0]=R=>l.value.show=R),condition:l.value.condition,"has-default-branch":l.value.hasDefaultBranch,"is-default":l.value.isDefault,editable:a.mode==="edit",onConfirm:S},null,8,["show","condition","has-default-branch","is-default","editable"])):e.createCommentVNode("",!0),c.value.node?(e.openBlock(),e.createBlock(Sf,{key:1,ref_key:"nodeConfigPanelRef",ref:i,show:c.value.show,"onUpdate:show":M[1]||(M[1]=R=>c.value.show=R),node:c.value.node,editable:a.mode==="edit","system-variables":a.systemVariables,constants:a.pipelineTree.constants,"api-config":a.apiConfig,onSelectPlugin:D,onConfirm:N},{inputParams:e.withCtx(R=>[e.renderSlot(A.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps(R)),void 0,!0)]),_:3},8,["show","node","editable","system-variables","constants","api-config"])):e.createCommentVNode("",!0),e.createVNode(ov,{show:d.value.show,"onUpdate:show":M[2]||(M[2]=R=>d.value.show=R),"flow-id":a.flowId,actived:d.value.actived,"plugin-group-list":a.pluginGroupList,"api-config":a.apiConfig,onSelect:T},null,8,["show","flow-id","actived","plugin-group-list","api-config"])]))}}),Vr=oe(rv,[["__scopeId","data-v-f1811051"]]),iv={class:"execute-flow-slider"},sv={class:"flow-name-wrapper"},lv={class:"form-params-wrapper"},cv={key:0,class:"sideslider-footer-buttons"},dv=e.defineComponent({__name:"execute",props:{flowId:{},show:{type:Boolean},editable:{type:Boolean,default:!0},showFlowEntry:{type:Boolean,default:!1},apiConfig:{},onExecuteSuccess:{}},emits:["confirm","close","update:show"],setup(t,{emit:n}){const o=t,a=n,r={name:[{required:!0,message:"请输入任务名称",trigger:"blur"}]},s=e.shallowRef(null),i=e.shallowRef(!0),l=e.ref({}),c=e.shallowRef([]),d=e.ref(),u=e.ref({name:""}),v=e.shallowRef(!1);e.watch(()=>o.show,b=>{b&&w()});const w=async()=>{i.value=!0;const b=await o.apiConfig.fetchFlowDetail(o.flowId);s.value=b,u.value.name=`${b.name}_${co().format("YYYYMMDDHHmmss")}`;const y=[],_={};Object.values(b.pipeline_tree.constants).forEach(p=>{if(typeof p!="object"||p===null)return;const k=p;k.source_type!=="system"&&k.show_type==="show"&&y.push(k),"value"in k&&(_[k.key]=k.value)}),c.value=y,l.value=_,i.value=!1},h=()=>{o.onExecuteSuccess},m=b=>{Object.keys(b).forEach(y=>{y in l.value&&(l.value[y]=b[y])})},g=async()=>{if(!o.apiConfig.createFlowTask||!o.apiConfig.executeFlowTask){console.warn("createFlowTask or executeFlowTask is not provided in apiConfig");return}if(await d.value?.validate())try{v.value=!0;const y=await o.apiConfig.createFlowTask({template_id:o.flowId,creator:"admin",name:u.value.name,description:"create by bkincident",constants:l.value});y.data.id&&(await o.apiConfig.executeFlowTask({action:"start",task_id:y.data.id,resource_type:"TASK",resource_id:y.data.id,permission_type:"OPERATE"}),dn({theme:"success",message:"执行成功"}),a("confirm"),f(),o.onExecuteSuccess&&o.onExecuteSuccess(y.data.id,y.data.template_id))}catch(y){console.error(y)}finally{v.value=!1}},f=()=>{c.value=[],l.value={},a("close"),a("update:show",!1)};return(b,y)=>{const _=e.resolveComponent("bk-input"),p=e.resolveComponent("bk-form-item"),k=e.resolveComponent("bk-form"),C=e.resolveComponent("bk-button"),E=e.resolveComponent("bk-sideslider"),I=e.resolveDirective("bk-tooltips"),z=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(E,{title:"执行流程","is-show":o.show,width:700,"quick-close":!1,"esc-close":!1,"before-close":f},{footer:e.withCtx(()=>[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",cv,[e.createVNode(C,{theme:"primary",loading:v.value,onClick:g},{default:e.withCtx(()=>[...y[1]||(y[1]=[e.createTextVNode("确定",-1)])]),_:1},8,["loading"]),e.createVNode(C,{onClick:f},{default:e.withCtx(()=>[...y[2]||(y[2]=[e.createTextVNode("取消",-1)])]),_:1})]))]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",iv,[e.createVNode(k,{ref_key:"formRef",ref:d,model:u.value,rules:r,"label-width":100},{default:e.withCtx(()=>[b.showFlowEntry?(e.openBlock(),e.createBlock(p,{key:0,label:"排障流程",required:""},{default:e.withCtx(()=>[e.createElementVNode("div",sv,[e.createVNode(_,{readonly:"","model-value":s.value?.name},null,8,["model-value"]),e.withDirectives(e.createVNode(e.unref(Oe.Share),{class:"link-icon",onClick:h},null,512),[[I,"查看排障流程",void 0,{top:!0}]])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(p,{label:"新建任务名",property:"name",required:""},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:u.value.name,"onUpdate:modelValue":y[0]||(y[0]=V=>u.value.name=V),placeholder:"请输入任务名称","show-word-limit":"",maxlength:100},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"请求参数",property:"inputParams",description:"流程的入参"},{default:e.withCtx(()=>[e.createElementVNode("div",lv,[e.createVNode(Qa,{variables:c.value,editable:!0,onChange:m},null,8,["variables"]),c.value.length===0?(e.openBlock(),e.createBlock(st,{key:0,title:"暂无参数"})):e.createCommentVNode("",!0)])]),_:1})]),_:1},8,["model"])])),[[z,{loading:i.value}]])]),_:1},8,["is-show"])}}}),bo=oe(dv,[["__scopeId","data-v-fc84bd3d"]]),uv=Object.freeze(Object.defineProperty({__proto__:null,default:bo},Symbol.toStringTag,{value:"Module"})),pv={key:0,class:"operate-area"},fv={class:"operate-btns"},mv={class:"flow-view-page-content"},vv=e.defineComponent({__name:"view",props:{flowId:{},apiConfig:{},permissions:{default:()=>({canEdit:!0})},onEdit:{},onBack:{}},emits:["edit","back"],setup(t,{emit:n}){const o=e.useSlots(),a=t,r=lo(a.apiConfig),s=n,i=e.shallowRef(!1),l=e.shallowRef(null),c=e.shallowRef(!0),d=e.shallowRef({}),u=e.shallowRef(!0),v=e.shallowRef([]),w=e.shallowRef(!1);e.onMounted(()=>{h(),m(),g()});const h=async()=>{c.value=!0;try{const _=await r.fetchFlowDetail(String(a.flowId));l.value=_}catch(_){console.error(_)}finally{c.value=!1}},m=async()=>{u.value=!0;try{const _=await r.fetchSpaceFlowConfig(String(a.flowId));d.value=_}catch(_){console.error(_)}finally{u.value=!1}},g=async()=>{w.value=!0;try{const _=await r.fetchSystemVariables(String(a.flowId));v.value=_}catch(_){console.error(_)}finally{w.value=!1}},f=()=>{typeof a.onBack=="function"?a.onBack():s("back")},b=()=>{typeof a.onEdit=="function"?a.onEdit():s("edit")},y=(_,p)=>{};return(_,p)=>{const k=e.resolveComponent("bk-button"),C=e.resolveDirective("bk-tooltips"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(ja,{title:"查看流程",desc:l.value?.name,"show-back-icon":!0,onBack:f},e.createSlots({extend:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",pv,[e.createVNode(Ar,{editable:!1,"flow-data":l.value,"system-variables":v.value,"fetch-user-api":e.unref(r).fetchUserApi,"api-config":e.unref(r)},null,8,["flow-data","system-variables","fetch-user-api","api-config"]),e.createElementVNode("div",fv,[e.createVNode(k,{theme:"primary",class:e.normalizeClass([_.permissions.canEdit?"":"is-disabled"]),onClick:b},{default:e.withCtx(()=>[...p[2]||(p[2]=[e.createTextVNode(" 编辑 ",-1)])]),_:1},8,["class"]),e.createVNode(k,{theme:"primary",outline:"",onClick:p[0]||(p[0]=I=>i.value=!0)},{default:e.withCtx(()=>[...p[3]||(p[3]=[e.createTextVNode("执行流程",-1)])]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(k,{disabled:!0},{default:e.withCtx(()=>[...p[4]||(p[4]=[e.createTextVNode("调试",-1)])]),_:1})),[[C,"功能开发中"]])])])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",mv,[l.value?(e.openBlock(),e.createBlock(Vr,{key:0,mode:"view","flow-id":_.flowId,"pipeline-tree":l.value.pipeline_tree,"space-flow-config":d.value,"system-variables":v.value,"api-config":e.unref(r)},{inputParams:e.withCtx(I=>[e.renderSlot(_.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps(I)),void 0,!0)]),_:3},8,["flow-id","pipeline-tree","space-flow-config","system-variables","api-config"])):e.createCommentVNode("",!0)])),[[E,{loading:c.value||u.value}]]),l.value?(e.openBlock(),e.createBlock(bo,{key:0,"flow-id":_.flowId,show:i.value,"api-config":e.unref(r),onClose:p[1]||(p[1]=I=>i.value=!1),onConfirm:y},null,8,["flow-id","show","api-config"])):e.createCommentVNode("",!0)]),_:2},[e.unref(o).header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(_.$slots,"header",{},void 0,!0)]),key:"0"}:void 0]),1032,["desc"])}}}),Nr=oe(vv,[["__scopeId","data-v-6463f2e7"]]),hv=Object.freeze(Object.defineProperty({__proto__:null,default:Nr},Symbol.toStringTag,{value:"Module"})),Br={plugin:"",data:"",agent:"",model:"",output:""},gv={key:0,class:"operate-area"},yv={class:"flow-actions"},wv={class:"operate-btns"},bv={class:"flow-edit-page-content"},kv=e.defineComponent({__name:"edit",props:{flowId:{},apiConfig:{},permissions:{default:()=>({canSave:!0})},pluginGroupIconMap:{default:()=>Br},onSave:{},onSaveSuccess:{},onBack:{},onBeforeLeave:{}},emits:["save","saveSuccess","back"],setup(t,{expose:n,emit:o}){const a=t,r=lo(a.apiConfig),s=o,i=e.shallowRef(null),l=e.shallowRef(!0),c=e.ref(),d=e.ref(),u=e.shallowRef(!0),v=e.shallowRef({}),w=e.shallowRef(!1),h=e.shallowRef([]),m=e.shallowRef(!1),g=e.shallowRef([]),f=e.shallowRef([]),b=e.shallowRef([]),y=e.shallowRef(!1),_=e.shallowRef(!1),p=e.computed(()=>String(a.flowId)),k=e.computed(()=>l.value||m.value||u.value);e.onMounted(()=>{C(),E(),I(),z()});const C=async()=>{l.value=!0;try{const N=await r.fetchFlowDetail(p.value);i.value=N}catch(N){console.error(N)}finally{l.value=!1}},E=async()=>{u.value=!0;try{const N=await r.fetchSpaceFlowConfig(p.value);v.value=N}catch(N){console.error(N)}finally{u.value=!1}},I=async()=>{m.value=!0;try{const N={},O=await r.fetchPluginCategoryList(),Z=[];O.forEach(R=>{const{id:W,name:q,alias:J,properties:x}=R;N[q]=W,Z.push({id:W,name:q,alias:J,properties:x,iconUrl:a.pluginGroupIconMap[q]||""})});const[A,M]=await Promise.all([r.fetchCategoryPlugins("data"),r.fetchCategoryPlugins("agent")]);g.value=A.map(R=>(R.category_id=N.data,R)),f.value=M.map(R=>(R.category_id=N.agent,R)),h.value=Z}catch(N){console.error(N)}finally{m.value=!1}},z=async()=>{y.value=!0;try{const N=await r.fetchSystemVariables(p.value);b.value=N}catch(N){console.error(N)}finally{y.value=!1}},V=()=>{a.onBack?a.onBack():s("back")},P=()=>{c.value?.openBasicSetting()},X=N=>{i.value=N},ee=N=>{i.value={...i.value,pipeline_tree:N},_.value=!0},S=N=>{d.value&&d.value.updateNodeInputParams?.(N)},D=()=>{if(!a.permissions.canSave)return;const N=Ga(i.value?.pipeline_tree);N.valid?T():No.Message({theme:"error",message:N.message})},T=async()=>{const{name:N,desc:O,notify_config:Z,pipeline_tree:A,triggers:M}=i.value,R={name:N,desc:O,notify_config:Z,pipeline_tree:A,triggers:M};try{w.value=!0,await r.saveFlow(p.value,R),_.value=!1,No.Message({theme:"success",message:"保存成功"}),a.onSave&&a.onSave(i.value),a.onSaveSuccess&&a.onSaveSuccess(),s("save",i.value),s("saveSuccess")}catch(W){console.error(W)}finally{w.value=!1}};return n({isFlowEdited:e.computed(()=>_.value),updateNodeInputParams:S}),(N,O)=>{const Z=e.resolveComponent("bk-button"),A=e.resolveDirective("bk-tooltips"),M=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(ja,{title:"编辑流程",desc:i.value?.name,"show-back-icon":!0,"show-edit-icon":!0,onBack:V,onEdit:P},{header:e.withCtx(()=>[e.renderSlot(N.$slots,"header",{},void 0,!0)]),extend:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",gv,[e.createElementVNode("div",yv,[e.createVNode(Ar,{ref_key:"flowInfoSlidersRef",ref:c,"flow-data":i.value,"system-variables":b.value,"fetch-user-api":e.unref(r).fetchUserApi,"api-config":e.unref(r),onChange:X},null,8,["flow-data","system-variables","fetch-user-api","api-config"]),e.createElementVNode("div",wv,[e.createVNode(Z,{class:e.normalizeClass([N.permissions.canSave?"":"is-disabled"]),theme:"primary",loading:w.value,onClick:D},{default:e.withCtx(()=>[...O[0]||(O[0]=[e.createTextVNode(" 保存 ",-1)])]),_:1},8,["class","loading"]),e.withDirectives((e.openBlock(),e.createBlock(Z,{disabled:!0},{default:e.withCtx(()=>[...O[1]||(O[1]=[e.createTextVNode("调试",-1)])]),_:1})),[[A,"功能开发中"]])])])])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",bv,[!k.value&&i.value?(e.openBlock(),e.createBlock(Vr,{key:0,ref_key:"flowCanvasRef",ref:d,mode:"edit","flow-id":p.value,"pipeline-tree":i.value.pipeline_tree,"space-flow-config":v.value,"plugin-group-list":h.value,"data-group-plugins":g.value,"agent-group-plugins":f.value,"system-variables":b.value,"api-config":e.unref(r),onChange:ee},{inputParams:e.withCtx(R=>[e.renderSlot(N.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps({...R,updateNodeInputParams:S})),void 0,!0)]),_:3},8,["flow-id","pipeline-tree","space-flow-config","plugin-group-list","data-group-plugins","agent-group-plugins","system-variables","api-config"])):e.createCommentVNode("",!0)])),[[M,{loading:k.value}]])]),_:3},8,["desc"])}}}),Dr=oe(kv,[["__scopeId","data-v-0e19edae"]]),Cv=Object.freeze(Object.defineProperty({__proto__:null,default:Dr},Symbol.toStringTag,{value:"Module"})),_v={FlowView:()=>Promise.resolve().then(()=>hv),FlowEdit:()=>Promise.resolve().then(()=>Cv),FlowExecute:()=>Promise.resolve().then(()=>uv)};exports.FlowEdit=Dr;exports.FlowExecute=bo;exports.FlowView=Nr;exports.PLUGIN_GROUP_ICON_MAP=Br;exports.default=_v;exports.getUniformApiPluginFormValue=Ka;exports.getVariableDefaultConfig=Zn;exports.parentClsContains=mn;exports.useFlowApi=lo;exports.uuid=qe;exports.validatePipelineTree=Ga;
50
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var l=r.reduce(function(c,d){var u=d&&rp(d,a);return u&&c.push(u),c},[]);return Ut(t)?l[0]:l}wt.defaultProps=Pe;wt.setDefaultProps=tp;wt.currentInput=Qe;var sp=function(n){var o=n===void 0?{}:n,a=o.exclude,r=o.duration;dn.forEach(function(i){var s=!1;if(a&&(s=kr(a)?i.reference===a:i.popper===a.popper),!s){var l=i.props.duration;i.setProps({duration:r}),i.hide(),i.state.isDestroyed||i.setProps({duration:l})}})};Object.assign({},lr,{effect:function(n){var o=n.state,a={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(o.elements.popper.style,a.popper),o.styles=a,o.elements.arrow&&Object.assign(o.elements.arrow.style,a.arrow)}});wt.setDefaultProps({render:Br});const Vr={name:"render-avatar",props:["user","urlMethod"],setup(t){const n=e.ref("");e.onMounted(async()=>{try{typeof t.user=="string"?n.value=await t.urlMethod(t.user):typeof t.user=="object"&&(n.value=t.user.avatar||t.user.logo||await t.urlMethod(t.user.username))}catch{}});const o=e.ref(null);return e.watch(n,a=>{a&&(o.value.style.backgroundImage=`url(${n.value})`)}),()=>e.createVNode("span",{ref:o,class:"user-selector-avatar"},null)}},ip={name:"render-list",props:{selector:{type:Object},user:{type:Object},keyword:{type:String},index:{type:Number},disabled:{type:Boolean}},setup(t){return()=>t.selector.renderList(e.h,{user:t.user,index:t.index,keyword:t.keyword,disabled:t.disabled})}},lp={mounted(t,n){const o=typeof n.value=="object"?n.value:{disabled:!1,content:n.value},a=wt(t,Object.assign({appendTo:document.body},o));o.disabled&&a.disable()},unmounted(t){t._tippy?.destroy()},updated(t,n){const o=typeof n.value=="object"?n.value:{disabled:!1,content:n.value};o.disabled?t._tippy.disable():t._tippy.enable(),t._tippy.setContent(o.content)}},ga=e.defineComponent({name:"AlternateItem",directives:{tooltips:lp},props:{selector:{type:Object},user:{type:Object},keyword:{type:String},index:{type:Number}},setup(t){const{selector:n,user:o,keyword:a}=e.toRefs(t);return{disabled:e.computed(()=>n.value.disabledUsers.includes(o.value.username)),getItemContent:()=>{const[l,c]=o.value.username.split("@");let d=l;a.value&&(d=d.replace(new RegExp(a.value,"g"),`<span>${a.value}</span>`));const u=n.value.displayDomain&&c?`${d}@${c}`:d,v=o.value.display_name;return v?`${u}(${v})`:u},getTitle:()=>n.value.getDisplayText(o.value)}},render(){return e.createVNode("li",{class:["alternate-item",this.index===this.selector.highlightIndex?"highlight":"",this.disabled&&!this.selector.renderList?"disabled":""],onClick:t=>t.stopPropagation(),onMousedown:e.withModifiers(()=>this.selector.handleUserMousedown(this.user,this.disabled),["left","stop"]),onMouseup:e.withModifiers(()=>this.selector.handleUserMouseup(this.user,this.disabled),["left","stop"])},[this.selector.renderList?e.createVNode(e.Fragment,null,[e.createVNode(ip,{selector:this.selector,keyword:this.keyword,user:this.user,disabled:this.disabled},null)]):e.createVNode(e.Fragment,null,[this.selector.tagType==="avatar"?e.createVNode(e.Fragment,null,[e.createVNode(Vr,{class:"item-avatar",user:this.user,urlMethod:this.selector.avatarUrl},null)]):null,this.selector.displayListTips&&this.user.category_name?e.createVNode(e.Fragment,null,[e.withDirectives(e.createVNode("span",{class:"item-folder"},[this.user.category_name]),[[e.resolveDirective("tooltips"),{placement:"right",interactive:!0,theme:"light list-item-tips",content:this.user.category_name,offset:[0,18]}]])]):null,e.createVNode("span",{class:"item-name",title:this.getTitle(),innerHTML:this.getItemContent()},null)])])}}),cp=e.defineComponent({setup(){const{proxy:t}=e.getCurrentInstance();En.setInstance("alternateContent","alternateList",t);const n=e.ref(null),o=e.ref(""),a=e.ref(!0),r=e.ref(!0),i=e.ref([]),s=e.computed(()=>{const p={};return n.value?.panelWidth&&(p.width=`${parseInt(n.value.panelWidth,10)}px`),p}),l=e.computed(()=>{const p={"max-height":"192px"};if(n.value){const w=parseInt(n.value.listScrollHeight,10);isNaN(w)||(p["max-height"]=`${w}px`)}return p}),c=(p,w=0)=>{let m=0;return i.value.slice(0,p).forEach(g=>{g.hasOwnProperty("children")?m+=g.children.length:m+=1}),m+w},d=()=>{if(sp({exclude:n.value.inputRef,duration:0}),r.value||!a.value)return!1;const p=v.value;p.scrollTop+p.clientHeight>p.scrollHeight-32&&n.value.search(o.value,a.value)};e.watch(o,()=>{k.value=[],e.nextTick(()=>{v.value.scrollTop=0})});const u=e.ref(null),v=e.ref(null),k=e.ref([]);return{selector:n,keyword:o,next:a,loading:r,matchedUsers:i,wrapperStyle:s,listStyle:l,getIndex:c,handleScroll:d,alternateListContainer:u,alternateList:v,alternateItem:k,setRef:p=>{k.value.push(p)}}},render(){return e.createVNode("div",{ref:"alternateListContainer",class:["user-selector-alternate-list-wrapper",this.selector?.displayListTips?"has-folder":"",this.loading?"is-loading":""],style:this.wrapperStyle},[e.createVNode("ul",{class:"alternate-list",ref:"alternateList",style:this.listStyle,onScroll:()=>{this.handleScroll()}},[this.matchedUsers.map((t,n)=>t.hasOwnProperty("children")?e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"alternate-group",onClick:o=>o.stopPropagation(),onMousedown:e.withModifiers(()=>{this.selector.handleGroupMousedown()},["left","stop"]),onMouseup:e.withModifiers(()=>{this.selector.handleGroupMouseup()},["left","stop"])},[`${t.display_name}(${t.children.length})`]),t.children.map((o,a)=>e.createVNode(e.Fragment,null,[e.createVNode(ga,{ref:r=>{this.setRef(r)},index:this.getIndex(n,a),selector:this.selector,user:o,keyword:this.keyword},null)]))]):e.createVNode(e.Fragment,null,[e.createVNode(ga,{ref:o=>{this.setRef(o)},selector:this.selector,user:t,index:this.getIndex(n),keyword:this.keyword},null)]))]),!this.loading&&!this.matchedUsers.length?e.createVNode(e.Fragment,null,[e.createVNode("p",{class:"alternate-empty"},[this.selector.emptyText])]):null])}}),dp={name:"render-tag",props:["username","user","index"],setup(t){const n=e.inject("parentSelector");return()=>n.renderTag(e.h,{username:t.username,index:t.index,user:t.user})}},up=e.defineComponent({name:"BkUserSelector",components:{RenderTag:dp,RenderAvatar:Vr},props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入"},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},exclude:{type:Boolean,default:!0},focusRowLimit:{type:Number,default:6},defaultAlternate:{type:[String,Array,Function],validator(t){return t==="history"||typeof t=="function"||t instanceof Array}},searchFromDefaultAlternate:{type:Boolean,default:!0},historyKey:String,historyLabel:{type:String,default:"最近选择"},historyRecord:{type:Number,default:5},displayListTips:Boolean,fuzzySearchMethod:Function,exactSearchMethod:Function,emptyText:{type:String,default:"无匹配人员"},tagClearable:{type:Boolean,default:!0},fastClear:Boolean,renderList:Function,renderTag:Function,displayTagTips:Boolean,tagTipsContent:Function,tagTipsDelay:{type:Number,default:300},tagType:{type:String,default:"tag",validator(t){return["tag","avatar"].includes(t)}},avatarUrl:{type:Function,default:()=>null},fixedHeight:{type:Boolean,default:!0},disabledUsers:{type:Array,default:()=>[]},listScrollHeight:[Number,String],api:String,searchLimit:{type:Number,default:20},pasteFormatter:{type:Function,default(t){return t.replace(/\(.*/,"")}},pasteValidator:Function,panelWidth:{type:[Number,String],validator(t){return parseInt(t,10)>=190}},displayDomain:{type:Boolean,default:!0},type:{type:String,default:"selector",validator(t){return["selector","info"].includes(t)}}},emits:["update:modelValue","change","remove-selected","select-user","keydown","focus","blur","clear"],setup(t,n){const{modelValue:o,disabled:a,multiple:r,exclude:i,focusRowLimit:s,defaultAlternate:l,searchFromDefaultAlternate:c,historyKey:d,historyLabel:u,historyRecord:v,fuzzySearchMethod:k,exactSearchMethod:h,displayTagTips:p,tagTipsContent:w,tagTipsDelay:m,fixedHeight:g,disabledUsers:y,api:b,searchLimit:f,pasteFormatter:_,pasteValidator:B,displayDomain:S,type:T}=e.toRefs(t),V=async(R,j)=>{try{const J=Ae();Ve(),J.setContent(E.value.$refs.alternateListContainer),ct(),E.value.loading=!!R;const{results:ae,next:me}=await new Promise(async(Ee,Kt)=>{if(R){const Xt=[(k.value||ge)(R,j)];c.value&&Xt.push(re(R));const[Ao,xo]=await Promise.all(Xt);xo&&Ao.results.unshift(...xo.results),Ee(Ao)}else{const Xt=re();Ee(Xt)}});if(!D.value)return;const{matched:be,flattened:ke}=de(ae);if(!R&&!ke.length){Ye();return}G.value=j?[...G.value,...be]:be,K.value=j?[...K.value,...ke]:ke,C.value=ke.length&&x.value?0:-1,E.value.next=me,E.value.keyword=R,E.value.matchedUsers=G.value,E.value.loading=!1}catch(J){if(J.type==="reset")return;G.value=[],K.value=[],console.error(J)}},L=e.ref(null),z=e.ref(null),{proxy:Z}=e.getCurrentInstance();e.provide("parentSelector",Z);const Y=e.ref(32),P=e.ref(30),x=e.ref(""),N=e.ref(0),C=e.ref(-1),A=e.ref(!0),D=e.ref(!1),F=e.ref(null),I=e.ref([]),G=e.ref([]),K=e.ref([]),oe=ve.throttle(V,800,{leading:!1}),ee=e.ref(null),E=e.ref(null),U=e.ref({}),$=e.ref(null),q=e.ref(!1),W=e.computed(()=>T.value==="selector"),Q=e.computed(()=>{const R={};return D.value?R.maxHeight=g.value?`${s.value*P.value}px`:"auto":g.value&&(R.height=`${P.value}px`),R}),H=e.ref([]);H.value=[...o.value];const ne=e.computed(()=>H.value.map(R=>I.value.find(J=>J.username===R)||{username:R})),ie=e.computed(()=>ne.value.map(R=>yt(R)).join(";")),le=async()=>{try{b.value?I.value=await Pt.scheduleExactSearch(b.value,H.value):h.value?I.value=await h.value(H.value):console.warn("No exact search method has been set")}catch(R){console.error(R)}},re=async R=>{let j=[];const J=(ae,me)=>ae.username.toLowerCase().indexOf(me.toString().toLowerCase())>-1;if(l.value==="history"?j=[{display_name:u.value,children:_e()}]:l.value instanceof Array?j=l.value:typeof l.value=="function"&&(j=await l.value()),R){const ae=[];j.forEach(me=>{if(me.hasOwnProperty("children")){const be=me.children.filter(ke=>J(ke,R));be.length&&ae.push({...me,children:be})}else J(me,R)&&ae.push(me)}),j=ae}return Promise.resolve({results:j,next:!1})},de=R=>{const j=[],J=[];return R.forEach(ae=>{if(ae.hasOwnProperty("children")){const ke=ae.children.filter(Ee=>!J.some(Kt=>Kt.username===Ee.username));if(r.value){const Ee=ke.filter(Kt=>!H.value.includes(Kt.username));Ee.length&&(ae.children=Ee,j.push(ae),J.push(...Ee))}else j.push(ae),J.push(...ke);return}const me=H.value.includes(ae.username),be=J.some(ke=>ke.username===ae.username);(!r.value||!me)&&!be&&(j.push(ae),J.push(ae))}),{matched:j,flattened:J}},ge=async(R,j)=>{if(b.value){const J={app_code:"bk-magicbox",page:j||1,page_size:f.value,fuzzy_lookups:R},{count:ae,results:me}=await Pt.fuzzySearch(b.value,J);return{next:ae>J.page*J.page_size?J.page+1:!1,results:me}}return k.value?k.value(R,j):(console.warn("No fuzzy search method has been set"),Promise.resolve({next:!1,results:[]}))},Ce=async(R,j)=>{try{const J=document.createElement("span");if(typeof w.value=="function"){const ae=await w.value(j);J.innerHTML=ae}else{const ae=await(h.value||fe)(j);J.innerHTML=ae?ae.category_name:"Non existing user"}R.setContent(J)}catch(J){console.error(J),R.setContent(J.message)}},fe=R=>b.value?Pt.exactSearch(b.value,R):h.value?h.value(R):(console.warn("No exact search method has been set"),Promise.resolve({})),Ae=()=>(ee.value||(ee.value=wt(z.value,{theme:"light user-selector-popover",appendTo:document.body,trigger:"manual",placement:"bottom-start",offset:[0,5],arrow:!1,hideOnClick:!1,content:"",interactive:!0,onHide:()=>{dt()},onShow:()=>D.value})),ee.value),Ve=()=>{if(!E.value){const R=e.createApp(cp),j=document.createElement("div");R.mount(j),E.value=En.getInstance("alternateContent","alternateList"),E.value.selector=Z}},_e=()=>{try{if(d.value)return(JSON.parse(window.localStorage.getItem(d.value))||[]).filter(j=>!y.value.includes(j.username));throw new Error("History key not provide")}catch(R){return console.error(R),[]}},je=R=>{if(d.value)try{const j=_e(),J=j.findIndex(me=>me.username===R.username);J>-1&&j.splice(J,1),Array.isArray(R)?j.unshift(...R):j.unshift(R);const ae=j.filter(me=>!y.value.includes(me.username)).slice(0,v.value);window.localStorage.setItem(d.value,JSON.stringify(ae))}catch(j){console.error(j)}},We=()=>{ee.value?.popperInstance?.update()},ct=()=>{We(),ee.value?.show(0)},Ye=()=>{ee.value?.hide(0)},dt=()=>{e.nextTick(()=>{G.value=[],K.value=[],E.value.matchedUsers=[]})},yt=R=>{const j=typeof R=="object";let J=j?R.username:R;return J=S.value?J:J.replace(/@.*/,""),j&&R.display_name&&(J+=`(${R.display_name})`),J},Vn=()=>{if(a.value)return!1;Pn(),N.value=H.value.length,!r.value&&o.value.length?(x.value=yt(o.value[0]),z.value.innerHTML=x.value,Ne(0,{selectRange:!0})):Ne(0)},Nn=R=>{ee.value?.state.isVisible&&R.preventDefault()},Dn=(R,j)=>{if(a.value)return!1;A.value=!1},Tn=(R,j)=>{if(a.value)return!1;if(r.value){const J=R.target,{offsetWidth:ae}=J,me=R.offsetX;N.value=me>ae/2?j+1:j,Ne(0)}else x.value=yt(o.value[0]),z.value.innerHTML=x.value,Ne(0,{selectRange:!0})},O=(R,{username:j})=>{if(!p.value)return!1;const J=R.currentTarget;if(J._user_tips_)return!1;U.value[j]=setTimeout(()=>{J._user_tips_=wt(J,{theme:"light small-arrow user-selected-tips",offset:[0,5],appendTo:document.body,arrow:!0,content:"loading...",placement:"top",interactive:!0,onShow:ae=>{Ce(ae,j)}}),J._user_tips_.show(),delete U.value[j]},m.value)},X=(R,{username:j})=>{p.value&&U.value[j]&&clearTimeout(U.value[j])},se=()=>{A.value=!1},pe=({username:R},j)=>{if(a.value)return!1;const J=[...H.value];J.splice(j,1),H.value=J,et(),D.value?Ne(j>=N.value?0:-1):Ge(),n.emit("remove-selected",R)},ue=(R,j)=>{A.value=!1},xe=(R,j)=>{if(j||j.value)return Ne(0),!1;if(je(R),I.value.push(R),r.value){const J=[...H.value];J.splice(N.value,0,R.username),H.value=J,setTimeout(()=>{Ne(1),bt({reset:!0}),V()},0)}else H.value=[R.username],et(),Ge();n.emit("select-user",R)},De=()=>{A.value=!1},rt=()=>{Ne(0)},bt=(R={})=>{R.reset&&et(),D.value=!0,A.value=!0,e.nextTick(()=>{const j=z.value;if(!j)return;j.focus();const J=window.getSelection();J.selectAllChildren(j),!R.selectRange&&J.collapseToEnd()})},Xe=R=>{if(q.value){R.preventDefault(),R.stopPropagation();return}const{key:j}=R,J={Enter:kt,Backspace:st,Delete:st,ArrowLeft:Re,ArrowRight:Re,ArrowUp:Re,ArrowDown:Re};J.hasOwnProperty(j)&&J[j](R),n.emit("keydown",R)},kt=R=>{if(R.preventDefault(),R.stopPropagation(),A.value=!1,C.value!==-1){const{username:j}=K.value[C.value];if(y.value.includes(j))return!1;if(r.value){const ae=[...H.value];ae.splice(N.value,0,j),H.value=ae,Ne(1,{reset:!0})}else H.value=[j],et(),Ge()}else if(x.value)if(!i.value&&!H.value.includes(x.value))if(r.value){const j=[...H.value];j.splice(N.value,0,x.value),H.value=j,Ne(1,{reset:!0})}else H.value=[x.value],et(),Ge();else et();else et(),Ge();Ye()},st=R=>{if(x.value||!H.value.length||!N.value)return!0;A.value=!1;const j=[...H.value];j.splice(N.value-1,1),H.value=j,Ne(-1),V()},Re=R=>{const j=R.key;if(["ArrowLeft","ArrowRight"].includes(j)){if(x.value||!H.value.length)return!0;j==="ArrowLeft"&&N.value!==0?Ne(-1):j==="ArrowRight"&&N.value!==H.value.length&&Ne(1)}else K.value.length&&(R.preventDefault(),j==="ArrowDown"?C.value<K.value.length-1?C.value+=1:E.value.next?(E.value.$refs.alternateList.scrollTop+=32,E.value.handleScroll()):C.value=0:j==="ArrowUp"&&C.value!==-1&&(C.value-=1))},Mn=R=>{if(q.value){R.preventDefault(),R.stopPropagation();return}x.value=z.value.textContent.trim()},Ge=()=>{if(!A.value)return!0;D.value=!1,Ye()},Ct=R=>K.value.find(J=>{const ae=J.username,me=J.display_name,be=[ae,me].some(Ee=>Ee.toLowerCase()===R.toLowerCase()),ke=H.value.includes(ae);return be&&!ke}),bo=async R=>{if(b.value){const J=(await Pt.pasteValidate(b.value,R)).map(ae=>ae.username);return i.value?J:[...new Set(J.concat(R))]}return B.value?B.value(values):(console.warn("No paste validator has been set"),Promise.resolve([]))},Or=async R=>{Ye(),q.value&&(R.preventDefault(),R.stopPropagation());try{q.value=!0;const J=R.clipboardData.getData("text").replace(/\s/g,"").split(/,|;/).map(Ee=>_.value(Ee)).filter(Ee=>Ee.length),ae=[...new Set(J)];if(!ae.length)return;const me=await(B.value||bo)(ae),be=me.filter(Ee=>!H.value.includes(Ee));if(!me.length)return;const ke=[...H.value];ke.splice(N.value,0,...be),H.value=ke,r.value?D.value&&Ne(be.length,{reset:!0}):Ge()}catch(j){console.error(j)}finally{q.value=!1}},Qt=()=>Array.from(L.value.querySelectorAll(".user-selector-selected")),Ne=(R,j={})=>{N.value=N.value+R,e.nextTick(()=>{const ae=Qt()[N.value]||null;L.value.insertBefore(z.value,ae),bt(j),We()})},Sn=()=>{if(!E.value||!W.value)return!1;e.nextTick(()=>{const{highlightIndex:R}=Z,j=E.value.$refs.alternateList;if(!j)return!1;if(R!==-1){const J=E.value.alternateItem[R].$el,ae=j.clientHeight,me=j.scrollTop,be=J.offsetTop,ke=J.offsetHeight;if(be>=me&&be+ke<=me+ae)return!1;be<=me?j.scrollTop=be:be+ke>me+ae&&(j.scrollTop=be+ke-ae)}else j.scrollTop=0})},Ln=e.ref(0),Jt=()=>{if(!W.value||(_o(),!g.value||D.value||H.value.length<2))return!1;Pn(),Ln.value=setTimeout(()=>{const R=Qt(),j=R.findIndex((J,ae)=>ae?R[ae-1].offsetTop!==J.offsetTop:!1);j>-1?F.value=j:F.value=null,L.value.scrollTop=0,ko()},0)},Pn=()=>{Ln.value&&clearTimeout(Ln.value)},ko=()=>{if(!F.value)return;Co();const R=Qt(),j=R[F.value];if(j)$.value.textContent=`+${H.value.length-F.value}`,L.value.insertBefore($.value,j);else{F.value=null;return}setTimeout(()=>{const J=R[F.value-1];$.value.offsetTop!==J.offsetTop&&(F.value-=1,L.value.insertBefore($.value,$.value.previousSibling),$.value.textContent=`+${H.value.length-F.value}`)},0)},Co=()=>{if($.value)return $.value;const R=document.createElement("span");R.className="user-selector-overflow-tag",$.value=R},_o=()=>{$.value&&$.value.parentNode===L.value&&L.value.removeChild($.value)},Fr=()=>{H.value=[],n.emit("clear")},et=()=>{A.value=!0,C.value=-1,x.value="",z.value.innerHTML=""};return e.watch(x,R=>{R.length?(C.value=-1,Sn(),oe(R)):D.value&&V()}),e.watch(D,R=>{R?(V(),n.emit("focus")):(et(),n.emit("blur")),Jt()}),e.watch(C,()=>{Sn()}),e.watch(H,R=>{n.emit("update:modelValue",R),n.emit("change",R),Jt(),le()}),e.onMounted(()=>{Jt(),le()}),{selectorHeight:Y,singleRowHeight:P,inputValue:x,inputIndex:N,highlightIndex:C,shouldUpdate:A,isFocus:D,overflowTagIndex:F,currentUsers:I,matchedUsers:G,flattenedUsers:K,scheduleSearch:oe,popoverInstance:ee,alternateContent:E,selectedTipsTimer:U,overflowTagNode:$,loading:q,isSelector:W,containerStyle:Q,localValue:H,localValueUsers:ne,userInfo:ie,getCurrentUsers:le,search:V,getDefaultAlternateData:re,filterUsers:de,defaultFuzzySearchMethod:ge,getUserTips:Ce,defaultExactSearchMethod:fe,getPopoverInstance:Ae,getAlternateContent:Ve,getHistoryUsers:_e,updateHistoryUsers:je,updatePopover:We,showPopover:ct,hidePopover:Ye,handlePopoverHide:dt,getDisplayText:yt,focus:Vn,handleContainerScroll:Nn,handleSelectedMousedown:Dn,handleSelectedMouseup:Tn,handleSelectedMouseenter:O,handleSelectedMouseleave:X,handleRemoveMouseDown:se,handleRemoveSelected:pe,handleUserMousedown:ue,handleUserMouseup:xe,handleGroupMousedown:De,handleGroupMouseup:rt,setSelection:bt,handleKeydown:Xe,handleEnter:kt,handleBackspace:st,handleArrow:Re,handleInput:Mn,handleBlur:Ge,getMatchedUser:Ct,defaultPasteValidator:bo,handlePaste:Or,getSelectedDOM:Qt,moveInput:Ne,updateScroller:Sn,calcOverflow:Jt,clearOverflowTimer:Pn,insertOverflowTag:ko,getOverflowTagNode:Co,removeOverflowTagNode:_o,handleFastClear:Fr,reset:et,containerRef:L,inputRef:z}}}),pp={class:"user-selector-layout"},fp=["data-placeholder"],mp=["onMousedown","onMouseup","onMouseenter","onMouseleave"],vp={class:"user-selector-selected-value"},hp=["onClick"],gp={key:1,class:"user-selector user-selector-info"};function wp(t,n,o,a,r,i){const s=e.resolveComponent("render-tag"),l=e.resolveComponent("render-avatar");return t.isSelector?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:"user-selector"},t.$attrs,{style:{height:t.fixedHeight?t.selectorHeight+"px":"auto"},onMousedown:n[10]||(n[10]=c=>t.shouldUpdate=!1),onClick:n[11]||(n[11]=(...c)=>t.focus&&t.focus(...c))}),[e.createElementVNode("div",pp,[e.createElementVNode("div",{class:e.normalizeClass(["user-selector-container",{focus:t.isFocus,disabled:t.disabled,placeholder:!t.localValue.length&&!t.isFocus,"is-fast-clear":t.fastClear,"has-avatar":t.tagType==="avatar","is-loading":t.loading,"is-flex-height":!t.fixedHeight}]),ref:"containerRef",style:e.normalizeStyle(t.containerStyle),"data-placeholder":t.placeholder,onMousewheel:n[8]||(n[8]=(...c)=>t.handleContainerScroll&&t.handleContainerScroll(...c))},[t.multiple||!t.isFocus?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.localValueUsers,(c,d)=>(e.openBlock(),e.createElementBlock("span",{class:"user-selector-selected",key:c.username,onClick:n[2]||(n[2]=e.withModifiers(()=>{},["stop"])),onMousedown:e.withModifiers(u=>t.handleSelectedMousedown(u,d),["left","stop"]),onMouseup:e.withModifiers(u=>t.handleSelectedMouseup(u,d),["left","stop"]),onMouseenter:u=>t.handleSelectedMouseenter(u,c),onMouseleave:u=>t.handleSelectedMouseleave(u,c)},[t.renderTag?(e.openBlock(),e.createBlock(s,{key:0,user:c,username:c.username,index:d},null,8,["user","username","index"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.tagType==="avatar"?(e.openBlock(),e.createBlock(l,{key:0,class:"user-selector-selected-avatar",user:c,"url-method":t.avatarUrl},null,8,["user","url-method"])):e.createCommentVNode("",!0),e.createElementVNode("span",vp,e.toDisplayString(t.getDisplayText(c)),1)],64)),t.tagClearable&&t.tagType==="tag"?(e.openBlock(),e.createElementBlock("i",{key:2,class:"user-selector-selected-clear bk-biz-components-icon bk-biz-icon-close",onMouseup:n[0]||(n[0]=e.withModifiers(()=>{},["left","stop"])),onMousedown:n[1]||(n[1]=e.withModifiers((...u)=>t.handleRemoveMouseDown&&t.handleRemoveMouseDown(...u),["left","stop"])),onClick:e.withModifiers(u=>t.handleRemoveSelected(c,d),["stop","prevent"])},null,40,hp)):e.createCommentVNode("",!0)],40,mp))),128)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("span",{ref:"inputRef",class:"user-selector-input",spellcheck:"false",contenteditable:"",onClick:n[3]||(n[3]=e.withModifiers(()=>{},["stop"])),onInput:n[4]||(n[4]=c=>t.handleInput(c)),onBlur:n[5]||(n[5]=(...c)=>t.handleBlur&&t.handleBlur(...c)),onPaste:n[6]||(n[6]=e.withModifiers(c=>t.handlePaste(c),["prevent","stop"])),onKeydown:n[7]||(n[7]=c=>t.handleKeydown(c))},null,544),[[e.vShow,t.isFocus]])],46,fp),t.fastClear&&!t.disabled&&t.localValue.length?(e.openBlock(),e.createElementBlock("i",{key:0,class:"user-selector-clear bk-biz-components-icon bk-biz-icon-close-circle-shape",onClick:n[9]||(n[9]=e.withModifiers((...c)=>t.handleFastClear&&t.handleFastClear(...c),["stop"]))})):e.createCommentVNode("",!0)])],16)):(e.openBlock(),e.createElementBlock("span",gp,e.toDisplayString(t.userInfo),1))}const yp=te(up,[["render",wp]]),bp=e.defineComponent({__name:"index",props:{modelValue:{},multiple:{type:Boolean,default:!0},placeholder:{default:""},disabled:{type:Boolean,default:!1},fetchUserApi:{default:""}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref([]);e.watch(()=>o.modelValue,()=>{r.value=[...o.modelValue]});const i=s=>{a("update:modelValue",s.slice()),a("change",s.slice())};return(s,l)=>(e.openBlock(),e.createBlock(e.unref(yp),{modelValue:o.modelValue,"onUpdate:modelValue":l[0]||(l[0]=c=>o.modelValue=c),api:o.fetchUserApi,"fix-height":!0,multiple:o.multiple,placeholder:o.placeholder,disabled:o.disabled,onChange:i},null,8,["modelValue","api","multiple","placeholder","disabled"]))}}),kp={class:"notify-type-wrapper"},Cp={key:1},_p=e.defineComponent({__name:"notify-config-forms",props:{config:{},editable:{type:Boolean,default:!0},fetchUserApi:{default:""}},emits:["change"],setup(t,{emit:n}){const o=[{label:"任务状态"},{label:"微信",type:"weixin",icon:kd},{label:"企业微信",type:"rtx",icon:Cd},{label:"邮件",type:"mail",icon:_d},{label:"短信",type:"sms",icon:Ad},{label:"语音",type:"voice",icon:xd}],a=t,r=n,i=[[],[]],s=e.ref([]),l=e.ref([]),c=e.ref([]);e.watch(()=>a.config,()=>{const{notify_type:h,notify_receivers:p}=a.config;s.value=[...h.success],l.value=[...h.fail],c.value=p.more_receiver?p.more_receiver.split(","):[]},{immediate:!0});const d=h=>{const p=o[h];return p.type?e.createVNode("div",{class:"notify-table-header"},[e.createVNode("img",{class:"notify-icon",src:p.icon},null),e.createVNode("p",{class:"label-text"},[p.label])]):e.createVNode("p",{class:"label-text"},[p.label])},u=(h,p)=>h===0?s.value.includes(p):l.value.includes(p),v=(h,p,w)=>{const m=h===0?s.value:l.value;if(w)m.includes(p)||m.push(p);else{const g=m.findIndex(y=>y===p);g>-1&&m.splice(g,1)}k()},k=()=>{r("change",{notify_type:{success:s.value,fail:l.value},notify_receivers:{more_receiver:c.value.join(","),receiver_group:[]}})};return(h,p)=>{const w=e.resolveComponent("bk-switcher"),m=e.resolveComponent("bk-table-column"),g=e.resolveComponent("bk-table"),y=e.resolveComponent("bk-form-item");return e.openBlock(),e.createElementBlock("div",kp,[e.createVNode(y,{label:"通知方式"},{default:e.withCtx(()=>[e.createVNode(g,{class:"notify-type-table",data:i,border:["outer"]},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,b=>e.createVNode(m,{key:b.type,label:d},{default:e.withCtx(({index:f})=>[b.type?(e.openBlock(),e.createBlock(w,{key:0,size:"small",theme:"primary",disabled:!a.editable,value:u(f,b.type),onChange:_=>v(f,b.type,_)},null,8,["disabled","value","onChange"])):(e.openBlock(),e.createElementBlock("span",Cp,e.toDisplayString(f===0?"成功":"失败"),1))]),_:2},1024)),64))]),_:1})]),_:1}),e.createVNode(y,{label:"通知人"},{default:e.withCtx(()=>[e.createVNode(bp,{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=b=>c.value=b),class:"receivers-selector",placeholder:"请选择通知人","fetch-user-api":a.fetchUserApi,disabled:!a.editable,onChange:k},null,8,["modelValue","fetch-user-api","disabled"])]),_:1})])}}}),Ap=te(_p,[["__scopeId","data-v-9ca32fa9"]]),xp={class:"template-settings"},Ep=e.defineComponent({__name:"index",props:{settings:{},editable:{type:Boolean,default:!0},fetchUserApi:{default:""}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref(ve.cloneDeep(a.settings)),s=e.ref(),l={name:[{required:!0,message:"请输入流程名称"}]};e.watch(()=>a.settings,v=>{i.value=ve.cloneDeep(v)});const c=v=>{i.value.notify_config=v,u()},d=()=>s.value.validate().then(()=>!0).catch(()=>!1),u=()=>{r("change",i.value)};return n({validate:d}),(v,k)=>{const h=e.resolveComponent("bk-input"),p=e.resolveComponent("bk-form-item"),w=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("div",xp,[e.createVNode(w,{ref_key:"formRef",ref:s,"label-width":140,model:i.value,rules:l},{default:e.withCtx(()=>[e.createVNode(xt,{title:"基础"},{default:e.withCtx(()=>[e.createVNode(p,{label:"流程名称",property:"name",required:!0},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:i.value.name,"onUpdate:modelValue":k[0]||(k[0]=m=>i.value.name=m),"show-word-limit":"",maxlength:50,disabled:!a.editable,onChange:u},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(xt,{title:"通知",desc:"选择通知方式后,将默认通知到任务执行人"},{default:e.withCtx(()=>[e.createVNode(Ap,{config:i.value.notify_config,editable:a.editable,"fetch-user-api":a.fetchUserApi,onChange:c},null,8,["config","editable","fetch-user-api"])]),_:1}),e.createVNode(xt,{title:"其他"},{default:e.withCtx(()=>[e.createVNode(p,{label:"备注"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:i.value.desc,"onUpdate:modelValue":k[1]||(k[1]=m=>i.value.desc=m),type:"textarea",placeholder:"请输入流程模板备注信息",rows:5,resize:!1,disabled:!a.editable,onChange:u},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1},8,["model"])])}}}),Bp=te(Ep,[["__scopeId","data-v-7141b698"]]),Vp={class:"basic-setting-slider"},Np={class:"sideslider-footer-buttons"},Dp=e.defineComponent({__name:"index",props:{editable:{type:Boolean,default:!0},show:{type:Boolean},settings:{},fetchUserApi:{default:""}},emits:["change","close","update:show"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(ve.cloneDeep(o.settings)),i=e.ref();e.watch(()=>o.settings,d=>{r.value=ve.cloneDeep(d)});const s=d=>{r.value=d},l=async()=>{await i.value?.validate()&&(a("change",r.value),c())},c=()=>{a("close"),a("update:show",!1)};return(d,u)=>{const v=e.resolveComponent("bk-button"),k=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(k,{title:"基础信息","is-show":o.show,width:800,"quick-close":!o.editable,"esc-close":!1,"before-close":c},{footer:e.withCtx(()=>[e.createElementVNode("div",Np,[o.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v,{theme:"primary",onClick:l},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(v,{onClick:c},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(v,{key:1,theme:"primary",onClick:c},{default:e.withCtx(()=>[...u[2]||(u[2]=[e.createTextVNode("关闭",-1)])]),_:1}))])]),default:e.withCtx(()=>[e.createElementVNode("div",Vp,[e.createVNode(Bp,{ref_key:"templateSettingsRef",ref:i,settings:r.value,editable:o.editable,"fetch-user-api":o.fetchUserApi,onChange:s},null,8,["settings","editable","fetch-user-api"])])]),_:1},8,["is-show","quick-close"])}}}),Tp=te(Dp,[["__scopeId","data-v-e2a7edd9"]]),Mp={class:"editor-header"},Sp=e.defineComponent({__name:"index",props:{modelValue:{},options:{}},emits:["update:modelValue","change","blur","save"],setup(t,{emit:n}){xn();const o={language:"javascript",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},wordWrap:"on",wrappingIndent:"same"},a=t,r=n,i=e.ref(),s=e.shallowRef(),l=e.shallowRef(!1);e.watch(()=>a.modelValue,p=>{const w=s.value?.getValue();p!==w&&s.value?.setValue(p)}),e.watch(()=>a.options,p=>{s.value?.updateOptions({...o,...p})},{deep:!0}),e.onMounted(()=>{c()}),e.onBeforeUnmount(()=>{s.value&&s.value.dispose()});const c=()=>{s.value=Ot.editor.create(i.value,{...o,...a.options,value:a.modelValue});const p=s.value.getModel();if(p&&(p.setEOL(0),p.onDidChangeContent(()=>{const w=s.value?.getValue();h(w)})),a.modelValue.indexOf(`\r
51
+ `)>-1){const w=document.createElement("textarea");w.value=a.modelValue,h(w.value)}s.value.onDidBlurEditorText(()=>{r("blur")}),s.value.addCommand(Ot.KeyMod.CtrlCmd|Ot.KeyCode.KeyS,()=>{const w=s.value?.getValue();r("save",w)})},d=()=>{const p=document.createElement("textarea");p.value=s.value.getValue(),document.body.appendChild(p),p.select(),document.execCommand("copy"),document.body.removeChild(p),un({theme:"success",message:"复制成功"})},u=()=>{l.value=!0,window.addEventListener("keydown",k,{once:!0}),un({theme:"primary",message:"按 Esc 即可退出全屏模式"})},v=()=>{l.value=!1,window.removeEventListener("keydown",k)},k=p=>{p.code==="Escape"&&(l.value=!1)},h=p=>{r("update:modelValue",p),r("change",p)};return(p,w)=>{const m=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createBlock(e.Teleport,{disabled:!l.value,to:"body"},[e.createElementVNode("div",{class:e.normalizeClass(["bkflow-code-editor",{fullscreen:l.value}])},[e.createElementVNode("div",Mp,[e.withDirectives(e.createVNode(e.unref(Oe.Copy),{class:"copy-icon",onClick:d},null,512),[[m,{content:"复制",placement:"top",distance:20}]]),l.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(Oe.UnfullScreen),{key:1,class:"fullscreen-icon",onClick:v},null,512)),[[m,{content:"退出全屏",placement:"top",distance:20}]]):e.withDirectives((e.openBlock(),e.createBlock(e.unref(Oe.FilliscreenLine),{key:0,class:"fullscreen-icon",onClick:u},null,512)),[[m,{content:"全屏",placement:"top",distance:20}]])]),e.createElementVNode("div",{ref_key:"monacoContainerRef",ref:i,class:"editor-instance-container"},null,512)],2)],8,["disabled"])}}}),Nr=te(Sp,[["__scopeId","data-v-67af4661"]]),Lp={class:"pipeline-tree-code"},Pp=e.defineComponent({__name:"pipeline-tree-code",props:{pipelineTree:{}},setup(t){const n=t,o=e.computed(()=>JSON.stringify(n.pipelineTree,null,4)),a=e.ref({readOnly:!0,language:"json"});return(r,i)=>(e.openBlock(),e.createElementBlock("div",Lp,[e.createVNode(Nr,{modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=s=>o.value=s),options:a.value},null,8,["modelValue","options"])]))}}),Op=te(Pp,[["__scopeId","data-v-3b34a5ab"]]),Fp={class:"pipeline-tree-code-slider"},Rp={class:"sideslider-footer-buttons"},zp=e.defineComponent({__name:"index",props:{show:{type:Boolean},pipelineTree:{},editable:{type:Boolean,default:!0}},emits:["close","update:show"],setup(t,{emit:n}){const o=t,a=n,r=()=>{a("close"),a("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("bk-button"),c=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(c,{title:"Code","is-show":o.show,width:800,"esc-close":!1,"before-close":r},{footer:e.withCtx(()=>[e.createElementVNode("div",Rp,[e.createVNode(l,{theme:"primary",onClick:r},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode("关闭",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",Fp,[o.show?(e.openBlock(),e.createBlock(Op,{key:0,"pipeline-tree":o.pipelineTree},null,8,["pipeline-tree"])):e.createCommentVNode("",!0)])]),_:1},8,["is-show"])}}}),Ip=te(zp,[["__scopeId","data-v-8fcc9638"]]),$p={class:"flow-info-sliders"},Up={class:"icons"},jp=e.defineComponent({__name:"index",props:{flowData:{},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0},fetchUserApi:{default:""}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t;at();const r=o,i=e.ref(!1),s=e.ref(!1),l=e.ref({show:!1,settings:{name:"",desc:"",notify_config:{notify_type:{success:[],fail:[]},notify_receivers:{more_receiver:"",receiver_group:[]}}}}),c=e.ref(!1),d=()=>{const{name:h,desc:p,notify_config:w}=a.flowData,{notify_type:m={success:[],fail:[]},notify_receivers:g={more_receiver:"",receiver_group:[]}}=w;l.value={show:!0,settings:{name:h,desc:p,notify_config:{notify_type:m,notify_receivers:g}}}},u=h=>{l.value.settings=h,r("change",{...a.flowData,...h})},v=h=>{const p={...a.flowData.pipeline_tree,constants:h};r("change",{...a.flowData,pipeline_tree:p})},k=(h,p)=>{const w=[...a.flowData.pipeline_tree.outputs],m=w.indexOf(h);p?m===-1&&w.push(h):m>-1&&w.splice(m,1);const g={...a.flowData.pipeline_tree,outputs:w};r("change",{...a.flowData,pipeline_tree:g})};return n({openBasicSetting:d}),(h,p)=>{const w=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",$p,[e.createElementVNode("span",Up,[e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-caozuojilu",onClick:p[0]||(p[0]=m=>i.value=!0)},null,512),[[w,"操作记录"]]),e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-quanjubianliang",onClick:p[1]||(p[1]=m=>s.value=!0)},null,512),[[w,"全局变量"]]),e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-jichuxinxi",onClick:d},null,512),[[w,"基础信息"]]),e.withDirectives(e.createElementVNode("i",{class:"bk-incident-icon incident-code",onClick:p[2]||(p[2]=m=>c.value=!0)},null,512),[[w,"Code"]])]),e.createVNode(ji,{show:i.value,"onUpdate:show":p[3]||(p[3]=m=>i.value=m),"flow-id":a.flowData.id},null,8,["show","flow-id"]),e.createVNode(gd,{show:s.value,"onUpdate:show":p[4]||(p[4]=m=>s.value=m),"flow-data":a.flowData,"system-variables":a.systemVariables,editable:a.editable,onOutputChange:k,onChange:v},null,8,["show","flow-data","system-variables","editable"]),e.createVNode(Tp,{show:l.value.show,"onUpdate:show":p[5]||(p[5]=m=>l.value.show=m),settings:l.value.settings,editable:a.editable,"fetch-user-api":a.fetchUserApi,onChange:u},null,8,["show","settings","editable","fetch-user-api"]),e.createVNode(Ip,{show:c.value,"onUpdate:show":p[6]||(p[6]=m=>c.value=m),"pipeline-tree":a.flowData.pipeline_tree,editable:a.editable},null,8,["show","pipeline-tree","editable"])])}}}),Dr=te(jp,[["__scopeId","data-v-0287bf38"]]),Gp={class:"expression-guidance"},qp=e.defineComponent({__name:"expression-guidance",props:{parseLang:{default:"boolrule"}},setup(t){const n=t;return(o,a)=>{const r=e.resolveComponent("bk-link");return e.openBlock(),e.createElementBlock("div",Gp,[n.parseLang==="MAKO"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a[0]||(a[0]=e.createStaticVNode('<p data-v-dd71ced7>makoOperates</p><p data-v-dd71ced7>支持 &quot;and、or、not、True、False&quot; 等 MAKO 关键字语法</p><br data-v-dd71ced7><p data-v-dd71ced7>支持直接引用全局变量</p><p data-v-dd71ced7>使用内置函数、datetime、re、hashlib、random、time、os.path模块处理全局变量</p><br data-v-dd71ced7><p data-v-dd71ced7>示例:</p><p data-v-dd71ced7>假设 key 是值为 &quot;3&quot; 的全局变量</p><p data-v-dd71ced7>字符串比较:<code class="code" data-v-dd71ced7>key == &quot;3&quot;</code></p><p data-v-dd71ced7>数值比较:<code class="code" data-v-dd71ced7>int(key) &gt;= 3</code></p><p data-v-dd71ced7>包含:<code class="code" data-v-dd71ced7>int(key) in (1,2,3)</code></p>',11))],64)):n.parseLang==="FEEL"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a[1]||(a[1]=e.createStaticVNode('<p data-v-dd71ced7>feelOperates</p><p data-v-dd71ced7>支持 &quot;and、or、true、false&quot; 等关键字语法</p><p data-v-dd71ced7>支持 FEEL (Friendly Enough Expression Language) 基础语法</p><br data-v-dd71ced7><p data-v-dd71ced7>支持使用全局变量,如<code class="code" data-v-dd71ced7>${key}</code>、<code class="code" data-v-dd71ced7>${int(key)}</code></p><p data-v-dd71ced7>${}中支持使用内置函数、datetime、re、hashlib、random、time、os.path模块处理全局变量</p><br data-v-dd71ced7><p data-v-dd71ced7>示例:</p><p data-v-dd71ced7>字符串比较:<code class="code" data-v-dd71ced7>&quot;${key}&quot; = &quot;my string&quot;</code></p><p data-v-dd71ced7>数值比较:<code class="code" data-v-dd71ced7>${int(key)} &gt;= 3</code></p><p data-v-dd71ced7>包含:<code class="code" data-v-dd71ced7>list contains([1, 2, 3], ${int(key)})</code></p>',11))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[a[4]||(a[4]=e.createElementVNode("p",null,"makoOperates",-1)),a[5]||(a[5]=e.createElementVNode("p",null,'支持 "and、or、True/true、False/false" 等关键字语法',-1)),e.createElementVNode("p",null,[a[3]||(a[3]=e.createTextVNode(" 表达式更多细节请参考 ",-1)),e.createVNode(r,{theme:"primary",href:"https://boolrule.readthedocs.io/en/latest/expressions.html#basic-comparison-operators",target:"_blank"},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode(" 'boolrule' ",-1)])]),_:1})]),a[6]||(a[6]=e.createStaticVNode('<br data-v-dd71ced7><p data-v-dd71ced7>支持使用全局变量,如<code class="code" data-v-dd71ced7>${key}</code>、<code class="code" data-v-dd71ced7>${int(key)}</code></p><p data-v-dd71ced7>支持使用内置函数、datetime、re、hashlib、random、time、os.path模块处理全局变量</p><br data-v-dd71ced7><p data-v-dd71ced7>示例:</p><p data-v-dd71ced7>字符串比较:<code class="code" data-v-dd71ced7>&quot;${key}&quot; == &quot;my string&quot;</code></p><p data-v-dd71ced7>数值比较:<code class="code" data-v-dd71ced7>${int(key)} &gt;= 3</code></p><p data-v-dd71ced7>包含:<code class="code" data-v-dd71ced7>${key} in (1,2,3)</code></p>',8))],64))])}}}),Hp=te(qp,[["__scopeId","data-v-dd71ced7"]]),Wp={class:"bkflow-branch-condition"},Yp={class:"expression-value-editor"},Zp=e.defineComponent({__name:"index",props:{condition:{},isDefault:{type:Boolean},hasDefaultBranch:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref({...a.condition}),s=e.shallowRef(a.isDefault),l=e.ref(),c={name:[{required:!0,message:"请输入分支名称"}],evaluate:[{required:!0,message:"请输入表达式"}]};e.watch(()=>a.condition,k=>{i.value={...k}}),e.watch(()=>a.isDefault,k=>{s.value=k});const d=()=>{"evaluate"in i.value||(i.value.evaluate="")},u=()=>{r("change",{...i.value},s.value)};return n({validate:()=>l.value.validate().then(()=>!0).catch(()=>!1)}),(k,h)=>{const p=e.resolveComponent("bk-input"),w=e.resolveComponent("bk-form-item"),m=e.resolveComponent("bk-radio"),g=e.resolveComponent("bk-radio-group"),y=e.resolveComponent("bk-form"),b=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",Wp,[e.createVNode(y,{ref_key:"formRef",ref:l,"form-type":"vertical",model:i.value,rules:c},{default:e.withCtx(()=>[e.createVNode(w,{label:"分支名称",property:"name",required:!0},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:i.value.name,"onUpdate:modelValue":h[0]||(h[0]=f=>i.value.name=f),disabled:!a.editable,onChange:u},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(w,{label:"分支类型",required:!0},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=f=>s.value=f),onChange:d},{default:e.withCtx(()=>[e.createVNode(m,{label:!1,disabled:!a.editable},{default:e.withCtx(()=>[...h[3]||(h[3]=[e.createTextVNode("自定义分支",-1)])]),_:1},8,["disabled"]),e.createVNode(m,{label:!0,disabled:!a.editable||a.hasDefaultBranch&&!a.isDefault},{default:e.withCtx(()=>[h[4]||(h[4]=e.createTextVNode(" 默认分支 ",-1)),e.withDirectives(e.createVNode(e.unref(Oe.Info),{class:"radio-tips"},null,512),[[b,{content:"所有分支均不匹配时执行,类似switch-case-default里面的default",width:216,placement:"top"}]])]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1}),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:0,label:"表达式",property:"evaluate",required:!0},{default:e.withCtx(()=>[e.createVNode(Hp),e.createElementVNode("div",Yp,[e.createVNode(Nr,{modelValue:i.value.evaluate,"onUpdate:modelValue":h[2]||(h[2]=f=>i.value.evaluate=f),options:{readOnly:!a.editable},onChange:u},null,8,["modelValue","options"])])]),_:1}))]),_:1},8,["model"])])}}}),Qp=te(Zp,[["__scopeId","data-v-83ccbcd3"]]),Jp={class:"branch-condition-slider"},Kp={class:"sideslider-footer-buttons"},Xp=e.defineComponent({__name:"index",props:{show:{type:Boolean},condition:{},hasDefaultBranch:{type:Boolean,default:!0},isDefault:{type:Boolean},editable:{type:Boolean,default:!0}},emits:["close","update:show","confirm"],setup(t,{emit:n}){const o=t,a=n,r=e.shallowRef({...o.condition}),i=e.shallowRef(o.isDefault),s=e.shallowRef();e.watch(()=>o.show,u=>{u&&(r.value={...o.condition},i.value=o.isDefault)});const l=(u,v)=>{r.value=u,i.value=v},c=async()=>{await s.value?.validate()&&(a("confirm",r.value,i.value),d())},d=()=>{a("close"),a("update:show",!1)};return(u,v)=>{const k=e.resolveComponent("bk-button"),h=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(h,{title:"分支条件","is-show":o.show,width:800,"esc-close":!1,"before-close":d},{footer:e.withCtx(()=>[e.createElementVNode("div",Kp,[o.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(k,{theme:"primary",onClick:c},{default:e.withCtx(()=>[...v[0]||(v[0]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(k,{onClick:d},{default:e.withCtx(()=>[...v[1]||(v[1]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(k,{key:1,theme:"primary",onClick:d},{default:e.withCtx(()=>[...v[2]||(v[2]=[e.createTextVNode("关闭",-1)])]),_:1}))])]),default:e.withCtx(()=>[e.createElementVNode("div",Jp,[e.createVNode(Qp,{ref_key:"branchConditionRef",ref:s,condition:r.value,"has-default-branch":o.hasDefaultBranch,"is-default":i.value,editable:o.editable,onChange:l},null,8,["condition","has-default-branch","is-default","editable"])])]),_:1},8,["is-show"])}}}),ef=te(Xp,[["__scopeId","data-v-c257ae64"]]),tf={class:"node-config-basic-info"},nf={class:"plugin-select"},of={class:"error-handler-options"},af={class:"auto-retry-forms"},rf={class:"timeout-config-forms"},sf={class:"timeout-input"},lf=e.defineComponent({__name:"basic-info",props:{node:{},editable:{type:Boolean,default:!0},uniformApiMethods:{default:()=>[]}},emits:["change","selectPlugin"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref(),s=e.ref(ve.cloneDeep(a.node)),l={};e.watch(()=>a.node,w=>{s.value=ve.cloneDeep(w)});const c=e.computed(()=>a.node.component.code==="uniform_api"),d=e.computed(()=>{const{component:w,name:m}=s.value,{code:g="",version:y="",data:b={}}=w;let f=g==="uniform_api"&&b.uniform_api_plugin_method?.value||"";return{name:m,code:g,version:y,method:f}}),u=w=>{s.value.component.data?.uniform_api_plugin_method&&(s.value.component.data.uniform_api_plugin_method.value=w,p())},v=(w,m)=>{m==="auto_retry"?(s.value.retryable=!0,s.value.auto_retry.interval=0,s.value.auto_retry.times=1):(m==="retryable"&&(s.value.auto_retry={enable:!1,interval:0,times:1}),m==="error_ignorable"&&w&&(s.value.skippable=!0,s.value.retryable=!1,s.value.auto_retry={enable:!1,interval:0,times:1})),w&&["auto_retry","error_ignorable"].includes(m)&&(s.value.timeout_config={enable:!1,seconds:10,action:"forced_fail"})},k=w=>{w||(s.value.timeout_config.seconds=10,s.value.timeout_config.action="forced_fail"),p()},h=()=>i.value.validate().then(()=>!0).catch(()=>!1),p=()=>{r("change",s.value)};return n({validate:h}),(w,m)=>{const g=e.resolveComponent("bk-input"),y=e.resolveComponent("bk-button"),b=e.resolveComponent("bk-form-item"),f=e.resolveComponent("bk-option"),_=e.resolveComponent("bk-select"),B=e.resolveComponent("bk-checkbox"),S=e.resolveComponent("bk-switcher"),T=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("section",tf,[e.createVNode(T,{ref_key:"formRef",ref:i,model:d.value,rules:l,"label-width":94},{default:e.withCtx(()=>[e.createVNode(b,{label:c.value?"API":"标准插件",required:"",property:"code"},{default:e.withCtx(()=>[e.createElementVNode("div",nf,[c.value?(e.openBlock(),e.createBlock(g,{key:0,"model-value":a.node.component.api_meta?.alias,readonly:!0},null,8,["model-value"])):(e.openBlock(),e.createBlock(g,{key:1,"model-value":a.node.component.code,readonly:!0},null,8,["model-value"])),e.createVNode(y,{outline:"",theme:"primary",disabled:!a.editable,onClick:m[0]||(m[0]=V=>r("selectPlugin"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.node.component.code?"重选":"选择"),1)]),_:1},8,["disabled"])])]),_:1},8,["label"]),c.value?(e.openBlock(),e.createBlock(b,{key:0,label:"请求方法",required:"",property:"method"},{default:e.withCtx(()=>[e.createVNode(_,{"model-value":s.value.component.data?.uniform_api_plugin_method?.value,clearable:!1,disabled:!a.editable,onChange:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.uniformApiMethods,V=>(e.openBlock(),e.createBlock(f,{key:V,id:V,label:V},null,8,["id","label"]))),128))]),_:1},8,["model-value","disabled"])]),_:1})):(e.openBlock(),e.createBlock(b,{key:1,label:"插件版本",required:"",property:"version"},{default:e.withCtx(()=>[e.createVNode(_,{"model-value":a.node.component.version,clearable:!1,disabled:!a.editable,onChange:p},null,8,["model-value","disabled"])]),_:1})),e.createVNode(b,{label:"节点名称",required:"",property:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:s.value.name,"onUpdate:modelValue":m[1]||(m[1]=V=>s.value.name=V),disabled:!a.editable,onBlur:p},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(b,{label:"失败处理"},{default:e.withCtx(()=>[e.createElementVNode("div",of,[e.createVNode(B,{modelValue:s.value.error_ignorable,"onUpdate:modelValue":m[2]||(m[2]=V=>s.value.error_ignorable=V),disabled:!a.editable||s.value.auto_retry.enable||s.value.timeout_config.enable,onChange:m[3]||(m[3]=V=>v(V,"error_ignorable"))},{default:e.withCtx(()=>[...m[15]||(m[15]=[e.createElementVNode("span",{class:"option-flag"},"AS",-1),e.createTextVNode("自动跳过 ",-1)])]),_:1},8,["modelValue","disabled"]),e.createVNode(B,{modelValue:s.value.skippable,"onUpdate:modelValue":m[4]||(m[4]=V=>s.value.skippable=V),disabled:!a.editable||s.value.error_ignorable,onChange:m[5]||(m[5]=V=>v(V,"skippable"))},{default:e.withCtx(()=>[...m[16]||(m[16]=[e.createElementVNode("span",{class:"option-flag"},"MS",-1),e.createTextVNode("手动跳过 ",-1)])]),_:1},8,["modelValue","disabled"]),e.createVNode(B,{modelValue:s.value.retryable,"onUpdate:modelValue":m[6]||(m[6]=V=>s.value.retryable=V),disabled:!a.editable||s.value.error_ignorable||s.value.auto_retry.enable,onChange:m[7]||(m[7]=V=>v(V,"retryable"))},{default:e.withCtx(()=>[...m[17]||(m[17]=[e.createElementVNode("span",{class:"option-flag"},"MR",-1),e.createTextVNode("手动重试 ",-1)])]),_:1},8,["modelValue","disabled"]),e.createVNode(B,{modelValue:s.value.auto_retry.enable,"onUpdate:modelValue":m[8]||(m[8]=V=>s.value.auto_retry.enable=V),disabled:!a.editable||s.value.error_ignorable||s.value.timeout_config.enable,onChange:m[9]||(m[9]=V=>v(V,"auto_retry"))},{default:e.withCtx(()=>[...m[18]||(m[18]=[e.createElementVNode("span",{class:"option-flag"},"AR",-1)])]),_:1},8,["modelValue","disabled"]),e.createElementVNode("span",af,[m[19]||(m[19]=e.createTextVNode(" 在 ",-1)),e.createVNode(g,{modelValue:s.value.auto_retry.interval,"onUpdate:modelValue":m[10]||(m[10]=V=>s.value.auto_retry.interval=V),type:"number",placeholder:" ",min:0,precision:0,disabled:!a.editable||!s.value.auto_retry.enable,onBlur:p},null,8,["modelValue","disabled"]),m[20]||(m[20]=e.createTextVNode(" 秒后,自动重试 ",-1)),e.createVNode(g,{modelValue:s.value.auto_retry.times,"onUpdate:modelValue":m[11]||(m[11]=V=>s.value.auto_retry.times=V),type:"number",placeholder:" ",min:0,precision:0,disabled:!a.editable||!s.value.auto_retry.enable,onBlur:p},null,8,["modelValue","disabled"]),m[21]||(m[21]=e.createTextVNode(" 次 ",-1))])])]),_:1}),e.createVNode(b,{label:"超时控制"},{default:e.withCtx(()=>[e.createElementVNode("div",rf,[e.createVNode(S,{modelValue:s.value.timeout_config.enable,"onUpdate:modelValue":m[12]||(m[12]=V=>s.value.timeout_config.enable=V),theme:"primary",size:"small",disabled:!a.editable,onChange:k},null,8,["modelValue","disabled"]),s.value.timeout_config.enable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m[23]||(m[23]=e.createTextVNode(" 超时 ",-1)),e.createElementVNode("span",sf,[e.createVNode(g,{modelValue:s.value.timeout_config.seconds,"onUpdate:modelValue":m[13]||(m[13]=V=>s.value.timeout_config.seconds=V),type:"number",precision:0,min:0,disabled:!a.editable,onBlur:p},null,8,["modelValue","disabled"]),m[22]||(m[22]=e.createElementVNode("span",{class:"unit"},"秒",-1))]),m[24]||(m[24]=e.createTextVNode(" 后,则 ",-1)),e.createVNode(_,{modelValue:s.value.timeout_config.action,"onUpdate:modelValue":m[14]||(m[14]=V=>s.value.timeout_config.action=V),clearable:!1,disabled:!a.editable,onChange:p},{default:e.withCtx(()=>[e.createVNode(f,{id:"forced_fail",label:"强制终止"}),e.createVNode(f,{id:"forced_fail_and_skip",label:"强制终止后跳过"})]),_:1},8,["modelValue","disabled"])],64)):e.createCommentVNode("",!0)])]),_:1})]),_:1},8,["model"])])}}}),cf=te(lf,[["__scopeId","data-v-15ce826f"]]),df=["onMousedown"],uf={class:"dropdown-item-content"},pf={class:"option-key"},ff={class:"option-name"},mf={key:0,class:"dropdown-item empty"},vf=e.defineComponent({__name:"index",props:{modelValue:{default:""},options:{default:()=>[]},type:{default:"text"},placeholder:{default:""},disabled:{type:Boolean,default:!1},rows:{default:3},resize:{type:Boolean,default:!1}},emits:["update:modelValue","change","blur"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(),i=e.ref(),s=e.ref(),l=e.ref(o.modelValue),c=e.ref(!1),d=e.ref(0),u=e.ref({top:0,left:0}),v=e.ref(""),k=e.computed(()=>({top:`${u.value.top}px`,left:`${u.value.left}px`})),h=e.computed(()=>{if(!v.value)return o.options;const L=v.value.toLowerCase();return o.options.filter(z=>z.key.toLowerCase().includes(L))}),p=L=>L.key,w=()=>{const L=i.value?.$el?.querySelector("input, textarea");if(!L)return;const z=L.tagName==="TEXTAREA";if(!r.value?.getBoundingClientRect())return;let Y=0,P=0;if(z){const x=L,C=x.value.substring(0,x.selectionStart).split(`
52
+ `),A=C.length-1,D=parseInt(getComputedStyle(x).lineHeight)||20,F=document.createElement("canvas").getContext("2d");F?(F.font=getComputedStyle(x).font,P=F.measureText(C[A]||"").width):P=(C[A]||"").length*8,Y=A*D+D}else{const x=L,N=x.value.substring(0,x.selectionStart||0),C=document.createElement("canvas").getContext("2d");C?(C.font=getComputedStyle(x).font,P=C.measureText(N).width):P=N.length*8,Y=x.offsetHeight}u.value={top:Y+(z?8:0),left:P+(z?8:0)}},m=()=>{if(!s.value||!r.value)return;const L=s.value.getBoundingClientRect(),z=r.value.getBoundingClientRect(),Z=i.value?.$el?.querySelector("input, textarea");if(!Z)return;const Y=window.innerWidth,P=L.width,x=Z.offsetWidth;let N=u.value.left;const C=x;if(N+P>C&&(N=C-P,N<0&&(N=0)),z.left+N+P>Y){const I=Y-P-z.left;I>=0?N=I:N=0}z.left+N<0&&(N=0),u.value={...u.value,left:N}},g=()=>{const L=i.value?.$el?.querySelector("input, textarea");if(!L)return;const z=L.selectionStart||0,Z=l.value.substring(0,z),Y=Z.lastIndexOf("$");if(Y===-1){c.value=!1;return}const P=Z.substring(Y+1);if(P.includes("}")){c.value=!1;return}let x=P;x.startsWith("{")&&(x=x.substring(1)),v.value=x,w(),c.value=!0,d.value=0,setTimeout(()=>{m()},0)},y=()=>{a("update:modelValue",l.value),a("change",l.value),e.nextTick(()=>{g()})},b=()=>{e.nextTick(()=>{g()})},f=L=>{setTimeout(()=>{const z=L.relatedTarget;s.value?.contains(z)||(c.value=!1)},200),a("blur",L)},_=L=>{const z=i.value?.$el?.querySelector("input, textarea");if(!z)return;const Z=z.selectionStart||0,Y=l.value,P=Y.substring(0,Z),x=Y.substring(Z),N=P.lastIndexOf("$");if(N===-1)return;let C=p(L);C.startsWith("${")&&C.endsWith("}")&&(C=C.slice(2,-1));const A=Y.substring(0,N)+`\${${C}}`+x;l.value=A,a("update:modelValue",A),a("change",A),c.value=!1,e.nextTick(()=>{const D=N+C.length+3;z.focus(),z.setSelectionRange(D,D)})},B=()=>{e.nextTick(()=>{const L=i.value?.$el?.querySelector("input, textarea");L&&(L.removeEventListener("keydown",S),L.addEventListener("keydown",S,!0))})},S=L=>{if(L instanceof KeyboardEvent){if(c.value&&h.value.length>0&&(L.key==="ArrowDown"||L.key==="ArrowUp"||L.key==="Enter")){switch(L.preventDefault(),L.stopPropagation(),L.stopImmediatePropagation(),L.key){case"ArrowDown":d.value=(d.value+1)%h.value.length,T();break;case"ArrowUp":d.value=d.value<=0?h.value.length-1:d.value-1,T();break;case"Enter":d.value>=0&&_(h.value[d.value]);break}return!1}if(L.key==="Escape"&&c.value)return L.preventDefault(),L.stopPropagation(),L.stopImmediatePropagation(),c.value=!1,!1}},T=()=>{e.nextTick(()=>{if(!s.value)return;const z=s.value.querySelectorAll(".dropdown-item:not(.empty)")[d.value];if(z){const Z=s.value,Y=z.offsetTop,P=z.offsetHeight,x=Z.scrollTop,N=Z.clientHeight;Y<x?Z.scrollTop=Y:Y+P>x+N&&(Z.scrollTop=Y+P-N)}})};e.watch(()=>o.modelValue,L=>{L!==l.value&&(l.value=L)}),e.watch(()=>c.value,()=>{B()});const V=L=>{r.value&&!r.value.contains(L.target)&&s.value&&!s.value.contains(L.target)&&(c.value=!1)};return e.onMounted(()=>{document.addEventListener("click",V),B()}),e.onBeforeUnmount(()=>{document.removeEventListener("click",V);const L=i.value?.$el?.querySelector("input, textarea");L&&L.removeEventListener("keydown",S,!0)}),(L,z)=>{const Z=e.resolveComponent("bk-input");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:r,class:"variable-input-wrapper"},[e.createVNode(Z,{ref_key:"inputRef",ref:i,modelValue:l.value,"onUpdate:modelValue":z[0]||(z[0]=Y=>l.value=Y),type:t.type,placeholder:t.placeholder,disabled:t.disabled,rows:t.rows,resize:t.resize,onInput:y,onFocus:b,onBlur:f},null,8,["modelValue","type","placeholder","disabled","rows","resize"]),c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:s,class:"variable-dropdown",style:e.normalizeStyle(k.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Y,P)=>(e.openBlock(),e.createElementBlock("div",{key:Y.key,class:e.normalizeClass(["dropdown-item",{active:P===d.value}]),onMousedown:e.withModifiers(x=>_(Y),["prevent"])},[e.createElementVNode("div",uf,[e.createElementVNode("span",pf,e.toDisplayString(Y.key),1),e.createElementVNode("span",ff,e.toDisplayString(Y.name),1)])],42,df))),128)),h.value.length===0?(e.openBlock(),e.createElementBlock("div",mf,"无匹配项")):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],512)}}}),Tr=te(vf,[["__scopeId","data-v-ccd4bdfb"]]),hf={class:"input-field-form"},gf=e.defineComponent({__name:"input",props:{modelValue:{default:""},config:{},disabled:{type:Boolean,default:!1},fullVariableList:{default:()=>[]}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.ref(o.modelValue),i=e.computed(()=>{const{type:l,form_type:c=""}=o.config;return c==="textarea"?"textarea":["int","integer","number"].includes(l)?"number":"text"});e.watch(()=>o.modelValue,l=>{r.value=l});const s=()=>{a("update:modelValue",r.value),a("change",r.value)};return(l,c)=>(e.openBlock(),e.createElementBlock("div",hf,[e.createVNode(Tr,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=d=>r.value=d),type:i.value,rows:5,min:0,precision:0,disabled:o.disabled,options:o.fullVariableList,onBlur:s},null,8,["modelValue","type","disabled","options"])]))}}),wa=te(gf,[["__scopeId","data-v-b6b3c278"]]),wf=e.defineComponent({__name:"switcher",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=e.ref(o.modelValue);e.watch(()=>o.modelValue,s=>{a.value=s});const r=n,i=s=>{r("update:modelValue",s),r("change",s)};return(s,l)=>{const c=e.resolveComponent("bk-switcher");return e.openBlock(),e.createBlock(c,{"model-value":t.modelValue,theme:"primary",size:"small",disabled:t.disabled,onChange:i},null,8,["model-value","disabled"])}}}),yf={class:"code-editor"},bf=e.defineComponent({__name:"code",props:{modelValue:{default:""},language:{default:"json"},theme:{default:"vs-dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","blur","save"],setup(t,{emit:n}){xn();const o={language:"json",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},wordWrap:"on",wrappingIndent:"same"},a=t,r=n,i=e.ref(),s=e.shallowRef();e.watch(()=>a.modelValue,d=>{const u=s.value?.getValue();d!==u&&s.value?.setValue(d)}),e.watch(()=>a.disabled,d=>{s.value&&s.value.updateOptions({...o,readOnly:d})}),e.onMounted(()=>{l()}),e.onBeforeUnmount(()=>{s.value&&s.value.dispose()});const l=()=>{s.value=Ot.editor.create(i.value,{...o,readOnly:a.disabled,value:a.modelValue,language:a.language});const d=s.value.getModel();d&&(d.setEOL(0),d.onDidChangeContent(()=>{const u=s.value?.getValue();c(u)})),s.value.onDidBlurEditorText(()=>{r("blur")})},c=d=>{r("update:modelValue",d),r("change",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("div",yf,[e.createElementVNode("div",{ref_key:"monacoContainerRef",ref:i,class:"editor-instance-container"},null,512)]))}}),ya=te(bf,[["__scopeId","data-v-8534e38a"]]),kf={class:"bkflow-plugin-uniform-api-form"},Cf=e.defineComponent({__name:"index",props:{inputData:{default:()=>({})},inputs:{default:()=>[]},editable:{type:Boolean,default:!0},fullVariableList:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref(),s=e.ref({}),l=e.ref({});e.watch(()=>a.inputData,()=>{Object.keys(a.inputData).forEach(k=>{s.value[k]=a.inputData[k].value})},{immediate:!0}),e.watch(()=>a.inputs,()=>{a.inputs.forEach(k=>{k.required?l.value[k.key]=[{required:!0,message:"必填项",trigger:"blur"}]:(k.type==="json"||k.form_type==="json")&&(l.value[k.key]=[{validator:h=>{if(h.trim().length===0)return!0;try{return JSON.parse(h),!0}catch{return!1}},message:"请输入正确的 JSON 格式数据",trigger:"blur"}])})},{immediate:!0});const c=k=>{const{type:h,form_type:p=""}=k;if(p){if(["textarea","input"].includes(p))return wa;if(["json"].includes(p))return ya}else{if(["string","int","integer","number"].includes(h))return wa;if(["boolean","bool"].includes(h))return wf;if(["json","dict"].includes(h))return ya}return e.h("div","暂不支持该类型")},d=(k,h)=>{s.value[k]=h,v()},u=async()=>i.value.validate().then(()=>!0).catch(()=>!1),v=()=>{const k={...a.inputData};Object.keys(s.value).forEach(h=>{k[h]={value:s.value[h],hook:!1,need_render:!0}}),r("change",k)};return n({validate:u}),(k,h)=>{const p=e.resolveComponent("bk-form-item"),w=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("div",kf,[e.createVNode(w,{ref_key:"formRef",ref:i,rules:l.value,model:s.value,"label-width":94},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.inputs,m=>(e.openBlock(),e.createBlock(p,{key:m.key,label:m.name,required:m.required,desc:m.desc,property:m.key},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(m)),{"model-value":s.value[m.key],disabled:!a.editable,config:m,"full-variable-list":a.fullVariableList,onChange:g=>d(m.key,g)},null,40,["model-value","disabled","config","full-variable-list","onChange"]))]),_:2},1032,["label","required","desc","property"]))),128))]),_:1},8,["rules","model"])])}}}),ba=te(Cf,[["__scopeId","data-v-cb961ebd"]]),_f={class:"plugin-agent"},Af=e.defineComponent({__name:"index",props:{inputData:{},pluginDetail:{},editable:{type:Boolean},fullVariableList:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref(),s=e.ref({content:""});e.watch(()=>a.inputData,()=>{"value"in a.inputData.content&&(s.value.content=a.inputData.content.value)},{immediate:!0});const l={content:[{required:!0,message:"请输入提问内容",trigger:"blur"}]},c=async()=>i.value.validate().then(()=>!0).catch(()=>!1),d=()=>{const u={...a.inputData};u.content={value:s.value.content,hook:!1,need_render:!0},r("change",u)};return n({validate:c}),(u,v)=>{const k=e.resolveComponent("bk-form-item"),h=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("div",_f,[e.createVNode(h,{ref_key:"formRef",ref:i,rules:l,model:s.value,"label-width":94},{default:e.withCtx(()=>[e.createVNode(k,{label:"用户提问",required:"",property:"content"},{default:e.withCtx(()=>[e.createVNode(Tr,{modelValue:s.value.content,"onUpdate:modelValue":v[0]||(v[0]=p=>s.value.content=p),options:a.fullVariableList,type:"textarea",placeholder:"请输入",rows:6,resize:!1,disabled:!a.editable,onBlur:d},null,8,["modelValue","options","disabled"])]),_:1})]),_:1},8,["model"])])}}}),xf=te(Af,[["__scopeId","data-v-b4b06bc3"]]),Ef={class:"node-config-input-params"},Bf=e.defineComponent({__name:"input-params",props:{node:{},uniformApiPluginDetail:{},inputs:{default:()=>[]},editable:{type:Boolean,default:!0},fullVariableList:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a={uniform_api_plugin:ba,agent:xf},r=t,i=o,s=e.ref(),l=e.computed(()=>r.node.component.code==="uniform_api"&&r.uniformApiPluginDetail?.config?.resource==="bk-incident"),c=e.computed(()=>{const v=r.uniformApiPluginDetail?.category;return l.value&&v&&v in a?a[v]:ba}),d=v=>{const k={...r.node.component.data.bk_display_message};k.value=v,i("change",{...r.node.component.data,bk_display_message:k})};return n({validate:()=>l.value&&s.value&&s.value.validate?s.value.validate():!0}),(v,k)=>{const h=e.resolveComponent("bk-input"),p=e.resolveComponent("bk-form-item"),w=e.resolveComponent("bk-form");return e.openBlock(),e.createElementBlock("section",Ef,[l.value&&r.uniformApiPluginDetail?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{key:0,ref_key:"incidentPluginComponentRef",ref:s,node:r.node,"plugin-detail":r.uniformApiPluginDetail,"plugin-id":r.node.component.api_meta?.id||"","input-data":r.node.component.data,inputs:r.inputs,editable:r.editable,"full-variable-list":r.fullVariableList,onChange:k[0]||(k[0]=m=>i("change",m))},null,40,["node","plugin-detail","plugin-id","input-data","inputs","editable","full-variable-list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[r.node.component.code==="bk_display"?(e.openBlock(),e.createBlock(w,{key:0,"label-width":94},{default:e.withCtx(()=>[e.createVNode(p,{label:"展示内容"},{default:e.withCtx(()=>[e.createVNode(h,{"model-value":r.node.component.data.bk_display_message.value,type:"textarea",rows:4,disabled:!r.editable,resize:!1,onChange:d},null,8,["model-value","disabled"])]),_:1})]),_:1})):e.createCommentVNode("",!0)],64))])}}}),Vf=te(Bf,[["__scopeId","data-v-290c6a69"]]),Nf={class:"node-config-output-params"},Df={class:"params-key-wrappper"},Tf={class:"key-text"},Mf={class:"create-variable-cell"},Sf=["onClick"],Lf=e.defineComponent({__name:"output-params",props:{node:{},outputsForms:{},constants:{default:()=>({})},editable:{type:Boolean,default:!0}},emits:["updateConstants"],setup(t,{emit:n}){const o=t,a=n,r=e.shallowRef({}),i=e.computed(()=>o.outputsForms.map(c=>({...c,hookedKey:s(c.key)})));e.watch(()=>o.constants,c=>{r.value={...c}},{immediate:!0});const s=c=>{const u=Object.values(r.value).find(v=>v.source_info[o.node.id]&&v.source_info[o.node.id].includes(c));return u?u.key:""},l=c=>{if(!o.editable)return;const d=s(c.key);if(d){const u={...r.value[d],source_info:{...r.value[d].source_info,[o.node.id]:r.value[d].source_info[o.node.id].filter(v=>v!==c.key)}};r.value={...r.value,[d]:u}}else{const u=`\${${c.key}}`,v=o.constants[u]?`\${${c.key}_${Qa()}}`:u;r.value={...r.value,[v]:{index:Object.values(r.value).length,name:c.name,key:v,desc:"",custom_type:"",show_type:"hide",source_type:"component_outputs",source_info:{[o.node.id]:[c.key]},source_tag:"",validation:"",plugin_code:"",value:""}}}a("updateConstants",r.value)};return(c,d)=>{const u=e.resolveComponent("bk-table-column"),v=e.resolveComponent("bk-input"),k=e.resolveComponent("bk-table"),h=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("section",Nf,[e.createVNode(k,{"empty-text":"暂无参数",data:i.value,border:["outer"]},{default:e.withCtx(()=>[e.createVNode(u,{label:"名称",width:180,"min-width":180,prop:"name"},{default:e.withCtx(({row:p})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["params-name",{"has-desc":p.description!==""}])},[e.createTextVNode(e.toDisplayString(p.name),1)],2)),[[h,{disabled:p.description==="",content:p.description}]])]),_:1}),e.createVNode(u,{label:"KEY",prop:"key"},{default:e.withCtx(({row:p})=>[e.createElementVNode("div",Df,[e.createElementVNode("span",Tf,e.toDisplayString(p.key),1),p.hookedKey?(e.openBlock(),e.createBlock(v,{key:0,class:"variable-key-input","model-value":p.hookedKey,readonly:e.readonly},null,8,["model-value"])):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(u,{label:"勾选为全局变量",width:120,"min-width":120},{default:e.withCtx(({row:p})=>[e.createElementVNode("div",Mf,[e.withDirectives((e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["btn",{"is-hooked":!!p.hookedKey,"is-disabled":!o.editable,"is-disabled-tooltip":!o.editable}]),onClick:w=>l(p)},[...d[0]||(d[0]=[e.createElementVNode("i",{class:"bk-incident-icon incident-quanjubianliang-2"},null,-1)])],10,Sf)),[[h,{placement:"top",content:p.hookedKey?"取消接收输出":"使用变量接收输出"}]])])]),_:1})]),_:1},8,["data"])])}}}),Pf=te(Lf,[["__scopeId","data-v-a4414ab7"]]),Of={output:[{name:"响应内容",key:"data",type:"object",schema:{type:"object",description:"HTTP 请求响应内容,内部结构不固定",enum:[],properties:{}}},{name:"状态码",key:"status_code",type:"int",schema:{type:"int",description:"HTTP 请求响应状态码",enum:[]}},{name:"执行结果",key:"_result",type:"boolean",schema:{type:"boolean",description:"执行结果的布尔值,True or False",enum:[]}},{name:"循环次数",key:"_loop",type:"int",schema:{type:"int",description:"循环执行次数",enum:[]}},{name:"当前流程循环次数",key:"_inner_loop",type:"int",schema:{type:"int",description:"在当前流程节点循环执行次数,由父流程重新进入时会重置(仅支持新版引擎)",enum:[]}}]},Ff={data:Of},Rf={class:"bkflow-node-config"},zf=e.defineComponent({__name:"index",props:{node:{},systemVariables:{default:()=>[]},constants:{default:()=>({})},editable:{type:Boolean,default:!0}},emits:["change","selectPlugin","updateConstants"],setup(t,{expose:n,emit:o}){const a=e.useSlots(),r=t,i=at(),s=o,l=e.ref(),c=e.ref(),d=e.ref(null),u=e.ref(!0),v=e.shallowRef([]),k=e.shallowRef([]),h=e.shallowRef([]),p=e.ref(!1),w=e.computed(()=>d.value?.methods||[]),m=e.computed(()=>[...h.value]),g=e.computed(()=>[...r.systemVariables,...Object.values(r.constants)].map(T=>({key:T.key,name:T.name})));e.onMounted(()=>{p.value=!1,r.node.component.code==="uniform_api"?(y(),b()):u.value=!1});const y=async()=>{if(!i?.fetchPluginDetail){console.error("API ERROR: fetchPluginDetail is not provided in api"),u.value=!1;return}u.value=!0;const T=r.node.component.api_meta?.id;if(T)try{const V=await i.fetchPluginDetail(T),{inputs:L,outputs:z,url:Z,methods:Y}=V;v.value=L,k.value=z.map(x=>({description:x.desc,key:x.key,type:x.type,name:x.name})),d.value=V,u.value=!1;const{data:P}=r.node.component;if(!P||!("uniform_api_plugin_url"in P)||!("uniform_api_plugin_method"in P)){const x={uniform_api_plugin_url:{value:Z,hook:!1},uniform_api_plugin_method:{value:Y[0],hook:!1}};L.forEach(C=>{x[C.key]={value:nr(C),need_render:!0,hook:!1}});const N={...r.node,component:{...r.node.component,data:x}};_(N)}}catch(V){V.includes("1211011")&&(p.value=!0)}finally{u.value=!1}},b=()=>{h.value=Ff.data.output.map(T=>({description:T.schema.description,key:T.key,type:T.type,name:T.name}))},f=T=>{const V={...r.node,component:{...r.node.component,data:T}};_(V)},_=T=>{s("change",T)},B=T=>{f(T)};return n({isPluginNotExist:p,uniformApiPluginDetailLoading:u,validate:async()=>{if(!!a.inputParams)return await l.value?.validate()??!0;const[V,L]=await Promise.all([l.value?.validate(),c.value?.validate()]);return!(!V||!L)},updateInputParams:B}),(T,V)=>{const L=e.resolveComponent("bk-button"),z=e.resolveComponent("bk-exception"),Z=e.resolveDirective("bk-loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",Rf,[p.value?(e.openBlock(),e.createBlock(z,{key:0,class:"plugin-not-exist-exception",type:"500",title:"未找到可用插件或可用版本",scene:"part"},{default:e.withCtx(()=>[r.editable?(e.openBlock(),e.createBlock(L,{key:0,text:"",theme:"primary",onClick:V[0]||(V[0]=Y=>s("selectPlugin"))},{default:e.withCtx(()=>[...V[3]||(V[3]=[e.createTextVNode("重新选择",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(xt,{title:"基础信息"},{default:e.withCtx(()=>[e.createVNode(cf,{ref_key:"basicInfoRef",ref:l,node:r.node,editable:r.editable,"uniform-api-methods":w.value,onSelectPlugin:V[1]||(V[1]=Y=>s("selectPlugin")),onChange:_},null,8,["node","editable","uniform-api-methods"])]),_:1}),e.createVNode(xt,{title:"输入参数"},{default:e.withCtx(()=>[u.value?e.createCommentVNode("",!0):e.renderSlot(T.$slots,"inputParams",{key:0,node:r.node,uniformApiPluginDetail:d.value,inputs:v.value,editable:r.editable,fullVariableList:g.value,updateInputParams:B},()=>[e.createVNode(Vf,{ref_key:"inputParamsRef",ref:c,node:r.node,"uniform-api-plugin-detail":d.value,inputs:v.value,editable:r.editable,"full-variable-list":g.value,onChange:f},null,8,["node","uniform-api-plugin-detail","inputs","editable","full-variable-list"])],!0)]),_:3}),e.createVNode(xt,{title:"输出参数"},{default:e.withCtx(()=>[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pf,{key:0,node:r.node,"outputs-forms":m.value,constants:r.constants,editable:r.editable,onUpdateConstants:V[2]||(V[2]=Y=>s("updateConstants",Y))},null,8,["node","outputs-forms","constants","editable"]))]),_:1})],64))])),[[Z,{loading:u.value}]])}}}),If=te(zf,[["__scopeId","data-v-a69c7e3b"]]),$f={class:"node-config-slider"},Uf={key:0,class:"sideslider-footer-buttons"},jf=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1},node:{},constants:{default:()=>({})},systemVariables:{default:()=>[]},editable:{type:Boolean,default:!0}},emits:["close","update:show","confirm","selectPlugin"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref(),s=e.ref(!0),l=e.ref(ve.cloneDeep(a.node)),c=e.shallowRef({...a.constants});e.watch(()=>a.show,()=>{l.value=ve.cloneDeep(a.node),c.value={...a.constants}}),e.watchEffect(()=>{i.value?.isPluginNotExist||i.value?.uniformApiPluginDetailLoading?s.value=!1:s.value=!0});const d=p=>{l.value=p},u=async()=>{await i.value?.validate()&&r("confirm",l.value,c.value)},v=()=>{if(a.editable)return new Promise(p=>{jn.InfoBox({title:"确认离开?",content:"离开将会导致未保存信息丢失",confirmText:"离开",cancelText:"取消",width:320,onConfirm:()=>{k(),p(!0)},onCancel:()=>{p(!1)}})});k()},k=()=>{r("close"),r("update:show",!1)};return n({updateNodeInputParams:p=>{i.value&&i.value.updateInputParams?.(p)}}),(p,w)=>{const m=e.resolveComponent("bk-button"),g=e.resolveComponent("bk-sideslider");return e.openBlock(),e.createBlock(g,{title:"节点配置","is-show":a.show,width:960,"esc-close":!1,"before-close":v},{footer:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",Uf,[a.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(m,{theme:"primary",onClick:u},{default:e.withCtx(()=>[...w[2]||(w[2]=[e.createTextVNode("确定",-1)])]),_:1}),e.createVNode(m,{onClick:k},{default:e.withCtx(()=>[...w[3]||(w[3]=[e.createTextVNode("取消",-1)])]),_:1})],64)):(e.openBlock(),e.createBlock(m,{key:1,theme:"primary",onClick:k},{default:e.withCtx(()=>[...w[4]||(w[4]=[e.createTextVNode("关闭",-1)])]),_:1}))])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",$f,[a.show?(e.openBlock(),e.createBlock(If,{key:0,ref_key:"nodeConfigRef",ref:i,node:l.value,editable:a.editable,constants:c.value,"system-variables":a.systemVariables,onSelectPlugin:w[0]||(w[0]=y=>r("selectPlugin")),onUpdateConstants:w[1]||(w[1]=y=>c.value=y),onChange:d},{inputParams:e.withCtx(y=>[e.renderSlot(p.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps(y)),void 0,!0)]),_:3},8,["node","editable","constants","system-variables"])):e.createCommentVNode("",!0)])]),_:3},8,["is-show"])}}}),Gf=te(jf,[["__scopeId","data-v-239da954"]]),qf={class:"plugin-group-aside"},Hf={class:"group-list"},Wf=["onClick"],Yf=["src"],Zf={class:"group-text"},Qf=e.defineComponent({__name:"plugin-groups-aside",props:{actived:{},groups:{}},emits:["update:actived","change"],setup(t,{emit:n}){const o=t,a=n,r=i=>{a("update:actived",i),a("change",i)};return(i,s)=>(e.openBlock(),e.createElementBlock("section",qf,[e.createElementVNode("div",Hf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.groups,l=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["group-item",{actived:o.actived===l.name}]),key:l.id,onClick:c=>r(l.name)},[e.createElementVNode("img",{class:"group-icon",src:l.iconUrl},null,8,Yf),e.createElementVNode("span",Zf,e.toDisplayString(l.alias),1)],10,Wf))),128))])]))}}),Jf=te(Qf,[["__scopeId","data-v-6c7ab9b0"]]),Kf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/告警%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/告警'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(20,%2018)'%20fill='%23FFFFFF'%3e%3cpath%20d='M23.8214286,25.9259259%20L23.8214286,14.5185185%20C23.8280822,12.0419907%2022.8443395,9.66585559%2021.0897321,7.92037037%20C19.3290179,6.16064815%2016.9889509,5.18515161%2014.5,5.18515161%20C12.026631,5.17852307%209.65352669,6.16352209%207.91026786,7.92037037%20C6.15279018,9.68333333%205.17857143,12.0263889%205.17857143,14.5185185%20L5.17857143,25.9259259%20L2.07142857,25.9259259%20L2.07142857,28%20L26.9285714,28%20L26.9285714,25.9259259%20L23.8214286,25.9259259%20Z%20M15.225,10.9083333%20L16.6879464,12.3731481%20L14.5356027,14.5314815%20L17.3708705,17.3703704%20L13.8138393,21.3305556%20L12.2732143,19.9435185%20L14.516183,17.4449074%20L11.6064732,14.5314815%20L15.225,10.9083333%20Z%20M29,13.4814815%20L29,15.5555556%20L24.8571429,15.5555556%20L24.8571429,13.4814815%20L29,13.4814815%20Z%20M4.14285714,13.4814815%20L4.14285714,15.5555556%20L0,15.5555556%20L0,13.4814815%20L4.14285714,13.4814815%20Z%20M5.01594524,3.53359279%20L7.94538762,6.46677647%20L6.48066643,7.93336831%20L3.55122405,5.00018463%20L5.01594524,3.53359279%20Z%20M23.9784806,3.5274069%20L25.4432018,4.99399875%20L22.5137594,7.92718243%20L21.0490382,6.46059059%20L23.9784806,3.5274069%20Z%20M15.5357143,0%20L15.5357143,4.14814815%20L13.4642857,4.14814815%20L13.4642857,0%20L15.5357143,0%20Z'%20id='形状'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",Xf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/事件%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/事件'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3crect%20id='矩形-2'%20fill='%233A84FF'%20fill-rule='nonzero'%20x='5'%20y='5'%20width='40'%20height='40'%20rx='3'%3e%3c/rect%3e%3crect%20id='矩形'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20x='10'%20y='10'%20width='44'%20height='44'%20rx='3'%3e%3c/rect%3e%3cg%20id='alert-告警'%20transform='translate(16.25,%2016.25)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M9,0%20L9,2.25%20L22.5,2.25%20L22.5,0%20L27,0%20L27,2.25%20L29.25,2.25%20C30.4926407,2.25%2031.5,3.25735931%2031.5,4.5%20L31.5,29.25%20C31.5,30.4926407%2030.4926407,31.5%2029.25,31.5%20L2.25,31.5%20C1.00735931,31.5%200,30.4926407%200,29.25%20L0,4.5%20C0,3.25735931%201.00735931,2.25%202.25,2.25%20L4.5,2.25%20L4.5,0%20L9,0%20Z%20M29.25,10.125%20L2.25,10.125%20L2.25,29.25%20L29.25,29.25%20L29.25,10.125%20Z%20M11.25,13.5%20L11.25,18%20L5.625,18%20L5.625,13.5%20L11.25,13.5%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",e0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/图谱%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/图谱'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(18.25,%2018.25)'%20fill='%23FFFFFF'%3e%3cpath%20d='M27.5625,0%20C29.7371212,0%2031.5,1.7628788%2031.5,3.9375%20C31.5,6.1121212%2029.7371212,7.875%2027.5625,7.875%20C26.8821072,7.875%2026.2420211,7.70242627%2025.6836253,7.39866233%20L21.2480235,11.8331927%20C22.0362649,12.9376649%2022.5,14.2896769%2022.5,15.75%20C22.5,17.2076792%2022.0379426,18.5574391%2021.2523016,19.6608059%20L24.7142478,23.1229218%20C25.3841532,22.7271229%2026.1655529,22.5%2027,22.5%20C29.4852814,22.5%2031.5,24.5147186%2031.5,27%20C31.5,29.4852814%2029.4852814,31.5%2027,31.5%20C24.5147186,31.5%2022.5,29.4852814%2022.5,27%20C22.5,26.1655529%2022.7271229,25.3841532%2023.1229218,24.7142478%20L19.6608059,21.2523016%20C18.5574391,22.0379426%2017.2076792,22.5%2015.75,22.5%20C14.2923208,22.5%2012.9425609,22.0379426%2011.8391941,21.2523016%20L8.73675688,24.3548271%20C8.9071608,24.8296846%209,25.3415004%209,25.875%20C9,28.3602814%206.98528137,30.375%204.5,30.375%20C2.01471863,30.375%200,28.3602814%200,25.875%20C0,23.3897186%202.01471863,21.375%204.5,21.375%20C5.62390208,21.375%206.6515713,21.7870218%207.44020055,22.4682583%20L10.2476984,19.6608059%20C9.46205741,18.5574391%209,17.2076792%209,15.75%20C9,14.2927614%209.46177809,12.9433769%2010.246986,11.8401948%20L6.9225844,8.53381806%20C6.36863781,8.83126977%205.73527343,9%205.0625,9%20C2.8878788,9%201.125,7.2371212%201.125,5.0625%20C1.125,2.8878788%202.8878788,1.125%205.0625,1.125%20C7.2371212,1.125%209,2.8878788%209,5.0625%20C9,5.74577587%208.82596068,6.38840267%208.51979386,6.94846859%20L11.8381935,10.2484109%20C12.9417448,9.46233681%2014.2918801,9%2015.75,9%20C17.2050353,9%2018.5525424,9.46038278%2019.6547997,10.2434266%20L24.0949001,5.80449226%20C23.7951367,5.24890576%2023.625,4.61307166%2023.625,3.9375%20C23.625,1.7628788%2025.3878788,0%2027.5625,0%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",t0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/日志%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/日志'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3crect%20id='矩形-2'%20fill='%233A84FF'%20fill-rule='nonzero'%20x='5'%20y='5'%20width='40'%20height='40'%20rx='3'%3e%3c/rect%3e%3crect%20id='矩形'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20x='10'%20y='10'%20width='44'%20height='44'%20rx='3'%3e%3c/rect%3e%3cg%20id='alert-告警'%20transform='translate(17.375,%2017.375)'%20fill='%23FFFFFF'%3e%3cpath%20d='M28.25,0%20C28.8022847,0%2029.25,0.44771525%2029.25,1%20L29.25,28.25%20C29.25,28.8022847%2028.8022847,29.25%2028.25,29.25%20L1,29.25%20C0.44771525,29.25%200,28.8022847%200,28.25%20L0,1%20C0,0.44771525%200.44771525,1.11022302e-16%201,0%20L28.25,0%20Z%20M14.625,19.125%20C14.0036797,19.125%2013.5,19.6286797%2013.5,20.25%20C13.5,20.8713203%2014.0036797,21.375%2014.625,21.375%20C15.2463203,21.375%2015.75,20.8713203%2015.75,20.25%20C15.75,19.6286797%2015.2463203,19.125%2014.625,19.125%20Z%20M8.4375,7.875%20C5.02023811,7.875%202.25,10.6452381%202.25,14.0625%20C2.25,17.4797619%205.02023811,20.25%208.4375,20.25%20C11.8547619,20.25%2014.625,17.4797619%2014.625,14.0625%20C14.625,10.6452381%2011.8547619,7.875%208.4375,7.875%20Z%20M20.8125,7.875%20C17.3952381,7.875%2014.625,10.6452381%2014.625,14.0625%20C14.625,17.4797619%2017.3952381,20.25%2020.8125,20.25%20C24.2297619,20.25%2027,17.4797619%2027,14.0625%20C27,10.6452381%2024.2297619,7.875%2020.8125,7.875%20Z%20M8.4375,10.125%20C10.6121212,10.125%2012.375,11.8878788%2012.375,14.0625%20C12.375,16.2371212%2010.6121212,18%208.4375,18%20C6.2628788,18%204.5,16.2371212%204.5,14.0625%20C4.5,11.8878788%206.2628788,10.125%208.4375,10.125%20Z%20M20.8125,10.125%20C22.9871212,10.125%2024.75,11.8878788%2024.75,14.0625%20C24.75,16.2371212%2022.9871212,18%2020.8125,18%20C18.6378788,18%2016.875,16.2371212%2016.875,14.0625%20C16.875,11.8878788%2018.6378788,10.125%2020.8125,10.125%20Z%20M21.5,12.9375%20L20.125,12.9375%20C19.5727153,12.9375%2019.125,13.3852153%2019.125,13.9375%20L19.125,14.1875%20C19.125,14.7397847%2019.5727153,15.1875%2020.125,15.1875%20L21.5,15.1875%20C22.0522847,15.1875%2022.5,14.7397847%2022.5,14.1875%20L22.5,13.9375%20C22.5,13.3852153%2022.0522847,12.9375%2021.5,12.9375%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",n0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/指标%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/指标'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(20.0022,%2019)'%20fill='%23FFFFFF'%3e%3cpath%20d='M26.9978016,9%20L26.9978016,26%20L22.9857822,26%20L22.9857822,9%20L26.9978016,9%20Z%20M19.9767677,15%20L19.9767677,26%20L15.9647484,26%20L15.9647484,15%20L19.9767677,15%20Z%20M12.9557339,12%20L12.9557339,26%20L8.9437145,26%20L8.9437145,12%20L12.9557339,12%20Z%20M5.93469998,17%20L5.93469998,26%20L1.92268063,26%20L1.92268063,17%20L5.93469998,17%20Z%20M26.9978016,0%20L26.9978016,8%20L23.6568016,4.67%20L16.9918102,11.3355632%20L11.3179511,5.6617042%20L1.41846305,15.561206%20L3.55271368e-15,14.1427429%20L11.3137085,2.82903444%20L16.9875333,8.50285925%20L22.2358016,3.253%20L18.9737629,0%20L26.9978016,0%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",o0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/Profiling%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/Profiling'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(19.375,%2016)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M10.3813948,-3.55271368e-15%20C17.257736,1.52410383%2022.3838329,6.97063848%2023.2188935,13.6207878%20C24.020884,11.6579106%2025.6982065,10.1856528%2027.7485185,9.64494215%20C27.1633902,11.2491122%2027.1633902,13.0083535%2027.7485185,14.6125236%20C27.7485185,14.6125236%2033.0597887,25.1085424%2026.6837718,31.6233741%20L24.0521736,28.9989243%20C27.3425616,24.7791508%2027.0291913,18.684516%2023.1138432,14.7781096%20C18.7284397,10.4016526%2011.6811693,10.5583362%207.45245097,14.9347932%20C3.22373261,19.3094697%203.53710289,26.4991091%207.9225064,30.562199%20C11.8378545,34.1552382%2017.6316437,34.3119218%2021.8603621,31.1853723%20L24.2302248,33.5498699%20C23.1560051,34.1931262%2022.0151369,34.7178845%2020.8276645,35.1149251%20C20.8276645,35.1149251%2016.914097,36.7173707%2011.2876759,35.6099027%20C11.2876759,35.6099027%20-5.60939232,32.1361567%201.9435438,14.8956223%20C2.71450593,15.6701377%203.23085471,16.6583125%203.42136957,17.7337316%20C4.27570623,15.1161605%205.73197932,12.7354096%207.67323457,10.7826785%20C10.1623917,8.55705961%2012.6960617,2.27013128%2010.3813948,-3.55271368e-15%20Z%20M8.86261726,17.9028786%20C10.3191865,15.8450628%2012.6836372,14.6218537%2015.2048045,14.6218537%20C17.7259718,14.6218537%2020.0904225,15.8450628%2021.5469918,17.9028786%20C23.5838986,20.5593773%2023.5838986,24.3108806%2021.5469918,27.1240629%20C20.0904225,29.1818787%2017.7259718,30.4050878%2015.2048045,30.4050878%20C12.6836372,30.4050878%2010.3191865,29.1818787%208.86261726,27.1240629%20C6.8257104,24.4675642%206.8257104,20.5593773%208.86261726,17.9028786%20Z%20M20.475123,17.8049514%20L9.79204502,17.8049514%20L9.79204502,21.3659416%20L11.572558,21.3659416%20L11.572558,24.9269319%20L13.353071,24.9269319%20L13.353071,23.1464368%20L15.133584,23.1464368%20L15.133584,26.7074271%20L16.914097,26.7074271%20L16.914097,28.4879222%20L18.69461,28.4879222%20L18.69461,23.1464368%20L20.475123,23.1464368%20L20.475123,17.8049514%20L20.475123,17.8049514%20Z'%20id='形状'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",a0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='64px'%20height='64px'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ePic/Trace%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='99.2979677%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23CEE4FF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Pic/Trace'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20id='椭圆形'%20fill='%233A84FF'%20fill-rule='nonzero'%20cx='27'%20cy='27'%20r='23'%3e%3c/circle%3e%3ccircle%20id='椭圆形备份'%20stroke='url(%23linearGradient-1)'%20fill-opacity='0.7'%20fill='%23CFDDF6'%20cx='34'%20cy='34'%20r='24'%3e%3c/circle%3e%3cg%20id='alert-告警'%20transform='translate(18.25,%2018.25)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M15.75,0%20C16.36875,0%2016.875,0.50625%2016.875,1.125%20L16.875,2.29647656%20C23.4334688,2.83756641%2028.6624336,8.06653125%2029.2035234,14.625%20L30.375,14.625%20C30.99375,14.625%2031.5,15.13125%2031.5,15.75%20C31.5,16.36875%2030.99375,16.875%2030.375,16.875%20L29.2035234,16.875%20C28.6624336,23.4334688%2023.4334688,28.6624336%2016.875,29.2035234%20L16.875,30.375%20C16.875,30.99375%2016.36875,31.5%2015.75,31.5%20C15.13125,31.5%2014.625,30.99375%2014.625,30.375%20L14.625,29.2035234%20C8.06653125,28.6624336%202.83756641,23.4334688%202.29647656,16.875%20L1.125,16.875%20C0.50625,16.875%200,16.36875%200,15.75%20C0,15.13125%200.50625,14.625%201.125,14.625%20L2.29647656,14.625%20C2.83756641,8.06653125%208.06653125,2.83756641%2014.625,2.29647656%20L14.625,1.125%20C14.625,0.50625%2015.13125,0%2015.75,0%20Z%20M16.875,4.55582812%20L16.875,5.625%20C16.875,6.24375%2016.36875,6.75%2015.75,6.75%20C15.13125,6.75%2014.625,6.24375%2014.625,5.625%20L14.625,4.55582812%20C9.31011328,5.08355859%205.08355859,9.31011328%204.55582812,14.625%20L5.625,14.625%20C6.24375,14.625%206.75,15.13125%206.75,15.75%20C6.75,16.36875%206.24375,16.875%205.625,16.875%20L4.55582812,16.875%20C5.08355859,22.1898867%209.31011328,26.4164414%2014.625,26.9441719%20L14.625,25.875%20C14.625,25.25625%2015.13125,24.75%2015.75,24.75%20C16.36875,24.75%2016.875,25.25625%2016.875,25.875%20L16.875,26.9441719%20C22.1898867,26.4164414%2026.4164414,22.1898867%2026.9441719,16.875%20L25.875,16.875%20C25.25625,16.875%2024.75,16.36875%2024.75,15.75%20C24.75,15.13125%2025.25625,14.625%2025.875,14.625%20L26.9441719,14.625%20C26.4164414,9.31011328%2022.1898867,5.08355859%2016.875,4.55582812%20Z%20M15.75,10.125%20C18.8566017,10.125%2021.375,12.6433983%2021.375,15.75%20C21.375,18.8566017%2018.8566017,21.375%2015.75,21.375%20C12.6433983,21.375%2010.125,18.8566017%2010.125,15.75%20C10.125,12.6433983%2012.6433983,10.125%2015.75,10.125%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='64'%20height='64'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e",r0={class:"data-plugin-group"},s0={class:"plugin-list"},i0=["onClick"],l0=["src"],c0={class:"plugin-name"},d0=e.defineComponent({__name:"data-plugin-group",props:{plugins:{}},emits:["select"],setup(t,{emit:n}){const o=t,a=n,r={alert_plugin:Kf,log_plugin:t0,trace_plugin:a0,query_promql_metric_plugin:n0,事件查询:Xf,Profiling查询:o0,图谱查询:e0},i=e.computed(()=>o.plugins.map(s=>({id:s.id,name:s.alias,icon:r[s.name]})));return(s,l)=>(e.openBlock(),e.createElementBlock("div",r0,[e.createElementVNode("div",s0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,c=>(e.openBlock(),e.createElementBlock("div",{class:"plugin-item",key:c.id,onClick:d=>a("select",c.id)},[e.createElementVNode("img",{class:"plugin-img",src:c.icon},null,8,l0),e.createElementVNode("h4",c0,e.toDisplayString(c.name),1)],8,i0))),128))]),i.value.length===0?(e.openBlock(),e.createBlock(ht,{key:0,title:"暂无数据插件"})):e.createCommentVNode("",!0)]))}}),u0=te(d0,[["__scopeId","data-v-782d393d"]]),p0={class:"search-select-wrapper"},Mr=e.defineComponent({__name:"index",props:{modelValue:{default:()=>[]},placeholder:{default:"请选择"},options:{default:()=>[]}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=t,a=n,r=e.shallowRef([...o.modelValue]);e.watch(()=>o.modelValue,s=>{r.value=[...s]},{deep:!0});const i=s=>{r.value=s,a("update:modelValue",s),a("change",s)};return(s,l)=>{const c=e.resolveComponent("bk-search-select");return e.openBlock(),e.createElementBlock("div",p0,[e.createVNode(c,{modelValue:r.value,"onUpdate:modelValue":[l[0]||(l[0]=d=>r.value=d),i],"value-behavior":"need-key",data:o.options,placeholder:o.placeholder,uniqueSelect:!0,clearable:!0},null,8,["modelValue","data","placeholder"])])}}}),f0={class:"agent-plugin-group"},m0={class:"top-operate-area"},v0={class:"buttons"},h0={class:"agent-content-area"},g0={class:"agent-cards"},w0={class:"card-header"},y0=["src"],b0={class:"agent-summary"},k0={class:"main-info"},C0={class:"name-text"},_0={class:"other-info"},A0=["title"],x0=["title"],E0=["title"],B0={class:"agent-desc"},V0={class:"agent-btns"},N0=e.defineComponent({__name:"agent-plugin-group",props:{properties:{},plugins:{}},emits:["select"],setup(t,{emit:n}){const o=pn.useRouter(),a=pn.useRoute(),r=[{id:"alias",name:"智能体名称"},{id:"created_by",name:"创建人"}],i=t,s=n,l=e.ref("all"),c=e.ref([]),d=e.computed(()=>Object.keys(i.properties).map(g=>({id:g,name:i.properties[g]}))),u=e.computed(()=>i.plugins.filter(g=>!g.display_content.hidden)),v=e.computed(()=>{const g=u.value.filter(y=>l.value!=="all"?y.group===l.value:!0);return c.value.length>0?g.filter(y=>c.value.some(b=>b.id==="alias"?y.alias.toLowerCase().includes(b.values[0].id.toLowerCase()):b.id==="agent_type"?(y.display_content?.agent_type||"")===b.values[0].id:b.id==="space_name"?(y.display_content?.space_name||"").toLowerCase().includes(b.values[0].id.toLowerCase()):b.id==="created_by"?(y.display_content?.created_by||"")===b.values[0].id:!0)):g}),k=()=>{const{href:g}=o.resolve({name:"spaceResource",params:a.params});window.open(g,"_blank")},h=()=>{const{href:g}=o.resolve({name:"spaceResource",params:a.params});window.open(g,"_blank")},p=g=>{c.value=g},w=g=>{g.display_content.fetch_url&&window.open(g.display_content.fetch_url,"_blank")},m=g=>g?lo(g).format("YYYY-MM-DD HH:mm:ss"):"--";return(g,y)=>{const b=e.resolveComponent("bk-button"),f=e.resolveComponent("bk-alert"),_=e.resolveComponent("bk-radio-button"),B=e.resolveComponent("bk-radio-group");return e.openBlock(),e.createElementBlock("div",f0,[e.createVNode(f,null,{default:e.withCtx(()=>[y[3]||(y[3]=e.createTextVNode(" 如有需要,您可以申请更多的智能体权限 ",-1)),e.createVNode(b,{theme:"primary",text:"",size:"small",onClick:k},{default:e.withCtx(()=>[...y[2]||(y[2]=[e.createTextVNode("点击申请",-1)])]),_:1})]),_:1}),e.createElementVNode("div",m0,[e.createElementVNode("div",v0,[e.createVNode(b,{theme:"primary",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(Oe.Plus),{class:"add-icon"}),y[4]||(y[4]=e.createTextVNode(" 智能体 ",-1))]),_:1}),e.createVNode(B,{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=S=>l.value=S),type:"capsule"},{default:e.withCtx(()=>[e.createVNode(_,{label:"all"},{default:e.withCtx(()=>[...y[5]||(y[5]=[e.createTextVNode("全部",-1)])]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,S=>(e.openBlock(),e.createBlock(_,{key:S.id,label:S.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),e.createVNode(Mr,{modelValue:c.value,options:r,placeholder:"搜索智能体名称、创建人",onChange:p},null,8,["modelValue"])]),e.createElementVNode("div",h0,[e.createElementVNode("div",g0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,S=>(e.openBlock(),e.createElementBlock("div",{class:"card-item",key:S.id},[e.createElementVNode("div",w0,[e.createElementVNode("img",{src:S.display_content.icon,alt:"",class:"agent-img"},null,8,y0),e.createElementVNode("div",b0,[e.createElementVNode("div",k0,[e.createElementVNode("div",C0,e.toDisplayString(S.alias),1)]),e.createElementVNode("div",_0,[e.createElementVNode("span",{title:S.display_content.agent_code},"ID:"+e.toDisplayString(S.display_content.agent_code),9,A0),e.createElementVNode("span",{title:S.display_content.created_by},"创建人:"+e.toDisplayString(S.display_content.created_by),9,x0),e.createElementVNode("span",{title:m(S.display_content.created_at)}," 创建时间:"+e.toDisplayString(m(S.display_content.created_at)),9,E0)])])]),e.createElementVNode("p",B0,e.toDisplayString(S.display_content.description||"--"),1),e.createElementVNode("div",V0,[e.createVNode(b,{theme:"primary",size:"small",onClick:T=>s("select",S.id)},{default:e.withCtx(()=>[...y[6]||(y[6]=[e.createTextVNode("选择",-1)])]),_:1},8,["onClick"]),e.createVNode(b,{size:"small",onClick:T=>w(S)},{default:e.withCtx(()=>[...y[7]||(y[7]=[e.createTextVNode("体验",-1)])]),_:1},8,["onClick"])])]))),128))]),v.value.length===0?(e.openBlock(),e.createBlock(ht,{key:0,"is-search":c.value.length>0,title:"暂无智能体",onClear:y[1]||(y[1]=S=>c.value=[])},null,8,["is-search"])):e.createCommentVNode("",!0)])])}}}),D0=te(N0,[["__scopeId","data-v-f0779642"]]),T0={class:"big-model-card"},M0={class:"card-header"},S0={class:"model-info"},L0={class:"model-name"},P0=["title"],O0={class:"version"},F0={key:0,class:"new-tag"},R0={class:"other-info"},z0={class:"other-info"},I0={class:"model-desc"},$0={class:"tag-list"},U0=e.defineComponent({__name:"big-model-card",props:{card:{}},setup(t){const n=t;return(o,a)=>{const r=e.resolveComponent("bk-tag");return e.openBlock(),e.createElementBlock("div",T0,[e.createElementVNode("div",M0,[a[0]||(a[0]=e.createElementVNode("img",{src:"",alt:"",class:"model-img"},null,-1)),e.createElementVNode("div",S0,[e.createElementVNode("div",L0,[e.createElementVNode("div",{class:"name-text",title:n.card.name},e.toDisplayString(n.card.name),9,P0),e.createElementVNode("div",O0,"线上版本:"+e.toDisplayString(n.card.version),1),n.card.isNew?(e.openBlock(),e.createElementBlock("span",F0,"new")):e.createCommentVNode("",!0)]),e.createElementVNode("p",R0,[e.createElementVNode("span",null,"基座模型: "+e.toDisplayString(n.card.baseModel),1),e.createElementVNode("span",null,"激活参数: "+e.toDisplayString(n.card.size),1),e.createElementVNode("span",null,"任务阶段: "+e.toDisplayString(n.card.taskStage),1)]),e.createElementVNode("p",z0,[e.createElementVNode("span",null,"更新人: "+e.toDisplayString(n.card.updateBy),1),e.createElementVNode("span",null,"更新时间: "+e.toDisplayString(n.card.updateTime),1)])])]),e.createElementVNode("p",I0,e.toDisplayString(n.card.desc),1),e.createElementVNode("div",$0,[e.createVNode(r,null,{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode("tag1",-1)])]),_:1}),e.createVNode(r,null,{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode("tag2",-1)])]),_:1})])])}}}),j0=te(U0,[["__scopeId","data-v-8a0aed6d"]]),G0={class:"small-model-card"},q0={class:"model-name"},H0={class:"name-text"},W0={class:"en-name"},Y0={class:"extend-info"},Z0={class:"model-desc"},Q0=e.defineComponent({__name:"small-model-card",props:{card:{}},setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createElementBlock("div",G0,[e.createElementVNode("div",q0,[e.createElementVNode("span",H0,e.toDisplayString(n.card.name),1),e.createElementVNode("span",W0,"("+e.toDisplayString(n.card.enName)+")",1)]),e.createElementVNode("p",Y0,[e.createElementVNode("span",null,"依赖历史数据长度 : "+e.toDisplayString(n.card.dataLength)+" 天",1),e.createElementVNode("span",null,"数据频率:"+e.toDisplayString(n.card.frequency)+" 秒",1),e.createElementVNode("span",null,"发布人:"+e.toDisplayString(n.card.publisher),1)]),e.createElementVNode("p",Z0,e.toDisplayString(n.card.desc),1)]))}}),J0=te(Q0,[["__scopeId","data-v-98fa588c"]]),K0={class:"model-plugin-group"},X0={class:"top-operate-area"},e2={class:"search-area"},t2={class:"mode-content-area"},n2={class:"card-list"},o2=e.defineComponent({__name:"index",setup(t){const n=[{id:1,name:"DeepSeek",version:"V1.0.1",isNew:!1,baseModel:"DeepSeek-R1",size:"51B",taskStage:"SFT",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然表程序中的对象。",updateBy:"harokoyang",updateTime:"2025-05-05 10:41:00"},{id:2,name:"DeepSeekDeepSeekDeepSeekDeepSeekDeepSeekDeepSeekDeepSeek",version:"V1.0.1",isNew:!0,baseModel:"DeepSeek-R1",size:"51B",taskStage:"SFT",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然表程序中的对象。",updateBy:"harokoyang",updateTime:"2025-05-05 10:41:00"},{id:3,name:"DeepSeek",version:"V1.0.1",isNew:!1,baseModel:"DeepSeek-R1",size:"51B",taskStage:"SFT",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种dfafasdfasd",updateBy:"harokoyang",updateTime:"2025-05-05 10:41:00"}],o=[{id:1,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"},{id:2,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"},{id:3,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"},{id:4,name:"时序异常检测模型",enName:"Time Series Anomaly Detection Model",dataLength:35,frequency:60,publisher:"harokoyang",desc:"指由许多松散连接的小部分构成的程序。馄饨式代码可以和面条式代码作类比,后者用面条来代表程序的结构,而前者用馄饨(Ravioli)来代表程序中的对象。这种代码虽然,(Ravioli)来代表程序中这种代码虽然.这种代码虽然.这种代码虽然,这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然.这种代码虽然表程序中的对象。"}],a=e.ref("big"),r=e.ref(""),i=e.computed(()=>a.value==="big"?"搜索 模型名称、基座模型、任务阶段、更新人、tag":"搜索 模型名称、发布人、描述");return(s,l)=>{const c=e.resolveComponent("bk-radio-button"),d=e.resolveComponent("bk-radio-group"),u=e.resolveComponent("bk-select"),v=e.resolveComponent("bk-input");return e.openBlock(),e.createElementBlock("div",K0,[e.createElementVNode("div",X0,[e.createVNode(d,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=k=>a.value=k),type:"capsule"},{default:e.withCtx(()=>[e.createVNode(c,{label:"big"},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("大模型",-1)])]),_:1}),e.createVNode(c,{label:"small"},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("小模型",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",e2,[a.value==="big"?(e.openBlock(),e.createBlock(u,{key:0,class:"order-select"},{prefix:e.withCtx(()=>[...l[4]||(l[4]=[e.createElementVNode("span",{class:"order-select-prefix"},"排序",-1)])]),_:1})):e.createCommentVNode("",!0),e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":l[1]||(l[1]=k=>r.value=k),class:"search-input",placeholder:i.value,type:"search"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",t2,[e.createElementVNode("div",n2,[a.value==="big"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(n,k=>e.createVNode(j0,{key:k.id,card:k},null,8,["card"])),64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(o,k=>e.createVNode(J0,{key:k.id,card:k},null,8,["card"])),64))])])])}}}),a2=te(o2,[["__scopeId","data-v-cd4ca0c5"]]),r2={class:"plugin-group"},s2=e.defineComponent({__name:"output-plugin-group",setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",r2,[e.createVNode(ht,{title:"暂无结论输出插件"})]))}}),i2=te(s2,[["__scopeId","data-v-474d5047"]]),ka="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAYAAAA+VemSAAAABmJLR0QA/wD/AP+gvaeTAAAdWElEQVR4nO3de3wU5b0/8M/32Q0J14oCu0GtP2yxSq5A6gWtLZJNIAEFQbRWba2VSz21PbUX7al9pbYee3rxVuVmEY/UC6ilFgiQS6MtpV4QkmyCaOpRj5pkAyiKkMvuzvf3B+CJYTfJ7s7ss7Pzfb9e/MHO7jOfwH4yszszzwBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCOAjpDpCuKlsOjBrSGbrEAC6AQh4M/iwBo4loKIMPAggA3ALQyy4jXHVJwamv6c4s7EcKbKIKZnWRv+NSJr4BQAmAIYN9LQENYFr2vmv/IwtzcnqsSynSiRTYBMxM1c2BqwhcAaazEhzuTVb4XkmO9y+mhBNpTQqcoJr6fWexO/QHMH3JzHEZWHlQHbhZx9a4rrljRDjM4wAgzPxxaYG3I9kZxOBIgRNQ3RS4DszLAAy3aBVVww8F506bdnqnReMDAKqbWz8Lw7UQbMwAURGAMX2echiAn4ieDxNvKM3xvmhlHjF4UuA4VDCrC5va/wugH1i9LgI2bs/1zK0gMsweu8rfWkSsbgdhNgAVw0sbiXDXjBzPOiJis3OJwZMCx4iZqaYp8AcA30zian/qy/PeadZg2/fuG9nZE/4dCDcgtuJ+CgM73Eb4m/INuj5S4BhVNbX9jpi+n+TVdlPYlV9cOPb1RAeqbWidYij1JICJJuQCgMOk+BvFOdlPmzSeiEHcv32dqLqx7XoN5QWATHaF70hkAGaman/7dwyldsC88gLAcDZoXU1jYJGJY4pBki3wIFXt6ZhIYaMewDBNEcLKZXxuxqTxb8f6wq3N75zsMjJWA5hrQa7jDFJ8pWyJk0u2wIPAzERhYxX0lRcAXEZYXRPri2r9gWkuI2M3rC0vACg26JFqf+s5Fq9H9CIFHoSapo55AL6iOwcYcwb71ApmVeNvv80APw/gsxam6m04oJ6se/PNrCStz/FkF3oQavzt9QwU6M4BIOge0Tlq+oQJXf09qcYf8BjgtQT4khXs03i5Ly/725aNzkw1e9pOR0iNJ6IRhkKnQRQY0zn27aIiClq13lQkBR7AtsbWixWp53Xn+AQj35fv9UdbXNMYKGbitQC8SUx1IqIFvlzPM2YNV/da65hQj/oqA3MIOB/AyAhPCxKokWHUKagNl+SO+2e6H6eWAg+gxt/+EAPf0p3jOAKVFOd5qvs+XlfH7vCYwM8ZuBWp8dHoYCjEk2dNzn4rkUEqd7WNzRhCPwPjWwBi3TXfS0z3vu/avyZdLxBJhf/olMXMxMBs3Tl6CxOf8Cbe5n/v9NCYwHMM/ASp8396kttNT+zcyRnxDlDV2HZFRgbtBePfEHt5AeBsJl4x2jhlb1Vz+6Xx5khlqfKfnZLqGlvPgu5d0T6Iqbv336sb2y9TcNUDuFBTpP6cfzCr4xfxvLCqqe0OIloP4GQTckwgA89W+9v/WNlyYJQJ46UMKXA/DOUq1J2hL4MQAIDKlpbMKn/7fSBsgDlvcksw8w+r/IGSWF5T42+/k5hutyDO1zK6gi/U+gOfs2BsLaTA/WDGBN0Z+ggHu8ItVXs6JmZ0jdpBwM1I/e8xFIEfrWvuGNSeTHVT4LpjHwWsco4B3v7X5rYcC9eRNFLgfjBotO4Mn0YNWUPUXAobrwA8RXeaGHhChrG2grnf91tNY+DMY5dnWs0bNqimpjFwZhLWZSkpcD8UGS7dGT6NPwfCY4h8CCXVFV/UFPhxv88gvhfWXVvdl5eJN9v9M7EUuB8MdUh3hj4+oztAIhi4o9YfmBZpWW1z27mMwZ9pZpKzM7qCq5K8TlNJgfvF7+hOkGbcBvjxTY1vn/DRxDDoZh2BAFxZ7W9bqGndCZMC94NhNOrOkIbOyKLM1b0f2LHjnaGw/mKL6Jju2dbQnqxdd1NJgftxcnd2A4CPdOdINwzMq2pqu+n434+MHHIRkvfZ90SE8YrwHW3rT4AUuB9FRRQEYZPuHOmImH67tSlQAAAMPld3HhC+V9nSkqk7RqykwAMwDGOl7gxpKsvF/GRdc8cIIvq87jAAPEO6RurbjY+TFHgApfnj/wYgda5GSi9nB8P8ADP3ncZWC2ZcrTtDrFL9LJ6UsLUpUOBifhlA3Cfmi359BCAVjsd2BrMOjS6bOLF74KemBtkCD8LMXE8DwP+hO0caS4XyAsDQzK5RU3WHiIUUeJB8edm/YUA+D6c5JiPlLmDpjxQ4Br5cz1Iw7tGdQ1jHAGx1pZIUOAZExL587/cZdB3k+HBaIj7hvlApTQoch5I8z1oVdk8C+FEAYd15hHmI1FDdGWIhBY7TjMIx7/nysr9OTGcR8J8gTvi2J0I/NjikO0Ms5DCSieoa3j0tpFwFAJ0J8CSAFkF+SdoL4QFfrtc2p1XKm8tE0wtOe9eXl72ZFLcBdBXk39eO3tAdIBZu3QHSSd2bb2aFPs66mw1aqjuLiBNzve4IsZACm2RbY+vZoY/VOgD5urOIuHUOPxR6UXeIWMgunglqmtq+rkjthJTX5njLtGmnd+pOEQvZAiegrrljRMgIL2Oma3VnEYljxuqBn5Va5FvoOFU1dxQSh9eB6SzdWYQp6otzPVPsdi8l2YWOQ3Vj27+RYfxTyps2mIi/b7fyArILHZNNjW+PzqLM1QzM051FmIjwYHFudp3uGPGQAg9SrT8wzQA/zsAZurMIUz3/AR24RXeIeMln4AFUMKsL/YEfgfALyC+8NMPbg1lDyssmnmLbC1OkwP2o8Qc8fPSChZhuziVsYY17ROe3p0+Y0KU7SCJkixJFVUP7DAb/ESl2e1GRsD2k1C3FOeO26g5iBtkC91FXx+7QmEAFgNsg39LbQRADz1XWDaCamFZvzxv3lwoiIwm5kkIK3Ms2/3unK6jHAbpIdxYxaP+CgWvhorMIxucYdHSPycARAr1jMDdkuNWL03PGfaw5pyWkwMdUNbdfSgYeBnCK7iwiZut9ed4rdYfQwfEF3rmTMw5mBn7D9rhZtoiGsMiX631Id4xkc/QbduPO1mFZmfQngEp1ZxEJ6wTjPF++1687SDI59kuaujp2Z2Wqp6S8aWMoCOvsepfBeDm2wMGx7f8FoEx3DmGqc4joQd0hksmRu9A1TW3TmakWDv350x7R1325nkd1x0gGx22B169nl2HQ7yHlTV/My7Y1tp6tO0YyOK7AJ08KXEGEHN05hKWGK1Lrdux4x1ZzPMfDcQUGy4RzDpF/eFTGvbpDWM1Ru5FVe/eNp2D4XTjs53YyAq4qzvOu053DKs7aAgeNGZDyOgoDq7Y2d3xedw6rOKrAxDxFdwaRdKPcBj9Z2dKSqTuIFRxVYBDS9jexiI7BU91dI3+tO4cVnFVguVDBsQj4TpU/kHZzmTmrwOywn1f0RgpYXbunNa3mNHPUG5pJbsrtZAwebYTVkzt38kATANiG06bU+V/dAQbpbQIaAfwPA/uYj96zlghDCXQqAxMBFAL4jNaU9nT+B5kddwL4ke4gZnBUgQlo0J0hCgbwHAhPuMOhLdMLTnt3oBdUMKvzmzvyFHO5AhYyUJCEnGmCf1DV2PZcSX52pe4kiXLUMdEafyCfwalU4jARrWUO/9qXN/7VRAaq8rcWAeoWAhbCYR+N4rQ/7HLlz5w0tk13kEQ4qsAAUO1vbwH0H05i4CWDaNHMXI+pv1C2NbTnKoV7ABSbOW6asv1UPI77Tc3Mf9AdAYRfZez3XGh2eQGgtMDb5Mvz+sD8TQBpOZGbia7Y1tx+nu4QiXBcgTPCWSsJ9IGm1YeJ+Hpfrve26dMpZOWKfPnZawDjXAAtVq7H5ojC9APdIRLhuF1oAKjxt9/MwH1JXi0T8fXFudn/PdATV27cOYzVkCIizjHA2QQMASNI4HaD1KtDgpkv33DZ2YcGs9K611rHhHpc2wA5jTSKILlD2cXnnHZAd5B4OLLAFczqwqbAXwF8OVnrZOCukjzvT6IuZ6aHtvhnGsSLwVwKIKuf4UIA/kZMT8AIPr54TtGR/ta9tfmdk11GxvMAcuNLn94YdF1Jnmet7hzxcGSBAaC2fv+phitUD2CM5StjvOg+4Lko2m7zsk2NUxUZy0A4N/ahsQ+Eu9TY0AOLi4qC0Z5Xu6f1DCOsXgYwNtZ1pD3CKl+ud7HuGPFw3Gfg42YUjnkP4G/g6DFYKxlwqaXRyrtyS8PNShn/jKe8AEDAWGLczQH3yysqd02K9rwZk8a/DaJrYf3PazvM9t0zcWyBAcCXl72Zie+xeDVP+XLG7Y60YGVl/e3MfB8GvrfPwAgFgHpx5dbd5dGe4sv1bCNgdcLrSjMEnKo7Q7wcXWAAOEjv3wbg5WN/3Q/m3QBqADzPjGYcvTFW3Igp4pdly7c0XMXAHYmMHcEINmjD8s31s6M9oSfIPwHknPA+RugOEC/HfgburcYf8FDY5T66W/1pdXXs7jmlrUApNYuY5jJ4agxD/8uX553Y98GHK3eN7YF6DcDoRHL34zCxumBxeX7EuxRUN7XfBcatFq3bjtp9ed5s3SHi4ahzoaMpzvMEoi079tn1lWN/flm7p/WMcFjNJWAegIsAuKK9loGI59r2sOuHILaqvAAwnMl4fP365qkLF+b09F3oDoceDCn3D9FPdofZrztAvBy/Cx2rGZPGv12S573Pl+f9SjDI2QR8C8AmACfc6V0R/tn3sYq6OjeIr09C1NwDI4M3RVpw7GKJuiRksAl+XXeCeEmBE1A2JXtfcZ53tS/PO2dohmscwFcy8CSOfcaksHHCG8PTedJ5SMahKwDE+OH69c1DIi4DNiYjgx0Q4UXdGeIlu9AmuejssYcArAewvrKlJTOzc8QlRjDrjROfSZOTGCv7/eE9swA8e0IKw9jOSn5/AwBYbdUdIV5SYAuUTZzYDWBLpGVEPB6cxO8OicoQocDdww43Z3SNNODwvTBmNPvyPY26c8RLCtzH/ZUvjMrgrIsVUT4TjycDbiYEmOhVRcHnF88sSuz6UTbhmG8MiBDxW/OyiRO7q/3t+wB4kpkn1SjQ/bozJEIKfMzyyvrJBPwYwFwQMhkMMD7ZWBIzmN28orLhBQI/YxA/s3TW5LdiXhGr90HJOxmKGaf1s/gjOLvA//O+a/8jukMkwvEFfnRbw/DOEP+OgRsx8O4kAXwBAxcQ029Xbql/BcDTHOJnlsyZPLjL9hS/luSTGfvb4jv5MBKTUjctzDnxMJudOLrAK7fuzD4S4i1HT0OMHTOmApgKF921YnN9AxGeYRjPLCmbsifqaxRtpzAn87PnwWgLCDSanXpqNOPe4pxxtv3y6jjHnom1bFPjaJfifzD4HLPHJtCrBvhpUsYzS2ZOOWHWjRWV9bUALjF7vRExNi8pLzzh1Mq63R+cFHJ365rYQLdN7v2eeVZPqpAMjv0G0qXCj1hRXgBg8DkE3A5D1a+srG9Zvrn+rhWbdxV9spxh9QUU/4fouUgPB1V3LKeEppM/B7MOLUiH8gIOLfCKyoYFDLo0Geti4PNEuBWkXl5RWf/m8sr635IyDgCoTcLqe4Lu8OORFpDC9CSsP5UYAO784FXPgmOH+dKC43ahmZlWbmlohP7ZKToBWHsHeaZlS8oLTjidkpmppinwOlJgds4kCRybdaNKdxCzOe5LrOVbGs9T+ssLWFxeBlozXO7bIy2r3bOvFE4pL6HWTeqa6Tnj2nVHsYLjdqEJvEB3hiToUoQrvzUz5/2+C5iZOGxUaMiUbCEAP/1HjqckXcsLOKzAzEwEzNedw2KHFdTli2cVbo+0cGt9+xkgDuLoZ8J09Q4ZxiW+PO+dFUTp/HM66zPwqi27v2gwvaQ7h4X8xOpr0S7k763utdYxoaCrDMxXACgBEPGqJbshYCPcoevtOk1srBz1GZiZ0nX3+XUw7iFPaHV/M1P2Nv0L4/cDeBTAo5sa3x49BEOKiTAHoHmw5xQzIYDv3J7rvSPdt7q9OavA4PlpuNMRBqiBwe8PO5AxBMCgCtzb7PwzPgDwFICntjW0D1eKy8G4HkSlsMc/2BsM46qSvPE7dQdJNjv855hi5daGKWzwK7pzWKwLQA1AT1FG8NnFvqIPExmsurljMoWN3zIl6ayx+KwLZmUsKpt4iiMn6nNMgVds2f2fYLpNd44k6mamvxOwid14YmlpQUc8gzAz1fo7FjHxvej/bhHJ1gnCd3253od0B9HJOQWurN8L4Au6c2gSBvACmJ4Kw73upvKcmA+rVDe0nw+FTQBOMT9ezPYYBq4sLfA26Q6imyMKvGLrrgIYql53jhTxSZnJFVwfywQF1c0dk2EYzwEYZVm6gT3c1W18Z07R+H7vB+UUzihwZf3PAfxMd44UFGbQdsB4TIXDjw10kzQAqPa3lQO0Ecl/7xwCY4kv3xvx3G6ncsqJHOl6+ChRLgJ/mUCr2OV+Y0Vlw3UDvcCXl70ZwANJyNYL7WKXmirlPVHab4GP3vBLNevOYRvMT2QOO+mb10+fcMI818dVthwYldEVbAEwzvI0wO9DWYd+lE5XEJnJAVtgJVvfWBB9tbvzwz9Hm08aAMomnvIRM99tcZL3wZhXkuf9rpQ3OgcUWHaf41B6YETPvf09QWWE/4AEb/wWDQM7oIzJvnzvCdPhik9L6wKv2lx/FoA83TnsiEBLV23dVRxt+bFzjatNXq3BwF0Z+z1f9uWM/1+Tx05LaX0qJRMt6HU/63fBaGDFbcRkMGgEgc8GkI80/3eIl2GoXwOYEvUJhFowot7KNEYBAl3ry/OY/UshraX1G9cASojpN6DwI9FmilyzYfdJXZl0OQHfg2yt+5q8bGvDl749s+DvkRZS2HjFlNuzpPlF91ZK22+h169f7/pg6JmjF88pGtStIysqWHm/2LAIhN/AnlfjWIIZ9y8tL/xupGW19ftPNVyhdxMYPgSg4h+5nrucdAWRmdK2wPFavqkhlxRvAfq9o4GT7FpSVhhxBsujVy7h4zjHfQdKXe3LGRdx4gExOGn9JVY8ls4uaAqr8HQAcZ38n4Ymmj0gARvJHZos5U2cFDiCm2ZO/RcZuArpPe3MYI2sqOCI7xPKdH0mxrF6QPj3Gbmey5wyY4bVpMBRLJ5dWAemFbpzpIBQRUWUz6chY0IM47zBMC705XrvJUri3d3SnBS4H+zGzwE4+qoXAt6Luow5+iGmXhh4MpiVMcWJM2ZYTQrcj6WlBR1gPKE7h04M7O5n8UAzdXSCsKgkz/tVp86YYTUp8ACUy3hSdwadCBTxbgYbd7YOA+Dr56V7CXS+02fMsJoUeABdxsi/4+hcU05khNi9IdKCrEzXTADDI7+M1xoGiorzPI0WZhOQAg/o5rKJ3QCi3u83rTH+EW36HQLPi/DwIWK6xpeXfV1pgfewxekEpMCDw3hLdwQdSNHTkR7fuZMzACrv8+xd7FJTi/M9jyUjmzhKCjwYhISmZ7UpVow/RVpwcOi+GQwe/ckDhFXBrI+mlUwa15K0dAJAml/MYB52Oe+sU3rhxrKCiOc5MxvHd58/ZOYbS/Kyn0piMNGLbIEHhU7WnSDZCPxMpMcrmBUYlzLwkmFgckm+lFcn2QIPzpm6AyQZGxS5wBc1tl1oKLX+5G7PD4qKKObbuAhzSYEHsPrZvSOD6HLYhPD0ytJZhW9FWuIa1f1y8YQJEa8PFsknu9ADCGZ0fwWAS3eO5OKI3z4DwPQJ0WerFMknBR4QX6k7QbKFVTji7rNIPU77ajUmDz3r94Qzwm8htW7qZbX6JWWFk3WHEINj+y3wmro3LStXOMO4Fc4qL8CQra+N2L7A3Z0f3mNFiZdvasgF+Cazx0115FZRP/+K1GPrb6Hvr3xhFIDruzoPvgvgTrPGXVP3ZlZ354drAWSYNaZNNC8uzd9bUcHKc179xWD4iKmAFLwAwIxDDH6VoP7ag2Ebj50nLjSy9Wfg5ZW7v0agPwLoZoWLl84sfCnRMSsqWHnPa3gCjIUmRLQXxi8J9DYT34YBjn0zsI+A3/Vg+L1SZH1sXeAVlfUbAMw99td2g+gr355V8Fq8463cuTODO9xrAHzNlIA2w0ArAeNjfJk/rMKX3zRz6r8sCSX6ZdsCP1jXPMLVGewAMLTXwx1EmL94VmHMsx0+uM1/uisUfgyEL5mX0hkY2KdYzVhcnu/XncVpbFvgFZX1VwKINFtGiIH7srr5l9fPm3xwoHHuXr9j6LDhw5aC8DMAsc6yKP7Pu+yiqUtLC2Q63iSy8ZdYvCDK7x83Abd0Z9KNKyrr/5sMbACHXux99/kH65pHqM7QuQTjUgDXADglWanT2GkqbDwE4DLdQZzEllvglRt3DmOXex+AYYN8CQNoB9B57DUe2PRnT3UElC4uK4w4j5Ywny2PA7MrowyDLy9wtKzZOPrNqhdSXssw8GPdGZzElgUm8HzdGURU0x/YvOsM3SGcwnYFvnv9jqEM0+5JK8xHGeQq0x3CKWxX4OEjhpZCbv+Z0gzgPN0ZnMJ2BWbQAt0ZRP8IOEt3BqewVYHvr2zJhOw+24AxTncCp7BVgYfwxxdDTrZIeQSy8fkF9mKrAoPoAt0RxMAY+Fh3BqewV4EZsdyPVugT9Zakwly2KjARRurOIAbGgFzUkCS2KjCD5YZZNqDAMV8NJuJjqwID9JbuBGJAR9zBobW6QziFrQpMihOecUNYjZ++4bKzD+lO4RS2KjCC4TrIN5xmGPA66TgxFN9t0dgiAlsVePGcoiNgelR3DnvjA8T8U4sGf3zJzCkNFo0tIrBVgQEg7Fa/AnBkwCeKyJj+fPhw58Mw+VAPA/tcQdctZo4pBma7At9UmvcOEd2mO4d90dPfXzitE6DvmThoGIRrb7wsL2DimGIQbFdgAFg0M//3AMuudOw+OPmw+68AsKSs4GkwLTNhTAOMG5fOKtxmwlgiRrYsMBFx+9CDNwBYozuLnTDoLwsX5vQc//vJh1+7mQhrExiyE8DVS8oL5f9BE9tPLbO8cveNBPo1gJN0Z0l1zJiztLxw06cfY1q1teHHzPg5gCExDLeLWH1DppLVy5Zb4N6Wlk1+iMKhiWD8koFW3XlS2IdBGl7d90Ei4sWzCn9lEOUDWAcgNMA49cy4rv2lgi9KefWz/Ra4t4oKVtnnNUxj5gUAzQdwmu5MKeSxJWWF1wz0pAc3N3vdqqeUGZNBlA0mYhj7FaMZblft4tL8vckIKwYnrQrc16qt9TnhMF9BRFcDmKg7j1bMc5eUT35WdwxhrrQucG+9ynwVgC/ozpNkHx/5+Mi4o4ePRDpxTIF7O15mRWohg8/RncdyzE8sKZ98te4YwnyOLHBvn5RZ0WxmTNWdxwrMtGBpecEzunMI8zm+wL0t29R4piKeA+IrAFyoO49Jjgxz0bjrSgvkWuo0JAWOYvmW3f+PDHXZsTJPg23/reipJWUFzrtZuUPY9E2ZXA9s3nWGG665Ni3zVUvKCtfpDiGsYac3Yko4eiNw4/JjZb4AqX0yTFdGMGucXGCfvqTACVi+sf5U5ab5zMZ8gC5C6pX5z0vKCufpDiGsIwU2yYObm70u1XM5mOYD+DIAl+5McvJG+pMCW+Dhyl1jg6TmMWM+gEsA6LhTQVP7SwUFFRVkaFi3SBIpsMUeqHnxFFdP5mUEmg9wMWK74idehoJxyaKyKc8nYV1CIylwEq3ZsPuk7kx1KcALAPgAZFmxHgZ+sbSs8GdWjC1SixRYk/srXxiVyZmzmWgBgJkAhpoxLgEPLJpVcDMRsRnjidQmBU4Bj25rGH44xOVEtADgMgDD4ximC0y3LikvuM/sfCJ1SYFTzMqNO4ex2z0TBi8A0WxgwPtBhQH6k2L+6aLywteTkVGkDilwCltT92ZWd+dHPgKXMKMAhFOPLTpCwGsg+pti/OnGsoJ3tQYVQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEHH6/wXOXW9gEVklAAAAAElFTkSuQmCC",l2={class:"bkflow-plugin-group"},c2={class:"plugin-content-wrapper"},d2={class:"tags-list"},u2=["onClick"],p2={class:"plugins-list"},f2={class:"plugin-icon-wrapper"},m2=["src"],v2={class:"plugin-info-wrapper"},h2={class:"plugin-name"},g2=["title"],w2={class:"managers-text"},y2=e.defineComponent({__name:"bkflow-plugin-group",props:{bkflowPluginTags:{},activedTag:{}},emits:["selectBkflowPlugin"],setup(t,{emit:n}){const o=at(),a=t,r=n,i=e.ref([]),s=e.ref(a.activedTag||0),l=e.ref([]),c=e.ref(!1),d=[{id:"name",name:"插件名称"}];e.onMounted(()=>{v()});const u=h=>{s.value=h,v()},v=async()=>{if(c.value=!0,l.value=[],s.value===0){const h=await o.fetchBkFlowInnerPluginList();l.value=h.map(p=>({code:p.code,name:p.name,logo_url:ka,desc:p.desc||"--",managers:["BkFlow"],version:p.version}))}else{const h=await o.fetchBkFlowThirdPartyPluginList(s.value);l.value=h.map(p=>({code:p.code,name:p.name,logo_url:p.logo_url,desc:p.introduction||"--",managers:p.managers,version:"1.0.0"}))}c.value=!1},k=h=>{const p=l.value.find(w=>w.code===h);if(p){const{code:w,name:m,version:g}=p;r("selectBkflowPlugin",{code:s.value===0?w:"remote_plugin",name:m,data:s.value===0?{}:{plugin_code:{hook:!1,value:w},plugin_version:{hook:!1,value:""}},version:g})}};return(h,p)=>{const w=e.resolveComponent("bk-button"),m=e.resolveDirective("bk-loading");return e.openBlock(),e.createElementBlock("div",l2,[e.createVNode(Mr,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),options:d,placeholder:"搜索插件名称"},null,8,["modelValue"]),e.createElementVNode("div",c2,[e.createElementVNode("div",d2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bkflowPluginTags,g=>(e.openBlock(),e.createElementBlock("div",{key:g.id,class:e.normalizeClass(["tag-item",{actived:s.value===g.id}]),onClick:y=>u(g.id)},e.toDisplayString(g.name),11,u2))),128))]),e.withDirectives((e.openBlock(),e.createElementBlock("div",p2,[l.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value,g=>(e.openBlock(),e.createElementBlock("div",{key:g.code,class:"plugin-item"},[e.createElementVNode("div",f2,[e.createElementVNode("img",{src:g.logo_url||e.unref(ka),alt:"plugin-icon"},null,8,m2)]),e.createElementVNode("div",v2,[e.createElementVNode("h4",h2,e.toDisplayString(g.name),1),e.createElementVNode("p",{class:"plugin-desc",title:g.desc},e.toDisplayString(g.desc),9,g2),e.createElementVNode("div",w2,e.toDisplayString(g.managers?g.managers.join(","):"BkFlow")+" 提供",1)]),e.createVNode(w,{theme:"primary",size:"small",onClick:y=>k(g.code)},{default:e.withCtx(()=>[...p[1]||(p[1]=[e.createTextVNode("选择",-1)])]),_:1},8,["onClick"])]))),128)):(e.openBlock(),e.createBlock(ht,{key:1,title:"该分类暂无插件"}))])),[[m,{loading:c.value}]])])])}}}),b2=te(y2,[["__scopeId","data-v-cfe8bec9"]]),k2={class:"plugin-select-slider"},C2={key:0,class:"plugin-select-content"},_2=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1},flowId:{},actived:{default:""},bkflowTag:{default:0},pluginGroupList:{default:()=>[]}},emits:["close","update:show","select"],setup(t,{emit:n}){const o={data:u0,agent:D0,model:a2,bkflow:b2,output:i2},a=t,r=at(),i=n,s=e.ref(a.actived),l=e.shallowRef([]),c=e.ref(!1),d=e.computed(()=>o[s.value]||null),u=e.computed(()=>a.pluginGroupList.find(g=>g.name===s.value)?.properties||{}),v=e.computed(()=>a.pluginGroupList.find(g=>g.name==="bkflow")?.children||[]);e.watch(()=>a.show,()=>{a.show&&(s.value=a.actived,s.value!=="bkflow"&&k())});const k=async()=>{if(!r?.fetchCategoryPlugins){console.warn("fetchCategoryPlugins is not provided in api");return}c.value=!0;try{const g=await r.fetchCategoryPlugins(s.value),y=a.pluginGroupList.find(b=>b.name===s.value);y&&g.forEach(b=>{b.category_id=y.id}),l.value=g}catch(g){console.error(g)}finally{c.value=!1}},h=g=>{s.value=g,g!=="bkflow"&&k()},p=g=>{const y=l.value.find(b=>b.id===g);i("select","projectPlugin",y)},w=g=>{i("select","bkflowPlugin",g)},m=()=>{i("close"),i("update:show",!1)};return(g,y)=>{const b=e.resolveComponent("bk-sideslider"),f=e.resolveDirective("bk-loading");return e.openBlock(),e.createBlock(b,{title:"节点选择","is-show":a.show,width:1200,"esc-close":!1,"before-close":m},{default:e.withCtx(()=>[e.createElementVNode("div",k2,[e.createVNode(Jf,{actived:s.value,"onUpdate:actived":y[0]||(y[0]=_=>s.value=_),groups:a.pluginGroupList,onChange:h},null,8,["actived","groups"]),a.show?e.withDirectives((e.openBlock(),e.createElementBlock("section",C2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{plugins:l.value,"bkflow-plugin-tags":v.value,"actived-tag":a.bkflowTag,properties:u.value,onSelect:p,onSelectBkflowPlugin:w},null,40,["plugins","bkflow-plugin-tags","actived-tag","properties"]))])),[[f,{loading:c.value}]]):e.createCommentVNode("",!0)])]),_:1},8,["is-show"])}}}),A2=te(_2,[["__scopeId","data-v-043824f1"]]),x2={class:"flow-canvas-container"},E2=e.defineComponent({__name:"index",props:{mode:{},flowId:{},pipelineTree:{},spaceFlowConfig:{},systemVariables:{default:()=>[]},pluginGroupList:{default:()=>[]}},emits:["change"],setup(t,{expose:n,emit:o}){const a=t,r=o,i=e.ref(),s=e.ref(),l=e.ref({show:!1,nodeId:"",edgeId:"",condition:null,hasDefaultBranch:!1,isDefault:!1}),c=e.ref({show:!1,node:null}),d=e.ref({show:!1,actived:a.pluginGroupList[0]?.name||"",bkflowTag:0,node:null}),u=C=>{const A=a.pipelineTree.activities[C.id];A&&(c.value={show:!0,node:A})},v=C=>{const A=a.pipelineTree.flows[C.id];if(A){const D=a.pipelineTree.gateways[A.source];if(D){const F=!!D.default_condition&&typeof D.default_condition.flow_id=="string";l.value.hasDefaultBranch=F,l.value.nodeId=A.source,l.value.edgeId=C.id;const{default_condition:I,conditions:G}=D;I&&I.flow_id===C.id?(l.value.condition=I,l.value.isDefault=!0):G&&G[C.id]&&(l.value.condition=G[C.id],l.value.isDefault=!1),l.value.show=!0}}},k=(C,A)=>{const F={x:a.pipelineTree.location.find(G=>G.id===C).x+200,y:b(C,A)},I=`node${qe()}`;_(C,{id:I,type:A,position:F,data:{id:I}})},h=(C,A,D)=>{const I=a.pluginGroupList.find(Q=>Q.name===D).children.find(Q=>Q.id===A);if(!I)return;const{id:G,name:K,alias:oe,meta_url:ee,api_key:E="incident",category_id:U}=I,q={x:a.pipelineTree.location.find(Q=>Q.id===C).x+200,y:b(C,"tasknode")},W=`node${qe()}`;_(C,{id:W,type:"tasknode",position:q,data:{id:W,name:"",component:{code:"",data:{},version:""}}}),setTimeout(()=>{g(W);const Q=a.pipelineTree.activities[W];if(Q){const H={...Q,name:oe||K,component:{code:"uniform_api",data:{},version:"v2.0.0",api_meta:{id:G,name:K,alias:oe||K,meta_url:ee,api_key:E,category:{id:U,name:D}}}};c.value={show:!0,node:H}}},100)},p=(C,A,D=0)=>{const I={x:a.pipelineTree.location.find(K=>K.id===C).x+200,y:b(C,"tasknode")},G=`node${qe()}`;_(C,{id:G,type:"tasknode",position:I,data:{id:G,name:"",component:{code:"",data:{},version:""}}}),setTimeout(()=>{g(G);const K=a.pipelineTree.activities[G];K&&(d.value={show:!0,actived:A,bkflowTag:D,node:K})},100)},w=C=>{const{id:A,type:D,position:F,data:I}=y(C);f(A,D,F,I)},m=C=>{const{id:A,type:D,position:F,data:I}=y(C);F.y=b(C,D),_(C,{id:A,type:D,position:F,data:I}),setTimeout(()=>{g(A)},100)},g=C=>{const A=i.value.graph.getCellById(C),{x:D,y:F}=A.position(),I=A.getBBox().width,G=a.pipelineTree.activities[C];if(G&&G.outgoing){const K=a.pipelineTree.flows[G.outgoing].target,oe=i.value.graph.getCellById(K),{x:ee,y:E}=oe.position(),U=ee-D;if(U<I+50&&Math.abs(E-F)<40){const $=ee+I-U+50;oe.position($,E);const q=[...a.pipelineTree.location],W=q.findIndex(Q=>Q.id===K);W>-1&&(q[W]={...q[W],x:$},x({...a.pipelineTree,location:q}))}}},y=C=>{const A=`node${qe()}`,D=a.pipelineTree.location.find(K=>K.id===C),F={x:D.x+200,y:D.y};let I,G={};if(a.pipelineTree.activities[C])G={...a.pipelineTree.activities[C],id:A,incoming:[],outgoing:""},I="tasknode";else{const K=a.pipelineTree.gateways[C];I=K.type==="ExclusiveGateway"?"branchgateway":K.type.toLowerCase(),G={incoming:[],outgoing:Array.isArray(K.outgoing)?[]:""}}return{id:A,type:I,position:F,data:G}},b=(C,A)=>{const D=a.pipelineTree.location.find(G=>G.id===C),F=D.type,I=D.y;if(F.includes("gateway")){const G=a.pipelineTree.gateways[C];return Array.isArray(G.outgoing)&&G.outgoing.length>0?G.outgoing.reduce((oe,ee)=>{const E=a.pipelineTree.flows[ee].target,U=a.pipelineTree.location.find($=>$.id===E);return Math.max(oe,U.y)},0)+100:A.includes("gateway")?I:I-10}return A.includes("gateway")?I+10:I},f=(C,A,D,F={})=>{const I=A.includes("gateway"),G=i.value.graph.addNode({id:C,...D,shape:"custom-node",width:I?34:154,height:I?34:54,data:{type:A}});return G.setZIndex(a.pipelineTree.location.length),I?i.value.createGateway(C,A,D,F):i.value.createActivity(C,D,F),G},_=(C,A)=>{const D=f(A.id,A.type,A.position,A.data);setTimeout(()=>{B(C,D.id)},10)},B=(C,A)=>{const{activities:D,gateways:F,start_event:I,end_event:G,location:K}=a.pipelineTree,oe=K.find($=>$.id===C),ee=K.find($=>$.id===A);if(!oe||!ee)return;let E="";D[C]?E=D[C].outgoing:F[C]?E=F[C].outgoing:I.id===C&&(E=I.outgoing);const U=S(E,C,A);i.value.insertEdgesToCanvas(U)},S=(C,A,D)=>{const F=[];if(Array.isArray(C)){let I="Right";a.pipelineTree.gateways[A]&&C.length>0&&(I="Bottom"),F.push({id:`line${qe()}`,source:{arrow:I,id:A},target:{arrow:"Left",id:D}})}else if(C==="")F.push({id:`line${qe()}`,source:{arrow:"Right",id:A},target:{arrow:"Left",id:D}});else{const I=a.pipelineTree.flows[C];I&&(i.value.deleteEdges([C]),F.push({id:`line${qe()}`,source:{arrow:"Right",id:A},target:{arrow:"Left",id:D}},{id:`line${qe()}`,source:{arrow:"Right",id:D},target:{arrow:"Left",id:I.target}}))}return F},T=C=>{const A=[];if(a.pipelineTree.activities[C]){const D=a.pipelineTree.activities[C];A.push(...D.incoming),D.outgoing&&A.push(D.outgoing)}else if(a.pipelineTree.gateways[C]){const D=a.pipelineTree.gateways[C];A.push(...D.incoming),Array.isArray(D.outgoing)?A.push(...D.outgoing):D.outgoing&&A.push(D.outgoing)}i.value.deleteEdges(A)},V=C=>{i.value.deleteNode(C)},L=C=>{i.value.deleteEdges([C.id])},z=(C,A)=>{const D={...a.pipelineTree.gateways};if(D[l.value.nodeId]){const F=ve.cloneDeep(D[l.value.nodeId]),I=F.conditions||{},{name:G,tag:K,evaluate:oe="",loc:ee}=C,E={name:G,tag:K,evaluate:oe.trim()};ee&&(E.loc=ee),A?(delete E.evaluate,E.flow_id=l.value.edgeId,F.default_condition=E):I[l.value.edgeId]=E,!l.value.isDefault&&A?I[l.value.edgeId]&&delete I[l.value.edgeId]:l.value.isDefault&&!A&&F.default_condition&&delete F.default_condition,F.conditions=I,D[l.value.nodeId]=F}x({...a.pipelineTree,gateways:D}),setTimeout(()=>{i.value.updateEdgeLabel(l.value.edgeId)},10)},Z=()=>{if(!c.value.node)return;const C=ve.cloneDeep(c.value.node);let A="";C.component.api_meta?.category.name?A=C.component.api_meta?.category.name:A=a.pluginGroupList[0]?.name||"",d.value={show:!0,actived:A,bkflowTag:0,node:C},c.value={show:!1,node:null}},Y=(C,A)=>{if(!d.value.node)return;const D=ve.cloneDeep(d.value.node);if(C==="projectPlugin"){const{id:F,name:I,alias:G,meta_url:K,api_key:oe="incident",category:ee,category_id:E}=A;D.component={code:"uniform_api",data:{},version:"v2.0.0",api_meta:{id:F,name:I,alias:G||I,meta_url:K,api_key:oe,category:{id:E,name:ee}}},D.name=G}else{const{code:F,data:I,version:G,name:K}=A;D.component={code:F,data:I,version:G},D.name=K}c.value={show:!0,node:D},d.value.show=!1},P=(C,A)=>{const D={...a.pipelineTree.activities},F=[...a.pipelineTree.location],I=F.findIndex(G=>G.id===C.id);if(D[C.id]=C,I>-1){const G=F[I];G.name=C.name,F[I]=G}c.value={show:!1,node:null},x({...a.pipelineTree,activities:D,location:F,constants:A}),setTimeout(()=>{i.value.updateNodeData(C.id,C)},10)},x=C=>{r("change",C)};return n({updateNodeInputParams:C=>{s.value&&c.value.show&&s.value.updateNodeInputParams?.(C)}}),(C,A)=>(e.openBlock(),e.createElementBlock("div",x2,[e.createVNode(e.unref(Fc),{ref_key:"bkflowCanvasRef",ref:i,editable:a.mode==="edit","pipeline-tree":a.pipelineTree,onNodeClick:u,onEdgeLabelClick:v,onUpdatePipelineTree:x,onDeleteEdge:L},{customNode:e.withCtx(()=>[e.createVNode(tr,{editable:a.mode==="edit","plugin-group-list":a.pluginGroupList,onAddNode:k,onAddPlugin:h,onAddNodeAndSelectPlugin:p,onDeleteBtnClick:V,onCopyNodeClick:w,onCopyNodeAndInsertClick:m,onDetachEdgesClick:T},null,8,["editable","plugin-group-list"])]),_:1},8,["editable","pipeline-tree"]),l.value.condition?(e.openBlock(),e.createBlock(ef,{key:0,show:l.value.show,"onUpdate:show":A[0]||(A[0]=D=>l.value.show=D),condition:l.value.condition,"has-default-branch":l.value.hasDefaultBranch,"is-default":l.value.isDefault,editable:a.mode==="edit",onConfirm:z},null,8,["show","condition","has-default-branch","is-default","editable"])):e.createCommentVNode("",!0),c.value.node?(e.openBlock(),e.createBlock(Gf,{key:1,ref_key:"nodeConfigPanelRef",ref:s,show:c.value.show,"onUpdate:show":A[1]||(A[1]=D=>c.value.show=D),node:c.value.node,editable:a.mode==="edit","system-variables":a.systemVariables,constants:a.pipelineTree.constants,onSelectPlugin:Z,onConfirm:P},{inputParams:e.withCtx(D=>[e.renderSlot(C.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps(D)),void 0,!0)]),_:3},8,["show","node","editable","system-variables","constants"])):e.createCommentVNode("",!0),e.createVNode(A2,{show:d.value.show,"onUpdate:show":A[2]||(A[2]=D=>d.value.show=D),"flow-id":a.flowId,actived:d.value.actived,"bkflow-tag":d.value.bkflowTag,"plugin-group-list":a.pluginGroupList,onSelect:Y},null,8,["show","flow-id","actived","bkflow-tag","plugin-group-list"])]))}}),Sr=te(E2,[["__scopeId","data-v-6e746f31"]]),B2={class:"execute-flow-slider"},V2={class:"flow-name-wrapper"},N2={class:"form-params-wrapper"},D2={key:0,class:"sideslider-footer-buttons"},T2=e.defineComponent({__name:"execute",props:{flowId:{},show:{type:Boolean},editable:{type:Boolean,default:!0},showFlowEntry:{type:Boolean,default:!1},apiConfig:{},onExecuteSuccess:{}},emits:["confirm","close","update:show"],setup(t,{emit:n}){const o=t,a=n,r=_n(o.apiConfig),i={name:[{required:!0,message:"请输入任务名称",trigger:"blur"}]},s=e.shallowRef(null),l=e.shallowRef(!0),c=e.ref({}),d=e.shallowRef([]),u=e.ref(),v=e.ref({name:""}),k=e.shallowRef(!1);e.watch(()=>o.show,y=>{y&&h()});const h=async()=>{l.value=!0;const y=await r.fetchFlowDetail(o.flowId);s.value=y,v.value.name=`${y.name}_${lo().format("YYYYMMDDHHmmss")}`;const b=[],f={};Object.values(y.pipeline_tree.constants).forEach(_=>{if(typeof _!="object"||_===null)return;const B=_;B.source_type!=="system"&&B.show_type==="show"&&b.push(B),"value"in B&&(f[B.key]=B.value)}),d.value=b,c.value=f,l.value=!1},p=()=>{o.onExecuteSuccess},w=y=>{Object.keys(y).forEach(b=>{b in c.value&&(c.value[b]=y[b])})},m=async()=>{if(!r.createFlowTask||!r.executeFlowTask){console.warn("createFlowTask or executeFlowTask is not provided in api");return}if(await u.value?.validate())try{k.value=!0;const b=await r.createFlowTask({template_id:o.flowId,creator:"admin",name:v.value.name,description:"create by bkincident",constants:c.value});b.data.id&&(await r.executeFlowTask({action:"start",task_id:b.data.id,resource_type:"TASK",resource_id:b.data.id,permission_type:"OPERATE"}),un({theme:"success",message:"执行成功"}),a("confirm"),g(),o.onExecuteSuccess&&o.onExecuteSuccess(b.data.id,b.data.template_id))}catch(b){console.error(b)}finally{k.value=!1}},g=()=>{d.value=[],c.value={},a("close"),a("update:show",!1)};return(y,b)=>{const f=e.resolveComponent("bk-input"),_=e.resolveComponent("bk-form-item"),B=e.resolveComponent("bk-form"),S=e.resolveComponent("bk-button"),T=e.resolveComponent("bk-sideslider"),V=e.resolveDirective("bk-tooltips"),L=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(T,{title:"执行流程","is-show":o.show,width:700,"quick-close":!1,"esc-close":!1,"before-close":g},{footer:e.withCtx(()=>[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",D2,[e.createVNode(S,{theme:"primary",loading:k.value,onClick:m},{default:e.withCtx(()=>[...b[1]||(b[1]=[e.createTextVNode("确定",-1)])]),_:1},8,["loading"]),e.createVNode(S,{onClick:g},{default:e.withCtx(()=>[...b[2]||(b[2]=[e.createTextVNode("取消",-1)])]),_:1})]))]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",B2,[e.createVNode(B,{ref_key:"formRef",ref:u,model:v.value,rules:i,"label-width":100},{default:e.withCtx(()=>[t.showFlowEntry?(e.openBlock(),e.createBlock(_,{key:0,label:"排障流程",required:""},{default:e.withCtx(()=>[e.createElementVNode("div",V2,[e.createVNode(f,{readonly:"","model-value":s.value?.name},null,8,["model-value"]),e.withDirectives(e.createVNode(e.unref(Oe.Share),{class:"link-icon",onClick:p},null,512),[[V,"查看排障流程",void 0,{top:!0}]])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(_,{label:"新建任务名",property:"name",required:""},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:v.value.name,"onUpdate:modelValue":b[0]||(b[0]=z=>v.value.name=z),placeholder:"请输入任务名称","show-word-limit":"",maxlength:100},null,8,["modelValue"])]),_:1}),e.createVNode(_,{label:"请求参数",property:"inputParams",description:"流程的入参"},{default:e.withCtx(()=>[e.createElementVNode("div",N2,[e.createVNode(or,{variables:d.value,editable:!0,onChange:w},null,8,["variables"]),d.value.length===0?(e.openBlock(),e.createBlock(ht,{key:0,title:"暂无参数"})):e.createCommentVNode("",!0)])]),_:1})]),_:1},8,["model"])])),[[L,{loading:l.value}]])]),_:1},8,["is-show"])}}}),yo=te(T2,[["__scopeId","data-v-5317b12a"]]),M2=Object.freeze(Object.defineProperty({__proto__:null,default:yo},Symbol.toStringTag,{value:"Module"})),S2={key:0,class:"operate-area"},L2={class:"operate-btns"},P2={class:"flow-view-page-content"},O2=e.defineComponent({__name:"view",props:{flowId:{},apiConfig:{},permissions:{default:()=>({canEdit:!0})},onEdit:{},onBack:{}},emits:["edit","back"],setup(t,{emit:n}){const o=e.useSlots(),a=t,r=_n(a.apiConfig),i=n,s=e.shallowRef(!1),l=e.shallowRef(null),c=e.shallowRef(!0),d=e.shallowRef({}),u=e.shallowRef(!0),v=e.shallowRef([]),k=e.shallowRef(!1);e.onMounted(()=>{h(),p(),w()});const h=async()=>{c.value=!0;try{const b=await r.fetchFlowDetail(String(a.flowId));l.value=b}catch(b){console.error(b)}finally{c.value=!1}},p=async()=>{u.value=!0;try{const b=await r.fetchSpaceFlowConfig(String(a.flowId));d.value=b}catch(b){console.error(b)}finally{u.value=!1}},w=async()=>{k.value=!0;try{const b=await r.fetchSystemVariables(String(a.flowId));v.value=b}catch(b){console.error(b)}finally{k.value=!1}},m=()=>{typeof a.onBack=="function"?a.onBack():i("back")},g=()=>{typeof a.onEdit=="function"?a.onEdit():i("edit")},y=(b,f)=>{};return(b,f)=>{const _=e.resolveComponent("bk-button"),B=e.resolveDirective("bk-tooltips"),S=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(Ya,{title:"查看流程",desc:l.value?.name,"show-back-icon":!0,onBack:m},e.createSlots({extend:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",S2,[e.createVNode(Dr,{editable:!1,"flow-data":l.value,"system-variables":v.value,"fetch-user-api":e.unref(r).fetchUserApi},null,8,["flow-data","system-variables","fetch-user-api"]),e.createElementVNode("div",L2,[e.createVNode(_,{theme:"primary",class:e.normalizeClass([t.permissions.canEdit?"":"is-disabled"]),onClick:g},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createTextVNode(" 编辑 ",-1)])]),_:1},8,["class"]),e.createVNode(_,{theme:"primary",outline:"",onClick:f[0]||(f[0]=T=>s.value=!0)},{default:e.withCtx(()=>[...f[3]||(f[3]=[e.createTextVNode("执行流程",-1)])]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(_,{disabled:!0},{default:e.withCtx(()=>[...f[4]||(f[4]=[e.createTextVNode("调试",-1)])]),_:1})),[[B,"功能开发中"]])])])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",P2,[l.value?(e.openBlock(),e.createBlock(Sr,{key:0,mode:"view","flow-id":t.flowId,"pipeline-tree":l.value.pipeline_tree,"space-flow-config":d.value,"system-variables":v.value},{inputParams:e.withCtx(T=>[e.renderSlot(b.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps(T)),void 0,!0)]),_:3},8,["flow-id","pipeline-tree","space-flow-config","system-variables"])):e.createCommentVNode("",!0)])),[[S,{loading:c.value||u.value}]]),l.value?(e.openBlock(),e.createBlock(yo,{key:0,"flow-id":t.flowId,show:s.value,"api-config":a.apiConfig,onClose:f[1]||(f[1]=T=>s.value=!1),onConfirm:y},null,8,["flow-id","show","api-config"])):e.createCommentVNode("",!0)]),_:2},[e.unref(o).header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"header",{},void 0,!0)]),key:"0"}:void 0]),1032,["desc"])}}}),Lr=te(O2,[["__scopeId","data-v-93ebd755"]]),F2=Object.freeze(Object.defineProperty({__proto__:null,default:Lr},Symbol.toStringTag,{value:"Module"})),R2={key:0,class:"operate-area"},z2={class:"flow-actions"},I2={class:"operate-btns"},$2={class:"flow-edit-page-content"},U2=e.defineComponent({__name:"edit",props:{flowId:{},apiConfig:{},permissions:{default:()=>({canSave:!0})},onSave:{},onSaveSuccess:{},onBack:{},onBeforeLeave:{}},emits:["save","saveSuccess","back"],setup(t,{expose:n,emit:o}){const a=t,r=_n(a.apiConfig),i=o,s=e.shallowRef(null),l=e.shallowRef(!0),c=e.ref(),d=e.ref(),u=e.shallowRef(!0),v=e.shallowRef({}),k=e.shallowRef(!1),h=e.shallowRef([]),p=e.shallowRef(!1),w=e.shallowRef([]),m=e.shallowRef(!1),g=e.shallowRef(!1),y=e.computed(()=>String(a.flowId)),b=e.computed(()=>l.value||p.value||u.value);e.onMounted(()=>{f(),_(),B(),S()});const f=async()=>{l.value=!0;try{const x=await r.fetchFlowDetail(y.value);s.value=x}catch(x){console.error(x)}finally{l.value=!1}},_=async()=>{u.value=!0;try{const x=await r.fetchSpaceFlowConfig(y.value);v.value=x}catch(x){console.error(x)}finally{u.value=!1}},B=async()=>{m.value=!0;try{const x=await r.fetchSystemVariables(y.value);w.value=x}catch(x){console.error(x)}finally{m.value=!1}},S=async()=>{p.value=!0;try{const x=await r.fetchAllPluginGroups();h.value=x}catch(x){console.error(x)}finally{p.value=!1}},T=()=>{a.onBack?a.onBack():i("back")},V=()=>{c.value?.openBasicSetting()},L=x=>{s.value=x},z=x=>{s.value={...s.value,pipeline_tree:x},g.value=!0},Z=x=>{d.value&&d.value.updateNodeInputParams?.(x)},Y=()=>{if(!a.permissions.canSave)return;const x=Za(s.value?.pipeline_tree);x.valid?P():Bo.Message({theme:"error",message:x.message})},P=async()=>{const{name:x,desc:N,notify_config:C,pipeline_tree:A,triggers:D}=s.value,F={name:x,desc:N,notify_config:C,pipeline_tree:A,triggers:D};try{k.value=!0,await r.saveFlow(y.value,F),g.value=!1,Bo.Message({theme:"success",message:"保存成功"}),a.onSave&&a.onSave(s.value),a.onSaveSuccess&&a.onSaveSuccess(),i("save",s.value),i("saveSuccess")}catch(I){console.error(I)}finally{k.value=!1}};return n({isFlowEdited:e.computed(()=>g.value),updateNodeInputParams:Z}),(x,N)=>{const C=e.resolveComponent("bk-button"),A=e.resolveDirective("bk-tooltips"),D=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(Ya,{title:"编辑流程",desc:s.value?.name,"show-back-icon":!0,"show-edit-icon":!0,onBack:T,onEdit:V},{header:e.withCtx(()=>[e.renderSlot(x.$slots,"header",{},void 0,!0)]),extend:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",R2,[e.createElementVNode("div",z2,[e.createVNode(Dr,{ref_key:"flowInfoSlidersRef",ref:c,"flow-data":s.value,"system-variables":w.value,"fetch-user-api":e.unref(r).fetchUserApi,onChange:L},null,8,["flow-data","system-variables","fetch-user-api"]),e.createElementVNode("div",I2,[e.createVNode(C,{class:e.normalizeClass([t.permissions.canSave?"":"is-disabled"]),theme:"primary",loading:k.value,onClick:Y},{default:e.withCtx(()=>[...N[0]||(N[0]=[e.createTextVNode(" 保存 ",-1)])]),_:1},8,["class","loading"]),e.withDirectives((e.openBlock(),e.createBlock(C,{disabled:!0},{default:e.withCtx(()=>[...N[1]||(N[1]=[e.createTextVNode("调试",-1)])]),_:1})),[[A,"功能开发中"]])])])])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",$2,[!b.value&&s.value?(e.openBlock(),e.createBlock(Sr,{key:0,ref_key:"flowCanvasRef",ref:d,mode:"edit","flow-id":y.value,"pipeline-tree":s.value.pipeline_tree,"space-flow-config":v.value,"plugin-group-list":h.value,"system-variables":w.value,onChange:z},{inputParams:e.withCtx(F=>[e.renderSlot(x.$slots,"inputParams",e.normalizeProps(e.guardReactiveProps({...F,updateNodeInputParams:Z})),void 0,!0)]),_:3},8,["flow-id","pipeline-tree","space-flow-config","plugin-group-list","system-variables"])):e.createCommentVNode("",!0)])),[[D,{loading:b.value}]])]),_:3},8,["desc"])}}}),Pr=te(U2,[["__scopeId","data-v-44c4517a"]]),j2=Object.freeze(Object.defineProperty({__proto__:null,default:Pr},Symbol.toStringTag,{value:"Module"})),G2={FlowView:()=>Promise.resolve().then(()=>F2),FlowEdit:()=>Promise.resolve().then(()=>j2),FlowExecute:()=>Promise.resolve().then(()=>M2)};exports.FlowEdit=Pr;exports.FlowExecute=yo;exports.FlowView=Lr;exports.PLUGIN_GROUP_ICON_MAP=Yn;exports.default=G2;exports.getUniformApiPluginFormValue=nr;exports.getVariableDefaultConfig=Zn;exports.parentClsContains=mn;exports.provideFlowApiConfig=_n;exports.useFlowApi=Ha;exports.useFlowApiConfig=at;exports.useFlowEditApiConfig=Ei;exports.useFlowViewApiConfig=Bi;exports.uuid=qe;exports.validatePipelineTree=Za;