import{l as w,D as jt,E as Gt,u,G as L,g as I,_ as Wt,H as Kt,d as Oe,a as Ne,b as Jt,c as Pe,e as zt,f as $t,i as Qt,m as Z,I as Ue,o as b,j as V,w as m,S as Yt,k as U,n as oe,p as T,J as Xt,v as k,t as H,x as E,F as Se,r as me,K as Zt,L as ea,M as ta,N as aa,O as ra,z as na,q as ia,P as oa,Q as la,s as sa,A as ua,R as fa,U as da,W as ca,X as pa,Y as ha,T as ma,Z as ya,$ as ga}from"./doc-19de6184.js";var va={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"};const wa=va;function st(t){for(var e=1;e"u"?C:W(Uint8Array),ie={"%AggregateError%":typeof AggregateError>"u"?C:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?C:ArrayBuffer,"%ArrayIteratorPrototype%":le?W([][Symbol.iterator]()):C,"%AsyncFromSyncIteratorPrototype%":C,"%AsyncFunction%":se,"%AsyncGenerator%":se,"%AsyncGeneratorFunction%":se,"%AsyncIteratorPrototype%":se,"%Atomics%":typeof Atomics>"u"?C:Atomics,"%BigInt%":typeof BigInt>"u"?C:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?C:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?C:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?C:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?C:Float32Array,"%Float64Array%":typeof Float64Array>"u"?C:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?C:FinalizationRegistry,"%Function%":Dt,"%GeneratorFunction%":se,"%Int8Array%":typeof Int8Array>"u"?C:Int8Array,"%Int16Array%":typeof Int16Array>"u"?C:Int16Array,"%Int32Array%":typeof Int32Array>"u"?C:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":le?W(W([][Symbol.iterator]())):C,"%JSON%":typeof JSON=="object"?JSON:C,"%Map%":typeof Map>"u"?C:Map,"%MapIteratorPrototype%":typeof Map>"u"||!le?C:W(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?C:Promise,"%Proxy%":typeof Proxy>"u"?C:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?C:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?C:Set,"%SetIteratorPrototype%":typeof Set>"u"||!le?C:W(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?C:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":le?W(""[Symbol.iterator]()):C,"%Symbol%":le?Symbol:C,"%SyntaxError%":fe,"%ThrowTypeError%":Na,"%TypedArray%":Pa,"%TypeError%":ue,"%Uint8Array%":typeof Uint8Array>"u"?C:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?C:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?C:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?C:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?C:WeakMap,"%WeakRef%":typeof WeakRef>"u"?C:WeakRef,"%WeakSet%":typeof WeakSet>"u"?C:WeakSet};try{null.error}catch(t){var Ua=W(W(t));ie["%Error.prototype%"]=Ua}var Aa=function t(e){var a;if(e==="%AsyncFunction%")a=Ie("async function () {}");else if(e==="%GeneratorFunction%")a=Ie("function* () {}");else if(e==="%AsyncGeneratorFunction%")a=Ie("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(a=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&(a=W(n.prototype))}return ie[e]=a,a},ft={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},be=Ze,Ee=Oa,Ia=be.call(Function.call,Array.prototype.concat),Ba=be.call(Function.apply,Array.prototype.splice),dt=be.call(Function.call,String.prototype.replace),De=be.call(Function.call,String.prototype.slice),Ma=be.call(Function.call,RegExp.prototype.exec),La=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qa=/\\(\\)?/g,Va=function(e){var a=De(e,0,1),r=De(e,-1);if(a==="%"&&r!=="%")throw new fe("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&a!=="%")throw new fe("invalid intrinsic syntax, expected opening `%`");var n=[];return dt(e,La,function(i,s,l,o){n[n.length]=l?dt(o,qa,"$1"):s||i}),n},Ha=function(e,a){var r=e,n;if(Ee(ft,r)&&(n=ft[r],r="%"+n[0]+"%"),Ee(ie,r)){var i=ie[r];if(i===se&&(i=Aa(r)),typeof i>"u"&&!a)throw new ue("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new fe("intrinsic "+e+" does not exist!")},et=function(e,a){if(typeof e!="string"||e.length===0)throw new ue("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof a!="boolean")throw new ue('"allowMissing" argument must be a boolean');if(Ma(/^%?[^%]*%?$/,e)===null)throw new fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Va(e),n=r.length>0?r[0]:"",i=Ha("%"+n+"%",a),s=i.name,l=i.value,o=!1,f=i.alias;f&&(n=f[0],Ba(r,Ia([0,1],f)));for(var d=1,y=!0;d=r.length){var S=ne(l,c);y=!!S,y&&"get"in S&&!("originalValue"in S.get)?l=S.get:l=l[c]}else y=Ee(l,c),l=l[c];y&&!o&&(ie[s]=l)}}return l},xt={exports:{}};(function(t){var e=Ze,a=et,r=a("%Function.prototype.apply%"),n=a("%Function.prototype.call%"),i=a("%Reflect.apply%",!0)||e.call(n,r),s=a("%Object.getOwnPropertyDescriptor%",!0),l=a("%Object.defineProperty%",!0),o=a("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(y){var c=i(e,n,arguments);if(s&&l){var p=s(c,"length");p.configurable&&l(c,"length",{value:1+o(0,y.length-(arguments.length-1))})}return c};var f=function(){return i(e,r,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f})(xt);var Rt=et,_t=xt.exports,ja=_t(Rt("String.prototype.indexOf")),Ga=function(e,a){var r=Rt(e,!!a);return typeof r=="function"&&ja(e,".prototype.")>-1?_t(r):r};const Wa={},Ka=Object.freeze(Object.defineProperty({__proto__:null,default:Wa},Symbol.toStringTag,{value:"Module"})),Ja=Gt(Ka);var tt=typeof Map=="function"&&Map.prototype,Me=Object.getOwnPropertyDescriptor&&tt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xe=tt&&Me&&typeof Me.get=="function"?Me.get:null,ct=tt&&Map.prototype.forEach,at=typeof Set=="function"&&Set.prototype,Le=Object.getOwnPropertyDescriptor&&at?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Re=at&&Le&&typeof Le.get=="function"?Le.get:null,pt=at&&Set.prototype.forEach,za=typeof WeakMap=="function"&&WeakMap.prototype,ge=za?WeakMap.prototype.has:null,$a=typeof WeakSet=="function"&&WeakSet.prototype,ve=$a?WeakSet.prototype.has:null,Qa=typeof WeakRef=="function"&&WeakRef.prototype,ht=Qa?WeakRef.prototype.deref:null,Ya=Boolean.prototype.valueOf,Xa=Object.prototype.toString,Za=Function.prototype.toString,er=String.prototype.match,rt=String.prototype.slice,te=String.prototype.replace,tr=String.prototype.toUpperCase,mt=String.prototype.toLowerCase,Tt=RegExp.prototype.test,yt=Array.prototype.concat,K=Array.prototype.join,ar=Array.prototype.slice,gt=Math.floor,We=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qe=Object.getOwnPropertySymbols,Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,de=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===de?"object":"symbol")?Symbol.toStringTag:null,Ot=Object.prototype.propertyIsEnumerable,vt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function wt(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Tt.call(/e/,e))return e;var a=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-gt(-t):gt(t);if(r!==t){var n=String(r),i=rt.call(e,n.length+1);return te.call(n,a,"$&_")+"."+te.call(te.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return te.call(e,a,"$&_")}var Je=Ja,bt=Je.custom,St=Pt(bt)?bt:null,rr=function t(e,a,r,n){var i=a||{};if(ee(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ee(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ee(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ee(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ee(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return At(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var o=String(e);return l?wt(e,o):o}if(typeof e=="bigint"){var f=String(e)+"n";return l?wt(e,f):f}var d=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof e=="object")return ze(e)?"[Array]":"[Object]";var y=Sr(i,r);if(typeof n>"u")n=[];else if(Ut(n,e)>=0)return"[Circular]";function c(F,h,x){if(h&&(n=ar.call(n),n.push(h)),x){var he={depth:i.depth};return ee(i,"quoteStyle")&&(he.quoteStyle=i.quoteStyle),t(F,he,r+1,n)}return t(F,i,r+1,n)}if(typeof e=="function"&&!Ft(e)){var p=cr(e),g=Fe(e,c);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(g.length>0?" { "+K.call(g,", ")+" }":"")}if(Pt(e)){var S=de?te.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ke.call(e);return typeof e=="object"&&!de?ye(S):S}if(vr(e)){for(var D="<"+mt.call(String(e.nodeName)),v=e.attributes||[],R=0;R",D}if(ze(e)){if(e.length===0)return"[]";var B=Fe(e,c);return y&&!br(B)?"["+$e(B,y)+"]":"[ "+K.call(B,", ")+" ]"}if(or(e)){var N=Fe(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!Ot.call(e,"cause")?"{ ["+String(e)+"] "+K.call(yt.call("[cause]: "+c(e.cause),N),", ")+" }":N.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+K.call(N,", ")+" }"}if(typeof e=="object"&&s){if(St&&typeof e[St]=="function"&&Je)return Je(e,{depth:d-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(pr(e)){var _=[];return ct&&ct.call(e,function(F,h){_.push(c(h,e,!0)+" => "+c(F,e))}),Ct("Map",xe.call(e),_,y)}if(yr(e)){var P=[];return pt&&pt.call(e,function(F){P.push(c(F,e))}),Ct("Set",Re.call(e),P,y)}if(hr(e))return Ve("WeakMap");if(gr(e))return Ve("WeakSet");if(mr(e))return Ve("WeakRef");if(sr(e))return ye(c(Number(e)));if(fr(e))return ye(c(We.call(e)));if(ur(e))return ye(Ya.call(e));if(lr(e))return ye(c(String(e)));if(!ir(e)&&!Ft(e)){var q=Fe(e,c),J=vt?vt(e)===Object.prototype:e instanceof Object||e.constructor===Object,j=e instanceof Object?"":"null prototype",Y=!J&&M&&Object(e)===e&&M in e?rt.call(ae(e),8,-1):j?"Object":"",z=J||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",X=z+(Y||j?"["+K.call(yt.call([],Y||[],j||[]),": ")+"] ":"");return q.length===0?X+"{}":y?X+"{"+$e(q,y)+"}":X+"{ "+K.call(q,", ")+" }"}return String(e)};function Nt(t,e,a){var r=(a.quoteStyle||e)==="double"?'"':"'";return r+t+r}function nr(t){return te.call(String(t),/"/g,""")}function ze(t){return ae(t)==="[object Array]"&&(!M||!(typeof t=="object"&&M in t))}function ir(t){return ae(t)==="[object Date]"&&(!M||!(typeof t=="object"&&M in t))}function Ft(t){return ae(t)==="[object RegExp]"&&(!M||!(typeof t=="object"&&M in t))}function or(t){return ae(t)==="[object Error]"&&(!M||!(typeof t=="object"&&M in t))}function lr(t){return ae(t)==="[object String]"&&(!M||!(typeof t=="object"&&M in t))}function sr(t){return ae(t)==="[object Number]"&&(!M||!(typeof t=="object"&&M in t))}function ur(t){return ae(t)==="[object Boolean]"&&(!M||!(typeof t=="object"&&M in t))}function Pt(t){if(de)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Ke)return!1;try{return Ke.call(t),!0}catch{}return!1}function fr(t){if(!t||typeof t!="object"||!We)return!1;try{return We.call(t),!0}catch{}return!1}var dr=Object.prototype.hasOwnProperty||function(t){return t in this};function ee(t,e){return dr.call(t,e)}function ae(t){return Xa.call(t)}function cr(t){if(t.name)return t.name;var e=er.call(Za.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Ut(t,e){if(t.indexOf)return t.indexOf(e);for(var a=0,r=t.length;ae.maxStringLength){var a=t.length-e.maxStringLength,r="... "+a+" more character"+(a>1?"s":"");return At(rt.call(t,0,e.maxStringLength),e)+r}var n=te.call(te.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wr);return Nt(n,"single",e)}function wr(t){var e=t.charCodeAt(0),a={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return a?"\\"+a:"\\x"+(e<16?"0":"")+tr.call(e.toString(16))}function ye(t){return"Object("+t+")"}function Ve(t){return t+" { ? }"}function Ct(t,e,a,r){var n=r?$e(a,r):K.call(a,", ");return t+" ("+e+") {"+n+"}"}function br(t){for(var e=0;e=0)return!1;return!0}function Sr(t,e){var a;if(t.indent===" ")a=" ";else if(typeof t.indent=="number"&&t.indent>0)a=K.call(Array(t.indent+1)," ");else return null;return{base:a,prev:K.call(Array(e+1),a)}}function $e(t,e){if(t.length===0)return"";var a=` `+e.prev+e.base;return a+K.call(t,","+a)+` `+e.prev}function Fe(t,e){var a=ze(t),r=[];if(a){r.length=t.length;for(var n=0;n1;){var a=e.pop(),r=a.obj[a.prop];if(re(r)){for(var n=[],i=0;i=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===Ir.RFC1738&&(f===40||f===41)){l+=s.charAt(o);continue}if(f<128){l=l+G[f];continue}if(f<2048){l=l+(G[192|f>>6]+G[128|f&63]);continue}if(f<55296||f>=57344){l=l+(G[224|f>>12]+G[128|f>>6&63]+G[128|f&63]);continue}o+=1,f=65536+((f&1023)<<10|s.charCodeAt(o)&1023),l+=G[240|f>>18]+G[128|f>>12&63]+G[128|f>>6&63]+G[128|f&63]}return l},Hr=function(e){for(var a=[{obj:{o:e},prop:"o"}],r=[],n=0;n"u"&&(B=0)}if(typeof o=="function"?v=o(a,v):v instanceof Date?v=y(v):r==="comma"&&$(v)&&(v=Qe.maybeMap(v,function(Te){return Te instanceof Date?y(Te):Te})),v===null){if(i)return l&&!g?l(a,A.encoder,S,"key",c):a;v=""}if(Yr(v)||Qe.isBuffer(v)){if(l){var P=g?a:l(a,A.encoder,S,"key",c);if(r==="comma"&&g){for(var q=zr.call(String(v),","),J="",j=0;j"u")return Y;var z;if(r==="comma"&&$(v))z=[{value:v.length>0?v.join(",")||null:void 0}];else if($(o))z=o;else{var X=Object.keys(v);z=f?X.sort(f):X}for(var F=n&&$(v)&&v.length===1?a+"[]":a,h=0;h"u"?A.allowDots:!!e.allowDots,charset:a,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:A.charsetSentinel,delimiter:typeof e.delimiter>"u"?A.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:A.encode,encoder:typeof e.encoder=="function"?e.encoder:A.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:A.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:A.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:A.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:A.strictNullHandling}},en=function(t,e){var a=t,r=Zr(e),n,i;typeof r.filter=="function"?(i=r.filter,a=i("",a)):$(r.filter)&&(i=r.filter,n=i);var s=[];if(typeof a!="object"||a===null)return"";var l;e&&e.arrayFormat in kt?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var o=kt[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=o==="comma"&&e&&e.commaRoundTrip;n||(n=Object.keys(a)),r.sort&&n.sort(r.sort);for(var d=Mt(),y=0;y0?g+p:""},ce=Bt,Ye=Object.prototype.hasOwnProperty,tn=Array.isArray,O={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ce.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},an=function(t){return t.replace(/&#(\d+);/g,function(e,a){return String.fromCharCode(parseInt(a,10))})},qt=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},rn="utf8=%26%2310003%3B",nn="utf8=%E2%9C%93",on=function(e,a){var r={},n=a.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=a.parameterLimit===1/0?void 0:a.parameterLimit,s=n.split(a.delimiter,i),l=-1,o,f=a.charset;if(a.charsetSentinel)for(o=0;o-1&&(g=tn(g)?[g]:g),Ye.call(r,p)?r[p]=ce.combine(r[p],g):r[p]=g}return r},ln=function(t,e,a,r){for(var n=r?e:qt(e,a),i=t.length-1;i>=0;--i){var s,l=t[i];if(l==="[]"&&a.parseArrays)s=[].concat(n);else{s=a.plainObjects?Object.create(null):{};var o=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,f=parseInt(o,10);!a.parseArrays&&o===""?s={0:n}:!isNaN(f)&&l!==o&&String(f)===o&&f>=0&&a.parseArrays&&f<=a.arrayLimit?(s=[],s[f]=n):o!=="__proto__"&&(s[o]=n)}n=s}return n},sn=function(e,a,r,n){if(!!e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,o=r.depth>0&&s.exec(i),f=o?i.slice(0,o.index):i,d=[];if(f){if(!r.plainObjects&&Ye.call(Object.prototype,f)&&!r.allowPrototypes)return;d.push(f)}for(var y=0;r.depth>0&&(o=l.exec(i))!==null&&y"u"?O.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?O.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:O.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:O.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:O.arrayLimit,charset:a,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:O.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:O.comma,decoder:typeof e.decoder=="function"?e.decoder:O.decoder,delimiter:typeof e.delimiter=="string"||ce.isRegExp(e.delimiter)?e.delimiter:O.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:O.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:O.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:O.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:O.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:O.strictNullHandling}},fn=function(t,e){var a=un(e);if(t===""||t===null||typeof t>"u")return a.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?on(t,a):t,n=a.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s{this.addValue(t.name,t.value,t.type,t.all)})},addValue(t,e,a,r){r?this.allGroups.forEach(n=>{this.addCurrentGroup(t,e,a,n)}):this.addCurrentGroup(t,e,a,this.groupId)},addCurrentGroup(t,e,a,r){let n=t+a,i=this.targetValue[r];u.arrNotEmpty(i)?i.filter(l=>l.pkid==n&&l.in==a).length>0?i.forEach(l=>{l.pkid==n&&l.in==a&&(l.value=e)}):i.push({name:t,value:e,in:a,pkid:n}):(i=[],i.push({name:t,value:e,in:a,pkid:n})),this.targetValue[r]=i},save(){L.setItem(this.cacheKey,this.targetValue)}};var mn=function(t){this.groupid=t.groupid||"afterScriptGroup",this.commands=[],this.allgroupids=t.allgroupids||[],this.response=t.response||{data:{},headers:{}},this.global={setHeader:(e,a)=>{this.global.setCommon(e,a,"header",!1)},setAllHeader:(e,a)=>{this.global.setCommon(e,a,"header",!0)},setParameter:(e,a)=>{this.global.setCommon(e,a,"query",!1)},setAllParameter:(e,a)=>{this.global.setCommon(e,a,"query",!0)},setCommon:(e,a,r,n)=>{this.global.cacheCommand(e,a,r,n)},cacheCommand:(e,a,r,n)=>{this.commands.push({name:e,value:a,type:r,all:n})},action:()=>{if(this.commands!=null&&this.commands.length>0){let e=this.commands,a=this.groupid,r=this.allgroupids;L.getItem(I.globalParameter).then(n=>{new Vt(I.globalParameter,n,r,e,a).save()})}},executeAsyncCommon:(e,a,r,n)=>{var i=this.groupid,s=e+r;if(n){var l=this.allgroupids;L.getItem(I.globalParameter).then(o=>{if(u.checkUndefined(o)){var f={};l.forEach(c=>{var p=o[c];if(u.checkUndefined(p)||u.arrEmpty(p))p=[],p.push({name:e,value:a,in:r,pkid:s}),f[c]=p;else{var g=p.filter(S=>S.pkid==s&&S.in==r).length;g==0?p.push({name:e,value:a,in:r,pkid:s}):p.forEach(S=>{S.in==r&&S.pkid==s&&(S.value=a)}),f[c]=p}window.console.log("\u66F4\u65B0value"),window.console.log(f)}),L.setItem(I.globalParameter,f)}else{var d=[];d.push({name:e,value:a,in:r,pkid:s});var y={};l.forEach(c=>{y[c]=d}),L.setItem(I.globalParameter,y)}})}else L.getItem(I.globalParameter).then(o=>{var f=[],d={};if(u.checkUndefined(o)){for(var y in o)y==i?f=o[y]:d[y]=o[y];var c=f.filter(p=>p.pkid==s&&p.in==r).length;c==0?f.push({name:e,value:a,in:r,pkid:s}):f.forEach(p=>{p.in==r&&p.pkid==s&&(p.value=a)}),d[i]=f,L.setItem(I.globalParameter,d)}else f.push({name:e,value:a,in:r,pkid:s});d[i]=f,L.setItem(I.globalParameter,d)})}}};function _e(t){var e=" ";if(isNaN(parseInt(t)))e=t;else switch(t){case 1:e=" ";break;case 2:e=" ";break;case 3:e=" ";break;case 4:e=" ";break;case 5:e=" ";break;case 6:e=" ";break;case 7:e=" ";break;case 8:e=" ";break;case 9:e=" ";break;case 10:e=" ";break;case 11:e=" ";break;case 12:e=" ";break}for(var a=[` `],r=0;r<100;r++)a.push(a[r]+e);return a}function Q(){this.step=" ",this.shift=_e(this.step)}Q.prototype.xml=function(t,e){var a=t.replace(/>\s{0,}<").replace(/-1?(s+=o[i]+a[l],n=!0,(a[l].search(/-->/)>-1||a[l].search(/\]>/)>-1||a[l].search(/!DOCTYPE/)>-1)&&(n=!1)):a[l].search(/-->/)>-1||a[l].search(/\]>/)>-1?(s+=a[l],n=!1):/^<\w/.exec(a[l-1])&&/^<\/\w/.exec(a[l])&&/^<[\w:\-\.\,]+/.exec(a[l-1])==/^<\/[\w:\-\.\,]+/.exec(a[l])[0].replace("/","")?(s+=a[l],n||i--):a[l].search(/<\w/)>-1&&a[l].search(/<\//)==-1&&a[l].search(/\/>/)==-1?s=n?s+=a[l]:s+=o[i++]+a[l]:a[l].search(/<\w/)>-1&&a[l].search(/<\//)>-1?s=n?s+=a[l]:s+=o[i]+a[l]:a[l].search(/<\//)>-1?s=n?s+=a[l]:s+=o[--i]+a[l]:a[l].search(/\/>/)>-1?s=n?s+=a[l]:s+=o[i]+a[l]:a[l].search(/<\?/)>-1||a[l].search(/xmlns\:/)>-1||a[l].search(/xmlns\=/)>-1?s+=o[i]+a[l]:s+=a[l];return s[0]==` `?s.slice(1):s};Q.prototype.json=function(t,a){var a=a||this.step;return typeof JSON>"u"?t:typeof t=="string"?JSON.stringify(JSON.parse(t),null,a):typeof t=="object"?JSON.stringify(t,null,a):t};Q.prototype.css=function(t,e){var a=t.replace(/\s{1,}/g," ").replace(/\{/g,"{~::~").replace(/\}/g,"~::~}~::~").replace(/\;/g,";~::~").replace(/\/\*/g,"~::~/*").replace(/\*\//g,"*/~::~").replace(/~::~\s{0,}~::~/g,"~::~").split("~::~"),r=a.length,n=0,i="",s=0,l=e?_e(e):this.shift;for(s=0;s/g,"").replace(/[ \r\n\t]{1,}xmlns/g," xmlns");return a.replace(/>\s{0,}<")};Q.prototype.jsonmin=function(t){return typeof JSON>"u"?t:JSON.stringify(JSON.parse(t),null,0)};Q.prototype.cssmin=function(t,e){var a=e?t:t.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"");return a.replace(/\s{1,}/g," ").replace(/\{\s{1,}/g,"{").replace(/\}\s{1,}/g,"}").replace(/\;\s{1,}/g,";").replace(/\/\*\s{1,}/g,"/*").replace(/\*\/\s{1,}/g,"*/")};Q.prototype.sqlmin=function(t){return t.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")")};const vn={name:"Debug",components:{UnlockOutlined:Sa,DownOutlined:Kt,EditorScript:Oe(()=>Ne(()=>import("./EditorScript-c7e62c10.js"),["./EditorScript-c7e62c10.js","./doc-19de6184.js","..\\css\\doc-5be93158.css","./ext-language_tools-95de2ac7.js"],import.meta.url)),EditorDebugShow:Oe(()=>Ne(()=>import("./EditorDebugShow-babc8553.js"),["./EditorDebugShow-babc8553.js","./doc-19de6184.js","..\\css\\doc-5be93158.css","./ext-language_tools-95de2ac7.js"],import.meta.url)),DebugResponse:Oe(()=>Ne(()=>import("./DebugResponse-cfbc9793.js"),["./DebugResponse-cfbc9793.js","./doc-19de6184.js","..\\css\\doc-5be93158.css","./clipboard-51434f9e.js","./CopyOutlined-21db004f.js"],import.meta.url))},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},setup(){const t=Jt(),e=Pe(()=>t.language),a=Pe(()=>t.enableAfterScript),r=Pe(()=>t.enableReloadCacheParameter),n=zt(),{messages:i}=$t();return{language:e,enableAfterScript:a,enableReloadCacheParameter:r,knife4jModels:n,messages:i}},data(){return{oldApi:{},i18n:null,bigFlag:!1,bigBlobFlag:!1,debugUrlStyle:"width: 80%",enableRequestCache:!1,enableDynamicParameter:!1,enableHost:!1,enableHostText:"",authorizeQueryParameters:[],headerColumn:[],formColumn:[],urlFormColumn:[],allowClear:!0,pagination:!1,headerAutoOptions:I.debugRequestHeaders,headerOptions:I.debugRequestHeaderOptions,headerCount:0,headerCountFlag:!1,headerSelectName:"",selectedRowKeys:[],requestParameterAllow:!0,rowSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowSelection.selectedRowKeys=t}},rowFormSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowFormSelection.selectedRowKeys=t}},rowRawFormSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowRawFormSelection.selectedRowKeys=t}},rowUrlFormSelection:{selectedRowKeys:[],onChange:(t,e)=>{this.rowUrlFormSelection.selectedRowKeys=t}},headerData:[],headerTableFlag:!0,globalParameters:[],debugUrl:"",debugMethodType:"",debugPathFlag:!1,debugPathParams:[],debugLoading:!1,oAuthApi:!1,debugSend:!1,formData:[],formFlag:!1,formTableFlag:!0,urlFormData:[],urlFormFlag:!1,urlFormTableFlag:!0,rawFormData:[],rawFormFlag:!1,rawFormTableFlag:!0,rawDefaultText:"Auto",rawFlag:!1,rawTypeFlag:!1,formatFlag:!1,rawText:"",rawScript:"",rawScriptMode:"javascript",rawMode:"text",rawRequestType:"application/json",requestContentType:"x-www-form-urlencoded",responseHeaders:[],responseRawText:"",responseCurlText:"",responseStatus:null,responseContent:null,responseFieldDescriptionChecked:!0,routeHeader:null,oas2:!0}},created(){this.routeHeader=this.swaggerInstance.header,this.oas2=this.swaggerInstance.oas2(),this.initI18n(),this.initLocalGlobalParameters(),this.initDebugUrl(),this.oldApi=Qt(this.api),this.enableReloadCacheParameter?this.debugUrlStyle="width: 70%;":this.debugUrlStyle="width: 80%;"},watch:{language:function(t,e){this.initI18n()}},methods:{resetCacheParameter(){this.headerData=[],this.formData=[],this.urlFormData=[],this.rawFormData=[],this.rawText=u.toString(this.oldApi.requestValue,""),this.rawScript="",this.storeApiParams(),this.initLocalGlobalParameters(),this.initDebugUrl()},reloadCacheParameter(){var t=[];const e=this.api.instanceId;L.getItem(I.globalParameter).then(a=>{a!=null&&a[e]!=null&&a[e]!=null&&(t=a[e]),u.arrNotEmpty(t)&&(this.reloadUpdateHeader(t),this.rawFlag?this.reloadUpdateRawForm(t):this.formFlag?this.reloadUpdateForm(t):this.urlFormFlag&&this.reloadUpdateUrlForm(t))})},reloadUpdateCommons(t,e,a){var r=[],n=!1,i=!1;u.arrNotEmpty(e)&&e.forEach(l=>{var o=l.name+a,f=t.filter(c=>c.pkid==o);if(u.arrNotEmpty(f)){var d=f[0],y=u.getValue(d,"value","",!0);l.content=y,n=!0}r.push(l)});var s=t.filter(l=>l.in==a);return u.arrNotEmpty(s)&&s.forEach(l=>{var o=r.filter(d=>d.name==l.name);if(!u.arrNotEmpty(o)){var f={id:u.randomMd5(),name:l.name,content:l.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};r.push(f),n=!0,i=!0}}),console.log(r),{update:n,data:r,add:i}},reloadUpdateHeader(t){var e=this.reloadUpdateCommons(t,this.headerData,"header");e.update&&(this.headerData=[],setTimeout(()=>{this.headerData=e.data,e.add&&(this.initSelectionHeaders(),this.headerResetCalc())},10))},reloadUpdateUrlForm(t){var e=this.reloadUpdateCommons(t,this.urlFormData,"query");e.update&&(this.urlFormData=[],setTimeout(()=>{this.urlFormData=e.data,e.add&&this.initUrlFormSelections()},10))},reloadUpdateForm(t){var e=this.reloadUpdateCommons(t,this.formData,"query");e.update&&(this.formData=[],setTimeout(()=>{this.formData=e.data,e.add&&this.initFormSelections()},10))},reloadUpdateRawForm(t){var e=this.reloadUpdateCommons(t,this.rawFormData,"query");e.update&&(this.rawFormData=[],setTimeout(()=>{this.rawFormData=e.data,e.add&&(this.rawFormFlag=!0,this.rawFormTableFlag=!0,this.initRawFormSelections())},10))},getCurrentI18nInstance(){return this.messages[this.language]},initI18n(){const t=this.getCurrentI18nInstance();this.i18n=t,this.headerColumn=t.table.debugRequestHeaderColumns,this.formColumn=t.table.debugFormDataRequestColumns,this.urlFormColumn=t.table.debugUrlFormRequestColumns,console.log(this.headerColumn,this.formColumn,this.urlFormColumn)},debugUrlChange(t){this.debugUrl=t.target.value},initDebugUrl(){this.debugUrl=this.api.url,this.debugMethodType=this.api.methodType;var t=new RegExp("{(.*?)}","ig");if(t.test(this.debugUrl)){this.debugPathFlag=!0;for(var e=null,a=new RegExp("{(.*?)}","ig");e=a.exec(this.debugUrl);)this.debugPathParams.push(e[1])}},initLocalGlobalParameters(){const t=this.api.instanceId;L.getItem(I.globalSettingsKey).then(e=>{if(u.checkUndefined(e)&&(this.enableRequestCache=e.enableRequestCache,u.checkUndefined(e.enableDynamicParameter)&&(this.enableDynamicParameter=e.enableDynamicParameter),u.checkUndefined(e.enableHost))){this.enableHost=e.enableHost;var a=e.enableHostText;u.checkUndefined(a)?(a.startsWith("http")||(a="http://"+a),this.enableHostText=a):this.enableHost=!1}L.getItem(I.globalParameter).then(r=>{r!=null&&r[t]!=null&&r[t]!=null&&(this.globalParameters=r[t]);var n=I.debugCacheApiId+this.api.id;L.getItem(n).then(i=>{this.initHeaderParameter(i);var s=I.globalSecurityParamPrefix+this.api.instanceId;L.getItem(s).then(l=>{u.arrNotEmpty(l)&&l.forEach(o=>{if(o.in=="query"){var f={id:u.randomMd5(),name:o.name,content:o.value,value:o.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};this.api.securityFlag&&this.api.securityKeys.includes(o.key)&&this.authorizeQueryParameters.push(f)}}),this.initBodyParameter(i)})})})})},initHeaderParameter(t){var e=this.syncFromOAuth2();if(u.checkUndefined(e)){this.oAuthApi=!0;var a={id:u.randomMd5(),name:e.name,content:e.accessToken,require:!0,description:"",enums:null,enumsMode:"default",new:!1};this.addDebugHeader(a)}this.globalParameters.forEach(n=>{if(console.log(n),n.in=="header"){var i={id:u.randomMd5(),name:n.name,content:n.value,require:!1,description:"",enums:null,enumsMode:"default",new:!1};this.addDebugHeader(i)}});var r=I.globalSecurityParamPrefix+this.api.instanceId;L.getItem(r).then(n=>{u.arrNotEmpty(n)&&n.forEach(i=>{let s=u.getOAuth2BearerValue(i.schema,i.value);var l={id:u.randomMd5(),name:i.name,content:s,require:!0,description:"",enums:null,enumsMode:"default",new:!1};i.in=="header"&&this.api.securityFlag&&this.api.securityKeys.includes(i.key)&&this.addDebugHeader(l)}),this.updateHeaderFromCacheApi(t),this.addNewLineHeader(),this.initSelectionHeaders(),this.headerResetCalc()})},updateHeaderFromCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.headerData;this.headerData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(this.oAuthApi?a.name!="Authorization"&&(a.content=r[0].content):a.content=r[0].content)}})}},updateUrlFormCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.urlFormData;this.urlFormData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(a.content=r[0].content)}})}},updateRawFormCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.rawFormData;this.rawFormData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(a.content=r[0].content)}}),this.rawText=t.rawText}},syncFromOAuth2(){var t=this.swaggerInstance.id,e="SELFOAuth"+t;if(window.localStorage){var a=window.localStorage.getItem(e);if(u.strNotBlank(a)){var r=u.json5parse(a);return r}}return null},updateFormCacheApi(t){if(this.enableRequestCache&&u.checkUndefined(t)){var e=t.formData;this.formData.forEach(a=>{if(!u.strNotBlank(a.content)){var r=e.filter(n=>n.name==a.name);r.length>0&&(a.content=r[0].content)}})}},initBodyParameter(t){var e=this.globalParameters.filter(o=>o.in!="header"),a=this.api.parameters,r=[],n=[];if(e.length>0&&e.forEach(o=>{if(u.arrNotEmpty(a)){var f=!0;a.forEach(d=>{o.name==d.name&&o.in==d.in&&u.strNotBlank(d.txtValue)&&(f=!1)}),f&&r.push(o)}else r.push(o)}),u.arrNotEmpty(a)&&a.forEach(o=>{if(u.arrNotEmpty(e)){var f=!0;e.forEach(d=>{d.name==o.name&&d.in==o.in&&(u.strNotBlank(o.txtValue)||(f=!1))}),f&&n.push(o)}else n.push(o)}),u.arrNotEmpty(this.authorizeQueryParameters)&&this.authorizeQueryParameters.forEach(o=>{r.push(o)}),r.length+n.length,u.arrNotEmpty(n)){var i=n.filter(o=>o.in=="body").length;if(i==1){var s=n.filter(o=>o.in!="body"&&o.in!="header");this.addGlobalParameterToRawForm(r),s.length>0&&(this.rawFormFlag=!0,this.addApiParameterToRawForm(s)),u.arrNotEmpty(this.rawFormData)&&(this.rawFormFlag=!0),this.showTabRaw(),this.addApiParameterToRaw(n),this.updateRawFormCacheApi(t),this.rawFormFlag&&this.initFirstRawFormValue()}else{var l=n.filter(o=>o.schemaValue=="MultipartFile"||o.schemaValue=="file"||o.type=="file"||o.in=="formData"||o.in=="formdata").length;l>0?(this.showTabForm(),this.addGlobalParameterToForm(r),this.addApiParameterToForm(n),this.updateFormCacheApi(t),this.initFirstFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(t),this.initUrlFormValue())}}else this.api.contentValue=="raw"?(this.showTabRaw(),this.initFirstRawFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(t),this.initUrlFormValue());this.updateScriptFromCache(t),this.updateHeaderFromCacheApi(t),this.hideDynamicParameterTable()},updateScriptFromCache(t){u.checkUndefined(t)&&u.strNotBlank(t.rawScript)&&(this.rawScript=t.rawScript)},hideDynamicParameterTable(){this.enableDynamicParameter||(this.headerData.length==0?this.headerTableFlag=!1:this.headerTableFlag=!0,this.urlFormData.length==0?this.urlFormTableFlag=!1:this.urlFormTableFlag=!0,this.formData.length==0?this.formTableFlag=!1:this.formTableFlag=!0,this.rawFormData.length==0?this.rawFormTableFlag=!1:this.rawFormTableFlag=!0),this.initSelectionHeaders(),this.headerResetCalc()},addNewLineHeader(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",content:"",require:!1,description:"",enums:null,enumsMode:"default",new:!0};setTimeout(()=>this.addDebugHeader(t),100)}this.hideDynamicParameterTable()},addDebugHeader(t){if(u.strNotBlank(t.name)){var e=this.headerData.filter(a=>a.name==t.name);u.strBlank(t.content)?e.length==0&&this.headerData.push(t):this.headerData.push(t)}else this.headerData.push(t)},initFirstFormValue(){this.addNewLineFormValue(),this.initFormSelections()},initFormSelections(t){if(u.strNotBlank(t)){var e=this.rowFormSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowFormSelection.selectedRowKeys.push(t)}else this.formData.forEach(a=>{a.require&&this.rowFormSelection.selectedRowKeys.push(a.id)})},initRawFormSelections(t){if(u.strNotBlank(t)){var e=this.rowRawFormSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowRawFormSelection.selectedRowKeys.push(t)}else this.rawFormData.forEach(a=>{a.require&&this.rowRawFormSelection.selectedRowKeys.push(a.id)})},initUrlFormSelections(t){if(u.strNotBlank(t)){var e=this.rowUrlFormSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowUrlFormSelection.selectedRowKeys.push(t)}else this.urlFormData.forEach(a=>{a.require&&this.rowUrlFormSelection.selectedRowKeys.push(a.id)})},showTabForm(){this.formFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.formatFlag=!1,this.urlFormFlag=!1,this.requestContentType="form-data",this.toggleBeautifyButtonStatus()},showTabUrlForm(){this.urlFormFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.formFlag=!1,this.requestContentType="x-www-form-urlencoded",this.toggleBeautifyButtonStatus()},showTabRaw(){this.rawFlag=!0,this.rawMode=this.api.contentMode,this.rawDefaultText=this.api.contentShowValue,this.rawTypeFlag=!0,this.formFlag=!1,this.urlFormFlag=!1,this.rawText=u.toString(this.api.requestValue,""),this.api.xmlRequest&&(this.rawRequestType="application/xml"),this.requestContentType="raw",this.toggleBeautifyButtonStatus()},getEnumOptions(t){var e=u.propValue("enum",t,null),a=null;if(u.checkUndefined(e)){var r=[];e.forEach(n=>{r.push({value:n,label:n})}),a=r}return a},addNewLineFormValue(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",type:"text",require:!1,target:null,multipart:!1,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.formData.push(t)}else this.hideDynamicParameterTable()},addGlobalParameterToRawForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{var a={id:u.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};this.rawFormData.push(a)})},addGlobalParameterToForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{var a={id:u.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};this.formData.push(a)})},addApiParameterToRaw(t){if(u.arrNotEmpty(t)){var e=t.filter(a=>a.in=="header");e.length>0&&e.forEach(a=>{var r={id:u.randomMd5(),name:a.name,require:a.require,content:a.txtValue,description:u.propValue("description",a,""),enums:this.getEnumOptions(a),enumsMode:"default",new:!1};r.enums!=null&&(u.strNotBlank(r.content)||(r.content=r.enums[0].value)),this.addDebugHeader(r)})}},addApiParameterToForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{if(e.in=="header"){var a={id:u.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};a.enums!=null&&(u.strNotBlank(a.content)||(a.content=a.enums[0].value)),this.addDebugHeader(a)}else{var r="text",n=!1;(e.schemaValue=="MultipartFile"||e.schemaValue=="file"||e.type=="file")&&(r="file",e.type=="array"&&(n=!0));var i={id:u.randomMd5(),name:e.name,type:r,require:e.require,target:null,multipart:n,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};i.enums!=null&&(u.strNotBlank(i.content)||(i.content=i.enums[0].value)),this.formData.push(i)}})},addGlobalParameterToUrlForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{var a={id:u.randomMd5(),name:e.name,type:"text",require:!1,target:null,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};this.urlFormData.push(a)})},addApiParameterToRawForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{if(e.in=="header"){var a={id:u.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};a.enums!=null&&(u.strNotBlank(a.content)||(a.content=a.enums[0].value)),this.addDebugHeader(a)}else{var r={id:u.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};r.enums!=null&&(u.strNotBlank(r.content)||(r.content=r.enums[0].value)),this.rawFormData.push(r)}})},addApiParameterToUrlForm(t){u.arrNotEmpty(t)&&t.forEach(e=>{if(e.in=="header"){var a={id:u.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:"default",new:!1};a.enums!=null&&(u.strNotBlank(a.content)||(a.content=a.enums[0].value)),this.addDebugHeader(a)}else{var r="default";u.arrNotEmpty(e.enum)&&e.type=="array"&&(r="multiple");var n={id:u.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:u.propValue("description",e,""),enums:this.getEnumOptions(e),enumsMode:r,new:!1};n.enums!=null&&(u.strNotBlank(n.content)||(n.content=n.enums[0].value)),this.urlFormData.push(n)}})},addNewLineUrlFormValue(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.urlFormData.push(t)}else this.hideDynamicParameterTable()},addNewLineRawFormValue(){if(this.enableDynamicParameter){var t={id:u.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.rawFormData.push(t)}else this.hideDynamicParameterTable()},initFirstRawFormValue(){this.addNewLineRawFormValue(),this.initRawFormSelections()},initUrlFormValue(){this.addNewLineUrlFormValue(),this.initUrlFormSelections()},initShowFormTable(){this.requestContentType=="x-www-form-urlencoded"?(this.urlFormFlag=!0,this.formFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):this.requestContentType=="form-data"?(this.formFlag=!0,this.urlFormFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):this.requestContentType=="raw"&&(this.rawFlag=!0,this.rawTypeFlag=!0,this.urlFormFlag=!1,this.formFlag=!1),this.toggleBeautifyButtonStatus()},initSelectionHeaders(t){if(u.strNotBlank(t)){var e=this.rowSelection.selectedRowKeys.filter(a=>a==t).length;e==0&&this.rowSelection.selectedRowKeys.push(t)}else this.headerData.forEach(a=>{a.require&&this.rowSelection.selectedRowKeys.push(a.id)})},headerContentEnumChnage(t,e){var a=e.context.$attrs["data-key"];this.headerContentChnageUpdate(t,a)},headerCookieValue(t){t.name.toLowerCase()=="cookie"&&(document.cookie=t.content)},headerContentChnage(t){var e=t.target.value,a=t.target.getAttribute("data-key");this.headerContentChnageUpdate(e,a)},headerContentChnageUpdate(t,e){var a=this.headerData.filter(r=>r.id==e)[0];a.new?(this.headerData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1,this.headerCookieValue(r))}),this.addNewLineHeader()):this.headerData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1,this.headerCookieValue(r))}),this.initSelectionHeaders(a.id),this.headerResetCalc()},headerNameFilterOption(t,e){return e?e.key.toUpperCase().indexOf(t.toUpperCase())>=0:!1},headerSelect(t,e){this.headerSelectName=t,e.name=t,e.new=!1},headerSearch(t){this.headerSelectName=t},headerNameChange(t){t.new?(this.headerData.forEach(e=>{e.id==t.id&&(e.name=this.headerSelectName,e.new=!1)}),this.addNewLineHeader()):this.headerData.forEach(e=>{e.id==t.id&&(e.name=this.headerSelectName,e.new=!1)}),this.initSelectionHeaders(t.id),this.headerResetCalc()},headerDelete(t){var e=[];this.headerData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.headerData=e,this.headerResetCalc()},headerResetCalc(){var t=this.headerData.filter(e=>e.new==!1);t.length>0?(this.headerCountFlag=!0,this.headerCount=t.length):(this.headerCountFlag=!1,this.headerCount=0)},requestContentTypeChange(t){this.requestContentType=t.target.value,this.initShowFormTable()},formDelete(t){var e=[];this.formData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.formData=e},formFileUploadClick(t){document.getElementById("file"+t.id).click()},formNameChange(t){var e=t.target.value,a=t.target.getAttribute("data-key"),r=this.formData.filter(n=>n.id==a)[0];r.new?(this.formData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.addNewLineFormValue()):this.formData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.initFormSelections(r.id)},formTypeChange(t,e){var a=t.split("-"),r=a[0],n=a[1];this.formData.forEach(i=>{i.id==n&&(i.content="",i.type=r)})},formFileChange(t){for(var e=t.target.files,a=[],r=0;ro.id==s)[0];l.new?(this.formData.forEach(o=>{o.id==l.id&&(o.content=n,o.target=i,o.new=!1)}),this.addNewLineFormValue()):this.formData.forEach(o=>{o.id==l.id&&(o.content=n,o.target=i,o.new=!1)}),this.initFormSelections(l.id)},formContentUpdate(t,e){var a=this.formData.filter(r=>r.id==e)[0];a.new?(this.formData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.addNewLineFormValue()):this.formData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.initFormSelections(a.id)},formContentEnumChange(t,e){var a=e.context.$attrs["data-key"];this.formContentUpdate(t,a)},formContentChange(t){var e=t.target.value,a=t.target.getAttribute("data-key");this.formContentUpdate(e,a)},rawFormDelete(t){var e=[];this.rawFormData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.rawFormData=e},urlFormDelete(t){var e=[];this.urlFormData.forEach(a=>{a.id!=t.id&&e.push(a)}),this.urlFormData=e},rawFormNameChange(t){var e=t.target.value,a=t.target.getAttribute("data-key"),r=this.rawFormData.filter(n=>n.id==a)[0];r.new?(this.rawFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.addNewLineRawFormValue()):this.rawFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.initRawFormSelections(r.id)},urlFormNameChange(t){var e=t.target.value,a=t.target.getAttribute("data-key"),r=this.urlFormData.filter(n=>n.id==a)[0];r.new?(this.urlFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.addNewLineUrlFormValue()):this.urlFormData.forEach(n=>{n.id==r.id&&(n.name=e,n.new=!1)}),this.initUrlFormSelections(r.id)},rawFormContentUpdate(t,e){var a=this.rawFormData.filter(r=>r.id==e)[0];a.new?(this.rawFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.addNewLineRawFormValue()):this.rawFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.initRawFormSelections(a.id)},rawFormContentEnumChange(t,e){var a=e.context.$attrs["data-key"];this.rawFormContentUpdate(t,a)},rawFormContentChange(t){var e=t.target.value,a=t.target.getAttribute("data-key");this.rawFormContentUpdate(e,a)},urlFormContentUpdate(t,e){var a=this.urlFormData.filter(r=>r.id==e)[0];a.new?(this.urlFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.addNewLineUrlFormValue()):this.urlFormData.forEach(r=>{r.id==a.id&&(r.content=t,r.new=!1)}),this.initUrlFormSelections(a.id)},urlFormContentEnumChange(t,e){if(u.checkUndefined(e)){var a="";Array.isArray(e)?a=e[0].context.$attrs["data-key"]:a=e.context.$attrs["data-key"],this.urlFormContentUpdate(t,a)}},urlFormContentChange(t){const e=t.target.value,a=t.target.getAttribute("data-key");this.urlFormContentUpdate(e,a)},rawMenuClick({item:t,key:e,keyPath:a}){this.rawMode=t["data-mode"],this.rawRequestType=t["data-mode-type"],this.rawDefaultText=e,this.toggleBeautifyButtonStatus()},beautifyJson(){let t=this.rawText;if(u.strNotBlank(t))try{let e=u.json5stringify(u.json5parse(t));this.rawText=e}catch(e){console.error(e)}},toggleBeautifyButtonStatus(){let t=!1;this.rawFlag&&this.rawMode=="json"&&(t=!0),this.formatFlag=t},sendRestfulApi(t){t.preventDefault();var e=this.validateCommonHeaders();e.validate?this.rawFlag?this.debugSendRawRequest():this.formFlag?this.debugSendFormRequest():this.urlFormFlag&&this.debugSendUrlFormRequest():Z.info(e.message)},callChildEditorShow(){this.bigFlag||this.$refs.childDebugResponse.showEditorFieldDescription()},debugHeaders(){var t={},e=this.api;if(e.produces!=null&&e.produces!=null&&e.produces.length>0){var a=e.produces[0];t.Accept=a}return this.headerData.forEach(r=>{if(!r.new){var n=this.rowSelection.selectedRowKeys.filter(i=>i==r.id);n.length>0&&u.strNotBlank(r.name)&&r.name.toLowerCase()!="cookie"&&(u.isChinese(r.content)?t[r.name]=encodeURIComponent(r.content):t[r.name]=u.toString(r.content,""))}}),t["Request-Origion"]="Knife4j",u.checkUndefined(t["Content-Type"])||(this.rawFlag?t["Content-Type"]=this.rawRequestType:this.urlFormFlag?t["Content-Type"]="application/x-www-form-urlencoded":this.formFlag&&(this.validateFormDataContaintsFile()?t["Content-Type"]="multipart/form-data":t["Content-Type"]="application/x-www-form-urlencoded")),u.checkUndefined(this.routeHeader)&&(t["knfie4j-gateway-request"]=this.routeHeader),this.swaggerInstance.desktop&&(t["knife4j-gateway-code"]=this.swaggerInstance.desktopCode),t},debugRawFormParams(){var t={};return this.rawFormData.forEach(e=>{if(!e.new){var a=this.rowRawFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&u.strNotBlank(e.name)&&(t[e.name]=e.content)}}),t},debugUrlFormParams(){var t={};return this.urlFormData.forEach(e=>{if(!e.new){var a=this.rowUrlFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&u.strNotBlank(e.name)&&(t[e.name]=e.content)}}),t},debugFormDataParams(t){var e={url:"",params:{}},a=this.debugUrl;if(t){var r=new FormData;this.formData.forEach(i=>{if(!i.new){var s=this.rowFormSelection.selectedRowKeys.filter(d=>d==i.id);if(s.length>0&&u.strNotBlank(i.name)){if(i.type=="text")if(this.debugPathFlag)if(this.debugPathParams.indexOf(i.name)==-1)u.strNotBlank(i.content)&&r.append(i.name,i.content);else{var l="{"+i.name+"}";a=a.replace(l,i.content)}else u.strNotBlank(i.content)&&r.append(i.name,i.content);else if(u.checkUndefined(i.target)){var o=i.target.files;if(o.length>0)for(var f=0;f{if(!i.new){var s=this.rowFormSelection.selectedRowKeys.filter(o=>o==i.id);if(s.length>0&&u.strNotBlank(i.name))if(this.debugPathFlag)if(this.debugPathParams.indexOf(i.name)==-1)n[i.name]=i.content;else{var l="{"+i.name+"}";a=a.replace(l,i.content)}else n[i.name]=i.content}}),e.params=n}return e.url=a,e},debugStreamFlag(){var t=!1,e=this.api;if(e.produces!=null&&e.produces!=null&&e.produces.length>0){e.produces[0];var a=u.binaryContentType(e.produces,null);t=a.binary}return t},validateCommonHeaders(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require&&!u.strNotBlank(r.content)){t=!1,e=this.i18n.validate.header+r.name+this.i18n.validate.notEmpty;break}}}return{validate:t,message:e}},validateFormData(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require){if(r.type=="text"){if(!u.strNotBlank(r.content)){t=!1,e=r.name+this.i18n.validate.notEmpty;break}}else if(r.target==null){t=!1,e=r.name+this.i18n.validate.fileNotEmpty;break}}}}return{validate:t,message:e}},validateRawForm(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require&&!u.strNotBlank(r.content)){t=!1,e=r.name+this.i18n.validate.notEmpty;break}}}return{validate:t,message:e}},validateUrlForm(){for(var t=!0,e="",a=0;ai==r.id);if(n.length>0&&u.strNotBlank(r.name)&&r.require&&!u.strNotBlank(r.content)){t=!1,e=r.name+this.i18n.validate.notEmpty;break}}}return{validate:t,message:e}},validateFormDataContaintsFile(){var t=!1;return this.formData.forEach(e=>{if(!e.new){var a=this.rowFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&e.type=="file"&&(t=!0)}}),t},checkUrlParams(t){var e=t.indexOf("?"),a={result:!1,params:{},url:t};if(e>-1){var r=t.substring(e+1);if(a.url=t.substring(0,e),a.result=!0,u.strNotBlank(r)){var n=r.split("&");n.forEach(i=>{if(u.strNotBlank(i)){var s=i.split("=");s.length==2&&(a.params[s[0]]=s[1])}})}}return a},debugSendHasCookie(t){var e=!1;if(u.checkUndefined(t)){var a=Object.keys(t);if(u.arrNotEmpty(a)){var r=a.filter(i=>i.toLocaleLowerCase()==="cookie").length;if(r>0){var n=t.Cookie;u.strNotBlank(n)&&(document.cookie=n,e=!0)}}}return e},applyRequestParams(t,e){var a=null,r=null;return["post","put","patch"].includes(e.toLowerCase())?u.checkUndefined(t)&&(a=hn.stringify(t)):r=t,{data:a,params:r}},debugCheckUrl(t){var e=t;try{var a=new RegExp(".*?({.*?})$","ig");if(a.test(t)){var r=RegExp.$1;e=t.replace(r,"")}}catch(n){window.console&&console.error(n)}return e},debugSendUrlFormRequest(){var t=this.validateUrlForm();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var e=this.debugHeaders(),a=this.debugUrl,r=this.debugMethodType.toLowerCase(),n=this.debugUrlFormParams();if(this.debugPathFlag){const c={};this.debugPathParams.forEach(p=>{var g="{"+p+"}",S=u.getValue(n,p,"",!0);a=a.replace(g,S)});for(var i in n)this.debugPathParams.indexOf(i)==-1&&(c[i]=n[i]);n=c}var s=this.checkUrlParams(a);s.result&&(a=s.url,n=Object.assign(n,s.params));let d="";this.enableHost&&(d=this.enableHostText);var l=this.applyRequestParams(n,r),o={baseURL:d,url:this.debugCheckUrl(a),method:r,headers:e,params:l.params,timeout:0,withCredentials:this.debugSendHasCookie(e),data:l.data};this.oas2?this.debugStreamFlag()&&(o={...o,responseType:"blob"}):o={...o,responseType:"blob"};const y=Ue.create();y.interceptors.request.use(c=>{let p=c.url;if(c.method==="get"&&c.params){p+="?";let g=Object.keys(c.params);for(let S of g)u.strNotBlank(c.params[S])&&(p+=`${encodeURIComponent(S)}=${encodeURIComponent(c.params[S])}&`);p=p.substring(0,p.length-1),c.params={}}return c.url=p,c});var f=new Date;y.request(o).then(c=>{this.debugLoading=!1,this.handleDebugSuccess(f,new Date,c)}).catch(c=>{this.debugLoading=!1,c.response?this.handleDebugError(f,new Date,c.response):Z.error(c.message)})}else Z.info(t.message)},debugSendFormRequest(){var t=this.validateFormData();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var e=this.debugHeaders(),a=this.debugUrl,r=this.debugMethodType.toLowerCase(),n=this.validateFormDataContaintsFile(),i=this.debugFormDataParams(n);a=i.url;var s=i.params;let d="";this.enableHost&&(d=this.enableHostText);var l={baseURL:d,url:this.debugCheckUrl(a),method:r,headers:e,timeout:0,withCredentials:this.debugSendHasCookie(e),data:null};if(n)l={...l,data:s};else{var o=this.checkUrlParams(a);o.result&&(a=o.url,s=Object.assign(s,o.params)),l={...l,params:s}}this.debugStreamFlag()&&(l={...l,responseType:"blob"});let y=Ue.create();var f=new Date;y.request(l).then(c=>{this.debugLoading=!1,this.handleDebugSuccess(f,new Date,c)}).catch(c=>{this.debugLoading=!1,c.response?this.handleDebugError(f,new Date,c.response):Z.error(c.message)})}else Z.info(t.message)},debugSendRawRequest(){var t=this.validateRawForm();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var e=this.debugHeaders(),a=this.debugUrl,r=this.debugMethodType.toLowerCase(),n=this.rawText,i=this.debugRawFormParams();if(this.debugPathFlag){const y={};this.debugPathParams.forEach(c=>{var p="{"+c+"}",g=u.getValue(i,c,"",!0);a=a.replace(p,g)});for(var s in i)this.debugPathParams.indexOf(s)==-1&&(y[s]=i[s]);i=y}var l=this.checkUrlParams(a);l.result&&(a=l.url,i=Object.assign(i,l.params));let d="";this.enableHost&&(d=this.enableHostText);var o={baseURL:d,url:this.debugCheckUrl(a),method:r,headers:e,params:i,data:n,withCredentials:this.debugSendHasCookie(e),timeout:0};this.debugStreamFlag()&&(o={...o,responseType:"blob"});var f=new Date;Ue.create().request(o).then(y=>{this.debugLoading=!1,this.handleDebugSuccess(f,new Date,y)}).catch(y=>{this.debugLoading=!1,y.response?this.handleDebugError(f,new Date,y.response):Z.error(y.message)})}else Z.info(t.message)},executeAfterScript(t){if(u.strNotBlank(this.rawScript)){var e=this.swaggerInstance.id,a=this.swaggerInstance.allGroupIds,r={allgroupids:a,groupid:e,response:{data:t.data,headers:t.headers}},n=new mn(r);try{var i=new Function("ke",this.rawScript);i(n),setTimeout(()=>{n.global.action()},1e3)}catch(s){console.error(s)}}},handleDebugSuccess(t,e,a){this.bigFlag=!1,this.bigBlobFlag=!1,this.setResponseBody(a),this.setResponseHeaders(a.headers),this.setResponseRaw(a),this.setResponseStatus(t,e,a),this.setResponseCurl(a.request),this.callChildEditorShow(),this.executeAfterScript(a),this.storeApiParams()},handleDebugError(t,e,a){this.bigFlag=!1,this.bigBlobFlag=!1,this.setResponseBody(a),this.setResponseHeaders(a.headers),this.setResponseRaw(a),this.setResponseStatus(t,e,a),this.setResponseCurl(a.request),this.callChildEditorShow(),this.storeApiParams()},storeApiParams(){if(this.enableRequestCache){var t={headerData:[],formData:[],urlFormData:[],rawFormData:[],rawText:""},e=I.debugCacheApiId+this.api.id;t.headerData=this.headerData.filter(a=>a.new==!1),t.formData=this.formData.filter(a=>a.new==!1),t.urlFormData=this.urlFormData.filter(a=>a.new==!1),t.rawFormData=this.rawFormData.filter(a=>a.new==!1),t.rawText=this.rawText,t.rawScript=this.rawScript,L.setItem(e,t)}},setResponseHeaders(t){var e=[];if(u.checkUndefined(t))for(var a in t){var r={id:u.randomMd5(),name:a,value:t[a]};e.push(r)}this.responseHeaders=e},setResponseRaw(t){if(u.checkUndefined(t)){var e=t.request;if(t.headers,u.checkUndefined(e)&&e.responseType!="blob"){var a=u.toString(e.responseText,"");this.responseRawText=a}}},setResponseStatus(t,e,a){if(u.checkUndefined(a)){var r=a.request;if(u.checkUndefined(r)){var n="",i=e.getTime()-t.getTime(),s=r.status;if(i>1e3){var l=Math.floor(i/1e3).toFixed(1);n=l+"s"}else n=i+"ms";var o=0;r.responseType=="blob"?o=r.response.size:u.checkUndefined(r.responseText)&&(o=r.responseText.gblen()),this.responseStatus={code:s,cost:n,size:o}}}},setResponseCurl(t){var e=this,a=this.debugCheckUrl(this.debugUrl),r=new Array,n="http",i=window.location.href,s=new RegExp("^https.*","ig");s.test(i)&&(n="https");var l=new RegExp("^(http|https):.*","ig"),o="";l.test(this.api.host)?o=this.api.host:o=n+":// "+this.api.host,this.enableHost&&(o=this.enableHostText),a.startsWith("/")||(o+="/"),o+=a,r.push("curl"),r.push("-X",this.debugMethodType.toUpperCase());var f=this.debugHeaders(),d=[];if(d.push("knfie4j-gateway-request"),d.push("knife4j-gateway-code"),d.push("Request-Origion"),u.checkUndefined(f))for(var y in f)d.includes(y)||(r.push("-H "),r.push('"'+y+":"+f[y]+'"'));if(this.rawFlag){var c=this.debugRawFormParams(),p=[];if(u.checkUndefined(c))for(var g in c)if(e.debugPathFlag)if(e.debugPathParams.indexOf(g)==-1)p.push(g+"="+u.toString(c[g],""));else{var S="{"+g+"}",D=u.toString(c[g],"");o=o.replace(S,D)}else p.push(g+"="+u.toString(c[g],""));var v=p.join("&");if(u.strNotBlank(v)&&(o.indexOf("?")==-1?o=o+"?"+v:o=o+"&"+v),u.strNotBlank(this.rawText))try{var R=JSON.parse(this.rawText),B=JSON.stringify(R).replace(/\\n/g,"").replace(/"/g,'\\"');r.push("-d"),r.push('"'+B+'"')}catch{var B=this.rawText.replace(/\\n/g,"").replace(/"/g,'\\"');r.push("-d"),r.push('"'+B+'"')}}else if(this.urlFormFlag){var N=this.debugUrlFormParams();if(u.checkUndefined(N)){var p=[];for(var g in N)if(e.debugPathFlag)if(e.debugPathParams.indexOf(g)==-1)p.push(g+"="+u.toString(N[g],""));else{var S="{"+g+"}",D=u.toString(N[g],"");o=o.replace(S,D)}else p.push(g+"="+u.toString(N[g],""));var v=p.join("&");u.strNotBlank(v)&&(this.debugMethodType.toLowerCase()=="get"||this.debugMethodType.toLowerCase()=="delete"?o.indexOf("?")==-1?o=o+"?"+v:o=o+"&"+v:(r.push("--data-urlencode "),r.push('"'+v+'"')))}}else if(this.formFlag){var _=this.debugFormCurlParams();if(u.checkUndefined(_))if(this.validateFormDataContaintsFile())this.formData.forEach(P=>{if(!P.new){var q=this.rowFormSelection.selectedRowKeys.filter(J=>J==P.id);q.length>0&&u.strNotBlank(P.name)&&(r.push("-F "),P.type=="text"?r.push('"'+P.name+"="+u.toString(P.content,"")+'"'):r.push('"'+P.name+"=@"+P.content+'"'))}});else{var p=[];for(var g in _)if(e.debugPathFlag)if(e.debugPathParams.indexOf(g)==-1)p.push(g+"="+u.toString(_[g],""));else{var S="{"+g+"}",D=u.toString(_[g],"");o=o.replace(S,D)}else p.push(g+"="+u.toString(_[g],""));var v=p.join("&");u.strNotBlank(v)&&(this.debugMethodType.toLowerCase()=="get"||this.debugMethodType.toLowerCase()=="delete"?o.indexOf("?")==-1?o=o+"?"+v:o=o+"&"+v:(r.push("--data-urlencode "),r.push('"'+v+'"')))}}r.push('"'+encodeURI(o)+'"'),this.responseCurlText=r.join(" ")},debugFormCurlParams(){var t={};return this.formData.forEach(e=>{if(!e.new){var a=this.rowFormSelection.selectedRowKeys.filter(r=>r==e.id);a.length>0&&u.strNotBlank(e.name)&&(t[e.name]=e.content)}}),t},setResponseBody(t){let e=this;if(u.checkUndefined(t)){var a=t.request,r=t.headers;if(u.checkUndefined(a)){var n=u.propValue("content-type",r,""),i=u.propValue("content-disposition",r,"");if(a.responseType=="blob"||u.strNotBlank(i))if(t.data.type=="application/json"||t.data.type=="application/xml"||t.data.type=="text/html"||t.data.type=="text/plain"){const D=new FileReader;D.onload=v=>{let R={responseText:v.target.result,response:v.target.result,responseType:"",status:a.status,statusText:a.statusText,readyState:a.readyState,timeout:a.timeout,withCredentials:a.withCredentials};e.setResponseJsonBody(R,r)},D.readAsText(t.data)}else if(n=="text/html"||n=="text/plain"||n=="application/xml")this.setResponseJsonBody(a,r);else{let D=!1;var s="Knife4j.txt";if(u.strNotBlank(i)||(i=u.propValue("content-disposition",r,"")),u.strNotBlank(i))for(var l=i.split(";"),o=0;o-1&&(D=!0);var d=f.split("=");if(d!=null&&d.length>0){var y=d[0];if(y!=null&&y!=null&&y!=""&&(y.toLowerCase()=="filename*"||y.toLowerCase()=="filename")){let v=d[1].replace(/\"/g,"");s=decodeURIComponent(v)}}}}var c=!1;if(n.indexOf("image")!=-1)c=!0;else{var p=["bmp","jpg","png","tif","gif","pcx","tga","exif","fpx","svg","psd","cdr","pcd","dxf","ufo","eps","ai","raw","WMF","webp"];p.forEach(v=>{s.endsWith(v)&&(c=!0)})}var g=this.api.produces,S=!1;if(u.arrNotEmpty(g)&&g.forEach(v=>{v.indexOf("image")!=-1&&(S=!0)}),c||(c=S),D)this.setResponseJsonBody(a,r);else{let v="";try{v=window.URL?window.URL.createObjectURL(t.data):window.webkitURL.createObjectURL(t.data)}catch(R){window.console&&window.console.error(R);let B=[].concat(t.data),N=new Blob(B);v=window.URL?window.URL.createObjectURL(N):window.webkitURL.createObjectURL(N)}this.responseContent={text:"",mode:"blob",blobFlag:!0,imageFlag:c,blobFileName:s,blobUrl:v,base64:""}}}else this.setResponseJsonBody(a,r)}}},setResponseJsonBody(t,e){var a="",r="",n=this.getContentTypeByHeaders(e);if(n=="json"){var i=t.responseText.gblen(),s=(i/1024).toFixed(1),l=150;if(this.bigBlobFlag=s>300,s>l){this.bigFlag=!0;var o=this.i18n.message.debug.contentToBig;Z.info(o),n="text"}else if(u.strNotBlank(t.responseText))try{a=u.json5stringify(u.json5parse(t.responseText))}catch{a=t.responseText,n="text"}if(u.strNotBlank(t.responseText)&&!this.bigFlag&&t.responseText.indexOf("data:image")>-1){var f=new RegExp('.*?"(data:image.*?base64.*?)".*',"ig");if(f.test(t.responseText)){var d=RegExp.$1;r=d}}}else if(n=="xml"){var y=t.responseText;u.strNotBlank(y)?a=new Q().xml(y):a=y}else a=t.responseText;this.responseContent={text:a,mode:n,blobFlag:!1,imageFlag:!1,blobFileName:"",blobUrl:"",base64:r}},debugEditorChange(t){u.checkUndefined(this.responseContent)&&(this.responseContent.text=t)},getContentTypeByHeaders(t){var e="json",a=u.propValue("Content-Type",t,"");return u.strNotBlank(a)||(a=u.propValue("content-type",t,"")),u.strNotBlank(a)&&(a.indexOf("json")>=0?e="json":a.indexOf("xml")>=0?e="xml":a.indexOf("text/html")>=0?e="html":e="text"),e},debugShowFieldDescriptionChange(t){this.responseFieldDescriptionChecked=t}}},wn=t=>(ya("data-v-2ed131ca"),t=t(),ga(),t),bn={class:"knife4j-debug"},Sn={class:"spin-content"},Fn={key:0,class:"knife4j-api-summary-method"},Cn={class:"knife4j-debug-request-type"},kn={class:"knife4j-debug-request-content-type-float"},En={class:"knife4j-debug-request-content-type-float"},Dn={class:"knife4j-debug-request-content-type-raw"},xn={class:"knife4j-debug-raw-span"},Rn={key:0,class:"knife4j-debug-request-content-type-beautify"},_n={key:0},Tn={key:1},On={key:0,style:{display:"none"}},Nn=["id","data-key"],Pn={key:1,style:{display:"none"}},Un=["id","data-key"],An=wn(()=>U("a",{href:"https://gitee.com/xiaoym/knife4j/wikis/AfterScript",target:"_blank"},"\u53C2\u8003\u6587\u6863",-1));function In(t,e,a,r,n,i){const s=me("UnlockOutlined"),l=Zt,o=ea,f=ta,d=aa,y=ra,c=na,p=ia,g=oa,S=la,D=sa,v=ua,R=fa,B=da,N=me("DownOutlined"),_=ca,P=pa,q=ha,J=me("editor-debug-show"),j=me("editor-script"),Y=ma,z=me("DebugResponse"),X=Yt;return b(),V("div",bn,[w(X,{tip:"Loading...",spinning:n.debugLoading},{default:m(()=>[U("div",Sn,[w(p,null,{default:m(()=>[w(c,{class:oe("knife4j-debug-api-"+n.debugMethodType.toLowerCase()),span:24},{default:m(()=>[w(y,{compact:""},{default:m(()=>[a.api.securityFlag?(b(),V("span",Fn,[w(s,{style:{"font-size":"16px"}})])):T("",!0),w(f,{style:Xt(n.debugUrlStyle),value:n.debugUrl,onChange:i.debugUrlChange},{addonBefore:m(()=>[w(o,{value:n.debugMethodType,"onUpdate:value":e[0]||(e[0]=F=>n.debugMethodType=F),style:{width:"110px"}},{default:m(()=>[w(l,{value:"GET"},{default:m(()=>[k("GET")]),_:1}),w(l,{value:"POST"},{default:m(()=>[k("POST")]),_:1}),w(l,{value:"PUT"},{default:m(()=>[k("PUT")]),_:1}),w(l,{value:"PATCH"},{default:m(()=>[k("PATCH")]),_:1}),w(l,{value:"DELETE"},{default:m(()=>[k("DELETE")]),_:1}),w(l,{value:"COPY"},{default:m(()=>[k("COPY")]),_:1}),w(l,{value:"HEAD"},{default:m(()=>[k("HEAD")]),_:1}),w(l,{value:"OPTIONS"},{default:m(()=>[k("OPTIONS")]),_:1}),w(l,{value:"LINK"},{default:m(()=>[k("LINK")]),_:1}),w(l,{value:"UNLINK"},{default:m(()=>[k("UNLINK")]),_:1}),w(l,{value:"PURGE"},{default:m(()=>[k("PURGE")]),_:1})]),_:1},8,["value"])]),_:1},8,["style","value","onChange"]),w(d,{class:"knife4j-api-send",type:"primary",onClick:i.sendRestfulApi},{default:m(()=>[k(H(t.$t("debug.send")),1)]),_:1},8,["onClick"]),r.enableReloadCacheParameter?(b(),E(d,{key:1,onClick:i.reloadCacheParameter},{default:m(()=>[k("\u5237\u65B0\u53D8\u91CF")]),_:1},8,["onClick"])):T("",!0),w(d,{onClick:i.resetCacheParameter},{default:m(()=>[k("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["class"])]),_:1}),w(p,{class:"knife4j-debug-tabs"},{default:m(()=>[w(Y,{defaultActiveKey:"2"},{default:m(()=>[w(v,{key:"1"},{tab:m(()=>[U("span",null,[n.headerCountFlag?(b(),E(g,{key:0,color:"red",class:"knife4j-debug-param-count"},{default:m(()=>[k(H(n.headerCount),1)]),_:1})):T("",!0),U("span",null,H(t.$t("debug.headers")),1)])]),default:m(()=>[n.headerTableFlag?(b(),E(D,{key:0,bordered:"",size:"small",rowSelection:n.rowSelection,columns:n.headerColumn,pagination:n.pagination,dataSource:n.headerData,rowKey:"id"},{bodyCell:m(({column:F,record:h})=>[F.dataIndex==="name"?(b(),E(S,{key:0,onSelect:x=>i.headerSelect(x,h),"data-id":h.id,onSearch:i.headerSearch,onChange:x=>i.headerNameChange(h),value:h.name,filterOption:i.headerNameFilterOption,allowClear:n.allowClear,dataSource:n.headerAutoOptions,style:{width:"100%"},placeholder:t.$t("debug.tableHeader.holderName")},null,8,["onSelect","data-id","onSearch","onChange","value","filterOption","allowClear","dataSource","placeholder"])):F.dataIndex==="content"?(b(),V(Se,{key:1},[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:h.text,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.headerContentEnumChnage},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:t.$t("debug.tableHeader.holderValue"),class:oe("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:h.content,onChange:i.headerContentChnage},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))],64)):(b(),E(p,{key:2},{default:m(()=>[h.new?T("",!0):(b(),E(d,{key:0,type:"link",onClick:x=>i.headerDelete(h)},{default:m(()=>[k(H(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))]),_:2},1024))]),_:1},8,["rowSelection","columns","pagination","dataSource"])):T("",!0)]),_:1}),w(v,{tab:t.$t("debug.params"),key:"2",forceRender:""},{default:m(()=>[U("div",Cn,[U("div",kn,[w(B,{onChange:i.requestContentTypeChange,class:"knife4j-debug-request-content-type",value:n.requestContentType,"onUpdate:value":e[1]||(e[1]=F=>n.requestContentType=F)},{default:m(()=>[w(R,{value:"x-www-form-urlencoded"},{default:m(()=>[k("x-www-form-urlencoded")]),_:1}),w(R,{value:"form-data"},{default:m(()=>[k("form-data")]),_:1}),w(R,{value:"raw"},{default:m(()=>[k("raw")]),_:1})]),_:1},8,["onChange","value"])]),U("div",En,[U("div",Dn,[n.rawTypeFlag?(b(),E(q,{key:0},{overlay:m(()=>[w(P,{onClick:i.rawMenuClick},{default:m(()=>[w(_,{"data-mode-type":"application/json","data-mode":"text",key:"Auto"},{default:m(()=>[k("Auto")]),_:1}),w(_,{"data-mode-type":"text/plain","data-mode":"text",key:"Text(text/plain)"},{default:m(()=>[k(" Text(text/plain)")]),_:1}),w(_,{"data-mode-type":"application/json","data-mode":"json",key:"JSON(application/json)"},{default:m(()=>[k(" JSON(application/json)")]),_:1}),w(_,{"data-mode-type":"application/javascript","data-mode":"javascript",key:"Javascript(application/Javascript)"},{default:m(()=>[k("Javascript(application/Javascript)")]),_:1}),w(_,{"data-mode-type":"application/xml","data-mode":"xml",key:"XML(application/xml)"},{default:m(()=>[k(" XML(application/xml)")]),_:1}),w(_,{"data-mode-type":"text/xml","data-mode":"xml",key:"XML(text/xml)"},{default:m(()=>[k("XML(text/xml) ")]),_:1}),w(_,{"data-mode-type":"text/html","data-mode":"html",key:"HTML(text/html)"},{default:m(()=>[k("HTML(text/html) ")]),_:1})]),_:1},8,["onClick"])]),default:m(()=>[U("span",xn,[U("span",null,H(n.rawDefaultText),1),w(N)])]),_:1})):T("",!0)])]),n.formatFlag?(b(),V("div",Rn,[U("a",{onClick:e[2]||(e[2]=(...F)=>i.beautifyJson&&i.beautifyJson(...F))},"Beautify")])):T("",!0)]),n.formFlag?(b(),E(p,{key:0},{default:m(()=>[n.formTableFlag?(b(),E(D,{key:0,bordered:"",size:"small",rowSelection:n.rowFormSelection,columns:n.formColumn,pagination:n.pagination,dataSource:n.formData,rowKey:"id"},{bodyCell:m(({column:F,record:h})=>[F.dataIndex=="name"?(b(),E(f,{key:0,placeholder:h.description,"data-key":h.id,defaultValue:h.name,onChange:i.formNameChange},null,8,["placeholder","data-key","defaultValue","onChange"])):F.dataIndex=="type"?(b(),E(o,{key:1,defaultValue:h.name+"-"+h.id,onChange:i.formTypeChange,style:{width:"100%"}},{default:m(()=>[w(l,{value:"text-"+h.id},{default:m(()=>[U("span",null,H(t.$t("debug.form.itemText")),1)]),_:2},1032,["value"]),w(l,{value:"file-"+h.id},{default:m(()=>[U("span",null,H(t.$t("debug.form.itemFile")),1)]),_:2},1032,["value"])]),_:2},1032,["defaultValue","onChange"])):F.dataIndex=="content"?(b(),V(Se,{key:2},[h.type=="text"?(b(),V("div",_n,[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:h.content,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.formContentEnumChange},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:h.description,class:oe("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:h.content,onChange:i.formContentChange},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))])):(b(),V("div",Tn,[U("div",null,[h.multipart?(b(),V("div",On,[U("input",{id:"file"+h.id,multiple:"",style:{display:"none"},type:"file","data-key":h.id,onChange:e[3]||(e[3]=(...x)=>i.formFileChange&&i.formFileChange(...x))},null,40,Nn)])):(b(),V("div",Pn,[U("input",{id:"file"+h.id,style:{display:"none"},type:"file","data-key":h.id,onChange:e[4]||(e[4]=(...x)=>i.formFileChange&&i.formFileChange(...x))},null,40,Un)])),w(y,{compact:""},{default:m(()=>[w(f,{style:{width:"80%"},class:oe("knife4j-debug-param-require"+h.require),value:h.content,disabled:""},null,8,["class","value"]),w(d,{onClick:x=>i.formFileUploadClick(h),class:"knife4j-api-send",style:{width:"80px"},type:"primary"},{default:m(()=>[k(H(t.$t("debug.form.upload")),1)]),_:2},1032,["onClick"])]),_:2},1024)])]))],64)):(b(),V(Se,{key:3},[h.new?T("",!0):(b(),E(d,{key:0,type:"link",onClick:x=>i.formDelete(h)},{default:m(()=>[k(H(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))],64))]),_:1},8,["rowSelection","columns","pagination","dataSource"])):T("",!0)]),_:1})):T("",!0),n.urlFormFlag?(b(),E(p,{key:1},{default:m(()=>[n.urlFormTableFlag?(b(),E(D,{key:0,bordered:"",size:"small",rowSelection:n.rowUrlFormSelection,columns:n.urlFormColumn,pagination:n.pagination,dataSource:n.urlFormData,rowKey:"id"},{bodyCell:m(({column:F,record:h})=>[F.dataIndex=="name"?(b(),E(f,{key:0,placeholder:h.description,"data-key":h.id,defaultValue:h.name,onChange:i.urlFormNameChange},null,8,["placeholder","data-key","defaultValue","onChange"])):F.dataIndex=="content"?(b(),V(Se,{key:1},[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:h.type,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.urlFormContentEnumChange},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:h.description,class:oe("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:h.content,onChange:i.urlFormContentChange},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))],64)):(b(),E(p,{key:2},{default:m(()=>[h.new?T("",!0):(b(),E(d,{key:0,type:"link",onClick:x=>i.urlFormDelete(h)},{default:m(()=>[k(H(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))]),_:2},1024))]),_:1},8,["rowSelection","columns","pagination","dataSource"])):T("",!0)]),_:1})):T("",!0),n.rawFlag?(b(),E(p,{key:2},{default:m(()=>[n.rawFormFlag?(b(),E(p,{key:0},{default:m(()=>[n.rawFormTableFlag?(b(),E(D,{key:0,bordered:"",size:"small",rowSelection:n.rowRawFormSelection,columns:n.urlFormColumn,pagination:n.pagination,dataSource:n.rawFormData,rowKey:"id"},{urlFormName:m(({text:F,record:h})=>[w(f,{placeholder:h.description,"data-key":h.id,defaultValue:F,onChange:i.rawFormNameChange},null,8,["placeholder","data-key","defaultValue","onChange"])]),urlFormValue:m(({text:F,record:h})=>[h.enums!=null?(b(),E(p,{key:0},{default:m(()=>[w(o,{mode:h.enumsMode,defaultValue:F,"data-key":h.id,options:h.enums,style:{width:"100%"},onChange:i.rawFormContentEnumChange},null,8,["mode","defaultValue","data-key","options","onChange"])]),_:2},1024)):(b(),E(p,{key:1},{default:m(()=>[w(f,{placeholder:h.description,class:oe("knife4j-debug-param-require"+h.require),"data-key":h.id,defaultValue:F,onChange:i.rawFormContentChange},null,8,["placeholder","class","data-key","defaultValue","onChange"])]),_:2},1024))]),operation:m(({text:F,record:h})=>[w(p,null,{default:m(()=>[h.new?T("",!0):(b(),E(d,{key:0,type:"link",onClick:x=>i.rawFormDelete(h)},{default:m(()=>[k(H(t.$t("debug.tableHeader.holderDel")),1)]),_:2},1032,["onClick"]))]),_:2},1024)]),_:1},8,["rowSelection","columns","pagination","dataSource"])):T("",!0)]),_:1})):T("",!0),w(J,{style:{"margin-top":"5px"},value:n.rawText,"onUpdate:value":e[5]||(e[5]=F=>n.rawText=F),mode:n.rawMode},null,8,["value","mode"])]),_:1})):T("",!0)]),_:1},8,["tab"]),r.enableAfterScript?(b(),E(v,{key:"3",tab:"AfterScript"},{default:m(()=>[w(p,{style:{height:"25px","line-height":"25px"}},{default:m(()=>[k(" \u5173\u4E8EAfterScript\u66F4\u8BE6\u7EC6\u7684\u4F7F\u7528\u65B9\u6CD5\u53CA\u4ECB\u7ECD,\u8BF7"),An]),_:1}),w(p,null,{default:m(()=>[w(j,{style:{"margin-top":"5px"},value:n.rawScript,"onUpdate:value":e[6]||(e[6]=F=>n.rawScript=F)},null,8,["value"])]),_:1})]),_:1})):T("",!0)]),_:1})]),_:1}),U("div",null,[w(z,{ref:"childDebugResponse",responseFieldDescriptionChecked:n.responseFieldDescriptionChecked,swaggerInstance:a.swaggerInstance,api:a.api,onDebugShowFieldDescriptionChange:i.debugShowFieldDescriptionChange,onDebugEditorChange:i.debugEditorChange,debugSend:n.debugSend,responseContent:n.responseContent,responseCurlText:n.responseCurlText,responseStatus:n.responseStatus,responseRawText:n.responseRawText,responseHeaders:n.responseHeaders},null,8,["responseFieldDescriptionChecked","swaggerInstance","api","onDebugShowFieldDescriptionChange","onDebugEditorChange","debugSend","responseContent","responseCurlText","responseStatus","responseRawText","responseHeaders"])])])]),_:1},8,["spinning"])])}const Mn=Wt(vn,[["render",In],["__scopeId","data-v-2ed131ca"]]);export{Mn as default};