@botpress/client 0.18.0 → 0.18.2

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
- var gi=Object.create;var It=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var Ri=Object.getOwnPropertyNames;var mi=Object.getPrototypeOf,qi=Object.prototype.hasOwnProperty;var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var hi=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ri(t))!qi.call(e,o)&&o!==s&&It(e,o,{get:()=>t[o],enumerable:!(a=yi(t,o))||a.enumerable});return e};var Pe=(e,t,s)=>(s=e!=null?gi(mi(e)):{},hi(t||!e||!e.__esModule?It(s,"default",{value:e,enumerable:!0}):s,e));var kt=b(()=>{});var vt=b(()=>{});var Ct=b((Au,At)=>{"use strict";At.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},s=Symbol("test"),a=Object(s);if(typeof s=="string"||Object.prototype.toString.call(s)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var o=42;t[s]=o;for(s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var n=Object.getOwnPropertySymbols(t);if(n.length!==1||n[0]!==s||!Object.prototype.propertyIsEnumerable.call(t,s))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,s);if(i.value!==o||i.enumerable!==!0)return!1}return!0}});var Gt=b((Cu,Ut)=>{"use strict";var Bt=typeof Symbol<"u"&&Symbol,Bi=Ct();Ut.exports=function(){return typeof Bt!="function"||typeof Symbol!="function"||typeof Bt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bi()}});var Wt=b((Bu,Lt)=>{"use strict";var wt={foo:{}},Ui=Object;Lt.exports=function(){return{__proto__:wt}.foo===wt.foo&&!({__proto__:null}instanceof Ui)}});var Qt=b((Uu,St)=>{"use strict";var Gi="Function.prototype.bind called on incompatible ",Te=Array.prototype.slice,wi=Object.prototype.toString,Li="[object Function]";St.exports=function(t){var s=this;if(typeof s!="function"||wi.call(s)!==Li)throw new TypeError(Gi+s);for(var a=Te.call(arguments,1),o,n=function(){if(this instanceof o){var l=s.apply(this,a.concat(Te.call(arguments)));return Object(l)===l?l:this}else return s.apply(t,a.concat(Te.call(arguments)))},i=Math.max(0,s.length-a.length),r=[],c=0;c<i;c++)r.push("$"+c);if(o=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")(n),s.prototype){var d=function(){};d.prototype=s.prototype,o.prototype=new d,d.prototype=null}return o}});var le=b((Gu,Dt)=>{"use strict";var Wi=Qt();Dt.exports=Function.prototype.bind||Wi});var Et=b((wu,Ht)=>{"use strict";var Si=le();Ht.exports=Si.call(Function.call,Object.prototype.hasOwnProperty)});var Re=b((Lu,Nt)=>{"use strict";var g,Y=SyntaxError,Ft=Function,X=TypeError,Ae=function(e){try{return Ft('"use strict"; return ('+e+").constructor;")()}catch{}},_=Object.getOwnPropertyDescriptor;if(_)try{_({},"")}catch{_=null}var Ce=function(){throw new X},Qi=_?function(){try{return arguments.callee,Ce}catch{try{return _(arguments,"callee").get}catch{return Ce}}}():Ce,j=Gt()(),Di=Wt()(),x=Object.getPrototypeOf||(Di?function(e){return e.__proto__}:null),J={},Hi=typeof Uint8Array>"u"||!x?g:x(Uint8Array),O={"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":j&&x?x([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":J,"%AsyncGenerator%":J,"%AsyncGeneratorFunction%":J,"%AsyncIteratorPrototype%":J,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":Ft,"%GeneratorFunction%":J,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&&x?x(x([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!j||!x?g:x(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!j||!x?g:x(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&&x?x(""[Symbol.iterator]()):g,"%Symbol%":j?Symbol:g,"%SyntaxError%":Y,"%ThrowTypeError%":Qi,"%TypedArray%":Hi,"%TypeError%":X,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet};if(x)try{null.error}catch(e){Mt=x(x(e)),O["%Error.prototype%"]=Mt}var Mt,Ei=function e(t){var s;if(t==="%AsyncFunction%")s=Ae("async function () {}");else if(t==="%GeneratorFunction%")s=Ae("function* () {}");else if(t==="%AsyncGeneratorFunction%")s=Ae("async function* () {}");else if(t==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(s=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&x&&(s=x(o.prototype))}return O[t]=s,s},_t={"%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"]},ie=le(),ge=Et(),Mi=ie.call(Function.call,Array.prototype.concat),_i=ie.call(Function.apply,Array.prototype.splice),Ot=ie.call(Function.call,String.prototype.replace),ye=ie.call(Function.call,String.prototype.slice),Oi=ie.call(Function.call,RegExp.prototype.exec),Fi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ni=/\\(\\)?/g,$i=function(t){var s=ye(t,0,1),a=ye(t,-1);if(s==="%"&&a!=="%")throw new Y("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&s!=="%")throw new Y("invalid intrinsic syntax, expected opening `%`");var o=[];return Ot(t,Fi,function(n,i,r,c){o[o.length]=r?Ot(c,Ni,"$1"):i||n}),o},Ki=function(t,s){var a=t,o;if(ge(_t,a)&&(o=_t[a],a="%"+o[0]+"%"),ge(O,a)){var n=O[a];if(n===J&&(n=Ei(a)),typeof n>"u"&&!s)throw new X("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:a,value:n}}throw new Y("intrinsic "+t+" does not exist!")};Nt.exports=function(t,s){if(typeof t!="string"||t.length===0)throw new X("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof s!="boolean")throw new X('"allowMissing" argument must be a boolean');if(Oi(/^%?[^%]*%?$/,t)===null)throw new Y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=$i(t),o=a.length>0?a[0]:"",n=Ki("%"+o+"%",s),i=n.name,r=n.value,c=!1,d=n.alias;d&&(o=d[0],_i(a,Mi([0,1],d)));for(var l=1,h=!0;l<a.length;l+=1){var y=a[l],f=ye(y,0,1),m=ye(y,-1);if((f==='"'||f==="'"||f==="`"||m==='"'||m==="'"||m==="`")&&f!==m)throw new Y("property names with quotes must have matching quotes");if((y==="constructor"||!h)&&(c=!0),o+="."+y,i="%"+o+"%",ge(O,i))r=O[i];else if(r!=null){if(!(y in r)){if(!s)throw new X("base intrinsic for "+t+" exists, but the property is not available.");return}if(_&&l+1>=a.length){var P=_(r,y);h=!!P,h&&"get"in P&&!("originalValue"in P.get)?r=P.get:r=r[y]}else h=ge(r,y),r=r[y];h&&!c&&(O[i]=r)}}return r}});var Jt=b((Wu,me)=>{"use strict";var Be=le(),Z=Re(),Vt=Z("%Function.prototype.apply%"),zt=Z("%Function.prototype.call%"),jt=Z("%Reflect.apply%",!0)||Be.call(zt,Vt),$t=Z("%Object.getOwnPropertyDescriptor%",!0),F=Z("%Object.defineProperty%",!0),Vi=Z("%Math.max%");if(F)try{F({},"a",{value:1})}catch{F=null}me.exports=function(t){var s=jt(Be,zt,arguments);if($t&&F){var a=$t(s,"length");a.configurable&&F(s,"length",{value:1+Vi(0,t.length-(arguments.length-1))})}return s};var Kt=function(){return jt(Be,Vt,arguments)};F?F(me.exports,"apply",{value:Kt}):me.exports.apply=Kt});var er=b((Su,Zt)=>{"use strict";var Xt=Re(),Yt=Jt(),zi=Yt(Xt("String.prototype.indexOf"));Zt.exports=function(t,s){var a=Xt(t,!!s);return typeof a=="function"&&zi(t,".prototype.")>-1?Yt(a):a}});var tr=b(()=>{});var xr=b((Hu,br)=>{var Ee=typeof Map=="function"&&Map.prototype,Ue=Object.getOwnPropertyDescriptor&&Ee?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,he=Ee&&Ue&&typeof Ue.get=="function"?Ue.get:null,rr=Ee&&Map.prototype.forEach,Me=typeof Set=="function"&&Set.prototype,Ge=Object.getOwnPropertyDescriptor&&Me?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fe=Me&&Ge&&typeof Ge.get=="function"?Ge.get:null,sr=Me&&Set.prototype.forEach,ji=typeof WeakMap=="function"&&WeakMap.prototype,ue=ji?WeakMap.prototype.has:null,Ji=typeof WeakSet=="function"&&WeakSet.prototype,ce=Ji?WeakSet.prototype.has:null,Xi=typeof WeakRef=="function"&&WeakRef.prototype,ar=Xi?WeakRef.prototype.deref:null,Yi=Boolean.prototype.valueOf,Zi=Object.prototype.toString,ep=Function.prototype.toString,tp=String.prototype.match,_e=String.prototype.slice,D=String.prototype.replace,rp=String.prototype.toUpperCase,nr=String.prototype.toLowerCase,yr=RegExp.prototype.test,or=Array.prototype.concat,A=Array.prototype.join,sp=Array.prototype.slice,ir=Math.floor,We=typeof BigInt=="function"?BigInt.prototype.valueOf:null,we=Object.getOwnPropertySymbols,Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ee=typeof Symbol=="function"&&typeof Symbol.iterator=="object",v=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ee||"symbol")?Symbol.toStringTag:null,Rr=Object.prototype.propertyIsEnumerable,pr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ur(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||yr.call(/e/,t))return t;var s=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var a=e<0?-ir(-e):ir(e);if(a!==e){var o=String(a),n=_e.call(t,o.length+1);return D.call(o,s,"$&_")+"."+D.call(D.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return D.call(t,s,"$&_")}var Qe=tr(),cr=Qe.custom,dr=qr(cr)?cr:null;br.exports=function e(t,s,a,o){var n=s||{};if(Q(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Q(n,"customInspect")?n.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var r=n.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return fr(t,n);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return r?ur(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return r?ur(t,d):d}var l=typeof n.depth>"u"?5:n.depth;if(typeof a>"u"&&(a=0),a>=l&&l>0&&typeof t=="object")return De(t)?"[Array]":"[Object]";var h=xp(n,a);if(typeof o>"u")o=[];else if(hr(o,t)>=0)return"[Circular]";function y(T,S,G){if(S&&(o=sp.call(o),o.push(S)),G){var oe={depth:n.depth};return Q(n,"quoteStyle")&&(oe.quoteStyle=n.quoteStyle),e(T,oe,a+1,o)}return e(T,n,a+1,o)}if(typeof t=="function"&&!lr(t)){var f=lp(t),m=qe(t,y);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(m.length>0?" { "+A.call(m,", ")+" }":"")}if(qr(t)){var P=ee?D.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Se.call(t);return typeof t=="object"&&!ee?pe(P):P}if(hp(t)){for(var B="<"+nr.call(String(t.nodeName)),R=t.attributes||[],U=0;U<R.length;U++)B+=" "+R[U].name+"="+mr(ap(R[U].value),"double",n);return B+=">",t.childNodes&&t.childNodes.length&&(B+="..."),B+="</"+nr.call(String(t.nodeName))+">",B}if(De(t)){if(t.length===0)return"[]";var L=qe(t,y);return h&&!bp(L)?"["+He(L,h)+"]":"[ "+A.call(L,", ")+" ]"}if(op(t)){var K=qe(t,y);return!("cause"in Error.prototype)&&"cause"in t&&!Rr.call(t,"cause")?"{ ["+String(t)+"] "+A.call(or.call("[cause]: "+y(t.cause),K),", ")+" }":K.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+A.call(K,", ")+" }"}if(typeof t=="object"&&i){if(dr&&typeof t[dr]=="function"&&Qe)return Qe(t,{depth:l-a});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(gp(t)){var se=[];return rr&&rr.call(t,function(T,S){se.push(y(S,t,!0)+" => "+y(T,t))}),gr("Map",he.call(t),se,h)}if(mp(t)){var ae=[];return sr&&sr.call(t,function(T){ae.push(y(T,t))}),gr("Set",fe.call(t),ae,h)}if(yp(t))return Le("WeakMap");if(qp(t))return Le("WeakSet");if(Rp(t))return Le("WeakRef");if(pp(t))return pe(y(Number(t)));if(cp(t))return pe(y(We.call(t)));if(up(t))return pe(Yi.call(t));if(ip(t))return pe(y(String(t)));if(!np(t)&&!lr(t)){var E=qe(t,y),ne=pr?pr(t)===Object.prototype:t instanceof Object||t.constructor===Object,W=t instanceof Object?"":"null prototype",V=!ne&&v&&Object(t)===t&&v in t?_e.call(H(t),8,-1):W?"Object":"",M=ne||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",z=M+(V||W?"["+A.call(or.call([],V||[],W||[]),": ")+"] ":"");return E.length===0?z+"{}":h?z+"{"+He(E,h)+"}":z+"{ "+A.call(E,", ")+" }"}return String(t)};function mr(e,t,s){var a=(s.quoteStyle||t)==="double"?'"':"'";return a+e+a}function ap(e){return D.call(String(e),/"/g,"&quot;")}function De(e){return H(e)==="[object Array]"&&(!v||!(typeof e=="object"&&v in e))}function np(e){return H(e)==="[object Date]"&&(!v||!(typeof e=="object"&&v in e))}function lr(e){return H(e)==="[object RegExp]"&&(!v||!(typeof e=="object"&&v in e))}function op(e){return H(e)==="[object Error]"&&(!v||!(typeof e=="object"&&v in e))}function ip(e){return H(e)==="[object String]"&&(!v||!(typeof e=="object"&&v in e))}function pp(e){return H(e)==="[object Number]"&&(!v||!(typeof e=="object"&&v in e))}function up(e){return H(e)==="[object Boolean]"&&(!v||!(typeof e=="object"&&v in e))}function qr(e){if(ee)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Se)return!1;try{return Se.call(e),!0}catch{}return!1}function cp(e){if(!e||typeof e!="object"||!We)return!1;try{return We.call(e),!0}catch{}return!1}var dp=Object.prototype.hasOwnProperty||function(e){return e in this};function Q(e,t){return dp.call(e,t)}function H(e){return Zi.call(e)}function lp(e){if(e.name)return e.name;var t=tp.call(ep.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function hr(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,a=e.length;s<a;s++)if(e[s]===t)return s;return-1}function gp(e){if(!he||!e||typeof e!="object")return!1;try{he.call(e);try{fe.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function yp(e){if(!ue||!e||typeof e!="object")return!1;try{ue.call(e,ue);try{ce.call(e,ce)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Rp(e){if(!ar||!e||typeof e!="object")return!1;try{return ar.call(e),!0}catch{}return!1}function mp(e){if(!fe||!e||typeof e!="object")return!1;try{fe.call(e);try{he.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function qp(e){if(!ce||!e||typeof e!="object")return!1;try{ce.call(e,ce);try{ue.call(e,ue)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hp(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function fr(e,t){if(e.length>t.maxStringLength){var s=e.length-t.maxStringLength,a="... "+s+" more character"+(s>1?"s":"");return fr(_e.call(e,0,t.maxStringLength),t)+a}var o=D.call(D.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fp);return mr(o,"single",t)}function fp(e){var t=e.charCodeAt(0),s={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return s?"\\"+s:"\\x"+(t<16?"0":"")+rp.call(t.toString(16))}function pe(e){return"Object("+e+")"}function Le(e){return e+" { ? }"}function gr(e,t,s,a){var o=a?He(s,a):A.call(s,", ");return e+" ("+t+") {"+o+"}"}function bp(e){for(var t=0;t<e.length;t++)if(hr(e[t],`
2
- `)>=0)return!1;return!0}function xp(e,t){var s;if(e.indent===" ")s=" ";else if(typeof e.indent=="number"&&e.indent>0)s=A.call(Array(e.indent+1)," ");else return null;return{base:s,prev:A.call(Array(t+1),s)}}function He(e,t){if(e.length===0)return"";var s=`
3
- `+t.prev+t.base;return s+A.call(e,","+s)+`
4
- `+t.prev}function qe(e,t){var s=De(e),a=[];if(s){a.length=e.length;for(var o=0;o<e.length;o++)a[o]=Q(e,o)?t(e[o],e):""}var n=typeof we=="function"?we(e):[],i;if(ee){i={};for(var r=0;r<n.length;r++)i["$"+n[r]]=n[r]}for(var c in e)Q(e,c)&&(s&&String(Number(c))===c&&c<e.length||ee&&i["$"+c]instanceof Symbol||(yr.call(/[^\w$]/,c)?a.push(t(c,e)+": "+t(e[c],e)):a.push(c+": "+t(e[c],e))));if(typeof we=="function")for(var d=0;d<n.length;d++)Rr.call(e,n[d])&&a.push("["+t(n[d])+"]: "+t(e[n[d]],e));return a}});var kr=b((Eu,Ir)=>{"use strict";var Oe=Re(),te=er(),Ip=xr(),kp=Oe("%TypeError%"),be=Oe("%WeakMap%",!0),xe=Oe("%Map%",!0),vp=te("WeakMap.prototype.get",!0),Pp=te("WeakMap.prototype.set",!0),Tp=te("WeakMap.prototype.has",!0),Ap=te("Map.prototype.get",!0),Cp=te("Map.prototype.set",!0),Bp=te("Map.prototype.has",!0),Fe=function(e,t){for(var s=e,a;(a=s.next)!==null;s=a)if(a.key===t)return s.next=a.next,a.next=e.next,e.next=a,a},Up=function(e,t){var s=Fe(e,t);return s&&s.value},Gp=function(e,t,s){var a=Fe(e,t);a?a.value=s:e.next={key:t,next:e.next,value:s}},wp=function(e,t){return!!Fe(e,t)};Ir.exports=function(){var t,s,a,o={assert:function(n){if(!o.has(n))throw new kp("Side channel does not contain "+Ip(n))},get:function(n){if(be&&n&&(typeof n=="object"||typeof n=="function")){if(t)return vp(t,n)}else if(xe){if(s)return Ap(s,n)}else if(a)return Up(a,n)},has:function(n){if(be&&n&&(typeof n=="object"||typeof n=="function")){if(t)return Tp(t,n)}else if(xe){if(s)return Bp(s,n)}else if(a)return wp(a,n);return!1},set:function(n,i){be&&n&&(typeof n=="object"||typeof n=="function")?(t||(t=new be),Pp(t,n,i)):xe?(s||(s=new xe),Cp(s,n,i)):(a||(a={key:{},next:null}),Gp(a,n,i))}};return o}});var Ie=b((Mu,vr)=>{"use strict";var Lp=String.prototype.replace,Wp=/%20/g,Ne={RFC1738:"RFC1738",RFC3986:"RFC3986"};vr.exports={default:Ne.RFC3986,formatters:{RFC1738:function(e){return Lp.call(e,Wp,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ne.RFC1738,RFC3986:Ne.RFC3986}});var Ke=b((_u,Tr)=>{"use strict";var Sp=Ie(),$e=Object.prototype.hasOwnProperty,N=Array.isArray,C=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Qp=function(t){for(;t.length>1;){var s=t.pop(),a=s.obj[s.prop];if(N(a)){for(var o=[],n=0;n<a.length;++n)typeof a[n]<"u"&&o.push(a[n]);s.obj[s.prop]=o}}},Pr=function(t,s){for(var a=s&&s.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(a[o]=t[o]);return a},Dp=function e(t,s,a){if(!s)return t;if(typeof s!="object"){if(N(t))t.push(s);else if(t&&typeof t=="object")(a&&(a.plainObjects||a.allowPrototypes)||!$e.call(Object.prototype,s))&&(t[s]=!0);else return[t,s];return t}if(!t||typeof t!="object")return[t].concat(s);var o=t;return N(t)&&!N(s)&&(o=Pr(t,a)),N(t)&&N(s)?(s.forEach(function(n,i){if($e.call(t,i)){var r=t[i];r&&typeof r=="object"&&n&&typeof n=="object"?t[i]=e(r,n,a):t.push(n)}else t[i]=n}),t):Object.keys(s).reduce(function(n,i){var r=s[i];return $e.call(n,i)?n[i]=e(n[i],r,a):n[i]=r,n},o)},Hp=function(t,s){return Object.keys(s).reduce(function(a,o){return a[o]=s[o],a},t)},Ep=function(e,t,s){var a=e.replace(/\+/g," ");if(s==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},Mp=function(t,s,a,o,n){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),a==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var r="",c=0;c<i.length;++c){var d=i.charCodeAt(c);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||n===Sp.RFC1738&&(d===40||d===41)){r+=i.charAt(c);continue}if(d<128){r=r+C[d];continue}if(d<2048){r=r+(C[192|d>>6]+C[128|d&63]);continue}if(d<55296||d>=57344){r=r+(C[224|d>>12]+C[128|d>>6&63]+C[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|i.charCodeAt(c)&1023),r+=C[240|d>>18]+C[128|d>>12&63]+C[128|d>>6&63]+C[128|d&63]}return r},_p=function(t){for(var s=[{obj:{o:t},prop:"o"}],a=[],o=0;o<s.length;++o)for(var n=s[o],i=n.obj[n.prop],r=Object.keys(i),c=0;c<r.length;++c){var d=r[c],l=i[d];typeof l=="object"&&l!==null&&a.indexOf(l)===-1&&(s.push({obj:i,prop:d}),a.push(l))}return Qp(s),t},Op=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Fp=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Np=function(t,s){return[].concat(t,s)},$p=function(t,s){if(N(t)){for(var a=[],o=0;o<t.length;o+=1)a.push(s(t[o]));return a}return s(t)};Tr.exports={arrayToObject:Pr,assign:Hp,combine:Np,compact:_p,decode:Ep,encode:Mp,isBuffer:Fp,isRegExp:Op,maybeMap:$p,merge:Dp}});var wr=b((Ou,Gr)=>{"use strict";var Br=kr(),ze=Ke(),de=Ie(),Kp=Object.prototype.hasOwnProperty,Ar={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,s){return t+"["+s+"]"},repeat:function(t){return t}},w=Array.isArray,Vp=String.prototype.split,zp=Array.prototype.push,Ur=function(e,t){zp.apply(e,w(t)?t:[t])},jp=Date.prototype.toISOString,Cr=de.default,k={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ze.encode,encodeValuesOnly:!1,format:Cr,formatter:de.formatters[Cr],indices:!1,serializeDate:function(t){return jp.call(t)},skipNulls:!1,strictNullHandling:!1},Jp=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ve={},Xp=function e(t,s,a,o,n,i,r,c,d,l,h,y,f,m,P,B){for(var R=t,U=B,L=0,K=!1;(U=U.get(Ve))!==void 0&&!K;){var se=U.get(t);if(L+=1,typeof se<"u"){if(se===L)throw new RangeError("Cyclic object value");K=!0}typeof U.get(Ve)>"u"&&(L=0)}if(typeof c=="function"?R=c(s,R):R instanceof Date?R=h(R):a==="comma"&&w(R)&&(R=ze.maybeMap(R,function(ve){return ve instanceof Date?h(ve):ve})),R===null){if(n)return r&&!m?r(s,k.encoder,P,"key",y):s;R=""}if(Jp(R)||ze.isBuffer(R)){if(r){var ae=m?s:r(s,k.encoder,P,"key",y);if(a==="comma"&&m){for(var E=Vp.call(String(R),","),ne="",W=0;W<E.length;++W)ne+=(W===0?"":",")+f(r(E[W],k.encoder,P,"value",y));return[f(ae)+(o&&w(R)&&E.length===1?"[]":"")+"="+ne]}return[f(ae)+"="+f(r(R,k.encoder,P,"value",y))]}return[f(s)+"="+f(String(R))]}var V=[];if(typeof R>"u")return V;var M;if(a==="comma"&&w(R))M=[{value:R.length>0?R.join(",")||null:void 0}];else if(w(c))M=c;else{var z=Object.keys(R);M=d?z.sort(d):z}for(var T=o&&w(R)&&R.length===1?s+"[]":s,S=0;S<M.length;++S){var G=M[S],oe=typeof G=="object"&&typeof G.value<"u"?G.value:R[G];if(!(i&&oe===null)){var li=w(R)?typeof a=="function"?a(T,G):T:T+(l?"."+G:"["+G+"]");B.set(t,L);var xt=Br();xt.set(Ve,B),Ur(V,e(oe,li,a,o,n,i,r,c,d,l,h,y,f,m,P,xt))}}return V},Yp=function(t){if(!t)return k;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var s=t.charset||k.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=de.default;if(typeof t.format<"u"){if(!Kp.call(de.formatters,t.format))throw new TypeError("Unknown format option provided.");a=t.format}var o=de.formatters[a],n=k.filter;return(typeof t.filter=="function"||w(t.filter))&&(n=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:k.addQueryPrefix,allowDots:typeof t.allowDots>"u"?k.allowDots:!!t.allowDots,charset:s,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:k.charsetSentinel,delimiter:typeof t.delimiter>"u"?k.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:k.encode,encoder:typeof t.encoder=="function"?t.encoder:k.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:k.encodeValuesOnly,filter:n,format:a,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:k.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:k.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:k.strictNullHandling}};Gr.exports=function(e,t){var s=e,a=Yp(t),o,n;typeof a.filter=="function"?(n=a.filter,s=n("",s)):w(a.filter)&&(n=a.filter,o=n);var i=[];if(typeof s!="object"||s===null)return"";var r;t&&t.arrayFormat in Ar?r=t.arrayFormat:t&&"indices"in t?r=t.indices?"indices":"repeat":r="indices";var c=Ar[r];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(s)),a.sort&&o.sort(a.sort);for(var l=Br(),h=0;h<o.length;++h){var y=o[h];a.skipNulls&&s[y]===null||Ur(i,Xp(s[y],y,c,d,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,l))}var f=i.join(a.delimiter),m=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),f.length>0?m+f:""}});var Sr=b((Fu,Wr)=>{"use strict";var re=Ke(),je=Object.prototype.hasOwnProperty,Zp=Array.isArray,I={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:re.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},eu=function(e){return e.replace(/&#(\d+);/g,function(t,s){return String.fromCharCode(parseInt(s,10))})},Lr=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},tu="utf8=%26%2310003%3B",ru="utf8=%E2%9C%93",su=function(t,s){var a={},o=s.ignoreQueryPrefix?t.replace(/^\?/,""):t,n=s.parameterLimit===1/0?void 0:s.parameterLimit,i=o.split(s.delimiter,n),r=-1,c,d=s.charset;if(s.charsetSentinel)for(c=0;c<i.length;++c)i[c].indexOf("utf8=")===0&&(i[c]===ru?d="utf-8":i[c]===tu&&(d="iso-8859-1"),r=c,c=i.length);for(c=0;c<i.length;++c)if(c!==r){var l=i[c],h=l.indexOf("]="),y=h===-1?l.indexOf("="):h+1,f,m;y===-1?(f=s.decoder(l,I.decoder,d,"key"),m=s.strictNullHandling?null:""):(f=s.decoder(l.slice(0,y),I.decoder,d,"key"),m=re.maybeMap(Lr(l.slice(y+1),s),function(P){return s.decoder(P,I.decoder,d,"value")})),m&&s.interpretNumericEntities&&d==="iso-8859-1"&&(m=eu(m)),l.indexOf("[]=")>-1&&(m=Zp(m)?[m]:m),je.call(a,f)?a[f]=re.combine(a[f],m):a[f]=m}return a},au=function(e,t,s,a){for(var o=a?t:Lr(t,s),n=e.length-1;n>=0;--n){var i,r=e[n];if(r==="[]"&&s.parseArrays)i=[].concat(o);else{i=s.plainObjects?Object.create(null):{};var c=r.charAt(0)==="["&&r.charAt(r.length-1)==="]"?r.slice(1,-1):r,d=parseInt(c,10);!s.parseArrays&&c===""?i={0:o}:!isNaN(d)&&r!==c&&String(d)===c&&d>=0&&s.parseArrays&&d<=s.arrayLimit?(i=[],i[d]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},nu=function(t,s,a,o){if(t){var n=a.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,r=/(\[[^[\]]*])/g,c=a.depth>0&&i.exec(n),d=c?n.slice(0,c.index):n,l=[];if(d){if(!a.plainObjects&&je.call(Object.prototype,d)&&!a.allowPrototypes)return;l.push(d)}for(var h=0;a.depth>0&&(c=r.exec(n))!==null&&h<a.depth;){if(h+=1,!a.plainObjects&&je.call(Object.prototype,c[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+n.slice(c.index)+"]"),au(l,s,a,o)}},ou=function(t){if(!t)return I;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=typeof t.charset>"u"?I.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?I.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:I.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:I.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:I.arrayLimit,charset:s,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:I.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:I.comma,decoder:typeof t.decoder=="function"?t.decoder:I.decoder,delimiter:typeof t.delimiter=="string"||re.isRegExp(t.delimiter)?t.delimiter:I.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:I.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:I.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:I.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:I.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:I.strictNullHandling}};Wr.exports=function(e,t){var s=ou(t);if(e===""||e===null||typeof e>"u")return s.plainObjects?Object.create(null):{};for(var a=typeof e=="string"?su(e,s):e,o=s.plainObjects?Object.create(null):{},n=Object.keys(a),i=0;i<n.length;++i){var r=n[i],c=nu(r,a[r],s,typeof e=="string");o=re.merge(o,c,s)}return s.allowSparse===!0?o:re.compact(o)}});var Dr=b((Nu,Qr)=>{"use strict";var iu=wr(),pu=Sr(),uu=Ie();Qr.exports={formats:uu,parse:pu,stringify:iu}});var ui=Pe(kt()),ci=Pe(vt());import pi from"axios";import{isNode as oi}from"browser-or-node";import{isBrowser as Pt,isNode as fi}from"browser-or-node";var bi="https://api.botpress.cloud",xi=6e4,Ii="BP_API_URL",ki="BP_BOT_ID",vi="BP_INTEGRATION_ID",Pi="BP_WORKSPACE_ID",Ti="BP_TOKEN";function Tt(e){let t=Ai(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??bi,o=t.timeout??xi;return{apiUrl:a,timeout:o,withCredentials:Pt,headers:s}}function Ai(e){return Pt?e:fi?Ci(e):e}function Ci(e){let t={...e,apiUrl:e.apiUrl??process.env[Ii],botId:e.botId??process.env[ki],integrationId:e.integrationId??process.env[vi],workspaceId:e.workspaceId??process.env[Pi]},s=t.token??process.env[Ti];return s&&(t.token=s),t}var ni=Pe(Dr());import Ru from"axios";import cu from"crypto";var du={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Je=typeof window<"u"&&typeof window.document<"u"?window.crypto:cu;Je.getRandomValues||(Je=du);var q=class extends Error{constructor(s,a,o,n,i,r){super(n);this.code=s;this.description=a;this.type=o;this.message=n;this.error=i;this.id=r;this.id||(this.id=q.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,n=Array.from(Je.getRandomValues(new Uint8Array(o))).map(i=>i.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${n}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},lu=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Hr=e=>e instanceof q||lu(e)&&e.isApiError===!0,$=class extends q{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},Xe=class extends q{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},Ye=class extends q{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},Ze=class extends q{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},et=class extends q{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},tt=class extends q{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},rt=class extends q{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},st=class extends q{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},at=class extends q{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},nt=class extends q{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},ot=class extends q{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},it=class extends q{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},pt=class extends q{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ut=class extends q{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},ct=class extends q{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},dt=class extends q{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},lt=class extends q{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},gt=class extends q{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},yt=class extends q{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},Rt=class extends q{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},mt=class extends q{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},qt=class extends q{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},ht=class extends q{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},gu={Unknown:$,Internal:Xe,Unauthorized:Ye,Forbidden:Ze,PayloadTooLarge:et,InvalidPayload:tt,UnsupportedMediaType:rt,MethodNotFound:st,ResourceNotFound:at,InvalidJsonSchema:nt,InvalidDataFormat:ot,InvalidIdentifier:it,RelationConflict:pt,ReferenceConstraint:ut,ReferenceNotFound:ct,InvalidQuery:dt,Runtime:lt,AlreadyExists:gt,RateLimited:yt,PaymentRequired:Rt,QuotaExceeded:mt,LimitExceeded:qt,BreakingChanges:ht},ft=e=>Hr(e)?e:e instanceof Error?new $(e.message,e):typeof e=="string"?new $(e):yu(e);function yu(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){let t=gu[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new $(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new $("An invalid error occurred: "+JSON.stringify(e))}var Er=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var _r=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Fr=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}});var $r=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Vr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var jr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Zr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var ts=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var ss=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var ns=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}});var is=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var us=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}});var ds=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var gs=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Rs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var qs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var fs=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var xs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ks=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var Ps=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var As=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var Bs=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var Gs=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}});var Ls=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ss=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}});var Ds=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var Es=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var _s=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}});var Fs=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var $s=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Vs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var js=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}});var Xs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}});var Zs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ta=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}});var sa=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var na=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var ia=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var ua=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var da=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var ga=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Ra=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var qa=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var fa=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var xa=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var ka=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Pa=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Aa=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var Ba=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var Ga=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var La=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken},params:{},body:{}});var Sa=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Da=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ea=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var _a=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Fa=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var $a=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Va=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var ja=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Xa=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}});var Za=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var tn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var sn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var nn=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var pn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var cn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ln=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var yn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var mn=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var hn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var bn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var In=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}});var vn=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Tn=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Cn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Un=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var wn=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Wn=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Qn=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Hn=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var Mn=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var On=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Nn=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Kn=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var zn=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}});var Jn=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}});var Yn=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var eo=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ro=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var ao=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var oo=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var po=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var co=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var go=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Ro=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var qo=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var fo=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{name:e.name,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType}});var xo=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ko=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}});var Po=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ao=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}});var Bo=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}});var Go=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var Lo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var So=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Do=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Eo=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}});var _o=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Fo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var $o=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Vo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var jo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}});var Xo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Zo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}});var ti=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var si=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}});var ke=class{constructor(t){this.axiosInstance=t}createConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Er(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getConversation=async t=>{let{path:s,headers:a,query:o,body:n}=_r(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listConversations=async t=>{let{path:s,headers:a,query:o,body:n}=Fr(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:o,body:n}=$r(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Vr(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteConversation=async t=>{let{path:s,headers:a,query:o,body:n}=jr(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listParticipants=async t=>{let{path:s,headers:a,query:o,body:n}=Xr(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};addParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=Zr(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=ts(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};removeParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=ss(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createEvent=async t=>{let{path:s,headers:a,query:o,body:n}=ns(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getEvent=async t=>{let{path:s,headers:a,query:o,body:n}=is(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listEvents=async t=>{let{path:s,headers:a,query:o,body:n}=us(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createMessage=async t=>{let{path:s,headers:a,query:o,body:n}=ds(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:o,body:n}=gs(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getMessage=async t=>{let{path:s,headers:a,query:o,body:n}=Rs(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateMessage=async t=>{let{path:s,headers:a,query:o,body:n}=qs(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listMessages=async t=>{let{path:s,headers:a,query:o,body:n}=fs(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteMessage=async t=>{let{path:s,headers:a,query:o,body:n}=xs(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createUser=async t=>{let{path:s,headers:a,query:o,body:n}=ks(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getUser=async t=>{let{path:s,headers:a,query:o,body:n}=Ps(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listUsers=async t=>{let{path:s,headers:a,query:o,body:n}=As(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:o,body:n}=Bs(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateUser=async t=>{let{path:s,headers:a,query:o,body:n}=Gs(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteUser=async t=>{let{path:s,headers:a,query:o,body:n}=Ls(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getState=async t=>{let{path:s,headers:a,query:o,body:n}=Ss(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};setState=async t=>{let{path:s,headers:a,query:o,body:n}=Ds(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrSetState=async t=>{let{path:s,headers:a,query:o,body:n}=Es(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};patchState=async t=>{let{path:s,headers:a,query:o,body:n}=_s(t),i=u({method:"patch",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};callAction=async t=>{let{path:s,headers:a,query:o,body:n}=Fs(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};configureIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=$s(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getTask=async t=>{let{path:s,headers:a,query:o,body:n}=Vs(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createTask=async t=>{let{path:s,headers:a,query:o,body:n}=js(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateTask=async t=>{let{path:s,headers:a,query:o,body:n}=Xs(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteTask=async t=>{let{path:s,headers:a,query:o,body:n}=Zs(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listTasks=async t=>{let{path:s,headers:a,query:o,body:n}=ta(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};trackAnalytics=async t=>{let{path:s,headers:a,query:o,body:n}=sa(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};runVrl=async t=>{let{path:s,headers:a,query:o,body:n}=na(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAccount=async t=>{let{path:s,headers:a,query:o,body:n}=ia(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateAccount=async t=>{let{path:s,headers:a,query:o,body:n}=ua(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:o,body:n}=da(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:o,body:n}=ga(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:o,body:n}=Ra(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};setAccountPreference=async t=>{let{path:s,headers:a,query:o,body:n}=qa(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAccountPreference=async t=>{let{path:s,headers:a,query:o,body:n}=fa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:o,body:n}=xa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:o,body:n}=ka(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Pa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createBot=async t=>{let{path:s,headers:a,query:o,body:n}=Aa(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateBot=async t=>{let{path:s,headers:a,query:o,body:n}=Ba(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};transferBot=async t=>{let{path:s,headers:a,query:o,body:n}=Ga(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listBots=async t=>{let{path:s,headers:a,query:o,body:n}=La(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBot=async t=>{let{path:s,headers:a,query:o,body:n}=Sa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteBot=async t=>{let{path:s,headers:a,query:o,body:n}=Da(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBotLogs=async t=>{let{path:s,headers:a,query:o,body:n}=Ea(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBotWebchat=async t=>{let{path:s,headers:a,query:o,body:n}=_a(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:o,body:n}=Fa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listBotIssues=async t=>{let{path:s,headers:a,query:o,body:n}=$a(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:o,body:n}=Va(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:o,body:n}=ja(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};setWorkspacePaymentMethod=async t=>{let{path:s,headers:a,query:o,body:n}=Xa(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:o,body:n}=Za(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:o,body:n}=tn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:o,body:n}=sn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=nn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=pn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=cn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:o,body:n}=ln(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:o,body:n}=yn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:o,body:n}=mn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:o,body:n}=hn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:o,body:n}=bn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=In(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:o,body:n}=vn(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaces=async t=>{let{path:s,headers:a,query:o,body:n}=Tn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=Cn(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAuditRecords=async t=>{let{path:s,headers:a,query:o,body:n}=Un(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:o,body:n}=wn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Wn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Qn(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Hn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Mn(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:o,body:n}=On(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:o,body:n}=Nn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:o,body:n}=Kn(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=zn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Jn(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listIntegrations=async t=>{let{path:s,headers:a,query:o,body:n}=Yn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=eo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:o,body:n}=ro(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:o,body:n}=ao(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=oo(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getUsage=async t=>{let{path:s,headers:a,query:o,body:n}=po(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listUsageHistory=async t=>{let{path:s,headers:a,query:o,body:n}=co(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:o,body:n}=go(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listActivities=async t=>{let{path:s,headers:a,query:o,body:n}=Ro(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};introspect=async t=>{let{path:s,headers:a,query:o,body:n}=qo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createFile=async t=>{let{path:s,headers:a,query:o,body:n}=fo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteFile=async t=>{let{path:s,headers:a,query:o,body:n}=xo(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listFiles=async t=>{let{path:s,headers:a,query:o,body:n}=ko(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getFile=async t=>{let{path:s,headers:a,query:o,body:n}=Po(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateFile=async t=>{let{path:s,headers:a,query:o,body:n}=Ao(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};searchFiles=async t=>{let{path:s,headers:a,query:o,body:n}=Bo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listTables=async t=>{let{path:s,headers:a,query:o,body:n}=Go(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getTable=async t=>{let{path:s,headers:a,query:o,body:n}=Lo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:o,body:n}=So(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createTable=async t=>{let{path:s,headers:a,query:o,body:n}=Do(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};duplicateTable=async t=>{let{path:s,headers:a,query:o,body:n}=Eo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateTable=async t=>{let{path:s,headers:a,query:o,body:n}=_o(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};renameTableColumn=async t=>{let{path:s,headers:a,query:o,body:n}=Fo(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteTable=async t=>{let{path:s,headers:a,query:o,body:n}=$o(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getTableRow=async t=>{let{path:s,headers:a,query:o,body:n}=Vo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};findTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=jo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=Xo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=Zo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=ti(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};upsertTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=si(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})}};function p(e){return Ru.isAxiosError(e)&&e.response?.data?ft(e.response.data):ft(e)}var mu=e=>e[1]!==void 0,u=e=>{let{method:t,path:s,query:a,headers:o,body:n}=e,i=Object.entries(o).filter(mu),r=Object.fromEntries(i),c=ni.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),d=new URLSearchParams(c);return{method:t,url:s,headers:r,params:d,data:n}};import*as pc from"axios";var di=100*1024*1024,qu=di,hu=di,ii=class extends ke{config;constructor(t={}){let s=Tt(t),a=fu(s);super(a),this.config=s}createAndUploadFile=async({name:t,data:s,index:a,tags:o,contentType:n,accessPolicies:i})=>{let{file:r}=await this.createFile({name:t,tags:o,index:a,accessPolicies:i,contentType:n,size:s.byteLength});try{await pi.put(r.uploadUrl,s,{maxBodyLength:1/0})}catch(c){throw new bt(`Failed to upload file: ${c.message}`,c,r)}return await this.getFile({id:r.id})}},bt=class extends Error{constructor(s,a,o){super(s);this.error=a;this.file=o;this.name="FileUploadError"}};function fu(e){let{apiUrl:t,headers:s,withCredentials:a,timeout:o}=e;return pi.create({baseURL:t,headers:s,withCredentials:a,timeout:o,maxBodyLength:qu,maxContentLength:hu,httpAgent:oi?new ui.default.Agent({keepAlive:!0}):void 0,httpsAgent:oi?new ci.default.Agent({keepAlive:!0}):void 0})}export{gt as AlreadyExistsError,ht as BreakingChangesError,ii as Client,bt as FileUploadError,Ze as ForbiddenError,Xe as InternalError,ot as InvalidDataFormatError,it as InvalidIdentifierError,nt as InvalidJsonSchemaError,tt as InvalidPayloadError,dt as InvalidQueryError,qt as LimitExceededError,st as MethodNotFoundError,et as PayloadTooLargeError,Rt as PaymentRequiredError,mt as QuotaExceededError,yt as RateLimitedError,ut as ReferenceConstraintError,ct as ReferenceNotFoundError,pt as RelationConflictError,at as ResourceNotFoundError,lt as RuntimeError,Ye as UnauthorizedError,$ as UnknownError,rt as UnsupportedMediaTypeError,pc as axios,ft as errorFrom,Hr as isApiError};
1
+ var mi=Object.create;var It=Object.defineProperty;var Ri=Object.getOwnPropertyDescriptor;var qi=Object.getOwnPropertyNames;var hi=Object.getPrototypeOf,fi=Object.prototype.hasOwnProperty;var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var bi=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qi(t))!fi.call(e,o)&&o!==s&&It(e,o,{get:()=>t[o],enumerable:!(a=Ri(t,o))||a.enumerable});return e};var Pe=(e,t,s)=>(s=e!=null?mi(hi(e)):{},bi(t||!e||!e.__esModule?It(s,"default",{value:e,enumerable:!0}):s,e));var kt=b(()=>{});var vt=b(()=>{});var Bt=b((Gu,Ct)=>{"use strict";Ct.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},s=Symbol("test"),a=Object(s);if(typeof s=="string"||Object.prototype.toString.call(s)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var o=42;t[s]=o;for(s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var n=Object.getOwnPropertySymbols(t);if(n.length!==1||n[0]!==s||!Object.prototype.propertyIsEnumerable.call(t,s))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(t,s);if(p.value!==o||p.enumerable!==!0)return!1}return!0}});var wt=b((wu,Gt)=>{"use strict";var Ut=typeof Symbol<"u"&&Symbol,Qi=Bt();Gt.exports=function(){return typeof Ut!="function"||typeof Symbol!="function"||typeof Ut("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Qi()}});var St=b((Wu,Lt)=>{"use strict";var Wt={foo:{}},Hi=Object;Lt.exports=function(){return{__proto__:Wt}.foo===Wt.foo&&!({__proto__:null}instanceof Hi)}});var Ht=b((Lu,Qt)=>{"use strict";var Di="Function.prototype.bind called on incompatible ",Je=Array.prototype.slice,Mi=Object.prototype.toString,Ei="[object Function]";Qt.exports=function(t){var s=this;if(typeof s!="function"||Mi.call(s)!==Ei)throw new TypeError(Di+s);for(var a=Je.call(arguments,1),o,n=function(){if(this instanceof o){var l=s.apply(this,a.concat(Je.call(arguments)));return Object(l)===l?l:this}else return s.apply(t,a.concat(Je.call(arguments)))},p=Math.max(0,s.length-a.length),i=[],r=0;r<p;r++)i.push("$"+r);if(o=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(n),s.prototype){var d=function(){};d.prototype=s.prototype,o.prototype=new d,d.prototype=null}return o}});var le=b((Su,Dt)=>{"use strict";var _i=Ht();Dt.exports=Function.prototype.bind||_i});var Et=b((Qu,Mt)=>{"use strict";var Oi=le();Mt.exports=Oi.call(Function.call,Object.prototype.hasOwnProperty)});var me=b((Hu,$t)=>{"use strict";var g,Z=SyntaxError,Nt=Function,Y=TypeError,Ye=function(e){try{return Nt('"use strict"; return ('+e+").constructor;")()}catch{}},O=Object.getOwnPropertyDescriptor;if(O)try{O({},"")}catch{O=null}var Ze=function(){throw new Y},Fi=O?function(){try{return arguments.callee,Ze}catch{try{return O(arguments,"callee").get}catch{return Ze}}}():Ze,j=wt()(),Ni=St()(),x=Object.getPrototypeOf||(Ni?function(e){return e.__proto__}:null),J={},$i=typeof Uint8Array>"u"||!x?g:x(Uint8Array),F={"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":j&&x?x([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":J,"%AsyncGenerator%":J,"%AsyncGeneratorFunction%":J,"%AsyncIteratorPrototype%":J,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":Nt,"%GeneratorFunction%":J,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&&x?x(x([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!j||!x?g:x(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!j||!x?g:x(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&&x?x(""[Symbol.iterator]()):g,"%Symbol%":j?Symbol:g,"%SyntaxError%":Z,"%ThrowTypeError%":Fi,"%TypedArray%":$i,"%TypeError%":Y,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet};if(x)try{null.error}catch(e){_t=x(x(e)),F["%Error.prototype%"]=_t}var _t,Ki=function e(t){var s;if(t==="%AsyncFunction%")s=Ye("async function () {}");else if(t==="%GeneratorFunction%")s=Ye("function* () {}");else if(t==="%AsyncGeneratorFunction%")s=Ye("async function* () {}");else if(t==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(s=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&x&&(s=x(o.prototype))}return F[t]=s,s},Ot={"%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"]},ie=le(),ge=Et(),Vi=ie.call(Function.call,Array.prototype.concat),zi=ie.call(Function.apply,Array.prototype.splice),Ft=ie.call(Function.call,String.prototype.replace),ye=ie.call(Function.call,String.prototype.slice),ji=ie.call(Function.call,RegExp.prototype.exec),Ji=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Yi=/\\(\\)?/g,Zi=function(t){var s=ye(t,0,1),a=ye(t,-1);if(s==="%"&&a!=="%")throw new Z("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&s!=="%")throw new Z("invalid intrinsic syntax, expected opening `%`");var o=[];return Ft(t,Ji,function(n,p,i,r){o[o.length]=i?Ft(r,Yi,"$1"):p||n}),o},Xi=function(t,s){var a=t,o;if(ge(Ot,a)&&(o=Ot[a],a="%"+o[0]+"%"),ge(F,a)){var n=F[a];if(n===J&&(n=Ki(a)),typeof n>"u"&&!s)throw new Y("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:a,value:n}}throw new Z("intrinsic "+t+" does not exist!")};$t.exports=function(t,s){if(typeof t!="string"||t.length===0)throw new Y("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof s!="boolean")throw new Y('"allowMissing" argument must be a boolean');if(ji(/^%?[^%]*%?$/,t)===null)throw new Z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Zi(t),o=a.length>0?a[0]:"",n=Xi("%"+o+"%",s),p=n.name,i=n.value,r=!1,d=n.alias;d&&(o=d[0],zi(a,Vi([0,1],d)));for(var l=1,h=!0;l<a.length;l+=1){var y=a[l],f=ye(y,0,1),R=ye(y,-1);if((f==='"'||f==="'"||f==="`"||R==='"'||R==="'"||R==="`")&&f!==R)throw new Z("property names with quotes must have matching quotes");if((y==="constructor"||!h)&&(r=!0),o+="."+y,p="%"+o+"%",ge(F,p))i=F[p];else if(i!=null){if(!(y in i)){if(!s)throw new Y("base intrinsic for "+t+" exists, but the property is not available.");return}if(O&&l+1>=a.length){var P=O(i,y);h=!!P,h&&"get"in P&&!("originalValue"in P.get)?i=P.get:i=i[y]}else h=ge(i,y),i=i[y];h&&!r&&(F[p]=i)}}return i}});var Yt=b((Du,Re)=>{"use strict";var Xe=le(),X=me(),zt=X("%Function.prototype.apply%"),jt=X("%Function.prototype.call%"),Jt=X("%Reflect.apply%",!0)||Xe.call(jt,zt),Kt=X("%Object.getOwnPropertyDescriptor%",!0),N=X("%Object.defineProperty%",!0),ep=X("%Math.max%");if(N)try{N({},"a",{value:1})}catch{N=null}Re.exports=function(t){var s=Jt(Xe,jt,arguments);if(Kt&&N){var a=Kt(s,"length");a.configurable&&N(s,"length",{value:1+ep(0,t.length-(arguments.length-1))})}return s};var Vt=function(){return Jt(Xe,zt,arguments)};N?N(Re.exports,"apply",{value:Vt}):Re.exports.apply=Vt});var tr=b((Mu,er)=>{"use strict";var Zt=me(),Xt=Yt(),tp=Xt(Zt("String.prototype.indexOf"));er.exports=function(t,s){var a=Zt(t,!!s);return typeof a=="function"&&tp(t,".prototype.")>-1?Xt(a):a}});var rr=b(()=>{});var Ir=b((Ou,xr)=>{var ut=typeof Map=="function"&&Map.prototype,et=Object.getOwnPropertyDescriptor&&ut?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,he=ut&&et&&typeof et.get=="function"?et.get:null,sr=ut&&Map.prototype.forEach,ct=typeof Set=="function"&&Set.prototype,tt=Object.getOwnPropertyDescriptor&&ct?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fe=ct&&tt&&typeof tt.get=="function"?tt.get:null,ar=ct&&Set.prototype.forEach,rp=typeof WeakMap=="function"&&WeakMap.prototype,ue=rp?WeakMap.prototype.has:null,sp=typeof WeakSet=="function"&&WeakSet.prototype,ce=sp?WeakSet.prototype.has:null,ap=typeof WeakRef=="function"&&WeakRef.prototype,nr=ap?WeakRef.prototype.deref:null,np=Boolean.prototype.valueOf,op=Object.prototype.toString,ip=Function.prototype.toString,pp=String.prototype.match,dt=String.prototype.slice,H=String.prototype.replace,up=String.prototype.toUpperCase,or=String.prototype.toLowerCase,mr=RegExp.prototype.test,ir=Array.prototype.concat,T=Array.prototype.join,cp=Array.prototype.slice,pr=Math.floor,at=typeof BigInt=="function"?BigInt.prototype.valueOf:null,rt=Object.getOwnPropertySymbols,nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ee=typeof Symbol=="function"&&typeof Symbol.iterator=="object",v=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ee||"symbol")?Symbol.toStringTag:null,Rr=Object.prototype.propertyIsEnumerable,ur=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function cr(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||mr.call(/e/,t))return t;var s=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var a=e<0?-pr(-e):pr(e);if(a!==e){var o=String(a),n=dt.call(t,o.length+1);return H.call(o,s,"$&_")+"."+H.call(H.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return H.call(t,s,"$&_")}var ot=rr(),dr=ot.custom,lr=hr(dr)?dr:null;xr.exports=function e(t,s,a,o){var n=s||{};if(Q(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=Q(n,"customInspect")?n.customInspect:!0;if(typeof p!="boolean"&&p!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var i=n.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return br(t,n);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var r=String(t);return i?cr(t,r):r}if(typeof t=="bigint"){var d=String(t)+"n";return i?cr(t,d):d}var l=typeof n.depth>"u"?5:n.depth;if(typeof a>"u"&&(a=0),a>=l&&l>0&&typeof t=="object")return it(t)?"[Array]":"[Object]";var h=Cp(n,a);if(typeof o>"u")o=[];else if(fr(o,t)>=0)return"[Circular]";function y(A,S,G){if(S&&(o=cp.call(o),o.push(S)),G){var oe={depth:n.depth};return Q(n,"quoteStyle")&&(oe.quoteStyle=n.quoteStyle),e(A,oe,a+1,o)}return e(A,n,a+1,o)}if(typeof t=="function"&&!gr(t)){var f=fp(t),R=qe(t,y);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(R.length>0?" { "+T.call(R,", ")+" }":"")}if(hr(t)){var P=ee?H.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):nt.call(t);return typeof t=="object"&&!ee?pe(P):P}if(Pp(t)){for(var B="<"+or.call(String(t.nodeName)),m=t.attributes||[],U=0;U<m.length;U++)B+=" "+m[U].name+"="+qr(dp(m[U].value),"double",n);return B+=">",t.childNodes&&t.childNodes.length&&(B+="..."),B+="</"+or.call(String(t.nodeName))+">",B}if(it(t)){if(t.length===0)return"[]";var W=qe(t,y);return h&&!Tp(W)?"["+pt(W,h)+"]":"[ "+T.call(W,", ")+" ]"}if(gp(t)){var K=qe(t,y);return!("cause"in Error.prototype)&&"cause"in t&&!Rr.call(t,"cause")?"{ ["+String(t)+"] "+T.call(ir.call("[cause]: "+y(t.cause),K),", ")+" }":K.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+T.call(K,", ")+" }"}if(typeof t=="object"&&p){if(lr&&typeof t[lr]=="function"&&ot)return ot(t,{depth:l-a});if(p!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(bp(t)){var se=[];return sr&&sr.call(t,function(A,S){se.push(y(S,t,!0)+" => "+y(A,t))}),yr("Map",he.call(t),se,h)}if(kp(t)){var ae=[];return ar&&ar.call(t,function(A){ae.push(y(A,t))}),yr("Set",fe.call(t),ae,h)}if(xp(t))return st("WeakMap");if(vp(t))return st("WeakSet");if(Ip(t))return st("WeakRef");if(mp(t))return pe(y(Number(t)));if(qp(t))return pe(y(at.call(t)));if(Rp(t))return pe(np.call(t));if(yp(t))return pe(y(String(t)));if(!lp(t)&&!gr(t)){var M=qe(t,y),ne=ur?ur(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",V=!ne&&v&&Object(t)===t&&v in t?dt.call(D(t),8,-1):L?"Object":"",E=ne||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",z=E+(V||L?"["+T.call(ir.call([],V||[],L||[]),": ")+"] ":"");return M.length===0?z+"{}":h?z+"{"+pt(M,h)+"}":z+"{ "+T.call(M,", ")+" }"}return String(t)};function qr(e,t,s){var a=(s.quoteStyle||t)==="double"?'"':"'";return a+e+a}function dp(e){return H.call(String(e),/"/g,"&quot;")}function it(e){return D(e)==="[object Array]"&&(!v||!(typeof e=="object"&&v in e))}function lp(e){return D(e)==="[object Date]"&&(!v||!(typeof e=="object"&&v in e))}function gr(e){return D(e)==="[object RegExp]"&&(!v||!(typeof e=="object"&&v in e))}function gp(e){return D(e)==="[object Error]"&&(!v||!(typeof e=="object"&&v in e))}function yp(e){return D(e)==="[object String]"&&(!v||!(typeof e=="object"&&v in e))}function mp(e){return D(e)==="[object Number]"&&(!v||!(typeof e=="object"&&v in e))}function Rp(e){return D(e)==="[object Boolean]"&&(!v||!(typeof e=="object"&&v in e))}function hr(e){if(ee)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!nt)return!1;try{return nt.call(e),!0}catch{}return!1}function qp(e){if(!e||typeof e!="object"||!at)return!1;try{return at.call(e),!0}catch{}return!1}var hp=Object.prototype.hasOwnProperty||function(e){return e in this};function Q(e,t){return hp.call(e,t)}function D(e){return op.call(e)}function fp(e){if(e.name)return e.name;var t=pp.call(ip.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function fr(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,a=e.length;s<a;s++)if(e[s]===t)return s;return-1}function bp(e){if(!he||!e||typeof e!="object")return!1;try{he.call(e);try{fe.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function xp(e){if(!ue||!e||typeof e!="object")return!1;try{ue.call(e,ue);try{ce.call(e,ce)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Ip(e){if(!nr||!e||typeof e!="object")return!1;try{return nr.call(e),!0}catch{}return!1}function kp(e){if(!fe||!e||typeof e!="object")return!1;try{fe.call(e);try{he.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function vp(e){if(!ce||!e||typeof e!="object")return!1;try{ce.call(e,ce);try{ue.call(e,ue)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Pp(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function br(e,t){if(e.length>t.maxStringLength){var s=e.length-t.maxStringLength,a="... "+s+" more character"+(s>1?"s":"");return br(dt.call(e,0,t.maxStringLength),t)+a}var o=H.call(H.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ap);return qr(o,"single",t)}function Ap(e){var t=e.charCodeAt(0),s={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return s?"\\"+s:"\\x"+(t<16?"0":"")+up.call(t.toString(16))}function pe(e){return"Object("+e+")"}function st(e){return e+" { ? }"}function yr(e,t,s,a){var o=a?pt(s,a):T.call(s,", ");return e+" ("+t+") {"+o+"}"}function Tp(e){for(var t=0;t<e.length;t++)if(fr(e[t],`
2
+ `)>=0)return!1;return!0}function Cp(e,t){var s;if(e.indent===" ")s=" ";else if(typeof e.indent=="number"&&e.indent>0)s=T.call(Array(e.indent+1)," ");else return null;return{base:s,prev:T.call(Array(t+1),s)}}function pt(e,t){if(e.length===0)return"";var s=`
3
+ `+t.prev+t.base;return s+T.call(e,","+s)+`
4
+ `+t.prev}function qe(e,t){var s=it(e),a=[];if(s){a.length=e.length;for(var o=0;o<e.length;o++)a[o]=Q(e,o)?t(e[o],e):""}var n=typeof rt=="function"?rt(e):[],p;if(ee){p={};for(var i=0;i<n.length;i++)p["$"+n[i]]=n[i]}for(var r in e)Q(e,r)&&(s&&String(Number(r))===r&&r<e.length||ee&&p["$"+r]instanceof Symbol||(mr.call(/[^\w$]/,r)?a.push(t(r,e)+": "+t(e[r],e)):a.push(r+": "+t(e[r],e))));if(typeof rt=="function")for(var d=0;d<n.length;d++)Rr.call(e,n[d])&&a.push("["+t(n[d])+"]: "+t(e[n[d]],e));return a}});var vr=b((Fu,kr)=>{"use strict";var lt=me(),te=tr(),Bp=Ir(),Up=lt("%TypeError%"),be=lt("%WeakMap%",!0),xe=lt("%Map%",!0),Gp=te("WeakMap.prototype.get",!0),wp=te("WeakMap.prototype.set",!0),Wp=te("WeakMap.prototype.has",!0),Lp=te("Map.prototype.get",!0),Sp=te("Map.prototype.set",!0),Qp=te("Map.prototype.has",!0),gt=function(e,t){for(var s=e,a;(a=s.next)!==null;s=a)if(a.key===t)return s.next=a.next,a.next=e.next,e.next=a,a},Hp=function(e,t){var s=gt(e,t);return s&&s.value},Dp=function(e,t,s){var a=gt(e,t);a?a.value=s:e.next={key:t,next:e.next,value:s}},Mp=function(e,t){return!!gt(e,t)};kr.exports=function(){var t,s,a,o={assert:function(n){if(!o.has(n))throw new Up("Side channel does not contain "+Bp(n))},get:function(n){if(be&&n&&(typeof n=="object"||typeof n=="function")){if(t)return Gp(t,n)}else if(xe){if(s)return Lp(s,n)}else if(a)return Hp(a,n)},has:function(n){if(be&&n&&(typeof n=="object"||typeof n=="function")){if(t)return Wp(t,n)}else if(xe){if(s)return Qp(s,n)}else if(a)return Mp(a,n);return!1},set:function(n,p){be&&n&&(typeof n=="object"||typeof n=="function")?(t||(t=new be),wp(t,n,p)):xe?(s||(s=new xe),Sp(s,n,p)):(a||(a={key:{},next:null}),Dp(a,n,p))}};return o}});var Ie=b((Nu,Pr)=>{"use strict";var Ep=String.prototype.replace,_p=/%20/g,yt={RFC1738:"RFC1738",RFC3986:"RFC3986"};Pr.exports={default:yt.RFC3986,formatters:{RFC1738:function(e){return Ep.call(e,_p,"+")},RFC3986:function(e){return String(e)}},RFC1738:yt.RFC1738,RFC3986:yt.RFC3986}});var Rt=b(($u,Tr)=>{"use strict";var Op=Ie(),mt=Object.prototype.hasOwnProperty,$=Array.isArray,C=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Fp=function(t){for(;t.length>1;){var s=t.pop(),a=s.obj[s.prop];if($(a)){for(var o=[],n=0;n<a.length;++n)typeof a[n]<"u"&&o.push(a[n]);s.obj[s.prop]=o}}},Ar=function(t,s){for(var a=s&&s.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(a[o]=t[o]);return a},Np=function e(t,s,a){if(!s)return t;if(typeof s!="object"){if($(t))t.push(s);else if(t&&typeof t=="object")(a&&(a.plainObjects||a.allowPrototypes)||!mt.call(Object.prototype,s))&&(t[s]=!0);else return[t,s];return t}if(!t||typeof t!="object")return[t].concat(s);var o=t;return $(t)&&!$(s)&&(o=Ar(t,a)),$(t)&&$(s)?(s.forEach(function(n,p){if(mt.call(t,p)){var i=t[p];i&&typeof i=="object"&&n&&typeof n=="object"?t[p]=e(i,n,a):t.push(n)}else t[p]=n}),t):Object.keys(s).reduce(function(n,p){var i=s[p];return mt.call(n,p)?n[p]=e(n[p],i,a):n[p]=i,n},o)},$p=function(t,s){return Object.keys(s).reduce(function(a,o){return a[o]=s[o],a},t)},Kp=function(e,t,s){var a=e.replace(/\+/g," ");if(s==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},Vp=function(t,s,a,o,n){if(t.length===0)return t;var p=t;if(typeof t=="symbol"?p=Symbol.prototype.toString.call(t):typeof t!="string"&&(p=String(t)),a==="iso-8859-1")return escape(p).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var i="",r=0;r<p.length;++r){var d=p.charCodeAt(r);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||n===Op.RFC1738&&(d===40||d===41)){i+=p.charAt(r);continue}if(d<128){i=i+C[d];continue}if(d<2048){i=i+(C[192|d>>6]+C[128|d&63]);continue}if(d<55296||d>=57344){i=i+(C[224|d>>12]+C[128|d>>6&63]+C[128|d&63]);continue}r+=1,d=65536+((d&1023)<<10|p.charCodeAt(r)&1023),i+=C[240|d>>18]+C[128|d>>12&63]+C[128|d>>6&63]+C[128|d&63]}return i},zp=function(t){for(var s=[{obj:{o:t},prop:"o"}],a=[],o=0;o<s.length;++o)for(var n=s[o],p=n.obj[n.prop],i=Object.keys(p),r=0;r<i.length;++r){var d=i[r],l=p[d];typeof l=="object"&&l!==null&&a.indexOf(l)===-1&&(s.push({obj:p,prop:d}),a.push(l))}return Fp(s),t},jp=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Jp=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Yp=function(t,s){return[].concat(t,s)},Zp=function(t,s){if($(t)){for(var a=[],o=0;o<t.length;o+=1)a.push(s(t[o]));return a}return s(t)};Tr.exports={arrayToObject:Ar,assign:$p,combine:Yp,compact:zp,decode:Kp,encode:Vp,isBuffer:Jp,isRegExp:jp,maybeMap:Zp,merge:Np}});var Wr=b((Ku,wr)=>{"use strict";var Ur=vr(),ht=Rt(),de=Ie(),Xp=Object.prototype.hasOwnProperty,Cr={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,s){return t+"["+s+"]"},repeat:function(t){return t}},w=Array.isArray,eu=String.prototype.split,tu=Array.prototype.push,Gr=function(e,t){tu.apply(e,w(t)?t:[t])},ru=Date.prototype.toISOString,Br=de.default,k={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ht.encode,encodeValuesOnly:!1,format:Br,formatter:de.formatters[Br],indices:!1,serializeDate:function(t){return ru.call(t)},skipNulls:!1,strictNullHandling:!1},su=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},qt={},au=function e(t,s,a,o,n,p,i,r,d,l,h,y,f,R,P,B){for(var m=t,U=B,W=0,K=!1;(U=U.get(qt))!==void 0&&!K;){var se=U.get(t);if(W+=1,typeof se<"u"){if(se===W)throw new RangeError("Cyclic object value");K=!0}typeof U.get(qt)>"u"&&(W=0)}if(typeof r=="function"?m=r(s,m):m instanceof Date?m=h(m):a==="comma"&&w(m)&&(m=ht.maybeMap(m,function(ve){return ve instanceof Date?h(ve):ve})),m===null){if(n)return i&&!R?i(s,k.encoder,P,"key",y):s;m=""}if(su(m)||ht.isBuffer(m)){if(i){var ae=R?s:i(s,k.encoder,P,"key",y);if(a==="comma"&&R){for(var M=eu.call(String(m),","),ne="",L=0;L<M.length;++L)ne+=(L===0?"":",")+f(i(M[L],k.encoder,P,"value",y));return[f(ae)+(o&&w(m)&&M.length===1?"[]":"")+"="+ne]}return[f(ae)+"="+f(i(m,k.encoder,P,"value",y))]}return[f(s)+"="+f(String(m))]}var V=[];if(typeof m>"u")return V;var E;if(a==="comma"&&w(m))E=[{value:m.length>0?m.join(",")||null:void 0}];else if(w(r))E=r;else{var z=Object.keys(m);E=d?z.sort(d):z}for(var A=o&&w(m)&&m.length===1?s+"[]":s,S=0;S<E.length;++S){var G=E[S],oe=typeof G=="object"&&typeof G.value<"u"?G.value:m[G];if(!(p&&oe===null)){var yi=w(m)?typeof a=="function"?a(A,G):A:A+(l?"."+G:"["+G+"]");B.set(t,W);var xt=Ur();xt.set(qt,B),Gr(V,e(oe,yi,a,o,n,p,i,r,d,l,h,y,f,R,P,xt))}}return V},nu=function(t){if(!t)return k;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var s=t.charset||k.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=de.default;if(typeof t.format<"u"){if(!Xp.call(de.formatters,t.format))throw new TypeError("Unknown format option provided.");a=t.format}var o=de.formatters[a],n=k.filter;return(typeof t.filter=="function"||w(t.filter))&&(n=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:k.addQueryPrefix,allowDots:typeof t.allowDots>"u"?k.allowDots:!!t.allowDots,charset:s,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:k.charsetSentinel,delimiter:typeof t.delimiter>"u"?k.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:k.encode,encoder:typeof t.encoder=="function"?t.encoder:k.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:k.encodeValuesOnly,filter:n,format:a,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:k.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:k.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:k.strictNullHandling}};wr.exports=function(e,t){var s=e,a=nu(t),o,n;typeof a.filter=="function"?(n=a.filter,s=n("",s)):w(a.filter)&&(n=a.filter,o=n);var p=[];if(typeof s!="object"||s===null)return"";var i;t&&t.arrayFormat in Cr?i=t.arrayFormat:t&&"indices"in t?i=t.indices?"indices":"repeat":i="indices";var r=Cr[i];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=r==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(s)),a.sort&&o.sort(a.sort);for(var l=Ur(),h=0;h<o.length;++h){var y=o[h];a.skipNulls&&s[y]===null||Gr(p,au(s[y],y,r,d,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,l))}var f=p.join(a.delimiter),R=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?R+="utf8=%26%2310003%3B&":R+="utf8=%E2%9C%93&"),f.length>0?R+f:""}});var Qr=b((Vu,Sr)=>{"use strict";var re=Rt(),ft=Object.prototype.hasOwnProperty,ou=Array.isArray,I={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:re.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},iu=function(e){return e.replace(/&#(\d+);/g,function(t,s){return String.fromCharCode(parseInt(s,10))})},Lr=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},pu="utf8=%26%2310003%3B",uu="utf8=%E2%9C%93",cu=function(t,s){var a={},o=s.ignoreQueryPrefix?t.replace(/^\?/,""):t,n=s.parameterLimit===1/0?void 0:s.parameterLimit,p=o.split(s.delimiter,n),i=-1,r,d=s.charset;if(s.charsetSentinel)for(r=0;r<p.length;++r)p[r].indexOf("utf8=")===0&&(p[r]===uu?d="utf-8":p[r]===pu&&(d="iso-8859-1"),i=r,r=p.length);for(r=0;r<p.length;++r)if(r!==i){var l=p[r],h=l.indexOf("]="),y=h===-1?l.indexOf("="):h+1,f,R;y===-1?(f=s.decoder(l,I.decoder,d,"key"),R=s.strictNullHandling?null:""):(f=s.decoder(l.slice(0,y),I.decoder,d,"key"),R=re.maybeMap(Lr(l.slice(y+1),s),function(P){return s.decoder(P,I.decoder,d,"value")})),R&&s.interpretNumericEntities&&d==="iso-8859-1"&&(R=iu(R)),l.indexOf("[]=")>-1&&(R=ou(R)?[R]:R),ft.call(a,f)?a[f]=re.combine(a[f],R):a[f]=R}return a},du=function(e,t,s,a){for(var o=a?t:Lr(t,s),n=e.length-1;n>=0;--n){var p,i=e[n];if(i==="[]"&&s.parseArrays)p=[].concat(o);else{p=s.plainObjects?Object.create(null):{};var r=i.charAt(0)==="["&&i.charAt(i.length-1)==="]"?i.slice(1,-1):i,d=parseInt(r,10);!s.parseArrays&&r===""?p={0:o}:!isNaN(d)&&i!==r&&String(d)===r&&d>=0&&s.parseArrays&&d<=s.arrayLimit?(p=[],p[d]=o):r!=="__proto__"&&(p[r]=o)}o=p}return o},lu=function(t,s,a,o){if(t){var n=a.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,p=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,r=a.depth>0&&p.exec(n),d=r?n.slice(0,r.index):n,l=[];if(d){if(!a.plainObjects&&ft.call(Object.prototype,d)&&!a.allowPrototypes)return;l.push(d)}for(var h=0;a.depth>0&&(r=i.exec(n))!==null&&h<a.depth;){if(h+=1,!a.plainObjects&&ft.call(Object.prototype,r[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(r[1])}return r&&l.push("["+n.slice(r.index)+"]"),du(l,s,a,o)}},gu=function(t){if(!t)return I;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=typeof t.charset>"u"?I.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?I.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:I.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:I.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:I.arrayLimit,charset:s,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:I.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:I.comma,decoder:typeof t.decoder=="function"?t.decoder:I.decoder,delimiter:typeof t.delimiter=="string"||re.isRegExp(t.delimiter)?t.delimiter:I.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:I.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:I.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:I.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:I.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:I.strictNullHandling}};Sr.exports=function(e,t){var s=gu(t);if(e===""||e===null||typeof e>"u")return s.plainObjects?Object.create(null):{};for(var a=typeof e=="string"?cu(e,s):e,o=s.plainObjects?Object.create(null):{},n=Object.keys(a),p=0;p<n.length;++p){var i=n[p],r=lu(i,a[i],s,typeof e=="string");o=re.merge(o,r,s)}return s.allowSparse===!0?o:re.compact(o)}});var Dr=b((zu,Hr)=>{"use strict";var yu=Wr(),mu=Qr(),Ru=Ie();Hr.exports={formats:Ru,parse:mu,stringify:yu}});var di=Pe(kt()),li=Pe(vt());import ci from"axios";import{isNode as pi}from"browser-or-node";import{isBrowser as Pt,isNode as xi}from"browser-or-node";var Ii="https://api.botpress.cloud",ki=6e4,vi="BP_API_URL",Pi="BP_BOT_ID",Ai="BP_INTEGRATION_ID",Ti="BP_WORKSPACE_ID",Ci="BP_TOKEN";function At(e){let t=Bi(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??Ii,o=t.timeout??ki;return{apiUrl:a,timeout:o,withCredentials:Pt,headers:s}}function Bi(e){return Pt?e:xi?Ui(e):e}function Ui(e){let t={...e,apiUrl:e.apiUrl??process.env[vi],botId:e.botId??process.env[Pi],integrationId:e.integrationId??process.env[Ai],workspaceId:e.workspaceId??process.env[Ti]},s=t.token??process.env[Ci];return s&&(t.token=s),t}import hu from"axios";import Gi from"crypto";var wi={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Ae=typeof window<"u"&&typeof window.document<"u"?window.crypto:Gi;Ae.getRandomValues||(Ae=wi);var q=class extends Error{constructor(s,a,o,n,p,i){super(n);this.code=s;this.description=a;this.type=o;this.message=n;this.error=p;this.id=i;this.id||(this.id=q.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,n=Array.from(Ae.getRandomValues(new Uint8Array(o))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${n}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},Wi=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Tt=e=>e instanceof q||Wi(e)&&e.isApiError===!0,_=class extends q{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},Te=class extends q{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},Ce=class extends q{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},Be=class extends q{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},Ue=class extends q{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},Ge=class extends q{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},we=class extends q{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},We=class extends q{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},Le=class extends q{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},Se=class extends q{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},Qe=class extends q{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},He=class extends q{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},De=class extends q{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},Me=class extends q{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},Ee=class extends q{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},_e=class extends q{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},Oe=class extends q{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},Fe=class extends q{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},Ne=class extends q{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},$e=class extends q{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},Ke=class extends q{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},Ve=class extends q{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},ze=class extends q{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},Li={Unknown:_,Internal:Te,Unauthorized:Ce,Forbidden:Be,PayloadTooLarge:Ue,InvalidPayload:Ge,UnsupportedMediaType:we,MethodNotFound:We,ResourceNotFound:Le,InvalidJsonSchema:Se,InvalidDataFormat:Qe,InvalidIdentifier:He,RelationConflict:De,ReferenceConstraint:Me,ReferenceNotFound:Ee,InvalidQuery:_e,Runtime:Oe,AlreadyExists:Fe,RateLimited:Ne,PaymentRequired:$e,QuotaExceeded:Ke,LimitExceeded:Ve,BreakingChanges:ze},je=e=>Tt(e)?e:e instanceof Error?new _(e.message,e):typeof e=="string"?new _(e):Si(e);function Si(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){let t=Li[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new _(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new _("An invalid error occurred: "+JSON.stringify(e))}var Mr=Pe(Dr()),qu=e=>e[1]!==void 0,u=e=>{let{method:t,path:s,query:a,headers:o,body:n}=e,p=Object.entries(o).filter(qu),i=Object.fromEntries(p),r=Mr.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),d=r?[s,r].join("?"):s;return{method:t,url:d,headers:i,data:n}};var Er=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Or=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Nr=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}});var Kr=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var zr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Jr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var es=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var rs=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var as=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var os=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}});var ps=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var cs=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}});var ls=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var ys=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Rs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var hs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var bs=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var Is=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vs=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var As=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Cs=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var Us=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var ws=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}});var Ls=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Qs=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}});var Ds=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var Es=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var Os=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}});var Ns=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Ks=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var zs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Js=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}});var Zs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}});var ea=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ra=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}});var aa=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var oa=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var pa=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var ca=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var la=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var ya=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Ra=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ha=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var ba=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var Ia=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var va=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Aa=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Ca=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var Ua=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var wa=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var La=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken},params:{},body:{}});var Qa=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Da=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ea=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var Oa=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Na=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Ka=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var za=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Ja=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Za=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var en=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}});var rn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var an=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var on=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var un=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var dn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var gn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var mn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var qn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var fn=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var xn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var kn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var Pn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}});var Tn=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Bn=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Gn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Wn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Sn=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Hn=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Mn=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var _n=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var Fn=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var $n=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Vn=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var jn=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Yn=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}});var Xn=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}});var to=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var so=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var no=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var io=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var uo=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var lo=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var yo=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Ro=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var ho=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var bo=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var Io=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{name:e.name,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType}});var vo=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ao=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}});var Co=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Uo=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}});var wo=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}});var Lo=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var Qo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Do=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Eo=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Oo=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}});var No=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Ko=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var zo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Jo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var Zo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}});var ei=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var ri=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}});var ai=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var oi=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}});var ke=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Er(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Or(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listConversations=async t=>{let{path:s,headers:a,query:o,body:n}=Nr(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Kr(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateConversation=async t=>{let{path:s,headers:a,query:o,body:n}=zr(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Jr(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listParticipants=async t=>{let{path:s,headers:a,query:o,body:n}=Zr(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};addParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=es(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=rs(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};removeParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=as(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createEvent=async t=>{let{path:s,headers:a,query:o,body:n}=os(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getEvent=async t=>{let{path:s,headers:a,query:o,body:n}=ps(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listEvents=async t=>{let{path:s,headers:a,query:o,body:n}=cs(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createMessage=async t=>{let{path:s,headers:a,query:o,body:n}=ls(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:o,body:n}=ys(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getMessage=async t=>{let{path:s,headers:a,query:o,body:n}=Rs(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateMessage=async t=>{let{path:s,headers:a,query:o,body:n}=hs(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listMessages=async t=>{let{path:s,headers:a,query:o,body:n}=bs(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteMessage=async t=>{let{path:s,headers:a,query:o,body:n}=Is(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createUser=async t=>{let{path:s,headers:a,query:o,body:n}=vs(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getUser=async t=>{let{path:s,headers:a,query:o,body:n}=As(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listUsers=async t=>{let{path:s,headers:a,query:o,body:n}=Cs(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:o,body:n}=Us(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateUser=async t=>{let{path:s,headers:a,query:o,body:n}=ws(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteUser=async t=>{let{path:s,headers:a,query:o,body:n}=Ls(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getState=async t=>{let{path:s,headers:a,query:o,body:n}=Qs(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};setState=async t=>{let{path:s,headers:a,query:o,body:n}=Ds(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getOrSetState=async t=>{let{path:s,headers:a,query:o,body:n}=Es(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};patchState=async t=>{let{path:s,headers:a,query:o,body:n}=Os(t),i=(this.props.toAxiosRequest??u)({method:"patch",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};callAction=async t=>{let{path:s,headers:a,query:o,body:n}=Ns(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};configureIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Ks(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getTask=async t=>{let{path:s,headers:a,query:o,body:n}=zs(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createTask=async t=>{let{path:s,headers:a,query:o,body:n}=Js(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateTask=async t=>{let{path:s,headers:a,query:o,body:n}=Zs(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteTask=async t=>{let{path:s,headers:a,query:o,body:n}=ea(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listTasks=async t=>{let{path:s,headers:a,query:o,body:n}=ra(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};trackAnalytics=async t=>{let{path:s,headers:a,query:o,body:n}=aa(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};runVrl=async t=>{let{path:s,headers:a,query:o,body:n}=oa(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getAccount=async t=>{let{path:s,headers:a,query:o,body:n}=pa(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateAccount=async t=>{let{path:s,headers:a,query:o,body:n}=ca(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:o,body:n}=la(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:o,body:n}=ya(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:o,body:n}=Ra(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};setAccountPreference=async t=>{let{path:s,headers:a,query:o,body:n}=ha(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getAccountPreference=async t=>{let{path:s,headers:a,query:o,body:n}=ba(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:o,body:n}=Ia(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:o,body:n}=va(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Aa(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createBot=async t=>{let{path:s,headers:a,query:o,body:n}=Ca(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateBot=async t=>{let{path:s,headers:a,query:o,body:n}=Ua(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};transferBot=async t=>{let{path:s,headers:a,query:o,body:n}=wa(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listBots=async t=>{let{path:s,headers:a,query:o,body:n}=La(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getBot=async t=>{let{path:s,headers:a,query:o,body:n}=Qa(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteBot=async t=>{let{path:s,headers:a,query:o,body:n}=Da(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getBotLogs=async t=>{let{path:s,headers:a,query:o,body:n}=Ea(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getBotWebchat=async t=>{let{path:s,headers:a,query:o,body:n}=Oa(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:o,body:n}=Na(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getBotIssue=async t=>{let{path:s,headers:a,query:o,body:n}=Ka(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listBotIssues=async t=>{let{path:s,headers:a,query:o,body:n}=za(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:o,body:n}=Ja(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:o,body:n}=Za(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};setWorkspacePaymentMethod=async t=>{let{path:s,headers:a,query:o,body:n}=en(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:o,body:n}=rn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:o,body:n}=an(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:o,body:n}=on(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=un(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=dn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=gn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:o,body:n}=mn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:o,body:n}=qn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:o,body:n}=fn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:o,body:n}=xn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:o,body:n}=kn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=Pn(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:o,body:n}=Tn(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listWorkspaces=async t=>{let{path:s,headers:a,query:o,body:n}=Bn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=Gn(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getAuditRecords=async t=>{let{path:s,headers:a,query:o,body:n}=Wn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:o,body:n}=Sn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Hn(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Mn(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=_n(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Fn(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:o,body:n}=$n(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:o,body:n}=Vn(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:o,body:n}=jn(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Yn(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Xn(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listIntegrations=async t=>{let{path:s,headers:a,query:o,body:n}=to(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=so(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:o,body:n}=no(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:o,body:n}=io(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=uo(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getUsage=async t=>{let{path:s,headers:a,query:o,body:n}=lo(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listUsageHistory=async t=>{let{path:s,headers:a,query:o,body:n}=yo(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:o,body:n}=Ro(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listActivities=async t=>{let{path:s,headers:a,query:o,body:n}=ho(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};introspect=async t=>{let{path:s,headers:a,query:o,body:n}=bo(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createFile=async t=>{let{path:s,headers:a,query:o,body:n}=Io(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteFile=async t=>{let{path:s,headers:a,query:o,body:n}=vo(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listFiles=async t=>{let{path:s,headers:a,query:o,body:n}=Ao(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getFile=async t=>{let{path:s,headers:a,query:o,body:n}=Co(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateFile=async t=>{let{path:s,headers:a,query:o,body:n}=Uo(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};searchFiles=async t=>{let{path:s,headers:a,query:o,body:n}=wo(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};listTables=async t=>{let{path:s,headers:a,query:o,body:n}=Lo(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getTable=async t=>{let{path:s,headers:a,query:o,body:n}=Qo(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:o,body:n}=Do(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createTable=async t=>{let{path:s,headers:a,query:o,body:n}=Eo(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};duplicateTable=async t=>{let{path:s,headers:a,query:o,body:n}=Oo(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateTable=async t=>{let{path:s,headers:a,query:o,body:n}=No(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};renameTableColumn=async t=>{let{path:s,headers:a,query:o,body:n}=Ko(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteTable=async t=>{let{path:s,headers:a,query:o,body:n}=zo(t),i=(this.props.toAxiosRequest??u)({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};getTableRow=async t=>{let{path:s,headers:a,query:o,body:n}=Jo(t),i=(this.props.toAxiosRequest??u)({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};findTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=Zo(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};createTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=ei(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};deleteTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=ri(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};updateTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=ai(t),i=(this.props.toAxiosRequest??u)({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})};upsertTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=oi(t),i=(this.props.toAxiosRequest??u)({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw c(r)})}};function c(e){return hu.isAxiosError(e)&&e.response?.data?je(e.response.data):je(e)}import*as dc from"axios";var gi=100*1024*1024,fu=gi,bu=gi,ui=class extends ke{config;constructor(t={}){let s=At(t),a=xu(s);super(a),this.config=s}createAndUploadFile=async({name:t,data:s,index:a,tags:o,contentType:n,accessPolicies:p})=>{let{file:i}=await this.createFile({name:t,tags:o,index:a,accessPolicies:p,contentType:n,size:s.byteLength});try{await ci.put(i.uploadUrl,s,{maxBodyLength:1/0})}catch(r){throw new bt(`Failed to upload file: ${r.message}`,r,i)}return await this.getFile({id:i.id})}},bt=class extends Error{constructor(s,a,o){super(s);this.error=a;this.file=o;this.name="FileUploadError"}};function xu(e){let{apiUrl:t,headers:s,withCredentials:a,timeout:o}=e;return ci.create({baseURL:t,headers:s,withCredentials:a,timeout:o,maxBodyLength:fu,maxContentLength:bu,httpAgent:pi?new di.default.Agent({keepAlive:!0}):void 0,httpsAgent:pi?new li.default.Agent({keepAlive:!0}):void 0})}export{Fe as AlreadyExistsError,ze as BreakingChangesError,ui as Client,bt as FileUploadError,Be as ForbiddenError,Te as InternalError,Qe as InvalidDataFormatError,He as InvalidIdentifierError,Se as InvalidJsonSchemaError,Ge as InvalidPayloadError,_e as InvalidQueryError,Ve as LimitExceededError,We as MethodNotFoundError,Ue as PayloadTooLargeError,$e as PaymentRequiredError,Ke as QuotaExceededError,Ne as RateLimitedError,Me as ReferenceConstraintError,Ee as ReferenceNotFoundError,De as RelationConflictError,Le as ResourceNotFoundError,Oe as RuntimeError,Ce as UnauthorizedError,_ as UnknownError,we as UnsupportedMediaTypeError,dc as axios,je as errorFrom,Tt as isApiError};
5
5
  //# sourceMappingURL=index.mjs.map