@kadoa/node-sdk 0.12.0 → 0.12.1

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.
@@ -5,7 +5,7 @@ var KadoaSDK=(function(exports,ne){'use strict';function _interopDefault(e){retu
5
5
  `+a.map(cu).join(`
6
6
  `):" "+cu(a[0]):"as no adapter specified";throw new j("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o},adapters:li};function ci(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new be(null,e)}function nr(e){return ci(e),e.headers=Y.from(e.headers),e.data=Jt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",false),rr.getAdapter(e.adapter||pt.adapter,e)(e).then(function(n){return ci(e),n.data=Jt.call(e,e.transformResponse,n),n.headers=Y.from(n.headers),n},function(n){return Mt(n)||(ci(e),n&&n.response&&(n.response.data=Jt.call(e,e.transformResponse,n.response),n.response.headers=Y.from(n.response.headers))),Promise.reject(n)})}var ir="1.12.2";var ar={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ar[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e};});var uu={};ar.transitional=function(t,r,n){function o(i,a){return "[Axios v"+ir+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return (i,a,s)=>{if(t===false)throw new j(o(a," has been removed"+(r?" in "+r:"")),j.ERR_DEPRECATED);return r&&!uu[a]&&(uu[a]=true,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,s):true}};ar.spelling=function(t){return (r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),true)};function dm(e,t,r){if(typeof e!="object")throw new j("options must be an object",j.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),o=n.length;for(;o-- >0;){let i=n[o],a=t[i];if(a){let s=e[i],l=s===void 0||a(s,i,e);if(l!==true)throw new j("option "+i+" must be "+l,j.ERR_BAD_OPTION_VALUE);continue}if(r!==true)throw new j("Unknown option "+i,j.ERR_BAD_OPTION)}}var Qt={assertOptions:dm,validators:ar};var Ae=Qt.validators,gt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Mn,response:new Mn};}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
7
7
  `+i):n.stack=i;}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=xe(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Qt.assertOptions(n,{silentJSONParsing:Ae.transitional(Ae.boolean),forcedJSONParsing:Ae.transitional(Ae.boolean),clarifyTimeoutError:Ae.transitional(Ae.boolean)},false),o!=null&&(h.isFunction(o)?r.paramsSerializer={serialize:o}:Qt.assertOptions(o,{encode:Ae.function,serialize:Ae.function},true)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=true),Qt.assertOptions(r,{baseUrl:Ae.spelling("baseURL"),withXsrfToken:Ae.spelling("withXSRFToken")},true),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&h.merge(i.common,i[r.method]);i&&h.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f];}),r.headers=Y.concat(a,i);let s=[],l=true;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===false||(l=l&&w.synchronous,s.unshift(w.fulfilled,w.rejected));});let c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected);});let u,d=0,g;if(!l){let f=[nr.bind(this),void 0];for(f.unshift(...s),f.push(...c),g=f.length,u=Promise.resolve(r);d<g;)u=u.then(f[d++],f[d++]);return u}g=s.length;let m=r;for(;d<g;){let f=s[d++],w=s[d++];try{m=f(m);}catch(v){w.call(this,v);break}}try{u=nr.call(this,m);}catch(f){return Promise.reject(f)}for(d=0,g=c.length;d<g;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=xe(this.defaults,t);let r=Ht(t.baseURL,t.url,t.allowAbsoluteUrls);return Zt(r,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){gt.prototype[t]=function(r,n){return this.request(xe(n||{},{method:t,url:r,data:(n||{}).data}))};});h.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(xe(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}gt.prototype[t]=r(),gt.prototype[t+"Form"]=r(true);});var Xt=gt;var ui=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i;});let n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null;}),this.promise.then=o=>{let i,a=new Promise(s=>{n.subscribe(s),i=s;}).then(o);return a.cancel=function(){n.unsubscribe(i);},a},t(function(i,a,s){n.reason||(n.reason=new be(i,a,s),r(n.reason));});}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t];}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1);}toAbortSignal(){let t=new AbortController,r=n=>{t.abort(n);};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return {token:new e(function(o){t=o;}),cancel:t}}},du=ui;function di(e){return function(r){return e.apply(null,r)}}function fi(e){return h.isObject(e)&&e.isAxiosError===true}var pi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pi).forEach(([e,t])=>{pi[t]=e;});var fu=pi;function pu(e){let t=new Xt(e),r=qt(Xt.prototype.request,t);return h.extend(r,Xt.prototype,t,{allOwnKeys:true}),h.extend(r,t,null,{allOwnKeys:true}),r.create=function(o){return pu(xe(e,o))},r}var X=pu(pt);X.Axios=Xt;X.CanceledError=be;X.CancelToken=du;X.isCancel=Mt;X.VERSION=ir;X.toFormData=qe;X.AxiosError=j;X.Cancel=X.CanceledError;X.all=function(t){return Promise.all(t)};X.spread=di;X.isAxiosError=fi;X.mergeConfig=xe;X.AxiosHeaders=Y;X.formToJSON=e=>Yo(h.isHTMLForm(e)?new FormData(e):e);X.getAdapter=rr.getAdapter;X.HttpStatusCode=fu;X.default=X;var b=X;var{Axios:Cx,AxiosError:mu,CanceledError:Dx,isCancel:Wx,CancelToken:Nx,VERSION:Ex,all:zx,Cancel:jx,isAxiosError:hu,spread:Tx,toFormData:Ux,AxiosHeaders:qx,HttpStatusCode:Gx,formToJSON:Fx,getAdapter:Lx,mergeConfig:Zx}=b;var q=class e extends z{constructor(t,r){super(t,{code:r?.code,details:r?.details,cause:r?.cause}),this.name="KadoaHttpException",this.httpStatus=r?.httpStatus,this.requestId=r?.requestId,this.endpoint=r?.endpoint,this.method=r?.method,this.responseBody=r?.responseBody;}static fromAxiosError(t,r){let n=t.response?.status,o=t.response?.headers?.["x-request-id"]||t.response?.headers?.["x-amzn-requestid"],i=t.config?.method?.toUpperCase(),a=t.config?.url;return new e(r?.message||t.message,{code:e.mapStatusToCode(t),httpStatus:n,requestId:o,endpoint:a,method:i,responseBody:t.response?.data,details:r?.details,cause:t})}toJSON(){return {...super.toJSON(),httpStatus:this.httpStatus,requestId:this.requestId,endpoint:this.endpoint,method:this.method,responseBody:this.responseBody}}toDetailedString(){let t=[`${this.name}: ${this.message}`,`Code: ${this.code}`];return this.httpStatus&&t.push(`HTTP Status: ${this.httpStatus}`),this.method&&this.endpoint&&t.push(`Request: ${this.method} ${this.endpoint}`),this.requestId&&t.push(`Request ID: ${this.requestId}`),this.responseBody&&t.push(`Response Body: ${JSON.stringify(this.responseBody,null,2)}`),this.details&&Object.keys(this.details).length>0&&t.push(`Details: ${JSON.stringify(this.details,null,2)}`),this.cause&&t.push(`Cause: ${this.cause}`),t.join(`
8
- `)}static wrap(t,r){return t instanceof e||t instanceof z?t:hu(t)?e.fromAxiosError(t,r):z.wrap(t,r)}static mapStatusToCode(t){let r=typeof t=="number"?t:t.response?.status;return r?r===401||r===403?"AUTH_ERROR":r===404?"NOT_FOUND":r===408?"TIMEOUT":r===429?"RATE_LIMITED":r>=400&&r<500?"VALIDATION_ERROR":r>=500?"HTTP_ERROR":"UNKNOWN":typeof t=="number"?"UNKNOWN":t.code==="ECONNABORTED"?"TIMEOUT":t.request?"NETWORK_ERROR":"UNKNOWN"}};var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function gu(e,t=0){return (oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}var mi,fm=new Uint8Array(16);function hi(){if(!mi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");mi=crypto.getRandomValues.bind(crypto);}return mi(fm)}var pm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),gi={randomUUID:pm};function mm(e,t,r){e=e||{};let n=e.random??e.rng?.()??hi();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return gu(n)}function hm(e,t,r){return gi.randomUUID&&!t&&!e?gi.randomUUID():mm(e,t,r)}var vi=hm;var S=globalThis.URL,vu=globalThis.URLSearchParams;var A="https://api.kadoa.com".replace(/\/+$/,"");var Se=class{constructor(t,r=A,n=b){this.basePath=r;this.axios=n;t&&(this.configuration=t,this.basePath=t.basePath??r);}},sr=class extends Error{constructor(r,n){super(n);this.field=r;this.name="RequiredError";}},V={};var P="https://example.com",D=function(e,t,r){if(r==null)throw new sr(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},_=async function(e,t,r){if(r&&r.apiKey){let n=typeof r.apiKey=="function"?await r.apiKey(t):await r.apiKey;e[t]=n;}};var ve=async function(e,t){if(t&&t.accessToken){let r=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+r;}};function wi(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>wi(e,n,r)):Object.keys(t).forEach(n=>wi(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t));}var $=function(e,...t){let r=new vu(e.search);wi(r,t),e.search=r.toString();},F=function(e,t,r){let n=typeof e!="string";return (n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},O=function(e){return e.pathname+e.search+e.hash},C=function(e,t,r,n){return (o=t,i=r)=>{let a={...e.options,url:(o.defaults.baseURL?"":n?.basePath??i)+e.url};return o.request(a)}};var gm=function(e){return {v4DataValidationRulesActionsBulkApprovePost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/bulk-approve",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsBulkDeletePost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/bulk-delete",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsDeleteAllDelete:async(t,r={})=>{let n="/v4/data-validation/rules/actions/delete-all",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsGeneratePost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/generate",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsGenerateRulesPost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/generate-rules",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesGet:async(t,r,n,o,i,a,s={})=>{let l="/v4/data-validation/rules",c=new S(l,P),u;e&&(u=e.baseOptions);let d={method:"GET",...u,...s},g={},m={};if(await _(g,"x-api-key",e),t!==void 0&&(m.groupId=t),r!==void 0&&(m.workflowId=r),n!==void 0&&(m.status=n),o!==void 0&&(m.page=o),i!==void 0&&(m.pageSize=i),a!==void 0)for(let[w,v]of Object.entries(a))m[w]=v;$(c,m);let f=u&&u.headers?u.headers:{};return d.headers={...g,...f,...s.headers},{url:O(c),options:d}},v4DataValidationRulesPost:async(t,r={})=>{let n="/v4/data-validation/rules",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesRuleIdDelete:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdDelete","ruleId",t);let o="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"DELETE",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationRulesRuleIdDisablePost:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdDisablePost","ruleId",t);let o="/v4/data-validation/rules/{ruleId}/disable".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationRulesRuleIdGet:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdGet","ruleId",t);let o="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),r!==void 0&&(c.includeDeleted=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v4DataValidationRulesRuleIdPut:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdPut","ruleId",t);let o="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationValidationsValidationIdAnomaliesGet:async(t,r,n,o={})=>{D("v4DataValidationValidationsValidationIdAnomaliesGet","validationId",t);let i="/v4/data-validation/validations/{validationId}/anomalies".replace("{validationId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),r!==void 0&&(u.page=r),n!==void 0&&(u.pageSize=n),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet:async(t,r,n,o,i={})=>{D("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","validationId",t),D("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","ruleName",r);let a="/v4/data-validation/validations/{validationId}/anomalies/rules/{ruleName}".replace("{validationId}",encodeURIComponent(String(t))).replace("{ruleName}",encodeURIComponent(String(r))),s=new S(a,P),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...i},u={},d={};await _(u,"x-api-key",e),n!==void 0&&(d.page=n),o!==void 0&&(d.pageSize=o),$(s,d);let g=l&&l.headers?l.headers:{};return c.headers={...u,...g,...i.headers},{url:O(s),options:c}},v4DataValidationValidationsValidationIdGet:async(t,r,n={})=>{D("v4DataValidationValidationsValidationIdGet","validationId",t);let o="/v4/data-validation/validations/{validationId}".replace("{validationId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),r!==void 0&&(c.includeDryRun=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v4DataValidationWorkflowIdJobsJobIdValidatePost:async(t,r,n,o={})=>{D("v4DataValidationWorkflowIdJobsJobIdValidatePost","workflowId",t),D("v4DataValidationWorkflowIdJobsJobIdValidatePost","jobId",r);let i="/v4/data-validation/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"POST",...s,...o},c={},u={};await _(c,"x-api-key",e),c["Content-Type"]="application/json",$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},l.data=F(n,l,e),{url:O(a),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost:async(t,r,n,o={})=>{D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","workflowId",t),D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","jobId",r);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"POST",...s,...o},c={},u={};await _(c,"x-api-key",e),c["Content-Type"]="application/json",$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},l.data=F(n,l,e),{url:O(a),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet:async(t,r,n,o,i,a={})=>{D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","workflowId",t),D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","jobId",r);let s="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),l=new S(s,P),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},g={};await _(d,"x-api-key",e),n!==void 0&&(g.page=n),o!==void 0&&(g.pageSize=o),i!==void 0&&(g.includeDryRun=i),$(l,g);let m=c&&c.headers?c.headers:{};return u.headers={...d,...m,...a.headers},{url:O(l),options:u}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet:async(t,r,n,o={})=>{D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","workflowId",t),D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","jobId",r);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),n!==void 0&&(u.includeDryRun=n),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4DataValidationWorkflowsWorkflowIdValidationConfigGet:async(t,r={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationConfigGet","workflowId",t);let n="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4DataValidationWorkflowsWorkflowIdValidationConfigPut:async(t,r,n={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationConfigPut","workflowId",t);let o="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationWorkflowsWorkflowIdValidationTogglePut:async(t,r,n={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationTogglePut","workflowId",t);let o="/v4/data-validation/workflows/{workflowId}/validation/toggle".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationWorkflowsWorkflowIdValidationsLatestGet:async(t,r,n={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationsLatestGet","workflowId",t);let o="/v4/data-validation/workflows/{workflowId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),r!==void 0&&(c.includeDryRun=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}}}},H=function(e){let t=gm(e);return {async v4DataValidationRulesActionsBulkApprovePost(r,n){let o=await t.v4DataValidationRulesActionsBulkApprovePost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsBulkDeletePost(r,n){let o=await t.v4DataValidationRulesActionsBulkDeletePost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsDeleteAllDelete(r,n){let o=await t.v4DataValidationRulesActionsDeleteAllDelete(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsGeneratePost(r,n){let o=await t.v4DataValidationRulesActionsGeneratePost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsGenerateRulesPost(r,n){let o=await t.v4DataValidationRulesActionsGenerateRulesPost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesGet(r,n,o,i,a,s,l){let c=await t.v4DataValidationRulesGet(r,n,o,i,a,s,l),u=e?.serverIndex??0,d=V["DataValidationApi.v4DataValidationRulesGet"]?.[u]?.url;return (g,m)=>C(c,b,A,e)(g,d||m)},async v4DataValidationRulesPost(r,n){let o=await t.v4DataValidationRulesPost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesRuleIdDelete(r,n,o){let i=await t.v4DataValidationRulesRuleIdDelete(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationRulesRuleIdDisablePost(r,n,o){let i=await t.v4DataValidationRulesRuleIdDisablePost(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationRulesRuleIdGet(r,n,o){let i=await t.v4DataValidationRulesRuleIdGet(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationRulesRuleIdPut(r,n,o){let i=await t.v4DataValidationRulesRuleIdPut(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationValidationsValidationIdAnomaliesGet(r,n,o,i){let a=await t.v4DataValidationValidationsValidationIdAnomaliesGet(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(r,n,o,i,a){let s=await t.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(r,n,o,i,a),l=e?.serverIndex??0,c=V["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[l]?.url;return (u,d)=>C(s,b,A,e)(u,c||d)},async v4DataValidationValidationsValidationIdGet(r,n,o){let i=await t.v4DataValidationValidationsValidationIdGet(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationWorkflowIdJobsJobIdValidatePost(r,n,o,i){let a=await t.v4DataValidationWorkflowIdJobsJobIdValidatePost(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(r,n,o,i){let a=await t.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(r,n,o,i,a,s){let l=await t.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(r,n,o,i,a,s),c=e?.serverIndex??0,u=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[c]?.url;return (d,g)=>C(l,b,A,e)(d,u||g)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(r,n,o,i){let a=await t.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationWorkflowsWorkflowIdValidationConfigGet(r,n){let o=await t.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationWorkflowsWorkflowIdValidationConfigPut(r,n,o){let i=await t.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationWorkflowsWorkflowIdValidationTogglePut(r,n,o){let i=await t.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(r,n,o){let i=await t.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)}}};var vt=class extends Se{v4DataValidationRulesActionsBulkApprovePost(t={},r){return H(this.configuration).v4DataValidationRulesActionsBulkApprovePost(t.bulkApproveRules,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsBulkDeletePost(t={},r){return H(this.configuration).v4DataValidationRulesActionsBulkDeletePost(t.bulkDeleteRules,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsDeleteAllDelete(t={},r){return H(this.configuration).v4DataValidationRulesActionsDeleteAllDelete(t.deleteRuleWithReason,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsGeneratePost(t={},r){return H(this.configuration).v4DataValidationRulesActionsGeneratePost(t.generateRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsGenerateRulesPost(t={},r){return H(this.configuration).v4DataValidationRulesActionsGenerateRulesPost(t.generateRules,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesGet(t={},r){return H(this.configuration).v4DataValidationRulesGet(t.groupId,t.workflowId,t.status,t.page,t.pageSize,t.includeDeleted,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesPost(t={},r){return H(this.configuration).v4DataValidationRulesPost(t.createRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdDelete(t,r){return H(this.configuration).v4DataValidationRulesRuleIdDelete(t.ruleId,t.deleteRuleWithReason,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdDisablePost(t,r){return H(this.configuration).v4DataValidationRulesRuleIdDisablePost(t.ruleId,t.disableRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdGet(t,r){return H(this.configuration).v4DataValidationRulesRuleIdGet(t.ruleId,t.includeDeleted,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdPut(t,r){return H(this.configuration).v4DataValidationRulesRuleIdPut(t.ruleId,t.updateRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesGet(t,r){return H(this.configuration).v4DataValidationValidationsValidationIdAnomaliesGet(t.validationId,t.page,t.pageSize,r).then(n=>n(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t,r){return H(this.configuration).v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t.validationId,t.ruleName,t.page,t.pageSize,r).then(n=>n(this.axios,this.basePath))}v4DataValidationValidationsValidationIdGet(t,r){return H(this.configuration).v4DataValidationValidationsValidationIdGet(t.validationId,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowIdJobsJobIdValidatePost(t,r){return H(this.configuration).v4DataValidationWorkflowIdJobsJobIdValidatePost(t.workflowId,t.jobId,t.dataValidationRequestBody,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t.workflowId,t.jobId,t.dataValidationRequestBody,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t.workflowId,t.jobId,t.page,t.pageSize,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t.workflowId,t.jobId,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t.workflowId,t.v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t.workflowId,t.v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t.workflowId,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}};var vm=function(e){return {v5NotificationsChannelsChannelIdDelete:async(t,r={})=>{D("v5NotificationsChannelsChannelIdDelete","channelId",t);let n="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsChannelsChannelIdGet:async(t,r={})=>{D("v5NotificationsChannelsChannelIdGet","channelId",t);let n="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsChannelsChannelIdPut:async(t,r,n={})=>{D("v5NotificationsChannelsChannelIdPut","channelId",t),D("v5NotificationsChannelsChannelIdPut","v5NotificationsChannelsPostRequest",r);let o="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5NotificationsChannelsGet:async(t,r={})=>{let n="/v5/notifications/channels",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),t!==void 0&&(l.workflowId=t),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsChannelsPost:async(t,r={})=>{D("v5NotificationsChannelsPost","v5NotificationsChannelsPostRequest",t);let n="/v5/notifications/channels",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v5NotificationsEventTypesEventTypeGet:async(t,r={})=>{D("v5NotificationsEventTypesEventTypeGet","eventType",t);let n="/v5/notifications/event-types/{eventType}".replace("{eventType}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsEventTypesGet:async(t={})=>{let r="/v5/notifications/event-types",n=new S(r,P),o;e&&(o=e.baseOptions);let i={method:"GET",...o,...t},a={},s={};await _(a,"x-api-key",e),$(n,s);let l=o&&o.headers?o.headers:{};return i.headers={...a,...l,...t.headers},{url:O(n),options:i}},v5NotificationsLogsGet:async(t,r,n,o,i,a,s={})=>{let l="/v5/notifications/logs",c=new S(l,P),u;e&&(u=e.baseOptions);let d={method:"GET",...u,...s},g={},m={};await _(g,"x-api-key",e),t!==void 0&&(m.workflowId=t),r!==void 0&&(m.eventType=r),n!==void 0&&(m.startDate=n instanceof Date?n.toISOString():n),o!==void 0&&(m.endDate=o instanceof Date?o.toISOString():o),i!==void 0&&(m.limit=i),a!==void 0&&(m.offset=a),$(c,m);let f=u&&u.headers?u.headers:{};return d.headers={...g,...f,...s.headers},{url:O(c),options:d}},v5NotificationsSettingsGet:async(t,r,n={})=>{let o="/v5/notifications/settings",i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),t!==void 0&&(c.workflowId=t),r!==void 0&&(c.eventType=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v5NotificationsSettingsPost:async(t,r={})=>{D("v5NotificationsSettingsPost","v5NotificationsSettingsPostRequest",t);let n="/v5/notifications/settings",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v5NotificationsSettingsSettingsIdDelete:async(t,r={})=>{D("v5NotificationsSettingsSettingsIdDelete","settingsId",t);let n="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsSettingsSettingsIdGet:async(t,r={})=>{D("v5NotificationsSettingsSettingsIdGet","settingsId",t);let n="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsSettingsSettingsIdPut:async(t,r,n={})=>{D("v5NotificationsSettingsSettingsIdPut","settingsId",t),D("v5NotificationsSettingsSettingsIdPut","v5NotificationsSettingsSettingsIdPutRequest",r);let o="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5NotificationsTestPost:async(t,r={})=>{D("v5NotificationsTestPost","v5NotificationsTestPostRequest",t);let n="/v5/notifications/test",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}}}},se=function(e){let t=vm(e);return {async v5NotificationsChannelsChannelIdDelete(r,n){let o=await t.v5NotificationsChannelsChannelIdDelete(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsChannelsChannelIdGet(r,n){let o=await t.v5NotificationsChannelsChannelIdGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsChannelsChannelIdPut(r,n,o){let i=await t.v5NotificationsChannelsChannelIdPut(r,n,o),a=e?.serverIndex??0,s=V["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5NotificationsChannelsGet(r,n){let o=await t.v5NotificationsChannelsGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsChannelsPost(r,n){let o=await t.v5NotificationsChannelsPost(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsEventTypesEventTypeGet(r,n){let o=await t.v5NotificationsEventTypesEventTypeGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsEventTypesGet(r){let n=await t.v5NotificationsEventTypesGet(r),o=e?.serverIndex??0,i=V["NotificationsApi.v5NotificationsEventTypesGet"]?.[o]?.url;return (a,s)=>C(n,b,A,e)(a,i||s)},async v5NotificationsLogsGet(r,n,o,i,a,s,l){let c=await t.v5NotificationsLogsGet(r,n,o,i,a,s,l),u=e?.serverIndex??0,d=V["NotificationsApi.v5NotificationsLogsGet"]?.[u]?.url;return (g,m)=>C(c,b,A,e)(g,d||m)},async v5NotificationsSettingsGet(r,n,o){let i=await t.v5NotificationsSettingsGet(r,n,o),a=e?.serverIndex??0,s=V["NotificationsApi.v5NotificationsSettingsGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5NotificationsSettingsPost(r,n){let o=await t.v5NotificationsSettingsPost(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsSettingsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsSettingsSettingsIdDelete(r,n){let o=await t.v5NotificationsSettingsSettingsIdDelete(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsSettingsSettingsIdGet(r,n){let o=await t.v5NotificationsSettingsSettingsIdGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsSettingsSettingsIdPut(r,n,o){let i=await t.v5NotificationsSettingsSettingsIdPut(r,n,o),a=e?.serverIndex??0,s=V["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5NotificationsTestPost(r,n){let o=await t.v5NotificationsTestPost(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsTestPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)}}};var lr=class extends Se{v5NotificationsChannelsChannelIdDelete(t,r){return se(this.configuration).v5NotificationsChannelsChannelIdDelete(t.channelId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsChannelIdGet(t,r){return se(this.configuration).v5NotificationsChannelsChannelIdGet(t.channelId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsChannelIdPut(t,r){return se(this.configuration).v5NotificationsChannelsChannelIdPut(t.channelId,t.v5NotificationsChannelsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsGet(t={},r){return se(this.configuration).v5NotificationsChannelsGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsPost(t,r){return se(this.configuration).v5NotificationsChannelsPost(t.v5NotificationsChannelsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsEventTypesEventTypeGet(t,r){return se(this.configuration).v5NotificationsEventTypesEventTypeGet(t.eventType,r).then(n=>n(this.axios,this.basePath))}v5NotificationsEventTypesGet(t){return se(this.configuration).v5NotificationsEventTypesGet(t).then(r=>r(this.axios,this.basePath))}v5NotificationsLogsGet(t={},r){return se(this.configuration).v5NotificationsLogsGet(t.workflowId,t.eventType,t.startDate,t.endDate,t.limit,t.offset,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsGet(t={},r){return se(this.configuration).v5NotificationsSettingsGet(t.workflowId,t.eventType,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsPost(t,r){return se(this.configuration).v5NotificationsSettingsPost(t.v5NotificationsSettingsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdDelete(t,r){return se(this.configuration).v5NotificationsSettingsSettingsIdDelete(t.settingsId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdGet(t,r){return se(this.configuration).v5NotificationsSettingsSettingsIdGet(t.settingsId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdPut(t,r){return se(this.configuration).v5NotificationsSettingsSettingsIdPut(t.settingsId,t.v5NotificationsSettingsSettingsIdPutRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsTestPost(t,r){return se(this.configuration).v5NotificationsTestPost(t.v5NotificationsTestPostRequest,r).then(n=>n(this.axios,this.basePath))}},wu={WorkflowStarted:"workflow_started",WorkflowFinished:"workflow_finished",WorkflowFailed:"workflow_failed",WorkflowSampleFinished:"workflow_sample_finished",WorkflowDataChange:"workflow_data_change",SystemMaintenance:"system_maintenance",ServiceDegradation:"service_degradation",CreditsLow:"credits_low",FreeTrialEnding:"free_trial_ending"};var wm=function(e){return {v4SchemasGet:async(t={})=>{let r="/v4/schemas/",n=new S(r,P),o;e&&(o=e.baseOptions);let i={method:"GET",...o,...t},a={},s={};await _(a,"x-api-key",e),$(n,s);let l=o&&o.headers?o.headers:{};return i.headers={...a,...l,...t.headers},{url:O(n),options:i}},v4SchemasPost:async(t,r={})=>{let n="/v4/schemas/",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4SchemasSchemaIdDelete:async(t,r={})=>{D("v4SchemasSchemaIdDelete","schemaId",t);let n="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4SchemasSchemaIdGet:async(t,r={})=>{D("v4SchemasSchemaIdGet","schemaId",t);let n="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4SchemasSchemaIdPut:async(t,r,n={})=>{D("v4SchemasSchemaIdPut","schemaId",t);let o="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}}}},Yt=function(e){let t=wm(e);return {async v4SchemasGet(r){let n=await t.v4SchemasGet(r),o=e?.serverIndex??0,i=V["SchemasApi.v4SchemasGet"]?.[o]?.url;return (a,s)=>C(n,b,A,e)(a,i||s)},async v4SchemasPost(r,n){let o=await t.v4SchemasPost(r,n),i=e?.serverIndex??0,a=V["SchemasApi.v4SchemasPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4SchemasSchemaIdDelete(r,n){let o=await t.v4SchemasSchemaIdDelete(r,n),i=e?.serverIndex??0,a=V["SchemasApi.v4SchemasSchemaIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4SchemasSchemaIdGet(r,n){let o=await t.v4SchemasSchemaIdGet(r,n),i=e?.serverIndex??0,a=V["SchemasApi.v4SchemasSchemaIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4SchemasSchemaIdPut(r,n,o){let i=await t.v4SchemasSchemaIdPut(r,n,o),a=e?.serverIndex??0,s=V["SchemasApi.v4SchemasSchemaIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)}}};var cr=class extends Se{v4SchemasGet(t){return Yt(this.configuration).v4SchemasGet(t).then(r=>r(this.axios,this.basePath))}v4SchemasPost(t={},r){return Yt(this.configuration).v4SchemasPost(t.createSchemaBody,r).then(n=>n(this.axios,this.basePath))}v4SchemasSchemaIdDelete(t,r){return Yt(this.configuration).v4SchemasSchemaIdDelete(t.schemaId,r).then(n=>n(this.axios,this.basePath))}v4SchemasSchemaIdGet(t,r){return Yt(this.configuration).v4SchemasSchemaIdGet(t.schemaId,r).then(n=>n(this.axios,this.basePath))}v4SchemasSchemaIdPut(t,r){return Yt(this.configuration).v4SchemasSchemaIdPut(t.schemaId,t.updateSchemaBody,r).then(n=>n(this.axios,this.basePath))}};var ym=function(e){return {v4ChangesChangeIdGet:async(t,r,n,o={})=>{D("v4ChangesChangeIdGet","changeId",t);let i="/v4/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),await ve(c,e),r!=null&&(c["x-api-key"]=String(r)),n!=null&&(c.Authorization=String(n)),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4ChangesGet:async(t,r,n,o,i,a,s,l={})=>{let c="/v4/changes",u=new S(c,P),d;e&&(d=e.baseOptions);let g={method:"GET",...d,...l},m={},f={};await _(m,"x-api-key",e),await ve(m,e),n!==void 0&&(f.workflowIds=n),o!==void 0&&(f.startDate=o instanceof Date?o.toISOString():o),i!==void 0&&(f.endDate=i instanceof Date?i.toISOString():i),a!==void 0&&(f.skip=a),s!==void 0&&(f.limit=s),t!=null&&(m["x-api-key"]=String(t)),r!=null&&(m.Authorization=String(r)),$(u,f);let w=d&&d.headers?d.headers:{};return g.headers={...m,...w,...l.headers},{url:O(u),options:g}},v4WorkflowsGet:async(t,r,n,o,i,a,s,l,c,u,d={})=>{let g="/v4/workflows",m=new S(g,P),f;e&&(f=e.baseOptions);let w={method:"GET",...f,...d},v={},I={};await _(v,"x-api-key",e),t!==void 0&&(I.search=t),r!==void 0&&(I.skip=r),n!==void 0&&(I.limit=n),o!==void 0&&(I.state=o),i&&(I.tags=i),a!==void 0&&(I.monitoring=a),s!==void 0&&(I.updateInterval=s),l!==void 0&&(I.templateId=l),c!==void 0&&(I.includeDeleted=c),u!==void 0&&(I.format=u),$(m,I);let E=f&&f.headers?f.headers:{};return w.headers={...v,...E,...d.headers},{url:O(m),options:w}},v4WorkflowsPost:async(t,r={})=>{let n="/v4/workflows/",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4WorkflowsWorkflowIdAuditlogGet:async(t,r,n,o,i,a={})=>{D("v4WorkflowsWorkflowIdAuditlogGet","workflowId",t);let s="/v4/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(t))),l=new S(s,P),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},g={};await _(d,"x-api-key",e),await ve(d,e),o!==void 0&&(g.page=o),i!==void 0&&(g.limit=i),r!=null&&(d["x-api-key"]=String(r)),n!=null&&(d.Authorization=String(n)),$(l,g);let m=c&&c.headers?c.headers:{};return u.headers={...d,...m,...a.headers},{url:O(l),options:u}},v4WorkflowsWorkflowIdComplianceApprovePut:async(t,r,n,o={})=>{D("v4WorkflowsWorkflowIdComplianceApprovePut","workflowId",t);let i="/v4/workflows/{workflowId}/compliance-approve".replace("{workflowId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"PUT",...s,...o},c={},u={};await _(c,"x-api-key",e),r!=null&&(c["x-api-key"]=String(r)),n!=null&&(c.Authorization=String(n)),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4WorkflowsWorkflowIdComplianceRejectPut:async(t,r,n,o,i={})=>{D("v4WorkflowsWorkflowIdComplianceRejectPut","workflowId",t),D("v4WorkflowsWorkflowIdComplianceRejectPut","v4WorkflowsWorkflowIdComplianceRejectPutRequest",r);let a="/v4/workflows/{workflowId}/compliance-reject".replace("{workflowId}",encodeURIComponent(String(t))),s=new S(a,P),l;e&&(l=e.baseOptions);let c={method:"PUT",...l,...i},u={},d={};await _(u,"x-api-key",e),u["Content-Type"]="application/json",n!=null&&(u["x-api-key"]=String(n)),o!=null&&(u.Authorization=String(o)),$(s,d);let g=l&&l.headers?l.headers:{};return c.headers={...u,...g,...i.headers},c.data=F(r,c,e),{url:O(s),options:c}},v4WorkflowsWorkflowIdDataGet:async(t,r,n,o,i,a,s,l,c,u,d,g,m,f={})=>{D("v4WorkflowsWorkflowIdDataGet","workflowId",t);let w="/v4/workflows/{workflowId}/data".replace("{workflowId}",encodeURIComponent(String(t))),v=new S(w,P),I;e&&(I=e.baseOptions);let E={method:"GET",...I,...f},N={},W={};await _(N,"x-api-key",e),await ve(N,e),o!==void 0&&(W.runId=o),i!==void 0&&(W.format=i),a!==void 0&&(W.sortBy=a),s!==void 0&&(W.order=s),l!==void 0&&(W.filters=l),c!==void 0&&(W.page=c),u!==void 0&&(W.limit=u),d!==void 0&&(W.gzip=d),g!==void 0&&(W.rowIds=g),m!==void 0&&(W.includeAnomalies=m),r!=null&&(N["x-api-key"]=String(r)),n!=null&&(N.Authorization=String(n)),$(v,W);let J=I&&I.headers?I.headers:{};return E.headers={...N,...J,...f.headers},{url:O(v),options:E}},v4WorkflowsWorkflowIdDelete:async(t,r={})=>{D("v4WorkflowsWorkflowIdDelete","workflowId",t);let n="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdGet:async(t,r={})=>{D("v4WorkflowsWorkflowIdGet","workflowId",t);let n="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdHistoryGet:async(t,r={})=>{D("v4WorkflowsWorkflowIdHistoryGet","workflowId",t);let n="/v4/workflows/{workflowId}/history".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdJobsJobIdGet:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdJobsJobIdGet","workflowId",t),D("v4WorkflowsWorkflowIdJobsJobIdGet","jobId",r);let o="/v4/workflows/{workflowId}/jobs/{jobId}".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v4WorkflowsWorkflowIdMetadataPut:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdMetadataPut","workflowId",t),D("v4WorkflowsWorkflowIdMetadataPut","v4WorkflowsWorkflowIdMetadataPutRequest",r);let o="/v4/workflows/{workflowId}/metadata".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4WorkflowsWorkflowIdPausePut:async(t,r={})=>{D("v4WorkflowsWorkflowIdPausePut","workflowId",t);let n="/v4/workflows/{workflowId}/pause".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"PUT",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdResumePut:async(t,r={})=>{D("v4WorkflowsWorkflowIdResumePut","workflowId",t);let n="/v4/workflows/{workflowId}/resume".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"PUT",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdRunPut:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdRunPut","workflowId",t);let o="/v4/workflows/{workflowId}/run".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4WorkflowsWorkflowIdSchedulePut:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdSchedulePut","workflowId",t),D("v4WorkflowsWorkflowIdSchedulePut","v4WorkflowsWorkflowIdSchedulePutRequest",r);let o="/v4/workflows/{workflowId}/schedule".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5ChangesChangeIdGet:async(t,r,n,o={})=>{D("v5ChangesChangeIdGet","changeId",t);let i="/v5/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),await ve(c,e),r!=null&&(c["x-api-key"]=String(r)),n!=null&&(c.Authorization=String(n)),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v5ChangesGet:async(t,r,n,o,i,a,s,l={})=>{let c="/v5/changes",u=new S(c,P),d;e&&(d=e.baseOptions);let g={method:"GET",...d,...l},m={},f={};await _(m,"x-api-key",e),await ve(m,e),n!==void 0&&(f.workflowIds=n),o!==void 0&&(f.startDate=o instanceof Date?o.toISOString():o),i!==void 0&&(f.endDate=i instanceof Date?i.toISOString():i),a!==void 0&&(f.skip=a),s!==void 0&&(f.limit=s),t!=null&&(m["x-api-key"]=String(t)),r!=null&&(m.Authorization=String(r)),$(u,f);let w=d&&d.headers?d.headers:{};return g.headers={...m,...w,...l.headers},{url:O(u),options:g}},v5WorkflowsIdDelete:async(t,r={})=>{D("v5WorkflowsIdDelete","id",t);let n="/v5/workflows/{id}".replace("{id}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),await ve(s,e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5WorkflowsIdGet:async(t,r={})=>{D("v5WorkflowsIdGet","id",t);let n="/v5/workflows/{id}".replace("{id}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),await ve(s,e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5WorkflowsIdPut:async(t,r,n={})=>{D("v5WorkflowsIdPut","id",t),D("v5WorkflowsIdPut","v5WorkflowsIdPutRequest",r);let o="/v5/workflows/{id}".replace("{id}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),await ve(l,e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5WorkflowsPost:async(t,r={})=>{D("v5WorkflowsPost","v5WorkflowsPostRequest",t);let n="/v5/workflows",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),await ve(s,e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v5WorkflowsWorkflowIdAuditlogGet:async(t,r,n,o,i,a={})=>{D("v5WorkflowsWorkflowIdAuditlogGet","workflowId",t);let s="/v5/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(t))),l=new S(s,P),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},g={};await _(d,"x-api-key",e),await ve(d,e),o!==void 0&&(g.page=o),i!==void 0&&(g.limit=i),r!=null&&(d["x-api-key"]=String(r)),n!=null&&(d.Authorization=String(n)),$(l,g);let m=c&&c.headers?c.headers:{};return u.headers={...d,...m,...a.headers},{url:O(l),options:u}}}},M=function(e){let t=ym(e);return {async v4ChangesChangeIdGet(r,n,o,i){let a=await t.v4ChangesChangeIdGet(r,n,o,i),s=e?.serverIndex??0,l=V["WorkflowsApi.v4ChangesChangeIdGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4ChangesGet(r,n,o,i,a,s,l,c){let u=await t.v4ChangesGet(r,n,o,i,a,s,l,c),d=e?.serverIndex??0,g=V["WorkflowsApi.v4ChangesGet"]?.[d]?.url;return (m,f)=>C(u,b,A,e)(m,g||f)},async v4WorkflowsGet(r,n,o,i,a,s,l,c,u,d,g){let m=await t.v4WorkflowsGet(r,n,o,i,a,s,l,c,u,d,g),f=e?.serverIndex??0,w=V["WorkflowsApi.v4WorkflowsGet"]?.[f]?.url;return (v,I)=>C(m,b,A,e)(v,w||I)},async v4WorkflowsPost(r,n){let o=await t.v4WorkflowsPost(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s){let l=await t.v4WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s),c=e?.serverIndex??0,u=V["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[c]?.url;return (d,g)=>C(l,b,A,e)(d,u||g)},async v4WorkflowsWorkflowIdComplianceApprovePut(r,n,o,i){let a=await t.v4WorkflowsWorkflowIdComplianceApprovePut(r,n,o,i),s=e?.serverIndex??0,l=V["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4WorkflowsWorkflowIdComplianceRejectPut(r,n,o,i,a){let s=await t.v4WorkflowsWorkflowIdComplianceRejectPut(r,n,o,i,a),l=e?.serverIndex??0,c=V["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[l]?.url;return (u,d)=>C(s,b,A,e)(u,c||d)},async v4WorkflowsWorkflowIdDataGet(r,n,o,i,a,s,l,c,u,d,g,m,f,w){let v=await t.v4WorkflowsWorkflowIdDataGet(r,n,o,i,a,s,l,c,u,d,g,m,f,w),I=e?.serverIndex??0,E=V["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[I]?.url;return (N,W)=>C(v,b,A,e)(N,E||W)},async v4WorkflowsWorkflowIdDelete(r,n){let o=await t.v4WorkflowsWorkflowIdDelete(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdGet(r,n){let o=await t.v4WorkflowsWorkflowIdGet(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdHistoryGet(r,n){let o=await t.v4WorkflowsWorkflowIdHistoryGet(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdJobsJobIdGet(r,n,o){let i=await t.v4WorkflowsWorkflowIdJobsJobIdGet(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4WorkflowsWorkflowIdMetadataPut(r,n,o){let i=await t.v4WorkflowsWorkflowIdMetadataPut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4WorkflowsWorkflowIdPausePut(r,n){let o=await t.v4WorkflowsWorkflowIdPausePut(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdResumePut(r,n){let o=await t.v4WorkflowsWorkflowIdResumePut(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdRunPut(r,n,o){let i=await t.v4WorkflowsWorkflowIdRunPut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4WorkflowsWorkflowIdSchedulePut(r,n,o){let i=await t.v4WorkflowsWorkflowIdSchedulePut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5ChangesChangeIdGet(r,n,o,i){let a=await t.v5ChangesChangeIdGet(r,n,o,i),s=e?.serverIndex??0,l=V["WorkflowsApi.v5ChangesChangeIdGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v5ChangesGet(r,n,o,i,a,s,l,c){let u=await t.v5ChangesGet(r,n,o,i,a,s,l,c),d=e?.serverIndex??0,g=V["WorkflowsApi.v5ChangesGet"]?.[d]?.url;return (m,f)=>C(u,b,A,e)(m,g||f)},async v5WorkflowsIdDelete(r,n){let o=await t.v5WorkflowsIdDelete(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v5WorkflowsIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5WorkflowsIdGet(r,n){let o=await t.v5WorkflowsIdGet(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v5WorkflowsIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5WorkflowsIdPut(r,n,o){let i=await t.v5WorkflowsIdPut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v5WorkflowsIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5WorkflowsPost(r,n){let o=await t.v5WorkflowsPost(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v5WorkflowsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s){let l=await t.v5WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s),c=e?.serverIndex??0,u=V["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[c]?.url;return (d,g)=>C(l,b,A,e)(d,u||g)}}};var ur=class extends Se{v4ChangesChangeIdGet(t,r){return M(this.configuration).v4ChangesChangeIdGet(t.changeId,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v4ChangesGet(t={},r){return M(this.configuration).v4ChangesGet(t.xApiKey,t.authorization,t.workflowIds,t.startDate,t.endDate,t.skip,t.limit,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsGet(t={},r){return M(this.configuration).v4WorkflowsGet(t.search,t.skip,t.limit,t.state,t.tags,t.monitoring,t.updateInterval,t.templateId,t.includeDeleted,t.format,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsPost(t={},r){return M(this.configuration).v4WorkflowsPost(t.createWorkflowBody,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdAuditlogGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdAuditlogGet(t.workflowId,t.xApiKey,t.authorization,t.page,t.limit,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceApprovePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdComplianceApprovePut(t.workflowId,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceRejectPut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdComplianceRejectPut(t.workflowId,t.v4WorkflowsWorkflowIdComplianceRejectPutRequest,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdDataGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdDataGet(t.workflowId,t.xApiKey,t.authorization,t.runId,t.format,t.sortBy,t.order,t.filters,t.page,t.limit,t.gzip,t.rowIds,t.includeAnomalies,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdDelete(t,r){return M(this.configuration).v4WorkflowsWorkflowIdDelete(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdHistoryGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdHistoryGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdJobsJobIdGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdJobsJobIdGet(t.workflowId,t.jobId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdMetadataPut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdMetadataPut(t.workflowId,t.v4WorkflowsWorkflowIdMetadataPutRequest,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdPausePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdPausePut(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdResumePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdResumePut(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdRunPut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdRunPut(t.workflowId,t.v4WorkflowsWorkflowIdRunPutRequest,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdSchedulePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdSchedulePut(t.workflowId,t.v4WorkflowsWorkflowIdSchedulePutRequest,r).then(n=>n(this.axios,this.basePath))}v5ChangesChangeIdGet(t,r){return M(this.configuration).v5ChangesChangeIdGet(t.changeId,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v5ChangesGet(t={},r){return M(this.configuration).v5ChangesGet(t.xApiKey,t.authorization,t.workflowIds,t.startDate,t.endDate,t.skip,t.limit,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsIdDelete(t,r){return M(this.configuration).v5WorkflowsIdDelete(t.id,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsIdGet(t,r){return M(this.configuration).v5WorkflowsIdGet(t.id,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsIdPut(t,r){return M(this.configuration).v5WorkflowsIdPut(t.id,t.v5WorkflowsIdPutRequest,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsPost(t,r){return M(this.configuration).v5WorkflowsPost(t.v5WorkflowsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsWorkflowIdAuditlogGet(t,r){return M(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(t.workflowId,t.xApiKey,t.authorization,t.page,t.limit,r).then(n=>n(this.axios,this.basePath))}};var dr=class{constructor(t={}){this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions={...t.baseOptions,headers:{...t.baseOptions?.headers}},this.formDataCtor=t.formDataCtor;}isJsonMime(t){let r=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(r.test(t)||t.toLowerCase()==="application/json-patch+json")}};var eo="0.12.0",yu="kadoa-node-sdk",ku="node";var fr="https://api.kadoa.com",xu="wss://realtime.kadoa.com",Ru="https://realtime.kadoa.com";var Pu=Qf(Vu()),Ce=e=>(0, Pu.default)(`kadoa:${e}`),ce={client:Ce("client"),wss:Ce("wss"),extraction:Ce("extraction"),http:Ce("http"),workflow:Ce("workflow"),crawl:Ce("crawl"),notifications:Ce("notifications"),schemas:Ce("schemas"),validation:Ce("validation")};var Ve=ce.wss;typeof WebSocket>"u"&&(window.WebSocket=Kf("ws"));var hr=class{constructor(t){this.lastHeartbeat=Date.now();this.isConnecting=false;this.eventListeners=new Set;this.connectionListeners=new Set;this.errorListeners=new Set;if(!t.teamApiKey.startsWith("tk-"))throw new z("Realtime connection requires a team API key (starting with 'tk-'). Provided key does not appear to be a team API key.",{code:"AUTH_ERROR",details:{providedKeyPrefix:t.teamApiKey.substring(0,3)}});this.teamApiKey=t.teamApiKey,this.heartbeatInterval=t.heartbeatInterval||1e4,this.reconnectDelay=t.reconnectDelay||5e3,this.missedHeartbeatsLimit=t.missedHeartbeatsLimit||3e4;}async connect(){if(!this.isConnecting){this.isConnecting=true;try{let t=await fetch(`${fr}/v4/oauth2/token`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":`${this.teamApiKey}`,"x-sdk-version":eo}}),{access_token:r,team_id:n}=await t.json();this.socket=new WebSocket(`${xu}?access_token=${r}`),this.socket.onopen=()=>{this.isConnecting=!1,this.lastHeartbeat=Date.now(),this.socket?.readyState===WebSocket.OPEN&&(this.socket.send(JSON.stringify({action:"subscribe",channel:n})),Ve("Connected to WebSocket"),this.notifyConnectionListeners(!0)),this.startHeartbeatCheck();},this.socket.onmessage=o=>{try{let i=JSON.parse(o.data);i.type==="heartbeat"?this.handleHeartbeat():(i?.id&&fetch(`${Ru}/api/v1/events/ack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:i.id})}),this.notifyEventListeners(i));}catch(i){Ve("Failed to parse incoming message: %O",i);}},this.socket.onclose=()=>{Ve("WebSocket disconnected. Attempting to reconnect..."),this.isConnecting=!1,this.stopHeartbeatCheck(),this.notifyConnectionListeners(!1,"Connection closed"),setTimeout(()=>this.connect(),this.reconnectDelay);},this.socket.onerror=o=>{Ve("WebSocket error: %O",o),this.isConnecting=!1,this.notifyErrorListeners(o);};}catch(t){Ve("Failed to connect: %O",t),this.isConnecting=false,setTimeout(()=>this.connect(),this.reconnectDelay);}}}handleHeartbeat(){Ve("Heartbeat received"),this.lastHeartbeat=Date.now();}notifyEventListeners(t){this.eventListeners.forEach(r=>{try{r(t);}catch(n){Ve("Error in event listener: %O",n);}});}notifyConnectionListeners(t,r){this.connectionListeners.forEach(n=>{try{n(t,r);}catch(o){Ve("Error in connection listener: %O",o);}});}notifyErrorListeners(t){this.errorListeners.forEach(r=>{try{r(t);}catch(n){Ve("Error in error listener: %O",n);}});}startHeartbeatCheck(){this.missedHeartbeatCheckTimer=setInterval(()=>{Date.now()-this.lastHeartbeat>this.missedHeartbeatsLimit&&(Ve("No heartbeat received in 30 seconds! Closing connection."),this.socket?.close());},this.heartbeatInterval);}stopHeartbeatCheck(){this.missedHeartbeatCheckTimer&&clearInterval(this.missedHeartbeatCheckTimer);}onEvent(t){return this.eventListeners.add(t),()=>{this.eventListeners.delete(t);}}onConnection(t){return this.connectionListeners.add(t),()=>{this.connectionListeners.delete(t);}}onError(t){return this.errorListeners.add(t),()=>{this.errorListeners.delete(t);}}close(){this.socket&&(this.stopHeartbeatCheck(),this.socket.close(),this.socket=void 0),this.eventListeners.clear(),this.connectionListeners.clear(),this.errorListeners.clear();}isConnected(){return this.socket?.readyState===WebSocket.OPEN}};var gr=class{constructor(t,r,n,o,i){this.extractionService=t;this.dataFetcherService=r;this.channelsService=n;this.settingsService=o;this.workflowsCoreService=i;}async run(t){return await this.extractionService.executeExtraction({...t,mode:"run"})}async submit(t){return await this.extractionService.executeExtraction({...t,mode:"submit"})}async runJob(t,r){return this.workflowsCoreService.runWorkflow(t,r)}async runJobAndWait(t,r){let n=await this.workflowsCoreService.runWorkflow(t,r);return this.workflowsCoreService.waitForJobCompletion(t,n.jobId)}async fetchData(t){return this.dataFetcherService.fetchData(t)}async fetchAllData(t){return this.dataFetcherService.fetchAllData(t)}fetchDataPages(t){return this.dataFetcherService.fetchDataPages(t)}async getNotificationChannels(t){return this.channelsService.listChannels({workflowId:t})}async getNotificationSettings(t){return this.settingsService.listSettings({workflowId:t})}};var vr=class{constructor(t,r,n){this.channelsService=t;this.settingsService=r;this.channelSetupService=n;}async setupForWorkflow(t){if((await this.settingsService.listSettings({workflowId:t.workflowId})).length>0)throw new z("Settings already exist",{code:ge.BAD_REQUEST,details:{workflowId:t.workflowId}});return this.channelSetupService.setup({workflowId:t.workflowId,events:t.events,channels:t.channels})}async setupForWorkspace(t){if((await this.settingsService.listSettings({})).length>0)throw new z("Workspace settings already exist",{code:ge.BAD_REQUEST});return this.channelSetupService.setup({events:t.events,channels:t.channels})}get channels(){return this.channelsService}get settings(){return this.settingsService}};var to=class{constructor(t){this.service=t;}};var wr=class{constructor(t){this.userService=t;}get service(){return this.userService}async getCurrentUser(){return this.userService.getCurrentUser()}};var oo=class{constructor(t,r){this.coreService=t;this.rulesService=r;}listRules(t){return this.rulesService.listRules(t)}getRuleByName(t){return this.rulesService.getRuleByName(t)}createRule(t){return this.rulesService.createRule(t)}generateRule(t){return this.rulesService.generateRule(t)}generateRules(t){return this.rulesService.generateRules(t)}bulkApproveRules(t){return this.rulesService.bulkApproveRules(t)}bulkDeleteRules(t){return this.rulesService.bulkDeleteRules(t)}deleteAllRules(t){return this.rulesService.deleteAllRules(t)}listWorkflowValidations(t,r){return this.coreService.listWorkflowValidations({workflowId:t,jobId:r})}scheduleValidation(t,r){return this.coreService.scheduleValidation(t,r)}waitUntilCompleted(t,r){return this.coreService.waitUntilCompleted(t,r)}getValidationDetails(t){return this.coreService.getValidationDetails(t)}getLatestValidation(t,r){return this.coreService.getLatestValidation(t,r)}getValidationAnomalies(t){return this.coreService.getValidationAnomalies(t)}getValidationAnomaliesByRule(t,r){return this.coreService.getValidationAnomaliesByRule(t,r)}toggleValidationEnabled(t){return this.coreService.toggleValidationEnabled(t)}};var yr=class{constructor(t){this.core=t;}async get(t){return this.core.get(t)}async list(t){return this.core.list(t)}async getByName(t){return this.core.getByName(t)}async create(t){return this.core.create(t)}async cancel(t){return this.core.cancel(t)}async approve(t){return this.core.resume(t)}async resume(t){return this.core.resume(t)}async wait(t,r){return this.core.wait(t,r)}async getJobStatus(t,r){return this.core.getJobStatus(t,r)}async waitForJobCompletion(t,r,n){return this.core.waitForJobCompletion(t,r,n)}};var kr=class{constructor(t){this.client=t;}async getCurrentUser(){let r=(await this.client.axiosInstance.get("/v5/user",{baseURL:this.client.baseUrl,headers:{"x-api-key":this.client.apiKey,"Content-Type":"application/json"}})).data;if(!r||!r.userId)throw new z("Invalid user data received");return {userId:r.userId,email:r.email,featureFlags:r.featureFlags||[]}}};function yi(e){if(!e||typeof e!="object")return false;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":false}function _u(e){return e==="__proto__"}function Pe(e,t){let r=Object.keys(t);for(let n=0;n<r.length;n++){let o=r[n];if(_u(o))continue;let i=t[o],a=e[o];Array.isArray(i)?Array.isArray(a)?e[o]=Pe(a,i):e[o]=Pe([],i):yi(i)?yi(a)?e[o]=Pe(a,i):e[o]=Pe({},i):(a===void 0||i!==void 0)&&(e[o]=i);}return e}var Cm=ce.extraction,Dm=new Set(["FINISHED","SUCCESS"]),ki={mode:"run",pollingInterval:5e3,maxWaitTime:3e5,navigationMode:"single-page",location:{type:"auto"},name:"Untitled Workflow",bypassPreview:true,autoStart:true},xr=class{constructor(t,r,n,o){this.workflowsCoreService=t;this.dataFetcherService=r;this.entityResolverService=n;this.notificationSetupService=o;}async executeExtraction(t){this.validateOptions(t);let r=Pe(ki,t),n,o=await this.entityResolverService.resolveEntity(t.entity||"ai-detection",{link:r.urls[0],location:r.location,navigationMode:r.navigationMode}),i=!!r.notifications;if(n=(await this.workflowsCoreService.create({...r,entity:o.entity,fields:o.fields})).id,i){let d=await this.notificationSetupService.setup({workflowId:n,events:r.notifications?.events,channels:r.notifications?.channels});Cm("Notifications setup: %O",d.map(g=>({id:g.id,eventType:g.eventType})));}if(r.mode==="submit")return {workflowId:n};let s=await this.workflowsCoreService.wait(n,{pollIntervalMs:r.pollingInterval,timeoutMs:r.maxWaitTime}),l,c;if(this.isExtractionSuccessful(s.runState)){let d=await this.dataFetcherService.fetchData({workflowId:n});l=d.data,c=d.pagination;}else throw new z(`${te.WORKFLOW_UNEXPECTED_STATUS}: ${s.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:n,runState:s.runState,state:s.state}});return {workflowId:n,workflow:s,data:l,pagination:c}}validateOptions(t){if(!t.urls||t.urls.length===0)throw new z(te.NO_URLS,{code:"VALIDATION_ERROR"})}async resumeWorkflow(t){await this.workflowsCoreService.resume(t);let r=await this.workflowsCoreService.wait(t,{pollIntervalMs:ki.pollingInterval,timeoutMs:ki.maxWaitTime}),n,o;if(this.isExtractionSuccessful(r.runState)){let a=await this.dataFetcherService.fetchData({workflowId:t});n=a.data,o=a.pagination;}else throw new z(`${te.WORKFLOW_UNEXPECTED_STATUS}: ${r.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:t,runState:r.runState,state:r.state}});return {workflowId:t,workflow:r,data:n,pagination:o}}isExtractionSuccessful(t){return t?Dm.has(t.toUpperCase()):false}};var it={};Ue(it,{$brand:()=>Rr,$input:()=>js,$output:()=>zs,NEVER:()=>xi,TimePrecision:()=>qs,ZodAny:()=>nf,ZodArray:()=>cf,ZodBase64:()=>nc,ZodBase64URL:()=>ic,ZodBigInt:()=>Go,ZodBigIntFormat:()=>lc,ZodBoolean:()=>qo,ZodCIDRv4:()=>oc,ZodCIDRv6:()=>rc,ZodCUID:()=>Kl,ZodCUID2:()=>Hl,ZodCatch:()=>Pf,ZodCodec:()=>wc,ZodCustom:()=>On,ZodCustomStringFormat:()=>To,ZodDate:()=>Pn,ZodDefault:()=>Rf,ZodDiscriminatedUnion:()=>uf,ZodE164:()=>ac,ZodEmail:()=>Bl,ZodEmoji:()=>Jl,ZodEnum:()=>zo,ZodError:()=>av,ZodFile:()=>yf,ZodFirstPartyTypeKind:()=>yc,ZodFunction:()=>zf,ZodGUID:()=>In,ZodIPv4:()=>ec,ZodIPv6:()=>tc,ZodISODate:()=>yn,ZodISODateTime:()=>wn,ZodISODuration:()=>xn,ZodISOTime:()=>kn,ZodIntersection:()=>df,ZodIssueCode:()=>vw,ZodJWT:()=>sc,ZodKSUID:()=>Yl,ZodLazy:()=>Wf,ZodLiteral:()=>wf,ZodMap:()=>gf,ZodNaN:()=>$f,ZodNanoID:()=>Ml,ZodNever:()=>sf,ZodNonOptional:()=>gc,ZodNull:()=>of,ZodNullable:()=>xf,ZodNumber:()=>Uo,ZodNumberFormat:()=>Nt,ZodObject:()=>$n,ZodOptional:()=>hc,ZodPipe:()=>vc,ZodPrefault:()=>bf,ZodPromise:()=>Ef,ZodReadonly:()=>Of,ZodRealError:()=>fe,ZodRecord:()=>fc,ZodSet:()=>vf,ZodString:()=>jo,ZodStringFormat:()=>Z,ZodSuccess:()=>Vf,ZodSymbol:()=>ef,ZodTemplateLiteral:()=>Df,ZodTransform:()=>kf,ZodTuple:()=>pf,ZodType:()=>U,ZodULID:()=>Ql,ZodURL:()=>Vn,ZodUUID:()=>ze,ZodUndefined:()=>tf,ZodUnion:()=>uc,ZodUnknown:()=>af,ZodVoid:()=>lf,ZodXID:()=>Xl,_ZodString:()=>Zl,_default:()=>If,_function:()=>uw,any:()=>Lv,array:()=>_n,base64:()=>Vv,base64url:()=>Pv,bigint:()=>Tv,boolean:()=>Yd,catch:()=>_f,check:()=>dw,cidrv4:()=>Av,cidrv6:()=>Sv,clone:()=>re,codec:()=>sw,coerce:()=>kc,config:()=>Q,core:()=>Ee,cuid:()=>wv,cuid2:()=>yv,custom:()=>fw,date:()=>Bv,decode:()=>El,decodeAsync:()=>jl,discriminatedUnion:()=>Qv,e164:()=>_v,email:()=>lv,emoji:()=>gv,encode:()=>Nl,encodeAsync:()=>zl,endsWith:()=>$o,enum:()=>pc,file:()=>rw,flattenError:()=>fo,float32:()=>Nv,float64:()=>Ev,formatError:()=>po,function:()=>uw,getErrorMap:()=>yw,globalRegistry:()=>$e,gt:()=>We,gte:()=>de,guid:()=>cv,hash:()=>Wv,hex:()=>Dv,hostname:()=>Cv,httpUrl:()=>hv,includes:()=>Po,instanceof:()=>pw,int:()=>Ll,int32:()=>zv,int64:()=>Uv,intersection:()=>ff,ipv4:()=>Iv,ipv6:()=>bv,iso:()=>Rn,json:()=>hw,jwt:()=>$v,keyof:()=>Jv,ksuid:()=>Rv,lazy:()=>Nf,length:()=>Ct,literal:()=>ow,locales:()=>xo,looseObject:()=>Hv,lowercase:()=>So,lt:()=>De,lte:()=>ye,map:()=>Yv,maxLength:()=>Ot,maxSize:()=>$t,mime:()=>Oo,minLength:()=>Me,minSize:()=>nt,multipleOf:()=>rt,nan:()=>aw,nanoid:()=>vv,nativeEnum:()=>tw,negative:()=>gl,never:()=>cc,nonnegative:()=>wl,nonoptional:()=>Sf,nonpositive:()=>vl,normalize:()=>Co,null:()=>rf,nullable:()=>An,nullish:()=>nw,number:()=>Xd,object:()=>Mv,optional:()=>bn,overwrite:()=>Ne,parse:()=>Ol,parseAsync:()=>Cl,partialRecord:()=>Xv,pipe:()=>Sn,positive:()=>hl,prefault:()=>Af,preprocess:()=>gw,prettifyError:()=>Ci,promise:()=>cw,property:()=>yl,readonly:()=>Cf,record:()=>hf,refine:()=>jf,regex:()=>Ao,regexes:()=>we,registry:()=>Hr,safeDecode:()=>Ul,safeDecodeAsync:()=>Gl,safeEncode:()=>Tl,safeEncodeAsync:()=>ql,safeParse:()=>Dl,safeParseAsync:()=>Wl,set:()=>ew,setErrorMap:()=>ww,size:()=>bo,startsWith:()=>_o,strictObject:()=>Kv,string:()=>Fl,stringFormat:()=>Ov,stringbool:()=>mw,success:()=>iw,superRefine:()=>Tf,symbol:()=>Gv,templateLiteral:()=>lw,toJSONSchema:()=>Sl,toLowerCase:()=>Wo,toUpperCase:()=>No,transform:()=>mc,treeifyError:()=>Oi,trim:()=>Do,tuple:()=>mf,uint32:()=>jv,uint64:()=>qv,ulid:()=>kv,undefined:()=>Fv,union:()=>dc,unknown:()=>Wt,uppercase:()=>Vo,url:()=>mv,util:()=>R,uuid:()=>uv,uuidv4:()=>dv,uuidv6:()=>fv,uuidv7:()=>pv,void:()=>Zv,xid:()=>xv});var Ee={};Ue(Ee,{$ZodAny:()=>as,$ZodArray:()=>ds,$ZodAsyncError:()=>Re,$ZodBase64:()=>Ha,$ZodBase64URL:()=>Qa,$ZodBigInt:()=>Lr,$ZodBigIntFormat:()=>os,$ZodBoolean:()=>vo,$ZodCIDRv4:()=>Ja,$ZodCIDRv6:()=>Ma,$ZodCUID:()=>Ea,$ZodCUID2:()=>za,$ZodCatch:()=>Ps,$ZodCheck:()=>B,$ZodCheckBigIntFormat:()=>fa,$ZodCheckEndsWith:()=>ba,$ZodCheckGreaterThan:()=>zr,$ZodCheckIncludes:()=>Ra,$ZodCheckLengthEquals:()=>wa,$ZodCheckLessThan:()=>Er,$ZodCheckLowerCase:()=>ka,$ZodCheckMaxLength:()=>ga,$ZodCheckMaxSize:()=>pa,$ZodCheckMimeType:()=>Sa,$ZodCheckMinLength:()=>va,$ZodCheckMinSize:()=>ma,$ZodCheckMultipleOf:()=>ua,$ZodCheckNumberFormat:()=>da,$ZodCheckOverwrite:()=>Va,$ZodCheckProperty:()=>Aa,$ZodCheckRegex:()=>ya,$ZodCheckSizeEquals:()=>ha,$ZodCheckStartsWith:()=>Ia,$ZodCheckStringFormat:()=>Pt,$ZodCheckUpperCase:()=>xa,$ZodCodec:()=>wo,$ZodCustom:()=>Es,$ZodCustomStringFormat:()=>es,$ZodDate:()=>us,$ZodDefault:()=>bs,$ZodDiscriminatedUnion:()=>ps,$ZodE164:()=>Xa,$ZodEmail:()=>Ca,$ZodEmoji:()=>Wa,$ZodEncodeError:()=>Ge,$ZodEnum:()=>ws,$ZodError:()=>uo,$ZodFile:()=>ks,$ZodFunction:()=>Ds,$ZodGUID:()=>$a,$ZodIPv4:()=>Za,$ZodIPv6:()=>Ba,$ZodISODate:()=>Ga,$ZodISODateTime:()=>qa,$ZodISODuration:()=>La,$ZodISOTime:()=>Fa,$ZodIntersection:()=>ms,$ZodJWT:()=>Ya,$ZodKSUID:()=>Ua,$ZodLazy:()=>Ns,$ZodLiteral:()=>ys,$ZodMap:()=>gs,$ZodNaN:()=>_s,$ZodNanoID:()=>Na,$ZodNever:()=>ls,$ZodNonOptional:()=>Ss,$ZodNull:()=>is,$ZodNullable:()=>Is,$ZodNumber:()=>Fr,$ZodNumberFormat:()=>ts,$ZodObject:()=>td,$ZodObjectJIT:()=>fs,$ZodOptional:()=>Rs,$ZodPipe:()=>$s,$ZodPrefault:()=>As,$ZodPromise:()=>Ws,$ZodReadonly:()=>Os,$ZodRealError:()=>ue,$ZodRecord:()=>hs,$ZodRegistry:()=>_t,$ZodSet:()=>vs,$ZodString:()=>ot,$ZodStringFormat:()=>L,$ZodSuccess:()=>Vs,$ZodSymbol:()=>rs,$ZodTemplateLiteral:()=>Cs,$ZodTransform:()=>xs,$ZodTuple:()=>Br,$ZodType:()=>T,$ZodULID:()=>ja,$ZodURL:()=>Da,$ZodUUID:()=>Oa,$ZodUndefined:()=>ns,$ZodUnion:()=>Zr,$ZodUnknown:()=>ss,$ZodVoid:()=>cs,$ZodXID:()=>Ta,$brand:()=>Rr,$constructor:()=>p,$input:()=>js,$output:()=>zs,Doc:()=>go,JSONSchema:()=>Kd,JSONSchemaGenerator:()=>Eo,NEVER:()=>xi,TimePrecision:()=>qs,_any:()=>ll,_array:()=>kl,_base64:()=>mn,_base64url:()=>hn,_bigint:()=>tl,_boolean:()=>Ys,_catch:()=>Yg,_check:()=>Md,_cidrv4:()=>fn,_cidrv6:()=>pn,_coercedBigint:()=>ol,_coercedBoolean:()=>el,_coercedDate:()=>pl,_coercedNumber:()=>Js,_coercedString:()=>Us,_cuid:()=>nn,_cuid2:()=>an,_custom:()=>Rl,_date:()=>fl,_decode:()=>Pr,_decodeAsync:()=>$r,_default:()=>Hg,_discriminatedUnion:()=>jg,_e164:()=>gn,_email:()=>Qr,_emoji:()=>on,_encode:()=>Vr,_encodeAsync:()=>_r,_endsWith:()=>$o,_enum:()=>Lg,_file:()=>xl,_float32:()=>Ks,_float64:()=>Hs,_gt:()=>We,_gte:()=>de,_guid:()=>Ro,_includes:()=>Po,_int:()=>Ms,_int32:()=>Qs,_int64:()=>rl,_intersection:()=>Tg,_ipv4:()=>un,_ipv6:()=>dn,_isoDate:()=>Fs,_isoDateTime:()=>Gs,_isoDuration:()=>Zs,_isoTime:()=>Ls,_jwt:()=>vn,_ksuid:()=>cn,_lazy:()=>rv,_length:()=>Ct,_literal:()=>Bg,_lowercase:()=>So,_lt:()=>De,_lte:()=>ye,_map:()=>Gg,_max:()=>ye,_maxLength:()=>Ot,_maxSize:()=>$t,_mime:()=>Oo,_min:()=>de,_minLength:()=>Me,_minSize:()=>nt,_multipleOf:()=>rt,_nan:()=>ml,_nanoid:()=>rn,_nativeEnum:()=>Zg,_negative:()=>gl,_never:()=>ul,_nonnegative:()=>wl,_nonoptional:()=>Qg,_nonpositive:()=>vl,_normalize:()=>Co,_null:()=>sl,_nullable:()=>Kg,_number:()=>Bs,_optional:()=>Mg,_overwrite:()=>Ne,_parse:()=>bt,_parseAsync:()=>At,_pipe:()=>ev,_positive:()=>hl,_promise:()=>nv,_property:()=>yl,_readonly:()=>tv,_record:()=>qg,_refine:()=>Il,_regex:()=>Ao,_safeDecode:()=>Cr,_safeDecodeAsync:()=>Wr,_safeEncode:()=>Or,_safeEncodeAsync:()=>Dr,_safeParse:()=>St,_safeParseAsync:()=>Vt,_set:()=>Fg,_size:()=>bo,_startsWith:()=>_o,_string:()=>Ts,_stringFormat:()=>Dt,_stringbool:()=>Al,_success:()=>Xg,_superRefine:()=>bl,_symbol:()=>il,_templateLiteral:()=>ov,_toLowerCase:()=>Wo,_toUpperCase:()=>No,_transform:()=>Jg,_trim:()=>Do,_tuple:()=>Ug,_uint32:()=>Xs,_uint64:()=>nl,_ulid:()=>sn,_undefined:()=>al,_union:()=>zg,_unknown:()=>cl,_uppercase:()=>Vo,_url:()=>Io,_uuid:()=>Xr,_uuidv4:()=>Yr,_uuidv6:()=>en,_uuidv7:()=>tn,_void:()=>dl,_xid:()=>ln,clone:()=>re,config:()=>Q,decode:()=>sh,decodeAsync:()=>ch,encode:()=>ah,encodeAsync:()=>lh,flattenError:()=>fo,formatError:()=>po,globalConfig:()=>ro,globalRegistry:()=>$e,isValidBase64:()=>Ka,isValidBase64URL:()=>Qu,isValidJWT:()=>Xu,locales:()=>xo,parse:()=>Ar,parseAsync:()=>Sr,prettifyError:()=>Ci,regexes:()=>we,registry:()=>Hr,safeDecode:()=>dh,safeDecodeAsync:()=>ph,safeEncode:()=>uh,safeEncodeAsync:()=>fh,safeParse:()=>Di,safeParseAsync:()=>Wi,toDotPath:()=>Wu,toJSONSchema:()=>Sl,treeifyError:()=>Oi,util:()=>R,version:()=>Pa});var xi=Object.freeze({status:"aborted"});function p(e,t,r){function n(s,l){var c;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:false}),(c=s._zod).traits??(c.traits=new Set),s._zod.traits.add(e),t(s,l);for(let u in a.prototype)u in s||Object.defineProperty(s,u,{value:a.prototype[u].bind(s)});s._zod.constr=a,s._zod.def=l;}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(s){var l;let c=r?.Parent?new i:this;n(c,s),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?true:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Rr=Symbol("zod_brand"),Re=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Ge=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},ro={};function Q(e){return e&&Object.assign(ro,e),ro}var R={};Ue(R,{BIGINT_FORMAT_RANGES:()=>$i,Class:()=>Ii,NUMBER_FORMAT_RANGES:()=>_i,aborted:()=>Je,allowsEval:()=>Ai,assert:()=>jm,assertEqual:()=>Wm,assertIs:()=>Em,assertNever:()=>zm,assertNotEqual:()=>Nm,assignProp:()=>Le,base64ToUint8Array:()=>Ou,base64urlToUint8Array:()=>th,cached:()=>Rt,captureStackTrace:()=>br,cleanEnum:()=>eh,cleanRegex:()=>ao,clone:()=>re,cloneDef:()=>Um,createTransparentProxy:()=>Bm,defineLazy:()=>G,esc:()=>Ir,escapeRegex:()=>_e,extend:()=>Km,finalizeIssue:()=>he,floatSafeRemainder:()=>bi,getElementAtPath:()=>qm,getEnumValues:()=>io,getLengthableOrigin:()=>co,getParsedType:()=>Zm,getSizableOrigin:()=>lo,hexToUint8Array:()=>rh,isObject:()=>et,isPlainObject:()=>Be,issue:()=>It,joinValues:()=>y,jsonStringifyReplacer:()=>xt,merge:()=>Qm,mergeDefs:()=>Ze,normalizeParams:()=>x,nullish:()=>Fe,numKeys:()=>Lm,objectClone:()=>Tm,omit:()=>Mm,optionalKeys:()=>Pi,partial:()=>Xm,pick:()=>Jm,prefixIssues:()=>me,primitiveTypes:()=>Vi,promiseAllObject:()=>Gm,propertyKeyTypes:()=>so,randomString:()=>Fm,required:()=>Ym,safeExtend:()=>Hm,shallowClone:()=>Si,stringifyPrimitive:()=>k,uint8ArrayToBase64:()=>Cu,uint8ArrayToBase64url:()=>oh,uint8ArrayToHex:()=>nh,unwrapMessage:()=>no});function Wm(e){return e}function Nm(e){return e}function Em(e){}function zm(e){throw new Error}function jm(e){}function io(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function y(e,t="|"){return e.map(r=>k(r)).join(t)}function xt(e,t){return typeof t=="bigint"?t.toString():t}function Rt(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Fe(e){return e==null}function ao(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function bi(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){let l=n.match(/\d?e-(\d?)/);l?.[1]&&(o=Number.parseInt(l[1]));}let i=r>o?r:o,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var $u=Symbol("evaluating");function G(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==$u)return n===void 0&&(n=$u,n=r()),n},set(o){Object.defineProperty(e,t,{value:o});},configurable:true});}function Tm(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Le(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function Ze(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n);}return Object.defineProperties({},t)}function Um(e){return Ze(e._zod.def)}function qm(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Gm(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function Fm(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Ir(e){return JSON.stringify(e)}var br="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ai=Rt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Be(e){if(et(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(et(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function Si(e){return Be(e)?{...e}:Array.isArray(e)?[...e]:e}function Lm(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Zm=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},so=new Set(["string","number","symbol"]),Vi=new Set(["string","number","bigint","boolean","symbol","undefined"]);function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function re(e,t,r){let n=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(n._zod.parent=e),n}function x(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Bm(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function k(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Pi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var _i={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},$i={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Jm(e,t){let r=e._zod.def,n=Ze(e._zod.def,{get shape(){let o={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=r.shape[i]);}return Le(this,"shape",o),o},checks:[]});return re(e,n)}function Mm(e,t){let r=e._zod.def,n=Ze(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete o[i];}return Le(this,"shape",o),o},checks:[]});return re(e,n)}function Km(e,t){if(!Be(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let o=Ze(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Le(this,"shape",i),i},checks:[]});return re(e,o)}function Hm(e,t){if(!Be(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return Le(this,"shape",n),n},checks:e._zod.def.checks};return re(e,r)}function Qm(e,t){let r=Ze(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Le(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return re(e,r)}function Xm(e,t,r){let n=Ze(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(r)for(let a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=e?new e({type:"optional",innerType:o[a]}):o[a]);}else for(let a in o)i[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return Le(this,"shape",i),i},checks:[]});return re(t,n)}function Ym(e,t,r){let n=Ze(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}));}else for(let a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return Le(this,"shape",i),i},checks:[]});return re(t,n)}function Je(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function me(e,t){return t.map(r=>{var n;return (n=r).path??(n.path=[]),r.path.unshift(e),r})}function no(e){return typeof e=="string"?e:e?.message}function he(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=no(e.inst?._zod.def?.error?.(e))??no(t?.error?.(e))??no(r.customError?.(e))??no(r.localeError?.(e))??"Invalid input";n.message=o;}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function lo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function co(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function It(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function eh(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Ou(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function Cu(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function th(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Ou(t+r)}function oh(e){return Cu(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function rh(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function nh(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Ii=class{constructor(...t){}};var Du=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,xt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},uo=p("$ZodError",Du),ue=p("$ZodError",Du,{Parent:Error});function fo(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return {formErrors:n,fieldErrors:r}}function po(e,t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s}));else if(a.code==="invalid_key")o({issues:a.issues});else if(a.code==="invalid_element")o({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else {let s=n,l=0;for(;l<a.path.length;){let c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++;}}};return o(e),n}function Oi(e,t){let r=t||function(i){return i.message},n={errors:[]},o=(i,a=[])=>{var s,l;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...a,...c.path];if(u.length===0){n.errors.push(r(c));continue}let d=n,g=0;for(;g<u.length;){let m=u[g],f=g===u.length-1;typeof m=="string"?(d.properties??(d.properties={}),(s=d.properties)[m]??(s[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(l=d.items)[m]??(l[m]={errors:[]}),d=d.items[m]),f&&d.errors.push(r(c)),g++;}}};return o(e),n}function Wu(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function Ci(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${Wu(n.path)}`);return t.join(`
8
+ `)}static wrap(t,r){return t instanceof e||t instanceof z?t:hu(t)?e.fromAxiosError(t,r):z.wrap(t,r)}static mapStatusToCode(t){let r=typeof t=="number"?t:t.response?.status;return r?r===401||r===403?"AUTH_ERROR":r===404?"NOT_FOUND":r===408?"TIMEOUT":r===429?"RATE_LIMITED":r>=400&&r<500?"VALIDATION_ERROR":r>=500?"HTTP_ERROR":"UNKNOWN":typeof t=="number"?"UNKNOWN":t.code==="ECONNABORTED"?"TIMEOUT":t.request?"NETWORK_ERROR":"UNKNOWN"}};var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function gu(e,t=0){return (oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}var mi,fm=new Uint8Array(16);function hi(){if(!mi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");mi=crypto.getRandomValues.bind(crypto);}return mi(fm)}var pm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),gi={randomUUID:pm};function mm(e,t,r){e=e||{};let n=e.random??e.rng?.()??hi();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return gu(n)}function hm(e,t,r){return gi.randomUUID&&!t&&!e?gi.randomUUID():mm(e,t,r)}var vi=hm;var S=globalThis.URL,vu=globalThis.URLSearchParams;var A="https://api.kadoa.com".replace(/\/+$/,"");var Se=class{constructor(t,r=A,n=b){this.basePath=r;this.axios=n;t&&(this.configuration=t,this.basePath=t.basePath??r);}},sr=class extends Error{constructor(r,n){super(n);this.field=r;this.name="RequiredError";}},V={};var P="https://example.com",D=function(e,t,r){if(r==null)throw new sr(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},_=async function(e,t,r){if(r&&r.apiKey){let n=typeof r.apiKey=="function"?await r.apiKey(t):await r.apiKey;e[t]=n;}};var ve=async function(e,t){if(t&&t.accessToken){let r=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+r;}};function wi(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>wi(e,n,r)):Object.keys(t).forEach(n=>wi(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t));}var $=function(e,...t){let r=new vu(e.search);wi(r,t),e.search=r.toString();},F=function(e,t,r){let n=typeof e!="string";return (n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},O=function(e){return e.pathname+e.search+e.hash},C=function(e,t,r,n){return (o=t,i=r)=>{let a={...e.options,url:(o.defaults.baseURL?"":n?.basePath??i)+e.url};return o.request(a)}};var gm=function(e){return {v4DataValidationRulesActionsBulkApprovePost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/bulk-approve",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsBulkDeletePost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/bulk-delete",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsDeleteAllDelete:async(t,r={})=>{let n="/v4/data-validation/rules/actions/delete-all",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsGeneratePost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/generate",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesActionsGenerateRulesPost:async(t,r={})=>{let n="/v4/data-validation/rules/actions/generate-rules",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesGet:async(t,r,n,o,i,a,s={})=>{let l="/v4/data-validation/rules",c=new S(l,P),u;e&&(u=e.baseOptions);let d={method:"GET",...u,...s},g={},m={};if(await _(g,"x-api-key",e),t!==void 0&&(m.groupId=t),r!==void 0&&(m.workflowId=r),n!==void 0&&(m.status=n),o!==void 0&&(m.page=o),i!==void 0&&(m.pageSize=i),a!==void 0)for(let[w,v]of Object.entries(a))m[w]=v;$(c,m);let f=u&&u.headers?u.headers:{};return d.headers={...g,...f,...s.headers},{url:O(c),options:d}},v4DataValidationRulesPost:async(t,r={})=>{let n="/v4/data-validation/rules",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4DataValidationRulesRuleIdDelete:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdDelete","ruleId",t);let o="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"DELETE",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationRulesRuleIdDisablePost:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdDisablePost","ruleId",t);let o="/v4/data-validation/rules/{ruleId}/disable".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationRulesRuleIdGet:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdGet","ruleId",t);let o="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),r!==void 0&&(c.includeDeleted=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v4DataValidationRulesRuleIdPut:async(t,r,n={})=>{D("v4DataValidationRulesRuleIdPut","ruleId",t);let o="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationValidationsValidationIdAnomaliesGet:async(t,r,n,o={})=>{D("v4DataValidationValidationsValidationIdAnomaliesGet","validationId",t);let i="/v4/data-validation/validations/{validationId}/anomalies".replace("{validationId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),r!==void 0&&(u.page=r),n!==void 0&&(u.pageSize=n),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet:async(t,r,n,o,i={})=>{D("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","validationId",t),D("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","ruleName",r);let a="/v4/data-validation/validations/{validationId}/anomalies/rules/{ruleName}".replace("{validationId}",encodeURIComponent(String(t))).replace("{ruleName}",encodeURIComponent(String(r))),s=new S(a,P),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...i},u={},d={};await _(u,"x-api-key",e),n!==void 0&&(d.page=n),o!==void 0&&(d.pageSize=o),$(s,d);let g=l&&l.headers?l.headers:{};return c.headers={...u,...g,...i.headers},{url:O(s),options:c}},v4DataValidationValidationsValidationIdGet:async(t,r,n={})=>{D("v4DataValidationValidationsValidationIdGet","validationId",t);let o="/v4/data-validation/validations/{validationId}".replace("{validationId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),r!==void 0&&(c.includeDryRun=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v4DataValidationWorkflowIdJobsJobIdValidatePost:async(t,r,n,o={})=>{D("v4DataValidationWorkflowIdJobsJobIdValidatePost","workflowId",t),D("v4DataValidationWorkflowIdJobsJobIdValidatePost","jobId",r);let i="/v4/data-validation/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"POST",...s,...o},c={},u={};await _(c,"x-api-key",e),c["Content-Type"]="application/json",$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},l.data=F(n,l,e),{url:O(a),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost:async(t,r,n,o={})=>{D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","workflowId",t),D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","jobId",r);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"POST",...s,...o},c={},u={};await _(c,"x-api-key",e),c["Content-Type"]="application/json",$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},l.data=F(n,l,e),{url:O(a),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet:async(t,r,n,o,i,a={})=>{D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","workflowId",t),D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","jobId",r);let s="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),l=new S(s,P),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},g={};await _(d,"x-api-key",e),n!==void 0&&(g.page=n),o!==void 0&&(g.pageSize=o),i!==void 0&&(g.includeDryRun=i),$(l,g);let m=c&&c.headers?c.headers:{};return u.headers={...d,...m,...a.headers},{url:O(l),options:u}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet:async(t,r,n,o={})=>{D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","workflowId",t),D("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","jobId",r);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),n!==void 0&&(u.includeDryRun=n),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4DataValidationWorkflowsWorkflowIdValidationConfigGet:async(t,r={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationConfigGet","workflowId",t);let n="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4DataValidationWorkflowsWorkflowIdValidationConfigPut:async(t,r,n={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationConfigPut","workflowId",t);let o="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationWorkflowsWorkflowIdValidationTogglePut:async(t,r,n={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationTogglePut","workflowId",t);let o="/v4/data-validation/workflows/{workflowId}/validation/toggle".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4DataValidationWorkflowsWorkflowIdValidationsLatestGet:async(t,r,n={})=>{D("v4DataValidationWorkflowsWorkflowIdValidationsLatestGet","workflowId",t);let o="/v4/data-validation/workflows/{workflowId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),r!==void 0&&(c.includeDryRun=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}}}},H=function(e){let t=gm(e);return {async v4DataValidationRulesActionsBulkApprovePost(r,n){let o=await t.v4DataValidationRulesActionsBulkApprovePost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsBulkDeletePost(r,n){let o=await t.v4DataValidationRulesActionsBulkDeletePost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsDeleteAllDelete(r,n){let o=await t.v4DataValidationRulesActionsDeleteAllDelete(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsGeneratePost(r,n){let o=await t.v4DataValidationRulesActionsGeneratePost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesActionsGenerateRulesPost(r,n){let o=await t.v4DataValidationRulesActionsGenerateRulesPost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesGet(r,n,o,i,a,s,l){let c=await t.v4DataValidationRulesGet(r,n,o,i,a,s,l),u=e?.serverIndex??0,d=V["DataValidationApi.v4DataValidationRulesGet"]?.[u]?.url;return (g,m)=>C(c,b,A,e)(g,d||m)},async v4DataValidationRulesPost(r,n){let o=await t.v4DataValidationRulesPost(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationRulesPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationRulesRuleIdDelete(r,n,o){let i=await t.v4DataValidationRulesRuleIdDelete(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationRulesRuleIdDisablePost(r,n,o){let i=await t.v4DataValidationRulesRuleIdDisablePost(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationRulesRuleIdGet(r,n,o){let i=await t.v4DataValidationRulesRuleIdGet(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationRulesRuleIdPut(r,n,o){let i=await t.v4DataValidationRulesRuleIdPut(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationValidationsValidationIdAnomaliesGet(r,n,o,i){let a=await t.v4DataValidationValidationsValidationIdAnomaliesGet(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(r,n,o,i,a){let s=await t.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(r,n,o,i,a),l=e?.serverIndex??0,c=V["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[l]?.url;return (u,d)=>C(s,b,A,e)(u,c||d)},async v4DataValidationValidationsValidationIdGet(r,n,o){let i=await t.v4DataValidationValidationsValidationIdGet(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationWorkflowIdJobsJobIdValidatePost(r,n,o,i){let a=await t.v4DataValidationWorkflowIdJobsJobIdValidatePost(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(r,n,o,i){let a=await t.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(r,n,o,i,a,s){let l=await t.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(r,n,o,i,a,s),c=e?.serverIndex??0,u=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[c]?.url;return (d,g)=>C(l,b,A,e)(d,u||g)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(r,n,o,i){let a=await t.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(r,n,o,i),s=e?.serverIndex??0,l=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4DataValidationWorkflowsWorkflowIdValidationConfigGet(r,n){let o=await t.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(r,n),i=e?.serverIndex??0,a=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4DataValidationWorkflowsWorkflowIdValidationConfigPut(r,n,o){let i=await t.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationWorkflowsWorkflowIdValidationTogglePut(r,n,o){let i=await t.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(r,n,o){let i=await t.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(r,n,o),a=e?.serverIndex??0,s=V["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)}}};var vt=class extends Se{v4DataValidationRulesActionsBulkApprovePost(t={},r){return H(this.configuration).v4DataValidationRulesActionsBulkApprovePost(t.bulkApproveRules,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsBulkDeletePost(t={},r){return H(this.configuration).v4DataValidationRulesActionsBulkDeletePost(t.bulkDeleteRules,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsDeleteAllDelete(t={},r){return H(this.configuration).v4DataValidationRulesActionsDeleteAllDelete(t.deleteRuleWithReason,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsGeneratePost(t={},r){return H(this.configuration).v4DataValidationRulesActionsGeneratePost(t.generateRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesActionsGenerateRulesPost(t={},r){return H(this.configuration).v4DataValidationRulesActionsGenerateRulesPost(t.generateRules,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesGet(t={},r){return H(this.configuration).v4DataValidationRulesGet(t.groupId,t.workflowId,t.status,t.page,t.pageSize,t.includeDeleted,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesPost(t={},r){return H(this.configuration).v4DataValidationRulesPost(t.createRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdDelete(t,r){return H(this.configuration).v4DataValidationRulesRuleIdDelete(t.ruleId,t.deleteRuleWithReason,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdDisablePost(t,r){return H(this.configuration).v4DataValidationRulesRuleIdDisablePost(t.ruleId,t.disableRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdGet(t,r){return H(this.configuration).v4DataValidationRulesRuleIdGet(t.ruleId,t.includeDeleted,r).then(n=>n(this.axios,this.basePath))}v4DataValidationRulesRuleIdPut(t,r){return H(this.configuration).v4DataValidationRulesRuleIdPut(t.ruleId,t.updateRule,r).then(n=>n(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesGet(t,r){return H(this.configuration).v4DataValidationValidationsValidationIdAnomaliesGet(t.validationId,t.page,t.pageSize,r).then(n=>n(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t,r){return H(this.configuration).v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t.validationId,t.ruleName,t.page,t.pageSize,r).then(n=>n(this.axios,this.basePath))}v4DataValidationValidationsValidationIdGet(t,r){return H(this.configuration).v4DataValidationValidationsValidationIdGet(t.validationId,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowIdJobsJobIdValidatePost(t,r){return H(this.configuration).v4DataValidationWorkflowIdJobsJobIdValidatePost(t.workflowId,t.jobId,t.dataValidationRequestBody,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t.workflowId,t.jobId,t.dataValidationRequestBody,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t.workflowId,t.jobId,t.page,t.pageSize,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t.workflowId,t.jobId,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t.workflowId,t.v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t.workflowId,t.v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest,r).then(n=>n(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t,r){return H(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t.workflowId,t.includeDryRun,r).then(n=>n(this.axios,this.basePath))}};var vm=function(e){return {v5NotificationsChannelsChannelIdDelete:async(t,r={})=>{D("v5NotificationsChannelsChannelIdDelete","channelId",t);let n="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsChannelsChannelIdGet:async(t,r={})=>{D("v5NotificationsChannelsChannelIdGet","channelId",t);let n="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsChannelsChannelIdPut:async(t,r,n={})=>{D("v5NotificationsChannelsChannelIdPut","channelId",t),D("v5NotificationsChannelsChannelIdPut","v5NotificationsChannelsPostRequest",r);let o="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5NotificationsChannelsGet:async(t,r={})=>{let n="/v5/notifications/channels",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),t!==void 0&&(l.workflowId=t),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsChannelsPost:async(t,r={})=>{D("v5NotificationsChannelsPost","v5NotificationsChannelsPostRequest",t);let n="/v5/notifications/channels",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v5NotificationsEventTypesEventTypeGet:async(t,r={})=>{D("v5NotificationsEventTypesEventTypeGet","eventType",t);let n="/v5/notifications/event-types/{eventType}".replace("{eventType}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsEventTypesGet:async(t={})=>{let r="/v5/notifications/event-types",n=new S(r,P),o;e&&(o=e.baseOptions);let i={method:"GET",...o,...t},a={},s={};await _(a,"x-api-key",e),$(n,s);let l=o&&o.headers?o.headers:{};return i.headers={...a,...l,...t.headers},{url:O(n),options:i}},v5NotificationsLogsGet:async(t,r,n,o,i,a,s={})=>{let l="/v5/notifications/logs",c=new S(l,P),u;e&&(u=e.baseOptions);let d={method:"GET",...u,...s},g={},m={};await _(g,"x-api-key",e),t!==void 0&&(m.workflowId=t),r!==void 0&&(m.eventType=r),n!==void 0&&(m.startDate=n instanceof Date?n.toISOString():n),o!==void 0&&(m.endDate=o instanceof Date?o.toISOString():o),i!==void 0&&(m.limit=i),a!==void 0&&(m.offset=a),$(c,m);let f=u&&u.headers?u.headers:{};return d.headers={...g,...f,...s.headers},{url:O(c),options:d}},v5NotificationsSettingsGet:async(t,r,n={})=>{let o="/v5/notifications/settings",i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),t!==void 0&&(c.workflowId=t),r!==void 0&&(c.eventType=r),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v5NotificationsSettingsPost:async(t,r={})=>{D("v5NotificationsSettingsPost","v5NotificationsSettingsPostRequest",t);let n="/v5/notifications/settings",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v5NotificationsSettingsSettingsIdDelete:async(t,r={})=>{D("v5NotificationsSettingsSettingsIdDelete","settingsId",t);let n="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsSettingsSettingsIdGet:async(t,r={})=>{D("v5NotificationsSettingsSettingsIdGet","settingsId",t);let n="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5NotificationsSettingsSettingsIdPut:async(t,r,n={})=>{D("v5NotificationsSettingsSettingsIdPut","settingsId",t),D("v5NotificationsSettingsSettingsIdPut","v5NotificationsSettingsSettingsIdPutRequest",r);let o="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5NotificationsTestPost:async(t,r={})=>{D("v5NotificationsTestPost","v5NotificationsTestPostRequest",t);let n="/v5/notifications/test",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}}}},se=function(e){let t=vm(e);return {async v5NotificationsChannelsChannelIdDelete(r,n){let o=await t.v5NotificationsChannelsChannelIdDelete(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsChannelsChannelIdGet(r,n){let o=await t.v5NotificationsChannelsChannelIdGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsChannelsChannelIdPut(r,n,o){let i=await t.v5NotificationsChannelsChannelIdPut(r,n,o),a=e?.serverIndex??0,s=V["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5NotificationsChannelsGet(r,n){let o=await t.v5NotificationsChannelsGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsChannelsPost(r,n){let o=await t.v5NotificationsChannelsPost(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsChannelsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsEventTypesEventTypeGet(r,n){let o=await t.v5NotificationsEventTypesEventTypeGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsEventTypesGet(r){let n=await t.v5NotificationsEventTypesGet(r),o=e?.serverIndex??0,i=V["NotificationsApi.v5NotificationsEventTypesGet"]?.[o]?.url;return (a,s)=>C(n,b,A,e)(a,i||s)},async v5NotificationsLogsGet(r,n,o,i,a,s,l){let c=await t.v5NotificationsLogsGet(r,n,o,i,a,s,l),u=e?.serverIndex??0,d=V["NotificationsApi.v5NotificationsLogsGet"]?.[u]?.url;return (g,m)=>C(c,b,A,e)(g,d||m)},async v5NotificationsSettingsGet(r,n,o){let i=await t.v5NotificationsSettingsGet(r,n,o),a=e?.serverIndex??0,s=V["NotificationsApi.v5NotificationsSettingsGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5NotificationsSettingsPost(r,n){let o=await t.v5NotificationsSettingsPost(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsSettingsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsSettingsSettingsIdDelete(r,n){let o=await t.v5NotificationsSettingsSettingsIdDelete(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsSettingsSettingsIdGet(r,n){let o=await t.v5NotificationsSettingsSettingsIdGet(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5NotificationsSettingsSettingsIdPut(r,n,o){let i=await t.v5NotificationsSettingsSettingsIdPut(r,n,o),a=e?.serverIndex??0,s=V["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5NotificationsTestPost(r,n){let o=await t.v5NotificationsTestPost(r,n),i=e?.serverIndex??0,a=V["NotificationsApi.v5NotificationsTestPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)}}};var lr=class extends Se{v5NotificationsChannelsChannelIdDelete(t,r){return se(this.configuration).v5NotificationsChannelsChannelIdDelete(t.channelId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsChannelIdGet(t,r){return se(this.configuration).v5NotificationsChannelsChannelIdGet(t.channelId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsChannelIdPut(t,r){return se(this.configuration).v5NotificationsChannelsChannelIdPut(t.channelId,t.v5NotificationsChannelsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsGet(t={},r){return se(this.configuration).v5NotificationsChannelsGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsChannelsPost(t,r){return se(this.configuration).v5NotificationsChannelsPost(t.v5NotificationsChannelsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsEventTypesEventTypeGet(t,r){return se(this.configuration).v5NotificationsEventTypesEventTypeGet(t.eventType,r).then(n=>n(this.axios,this.basePath))}v5NotificationsEventTypesGet(t){return se(this.configuration).v5NotificationsEventTypesGet(t).then(r=>r(this.axios,this.basePath))}v5NotificationsLogsGet(t={},r){return se(this.configuration).v5NotificationsLogsGet(t.workflowId,t.eventType,t.startDate,t.endDate,t.limit,t.offset,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsGet(t={},r){return se(this.configuration).v5NotificationsSettingsGet(t.workflowId,t.eventType,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsPost(t,r){return se(this.configuration).v5NotificationsSettingsPost(t.v5NotificationsSettingsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdDelete(t,r){return se(this.configuration).v5NotificationsSettingsSettingsIdDelete(t.settingsId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdGet(t,r){return se(this.configuration).v5NotificationsSettingsSettingsIdGet(t.settingsId,r).then(n=>n(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdPut(t,r){return se(this.configuration).v5NotificationsSettingsSettingsIdPut(t.settingsId,t.v5NotificationsSettingsSettingsIdPutRequest,r).then(n=>n(this.axios,this.basePath))}v5NotificationsTestPost(t,r){return se(this.configuration).v5NotificationsTestPost(t.v5NotificationsTestPostRequest,r).then(n=>n(this.axios,this.basePath))}},wu={WorkflowStarted:"workflow_started",WorkflowFinished:"workflow_finished",WorkflowFailed:"workflow_failed",WorkflowSampleFinished:"workflow_sample_finished",WorkflowDataChange:"workflow_data_change",SystemMaintenance:"system_maintenance",ServiceDegradation:"service_degradation",CreditsLow:"credits_low",FreeTrialEnding:"free_trial_ending"};var wm=function(e){return {v4SchemasGet:async(t={})=>{let r="/v4/schemas/",n=new S(r,P),o;e&&(o=e.baseOptions);let i={method:"GET",...o,...t},a={},s={};await _(a,"x-api-key",e),$(n,s);let l=o&&o.headers?o.headers:{};return i.headers={...a,...l,...t.headers},{url:O(n),options:i}},v4SchemasPost:async(t,r={})=>{let n="/v4/schemas/",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4SchemasSchemaIdDelete:async(t,r={})=>{D("v4SchemasSchemaIdDelete","schemaId",t);let n="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4SchemasSchemaIdGet:async(t,r={})=>{D("v4SchemasSchemaIdGet","schemaId",t);let n="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4SchemasSchemaIdPut:async(t,r,n={})=>{D("v4SchemasSchemaIdPut","schemaId",t);let o="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}}}},Yt=function(e){let t=wm(e);return {async v4SchemasGet(r){let n=await t.v4SchemasGet(r),o=e?.serverIndex??0,i=V["SchemasApi.v4SchemasGet"]?.[o]?.url;return (a,s)=>C(n,b,A,e)(a,i||s)},async v4SchemasPost(r,n){let o=await t.v4SchemasPost(r,n),i=e?.serverIndex??0,a=V["SchemasApi.v4SchemasPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4SchemasSchemaIdDelete(r,n){let o=await t.v4SchemasSchemaIdDelete(r,n),i=e?.serverIndex??0,a=V["SchemasApi.v4SchemasSchemaIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4SchemasSchemaIdGet(r,n){let o=await t.v4SchemasSchemaIdGet(r,n),i=e?.serverIndex??0,a=V["SchemasApi.v4SchemasSchemaIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4SchemasSchemaIdPut(r,n,o){let i=await t.v4SchemasSchemaIdPut(r,n,o),a=e?.serverIndex??0,s=V["SchemasApi.v4SchemasSchemaIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)}}};var cr=class extends Se{v4SchemasGet(t){return Yt(this.configuration).v4SchemasGet(t).then(r=>r(this.axios,this.basePath))}v4SchemasPost(t={},r){return Yt(this.configuration).v4SchemasPost(t.createSchemaBody,r).then(n=>n(this.axios,this.basePath))}v4SchemasSchemaIdDelete(t,r){return Yt(this.configuration).v4SchemasSchemaIdDelete(t.schemaId,r).then(n=>n(this.axios,this.basePath))}v4SchemasSchemaIdGet(t,r){return Yt(this.configuration).v4SchemasSchemaIdGet(t.schemaId,r).then(n=>n(this.axios,this.basePath))}v4SchemasSchemaIdPut(t,r){return Yt(this.configuration).v4SchemasSchemaIdPut(t.schemaId,t.updateSchemaBody,r).then(n=>n(this.axios,this.basePath))}};var ym=function(e){return {v4ChangesChangeIdGet:async(t,r,n,o={})=>{D("v4ChangesChangeIdGet","changeId",t);let i="/v4/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),await ve(c,e),r!=null&&(c["x-api-key"]=String(r)),n!=null&&(c.Authorization=String(n)),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4ChangesGet:async(t,r,n,o,i,a,s,l={})=>{let c="/v4/changes",u=new S(c,P),d;e&&(d=e.baseOptions);let g={method:"GET",...d,...l},m={},f={};await _(m,"x-api-key",e),await ve(m,e),n!==void 0&&(f.workflowIds=n),o!==void 0&&(f.startDate=o instanceof Date?o.toISOString():o),i!==void 0&&(f.endDate=i instanceof Date?i.toISOString():i),a!==void 0&&(f.skip=a),s!==void 0&&(f.limit=s),t!=null&&(m["x-api-key"]=String(t)),r!=null&&(m.Authorization=String(r)),$(u,f);let w=d&&d.headers?d.headers:{};return g.headers={...m,...w,...l.headers},{url:O(u),options:g}},v4WorkflowsGet:async(t,r,n,o,i,a,s,l,c,u,d={})=>{let g="/v4/workflows",m=new S(g,P),f;e&&(f=e.baseOptions);let w={method:"GET",...f,...d},v={},I={};await _(v,"x-api-key",e),t!==void 0&&(I.search=t),r!==void 0&&(I.skip=r),n!==void 0&&(I.limit=n),o!==void 0&&(I.state=o),i&&(I.tags=i),a!==void 0&&(I.monitoring=a),s!==void 0&&(I.updateInterval=s),l!==void 0&&(I.templateId=l),c!==void 0&&(I.includeDeleted=c),u!==void 0&&(I.format=u),$(m,I);let E=f&&f.headers?f.headers:{};return w.headers={...v,...E,...d.headers},{url:O(m),options:w}},v4WorkflowsPost:async(t,r={})=>{let n="/v4/workflows/",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v4WorkflowsWorkflowIdAuditlogGet:async(t,r,n,o,i,a={})=>{D("v4WorkflowsWorkflowIdAuditlogGet","workflowId",t);let s="/v4/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(t))),l=new S(s,P),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},g={};await _(d,"x-api-key",e),await ve(d,e),o!==void 0&&(g.page=o),i!==void 0&&(g.limit=i),r!=null&&(d["x-api-key"]=String(r)),n!=null&&(d.Authorization=String(n)),$(l,g);let m=c&&c.headers?c.headers:{};return u.headers={...d,...m,...a.headers},{url:O(l),options:u}},v4WorkflowsWorkflowIdComplianceApprovePut:async(t,r,n,o={})=>{D("v4WorkflowsWorkflowIdComplianceApprovePut","workflowId",t);let i="/v4/workflows/{workflowId}/compliance-approve".replace("{workflowId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"PUT",...s,...o},c={},u={};await _(c,"x-api-key",e),r!=null&&(c["x-api-key"]=String(r)),n!=null&&(c.Authorization=String(n)),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v4WorkflowsWorkflowIdComplianceRejectPut:async(t,r,n,o,i={})=>{D("v4WorkflowsWorkflowIdComplianceRejectPut","workflowId",t),D("v4WorkflowsWorkflowIdComplianceRejectPut","v4WorkflowsWorkflowIdComplianceRejectPutRequest",r);let a="/v4/workflows/{workflowId}/compliance-reject".replace("{workflowId}",encodeURIComponent(String(t))),s=new S(a,P),l;e&&(l=e.baseOptions);let c={method:"PUT",...l,...i},u={},d={};await _(u,"x-api-key",e),u["Content-Type"]="application/json",n!=null&&(u["x-api-key"]=String(n)),o!=null&&(u.Authorization=String(o)),$(s,d);let g=l&&l.headers?l.headers:{};return c.headers={...u,...g,...i.headers},c.data=F(r,c,e),{url:O(s),options:c}},v4WorkflowsWorkflowIdDataGet:async(t,r,n,o,i,a,s,l,c,u,d,g,m,f={})=>{D("v4WorkflowsWorkflowIdDataGet","workflowId",t);let w="/v4/workflows/{workflowId}/data".replace("{workflowId}",encodeURIComponent(String(t))),v=new S(w,P),I;e&&(I=e.baseOptions);let E={method:"GET",...I,...f},N={},W={};await _(N,"x-api-key",e),await ve(N,e),o!==void 0&&(W.runId=o),i!==void 0&&(W.format=i),a!==void 0&&(W.sortBy=a),s!==void 0&&(W.order=s),l!==void 0&&(W.filters=l),c!==void 0&&(W.page=c),u!==void 0&&(W.limit=u),d!==void 0&&(W.gzip=d),g!==void 0&&(W.rowIds=g),m!==void 0&&(W.includeAnomalies=m),r!=null&&(N["x-api-key"]=String(r)),n!=null&&(N.Authorization=String(n)),$(v,W);let J=I&&I.headers?I.headers:{};return E.headers={...N,...J,...f.headers},{url:O(v),options:E}},v4WorkflowsWorkflowIdDelete:async(t,r={})=>{D("v4WorkflowsWorkflowIdDelete","workflowId",t);let n="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdGet:async(t,r={})=>{D("v4WorkflowsWorkflowIdGet","workflowId",t);let n="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdHistoryGet:async(t,r={})=>{D("v4WorkflowsWorkflowIdHistoryGet","workflowId",t);let n="/v4/workflows/{workflowId}/history".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdJobsJobIdGet:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdJobsJobIdGet","workflowId",t),D("v4WorkflowsWorkflowIdJobsJobIdGet","jobId",r);let o="/v4/workflows/{workflowId}/jobs/{jobId}".replace("{workflowId}",encodeURIComponent(String(t))).replace("{jobId}",encodeURIComponent(String(r))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...n},l={},c={};await _(l,"x-api-key",e),$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},{url:O(i),options:s}},v4WorkflowsWorkflowIdMetadataPut:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdMetadataPut","workflowId",t),D("v4WorkflowsWorkflowIdMetadataPut","v4WorkflowsWorkflowIdMetadataPutRequest",r);let o="/v4/workflows/{workflowId}/metadata".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4WorkflowsWorkflowIdPausePut:async(t,r={})=>{D("v4WorkflowsWorkflowIdPausePut","workflowId",t);let n="/v4/workflows/{workflowId}/pause".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"PUT",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdResumePut:async(t,r={})=>{D("v4WorkflowsWorkflowIdResumePut","workflowId",t);let n="/v4/workflows/{workflowId}/resume".replace("{workflowId}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"PUT",...i,...r},s={},l={};await _(s,"x-api-key",e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v4WorkflowsWorkflowIdRunPut:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdRunPut","workflowId",t);let o="/v4/workflows/{workflowId}/run".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v4WorkflowsWorkflowIdSchedulePut:async(t,r,n={})=>{D("v4WorkflowsWorkflowIdSchedulePut","workflowId",t),D("v4WorkflowsWorkflowIdSchedulePut","v4WorkflowsWorkflowIdSchedulePutRequest",r);let o="/v4/workflows/{workflowId}/schedule".replace("{workflowId}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5ChangesChangeIdGet:async(t,r,n,o={})=>{D("v5ChangesChangeIdGet","changeId",t);let i="/v5/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(t))),a=new S(i,P),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...o},c={},u={};await _(c,"x-api-key",e),await ve(c,e),r!=null&&(c["x-api-key"]=String(r)),n!=null&&(c.Authorization=String(n)),$(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:O(a),options:l}},v5ChangesGet:async(t,r,n,o,i,a,s,l={})=>{let c="/v5/changes",u=new S(c,P),d;e&&(d=e.baseOptions);let g={method:"GET",...d,...l},m={},f={};await _(m,"x-api-key",e),await ve(m,e),n!==void 0&&(f.workflowIds=n),o!==void 0&&(f.startDate=o instanceof Date?o.toISOString():o),i!==void 0&&(f.endDate=i instanceof Date?i.toISOString():i),a!==void 0&&(f.skip=a),s!==void 0&&(f.limit=s),t!=null&&(m["x-api-key"]=String(t)),r!=null&&(m.Authorization=String(r)),$(u,f);let w=d&&d.headers?d.headers:{};return g.headers={...m,...w,...l.headers},{url:O(u),options:g}},v5WorkflowsIdDelete:async(t,r={})=>{D("v5WorkflowsIdDelete","id",t);let n="/v5/workflows/{id}".replace("{id}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"DELETE",...i,...r},s={},l={};await _(s,"x-api-key",e),await ve(s,e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5WorkflowsIdGet:async(t,r={})=>{D("v5WorkflowsIdGet","id",t);let n="/v5/workflows/{id}".replace("{id}",encodeURIComponent(String(t))),o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"GET",...i,...r},s={},l={};await _(s,"x-api-key",e),await ve(s,e),$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},{url:O(o),options:a}},v5WorkflowsIdPut:async(t,r,n={})=>{D("v5WorkflowsIdPut","id",t),D("v5WorkflowsIdPut","v5WorkflowsIdPutRequest",r);let o="/v5/workflows/{id}".replace("{id}",encodeURIComponent(String(t))),i=new S(o,P),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...n},l={},c={};await _(l,"x-api-key",e),await ve(l,e),l["Content-Type"]="application/json",$(i,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...n.headers},s.data=F(r,s,e),{url:O(i),options:s}},v5WorkflowsPost:async(t,r={})=>{D("v5WorkflowsPost","v5WorkflowsPostRequest",t);let n="/v5/workflows",o=new S(n,P),i;e&&(i=e.baseOptions);let a={method:"POST",...i,...r},s={},l={};await _(s,"x-api-key",e),await ve(s,e),s["Content-Type"]="application/json",$(o,l);let c=i&&i.headers?i.headers:{};return a.headers={...s,...c,...r.headers},a.data=F(t,a,e),{url:O(o),options:a}},v5WorkflowsWorkflowIdAuditlogGet:async(t,r,n,o,i,a={})=>{D("v5WorkflowsWorkflowIdAuditlogGet","workflowId",t);let s="/v5/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(t))),l=new S(s,P),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},g={};await _(d,"x-api-key",e),await ve(d,e),o!==void 0&&(g.page=o),i!==void 0&&(g.limit=i),r!=null&&(d["x-api-key"]=String(r)),n!=null&&(d.Authorization=String(n)),$(l,g);let m=c&&c.headers?c.headers:{};return u.headers={...d,...m,...a.headers},{url:O(l),options:u}}}},M=function(e){let t=ym(e);return {async v4ChangesChangeIdGet(r,n,o,i){let a=await t.v4ChangesChangeIdGet(r,n,o,i),s=e?.serverIndex??0,l=V["WorkflowsApi.v4ChangesChangeIdGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4ChangesGet(r,n,o,i,a,s,l,c){let u=await t.v4ChangesGet(r,n,o,i,a,s,l,c),d=e?.serverIndex??0,g=V["WorkflowsApi.v4ChangesGet"]?.[d]?.url;return (m,f)=>C(u,b,A,e)(m,g||f)},async v4WorkflowsGet(r,n,o,i,a,s,l,c,u,d,g){let m=await t.v4WorkflowsGet(r,n,o,i,a,s,l,c,u,d,g),f=e?.serverIndex??0,w=V["WorkflowsApi.v4WorkflowsGet"]?.[f]?.url;return (v,I)=>C(m,b,A,e)(v,w||I)},async v4WorkflowsPost(r,n){let o=await t.v4WorkflowsPost(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s){let l=await t.v4WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s),c=e?.serverIndex??0,u=V["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[c]?.url;return (d,g)=>C(l,b,A,e)(d,u||g)},async v4WorkflowsWorkflowIdComplianceApprovePut(r,n,o,i){let a=await t.v4WorkflowsWorkflowIdComplianceApprovePut(r,n,o,i),s=e?.serverIndex??0,l=V["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v4WorkflowsWorkflowIdComplianceRejectPut(r,n,o,i,a){let s=await t.v4WorkflowsWorkflowIdComplianceRejectPut(r,n,o,i,a),l=e?.serverIndex??0,c=V["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[l]?.url;return (u,d)=>C(s,b,A,e)(u,c||d)},async v4WorkflowsWorkflowIdDataGet(r,n,o,i,a,s,l,c,u,d,g,m,f,w){let v=await t.v4WorkflowsWorkflowIdDataGet(r,n,o,i,a,s,l,c,u,d,g,m,f,w),I=e?.serverIndex??0,E=V["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[I]?.url;return (N,W)=>C(v,b,A,e)(N,E||W)},async v4WorkflowsWorkflowIdDelete(r,n){let o=await t.v4WorkflowsWorkflowIdDelete(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdGet(r,n){let o=await t.v4WorkflowsWorkflowIdGet(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdHistoryGet(r,n){let o=await t.v4WorkflowsWorkflowIdHistoryGet(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdJobsJobIdGet(r,n,o){let i=await t.v4WorkflowsWorkflowIdJobsJobIdGet(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4WorkflowsWorkflowIdMetadataPut(r,n,o){let i=await t.v4WorkflowsWorkflowIdMetadataPut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4WorkflowsWorkflowIdPausePut(r,n){let o=await t.v4WorkflowsWorkflowIdPausePut(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdResumePut(r,n){let o=await t.v4WorkflowsWorkflowIdResumePut(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v4WorkflowsWorkflowIdRunPut(r,n,o){let i=await t.v4WorkflowsWorkflowIdRunPut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v4WorkflowsWorkflowIdSchedulePut(r,n,o){let i=await t.v4WorkflowsWorkflowIdSchedulePut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5ChangesChangeIdGet(r,n,o,i){let a=await t.v5ChangesChangeIdGet(r,n,o,i),s=e?.serverIndex??0,l=V["WorkflowsApi.v5ChangesChangeIdGet"]?.[s]?.url;return (c,u)=>C(a,b,A,e)(c,l||u)},async v5ChangesGet(r,n,o,i,a,s,l,c){let u=await t.v5ChangesGet(r,n,o,i,a,s,l,c),d=e?.serverIndex??0,g=V["WorkflowsApi.v5ChangesGet"]?.[d]?.url;return (m,f)=>C(u,b,A,e)(m,g||f)},async v5WorkflowsIdDelete(r,n){let o=await t.v5WorkflowsIdDelete(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v5WorkflowsIdDelete"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5WorkflowsIdGet(r,n){let o=await t.v5WorkflowsIdGet(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v5WorkflowsIdGet"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5WorkflowsIdPut(r,n,o){let i=await t.v5WorkflowsIdPut(r,n,o),a=e?.serverIndex??0,s=V["WorkflowsApi.v5WorkflowsIdPut"]?.[a]?.url;return (l,c)=>C(i,b,A,e)(l,s||c)},async v5WorkflowsPost(r,n){let o=await t.v5WorkflowsPost(r,n),i=e?.serverIndex??0,a=V["WorkflowsApi.v5WorkflowsPost"]?.[i]?.url;return (s,l)=>C(o,b,A,e)(s,a||l)},async v5WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s){let l=await t.v5WorkflowsWorkflowIdAuditlogGet(r,n,o,i,a,s),c=e?.serverIndex??0,u=V["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[c]?.url;return (d,g)=>C(l,b,A,e)(d,u||g)}}};var ur=class extends Se{v4ChangesChangeIdGet(t,r){return M(this.configuration).v4ChangesChangeIdGet(t.changeId,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v4ChangesGet(t={},r){return M(this.configuration).v4ChangesGet(t.xApiKey,t.authorization,t.workflowIds,t.startDate,t.endDate,t.skip,t.limit,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsGet(t={},r){return M(this.configuration).v4WorkflowsGet(t.search,t.skip,t.limit,t.state,t.tags,t.monitoring,t.updateInterval,t.templateId,t.includeDeleted,t.format,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsPost(t={},r){return M(this.configuration).v4WorkflowsPost(t.createWorkflowBody,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdAuditlogGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdAuditlogGet(t.workflowId,t.xApiKey,t.authorization,t.page,t.limit,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceApprovePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdComplianceApprovePut(t.workflowId,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceRejectPut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdComplianceRejectPut(t.workflowId,t.v4WorkflowsWorkflowIdComplianceRejectPutRequest,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdDataGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdDataGet(t.workflowId,t.xApiKey,t.authorization,t.runId,t.format,t.sortBy,t.order,t.filters,t.page,t.limit,t.gzip,t.rowIds,t.includeAnomalies,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdDelete(t,r){return M(this.configuration).v4WorkflowsWorkflowIdDelete(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdHistoryGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdHistoryGet(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdJobsJobIdGet(t,r){return M(this.configuration).v4WorkflowsWorkflowIdJobsJobIdGet(t.workflowId,t.jobId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdMetadataPut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdMetadataPut(t.workflowId,t.v4WorkflowsWorkflowIdMetadataPutRequest,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdPausePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdPausePut(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdResumePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdResumePut(t.workflowId,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdRunPut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdRunPut(t.workflowId,t.v4WorkflowsWorkflowIdRunPutRequest,r).then(n=>n(this.axios,this.basePath))}v4WorkflowsWorkflowIdSchedulePut(t,r){return M(this.configuration).v4WorkflowsWorkflowIdSchedulePut(t.workflowId,t.v4WorkflowsWorkflowIdSchedulePutRequest,r).then(n=>n(this.axios,this.basePath))}v5ChangesChangeIdGet(t,r){return M(this.configuration).v5ChangesChangeIdGet(t.changeId,t.xApiKey,t.authorization,r).then(n=>n(this.axios,this.basePath))}v5ChangesGet(t={},r){return M(this.configuration).v5ChangesGet(t.xApiKey,t.authorization,t.workflowIds,t.startDate,t.endDate,t.skip,t.limit,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsIdDelete(t,r){return M(this.configuration).v5WorkflowsIdDelete(t.id,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsIdGet(t,r){return M(this.configuration).v5WorkflowsIdGet(t.id,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsIdPut(t,r){return M(this.configuration).v5WorkflowsIdPut(t.id,t.v5WorkflowsIdPutRequest,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsPost(t,r){return M(this.configuration).v5WorkflowsPost(t.v5WorkflowsPostRequest,r).then(n=>n(this.axios,this.basePath))}v5WorkflowsWorkflowIdAuditlogGet(t,r){return M(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(t.workflowId,t.xApiKey,t.authorization,t.page,t.limit,r).then(n=>n(this.axios,this.basePath))}};var dr=class{constructor(t={}){this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions={...t.baseOptions,headers:{...t.baseOptions?.headers}},this.formDataCtor=t.formDataCtor;}isJsonMime(t){let r=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(r.test(t)||t.toLowerCase()==="application/json-patch+json")}};var eo="0.12.1",yu="kadoa-node-sdk",ku="node";var fr="https://api.kadoa.com",xu="wss://realtime.kadoa.com",Ru="https://realtime.kadoa.com";var Pu=Qf(Vu()),Ce=e=>(0, Pu.default)(`kadoa:${e}`),ce={client:Ce("client"),wss:Ce("wss"),extraction:Ce("extraction"),http:Ce("http"),workflow:Ce("workflow"),crawl:Ce("crawl"),notifications:Ce("notifications"),schemas:Ce("schemas"),validation:Ce("validation")};var Ve=ce.wss;typeof WebSocket>"u"&&(window.WebSocket=Kf("ws"));var hr=class{constructor(t){this.lastHeartbeat=Date.now();this.isConnecting=false;this.eventListeners=new Set;this.connectionListeners=new Set;this.errorListeners=new Set;if(!t.teamApiKey.startsWith("tk-"))throw new z("Realtime connection requires a team API key (starting with 'tk-'). Provided key does not appear to be a team API key.",{code:"AUTH_ERROR",details:{providedKeyPrefix:t.teamApiKey.substring(0,3)}});this.teamApiKey=t.teamApiKey,this.heartbeatInterval=t.heartbeatInterval||1e4,this.reconnectDelay=t.reconnectDelay||5e3,this.missedHeartbeatsLimit=t.missedHeartbeatsLimit||3e4;}async connect(){if(!this.isConnecting){this.isConnecting=true;try{let t=await fetch(`${fr}/v4/oauth2/token`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":`${this.teamApiKey}`,"x-sdk-version":eo}}),{access_token:r,team_id:n}=await t.json();this.socket=new WebSocket(`${xu}?access_token=${r}`),this.socket.onopen=()=>{this.isConnecting=!1,this.lastHeartbeat=Date.now(),this.socket?.readyState===WebSocket.OPEN&&(this.socket.send(JSON.stringify({action:"subscribe",channel:n})),Ve("Connected to WebSocket"),this.notifyConnectionListeners(!0)),this.startHeartbeatCheck();},this.socket.onmessage=o=>{try{let i=JSON.parse(o.data);i.type==="heartbeat"?this.handleHeartbeat():(i?.id&&fetch(`${Ru}/api/v1/events/ack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:i.id})}),this.notifyEventListeners(i));}catch(i){Ve("Failed to parse incoming message: %O",i);}},this.socket.onclose=()=>{Ve("WebSocket disconnected. Attempting to reconnect..."),this.isConnecting=!1,this.stopHeartbeatCheck(),this.notifyConnectionListeners(!1,"Connection closed"),setTimeout(()=>this.connect(),this.reconnectDelay);},this.socket.onerror=o=>{Ve("WebSocket error: %O",o),this.isConnecting=!1,this.notifyErrorListeners(o);};}catch(t){Ve("Failed to connect: %O",t),this.isConnecting=false,setTimeout(()=>this.connect(),this.reconnectDelay);}}}handleHeartbeat(){Ve("Heartbeat received"),this.lastHeartbeat=Date.now();}notifyEventListeners(t){this.eventListeners.forEach(r=>{try{r(t);}catch(n){Ve("Error in event listener: %O",n);}});}notifyConnectionListeners(t,r){this.connectionListeners.forEach(n=>{try{n(t,r);}catch(o){Ve("Error in connection listener: %O",o);}});}notifyErrorListeners(t){this.errorListeners.forEach(r=>{try{r(t);}catch(n){Ve("Error in error listener: %O",n);}});}startHeartbeatCheck(){this.missedHeartbeatCheckTimer=setInterval(()=>{Date.now()-this.lastHeartbeat>this.missedHeartbeatsLimit&&(Ve("No heartbeat received in 30 seconds! Closing connection."),this.socket?.close());},this.heartbeatInterval);}stopHeartbeatCheck(){this.missedHeartbeatCheckTimer&&clearInterval(this.missedHeartbeatCheckTimer);}onEvent(t){return this.eventListeners.add(t),()=>{this.eventListeners.delete(t);}}onConnection(t){return this.connectionListeners.add(t),()=>{this.connectionListeners.delete(t);}}onError(t){return this.errorListeners.add(t),()=>{this.errorListeners.delete(t);}}close(){this.socket&&(this.stopHeartbeatCheck(),this.socket.close(),this.socket=void 0),this.eventListeners.clear(),this.connectionListeners.clear(),this.errorListeners.clear();}isConnected(){return this.socket?.readyState===WebSocket.OPEN}};var gr=class{constructor(t,r,n,o,i){this.extractionService=t;this.dataFetcherService=r;this.channelsService=n;this.settingsService=o;this.workflowsCoreService=i;}async run(t){return await this.extractionService.executeExtraction({...t,mode:"run"})}async submit(t){return await this.extractionService.executeExtraction({...t,mode:"submit"})}async runJob(t,r){return this.workflowsCoreService.runWorkflow(t,r)}async runJobAndWait(t,r){let n=await this.workflowsCoreService.runWorkflow(t,r);return this.workflowsCoreService.waitForJobCompletion(t,n.jobId)}async fetchData(t){return this.dataFetcherService.fetchData(t)}async fetchAllData(t){return this.dataFetcherService.fetchAllData(t)}fetchDataPages(t){return this.dataFetcherService.fetchDataPages(t)}async getNotificationChannels(t){return this.channelsService.listChannels({workflowId:t})}async getNotificationSettings(t){return this.settingsService.listSettings({workflowId:t})}};var vr=class{constructor(t,r,n){this.channelsService=t;this.settingsService=r;this.channelSetupService=n;}async setupForWorkflow(t){if((await this.settingsService.listSettings({workflowId:t.workflowId})).length>0)throw new z("Settings already exist",{code:ge.BAD_REQUEST,details:{workflowId:t.workflowId}});return this.channelSetupService.setup({workflowId:t.workflowId,events:t.events,channels:t.channels})}async setupForWorkspace(t){if((await this.settingsService.listSettings({})).length>0)throw new z("Workspace settings already exist",{code:ge.BAD_REQUEST});return this.channelSetupService.setup({events:t.events,channels:t.channels})}get channels(){return this.channelsService}get settings(){return this.settingsService}};var to=class{constructor(t){this.service=t;}};var wr=class{constructor(t){this.userService=t;}get service(){return this.userService}async getCurrentUser(){return this.userService.getCurrentUser()}};var oo=class{constructor(t,r){this.coreService=t;this.rulesService=r;}listRules(t){return this.rulesService.listRules(t)}getRuleByName(t){return this.rulesService.getRuleByName(t)}createRule(t){return this.rulesService.createRule(t)}generateRule(t){return this.rulesService.generateRule(t)}generateRules(t){return this.rulesService.generateRules(t)}bulkApproveRules(t){return this.rulesService.bulkApproveRules(t)}bulkDeleteRules(t){return this.rulesService.bulkDeleteRules(t)}deleteAllRules(t){return this.rulesService.deleteAllRules(t)}listWorkflowValidations(t,r){return this.coreService.listWorkflowValidations({workflowId:t,jobId:r})}scheduleValidation(t,r){return this.coreService.scheduleValidation(t,r)}waitUntilCompleted(t,r){return this.coreService.waitUntilCompleted(t,r)}getValidationDetails(t){return this.coreService.getValidationDetails(t)}getLatestValidation(t,r){return this.coreService.getLatestValidation(t,r)}getValidationAnomalies(t){return this.coreService.getValidationAnomalies(t)}getValidationAnomaliesByRule(t,r){return this.coreService.getValidationAnomaliesByRule(t,r)}toggleValidationEnabled(t){return this.coreService.toggleValidationEnabled(t)}};var yr=class{constructor(t){this.core=t;}async get(t){return this.core.get(t)}async list(t){return this.core.list(t)}async getByName(t){return this.core.getByName(t)}async create(t){return this.core.create(t)}async cancel(t){return this.core.cancel(t)}async approve(t){return this.core.resume(t)}async resume(t){return this.core.resume(t)}async wait(t,r){return this.core.wait(t,r)}async getJobStatus(t,r){return this.core.getJobStatus(t,r)}async waitForJobCompletion(t,r,n){return this.core.waitForJobCompletion(t,r,n)}};var kr=class{constructor(t){this.client=t;}async getCurrentUser(){let r=(await this.client.axiosInstance.get("/v5/user",{baseURL:this.client.baseUrl,headers:{"x-api-key":this.client.apiKey,"Content-Type":"application/json"}})).data;if(!r||!r.userId)throw new z("Invalid user data received");return {userId:r.userId,email:r.email,featureFlags:r.featureFlags||[]}}};function yi(e){if(!e||typeof e!="object")return false;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":false}function _u(e){return e==="__proto__"}function Pe(e,t){let r=Object.keys(t);for(let n=0;n<r.length;n++){let o=r[n];if(_u(o))continue;let i=t[o],a=e[o];Array.isArray(i)?Array.isArray(a)?e[o]=Pe(a,i):e[o]=Pe([],i):yi(i)?yi(a)?e[o]=Pe(a,i):e[o]=Pe({},i):(a===void 0||i!==void 0)&&(e[o]=i);}return e}var Cm=ce.extraction,Dm=new Set(["FINISHED","SUCCESS"]),ki={mode:"run",pollingInterval:5e3,maxWaitTime:3e5,navigationMode:"single-page",location:{type:"auto"},name:"Untitled Workflow",bypassPreview:true,autoStart:true},xr=class{constructor(t,r,n,o){this.workflowsCoreService=t;this.dataFetcherService=r;this.entityResolverService=n;this.notificationSetupService=o;}async executeExtraction(t){this.validateOptions(t);let r=Pe(ki,t),n,o=await this.entityResolverService.resolveEntity(t.entity||"ai-detection",{link:r.urls[0],location:r.location,navigationMode:r.navigationMode}),i=!!r.notifications;if(n=(await this.workflowsCoreService.create({...r,entity:o.entity,fields:o.fields})).id,i){let d=await this.notificationSetupService.setup({workflowId:n,events:r.notifications?.events,channels:r.notifications?.channels});Cm("Notifications setup: %O",d.map(g=>({id:g.id,eventType:g.eventType})));}if(r.mode==="submit")return {workflowId:n};let s=await this.workflowsCoreService.wait(n,{pollIntervalMs:r.pollingInterval,timeoutMs:r.maxWaitTime}),l,c;if(this.isExtractionSuccessful(s.runState)){let d=await this.dataFetcherService.fetchData({workflowId:n});l=d.data,c=d.pagination;}else throw new z(`${te.WORKFLOW_UNEXPECTED_STATUS}: ${s.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:n,runState:s.runState,state:s.state}});return {workflowId:n,workflow:s,data:l,pagination:c}}validateOptions(t){if(!t.urls||t.urls.length===0)throw new z(te.NO_URLS,{code:"VALIDATION_ERROR"})}async resumeWorkflow(t){await this.workflowsCoreService.resume(t);let r=await this.workflowsCoreService.wait(t,{pollIntervalMs:ki.pollingInterval,timeoutMs:ki.maxWaitTime}),n,o;if(this.isExtractionSuccessful(r.runState)){let a=await this.dataFetcherService.fetchData({workflowId:t});n=a.data,o=a.pagination;}else throw new z(`${te.WORKFLOW_UNEXPECTED_STATUS}: ${r.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:t,runState:r.runState,state:r.state}});return {workflowId:t,workflow:r,data:n,pagination:o}}isExtractionSuccessful(t){return t?Dm.has(t.toUpperCase()):false}};var it={};Ue(it,{$brand:()=>Rr,$input:()=>js,$output:()=>zs,NEVER:()=>xi,TimePrecision:()=>qs,ZodAny:()=>nf,ZodArray:()=>cf,ZodBase64:()=>nc,ZodBase64URL:()=>ic,ZodBigInt:()=>Go,ZodBigIntFormat:()=>lc,ZodBoolean:()=>qo,ZodCIDRv4:()=>oc,ZodCIDRv6:()=>rc,ZodCUID:()=>Kl,ZodCUID2:()=>Hl,ZodCatch:()=>Pf,ZodCodec:()=>wc,ZodCustom:()=>On,ZodCustomStringFormat:()=>To,ZodDate:()=>Pn,ZodDefault:()=>Rf,ZodDiscriminatedUnion:()=>uf,ZodE164:()=>ac,ZodEmail:()=>Bl,ZodEmoji:()=>Jl,ZodEnum:()=>zo,ZodError:()=>av,ZodFile:()=>yf,ZodFirstPartyTypeKind:()=>yc,ZodFunction:()=>zf,ZodGUID:()=>In,ZodIPv4:()=>ec,ZodIPv6:()=>tc,ZodISODate:()=>yn,ZodISODateTime:()=>wn,ZodISODuration:()=>xn,ZodISOTime:()=>kn,ZodIntersection:()=>df,ZodIssueCode:()=>vw,ZodJWT:()=>sc,ZodKSUID:()=>Yl,ZodLazy:()=>Wf,ZodLiteral:()=>wf,ZodMap:()=>gf,ZodNaN:()=>$f,ZodNanoID:()=>Ml,ZodNever:()=>sf,ZodNonOptional:()=>gc,ZodNull:()=>of,ZodNullable:()=>xf,ZodNumber:()=>Uo,ZodNumberFormat:()=>Nt,ZodObject:()=>$n,ZodOptional:()=>hc,ZodPipe:()=>vc,ZodPrefault:()=>bf,ZodPromise:()=>Ef,ZodReadonly:()=>Of,ZodRealError:()=>fe,ZodRecord:()=>fc,ZodSet:()=>vf,ZodString:()=>jo,ZodStringFormat:()=>Z,ZodSuccess:()=>Vf,ZodSymbol:()=>ef,ZodTemplateLiteral:()=>Df,ZodTransform:()=>kf,ZodTuple:()=>pf,ZodType:()=>U,ZodULID:()=>Ql,ZodURL:()=>Vn,ZodUUID:()=>ze,ZodUndefined:()=>tf,ZodUnion:()=>uc,ZodUnknown:()=>af,ZodVoid:()=>lf,ZodXID:()=>Xl,_ZodString:()=>Zl,_default:()=>If,_function:()=>uw,any:()=>Lv,array:()=>_n,base64:()=>Vv,base64url:()=>Pv,bigint:()=>Tv,boolean:()=>Yd,catch:()=>_f,check:()=>dw,cidrv4:()=>Av,cidrv6:()=>Sv,clone:()=>re,codec:()=>sw,coerce:()=>kc,config:()=>Q,core:()=>Ee,cuid:()=>wv,cuid2:()=>yv,custom:()=>fw,date:()=>Bv,decode:()=>El,decodeAsync:()=>jl,discriminatedUnion:()=>Qv,e164:()=>_v,email:()=>lv,emoji:()=>gv,encode:()=>Nl,encodeAsync:()=>zl,endsWith:()=>$o,enum:()=>pc,file:()=>rw,flattenError:()=>fo,float32:()=>Nv,float64:()=>Ev,formatError:()=>po,function:()=>uw,getErrorMap:()=>yw,globalRegistry:()=>$e,gt:()=>We,gte:()=>de,guid:()=>cv,hash:()=>Wv,hex:()=>Dv,hostname:()=>Cv,httpUrl:()=>hv,includes:()=>Po,instanceof:()=>pw,int:()=>Ll,int32:()=>zv,int64:()=>Uv,intersection:()=>ff,ipv4:()=>Iv,ipv6:()=>bv,iso:()=>Rn,json:()=>hw,jwt:()=>$v,keyof:()=>Jv,ksuid:()=>Rv,lazy:()=>Nf,length:()=>Ct,literal:()=>ow,locales:()=>xo,looseObject:()=>Hv,lowercase:()=>So,lt:()=>De,lte:()=>ye,map:()=>Yv,maxLength:()=>Ot,maxSize:()=>$t,mime:()=>Oo,minLength:()=>Me,minSize:()=>nt,multipleOf:()=>rt,nan:()=>aw,nanoid:()=>vv,nativeEnum:()=>tw,negative:()=>gl,never:()=>cc,nonnegative:()=>wl,nonoptional:()=>Sf,nonpositive:()=>vl,normalize:()=>Co,null:()=>rf,nullable:()=>An,nullish:()=>nw,number:()=>Xd,object:()=>Mv,optional:()=>bn,overwrite:()=>Ne,parse:()=>Ol,parseAsync:()=>Cl,partialRecord:()=>Xv,pipe:()=>Sn,positive:()=>hl,prefault:()=>Af,preprocess:()=>gw,prettifyError:()=>Ci,promise:()=>cw,property:()=>yl,readonly:()=>Cf,record:()=>hf,refine:()=>jf,regex:()=>Ao,regexes:()=>we,registry:()=>Hr,safeDecode:()=>Ul,safeDecodeAsync:()=>Gl,safeEncode:()=>Tl,safeEncodeAsync:()=>ql,safeParse:()=>Dl,safeParseAsync:()=>Wl,set:()=>ew,setErrorMap:()=>ww,size:()=>bo,startsWith:()=>_o,strictObject:()=>Kv,string:()=>Fl,stringFormat:()=>Ov,stringbool:()=>mw,success:()=>iw,superRefine:()=>Tf,symbol:()=>Gv,templateLiteral:()=>lw,toJSONSchema:()=>Sl,toLowerCase:()=>Wo,toUpperCase:()=>No,transform:()=>mc,treeifyError:()=>Oi,trim:()=>Do,tuple:()=>mf,uint32:()=>jv,uint64:()=>qv,ulid:()=>kv,undefined:()=>Fv,union:()=>dc,unknown:()=>Wt,uppercase:()=>Vo,url:()=>mv,util:()=>R,uuid:()=>uv,uuidv4:()=>dv,uuidv6:()=>fv,uuidv7:()=>pv,void:()=>Zv,xid:()=>xv});var Ee={};Ue(Ee,{$ZodAny:()=>as,$ZodArray:()=>ds,$ZodAsyncError:()=>Re,$ZodBase64:()=>Ha,$ZodBase64URL:()=>Qa,$ZodBigInt:()=>Lr,$ZodBigIntFormat:()=>os,$ZodBoolean:()=>vo,$ZodCIDRv4:()=>Ja,$ZodCIDRv6:()=>Ma,$ZodCUID:()=>Ea,$ZodCUID2:()=>za,$ZodCatch:()=>Ps,$ZodCheck:()=>B,$ZodCheckBigIntFormat:()=>fa,$ZodCheckEndsWith:()=>ba,$ZodCheckGreaterThan:()=>zr,$ZodCheckIncludes:()=>Ra,$ZodCheckLengthEquals:()=>wa,$ZodCheckLessThan:()=>Er,$ZodCheckLowerCase:()=>ka,$ZodCheckMaxLength:()=>ga,$ZodCheckMaxSize:()=>pa,$ZodCheckMimeType:()=>Sa,$ZodCheckMinLength:()=>va,$ZodCheckMinSize:()=>ma,$ZodCheckMultipleOf:()=>ua,$ZodCheckNumberFormat:()=>da,$ZodCheckOverwrite:()=>Va,$ZodCheckProperty:()=>Aa,$ZodCheckRegex:()=>ya,$ZodCheckSizeEquals:()=>ha,$ZodCheckStartsWith:()=>Ia,$ZodCheckStringFormat:()=>Pt,$ZodCheckUpperCase:()=>xa,$ZodCodec:()=>wo,$ZodCustom:()=>Es,$ZodCustomStringFormat:()=>es,$ZodDate:()=>us,$ZodDefault:()=>bs,$ZodDiscriminatedUnion:()=>ps,$ZodE164:()=>Xa,$ZodEmail:()=>Ca,$ZodEmoji:()=>Wa,$ZodEncodeError:()=>Ge,$ZodEnum:()=>ws,$ZodError:()=>uo,$ZodFile:()=>ks,$ZodFunction:()=>Ds,$ZodGUID:()=>$a,$ZodIPv4:()=>Za,$ZodIPv6:()=>Ba,$ZodISODate:()=>Ga,$ZodISODateTime:()=>qa,$ZodISODuration:()=>La,$ZodISOTime:()=>Fa,$ZodIntersection:()=>ms,$ZodJWT:()=>Ya,$ZodKSUID:()=>Ua,$ZodLazy:()=>Ns,$ZodLiteral:()=>ys,$ZodMap:()=>gs,$ZodNaN:()=>_s,$ZodNanoID:()=>Na,$ZodNever:()=>ls,$ZodNonOptional:()=>Ss,$ZodNull:()=>is,$ZodNullable:()=>Is,$ZodNumber:()=>Fr,$ZodNumberFormat:()=>ts,$ZodObject:()=>td,$ZodObjectJIT:()=>fs,$ZodOptional:()=>Rs,$ZodPipe:()=>$s,$ZodPrefault:()=>As,$ZodPromise:()=>Ws,$ZodReadonly:()=>Os,$ZodRealError:()=>ue,$ZodRecord:()=>hs,$ZodRegistry:()=>_t,$ZodSet:()=>vs,$ZodString:()=>ot,$ZodStringFormat:()=>L,$ZodSuccess:()=>Vs,$ZodSymbol:()=>rs,$ZodTemplateLiteral:()=>Cs,$ZodTransform:()=>xs,$ZodTuple:()=>Br,$ZodType:()=>T,$ZodULID:()=>ja,$ZodURL:()=>Da,$ZodUUID:()=>Oa,$ZodUndefined:()=>ns,$ZodUnion:()=>Zr,$ZodUnknown:()=>ss,$ZodVoid:()=>cs,$ZodXID:()=>Ta,$brand:()=>Rr,$constructor:()=>p,$input:()=>js,$output:()=>zs,Doc:()=>go,JSONSchema:()=>Kd,JSONSchemaGenerator:()=>Eo,NEVER:()=>xi,TimePrecision:()=>qs,_any:()=>ll,_array:()=>kl,_base64:()=>mn,_base64url:()=>hn,_bigint:()=>tl,_boolean:()=>Ys,_catch:()=>Yg,_check:()=>Md,_cidrv4:()=>fn,_cidrv6:()=>pn,_coercedBigint:()=>ol,_coercedBoolean:()=>el,_coercedDate:()=>pl,_coercedNumber:()=>Js,_coercedString:()=>Us,_cuid:()=>nn,_cuid2:()=>an,_custom:()=>Rl,_date:()=>fl,_decode:()=>Pr,_decodeAsync:()=>$r,_default:()=>Hg,_discriminatedUnion:()=>jg,_e164:()=>gn,_email:()=>Qr,_emoji:()=>on,_encode:()=>Vr,_encodeAsync:()=>_r,_endsWith:()=>$o,_enum:()=>Lg,_file:()=>xl,_float32:()=>Ks,_float64:()=>Hs,_gt:()=>We,_gte:()=>de,_guid:()=>Ro,_includes:()=>Po,_int:()=>Ms,_int32:()=>Qs,_int64:()=>rl,_intersection:()=>Tg,_ipv4:()=>un,_ipv6:()=>dn,_isoDate:()=>Fs,_isoDateTime:()=>Gs,_isoDuration:()=>Zs,_isoTime:()=>Ls,_jwt:()=>vn,_ksuid:()=>cn,_lazy:()=>rv,_length:()=>Ct,_literal:()=>Bg,_lowercase:()=>So,_lt:()=>De,_lte:()=>ye,_map:()=>Gg,_max:()=>ye,_maxLength:()=>Ot,_maxSize:()=>$t,_mime:()=>Oo,_min:()=>de,_minLength:()=>Me,_minSize:()=>nt,_multipleOf:()=>rt,_nan:()=>ml,_nanoid:()=>rn,_nativeEnum:()=>Zg,_negative:()=>gl,_never:()=>ul,_nonnegative:()=>wl,_nonoptional:()=>Qg,_nonpositive:()=>vl,_normalize:()=>Co,_null:()=>sl,_nullable:()=>Kg,_number:()=>Bs,_optional:()=>Mg,_overwrite:()=>Ne,_parse:()=>bt,_parseAsync:()=>At,_pipe:()=>ev,_positive:()=>hl,_promise:()=>nv,_property:()=>yl,_readonly:()=>tv,_record:()=>qg,_refine:()=>Il,_regex:()=>Ao,_safeDecode:()=>Cr,_safeDecodeAsync:()=>Wr,_safeEncode:()=>Or,_safeEncodeAsync:()=>Dr,_safeParse:()=>St,_safeParseAsync:()=>Vt,_set:()=>Fg,_size:()=>bo,_startsWith:()=>_o,_string:()=>Ts,_stringFormat:()=>Dt,_stringbool:()=>Al,_success:()=>Xg,_superRefine:()=>bl,_symbol:()=>il,_templateLiteral:()=>ov,_toLowerCase:()=>Wo,_toUpperCase:()=>No,_transform:()=>Jg,_trim:()=>Do,_tuple:()=>Ug,_uint32:()=>Xs,_uint64:()=>nl,_ulid:()=>sn,_undefined:()=>al,_union:()=>zg,_unknown:()=>cl,_uppercase:()=>Vo,_url:()=>Io,_uuid:()=>Xr,_uuidv4:()=>Yr,_uuidv6:()=>en,_uuidv7:()=>tn,_void:()=>dl,_xid:()=>ln,clone:()=>re,config:()=>Q,decode:()=>sh,decodeAsync:()=>ch,encode:()=>ah,encodeAsync:()=>lh,flattenError:()=>fo,formatError:()=>po,globalConfig:()=>ro,globalRegistry:()=>$e,isValidBase64:()=>Ka,isValidBase64URL:()=>Qu,isValidJWT:()=>Xu,locales:()=>xo,parse:()=>Ar,parseAsync:()=>Sr,prettifyError:()=>Ci,regexes:()=>we,registry:()=>Hr,safeDecode:()=>dh,safeDecodeAsync:()=>ph,safeEncode:()=>uh,safeEncodeAsync:()=>fh,safeParse:()=>Di,safeParseAsync:()=>Wi,toDotPath:()=>Wu,toJSONSchema:()=>Sl,treeifyError:()=>Oi,util:()=>R,version:()=>Pa});var xi=Object.freeze({status:"aborted"});function p(e,t,r){function n(s,l){var c;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:false}),(c=s._zod).traits??(c.traits=new Set),s._zod.traits.add(e),t(s,l);for(let u in a.prototype)u in s||Object.defineProperty(s,u,{value:a.prototype[u].bind(s)});s._zod.constr=a,s._zod.def=l;}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(s){var l;let c=r?.Parent?new i:this;n(c,s),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?true:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Rr=Symbol("zod_brand"),Re=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Ge=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},ro={};function Q(e){return e&&Object.assign(ro,e),ro}var R={};Ue(R,{BIGINT_FORMAT_RANGES:()=>$i,Class:()=>Ii,NUMBER_FORMAT_RANGES:()=>_i,aborted:()=>Je,allowsEval:()=>Ai,assert:()=>jm,assertEqual:()=>Wm,assertIs:()=>Em,assertNever:()=>zm,assertNotEqual:()=>Nm,assignProp:()=>Le,base64ToUint8Array:()=>Ou,base64urlToUint8Array:()=>th,cached:()=>Rt,captureStackTrace:()=>br,cleanEnum:()=>eh,cleanRegex:()=>ao,clone:()=>re,cloneDef:()=>Um,createTransparentProxy:()=>Bm,defineLazy:()=>G,esc:()=>Ir,escapeRegex:()=>_e,extend:()=>Km,finalizeIssue:()=>he,floatSafeRemainder:()=>bi,getElementAtPath:()=>qm,getEnumValues:()=>io,getLengthableOrigin:()=>co,getParsedType:()=>Zm,getSizableOrigin:()=>lo,hexToUint8Array:()=>rh,isObject:()=>et,isPlainObject:()=>Be,issue:()=>It,joinValues:()=>y,jsonStringifyReplacer:()=>xt,merge:()=>Qm,mergeDefs:()=>Ze,normalizeParams:()=>x,nullish:()=>Fe,numKeys:()=>Lm,objectClone:()=>Tm,omit:()=>Mm,optionalKeys:()=>Pi,partial:()=>Xm,pick:()=>Jm,prefixIssues:()=>me,primitiveTypes:()=>Vi,promiseAllObject:()=>Gm,propertyKeyTypes:()=>so,randomString:()=>Fm,required:()=>Ym,safeExtend:()=>Hm,shallowClone:()=>Si,stringifyPrimitive:()=>k,uint8ArrayToBase64:()=>Cu,uint8ArrayToBase64url:()=>oh,uint8ArrayToHex:()=>nh,unwrapMessage:()=>no});function Wm(e){return e}function Nm(e){return e}function Em(e){}function zm(e){throw new Error}function jm(e){}function io(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function y(e,t="|"){return e.map(r=>k(r)).join(t)}function xt(e,t){return typeof t=="bigint"?t.toString():t}function Rt(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Fe(e){return e==null}function ao(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function bi(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){let l=n.match(/\d?e-(\d?)/);l?.[1]&&(o=Number.parseInt(l[1]));}let i=r>o?r:o,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var $u=Symbol("evaluating");function G(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==$u)return n===void 0&&(n=$u,n=r()),n},set(o){Object.defineProperty(e,t,{value:o});},configurable:true});}function Tm(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Le(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function Ze(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n);}return Object.defineProperties({},t)}function Um(e){return Ze(e._zod.def)}function qm(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Gm(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function Fm(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Ir(e){return JSON.stringify(e)}var br="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ai=Rt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Be(e){if(et(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(et(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function Si(e){return Be(e)?{...e}:Array.isArray(e)?[...e]:e}function Lm(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Zm=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},so=new Set(["string","number","symbol"]),Vi=new Set(["string","number","bigint","boolean","symbol","undefined"]);function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function re(e,t,r){let n=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(n._zod.parent=e),n}function x(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Bm(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function k(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Pi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var _i={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},$i={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Jm(e,t){let r=e._zod.def,n=Ze(e._zod.def,{get shape(){let o={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=r.shape[i]);}return Le(this,"shape",o),o},checks:[]});return re(e,n)}function Mm(e,t){let r=e._zod.def,n=Ze(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete o[i];}return Le(this,"shape",o),o},checks:[]});return re(e,n)}function Km(e,t){if(!Be(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let o=Ze(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Le(this,"shape",i),i},checks:[]});return re(e,o)}function Hm(e,t){if(!Be(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return Le(this,"shape",n),n},checks:e._zod.def.checks};return re(e,r)}function Qm(e,t){let r=Ze(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Le(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return re(e,r)}function Xm(e,t,r){let n=Ze(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(r)for(let a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=e?new e({type:"optional",innerType:o[a]}):o[a]);}else for(let a in o)i[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return Le(this,"shape",i),i},checks:[]});return re(t,n)}function Ym(e,t,r){let n=Ze(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}));}else for(let a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return Le(this,"shape",i),i},checks:[]});return re(t,n)}function Je(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function me(e,t){return t.map(r=>{var n;return (n=r).path??(n.path=[]),r.path.unshift(e),r})}function no(e){return typeof e=="string"?e:e?.message}function he(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=no(e.inst?._zod.def?.error?.(e))??no(t?.error?.(e))??no(r.customError?.(e))??no(r.localeError?.(e))??"Invalid input";n.message=o;}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function lo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function co(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function It(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function eh(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Ou(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function Cu(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function th(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Ou(t+r)}function oh(e){return Cu(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function rh(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function nh(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Ii=class{constructor(...t){}};var Du=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,xt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},uo=p("$ZodError",Du),ue=p("$ZodError",Du,{Parent:Error});function fo(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return {formErrors:n,fieldErrors:r}}function po(e,t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s}));else if(a.code==="invalid_key")o({issues:a.issues});else if(a.code==="invalid_element")o({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else {let s=n,l=0;for(;l<a.path.length;){let c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++;}}};return o(e),n}function Oi(e,t){let r=t||function(i){return i.message},n={errors:[]},o=(i,a=[])=>{var s,l;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...a,...c.path];if(u.length===0){n.errors.push(r(c));continue}let d=n,g=0;for(;g<u.length;){let m=u[g],f=g===u.length-1;typeof m=="string"?(d.properties??(d.properties={}),(s=d.properties)[m]??(s[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(l=d.items)[m]??(l[m]={errors:[]}),d=d.items[m]),f&&d.errors.push(r(c)),g++;}}};return o(e),n}function Wu(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function Ci(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${Wu(n.path)}`);return t.join(`
9
9
  `)}var bt=e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:false}):{async:false},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Re;if(a.issues.length){let s=new(o?.Err??e)(a.issues.map(l=>he(l,i,Q())));throw br(s,o?.callee),s}return a.value},Ar=bt(ue),At=e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:true}):{async:true},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(o?.Err??e)(a.issues.map(l=>he(l,i,Q())));throw br(s,o?.callee),s}return a.value},Sr=At(ue),St=e=>(t,r,n)=>{let o=n?{...n,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Re;return i.issues.length?{success:false,error:new(e??uo)(i.issues.map(a=>he(a,o,Q())))}:{success:true,data:i.value}},Di=St(ue),Vt=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:true}):{async:true},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(a=>he(a,o,Q())))}:{success:true,data:i.value}},Wi=Vt(ue),Vr=e=>(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bt(e)(t,r,o)},ah=Vr(ue),Pr=e=>(t,r,n)=>bt(e)(t,r,n),sh=Pr(ue),_r=e=>async(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return At(e)(t,r,o)},lh=_r(ue),$r=e=>async(t,r,n)=>At(e)(t,r,n),ch=$r(ue),Or=e=>(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return St(e)(t,r,o)},uh=Or(ue),Cr=e=>(t,r,n)=>St(e)(t,r,n),dh=Cr(ue),Dr=e=>async(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vt(e)(t,r,o)},fh=Dr(ue),Wr=e=>async(t,r,n)=>Vt(e)(t,r,n),ph=Wr(ue);var we={};Ue(we,{base64:()=>Ki,base64url:()=>Nr,bigint:()=>oa,boolean:()=>ia,browserEmail:()=>xh,cidrv4:()=>Ji,cidrv6:()=>Mi,cuid:()=>Ni,cuid2:()=>Ei,date:()=>Xi,datetime:()=>ea,domain:()=>Ih,duration:()=>qi,e164:()=>Qi,email:()=>Fi,emoji:()=>Li,extendedDuration:()=>mh,guid:()=>Gi,hex:()=>bh,hostname:()=>Hi,html5Email:()=>wh,idnEmail:()=>kh,integer:()=>ra,ipv4:()=>Zi,ipv6:()=>Bi,ksuid:()=>Ti,lowercase:()=>la,md5_base64:()=>Sh,md5_base64url:()=>Vh,md5_hex:()=>Ah,nanoid:()=>Ui,null:()=>aa,number:()=>na,rfc5322Email:()=>yh,sha1_base64:()=>_h,sha1_base64url:()=>$h,sha1_hex:()=>Ph,sha256_base64:()=>Ch,sha256_base64url:()=>Dh,sha256_hex:()=>Oh,sha384_base64:()=>Nh,sha384_base64url:()=>Eh,sha384_hex:()=>Wh,sha512_base64:()=>jh,sha512_base64url:()=>Th,sha512_hex:()=>zh,string:()=>ta,time:()=>Yi,ulid:()=>zi,undefined:()=>sa,unicodeEmail:()=>Nu,uppercase:()=>ca,uuid:()=>tt,uuid4:()=>hh,uuid6:()=>gh,uuid7:()=>vh,xid:()=>ji});var Ni=/^[cC][^\s-]{8,}$/,Ei=/^[0-9a-z]+$/,zi=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ji=/^[0-9a-vA-V]{20}$/,Ti=/^[A-Za-z0-9]{27}$/,Ui=/^[a-zA-Z0-9_-]{21}$/,qi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mh=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Gi=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,hh=tt(4),gh=tt(6),vh=tt(7),Fi=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wh=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,yh=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Nu=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,kh=Nu,xh=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Rh="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Li(){return new RegExp(Rh,"u")}var Zi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Bi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ji=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Mi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ki=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nr=/^[A-Za-z0-9_-]*$/,Hi=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Ih=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Qi=/^\+(?:[0-9]){6,14}[0-9]$/,Eu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Xi=new RegExp(`^${Eu}$`);function zu(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yi(e){return new RegExp(`^${zu(e)}$`)}function ea(e){let t=zu({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Eu}T(?:${n})$`)}var ta=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},oa=/^-?\d+n?$/,ra=/^-?\d+$/,na=/^-?\d+(?:\.\d+)?/,ia=/^(?:true|false)$/i,aa=/^null$/i;var sa=/^undefined$/i;var la=/^[^A-Z]*$/,ca=/^[^a-z]*$/,bh=/^[0-9a-fA-F]*$/;function mo(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ho(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Ah=/^[0-9a-fA-F]{32}$/,Sh=mo(22,"=="),Vh=ho(22),Ph=/^[0-9a-fA-F]{40}$/,_h=mo(27,"="),$h=ho(27),Oh=/^[0-9a-fA-F]{64}$/,Ch=mo(43,"="),Dh=ho(43),Wh=/^[0-9a-fA-F]{96}$/,Nh=mo(64,""),Eh=ho(64),zh=/^[0-9a-fA-F]{128}$/,jh=mo(86,"=="),Th=ho(86);var B=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),Tu={number:"number",bigint:"bigint",object:"date"},Er=p("$ZodCheckLessThan",(e,t)=>{B.init(e,t);let r=Tu[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value);}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),zr=p("$ZodCheckGreaterThan",(e,t)=>{B.init(e,t);let r=Tu[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value);}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),ua=p("$ZodCheckMultipleOf",(e,t)=>{B.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):bi(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),da=p("$ZodCheckNumberFormat",(e,t)=>{B.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=_i[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=o,s.maximum=i,r&&(s.pattern=ra);}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:false,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:true,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:e});};}),fa=p("$ZodCheckBigIntFormat",(e,t)=>{B.init(e,t);let[r,n]=$i[t.format];e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,i.minimum=r,i.maximum=n;}),e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inst:e});};}),pa=p("$ZodCheckMaxSize",(e,t)=>{var r;B.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return !Fe(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum);}),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:lo(o),code:"too_big",maximum:t.maximum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),ma=p("$ZodCheckMinSize",(e,t)=>{var r;B.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return !Fe(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum);}),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:lo(o),code:"too_small",minimum:t.minimum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),ha=p("$ZodCheckSizeEquals",(e,t)=>{var r;B.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return !Fe(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size;}),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:lo(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:n.value,inst:e,continue:!t.abort});};}),ga=p("$ZodCheckMaxLength",(e,t)=>{var r;B.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return !Fe(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum);}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let a=co(o);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),va=p("$ZodCheckMinLength",(e,t)=>{var r;B.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return !Fe(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum);}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let a=co(o);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),wa=p("$ZodCheckLengthEquals",(e,t)=>{var r;B.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return !Fe(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length;}),e._zod.check=n=>{let o=n.value,i=o.length;if(i===t.length)return;let a=co(o),s=i>t.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:n.value,inst:e,continue:!t.abort});};}),Pt=p("$ZodCheckStringFormat",(e,t)=>{var r,n;B.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(n=e._zod).check??(n.check=()=>{});}),ya=p("$ZodCheckRegex",(e,t)=>{Pt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),ka=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=la),Pt.init(e,t);}),xa=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ca),Pt.init(e,t);}),Ra=p("$ZodCheckIncludes",(e,t)=>{B.init(e,t);let r=_e(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n);}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort});};}),Ia=p("$ZodCheckStartsWith",(e,t)=>{B.init(e,t);let r=new RegExp(`^${_e(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r);}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort});};}),ba=p("$ZodCheckEndsWith",(e,t)=>{B.init(e,t);let r=new RegExp(`.*${_e(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r);}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort});};});function ju(e,t,r){e.issues.length&&t.issues.push(...me(r,e.issues));}var Aa=p("$ZodCheckProperty",(e,t)=>{B.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>ju(o,r,t.property));ju(n,r,t.property);};}),Sa=p("$ZodCheckMimeType",(e,t)=>{B.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime;}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort});};}),Va=p("$ZodCheckOverwrite",(e,t)=>{B.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var go=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
10
10
  `).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),i=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a);}compile(){let t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
11
11
  `))}};var Pa={major:4,minor:1,patch:11};var T=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pa;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let o=(a,s,l)=>{let c=Je(a),u;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(c)continue;let g=a.issues.length,m=d._zod.check(a);if(m instanceof Promise&&l?.async===false)throw new Re;if(u||m instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await m,a.issues.length!==g&&(c||(c=Je(a,g)));});else {if(a.issues.length===g)continue;c||(c=Je(a,g));}}return u?u.then(()=>a):a},i=(a,s,l)=>{if(Je(a))return a.aborted=true,a;let c=o(s,n,l);if(c instanceof Promise){if(l.async===false)throw new Re;return c.then(u=>e._zod.parse(u,l))}return e._zod.parse(c,l)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:true});return c instanceof Promise?c.then(u=>i(u,a,s)):i(c,a,s)}let l=e._zod.parse(a,s);if(l instanceof Promise){if(s.async===false)throw new Re;return l.then(c=>o(c,n,s))}return o(l,n,s)};}e["~standard"]={validate:o=>{try{let i=Di(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Wi(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1};}),ot=p("$ZodString",(e,t)=>{T.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ta(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),L=p("$ZodStringFormat",(e,t)=>{Pt.init(e,t),ot.init(e,t);}),$a=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Gi),L.init(e,t);}),Oa=p("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tt(n));}else t.pattern??(t.pattern=tt());L.init(e,t);}),Ca=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Fi),L.init(e,t);}),Da=p("$ZodURL",(e,t)=>{L.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Hi.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),Wa=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Li()),L.init(e,t);}),Na=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ui),L.init(e,t);}),Ea=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ni),L.init(e,t);}),za=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ei),L.init(e,t);}),ja=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=zi),L.init(e,t);}),Ta=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ji),L.init(e,t);}),Ua=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ti),L.init(e,t);}),qa=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ea(t)),L.init(e,t);}),Ga=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Xi),L.init(e,t);}),Fa=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Yi(t)),L.init(e,t);}),La=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=qi),L.init(e,t);}),Za=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Zi),L.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4";});}),Ba=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bi),L.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6";}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),Ja=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ji),L.init(e,t);}),Ma=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Mi),L.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[o,i]=n;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function Ka(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Ha=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ki),L.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Ka(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function Qu(e){if(!Nr.test(e))return false;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ka(r)}var Qa=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Nr),L.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{Qu(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Xa=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Qi),L.init(e,t);});function Xu(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[n]=r;if(!n)return !1;let o=JSON.parse(atob(n));return !("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return false}}var Ya=p("$ZodJWT",(e,t)=>{L.init(e,t),e._zod.check=r=>{Xu(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),es=p("$ZodCustomStringFormat",(e,t)=>{L.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),Fr=p("$ZodNumber",(e,t)=>{T.init(e,t),e._zod.pattern=e._zod.bag.pattern??na,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r};}),ts=p("$ZodNumber",(e,t)=>{da.init(e,t),Fr.init(e,t);}),vo=p("$ZodBoolean",(e,t)=>{T.init(e,t),e._zod.pattern=ia,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r};}),Lr=p("$ZodBigInt",(e,t)=>{T.init(e,t),e._zod.pattern=oa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),os=p("$ZodBigInt",(e,t)=>{fa.init(e,t),Lr.init(e,t);}),rs=p("$ZodSymbol",(e,t)=>{T.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r};}),ns=p("$ZodUndefined",(e,t)=>{T.init(e,t),e._zod.pattern=sa,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r};}),is=p("$ZodNull",(e,t)=>{T.init(e,t),e._zod.pattern=aa,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r};}),as=p("$ZodAny",(e,t)=>{T.init(e,t),e._zod.parse=r=>r;}),ss=p("$ZodUnknown",(e,t)=>{T.init(e,t),e._zod.parse=r=>r;}),ls=p("$ZodNever",(e,t)=>{T.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),cs=p("$ZodVoid",(e,t)=>{T.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r};}),us=p("$ZodDate",(e,t)=>{T.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r};});function qu(e,t,r){e.issues.length&&t.issues.push(...me(r,e.issues)),t.value[r]=e.value;}var ds=p("$ZodArray",(e,t)=>{T.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let a=0;a<o.length;a++){let s=o[a],l=t.element._zod.run({value:s,issues:[]},n);l instanceof Promise?i.push(l.then(c=>qu(c,r,a))):qu(l,r,a);}return i.length?Promise.all(i).then(()=>r):r};});function Gr(e,t,r,n){e.issues.length&&t.issues.push(...me(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value;}function Yu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Pi(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function ed(e,t,r,n,o,i){let a=[],s=o.keySet,l=o.catchall._zod,c=l.def.type;for(let u of Object.keys(t)){if(s.has(u))continue;if(c==="never"){a.push(u);continue}let d=l.run({value:t[u],issues:[]},n);d instanceof Promise?e.push(d.then(g=>Gr(g,r,u,t))):Gr(d,r,u,t);}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var td=p("$ZodObject",(e,t)=>{if(T.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let l={...s};return Object.defineProperty(t,"shape",{value:l}),l}});}let n=Rt(()=>Yu(t));G(e._zod,"propValues",()=>{let s=t.shape,l={};for(let c in s){let u=s[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d);}}return l});let o=et,i=t.catchall,a;e._zod.parse=(s,l)=>{a??(a=n.value);let c=s.value;if(!o(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};let u=[],d=a.shape;for(let g of a.keys){let f=d[g]._zod.run({value:c[g],issues:[]},l);f instanceof Promise?u.push(f.then(w=>Gr(w,s,g,c))):Gr(f,s,g,c);}return i?ed(u,c,s,l,n.value,e):u.length?Promise.all(u).then(()=>s):s};}),fs=p("$ZodObjectJIT",(e,t)=>{td.init(e,t);let r=e._zod.parse,n=Rt(()=>Yu(t)),o=g=>{let m=new go(["shape","payload","ctx"]),f=n.value,w=N=>{let W=Ir(N);return `shape[${W}]._zod.run({ value: input[${W}], issues: [] }, ctx)`};m.write("const input = payload.value;");let v=Object.create(null),I=0;for(let N of f.keys)v[N]=`key_${I++}`;m.write("const newResult = {};");for(let N of f.keys){let W=v[N],J=Ir(N);m.write(`const ${W} = ${w(N)};`),m.write(`