@coalescesoftware/coa 7.30.7 → 7.30.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/test-heartbeat-worker.js
CHANGED
|
@@ -1185,7 +1185,7 @@ Attempted to suspend at:`);this.suspended=new Spa.QuickJSAsyncifySuspended(`(${t
|
|
|
1185
1185
|
`):" "+Den(o[0]):"as no adapter specified";throw new ur("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:A2r};function g2r(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new um(null,t)}function Roe(t){return g2r(t),t.headers=cl.from(t.headers),t.data=sK.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Boe.getAdapter(t.adapter||M7.adapter,t)(t).then(function(i){return g2r(t),i.data=sK.call(t,t.transformResponse,i),i.headers=cl.from(i.headers),i},function(i){return uK(i)||(g2r(t),i&&i.response&&(i.response.data=sK.call(t,t.transformResponse,i.response),i.response.headers=cl.from(i.response.headers))),Promise.reject(i)})}var woe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{woe[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});var Pen={};woe.transitional=function(e,r,i){function n(a,o){return"[Axios v"+F9+"] Transitional option '"+a+"'"+o+(i?". "+i:"")}return(a,o,s)=>{if(e===!1)throw new ur(n(o," has been removed"+(r?" in "+r:"")),ur.ERR_DEPRECATED);return r&&!Pen[o]&&(Pen[o]=!0,console.warn(n(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};woe.spelling=function(e){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function I0a(t,e,r){if(typeof t!="object")throw new ur("options must be an object",ur.ERR_BAD_OPTION_VALUE);let i=Object.keys(t),n=i.length;for(;n-- >0;){let a=i[n],o=e[a];if(o){let s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new ur("option "+a+" must be "+u,ur.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ur("Unknown option "+a,ur.ERR_BAD_OPTION)}}var fK={assertOptions:I0a,validators:woe};var VI=fK.validators,G7=class{constructor(e){this.defaults=e||{},this.interceptors={request:new PCr,response:new PCr}}async request(e,r){try{return await this._request(e,r)}catch(i){if(i instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let a=n.stack?n.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
1186
1186
|
`+a):i.stack=a}catch{}}throw i}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=_2(this.defaults,r);let{transitional:i,paramsSerializer:n,headers:a}=r;i!==void 0&&fK.assertOptions(i,{silentJSONParsing:VI.transitional(VI.boolean),forcedJSONParsing:VI.transitional(VI.boolean),clarifyTimeoutError:VI.transitional(VI.boolean)},!1),n!=null&&(De.isFunction(n)?r.paramsSerializer={serialize:n}:fK.assertOptions(n,{encode:VI.function,serialize:VI.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),fK.assertOptions(r,{baseUrl:VI.spelling("baseURL"),withXsrfToken:VI.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&De.merge(a.common,a[r.method]);a&&De.forEach(["delete","get","head","post","put","patch","common"],E=>{delete a[E]}),r.headers=cl.concat(o,a);let s=[],u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});let l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,y=0,m;if(!u){let E=[Roe.bind(this),void 0];for(E.unshift(...s),E.push(...l),m=E.length,c=Promise.resolve(r);y<m;)c=c.then(E[y++],E[y++]);return c}m=s.length;let C=r;for(y=0;y<m;){let E=s[y++],v=s[y++];try{C=E(C)}catch(T){v.call(this,T);break}}try{c=Roe.call(this,C)}catch(E){return Promise.reject(E)}for(y=0,m=l.length;y<m;)c=c.then(l[y++],l[y++]);return c}getUri(e){e=_2(this.defaults,e);let r=x9(e.baseURL,e.url,e.allowAbsoluteUrls);return M9(r,e.params,e.paramsSerializer)}};De.forEach(["delete","get","head","options"],function(e){G7.prototype[e]=function(r,i){return this.request(_2(i||{},{method:e,url:r,data:(i||{}).data}))}});De.forEach(["post","put","patch"],function(e){function r(i){return function(a,o,s){return this.request(_2(s||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}G7.prototype[e]=r(),G7.prototype[e+"Form"]=r(!0)});var mK=G7;var h2r=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});let i=this;this.promise.then(n=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](n);i._listeners=null}),this.promise.then=n=>{let a,o=new Promise(s=>{i.subscribe(s),a=s}).then(n);return o.cancel=function(){i.unsubscribe(a)},o},e(function(a,o,s){i.reason||(i.reason=new um(a,o,s),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=i=>{e.abort(i)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(n){e=n}),cancel:e}}},Qen=h2r;function y2r(t){return function(r){return t.apply(null,r)}}function f2r(t){return De.isObject(t)&&t.isAxiosError===!0}var m2r={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(m2r).forEach(([t,e])=>{m2r[e]=t});var Oen=m2r;function Nen(t){let e=new mK(t),r=ZV(mK.prototype.request,e);return De.extend(r,mK.prototype,e,{allOwnKeys:!0}),De.extend(r,e,null,{allOwnKeys:!0}),r.create=function(n){return Nen(_2(t,n))},r}var Bc=Nen(M7);Bc.Axios=mK;Bc.CanceledError=um;Bc.CancelToken=Qen;Bc.isCancel=uK;Bc.VERSION=F9;Bc.toFormData=W5;Bc.AxiosError=ur;Bc.Cancel=Bc.CanceledError;Bc.all=function(e){return Promise.all(e)};Bc.spread=y2r;Bc.isAxiosError=f2r;Bc.mergeConfig=_2;Bc.AxiosHeaders=cl;Bc.formToJSON=t=>yoe(De.isHTMLForm(t)?new FormData(t):t);Bc.getAdapter=Boe.getAdapter;Bc.HttpStatusCode=Oen;Bc.default=Bc;var $l=Bc;var{Axios:jgl,AxiosError:E0a,CanceledError:Lgl,isCancel:Ugl,CancelToken:zgl,VERSION:Ggl,all:Hgl,Cancel:Vgl,isAxiosError:Xc,spread:Kgl,toFormData:Wgl,AxiosHeaders:Jgl,HttpStatusCode:Men,formToJSON:Ygl,getAdapter:Zgl,mergeConfig:$gl}=$l;var nhl=S.object({error:S.object({errorString:S.string(),errorDetail:S.string()}).passthrough()}).passthrough(),hr=class extends Error{constructor(r,i,n=500,a){super(r,a);this._statusCode=n;this.detailMessage=i}detailMessage;statusCode(){return this._statusCode}get detail(){return this.detailMessage}toTRunError(){return{error:{errorString:this.message,errorDetail:this.detailMessage||""}}}toString(){return`${this.constructor?.name??"Unknown Error"}: ${JSON.stringify(this.toTRunError())}`}toFormattedString(){return this.detailMessage?`${this.message}: ${this.detailMessage}`:this.message}toFormattedStringWithCode(){return`${this.statusCode()}${": "+this.toFormattedString()}`}toFormattedStringWithCodeAndStack(){let r="";return this.cause&&(r=`
|
|
1187
1187
|
[cause]: `+(this.cause instanceof Error?this.cause.stack:this.cause?.toString())),this.toFormattedStringWithCode()+`
|
|
1188
|
-
`+this.stack+r}handleExpressResponse(r){r.status(this.statusCode()).json(this.toTRunError())}};function Toe(t){return typeof t=="object"&&t instanceof hr}function _oe(t){return typeof t=="object"&&t instanceof Error&&typeof t.code=="string"}var jB=class extends hr{},vd=class extends hr{statusCode(){return 404}},_0=class extends hr{statusCode(){return 400}},LB=class extends hr{statusCode(){return 403}},BA=class extends hr{statusCode(){return 409}},Bd=class extends hr{constructor(e="Not implemented",r,i){super(e,r,501,i)}};var U9=class extends jB{diagnostics;constructor(e,r){super("Unable to determine Deploy Service URL. In CLI contexts, SCHEDULER_ADDRESS must be set. In backend service contexts, use GetDeployServiceURLOnBackend instead.",r),this.diagnostics=e}};function D2(t,e,r,...i){if(!t){let n=`ASSERTION FAILED: ${e}`,a=new hr(n);throw r.emerg(n,{stack:a.stack,args:i}),a}}var xen,b2r=t=>{xen=t},Da=()=>xen;var ken=S.object({NODE_ENV:S.string().default("development"),LOG_LEVEL:S.string().default("info").optional(),CONSOLE_JSON_LOGS:S.string().default("true").optional(),REACT_APP_COALESCE_VERSION:S.string().default("").optional(),REACT_APP_COALESCE_GIT_HASH:S.string().default("").optional(),HOSTNAME:S.string().default("").optional(),RUNTIME_ENVIRONMENT:S.string().default("").optional()});var Li=function(t){return t.info="info",t.warn="warn",t.error="error",t.debug="debug",t.trace="trace",t.fatal="fatal",t}({}),z9={[Li.trace]:10,[Li.debug]:20,[Li.info]:30,[Li.warn]:40,[Li.error]:50,[Li.fatal]:60},phl={10:Li.trace,20:Li.debug,30:Li.info,40:Li.warn,50:Li.error,60:Li.fatal};var oy=function(t){return t.onBeforeDataOut="onBeforeDataOut",t.shouldSendToLogger="shouldSendToLogger",t.onMetadataCalled="onMetadataCalled",t.onBeforeMessageOut="onBeforeMessageOut",t.onContextCalled="onContextCalled",t}({});var qen=class Fen{context={};hasContext=!1;setContext(e){if(!e){this.context={},this.hasContext=!1;return}this.context=e,this.hasContext=!0}appendContext(e){this.context={...this.context,...e},this.hasContext=!0}getContext(){return this.context}hasContextData(){return this.hasContext}onChildLoggerCreated({parentContextManager:e,childContextManager:r}){if(e.hasContextData()){let i=e.getContext();r.setContext({...i})}}clone(){let e=new Fen;return e.setContext({...this.context}),e.hasContext=this.hasContext,e}};var Doe=class{id;enabled;level;consoleDebug;constructor(t){this.id=Date.now().toString()+Math.random().toString(),this.enabled=t.enabled??!0,this.consoleDebug=t.consoleDebug??!1,this.level=t.level??"trace"}_sendToLogger(t){if(!this.enabled||z9[t.logLevel]<z9[this.level])return;let e=this.shipToLogger(t);if(this.consoleDebug)switch(t.logLevel){case Li.info:console.info(...e);break;case Li.warn:console.warn(...e);break;case Li.error:console.error(...e);break;case Li.trace:console.debug(...e);break;case Li.debug:console.debug(...e);break;case Li.fatal:console.debug(...e);break;default:console.log(...e)}}getLoggerInstance(){throw new Error("This transport does not have a logger instance")}};var jen=class{err;metadata;structuredLogger;hasMetadata;pluginManager;constructor(t){this.err=null,this.metadata={},this.structuredLogger=t,this.hasMetadata=!1,this.pluginManager=t.pluginManager}withMetadata(t){let{pluginManager:e,structuredLogger:{_config:{consoleDebug:r}}}=this;if(!t)return r&&console.debug("[LogLayer] withMetadata was called with no metadata; dropping."),this;let i=t;return e.hasPlugins(oy.onMetadataCalled)&&(i=e.runOnMetadataCalled(t,this.structuredLogger),!i)?(r&&console.debug("[LogLayer] Metadata was dropped due to plugin returning falsy value."),this):(this.metadata={...this.metadata,...i},this.hasMetadata=!0,this)}withError(t){return this.err=t,this}info(...t){this.structuredLogger.isLevelEnabled(Li.info)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.info,t))}warn(...t){this.structuredLogger.isLevelEnabled(Li.warn)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.warn,t))}error(...t){this.structuredLogger.isLevelEnabled(Li.error)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.error,t))}debug(...t){this.structuredLogger.isLevelEnabled(Li.debug)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.debug,t))}trace(...t){this.structuredLogger.isLevelEnabled(Li.trace)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.trace,t))}fatal(...t){this.structuredLogger.isLevelEnabled(Li.fatal)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.fatal,t))}disableLogging(){return this.structuredLogger.disableLogging(),this}enableLogging(){return this.structuredLogger.enableLogging(),this}formatLog(t,e){let{muteMetadata:r}=this.structuredLogger._config,i=r?!1:this.hasMetadata;this.structuredLogger._formatLog({logLevel:t,params:e,metadata:i?this.metadata:null,err:this.err})}},S0a=[oy.onBeforeDataOut,oy.onMetadataCalled,oy.shouldSendToLogger,oy.onBeforeMessageOut,oy.onContextCalled],Len=class{idToPlugin;onBeforeDataOut=[];shouldSendToLogger=[];onMetadataCalled=[];onBeforeMessageOut=[];onContextCalled=[];constructor(t){this.idToPlugin={},this.mapPlugins(t),this.indexPlugins()}mapPlugins(t){for(let e of t){if(e.id||(e.id=Date.now().toString()+Math.random().toString()),this.idToPlugin[e.id])throw new Error(`[LogLayer] Plugin with id ${e.id} already exists.`);e.registeredAt=Date.now(),this.idToPlugin[e.id]=e}}indexPlugins(){this.onBeforeDataOut=[],this.shouldSendToLogger=[],this.onMetadataCalled=[],this.onBeforeMessageOut=[],this.onContextCalled=[];let t=Object.values(this.idToPlugin).sort((e,r)=>e.registeredAt-r.registeredAt);for(let e of t){if(e.disabled)return;for(let r of S0a)e[r]&&e.id&&this[r].push(e.id)}}hasPlugins(t){return this[t].length>0}countPlugins(t){return t?this[t].length:Object.keys(this.idToPlugin).length}addPlugins(t){this.mapPlugins(t),this.indexPlugins()}enablePlugin(t){let e=this.idToPlugin[t];e&&(e.disabled=!1),this.indexPlugins()}disablePlugin(t){let e=this.idToPlugin[t];e&&(e.disabled=!0),this.indexPlugins()}removePlugin(t){delete this.idToPlugin[t],this.indexPlugins()}runOnBeforeDataOut(t,e){let r={...t};for(let i of this.onBeforeDataOut){let n=this.idToPlugin[i];if(n.onBeforeDataOut){let a=n.onBeforeDataOut({data:r.data,logLevel:r.logLevel,error:r.error,metadata:r.metadata,context:r.context},e);a&&(r.data||(r.data={}),Object.assign(r.data,a))}}return r.data}runShouldSendToLogger(t,e){return!this.shouldSendToLogger.some(r=>!this.idToPlugin[r].shouldSendToLogger?.(t,e))}runOnMetadataCalled(t,e){let r={...t};for(let i of this.onMetadataCalled){let n=this.idToPlugin[i].onMetadataCalled?.(r,e);if(n)r=n;else return null}return r}runOnBeforeMessageOut(t,e){let r=[...t.messages];for(let i of this.onBeforeMessageOut){let n=this.idToPlugin[i].onBeforeMessageOut?.({messages:r,logLevel:t.logLevel},e);n&&(r=n)}return r}runOnContextCalled(t,e){let r={...t};for(let i of this.onContextCalled){let n=this.idToPlugin[i].onContextCalled?.(r,e);if(n)r=n;else return null}return r}},Poe=class Uen{pluginManager;idToTransport;hasMultipleTransports;singleTransport;contextManager;logLevelEnabledStatus={info:!0,warn:!0,error:!0,debug:!0,trace:!0,fatal:!0};_config;constructor(e){this._config={...e,enabled:e.enabled??!0},this._config.enabled||this.disableLogging(),this.contextManager=new qen,this.pluginManager=new Len(e.plugins||[]),this._config.errorFieldName||(this._config.errorFieldName="err"),this._config.copyMsgOnOnlyError||(this._config.copyMsgOnOnlyError=!1),this._initializeTransports(this._config.transport)}withContextManager(e){return this.contextManager&&typeof this.contextManager[Symbol.dispose]=="function"&&this.contextManager[Symbol.dispose](),this.contextManager=e,this}getContextManager(){return this.contextManager}_initializeTransports(e){if(this.idToTransport)for(let r in this.idToTransport)this.idToTransport[r]&&typeof this.idToTransport[r][Symbol.dispose]=="function"&&this.idToTransport[r][Symbol.dispose]();this.hasMultipleTransports=Array.isArray(e)&&e.length>1,this.singleTransport=this.hasMultipleTransports?null:Array.isArray(e)?e[0]:e,Array.isArray(e)?this.idToTransport=e.reduce((r,i)=>(r[i.id]=i,r),{}):this.idToTransport={[e.id]:e}}withPrefix(e){let r=this.child();return r._config.prefix=e,r}withContext(e){let r=e;return e?this.pluginManager.hasPlugins(oy.onContextCalled)&&(r=this.pluginManager.runOnContextCalled(e,this),!r)?(this._config.consoleDebug&&console.debug("[LogLayer] Context was dropped due to plugin returning falsy value."),this):(this.contextManager.appendContext(r),this):(this._config.consoleDebug&&console.debug("[LogLayer] withContext was called with no context; dropping."),this)}clearContext(){return this.contextManager.setContext(void 0),this}getContext(){return this.contextManager.getContext()}addPlugins(e){this.pluginManager.addPlugins(e)}enablePlugin(e){this.pluginManager.enablePlugin(e)}disablePlugin(e){this.pluginManager.disablePlugin(e)}removePlugin(e){this.pluginManager.removePlugin(e)}withMetadata(e){return new jen(this).withMetadata(e)}withError(e){return new jen(this).withError(e)}child(){let e=new Uen({...this._config,transport:Array.isArray(this._config.transport)?[...this._config.transport]:this._config.transport}).withPluginManager(this.pluginManager).withContextManager(this.contextManager.clone());return this.contextManager.onChildLoggerCreated({parentContextManager:this.contextManager,childContextManager:e.contextManager,parentLogger:this,childLogger:e}),e}withFreshTransports(e){return this._config.transport=e,this._initializeTransports(e),this}withFreshPlugins(e){return this._config.plugins=e,this.pluginManager=new Len(e),this}withPluginManager(e){return this.pluginManager=e,this}errorOnly(e,r){let i=r?.logLevel||Li.error;if(!this.isLevelEnabled(i))return;let{copyMsgOnOnlyError:n}=this._config,a={logLevel:i,err:e};(n&&r?.copyMsg!==!1||r?.copyMsg===!0)&&e?.message&&(a.params=[e.message]),this._formatLog(a)}metadataOnly(e,r=Li.info){if(!this.isLevelEnabled(r))return;let{muteMetadata:i,consoleDebug:n}=this._config;if(i)return;if(!e){n&&console.debug("[LogLayer] metadataOnly was called with no metadata; dropping.");return}let a=e;if(this.pluginManager.hasPlugins(oy.onMetadataCalled)&&(a=this.pluginManager.runOnMetadataCalled(e,this),!a)){n&&console.debug("[LogLayer] Metadata was dropped due to plugin returning falsy value.");return}let o={logLevel:r,metadata:a};this._formatLog(o)}info(...e){this.isLevelEnabled(Li.info)&&(this._formatMessage(e),this._formatLog({logLevel:Li.info,params:e}))}warn(...e){this.isLevelEnabled(Li.warn)&&(this._formatMessage(e),this._formatLog({logLevel:Li.warn,params:e}))}error(...e){this.isLevelEnabled(Li.error)&&(this._formatMessage(e),this._formatLog({logLevel:Li.error,params:e}))}debug(...e){this.isLevelEnabled(Li.debug)&&(this._formatMessage(e),this._formatLog({logLevel:Li.debug,params:e}))}trace(...e){this.isLevelEnabled(Li.trace)&&(this._formatMessage(e),this._formatLog({logLevel:Li.trace,params:e}))}fatal(...e){this.isLevelEnabled(Li.fatal)&&(this._formatMessage(e),this._formatLog({logLevel:Li.fatal,params:e}))}raw(e){if(!this.isLevelEnabled(e.logLevel))return;let r={logLevel:e.logLevel,params:e.messages,metadata:e.metadata,err:e.error,context:e.context};this._formatMessage(e.messages),this._formatLog(r)}disableLogging(){for(let e of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[e]=!1;return this}enableLogging(){for(let e of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[e]=!0;return this}muteContext(){return this._config.muteContext=!0,this}unMuteContext(){return this._config.muteContext=!1,this}muteMetadata(){return this._config.muteMetadata=!0,this}unMuteMetadata(){return this._config.muteMetadata=!1,this}enableIndividualLevel(e){let r=e;return r in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[r]=!0),this}disableIndividualLevel(e){let r=e;return r in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[r]=!1),this}setLevel(e){let r=z9[e];for(let i of Object.values(Li)){let n=i,a=z9[i];this.logLevelEnabledStatus[n]=a>=r}return this}isLevelEnabled(e){let r=e;return this.logLevelEnabledStatus[r]}formatContext(e){let{contextFieldName:r,muteContext:i}=this._config;return e&&Object.keys(e).length>0&&!i?r?{[r]:{...e}}:{...e}:{}}formatMetadata(e=null){let{metadataFieldName:r,muteMetadata:i}=this._config;return e&&!i?r?{[r]:{...e}}:{...e}:{}}getLoggerInstance(e){let r=this.idToTransport[e];if(r)return r.getLoggerInstance()}_formatMessage(e=[]){let{prefix:r}=this._config;r&&typeof e[0]=="string"&&(e[0]=`${r} ${e[0]}`)}_formatLog({logLevel:e,params:r=[],metadata:i=null,err:n,context:a=null}){let{errorSerializer:o,errorFieldInMetadata:s,muteContext:u,contextFieldName:l,metadataFieldName:c,errorFieldName:y}=this._config,m=a!==null?a:this.contextManager.getContext(),C=!!i||(u?!1:a!==null?Object.keys(a).length>0:this.contextManager.hasContextData()),E={};if(C)if(l&&l===c){let v=this.formatContext(m)[l],T=this.formatMetadata(i)[c];E={[l]:{...v,...T}}}else E={...this.formatContext(m),...this.formatMetadata(i)};if(n){let v=o?o(n):n;s&&i&&c?E?.[c]?E[c][y]=v:E={...E,[c]:{[y]:v}}:s&&!i&&c?E={...E,[c]:{[y]:v}}:E={...E,[y]:v},C=!0}if(this.pluginManager.hasPlugins(oy.onBeforeDataOut)&&(E=this.pluginManager.runOnBeforeDataOut({data:C?E:void 0,logLevel:e,error:n,metadata:i,context:m},this),E&&!C&&(C=!0)),this.pluginManager.hasPlugins(oy.onBeforeMessageOut)&&(r=this.pluginManager.runOnBeforeMessageOut({messages:[...r],logLevel:e},this)),this.hasMultipleTransports){let v=this._config.transport.filter(T=>T.enabled).map(async T=>{if(!(this.pluginManager.hasPlugins(oy.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...r],data:C?E:void 0,logLevel:e,transportId:T.id,error:n,metadata:i,context:m},this)))return T._sendToLogger({logLevel:e,messages:[...r],data:C?E:void 0,hasData:C,error:n,metadata:i,context:m})});Promise.all(v).catch(T=>{this._config.consoleDebug&&console.error("[LogLayer] Error executing transports:",T)})}else{if(!this.singleTransport?.enabled||this.pluginManager.hasPlugins(oy.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...r],data:C?E:void 0,logLevel:e,transportId:this.singleTransport.id,error:n,metadata:i,context:m},this))return;this.singleTransport._sendToLogger({logLevel:e,messages:[...r],data:C?E:void 0,hasData:C,error:n,metadata:i,context:m})}}};var zen=class extends Doe{shipToLoggerFn;constructor(t){super(t),this.shipToLoggerFn=t.shipToLogger}shipToLogger(t){return this.shipToLoggerFn(t)}};var G9=class extends zen{};var H7=class t{constructor(e,r,i=void 0){this.defaultMetadata=e;this.transports=r;this._logger=i}get logger(){return this._logger||(this._logger=new Poe({transport:this.transports}).withContext(this.defaultMetadata)),this._logger}getContext(e){return{...this.defaultMetadata,...e,...cm().logContext}}logDirect(e,r,i){let n=this.getContext(i),a;e==="warning"||e==="alert"?a="warn":e==="emerg"?a="fatal":a=e;for(let o of this.transports)o instanceof G9&&!o.enabled||o.shipToLogger&&o.shipToLogger({logLevel:a,messages:[r],data:n,hasData:Object.keys(n).length>0})}debug(e,r){this.logDirect("debug",e,r)}info(e,r){this.logDirect("info",e,r)}warning(e,r){this.logDirect("warning",e,r)}error(e,r){this.logDirect("error",e,r)}emerg(e,r){this.logDirect("emerg",e,r)}alert(e,r){this.logDirect("alert",e,r)}log(e,r,i){this.logDirect(e,r,i)}child(e){return new t({...this.defaultMetadata,...e},this.transports,void 0)}silenceConsole(e){for(let r of this.transports)r instanceof G9&&(r.enabled=!e)}};var v0a=typeof global=="object"&&global&&global.Object===Object&&global,Qoe=v0a;var B0a=typeof self=="object"&&self&&self.Object===Object&&self,R0a=Qoe||B0a||Function("return this")(),Rc=R0a;var w0a=Rc.Symbol,vp=w0a;var Gen=Object.prototype,T0a=Gen.hasOwnProperty,_0a=Gen.toString,bK=vp?vp.toStringTag:void 0;function D0a(t){var e=T0a.call(t,bK),r=t[bK];try{t[bK]=void 0;var i=!0}catch{}var n=_0a.call(t);return i&&(e?t[bK]=r:delete t[bK]),n}var Hen=D0a;var P0a=Object.prototype,Q0a=P0a.toString;function O0a(t){return Q0a.call(t)}var Ven=O0a;var N0a="[object Null]",M0a="[object Undefined]",Ken=vp?vp.toStringTag:void 0;function x0a(t){return t==null?t===void 0?M0a:N0a:Ken&&Ken in Object(t)?Hen(t):Ven(t)}var Rg=x0a;function k0a(t){return t!=null&&typeof t=="object"}var Xl=k0a;var q0a="[object Symbol]";function F0a(t){return typeof t=="symbol"||Xl(t)&&Rg(t)==q0a}var KI=F0a;function j0a(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var V7=j0a;var L0a=Array.isArray,Bs=L0a;var U0a=1/0,Wen=vp?vp.prototype:void 0,Jen=Wen?Wen.toString:void 0;function Yen(t){if(typeof t=="string")return t;if(Bs(t))return V7(t,Yen)+"";if(KI(t))return Jen?Jen.call(t):"";var e=t+"";return e=="0"&&1/t==-U0a?"-0":e}var Zen=Yen;var z0a=/\s/;function G0a(t){for(var e=t.length;e--&&z0a.test(t.charAt(e)););return e}var $en=G0a;var H0a=/^\s+/;function V0a(t){return t&&t.slice(0,$en(t)+1).replace(H0a,"")}var Xen=V0a;function K0a(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Rs=K0a;var etn=NaN,W0a=/^[-+]0x[0-9a-f]+$/i,J0a=/^0b[01]+$/i,Y0a=/^0o[0-7]+$/i,Z0a=parseInt;function $0a(t){if(typeof t=="number")return t;if(KI(t))return etn;if(Rs(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Rs(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Xen(t);var r=J0a.test(t);return r||Y0a.test(t)?Z0a(t.slice(2),r?2:8):W0a.test(t)?etn:+t}var ttn=$0a;var rtn=1/0,X0a=17976931348623157e292;function eba(t){if(!t)return t===0?t:0;if(t=ttn(t),t===rtn||t===-rtn){var e=t<0?-1:1;return e*X0a}return t===t?t:0}var itn=eba;function tba(t){var e=itn(t),r=e%1;return e===e?r?e-r:e:0}var ntn=tba;function rba(t){return t}var WI=rba;var iba="[object AsyncFunction]",nba="[object Function]",aba="[object GeneratorFunction]",oba="[object Proxy]";function sba(t){if(!Rs(t))return!1;var e=Rg(t);return e==nba||e==aba||e==iba||e==oba}var K7=sba;var uba=Rc["__core-js_shared__"],Ooe=uba;var atn=function(){var t=/[^.]+$/.exec(Ooe&&Ooe.keys&&Ooe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function lba(t){return!!atn&&atn in t}var otn=lba;var cba=Function.prototype,pba=cba.toString;function dba(t){if(t!=null){try{return pba.call(t)}catch{}try{return t+""}catch{}}return""}var UB=dba;var Aba=/[\\^$.*+?()[\]{}|]/g,gba=/^\[object .+?Constructor\]$/,hba=Function.prototype,yba=Object.prototype,fba=hba.toString,mba=yba.hasOwnProperty,bba=RegExp("^"+fba.call(mba).replace(Aba,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cba(t){if(!Rs(t)||otn(t))return!1;var e=K7(t)?bba:gba;return e.test(UB(t))}var stn=Cba;function Iba(t,e){return t?.[e]}var utn=Iba;function Eba(t,e){var r=utn(t,e);return stn(r)?r:void 0}var sy=Eba;var Sba=sy(Rc,"WeakMap"),Noe=Sba;var ltn=Object.create,vba=function(){function t(){}return function(e){if(!Rs(e))return{};if(ltn)return ltn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),ctn=vba;function Bba(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var ptn=Bba;function Rba(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var Moe=Rba;var wba=800,Tba=16,_ba=Date.now;function Dba(t){var e=0,r=0;return function(){var i=_ba(),n=Tba-(i-r);if(r=i,n>0){if(++e>=wba)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var dtn=Dba;function Pba(t){return function(){return t}}var Atn=Pba;var Qba=function(){try{var t=sy(Object,"defineProperty");return t({},"",{}),t}catch{}}(),W7=Qba;var Oba=W7?function(t,e){return W7(t,"toString",{configurable:!0,enumerable:!1,value:Atn(e),writable:!0})}:WI,gtn=Oba;var Nba=dtn(gtn),xoe=Nba;function Mba(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}var htn=Mba;var xba=9007199254740991,kba=/^(?:0|[1-9]\d*)$/;function qba(t,e){var r=typeof t;return e=e??xba,!!e&&(r=="number"||r!="symbol"&&kba.test(t))&&t>-1&&t%1==0&&t<e}var Y5=qba;function Fba(t,e,r){e=="__proto__"&&W7?W7(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var J7=Fba;function jba(t,e){return t===e||t!==t&&e!==e}var JI=jba;var Lba=Object.prototype,Uba=Lba.hasOwnProperty;function zba(t,e,r){var i=t[e];(!(Uba.call(t,e)&&JI(i,r))||r===void 0&&!(e in t))&&J7(t,e,r)}var Y7=zba;function Gba(t,e,r,i){var n=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var s=e[a],u=i?i(r[s],t[s],s,r,t):void 0;u===void 0&&(u=t[s]),n?J7(r,s,u):Y7(r,s,u)}return r}var D0=Gba;var ytn=Math.max;function Hba(t,e,r){return e=ytn(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,a=ytn(i.length-e,0),o=Array(a);++n<a;)o[n]=i[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=i[n];return s[e]=r(o),ptn(t,this,s)}}var koe=Hba;function Vba(t,e){return xoe(koe(t,e,WI),t+"")}var ftn=Vba;var Kba=9007199254740991;function Wba(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Kba}var Z7=Wba;function Jba(t){return t!=null&&Z7(t.length)&&!K7(t)}var Z5=Jba;function Yba(t,e,r){if(!Rs(r))return!1;var i=typeof e;return(i=="number"?Z5(r)&&Y5(e,r.length):i=="string"&&e in r)?JI(r[e],t):!1}var qoe=Yba;function Zba(t){return ftn(function(e,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,o&&qoe(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),e=Object(e);++i<n;){var s=r[i];s&&t(e,s,i,a)}return e})}var mtn=Zba;var $ba=Object.prototype;function Xba(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||$ba;return t===r}var $7=Xba;function eCa(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var btn=eCa;var tCa="[object Arguments]";function rCa(t){return Xl(t)&&Rg(t)==tCa}var C2r=rCa;var Ctn=Object.prototype,iCa=Ctn.hasOwnProperty,nCa=Ctn.propertyIsEnumerable,aCa=C2r(function(){return arguments}())?C2r:function(t){return Xl(t)&&iCa.call(t,"callee")&&!nCa.call(t,"callee")},zB=aCa;function oCa(){return!1}var Itn=oCa;var vtn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Etn=vtn&&typeof module=="object"&&module&&!module.nodeType&&module,sCa=Etn&&Etn.exports===vtn,Stn=sCa?Rc.Buffer:void 0,uCa=Stn?Stn.isBuffer:void 0,lCa=uCa||Itn,GB=lCa;var cCa="[object Arguments]",pCa="[object Array]",dCa="[object Boolean]",ACa="[object Date]",gCa="[object Error]",hCa="[object Function]",yCa="[object Map]",fCa="[object Number]",mCa="[object Object]",bCa="[object RegExp]",CCa="[object Set]",ICa="[object String]",ECa="[object WeakMap]",SCa="[object ArrayBuffer]",vCa="[object DataView]",BCa="[object Float32Array]",RCa="[object Float64Array]",wCa="[object Int8Array]",TCa="[object Int16Array]",_Ca="[object Int32Array]",DCa="[object Uint8Array]",PCa="[object Uint8ClampedArray]",QCa="[object Uint16Array]",OCa="[object Uint32Array]",hu={};hu[BCa]=hu[RCa]=hu[wCa]=hu[TCa]=hu[_Ca]=hu[DCa]=hu[PCa]=hu[QCa]=hu[OCa]=!0;hu[cCa]=hu[pCa]=hu[SCa]=hu[dCa]=hu[vCa]=hu[ACa]=hu[gCa]=hu[hCa]=hu[yCa]=hu[fCa]=hu[mCa]=hu[bCa]=hu[CCa]=hu[ICa]=hu[ECa]=!1;function NCa(t){return Xl(t)&&Z7(t.length)&&!!hu[Rg(t)]}var Btn=NCa;function MCa(t){return function(e){return t(e)}}var $5=MCa;var Rtn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,CK=Rtn&&typeof module=="object"&&module&&!module.nodeType&&module,xCa=CK&&CK.exports===Rtn,I2r=xCa&&Qoe.process,kCa=function(){try{var t=CK&&CK.require&&CK.require("util").types;return t||I2r&&I2r.binding&&I2r.binding("util")}catch{}}(),P0=kCa;var wtn=P0&&P0.isTypedArray,qCa=wtn?$5(wtn):Btn,X7=qCa;var FCa=Object.prototype,jCa=FCa.hasOwnProperty;function LCa(t,e){var r=Bs(t),i=!r&&zB(t),n=!r&&!i&&GB(t),a=!r&&!i&&!n&&X7(t),o=r||i||n||a,s=o?btn(t.length,String):[],u=s.length;for(var l in t)(e||jCa.call(t,l))&&!(o&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Y5(l,u)))&&s.push(l);return s}var Foe=LCa;function UCa(t,e){return function(r){return t(e(r))}}var joe=UCa;var zCa=joe(Object.keys,Object),Ttn=zCa;var GCa=Object.prototype,HCa=GCa.hasOwnProperty;function VCa(t){if(!$7(t))return Ttn(t);var e=[];for(var r in Object(t))HCa.call(t,r)&&r!="constructor"&&e.push(r);return e}var _tn=VCa;function KCa(t){return Z5(t)?Foe(t):_tn(t)}var YI=KCa;function WCa(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Dtn=WCa;var JCa=Object.prototype,YCa=JCa.hasOwnProperty;function ZCa(t){if(!Rs(t))return Dtn(t);var e=$7(t),r=[];for(var i in t)i=="constructor"&&(e||!YCa.call(t,i))||r.push(i);return r}var Ptn=ZCa;function $Ca(t){return Z5(t)?Foe(t,!0):Ptn(t)}var ZI=$Ca;var XCa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e2a=/^\w*$/;function t2a(t,e){if(Bs(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||KI(t)?!0:e2a.test(t)||!XCa.test(t)||e!=null&&t in Object(e)}var ex=t2a;var r2a=sy(Object,"create"),HB=r2a;function i2a(){this.__data__=HB?HB(null):{},this.size=0}var Qtn=i2a;function n2a(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Otn=n2a;var a2a="__lodash_hash_undefined__",o2a=Object.prototype,s2a=o2a.hasOwnProperty;function u2a(t){var e=this.__data__;if(HB){var r=e[t];return r===a2a?void 0:r}return s2a.call(e,t)?e[t]:void 0}var Ntn=u2a;var l2a=Object.prototype,c2a=l2a.hasOwnProperty;function p2a(t){var e=this.__data__;return HB?e[t]!==void 0:c2a.call(e,t)}var Mtn=p2a;var d2a="__lodash_hash_undefined__";function A2a(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=HB&&e===void 0?d2a:e,this}var xtn=A2a;function tx(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}tx.prototype.clear=Qtn;tx.prototype.delete=Otn;tx.prototype.get=Ntn;tx.prototype.has=Mtn;tx.prototype.set=xtn;var E2r=tx;function g2a(){this.__data__=[],this.size=0}var ktn=g2a;function h2a(t,e){for(var r=t.length;r--;)if(JI(t[r][0],e))return r;return-1}var X5=h2a;var y2a=Array.prototype,f2a=y2a.splice;function m2a(t){var e=this.__data__,r=X5(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():f2a.call(e,r,1),--this.size,!0}var qtn=m2a;function b2a(t){var e=this.__data__,r=X5(e,t);return r<0?void 0:e[r][1]}var Ftn=b2a;function C2a(t){return X5(this.__data__,t)>-1}var jtn=C2a;function I2a(t,e){var r=this.__data__,i=X5(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var Ltn=I2a;function rx(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}rx.prototype.clear=ktn;rx.prototype.delete=qtn;rx.prototype.get=Ftn;rx.prototype.has=jtn;rx.prototype.set=Ltn;var eT=rx;var E2a=sy(Rc,"Map"),tT=E2a;function S2a(){this.size=0,this.__data__={hash:new E2r,map:new(tT||eT),string:new E2r}}var Utn=S2a;function v2a(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ztn=v2a;function B2a(t,e){var r=t.__data__;return ztn(e)?r[typeof e=="string"?"string":"hash"]:r.map}var rT=B2a;function R2a(t){var e=rT(this,t).delete(t);return this.size-=e?1:0,e}var Gtn=R2a;function w2a(t){return rT(this,t).get(t)}var Htn=w2a;function T2a(t){return rT(this,t).has(t)}var Vtn=T2a;function _2a(t,e){var r=rT(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var Ktn=_2a;function ix(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ix.prototype.clear=Utn;ix.prototype.delete=Gtn;ix.prototype.get=Htn;ix.prototype.has=Vtn;ix.prototype.set=Ktn;var H9=ix;var D2a="Expected a function";function S2r(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(D2a);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(S2r.Cache||H9),r}S2r.Cache=H9;var Wtn=S2r;var P2a=500;function Q2a(t){var e=Wtn(t,function(i){return r.size===P2a&&r.clear(),i}),r=e.cache;return e}var Jtn=Q2a;var O2a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N2a=/\\(\\)?/g,M2a=Jtn(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(O2a,function(r,i,n,a){e.push(n?a.replace(N2a,"$1"):i||r)}),e}),Ytn=M2a;function x2a(t){return t==null?"":Zen(t)}var Ztn=x2a;function k2a(t,e){return Bs(t)?t:ex(t,e)?[t]:Ytn(Ztn(t))}var Q0=k2a;var q2a=1/0;function F2a(t){if(typeof t=="string"||KI(t))return t;var e=t+"";return e=="0"&&1/t==-q2a?"-0":e}var O0=F2a;function j2a(t,e){e=Q0(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[O0(e[r++])];return r&&r==i?t:void 0}var iT=j2a;function L2a(t,e,r){var i=t==null?void 0:iT(t,e);return i===void 0?r:i}var $tn=L2a;function U2a(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var nx=U2a;var Xtn=vp?vp.isConcatSpreadable:void 0;function z2a(t){return Bs(t)||zB(t)||!!(Xtn&&t&&t[Xtn])}var ern=z2a;function trn(t,e,r,i,n){var a=-1,o=t.length;for(r||(r=ern),n||(n=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?trn(s,e-1,r,i,n):nx(n,s):i||(n[n.length]=s)}return n}var rrn=trn;function G2a(t){var e=t==null?0:t.length;return e?rrn(t,1):[]}var irn=G2a;function H2a(t){return xoe(koe(t,void 0,irn),t+"")}var Loe=H2a;var V2a=joe(Object.getPrototypeOf,Object),ax=V2a;var K2a="[object Object]",W2a=Function.prototype,J2a=Object.prototype,nrn=W2a.toString,Y2a=J2a.hasOwnProperty,Z2a=nrn.call(Object);function $2a(t){if(!Xl(t)||Rg(t)!=K2a)return!1;var e=ax(t);if(e===null)return!0;var r=Y2a.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&nrn.call(r)==Z2a}var Uoe=$2a;function X2a(t,e,r){var i=-1,n=t.length;e<0&&(e=-e>n?0:n+e),r=r>n?n:r,r<0&&(r+=n),n=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(n);++i<n;)a[i]=t[i+e];return a}var zoe=X2a;var e1a=Math.ceil,t1a=Math.max;function r1a(t,e,r){(r?qoe(t,e,r):e===void 0)?e=1:e=t1a(ntn(e),0);var i=t==null?0:t.length;if(!i||e<1)return[];for(var n=0,a=0,o=Array(e1a(i/e));n<i;)o[a++]=zoe(t,n,n+=e);return o}var P2=r1a;function i1a(){this.__data__=new eT,this.size=0}var arn=i1a;function n1a(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var orn=n1a;function a1a(t){return this.__data__.get(t)}var srn=a1a;function o1a(t){return this.__data__.has(t)}var urn=o1a;var s1a=200;function u1a(t,e){var r=this.__data__;if(r instanceof eT){var i=r.__data__;if(!tT||i.length<s1a-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new H9(i)}return r.set(t,e),this.size=r.size,this}var lrn=u1a;function ox(t){var e=this.__data__=new eT(t);this.size=e.size}ox.prototype.clear=arn;ox.prototype.delete=orn;ox.prototype.get=srn;ox.prototype.has=urn;ox.prototype.set=lrn;var $I=ox;function l1a(t,e){return t&&D0(e,YI(e),t)}var crn=l1a;function c1a(t,e){return t&&D0(e,ZI(e),t)}var prn=c1a;var hrn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,drn=hrn&&typeof module=="object"&&module&&!module.nodeType&&module,p1a=drn&&drn.exports===hrn,Arn=p1a?Rc.Buffer:void 0,grn=Arn?Arn.allocUnsafe:void 0;function d1a(t,e){if(e)return t.slice();var r=t.length,i=grn?grn(r):new t.constructor(r);return t.copy(i),i}var Goe=d1a;function A1a(t,e){for(var r=-1,i=t==null?0:t.length,n=0,a=[];++r<i;){var o=t[r];e(o,r,t)&&(a[n++]=o)}return a}var yrn=A1a;function g1a(){return[]}var Hoe=g1a;var h1a=Object.prototype,y1a=h1a.propertyIsEnumerable,frn=Object.getOwnPropertySymbols,f1a=frn?function(t){return t==null?[]:(t=Object(t),yrn(frn(t),function(e){return y1a.call(t,e)}))}:Hoe,sx=f1a;function m1a(t,e){return D0(t,sx(t),e)}var mrn=m1a;var b1a=Object.getOwnPropertySymbols,C1a=b1a?function(t){for(var e=[];t;)nx(e,sx(t)),t=ax(t);return e}:Hoe,Voe=C1a;function I1a(t,e){return D0(t,Voe(t),e)}var brn=I1a;function E1a(t,e,r){var i=e(t);return Bs(t)?i:nx(i,r(t))}var Koe=E1a;function S1a(t){return Koe(t,YI,sx)}var IK=S1a;function v1a(t){return Koe(t,ZI,Voe)}var ux=v1a;var B1a=sy(Rc,"DataView"),Woe=B1a;var R1a=sy(Rc,"Promise"),Joe=R1a;var w1a=sy(Rc,"Set"),Yoe=w1a;var Crn="[object Map]",T1a="[object Object]",Irn="[object Promise]",Ern="[object Set]",Srn="[object WeakMap]",vrn="[object DataView]",_1a=UB(Woe),D1a=UB(tT),P1a=UB(Joe),Q1a=UB(Yoe),O1a=UB(Noe),V9=Rg;(Woe&&V9(new Woe(new ArrayBuffer(1)))!=vrn||tT&&V9(new tT)!=Crn||Joe&&V9(Joe.resolve())!=Irn||Yoe&&V9(new Yoe)!=Ern||Noe&&V9(new Noe)!=Srn)&&(V9=function(t){var e=Rg(t),r=e==T1a?t.constructor:void 0,i=r?UB(r):"";if(i)switch(i){case _1a:return vrn;case D1a:return Crn;case P1a:return Irn;case Q1a:return Ern;case O1a:return Srn}return e});var VB=V9;var N1a=Object.prototype,M1a=N1a.hasOwnProperty;function x1a(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&M1a.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Brn=x1a;var k1a=Rc.Uint8Array,lx=k1a;function q1a(t){var e=new t.constructor(t.byteLength);return new lx(e).set(new lx(t)),e}var cx=q1a;function F1a(t,e){var r=e?cx(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Rrn=F1a;var j1a=/\w*$/;function L1a(t){var e=new t.constructor(t.source,j1a.exec(t));return e.lastIndex=t.lastIndex,e}var wrn=L1a;var Trn=vp?vp.prototype:void 0,_rn=Trn?Trn.valueOf:void 0;function U1a(t){return _rn?Object(_rn.call(t)):{}}var Drn=U1a;function z1a(t,e){var r=e?cx(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Zoe=z1a;var G1a="[object Boolean]",H1a="[object Date]",V1a="[object Map]",K1a="[object Number]",W1a="[object RegExp]",J1a="[object Set]",Y1a="[object String]",Z1a="[object Symbol]",$1a="[object ArrayBuffer]",X1a="[object DataView]",eIa="[object Float32Array]",tIa="[object Float64Array]",rIa="[object Int8Array]",iIa="[object Int16Array]",nIa="[object Int32Array]",aIa="[object Uint8Array]",oIa="[object Uint8ClampedArray]",sIa="[object Uint16Array]",uIa="[object Uint32Array]";function lIa(t,e,r){var i=t.constructor;switch(e){case $1a:return cx(t);case G1a:case H1a:return new i(+t);case X1a:return Rrn(t,r);case eIa:case tIa:case rIa:case iIa:case nIa:case aIa:case oIa:case sIa:case uIa:return Zoe(t,r);case V1a:return new i;case K1a:case Y1a:return new i(t);case W1a:return wrn(t);case J1a:return new i;case Z1a:return Drn(t)}}var Prn=lIa;function cIa(t){return typeof t.constructor=="function"&&!$7(t)?ctn(ax(t)):{}}var $oe=cIa;var pIa="[object Map]";function dIa(t){return Xl(t)&&VB(t)==pIa}var Qrn=dIa;var Orn=P0&&P0.isMap,AIa=Orn?$5(Orn):Qrn,Nrn=AIa;var gIa="[object Set]";function hIa(t){return Xl(t)&&VB(t)==gIa}var Mrn=hIa;var xrn=P0&&P0.isSet,yIa=xrn?$5(xrn):Mrn,krn=yIa;var fIa=1,mIa=2,bIa=4,qrn="[object Arguments]",CIa="[object Array]",IIa="[object Boolean]",EIa="[object Date]",SIa="[object Error]",Frn="[object Function]",vIa="[object GeneratorFunction]",BIa="[object Map]",RIa="[object Number]",jrn="[object Object]",wIa="[object RegExp]",TIa="[object Set]",_Ia="[object String]",DIa="[object Symbol]",PIa="[object WeakMap]",QIa="[object ArrayBuffer]",OIa="[object DataView]",NIa="[object Float32Array]",MIa="[object Float64Array]",xIa="[object Int8Array]",kIa="[object Int16Array]",qIa="[object Int32Array]",FIa="[object Uint8Array]",jIa="[object Uint8ClampedArray]",LIa="[object Uint16Array]",UIa="[object Uint32Array]",zs={};zs[qrn]=zs[CIa]=zs[QIa]=zs[OIa]=zs[IIa]=zs[EIa]=zs[NIa]=zs[MIa]=zs[xIa]=zs[kIa]=zs[qIa]=zs[BIa]=zs[RIa]=zs[jrn]=zs[wIa]=zs[TIa]=zs[_Ia]=zs[DIa]=zs[FIa]=zs[jIa]=zs[LIa]=zs[UIa]=!0;zs[SIa]=zs[Frn]=zs[PIa]=!1;function Xoe(t,e,r,i,n,a){var o,s=e&fIa,u=e&mIa,l=e&bIa;if(r&&(o=n?r(t,i,n,a):r(t)),o!==void 0)return o;if(!Rs(t))return t;var c=Bs(t);if(c){if(o=Brn(t),!s)return Moe(t,o)}else{var y=VB(t),m=y==Frn||y==vIa;if(GB(t))return Goe(t,s);if(y==jrn||y==qrn||m&&!n){if(o=u||m?{}:$oe(t),!s)return u?brn(t,prn(o,t)):mrn(t,crn(o,t))}else{if(!zs[y])return n?t:{};o=Prn(t,y,s)}}a||(a=new $I);var C=a.get(t);if(C)return C;a.set(t,o),krn(t)?t.forEach(function(T){o.add(Xoe(T,e,r,T,t,a))}):Nrn(t)&&t.forEach(function(T,Q){o.set(Q,Xoe(T,e,r,Q,t,a))});var E=l?u?ux:IK:u?ZI:YI,v=c?void 0:E(t);return htn(v||t,function(T,Q){v&&(Q=T,T=t[Q]),Y7(o,Q,Xoe(T,e,r,Q,t,a))}),o}var px=Xoe;var zIa=1,GIa=4;function HIa(t){return px(t,zIa|GIa)}var uy=HIa;var VIa=1,KIa=4;function WIa(t,e){return e=typeof e=="function"?e:void 0,px(t,VIa|KIa,e)}var v2r=WIa;var JIa="__lodash_hash_undefined__";function YIa(t){return this.__data__.set(t,JIa),this}var Lrn=YIa;function ZIa(t){return this.__data__.has(t)}var Urn=ZIa;function ese(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new H9;++e<r;)this.add(t[e])}ese.prototype.add=ese.prototype.push=Lrn;ese.prototype.has=Urn;var zrn=ese;function $Ia(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}var Grn=$Ia;function XIa(t,e){return t.has(e)}var Hrn=XIa;var eEa=1,tEa=2;function rEa(t,e,r,i,n,a){var o=r&eEa,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var y=-1,m=!0,C=r&tEa?new zrn:void 0;for(a.set(t,e),a.set(e,t);++y<s;){var E=t[y],v=e[y];if(i)var T=o?i(v,E,y,e,t,a):i(E,v,y,t,e,a);if(T!==void 0){if(T)continue;m=!1;break}if(C){if(!Grn(e,function(Q,N){if(!Hrn(C,N)&&(E===Q||n(E,Q,r,i,a)))return C.push(N)})){m=!1;break}}else if(!(E===v||n(E,v,r,i,a))){m=!1;break}}return a.delete(t),a.delete(e),m}var tse=rEa;function iEa(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}var Vrn=iEa;function nEa(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var Krn=nEa;var aEa=1,oEa=2,sEa="[object Boolean]",uEa="[object Date]",lEa="[object Error]",cEa="[object Map]",pEa="[object Number]",dEa="[object RegExp]",AEa="[object Set]",gEa="[object String]",hEa="[object Symbol]",yEa="[object ArrayBuffer]",fEa="[object DataView]",Wrn=vp?vp.prototype:void 0,B2r=Wrn?Wrn.valueOf:void 0;function mEa(t,e,r,i,n,a,o){switch(r){case fEa:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case yEa:return!(t.byteLength!=e.byteLength||!a(new lx(t),new lx(e)));case sEa:case uEa:case pEa:return JI(+t,+e);case lEa:return t.name==e.name&&t.message==e.message;case dEa:case gEa:return t==e+"";case cEa:var s=Vrn;case AEa:var u=i&aEa;if(s||(s=Krn),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;i|=oEa,o.set(t,e);var c=tse(s(t),s(e),i,n,a,o);return o.delete(t),c;case hEa:if(B2r)return B2r.call(t)==B2r.call(e)}return!1}var Jrn=mEa;var bEa=1,CEa=Object.prototype,IEa=CEa.hasOwnProperty;function EEa(t,e,r,i,n,a){var o=r&bEa,s=IK(t),u=s.length,l=IK(e),c=l.length;if(u!=c&&!o)return!1;for(var y=u;y--;){var m=s[y];if(!(o?m in e:IEa.call(e,m)))return!1}var C=a.get(t),E=a.get(e);if(C&&E)return C==e&&E==t;var v=!0;a.set(t,e),a.set(e,t);for(var T=o;++y<u;){m=s[y];var Q=t[m],N=e[m];if(i)var M=o?i(N,Q,m,e,t,a):i(Q,N,m,t,e,a);if(!(M===void 0?Q===N||n(Q,N,r,i,a):M)){v=!1;break}T||(T=m=="constructor")}if(v&&!T){var x=t.constructor,q=e.constructor;x!=q&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof q=="function"&&q instanceof q)&&(v=!1)}return a.delete(t),a.delete(e),v}var Yrn=EEa;var SEa=1,Zrn="[object Arguments]",$rn="[object Array]",rse="[object Object]",vEa=Object.prototype,Xrn=vEa.hasOwnProperty;function BEa(t,e,r,i,n,a){var o=Bs(t),s=Bs(e),u=o?$rn:VB(t),l=s?$rn:VB(e);u=u==Zrn?rse:u,l=l==Zrn?rse:l;var c=u==rse,y=l==rse,m=u==l;if(m&&GB(t)){if(!GB(e))return!1;o=!0,c=!1}if(m&&!c)return a||(a=new $I),o||X7(t)?tse(t,e,r,i,n,a):Jrn(t,e,u,r,i,n,a);if(!(r&SEa)){var C=c&&Xrn.call(t,"__wrapped__"),E=y&&Xrn.call(e,"__wrapped__");if(C||E){var v=C?t.value():t,T=E?e.value():e;return a||(a=new $I),n(v,T,r,i,a)}}return m?(a||(a=new $I),Yrn(t,e,r,i,n,a)):!1}var ein=BEa;function tin(t,e,r,i,n){return t===e?!0:t==null||e==null||!Xl(t)&&!Xl(e)?t!==t&&e!==e:ein(t,e,r,i,tin,n)}var ise=tin;var REa=1,wEa=2;function TEa(t,e,r,i){var n=r.length,a=n,o=!i;if(t==null)return!a;for(t=Object(t);n--;){var s=r[n];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++n<a;){s=r[n];var u=s[0],l=t[u],c=s[1];if(o&&s[2]){if(l===void 0&&!(u in t))return!1}else{var y=new $I;if(i)var m=i(l,c,u,t,e,y);if(!(m===void 0?ise(c,l,REa|wEa,i,y):m))return!1}}return!0}var rin=TEa;function _Ea(t){return t===t&&!Rs(t)}var nse=_Ea;function DEa(t){for(var e=YI(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,nse(n)]}return e}var iin=DEa;function PEa(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ase=PEa;function QEa(t){var e=iin(t);return e.length==1&&e[0][2]?ase(e[0][0],e[0][1]):function(r){return r===t||rin(r,t,e)}}var nin=QEa;function OEa(t,e){return t!=null&&e in Object(t)}var ain=OEa;function NEa(t,e,r){e=Q0(e,t);for(var i=-1,n=e.length,a=!1;++i<n;){var o=O0(e[i]);if(!(a=t!=null&&r(t,o)))break;t=t[o]}return a||++i!=n?a:(n=t==null?0:t.length,!!n&&Z7(n)&&Y5(o,n)&&(Bs(t)||zB(t)))}var oin=NEa;function MEa(t,e){return t!=null&&oin(t,e,ain)}var ose=MEa;var xEa=1,kEa=2;function qEa(t,e){return ex(t)&&nse(e)?ase(O0(t),e):function(r){var i=$tn(r,t);return i===void 0&&i===e?ose(r,t):ise(e,i,xEa|kEa)}}var sin=qEa;function FEa(t){return function(e){return e?.[t]}}var uin=FEa;function jEa(t){return function(e){return iT(e,t)}}var lin=jEa;function LEa(t){return ex(t)?uin(O0(t)):lin(t)}var cin=LEa;function UEa(t){return typeof t=="function"?t:t==null?WI:typeof t=="object"?Bs(t)?sin(t[0],t[1]):nin(t):cin(t)}var dx=UEa;function zEa(t){return function(e,r,i){for(var n=-1,a=Object(e),o=i(e),s=o.length;s--;){var u=o[t?s:++n];if(r(a[u],u,a)===!1)break}return e}}var pin=zEa;var GEa=pin(),sse=GEa;function HEa(t,e){return t&&sse(t,e,YI)}var din=HEa;function VEa(t,e,r){(r!==void 0&&!JI(t[e],r)||r===void 0&&!(e in t))&&J7(t,e,r)}var EK=VEa;function KEa(t){return Xl(t)&&Z5(t)}var Ain=KEa;function WEa(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var SK=WEa;function JEa(t){return D0(t,ZI(t))}var gin=JEa;function YEa(t,e,r,i,n,a,o){var s=SK(t,r),u=SK(e,r),l=o.get(u);if(l){EK(t,r,l);return}var c=a?a(s,u,r+"",t,e,o):void 0,y=c===void 0;if(y){var m=Bs(u),C=!m&&GB(u),E=!m&&!C&&X7(u);c=u,m||C||E?Bs(s)?c=s:Ain(s)?c=Moe(s):C?(y=!1,c=Goe(u,!0)):E?(y=!1,c=Zoe(u,!0)):c=[]:Uoe(u)||zB(u)?(c=s,zB(s)?c=gin(s):(!Rs(s)||K7(s))&&(c=$oe(u))):y=!1}y&&(o.set(u,c),n(c,u,i,a,o),o.delete(u)),EK(t,r,c)}var hin=YEa;function yin(t,e,r,i,n){t!==e&&sse(e,function(a,o){if(n||(n=new $I),Rs(a))hin(t,e,o,r,yin,i,n);else{var s=i?i(SK(t,o),a,o+"",t,e,n):void 0;s===void 0&&(s=a),EK(t,o,s)}},ZI)}var fin=yin;function ZEa(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var min=ZEa;function $Ea(t){return typeof t=="function"?t:WI}var bin=$Ea;function XEa(t,e){return t&&din(t,bin(e))}var R2r=XEa;function e3a(t,e){return e.length<2?t:iT(t,zoe(e,0,-1))}var Cin=e3a;var t3a="[object Date]";function r3a(t){return Xl(t)&&Rg(t)==t3a}var Iin=r3a;var Ein=P0&&P0.isDate,i3a=Ein?$5(Ein):Iin,use=i3a;function n3a(t,e){return t<e}var Sin=n3a;function a3a(t,e,r){for(var i=-1,n=t.length;++i<n;){var a=t[i],o=e(a);if(o!=null&&(s===void 0?o===o&&!KI(o):r(o,s)))var s=o,u=a}return u}var vin=a3a;function o3a(t,e){for(var r,i=-1,n=t.length;++i<n;){var a=e(t[i]);a!==void 0&&(r=r===void 0?a:r+a)}return r}var Bin=o3a;var s3a=mtn(function(t,e,r){fin(t,e,r)}),w2r=s3a;function u3a(t,e){return t&&t.length?vin(t,dx(e,2),Sin):void 0}var T2r=u3a;var l3a="Expected a function";function c3a(t){if(typeof t!="function")throw new TypeError(l3a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var Rin=c3a;function p3a(t,e){return e=Q0(e,t),t=Cin(t,e),t==null||delete t[O0(min(e))]}var win=p3a;function d3a(t){return Uoe(t)?void 0:t}var Tin=d3a;var A3a=1,g3a=2,h3a=4,y3a=Loe(function(t,e){var r={};if(t==null)return r;var i=!1;e=V7(e,function(a){return a=Q0(a,t),i||(i=a.length>1),a}),D0(t,ux(t),r),i&&(r=px(r,A3a|g3a|h3a,Tin));for(var n=e.length;n--;)win(r,e[n]);return r}),KB=y3a;function f3a(t,e,r,i){if(!Rs(t))return t;e=Q0(e,t);for(var n=-1,a=e.length,o=a-1,s=t;s!=null&&++n<a;){var u=O0(e[n]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(n!=o){var c=s[u];l=i?i(c,u,s):void 0,l===void 0&&(l=Rs(c)?c:Y5(e[n+1])?[]:{})}Y7(s,u,l),s=s[u]}return t}var lse=f3a;function m3a(t,e,r){for(var i=-1,n=e.length,a={};++i<n;){var o=e[i],s=iT(t,o);r(s,o)&&lse(a,Q0(o,t),s)}return a}var cse=m3a;function b3a(t,e){if(t==null)return{};var r=V7(ux(t),function(i){return[i]});return e=dx(e),cse(t,r,function(i,n){return e(i,n[0])})}var _in=b3a;function C3a(t,e){return _in(t,Rin(dx(e)))}var _2r=C3a;function I3a(t,e){return cse(t,e,function(r,i){return ose(t,i)})}var Din=I3a;var E3a=Loe(function(t,e){return t==null?{}:Din(t,e)}),D2r=E3a;function S3a(t,e,r){return t==null?t:lse(t,e,r)}var vK=S3a;function v3a(t){return t&&t.length?Bin(t,WI):0}var P2r=v3a;var Ax=t=>v2r(t,(e,r)=>{if(typeof e=="string"&&typeof r=="string"&&r.match(/(password|token|keypair)/i))return"<REDACTED>"});var pse=class{constructor(e,r,i){this.logger=e;this.getAllFlags=r;this.getFlagValue=i}getValue(e,r,i){let n=this.getFlagValue(e),a=n===void 0?r:n;return this.assertFeatureFlagType(e,a,i)?a:r}get allFlags(){return this.getAllFlags()}getStringValue(e,r){return this.getValue(e,r,"string")}getNumericValue(e,r){return this.getValue(e,r,"number")}getObjectValue(e,r,i){let n=this.getValue(e,i,"object");return n!==void 0?r.assert(n):void 0}isFeatureEnabled(e,r){return!!this.getValue(e,r,"boolean")}assertFeatureFlagType(e,r,i){return D2(!!V5[e],`'${e}' is not a valid feature flag`,this.logger),r!==void 0&&typeof r!==V5[e].valueType?(this.logger.emerg(`Expected ${V5[e].valueType} feature flag value for ${e}, received ${typeof r}`),!1):i&&V5[e].valueType!==i?(this.logger.emerg(`Expected ${i} for feature flag ${e}, but it is defined as ${V5[e].valueType}`),!1):!0}},gx=class extends pse{constructor(e,r){super(r??Da(),()=>e,i=>e[i])}};function Q2r(){let t=null,e=null,r=new Promise((i,n)=>{t=i,e=n});if(t===null||e===null)throw new Error("The laws of [Javascript] physics have been violated!");return{promise:r,resolve:t,reject:e}}var RSl=S.object({orgID:$ae.optional(),userID:Xae.optional(),requestID:S.string().optional()}),O2r;var Pin=()=>(O2r||(O2r={logContext:{},featureFlags:new gx({})}),O2r),R3a=Pin;var cm=()=>R3a();var Qin=()=>process.env.PLAYWRIGHT==="true"||process.env.REACT_APP_PLAYWRIGHT==="true"?!0:typeof window<"u"&&typeof window.localStorage<"u"?window.localStorage.getItem("playwright")==="true":!1;typeof self>"u"&&typeof global<"u"&&(global.self=global);var WB=()=>!0,Oin=()=>!WB()&&typeof self<"u"&&(typeof Window>"u"||!(self instanceof Window)),Nin=()=>WB()&&!eval("require")("worker_threads").isMainThread,N0=(0,xin.default)(()=>{let t=WB();return{isWorker:t?Nin():Oin(),isNodeWorker:Nin(),isWebWorker:Oin(),isNode:t,isBrowser:!t,isProduction:!1,isDevelopment:!0,isTest:!0,isPlaywright:Qin(),selfType:typeof self,windowType:typeof Window,selfInstanceOfWindow:typeof Window<"u"&&self instanceof Window,selfPostMessage:typeof self<"u"&&!!self.postMessage}}),XI=process.env.APPLICATION_CONTEXT||void 0,QSl=t=>{if(XI===void 0)XI=t;else if(XI!=="test"&&XI!==t)throw new Error(`Changing application contexts from ${XI} to ${t} is disallowed`)},kin=t=>t===XI,OSl=()=>XI,qin=()=>XI==="scheduler"||XI==="test"&&process.env.GOOGLE_APPLICATION_CREDENTIALS,w3a=()=>XI==="cleanup",Min=()=>{let e=process.env.PORT;return e?parseInt(e):N0().isTest&&typeof process.env.JEST_WORKER_ID=="string"?8080+parseInt(process.env.JEST_WORKER_ID):N0().isTest&&typeof process.env.VITEST_WORKER_ID=="string"?8080+parseInt(process.env.VITEST_WORKER_ID):8080};function ly(){if(WB()){let t=process.env.SCHEDULER_ADDRESS;if(t)return t;throw new Error("Unable to determine base URL")}return self.location.origin}var T3a=t=>`http://${process.env.K8S_COA_TEST_HOST}:${t}`,dse=()=>process.env.SCHEDULER_ADDRESS?process.env.SCHEDULER_ADDRESS:N0().isTest?T3a(Min()):process.env.K8S_COA_SCHEDULER_URL||`http://localhost:${Min()}`,_3a=`http://localhost:${process.env.METADATA_SERVICE_PORT||"8808"}`,Ase=(t=_3a)=>{let e=process.env.METADATA_SERVICE_ADDRESS;if(e)return e;let r=process.env.AXIOS_POST_ADDRESS;return r||t},N2r=()=>parseInt(process.env.DEPLOY_SERVICE_PORT||"8008",10),gse=(t=`http://localhost:${N2r()}`)=>{let e={schedulerAddress:process.env.SCHEDULER_ADDRESS,deployServiceAddress:process.env.DEPLOY_SERVICE_ADDRESS,k8sDeployServiceUrl:process.env.K8S_COA_DEPLOY_SERVICE_URL,axiosPostAddress:process.env.AXIOS_POST_ADDRESS,deployServicePort:N2r(),isTest:N0().isTest,isNode:WB()};if(e.deployServiceAddress)return e.deployServiceAddress;if(e.k8sDeployServiceUrl)return e.k8sDeployServiceUrl;if(e.axiosPostAddress)return e.axiosPostAddress;if(!e.isNode)return"";if(isNaN(e.deployServicePort))throw new U9(e,"Invalid DEPLOY_SERVICE_PORT value");if(e.schedulerAddress)try{let r=new URL(e.schedulerAddress);return r.hostname!=="localhost"&&r.hostname!=="127.0.0.1"?e.schedulerAddress:`${r.protocol}//${r.hostname}:${e.deployServicePort}`}catch{}if(e.isTest)return t;throw new U9(e,"Reached drop-through code path in GetDeployServiceURLOnFrontendOrCLI")},M2r=()=>{let t=process.env.DEPLOY_SERVICE_ADDRESS;if(t)return t;let e=process.env.K8S_COA_DEPLOY_SERVICE_URL;if(e)return e;let r=dse(),i=N2r();if(r)try{let n=new URL(r);if(n.hostname==="localhost"||n.hostname==="127.0.0.1")return`${n.protocol}//${n.hostname}:${i}`;let a=n.hostname,o;if(a.startsWith("pr-scheduler."))o=a.replace("pr-scheduler.","pr-deploy.");else if(a.startsWith("scheduler."))o=a.replace("scheduler.","deploy-service.");else{let s=a.split("."),u=s.indexOf("scheduler");u!==-1&&(s[u]="deploy-service",o=s.join("."))}return o?`${n.protocol}//${o}:${i}`:r}catch{}return`http://localhost:${i}`},Fin=(t=!1,e)=>process.env.DISABLE_PROXIES==="true"||x2r()?!1:e?cm().featureFlags.isFeatureEnabled(e,t):t,jin=()=>ly(),D3a=["app","local","localhost","dev","loadtesting","qa","staging","preview","eu"],NSl=t=>{let e=t?.split("."),r=e?.length?e[0]:void 0;return!r||D3a.includes(r)?void 0:r},P3a="Run timed out. Restart the run, and if this issue persists contact support.",Q3a="Marked failed by Coalesce for late network check-in",MSl="Marked failed by Coalesce for missing workspace ID",xSl="Marked failed by Coalesce for no corresponding workspace",x2r=()=>!!process.env.COALESCE_COA_CLOUD_JOB_ID;var Lin=["ACTUAL_STATE","ADVANCED_DEPLOY","APP","AUTH","BULK_WRITE","CLEANUP_TOOL","CLI","CLI_INTERNAL","COLUMN_LINEAGE","COLUMN_METADATA","COMMON","CONNECTION","DEBUG","DEPLOY","DNS","DOCS","DRAG","ENTITY_API","ENV","ENVIRONMENTS","ERROR_OPERATIONS","FIREBASE","FOLDERS","GIT","GIT_SETTINGS","GOOGLE_DEBUG","GRAPH","HEARTBEAT","INTEGRATIONS","JDBC_SERVICE","JEST","JOBS","JSON_PARSER","LIGHTNING_FS","LISTENERS","MACROS","MAPPING_GRID","METADATA_HYDRATION","METADATA_OPERATIONS","NARROW_METADATA","NODE_TYPES","ORGS","ORG_BOOTSTRAP","ORG_SCANNER","ORG_SETTINGS","ORG_UPGRADE","PACKAGES","PACKAGES_BACKEND","PACKAGE_NAMESPACES","PACKAGE_REGISTRY","PALETTE","PARTNER_CONNECT","PENDO","PERFORMANCE","PIPELINE","PLAN","PLATFORM","PRESYNC","PROBLEM_SCANNER","PROJECTS","RBAC","RENDERER","RUNNER","RUNNER_BACKEND","RUN_RESULTS","RUN_TRANSACTION","SEARCH","SECRETS","SECURE_RUN_AND_WORKSPACE","SERVICE_WORKSPACE_STATUS","SQL_PARSING","SQL_TESTING","STATE","STEPS","STORAGE_LOCATIONS","STRUMENTA","SYSTEM_EMAILS","TEMPLATE_EDITOR","TESTING","TIMING_UTILS","TREE_OPERATIONS","TYPESENSE","UI","USERS","USER_ACTIVATION","USER_MANAGEMENT","USER_SETTINGS","VERSIONING","VERSION_CONTROL_ACTIONS","WORKSPACES","XML_PARSER","YAML","ZIP","AI_COLUMN_DESCRIPTIONS","AI_NODE_DESCRIPTIONS","AI_GIT_COMMIT_MESSAGE","AI_COPILOT","SSO_SETTINGS"],hx={...Object.fromEntries(Lin.map(t=>[t,{level:"info"}]))};var Uin=["Authorization","Token","Password","Secret","idToken","id_token","clientID","clientSecret","apiKey","snowflakeKeyPairKey","snowflakeKeyPairPass","keyPairKey","keyPairPass","key","keyPair","privateKey","passphrase","serviceAccountKey","bigQueryServiceAccountKey"];var k2r=()=>{let t=new WeakSet;return(e,r)=>{if(typeof r=="object"&&r!==null){if(t.has(r))return;t.add(r)}return r}},yx=t=>{switch(typeof t){case"object":if(t===null)return"null";try{if(t instanceof Error){if(Xc(t)){let e=t.toJSON();try{"config"in e&&typeof e.config=="object"&&e.config!==null&&(delete e.config.httpAgent,delete e.config.httpsAgent)}catch{}return`AxiosError: ${JSON.stringify(e,k2r())}`}if(t instanceof hr)return t.toString();if(_oe(t))return`Error: [${t.code}] ${t.message}`}switch(t?.constructor?.name){case"Object":case"Array":return JSON.stringify(t,k2r());case"Set":return JSON.stringify(Array.from(t),k2r());case"Error":{let e=t.toString();try{let r=JSON.stringify(t);r!=="{}"&&(e=r)}catch{}return e}case"Null":return"null";case"Function":case"RegExp":return t.toString();case"Date":return t.toDateString();case"ReferenceError":case"TypeError":case"SyntaxError":case"JestAssertionError":return t.toString();case void 0:default:return`attempting to stringify object w/ constructor: ${t?.constructor?.name}; ${JSON.stringify(t)}`}}catch(e){return`Error converting object to string:${e}`}case"undefined":return typeof t;case"bigint":case"number":case"symbol":return t.toString();case"boolean":return String(t);case"string":return t;default:return"Can't convert arg to string"}};var zin=1e6,Gin=.8;var fx=t=>{if(t.length===0)return"";if(t.length===1){let n=yx(t[0]),a=zin*Gin/2;return n.length>a?n.slice(0,a):n}let r=zin*Gin/2/t.length,i=new Array(t.length);for(let n=0;n<t.length;n++){let a=yx(t[n]);i[n]=a.length>r?a.slice(0,r):a}return i.join(" ")},O3a=Uin.map(t=>new RegExp(`("${t}"\\s*:\\s*)"(?:\\\\.|[^"])*"`,"gi")),q2r=t=>{if(!t)return"";let e=t;for(let r of O3a)r.lastIndex=0,e=e.replace(r,'$1"[REDACTED]"');return e};var hse=class extends hr{};var Ex=Ot(mnn());var Sx=class extends G9{constructor(r,i){super({level:r,shipToLogger:({logLevel:n,messages:a,data:o,hasData:s})=>{let u=this.format({logLevel:n,messages:a,data:o&&s?o:{}});return this.consoleLog(u),[]}});this.logFormat=i}colorizeLogLevel(r){if(r==="trace"||r==="debug")return Ex.default.magenta(`${r}`);if(r==="info")return Ex.default.green(`${r}`);if(r==="warn")return Ex.default.yellow(`${r}`);if(r==="error")return Ex.default.cyan(`${r}`);if(r==="fatal")return Ex.default.red(`${r}`);{let i=r;throw new hr(`Invalid log level ${i}`)}}format(r){if(this.logFormat==="text")return this.textFormat(r);if(this.logFormat==="json")return this.jsonFormat(r);{let i=this.logFormat;throw new hr(`Invalid log formatter: ${i}`)}}jsonFormat(r){let{logLevel:i,messages:n,data:a}=r,o=fx(n);return JSON.stringify({...a,message:o,level:i})}textFormat(r){let{logLevel:i,messages:n,data:a}=r,o=fx(n),s=[{key:"orgID",prefix:"org"},{key:"workspaceID",prefix:"env"},{key:"userID",prefix:"user"},{key:"runID",prefix:"run"},{key:"runType",prefix:"runType"},{key:"nodeID",prefix:"node"},{key:"kubernetesJobUuid",prefix:"k8s-job"},{key:"planID",prefix:"plan"}],u=process.env.JEST_WORKER_ID?`[SHARD:${process.env.JEST_WORKER_ID}]`:"",l=s.map(({key:C,prefix:E})=>a[C]?`|(${E}:${a[C]})`:"").join(""),c=this.colorizeLogLevel(i),y=a.time??new Date().toISOString(),m=a.loggingArea??"COMMON";return`|${y}|${u}[${m}]${l}|${c}:${o}`}};var Ese={fatal:0,error:1,warn:2,info:3,debug:4},Sse=class{constructor(e,r,i=void 0){this.area=e;this.logLevel=r;this._logger=i;this.currentLevelPriority=Ese[r]}transports=void 0;defaultContext={};currentLevelPriority;isLevelEnabled(e){return Ese[e]<=this.currentLevelPriority}get logger(){return this._logger||(this._logger=this.createLogger()),this._logger}createLogger(){if(!this.transports)throw new hr("Must create transports before using the logger!");return new Poe({transport:this.transports})}noContextLogger(e,r){this.contextLogger(e,void 0,r)}contextLogger(e,r,i){if(!this.isLevelEnabled(e))return;let n=fx(i);try{n=q2r(n)}catch(u){console.debug(`[${this.area}] Failed to redact sensitive data: ${yx(u)}`),console.error(`[${this.area}] Failed to redact sensitive data. Swallowing log and returning early.`);return}let o={...cm().logContext,...this.defaultContext,...r,loggingArea:this.area},s=_2r(o,u=>u===void 0);if(this.transports)for(let u of this.transports)u.shipToLogger&&u.shipToLogger({logLevel:e,messages:[n],data:s,hasData:Object.keys(s).length>0})}debug(...e){this.noContextLogger("debug",e)}info(...e){this.noContextLogger("info",e)}warn(...e){this.noContextLogger("warn",e)}error(...e){this.noContextLogger("error",e)}fatal(...e){this.noContextLogger("fatal",e)}alert(...e){this.noContextLogger("warn",e)}app(...e){this.noContextLogger("info",e)}assert(...e){this.noContextLogger("error",e)}emerg(...e){this.noContextLogger("fatal",e)}debugContext(e,...r){this.contextLogger("debug",e,r)}infoContext(e,...r){this.contextLogger("info",e,r)}warnContext(e,...r){this.contextLogger("warn",e,r)}errorContext(e,...r){this.contextLogger("error",e,r)}fatalContext(e,...r){this.contextLogger("fatal",e,r)}alertContext(e,...r){this.contextLogger("warn",e,r)}appContext(e,...r){this.contextLogger("info",e,r)}assertContext(e,...r){this.contextLogger("error",e,r)}emergContext(e,...r){this.contextLogger("fatal",e,r)}logAtLevel(e,...r){this.noContextLogger(e,r)}logContextAtLevel(e,r,...i){this.contextLogger(e,r,i)}getConsoleTransport(){for(let e of this.transports??[])if(e instanceof Sx)return e;throw new hse("Invalid confguration: there must always be a console transport")}changeConsoleLogLevel(e){if(e){let r=this.getConsoleTransport();r.level=e,r.enabled=!0,this.currentLevelPriority=Ese[e];return}else{let r=this.getConsoleTransport();r.level=this.logLevel,r.enabled=!1,this.currentLevelPriority=Ese[this.logLevel]}}silenceConsole(e){this.getConsoleTransport().enabled=!e}async close(e){}setDefaultLogContext(e){this.defaultContext={...this.defaultContext,...e}}setTransports(e){if(this.transports)throw new hr("Got a repeat call of setTransports()");this.transports=e}getCommonLogger(){if(!this.transports)throw new hr("Must create transports before getting a child logger!");return new H7({loggingArea:this.area},this.transports,this.logger)}};var xr=t=>{let e=hx[t];if(!e)throw new Error(`Logging area "${t}" is not a valid LoggingAreas key`);return e.logger||(e.logger=new Sse(t,e.level)),e.logger};var bnn=(t,e)=>{for(let r in hx){let i=r,{level:n}=hx[i];t(i).setTransports(e(i,n))}};var vx=(t,e)=>{t.runID=e};var GK=Ot(wse()),RRa=Ot(zK()),wBl=(0,GK.Record)({version:GK.String,hash:GK.String}),wRa=()=>({version:"7.30.7",hash:"14d8c3df7b1780dbe45eb743ea73d0228241812d"}),O1r=wRa();var oue,ysn=t=>{oue=t},fsn=t=>({coalesceSoftwareVersion:O1r?.version||"",service:t,env:process.env.REACT_APP_OWNER??"",reactAppCoalesceDev:process.env.REACT_APP_COALESCE_DEV??""}),N1r=t=>t.includes("production")?"production":t.includes("staging")?"staging":t.includes("qa")?"qa":"development",msn=()=>{if(WB()){let t=process.env.RUNTIME_ENVIRONMENT||"development";return kin("coa")?x2r()?N1r(t):void 0:N1r(t)}else{let t;try{t=self.ENVIRONMENT}catch{}return typeof t=="string"?N1r(t):void 0}};var bsn=require("node:os");var xx=class extends Sx{consoleLog(e){process.stdout.write(`${e}${bsn.EOL}`)}};var MZt=Ot(jAn(),1),YAn=Ot(F0i(),1),oQ=Ot(require("process"),1),n2s=Object.prototype.toString,a2s=t=>n2s.call(t)==="[object Error]",o2s=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function s2s(t){return t&&a2s(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:o2s.has(t.message):!1}var u2s=class extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}},HAn=(t,e,r)=>{let i=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=i,t};async function l2s(t,e){return new Promise((r,i)=>{e={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...e};let n=YAn.default.operation(e),a=()=>{n.stop(),i(e.signal?.reason)};e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",a,{once:!0});let o=()=>{e.signal?.removeEventListener("abort",a),n.stop()};n.attempt(async s=>{try{let u=await t(s);o(),r(u)}catch(u){try{if(!(u instanceof Error))throw new TypeError(`Non-error was thrown: "${u}". You should only throw errors.`);if(u instanceof u2s)throw u.originalError;if(u instanceof TypeError&&!s2s(u))throw u;if(HAn(u,s,e),await e.shouldRetry(u)||(n.stop(),i(u)),await e.onFailedAttempt(u),!n.retry(u))throw n.mainError()}catch(l){HAn(l,s,e),o(),i(l)}}})})}var NZt=new Set,j0i=new Set,VAn=!1,KAn=!1;async function kJ(t,e,r){if(VAn)return;VAn=!0,NZt.size>0&&e&&console.error(["SYNCHRONOUS TERMINATION NOTICE:","When explicitly exiting the process via process.exit or via a parent process,","asynchronous tasks in your exitHooks will not run. Either remove these tasks,","use gracefulExit() instead of process.exit(), or ensure your parent process","sends a SIGINT to the process running this code."].join(" "));let i=128+r,n=(u=!1)=>{(u===!0||t===!0)&&oQ.default.exit(i)};for(let u of j0i)u(i);if(e){n();return}let a=[],o=0;for(let[u,l]of NZt)o=Math.max(o,l),a.push(Promise.resolve(u(i)));let s=setTimeout(()=>{n(!0)},o);await Promise.all(a),clearTimeout(s),n()}function c2s(t){let{onExit:e,wait:r,isSynchronous:i}=t,n=[e,r];return i?j0i.add(e):NZt.add(n),KAn||(KAn=!0,oQ.default.once("beforeExit",kJ.bind(void 0,!0,!1,-128)),oQ.default.once("SIGINT",kJ.bind(void 0,!0,!1,2)),oQ.default.once("SIGTERM",kJ.bind(void 0,!0,!1,15)),oQ.default.once("exit",kJ.bind(void 0,!1,!0,0)),oQ.default.on("message",a=>{a==="shutdown"&&kJ(!0,!0,-128)})),()=>{i?j0i.delete(e):NZt.delete(n)}}function p2s(t){if(typeof t!="function")throw new TypeError("onExit must be a function");return c2s({onExit:t,isSynchronous:!0})}function d2s(){return`${Date.now()}_${Math.floor(Math.random()*1e3)}`}var A2s=class{currentBucket;logBucket;constructor(){this.logBucket={},this.newLogBucket()}newLogBucket(){this.currentBucket&&delete this.logBucket[this.currentBucket],this.currentBucket=d2s(),this.logBucket[this.currentBucket]={size:0,logItems:[]}}getLogBucketByteSize(){return this.logBucket[this.currentBucket].size}getLogCount(){return this.logBucket[this.currentBucket].logItems.length}finishLogBatch(){let t=this.logBucket[this.currentBucket].logItems;return this.newLogBucket(),t}addLog(t,e){this.logBucket[this.currentBucket].size+=e,this.logBucket[this.currentBucket].logItems.push(t)}},g2s=5138022,WAn=996147,JAn=3e3,h2s=995,ZAn=class{logStorage;timer=null;apiInstance;config;constructor(t){this.logStorage=new A2s,this.config=t,t.onInit&&t.onInit();let e=MZt.client.createConfiguration(t.ddClientConf);e.setServerVariables(t?.ddServerConf||{}),this.apiInstance=new MZt.v2.LogsApi(e),this.setupRegularSend(),this.setupExitHook()}sendLogs({logsToSend:t,bucketName:e}){l2s(async()=>{let r={body:t,contentEncoding:"gzip"},i=await this.apiInstance.submitLog(r);return this.config.onDebug&&this.config.onDebug(`(${e}) Sending ${t.length} logs to Datadog completed`),i},{retries:this.config.retries??5}).catch(r=>{this.config.onError&&this.config.onError(r,t)})}setupRegularSend(){this.config.sendImmediate||(this.config.onDebug&&this.config.onDebug(`Configured to send logs every ${this.config.sendIntervalMs||JAn}ms`),this.timer=setInterval(()=>{let t=this.logStorage.getLogCount(),e=this.logStorage.currentBucket;t>0&&(this.config.onDebug&&this.config.onDebug(`(${e}) Sending ${t} logs to Datadog on timer`),this.sendLogs({logsToSend:this.logStorage.finishLogBatch(),bucketName:e}))},this.config.sendIntervalMs||JAn))}setupExitHook(){this.config.sendImmediate||(this.config.onDebug&&this.config.onDebug("Configuring exit hook"),p2s(()=>{if(this.logStorage.getLogCount()>0){this.config.onDebug&&this.config.onDebug("Shutdown detected. Attempting to send remaining logs to Datadog"),this.timer&&clearInterval(this.timer);let t=this.logStorage.currentBucket;this.sendLogs({logsToSend:this.logStorage.finishLogBatch(),bucketName:t})}}))}processLog(t){let e={message:JSON.stringify(t)};this.config.ddsource&&(e.ddsource=this.config.ddsource),this.config.ddtags&&(e.ddtags=this.config.ddtags),this.config.service&&(e.service=this.config.service);let r=e.message.length+(e.ddsource?.length||0)+(e.ddtags?.length||0)+(e.hostname?.length||0)+(e.service?.length||0);if(r>WAn&&this.config.onError&&this.config.onError(new Error(`Log entry exceeds size limit of ${WAn} bytes: ${r}`),[e]),this.config.sendImmediate){this.config.onDebug&&this.config.onDebug("(send-immediate) Sending log to Datadog"),this.sendLogs({logsToSend:[e],bucketName:"send-immediate"});return}this.logStorage.addLog(e,r);let i=this.logStorage.getLogCount();if(this.logStorage.getLogBucketByteSize()>g2s||i>h2s){let a=this.logStorage.currentBucket;this.config.onDebug&&this.config.onDebug(`(${a}) Sending ${i} logs to Datadog`),this.sendLogs({logsToSend:this.logStorage.finishLogBatch(),bucketName:a})}}};var $An=class extends Doe{messageField;levelField;timestampField;timestampFunction;transport;constructor(t){super(t),this.enabled&&(this.transport=new ZAn(t.options),this.messageField=t.messageField??"message",this.levelField=t.levelField??"level",this.timestampField=t.timestampField??"time",this.timestampFunction=t.timestampFunction)}shipToLogger({logLevel:t,messages:e,data:r,hasData:i}){let n={};if(!this.transport)throw new Error("DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported.");return r&&i&&Object.assign(n,r),this.timestampFunction?n[this.timestampField]=this.timestampFunction():n[this.timestampField]=new Date().toISOString(),n[this.levelField]=t,n[this.messageField]=e.join(" "),this.transport.processLog(n),e}};var XAn=require("node:os");var y2s=(t,e,r=!1)=>{let i=fsn(oue),n={ddClientConf:{authMethods:{apiKeyAuth:"pub04bd017317b60c96b62874179d82ff97"}},sendImmediate:r,ddtags:`env:${i.env},coalesceSoftwareVersion:${i.coalesceSoftwareVersion}`,ddsource:"nodejs",service:`${oue}`},a=[];return a.push(new xx(t,e)),a.push(new $An({id:"ddNode",options:n,level:t})),a},egn=(t,e="text",r)=>{let i=y2s("info",e);if(!r){let o=msn(),s=(0,XAn.hostname)();r=ken.parse({...process.env,RUNTIME_ENVIRONMENT:o,HOSTNAME:s})}let n={service:t,category:"global",coalescesoftwareversion:r.REACT_APP_COALESCE_VERSION,hostname:r.HOSTNAME,env:r.RUNTIME_ENVIRONMENT},a=new H7(n,i);return b2r(a),a};var tgn=t=>{N0().isTest&&(t="JestTest"),ysn(t),bnn(xr,(e,r)=>[new xx(r,"text")]),egn(t)};var f2s={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};var ign=function(t){let e=[],r=0;for(let i=0;i<t.length;i++){let n=t.charCodeAt(i);n<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=n&63|128):(n&64512)===55296&&i+1<t.length&&(t.charCodeAt(i+1)&64512)===56320?(n=65536+((n&1023)<<10)+(t.charCodeAt(++i)&1023),e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=n&63|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=n&63|128)}return e},m2s=function(t){let e=[],r=0,i=0;for(;r<t.length;){let n=t[r++];if(n<128)e[i++]=String.fromCharCode(n);else if(n>191&&n<224){let a=t[r++];e[i++]=String.fromCharCode((n&31)<<6|a&63)}else if(n>239&&n<365){let a=t[r++],o=t[r++],s=t[r++],u=((n&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;e[i++]=String.fromCharCode(55296+(u>>10)),e[i++]=String.fromCharCode(56320+(u&1023))}else{let a=t[r++],o=t[r++];e[i++]=String.fromCharCode((n&15)<<12|(a&63)<<6|o&63)}}return e.join("")},ngn={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let r=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let n=0;n<t.length;n+=3){let a=t[n],o=n+1<t.length,s=o?t[n+1]:0,u=n+2<t.length,l=u?t[n+2]:0,c=a>>2,y=(a&3)<<4|s>>4,m=(s&15)<<2|l>>6,C=l&63;u||(C=64,o||(m=64)),i.push(r[c],r[y],r[m],r[C])}return i.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(ign(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):m2s(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let r=e?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let n=0;n<t.length;){let a=r[t.charAt(n++)],s=n<t.length?r[t.charAt(n)]:0;++n;let l=n<t.length?r[t.charAt(n)]:64;++n;let y=n<t.length?r[t.charAt(n)]:64;if(++n,a==null||s==null||l==null||y==null)throw new U0i;let m=a<<2|s>>4;if(i.push(m),l!==64){let C=s<<4&240|l>>2;if(i.push(C),y!==64){let E=l<<6&192|y;i.push(E)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},U0i=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},b2s=function(t){let e=ign(t);return ngn.encodeByteArray(e,!0)},qJ=function(t){return b2s(t).replace(/\./g,"")},G0i=function(t){try{return ngn.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function FJ(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:let r=e;return new Date(r.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(let r in e)!e.hasOwnProperty(r)||!C2s(r)||(t[r]=FJ(t[r],e[r]));return t}function C2s(t){return t!=="__proto__"}function I2s(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var E2s=()=>I2s().__FIREBASE_DEFAULTS__,S2s=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},v2s=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=t&&G0i(t[1]);return e&&JSON.parse(e)},H0i=()=>{try{return E2s()||S2s()||v2s()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},agn=t=>{var e,r;return(r=(e=H0i())===null||e===void 0?void 0:e.emulatorHosts)===null||r===void 0?void 0:r[t]};var V0i=()=>{var t;return(t=H0i())===null||t===void 0?void 0:t.config};var xZt=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}wrapCallback(e){return(r,i)=>{r?this.reject(r):this.resolve(i),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(r):e(r,i))}}};function kZt(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let r={alg:"none",type:"JWT"},i=e||"demo-project",n=t.iat||0,a=t.sub||t.user_id;if(!a)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let o=Object.assign({iss:`https://securetoken.google.com/${i}`,aud:i,iat:n,exp:n+3600,auth_time:n,sub:a,user_id:a,firebase:{sign_in_provider:"custom",identities:{}}},t);return[qJ(JSON.stringify(r)),qJ(JSON.stringify(o)),""].join(".")}function Ks(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function ogn(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ks())}function qZt(){var t;let e=(t=H0i())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function FZt(){return typeof self=="object"&&self.self===self}function jZt(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function jJ(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function LZt(){let t=Ks();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function K0i(){return!qZt()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function r_(){try{return typeof indexedDB=="object"}catch{return!1}}function sgn(){return new Promise((t,e)=>{try{let r=!0,i="validate-browser-context-for-indexeddb-analytics-module",n=self.indexedDB.open(i);n.onsuccess=()=>{n.result.close(),r||self.indexedDB.deleteDatabase(i),t(!0)},n.onupgradeneeded=()=>{r=!1},n.onerror=()=>{var a;e(((a=n.error)===null||a===void 0?void 0:a.message)||"")}}catch(r){e(r)}})}var B2s="FirebaseError",Qs=class t extends Error{constructor(e,r,i){super(r),this.code=e,this.customData=i,this.name=B2s,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ob.prototype.create)}},Ob=class{constructor(e,r,i){this.service=e,this.serviceName=r,this.errors=i}create(e,...r){let i=r[0]||{},n=`${this.service}/${e}`,a=this.errors[e],o=a?R2s(a,i):"Error",s=`${this.serviceName}: ${o} (${n}).`;return new Qs(n,s,i)}};function R2s(t,e){return t.replace(w2s,(r,i)=>{let n=e[i];return n!=null?String(n):`<${i}?>`})}var w2s=/\{\$([^}]+)}/g;function W0i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ugn(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function wR(t,e){if(t===e)return!0;let r=Object.keys(t),i=Object.keys(e);for(let n of r){if(!i.includes(n))return!1;let a=t[n],o=e[n];if(rgn(a)&&rgn(o)){if(!wR(a,o))return!1}else if(a!==o)return!1}for(let n of i)if(!r.includes(n))return!1;return!0}function rgn(t){return t!==null&&typeof t=="object"}function lq(t){let e=[];for(let[r,i]of Object.entries(t))Array.isArray(i)?i.forEach(n=>{e.push(encodeURIComponent(r)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(r)+"="+encodeURIComponent(i));return e.length?"&"+e.join("&"):""}function i_(t){let e={};return t.replace(/^\?/,"").split("&").forEach(i=>{if(i){let[n,a]=i.split("=");e[decodeURIComponent(n)]=decodeURIComponent(a)}}),e}function cq(t){let e=t.indexOf("?");if(!e)return"";let r=t.indexOf("#",e);return t.substring(e,r>0?r:void 0)}function UZt(t,e){let r=new z0i(t,e);return r.subscribe.bind(r)}var z0i=class{constructor(e,r){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=r,this.task.then(()=>{e(this)}).catch(i=>{this.error(i)})}next(e){this.forEachObserver(r=>{r.next(e)})}error(e){this.forEachObserver(r=>{r.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,r,i){let n;if(e===void 0&&r===void 0&&i===void 0)throw new Error("Missing Observer.");T2s(e,["next","error","complete"])?n=e:n={next:e,error:r,complete:i},n.next===void 0&&(n.next=L0i),n.error===void 0&&(n.error=L0i),n.complete===void 0&&(n.complete=L0i);let a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch{}}),this.observers.push(n),a}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let r=0;r<this.observers.length;r++)this.sendOne(r,e)}sendOne(e,r){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{r(this.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function T2s(t,e){if(typeof t!="object"||t===null)return!1;for(let r of e)if(r in t&&typeof t[r]=="function")return!0;return!1}function L0i(){}var KEc=4*60*60*1e3;function pi(t){return t&&t._delegate?t._delegate:t}f2s.NODE_CLIENT=!0;var Ws=class{constructor(e,r,i){this.name=e,this.instanceFactory=r,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var sQ="[DEFAULT]";var J0i=class{constructor(e,r){this.name=e,this.container=r,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let r=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(r)){let i=new xZt;if(this.instancesDeferred.set(r,i),this.isInitialized(r)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:r});n&&i.resolve(n)}catch{}}return this.instancesDeferred.get(r).promise}getImmediate(e){var r;let i=this.normalizeInstanceIdentifier(e?.identifier),n=(r=e?.optional)!==null&&r!==void 0?r:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(a){if(n)return null;throw a}else{if(n)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(D2s(e))try{this.getOrInitializeService({instanceIdentifier:sQ})}catch{}for(let[r,i]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(r);try{let a=this.getOrInitializeService({instanceIdentifier:n});i.resolve(a)}catch{}}}}clearInstance(e=sQ){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...e.filter(r=>"_delete"in r).map(r=>r._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=sQ){return this.instances.has(e)}getOptions(e=sQ){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:r={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let n=this.getOrInitializeService({instanceIdentifier:i,options:r});for(let[a,o]of this.instancesDeferred.entries()){let s=this.normalizeInstanceIdentifier(a);i===s&&o.resolve(n)}return n}onInit(e,r){var i;let n=this.normalizeInstanceIdentifier(r),a=(i=this.onInitCallbacks.get(n))!==null&&i!==void 0?i:new Set;a.add(e),this.onInitCallbacks.set(n,a);let o=this.instances.get(n);return o&&e(o,n),()=>{a.delete(e)}}invokeOnInitCallbacks(e,r){let i=this.onInitCallbacks.get(r);if(i)for(let n of i)try{n(e,r)}catch{}}getOrInitializeService({instanceIdentifier:e,options:r={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:_2s(e),options:r}),this.instances.set(e,i),this.instancesOptions.set(e,r),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=sQ){return this.component?this.component.multipleInstances?e:sQ:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function _2s(t){return t===sQ?void 0:t}function D2s(t){return t.instantiationMode==="EAGER"}var LJ=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let r=this.getProvider(e.name);if(r.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);r.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let r=new J0i(e,this);return this.providers.set(e,r),r}getProviders(){return Array.from(this.providers.values())}};var pbi={};d7(pbi,{FirebaseError:()=>Qs,SDK_VERSION:()=>Sm,_DEFAULT_ENTRY_NAME:()=>FS,_addComponent:()=>Aq,_addOrOverwriteComponent:()=>ubi,_apps:()=>n_,_clearComponents:()=>y1s,_components:()=>dq,_getProvider:()=>a_,_isFirebaseApp:()=>Sgn,_isFirebaseServerApp:()=>jd,_registerComponent:()=>nh,_removeServiceInstance:()=>Egn,_serverApps:()=>pq,deleteApp:()=>KZt,getApp:()=>gq,getApps:()=>b1s,initializeApp:()=>VZt,initializeServerApp:()=>m1s,onLog:()=>lbi,registerVersion:()=>xc,setLogLevel:()=>cbi});var Y0i=[],ea;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(ea||(ea={}));var lgn={debug:ea.DEBUG,verbose:ea.VERBOSE,info:ea.INFO,warn:ea.WARN,error:ea.ERROR,silent:ea.SILENT},P2s=ea.INFO,Q2s={[ea.DEBUG]:"log",[ea.VERBOSE]:"log",[ea.INFO]:"info",[ea.WARN]:"warn",[ea.ERROR]:"error"},O2s=(t,e,...r)=>{if(e<t.logLevel)return;let i=new Date().toISOString(),n=Q2s[e];if(n)console[n](`[${i}] ${t.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},kS=class{constructor(e){this.name=e,this._logLevel=P2s,this._logHandler=O2s,this._userLogHandler=null,Y0i.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in ea))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?lgn[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,ea.DEBUG,...e),this._logHandler(this,ea.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,ea.VERBOSE,...e),this._logHandler(this,ea.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,ea.INFO,...e),this._logHandler(this,ea.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,ea.WARN,...e),this._logHandler(this,ea.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,ea.ERROR,...e),this._logHandler(this,ea.ERROR,...e)}};function cgn(t){Y0i.forEach(e=>{e.setLogLevel(t)})}function pgn(t,e){for(let r of Y0i){let i=null;e&&e.level&&(i=lgn[e.level]),t===null?r.userLogHandler=null:r.userLogHandler=(n,a,...o)=>{let s=o.map(u=>{if(u==null)return null;if(typeof u=="string")return u;if(typeof u=="number"||typeof u=="boolean")return u.toString();if(u instanceof Error)return u.message;try{return JSON.stringify(u)}catch{return null}}).filter(u=>u).join(" ");a>=(i??n.logLevel)&&t({level:ea[a].toLowerCase(),message:s,args:o,type:n.name})}}}var N2s=(t,e)=>e.some(r=>t instanceof r),dgn,Agn;function M2s(){return dgn||(dgn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function x2s(){return Agn||(Agn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var ggn=new WeakMap,$0i=new WeakMap,hgn=new WeakMap,Z0i=new WeakMap,ebi=new WeakMap;function k2s(t){let e=new Promise((r,i)=>{let n=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{r(qS(t.result)),n()},o=()=>{i(t.error),n()};t.addEventListener("success",a),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&ggn.set(r,t)}).catch(()=>{}),ebi.set(e,t),e}function q2s(t){if($0i.has(t))return;let e=new Promise((r,i)=>{let n=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{r(),n()},o=()=>{i(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});$0i.set(t,e)}var X0i={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return $0i.get(t);if(e==="objectStoreNames")return t.objectStoreNames||hgn.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return qS(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function ygn(t){X0i=t(X0i)}function F2s(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){let i=t.call(zZt(this),e,...r);return hgn.set(i,e.sort?e.sort():[e]),qS(i)}:x2s().includes(t)?function(...e){return t.apply(zZt(this),e),qS(ggn.get(this))}:function(...e){return qS(t.apply(zZt(this),e))}}function j2s(t){return typeof t=="function"?F2s(t):(t instanceof IDBTransaction&&q2s(t),N2s(t,M2s())?new Proxy(t,X0i):t)}function qS(t){if(t instanceof IDBRequest)return k2s(t);if(Z0i.has(t))return Z0i.get(t);let e=j2s(t);return e!==t&&(Z0i.set(t,e),ebi.set(e,t)),e}var zZt=t=>ebi.get(t);function mgn(t,e,{blocked:r,upgrade:i,blocking:n,terminated:a}={}){let o=indexedDB.open(t,e),s=qS(o);return i&&o.addEventListener("upgradeneeded",u=>{i(qS(o.result),u.oldVersion,u.newVersion,qS(o.transaction),u)}),r&&o.addEventListener("blocked",u=>r(u.oldVersion,u.newVersion,u)),s.then(u=>{a&&u.addEventListener("close",()=>a()),n&&u.addEventListener("versionchange",l=>n(l.oldVersion,l.newVersion,l))}).catch(()=>{}),s}var L2s=["get","getKey","getAll","getAllKeys","count"],U2s=["put","add","delete","clear"],tbi=new Map;function fgn(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(tbi.get(e))return tbi.get(e);let r=e.replace(/FromIndex$/,""),i=e!==r,n=U2s.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||L2s.includes(r)))return;let a=async function(o,...s){let u=this.transaction(o,n?"readwrite":"readonly"),l=u.store;return i&&(l=l.index(s.shift())),(await Promise.all([l[r](...s),n&&u.done]))[0]};return tbi.set(e,a),a}ygn(t=>({...t,get:(e,r,i)=>fgn(e,r)||t.get(e,r,i),has:(e,r)=>!!fgn(e,r)||t.has(e,r)}));var ibi=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(z2s(r)){let i=r.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(r=>r).join(" ")}};function z2s(t){let e=t.getComponent();return e?.type==="VERSION"}var GZt="@firebase/app",nbi="0.10.0";var uQ=new kS("@firebase/app"),G2s="@firebase/app-compat",H2s="@firebase/analytics-compat",V2s="@firebase/analytics",K2s="@firebase/app-check-compat",W2s="@firebase/app-check",J2s="@firebase/auth",Y2s="@firebase/auth-compat",Z2s="@firebase/database",$2s="@firebase/database-compat",X2s="@firebase/functions",e1s="@firebase/functions-compat",t1s="@firebase/installations",r1s="@firebase/installations-compat",i1s="@firebase/messaging",n1s="@firebase/messaging-compat",a1s="@firebase/performance",o1s="@firebase/performance-compat",s1s="@firebase/remote-config",u1s="@firebase/remote-config-compat",l1s="@firebase/storage",c1s="@firebase/storage-compat",p1s="@firebase/firestore",d1s="@firebase/firestore-compat",A1s="firebase",g1s="10.10.0";var FS="[DEFAULT]",h1s={[GZt]:"fire-core",[G2s]:"fire-core-compat",[V2s]:"fire-analytics",[H2s]:"fire-analytics-compat",[W2s]:"fire-app-check",[K2s]:"fire-app-check-compat",[J2s]:"fire-auth",[Y2s]:"fire-auth-compat",[Z2s]:"fire-rtdb",[$2s]:"fire-rtdb-compat",[X2s]:"fire-fn",[e1s]:"fire-fn-compat",[t1s]:"fire-iid",[r1s]:"fire-iid-compat",[i1s]:"fire-fcm",[n1s]:"fire-fcm-compat",[a1s]:"fire-perf",[o1s]:"fire-perf-compat",[s1s]:"fire-rc",[u1s]:"fire-rc-compat",[l1s]:"fire-gcs",[c1s]:"fire-gcs-compat",[p1s]:"fire-fst",[d1s]:"fire-fst-compat","fire-js":"fire-js",[A1s]:"fire-js-all"};var n_=new Map,pq=new Map,dq=new Map;function Aq(t,e){try{t.container.addComponent(e)}catch(r){uQ.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,r)}}function ubi(t,e){t.container.addOrOverwriteComponent(e)}function nh(t){let e=t.name;if(dq.has(e))return uQ.debug(`There were multiple attempts to register component ${e}.`),!1;dq.set(e,t);for(let r of n_.values())Aq(r,t);for(let r of pq.values())Aq(r,t);return!0}function a_(t,e){let r=t.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),t.container.getProvider(e)}function Egn(t,e,r=FS){a_(t,e).clearInstance(r)}function Sgn(t){return t.options!==void 0}function jd(t){return t.settings!==void 0}function y1s(){dq.clear()}var f1s={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Nb=new Ob("app","Firebase",f1s);var HZt=class{constructor(e,r,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},r),this._name=r.name,this._automaticDataCollectionEnabled=r.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new Ws("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Nb.create("app-deleted",{appName:this._name})}};var abi=class extends HZt{constructor(e,r,i,n){let a=r.automaticDataCollectionEnabled!==void 0?r.automaticDataCollectionEnabled:!1,o={name:i,automaticDataCollectionEnabled:a};if(e.apiKey!==void 0)super(e,o,n);else{let s=e;super(s.options,o,n)}this._serverConfig=Object.assign({automaticDataCollectionEnabled:a},r),this._finalizationRegistry=new FinalizationRegistry(()=>{this.automaticCleanup()}),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,r.releaseOnDeref=void 0,xc(GZt,nbi,"serverapp")}get refCount(){return this._refCount}incRefCount(e){this.isDeleted||(this._refCount++,e!==void 0&&this._finalizationRegistry.register(e,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){KZt(this)}get settings(){return this.checkDestroyed(),this._serverConfig}checkDestroyed(){if(this.isDeleted)throw Nb.create("server-app-deleted")}};var Sm=g1s;function VZt(t,e={}){let r=t;typeof e!="object"&&(e={name:e});let i=Object.assign({name:FS,automaticDataCollectionEnabled:!1},e),n=i.name;if(typeof n!="string"||!n)throw Nb.create("bad-app-name",{appName:String(n)});if(r||(r=V0i()),!r)throw Nb.create("no-options");let a=n_.get(n);if(a){if(wR(r,a.options)&&wR(i,a.config))return a;throw Nb.create("duplicate-app",{appName:n})}let o=new LJ(n);for(let u of dq.values())o.addComponent(u);let s=new HZt(r,i,o);return n_.set(n,s),s}function m1s(t,e){if(FZt())throw Nb.create("invalid-server-app-environment");e.automaticDataCollectionEnabled===void 0&&(e.automaticDataCollectionEnabled=!1);let r;Sgn(t)?r=t.options:r=t;let i=Object.assign(Object.assign({},e),r);i.releaseOnDeref!==void 0&&delete i.releaseOnDeref;let n=l=>[...l].reduce((c,y)=>Math.imul(31,c)+y.charCodeAt(0)|0,0);if(e.releaseOnDeref!==void 0&&typeof FinalizationRegistry>"u")throw Nb.create("finalization-registry-not-supported",{});let a=""+n(JSON.stringify(i)),o=pq.get(a);if(o)return o.incRefCount(e.releaseOnDeref),o;let s=new LJ(a);for(let l of dq.values())s.addComponent(l);let u=new abi(r,e,a,s);return pq.set(a,u),u}function gq(t=FS){let e=n_.get(t);if(!e&&t===FS&&V0i())return VZt();if(!e)throw Nb.create("no-app",{appName:t});return e}function b1s(){return Array.from(n_.values())}async function KZt(t){let e=!1,r=t.name;n_.has(r)?(e=!0,n_.delete(r)):pq.has(r)&&t.decRefCount()<=0&&(pq.delete(r),e=!0),e&&(await Promise.all(t.container.getProviders().map(i=>i.delete())),t.isDeleted=!0)}function xc(t,e,r){var i;let n=(i=h1s[t])!==null&&i!==void 0?i:t;r&&(n+=`-${r}`);let a=n.match(/\s|\//),o=e.match(/\s|\//);if(a||o){let s=[`Unable to register library "${n}" with version "${e}":`];a&&s.push(`library name "${n}" contains illegal characters (whitespace or "/")`),a&&o&&s.push("and"),o&&s.push(`version name "${e}" contains illegal characters (whitespace or "/")`),uQ.warn(s.join(" "));return}nh(new Ws(`${n}-version`,()=>({library:n,version:e}),"VERSION"))}function lbi(t,e){if(t!==null&&typeof t!="function")throw Nb.create("invalid-log-argument");pgn(t,e)}function cbi(t){cgn(t)}var C1s="firebase-heartbeat-database",I1s=1,UJ="firebase-heartbeat-store",rbi=null;function vgn(){return rbi||(rbi=mgn(C1s,I1s,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(UJ)}catch(r){console.warn(r)}}}}).catch(t=>{throw Nb.create("idb-open",{originalErrorMessage:t.message})})),rbi}async function E1s(t){try{let r=(await vgn()).transaction(UJ),i=await r.objectStore(UJ).get(Bgn(t));return await r.done,i}catch(e){if(e instanceof Qs)uQ.warn(e.message);else{let r=Nb.create("idb-get",{originalErrorMessage:e?.message});uQ.warn(r.message)}}}async function bgn(t,e){try{let i=(await vgn()).transaction(UJ,"readwrite");await i.objectStore(UJ).put(e,Bgn(t)),await i.done}catch(r){if(r instanceof Qs)uQ.warn(r.message);else{let i=Nb.create("idb-set",{originalErrorMessage:r?.message});uQ.warn(i.message)}}}function Bgn(t){return`${t.name}!${t.options.appId}`}var S1s=1024,v1s=30*24*60*60*1e3,obi=class{constructor(e){this.container=e,this._heartbeatsCache=null;let r=this.container.getProvider("app").getImmediate();this._storage=new sbi(r),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}async triggerHeartbeat(){var e,r;let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),a=Cgn();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((r=this._heartbeatsCache)===null||r===void 0?void 0:r.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===a||this._heartbeatsCache.heartbeats.some(o=>o.date===a)))return this._heartbeatsCache.heartbeats.push({date:a,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let s=new Date(o.date).valueOf();return Date.now()-s<=v1s}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let r=Cgn(),{heartbeatsToSend:i,unsentEntries:n}=B1s(this._heartbeatsCache.heartbeats),a=qJ(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=r,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),a}};function Cgn(){return new Date().toISOString().substring(0,10)}function B1s(t,e=S1s){let r=[],i=t.slice();for(let n of t){let a=r.find(o=>o.agent===n.agent);if(a){if(a.dates.push(n.date),Ign(r)>e){a.dates.pop();break}}else if(r.push({agent:n.agent,dates:[n.date]}),Ign(r)>e){r.pop();break}i=i.slice(1)}return{heartbeatsToSend:r,unsentEntries:i}}var sbi=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return r_()?sgn().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){let r=await E1s(this.app);return r?.heartbeats?r:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var r;if(await this._canUseIndexedDBPromise){let n=await this.read();return bgn(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var r;if(await this._canUseIndexedDBPromise){let n=await this.read();return bgn(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}else return}};function Ign(t){return qJ(JSON.stringify({version:2,heartbeats:t})).length}function R1s(t){nh(new Ws("platform-logger",e=>new ibi(e),"PRIVATE")),nh(new Ws("heartbeat",e=>new obi(e),"PRIVATE")),xc(GZt,nbi,t),xc(GZt,nbi,"esm2017"),xc("fire-js","")}R1s("");var dbi=class{constructor(e,r){this._delegate=e,this.firebase=r,Aq(e,new Ws("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),KZt(this._delegate)))}_getService(e,r=FS){var i;this._delegate.checkDestroyed();let n=this._delegate.container.getProvider(e);return!n.isInitialized()&&((i=n.getComponent())===null||i===void 0?void 0:i.instantiationMode)==="EXPLICIT"&&n.initialize(),n.getImmediate({identifier:r})}_removeServiceInstance(e,r=FS){this._delegate.container.getProvider(e).clearInstance(r)}_addComponent(e){Aq(this._delegate,e)}_addOrOverwriteComponent(e){ubi(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}};var w1s={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},Rgn=new Ob("app-compat","Firebase",w1s);function T1s(t){let e={},r={__esModule:!0,initializeApp:a,app:n,registerVersion:xc,setLogLevel:cbi,onLog:lbi,apps:null,SDK_VERSION:Sm,INTERNAL:{registerComponent:s,removeApp:i,useAsService:u,modularAPIs:pbi}};r.default=r,Object.defineProperty(r,"apps",{get:o});function i(l){delete e[l]}function n(l){if(l=l||FS,!W0i(e,l))throw Rgn.create("no-app",{appName:l});return e[l]}n.App=t;function a(l,c={}){let y=VZt(l,c);if(W0i(e,y.name))return e[y.name];let m=new t(y,r);return e[y.name]=m,m}function o(){return Object.keys(e).map(l=>e[l])}function s(l){let c=l.name,y=c.replace("-compat","");if(nh(l)&&l.type==="PUBLIC"){let m=(C=n())=>{if(typeof C[y]!="function")throw Rgn.create("invalid-app-argument",{appName:c});return C[y]()};l.serviceProps!==void 0&&FJ(m,l.serviceProps),r[y]=m,t.prototype[y]=function(...C){return this._getService.bind(this,c).apply(this,l.multipleInstances?C:[])}}return l.type==="PUBLIC"?r[y]:null}function u(l,c){return c==="serverAuth"?null:c}return r}function Tgn(){let t=T1s(dbi);t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:Tgn,extendNamespace:e,createSubscribe:UZt,ErrorFactory:Ob,deepExtend:FJ});function e(r){FJ(t,r)}return t}var _1s=Tgn();var wgn=new kS("@firebase/app-compat"),D1s="@firebase/app-compat",P1s="0.2.30";function Q1s(t){xc(D1s,P1s,t)}if(FZt()&&self.firebase!==void 0){wgn.warn(`
|
|
1188
|
+
`+this.stack+r}handleExpressResponse(r){r.status(this.statusCode()).json(this.toTRunError())}};function Toe(t){return typeof t=="object"&&t instanceof hr}function _oe(t){return typeof t=="object"&&t instanceof Error&&typeof t.code=="string"}var jB=class extends hr{},vd=class extends hr{statusCode(){return 404}},_0=class extends hr{statusCode(){return 400}},LB=class extends hr{statusCode(){return 403}},BA=class extends hr{statusCode(){return 409}},Bd=class extends hr{constructor(e="Not implemented",r,i){super(e,r,501,i)}};var U9=class extends jB{diagnostics;constructor(e,r){super("Unable to determine Deploy Service URL. In CLI contexts, SCHEDULER_ADDRESS must be set. In backend service contexts, use GetDeployServiceURLOnBackend instead.",r),this.diagnostics=e}};function D2(t,e,r,...i){if(!t){let n=`ASSERTION FAILED: ${e}`,a=new hr(n);throw r.emerg(n,{stack:a.stack,args:i}),a}}var xen,b2r=t=>{xen=t},Da=()=>xen;var ken=S.object({NODE_ENV:S.string().default("development"),LOG_LEVEL:S.string().default("info").optional(),CONSOLE_JSON_LOGS:S.string().default("true").optional(),REACT_APP_COALESCE_VERSION:S.string().default("").optional(),REACT_APP_COALESCE_GIT_HASH:S.string().default("").optional(),HOSTNAME:S.string().default("").optional(),RUNTIME_ENVIRONMENT:S.string().default("").optional()});var Li=function(t){return t.info="info",t.warn="warn",t.error="error",t.debug="debug",t.trace="trace",t.fatal="fatal",t}({}),z9={[Li.trace]:10,[Li.debug]:20,[Li.info]:30,[Li.warn]:40,[Li.error]:50,[Li.fatal]:60},phl={10:Li.trace,20:Li.debug,30:Li.info,40:Li.warn,50:Li.error,60:Li.fatal};var oy=function(t){return t.onBeforeDataOut="onBeforeDataOut",t.shouldSendToLogger="shouldSendToLogger",t.onMetadataCalled="onMetadataCalled",t.onBeforeMessageOut="onBeforeMessageOut",t.onContextCalled="onContextCalled",t}({});var qen=class Fen{context={};hasContext=!1;setContext(e){if(!e){this.context={},this.hasContext=!1;return}this.context=e,this.hasContext=!0}appendContext(e){this.context={...this.context,...e},this.hasContext=!0}getContext(){return this.context}hasContextData(){return this.hasContext}onChildLoggerCreated({parentContextManager:e,childContextManager:r}){if(e.hasContextData()){let i=e.getContext();r.setContext({...i})}}clone(){let e=new Fen;return e.setContext({...this.context}),e.hasContext=this.hasContext,e}};var Doe=class{id;enabled;level;consoleDebug;constructor(t){this.id=Date.now().toString()+Math.random().toString(),this.enabled=t.enabled??!0,this.consoleDebug=t.consoleDebug??!1,this.level=t.level??"trace"}_sendToLogger(t){if(!this.enabled||z9[t.logLevel]<z9[this.level])return;let e=this.shipToLogger(t);if(this.consoleDebug)switch(t.logLevel){case Li.info:console.info(...e);break;case Li.warn:console.warn(...e);break;case Li.error:console.error(...e);break;case Li.trace:console.debug(...e);break;case Li.debug:console.debug(...e);break;case Li.fatal:console.debug(...e);break;default:console.log(...e)}}getLoggerInstance(){throw new Error("This transport does not have a logger instance")}};var jen=class{err;metadata;structuredLogger;hasMetadata;pluginManager;constructor(t){this.err=null,this.metadata={},this.structuredLogger=t,this.hasMetadata=!1,this.pluginManager=t.pluginManager}withMetadata(t){let{pluginManager:e,structuredLogger:{_config:{consoleDebug:r}}}=this;if(!t)return r&&console.debug("[LogLayer] withMetadata was called with no metadata; dropping."),this;let i=t;return e.hasPlugins(oy.onMetadataCalled)&&(i=e.runOnMetadataCalled(t,this.structuredLogger),!i)?(r&&console.debug("[LogLayer] Metadata was dropped due to plugin returning falsy value."),this):(this.metadata={...this.metadata,...i},this.hasMetadata=!0,this)}withError(t){return this.err=t,this}info(...t){this.structuredLogger.isLevelEnabled(Li.info)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.info,t))}warn(...t){this.structuredLogger.isLevelEnabled(Li.warn)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.warn,t))}error(...t){this.structuredLogger.isLevelEnabled(Li.error)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.error,t))}debug(...t){this.structuredLogger.isLevelEnabled(Li.debug)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.debug,t))}trace(...t){this.structuredLogger.isLevelEnabled(Li.trace)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.trace,t))}fatal(...t){this.structuredLogger.isLevelEnabled(Li.fatal)&&(this.structuredLogger._formatMessage(t),this.formatLog(Li.fatal,t))}disableLogging(){return this.structuredLogger.disableLogging(),this}enableLogging(){return this.structuredLogger.enableLogging(),this}formatLog(t,e){let{muteMetadata:r}=this.structuredLogger._config,i=r?!1:this.hasMetadata;this.structuredLogger._formatLog({logLevel:t,params:e,metadata:i?this.metadata:null,err:this.err})}},S0a=[oy.onBeforeDataOut,oy.onMetadataCalled,oy.shouldSendToLogger,oy.onBeforeMessageOut,oy.onContextCalled],Len=class{idToPlugin;onBeforeDataOut=[];shouldSendToLogger=[];onMetadataCalled=[];onBeforeMessageOut=[];onContextCalled=[];constructor(t){this.idToPlugin={},this.mapPlugins(t),this.indexPlugins()}mapPlugins(t){for(let e of t){if(e.id||(e.id=Date.now().toString()+Math.random().toString()),this.idToPlugin[e.id])throw new Error(`[LogLayer] Plugin with id ${e.id} already exists.`);e.registeredAt=Date.now(),this.idToPlugin[e.id]=e}}indexPlugins(){this.onBeforeDataOut=[],this.shouldSendToLogger=[],this.onMetadataCalled=[],this.onBeforeMessageOut=[],this.onContextCalled=[];let t=Object.values(this.idToPlugin).sort((e,r)=>e.registeredAt-r.registeredAt);for(let e of t){if(e.disabled)return;for(let r of S0a)e[r]&&e.id&&this[r].push(e.id)}}hasPlugins(t){return this[t].length>0}countPlugins(t){return t?this[t].length:Object.keys(this.idToPlugin).length}addPlugins(t){this.mapPlugins(t),this.indexPlugins()}enablePlugin(t){let e=this.idToPlugin[t];e&&(e.disabled=!1),this.indexPlugins()}disablePlugin(t){let e=this.idToPlugin[t];e&&(e.disabled=!0),this.indexPlugins()}removePlugin(t){delete this.idToPlugin[t],this.indexPlugins()}runOnBeforeDataOut(t,e){let r={...t};for(let i of this.onBeforeDataOut){let n=this.idToPlugin[i];if(n.onBeforeDataOut){let a=n.onBeforeDataOut({data:r.data,logLevel:r.logLevel,error:r.error,metadata:r.metadata,context:r.context},e);a&&(r.data||(r.data={}),Object.assign(r.data,a))}}return r.data}runShouldSendToLogger(t,e){return!this.shouldSendToLogger.some(r=>!this.idToPlugin[r].shouldSendToLogger?.(t,e))}runOnMetadataCalled(t,e){let r={...t};for(let i of this.onMetadataCalled){let n=this.idToPlugin[i].onMetadataCalled?.(r,e);if(n)r=n;else return null}return r}runOnBeforeMessageOut(t,e){let r=[...t.messages];for(let i of this.onBeforeMessageOut){let n=this.idToPlugin[i].onBeforeMessageOut?.({messages:r,logLevel:t.logLevel},e);n&&(r=n)}return r}runOnContextCalled(t,e){let r={...t};for(let i of this.onContextCalled){let n=this.idToPlugin[i].onContextCalled?.(r,e);if(n)r=n;else return null}return r}},Poe=class Uen{pluginManager;idToTransport;hasMultipleTransports;singleTransport;contextManager;logLevelEnabledStatus={info:!0,warn:!0,error:!0,debug:!0,trace:!0,fatal:!0};_config;constructor(e){this._config={...e,enabled:e.enabled??!0},this._config.enabled||this.disableLogging(),this.contextManager=new qen,this.pluginManager=new Len(e.plugins||[]),this._config.errorFieldName||(this._config.errorFieldName="err"),this._config.copyMsgOnOnlyError||(this._config.copyMsgOnOnlyError=!1),this._initializeTransports(this._config.transport)}withContextManager(e){return this.contextManager&&typeof this.contextManager[Symbol.dispose]=="function"&&this.contextManager[Symbol.dispose](),this.contextManager=e,this}getContextManager(){return this.contextManager}_initializeTransports(e){if(this.idToTransport)for(let r in this.idToTransport)this.idToTransport[r]&&typeof this.idToTransport[r][Symbol.dispose]=="function"&&this.idToTransport[r][Symbol.dispose]();this.hasMultipleTransports=Array.isArray(e)&&e.length>1,this.singleTransport=this.hasMultipleTransports?null:Array.isArray(e)?e[0]:e,Array.isArray(e)?this.idToTransport=e.reduce((r,i)=>(r[i.id]=i,r),{}):this.idToTransport={[e.id]:e}}withPrefix(e){let r=this.child();return r._config.prefix=e,r}withContext(e){let r=e;return e?this.pluginManager.hasPlugins(oy.onContextCalled)&&(r=this.pluginManager.runOnContextCalled(e,this),!r)?(this._config.consoleDebug&&console.debug("[LogLayer] Context was dropped due to plugin returning falsy value."),this):(this.contextManager.appendContext(r),this):(this._config.consoleDebug&&console.debug("[LogLayer] withContext was called with no context; dropping."),this)}clearContext(){return this.contextManager.setContext(void 0),this}getContext(){return this.contextManager.getContext()}addPlugins(e){this.pluginManager.addPlugins(e)}enablePlugin(e){this.pluginManager.enablePlugin(e)}disablePlugin(e){this.pluginManager.disablePlugin(e)}removePlugin(e){this.pluginManager.removePlugin(e)}withMetadata(e){return new jen(this).withMetadata(e)}withError(e){return new jen(this).withError(e)}child(){let e=new Uen({...this._config,transport:Array.isArray(this._config.transport)?[...this._config.transport]:this._config.transport}).withPluginManager(this.pluginManager).withContextManager(this.contextManager.clone());return this.contextManager.onChildLoggerCreated({parentContextManager:this.contextManager,childContextManager:e.contextManager,parentLogger:this,childLogger:e}),e}withFreshTransports(e){return this._config.transport=e,this._initializeTransports(e),this}withFreshPlugins(e){return this._config.plugins=e,this.pluginManager=new Len(e),this}withPluginManager(e){return this.pluginManager=e,this}errorOnly(e,r){let i=r?.logLevel||Li.error;if(!this.isLevelEnabled(i))return;let{copyMsgOnOnlyError:n}=this._config,a={logLevel:i,err:e};(n&&r?.copyMsg!==!1||r?.copyMsg===!0)&&e?.message&&(a.params=[e.message]),this._formatLog(a)}metadataOnly(e,r=Li.info){if(!this.isLevelEnabled(r))return;let{muteMetadata:i,consoleDebug:n}=this._config;if(i)return;if(!e){n&&console.debug("[LogLayer] metadataOnly was called with no metadata; dropping.");return}let a=e;if(this.pluginManager.hasPlugins(oy.onMetadataCalled)&&(a=this.pluginManager.runOnMetadataCalled(e,this),!a)){n&&console.debug("[LogLayer] Metadata was dropped due to plugin returning falsy value.");return}let o={logLevel:r,metadata:a};this._formatLog(o)}info(...e){this.isLevelEnabled(Li.info)&&(this._formatMessage(e),this._formatLog({logLevel:Li.info,params:e}))}warn(...e){this.isLevelEnabled(Li.warn)&&(this._formatMessage(e),this._formatLog({logLevel:Li.warn,params:e}))}error(...e){this.isLevelEnabled(Li.error)&&(this._formatMessage(e),this._formatLog({logLevel:Li.error,params:e}))}debug(...e){this.isLevelEnabled(Li.debug)&&(this._formatMessage(e),this._formatLog({logLevel:Li.debug,params:e}))}trace(...e){this.isLevelEnabled(Li.trace)&&(this._formatMessage(e),this._formatLog({logLevel:Li.trace,params:e}))}fatal(...e){this.isLevelEnabled(Li.fatal)&&(this._formatMessage(e),this._formatLog({logLevel:Li.fatal,params:e}))}raw(e){if(!this.isLevelEnabled(e.logLevel))return;let r={logLevel:e.logLevel,params:e.messages,metadata:e.metadata,err:e.error,context:e.context};this._formatMessage(e.messages),this._formatLog(r)}disableLogging(){for(let e of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[e]=!1;return this}enableLogging(){for(let e of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[e]=!0;return this}muteContext(){return this._config.muteContext=!0,this}unMuteContext(){return this._config.muteContext=!1,this}muteMetadata(){return this._config.muteMetadata=!0,this}unMuteMetadata(){return this._config.muteMetadata=!1,this}enableIndividualLevel(e){let r=e;return r in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[r]=!0),this}disableIndividualLevel(e){let r=e;return r in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[r]=!1),this}setLevel(e){let r=z9[e];for(let i of Object.values(Li)){let n=i,a=z9[i];this.logLevelEnabledStatus[n]=a>=r}return this}isLevelEnabled(e){let r=e;return this.logLevelEnabledStatus[r]}formatContext(e){let{contextFieldName:r,muteContext:i}=this._config;return e&&Object.keys(e).length>0&&!i?r?{[r]:{...e}}:{...e}:{}}formatMetadata(e=null){let{metadataFieldName:r,muteMetadata:i}=this._config;return e&&!i?r?{[r]:{...e}}:{...e}:{}}getLoggerInstance(e){let r=this.idToTransport[e];if(r)return r.getLoggerInstance()}_formatMessage(e=[]){let{prefix:r}=this._config;r&&typeof e[0]=="string"&&(e[0]=`${r} ${e[0]}`)}_formatLog({logLevel:e,params:r=[],metadata:i=null,err:n,context:a=null}){let{errorSerializer:o,errorFieldInMetadata:s,muteContext:u,contextFieldName:l,metadataFieldName:c,errorFieldName:y}=this._config,m=a!==null?a:this.contextManager.getContext(),C=!!i||(u?!1:a!==null?Object.keys(a).length>0:this.contextManager.hasContextData()),E={};if(C)if(l&&l===c){let v=this.formatContext(m)[l],T=this.formatMetadata(i)[c];E={[l]:{...v,...T}}}else E={...this.formatContext(m),...this.formatMetadata(i)};if(n){let v=o?o(n):n;s&&i&&c?E?.[c]?E[c][y]=v:E={...E,[c]:{[y]:v}}:s&&!i&&c?E={...E,[c]:{[y]:v}}:E={...E,[y]:v},C=!0}if(this.pluginManager.hasPlugins(oy.onBeforeDataOut)&&(E=this.pluginManager.runOnBeforeDataOut({data:C?E:void 0,logLevel:e,error:n,metadata:i,context:m},this),E&&!C&&(C=!0)),this.pluginManager.hasPlugins(oy.onBeforeMessageOut)&&(r=this.pluginManager.runOnBeforeMessageOut({messages:[...r],logLevel:e},this)),this.hasMultipleTransports){let v=this._config.transport.filter(T=>T.enabled).map(async T=>{if(!(this.pluginManager.hasPlugins(oy.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...r],data:C?E:void 0,logLevel:e,transportId:T.id,error:n,metadata:i,context:m},this)))return T._sendToLogger({logLevel:e,messages:[...r],data:C?E:void 0,hasData:C,error:n,metadata:i,context:m})});Promise.all(v).catch(T=>{this._config.consoleDebug&&console.error("[LogLayer] Error executing transports:",T)})}else{if(!this.singleTransport?.enabled||this.pluginManager.hasPlugins(oy.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...r],data:C?E:void 0,logLevel:e,transportId:this.singleTransport.id,error:n,metadata:i,context:m},this))return;this.singleTransport._sendToLogger({logLevel:e,messages:[...r],data:C?E:void 0,hasData:C,error:n,metadata:i,context:m})}}};var zen=class extends Doe{shipToLoggerFn;constructor(t){super(t),this.shipToLoggerFn=t.shipToLogger}shipToLogger(t){return this.shipToLoggerFn(t)}};var G9=class extends zen{};var H7=class t{constructor(e,r,i=void 0){this.defaultMetadata=e;this.transports=r;this._logger=i}get logger(){return this._logger||(this._logger=new Poe({transport:this.transports}).withContext(this.defaultMetadata)),this._logger}getContext(e){return{...this.defaultMetadata,...e,...cm().logContext}}logDirect(e,r,i){let n=this.getContext(i),a;e==="warning"||e==="alert"?a="warn":e==="emerg"?a="fatal":a=e;for(let o of this.transports)o instanceof G9&&!o.enabled||o.shipToLogger&&o.shipToLogger({logLevel:a,messages:[r],data:n,hasData:Object.keys(n).length>0})}debug(e,r){this.logDirect("debug",e,r)}info(e,r){this.logDirect("info",e,r)}warning(e,r){this.logDirect("warning",e,r)}error(e,r){this.logDirect("error",e,r)}emerg(e,r){this.logDirect("emerg",e,r)}alert(e,r){this.logDirect("alert",e,r)}log(e,r,i){this.logDirect(e,r,i)}child(e){return new t({...this.defaultMetadata,...e},this.transports,void 0)}silenceConsole(e){for(let r of this.transports)r instanceof G9&&(r.enabled=!e)}};var v0a=typeof global=="object"&&global&&global.Object===Object&&global,Qoe=v0a;var B0a=typeof self=="object"&&self&&self.Object===Object&&self,R0a=Qoe||B0a||Function("return this")(),Rc=R0a;var w0a=Rc.Symbol,vp=w0a;var Gen=Object.prototype,T0a=Gen.hasOwnProperty,_0a=Gen.toString,bK=vp?vp.toStringTag:void 0;function D0a(t){var e=T0a.call(t,bK),r=t[bK];try{t[bK]=void 0;var i=!0}catch{}var n=_0a.call(t);return i&&(e?t[bK]=r:delete t[bK]),n}var Hen=D0a;var P0a=Object.prototype,Q0a=P0a.toString;function O0a(t){return Q0a.call(t)}var Ven=O0a;var N0a="[object Null]",M0a="[object Undefined]",Ken=vp?vp.toStringTag:void 0;function x0a(t){return t==null?t===void 0?M0a:N0a:Ken&&Ken in Object(t)?Hen(t):Ven(t)}var Rg=x0a;function k0a(t){return t!=null&&typeof t=="object"}var Xl=k0a;var q0a="[object Symbol]";function F0a(t){return typeof t=="symbol"||Xl(t)&&Rg(t)==q0a}var KI=F0a;function j0a(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var V7=j0a;var L0a=Array.isArray,Bs=L0a;var U0a=1/0,Wen=vp?vp.prototype:void 0,Jen=Wen?Wen.toString:void 0;function Yen(t){if(typeof t=="string")return t;if(Bs(t))return V7(t,Yen)+"";if(KI(t))return Jen?Jen.call(t):"";var e=t+"";return e=="0"&&1/t==-U0a?"-0":e}var Zen=Yen;var z0a=/\s/;function G0a(t){for(var e=t.length;e--&&z0a.test(t.charAt(e)););return e}var $en=G0a;var H0a=/^\s+/;function V0a(t){return t&&t.slice(0,$en(t)+1).replace(H0a,"")}var Xen=V0a;function K0a(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Rs=K0a;var etn=NaN,W0a=/^[-+]0x[0-9a-f]+$/i,J0a=/^0b[01]+$/i,Y0a=/^0o[0-7]+$/i,Z0a=parseInt;function $0a(t){if(typeof t=="number")return t;if(KI(t))return etn;if(Rs(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Rs(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Xen(t);var r=J0a.test(t);return r||Y0a.test(t)?Z0a(t.slice(2),r?2:8):W0a.test(t)?etn:+t}var ttn=$0a;var rtn=1/0,X0a=17976931348623157e292;function eba(t){if(!t)return t===0?t:0;if(t=ttn(t),t===rtn||t===-rtn){var e=t<0?-1:1;return e*X0a}return t===t?t:0}var itn=eba;function tba(t){var e=itn(t),r=e%1;return e===e?r?e-r:e:0}var ntn=tba;function rba(t){return t}var WI=rba;var iba="[object AsyncFunction]",nba="[object Function]",aba="[object GeneratorFunction]",oba="[object Proxy]";function sba(t){if(!Rs(t))return!1;var e=Rg(t);return e==nba||e==aba||e==iba||e==oba}var K7=sba;var uba=Rc["__core-js_shared__"],Ooe=uba;var atn=function(){var t=/[^.]+$/.exec(Ooe&&Ooe.keys&&Ooe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function lba(t){return!!atn&&atn in t}var otn=lba;var cba=Function.prototype,pba=cba.toString;function dba(t){if(t!=null){try{return pba.call(t)}catch{}try{return t+""}catch{}}return""}var UB=dba;var Aba=/[\\^$.*+?()[\]{}|]/g,gba=/^\[object .+?Constructor\]$/,hba=Function.prototype,yba=Object.prototype,fba=hba.toString,mba=yba.hasOwnProperty,bba=RegExp("^"+fba.call(mba).replace(Aba,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cba(t){if(!Rs(t)||otn(t))return!1;var e=K7(t)?bba:gba;return e.test(UB(t))}var stn=Cba;function Iba(t,e){return t?.[e]}var utn=Iba;function Eba(t,e){var r=utn(t,e);return stn(r)?r:void 0}var sy=Eba;var Sba=sy(Rc,"WeakMap"),Noe=Sba;var ltn=Object.create,vba=function(){function t(){}return function(e){if(!Rs(e))return{};if(ltn)return ltn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),ctn=vba;function Bba(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var ptn=Bba;function Rba(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var Moe=Rba;var wba=800,Tba=16,_ba=Date.now;function Dba(t){var e=0,r=0;return function(){var i=_ba(),n=Tba-(i-r);if(r=i,n>0){if(++e>=wba)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var dtn=Dba;function Pba(t){return function(){return t}}var Atn=Pba;var Qba=function(){try{var t=sy(Object,"defineProperty");return t({},"",{}),t}catch{}}(),W7=Qba;var Oba=W7?function(t,e){return W7(t,"toString",{configurable:!0,enumerable:!1,value:Atn(e),writable:!0})}:WI,gtn=Oba;var Nba=dtn(gtn),xoe=Nba;function Mba(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}var htn=Mba;var xba=9007199254740991,kba=/^(?:0|[1-9]\d*)$/;function qba(t,e){var r=typeof t;return e=e??xba,!!e&&(r=="number"||r!="symbol"&&kba.test(t))&&t>-1&&t%1==0&&t<e}var Y5=qba;function Fba(t,e,r){e=="__proto__"&&W7?W7(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var J7=Fba;function jba(t,e){return t===e||t!==t&&e!==e}var JI=jba;var Lba=Object.prototype,Uba=Lba.hasOwnProperty;function zba(t,e,r){var i=t[e];(!(Uba.call(t,e)&&JI(i,r))||r===void 0&&!(e in t))&&J7(t,e,r)}var Y7=zba;function Gba(t,e,r,i){var n=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var s=e[a],u=i?i(r[s],t[s],s,r,t):void 0;u===void 0&&(u=t[s]),n?J7(r,s,u):Y7(r,s,u)}return r}var D0=Gba;var ytn=Math.max;function Hba(t,e,r){return e=ytn(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,a=ytn(i.length-e,0),o=Array(a);++n<a;)o[n]=i[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=i[n];return s[e]=r(o),ptn(t,this,s)}}var koe=Hba;function Vba(t,e){return xoe(koe(t,e,WI),t+"")}var ftn=Vba;var Kba=9007199254740991;function Wba(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Kba}var Z7=Wba;function Jba(t){return t!=null&&Z7(t.length)&&!K7(t)}var Z5=Jba;function Yba(t,e,r){if(!Rs(r))return!1;var i=typeof e;return(i=="number"?Z5(r)&&Y5(e,r.length):i=="string"&&e in r)?JI(r[e],t):!1}var qoe=Yba;function Zba(t){return ftn(function(e,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,o&&qoe(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),e=Object(e);++i<n;){var s=r[i];s&&t(e,s,i,a)}return e})}var mtn=Zba;var $ba=Object.prototype;function Xba(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||$ba;return t===r}var $7=Xba;function eCa(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var btn=eCa;var tCa="[object Arguments]";function rCa(t){return Xl(t)&&Rg(t)==tCa}var C2r=rCa;var Ctn=Object.prototype,iCa=Ctn.hasOwnProperty,nCa=Ctn.propertyIsEnumerable,aCa=C2r(function(){return arguments}())?C2r:function(t){return Xl(t)&&iCa.call(t,"callee")&&!nCa.call(t,"callee")},zB=aCa;function oCa(){return!1}var Itn=oCa;var vtn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Etn=vtn&&typeof module=="object"&&module&&!module.nodeType&&module,sCa=Etn&&Etn.exports===vtn,Stn=sCa?Rc.Buffer:void 0,uCa=Stn?Stn.isBuffer:void 0,lCa=uCa||Itn,GB=lCa;var cCa="[object Arguments]",pCa="[object Array]",dCa="[object Boolean]",ACa="[object Date]",gCa="[object Error]",hCa="[object Function]",yCa="[object Map]",fCa="[object Number]",mCa="[object Object]",bCa="[object RegExp]",CCa="[object Set]",ICa="[object String]",ECa="[object WeakMap]",SCa="[object ArrayBuffer]",vCa="[object DataView]",BCa="[object Float32Array]",RCa="[object Float64Array]",wCa="[object Int8Array]",TCa="[object Int16Array]",_Ca="[object Int32Array]",DCa="[object Uint8Array]",PCa="[object Uint8ClampedArray]",QCa="[object Uint16Array]",OCa="[object Uint32Array]",hu={};hu[BCa]=hu[RCa]=hu[wCa]=hu[TCa]=hu[_Ca]=hu[DCa]=hu[PCa]=hu[QCa]=hu[OCa]=!0;hu[cCa]=hu[pCa]=hu[SCa]=hu[dCa]=hu[vCa]=hu[ACa]=hu[gCa]=hu[hCa]=hu[yCa]=hu[fCa]=hu[mCa]=hu[bCa]=hu[CCa]=hu[ICa]=hu[ECa]=!1;function NCa(t){return Xl(t)&&Z7(t.length)&&!!hu[Rg(t)]}var Btn=NCa;function MCa(t){return function(e){return t(e)}}var $5=MCa;var Rtn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,CK=Rtn&&typeof module=="object"&&module&&!module.nodeType&&module,xCa=CK&&CK.exports===Rtn,I2r=xCa&&Qoe.process,kCa=function(){try{var t=CK&&CK.require&&CK.require("util").types;return t||I2r&&I2r.binding&&I2r.binding("util")}catch{}}(),P0=kCa;var wtn=P0&&P0.isTypedArray,qCa=wtn?$5(wtn):Btn,X7=qCa;var FCa=Object.prototype,jCa=FCa.hasOwnProperty;function LCa(t,e){var r=Bs(t),i=!r&&zB(t),n=!r&&!i&&GB(t),a=!r&&!i&&!n&&X7(t),o=r||i||n||a,s=o?btn(t.length,String):[],u=s.length;for(var l in t)(e||jCa.call(t,l))&&!(o&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Y5(l,u)))&&s.push(l);return s}var Foe=LCa;function UCa(t,e){return function(r){return t(e(r))}}var joe=UCa;var zCa=joe(Object.keys,Object),Ttn=zCa;var GCa=Object.prototype,HCa=GCa.hasOwnProperty;function VCa(t){if(!$7(t))return Ttn(t);var e=[];for(var r in Object(t))HCa.call(t,r)&&r!="constructor"&&e.push(r);return e}var _tn=VCa;function KCa(t){return Z5(t)?Foe(t):_tn(t)}var YI=KCa;function WCa(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Dtn=WCa;var JCa=Object.prototype,YCa=JCa.hasOwnProperty;function ZCa(t){if(!Rs(t))return Dtn(t);var e=$7(t),r=[];for(var i in t)i=="constructor"&&(e||!YCa.call(t,i))||r.push(i);return r}var Ptn=ZCa;function $Ca(t){return Z5(t)?Foe(t,!0):Ptn(t)}var ZI=$Ca;var XCa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e2a=/^\w*$/;function t2a(t,e){if(Bs(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||KI(t)?!0:e2a.test(t)||!XCa.test(t)||e!=null&&t in Object(e)}var ex=t2a;var r2a=sy(Object,"create"),HB=r2a;function i2a(){this.__data__=HB?HB(null):{},this.size=0}var Qtn=i2a;function n2a(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Otn=n2a;var a2a="__lodash_hash_undefined__",o2a=Object.prototype,s2a=o2a.hasOwnProperty;function u2a(t){var e=this.__data__;if(HB){var r=e[t];return r===a2a?void 0:r}return s2a.call(e,t)?e[t]:void 0}var Ntn=u2a;var l2a=Object.prototype,c2a=l2a.hasOwnProperty;function p2a(t){var e=this.__data__;return HB?e[t]!==void 0:c2a.call(e,t)}var Mtn=p2a;var d2a="__lodash_hash_undefined__";function A2a(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=HB&&e===void 0?d2a:e,this}var xtn=A2a;function tx(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}tx.prototype.clear=Qtn;tx.prototype.delete=Otn;tx.prototype.get=Ntn;tx.prototype.has=Mtn;tx.prototype.set=xtn;var E2r=tx;function g2a(){this.__data__=[],this.size=0}var ktn=g2a;function h2a(t,e){for(var r=t.length;r--;)if(JI(t[r][0],e))return r;return-1}var X5=h2a;var y2a=Array.prototype,f2a=y2a.splice;function m2a(t){var e=this.__data__,r=X5(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():f2a.call(e,r,1),--this.size,!0}var qtn=m2a;function b2a(t){var e=this.__data__,r=X5(e,t);return r<0?void 0:e[r][1]}var Ftn=b2a;function C2a(t){return X5(this.__data__,t)>-1}var jtn=C2a;function I2a(t,e){var r=this.__data__,i=X5(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var Ltn=I2a;function rx(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}rx.prototype.clear=ktn;rx.prototype.delete=qtn;rx.prototype.get=Ftn;rx.prototype.has=jtn;rx.prototype.set=Ltn;var eT=rx;var E2a=sy(Rc,"Map"),tT=E2a;function S2a(){this.size=0,this.__data__={hash:new E2r,map:new(tT||eT),string:new E2r}}var Utn=S2a;function v2a(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ztn=v2a;function B2a(t,e){var r=t.__data__;return ztn(e)?r[typeof e=="string"?"string":"hash"]:r.map}var rT=B2a;function R2a(t){var e=rT(this,t).delete(t);return this.size-=e?1:0,e}var Gtn=R2a;function w2a(t){return rT(this,t).get(t)}var Htn=w2a;function T2a(t){return rT(this,t).has(t)}var Vtn=T2a;function _2a(t,e){var r=rT(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var Ktn=_2a;function ix(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ix.prototype.clear=Utn;ix.prototype.delete=Gtn;ix.prototype.get=Htn;ix.prototype.has=Vtn;ix.prototype.set=Ktn;var H9=ix;var D2a="Expected a function";function S2r(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(D2a);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(S2r.Cache||H9),r}S2r.Cache=H9;var Wtn=S2r;var P2a=500;function Q2a(t){var e=Wtn(t,function(i){return r.size===P2a&&r.clear(),i}),r=e.cache;return e}var Jtn=Q2a;var O2a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N2a=/\\(\\)?/g,M2a=Jtn(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(O2a,function(r,i,n,a){e.push(n?a.replace(N2a,"$1"):i||r)}),e}),Ytn=M2a;function x2a(t){return t==null?"":Zen(t)}var Ztn=x2a;function k2a(t,e){return Bs(t)?t:ex(t,e)?[t]:Ytn(Ztn(t))}var Q0=k2a;var q2a=1/0;function F2a(t){if(typeof t=="string"||KI(t))return t;var e=t+"";return e=="0"&&1/t==-q2a?"-0":e}var O0=F2a;function j2a(t,e){e=Q0(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[O0(e[r++])];return r&&r==i?t:void 0}var iT=j2a;function L2a(t,e,r){var i=t==null?void 0:iT(t,e);return i===void 0?r:i}var $tn=L2a;function U2a(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var nx=U2a;var Xtn=vp?vp.isConcatSpreadable:void 0;function z2a(t){return Bs(t)||zB(t)||!!(Xtn&&t&&t[Xtn])}var ern=z2a;function trn(t,e,r,i,n){var a=-1,o=t.length;for(r||(r=ern),n||(n=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?trn(s,e-1,r,i,n):nx(n,s):i||(n[n.length]=s)}return n}var rrn=trn;function G2a(t){var e=t==null?0:t.length;return e?rrn(t,1):[]}var irn=G2a;function H2a(t){return xoe(koe(t,void 0,irn),t+"")}var Loe=H2a;var V2a=joe(Object.getPrototypeOf,Object),ax=V2a;var K2a="[object Object]",W2a=Function.prototype,J2a=Object.prototype,nrn=W2a.toString,Y2a=J2a.hasOwnProperty,Z2a=nrn.call(Object);function $2a(t){if(!Xl(t)||Rg(t)!=K2a)return!1;var e=ax(t);if(e===null)return!0;var r=Y2a.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&nrn.call(r)==Z2a}var Uoe=$2a;function X2a(t,e,r){var i=-1,n=t.length;e<0&&(e=-e>n?0:n+e),r=r>n?n:r,r<0&&(r+=n),n=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(n);++i<n;)a[i]=t[i+e];return a}var zoe=X2a;var e1a=Math.ceil,t1a=Math.max;function r1a(t,e,r){(r?qoe(t,e,r):e===void 0)?e=1:e=t1a(ntn(e),0);var i=t==null?0:t.length;if(!i||e<1)return[];for(var n=0,a=0,o=Array(e1a(i/e));n<i;)o[a++]=zoe(t,n,n+=e);return o}var P2=r1a;function i1a(){this.__data__=new eT,this.size=0}var arn=i1a;function n1a(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var orn=n1a;function a1a(t){return this.__data__.get(t)}var srn=a1a;function o1a(t){return this.__data__.has(t)}var urn=o1a;var s1a=200;function u1a(t,e){var r=this.__data__;if(r instanceof eT){var i=r.__data__;if(!tT||i.length<s1a-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new H9(i)}return r.set(t,e),this.size=r.size,this}var lrn=u1a;function ox(t){var e=this.__data__=new eT(t);this.size=e.size}ox.prototype.clear=arn;ox.prototype.delete=orn;ox.prototype.get=srn;ox.prototype.has=urn;ox.prototype.set=lrn;var $I=ox;function l1a(t,e){return t&&D0(e,YI(e),t)}var crn=l1a;function c1a(t,e){return t&&D0(e,ZI(e),t)}var prn=c1a;var hrn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,drn=hrn&&typeof module=="object"&&module&&!module.nodeType&&module,p1a=drn&&drn.exports===hrn,Arn=p1a?Rc.Buffer:void 0,grn=Arn?Arn.allocUnsafe:void 0;function d1a(t,e){if(e)return t.slice();var r=t.length,i=grn?grn(r):new t.constructor(r);return t.copy(i),i}var Goe=d1a;function A1a(t,e){for(var r=-1,i=t==null?0:t.length,n=0,a=[];++r<i;){var o=t[r];e(o,r,t)&&(a[n++]=o)}return a}var yrn=A1a;function g1a(){return[]}var Hoe=g1a;var h1a=Object.prototype,y1a=h1a.propertyIsEnumerable,frn=Object.getOwnPropertySymbols,f1a=frn?function(t){return t==null?[]:(t=Object(t),yrn(frn(t),function(e){return y1a.call(t,e)}))}:Hoe,sx=f1a;function m1a(t,e){return D0(t,sx(t),e)}var mrn=m1a;var b1a=Object.getOwnPropertySymbols,C1a=b1a?function(t){for(var e=[];t;)nx(e,sx(t)),t=ax(t);return e}:Hoe,Voe=C1a;function I1a(t,e){return D0(t,Voe(t),e)}var brn=I1a;function E1a(t,e,r){var i=e(t);return Bs(t)?i:nx(i,r(t))}var Koe=E1a;function S1a(t){return Koe(t,YI,sx)}var IK=S1a;function v1a(t){return Koe(t,ZI,Voe)}var ux=v1a;var B1a=sy(Rc,"DataView"),Woe=B1a;var R1a=sy(Rc,"Promise"),Joe=R1a;var w1a=sy(Rc,"Set"),Yoe=w1a;var Crn="[object Map]",T1a="[object Object]",Irn="[object Promise]",Ern="[object Set]",Srn="[object WeakMap]",vrn="[object DataView]",_1a=UB(Woe),D1a=UB(tT),P1a=UB(Joe),Q1a=UB(Yoe),O1a=UB(Noe),V9=Rg;(Woe&&V9(new Woe(new ArrayBuffer(1)))!=vrn||tT&&V9(new tT)!=Crn||Joe&&V9(Joe.resolve())!=Irn||Yoe&&V9(new Yoe)!=Ern||Noe&&V9(new Noe)!=Srn)&&(V9=function(t){var e=Rg(t),r=e==T1a?t.constructor:void 0,i=r?UB(r):"";if(i)switch(i){case _1a:return vrn;case D1a:return Crn;case P1a:return Irn;case Q1a:return Ern;case O1a:return Srn}return e});var VB=V9;var N1a=Object.prototype,M1a=N1a.hasOwnProperty;function x1a(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&M1a.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Brn=x1a;var k1a=Rc.Uint8Array,lx=k1a;function q1a(t){var e=new t.constructor(t.byteLength);return new lx(e).set(new lx(t)),e}var cx=q1a;function F1a(t,e){var r=e?cx(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Rrn=F1a;var j1a=/\w*$/;function L1a(t){var e=new t.constructor(t.source,j1a.exec(t));return e.lastIndex=t.lastIndex,e}var wrn=L1a;var Trn=vp?vp.prototype:void 0,_rn=Trn?Trn.valueOf:void 0;function U1a(t){return _rn?Object(_rn.call(t)):{}}var Drn=U1a;function z1a(t,e){var r=e?cx(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Zoe=z1a;var G1a="[object Boolean]",H1a="[object Date]",V1a="[object Map]",K1a="[object Number]",W1a="[object RegExp]",J1a="[object Set]",Y1a="[object String]",Z1a="[object Symbol]",$1a="[object ArrayBuffer]",X1a="[object DataView]",eIa="[object Float32Array]",tIa="[object Float64Array]",rIa="[object Int8Array]",iIa="[object Int16Array]",nIa="[object Int32Array]",aIa="[object Uint8Array]",oIa="[object Uint8ClampedArray]",sIa="[object Uint16Array]",uIa="[object Uint32Array]";function lIa(t,e,r){var i=t.constructor;switch(e){case $1a:return cx(t);case G1a:case H1a:return new i(+t);case X1a:return Rrn(t,r);case eIa:case tIa:case rIa:case iIa:case nIa:case aIa:case oIa:case sIa:case uIa:return Zoe(t,r);case V1a:return new i;case K1a:case Y1a:return new i(t);case W1a:return wrn(t);case J1a:return new i;case Z1a:return Drn(t)}}var Prn=lIa;function cIa(t){return typeof t.constructor=="function"&&!$7(t)?ctn(ax(t)):{}}var $oe=cIa;var pIa="[object Map]";function dIa(t){return Xl(t)&&VB(t)==pIa}var Qrn=dIa;var Orn=P0&&P0.isMap,AIa=Orn?$5(Orn):Qrn,Nrn=AIa;var gIa="[object Set]";function hIa(t){return Xl(t)&&VB(t)==gIa}var Mrn=hIa;var xrn=P0&&P0.isSet,yIa=xrn?$5(xrn):Mrn,krn=yIa;var fIa=1,mIa=2,bIa=4,qrn="[object Arguments]",CIa="[object Array]",IIa="[object Boolean]",EIa="[object Date]",SIa="[object Error]",Frn="[object Function]",vIa="[object GeneratorFunction]",BIa="[object Map]",RIa="[object Number]",jrn="[object Object]",wIa="[object RegExp]",TIa="[object Set]",_Ia="[object String]",DIa="[object Symbol]",PIa="[object WeakMap]",QIa="[object ArrayBuffer]",OIa="[object DataView]",NIa="[object Float32Array]",MIa="[object Float64Array]",xIa="[object Int8Array]",kIa="[object Int16Array]",qIa="[object Int32Array]",FIa="[object Uint8Array]",jIa="[object Uint8ClampedArray]",LIa="[object Uint16Array]",UIa="[object Uint32Array]",zs={};zs[qrn]=zs[CIa]=zs[QIa]=zs[OIa]=zs[IIa]=zs[EIa]=zs[NIa]=zs[MIa]=zs[xIa]=zs[kIa]=zs[qIa]=zs[BIa]=zs[RIa]=zs[jrn]=zs[wIa]=zs[TIa]=zs[_Ia]=zs[DIa]=zs[FIa]=zs[jIa]=zs[LIa]=zs[UIa]=!0;zs[SIa]=zs[Frn]=zs[PIa]=!1;function Xoe(t,e,r,i,n,a){var o,s=e&fIa,u=e&mIa,l=e&bIa;if(r&&(o=n?r(t,i,n,a):r(t)),o!==void 0)return o;if(!Rs(t))return t;var c=Bs(t);if(c){if(o=Brn(t),!s)return Moe(t,o)}else{var y=VB(t),m=y==Frn||y==vIa;if(GB(t))return Goe(t,s);if(y==jrn||y==qrn||m&&!n){if(o=u||m?{}:$oe(t),!s)return u?brn(t,prn(o,t)):mrn(t,crn(o,t))}else{if(!zs[y])return n?t:{};o=Prn(t,y,s)}}a||(a=new $I);var C=a.get(t);if(C)return C;a.set(t,o),krn(t)?t.forEach(function(T){o.add(Xoe(T,e,r,T,t,a))}):Nrn(t)&&t.forEach(function(T,Q){o.set(Q,Xoe(T,e,r,Q,t,a))});var E=l?u?ux:IK:u?ZI:YI,v=c?void 0:E(t);return htn(v||t,function(T,Q){v&&(Q=T,T=t[Q]),Y7(o,Q,Xoe(T,e,r,Q,t,a))}),o}var px=Xoe;var zIa=1,GIa=4;function HIa(t){return px(t,zIa|GIa)}var uy=HIa;var VIa=1,KIa=4;function WIa(t,e){return e=typeof e=="function"?e:void 0,px(t,VIa|KIa,e)}var v2r=WIa;var JIa="__lodash_hash_undefined__";function YIa(t){return this.__data__.set(t,JIa),this}var Lrn=YIa;function ZIa(t){return this.__data__.has(t)}var Urn=ZIa;function ese(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new H9;++e<r;)this.add(t[e])}ese.prototype.add=ese.prototype.push=Lrn;ese.prototype.has=Urn;var zrn=ese;function $Ia(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}var Grn=$Ia;function XIa(t,e){return t.has(e)}var Hrn=XIa;var eEa=1,tEa=2;function rEa(t,e,r,i,n,a){var o=r&eEa,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var y=-1,m=!0,C=r&tEa?new zrn:void 0;for(a.set(t,e),a.set(e,t);++y<s;){var E=t[y],v=e[y];if(i)var T=o?i(v,E,y,e,t,a):i(E,v,y,t,e,a);if(T!==void 0){if(T)continue;m=!1;break}if(C){if(!Grn(e,function(Q,N){if(!Hrn(C,N)&&(E===Q||n(E,Q,r,i,a)))return C.push(N)})){m=!1;break}}else if(!(E===v||n(E,v,r,i,a))){m=!1;break}}return a.delete(t),a.delete(e),m}var tse=rEa;function iEa(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}var Vrn=iEa;function nEa(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var Krn=nEa;var aEa=1,oEa=2,sEa="[object Boolean]",uEa="[object Date]",lEa="[object Error]",cEa="[object Map]",pEa="[object Number]",dEa="[object RegExp]",AEa="[object Set]",gEa="[object String]",hEa="[object Symbol]",yEa="[object ArrayBuffer]",fEa="[object DataView]",Wrn=vp?vp.prototype:void 0,B2r=Wrn?Wrn.valueOf:void 0;function mEa(t,e,r,i,n,a,o){switch(r){case fEa:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case yEa:return!(t.byteLength!=e.byteLength||!a(new lx(t),new lx(e)));case sEa:case uEa:case pEa:return JI(+t,+e);case lEa:return t.name==e.name&&t.message==e.message;case dEa:case gEa:return t==e+"";case cEa:var s=Vrn;case AEa:var u=i&aEa;if(s||(s=Krn),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;i|=oEa,o.set(t,e);var c=tse(s(t),s(e),i,n,a,o);return o.delete(t),c;case hEa:if(B2r)return B2r.call(t)==B2r.call(e)}return!1}var Jrn=mEa;var bEa=1,CEa=Object.prototype,IEa=CEa.hasOwnProperty;function EEa(t,e,r,i,n,a){var o=r&bEa,s=IK(t),u=s.length,l=IK(e),c=l.length;if(u!=c&&!o)return!1;for(var y=u;y--;){var m=s[y];if(!(o?m in e:IEa.call(e,m)))return!1}var C=a.get(t),E=a.get(e);if(C&&E)return C==e&&E==t;var v=!0;a.set(t,e),a.set(e,t);for(var T=o;++y<u;){m=s[y];var Q=t[m],N=e[m];if(i)var M=o?i(N,Q,m,e,t,a):i(Q,N,m,t,e,a);if(!(M===void 0?Q===N||n(Q,N,r,i,a):M)){v=!1;break}T||(T=m=="constructor")}if(v&&!T){var x=t.constructor,q=e.constructor;x!=q&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof q=="function"&&q instanceof q)&&(v=!1)}return a.delete(t),a.delete(e),v}var Yrn=EEa;var SEa=1,Zrn="[object Arguments]",$rn="[object Array]",rse="[object Object]",vEa=Object.prototype,Xrn=vEa.hasOwnProperty;function BEa(t,e,r,i,n,a){var o=Bs(t),s=Bs(e),u=o?$rn:VB(t),l=s?$rn:VB(e);u=u==Zrn?rse:u,l=l==Zrn?rse:l;var c=u==rse,y=l==rse,m=u==l;if(m&&GB(t)){if(!GB(e))return!1;o=!0,c=!1}if(m&&!c)return a||(a=new $I),o||X7(t)?tse(t,e,r,i,n,a):Jrn(t,e,u,r,i,n,a);if(!(r&SEa)){var C=c&&Xrn.call(t,"__wrapped__"),E=y&&Xrn.call(e,"__wrapped__");if(C||E){var v=C?t.value():t,T=E?e.value():e;return a||(a=new $I),n(v,T,r,i,a)}}return m?(a||(a=new $I),Yrn(t,e,r,i,n,a)):!1}var ein=BEa;function tin(t,e,r,i,n){return t===e?!0:t==null||e==null||!Xl(t)&&!Xl(e)?t!==t&&e!==e:ein(t,e,r,i,tin,n)}var ise=tin;var REa=1,wEa=2;function TEa(t,e,r,i){var n=r.length,a=n,o=!i;if(t==null)return!a;for(t=Object(t);n--;){var s=r[n];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++n<a;){s=r[n];var u=s[0],l=t[u],c=s[1];if(o&&s[2]){if(l===void 0&&!(u in t))return!1}else{var y=new $I;if(i)var m=i(l,c,u,t,e,y);if(!(m===void 0?ise(c,l,REa|wEa,i,y):m))return!1}}return!0}var rin=TEa;function _Ea(t){return t===t&&!Rs(t)}var nse=_Ea;function DEa(t){for(var e=YI(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,nse(n)]}return e}var iin=DEa;function PEa(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ase=PEa;function QEa(t){var e=iin(t);return e.length==1&&e[0][2]?ase(e[0][0],e[0][1]):function(r){return r===t||rin(r,t,e)}}var nin=QEa;function OEa(t,e){return t!=null&&e in Object(t)}var ain=OEa;function NEa(t,e,r){e=Q0(e,t);for(var i=-1,n=e.length,a=!1;++i<n;){var o=O0(e[i]);if(!(a=t!=null&&r(t,o)))break;t=t[o]}return a||++i!=n?a:(n=t==null?0:t.length,!!n&&Z7(n)&&Y5(o,n)&&(Bs(t)||zB(t)))}var oin=NEa;function MEa(t,e){return t!=null&&oin(t,e,ain)}var ose=MEa;var xEa=1,kEa=2;function qEa(t,e){return ex(t)&&nse(e)?ase(O0(t),e):function(r){var i=$tn(r,t);return i===void 0&&i===e?ose(r,t):ise(e,i,xEa|kEa)}}var sin=qEa;function FEa(t){return function(e){return e?.[t]}}var uin=FEa;function jEa(t){return function(e){return iT(e,t)}}var lin=jEa;function LEa(t){return ex(t)?uin(O0(t)):lin(t)}var cin=LEa;function UEa(t){return typeof t=="function"?t:t==null?WI:typeof t=="object"?Bs(t)?sin(t[0],t[1]):nin(t):cin(t)}var dx=UEa;function zEa(t){return function(e,r,i){for(var n=-1,a=Object(e),o=i(e),s=o.length;s--;){var u=o[t?s:++n];if(r(a[u],u,a)===!1)break}return e}}var pin=zEa;var GEa=pin(),sse=GEa;function HEa(t,e){return t&&sse(t,e,YI)}var din=HEa;function VEa(t,e,r){(r!==void 0&&!JI(t[e],r)||r===void 0&&!(e in t))&&J7(t,e,r)}var EK=VEa;function KEa(t){return Xl(t)&&Z5(t)}var Ain=KEa;function WEa(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var SK=WEa;function JEa(t){return D0(t,ZI(t))}var gin=JEa;function YEa(t,e,r,i,n,a,o){var s=SK(t,r),u=SK(e,r),l=o.get(u);if(l){EK(t,r,l);return}var c=a?a(s,u,r+"",t,e,o):void 0,y=c===void 0;if(y){var m=Bs(u),C=!m&&GB(u),E=!m&&!C&&X7(u);c=u,m||C||E?Bs(s)?c=s:Ain(s)?c=Moe(s):C?(y=!1,c=Goe(u,!0)):E?(y=!1,c=Zoe(u,!0)):c=[]:Uoe(u)||zB(u)?(c=s,zB(s)?c=gin(s):(!Rs(s)||K7(s))&&(c=$oe(u))):y=!1}y&&(o.set(u,c),n(c,u,i,a,o),o.delete(u)),EK(t,r,c)}var hin=YEa;function yin(t,e,r,i,n){t!==e&&sse(e,function(a,o){if(n||(n=new $I),Rs(a))hin(t,e,o,r,yin,i,n);else{var s=i?i(SK(t,o),a,o+"",t,e,n):void 0;s===void 0&&(s=a),EK(t,o,s)}},ZI)}var fin=yin;function ZEa(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var min=ZEa;function $Ea(t){return typeof t=="function"?t:WI}var bin=$Ea;function XEa(t,e){return t&&din(t,bin(e))}var R2r=XEa;function e3a(t,e){return e.length<2?t:iT(t,zoe(e,0,-1))}var Cin=e3a;var t3a="[object Date]";function r3a(t){return Xl(t)&&Rg(t)==t3a}var Iin=r3a;var Ein=P0&&P0.isDate,i3a=Ein?$5(Ein):Iin,use=i3a;function n3a(t,e){return t<e}var Sin=n3a;function a3a(t,e,r){for(var i=-1,n=t.length;++i<n;){var a=t[i],o=e(a);if(o!=null&&(s===void 0?o===o&&!KI(o):r(o,s)))var s=o,u=a}return u}var vin=a3a;function o3a(t,e){for(var r,i=-1,n=t.length;++i<n;){var a=e(t[i]);a!==void 0&&(r=r===void 0?a:r+a)}return r}var Bin=o3a;var s3a=mtn(function(t,e,r){fin(t,e,r)}),w2r=s3a;function u3a(t,e){return t&&t.length?vin(t,dx(e,2),Sin):void 0}var T2r=u3a;var l3a="Expected a function";function c3a(t){if(typeof t!="function")throw new TypeError(l3a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var Rin=c3a;function p3a(t,e){return e=Q0(e,t),t=Cin(t,e),t==null||delete t[O0(min(e))]}var win=p3a;function d3a(t){return Uoe(t)?void 0:t}var Tin=d3a;var A3a=1,g3a=2,h3a=4,y3a=Loe(function(t,e){var r={};if(t==null)return r;var i=!1;e=V7(e,function(a){return a=Q0(a,t),i||(i=a.length>1),a}),D0(t,ux(t),r),i&&(r=px(r,A3a|g3a|h3a,Tin));for(var n=e.length;n--;)win(r,e[n]);return r}),KB=y3a;function f3a(t,e,r,i){if(!Rs(t))return t;e=Q0(e,t);for(var n=-1,a=e.length,o=a-1,s=t;s!=null&&++n<a;){var u=O0(e[n]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(n!=o){var c=s[u];l=i?i(c,u,s):void 0,l===void 0&&(l=Rs(c)?c:Y5(e[n+1])?[]:{})}Y7(s,u,l),s=s[u]}return t}var lse=f3a;function m3a(t,e,r){for(var i=-1,n=e.length,a={};++i<n;){var o=e[i],s=iT(t,o);r(s,o)&&lse(a,Q0(o,t),s)}return a}var cse=m3a;function b3a(t,e){if(t==null)return{};var r=V7(ux(t),function(i){return[i]});return e=dx(e),cse(t,r,function(i,n){return e(i,n[0])})}var _in=b3a;function C3a(t,e){return _in(t,Rin(dx(e)))}var _2r=C3a;function I3a(t,e){return cse(t,e,function(r,i){return ose(t,i)})}var Din=I3a;var E3a=Loe(function(t,e){return t==null?{}:Din(t,e)}),D2r=E3a;function S3a(t,e,r){return t==null?t:lse(t,e,r)}var vK=S3a;function v3a(t){return t&&t.length?Bin(t,WI):0}var P2r=v3a;var Ax=t=>v2r(t,(e,r)=>{if(typeof e=="string"&&typeof r=="string"&&r.match(/(password|token|keypair)/i))return"<REDACTED>"});var pse=class{constructor(e,r,i){this.logger=e;this.getAllFlags=r;this.getFlagValue=i}getValue(e,r,i){let n=this.getFlagValue(e),a=n===void 0?r:n;return this.assertFeatureFlagType(e,a,i)?a:r}get allFlags(){return this.getAllFlags()}getStringValue(e,r){return this.getValue(e,r,"string")}getNumericValue(e,r){return this.getValue(e,r,"number")}getObjectValue(e,r,i){let n=this.getValue(e,i,"object");return n!==void 0?r.assert(n):void 0}isFeatureEnabled(e,r){return!!this.getValue(e,r,"boolean")}assertFeatureFlagType(e,r,i){return D2(!!V5[e],`'${e}' is not a valid feature flag`,this.logger),r!==void 0&&typeof r!==V5[e].valueType?(this.logger.emerg(`Expected ${V5[e].valueType} feature flag value for ${e}, received ${typeof r}`),!1):i&&V5[e].valueType!==i?(this.logger.emerg(`Expected ${i} for feature flag ${e}, but it is defined as ${V5[e].valueType}`),!1):!0}},gx=class extends pse{constructor(e,r){super(r??Da(),()=>e,i=>e[i])}};function Q2r(){let t=null,e=null,r=new Promise((i,n)=>{t=i,e=n});if(t===null||e===null)throw new Error("The laws of [Javascript] physics have been violated!");return{promise:r,resolve:t,reject:e}}var RSl=S.object({orgID:$ae.optional(),userID:Xae.optional(),requestID:S.string().optional()}),O2r;var Pin=()=>(O2r||(O2r={logContext:{},featureFlags:new gx({})}),O2r),R3a=Pin;var cm=()=>R3a();var Qin=()=>process.env.PLAYWRIGHT==="true"||process.env.REACT_APP_PLAYWRIGHT==="true"?!0:typeof window<"u"&&typeof window.localStorage<"u"?window.localStorage.getItem("playwright")==="true":!1;typeof self>"u"&&typeof global<"u"&&(global.self=global);var WB=()=>!0,Oin=()=>!WB()&&typeof self<"u"&&(typeof Window>"u"||!(self instanceof Window)),Nin=()=>WB()&&!eval("require")("worker_threads").isMainThread,N0=(0,xin.default)(()=>{let t=WB();return{isWorker:t?Nin():Oin(),isNodeWorker:Nin(),isWebWorker:Oin(),isNode:t,isBrowser:!t,isProduction:!1,isDevelopment:!0,isTest:!0,isPlaywright:Qin(),selfType:typeof self,windowType:typeof Window,selfInstanceOfWindow:typeof Window<"u"&&self instanceof Window,selfPostMessage:typeof self<"u"&&!!self.postMessage}}),XI=process.env.APPLICATION_CONTEXT||void 0,QSl=t=>{if(XI===void 0)XI=t;else if(XI!=="test"&&XI!==t)throw new Error(`Changing application contexts from ${XI} to ${t} is disallowed`)},kin=t=>t===XI,OSl=()=>XI,qin=()=>XI==="scheduler"||XI==="test"&&process.env.GOOGLE_APPLICATION_CREDENTIALS,w3a=()=>XI==="cleanup",Min=()=>{let e=process.env.PORT;return e?parseInt(e):N0().isTest&&typeof process.env.JEST_WORKER_ID=="string"?8080+parseInt(process.env.JEST_WORKER_ID):N0().isTest&&typeof process.env.VITEST_WORKER_ID=="string"?8080+parseInt(process.env.VITEST_WORKER_ID):8080};function ly(){if(WB()){let t=process.env.SCHEDULER_ADDRESS;if(t)return t;throw new Error("Unable to determine base URL")}return self.location.origin}var T3a=t=>`http://${process.env.K8S_COA_TEST_HOST}:${t}`,dse=()=>process.env.SCHEDULER_ADDRESS?process.env.SCHEDULER_ADDRESS:N0().isTest?T3a(Min()):process.env.K8S_COA_SCHEDULER_URL||`http://localhost:${Min()}`,_3a=`http://localhost:${process.env.METADATA_SERVICE_PORT||"8808"}`,Ase=(t=_3a)=>{let e=process.env.METADATA_SERVICE_ADDRESS;if(e)return e;let r=process.env.AXIOS_POST_ADDRESS;return r||t},N2r=()=>parseInt(process.env.DEPLOY_SERVICE_PORT||"8008",10),gse=(t=`http://localhost:${N2r()}`)=>{let e={schedulerAddress:process.env.SCHEDULER_ADDRESS,deployServiceAddress:process.env.DEPLOY_SERVICE_ADDRESS,k8sDeployServiceUrl:process.env.K8S_COA_DEPLOY_SERVICE_URL,axiosPostAddress:process.env.AXIOS_POST_ADDRESS,deployServicePort:N2r(),isTest:N0().isTest,isNode:WB()};if(e.deployServiceAddress)return e.deployServiceAddress;if(e.k8sDeployServiceUrl)return e.k8sDeployServiceUrl;if(e.axiosPostAddress)return e.axiosPostAddress;if(!e.isNode)return"";if(isNaN(e.deployServicePort))throw new U9(e,"Invalid DEPLOY_SERVICE_PORT value");if(e.schedulerAddress)try{let r=new URL(e.schedulerAddress);return r.hostname!=="localhost"&&r.hostname!=="127.0.0.1"?e.schedulerAddress:`${r.protocol}//${r.hostname}:${e.deployServicePort}`}catch{}if(e.isTest)return t;throw new U9(e,"Reached drop-through code path in GetDeployServiceURLOnFrontendOrCLI")},M2r=()=>{let t=process.env.DEPLOY_SERVICE_ADDRESS;if(t)return t;let e=process.env.K8S_COA_DEPLOY_SERVICE_URL;if(e)return e;let r=dse(),i=N2r();if(r)try{let n=new URL(r);if(n.hostname==="localhost"||n.hostname==="127.0.0.1")return`${n.protocol}//${n.hostname}:${i}`;let a=n.hostname,o;if(a.startsWith("pr-scheduler."))o=a.replace("pr-scheduler.","pr-deploy.");else if(a.startsWith("scheduler."))o=a.replace("scheduler.","deploy-service.");else{let s=a.split("."),u=s.indexOf("scheduler");u!==-1&&(s[u]="deploy-service",o=s.join("."))}return o?`${n.protocol}//${o}:${i}`:r}catch{}return`http://localhost:${i}`},Fin=(t=!1,e)=>process.env.DISABLE_PROXIES==="true"||x2r()?!1:e?cm().featureFlags.isFeatureEnabled(e,t):t,jin=()=>ly(),D3a=["app","local","localhost","dev","loadtesting","qa","staging","preview","eu"],NSl=t=>{let e=t?.split("."),r=e?.length?e[0]:void 0;return!r||D3a.includes(r)?void 0:r},P3a="Run timed out. Restart the run, and if this issue persists contact support.",Q3a="Marked failed by Coalesce for late network check-in",MSl="Marked failed by Coalesce for missing workspace ID",xSl="Marked failed by Coalesce for no corresponding workspace",x2r=()=>!!process.env.COALESCE_COA_CLOUD_JOB_ID;var Lin=["ACTUAL_STATE","ADVANCED_DEPLOY","APP","AUTH","BULK_WRITE","CLEANUP_TOOL","CLI","CLI_INTERNAL","COLUMN_LINEAGE","COLUMN_METADATA","COMMON","CONNECTION","DEBUG","DEPLOY","DNS","DOCS","DRAG","ENTITY_API","ENV","ENVIRONMENTS","ERROR_OPERATIONS","FIREBASE","FOLDERS","GIT","GIT_SETTINGS","GOOGLE_DEBUG","GRAPH","HEARTBEAT","INTEGRATIONS","JDBC_SERVICE","JEST","JOBS","JSON_PARSER","LIGHTNING_FS","LISTENERS","MACROS","MAPPING_GRID","METADATA_HYDRATION","METADATA_OPERATIONS","NARROW_METADATA","NODE_TYPES","ORGS","ORG_BOOTSTRAP","ORG_SCANNER","ORG_SETTINGS","ORG_UPGRADE","PACKAGES","PACKAGES_BACKEND","PACKAGE_NAMESPACES","PACKAGE_REGISTRY","PALETTE","PARTNER_CONNECT","PENDO","PERFORMANCE","PIPELINE","PLAN","PLATFORM","PRESYNC","PROBLEM_SCANNER","PROJECTS","RBAC","RENDERER","RUNNER","RUNNER_BACKEND","RUN_RESULTS","RUN_TRANSACTION","SEARCH","SECRETS","SECURE_RUN_AND_WORKSPACE","SERVICE_WORKSPACE_STATUS","SQL_PARSING","SQL_TESTING","STATE","STEPS","STORAGE_LOCATIONS","STRUMENTA","SYSTEM_EMAILS","TEMPLATE_EDITOR","TESTING","TIMING_UTILS","TREE_OPERATIONS","TYPESENSE","UI","USERS","USER_ACTIVATION","USER_MANAGEMENT","USER_SETTINGS","VERSIONING","VERSION_CONTROL_ACTIONS","WORKSPACES","XML_PARSER","YAML","ZIP","AI_COLUMN_DESCRIPTIONS","AI_NODE_DESCRIPTIONS","AI_GIT_COMMIT_MESSAGE","AI_COPILOT","SSO_SETTINGS"],hx={...Object.fromEntries(Lin.map(t=>[t,{level:"info"}]))};var Uin=["Authorization","Token","Password","Secret","idToken","id_token","clientID","clientSecret","apiKey","snowflakeKeyPairKey","snowflakeKeyPairPass","keyPairKey","keyPairPass","key","keyPair","privateKey","passphrase","serviceAccountKey","bigQueryServiceAccountKey"];var k2r=()=>{let t=new WeakSet;return(e,r)=>{if(typeof r=="object"&&r!==null){if(t.has(r))return;t.add(r)}return r}},yx=t=>{switch(typeof t){case"object":if(t===null)return"null";try{if(t instanceof Error){if(Xc(t)){let e=t.toJSON();try{"config"in e&&typeof e.config=="object"&&e.config!==null&&(delete e.config.httpAgent,delete e.config.httpsAgent)}catch{}return`AxiosError: ${JSON.stringify(e,k2r())}`}if(t instanceof hr)return t.toString();if(_oe(t))return`Error: [${t.code}] ${t.message}`}switch(t?.constructor?.name){case"Object":case"Array":return JSON.stringify(t,k2r());case"Set":return JSON.stringify(Array.from(t),k2r());case"Error":{let e=t.toString();try{let r=JSON.stringify(t);r!=="{}"&&(e=r)}catch{}return e}case"Null":return"null";case"Function":case"RegExp":return t.toString();case"Date":return t.toDateString();case"ReferenceError":case"TypeError":case"SyntaxError":case"JestAssertionError":return t.toString();case void 0:default:return`attempting to stringify object w/ constructor: ${t?.constructor?.name}; ${JSON.stringify(t)}`}}catch(e){return`Error converting object to string:${e}`}case"undefined":return typeof t;case"bigint":case"number":case"symbol":return t.toString();case"boolean":return String(t);case"string":return t;default:return"Can't convert arg to string"}};var zin=1e6,Gin=.8;var fx=t=>{if(t.length===0)return"";if(t.length===1){let n=yx(t[0]),a=zin*Gin/2;return n.length>a?n.slice(0,a):n}let r=zin*Gin/2/t.length,i=new Array(t.length);for(let n=0;n<t.length;n++){let a=yx(t[n]);i[n]=a.length>r?a.slice(0,r):a}return i.join(" ")},O3a=Uin.map(t=>new RegExp(`("${t}"\\s*:\\s*)"(?:\\\\.|[^"])*"`,"gi")),q2r=t=>{if(!t)return"";let e=t;for(let r of O3a)r.lastIndex=0,e=e.replace(r,'$1"[REDACTED]"');return e};var hse=class extends hr{};var Ex=Ot(mnn());var Sx=class extends G9{constructor(r,i){super({level:r,shipToLogger:({logLevel:n,messages:a,data:o,hasData:s})=>{let u=this.format({logLevel:n,messages:a,data:o&&s?o:{}});return this.consoleLog(u),[]}});this.logFormat=i}colorizeLogLevel(r){if(r==="trace"||r==="debug")return Ex.default.magenta(`${r}`);if(r==="info")return Ex.default.green(`${r}`);if(r==="warn")return Ex.default.yellow(`${r}`);if(r==="error")return Ex.default.cyan(`${r}`);if(r==="fatal")return Ex.default.red(`${r}`);{let i=r;throw new hr(`Invalid log level ${i}`)}}format(r){if(this.logFormat==="text")return this.textFormat(r);if(this.logFormat==="json")return this.jsonFormat(r);{let i=this.logFormat;throw new hr(`Invalid log formatter: ${i}`)}}jsonFormat(r){let{logLevel:i,messages:n,data:a}=r,o=fx(n);return JSON.stringify({...a,message:o,level:i})}textFormat(r){let{logLevel:i,messages:n,data:a}=r,o=fx(n),s=[{key:"orgID",prefix:"org"},{key:"workspaceID",prefix:"env"},{key:"userID",prefix:"user"},{key:"runID",prefix:"run"},{key:"runType",prefix:"runType"},{key:"nodeID",prefix:"node"},{key:"kubernetesJobUuid",prefix:"k8s-job"},{key:"planID",prefix:"plan"}],u=process.env.JEST_WORKER_ID?`[SHARD:${process.env.JEST_WORKER_ID}]`:"",l=s.map(({key:C,prefix:E})=>a[C]?`|(${E}:${a[C]})`:"").join(""),c=this.colorizeLogLevel(i),y=a.time??new Date().toISOString(),m=a.loggingArea??"COMMON";return`|${y}|${u}[${m}]${l}|${c}:${o}`}};var Ese={fatal:0,error:1,warn:2,info:3,debug:4},Sse=class{constructor(e,r,i=void 0){this.area=e;this.logLevel=r;this._logger=i;this.currentLevelPriority=Ese[r]}transports=void 0;defaultContext={};currentLevelPriority;isLevelEnabled(e){return Ese[e]<=this.currentLevelPriority}get logger(){return this._logger||(this._logger=this.createLogger()),this._logger}createLogger(){if(!this.transports)throw new hr("Must create transports before using the logger!");return new Poe({transport:this.transports})}noContextLogger(e,r){this.contextLogger(e,void 0,r)}contextLogger(e,r,i){if(!this.isLevelEnabled(e))return;let n=fx(i);try{n=q2r(n)}catch(u){console.debug(`[${this.area}] Failed to redact sensitive data: ${yx(u)}`),console.error(`[${this.area}] Failed to redact sensitive data. Swallowing log and returning early.`);return}let o={...cm().logContext,...this.defaultContext,...r,loggingArea:this.area},s=_2r(o,u=>u===void 0);if(this.transports)for(let u of this.transports)u.shipToLogger&&u.shipToLogger({logLevel:e,messages:[n],data:s,hasData:Object.keys(s).length>0})}debug(...e){this.noContextLogger("debug",e)}info(...e){this.noContextLogger("info",e)}warn(...e){this.noContextLogger("warn",e)}error(...e){this.noContextLogger("error",e)}fatal(...e){this.noContextLogger("fatal",e)}alert(...e){this.noContextLogger("warn",e)}app(...e){this.noContextLogger("info",e)}assert(...e){this.noContextLogger("error",e)}emerg(...e){this.noContextLogger("fatal",e)}debugContext(e,...r){this.contextLogger("debug",e,r)}infoContext(e,...r){this.contextLogger("info",e,r)}warnContext(e,...r){this.contextLogger("warn",e,r)}errorContext(e,...r){this.contextLogger("error",e,r)}fatalContext(e,...r){this.contextLogger("fatal",e,r)}alertContext(e,...r){this.contextLogger("warn",e,r)}appContext(e,...r){this.contextLogger("info",e,r)}assertContext(e,...r){this.contextLogger("error",e,r)}emergContext(e,...r){this.contextLogger("fatal",e,r)}logAtLevel(e,...r){this.noContextLogger(e,r)}logContextAtLevel(e,r,...i){this.contextLogger(e,r,i)}getConsoleTransport(){for(let e of this.transports??[])if(e instanceof Sx)return e;throw new hse("Invalid confguration: there must always be a console transport")}changeConsoleLogLevel(e){if(e){let r=this.getConsoleTransport();r.level=e,r.enabled=!0,this.currentLevelPriority=Ese[e];return}else{let r=this.getConsoleTransport();r.level=this.logLevel,r.enabled=!1,this.currentLevelPriority=Ese[this.logLevel]}}silenceConsole(e){this.getConsoleTransport().enabled=!e}async close(e){}setDefaultLogContext(e){this.defaultContext={...this.defaultContext,...e}}setTransports(e){if(this.transports)throw new hr("Got a repeat call of setTransports()");this.transports=e}getCommonLogger(){if(!this.transports)throw new hr("Must create transports before getting a child logger!");return new H7({loggingArea:this.area},this.transports,this.logger)}};var xr=t=>{let e=hx[t];if(!e)throw new Error(`Logging area "${t}" is not a valid LoggingAreas key`);return e.logger||(e.logger=new Sse(t,e.level)),e.logger};var bnn=(t,e)=>{for(let r in hx){let i=r,{level:n}=hx[i];t(i).setTransports(e(i,n))}};var vx=(t,e)=>{t.runID=e};var GK=Ot(wse()),RRa=Ot(zK()),wBl=(0,GK.Record)({version:GK.String,hash:GK.String}),wRa=()=>({version:"7.30.9",hash:"97b6c0291c0182e1b1cd865525be1686aaab116b"}),O1r=wRa();var oue,ysn=t=>{oue=t},fsn=t=>({coalesceSoftwareVersion:O1r?.version||"",service:t,env:process.env.REACT_APP_OWNER??"",reactAppCoalesceDev:process.env.REACT_APP_COALESCE_DEV??""}),N1r=t=>t.includes("production")?"production":t.includes("staging")?"staging":t.includes("qa")?"qa":"development",msn=()=>{if(WB()){let t=process.env.RUNTIME_ENVIRONMENT||"development";return kin("coa")?x2r()?N1r(t):void 0:N1r(t)}else{let t;try{t=self.ENVIRONMENT}catch{}return typeof t=="string"?N1r(t):void 0}};var bsn=require("node:os");var xx=class extends Sx{consoleLog(e){process.stdout.write(`${e}${bsn.EOL}`)}};var MZt=Ot(jAn(),1),YAn=Ot(F0i(),1),oQ=Ot(require("process"),1),n2s=Object.prototype.toString,a2s=t=>n2s.call(t)==="[object Error]",o2s=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function s2s(t){return t&&a2s(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:o2s.has(t.message):!1}var u2s=class extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}},HAn=(t,e,r)=>{let i=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=i,t};async function l2s(t,e){return new Promise((r,i)=>{e={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...e};let n=YAn.default.operation(e),a=()=>{n.stop(),i(e.signal?.reason)};e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",a,{once:!0});let o=()=>{e.signal?.removeEventListener("abort",a),n.stop()};n.attempt(async s=>{try{let u=await t(s);o(),r(u)}catch(u){try{if(!(u instanceof Error))throw new TypeError(`Non-error was thrown: "${u}". You should only throw errors.`);if(u instanceof u2s)throw u.originalError;if(u instanceof TypeError&&!s2s(u))throw u;if(HAn(u,s,e),await e.shouldRetry(u)||(n.stop(),i(u)),await e.onFailedAttempt(u),!n.retry(u))throw n.mainError()}catch(l){HAn(l,s,e),o(),i(l)}}})})}var NZt=new Set,j0i=new Set,VAn=!1,KAn=!1;async function kJ(t,e,r){if(VAn)return;VAn=!0,NZt.size>0&&e&&console.error(["SYNCHRONOUS TERMINATION NOTICE:","When explicitly exiting the process via process.exit or via a parent process,","asynchronous tasks in your exitHooks will not run. Either remove these tasks,","use gracefulExit() instead of process.exit(), or ensure your parent process","sends a SIGINT to the process running this code."].join(" "));let i=128+r,n=(u=!1)=>{(u===!0||t===!0)&&oQ.default.exit(i)};for(let u of j0i)u(i);if(e){n();return}let a=[],o=0;for(let[u,l]of NZt)o=Math.max(o,l),a.push(Promise.resolve(u(i)));let s=setTimeout(()=>{n(!0)},o);await Promise.all(a),clearTimeout(s),n()}function c2s(t){let{onExit:e,wait:r,isSynchronous:i}=t,n=[e,r];return i?j0i.add(e):NZt.add(n),KAn||(KAn=!0,oQ.default.once("beforeExit",kJ.bind(void 0,!0,!1,-128)),oQ.default.once("SIGINT",kJ.bind(void 0,!0,!1,2)),oQ.default.once("SIGTERM",kJ.bind(void 0,!0,!1,15)),oQ.default.once("exit",kJ.bind(void 0,!1,!0,0)),oQ.default.on("message",a=>{a==="shutdown"&&kJ(!0,!0,-128)})),()=>{i?j0i.delete(e):NZt.delete(n)}}function p2s(t){if(typeof t!="function")throw new TypeError("onExit must be a function");return c2s({onExit:t,isSynchronous:!0})}function d2s(){return`${Date.now()}_${Math.floor(Math.random()*1e3)}`}var A2s=class{currentBucket;logBucket;constructor(){this.logBucket={},this.newLogBucket()}newLogBucket(){this.currentBucket&&delete this.logBucket[this.currentBucket],this.currentBucket=d2s(),this.logBucket[this.currentBucket]={size:0,logItems:[]}}getLogBucketByteSize(){return this.logBucket[this.currentBucket].size}getLogCount(){return this.logBucket[this.currentBucket].logItems.length}finishLogBatch(){let t=this.logBucket[this.currentBucket].logItems;return this.newLogBucket(),t}addLog(t,e){this.logBucket[this.currentBucket].size+=e,this.logBucket[this.currentBucket].logItems.push(t)}},g2s=5138022,WAn=996147,JAn=3e3,h2s=995,ZAn=class{logStorage;timer=null;apiInstance;config;constructor(t){this.logStorage=new A2s,this.config=t,t.onInit&&t.onInit();let e=MZt.client.createConfiguration(t.ddClientConf);e.setServerVariables(t?.ddServerConf||{}),this.apiInstance=new MZt.v2.LogsApi(e),this.setupRegularSend(),this.setupExitHook()}sendLogs({logsToSend:t,bucketName:e}){l2s(async()=>{let r={body:t,contentEncoding:"gzip"},i=await this.apiInstance.submitLog(r);return this.config.onDebug&&this.config.onDebug(`(${e}) Sending ${t.length} logs to Datadog completed`),i},{retries:this.config.retries??5}).catch(r=>{this.config.onError&&this.config.onError(r,t)})}setupRegularSend(){this.config.sendImmediate||(this.config.onDebug&&this.config.onDebug(`Configured to send logs every ${this.config.sendIntervalMs||JAn}ms`),this.timer=setInterval(()=>{let t=this.logStorage.getLogCount(),e=this.logStorage.currentBucket;t>0&&(this.config.onDebug&&this.config.onDebug(`(${e}) Sending ${t} logs to Datadog on timer`),this.sendLogs({logsToSend:this.logStorage.finishLogBatch(),bucketName:e}))},this.config.sendIntervalMs||JAn))}setupExitHook(){this.config.sendImmediate||(this.config.onDebug&&this.config.onDebug("Configuring exit hook"),p2s(()=>{if(this.logStorage.getLogCount()>0){this.config.onDebug&&this.config.onDebug("Shutdown detected. Attempting to send remaining logs to Datadog"),this.timer&&clearInterval(this.timer);let t=this.logStorage.currentBucket;this.sendLogs({logsToSend:this.logStorage.finishLogBatch(),bucketName:t})}}))}processLog(t){let e={message:JSON.stringify(t)};this.config.ddsource&&(e.ddsource=this.config.ddsource),this.config.ddtags&&(e.ddtags=this.config.ddtags),this.config.service&&(e.service=this.config.service);let r=e.message.length+(e.ddsource?.length||0)+(e.ddtags?.length||0)+(e.hostname?.length||0)+(e.service?.length||0);if(r>WAn&&this.config.onError&&this.config.onError(new Error(`Log entry exceeds size limit of ${WAn} bytes: ${r}`),[e]),this.config.sendImmediate){this.config.onDebug&&this.config.onDebug("(send-immediate) Sending log to Datadog"),this.sendLogs({logsToSend:[e],bucketName:"send-immediate"});return}this.logStorage.addLog(e,r);let i=this.logStorage.getLogCount();if(this.logStorage.getLogBucketByteSize()>g2s||i>h2s){let a=this.logStorage.currentBucket;this.config.onDebug&&this.config.onDebug(`(${a}) Sending ${i} logs to Datadog`),this.sendLogs({logsToSend:this.logStorage.finishLogBatch(),bucketName:a})}}};var $An=class extends Doe{messageField;levelField;timestampField;timestampFunction;transport;constructor(t){super(t),this.enabled&&(this.transport=new ZAn(t.options),this.messageField=t.messageField??"message",this.levelField=t.levelField??"level",this.timestampField=t.timestampField??"time",this.timestampFunction=t.timestampFunction)}shipToLogger({logLevel:t,messages:e,data:r,hasData:i}){let n={};if(!this.transport)throw new Error("DataDogTransport was previously disabled; enabling the flag manually on the transport instance is not supported.");return r&&i&&Object.assign(n,r),this.timestampFunction?n[this.timestampField]=this.timestampFunction():n[this.timestampField]=new Date().toISOString(),n[this.levelField]=t,n[this.messageField]=e.join(" "),this.transport.processLog(n),e}};var XAn=require("node:os");var y2s=(t,e,r=!1)=>{let i=fsn(oue),n={ddClientConf:{authMethods:{apiKeyAuth:"pub04bd017317b60c96b62874179d82ff97"}},sendImmediate:r,ddtags:`env:${i.env},coalesceSoftwareVersion:${i.coalesceSoftwareVersion}`,ddsource:"nodejs",service:`${oue}`},a=[];return a.push(new xx(t,e)),a.push(new $An({id:"ddNode",options:n,level:t})),a},egn=(t,e="text",r)=>{let i=y2s("info",e);if(!r){let o=msn(),s=(0,XAn.hostname)();r=ken.parse({...process.env,RUNTIME_ENVIRONMENT:o,HOSTNAME:s})}let n={service:t,category:"global",coalescesoftwareversion:r.REACT_APP_COALESCE_VERSION,hostname:r.HOSTNAME,env:r.RUNTIME_ENVIRONMENT},a=new H7(n,i);return b2r(a),a};var tgn=t=>{N0().isTest&&(t="JestTest"),ysn(t),bnn(xr,(e,r)=>[new xx(r,"text")]),egn(t)};var f2s={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};var ign=function(t){let e=[],r=0;for(let i=0;i<t.length;i++){let n=t.charCodeAt(i);n<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=n&63|128):(n&64512)===55296&&i+1<t.length&&(t.charCodeAt(i+1)&64512)===56320?(n=65536+((n&1023)<<10)+(t.charCodeAt(++i)&1023),e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=n&63|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=n&63|128)}return e},m2s=function(t){let e=[],r=0,i=0;for(;r<t.length;){let n=t[r++];if(n<128)e[i++]=String.fromCharCode(n);else if(n>191&&n<224){let a=t[r++];e[i++]=String.fromCharCode((n&31)<<6|a&63)}else if(n>239&&n<365){let a=t[r++],o=t[r++],s=t[r++],u=((n&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;e[i++]=String.fromCharCode(55296+(u>>10)),e[i++]=String.fromCharCode(56320+(u&1023))}else{let a=t[r++],o=t[r++];e[i++]=String.fromCharCode((n&15)<<12|(a&63)<<6|o&63)}}return e.join("")},ngn={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let r=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let n=0;n<t.length;n+=3){let a=t[n],o=n+1<t.length,s=o?t[n+1]:0,u=n+2<t.length,l=u?t[n+2]:0,c=a>>2,y=(a&3)<<4|s>>4,m=(s&15)<<2|l>>6,C=l&63;u||(C=64,o||(m=64)),i.push(r[c],r[y],r[m],r[C])}return i.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(ign(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):m2s(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let r=e?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let n=0;n<t.length;){let a=r[t.charAt(n++)],s=n<t.length?r[t.charAt(n)]:0;++n;let l=n<t.length?r[t.charAt(n)]:64;++n;let y=n<t.length?r[t.charAt(n)]:64;if(++n,a==null||s==null||l==null||y==null)throw new U0i;let m=a<<2|s>>4;if(i.push(m),l!==64){let C=s<<4&240|l>>2;if(i.push(C),y!==64){let E=l<<6&192|y;i.push(E)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},U0i=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},b2s=function(t){let e=ign(t);return ngn.encodeByteArray(e,!0)},qJ=function(t){return b2s(t).replace(/\./g,"")},G0i=function(t){try{return ngn.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function FJ(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:let r=e;return new Date(r.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(let r in e)!e.hasOwnProperty(r)||!C2s(r)||(t[r]=FJ(t[r],e[r]));return t}function C2s(t){return t!=="__proto__"}function I2s(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var E2s=()=>I2s().__FIREBASE_DEFAULTS__,S2s=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},v2s=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=t&&G0i(t[1]);return e&&JSON.parse(e)},H0i=()=>{try{return E2s()||S2s()||v2s()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},agn=t=>{var e,r;return(r=(e=H0i())===null||e===void 0?void 0:e.emulatorHosts)===null||r===void 0?void 0:r[t]};var V0i=()=>{var t;return(t=H0i())===null||t===void 0?void 0:t.config};var xZt=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}wrapCallback(e){return(r,i)=>{r?this.reject(r):this.resolve(i),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(r):e(r,i))}}};function kZt(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let r={alg:"none",type:"JWT"},i=e||"demo-project",n=t.iat||0,a=t.sub||t.user_id;if(!a)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let o=Object.assign({iss:`https://securetoken.google.com/${i}`,aud:i,iat:n,exp:n+3600,auth_time:n,sub:a,user_id:a,firebase:{sign_in_provider:"custom",identities:{}}},t);return[qJ(JSON.stringify(r)),qJ(JSON.stringify(o)),""].join(".")}function Ks(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function ogn(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ks())}function qZt(){var t;let e=(t=H0i())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function FZt(){return typeof self=="object"&&self.self===self}function jZt(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function jJ(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function LZt(){let t=Ks();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function K0i(){return!qZt()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function r_(){try{return typeof indexedDB=="object"}catch{return!1}}function sgn(){return new Promise((t,e)=>{try{let r=!0,i="validate-browser-context-for-indexeddb-analytics-module",n=self.indexedDB.open(i);n.onsuccess=()=>{n.result.close(),r||self.indexedDB.deleteDatabase(i),t(!0)},n.onupgradeneeded=()=>{r=!1},n.onerror=()=>{var a;e(((a=n.error)===null||a===void 0?void 0:a.message)||"")}}catch(r){e(r)}})}var B2s="FirebaseError",Qs=class t extends Error{constructor(e,r,i){super(r),this.code=e,this.customData=i,this.name=B2s,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ob.prototype.create)}},Ob=class{constructor(e,r,i){this.service=e,this.serviceName=r,this.errors=i}create(e,...r){let i=r[0]||{},n=`${this.service}/${e}`,a=this.errors[e],o=a?R2s(a,i):"Error",s=`${this.serviceName}: ${o} (${n}).`;return new Qs(n,s,i)}};function R2s(t,e){return t.replace(w2s,(r,i)=>{let n=e[i];return n!=null?String(n):`<${i}?>`})}var w2s=/\{\$([^}]+)}/g;function W0i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ugn(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function wR(t,e){if(t===e)return!0;let r=Object.keys(t),i=Object.keys(e);for(let n of r){if(!i.includes(n))return!1;let a=t[n],o=e[n];if(rgn(a)&&rgn(o)){if(!wR(a,o))return!1}else if(a!==o)return!1}for(let n of i)if(!r.includes(n))return!1;return!0}function rgn(t){return t!==null&&typeof t=="object"}function lq(t){let e=[];for(let[r,i]of Object.entries(t))Array.isArray(i)?i.forEach(n=>{e.push(encodeURIComponent(r)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(r)+"="+encodeURIComponent(i));return e.length?"&"+e.join("&"):""}function i_(t){let e={};return t.replace(/^\?/,"").split("&").forEach(i=>{if(i){let[n,a]=i.split("=");e[decodeURIComponent(n)]=decodeURIComponent(a)}}),e}function cq(t){let e=t.indexOf("?");if(!e)return"";let r=t.indexOf("#",e);return t.substring(e,r>0?r:void 0)}function UZt(t,e){let r=new z0i(t,e);return r.subscribe.bind(r)}var z0i=class{constructor(e,r){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=r,this.task.then(()=>{e(this)}).catch(i=>{this.error(i)})}next(e){this.forEachObserver(r=>{r.next(e)})}error(e){this.forEachObserver(r=>{r.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,r,i){let n;if(e===void 0&&r===void 0&&i===void 0)throw new Error("Missing Observer.");T2s(e,["next","error","complete"])?n=e:n={next:e,error:r,complete:i},n.next===void 0&&(n.next=L0i),n.error===void 0&&(n.error=L0i),n.complete===void 0&&(n.complete=L0i);let a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch{}}),this.observers.push(n),a}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let r=0;r<this.observers.length;r++)this.sendOne(r,e)}sendOne(e,r){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{r(this.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function T2s(t,e){if(typeof t!="object"||t===null)return!1;for(let r of e)if(r in t&&typeof t[r]=="function")return!0;return!1}function L0i(){}var KEc=4*60*60*1e3;function pi(t){return t&&t._delegate?t._delegate:t}f2s.NODE_CLIENT=!0;var Ws=class{constructor(e,r,i){this.name=e,this.instanceFactory=r,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var sQ="[DEFAULT]";var J0i=class{constructor(e,r){this.name=e,this.container=r,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let r=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(r)){let i=new xZt;if(this.instancesDeferred.set(r,i),this.isInitialized(r)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:r});n&&i.resolve(n)}catch{}}return this.instancesDeferred.get(r).promise}getImmediate(e){var r;let i=this.normalizeInstanceIdentifier(e?.identifier),n=(r=e?.optional)!==null&&r!==void 0?r:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(a){if(n)return null;throw a}else{if(n)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(D2s(e))try{this.getOrInitializeService({instanceIdentifier:sQ})}catch{}for(let[r,i]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(r);try{let a=this.getOrInitializeService({instanceIdentifier:n});i.resolve(a)}catch{}}}}clearInstance(e=sQ){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...e.filter(r=>"_delete"in r).map(r=>r._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=sQ){return this.instances.has(e)}getOptions(e=sQ){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:r={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let n=this.getOrInitializeService({instanceIdentifier:i,options:r});for(let[a,o]of this.instancesDeferred.entries()){let s=this.normalizeInstanceIdentifier(a);i===s&&o.resolve(n)}return n}onInit(e,r){var i;let n=this.normalizeInstanceIdentifier(r),a=(i=this.onInitCallbacks.get(n))!==null&&i!==void 0?i:new Set;a.add(e),this.onInitCallbacks.set(n,a);let o=this.instances.get(n);return o&&e(o,n),()=>{a.delete(e)}}invokeOnInitCallbacks(e,r){let i=this.onInitCallbacks.get(r);if(i)for(let n of i)try{n(e,r)}catch{}}getOrInitializeService({instanceIdentifier:e,options:r={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:_2s(e),options:r}),this.instances.set(e,i),this.instancesOptions.set(e,r),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=sQ){return this.component?this.component.multipleInstances?e:sQ:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function _2s(t){return t===sQ?void 0:t}function D2s(t){return t.instantiationMode==="EAGER"}var LJ=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let r=this.getProvider(e.name);if(r.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);r.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let r=new J0i(e,this);return this.providers.set(e,r),r}getProviders(){return Array.from(this.providers.values())}};var pbi={};d7(pbi,{FirebaseError:()=>Qs,SDK_VERSION:()=>Sm,_DEFAULT_ENTRY_NAME:()=>FS,_addComponent:()=>Aq,_addOrOverwriteComponent:()=>ubi,_apps:()=>n_,_clearComponents:()=>y1s,_components:()=>dq,_getProvider:()=>a_,_isFirebaseApp:()=>Sgn,_isFirebaseServerApp:()=>jd,_registerComponent:()=>nh,_removeServiceInstance:()=>Egn,_serverApps:()=>pq,deleteApp:()=>KZt,getApp:()=>gq,getApps:()=>b1s,initializeApp:()=>VZt,initializeServerApp:()=>m1s,onLog:()=>lbi,registerVersion:()=>xc,setLogLevel:()=>cbi});var Y0i=[],ea;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(ea||(ea={}));var lgn={debug:ea.DEBUG,verbose:ea.VERBOSE,info:ea.INFO,warn:ea.WARN,error:ea.ERROR,silent:ea.SILENT},P2s=ea.INFO,Q2s={[ea.DEBUG]:"log",[ea.VERBOSE]:"log",[ea.INFO]:"info",[ea.WARN]:"warn",[ea.ERROR]:"error"},O2s=(t,e,...r)=>{if(e<t.logLevel)return;let i=new Date().toISOString(),n=Q2s[e];if(n)console[n](`[${i}] ${t.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},kS=class{constructor(e){this.name=e,this._logLevel=P2s,this._logHandler=O2s,this._userLogHandler=null,Y0i.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in ea))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?lgn[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,ea.DEBUG,...e),this._logHandler(this,ea.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,ea.VERBOSE,...e),this._logHandler(this,ea.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,ea.INFO,...e),this._logHandler(this,ea.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,ea.WARN,...e),this._logHandler(this,ea.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,ea.ERROR,...e),this._logHandler(this,ea.ERROR,...e)}};function cgn(t){Y0i.forEach(e=>{e.setLogLevel(t)})}function pgn(t,e){for(let r of Y0i){let i=null;e&&e.level&&(i=lgn[e.level]),t===null?r.userLogHandler=null:r.userLogHandler=(n,a,...o)=>{let s=o.map(u=>{if(u==null)return null;if(typeof u=="string")return u;if(typeof u=="number"||typeof u=="boolean")return u.toString();if(u instanceof Error)return u.message;try{return JSON.stringify(u)}catch{return null}}).filter(u=>u).join(" ");a>=(i??n.logLevel)&&t({level:ea[a].toLowerCase(),message:s,args:o,type:n.name})}}}var N2s=(t,e)=>e.some(r=>t instanceof r),dgn,Agn;function M2s(){return dgn||(dgn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function x2s(){return Agn||(Agn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var ggn=new WeakMap,$0i=new WeakMap,hgn=new WeakMap,Z0i=new WeakMap,ebi=new WeakMap;function k2s(t){let e=new Promise((r,i)=>{let n=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{r(qS(t.result)),n()},o=()=>{i(t.error),n()};t.addEventListener("success",a),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&ggn.set(r,t)}).catch(()=>{}),ebi.set(e,t),e}function q2s(t){if($0i.has(t))return;let e=new Promise((r,i)=>{let n=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{r(),n()},o=()=>{i(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});$0i.set(t,e)}var X0i={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return $0i.get(t);if(e==="objectStoreNames")return t.objectStoreNames||hgn.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return qS(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function ygn(t){X0i=t(X0i)}function F2s(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){let i=t.call(zZt(this),e,...r);return hgn.set(i,e.sort?e.sort():[e]),qS(i)}:x2s().includes(t)?function(...e){return t.apply(zZt(this),e),qS(ggn.get(this))}:function(...e){return qS(t.apply(zZt(this),e))}}function j2s(t){return typeof t=="function"?F2s(t):(t instanceof IDBTransaction&&q2s(t),N2s(t,M2s())?new Proxy(t,X0i):t)}function qS(t){if(t instanceof IDBRequest)return k2s(t);if(Z0i.has(t))return Z0i.get(t);let e=j2s(t);return e!==t&&(Z0i.set(t,e),ebi.set(e,t)),e}var zZt=t=>ebi.get(t);function mgn(t,e,{blocked:r,upgrade:i,blocking:n,terminated:a}={}){let o=indexedDB.open(t,e),s=qS(o);return i&&o.addEventListener("upgradeneeded",u=>{i(qS(o.result),u.oldVersion,u.newVersion,qS(o.transaction),u)}),r&&o.addEventListener("blocked",u=>r(u.oldVersion,u.newVersion,u)),s.then(u=>{a&&u.addEventListener("close",()=>a()),n&&u.addEventListener("versionchange",l=>n(l.oldVersion,l.newVersion,l))}).catch(()=>{}),s}var L2s=["get","getKey","getAll","getAllKeys","count"],U2s=["put","add","delete","clear"],tbi=new Map;function fgn(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(tbi.get(e))return tbi.get(e);let r=e.replace(/FromIndex$/,""),i=e!==r,n=U2s.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||L2s.includes(r)))return;let a=async function(o,...s){let u=this.transaction(o,n?"readwrite":"readonly"),l=u.store;return i&&(l=l.index(s.shift())),(await Promise.all([l[r](...s),n&&u.done]))[0]};return tbi.set(e,a),a}ygn(t=>({...t,get:(e,r,i)=>fgn(e,r)||t.get(e,r,i),has:(e,r)=>!!fgn(e,r)||t.has(e,r)}));var ibi=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(z2s(r)){let i=r.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(r=>r).join(" ")}};function z2s(t){let e=t.getComponent();return e?.type==="VERSION"}var GZt="@firebase/app",nbi="0.10.0";var uQ=new kS("@firebase/app"),G2s="@firebase/app-compat",H2s="@firebase/analytics-compat",V2s="@firebase/analytics",K2s="@firebase/app-check-compat",W2s="@firebase/app-check",J2s="@firebase/auth",Y2s="@firebase/auth-compat",Z2s="@firebase/database",$2s="@firebase/database-compat",X2s="@firebase/functions",e1s="@firebase/functions-compat",t1s="@firebase/installations",r1s="@firebase/installations-compat",i1s="@firebase/messaging",n1s="@firebase/messaging-compat",a1s="@firebase/performance",o1s="@firebase/performance-compat",s1s="@firebase/remote-config",u1s="@firebase/remote-config-compat",l1s="@firebase/storage",c1s="@firebase/storage-compat",p1s="@firebase/firestore",d1s="@firebase/firestore-compat",A1s="firebase",g1s="10.10.0";var FS="[DEFAULT]",h1s={[GZt]:"fire-core",[G2s]:"fire-core-compat",[V2s]:"fire-analytics",[H2s]:"fire-analytics-compat",[W2s]:"fire-app-check",[K2s]:"fire-app-check-compat",[J2s]:"fire-auth",[Y2s]:"fire-auth-compat",[Z2s]:"fire-rtdb",[$2s]:"fire-rtdb-compat",[X2s]:"fire-fn",[e1s]:"fire-fn-compat",[t1s]:"fire-iid",[r1s]:"fire-iid-compat",[i1s]:"fire-fcm",[n1s]:"fire-fcm-compat",[a1s]:"fire-perf",[o1s]:"fire-perf-compat",[s1s]:"fire-rc",[u1s]:"fire-rc-compat",[l1s]:"fire-gcs",[c1s]:"fire-gcs-compat",[p1s]:"fire-fst",[d1s]:"fire-fst-compat","fire-js":"fire-js",[A1s]:"fire-js-all"};var n_=new Map,pq=new Map,dq=new Map;function Aq(t,e){try{t.container.addComponent(e)}catch(r){uQ.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,r)}}function ubi(t,e){t.container.addOrOverwriteComponent(e)}function nh(t){let e=t.name;if(dq.has(e))return uQ.debug(`There were multiple attempts to register component ${e}.`),!1;dq.set(e,t);for(let r of n_.values())Aq(r,t);for(let r of pq.values())Aq(r,t);return!0}function a_(t,e){let r=t.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),t.container.getProvider(e)}function Egn(t,e,r=FS){a_(t,e).clearInstance(r)}function Sgn(t){return t.options!==void 0}function jd(t){return t.settings!==void 0}function y1s(){dq.clear()}var f1s={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Nb=new Ob("app","Firebase",f1s);var HZt=class{constructor(e,r,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},r),this._name=r.name,this._automaticDataCollectionEnabled=r.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new Ws("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Nb.create("app-deleted",{appName:this._name})}};var abi=class extends HZt{constructor(e,r,i,n){let a=r.automaticDataCollectionEnabled!==void 0?r.automaticDataCollectionEnabled:!1,o={name:i,automaticDataCollectionEnabled:a};if(e.apiKey!==void 0)super(e,o,n);else{let s=e;super(s.options,o,n)}this._serverConfig=Object.assign({automaticDataCollectionEnabled:a},r),this._finalizationRegistry=new FinalizationRegistry(()=>{this.automaticCleanup()}),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,r.releaseOnDeref=void 0,xc(GZt,nbi,"serverapp")}get refCount(){return this._refCount}incRefCount(e){this.isDeleted||(this._refCount++,e!==void 0&&this._finalizationRegistry.register(e,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){KZt(this)}get settings(){return this.checkDestroyed(),this._serverConfig}checkDestroyed(){if(this.isDeleted)throw Nb.create("server-app-deleted")}};var Sm=g1s;function VZt(t,e={}){let r=t;typeof e!="object"&&(e={name:e});let i=Object.assign({name:FS,automaticDataCollectionEnabled:!1},e),n=i.name;if(typeof n!="string"||!n)throw Nb.create("bad-app-name",{appName:String(n)});if(r||(r=V0i()),!r)throw Nb.create("no-options");let a=n_.get(n);if(a){if(wR(r,a.options)&&wR(i,a.config))return a;throw Nb.create("duplicate-app",{appName:n})}let o=new LJ(n);for(let u of dq.values())o.addComponent(u);let s=new HZt(r,i,o);return n_.set(n,s),s}function m1s(t,e){if(FZt())throw Nb.create("invalid-server-app-environment");e.automaticDataCollectionEnabled===void 0&&(e.automaticDataCollectionEnabled=!1);let r;Sgn(t)?r=t.options:r=t;let i=Object.assign(Object.assign({},e),r);i.releaseOnDeref!==void 0&&delete i.releaseOnDeref;let n=l=>[...l].reduce((c,y)=>Math.imul(31,c)+y.charCodeAt(0)|0,0);if(e.releaseOnDeref!==void 0&&typeof FinalizationRegistry>"u")throw Nb.create("finalization-registry-not-supported",{});let a=""+n(JSON.stringify(i)),o=pq.get(a);if(o)return o.incRefCount(e.releaseOnDeref),o;let s=new LJ(a);for(let l of dq.values())s.addComponent(l);let u=new abi(r,e,a,s);return pq.set(a,u),u}function gq(t=FS){let e=n_.get(t);if(!e&&t===FS&&V0i())return VZt();if(!e)throw Nb.create("no-app",{appName:t});return e}function b1s(){return Array.from(n_.values())}async function KZt(t){let e=!1,r=t.name;n_.has(r)?(e=!0,n_.delete(r)):pq.has(r)&&t.decRefCount()<=0&&(pq.delete(r),e=!0),e&&(await Promise.all(t.container.getProviders().map(i=>i.delete())),t.isDeleted=!0)}function xc(t,e,r){var i;let n=(i=h1s[t])!==null&&i!==void 0?i:t;r&&(n+=`-${r}`);let a=n.match(/\s|\//),o=e.match(/\s|\//);if(a||o){let s=[`Unable to register library "${n}" with version "${e}":`];a&&s.push(`library name "${n}" contains illegal characters (whitespace or "/")`),a&&o&&s.push("and"),o&&s.push(`version name "${e}" contains illegal characters (whitespace or "/")`),uQ.warn(s.join(" "));return}nh(new Ws(`${n}-version`,()=>({library:n,version:e}),"VERSION"))}function lbi(t,e){if(t!==null&&typeof t!="function")throw Nb.create("invalid-log-argument");pgn(t,e)}function cbi(t){cgn(t)}var C1s="firebase-heartbeat-database",I1s=1,UJ="firebase-heartbeat-store",rbi=null;function vgn(){return rbi||(rbi=mgn(C1s,I1s,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(UJ)}catch(r){console.warn(r)}}}}).catch(t=>{throw Nb.create("idb-open",{originalErrorMessage:t.message})})),rbi}async function E1s(t){try{let r=(await vgn()).transaction(UJ),i=await r.objectStore(UJ).get(Bgn(t));return await r.done,i}catch(e){if(e instanceof Qs)uQ.warn(e.message);else{let r=Nb.create("idb-get",{originalErrorMessage:e?.message});uQ.warn(r.message)}}}async function bgn(t,e){try{let i=(await vgn()).transaction(UJ,"readwrite");await i.objectStore(UJ).put(e,Bgn(t)),await i.done}catch(r){if(r instanceof Qs)uQ.warn(r.message);else{let i=Nb.create("idb-set",{originalErrorMessage:r?.message});uQ.warn(i.message)}}}function Bgn(t){return`${t.name}!${t.options.appId}`}var S1s=1024,v1s=30*24*60*60*1e3,obi=class{constructor(e){this.container=e,this._heartbeatsCache=null;let r=this.container.getProvider("app").getImmediate();this._storage=new sbi(r),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}async triggerHeartbeat(){var e,r;let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),a=Cgn();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((r=this._heartbeatsCache)===null||r===void 0?void 0:r.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===a||this._heartbeatsCache.heartbeats.some(o=>o.date===a)))return this._heartbeatsCache.heartbeats.push({date:a,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let s=new Date(o.date).valueOf();return Date.now()-s<=v1s}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let r=Cgn(),{heartbeatsToSend:i,unsentEntries:n}=B1s(this._heartbeatsCache.heartbeats),a=qJ(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=r,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),a}};function Cgn(){return new Date().toISOString().substring(0,10)}function B1s(t,e=S1s){let r=[],i=t.slice();for(let n of t){let a=r.find(o=>o.agent===n.agent);if(a){if(a.dates.push(n.date),Ign(r)>e){a.dates.pop();break}}else if(r.push({agent:n.agent,dates:[n.date]}),Ign(r)>e){r.pop();break}i=i.slice(1)}return{heartbeatsToSend:r,unsentEntries:i}}var sbi=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return r_()?sgn().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){let r=await E1s(this.app);return r?.heartbeats?r:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var r;if(await this._canUseIndexedDBPromise){let n=await this.read();return bgn(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var r;if(await this._canUseIndexedDBPromise){let n=await this.read();return bgn(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}else return}};function Ign(t){return qJ(JSON.stringify({version:2,heartbeats:t})).length}function R1s(t){nh(new Ws("platform-logger",e=>new ibi(e),"PRIVATE")),nh(new Ws("heartbeat",e=>new obi(e),"PRIVATE")),xc(GZt,nbi,t),xc(GZt,nbi,"esm2017"),xc("fire-js","")}R1s("");var dbi=class{constructor(e,r){this._delegate=e,this.firebase=r,Aq(e,new Ws("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),KZt(this._delegate)))}_getService(e,r=FS){var i;this._delegate.checkDestroyed();let n=this._delegate.container.getProvider(e);return!n.isInitialized()&&((i=n.getComponent())===null||i===void 0?void 0:i.instantiationMode)==="EXPLICIT"&&n.initialize(),n.getImmediate({identifier:r})}_removeServiceInstance(e,r=FS){this._delegate.container.getProvider(e).clearInstance(r)}_addComponent(e){Aq(this._delegate,e)}_addOrOverwriteComponent(e){ubi(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}};var w1s={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},Rgn=new Ob("app-compat","Firebase",w1s);function T1s(t){let e={},r={__esModule:!0,initializeApp:a,app:n,registerVersion:xc,setLogLevel:cbi,onLog:lbi,apps:null,SDK_VERSION:Sm,INTERNAL:{registerComponent:s,removeApp:i,useAsService:u,modularAPIs:pbi}};r.default=r,Object.defineProperty(r,"apps",{get:o});function i(l){delete e[l]}function n(l){if(l=l||FS,!W0i(e,l))throw Rgn.create("no-app",{appName:l});return e[l]}n.App=t;function a(l,c={}){let y=VZt(l,c);if(W0i(e,y.name))return e[y.name];let m=new t(y,r);return e[y.name]=m,m}function o(){return Object.keys(e).map(l=>e[l])}function s(l){let c=l.name,y=c.replace("-compat","");if(nh(l)&&l.type==="PUBLIC"){let m=(C=n())=>{if(typeof C[y]!="function")throw Rgn.create("invalid-app-argument",{appName:c});return C[y]()};l.serviceProps!==void 0&&FJ(m,l.serviceProps),r[y]=m,t.prototype[y]=function(...C){return this._getService.bind(this,c).apply(this,l.multipleInstances?C:[])}}return l.type==="PUBLIC"?r[y]:null}function u(l,c){return c==="serverAuth"?null:c}return r}function Tgn(){let t=T1s(dbi);t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:Tgn,extendNamespace:e,createSubscribe:UZt,ErrorFactory:Ob,deepExtend:FJ});function e(r){FJ(t,r)}return t}var _1s=Tgn();var wgn=new kS("@firebase/app-compat"),D1s="@firebase/app-compat",P1s="0.2.30";function Q1s(t){xc(D1s,P1s,t)}if(FZt()&&self.firebase!==void 0){wgn.warn(`
|
|
1189
1189
|
Warning: Firebase is already defined in the global scope. Please make sure
|
|
1190
1190
|
Firebase library is only loaded once.
|
|
1191
1191
|
`);let t=self.firebase.SDK_VERSION;t&&t.indexOf("LITE")>=0&&wgn.warn(`
|
|
@@ -1257,10 +1257,10 @@ user has a role but the role grants to environment permissions to a specified en
|
|
|
1257
1257
|
`).optional()}).passthrough(),P3u=S.object({userRoles:S.array(Vte)}),Q3u=S.object({environmentRole:S.string().describe("The environment role to set"),setDefaultProjectRole:S.string().describe(`If set, if the user has no role for the environment's project, it will be set to this role. If this
|
|
1258
1258
|
is not set and the user has no role assigned for the environment's project, the response will be an
|
|
1259
1259
|
HTTP 403 error
|
|
1260
|
-
`).optional()}).passthrough(),LNi=S.object({updatedBy:S.string().optional(),updatedAt:S.string().datetime({offset:!0}).optional(),name:S.string(),publisherID:S.string(),description:S.string(),org:S.string(),latestRelease:S.string(),overview:S.string(),featured:S.boolean(),tags:S.array(S.string()),certified:S.boolean(),packageID:S.string(),id:S.string(),platformKind:S.enum(["fabric","snowflake","databricks","bigquery"])}).passthrough(),zpr=S.object({createdAt:S.string().datetime({offset:!0}),createdBy:S.string().optional(),updatedBy:S.string().optional(),updatedAt:S.string().datetime({offset:!0}),version:S.string(),changeLog:S.string(),releaseID:S.string(),storagePath:S.string(),privacy:S.enum(["public","private","unlisted"])}).passthrough(),O3u=S.object({description:S.string(),overview:S.string().max(200),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean()}).passthrough(),Hpr=S.enum(["snowflake","fabric","databricks","bigquery"]),N3u=S.object({changeLog:S.string().min(1),privacy:S.enum(["public","private","unlisted"])}).passthrough(),M3u=S.object({name:S.string(),description:S.string(),overview:S.string().max(200),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean(),platformKind:S.enum(["snowflake","fabric","databricks","bigquery"])}).passthrough(),x3u=S.object({changeLog:S.string(),version:S.string(),certified:S.boolean().optional()}).passthrough(),JNi=S.lazy(()=>S.object({packageID:S.string().min(1),alias:S.string(),version:S.string(),releaseID:S.string().min(1),macros:S.string(),dependencies:S.record(JNi)}).passthrough()),nUn=S.object({name:S.string(),version:S.number(),id:S.string(),isDisabled:S.boolean(),metadata:S.object({}).partial().passthrough()}).passthrough(),k3u=S.object({dependencies:S.record(JNi),nodeTypes:S.record(nUn),macros:S.string()}).passthrough(),q3u=S.object({release:x3u.describe("Package release information for a create operation."),privacy:S.enum(["public","private","unlisted"]),entities:k3u.describe("Entities that are part of a package release."),packageVariables:S.string(),packageID:S.string().min(1)}).passthrough(),F3u=S.object({packageID:S.string().min(1),releaseID:S.string().min(1),changeLog:S.string().optional(),description:S.string().optional(),privacy:S.enum(["public","private","unlisted"]).optional()}).passthrough(),j3u=S.object({typesenseKey:S.string().describe("The Typesense access key scoped to a users org."),typesenseHosts:S.array(S.string()).describe("The Typesense host address(es) for our cluster(s).")}).passthrough(),L3u=S.union([S.number(),S.string()]).describe("The starting run ID, runStartTime, or runEndTime (exclusive) for paging the query results.").optional(),U3u=S.union([S.string(),S.array(S.string())]).describe("One or more project IDs to filter the query results.").optional(),Kpr=S.enum(["deploy","refresh"]),z3u=S.union([Kpr,S.array(Kpr)]).describe("One or more run types to filter the query results.").optional(),Wpr=S.enum(["canceled","completed","failed","initializing","rendering","running","waitingToRun"]),G3u=S.union([Wpr,S.array(Wpr)]).describe("One or more status values to filter the query results.").optional(),H3u=S.union([S.string(),S.array(S.string())]).describe("One or more environment IDs to filter the query results.").optional(),V3u=S.enum(["asc","desc"]),K3u=S.enum(["id","runStartTime","runEndTime"]),W3u=S.object({id:S.number().int().describe("The run ID."),reRunID:S.string().describe("If this is a re-run, the ID of the original operation.").optional(),runStartTime:S.string().datetime({offset:!0}).describe("The datetime the run started.").optional(),runEndTime:S.string().datetime({offset:!0}).describe("The datetime the run ended.").optional(),runType:Kpr,runStatus:Wpr,environmentID:S.string().describe("The environment in which the run operation was applied.").optional(),runFailureReason:S.string().describe("Information about the cause of a run failure.").optional()}).passthrough(),J3u=S.object({canceled:S.boolean().describe("If the run was canceled.").optional(),deployCommit:S.string().describe("The full commit hash."),deployCommitMessage:S.string().describe("The commit message.").optional(),environmentID:S.string().describe("The Environment ID for this run."),parallelism:S.number().int().describe("The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse.").optional(),nodesInRun:S.number().int().describe("The number of Nodes deployed.").optional()}),Y3u=S.object({canceled:S.boolean().describe("If the run was canceled.").optional(),environmentID:S.string().describe("The Environment ID for this run."),excludeNodesSelector:S.string().describe("A selector string of nodes to exclude.").optional(),forceIgnoreEnvironmentStatus:S.boolean().optional(),includeNodesSelector:S.string().describe("A selector string of nodes to include.").optional(),jobID:S.number().int().describe("The Job ID.").optional(),parallelism:S.number().int().describe("The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse.").optional(),refreshDescription:S.string().describe("The Job name.").optional(),nodesForRefresh:S.number().int().optional(),nodesInRun:S.number().int().describe("The number of Nodes deployed.").optional(),executor:S.string().optional()}),Z3u=S.union([J3u,Y3u]),$3u=S.enum(["Basic","Cloud","KeyPair","OAuth"]),X3u=S.object({snowflakeAccount:S.string(),snowflakeAuthType:$3u,snowflakeRole:S.string().optional(),snowflakeUsername:S.string(),snowflakeWarehouse:S.string().optional()}),eSu=S.enum(["Token","Cloud","OAuthU2M","OAuthM2M"]),tSu=S.object({databricksHost:S.string(),databricksAuthType:eSu,databricksPath:S.string()}),rSu=S.literal("oauth"),iSu=S.object({fabricConnectionString:S.string(),fabricAuthType:rSu,platformKind:S.string().optional()}),nSu=S.enum(["ServiceAccount","OAuth"]),aSu=S.object({bigQueryAuthType:nSu}),aUn=S.object({id:S.number().int(),reRunID:S.string().describe("If this is a re-run, the ID of the original operation.").optional(),runDetails:Z3u.describe("Detailed information about a run."),runEndTime:S.string().datetime({offset:!0}).describe("The datetime when the run ended.").optional(),runFailureReason:S.string().describe("The reason the run failed.").optional(),runHistory:S.array(S.number().int()).optional(),runStartTime:S.string().datetime({offset:!0}).describe("The datetime the run started.").optional(),runStatus:Wpr,runTimeParameters:S.object({}).partial().passthrough().describe("The default Environment parameters. Parameters changed during deploy will not show here."),runType:Kpr,userCredentials:S.union([X3u,tSu,iSu,aSu]).optional(),userID:S.string().optional(),projectID:S.string(),hasTestFailures:S.boolean().describe("Whether the run has test failures.").optional(),version:S.number().int().optional(),renderingProgress:S.object({totalNodes:S.number().int().gte(0).describe("Total number of nodes to render"),completedNodes:S.number().int().gte(0).describe("Number of nodes completed so far")}).passthrough().describe("Progress information for the rendering phase").optional()}),oSu=S.object({limit:S.number().int().describe("The maximum number of runs returned by this query."),next:S.union([S.number(),S.string(),S.null()]).describe("The field value representing the start of the next page of results."),orderByDirection:V3u.describe("The sort order for query results."),orderBy:K3u.describe("The field used to sort query results. Defaults to `id`, but must be explicitly provided when also using `startingFrom`. Make sure to match data type."),data:S.union([S.array(W3u),S.array(aUn)]).describe("A collection of runs.")}).passthrough(),sSu=S.enum(["API","CLI","UI","fivetranAPI"]),jLn=S.object({endTime:S.string().datetime({offset:!0}).optional(),error:zLn.optional(),isRunning:S.boolean().describe("If the queried run is still running."),name:S.string().describe("The name of the Stage the query ran on."),queryID:S.string().optional(),rowsDeleted:S.number().int().optional(),rowsInserted:S.number().int().optional(),rowsUpdated:S.number().int().optional(),sql:S.string().describe("The SQL query run during the stage."),startTime:S.string().datetime({offset:!0}).optional(),status:S.string().describe("The query status."),success:S.boolean().describe("If the query results were run successfully."),type:S.enum(["sql","sqlTest"]).optional(),warehouse:S.string().describe("Name of the warehouse.").optional()}),uSu=S.object({isRunning:S.boolean().describe("If the queried run is still running."),name:S.string(),nodeID:S.string(),runState:S.string().optional(),hasTestFailures:S.boolean().optional(),origin:sSu.optional(),queryResults:S.array(jLn).describe("The query result returns the status of different stages such as Delete Table or Rename Table. See the queryResults name for the stage."),renderQueryResult:jLn.optional()}),lSu=S.object({data:S.array(uSu).describe("A collection of run results.")}).passthrough(),zNi=S.object({endTime:S.string().datetime({offset:!0}),error:S.object({errorString:S.string(),errorDetail:S.string()}).passthrough().nullish(),fields:S.array(S.object({name:S.string(),type:S.string()}).passthrough()),isRunning:S.boolean(),name:S.string(),sql:S.string(),startTime:S.string().datetime({offset:!0}),status:S.enum(["Success","Failure","Canceled","Queued","Running","Transaction exceeded data limit, returned a subset of rows"]),success:S.boolean(),type:S.enum(["sql","sqlTest"]),exportedRefs:S.array(S.object({locationName:S.string(),nodeName:S.string()}).passthrough()),invalidExportedRefs:S.array(S.object({locationName:S.string(),nodeName:S.string()}).passthrough())}).passthrough(),cSu=S.object({name:S.string(),isRunning:S.literal(!0)}),pSu=S.object({name:S.string(),queryResults:S.array(S.union([zNi,cSu])),isRunning:S.boolean(),renderQueryResults:zNi.optional()}).passthrough(),dSu=S.object({id:S.string().describe("The node ID"),dataResult:S.union([S.record(S.union([S.number(),S.string(),S.boolean()])),zNi]).describe("Data result - can be a record of values or a completed query result").optional(),name:S.string().describe("The name of the node"),queryResultSequence:pSu,runExecutionSequenceID:S.number().int().describe("The execution sequence ID").optional(),hasTestFailures:S.boolean().describe("Whether the run has test failures").optional(),runResultVersion:S.literal(2).describe("Version of the run result format").optional().default(2),runState:S.enum(["waiting","queued","running","complete","error","skipped","canceled"]).describe("The state of the run"),stepRunState:S.enum(["None","Error","Validated","Created","DataLoaded","Skipped"]).describe("The state of the step run"),version:S.literal(2).describe("Version field").default(2),createdAt:S.string().datetime({offset:!0}),updatedAt:S.string().datetime({offset:!0})}).passthrough(),ASu=S.object({data:S.array(dSu).describe("Raw run results from external storage.")}).passthrough(),gSu=S.object({apiKey:S.string(),authDomain:S.string(),projectId:S.string(),storageBucket:S.string(),messagingSenderId:S.string(),appId:S.string(),measurementId:S.string(),emulatorInfo:S.object({auth:S.string(),firestore:S.string(),storage:S.string()}).passthrough().optional()}).passthrough(),hSu=S.object({expressions:S.array(S.object({sql:S.string().describe("The SQL expression or FROM clause to parse"),type:S.enum(["expression","from"]).describe("Type of SQL to parse - either an expression or a FROM clause"),platformKind:Hpr}).passthrough()).describe("Array of SQL expressions to parse")}).passthrough(),ySu=S.object({entityType:S.enum(["node","workspace","run","subgraph","job","macro","nodeType","installedPackage"]),writeType:S.enum(["save","delete","merge"]),data:S.object({id:S.union([S.string(),S.number()]),version:S.union([S.string(),S.number()])}).passthrough()}).passthrough(),fSu=S.object({workspaceID:S.number(),requesetID:S.string().optional(),writeInfo:S.array(ySu)}).passthrough(),mSu=S.object({name:S.string(),tags:S.array(S.string()),count:S.number().int()}).passthrough(),bSu=S.object({metrics:S.array(mSu)}).passthrough(),CSu=S.object({parameters:S.object({}).partial().passthrough(),runDetails:S.object({currentWorkspaceDataFilePath:S.string(),desiredWorkspaceDataFilePath:S.string(),disablePresync:S.boolean(),environmentID:S.string(),planID:S.string(),skippedBeforeCollection:S.boolean().optional().default(!1),useRenderCache:S.boolean().optional().default(!1)}).passthrough(),userCredentials:S.object({}).partial().passthrough()}).passthrough(),ISu=S.object({message:S.string(),planID:S.string()}).passthrough(),ESu=S.object({planStorageFilePath:S.string()}).passthrough(),SSu=S.object({status:S.literal("planning")}).passthrough(),vSu=S.object({files:S.array(S.object({path:S.string().describe("File path relative to repository root"),before:S.string().describe("File content before changes"),after:S.string().describe("File content after changes")}).passthrough()).min(1).describe("Array of files being committed with their before/after content")}).passthrough(),Ozc=S.object({message:S.string().max(400).describe("AI generated git commit message (Soft max 200 chars, Hard max 400 chars)")}).passthrough(),BSu=S.object({workspaceID:S.number().describe("The workspace ID."),nodeID:S.string().min(1).describe("The node ID.")}).passthrough(),Nzc=S.object({description:S.string().min(1).describe("AI generated description of the node.")}).passthrough(),RSu=S.object({messages:S.array(S.object({role:S.enum(["user","assistant"]).describe("The role of the message sender."),content:S.string().describe("The text content of the message.")}).passthrough()).describe("An array of message objects representing the conversation history."),systemPrompt:S.string().describe("Optional system prompt").optional(),responseSchema:S.object({}).partial().passthrough().describe("Optional schema for structuring the response format").optional(),threadId:S.string().describe("Identifier for the conversation thread")}).passthrough(),wSu=S.object({text:S.string().describe("AI-generated response text"),usage:S.object({inputUsage:S.number(),outputUsage:S.number(),unit:S.enum(["token","char"])}).partial().passthrough().optional()}).passthrough(),TSu=S.object({model:S.string().describe("The model to use for the LLM call"),messages:S.array(S.any()).describe("The messages to send to the LLM"),schema:S.object({}).partial().passthrough().describe("The schema to use for structured output").optional(),tools:S.object({}).partial().passthrough().describe("The tools to use for the LLM call").optional(),toolChoice:S.union([S.enum(["auto","required","none"]),S.object({type:S.literal("tool"),toolName:S.string()}).passthrough()]).describe("Controls which tools the model can use").optional()}).passthrough(),Mzc=S.object({}).partial().passthrough(),oUn=S.string(),LLn=S.object({name:oUn.min(1).max(100).describe("Name of the subgraph"),steps:S.array(S.string().max(64)).describe("Array of node IDs in the subgraph")}),ULn=S.object({id:S.string().describe("Unique identifier for the subgraph"),name:oUn.min(1).max(100).describe("Name of the subgraph"),steps:S.array(S.string().max(64)).describe("Array of node IDs in the subgraph"),version:S.literal(1).describe("Version of the subgraph schema").default(1),createdAt:S.string().datetime({offset:!0}).describe("Date and time the subgraph was created").optional(),updatedAt:S.string().datetime({offset:!0}).describe("Date and time the subgraph was last updated").optional(),createdBy:S.string().describe("ID of the user who created the subgraph").optional(),updatedBy:S.string().describe("ID of the user who last updated the subgraph").optional()}),_Su=S.object({id:S.string().describe("The unique identifier of the warehouse"),name:S.string().describe("The name of the warehouse"),odbc_params:S.object({path:S.string().describe("The path for the SQL warehouse")}).passthrough().describe("The connection parameters for the warehouse")}).passthrough(),DSu=S.object({warehouses:S.array(_Su)}).passthrough(),PSu=S.object({id:S.string().describe("The project ID"),name:S.string().describe("The project friendly name").optional()}).passthrough(),QSu=S.object({projects:S.array(PSu)}).passthrough(),xzc=S.array(S.string());var kzc=S.object({macros:S.string(),dependencies:S.record(JNi),nodeTypes:S.record(nUn)}).passthrough(),qzc=S.object({id:S.string(),version:S.string()}).passthrough(),Fzc=S.object({id:S.string(),releaseID:S.string()}).passthrough(),jzc=S.string(),OSu=Vpr.and(S.object({user:B4.describe("Summary information about a user.")}).passthrough()),Lzc=S.array(OSu),NSu=WNi.and(S.object({user:B4.describe("Summary information about a user.")}).passthrough()),Uzc=S.array(NSu);var zzc=S.object({data:KNi}).passthrough(),MSu=S.object({seconds:S.number(),nanoseconds:S.number()}),xSu=S.object({_seconds:S.number(),_nanoseconds:S.number()}),Gzc=S.union([MSu,xSu]),kSu=S.object({transform:S.string().describe("Returns the SQL of any column transformations.")}),Hzc=S.union([JLn,kSu]),Vzc=VLn.and(S.object({mappingsV1:S.string(),runTimeParameters:S.string(),jobs:S.array($Ln)}).partial().passthrough());var sUn=Upr([{method:"get",path:"/api/integrations/fivetran/jobs/:jobId/history/:historyId",alias:"GetFivetranJobHistory",description:"Get Fivetran job history in org.",requestFormat:"json",parameters:[{name:"jobId",type:"Path",schema:S.string().describe("The Fivetran job ID.")},{name:"historyId",type:"Path",schema:S.string().describe("The Fivetran history ID.")}],response:w3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/integrations/fivetran/jobs/:jobId/run",alias:"PostFivetranJobRefresh",requestFormat:"json",parameters:[{name:"body",description:"Request body for start Fivetran run.",type:"Body",schema:_3u},{name:"jobId",type:"Path",schema:S.string().describe("The Fivetran job ID.")}],response:S.object({data:KNi}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/integrations/fivetran/projects",alias:"GetFivetranProjects",description:"Get fivetran projects in org.",requestFormat:"json",response:E3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/integrations/fivetran/projects/:projectId",alias:"GetFivetranProject",requestFormat:"json",parameters:[{name:"projectId",type:"Path",schema:S.string().describe("The unique identifier for the project")}],response:S3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/integrations/fivetran/projects/:projectId/jobs",alias:"GetFivetranJobs",description:"Get Fivetran jobs.",requestFormat:"json",parameters:[{name:"projectId",type:"Path",schema:S.string().describe("The unique identifier for the project")}],response:B3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/admin/kill-job/:orgId/:runId",alias:"KillJob",description:"Deletes the Kubernetes job.",requestFormat:"json",parameters:[{name:"orgId",type:"Path",schema:S.string().describe("The Organization ID of the organization that will be affected by the API call.")},{name:"runId",type:"Path",schema:S.number().int().describe("The Run ID of the run that will be affected by the API call.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/bulkWrite",alias:"BulkWrite",description:"Updates multiple documents for a workspace.",requestFormat:"json",parameters:[{name:"body",description:"The workspace to update and the data to update with.",type:"Body",schema:fSu}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/customToken",alias:"GenerateCustomToken",description:"Generate a Coalesce token from the provided OpenID Connect ID token",requestFormat:"json",parameters:[{name:"body",description:"The information from the OpenID Connect authorization server required to sign into Coalesce.",type:"Body",schema:UEu}],response:S.object({customToken:S.string().describe("A Coalesce token")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/database",alias:"GetDatabase",description:"Gets the information required to connect to the Coalesce database.",requestFormat:"json",response:gSu},{method:"get",path:"/api/v1/environments",alias:"GetEnvironments",description:"Get a collection of Environment information.",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the environments.").optional().default(!1)},{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of environments to return.").optional().default(100)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")}],response:HEu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/environments",alias:"CreateEnvironment",description:"Create a new environment.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:KEu},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:UNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/environments/:environmentID",alias:"DeleteEnvironment",description:"Delete an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID",alias:"GetEnvironment",description:"Get information about an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:UNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID/jobs/:jobID",alias:"GetJob",description:"Get information about a job in an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"jobID",type:"Path",schema:S.string().describe("The job ID.")}],response:S.object({id:S.string().describe("The Job ID."),name:S.string().describe("The Job name."),includeSelector:S.string().describe("A selector string of nodes to include."),excludeSelector:S.string().describe("A selector string of nodes to exclude."),createdAt:S.string().datetime({offset:!0}),updatedAt:S.string().datetime({offset:!0})}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID/nodes",alias:"GetNodes",description:"Get a collection of nodes for an environment",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the nodes.").optional().default(!1)},{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of nodes to return.").optional().default(100)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")}],response:kLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID/nodes/:nodeID",alias:"GetNode",description:"Get information about a node in an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/featureFlags",alias:"GetFeatureFlags",description:"Gets feature flags for the authenticated user.",requestFormat:"json",parameters:[{name:"subdomain",type:"Query",schema:S.string().describe("The customer subdomain.").optional()}],response:S.object({featureFlags:S.record(S.union([S.boolean(),S.string(),S.number(),S.object({}).partial().passthrough(),S.array(S.any())]))}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/featureFlags/config",alias:"GetFeatureFlagsClientConfig",description:"Gets information the client needs to connect to the feature flags service.",requestFormat:"json",response:S.object({launchDarklyClientID:S.string()}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/featureFlags/default",alias:"GetDefaultFeatureFlags",description:"Gets default feature flags for the unauthenticated users.",requestFormat:"json",response:S.object({featureFlags:S.record(S.union([S.boolean(),S.string(),S.number(),S.object({}).partial().passthrough(),S.array(S.any())]))}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/gitAccounts",alias:"ListGitAccounts",description:"Allows for a user to view all the git accounts in their org.",requestFormat:"json",parameters:[{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:p3u.describe("A list of git accounts")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/gitAccounts",alias:"CreateGitAccount",description:"Users can create git accounts for their org.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:d3u},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:Gpr.describe("All the fields needed to create a git account")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/gitAccounts/:gitAccountID",alias:"GetGitAccount",description:"Allows for a user to get a git account.",requestFormat:"json",parameters:[{name:"gitAccountID",type:"Path",schema:S.string().describe("The git account ID.")},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:Gpr.describe("All the fields needed to create a git account")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"patch",path:"/api/v1/gitAccounts/:gitAccountID",alias:"UpdateGitAccount",description:"Allows for a user to update their git account.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:eUn},{name:"gitAccountID",type:"Path",schema:S.string().describe("The git account ID.")},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:Gpr.describe("All the fields needed to create a git account")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/gitAccounts/:gitAccountID",alias:"DeleteGitAccount",description:"Allows for a user to delete a git account.",requestFormat:"json",parameters:[{name:"gitAccountID",type:"Path",schema:S.string().describe("The git account ID.")},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/chat",alias:"GetChatMessage",description:"Get the generated AI chat message.",requestFormat:"json",parameters:[{name:"body",description:"The prompt to generate the AI chat message.",type:"Body",schema:RSu}],response:wSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/git-commit-message",alias:"GetAIGitCommitMessage",description:"Generate an AI commit message based on git diffs",requestFormat:"json",parameters:[{name:"body",description:"Git diff context for commit message generation",type:"Body",schema:vSu}],response:S.object({message:S.string().max(400).describe("AI generated git commit message (Soft max 200 chars, Hard max 400 chars)")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/llm",alias:"GetLlmMessage",description:"Get the generated AI LLM message.",requestFormat:"json",parameters:[{name:"body",description:"The prompt to generate the AI LLM message.",type:"Body",schema:TSu}],response:S.object({}).partial().passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/node-description",alias:"GetAINodeDescription",description:"Retrieve the generated AI descriptions for a node.",requestFormat:"json",parameters:[{name:"body",description:"workspaceID, nodeID of the node for which to generate the AI description.",type:"Body",schema:BSu}],response:S.object({description:S.string().min(1).describe("AI generated description of the node.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/metrics",alias:"SubmitMetrics",description:"Submit a set of metrics",requestFormat:"json",parameters:[{name:"body",description:"The metrics to submit",type:"Body",schema:bSu}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/multiFactorAuth/:userID",alias:"RemoveMultiFactor",description:"Deletes the MFA for a user in firebase auth",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/:packageID",alias:"GetRegistryPackage",description:"Get a package on the registry.",requestFormat:"json",parameters:[{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")}],response:LNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/packageRegistry/:packageID",alias:"updatePackageV2",description:"Update an existing package's information.",requestFormat:"json",parameters:[{name:"body",description:"Updated package details. Does not include package content held in a release.",type:"Body",schema:O3u},{name:"packageID",type:"Path",schema:S.string().min(1).describe("The id of the package.")}],response:S.object({org:S.string(),name:S.string(),description:S.string(),overview:S.string(),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean(),packageID:S.string(),id:S.string().optional(),publisherID:S.string().optional(),latestRelease:S.string().optional(),platformKind:Hpr}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/packageRegistry/:packageID/releases/:releaseID",alias:"updatePackageReleaseV2",description:"Update a package release.",requestFormat:"json",parameters:[{name:"body",description:"The package release info to update with.",type:"Body",schema:N3u},{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")},{name:"releaseID",type:"Path",schema:S.string().min(1).describe("The package release ID.")}],response:zpr,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/:packageID/releases/:releaseID",alias:"GetRegistryPackageRelease",description:"Get a release from a package in the registry.",requestFormat:"json",parameters:[{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")},{name:"releaseID",type:"Path",schema:S.string().min(1).describe("The package release ID.")}],response:zpr,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/:packageID/releases/privacy/:privacy",alias:"GetAllRegistryPackageReleases",description:"Get all available releases for a package on the registry.",requestFormat:"json",parameters:[{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")},{name:"privacy",type:"Path",schema:S.enum(["public","private","unlisted","all"]).describe("The privacy level of the packages requested")}],response:S.array(zpr),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/all",alias:"GetAllRegistryPackages",description:"Get all available packages on the registry.",requestFormat:"json",response:S.array(LNi),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/packageRegistry/createPackage",alias:"createPackage",description:"Create a package without a release.",requestFormat:"json",parameters:[{name:"body",description:"Info describing and defining the package. Does not include package content held in a release",type:"Body",schema:M3u}],response:S.object({org:S.string(),name:S.string(),description:S.string(),overview:S.string(),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean(),packageID:S.string(),id:S.string().optional(),publisherID:S.string().optional(),latestRelease:S.string().optional(),platformKind:Hpr}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/packageRegistry/createRelease",alias:"AddPackageRelease",description:"Add a new package release to an existing package.",requestFormat:"json",parameters:[{name:"body",description:"The package release info.",type:"Body",schema:q3u}],response:zpr,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/org",alias:"GetRegistryPackagesForOrg",description:"Get a release from a package in the registry.",requestFormat:"json",response:S.array(LNi),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/packageRegistry/update",alias:"UpdatePackage",description:"Update a package.",requestFormat:"json",parameters:[{name:"body",description:"The package info to create with.",type:"Body",schema:F3u}],response:S.string(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/plan",alias:"createPlan",description:"Create a deployment plan",requestFormat:"json",parameters:[{name:"body",description:"Requirements for plan creation",type:"Body",schema:CSu}],response:ISu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/plan/:environmentID/:planID",alias:"getPlan",description:"Get an existing deployment plan",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID")},{name:"planID",type:"Path",schema:S.string().describe("The plan ID")}],response:S.union([ESu,SSu]),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects",alias:"GetProjectsInOrg",description:"Get projects in org.",requestFormat:"json",parameters:[{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:f3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/projects",alias:"CreateProject",description:"Create a new project.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:m3u}],response:VNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects/:projectID",alias:"GetProjectInOrg",description:"Get a project.",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:FLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"patch",path:"/api/v1/projects/:projectID",alias:"UpdateProject",description:"Update a project",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:b3u},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:FLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/projects/:projectID",alias:"DeleteProject",description:"Delete a project.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:C3u.optional()},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects/:projectID/gitAccounts",alias:"ListProjectGitAccounts",description:"List git accounts for a project",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:I3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects/:projectID/gitAccounts/:userID",alias:"GetProjectGitAccount",description:"Get a user's git account for a project",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:tUn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/projects/:projectID/gitAccounts/:userID",alias:"SetProjectGitAccount",description:"Set a user's git account for a project",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:S.object({gitAccountID:S.string()}).passthrough()},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/projects/:projectID/gitAccounts/:userID",alias:"DeleteProjectGitAccount",description:"Un-set a user's git account for a project",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs",alias:"GetRuns",description:"Get a collection of information about runs.",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"limit",type:"Query",schema:S.number().int().gte(0).lte(1e3).describe("The maximum number of runs to return.").optional().default(25)},{name:"startingFrom",type:"Query",schema:L3u},{name:"orderBy",type:"Query",schema:S.enum(["id","runStartTime","runEndTime"]).describe("The field used to sort query results. Defaults to `id`, but must be explicitly provided when also using `startingFrom`. Make sure to match data type.").optional()},{name:"orderByDirection",type:"Query",schema:S.enum(["asc","desc"]).describe("The sort order for query results.").optional().default("desc")},{name:"projectID",type:"Query",schema:U3u},{name:"runType",type:"Query",schema:z3u},{name:"runStatus",type:"Query",schema:G3u},{name:"environmentID",type:"Query",schema:H3u},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the run.").optional().default(!1)}],response:oSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs/:runID",alias:"GetRun",description:"Gets a single run.",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"runID",type:"Path",schema:S.number().int().describe("The run ID.")}],response:aUn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs/:runID/results",alias:"GetRunResults",description:"Get a collection of the results of a deploy or refresh run",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"runID",type:"Path",schema:S.number().int().describe("The run ID.")}],response:lSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs/:runID/stored-run-results/:chunkID",alias:"GetStoredRunResults",description:"Get raw run results from external storage",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"runID",type:"Path",schema:S.string().describe("The run ID.")},{name:"chunkID",type:"Path",schema:S.string().describe("The chunk ID")}],response:ASu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/secrets/:secretType/:context",alias:"SecretExists",description:"Determines whether or not a git token value exists for a given project ID.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.boolean(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/secrets/:secretType/:context",alias:"UpgradeSecret",description:"Upgrades a secret from secretType its upgrade target.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/secrets/:secretType/:context",alias:"SetSecret",description:"Sets the value of a secret.",requestFormat:"json",parameters:[{name:"body",description:"The new value of the secret.",type:"Body",schema:S.object({secretValue:S.unknown()}).passthrough()},{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/secrets/:secretType/:context",alias:"DeleteSecret",description:"Deletes a secret.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/sql/parse",alias:"ParseSql",description:"Parse multiple SQL expressions or FROM clauses using the Strumenta parser.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:hSu}],response:S.object({results:S.array(S.object({originalSql:S.string().describe("The original SQL expression that was parsed"),type:S.enum(["expression","from"]).describe("The type of SQL that was parsed"),platformKind:Hpr,success:S.boolean().describe("Whether the parsing was successful"),result:S.union([S.object({validReferences:S.array(S.array(S.string()).min(2).max(2)).describe("Array of valid table.column references as tuples [tableName, columnName]"),invalidReferences:S.array(S.string()).describe("Array of column names that could not be resolved to a table")}).passthrough(),S.record(S.object({node:S.string().describe("Optional node identifier"),column:S.union([S.string(),S.object({}).partial().passthrough()]).describe("Column name or symbol")}).partial().passthrough())]).describe("The parsing result (only present if successful). For 'expression' type, contains table and column references. For 'from' type, contains a lookup table of aliases.").optional(),error:S.string().describe("Error message (only present if failed)").optional()}).passthrough())}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/typesense/orgs/:orgID/typesense-config",alias:"getTypesenseConfigForOrg",description:"Returns Typesense configuration data for a given org.",requestFormat:"json",parameters:[{name:"orgID",type:"Path",schema:S.string().describe("The organization ID.")}],response:j3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/userRoles",alias:"GetUserRoles",description:"Get all user roles in the organization, filtered by information available based on the current user's roles and sorted alphabetically by last name, then by first name.",requestFormat:"json",parameters:[{name:"excludeOrgRoles",type:"Query",schema:S.boolean().describe("Exclude organization level roles from the results.").optional()},{name:"projectID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified project.").optional()},{name:"environmentID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified environment.").optional()}],response:S.array(iUn),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/userRoles/:userID/organizationRoles",alias:"UpsertUserOrganizationRoles",description:"Creates or updates all of a user's organization roles. Only org admins may use this API.",requestFormat:"json",parameters:[{name:"body",description:"The user's organization roles.",type:"Body",schema:S.array(S.string())},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.object({organizationRoles:S.array(S.string()).describe("The organization roles assigned to the user."),projects:S.record(WNi).describe("A dictionary of project role assignments keyed by project ID.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/userRoles/:userID/projects/:projectID",alias:"DeleteUserProjectRoles",description:"Deletes all of a user's project roles. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/userRoles/:userID/projects/:projectID",alias:"UpsertUserProjectRoles",description:"Creates or updates all of a user's project roles. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"body",description:"The user project roles.",type:"Body",schema:S.object({projectRoles:S.array(S.string()),environments:S.record(Vpr).describe("A dictionary of environment role assignments keyed by environment ID.")}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:S.object({projectRoles:S.array(S.string()),environments:S.record(Vpr).describe("A dictionary of environment role assignments keyed by environment ID.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/userRoles/:userID/projects/:projectID/environments/:environmentID",alias:"DeleteUserEnvironmentRoles",description:"Deletes all of a user's environment roles.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/userRoles/:userID/projects/:projectID/environments/:environmentID",alias:"UpsertUserEnvironmentRoles",description:"Creates or updates all of a user's environment roles.",requestFormat:"json",parameters:[{name:"body",description:"The user environment roles.",type:"Body",schema:S.object({environmentRoles:S.array(S.string()).describe("The environment roles assigned to the user.")}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:S.object({environmentRoles:S.array(S.string()).describe("The environment roles assigned to the user.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/users",alias:"ListOrgUsers",description:"Get all users in the current org",requestFormat:"json",parameters:[{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of users to return.").optional().default(50)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")}],response:S.object({total:S.number().int().describe("The size of the result set."),startingFrom:S.string().describe("The cursor value used in the request.").optional(),limit:S.number().int().describe("The requested page size."),next:S.union([S.string(),S.null()]).describe("The field value representing the start of the next page of results."),data:S.array(S.object({firstName:S.string(),lastName:S.string(),email:S.string(),id:S.string(),authDisabled:S.boolean(),deleted:S.boolean()}).partial().passthrough())}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/users/:userId",alias:"DeleteUser",description:"Delete a user by ID.",requestFormat:"json",parameters:[{name:"userId",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j}]},{method:"post",path:"/api/v1/validHostname",alias:"ValidateHostname",description:"Validates the passed hostname and returns an authorized version.",requestFormat:"json",parameters:[{name:"body",description:"The hostname that needs to be validated.",type:"Body",schema:S.object({hostname:S.string()}).passthrough()}],response:S.string(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/bigquery/projects",alias:"GetBigQueryProjects",description:"Retrieves BigQuery projects accessible by the workspace's configured account.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")}],response:QSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/bigquery/projects/:projectID/datasets",alias:"GetBigQueryDatasets",description:`Retrieves BigQuery datasets (schemas) for a given project.
|
|
1260
|
+
`).optional()}).passthrough(),LNi=S.object({updatedBy:S.string().optional(),updatedAt:S.string().datetime({offset:!0}).optional(),name:S.string(),publisherID:S.string(),description:S.string(),org:S.string(),latestRelease:S.string(),overview:S.string(),featured:S.boolean(),tags:S.array(S.string()),certified:S.boolean(),packageID:S.string(),id:S.string(),platformKind:S.enum(["fabric","snowflake","databricks","bigquery"])}).passthrough(),zpr=S.object({createdAt:S.string().datetime({offset:!0}),createdBy:S.string().optional(),updatedBy:S.string().optional(),updatedAt:S.string().datetime({offset:!0}),version:S.string(),changeLog:S.string(),releaseID:S.string(),storagePath:S.string(),privacy:S.enum(["public","private","unlisted"])}).passthrough(),O3u=S.object({description:S.string(),overview:S.string().max(200),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean()}).passthrough(),Hpr=S.enum(["snowflake","fabric","databricks","bigquery"]),N3u=S.object({changeLog:S.string().min(1),privacy:S.enum(["public","private","unlisted"])}).passthrough(),M3u=S.object({name:S.string(),description:S.string(),overview:S.string().max(200),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean(),platformKind:S.enum(["snowflake","fabric","databricks","bigquery"])}).passthrough(),x3u=S.object({changeLog:S.string(),version:S.string(),certified:S.boolean().optional()}).passthrough(),JNi=S.lazy(()=>S.object({packageID:S.string().min(1),alias:S.string(),version:S.string(),releaseID:S.string().min(1),macros:S.string(),dependencies:S.record(JNi)}).passthrough()),nUn=S.object({name:S.string(),version:S.number(),id:S.string(),isDisabled:S.boolean(),metadata:S.object({}).partial().passthrough()}).passthrough(),k3u=S.object({dependencies:S.record(JNi),nodeTypes:S.record(nUn),macros:S.string()}).passthrough(),q3u=S.object({release:x3u.describe("Package release information for a create operation."),privacy:S.enum(["public","private","unlisted"]),entities:k3u.describe("Entities that are part of a package release."),packageVariables:S.string(),packageID:S.string().min(1)}).passthrough(),F3u=S.object({packageID:S.string().min(1),releaseID:S.string().min(1),changeLog:S.string().optional(),description:S.string().optional(),privacy:S.enum(["public","private","unlisted"]).optional()}).passthrough(),j3u=S.object({typesenseKey:S.string().describe("The Typesense access key scoped to a users org."),typesenseHosts:S.array(S.string()).describe("The Typesense host address(es) for our cluster(s).")}).passthrough(),L3u=S.union([S.number(),S.string()]).describe("The starting run ID, runStartTime, or runEndTime (exclusive) for paging the query results.").optional(),U3u=S.union([S.string(),S.array(S.string())]).describe("One or more project IDs to filter the query results.").optional(),Kpr=S.enum(["deploy","refresh"]),z3u=S.union([Kpr,S.array(Kpr)]).describe("One or more run types to filter the query results.").optional(),Wpr=S.enum(["canceled","completed","failed","initializing","rendering","running","waitingToRun"]),G3u=S.union([Wpr,S.array(Wpr)]).describe("One or more status values to filter the query results.").optional(),H3u=S.union([S.string(),S.array(S.string())]).describe("One or more environment IDs to filter the query results.").optional(),V3u=S.enum(["asc","desc"]),K3u=S.enum(["id","runStartTime","runEndTime"]),W3u=S.object({id:S.number().int().describe("The run ID."),reRunID:S.string().describe("If this is a re-run, the ID of the original operation.").optional(),runStartTime:S.string().datetime({offset:!0}).describe("The datetime the run started.").optional(),runEndTime:S.string().datetime({offset:!0}).describe("The datetime the run ended.").optional(),runType:Kpr,runStatus:Wpr,environmentID:S.string().describe("The environment in which the run operation was applied.").optional(),runFailureReason:S.string().describe("Information about the cause of a run failure.").optional()}).passthrough(),J3u=S.object({canceled:S.boolean().describe("If the run was canceled.").optional(),deployCommit:S.string().describe("The full commit hash."),deployCommitMessage:S.string().describe("The commit message.").optional(),environmentID:S.string().describe("The Environment ID for this run."),parallelism:S.number().int().describe("The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse.").optional(),nodesInRun:S.number().int().describe("The number of Nodes deployed.").optional()}),Y3u=S.object({canceled:S.boolean().describe("If the run was canceled.").optional(),environmentID:S.string().describe("The Environment ID for this run."),excludeNodesSelector:S.string().describe("A selector string of nodes to exclude.").optional(),forceIgnoreEnvironmentStatus:S.boolean().optional(),includeNodesSelector:S.string().describe("A selector string of nodes to include.").optional(),jobID:S.number().int().describe("The Job ID.").optional(),parallelism:S.number().int().describe("The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse.").optional(),refreshDescription:S.string().describe("The Job name.").optional(),nodesForRefresh:S.number().int().optional(),nodesInRun:S.number().int().describe("The number of Nodes deployed.").optional(),executor:S.string().optional()}),Z3u=S.union([J3u,Y3u]),$3u=S.enum(["Basic","Cloud","KeyPair","OAuth"]),X3u=S.object({snowflakeAccount:S.string(),snowflakeAuthType:$3u,snowflakeRole:S.string().optional(),snowflakeUsername:S.string(),snowflakeWarehouse:S.string().optional()}),eSu=S.enum(["Token","Cloud","OAuthU2M","OAuthM2M"]),tSu=S.object({databricksHost:S.string(),databricksAuthType:eSu,databricksPath:S.string()}),rSu=S.literal("oauth"),iSu=S.object({fabricConnectionString:S.string(),fabricAuthType:rSu,platformKind:S.string().optional()}),nSu=S.enum(["ServiceAccount","OAuth"]),aSu=S.object({bigQueryAuthType:nSu}),aUn=S.object({id:S.number().int(),reRunID:S.string().describe("If this is a re-run, the ID of the original operation.").optional(),runDetails:Z3u.describe("Detailed information about a run."),runEndTime:S.string().datetime({offset:!0}).describe("The datetime when the run ended.").optional(),runFailureReason:S.string().describe("The reason the run failed.").optional(),runHistory:S.array(S.number().int()).optional(),runStartTime:S.string().datetime({offset:!0}).describe("The datetime the run started.").optional(),runStatus:Wpr,runTimeParameters:S.object({}).partial().passthrough().describe("The default Environment parameters. Parameters changed during deploy will not show here."),runType:Kpr,userCredentials:S.union([X3u,tSu,iSu,aSu]).optional(),userID:S.string().optional(),projectID:S.string(),hasTestFailures:S.boolean().describe("Whether the run has test failures.").optional(),version:S.number().int().optional(),renderingProgress:S.object({totalNodes:S.number().int().gte(0).describe("Total number of nodes to render"),completedNodes:S.number().int().gte(0).describe("Number of nodes completed so far")}).passthrough().describe("Progress information for the rendering phase").optional()}),oSu=S.object({limit:S.number().int().describe("The maximum number of runs returned by this query."),next:S.union([S.number(),S.string(),S.null()]).describe("The field value representing the start of the next page of results."),orderByDirection:V3u.describe("The sort order for query results."),orderBy:K3u.describe("The field used to sort query results. Defaults to `id`, but must be explicitly provided when also using `startingFrom`. Make sure to match data type."),data:S.union([S.array(W3u),S.array(aUn)]).describe("A collection of runs.")}).passthrough(),sSu=S.enum(["API","CLI","UI","fivetranAPI"]),jLn=S.object({endTime:S.string().datetime({offset:!0}).optional(),error:zLn.optional(),isRunning:S.boolean().describe("If the queried run is still running."),name:S.string().describe("The name of the Stage the query ran on."),queryID:S.string().optional(),rowsDeleted:S.number().int().optional(),rowsInserted:S.number().int().optional(),rowsUpdated:S.number().int().optional(),sql:S.string().describe("The SQL query run during the stage."),startTime:S.string().datetime({offset:!0}).optional(),status:S.string().describe("The query status."),success:S.boolean().describe("If the query results were run successfully."),type:S.enum(["sql","sqlTest"]).optional(),warehouse:S.string().describe("Name of the warehouse.").optional()}),uSu=S.object({isRunning:S.boolean().describe("If the queried run is still running."),name:S.string(),nodeID:S.string(),runState:S.string().optional(),hasTestFailures:S.boolean().optional(),origin:sSu.optional(),queryResults:S.array(jLn).describe("The query result returns the status of different stages such as Delete Table or Rename Table. See the queryResults name for the stage."),renderQueryResult:jLn.optional()}),lSu=S.object({data:S.array(uSu).describe("A collection of run results.")}).passthrough(),zNi=S.object({endTime:S.string().datetime({offset:!0}),error:S.object({errorString:S.string(),errorDetail:S.string()}).passthrough().nullish(),fields:S.array(S.object({name:S.string(),type:S.string()}).passthrough()),isRunning:S.boolean(),name:S.string(),sql:S.string(),startTime:S.string().datetime({offset:!0}),status:S.enum(["Success","Failure","Canceled","Queued","Running","Transaction exceeded data limit, returned a subset of rows"]),success:S.boolean(),type:S.enum(["sql","sqlTest"]),exportedRefs:S.array(S.object({locationName:S.string(),nodeName:S.string()}).passthrough()),invalidExportedRefs:S.array(S.object({locationName:S.string(),nodeName:S.string()}).passthrough())}).passthrough(),cSu=S.object({name:S.string(),isRunning:S.literal(!0)}),pSu=S.object({name:S.string(),queryResults:S.array(S.union([zNi,cSu])),isRunning:S.boolean(),renderQueryResults:zNi.optional()}).passthrough(),dSu=S.object({id:S.string().describe("The node ID"),dataResult:S.union([S.record(S.union([S.number(),S.string(),S.boolean()])),zNi]).describe("Data result - can be a record of values or a completed query result").optional(),name:S.string().describe("The name of the node"),queryResultSequence:pSu,runExecutionSequenceID:S.number().int().describe("The execution sequence ID").optional(),hasTestFailures:S.boolean().describe("Whether the run has test failures").optional(),runResultVersion:S.literal(2).describe("Version of the run result format").optional().default(2),runState:S.enum(["waiting","queued","running","complete","error","skipped","canceled"]).describe("The state of the run"),stepRunState:S.enum(["None","Error","Validated","Created","DataLoaded","Skipped"]).describe("The state of the step run"),version:S.literal(2).describe("Version field").default(2),createdAt:S.string().datetime({offset:!0}),updatedAt:S.string().datetime({offset:!0})}).passthrough(),ASu=S.object({data:S.array(dSu).describe("Raw run results from external storage.")}).passthrough(),gSu=S.object({apiKey:S.string(),authDomain:S.string(),projectId:S.string(),storageBucket:S.string(),messagingSenderId:S.string(),appId:S.string(),measurementId:S.string(),emulatorInfo:S.object({auth:S.string(),firestore:S.string(),storage:S.string()}).passthrough().optional()}).passthrough(),hSu=S.object({expressions:S.array(S.object({sql:S.string().describe("The SQL expression or FROM clause to parse"),type:S.enum(["expression","from"]).describe("Type of SQL to parse - either an expression or a FROM clause"),platformKind:Hpr}).passthrough()).describe("Array of SQL expressions to parse")}).passthrough(),ySu=S.object({entityType:S.enum(["node","workspace","run","subgraph","job","macro","nodeType","installedPackage"]),writeType:S.enum(["save","delete","merge"]),data:S.object({id:S.union([S.string(),S.number()]),version:S.union([S.string(),S.number()])}).passthrough()}).passthrough(),fSu=S.object({workspaceID:S.number(),requesetID:S.string().optional(),writeInfo:S.array(ySu)}).passthrough(),mSu=S.object({name:S.string(),tags:S.array(S.string()),count:S.number().int()}).passthrough(),bSu=S.object({metrics:S.array(mSu)}).passthrough(),CSu=S.object({parameters:S.object({}).partial().passthrough(),runDetails:S.object({currentWorkspaceDataFilePath:S.string(),desiredWorkspaceDataFilePath:S.string(),disablePresync:S.boolean(),environmentID:S.string(),planID:S.string(),skippedBeforeCollection:S.boolean().optional().default(!1),useRenderCache:S.boolean().optional().default(!1)}).passthrough(),userCredentials:S.object({}).partial().passthrough()}).passthrough(),ISu=S.object({message:S.string(),planID:S.string()}).passthrough(),ESu=S.object({planStorageFilePath:S.string()}).passthrough(),SSu=S.object({status:S.literal("planning")}).passthrough(),vSu=S.object({files:S.array(S.object({path:S.string().describe("File path relative to repository root"),before:S.string().describe("File content before changes"),after:S.string().describe("File content after changes")}).passthrough()).min(1).describe("Array of files being committed with their before/after content")}).passthrough(),Ozc=S.object({message:S.string().max(400).describe("AI generated git commit message (Soft max 200 chars, Hard max 400 chars)")}).passthrough(),BSu=S.object({workspaceID:S.number().describe("The workspace ID."),nodeID:S.string().min(1).describe("The node ID.")}).passthrough(),Nzc=S.object({description:S.string().min(1).describe("AI generated description of the node.")}).passthrough(),RSu=S.object({messages:S.array(S.object({role:S.enum(["user","assistant"]).describe("The role of the message sender."),content:S.string().describe("The text content of the message.")}).passthrough()).describe("An array of message objects representing the conversation history."),systemPrompt:S.string().describe("Optional system prompt").optional(),responseSchema:S.object({}).partial().passthrough().describe("Optional schema for structuring the response format").optional(),threadId:S.string().describe("Identifier for the conversation thread")}).passthrough(),wSu=S.object({text:S.string().describe("AI-generated response text"),usage:S.object({inputUsage:S.number(),outputUsage:S.number(),unit:S.enum(["token","char"])}).partial().passthrough().optional()}).passthrough(),TSu=S.object({model:S.string().describe("The model to use for the LLM call"),messages:S.array(S.any()).describe("The messages to send to the LLM"),schema:S.object({}).partial().passthrough().describe("The schema to use for structured output").optional(),tools:S.object({}).partial().passthrough().describe("The tools to use for the LLM call").optional(),toolChoice:S.union([S.enum(["auto","required","none"]),S.object({type:S.literal("tool"),toolName:S.string()}).passthrough()]).describe("Controls which tools the model can use").optional()}).passthrough(),Mzc=S.object({}).partial().passthrough(),oUn=S.string(),LLn=S.object({name:oUn.min(1).max(100).describe("Name of the subgraph"),steps:S.array(S.string().max(64)).describe("Array of node IDs in the subgraph")}),ULn=S.object({id:S.string().describe("Unique identifier for the subgraph"),name:oUn.min(1).max(100).describe("Name of the subgraph"),steps:S.array(S.string().max(64)).describe("Array of node IDs in the subgraph"),version:S.literal(1).describe("Version of the subgraph schema").default(1),createdAt:S.string().datetime({offset:!0}).describe("Date and time the subgraph was created").optional(),updatedAt:S.string().datetime({offset:!0}).describe("Date and time the subgraph was last updated").optional(),createdBy:S.string().describe("ID of the user who created the subgraph").optional(),updatedBy:S.string().describe("ID of the user who last updated the subgraph").optional()}),_Su=S.object({id:S.string().describe("The unique identifier of the warehouse"),name:S.string().describe("The name of the warehouse"),odbc_params:S.object({path:S.string().describe("The path for the SQL warehouse")}).passthrough().describe("The connection parameters for the warehouse")}).passthrough(),DSu=S.object({warehouses:S.array(_Su)}).passthrough(),PSu=S.object({id:S.string().describe("The project ID"),name:S.string().describe("The project friendly name").optional()}).passthrough(),QSu=S.object({projects:S.array(PSu)}).passthrough(),xzc=S.array(S.string());var kzc=S.object({macros:S.string(),dependencies:S.record(JNi),nodeTypes:S.record(nUn)}).passthrough(),qzc=S.object({id:S.string(),version:S.string()}).passthrough(),Fzc=S.object({id:S.string(),releaseID:S.string()}).passthrough(),jzc=S.string(),OSu=Vpr.and(S.object({user:B4.describe("Summary information about a user.")}).passthrough()),Lzc=S.array(OSu),NSu=WNi.and(S.object({user:B4.describe("Summary information about a user.")}).passthrough()),Uzc=S.array(NSu);var zzc=S.object({data:KNi}).passthrough(),MSu=S.object({seconds:S.number(),nanoseconds:S.number()}),xSu=S.object({_seconds:S.number(),_nanoseconds:S.number()}),Gzc=S.union([MSu,xSu]),kSu=S.object({transform:S.string().describe("Returns the SQL of any column transformations.")}),Hzc=S.union([JLn,kSu]),Vzc=VLn.and(S.object({mappingsV1:S.string(),runTimeParameters:S.string(),jobs:S.array($Ln)}).partial().passthrough());var sUn=Upr([{method:"get",path:"/api/integrations/fivetran/jobs/:jobId/history/:historyId",alias:"GetFivetranJobHistory",description:"Get Fivetran job history in org.",requestFormat:"json",parameters:[{name:"jobId",type:"Path",schema:S.string().describe("The Fivetran job ID.")},{name:"historyId",type:"Path",schema:S.string().describe("The Fivetran history ID.")}],response:w3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/integrations/fivetran/jobs/:jobId/run",alias:"PostFivetranJobRefresh",requestFormat:"json",parameters:[{name:"body",description:"Request body for start Fivetran run.",type:"Body",schema:_3u},{name:"jobId",type:"Path",schema:S.string().describe("The Fivetran job ID.")}],response:S.object({data:KNi}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/integrations/fivetran/projects",alias:"GetFivetranProjects",description:"Get fivetran projects in org.",requestFormat:"json",response:E3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/integrations/fivetran/projects/:projectId",alias:"GetFivetranProject",requestFormat:"json",parameters:[{name:"projectId",type:"Path",schema:S.string().describe("The unique identifier for the project")}],response:S3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/integrations/fivetran/projects/:projectId/jobs",alias:"GetFivetranJobs",description:"Get Fivetran jobs.",requestFormat:"json",parameters:[{name:"projectId",type:"Path",schema:S.string().describe("The unique identifier for the project")}],response:B3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/admin/kill-job/:orgId/:runId",alias:"KillJob",description:"Deletes the Kubernetes job.",requestFormat:"json",parameters:[{name:"orgId",type:"Path",schema:S.string().describe("The Organization ID of the organization that will be affected by the API call.")},{name:"runId",type:"Path",schema:S.number().int().describe("The Run ID of the run that will be affected by the API call.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/bulkWrite",alias:"BulkWrite",description:"Updates multiple documents for a workspace.",requestFormat:"json",parameters:[{name:"body",description:"The workspace to update and the data to update with.",type:"Body",schema:fSu}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/customToken",alias:"GenerateCustomToken",description:"Generate a Coalesce token from the provided OpenID Connect ID token",requestFormat:"json",parameters:[{name:"body",description:"The information from the OpenID Connect authorization server required to sign into Coalesce.",type:"Body",schema:UEu}],response:S.object({customToken:S.string().describe("A Coalesce token")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/database",alias:"GetDatabase",description:"Gets the information required to connect to the Coalesce database.",requestFormat:"json",response:gSu},{method:"get",path:"/api/v1/environments",alias:"GetEnvironments",description:"Get a collection of Environment information.",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the environments.").optional().default(!1)},{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of environments to return.").optional().default(100)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")}],response:HEu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/environments",alias:"CreateEnvironment",description:"Create a new environment.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:KEu},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:UNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/environments/:environmentID",alias:"DeleteEnvironment",description:"Delete an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID",alias:"GetEnvironment",description:"Get information about an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:UNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID/jobs/:jobID",alias:"GetJob",description:"Get information about a job in an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"jobID",type:"Path",schema:S.string().describe("The job ID.")}],response:S.object({id:S.string().describe("The Job ID."),name:S.string().describe("The Job name."),includeSelector:S.string().describe("A selector string of nodes to include."),excludeSelector:S.string().describe("A selector string of nodes to exclude."),createdAt:S.string().datetime({offset:!0}),updatedAt:S.string().datetime({offset:!0})}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID/nodes",alias:"GetNodes",description:"Get a collection of nodes for an environment",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the nodes.").optional().default(!1)},{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of nodes to return.").optional().default(100)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")},{name:"skipParsing",type:"Query",schema:S.boolean().describe("Skip parsing column references and updating sources for the nodes.").optional().default(!1)}],response:kLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/environments/:environmentID/nodes/:nodeID",alias:"GetNode",description:"Get information about a node in an environment.",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"skipParsing",type:"Query",schema:S.boolean().describe("Skip parsing column references and updating sources for the nodes.").optional().default(!1)}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/featureFlags",alias:"GetFeatureFlags",description:"Gets feature flags for the authenticated user.",requestFormat:"json",parameters:[{name:"subdomain",type:"Query",schema:S.string().describe("The customer subdomain.").optional()}],response:S.object({featureFlags:S.record(S.union([S.boolean(),S.string(),S.number(),S.object({}).partial().passthrough(),S.array(S.any())]))}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/featureFlags/config",alias:"GetFeatureFlagsClientConfig",description:"Gets information the client needs to connect to the feature flags service.",requestFormat:"json",response:S.object({launchDarklyClientID:S.string()}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/featureFlags/default",alias:"GetDefaultFeatureFlags",description:"Gets default feature flags for the unauthenticated users.",requestFormat:"json",response:S.object({featureFlags:S.record(S.union([S.boolean(),S.string(),S.number(),S.object({}).partial().passthrough(),S.array(S.any())]))}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/gitAccounts",alias:"ListGitAccounts",description:"Allows for a user to view all the git accounts in their org.",requestFormat:"json",parameters:[{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:p3u.describe("A list of git accounts")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/gitAccounts",alias:"CreateGitAccount",description:"Users can create git accounts for their org.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:d3u},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:Gpr.describe("All the fields needed to create a git account")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/gitAccounts/:gitAccountID",alias:"GetGitAccount",description:"Allows for a user to get a git account.",requestFormat:"json",parameters:[{name:"gitAccountID",type:"Path",schema:S.string().describe("The git account ID.")},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:Gpr.describe("All the fields needed to create a git account")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"patch",path:"/api/v1/gitAccounts/:gitAccountID",alias:"UpdateGitAccount",description:"Allows for a user to update their git account.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:eUn},{name:"gitAccountID",type:"Path",schema:S.string().describe("The git account ID.")},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.object({data:Gpr.describe("All the fields needed to create a git account")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/gitAccounts/:gitAccountID",alias:"DeleteGitAccount",description:"Allows for a user to delete a git account.",requestFormat:"json",parameters:[{name:"gitAccountID",type:"Path",schema:S.string().describe("The git account ID.")},{name:"accountOwner",type:"Query",schema:S.string().describe("The owner of the git accounts. If not provided will fallback to the requester's accounts.").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/chat",alias:"GetChatMessage",description:"Get the generated AI chat message.",requestFormat:"json",parameters:[{name:"body",description:"The prompt to generate the AI chat message.",type:"Body",schema:RSu}],response:wSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/git-commit-message",alias:"GetAIGitCommitMessage",description:"Generate an AI commit message based on git diffs",requestFormat:"json",parameters:[{name:"body",description:"Git diff context for commit message generation",type:"Body",schema:vSu}],response:S.object({message:S.string().max(400).describe("AI generated git commit message (Soft max 200 chars, Hard max 400 chars)")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/llm",alias:"GetLlmMessage",description:"Get the generated AI LLM message.",requestFormat:"json",parameters:[{name:"body",description:"The prompt to generate the AI LLM message.",type:"Body",schema:TSu}],response:S.object({}).partial().passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/llm/node-description",alias:"GetAINodeDescription",description:"Retrieve the generated AI descriptions for a node.",requestFormat:"json",parameters:[{name:"body",description:"workspaceID, nodeID of the node for which to generate the AI description.",type:"Body",schema:BSu}],response:S.object({description:S.string().min(1).describe("AI generated description of the node.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/metrics",alias:"SubmitMetrics",description:"Submit a set of metrics",requestFormat:"json",parameters:[{name:"body",description:"The metrics to submit",type:"Body",schema:bSu}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/multiFactorAuth/:userID",alias:"RemoveMultiFactor",description:"Deletes the MFA for a user in firebase auth",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/:packageID",alias:"GetRegistryPackage",description:"Get a package on the registry.",requestFormat:"json",parameters:[{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")}],response:LNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/packageRegistry/:packageID",alias:"updatePackageV2",description:"Update an existing package's information.",requestFormat:"json",parameters:[{name:"body",description:"Updated package details. Does not include package content held in a release.",type:"Body",schema:O3u},{name:"packageID",type:"Path",schema:S.string().min(1).describe("The id of the package.")}],response:S.object({org:S.string(),name:S.string(),description:S.string(),overview:S.string(),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean(),packageID:S.string(),id:S.string().optional(),publisherID:S.string().optional(),latestRelease:S.string().optional(),platformKind:Hpr}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/packageRegistry/:packageID/releases/:releaseID",alias:"updatePackageReleaseV2",description:"Update a package release.",requestFormat:"json",parameters:[{name:"body",description:"The package release info to update with.",type:"Body",schema:N3u},{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")},{name:"releaseID",type:"Path",schema:S.string().min(1).describe("The package release ID.")}],response:zpr,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/:packageID/releases/:releaseID",alias:"GetRegistryPackageRelease",description:"Get a release from a package in the registry.",requestFormat:"json",parameters:[{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")},{name:"releaseID",type:"Path",schema:S.string().min(1).describe("The package release ID.")}],response:zpr,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/:packageID/releases/privacy/:privacy",alias:"GetAllRegistryPackageReleases",description:"Get all available releases for a package on the registry.",requestFormat:"json",parameters:[{name:"packageID",type:"Path",schema:S.string().min(1).describe("The package id.")},{name:"privacy",type:"Path",schema:S.enum(["public","private","unlisted","all"]).describe("The privacy level of the packages requested")}],response:S.array(zpr),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/all",alias:"GetAllRegistryPackages",description:"Get all available packages on the registry.",requestFormat:"json",response:S.array(LNi),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/packageRegistry/createPackage",alias:"createPackage",description:"Create a package without a release.",requestFormat:"json",parameters:[{name:"body",description:"Info describing and defining the package. Does not include package content held in a release",type:"Body",schema:M3u}],response:S.object({org:S.string(),name:S.string(),description:S.string(),overview:S.string(),tags:S.array(S.string()),featured:S.boolean(),certified:S.boolean(),packageID:S.string(),id:S.string().optional(),publisherID:S.string().optional(),latestRelease:S.string().optional(),platformKind:Hpr}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/packageRegistry/createRelease",alias:"AddPackageRelease",description:"Add a new package release to an existing package.",requestFormat:"json",parameters:[{name:"body",description:"The package release info.",type:"Body",schema:q3u}],response:zpr,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/packageRegistry/org",alias:"GetRegistryPackagesForOrg",description:"Get a release from a package in the registry.",requestFormat:"json",response:S.array(LNi),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/packageRegistry/update",alias:"UpdatePackage",description:"Update a package.",requestFormat:"json",parameters:[{name:"body",description:"The package info to create with.",type:"Body",schema:F3u}],response:S.string(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/plan",alias:"createPlan",description:"Create a deployment plan",requestFormat:"json",parameters:[{name:"body",description:"Requirements for plan creation",type:"Body",schema:CSu}],response:ISu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/plan/:environmentID/:planID",alias:"getPlan",description:"Get an existing deployment plan",requestFormat:"json",parameters:[{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID")},{name:"planID",type:"Path",schema:S.string().describe("The plan ID")}],response:S.union([ESu,SSu]),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects",alias:"GetProjectsInOrg",description:"Get projects in org.",requestFormat:"json",parameters:[{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:f3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/projects",alias:"CreateProject",description:"Create a new project.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:m3u}],response:VNi,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects/:projectID",alias:"GetProjectInOrg",description:"Get a project.",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:FLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"patch",path:"/api/v1/projects/:projectID",alias:"UpdateProject",description:"Update a project",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:b3u},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:FLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/projects/:projectID",alias:"DeleteProject",description:"Delete a project.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:C3u.optional()},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"includeWorkspaces",type:"Query",schema:S.boolean().describe("Whether or not to include nested workspace data for all projects.").optional()},{name:"includeJobs",type:"Query",schema:S.boolean().describe("Whether or not to include nested job data for all workspaces in the projects.").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects/:projectID/gitAccounts",alias:"ListProjectGitAccounts",description:"List git accounts for a project",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:I3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/projects/:projectID/gitAccounts/:userID",alias:"GetProjectGitAccount",description:"Get a user's git account for a project",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:tUn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/projects/:projectID/gitAccounts/:userID",alias:"SetProjectGitAccount",description:"Set a user's git account for a project",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:S.object({gitAccountID:S.string()}).passthrough()},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/projects/:projectID/gitAccounts/:userID",alias:"DeleteProjectGitAccount",description:"Un-set a user's git account for a project",requestFormat:"json",parameters:[{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs",alias:"GetRuns",description:"Get a collection of information about runs.",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"limit",type:"Query",schema:S.number().int().gte(0).lte(1e3).describe("The maximum number of runs to return.").optional().default(25)},{name:"startingFrom",type:"Query",schema:L3u},{name:"orderBy",type:"Query",schema:S.enum(["id","runStartTime","runEndTime"]).describe("The field used to sort query results. Defaults to `id`, but must be explicitly provided when also using `startingFrom`. Make sure to match data type.").optional()},{name:"orderByDirection",type:"Query",schema:S.enum(["asc","desc"]).describe("The sort order for query results.").optional().default("desc")},{name:"projectID",type:"Query",schema:U3u},{name:"runType",type:"Query",schema:z3u},{name:"runStatus",type:"Query",schema:G3u},{name:"environmentID",type:"Query",schema:H3u},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the run.").optional().default(!1)}],response:oSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs/:runID",alias:"GetRun",description:"Gets a single run.",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"runID",type:"Path",schema:S.number().int().describe("The run ID.")}],response:aUn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs/:runID/results",alias:"GetRunResults",description:"Get a collection of the results of a deploy or refresh run",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"runID",type:"Path",schema:S.number().int().describe("The run ID.")}],response:lSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/runs/:runID/stored-run-results/:chunkID",alias:"GetStoredRunResults",description:"Get raw run results from external storage",requestFormat:"json",parameters:[{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"runID",type:"Path",schema:S.string().describe("The run ID.")},{name:"chunkID",type:"Path",schema:S.string().describe("The chunk ID")}],response:ASu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/secrets/:secretType/:context",alias:"SecretExists",description:"Determines whether or not a git token value exists for a given project ID.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.boolean(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/secrets/:secretType/:context",alias:"UpgradeSecret",description:"Upgrades a secret from secretType its upgrade target.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/secrets/:secretType/:context",alias:"SetSecret",description:"Sets the value of a secret.",requestFormat:"json",parameters:[{name:"body",description:"The new value of the secret.",type:"Body",schema:S.object({secretValue:S.unknown()}).passthrough()},{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/secrets/:secretType/:context",alias:"DeleteSecret",description:"Deletes a secret.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/sql/parse",alias:"ParseSql",description:"Parse multiple SQL expressions or FROM clauses using the Strumenta parser.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:hSu}],response:S.object({results:S.array(S.object({originalSql:S.string().describe("The original SQL expression that was parsed"),type:S.enum(["expression","from"]).describe("The type of SQL that was parsed"),platformKind:Hpr,success:S.boolean().describe("Whether the parsing was successful"),result:S.union([S.object({validReferences:S.array(S.array(S.string()).min(2).max(2)).describe("Array of valid table.column references as tuples [tableName, columnName]"),invalidReferences:S.array(S.string()).describe("Array of column names that could not be resolved to a table")}).passthrough(),S.record(S.object({node:S.string().describe("Optional node identifier"),column:S.union([S.string(),S.object({}).partial().passthrough()]).describe("Column name or symbol")}).partial().passthrough())]).describe("The parsing result (only present if successful). For 'expression' type, contains table and column references. For 'from' type, contains a lookup table of aliases.").optional(),error:S.string().describe("Error message (only present if failed)").optional()}).passthrough())}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/typesense/orgs/:orgID/typesense-config",alias:"getTypesenseConfigForOrg",description:"Returns Typesense configuration data for a given org.",requestFormat:"json",parameters:[{name:"orgID",type:"Path",schema:S.string().describe("The organization ID.")}],response:j3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/userRoles",alias:"GetUserRoles",description:"Get all user roles in the organization, filtered by information available based on the current user's roles and sorted alphabetically by last name, then by first name.",requestFormat:"json",parameters:[{name:"excludeOrgRoles",type:"Query",schema:S.boolean().describe("Exclude organization level roles from the results.").optional()},{name:"projectID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified project.").optional()},{name:"environmentID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified environment.").optional()}],response:S.array(iUn),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/userRoles/:userID/organizationRoles",alias:"UpsertUserOrganizationRoles",description:"Creates or updates all of a user's organization roles. Only org admins may use this API.",requestFormat:"json",parameters:[{name:"body",description:"The user's organization roles.",type:"Body",schema:S.array(S.string())},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:S.object({organizationRoles:S.array(S.string()).describe("The organization roles assigned to the user."),projects:S.record(WNi).describe("A dictionary of project role assignments keyed by project ID.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/userRoles/:userID/projects/:projectID",alias:"DeleteUserProjectRoles",description:"Deletes all of a user's project roles. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/userRoles/:userID/projects/:projectID",alias:"UpsertUserProjectRoles",description:"Creates or updates all of a user's project roles. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"body",description:"The user project roles.",type:"Body",schema:S.object({projectRoles:S.array(S.string()),environments:S.record(Vpr).describe("A dictionary of environment role assignments keyed by environment ID.")}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:S.object({projectRoles:S.array(S.string()),environments:S.record(Vpr).describe("A dictionary of environment role assignments keyed by environment ID.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/userRoles/:userID/projects/:projectID/environments/:environmentID",alias:"DeleteUserEnvironmentRoles",description:"Deletes all of a user's environment roles.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/userRoles/:userID/projects/:projectID/environments/:environmentID",alias:"UpsertUserEnvironmentRoles",description:"Creates or updates all of a user's environment roles.",requestFormat:"json",parameters:[{name:"body",description:"The user environment roles.",type:"Body",schema:S.object({environmentRoles:S.array(S.string()).describe("The environment roles assigned to the user.")}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:S.object({environmentRoles:S.array(S.string()).describe("The environment roles assigned to the user.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/users",alias:"ListOrgUsers",description:"Get all users in the current org",requestFormat:"json",parameters:[{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of users to return.").optional().default(50)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")}],response:S.object({total:S.number().int().describe("The size of the result set."),startingFrom:S.string().describe("The cursor value used in the request.").optional(),limit:S.number().int().describe("The requested page size."),next:S.union([S.string(),S.null()]).describe("The field value representing the start of the next page of results."),data:S.array(S.object({firstName:S.string(),lastName:S.string(),email:S.string(),id:S.string(),authDisabled:S.boolean(),deleted:S.boolean()}).partial().passthrough())}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/users/:userId",alias:"DeleteUser",description:"Delete a user by ID.",requestFormat:"json",parameters:[{name:"userId",type:"Path",schema:S.string().describe("The user ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j}]},{method:"post",path:"/api/v1/validHostname",alias:"ValidateHostname",description:"Validates the passed hostname and returns an authorized version.",requestFormat:"json",parameters:[{name:"body",description:"The hostname that needs to be validated.",type:"Body",schema:S.object({hostname:S.string()}).passthrough()}],response:S.string(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/bigquery/projects",alias:"GetBigQueryProjects",description:"Retrieves BigQuery projects accessible by the workspace's configured account.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")}],response:QSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/bigquery/projects/:projectID/datasets",alias:"GetBigQueryDatasets",description:`Retrieves BigQuery datasets (schemas) for a given project.
|
|
1261
1261
|
Uses the BigQuery datasets.list API which returns only existing datasets,
|
|
1262
1262
|
unlike INFORMATION_SCHEMA.SCHEMATA which includes deleted entries.
|
|
1263
|
-
`,requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The BigQuery project ID to list datasets for.")}],response:S.array(S.string()),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/databricks/warehouse",alias:"GetDatabricksWarehouse",description:"Retrieves a list of all SQL warehouses that a user has manager permissions on.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The ID of the workspace")},{name:"x-databricks-browser-token",type:"Header",schema:S.string().describe("Token from browser storage, only used when connection type is browser storage token.").optional()}],response:DSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/workspaces/:workspaceID/jobs",alias:"CreateJob",description:"Create a new job in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:qLn},{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")}],response:S.object({id:S.string().describe("The Job ID."),name:S.string().describe("The Job name."),includeSelector:S.string().describe("A selector string of nodes to include."),excludeSelector:S.string().describe("A selector string of nodes to exclude."),createdAt:S.string().datetime({offset:!0}),updatedAt:S.string().datetime({offset:!0})}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/workspaces/:workspaceID/jobs/:jobID",alias:"UpdateJob",description:"Update all fields of an existing job in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:qLn},{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"jobID",type:"Path",schema:S.string().describe("The job ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/workspaces/:workspaceID/jobs/:jobID",alias:"DeleteJob",description:"Delete a job from a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"jobID",type:"Path",schema:S.string().describe("The job ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/nodes",alias:"GetWorkspaceNodes",description:"Get a collection of nodes for a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the nodes.").optional().default(!1)},{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of nodes to return.").optional().default(100)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")}],response:kLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/workspaces/:workspaceID/nodes",alias:"CreateNode",description:"Create a new node in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:A3u},{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/nodes/:nodeID",alias:"GetWorkspaceNode",description:"Get information about a node in a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/workspaces/:workspaceID/nodes/:nodeID",alias:"SetWorkspaceNode",description:"Replace all fields of a node in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:jz},{name:"workspaceID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/workspaces/:workspaceID/nodes/:nodeID",alias:"DeleteWorkspaceNode",description:"Delete a node in a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/workspaces/:workspaceID/subgraphs",alias:"CreateSubgraph",description:"Create a new subgraph for organizing and managing a collection of nodes.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:LLn},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.object({data:ULn.describe("A partial collection of nodes from the node graph, allowing easier viewing and editing of a portion of a large graph.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/workspaces/:workspaceID/subgraphs/:subgraphID",alias:"UpdateSubgraph",description:"Update a subgraph.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:LLn},{name:"subgraphID",type:"Path",schema:S.string().describe("ID of the subgraph being fetched")},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/workspaces/:workspaceID/subgraphs/:subgraphID",alias:"DeleteSubgraph",description:"Delete a subgraph.",requestFormat:"json",parameters:[{name:"subgraphID",type:"Path",schema:S.string().describe("ID of the subgraph being fetched")},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/subgraphs/:subgraphID",alias:"GetSubgraph",description:"Get a subgraph.",requestFormat:"json",parameters:[{name:"subgraphID",type:"Path",schema:S.string().describe("ID of the subgraph being fetched")},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.object({data:ULn.describe("A partial collection of nodes from the node graph, allowing easier viewing and editing of a portion of a large graph.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v2/userRoles",alias:"GetUserRolesV2",description:"Get all user roles in the organization, filtered by information available based on the current user's roles",requestFormat:"json",parameters:[{name:"projectID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified project.").optional()},{name:"environmentID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified environment.").optional()}],response:P3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v2/userRoles/:userID",alias:"GetSingleUserRolesV2",description:"Get a single user's roles.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Query",schema:S.string().describe("The project ID.").optional()},{name:"environmentID",type:"Query",schema:S.string().describe("The environment ID.").optional()}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v2/userRoles/:userID/environments/:environmentID",alias:"DeleteUserEnvironmentRoleV2",description:"Deletes all of a user's environment roles.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v2/userRoles/:userID/environments/:environmentID",alias:"UpsertUserEnvironmentRoleV2",description:"Creates or updates a user's environment role.",requestFormat:"json",parameters:[{name:"body",description:"The user environment role.",type:"Body",schema:Q3u},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v2/userRoles/:userID/organizationRole",alias:"UpsertUserOrganizationRoleV2",description:"Creates or updates a user's organization role. Only org admins may use this API.",requestFormat:"json",parameters:[{name:"body",description:"The user's organization role.",type:"Body",schema:S.object({organizationRole:S.string()}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v2/userRoles/:userID/projects/:projectID",alias:"DeleteUserProjectRoleV2",description:"Deletes all of a user's project roles. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v2/userRoles/:userID/projects/:projectID",alias:"UpsertUserProjectRoleV2",description:"Creates or updates a user's project role. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"body",description:"The user project role",type:"Body",schema:S.object({projectRole:S.string()}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/scheduler/secret/:secretType/:context",alias:"SecretExistsV0",description:"Determines whether or not a git token value exists for a given project ID.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.boolean(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/scheduler/secret/:secretType/:context",alias:"SetSecretV0",description:"Sets the value of a secret.",requestFormat:"json",parameters:[{name:"body",description:"The new value of the secret.",type:"Body",schema:S.object({secretValue:S.unknown()}).passthrough()},{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/scheduler/secret/:secretType/:context",alias:"DeleteSecretV0",description:"Deletes a secret.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]}]),Kzc=new Fz(sUn);function YNi(t,e){return new Fz(t,sUn,e)}var uUn,ZNi=new WeakMap,qSu=()=>{},FSu=class U8{constructor(e){this.subscribers=[],this.settlement=null,this[uUn]="Unpromise",e instanceof Promise?this.promise=e:this.promise=new Promise(e),this.promise.then(r=>{let{subscribers:i}=this;this.subscribers=null,this.settlement={status:"fulfilled",value:r},i?.forEach(({resolve:n})=>{n(r)})}).catch(r=>{let{subscribers:i}=this;this.subscribers=null,this.settlement={status:"rejected",reason:r},i?.forEach(({reject:n})=>{n(r)})})}subscribe(){let e,r,{settlement:i}=this;if(i===null){if(this.subscribers===null)throw new Error("Unpromise settled but still has subscribers");let n=jSu();this.subscribers=LSu(this.subscribers,n),e=n.promise,r=()=>{this.subscribers!==null&&(this.subscribers=zSu(this.subscribers,n))}}else{let{status:n}=i;n==="fulfilled"?e=Promise.resolve(i.value):e=Promise.reject(i.reason),r=qSu}return Object.assign(e,{unsubscribe:r})}then(e,r){let i=this.subscribe(),{unsubscribe:n}=i;return Object.assign(i.then(e,r),{unsubscribe:n})}catch(e){let r=this.subscribe(),{unsubscribe:i}=r;return Object.assign(r.catch(e),{unsubscribe:i})}finally(e){let r=this.subscribe(),{unsubscribe:i}=r;return Object.assign(r.finally(e),{unsubscribe:i})}static proxy(e){let r=U8.getSubscribablePromise(e);return typeof r<"u"?r:U8.createSubscribablePromise(e)}static createSubscribablePromise(e){let r=new U8(e);return ZNi.set(e,r),ZNi.set(r,r),r}static getSubscribablePromise(e){return ZNi.get(e)}static resolve(e){return U8.proxy(e).subscribe()}static async any(e){let r=e.map(U8.resolve);try{return await Promise.any(r)}finally{r.forEach(({unsubscribe:i})=>{i()})}}static async race(e){let r=e.map(U8.resolve);try{return await Promise.race(r)}finally{r.forEach(({unsubscribe:i})=>{i()})}}static async raceSingletons(e){let r=e.map(i=>U8.proxy(i).then(()=>[i]));try{return await Promise.race(r)}finally{for(let i of r)i.unsubscribe()}}};uUn=Symbol.toStringTag;var lUn=FSu;function jSu(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}function LSu(t,e){return[...t,e]}function USu(t,e){return[...t.slice(0,e),...t.slice(e+1)]}function zSu(t,e){let r=t.indexOf(e);return r!==-1?USu(t,r):t}var $Ni=class extends hr{};var XNi=async(t,e,r)=>{let i=GSu(t),n=i.promise.then(()=>{throw new $Ni(e)});return await lUn.race([r,n]).finally(i.cancel)},GSu=t=>{let e=Q2r(),r=setTimeout(e.resolve,t),i=()=>clearTimeout(r);return{promise:e.promise,cancel:i}};var eGc=global.setImmediate??setTimeout;var QN=(()=>{let t=n=>{if(typeof window<"u"){let a=window[n];if(typeof a=="string"&&a)return a}return process.env[n]},e=t("FIREBASE_AUTH_EMULATOR_HOST"),r=t("FIRESTORE_EMULATOR_HOST"),i=t("FIREBASE_STORAGE_EMULATOR_HOST");if(!!e!=!!r||!!e!=!!i||!!r!=!!i)throw new Error(`Inconsistent Firebase emulator use! All three emulators must be used, or none! auth=${e} firestore=${r} storage=${i}`);return e&&r&&i?N0().isTest?{auth:"http://"+e,firestore:r,storage:i}:{auth:e,firestore:r,storage:i}:null})();var HSu=oCr({auth:R7(),firestore:R7(),storage:R7()}),cUn=an("FirebaseEmulatorInfo",HSu);var SM=null,Yie=xr("FIREBASE"),uzu=(t,e)=>{let r;if(QN)r=QN;else if("emulatorInfo"in t.options)r=cUn.assert(t.options.emulatorInfo);else return!1;N0().isTest&&(e=!1),Yie.info(`Using Firebase Auth emulator at ${r.auth}`),typeof window<"u"?FO(Jsr(t),r.auth):t.auth().useEmulator(r.auth),Yie.info(`Using Firestore emulator at ${r.firestore} over ${e?"https":"http"}`);let[i,n]=r.firestore.split(":");t.firestore().useEmulator(i,parseInt(n)),e&&t.firestore()._delegate._setSettings({...t.firestore()._delegate._getSettings(),ssl:!0}),Yie.info(`Using Firebase Storage emulator at ${r.storage} over ${e?"https":"http"}`);let[a,o]=r.storage.split(":");return t.storage().useEmulator(a,parseInt(o)),e&&(t.storage()._delegate._protocol="https"),!0},lzu="[DEFAULT]";var sea=async(t,e)=>{Os.apps.find(r=>r.name===(e??lzu))||await czu(t,e)};async function czu(t,e){let r=Os.initializeApp(t,e);if(!uzu(r,!0)&&!WB()&&Fin(!1,"proxyFirestore")){let i=await pzu(t);Yie.info(`Using Firestore proxy host: ${i}`),r.firestore().settings({host:i})}}var pzu=t=>{if(t.emulatorInfo)return`http://${t.emulatorInfo.firestore}`;let e=new URL(jin());return W$(e.protocol==="https:"&&(e.port==="443"||e.port==="")&&e.pathname==="/",`Unable to specify a firestore proxy host for backend URL ${e}. Only HTTPS with no port and no path is supported.`,"FIREBASE"),`${e.hostname}/firestore`};var dzu=Os;var ULi=async()=>{SM||(SM=Jie()),SM.apps.length||(QN?(Yie.app("WARNING - Using the Firebase emulator for firebase-admin!"),SM.initializeApp({projectId:"coalesce"})):SM.initializeApp({credential:SM.credential.applicationDefault()})),uea=SM},uea=dzu;function lea(t,e,r){let{timeout:i,...n}=r??{},a=n;typeof i=="number"&&(a.axiosConfig={timeout:i});let o=YNi(t??ly(),a);return e&&o.use(dO({getToken:async()=>typeof e=="string"?e:e()})),o}var cea=t=>"recursiveDelete"in t,Ayr=t=>t?t?.message??"":"",Azu=t=>/(PERMISSION_DENIED)|(false for 'get')|(false for 'list')|(false for 'update')|(false for 'delete')|(Missing or insufficient permissions.)/.test(Ayr(t)),gzu=t=>/(NOT_FOUND)|(No document to update)/.test(Ayr(t)),Zie=t=>Azu(t)?new LB("Permission denied",Ayr(t)):gzu(t)?new vd("Not found",Ayr(t)):t,Yf=async t=>{try{return await t}catch(e){throw Zie(e)}};var hg=S.any().transform(t=>t?.toString()).pipe(S.string()),Zf=S.any().transform(t=>typeof t=="string"?t.toLowerCase()==="true":typeof t=="number"?!!t:t).pipe(S.boolean()),pea=S.object({errorDetail:S.string().default(""),errorString:S.string()}).strict(),hzu=S.union([S.number(),S.string(),S.boolean()]),jJc=S.record(hzu),al=t=>h5(t,{ZodObject:e=>e.passthrough()}),h5=(t,e)=>{if(t instanceof vA){let r=t.shape,i={};for(let a in t.shape){let o=r[a];i[a]=h5(o,e)}let n=new S.ZodObject({...t._def,shape:()=>i});return e.ZodObject?e.ZodObject(n):n}else{if(t instanceof S.ZodArray)return S.ZodArray.create(h5(t.element,e));if(t instanceof S.ZodOptional){let r=t.unwrap();return S.ZodOptional.create(h5(e.ZodOptional?e.ZodOptional(r):r,e))}else{if(t instanceof S.ZodNullable)return S.ZodNullable.create(h5(t.unwrap(),e));if(t instanceof S.ZodTuple)return S.ZodTuple.create(t.items.map(r=>h5(r,e)));if(t instanceof S.ZodDiscriminatedUnion){let r=t._def.options.map(i=>h5(i,e));return S.ZodDiscriminatedUnion.create(t._def.discriminator,r)}else if(t instanceof S.ZodUnion){let r=t._def.options.map(i=>h5(i,e));return S.ZodUnion.create(r)}else if(t instanceof S.ZodRecord)return S.ZodRecord.create(t.keySchema,h5(t.valueSchema,e))}}return t},vM=S.object({id:S.coerce.number().int()}),Ft=S.object({id:hg}),LJc=S.union([vM,Ft]);var y5=S.enum(["snowflake","databricks","fabric","bigquery"]);var zLi=t=>typeof Blob>"u"?Buffer.byteLength(JSON.stringify(t),"utf8")*2:new Blob([JSON.stringify(t)]).size*2;var xD=new Date("1980-01-01T00:00:00.000Z"),Vr=(t,e,r)=>{let i=`${t}Entity`;return r||(r=al(e)),{standard:an(i,r),strict:an(`${i} (strict)`,e)}};var Yt=S.object({createdAt:S.coerce.date().default(()=>new Date),updatedAt:S.coerce.date().default(()=>new Date),createdBy:S.string().optional(),updatedBy:S.string().optional()}).strict(),dea=()=>new BM,BM=class{};var BH=class{},b5=()=>new f5,f5=class t extends Date{static SENTINEL_DATE=3131961357;constructor(){super(t.SENTINEL_DATE)}},Aea=t=>KB(t,"createdAt","updatedAt","createdBy","updatedBy"),m5=class{id;get path(){return""}logContext={};constructor(e){this.id=e}};var gea=t=>{if(Array.isArray(t))for(let e=t.length-1;e>=0;e--)t[e]===void 0&&t.splice(e,1);if(t&&typeof t=="object")for(let e in t)t.hasOwnProperty(e)&&t[e]===void 0&&delete t[e];return[t,!1]},yzu=(t,e)=>{if(t&&typeof t=="object"){let r=t;if(r.toDate&&(!isNaN(r.seconds)&&!isNaN(r.nanoseconds)||!isNaN(r._seconds)&&!isNaN(r._nanoseconds))){let i=r.toDate();return i.getTime()===f5.SENTINEL_DATE&&Da().emerg(`Repository server timestamp sentinel value found in stored data at path ${e}`),[i,!0]}}return[t,!1]},hea=(t,e)=>t instanceof BM?[e.getDeleteSentinel(),!0]:t instanceof Date&&t.getTime()===f5.SENTINEL_DATE?[e.getServerTimestampSentinel(),!0]:[t,!1],RM=(t,e,r)=>{let[i,n]=e(r,t);if(!n&&typeof i=="object"){if(Array.isArray(i))return i.map(a=>RM(t,e,a));for(let a in i)i.hasOwnProperty(a)&&(i[a]=RM(t,e,i[a]))}return i},$ie=class{fromStorage(e,r,i,n,a){try{return this.transformFromStorage(e,r,i,n,a)}catch(o){if(a?.onDataTransformError&&a.onDataTransformError(r,o),!a?.ignoreDataTransformErrors)throw Da().debug(`Error transforming repository entity ${r} from storage: ${o}`),o}return i}toStorage(e,r,i,n,a){try{return this.transformToStorage(e,r,i,n,a)}catch(o){if(a?.onDataTransformError&&a.onDataTransformError(r,o),!a?.ignoreDataTransformErrors)throw Da().debug(`Error transforming repository entity ${r} to storage ${o}`),o}return i}mergeToStorage(e,r,i,n,a){try{return this.mergeTransformToStorage(e,r,i,n,a)}catch(o){if(a?.onDataTransformError&&a.onDataTransformError(r,o),!a?.ignoreDataTransformErrors)throw Da().debug(`Error merge transforming repository entity ${r} to storage ${o}`),o}return i}},GLi=class extends $ie{constructor(r=!1){super();this.preserveID=r}transformFromStorage(r,i,n){return"id"in n?n.id!=r&&(Da().error(`'id' property does not match doc id on doc at path ${i}; doc id: ${r}, value.id: ${n.id}`),n.id=r):n.id=r,"createdAt"in n||(n.createdAt=xD),"updatedAt"in n||(n.updatedAt=xD),RM(i,yzu,n)}transformToStorage(r,i,n,a){return this.preserveID||delete n.id,RM(i,o=>{let[s,u]=hea(o,a);return u?[s,!0]:gea(s)},n)}mergeTransformToStorage(r,i,n,a){return this.preserveID||delete n.id,RM(i,o=>{let[s,u]=hea(o,a);return u?[s,!0]:gea(s)},n)}},HLi=class extends $ie{constructor(r){super();this.validators=r}transformFromStorage(r,i,n,a,o){let s=this.getValidatorOptions(r,o?.validatorOptions);return o?.enableStrictValidation?this.validators.strict.assert(n,s):this.validators.standard.assert(n,s)}transformToStorage(r,i,n,a,o){let s=this.getValidatorOptions(r,o?.validatorOptions);return o?.enableStrictValidation?this.validators.strict.assert(n,s):this.validators.standard.assert(n,s)}mergeTransformToStorage(r,i,n,a,o){return n}getValidatorOptions(r,i,n=500){let a={...i,statusCode:n};return a.errorMessage||(a.errorMessage=o=>`Found ${o.failures.length} validation failure(s) for ${this.validators.standard.name} ${r}`),a}},Hi=(t,e,r)=>{let i=[new GLi(r),new HLi(t)];return e&&i.unshift(e),new VLi(...i)},VLi=class{transforms;constructor(...e){this.transforms=e}fromStorage(e,r,i,n,a){return this.transforms.reduce((o,s)=>s.fromStorage(e,r,o,n,a),i)}toStorage(e,r,i,n,a){return this.transforms.reduceRight((o,s)=>s.toStorage(e,r,o,n,a),i)}mergeToStorage(e,r,i,n,a){return this.transforms.reduceRight((o,s)=>s.mergeToStorage(e,r,o,n,a),i)}},yd=class extends $ie{transformToStorage(e,r,i){return i}mergeTransformToStorage(e,r,i){return i}};var wea=Ot(If(),1);pM();var TM=Ot(qFi(),1),Sea=Ot(LFi(),1),WLi=Ot(If(),1),JLi=Ot(Dtr(),1),vea=require("stream"),YLi=Ot(nji(),1);pM();var fea=Ot(require("querystring"),1),mea=require("stream");var bea=Ot(RH(),1);var mzu=!0;function $C(t,e){return{options:typeof t=="object"?t:{},callback:typeof t=="function"?t:e}}function KLi(t){return Object.keys(t).map(e=>[e,t[e]])}function bzu(t){return encodeURIComponent(t).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())}function ene(t,e){return t.split("/").map(bzu).join(e?"%2F":"/")}function Cea(t){return fea.stringify(t,"&","=",{encodeURIComponent:e=>ene(e,!0)})}function Iea(t){let e={};for(let r of Object.keys(t)){let i=t[r];r=r.toLowerCase(),e[r]=i}return e}function Eea(t){return JSON.stringify(t).replace(/[\u0080-\uFFFF]/g,e=>"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4))}function gyr(t){return t instanceof Date||t instanceof RegExp?t:Array.isArray(t)?t.map(gyr):t instanceof Object?Object.keys(t).reduce((e,r)=>{let i=r[0].toLocaleLowerCase()+r.slice(1).replace(/([A-Z]+)/g,(n,a)=>`_${a.toLowerCase()}`);return e[i]=gyr(t[r]),e},Object()):t}function wM(t,e=!1,r="",i=""){let n=t.getUTCFullYear(),a=t.getUTCMonth()+1,o=t.getUTCDate(),s=t.getUTCHours(),u=t.getUTCMinutes(),l=t.getUTCSeconds(),c=`${n.toString().padStart(4,"0")}${r}${a.toString().padStart(2,"0")}${r}${o.toString().padStart(2,"0")}`;return e&&(c=`${c}T${s.toString().padStart(2,"0")}${i}${u.toString().padStart(2,"0")}${i}${l.toString().padStart(2,"0")}Z`),c}function Y4(){return globalThis.Deno&&globalThis.Deno.version&&globalThis.Deno.version.deno?`gl-deno/${globalThis.Deno.version.deno}`:`gl-node/${process.versions.node}`}function Z4(){let t=(0,bea.getPackageJSON)();return t.name.replace("@google-cloud","gcloud-node").replace("/","-")+"/"+t.version}function kD(){return mzu?"ESM":"CJS"}var Xie=class extends mea.PassThrough{constructor(){super(...arguments),this.shouldEmitReading=!0,this.shouldEmitWriting=!0}_read(e){this.shouldEmitReading&&(this.emit("reading"),this.shouldEmitReading=!1),super._read(e)}_write(e,r,i){this.shouldEmitWriting&&(this.emit("writing"),this.shouldEmitWriting=!1),process.nextTick(()=>{super._write(e,r,i)})}_final(e){this.shouldEmitReading&&(this.emit("reading"),this.shouldEmitReading=!1),this.shouldEmitWriting&&(this.emit("writing"),this.shouldEmitWriting=!1),e(null)}};var Bea=Ot(PF(),1),Rea=Ot(RH(),1);var Czu=(0,Rea.getPackageJSON)(),fd=Symbol.for("GCCL_GCS_CMD"),hyr={timeout:6e4,gzip:!0,forever:!0,pool:{maxSockets:1/0}},Izu=!0,Ezu=3,$4=class t extends Error{constructor(e){if(super(),typeof e!="object"){this.message=e||"";return}let r=e;this.code=r.code,this.errors=r.errors,this.response=r.response;try{this.errors=JSON.parse(this.response.body).error.errors}catch{this.errors=r.errors}this.message=t.createMultiErrorMessage(r,this.errors),Error.captureStackTrace(this)}static createMultiErrorMessage(e,r){let i=new Set;e.message&&i.add(e.message),r&&r.length?r.forEach(({message:a})=>i.add(a)):e.response&&e.response.body?i.add(Sea.decode(e.response.body.toString())):e.message||i.add("A failure occurred during this request.");let n=Array.from(i);return n.length>1&&(n=n.map((a,o)=>` ${o+1}. ${a}`),n.unshift("Multiple errors occurred during the request. Please see the `errors` array for complete details.\n"),n.push(`
|
|
1263
|
+
`,requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The BigQuery project ID to list datasets for.")}],response:S.array(S.string()),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/databricks/warehouse",alias:"GetDatabricksWarehouse",description:"Retrieves a list of all SQL warehouses that a user has manager permissions on.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The ID of the workspace")},{name:"x-databricks-browser-token",type:"Header",schema:S.string().describe("Token from browser storage, only used when connection type is browser storage token.").optional()}],response:DSu,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/workspaces/:workspaceID/jobs",alias:"CreateJob",description:"Create a new job in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:qLn},{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")}],response:S.object({id:S.string().describe("The Job ID."),name:S.string().describe("The Job name."),includeSelector:S.string().describe("A selector string of nodes to include."),excludeSelector:S.string().describe("A selector string of nodes to exclude."),createdAt:S.string().datetime({offset:!0}),updatedAt:S.string().datetime({offset:!0})}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/workspaces/:workspaceID/jobs/:jobID",alias:"UpdateJob",description:"Update all fields of an existing job in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:qLn},{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"jobID",type:"Path",schema:S.string().describe("The job ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/workspaces/:workspaceID/jobs/:jobID",alias:"DeleteJob",description:"Delete a job from a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"jobID",type:"Path",schema:S.string().describe("The job ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/nodes",alias:"GetWorkspaceNodes",description:"Get a collection of nodes for a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"detail",type:"Query",schema:S.boolean().describe("Include the full detail of the nodes.").optional().default(!1)},{name:"limit",type:"Query",schema:S.number().int().gte(1).lte(500).describe("The maximum number of nodes to return.").optional().default(100)},{name:"startingFrom",type:"Query",schema:S.string().describe("The cursor point for paging the query results.").optional()},{name:"orderBy",type:"Query",schema:S.literal("id").describe("The field to order the results by.").optional().default("id")},{name:"skipParsing",type:"Query",schema:S.boolean().describe("Skip parsing column references and updating sources for the nodes.").optional().default(!1)}],response:kLn,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/workspaces/:workspaceID/nodes",alias:"CreateNode",description:"Create a new node in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:A3u},{name:"workspaceID",type:"Path",schema:S.string().describe("The workspace ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/nodes/:nodeID",alias:"GetWorkspaceNode",description:"Get information about a node in a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()},{name:"skipParsing",type:"Query",schema:S.boolean().describe("Skip parsing column references and updating sources for the nodes.").optional().default(!1)}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/workspaces/:workspaceID/nodes/:nodeID",alias:"SetWorkspaceNode",description:"Replace all fields of a node in a workspace.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:jz},{name:"workspaceID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:jz,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/workspaces/:workspaceID/nodes/:nodeID",alias:"DeleteWorkspaceNode",description:"Delete a node in a workspace.",requestFormat:"json",parameters:[{name:"workspaceID",type:"Path",schema:S.string().describe("The environment ID.")},{name:"nodeID",type:"Path",schema:S.string().describe("The node ID.")},{name:"overrideOrgID",type:"Query",schema:S.string().describe("Runs an operation against the specified org. (Super-users only.)").optional()}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/api/v1/workspaces/:workspaceID/subgraphs",alias:"CreateSubgraph",description:"Create a new subgraph for organizing and managing a collection of nodes.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:LLn},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.object({data:ULn.describe("A partial collection of nodes from the node graph, allowing easier viewing and editing of a portion of a large graph.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v1/workspaces/:workspaceID/subgraphs/:subgraphID",alias:"UpdateSubgraph",description:"Update a subgraph.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:LLn},{name:"subgraphID",type:"Path",schema:S.string().describe("ID of the subgraph being fetched")},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v1/workspaces/:workspaceID/subgraphs/:subgraphID",alias:"DeleteSubgraph",description:"Delete a subgraph.",requestFormat:"json",parameters:[{name:"subgraphID",type:"Path",schema:S.string().describe("ID of the subgraph being fetched")},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v1/workspaces/:workspaceID/subgraphs/:subgraphID",alias:"GetSubgraph",description:"Get a subgraph.",requestFormat:"json",parameters:[{name:"subgraphID",type:"Path",schema:S.string().describe("ID of the subgraph being fetched")},{name:"workspaceID",type:"Path",schema:S.string().describe("ID of the workspace containing the subgraph")}],response:S.object({data:ULn.describe("A partial collection of nodes from the node graph, allowing easier viewing and editing of a portion of a large graph.")}).passthrough(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v2/userRoles",alias:"GetUserRolesV2",description:"Get all user roles in the organization, filtered by information available based on the current user's roles",requestFormat:"json",parameters:[{name:"projectID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified project.").optional()},{name:"environmentID",type:"Query",schema:S.string().describe("Return only user roles pertaining to the specified environment.").optional()}],response:P3u,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/api/v2/userRoles/:userID",alias:"GetSingleUserRolesV2",description:"Get a single user's roles.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Query",schema:S.string().describe("The project ID.").optional()},{name:"environmentID",type:"Query",schema:S.string().describe("The environment ID.").optional()}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v2/userRoles/:userID/environments/:environmentID",alias:"DeleteUserEnvironmentRoleV2",description:"Deletes all of a user's environment roles.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v2/userRoles/:userID/environments/:environmentID",alias:"UpsertUserEnvironmentRoleV2",description:"Creates or updates a user's environment role.",requestFormat:"json",parameters:[{name:"body",description:"The user environment role.",type:"Body",schema:Q3u},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"environmentID",type:"Path",schema:S.string().describe("The environment ID.")}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v2/userRoles/:userID/organizationRole",alias:"UpsertUserOrganizationRoleV2",description:"Creates or updates a user's organization role. Only org admins may use this API.",requestFormat:"json",parameters:[{name:"body",description:"The user's organization role.",type:"Body",schema:S.object({organizationRole:S.string()}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/api/v2/userRoles/:userID/projects/:projectID",alias:"DeleteUserProjectRoleV2",description:"Deletes all of a user's project roles. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"put",path:"/api/v2/userRoles/:userID/projects/:projectID",alias:"UpsertUserProjectRoleV2",description:"Creates or updates a user's project role. Only org and project admins may user this API.",requestFormat:"json",parameters:[{name:"body",description:"The user project role",type:"Body",schema:S.object({projectRole:S.string()}).passthrough()},{name:"userID",type:"Path",schema:S.string().describe("The user ID.")},{name:"projectID",type:"Path",schema:S.string().describe("The project ID.")}],response:Vte,errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:409,description:"The requested resource already exists.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"get",path:"/scheduler/secret/:secretType/:context",alias:"SecretExistsV0",description:"Determines whether or not a git token value exists for a given project ID.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.boolean(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"post",path:"/scheduler/secret/:secretType/:context",alias:"SetSecretV0",description:"Sets the value of a secret.",requestFormat:"json",parameters:[{name:"body",description:"The new value of the secret.",type:"Body",schema:S.object({secretValue:S.unknown()}).passthrough()},{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]},{method:"delete",path:"/scheduler/secret/:secretType/:context",alias:"DeleteSecretV0",description:"Deletes a secret.",requestFormat:"json",parameters:[{name:"secretType",type:"Path",schema:S.string().describe("The name of the secret type.")},{name:"context",type:"Path",schema:S.string().describe("Contextual information required to identify a particular secret.")}],response:S.void(),errors:[{status:400,description:"The request was invalid.",schema:j},{status:401,description:"User lacks authorization to perform this action.",schema:j},{status:403,description:"The client is not permitted to perform the requested operation.",schema:j},{status:404,description:"The requested resource could not be found.",schema:j},{status:500,description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",schema:j},{status:502,description:"The server received an error from an upstream system.",schema:j},{status:503,description:"The service is currently unavailable.",schema:j},{status:504,description:"The server did not receive a response in time from an upstream system.",schema:j}]}]),Kzc=new Fz(sUn);function YNi(t,e){return new Fz(t,sUn,e)}var uUn,ZNi=new WeakMap,qSu=()=>{},FSu=class U8{constructor(e){this.subscribers=[],this.settlement=null,this[uUn]="Unpromise",e instanceof Promise?this.promise=e:this.promise=new Promise(e),this.promise.then(r=>{let{subscribers:i}=this;this.subscribers=null,this.settlement={status:"fulfilled",value:r},i?.forEach(({resolve:n})=>{n(r)})}).catch(r=>{let{subscribers:i}=this;this.subscribers=null,this.settlement={status:"rejected",reason:r},i?.forEach(({reject:n})=>{n(r)})})}subscribe(){let e,r,{settlement:i}=this;if(i===null){if(this.subscribers===null)throw new Error("Unpromise settled but still has subscribers");let n=jSu();this.subscribers=LSu(this.subscribers,n),e=n.promise,r=()=>{this.subscribers!==null&&(this.subscribers=zSu(this.subscribers,n))}}else{let{status:n}=i;n==="fulfilled"?e=Promise.resolve(i.value):e=Promise.reject(i.reason),r=qSu}return Object.assign(e,{unsubscribe:r})}then(e,r){let i=this.subscribe(),{unsubscribe:n}=i;return Object.assign(i.then(e,r),{unsubscribe:n})}catch(e){let r=this.subscribe(),{unsubscribe:i}=r;return Object.assign(r.catch(e),{unsubscribe:i})}finally(e){let r=this.subscribe(),{unsubscribe:i}=r;return Object.assign(r.finally(e),{unsubscribe:i})}static proxy(e){let r=U8.getSubscribablePromise(e);return typeof r<"u"?r:U8.createSubscribablePromise(e)}static createSubscribablePromise(e){let r=new U8(e);return ZNi.set(e,r),ZNi.set(r,r),r}static getSubscribablePromise(e){return ZNi.get(e)}static resolve(e){return U8.proxy(e).subscribe()}static async any(e){let r=e.map(U8.resolve);try{return await Promise.any(r)}finally{r.forEach(({unsubscribe:i})=>{i()})}}static async race(e){let r=e.map(U8.resolve);try{return await Promise.race(r)}finally{r.forEach(({unsubscribe:i})=>{i()})}}static async raceSingletons(e){let r=e.map(i=>U8.proxy(i).then(()=>[i]));try{return await Promise.race(r)}finally{for(let i of r)i.unsubscribe()}}};uUn=Symbol.toStringTag;var lUn=FSu;function jSu(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}function LSu(t,e){return[...t,e]}function USu(t,e){return[...t.slice(0,e),...t.slice(e+1)]}function zSu(t,e){let r=t.indexOf(e);return r!==-1?USu(t,r):t}var $Ni=class extends hr{};var XNi=async(t,e,r)=>{let i=GSu(t),n=i.promise.then(()=>{throw new $Ni(e)});return await lUn.race([r,n]).finally(i.cancel)},GSu=t=>{let e=Q2r(),r=setTimeout(e.resolve,t),i=()=>clearTimeout(r);return{promise:e.promise,cancel:i}};var eGc=global.setImmediate??setTimeout;var QN=(()=>{let t=n=>{if(typeof window<"u"){let a=window[n];if(typeof a=="string"&&a)return a}return process.env[n]},e=t("FIREBASE_AUTH_EMULATOR_HOST"),r=t("FIRESTORE_EMULATOR_HOST"),i=t("FIREBASE_STORAGE_EMULATOR_HOST");if(!!e!=!!r||!!e!=!!i||!!r!=!!i)throw new Error(`Inconsistent Firebase emulator use! All three emulators must be used, or none! auth=${e} firestore=${r} storage=${i}`);return e&&r&&i?N0().isTest?{auth:"http://"+e,firestore:r,storage:i}:{auth:e,firestore:r,storage:i}:null})();var HSu=oCr({auth:R7(),firestore:R7(),storage:R7()}),cUn=an("FirebaseEmulatorInfo",HSu);var SM=null,Yie=xr("FIREBASE"),uzu=(t,e)=>{let r;if(QN)r=QN;else if("emulatorInfo"in t.options)r=cUn.assert(t.options.emulatorInfo);else return!1;N0().isTest&&(e=!1),Yie.info(`Using Firebase Auth emulator at ${r.auth}`),typeof window<"u"?FO(Jsr(t),r.auth):t.auth().useEmulator(r.auth),Yie.info(`Using Firestore emulator at ${r.firestore} over ${e?"https":"http"}`);let[i,n]=r.firestore.split(":");t.firestore().useEmulator(i,parseInt(n)),e&&t.firestore()._delegate._setSettings({...t.firestore()._delegate._getSettings(),ssl:!0}),Yie.info(`Using Firebase Storage emulator at ${r.storage} over ${e?"https":"http"}`);let[a,o]=r.storage.split(":");return t.storage().useEmulator(a,parseInt(o)),e&&(t.storage()._delegate._protocol="https"),!0},lzu="[DEFAULT]";var sea=async(t,e)=>{Os.apps.find(r=>r.name===(e??lzu))||await czu(t,e)};async function czu(t,e){let r=Os.initializeApp(t,e);if(!uzu(r,!0)&&!WB()&&Fin(!1,"proxyFirestore")){let i=await pzu(t);Yie.info(`Using Firestore proxy host: ${i}`),r.firestore().settings({host:i})}}var pzu=t=>{if(t.emulatorInfo)return`http://${t.emulatorInfo.firestore}`;let e=new URL(jin());return W$(e.protocol==="https:"&&(e.port==="443"||e.port==="")&&e.pathname==="/",`Unable to specify a firestore proxy host for backend URL ${e}. Only HTTPS with no port and no path is supported.`,"FIREBASE"),`${e.hostname}/firestore`};var dzu=Os;var ULi=async()=>{SM||(SM=Jie()),SM.apps.length||(QN?(Yie.app("WARNING - Using the Firebase emulator for firebase-admin!"),SM.initializeApp({projectId:"coalesce"})):SM.initializeApp({credential:SM.credential.applicationDefault()})),uea=SM},uea=dzu;function lea(t,e,r){let{timeout:i,...n}=r??{},a=n;typeof i=="number"&&(a.axiosConfig={timeout:i});let o=YNi(t??ly(),a);return e&&o.use(dO({getToken:async()=>typeof e=="string"?e:e()})),o}var cea=t=>"recursiveDelete"in t,Ayr=t=>t?t?.message??"":"",Azu=t=>/(PERMISSION_DENIED)|(false for 'get')|(false for 'list')|(false for 'update')|(false for 'delete')|(Missing or insufficient permissions.)/.test(Ayr(t)),gzu=t=>/(NOT_FOUND)|(No document to update)/.test(Ayr(t)),Zie=t=>Azu(t)?new LB("Permission denied",Ayr(t)):gzu(t)?new vd("Not found",Ayr(t)):t,Yf=async t=>{try{return await t}catch(e){throw Zie(e)}};var hg=S.any().transform(t=>t?.toString()).pipe(S.string()),Zf=S.any().transform(t=>typeof t=="string"?t.toLowerCase()==="true":typeof t=="number"?!!t:t).pipe(S.boolean()),pea=S.object({errorDetail:S.string().default(""),errorString:S.string()}).strict(),hzu=S.union([S.number(),S.string(),S.boolean()]),jJc=S.record(hzu),al=t=>h5(t,{ZodObject:e=>e.passthrough()}),h5=(t,e)=>{if(t instanceof vA){let r=t.shape,i={};for(let a in t.shape){let o=r[a];i[a]=h5(o,e)}let n=new S.ZodObject({...t._def,shape:()=>i});return e.ZodObject?e.ZodObject(n):n}else{if(t instanceof S.ZodArray)return S.ZodArray.create(h5(t.element,e));if(t instanceof S.ZodOptional){let r=t.unwrap();return S.ZodOptional.create(h5(e.ZodOptional?e.ZodOptional(r):r,e))}else{if(t instanceof S.ZodNullable)return S.ZodNullable.create(h5(t.unwrap(),e));if(t instanceof S.ZodTuple)return S.ZodTuple.create(t.items.map(r=>h5(r,e)));if(t instanceof S.ZodDiscriminatedUnion){let r=t._def.options.map(i=>h5(i,e));return S.ZodDiscriminatedUnion.create(t._def.discriminator,r)}else if(t instanceof S.ZodUnion){let r=t._def.options.map(i=>h5(i,e));return S.ZodUnion.create(r)}else if(t instanceof S.ZodRecord)return S.ZodRecord.create(t.keySchema,h5(t.valueSchema,e))}}return t},vM=S.object({id:S.coerce.number().int()}),Ft=S.object({id:hg}),LJc=S.union([vM,Ft]);var y5=S.enum(["snowflake","databricks","fabric","bigquery"]);var zLi=t=>typeof Blob>"u"?Buffer.byteLength(JSON.stringify(t),"utf8")*2:new Blob([JSON.stringify(t)]).size*2;var xD=new Date("1980-01-01T00:00:00.000Z"),Vr=(t,e,r)=>{let i=`${t}Entity`;return r||(r=al(e)),{standard:an(i,r),strict:an(`${i} (strict)`,e)}};var Yt=S.object({createdAt:S.coerce.date().default(()=>new Date),updatedAt:S.coerce.date().default(()=>new Date),createdBy:S.string().optional(),updatedBy:S.string().optional()}).strict(),dea=()=>new BM,BM=class{};var BH=class{},b5=()=>new f5,f5=class t extends Date{static SENTINEL_DATE=3131961357;constructor(){super(t.SENTINEL_DATE)}},Aea=t=>KB(t,"createdAt","updatedAt","createdBy","updatedBy"),m5=class{id;get path(){return""}logContext={};constructor(e){this.id=e}};var gea=t=>{if(Array.isArray(t))for(let e=t.length-1;e>=0;e--)t[e]===void 0&&t.splice(e,1);if(t&&typeof t=="object")for(let e in t)t.hasOwnProperty(e)&&t[e]===void 0&&delete t[e];return[t,!1]},yzu=(t,e)=>{if(t&&typeof t=="object"){let r=t;if(r.toDate&&(!isNaN(r.seconds)&&!isNaN(r.nanoseconds)||!isNaN(r._seconds)&&!isNaN(r._nanoseconds))){let i=r.toDate();return i.getTime()===f5.SENTINEL_DATE&&Da().emerg(`Repository server timestamp sentinel value found in stored data at path ${e}`),[i,!0]}}return[t,!1]},hea=(t,e)=>t instanceof BM?[e.getDeleteSentinel(),!0]:t instanceof Date&&t.getTime()===f5.SENTINEL_DATE?[e.getServerTimestampSentinel(),!0]:[t,!1],RM=(t,e,r)=>{let[i,n]=e(r,t);if(!n&&typeof i=="object"){if(Array.isArray(i))return i.map(a=>RM(t,e,a));for(let a in i)i.hasOwnProperty(a)&&(i[a]=RM(t,e,i[a]))}return i},$ie=class{fromStorage(e,r,i,n,a){try{return this.transformFromStorage(e,r,i,n,a)}catch(o){if(a?.onDataTransformError&&a.onDataTransformError(r,o),!a?.ignoreDataTransformErrors)throw Da().debug(`Error transforming repository entity ${r} from storage: ${o}`),o}return i}toStorage(e,r,i,n,a){try{return this.transformToStorage(e,r,i,n,a)}catch(o){if(a?.onDataTransformError&&a.onDataTransformError(r,o),!a?.ignoreDataTransformErrors)throw Da().debug(`Error transforming repository entity ${r} to storage ${o}`),o}return i}mergeToStorage(e,r,i,n,a){try{return this.mergeTransformToStorage(e,r,i,n,a)}catch(o){if(a?.onDataTransformError&&a.onDataTransformError(r,o),!a?.ignoreDataTransformErrors)throw Da().debug(`Error merge transforming repository entity ${r} to storage ${o}`),o}return i}},GLi=class extends $ie{constructor(r=!1){super();this.preserveID=r}transformFromStorage(r,i,n){return"id"in n?n.id!=r&&(Da().error(`'id' property does not match doc id on doc at path ${i}; doc id: ${r}, value.id: ${n.id}`),n.id=r):n.id=r,"createdAt"in n||(n.createdAt=xD),"updatedAt"in n||(n.updatedAt=xD),RM(i,yzu,n)}transformToStorage(r,i,n,a){return this.preserveID||delete n.id,RM(i,o=>{let[s,u]=hea(o,a);return u?[s,!0]:gea(s)},n)}mergeTransformToStorage(r,i,n,a){return this.preserveID||delete n.id,RM(i,o=>{let[s,u]=hea(o,a);return u?[s,!0]:gea(s)},n)}},HLi=class extends $ie{constructor(r){super();this.validators=r}transformFromStorage(r,i,n,a,o){let s=this.getValidatorOptions(r,o?.validatorOptions);return o?.enableStrictValidation?this.validators.strict.assert(n,s):this.validators.standard.assert(n,s)}transformToStorage(r,i,n,a,o){let s=this.getValidatorOptions(r,o?.validatorOptions);return o?.enableStrictValidation?this.validators.strict.assert(n,s):this.validators.standard.assert(n,s)}mergeTransformToStorage(r,i,n,a,o){return n}getValidatorOptions(r,i,n=500){let a={...i,statusCode:n};return a.errorMessage||(a.errorMessage=o=>`Found ${o.failures.length} validation failure(s) for ${this.validators.standard.name} ${r}`),a}},Hi=(t,e,r)=>{let i=[new GLi(r),new HLi(t)];return e&&i.unshift(e),new VLi(...i)},VLi=class{transforms;constructor(...e){this.transforms=e}fromStorage(e,r,i,n,a){return this.transforms.reduce((o,s)=>s.fromStorage(e,r,o,n,a),i)}toStorage(e,r,i,n,a){return this.transforms.reduceRight((o,s)=>s.toStorage(e,r,o,n,a),i)}mergeToStorage(e,r,i,n,a){return this.transforms.reduceRight((o,s)=>s.mergeToStorage(e,r,o,n,a),i)}},yd=class extends $ie{transformToStorage(e,r,i){return i}mergeTransformToStorage(e,r,i){return i}};var wea=Ot(If(),1);pM();var TM=Ot(qFi(),1),Sea=Ot(LFi(),1),WLi=Ot(If(),1),JLi=Ot(Dtr(),1),vea=require("stream"),YLi=Ot(nji(),1);pM();var fea=Ot(require("querystring"),1),mea=require("stream");var bea=Ot(RH(),1);var mzu=!0;function $C(t,e){return{options:typeof t=="object"?t:{},callback:typeof t=="function"?t:e}}function KLi(t){return Object.keys(t).map(e=>[e,t[e]])}function bzu(t){return encodeURIComponent(t).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())}function ene(t,e){return t.split("/").map(bzu).join(e?"%2F":"/")}function Cea(t){return fea.stringify(t,"&","=",{encodeURIComponent:e=>ene(e,!0)})}function Iea(t){let e={};for(let r of Object.keys(t)){let i=t[r];r=r.toLowerCase(),e[r]=i}return e}function Eea(t){return JSON.stringify(t).replace(/[\u0080-\uFFFF]/g,e=>"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4))}function gyr(t){return t instanceof Date||t instanceof RegExp?t:Array.isArray(t)?t.map(gyr):t instanceof Object?Object.keys(t).reduce((e,r)=>{let i=r[0].toLocaleLowerCase()+r.slice(1).replace(/([A-Z]+)/g,(n,a)=>`_${a.toLowerCase()}`);return e[i]=gyr(t[r]),e},Object()):t}function wM(t,e=!1,r="",i=""){let n=t.getUTCFullYear(),a=t.getUTCMonth()+1,o=t.getUTCDate(),s=t.getUTCHours(),u=t.getUTCMinutes(),l=t.getUTCSeconds(),c=`${n.toString().padStart(4,"0")}${r}${a.toString().padStart(2,"0")}${r}${o.toString().padStart(2,"0")}`;return e&&(c=`${c}T${s.toString().padStart(2,"0")}${i}${u.toString().padStart(2,"0")}${i}${l.toString().padStart(2,"0")}Z`),c}function Y4(){return globalThis.Deno&&globalThis.Deno.version&&globalThis.Deno.version.deno?`gl-deno/${globalThis.Deno.version.deno}`:`gl-node/${process.versions.node}`}function Z4(){let t=(0,bea.getPackageJSON)();return t.name.replace("@google-cloud","gcloud-node").replace("/","-")+"/"+t.version}function kD(){return mzu?"ESM":"CJS"}var Xie=class extends mea.PassThrough{constructor(){super(...arguments),this.shouldEmitReading=!0,this.shouldEmitWriting=!0}_read(e){this.shouldEmitReading&&(this.emit("reading"),this.shouldEmitReading=!1),super._read(e)}_write(e,r,i){this.shouldEmitWriting&&(this.emit("writing"),this.shouldEmitWriting=!1),process.nextTick(()=>{super._write(e,r,i)})}_final(e){this.shouldEmitReading&&(this.emit("reading"),this.shouldEmitReading=!1),this.shouldEmitWriting&&(this.emit("writing"),this.shouldEmitWriting=!1),e(null)}};var Bea=Ot(PF(),1),Rea=Ot(RH(),1);var Czu=(0,Rea.getPackageJSON)(),fd=Symbol.for("GCCL_GCS_CMD"),hyr={timeout:6e4,gzip:!0,forever:!0,pool:{maxSockets:1/0}},Izu=!0,Ezu=3,$4=class t extends Error{constructor(e){if(super(),typeof e!="object"){this.message=e||"";return}let r=e;this.code=r.code,this.errors=r.errors,this.response=r.response;try{this.errors=JSON.parse(this.response.body).error.errors}catch{this.errors=r.errors}this.message=t.createMultiErrorMessage(r,this.errors),Error.captureStackTrace(this)}static createMultiErrorMessage(e,r){let i=new Set;e.message&&i.add(e.message),r&&r.length?r.forEach(({message:a})=>i.add(a)):e.response&&e.response.body?i.add(Sea.decode(e.response.body.toString())):e.message||i.add("A failure occurred during this request.");let n=Array.from(i);return n.length>1&&(n=n.map((a,o)=>` ${o+1}. ${a}`),n.unshift("Multiple errors occurred during the request. Please see the `errors` array for complete details.\n"),n.push(`
|
|
1264
1264
|
`)),n.join(`
|
|
1265
1265
|
`)}},ZLi=class extends Error{constructor(e){super();let r=e;this.errors=r.errors,this.name="PartialFailureError",this.response=r.response,this.message=$4.createMultiErrorMessage(r,this.errors)}},$Li=class{constructor(){this.ApiError=$4,this.PartialFailureError=ZLi}noop(){}handleResp(e,r,i,n){n=n||Ya.noop;let a={err:e||null,...r&&Ya.parseHttpRespMessage(r),...i&&Ya.parseHttpRespBody(i)};!a.err&&r&&typeof a.body=="object"&&(a.resp.body=a.body),a.err&&r&&(a.err.response=r),n(a.err,a.body,a.resp)}parseHttpRespMessage(e){let r={resp:e};return(e.statusCode<200||e.statusCode>299)&&(r.err=new $4({errors:new Array,code:e.statusCode,message:e.statusMessage,response:e})),r}parseHttpRespBody(e){let r={body:e};if(typeof e=="string")try{r.body=JSON.parse(e)}catch{r.body=e}return r.body&&r.body.error&&(r.err=new $4(r.body.error)),r}makeWritableStream(e,r,i){var n;i=i||Ya.noop;let a=new XLi;a.on("progress",l=>e.emit("progress",l)),e.setWritable(a);let o={method:"POST",qs:{uploadType:"multipart"},timeout:0,maxRetries:0},s=r.metadata||{},u={...o,...r.request,qs:{...o.qs,...(n=r.request)===null||n===void 0?void 0:n.qs},multipart:[{"Content-Type":"application/json",body:JSON.stringify(s)},{"Content-Type":s.contentType||"application/octet-stream",body:a}]};r.makeAuthenticatedRequest(u,{onAuthenticated(l,c){if(l){e.destroy(l);return}hyr.headers=Ya._getDefaultHeaders(u[fd]),YLi.teenyRequest.defaults(hyr)(c,(m,C,E)=>{Ya.handleResp(m,C,E,(v,T)=>{if(v){e.destroy(v);return}e.emit("response",C),i(T)})})}})}shouldRetryRequest(e){if(e){if([408,429,500,502,503,504].indexOf(e.code)!==-1)return!0;if(e.errors)for(let r of e.errors){let i=r.reason;if(i==="rateLimitExceeded"||i==="userRateLimitExceeded"||i&&i.includes("EAI_AGAIN"))return!0}}return!1}makeAuthenticatedRequestFactory(e){let r={...e};r.projectId===wH&&delete r.projectId;let i;r.authClient instanceof WLi.GoogleAuth?i=r.authClient:i=new WLi.GoogleAuth({...r,authClient:r.authClient,clientOptions:r.clientOptions});function n(o,s){let u,l,c={...e},y;s||(u=(0,Bea.default)(),c.stream=u);let m=typeof s=="object"?s:void 0,C=typeof s=="function"?s:void 0;async function E(){l=await i.getProjectId()}let v=async(Q,N)=>{let M=Q,x=Q&&typeof Q.message=="string"&&Q.message.indexOf("Could not load the default credentials")>-1;if(x&&(N=o),!Q||x)try{N=Ya.decorateRequest(N,l),Q=null}catch(q){if(q instanceof TM.MissingProjectIdError)try{await E(),N=Ya.decorateRequest(N,l),Q=null}catch(U){Q=Q||U}else Q=Q||q}if(Q){u?u.destroy(Q):(m&&m.onAuthenticated?m.onAuthenticated:C)(Q);return}m&&m.onAuthenticated?m.onAuthenticated(null,N):y=Ya.makeRequest(N,c,(q,...U)=>{q&&q.code===401&&M&&(q=M),C(q,...U)})};return(async()=>{try{let Q=async()=>e.projectId&&e.projectId!==wH?e.projectId:e.projectIdRequired===!1?wH:E(),N=async()=>c.customEndpoint&&!c.useAuthWithCustomEndpoint?o:i.authorizeRequest(o),[M,x]=await Promise.all([Q(),N()]);return M&&(l=M),v(null,x)}catch(Q){return v(Q)}})(),u||{abort(){setImmediate(()=>{y&&(y.abort(),y=null)})}}}let a=n;return a.getCredentials=i.getCredentials.bind(i),a.authClient=i,a}makeRequest(e,r,i){var n,a,o,s,u;let l=Izu;r.autoRetry!==void 0?l=r.autoRetry:((n=r.retryOptions)===null||n===void 0?void 0:n.autoRetry)!==void 0&&(l=r.retryOptions.autoRetry);let c=Ezu;r.maxRetries!==void 0?c=r.maxRetries:((a=r.retryOptions)===null||a===void 0?void 0:a.maxRetries)!==void 0&&(c=r.retryOptions.maxRetries),hyr.headers=this._getDefaultHeaders(e[fd]);let y={request:YLi.teenyRequest.defaults(hyr),retries:l!==!1?c:0,noResponseRetries:l!==!1?c:0,shouldRetryFn(v){var T,Q;let N=Ya.parseHttpRespMessage(v).err;return!((T=r.retryOptions)===null||T===void 0)&&T.retryableErrorFn?N&&((Q=r.retryOptions)===null||Q===void 0?void 0:Q.retryableErrorFn(N)):N&&Ya.shouldRetryRequest(N)},maxRetryDelay:(o=r.retryOptions)===null||o===void 0?void 0:o.maxRetryDelay,retryDelayMultiplier:(s=r.retryOptions)===null||s===void 0?void 0:s.retryDelayMultiplier,totalTimeout:(u=r.retryOptions)===null||u===void 0?void 0:u.totalTimeout};if(typeof e.maxRetries=="number"&&(y.retries=e.maxRetries,y.noResponseRetries=e.maxRetries),!r.stream)return(0,JLi.default)(e,y,(v,T,Q)=>{Ya.handleResp(v,T,Q,i)});let m=r.stream,C;return(e.method||"GET").toUpperCase()==="GET"?(C=(0,JLi.default)(e,y),m.setReadable(C)):(C=y.request(e),m.setWritable(C)),C.on("error",m.destroy.bind(m)).on("response",m.emit.bind(m,"response")).on("complete",m.emit.bind(m,"complete")),m.abort=C.abort,m}decorateRequest(e,r){return delete e.autoPaginate,delete e.autoPaginateVal,delete e.objectMode,e.qs!==null&&typeof e.qs=="object"&&(delete e.qs.autoPaginate,delete e.qs.autoPaginateVal,e.qs=(0,TM.replaceProjectIdToken)(e.qs,r)),Array.isArray(e.multipart)&&(e.multipart=e.multipart.map(i=>(0,TM.replaceProjectIdToken)(i,r))),e.json!==null&&typeof e.json=="object"&&(delete e.json.autoPaginate,delete e.json.autoPaginateVal,e.json=(0,TM.replaceProjectIdToken)(e.json,r)),e.uri=(0,TM.replaceProjectIdToken)(e.uri,r),e}isCustomType(e,r){function i(u){return u.constructor&&u.constructor.name.toLowerCase()}let n=r.split("/"),a=n[0]&&n[0].toLowerCase(),o=n[1]&&n[1].toLowerCase();if(o&&i(e)!==o)return!1;let s=e;for(;;){if(i(s)===a)return!0;if(s=s.parent,!s)return!1}}maybeOptionsOrCallback(e,r){return typeof e=="function"?[{},e]:[e,r]}_getDefaultHeaders(e){let r={"User-Agent":Z4(),"x-goog-api-client":`${Y4()} gccl/${Czu.version}-${kD()} gccl-invocation-id/${l0()}`};return e&&(r["x-goog-api-client"]+=` gccl-gcs-cmd/${e}`),r}},XLi=class extends vea.Transform{constructor(){super(...arguments),this.bytesRead=0}_transform(e,r,i){this.bytesRead+=e.length,this.emit("progress",{bytesWritten:this.bytesRead,contentLength:"*"}),this.push(e),i()}},Ya=new $Li;var wH="{{projectId}}",tne=class t{constructor(e,r={}){this.baseUrl=e.baseUrl,this.apiEndpoint=e.apiEndpoint,this.timeout=r.timeout,this.globalInterceptors=Array.isArray(r.interceptors_)?r.interceptors_:[],this.interceptors=[],this.packageJson=e.packageJson,this.projectId=r.projectId||wH,this.projectIdRequired=e.projectIdRequired!==!1,this.providedUserAgent=r.userAgent,this.universeDomain=r.universeDomain||wea.DEFAULT_UNIVERSE,this.customEndpoint=e.customEndpoint||!1,this.makeAuthenticatedRequest=Ya.makeAuthenticatedRequestFactory({...e,projectIdRequired:this.projectIdRequired,projectId:this.projectId,authClient:r.authClient||e.authClient,credentials:r.credentials,keyFile:r.keyFilename,email:r.email,clientOptions:{universeDomain:r.universeDomain,...r.clientOptions}}),this.authClient=this.makeAuthenticatedRequest.authClient,!!process.env.FUNCTION_NAME&&this.interceptors.push({request(n){return n.forever=!1,n}})}getRequestInterceptors(){return[].slice.call(this.globalInterceptors).concat(this.interceptors).filter(e=>typeof e.request=="function").map(e=>e.request)}getProjectId(e){if(!e)return this.getProjectIdAsync();this.getProjectIdAsync().then(r=>e(null,r),e)}async getProjectIdAsync(){let e=await this.authClient.getProjectId();return this.projectId===wH&&e&&(this.projectId=e),this.projectId}request_(e,r){e={...e,timeout:this.timeout};let i=e.uri.indexOf("http")===0,n=[this.baseUrl];this.projectIdRequired&&(e.projectId?(n.push("projects"),n.push(e.projectId)):(n.push("projects"),n.push(this.projectId))),n.push(e.uri),i&&n.splice(0,n.indexOf(e.uri)),e.uri=n.map(l=>{let c=/^\/*|\/*$/g;return l.replace(c,"")}).join("/").replace(/\/:/g,":");let a=this.getRequestInterceptors();(Array.isArray(e.interceptors_)?e.interceptors_:[]).forEach(l=>{typeof l.request=="function"&&a.push(l.request)}),a.forEach(l=>{e=l(e)}),delete e.interceptors_;let s=this.packageJson,u=Z4();if(this.providedUserAgent&&(u=`${this.providedUserAgent} ${u}`),e.headers={...e.headers,"User-Agent":u,"x-goog-api-client":`${Y4()} gccl/${s.version}-${kD()} gccl-invocation-id/${l0()}`},e[fd]&&(e.headers["x-goog-api-client"]+=` gccl-gcs-cmd/${e[fd]}`),e.shouldReturnStream)return this.makeAuthenticatedRequest(e);this.makeAuthenticatedRequest(e,r)}request(e,r){t.prototype.request_.call(this,e,r)}requestStream(e){let r={...e,shouldReturnStream:!0};return t.prototype.request_.call(this,r)}};var Tea=Ot(gp(),1),_ea=require("events");var $f=class t extends _ea.EventEmitter{constructor(e){super(),this.metadata={},this.baseUrl=e.baseUrl,this.parent=e.parent,this.id=e.id,this.createMethod=e.createMethod,this.methods=e.methods||{},this.interceptors=[],this.projectId=e.projectId,e.methods&&Object.getOwnPropertyNames(t.prototype).filter(r=>!/^request/.test(r)&&!/^getRequestInterceptors/.test(r)&&this[r]===t.prototype[r]&&!e.methods[r]).forEach(r=>{this[r]=void 0})}create(e,r){let i=this,n=[this.id];typeof e=="function"&&(r=e),typeof e=="object"&&n.push(e);function a(...o){let[s,u]=o;s||(i.metadata=u.metadata,i.id&&u.metadata&&(i.id=u.metadata.id),o[1]=i),r(...o)}n.push(a),this.createMethod.apply(null,n)}delete(e,r){var i;let[n,a]=Ya.maybeOptionsOrCallback(e,r),o=n.ignoreNotFound;delete n.ignoreNotFound;let s=typeof this.methods.delete=="object"&&this.methods.delete||{},u={method:"DELETE",uri:"",...s.reqOpts,qs:{...(i=s.reqOpts)===null||i===void 0?void 0:i.qs,...n}};t.prototype.request.call(this,u,(l,c,y)=>{l&&l.code===404&&o&&(l=null),a(l,y)})}exists(e,r){let[i,n]=Ya.maybeOptionsOrCallback(e,r);this.get(i,a=>{if(a){a.code===404?n(null,!1):n(a);return}n(null,!0)})}get(e,r){let i=this,[n,a]=Ya.maybeOptionsOrCallback(e,r),o=Object.assign({},n),s=o.autoCreate&&typeof this.create=="function";delete o.autoCreate;function u(l,c,y){if(l){if(l.code===409){i.get(o,a);return}a(l,null,y);return}a(null,c,y)}this.getMetadata(o,(l,c)=>{if(l){if(l.code===404&&s){let y=[];Object.keys(o).length>0&&y.push(o),y.push(u),i.create(...y);return}a(l,null,c);return}a(null,i,c)})}getMetadata(e,r){var i;let[n,a]=Ya.maybeOptionsOrCallback(e,r),o=typeof this.methods.getMetadata=="object"&&this.methods.getMetadata||{},s={uri:"",...o.reqOpts,qs:{...(i=o.reqOpts)===null||i===void 0?void 0:i.qs,...n}};t.prototype.request.call(this,s,(u,l,c)=>{this.metadata=l,a(u,this.metadata,c)})}getRequestInterceptors(){let e=this.interceptors.filter(r=>typeof r.request=="function").map(r=>r.request);return this.parent.getRequestInterceptors().concat(e)}setMetadata(e,r,i){var n,a;let[o,s]=Ya.maybeOptionsOrCallback(r,i),u=typeof this.methods.setMetadata=="object"&&this.methods.setMetadata||{},l={method:"PATCH",uri:"",...u.reqOpts,json:{...(n=u.reqOpts)===null||n===void 0?void 0:n.json,...e},qs:{...(a=u.reqOpts)===null||a===void 0?void 0:a.qs,...o}};t.prototype.request.call(this,l,(c,y,m)=>{this.metadata=y,s(c,this.metadata,m)})}request_(e,r){e={...e},this.projectId&&(e.projectId=this.projectId);let i=e.uri.indexOf("http")===0,n=[this.baseUrl,this.id||"",e.uri];i&&n.splice(0,n.indexOf(e.uri)),e.uri=n.filter(s=>s.trim()).map(s=>{let u=/^\/*|\/*$/g;return s.replace(u,"")}).join("/");let a=Array.isArray(e.interceptors_)?e.interceptors_:[],o=[].slice.call(this.interceptors);if(e.interceptors_=a.concat(o),e.shouldReturnStream)return this.parent.requestStream(e);this.parent.request(e,r)}request(e,r){this.request_(e,r)}requestStream(e){let r={...e,shouldReturnStream:!0};return this.request_(r)}};(0,Tea.promisifyAll)($f,{exclude:["getRequestInterceptors"]});var wyr=Ot(Rie(),1),lta=Ot(gp(),1),lUi=require("stream");var uUi=Ot(Rie(),1),eta=Ot(gp(),1),tta=Ot(require("fs"),1),rta=Ot(aoe(),1),ita=Ot(require("path"),1),aUi=Ot(wie(),1),oUi=require("util"),nta=Ot(a5(),1);var Dea=Ot(gp(),1),TH=class t{constructor(){this.owners={},this.readers={},this.writers={},this.owners={},this.readers={},this.writers={},t.roles.forEach(this._assignAccessMethods.bind(this))}_assignAccessMethods(e){let r=t.accessMethods,i=t.entities,n=e.toLowerCase()+"s";this[n]=i.reduce((a,o)=>{let s=o.charAt(o.length-1)==="-";return r.forEach(u=>{let l=u+o[0].toUpperCase()+o.substring(1);s&&(l=l.replace("-","")),a[l]=(c,y,m)=>{let C;typeof y=="function"&&(m=y,y={}),s?C=o+c:(C=o,m=c),y=Object.assign({entity:C,role:e},y);let E=[y];return typeof m=="function"&&E.push(m),this[u].apply(this,E)}}),a},{})}};TH.accessMethods=["add","delete"];TH.entities=["allAuthenticatedUsers","allUsers","domain-","group-","project-","user-"];TH.roles=["OWNER","READER","WRITER"];var qD=class extends TH{constructor(e){super(),this.pathPrefix=e.pathPrefix,this.request_=e.request}add(e,r){let i={};e.generation&&(i.generation=e.generation),e.userProject&&(i.userProject=e.userProject),this.request({method:"POST",uri:"",qs:i,maxRetries:0,json:{entity:e.entity,role:e.role.toUpperCase()}},(n,a)=>{if(n){r(n,null,a);return}r(null,this.makeAclObject_(a),a)})}delete(e,r){let i={};e.generation&&(i.generation=e.generation),e.userProject&&(i.userProject=e.userProject),this.request({method:"DELETE",uri:"/"+encodeURIComponent(e.entity),qs:i},(n,a)=>{r(n,a)})}get(e,r){let i=typeof e=="object"?e:null,n=typeof e=="function"?e:r,a="",o={};i&&(a="/"+encodeURIComponent(i.entity),i.generation&&(o.generation=i.generation),i.userProject&&(o.userProject=i.userProject)),this.request({uri:a,qs:o},(s,u)=>{if(s){n(s,null,u);return}let l;u.items?l=u.items.map(this.makeAclObject_):l=this.makeAclObject_(u),n(null,l,u)})}update(e,r){let i={};e.generation&&(i.generation=e.generation),e.userProject&&(i.userProject=e.userProject),this.request({method:"PUT",uri:"/"+encodeURIComponent(e.entity),qs:i,json:{role:e.role.toUpperCase()}},(n,a)=>{if(n){r(n,null,a);return}r(null,this.makeAclObject_(a),a)})}makeAclObject_(e){let r={entity:e.entity,role:e.role};return e.projectTeam&&(r.projectTeam=e.projectTeam),r}request(e,r){e.uri=this.pathPrefix+e.uri,this.request_(e,r)}};(0,Dea.promisifyAll)(qD,{exclude:["request"]});var Vea=Ot(gp(),1),Kea=Ot(Cji(),1),Wea=Ot(require("crypto"),1),vyr=Ot(require("fs"),1),Jea=Ot(Iji(),1);var Pea=Ot(IZ(),1),Qea=require("crypto"),vzu=Ot(qR(),1),_M=Ot(If(),1),byr=require("stream"),Oea=Ot(a5(),1);pM();var Nea=Ot(RH(),1),Szu=function(t,e,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(t,r):n?n.value=r:e.set(t,r),r},d0=function(t,e,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(t):i?i.value:e.get(t)},C5,I5,rne,fyr,Bzu=404,yyr=308,eUi=(0,Nea.getPackageJSON)(),Rzu=/^(\w*):\/\//,myr=class extends byr.Writable{constructor(e){var r;if(super(e),C5.add(this),this.numBytesWritten=0,this.numRetries=0,this.currentInvocationId={checkUploadStatus:l0(),chunk:l0(),uri:l0()},this.writeBuffers=[],this.numChunksReadInRequest=0,this.localWriteCache=[],this.localWriteCacheByteLength=0,this.upstreamEnded=!1,I5.set(this,void 0),e=e||{},!e.bucket||!e.file)throw new Error("A bucket and file name are required");if(e.offset&&!e.uri)throw new RangeError("Cannot provide an `offset` without providing a `uri`");if(e.isPartialUpload&&!e.chunkSize)throw new RangeError("Cannot set `isPartialUpload` without providing a `chunkSize`");e.authConfig=e.authConfig||{},e.authConfig.scopes=["https://www.googleapis.com/auth/devstorage.full_control"],this.authClient=e.authClient||new _M.GoogleAuth(e.authConfig);let i=e.universeDomain||_M.DEFAULT_UNIVERSE;if(this.apiEndpoint=`https://storage.${i}`,e.apiEndpoint&&e.apiEndpoint!==this.apiEndpoint){this.apiEndpoint=this.sanitizeEndpoint(e.apiEndpoint);let s=new URL(this.apiEndpoint).hostname,u=s===i,l=s===_M.DEFAULT_UNIVERSE,c=s.slice(-(i.length+1))===`.${i}`,y=s.slice(-(_M.DEFAULT_UNIVERSE.length+1))===`.${_M.DEFAULT_UNIVERSE}`;!u&&!l&&!c&&!y&&(this.authClient=vzu)}this.baseURI=`${this.apiEndpoint}/upload/storage/v1/b`,this.bucket=e.bucket;let n=[e.bucket,e.file];if(typeof e.generation=="number"&&n.push(`${e.generation}`),this.cacheKey=n.join("/"),this.customRequestOptions=e.customRequestOptions||{},this.file=e.file,this.generation=e.generation,this.kmsKeyName=e.kmsKeyName,this.metadata=e.metadata||{},this.offset=e.offset,this.origin=e.origin,this.params=e.params||{},this.userProject=e.userProject,this.chunkSize=e.chunkSize,this.retryOptions=e.retryOptions,this.isPartialUpload=(r=e.isPartialUpload)!==null&&r!==void 0?r:!1,e.key){let s=Buffer.from(e.key).toString("base64");this.encryption={key:s,hash:(0,Qea.createHash)("sha256").update(e.key).digest("base64")}}this.predefinedAcl=e.predefinedAcl,e.private&&(this.predefinedAcl="private"),e.public&&(this.predefinedAcl="publicRead");let a=e.retryOptions.autoRetry;this.uriProvidedManually=!!e.uri,this.uri=e.uri,this.offset&&(this.numBytesWritten=this.offset),this.numRetries=0,a||(e.retryOptions.maxRetries=0),this.timeOfFirstRequest=Date.now();let o=e.metadata?Number(e.metadata.contentLength):NaN;this.contentLength=isNaN(o)?"*":o,Szu(this,I5,e[fd],"f"),this.once("writing",()=>{this.uri?this.continueUploading():this.createURI(s=>{if(s)return this.destroy(s);this.startUploading()})})}_final(e=()=>{}){this.upstreamEnded=!0,this.once("uploadFinished",e),process.nextTick(()=>{this.emit("upstreamFinished"),this.emit("writing")})}_write(e,r,i=()=>{}){this.emit("writing"),this.writeBuffers.push(typeof e=="string"?Buffer.from(e,r):e),this.once("readFromChunkBuffer",i),process.nextTick(()=>this.emit("wroteToChunkBuffer"))}prependLocalBufferToUpstream(e){let r=[];if(e){let n=0;for(;e>n;){let a=this.localWriteCache.pop();if(!a)break;if(n+=a.byteLength,n>e){let o=n-e;a=a.subarray(o),n-=o}r.unshift(a)}}else r=this.localWriteCache;let i=this.writeBuffers;this.writeBuffers=r;for(let n of i)this.writeBuffers.push(n);d0(this,C5,"m",rne).call(this)}*pullFromChunkBuffer(e){for(;e;){let r=this.writeBuffers.shift();if(!r)break;let i=r;r.byteLength>e?(i=r.subarray(0,e),this.writeBuffers.unshift(r.subarray(e)),e=0):e-=r.byteLength,yield i,this.emit("readFromChunkBuffer")}}async waitForNextChunk(){return await new Promise(r=>{if(this.writeBuffers.length)return r(!0);if(this.upstreamEnded)return r(!1);let i=()=>(a(),r(!0)),n=()=>(a(),this.writeBuffers.length?r(!0):r(!1)),a=()=>{this.removeListener("wroteToChunkBuffer",i),this.removeListener("upstreamFinished",n)};this.once("wroteToChunkBuffer",i),this.once("upstreamFinished",n)})}async*upstreamIterator(e=1/0){for(;e&&await this.waitForNextChunk();)for(let r of this.pullFromChunkBuffer(e))e-=r.byteLength,yield r}createURI(e){if(!e)return this.createURIAsync();this.createURIAsync().then(r=>e(null,r),e)}async createURIAsync(){let e={...this.metadata},r={};e.contentLength&&(r["X-Upload-Content-Length"]=e.contentLength.toString(),delete e.contentLength),e.contentType&&(r["X-Upload-Content-Type"]=e.contentType,delete e.contentType);let i=`${Y4()} gccl/${eUi.version}-${kD()} gccl-invocation-id/${this.currentInvocationId.uri}`;d0(this,I5,"f")&&(i+=` gccl-gcs-cmd/${d0(this,I5,"f")}`);let n={method:"POST",url:[this.baseURI,this.bucket,"o"].join("/"),params:Object.assign({name:this.file,uploadType:"resumable"},this.params),data:e,headers:{"User-Agent":Z4(),"x-goog-api-client":i,...r}};e.contentLength&&(n.headers["X-Upload-Content-Length"]=e.contentLength.toString()),e.contentType&&(n.headers["X-Upload-Content-Type"]=e.contentType),typeof this.generation<"u"&&(n.params.ifGenerationMatch=this.generation),this.kmsKeyName&&(n.params.kmsKeyName=this.kmsKeyName),this.predefinedAcl&&(n.params.predefinedAcl=this.predefinedAcl),this.origin&&(n.headers.Origin=this.origin);let a=await(0,Oea.default)(async o=>{var s,u,l;try{let c=await this.makeRequest(n);return this.currentInvocationId.uri=l0(),c.headers.location}catch(c){let y=c,m={code:(s=y.response)===null||s===void 0?void 0:s.status,name:(u=y.response)===null||u===void 0?void 0:u.statusText,message:(l=y.response)===null||l===void 0?void 0:l.statusText,errors:[{reason:y.code}]};if(this.retryOptions.maxRetries>0&&this.retryOptions.retryableErrorFn(m))throw y;return o(y)}},{retries:this.retryOptions.maxRetries,factor:this.retryOptions.retryDelayMultiplier,maxTimeout:this.retryOptions.maxRetryDelay*1e3,maxRetryTime:this.retryOptions.totalTimeout*1e3});return this.uri=a,this.offset=0,this.emit("uri",a),a}async continueUploading(){var e;return(e=this.offset)!==null&&e!==void 0||await this.getAndSetOffset(),this.startUploading()}async startUploading(){let e=!!this.chunkSize,r=!1;if(this.numChunksReadInRequest=0,this.offset||(this.offset=0),this.offset<this.numBytesWritten){let l=this.numBytesWritten-this.offset,c=`The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${l} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`;this.emit("error",new RangeError(c));return}if(this.numBytesWritten<this.offset){let l=this.offset-this.numBytesWritten;for await(let c of this.upstreamIterator(l));this.numBytesWritten=this.offset}let i;typeof this.contentLength=="number"&&(i=this.contentLength-this.numBytesWritten),this.chunkSize&&(i=i?Math.min(this.chunkSize,i):this.chunkSize);let n=this.upstreamIterator(i),a=new byr.Readable({read:async()=>{r&&a.push(null);let l=await n.next();l.value&&(this.numChunksReadInRequest++,e?d0(this,C5,"m",fyr).call(this,l.value):(d0(this,C5,"m",rne).call(this),d0(this,C5,"m",fyr).call(this,l.value)),this.numBytesWritten+=l.value.byteLength,this.emit("progress",{bytesWritten:this.numBytesWritten,contentLength:this.contentLength}),a.push(l.value)),l.done&&a.push(null)}}),o=`${Y4()} gccl/${eUi.version}-${kD()} gccl-invocation-id/${this.currentInvocationId.chunk}`;d0(this,I5,"f")&&(o+=` gccl-gcs-cmd/${d0(this,I5,"f")}`);let s={"User-Agent":Z4(),"x-goog-api-client":o};if(e){for await(let C of this.upstreamIterator(i))d0(this,C5,"m",fyr).call(this,C);let l=this.localWriteCacheByteLength,c=!await this.waitForNextChunk();this.prependLocalBufferToUpstream();let y=this.contentLength;typeof this.contentLength!="number"&&c&&!this.isPartialUpload&&(y=l+this.numBytesWritten);let m=l+this.numBytesWritten-1;s["Content-Length"]=l,s["Content-Range"]=`bytes ${this.offset}-${m}/${y}`}else s["Content-Range"]=`bytes ${this.offset}-*/${this.contentLength}`;let u={method:"PUT",url:this.uri,headers:s,body:a};try{let l=await this.makeRequestStream(u);l&&(r=!0,await this.responseHandler(l))}catch(l){let c=l;if(this.retryOptions.retryableErrorFn(c)){this.attemptDelayedRetry({status:NaN,data:c});return}this.destroy(c)}}async responseHandler(e){if(e.data.error){this.destroy(e.data.error);return}this.currentInvocationId.chunk=l0();let r=await this.waitForNextChunk(),i=this.chunkSize&&e.status===yyr&&e.headers.range&&r,n=this.isPartialUpload&&e.status===yyr&&!r;if(i){let a=e.headers.range;this.offset=Number(a.split("-")[1])+1;let o=this.numBytesWritten-this.offset;o?(this.prependLocalBufferToUpstream(o),this.numBytesWritten-=o):d0(this,C5,"m",rne).call(this),this.continueUploading()}else if(!this.isSuccessfulResponse(e.status)&&!n){let a=new Error("Upload failed");a.code=e.status,a.name="Upload failed",e?.data&&(a.errors=[e?.data]),this.destroy(a)}else d0(this,C5,"m",rne).call(this),e&&e.data&&(e.data.size=Number(e.data.size)),this.emit("metadata",e.data),this.emit("uploadFinished")}async checkUploadStatus(e={}){let r=`${Y4()} gccl/${eUi.version}-${kD()} gccl-invocation-id/${this.currentInvocationId.checkUploadStatus}`;d0(this,I5,"f")&&(r+=` gccl-gcs-cmd/${d0(this,I5,"f")}`);let i={method:"PUT",url:this.uri,headers:{"Content-Length":0,"Content-Range":"bytes */*","User-Agent":Z4(),"x-goog-api-client":r}};try{let n=await this.makeRequest(i);return this.currentInvocationId.checkUploadStatus=l0(),n}catch(n){if(e.retry===!1||!(n instanceof Error)||!this.retryOptions.retryableErrorFn(n))throw n;let a=this.getRetryDelay();if(a<=0)throw n;return await new Promise(o=>setTimeout(o,a)),this.checkUploadStatus(e)}}async getAndSetOffset(){try{let e=await this.checkUploadStatus({retry:!1});if(e.status===yyr&&typeof e.headers.range=="string"){this.offset=Number(e.headers.range.split("-")[1])+1;return}this.offset=0}catch(e){let r=e;if(this.retryOptions.retryableErrorFn(r)){this.attemptDelayedRetry({status:NaN,data:r});return}this.destroy(r)}}async makeRequest(e){this.encryption&&(e.headers=e.headers||{},e.headers["x-goog-encryption-algorithm"]="AES256",e.headers["x-goog-encryption-key"]=this.encryption.key.toString(),e.headers["x-goog-encryption-key-sha256"]=this.encryption.hash.toString()),this.userProject&&(e.params=e.params||{},e.params.userProject=this.userProject),e.validateStatus=n=>this.isSuccessfulResponse(n)||n===yyr;let r={...this.customRequestOptions,...e,headers:{...this.customRequestOptions.headers,...e.headers}},i=await this.authClient.request(r);if(i.data&&i.data.error)throw i.data.error;return i}async makeRequestStream(e){let r=new Pea.default,i=()=>r.abort();this.once("error",i),this.userProject&&(e.params=e.params||{},e.params.userProject=this.userProject),e.signal=r.signal,e.validateStatus=()=>!0;let n={...this.customRequestOptions,...e,headers:{...this.customRequestOptions.headers,...e.headers}},a=await this.authClient.request(n),o=this.onResponse(a);return this.removeListener("error",i),o?a:null}onResponse(e){return e.status!==200&&this.retryOptions.retryableErrorFn({code:e.status,message:e.statusText,name:e.statusText})?(this.attemptDelayedRetry(e),!1):(this.emit("response",e),!0)}attemptDelayedRetry(e){if(this.numRetries<this.retryOptions.maxRetries){if(e.status===Bzu&&this.numChunksReadInRequest===0)this.startUploading();else{let r=this.getRetryDelay();if(r<=0){this.destroy(new Error(`Retry total time limit exceeded - ${e.data}`));return}this.numBytesWritten-=this.localWriteCacheByteLength,this.prependLocalBufferToUpstream(),this.offset=void 0,setTimeout(this.continueUploading.bind(this),r)}this.numRetries++}else this.destroy(new Error("Retry limit exceeded - "+e.data))}getRetryDelay(){let e=Math.round(Math.random()*1e3),r=Math.pow(this.retryOptions.retryDelayMultiplier,this.numRetries)*1e3+e,i=this.retryOptions.totalTimeout*1e3-(Date.now()-this.timeOfFirstRequest),n=this.retryOptions.maxRetryDelay*1e3;return Math.min(r,n,i)}sanitizeEndpoint(e){return Rzu.test(e)||(e=`https://${e}`),e.replace(/\/+$/,"")}isSuccessfulResponse(e){return e>=200&&e<300}};I5=new WeakMap,C5=new WeakSet,rne=function(){this.localWriteCache=[],this.localWriteCacheByteLength=0},fyr=function(e){this.localWriteCache.push(e),this.localWriteCacheByteLength+=e.byteLength};function Mea(t){return new myr(t)}function xea(t,e){let r=new myr(t);if(!e)return r.createURI();r.createURI().then(i=>e(null,i),e)}var DH=require("stream"),Byr=Ot(require("zlib"),1);var qea=Ot(require("crypto"),1),tUi=Ot(require("url"),1);var ine;(function(t){t.ACCESSIBLE_DATE_INVALID="The accessible at date provided was invalid.",t.EXPIRATION_BEFORE_ACCESSIBLE_DATE="An expiration date cannot be before accessible date.",t.X_GOOG_CONTENT_SHA256="The header X-Goog-Content-SHA256 must be a hexadecimal string."})(ine||(ine={}));var Tzu="v2",kea=7*24*60*60;var _H=class{constructor(e,r,i,n=new XC){this.auth=e,this.bucket=r,this.file=i,this.storage=n}getSignedUrl(e){let r=this.parseExpires(e.expires),i=e.method,n=this.parseAccessibleAt(e.accessibleAt);if(r<n)throw new Error(ine.EXPIRATION_BEFORE_ACCESSIBLE_DATE);let a,o=e.virtualHostedStyle||!1;e.cname?a=e.cname:o&&(a=`https://${this.bucket.name}.storage.${this.storage.universeDomain}`);let s=1e3,u=Object.assign({},e,{method:i,expiration:r,accessibleAt:new Date(s*n),bucket:this.bucket.name,file:this.file?ene(this.file.name,!1):void 0});a&&(u.cname=a);let l=e.version||Tzu,c;if(l==="v2")c=this.getSignedUrlV2(u);else if(l==="v4")c=this.getSignedUrlV4(u);else throw new Error(`Invalid signed URL version: ${l}. Supported versions are 'v2' and 'v4'.`);return c.then(y=>{var m;y=Object.assign(y,e.queryParams);let C=new tUi.URL(((m=e.host)===null||m===void 0?void 0:m.toString())||u.cname||this.storage.apiEndpoint);return C.pathname=this.getResourcePath(!!u.cname,this.bucket.name,u.file),C.search=Cea(y),C.href})}getSignedUrlV2(e){let r=this.getCanonicalHeaders(e.extensionHeaders||{}),i=this.getResourcePath(!1,e.bucket,e.file),n=[e.method,e.contentMd5||"",e.contentType||"",e.expiration,r+i].join(`
|
|
1266
1266
|
`);return(async()=>{var o;let s=this.auth;try{let u=await s.sign(n,(o=e.signingEndpoint)===null||o===void 0?void 0:o.toString());return{GoogleAccessId:(await s.getCredentials()).client_email,Expires:e.expiration,Signature:u}}catch(u){let l=u,c=new DM(l.message);throw c.stack=l.stack,c}})()}getSignedUrlV4(e){var r;e.accessibleAt=e.accessibleAt?e.accessibleAt:new Date;let i=1/1e3,n=e.expiration-e.accessibleAt.valueOf()*i;if(n>kea)throw new Error(`Max allowed expiration is seven days (${kea} seconds).`);let a=Object.assign({},e.extensionHeaders),o=new tUi.URL(((r=e.host)===null||r===void 0?void 0:r.toString())||e.cname||this.storage.apiEndpoint);a.host=o.hostname,e.contentMd5&&(a["content-md5"]=e.contentMd5),e.contentType&&(a["content-type"]=e.contentType);let s,u=a["x-goog-content-sha256"];if(u){if(typeof u!="string"||!/[A-Fa-f0-9]{40}/.test(u))throw new Error(ine.X_GOOG_CONTENT_SHA256);s=u}let l=Object.keys(a).map(E=>E.toLowerCase()).sort().join(";"),c=this.getCanonicalHeaders(a),m=`${wM(e.accessibleAt)}/auto/storage/goog4_request`;return(async()=>{var E;let T=`${(await this.auth.getCredentials()).client_email}/${m}`,Q=wM(e.accessibleAt?e.accessibleAt:new Date,!0),N={"X-Goog-Algorithm":"GOOG4-RSA-SHA256","X-Goog-Credential":T,"X-Goog-Date":Q,"X-Goog-Expires":n.toString(10),"X-Goog-SignedHeaders":l,...e.queryParams||{}},M=this.getCanonicalQueryParams(N),x=this.getCanonicalRequest(e.method,this.getResourcePath(!!e.cname,e.bucket,e.file),M,c,l,s),q=qea.createHash("sha256").update(x).digest("hex"),U=["GOOG4-RSA-SHA256",Q,m,q].join(`
|