@coalescesoftware/coa 7.18.2 → 7.18.3
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/coa.js
CHANGED
|
@@ -176,7 +176,7 @@ Content-Type: `+c.contentType+`\r
|
|
|
176
176
|
${this.customData.serverResponse}`:this.message=this._baseMessage}};(function(r){r.UNKNOWN="unknown",r.OBJECT_NOT_FOUND="object-not-found",r.BUCKET_NOT_FOUND="bucket-not-found",r.PROJECT_NOT_FOUND="project-not-found",r.QUOTA_EXCEEDED="quota-exceeded",r.UNAUTHENTICATED="unauthenticated",r.UNAUTHORIZED="unauthorized",r.UNAUTHORIZED_APP="unauthorized-app",r.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",r.INVALID_CHECKSUM="invalid-checksum",r.CANCELED="canceled",r.INVALID_EVENT_NAME="invalid-event-name",r.INVALID_URL="invalid-url",r.INVALID_DEFAULT_BUCKET="invalid-default-bucket",r.NO_DEFAULT_BUCKET="no-default-bucket",r.CANNOT_SLICE_BLOB="cannot-slice-blob",r.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",r.NO_DOWNLOAD_URL="no-download-url",r.INVALID_ARGUMENT="invalid-argument",r.INVALID_ARGUMENT_COUNT="invalid-argument-count",r.APP_DELETED="app-deleted",r.INVALID_ROOT_OPERATION="invalid-root-operation",r.INVALID_FORMAT="invalid-format",r.INTERNAL_ERROR="internal-error",r.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(of||(of={}));WC=class r{constructor(t,n){this.bucket=t,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){let t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,n){let i;try{i=r.makeFromUrl(t,n)}catch{return new r(t,"")}if(i.path==="")return i;throw I$a(t)}static makeFromUrl(t,n){let i=null,o="([A-Za-z0-9.\\-_]+)";function s(R){R.path.charAt(R.path.length-1)==="/"&&(R.path_=R.path_.slice(0,-1))}let a="(/(.*))?$",l=new RegExp("^gs://"+o+a,"i"),u={bucket:1,path:3};function c(R){R.path_=decodeURIComponent(R.path)}let d="v[A-Za-z0-9_]+",p=n.replace(/[.]/g,"\\."),f="(/([^?#]*).*)?$",A=new RegExp(`^https?://${p}/${d}/b/${o}/o${f}`,"i"),h={bucket:1,path:3},y=n===rci?"(?:storage.googleapis.com|storage.cloud.google.com)":n,C="([^?#]*)",v=new RegExp(`^https?://${y}/${o}/${C}`,"i"),w=[{regex:l,indices:u,postModify:s},{regex:A,indices:h,postModify:c},{regex:v,indices:{bucket:1,path:2},postModify:c}];for(let R=0;R<w.length;R++){let P=w[R],z=P.regex.exec(t);if(z){let H=z[P.indices.bucket],J=z[P.indices.path];J||(J=""),i=new r(H,J),P.postModify(i);break}}if(i==null)throw C$a(t);return i}},O3r=class{constructor(t){this.promise_=Promise.reject(t)}getPromise(){return this.promise_}cancel(t=!1){}};(function(r){r[r.NO_ERROR=0]="NO_ERROR",r[r.NETWORK_ERROR=1]="NETWORK_ERROR",r[r.ABORT=2]="ABORT"})(ple||(ple={}));w3r=class{constructor(t,n,i,o,s,a,l,u,c,d,p,f=!0){this.url_=t,this.method_=n,this.headers_=i,this.body_=o,this.successCodes_=s,this.additionalRetryCodes_=a,this.callback_=l,this.errorCallback_=u,this.timeout_=c,this.progressCallback_=d,this.connectionFactory_=p,this.retry=f,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((A,h)=>{this.resolve_=A,this.reject_=h,this.start_()})}start_(){let t=(i,o)=>{if(o){i(!1,new Jye(!1,null,!0));return}let s=this.connectionFactory_();this.pendingConnection_=s;let a=l=>{let u=l.loaded,c=l.lengthComputable?l.total:-1;this.progressCallback_!==null&&this.progressCallback_(u,c)};this.progressCallback_!==null&&s.addUploadProgressListener(a),s.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&s.removeUploadProgressListener(a),this.pendingConnection_=null;let l=s.getErrorCode()===ple.NO_ERROR,u=s.getStatus();if(!l||cci(u,this.additionalRetryCodes_)&&this.retry){let d=s.getErrorCode()===ple.ABORT;i(!1,new Jye(!1,null,d));return}let c=this.successCodes_.indexOf(u)!==-1;i(!0,new Jye(c,s))})},n=(i,o)=>{let s=this.resolve_,a=this.reject_,l=o.connection;if(o.wasSuccessCode)try{let u=this.callback_(l,l.getResponse());w$a(u)?s(u):s()}catch(u){a(u)}else if(l!==null){let u=M3r();u.serverResponse=l.getErrorText(),this.errorCallback_?a(this.errorCallback_(l,u)):a(u)}else if(o.canceled){let u=this.appDelete_?aci():oci();a(u)}else{let u=ici();a(u)}};this.canceled_?n(!1,new Jye(!1,null,!0)):this.backoffId_=O$a(t,n,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&T$a(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}},Jye=class{constructor(t,n,i){this.wasSuccessCode=t,this.connection=n,this.canceled=!!i}};L_={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},qLe=class{constructor(t,n){this.data=t,this.contentType=n||null}};Vht=class{constructor(t){this.base64=!1,this.contentType=null;let n=t.match(/^data:([^,]+)?,/);if(n===null)throw Xye(L_.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");let i=n[1]||null;i!=null&&(this.base64=j$a(i,";base64"),this.contentType=this.base64?i.substring(0,i.length-7):i),this.rest=t.substring(t.indexOf(",")+1)}};$ye=class r{constructor(t,n){let i=0,o="";Kli(t)?(this.data_=t,i=t.size,o=t.type):t instanceof ArrayBuffer?(n?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),i=this.data_.length):t instanceof Uint8Array&&(n?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),i=t.length),this.size_=i,this.type_=o}size(){return this.size_}type(){return this.type_}slice(t,n){if(Kli(this.data_)){let i=this.data_,o=L$a(i,t,n);return o===null?null:new r(o)}else{let i=new Uint8Array(this.data_.buffer,t,n-t);return new r(i,!0)}}static getBlob(...t){if(N3r()){let n=t.map(i=>i instanceof r?i.data_:i);return new r(Q$a.apply(null,n))}else{let n=t.map(a=>Kht(a)?P3r(L_.RAW,a).data:a.data_),i=0;n.forEach(a=>{i+=a.byteLength});let o=new Uint8Array(i),s=0;return n.forEach(a=>{for(let l=0;l<a.length;l++)o[s++]=a[l]}),new r(o,!0)}}uploadData(){return this.data_}};hE=class{constructor(t,n,i,o){this.server=t,this.local=n||t,this.writable=!!i,this.xform=o||H$a}},Hht=null;Jli="prefixes",Xli="items";ZT=class{constructor(t,n,i,o){this.url=t,this.method=n,this.handler=i,this.timeout=o,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}};Zye=class{constructor(t,n,i,o){this.current=t,this.total=n,this.finalized=!!i,this.metadata=o||null}};$li=256*1024;gci={STATE_CHANGED:"state_changed"},Z3={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};R3r=class{constructor(t,n,i){if(R$a(t)||n!=null||i!=null)this.next=t,this.error=n??void 0,this.complete=i??void 0;else{let s=t;this.next=s.next,this.error=s.error,this.complete=s.complete}}};Zli=null,Yht=class{constructor(){this.errorText_="",this.sent_=!1,this.fetch_=tci.fetch,this.errorCode_=ple.NO_ERROR}async send(t,n,i,o){if(this.sent_)throw Kye("cannot .send() more than once");this.sent_=!0;try{let s=await this.fetch_(t,{method:n,headers:o||{},body:i});this.headers_=s.headers,this.statusCode_=s.status,this.errorCode_=ple.NO_ERROR,this.body_=await s.arrayBuffer()}catch(s){this.errorText_=s?.message,this.statusCode_=0,this.errorCode_=ple.NETWORK_ERROR}}getErrorCode(){if(this.errorCode_===void 0)throw Kye("cannot .getErrorCode() before receiving response");return this.errorCode_}getStatus(){if(this.statusCode_===void 0)throw Kye("cannot .getStatus() before receiving response");return this.statusCode_}getErrorText(){return this.errorText_}abort(){}getResponseHeader(t){if(!this.headers_)throw Kye("cannot .getResponseHeader() before receiving response");return this.headers_.get(t)}addUploadProgressListener(t){}removeUploadProgressListener(t){}},B3r=class extends Yht{getResponse(){if(!this.body_)throw Kye("cannot .getResponse() before receiving response");return Buffer.from(this.body_).toString("utf-8")}};x3r=class extends Yht{getResponse(){if(!this.body_)throw Kye("cannot .getResponse() before sending");return this.body_}};zLe=class{constructor(t,n,i=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=n,this._metadata=i,this._mappings=Jht(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=o=>{if(this._request=void 0,this._chunkMultiplier=1,o._codeEquals(of.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{let s=this.isExponentialBackoffExpired();if(cci(o.status,[]))if(s)o=ici();else{this.sleepTime=Math.max(this.sleepTime*2,h$a),this._needToFetchStatus=!0,this.completeTransitions_();return}this._error=o,this._transition("error")}},this._metadataErrorHandler=o=>{this._request=void 0,o._codeEquals(of.CANCELED)?this.completeTransitions_():(this._error=o,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((o,s)=>{this._resolve=o,this._reject=s,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){let t=this._transferred;return n=>this._updateProgress(t+n)}_shouldDoResumable(t){return t.size()>256*1024}_start(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(t){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([n,i])=>{switch(this._state){case"running":t(n,i);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused");break}})}_createResumable(){this._resolveToken((t,n)=>{let i=lZa(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),o=this._ref.storage._makeRequest(i,cN,t,n);this._request=o,o.getPromise().then(s=>{this._request=void 0,this._uploadUrl=s,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){let t=this._uploadUrl;this._resolveToken((n,i)=>{let o=cZa(this._ref.storage,this._ref._location,t,this._blob),s=this._ref.storage._makeRequest(o,cN,n,i);this._request=s,s.getPromise().then(a=>{a=a,this._request=void 0,this._updateProgress(a.current),this._needToFetchStatus=!1,a.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){let t=$li*this._chunkMultiplier,n=new Zye(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken((o,s)=>{let a;try{a=uZa(this._ref._location,this._ref.storage,i,this._blob,t,this._mappings,n,this._makeProgressCallback())}catch(u){this._error=u,this._transition("error");return}let l=this._ref.storage._makeRequest(a,cN,o,s,!1);this._request=l,l.getPromise().then(u=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(u.current),u.finalized?(this._metadata=u.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){$li*this._chunkMultiplier*2<32*1024*1024&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((t,n)=>{let i=Aci(this._ref.storage,this._ref._location,this._mappings),o=this._ref.storage._makeRequest(i,cN,t,n);this._request=o,o.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((t,n)=>{let i=aZa(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),o=this._ref.storage._makeRequest(i,cN,t,n);this._request=o,o.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(t){let n=this._transferred;this._transferred=t,this._transferred!==n&&this._notifyObservers()}_transition(t){if(this._state!==t)switch(t){case"canceling":case"pausing":this._state=t,this._request!==void 0?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":let n=this._state==="paused";this._state=t,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=t,this._notifyObservers();break;case"canceled":this._error=oci(),this._state=t,this._notifyObservers();break;case"error":this._state=t,this._notifyObservers();break;case"success":this._state=t,this._notifyObservers();break}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}}get snapshot(){let t=_3r(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}}on(t,n,i,o){let s=new R3r(n||void 0,i||void 0,o||void 0);return this._addObserver(s),()=>{this._removeObserver(s)}}then(t,n){return this._promise.then(t,n)}catch(t){return this.then(null,t)}_addObserver(t){this._observers.push(t),this._notifyObserver(t)}_removeObserver(t){let n=this._observers.indexOf(t);n!==-1&&this._observers.splice(n,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(n=>{this._notifyObserver(n)})}_finishPromise(){if(this._resolve!==void 0){let t=!0;switch(_3r(this._state)){case Z3.SUCCESS:Yye(this._resolve.bind(null,this.snapshot))();break;case Z3.CANCELED:case Z3.ERROR:let n=this._reject;Yye(n.bind(null,this._error))();break;default:t=!1;break}t&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(t){switch(_3r(this._state)){case Z3.RUNNING:case Z3.PAUSED:t.next&&Yye(t.next.bind(t,this.snapshot))();break;case Z3.SUCCESS:t.complete&&Yye(t.complete.bind(t))();break;case Z3.CANCELED:case Z3.ERROR:t.error&&Yye(t.error.bind(t,this._error))();break;default:t.error&&Yye(t.error.bind(t,this._error))()}}resume(){let t=this._state==="paused"||this._state==="pausing";return t&&this._transition("running"),t}pause(){let t=this._state==="running";return t&&this._transition("pausing"),t}cancel(){let t=this._state==="running"||this._state==="pausing";return t&&this._transition("canceling"),t}};eEe=class r{constructor(t,n){this._service=t,n instanceof WC?this._location=n:this._location=WC.makeFromUrl(n,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,n){return new r(t,n)}get root(){let t=new WC(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return pci(this._location.path)}get storage(){return this._service}get parent(){let t=G$a(this._location.path);if(t===null)return null;let n=new WC(this._location.bucket,t);return new r(this._service,n)}_throwIfRoot(t){if(this._location.path==="")throw D3r(t)}};ULe=class{constructor(t,n,i,o,s){this.app=t,this._authProvider=n,this._appCheckProvider=i,this._url=o,this._firebaseVersion=s,this._bucket=null,this._host=rci,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=f$a,this._maxUploadRetryTime=A$a,this._requests=new Set,o!=null?this._bucket=WC.makeFromBucketSpec(o,this._host):this._bucket=eci(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,this._url!=null?this._bucket=WC.makeFromBucketSpec(this._url,t):this._bucket=eci(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){T3r("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){T3r("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let t=this._authProvider.getImmediate({optional:!0});if(t){let n=await t.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){let t=this._appCheckProvider.getImmediate({optional:!0});return t?(await t.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new eEe(this,t)}_makeRequest(t,n,i,o,s=!0){if(this._deleted)return new O3r(aci());{let a=P$a(t,this._appId,i,o,n,this._firebaseVersion,s);return this._requests.add(a),a.getPromise().then(()=>this._requests.delete(a),()=>this._requests.delete(a)),a}}async makeRequestWithTokens(t,n){let[i,o]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,n,i,o).getPromise()}},vZa="@firebase/storage",SZa="0.12.3";_Za="storage";TZa()});function Bci(r){return/^[A-Za-z]+:\/\//.test(r)}function xZa(r,{instanceIdentifier:t}){let n=r.getProvider("app-compat").getImmediate(),i=r.getProvider("storage").getImmediate({identifier:t});return new tgt(n,i)}function MZa(r){let t={TaskState:Z3,TaskEvent:gci,StringFormat:L_,Storage:tgt,Reference:Ale};r.INTERNAL.registerComponent(new Tp(BZa,xZa,"PUBLIC").setServiceProps(t).setMultipleInstances(!0)),r.registerVersion(wZa,RZa)}var rEe,Zht,egt,Ale,tgt,wZa,RZa,BZa,xci=et(()=>{Wse();F3r();E_();rEe=class{constructor(t,n,i){this._delegate=t,this.task=n,this.ref=i}get bytesTransferred(){return this._delegate.bytesTransferred}get metadata(){return this._delegate.metadata}get state(){return this._delegate.state}get totalBytes(){return this._delegate.totalBytes}};Zht=class{constructor(t,n){this._delegate=t,this._ref=n,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}get snapshot(){return new rEe(this._delegate.snapshot,this,this._ref)}then(t,n){return this._delegate.then(i=>{if(t)return t(new rEe(i,this,this._ref))},n)}on(t,n,i,o){let s;return n&&(typeof n=="function"?s=a=>n(new rEe(a,this,this._ref)):s={next:n.next?a=>n.next(new rEe(a,this,this._ref)):void 0,complete:n.complete||void 0,error:n.error||void 0}),this._delegate.on(t,s,i||void 0,o||void 0)}},egt=class{constructor(t,n){this._delegate=t,this._service=n}get prefixes(){return this._delegate.prefixes.map(t=>new Ale(t,this._service))}get items(){return this._delegate.items.map(t=>new Ale(t,this._service))}get nextPageToken(){return this._delegate.nextPageToken||null}};Ale=class r{constructor(t,n){this._delegate=t,this.storage=n}get name(){return this._delegate.name}get bucket(){return this._delegate.bucket}get fullPath(){return this._delegate.fullPath}toString(){return this._delegate.toString()}child(t){let n=wci(this._delegate,t);return new r(n,this.storage)}get root(){return new r(this._delegate.root,this.storage)}get parent(){let t=this._delegate.parent;return t==null?null:new r(t,this.storage)}put(t,n){return this._throwIfRoot("put"),new Zht($ht(this._delegate,t,n),this)}putString(t,n=L_.RAW,i){this._throwIfRoot("putString");let o=P3r(n,t),s=Object.assign({},i);return s.contentType==null&&o.contentType!=null&&(s.contentType=o.contentType),new Zht(new zLe(this._delegate,new $ye(o.data,!0),s),this)}listAll(){return _ci(this._delegate).then(t=>new egt(t,this.storage))}list(t){return Sci(this._delegate,t||void 0).then(n=>new egt(n,this.storage))}getMetadata(){return Ici(this._delegate)}updateMetadata(t){return vci(this._delegate,t)}getDownloadURL(){return Oci(this._delegate)}delete(){return this._throwIfRoot("delete"),Tci(this._delegate)}_throwIfRoot(t){if(this._delegate._location.path==="")throw D3r(t)}};tgt=class{constructor(t,n){this.app=t,this._delegate=n}get maxOperationRetryTime(){return this._delegate.maxOperationRetryTime}get maxUploadRetryTime(){return this._delegate.maxUploadRetryTime}ref(t){if(Bci(t))throw fle("ref() expected a child path but got a URL, use refFromURL instead.");return new Ale(GLe(this._delegate,t),this)}refFromURL(t){if(!Bci(t))throw fle("refFromURL() expected a full URL but got a child path, use ref() instead.");try{WC.makeFromUrl(t,this._delegate.host)}catch{throw fle("refFromUrl() expected a valid full URL but got an invalid one.")}return new Ale(GLe(this._delegate,t),this)}setMaxUploadRetryTime(t){this._delegate.maxUploadRetryTime=t}setMaxOperationRetryTime(t){this._delegate.maxOperationRetryTime=t}useEmulator(t,n,i={}){Rci(this._delegate,t,n,i)}};wZa="@firebase/storage-compat",RZa="0.3.6";BZa="storage-compat";MZa(Kd)});var q3r=et(()=>{xci()});var Mci,Dci=et(()=>{Mci=typeof globalThis=="object"?globalThis:global});var Nci=et(()=>{Dci()});var Pci=et(()=>{Nci()});var Wq,z3r=et(()=>{Wq="1.9.0"});function DZa(r){var t=new Set([r]),n=new Set,i=r.match(kci);if(!i)return function(){return!1};var o={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]};if(o.prerelease!=null)return function(u){return u===r};function s(l){return n.add(l),!1}function a(l){return t.add(l),!0}return function(u){if(t.has(u))return!0;if(n.has(u))return!1;var c=u.match(kci);if(!c)return s(u);var d={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return d.prerelease!=null||o.major!==d.major?s(u):o.major===0?o.minor===d.minor&&o.patch<=d.patch?a(u):s(u):o.minor<=d.minor?a(u):s(u)}}var kci,Qci,Lci=et(()=>{z3r();kci=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Qci=DZa(Wq)});function dN(r,t,n,i){var o;i===void 0&&(i=!1);var s=HLe[WLe]=(o=HLe[WLe])!==null&&o!==void 0?o:{version:Wq};if(!i&&s[r]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+r);return n.error(a.stack||a.message),!1}if(s.version!==Wq){var a=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+r+" does not match previously registered API v"+Wq);return n.error(a.stack||a.message),!1}return s[r]=t,n.debug("@opentelemetry/api: Registered a global for "+r+" v"+Wq+"."),!0}function F_(r){var t,n,i=(t=HLe[WLe])===null||t===void 0?void 0:t.version;if(!(!i||!Qci(i)))return(n=HLe[WLe])===null||n===void 0?void 0:n[r]}function pN(r,t){t.debug("@opentelemetry/api: Unregistering a global for "+r+" v"+Wq+".");var n=HLe[WLe];n&&delete n[r]}var NZa,WLe,HLe,hle=et(()=>{Pci();z3r();Lci();NZa=Wq.split(".")[0],WLe=Symbol.for("opentelemetry.js.api."+NZa),HLe=Mci});function VLe(r,t,n){var i=F_("diag");if(i)return n.unshift(t),i[r].apply(i,kZa([],PZa(n),!1))}var PZa,kZa,Fci,qci=et(()=>{hle();PZa=function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},kZa=function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))},Fci=function(){function r(t){this._namespace=t.namespace||"DiagComponentLogger"}return r.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return VLe("debug",this._namespace,t)},r.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return VLe("error",this._namespace,t)},r.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return VLe("info",this._namespace,t)},r.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return VLe("warn",this._namespace,t)},r.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return VLe("verbose",this._namespace,t)},r}()});var gE,rgt=et(()=>{(function(r){r[r.NONE=0]="NONE",r[r.ERROR=30]="ERROR",r[r.WARN=50]="WARN",r[r.INFO=60]="INFO",r[r.DEBUG=70]="DEBUG",r[r.VERBOSE=80]="VERBOSE",r[r.ALL=9999]="ALL"})(gE||(gE={}))});function zci(r,t){r<gE.NONE?r=gE.NONE:r>gE.ALL&&(r=gE.ALL),t=t||{};function n(i,o){var s=t[i];return typeof s=="function"&&r>=o?s.bind(t):function(){}}return{error:n("error",gE.ERROR),warn:n("warn",gE.WARN),info:n("info",gE.INFO),debug:n("debug",gE.DEBUG),verbose:n("verbose",gE.VERBOSE)}}var Uci=et(()=>{rgt()});var QZa,LZa,FZa,eb,gle=et(()=>{qci();Uci();rgt();hle();QZa=function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},LZa=function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))},FZa="diag",eb=function(){function r(){function t(o){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=F_("diag");if(l)return l[o].apply(l,LZa([],QZa(s),!1))}}var n=this,i=function(o,s){var a,l,u;if(s===void 0&&(s={logLevel:gE.INFO}),o===n){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=c.stack)!==null&&a!==void 0?a:c.message),!1}typeof s=="number"&&(s={logLevel:s});var d=F_("diag"),p=zci((l=s.logLevel)!==null&&l!==void 0?l:gE.INFO,o);if(d&&!s.suppressOverrideMessage){var f=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";d.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return dN("diag",p,n,!0)};n.setLogger=i,n.disable=function(){pN(FZa,n)},n.createComponentLogger=function(o){return new Fci(o)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return r.instance=function(){return this._instance||(this._instance=new r),this._instance},r}()});var qZa,zZa,jci,Gci=et(()=>{qZa=function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},zZa=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},jci=function(){function r(t){this._entries=t?new Map(t):new Map}return r.prototype.getEntry=function(t){var n=this._entries.get(t);if(n)return Object.assign({},n)},r.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var n=qZa(t,2),i=n[0],o=n[1];return[i,o]})},r.prototype.setEntry=function(t,n){var i=new r(this._entries);return i._entries.set(t,n),i},r.prototype.removeEntry=function(t){var n=new r(this._entries);return n._entries.delete(t),n},r.prototype.removeEntries=function(){for(var t,n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var s=new r(this._entries);try{for(var a=zZa(i),l=a.next();!l.done;l=a.next()){var u=l.value;s._entries.delete(u)}}catch(c){t={error:c}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return s},r.prototype.clear=function(){return new r},r}()});var Wci,Hci=et(()=>{Wci=Symbol("BaggageEntryMetadata")});function Vci(r){return r===void 0&&(r={}),new jci(new Map(Object.entries(r)))}function Yci(r){return typeof r!="string"&&(UZa.error("Cannot create baggage metadata from unknown type: "+typeof r),r=""),{__TYPE__:Wci,toString:function(){return r}}}var UZa,U3r=et(()=>{gle();Gci();Hci();UZa=eb.instance()});function nEe(r){return Symbol.for(r)}var jZa,ngt,YLe=et(()=>{jZa=function(){function r(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(i){return n._currentContext.get(i)},n.setValue=function(i,o){var s=new r(n._currentContext);return s._currentContext.set(i,o),s},n.deleteValue=function(i){var o=new r(n._currentContext);return o._currentContext.delete(i),o}}return r}(),ngt=new jZa});var j3r,Kci,Jci=et(()=>{j3r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Kci=function(){function r(){function t(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(console){var a=console[i];if(typeof a!="function"&&(a=console.log),typeof a=="function")return a.apply(console,o)}}}for(var n=0;n<j3r.length;n++)this[j3r[n].n]=t(j3r[n].c)}return r}()});function Xci(){return W3r}var mle,GZa,igt,WZa,HZa,VZa,YZa,G3r,KZa,JZa,XZa,W3r,$Za,ZZa,eel,tel,rel,nel,iel,H3r=et(()=>{mle=function(){var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(i[s]=o[s])},r(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),GZa=function(){function r(){}return r.prototype.createGauge=function(t,n){return ZZa},r.prototype.createHistogram=function(t,n){return eel},r.prototype.createCounter=function(t,n){return $Za},r.prototype.createUpDownCounter=function(t,n){return tel},r.prototype.createObservableGauge=function(t,n){return nel},r.prototype.createObservableCounter=function(t,n){return rel},r.prototype.createObservableUpDownCounter=function(t,n){return iel},r.prototype.addBatchObservableCallback=function(t,n){},r.prototype.removeBatchObservableCallback=function(t){},r}(),igt=function(){function r(){}return r}(),WZa=function(r){mle(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.add=function(n,i){},t}(igt),HZa=function(r){mle(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.add=function(n,i){},t}(igt),VZa=function(r){mle(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.record=function(n,i){},t}(igt),YZa=function(r){mle(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.record=function(n,i){},t}(igt),G3r=function(){function r(){}return r.prototype.addCallback=function(t){},r.prototype.removeCallback=function(t){},r}(),KZa=function(r){mle(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(G3r),JZa=function(r){mle(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(G3r),XZa=function(r){mle(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(G3r),W3r=new GZa,$Za=new WZa,ZZa=new VZa,eel=new YZa,tel=new HZa,rel=new KZa,nel=new JZa,iel=new XZa});var ogt,$ci=et(()=>{(function(r){r[r.INT=0]="INT",r[r.DOUBLE=1]="DOUBLE"})(ogt||(ogt={}))});var sgt,agt,V3r=et(()=>{sgt={get:function(r,t){if(r!=null)return r[t]},keys:function(r){return r==null?[]:Object.keys(r)}},agt={set:function(r,t,n){r!=null&&(r[t]=n)}}});var oel,sel,Zci,eui=et(()=>{YLe();oel=function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},sel=function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))},Zci=function(){function r(){}return r.prototype.active=function(){return ngt},r.prototype.with=function(t,n,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return n.call.apply(n,sel([i],oel(o),!1))},r.prototype.bind=function(t,n){return n},r.prototype.enable=function(){return this},r.prototype.disable=function(){return this},r}()});var ael,lel,Y3r,cel,$V,KLe=et(()=>{eui();hle();gle();ael=function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},lel=function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))},Y3r="context",cel=new Zci,$V=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalContextManager=function(t){return dN(Y3r,t,eb.instance())},r.prototype.active=function(){return this._getContextManager().active()},r.prototype.with=function(t,n,i){for(var o,s=[],a=3;a<arguments.length;a++)s[a-3]=arguments[a];return(o=this._getContextManager()).with.apply(o,lel([t,n,i],ael(s),!1))},r.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},r.prototype._getContextManager=function(){return F_(Y3r)||cel},r.prototype.disable=function(){this._getContextManager().disable(),pN(Y3r,eb.instance())},r}()});var iEe,K3r=et(()=>{(function(r){r[r.NONE=0]="NONE",r[r.SAMPLED=1]="SAMPLED"})(iEe||(iEe={}))});var JLe,XLe,lgt,cgt=et(()=>{K3r();JLe="0000000000000000",XLe="00000000000000000000000000000000",lgt={traceId:XLe,spanId:JLe,traceFlags:iEe.NONE}});var ZV,ugt=et(()=>{cgt();ZV=function(){function r(t){t===void 0&&(t=lgt),this._spanContext=t}return r.prototype.spanContext=function(){return this._spanContext},r.prototype.setAttribute=function(t,n){return this},r.prototype.setAttributes=function(t){return this},r.prototype.addEvent=function(t,n){return this},r.prototype.addLink=function(t){return this},r.prototype.addLinks=function(t){return this},r.prototype.setStatus=function(t){return this},r.prototype.updateName=function(t){return this},r.prototype.end=function(t){},r.prototype.isRecording=function(){return!1},r.prototype.recordException=function(t,n){},r}()});function dgt(r){return r.getValue(J3r)||void 0}function tui(){return dgt($V.getInstance().active())}function $Le(r,t){return r.setValue(J3r,t)}function rui(r){return r.deleteValue(J3r)}function nui(r,t){return $Le(r,new ZV(t))}function pgt(r){var t;return(t=dgt(r))===null||t===void 0?void 0:t.spanContext()}var J3r,X3r=et(()=>{YLe();ugt();KLe();J3r=nEe("OpenTelemetry Context Key SPAN")});function $3r(r){return uel.test(r)&&r!==XLe}function Z3r(r){return del.test(r)&&r!==JLe}function oEe(r){return $3r(r.traceId)&&Z3r(r.spanId)}function iui(r){return new ZV(r)}var uel,del,fgt=et(()=>{cgt();ugt();uel=/^([0-9a-f]{32})$/i,del=/^[0-9a-f]{16}$/i});function pel(r){return typeof r=="object"&&typeof r.spanId=="string"&&typeof r.traceId=="string"&&typeof r.traceFlags=="number"}var ebr,Agt,tbr=et(()=>{KLe();X3r();ugt();fgt();ebr=$V.getInstance(),Agt=function(){function r(){}return r.prototype.startSpan=function(t,n,i){i===void 0&&(i=ebr.active());var o=!!n?.root;if(o)return new ZV;var s=i&&pgt(i);return pel(s)&&oEe(s)?new ZV(s):new ZV},r.prototype.startActiveSpan=function(t,n,i,o){var s,a,l;if(!(arguments.length<2)){arguments.length===2?l=n:arguments.length===3?(s=n,l=i):(s=n,a=i,l=o);var u=a??ebr.active(),c=this.startSpan(t,s,u),d=$Le(u,c);return ebr.with(d,l,void 0,c)}},r}()});var fel,hgt,rbr=et(()=>{tbr();fel=new Agt,hgt=function(){function r(t,n,i,o){this._provider=t,this.name=n,this.version=i,this.options=o}return r.prototype.startSpan=function(t,n,i){return this._getTracer().startSpan(t,n,i)},r.prototype.startActiveSpan=function(t,n,i,o){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},r.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):fel},r}()});var oui,sui=et(()=>{tbr();oui=function(){function r(){}return r.prototype.getTracer=function(t,n,i){return new Agt},r}()});var Ael,ZLe,nbr=et(()=>{rbr();sui();Ael=new oui,ZLe=function(){function r(){}return r.prototype.getTracer=function(t,n,i){var o;return(o=this.getDelegateTracer(t,n,i))!==null&&o!==void 0?o:new hgt(this,t,n,i)},r.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Ael},r.prototype.setDelegate=function(t){this._delegate=t},r.prototype.getDelegateTracer=function(t,n,i){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(t,n,i)},r}()});var ggt,aui=et(()=>{(function(r){r[r.NOT_RECORD=0]="NOT_RECORD",r[r.RECORD=1]="RECORD",r[r.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ggt||(ggt={}))});var mgt,lui=et(()=>{(function(r){r[r.INTERNAL=0]="INTERNAL",r[r.SERVER=1]="SERVER",r[r.CLIENT=2]="CLIENT",r[r.PRODUCER=3]="PRODUCER",r[r.CONSUMER=4]="CONSUMER"})(mgt||(mgt={}))});var ygt,cui=et(()=>{(function(r){r[r.UNSET=0]="UNSET",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR"})(ygt||(ygt={}))});function uui(r){return mel.test(r)}function dui(r){return yel.test(r)&&!Eel.test(r)}var ibr,hel,gel,mel,yel,Eel,pui=et(()=>{ibr="[_0-9a-z-*/]",hel="[a-z]"+ibr+"{0,255}",gel="[a-z0-9]"+ibr+"{0,240}@[a-z]"+ibr+"{0,13}",mel=new RegExp("^(?:"+hel+"|"+gel+")$"),yel=/^[ -~]{0,255}[!-~]$/,Eel=/,|=/});var fui,bel,Aui,hui,gui,mui=et(()=>{pui();fui=32,bel=512,Aui=",",hui="=",gui=function(){function r(t){this._internalState=new Map,t&&this._parse(t)}return r.prototype.set=function(t,n){var i=this._clone();return i._internalState.has(t)&&i._internalState.delete(t),i._internalState.set(t,n),i},r.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},r.prototype.get=function(t){return this._internalState.get(t)},r.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,i){return n.push(i+hui+t.get(i)),n},[]).join(Aui)},r.prototype._parse=function(t){t.length>bel||(this._internalState=t.split(Aui).reverse().reduce(function(n,i){var o=i.trim(),s=o.indexOf(hui);if(s!==-1){var a=o.slice(0,s),l=o.slice(s+1,i.length);uui(a)&&dui(l)&&n.set(a,l)}return n},new Map),this._internalState.size>fui&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,fui))))},r.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},r.prototype._clone=function(){var t=new r;return t._internalState=new Map(this._internalState),t},r}()});function yui(r){return new gui(r)}var Eui=et(()=>{mui()});var obr,bui=et(()=>{KLe();obr=$V.getInstance()});var sbr,Cui=et(()=>{gle();sbr=eb.instance()});var Cel,Iui,vui=et(()=>{H3r();Cel=function(){function r(){}return r.prototype.getMeter=function(t,n,i){return W3r},r}(),Iui=new Cel});var abr,Sui,_ui=et(()=>{vui();hle();gle();abr="metrics",Sui=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalMeterProvider=function(t){return dN(abr,t,eb.instance())},r.prototype.getMeterProvider=function(){return F_(abr)||Iui},r.prototype.getMeter=function(t,n,i){return this.getMeterProvider().getMeter(t,n,i)},r.prototype.disable=function(){pN(abr,eb.instance())},r}()});var lbr,Oui=et(()=>{_ui();lbr=Sui.getInstance()});var Tui,wui=et(()=>{Tui=function(){function r(){}return r.prototype.inject=function(t,n){},r.prototype.extract=function(t,n){return t},r.prototype.fields=function(){return[]},r}()});function ubr(r){return r.getValue(cbr)||void 0}function Rui(){return ubr($V.getInstance().active())}function Bui(r,t){return r.setValue(cbr,t)}function xui(r){return r.deleteValue(cbr)}var cbr,Mui=et(()=>{KLe();YLe();cbr=nEe("OpenTelemetry Baggage Key")});var dbr,Iel,Dui,Nui=et(()=>{hle();wui();V3r();Mui();U3r();gle();dbr="propagation",Iel=new Tui,Dui=function(){function r(){this.createBaggage=Vci,this.getBaggage=ubr,this.getActiveBaggage=Rui,this.setBaggage=Bui,this.deleteBaggage=xui}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalPropagator=function(t){return dN(dbr,t,eb.instance())},r.prototype.inject=function(t,n,i){return i===void 0&&(i=agt),this._getGlobalPropagator().inject(t,n,i)},r.prototype.extract=function(t,n,i){return i===void 0&&(i=sgt),this._getGlobalPropagator().extract(t,n,i)},r.prototype.fields=function(){return this._getGlobalPropagator().fields()},r.prototype.disable=function(){pN(dbr,eb.instance())},r.prototype._getGlobalPropagator=function(){return F_(dbr)||Iel},r}()});var pbr,Pui=et(()=>{Nui();pbr=Dui.getInstance()});var fbr,kui,Qui=et(()=>{hle();nbr();fgt();X3r();gle();fbr="trace",kui=function(){function r(){this._proxyTracerProvider=new ZLe,this.wrapSpanContext=iui,this.isSpanContextValid=oEe,this.deleteSpan=rui,this.getSpan=dgt,this.getActiveSpan=tui,this.getSpanContext=pgt,this.setSpan=$Le,this.setSpanContext=nui}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalTracerProvider=function(t){var n=dN(fbr,this._proxyTracerProvider,eb.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},r.prototype.getTracerProvider=function(){return F_(fbr)||this._proxyTracerProvider},r.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},r.prototype.disable=function(){pN(fbr,eb.instance()),this._proxyTracerProvider=new ZLe},r}()});var q_,Lui=et(()=>{Qui();q_=kui.getInstance()});var Fui={};Ov(Fui,{DiagConsoleLogger:()=>Kci,DiagLogLevel:()=>gE,INVALID_SPANID:()=>JLe,INVALID_SPAN_CONTEXT:()=>lgt,INVALID_TRACEID:()=>XLe,ProxyTracer:()=>hgt,ProxyTracerProvider:()=>ZLe,ROOT_CONTEXT:()=>ngt,SamplingDecision:()=>ggt,SpanKind:()=>mgt,SpanStatusCode:()=>ygt,TraceFlags:()=>iEe,ValueType:()=>ogt,baggageEntryMetadataFromString:()=>Yci,context:()=>obr,createContextKey:()=>nEe,createNoopMeter:()=>Xci,createTraceState:()=>yui,default:()=>vel,defaultTextMapGetter:()=>sgt,defaultTextMapSetter:()=>agt,diag:()=>sbr,isSpanContextValid:()=>oEe,isValidSpanId:()=>Z3r,isValidTraceId:()=>$3r,metrics:()=>lbr,propagation:()=>pbr,trace:()=>q_});var vel,yle=et(()=>{U3r();YLe();Jci();rgt();H3r();$ci();V3r();rbr();nbr();aui();lui();cui();K3r();Eui();fgt();cgt();bui();Cui();Oui();Pui();Lui();vel={context:obr,diag:sbr,metrics:lbr,propagation:pbr,trace:q_}});var qui,fN,zui=et(()=>{"use strict";fN=(r,t={},n=1)=>{qui&&qui.increment(r,t,n)}});function Oel(){let r,t;return{promise:new Promise((n,i)=>{r=n,t=i}),resolve:r,reject:t}}function Tel(r,t){return[...r,t]}function wel(r,t){return[...r.slice(0,t),...r.slice(t+1)]}function Rel(r,t){let n=r.indexOf(t);return n!==-1?wel(r,n):r}var Uui,Abr,Sel,_el,Egt,hbr=et(()=>{Abr=new WeakMap,Sel=()=>{},_el=class eY{constructor(t){this.subscribers=[],this.settlement=null,this[Uui]="Unpromise",t instanceof Promise?this.promise=t:this.promise=new Promise(t),this.promise.then(n=>{let{subscribers:i}=this;this.subscribers=null,this.settlement={status:"fulfilled",value:n},i?.forEach(({resolve:o})=>{o(n)})}).catch(n=>{let{subscribers:i}=this;this.subscribers=null,this.settlement={status:"rejected",reason:n},i?.forEach(({reject:o})=>{o(n)})})}subscribe(){let t,n,{settlement:i}=this;if(i===null){if(this.subscribers===null)throw new Error("Unpromise settled but still has subscribers");let o=Oel();this.subscribers=Tel(this.subscribers,o),t=o.promise,n=()=>{this.subscribers!==null&&(this.subscribers=Rel(this.subscribers,o))}}else{let{status:o}=i;o==="fulfilled"?t=Promise.resolve(i.value):t=Promise.reject(i.reason),n=Sel}return Object.assign(t,{unsubscribe:n})}then(t,n){let i=this.subscribe(),{unsubscribe:o}=i;return Object.assign(i.then(t,n),{unsubscribe:o})}catch(t){let n=this.subscribe(),{unsubscribe:i}=n;return Object.assign(n.catch(t),{unsubscribe:i})}finally(t){let n=this.subscribe(),{unsubscribe:i}=n;return Object.assign(n.finally(t),{unsubscribe:i})}static proxy(t){let n=eY.getSubscribablePromise(t);return typeof n<"u"?n:eY.createSubscribablePromise(t)}static createSubscribablePromise(t){let n=new eY(t);return Abr.set(t,n),Abr.set(n,n),n}static getSubscribablePromise(t){return Abr.get(t)}static resolve(t){return eY.proxy(t).subscribe()}static async any(t){let n=t.map(eY.resolve);try{return await Promise.any(n)}finally{n.forEach(({unsubscribe:i})=>{i()})}}static async race(t){let n=t.map(eY.resolve);try{return await Promise.race(n)}finally{n.forEach(({unsubscribe:i})=>{i()})}}static async raceSingletons(t){let n=t.map(i=>eY.proxy(i).then(()=>[i]));try{return await Promise.race(n)}finally{for(let i of n)i.unsubscribe()}}};Uui=Symbol.toStringTag;Egt=_el});var Ele,N2,Bel,jui=et(()=>{"use strict";Er();hbr();Hut();Ele=class extends At{},N2=async(r,t,n)=>{let i=Bel(r),o=i.promise.then(()=>{throw new Ele(t)});return await Egt.race([n,o]).finally(i.cancel)},Bel=r=>{let t=wC(),n=setTimeout(t.resolve,r),i=()=>clearTimeout(n);return{promise:t.promise,cancel:i}}});var _8d,Gui=et(()=>{"use strict";_8d=global.setImmediate??setTimeout});var yx=et(()=>{"use strict";jui();Gui()});var gbr,Wui=et(()=>{"use strict";_h();gbr=(r,t,n,...i)=>{let o=tu(),s={...t,area:r};o[n](...i,s)}});var tY,bgt,ew,sEe,Cgt=et(()=>{"use strict";Er();_h();Wui();tY=class{valid=!1;failures;originalValue;constructor(t,n){this.originalValue=p9(t),this.failures=n}get failureMessage(){return this.failures.map(t=>t.path.length>0?`${t.path}: ${t.message}`:t.message).join(`
|
|
177
177
|
`)}},bgt=null,ew=class extends At{code;result;constructor(t,n,i=400){super(t,typeof n=="string"?n:n?.failureMessage),this.result=typeof n=="string"?void 0:n,this.code=i}statusCode(){return this.code}get validationResult(){return this.result}get failureDetails(){return this.result?`${this.message}: ${this.result.failureMessage}`:this.message}},sEe=class{constructor(t){this.name=t}is(t){return this.validate(t).valid}assert(t,n){return this.doAssert(t,!0,n)}verify(t,n){let i=!!(n?.throwOnVerify??!1);return this.doAssert(t,i,n)}doAssert(t,n,i){let{logContext:o,logArea:s,failureLogLevel:a,successLogLevel:l,statusCode:u,errorMessage:c}=i||{},d=this.validate(t),p=i?.additionalValidation?.(t)||{valid:!0},f=p.valid?d:p;if(!f.valid){let A=typeof c=="function"?c(f):c??`Found ${f.failures.length} validation failure(s) for ${this.name}`,h=new ew(A,f,u);if(a!==bgt){let y=t;y&&typeof y=="object"&&(y=p9(y)),gbr(s,o,a||"error",h,y)}if(n)throw h;return t}return l&&gbr(s,o,l,`${this.name} validation succeeded`,t),f.value}}});var mbr,Rd,ybr=et(()=>{"use strict";_h();Er();Cgt();mbr=class extends sEe{constructor(n,i){super(n);this.runtype=i;if(!i)throw new At(`Missing runtype for ${n} validator. Did you use a circular import?`)}validate(n){try{let i=this.runtype.validate(n);return i.success?{valid:!0,value:n}:this.createValidationFailedResult(i,n)}catch(i){return tu().error(`RuntypesValidator: Unable to validate ${this.name} value. `,`
|
|
178
178
|
Error: `,i,`
|
|
179
|
-
Value: `,n),new tY(n,[{path:"",message:"value triggered unknown runtypes error"}])}}createValidationFailedResult(n,i){let o=[],s=(a,l)=>{for(let[u,c]of Object.entries(l)){let d=a.concat(u);typeof c=="string"?o.push({path:d.join("."),message:c}):s(d,c)}};if(n.code==="TYPE_INCORRECT"||n.code==="CONSTRAINT_FAILED")o.push({path:"",message:n.message});else{let a=n.details;a&&s([],a)}return new tY(i,o)}},Rd=(r,t)=>new mbr(r,t)});var bbr,xel,Mel,Ebr,br,Hui=et(()=>{"use strict";bbr=Et(Go());Er();_h();Cgt();sn();xel=r=>r.code==="unrecognized_keys"?r.keys.length:r.code==="invalid_type"&&r.received==="undefined"&&r.message==="Required"?1:r.code==="invalid_literal"?10:0,Mel=r=>bbr.default.sum(r.issues.map(t=>xel(t))),Ebr=class extends sEe{constructor(n,i){super(n);this.zodType=i;if(!i)throw new At(`Missing Zod type for ${n} validator. Did you use a circular import?`)}convertZodError=n=>{let i=[];for(let o of n.issues)if(o.code==="invalid_union"){let s=bbr.default.minBy(o.unionErrors,a=>Mel(a));s&&i.push(...this.convertZodError(s))}else i.push({path:o.path.join("."),message:o.message});return i};validate(n){try{let i=this.zodType.safeParse(n);if(i.success)return{valid:!0,value:i.data};let o=this.convertZodError(i.error);return new tY(n,o)}catch(i){let o=i instanceof T.ZodError?[i.flatten(),i.issues]:[];return tu().error(`ZodValidator: Unable to validate ${this.name} value`,"error: ",i,"value: ",n,...o),new tY(n,[{path:"",message:"value triggered unknown Zod error"}])}}},br=(r,t)=>new Ebr(r,t)});var aEe=et(()=>{"use strict";ybr();Cgt();Hui()});var Del,Nel,Vui,Cbr,Igt,Ibr,vgt,vbr,Sbr,_br,Obr,Tbr,Pel,Yui,Kui,rY=et(()=>{"use strict";sn();tAr();JV();v3r();q3r();yle();zui();yx();aEe();Del=T.object({auth:T.string(),firestore:T.string(),storage:T.string()}),Nel=T.object({apiKey:T.string(),authDomain:T.string(),projectId:T.string(),storageBucket:T.string(),messagingSenderId:T.string(),appId:T.string(),measurementId:T.string(),emulatorInfo:Del.optional()}),Vui=br("FirebaseConfig",Nel),Cbr=r=>{fN("firestore.delete",{path:r})},Igt=r=>{fN("firestore.set",{path:r})},Ibr=r=>{fN("firestore.update",{path:r})},vgt=r=>{fN("firestore.get",{path:r})},vbr=r=>{fN("firestore.transaction.get",{path:r})},Sbr=r=>{fN("firestore.transaction.set",{path:r})},_br=r=>{fN("firestore.transaction.update",{path:r})},Obr=r=>{fN("firestore.transaction.delete",{path:r})},Tbr=()=>{fN("firestore.batch")},Pel=q_.getTracer("firestore"),Yui=r=>(vgt(r.path),Pel.startActiveSpan(`get ${r.path}`,async t=>{t.setAttribute("path",r.path),t.setAttribute("operation","get");let n=await r.get();return t.end(),n})),Kui=async(r,t=1e3)=>{let n=()=>{},i=new Promise(o=>{n=r.onSnapshot(s=>{s.metadata.hasPendingWrites||o(s)})});return await N2(t,`Timed out in GetDocumentNoPendingWrites after ${t} ms`,i).finally(n)}});var Sgt,_gt,Jui,ble=et(()=>{"use strict";Sgt={emerg:"emerg",info:"info",error:"error",debug:"debug",assert:"assert",warn:"warn",alert:"alert",app:"app"},_gt={LEVELS:{emerg:0,assert:1,alert:2,error:3,app:4,info:5,debug:6,warn:4},COLORS:{emerg:"red",assert:"yellow",alert:"yellow",warn:"yellow",error:"cyan",app:"blue",info:"green",debug:"magenta"}},Jui=["Authorization","Token","Password","Secret","idToken","id_token","clientID","clientSecret","apiKey"]});var wbr,z_,eFe=et(()=>{"use strict";wbr=["ACTUAL_STATE","ADVANCED_DEPLOY","APP","AUTH","BULK_WRITE","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","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"],z_={...Object.fromEntries(wbr.map(r=>[r,{level:"info"}]))}});var Hq,lEe,mE,Ogt=et(()=>{"use strict";Hq=(r,t,n,i,o)=>({orgID:r,workspaceID:t,userID:n,runID:i,nodeID:o}),lEe=(r,t)=>{r.runID=t},mE={}});var $ui=I(Xui=>{"use strict";Object.defineProperty(Xui,"__esModule",{value:!0})});var Rbr=I(Tgt=>{"use strict";Object.defineProperty(Tgt,"__esModule",{value:!0});Tgt.Failcode=void 0;Tgt.Failcode={TYPE_INCORRECT:"TYPE_INCORRECT",VALUE_INCORRECT:"VALUE_INCORRECT",KEY_INCORRECT:"KEY_INCORRECT",CONTENT_INCORRECT:"CONTENT_INCORRECT",ARGUMENT_INCORRECT:"ARGUMENT_INCORRECT",RETURN_INCORRECT:"RETURN_INCORRECT",CONSTRAINT_FAILED:"CONSTRAINT_FAILED",PROPERTY_MISSING:"PROPERTY_MISSING",PROPERTY_PRESENT:"PROPERTY_PRESENT",NOTHING_EXPECTED:"NOTHING_EXPECTED"}});var uEe=I(cEe=>{"use strict";var kel=cEe&&cEe.__extends||function(){var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(i[s]=o[s])},r(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(cEe,"__esModule",{value:!0});cEe.ValidationError=void 0;var Qel=function(r){kel(t,r);function t(n){var i=r.call(this,n.message)||this;return i.name="ValidationError",i.code=n.code,n.details!==void 0&&(i.details=n.details),Object.setPrototypeOf(i,t.prototype),i}return t}(Error);cEe.ValidationError=Qel});var tFe=I(Bbr=>{"use strict";Object.defineProperty(Bbr,"__esModule",{value:!0});var wgt=function(r){return function(t){switch(t.tag){case"literal":return'"'.concat(String(t.value),'"');case"string":return"string";case"brand":return t.brand;case"constraint":return t.name||wgt(r)(t.underlying);case"union":return t.alternatives.map(wgt(r)).join(" | ");case"intersect":return t.intersectees.map(wgt(r)).join(" & ");default:break}return"`${".concat(U_(!1,r)(t),"}`")}},Rgt=function(r){return function(t){switch(t.tag){case"literal":return String(t.value);case"brand":return"${".concat(t.brand,"}");case"constraint":return t.name?"${".concat(t.name,"}"):Rgt(r)(t.underlying);case"union":if(t.alternatives.length===1){var n=t.alternatives[0];return Rgt(r)(n.reflect)}break;case"intersect":if(t.intersectees.length===1){var n=t.intersectees[0];return Rgt(r)(n.reflect)}break;default:break}return"${".concat(U_(!1,r)(t),"}")}},U_=function(r,t){return function(n){var i=function(c){return r?"(".concat(c,")"):c};if(t.has(n))return i("CIRCULAR ".concat(n.tag));t.add(n);try{switch(n.tag){case"unknown":case"never":case"void":case"boolean":case"number":case"bigint":case"string":case"symbol":case"function":return n.tag;case"literal":{var o=n.value;return typeof o=="string"?'"'.concat(o,'"'):String(o)}case"template":{if(n.strings.length===0)return'""';if(n.strings.length===1)return'"'.concat(n.strings[0],'"');if(n.strings.length===2&&n.strings.every(function(c){return c===""})){var s=n.runtypes[0];return wgt(t)(s.reflect)}var a=!1,l=n.strings.reduce(function(c,d,p){var f=c+d,A=n.runtypes[p];if(A){var h=Rgt(t)(A.reflect);return!a&&h.startsWith("$")&&(a=!0),f+h}else return f},"");return a?"`".concat(l,"`"):'"'.concat(l,'"')}case"array":return"".concat(Zui(n)).concat(U_(!0,t)(n.element),"[]");case"dictionary":return"{ [_: ".concat(n.key,"]: ").concat(U_(!1,t)(n.value)," }");case"record":{var u=Object.keys(n.fields);return u.length?"{ ".concat(u.map(function(c){return"".concat(Zui(n)).concat(c).concat(Lel(n,c),": ").concat(n.fields[c].tag==="optional"?U_(!1,t)(n.fields[c].underlying):U_(!1,t)(n.fields[c]),";")}).join(" ")," }"):"{}"}case"tuple":return"[".concat(n.components.map(U_(!1,t)).join(", "),"]");case"union":return i("".concat(n.alternatives.map(U_(!0,t)).join(" | ")));case"intersect":return i("".concat(n.intersectees.map(U_(!0,t)).join(" & ")));case"optional":return U_(r,t)(n.underlying)+" | undefined";case"constraint":return n.name||U_(r,t)(n.underlying);case"instanceof":return n.ctor.name;case"brand":return U_(r,t)(n.entity)}}finally{t.delete(n)}throw Error("impossible")}};Bbr.default=U_(!1,new Set);function Lel(r,t){var n=r.isPartial,i=r.fields;return n||t!==void 0&&i[t].tag==="optional"?"?":""}function Zui(r){var t=r.isReadonly;return t?"readonly ":""}});var sf=I(Bd=>{"use strict";var xbr=Bd&&Bd.__assign||function(){return xbr=Object.assign||function(r){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r},xbr.apply(this,arguments)};Object.defineProperty(Bd,"__esModule",{value:!0});Bd.FAILURE=Bd.SUCCESS=Bd.enumerableKeysOf=Bd.typeOf=Bd.hasKey=void 0;var AN=Rbr(),Cle=tFe();function Fel(r,t){return typeof t=="object"&&t!==null&&r in t}Bd.hasKey=Fel;var qel=function(r){var t,n,i;return typeof r=="object"?r===null?"null":Array.isArray(r)?"array":((t=r.constructor)===null||t===void 0?void 0:t.name)==="Object"?"object":(i=(n=r.constructor)===null||n===void 0?void 0:n.name)!==null&&i!==void 0?i:typeof r:typeof r};Bd.typeOf=qel;var zel=function(r){return typeof r=="object"&&r!==null?Reflect.ownKeys(r).filter(function(t){var n,i;return(i=(n=r.propertyIsEnumerable)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:!0}):[]};Bd.enumerableKeysOf=zel;function Uel(r){return{success:!0,value:r}}Bd.SUCCESS=Uel;Bd.FAILURE=Object.assign(function(r,t,n){return xbr({success:!1,code:r,message:t},n?{details:n}:{})},{TYPE_INCORRECT:function(r,t){var n="Expected ".concat(r.tag==="template"?"string ".concat((0,Cle.default)(r)):(0,Cle.default)(r),", but was ").concat((0,Bd.typeOf)(t));return(0,Bd.FAILURE)(AN.Failcode.TYPE_INCORRECT,n)},VALUE_INCORRECT:function(r,t,n){return(0,Bd.FAILURE)(AN.Failcode.VALUE_INCORRECT,"Expected ".concat(r," ").concat(String(t),", but was ").concat(String(n)))},KEY_INCORRECT:function(r,t,n){return(0,Bd.FAILURE)(AN.Failcode.KEY_INCORRECT,"Expected ".concat((0,Cle.default)(r)," key to be ").concat((0,Cle.default)(t),", but was ").concat((0,Bd.typeOf)(n)))},CONTENT_INCORRECT:function(r,t){var n="Expected ".concat((0,Cle.default)(r),", but was incompatible");return(0,Bd.FAILURE)(AN.Failcode.CONTENT_INCORRECT,n,t)},ARGUMENT_INCORRECT:function(r){return(0,Bd.FAILURE)(AN.Failcode.ARGUMENT_INCORRECT,r)},RETURN_INCORRECT:function(r){return(0,Bd.FAILURE)(AN.Failcode.RETURN_INCORRECT,r)},CONSTRAINT_FAILED:function(r,t){var n=t?": ".concat(t):"";return(0,Bd.FAILURE)(AN.Failcode.CONSTRAINT_FAILED,"Failed constraint check for ".concat((0,Cle.default)(r)).concat(n))},PROPERTY_MISSING:function(r){var t="Expected ".concat((0,Cle.default)(r),", but was missing");return(0,Bd.FAILURE)(AN.Failcode.PROPERTY_MISSING,t)},PROPERTY_PRESENT:function(r){var t="Expected nothing, but was ".concat((0,Bd.typeOf)(r));return(0,Bd.FAILURE)(AN.Failcode.PROPERTY_PRESENT,t)},NOTHING_EXPECTED:function(r){var t="Expected nothing, but was ".concat((0,Bd.typeOf)(r));return(0,Bd.FAILURE)(AN.Failcode.NOTHING_EXPECTED,t)}})});var e0i=I(nY=>{"use strict";var jel=nY&&nY.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},Gel=nY&&nY.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))};Object.defineProperty(nY,"__esModule",{value:!0});nY.Contract=void 0;var Wel=uEe(),Hel=sf();function Vel(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=r.length-1,i=r.slice(0,n),o=r[n];return{enforce:function(s){return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];if(a.length<i.length){var u="Expected ".concat(i.length," arguments but only received ").concat(a.length),c=Hel.FAILURE.ARGUMENT_INCORRECT(u);throw new Wel.ValidationError(c)}for(var d=0;d<i.length;d++)i[d].check(a[d]);return o.check(s.apply(void 0,Gel([],jel(a),!1)))}}}}nY.Contract=Vel});var n0i=I(iY=>{"use strict";var Yel=iY&&iY.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},Kel=iY&&iY.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))};Object.defineProperty(iY,"__esModule",{value:!0});iY.AsyncContract=void 0;var t0i=uEe(),r0i=sf();function Jel(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=r.length-1,i=r.slice(0,n),o=r[n];return{enforce:function(s){return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];if(a.length<i.length){var u="Expected ".concat(i.length," arguments but only received ").concat(a.length),c=r0i.FAILURE.ARGUMENT_INCORRECT(u);throw new t0i.ValidationError(c)}for(var d=0;d<i.length;d++)i[d].check(a[d]);var p=s.apply(void 0,Kel([],Yel(a),!1));if(!(p instanceof Promise)){var u="Expected function to return a promise, but instead got ".concat(p),c=r0i.FAILURE.RETURN_INCORRECT(u);throw new t0i.ValidationError(c)}return p.then(o.check)}}}}iY.AsyncContract=Jel});var i0i=I(hN=>{"use strict";var Xel=hN&&hN.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$el=hN&&hN.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s};Object.defineProperty(hN,"__esModule",{value:!0});hN.when=hN.match=void 0;function Zel(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return function(n){var i,o;try{for(var s=Xel(r),a=s.next();!a.done;a=s.next()){var l=$el(a.value,2),u=l[0],c=l[1];if(u.guard(n))return c(n)}}catch(d){i={error:d}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}throw new Error("No alternatives were matched")}}hN.match=Zel;function etl(r,t){return[r,t]}hN.when=etl});var kA=I(sY=>{"use strict";Object.defineProperty(sY,"__esModule",{value:!0});sY.innerValidate=sY.create=sY.isRuntype=void 0;var oY=yE(),ttl=tFe(),rtl=uEe(),o0i=sf(),s0i=Symbol(),ntl=function(r){return(0,o0i.hasKey)(s0i,r)};sY.isRuntype=ntl;function itl(r,t){return t[s0i]=!0,t.check=n,t.assert=n,t._innerValidate=function(p,f){return f.has(p,t)?(0,o0i.SUCCESS)(p):r(p,f)},t.validate=function(p){return t._innerValidate(p,stl())},t.guard=i,t.Or=o,t.And=s,t.optional=a,t.nullable=l,t.withConstraint=u,t.withGuard=c,t.withBrand=d,t.reflect=t,t.toString=function(){return"Runtype<".concat((0,ttl.default)(t),">")},t;function n(p){var f=t.validate(p);if(f.success)return f.value;throw new rtl.ValidationError(f)}function i(p){return t.validate(p).success}function o(p){return(0,oY.Union)(t,p)}function s(p){return(0,oY.Intersect)(t,p)}function a(){return(0,oY.Optional)(t)}function l(){return(0,oY.Union)(t,oY.Null)}function u(p,f){return(0,oY.Constraint)(t,p,f)}function c(p,f){return(0,oY.Constraint)(t,p,f)}function d(p){return(0,oY.Brand)(p,t)}}sY.create=itl;function otl(r,t,n){return r._innerValidate(t,n)}sY.innerValidate=otl;function stl(){var r=new WeakMap,t=function(i,o){if(!(i===null||typeof i!="object")){var s=r.get(i);r.set(i,s?s.set(o,!0):new WeakMap().set(o,!0))}},n=function(i,o){var s=r.get(i),a=s&&s.get(o)||!1;return t(i,o),a};return{has:n}}});var xgt=I(Bgt=>{"use strict";Object.defineProperty(Bgt,"__esModule",{value:!0});Bgt.Unknown=void 0;var atl=kA(),ltl=sf(),ctl={tag:"unknown"};Bgt.Unknown=(0,atl.create)(function(r){return(0,ltl.SUCCESS)(r)},ctl)});var a0i=I(Mgt=>{"use strict";Object.defineProperty(Mgt,"__esModule",{value:!0});Mgt.Never=void 0;var utl=kA(),dtl=sf(),ptl={tag:"never"};Mgt.Never=(0,utl.create)(dtl.FAILURE.NOTHING_EXPECTED,ptl)});var l0i=I(Dgt=>{"use strict";Object.defineProperty(Dgt,"__esModule",{value:!0});Dgt.Void=void 0;var ftl=xgt();Dgt.Void=ftl.Unknown});var Mbr=I(dEe=>{"use strict";var Ngt=dEe&&dEe.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(dEe,"__esModule",{value:!0});dEe.Union=void 0;var Pgt=kA(),rFe=sf();function Atl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return function(a){for(var l=0;l<r.length;l++)if(r[l].guard(a))return o[l](a)}},i={tag:"union",alternatives:r,match:n};return(0,Pgt.create)(function(o,s){var a,l,u,c,d,p,f,A;if(typeof o!="object"||o===null){try{for(var h=Ngt(r),y=h.next();!y.done;y=h.next()){var C=y.value;if((0,Pgt.innerValidate)(C,o,s).success)return(0,rFe.SUCCESS)(o)}}catch(X){a={error:X}}finally{try{y&&!y.done&&(l=h.return)&&l.call(h)}finally{if(a)throw a.error}}return rFe.FAILURE.TYPE_INCORRECT(i,o)}var v={};try{for(var O=Ngt(r),w=O.next();!w.done;w=O.next()){var C=w.value;if(C.reflect.tag==="record"){var R=function(Y){var L=C.reflect.fields[Y];L.tag==="literal"&&(v[Y]?v[Y].every(function($){return $!==L.value})&&v[Y].push(L.value):v[Y]=[L.value])};for(var P in C.reflect.fields)R(P)}}}catch(X){u={error:X}}finally{try{w&&!w.done&&(c=O.return)&&c.call(O)}finally{if(u)throw u.error}}for(var P in v)if(v[P].length===r.length)try{for(var z=(d=void 0,Ngt(r)),H=z.next();!H.done;H=z.next()){var C=H.value;if(C.reflect.tag==="record"){var J=C.reflect.fields[P];if(J.tag==="literal"&&(0,rFe.hasKey)(P,o)&&o[P]===J.value)return(0,Pgt.innerValidate)(C,o,s)}}}catch(Y){d={error:Y}}finally{try{H&&!H.done&&(p=z.return)&&p.call(z)}finally{if(d)throw d.error}}try{for(var K=Ngt(r),V=K.next();!V.done;V=K.next()){var F=V.value;if((0,Pgt.innerValidate)(F,o,s).success)return(0,rFe.SUCCESS)(o)}}catch(X){f={error:X}}finally{try{V&&!V.done&&(A=K.return)&&A.call(K)}finally{if(f)throw f.error}}return rFe.FAILURE.TYPE_INCORRECT(i,o)},i)}dEe.Union=Atl});var Pbr=I(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});Vv.Nullish=Vv.Null=Vv.Undefined=Vv.Literal=Vv.literal=void 0;var htl=kA(),c0i=sf(),gtl=Mbr();function Dbr(r){return Array.isArray(r)?String(r.map(String)):typeof r=="bigint"?String(r)+"n":String(r)}Vv.literal=Dbr;function Nbr(r){var t={tag:"literal",value:r};return(0,htl.create)(function(n){return n===r?(0,c0i.SUCCESS)(n):c0i.FAILURE.VALUE_INCORRECT("literal","`".concat(Dbr(r),"`"),"`".concat(Dbr(n),"`"))},t)}Vv.Literal=Nbr;Vv.Undefined=Nbr(void 0);Vv.Null=Nbr(null);Vv.Nullish=(0,gtl.Union)(Vv.Null,Vv.Undefined)});var A0i=I(gN=>{"use strict";var aY=gN&&gN.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},kbr=gN&&gN.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))},u0i=gN&&gN.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(gN,"__esModule",{value:!0});gN.Template=void 0;var kgt=kA(),d0i=tFe(),Vq=sf(),f0i=Pbr(),Qbr=function(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},mtl=function(r){if(0<r.length&&Array.isArray(r[0])){var t=aY(r),n=t[0],i=t.slice(1);return[Array.from(n),i]}else{var o=r,n=o.reduce(function(l,u){return(0,kgt.isRuntype)(u)?l.push(""):l.push(l.pop()+String(u)),l},[""]),i=o.filter(kgt.isRuntype);return[n,i]}},ytl=function(r,t){for(var n=0;n<t.length;)switch(t[n].reflect.tag){case"literal":{var i=t[n];t.splice(n,1);var o=String(i.value);r.splice(n,2,r[n]+o+r[n+1]);break}case"template":{var s=t[n];t.splice.apply(t,kbr([n,1],aY(s.runtypes),!1));var a=s.strings;if(a.length===1)r.splice(n,2,r[n]+a[0]+r[n+1]);else{var l=a[0],u=a.slice(1,-1),c=a[a.length-1];r.splice.apply(r,kbr(kbr([n,2,r[n]+l],aY(u),!1),[c+r[n+1]],!1))}break}case"union":{var d=t[n];if(d.alternatives.length===1)try{var p=oFe(d);t.splice(n,1);var o=String(p.value);r.splice(n,2,r[n]+o+r[n+1]);break}catch{n++;break}else{n++;break}}case"intersect":{var f=t[n];if(f.intersectees.length===1)try{var A=oFe(f);t.splice(n,1);var o=String(A.value);r.splice(n,2,r[n]+o+r[n+1]);break}catch{n++;break}else{n++;break}}default:n++;break}},Etl=function(r){var t=aY(mtl(r),2),n=t[0],i=t[1];return ytl(n,i),[n,i]},oFe=function(r){switch(r.reflect.tag){case"literal":return r;case"brand":return oFe(r.reflect.entity);case"union":if(r.reflect.alternatives.length===1)return oFe(r.reflect.alternatives[0]);break;case"intersect":if(r.reflect.intersectees.length===1)return oFe(r.reflect.intersectees[0]);break;default:break}throw void 0},p0i=function(r){return r},Lbr={string:[function(r){return globalThis.String(r)},".*"],number:[function(r){return globalThis.Number(r)},"[+-]?(?:\\d*\\.\\d+|\\d+\\.\\d*|\\d+)(?:[Ee][+-]?\\d+)?","0[Bb][01]+","0[Oo][0-7]+","0[Xx][0-9A-Fa-f]+"],bigint:[function(r){return globalThis.BigInt(r)},"-?[1-9]d*"],boolean:[function(r){return r!=="false"},"true","false"],null:[function(){return null},"null"],undefined:[function(){},"undefined"]},nFe=function(r){switch(r.tag){case"literal":{var t=aY(Lbr[(0,Vq.typeOf)(r.value)]||[p0i],1),n=t[0];return n}case"brand":return nFe(r.entity);case"constraint":return nFe(r.underlying);case"union":return r.alternatives.map(nFe);case"intersect":return r.intersectees.map(nFe);default:var i=aY(Lbr[r.tag]||[p0i],1),o=i[0];return o}},Fbr=function(r,t){return function(n){var i,o,s,a,l=nFe(r);if(Array.isArray(l))switch(r.tag){case"union":try{for(var u=u0i(r.alternatives),c=u.next();!c.done;c=u.next()){var d=c.value,p=Fbr(d.reflect,t)(n);if(p.success)return p}}catch(C){i={error:C}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return Vq.FAILURE.TYPE_INCORRECT(r,n);case"intersect":try{for(var f=u0i(r.intersectees),A=f.next();!A.done;A=f.next()){var h=A.value,p=Fbr(h.reflect,t)(n);if(!p.success)return p}}catch(C){s={error:C}}finally{try{A&&!A.done&&(a=f.return)&&a.call(f)}finally{if(s)throw s.error}}return(0,Vq.SUCCESS)(n);default:throw Error("impossible")}else{var y=l,p=(0,kgt.innerValidate)(r,y(n),t);return!p.success&&p.code==="VALUE_INCORRECT"&&r.tag==="literal"?Vq.FAILURE.VALUE_INCORRECT("literal",'"'.concat((0,f0i.literal)(r.value),'"'),'"'.concat(n,'"')):p}}},iFe=function(r){switch(r.tag){case"literal":return Qbr(String(r.value));case"brand":return iFe(r.entity);case"constraint":return iFe(r.underlying);case"union":return r.alternatives.map(iFe).join("|");case"template":return r.strings.map(Qbr).reduce(function(i,o,s){var a=i+o,l=r.runtypes[s];return l?a+"(?:".concat(iFe(l.reflect),")"):a},"");default:var t=aY(Lbr[r.tag]||[void 0,".*"]),n=t.slice(1);return n.join("|")}},btl=function(r){var t=r.strings.map(Qbr).reduce(function(n,i,o){var s=n+i,a=r.runtypes[o];return a?s+"(".concat(iFe(a.reflect),")"):s},"");return new RegExp("^".concat(t,"$"),"su")};function Ctl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=aY(Etl(r),2),i=n[0],o=n[1],s={tag:"template",strings:i,runtypes:o},a=btl(s),l=function(u,c){var d=u.match(a);if(d){for(var p=d.slice(1),f=0;f<o.length;f++){var A=o[f],h=p[f],y=Fbr(A.reflect,c)(h);if(!y.success)return y}return(0,Vq.SUCCESS)(u)}else return Vq.FAILURE.VALUE_INCORRECT("string","".concat((0,d0i.default)(s)),'"'.concat((0,f0i.literal)(u),'"'))};return(0,kgt.create)(function(u,c){if(typeof u!="string")return Vq.FAILURE.TYPE_INCORRECT(s,u);var d=l(u,c);if(d.success)return(0,Vq.SUCCESS)(u);var p=Vq.FAILURE.VALUE_INCORRECT("string","".concat((0,d0i.default)(s)),'"'.concat(u,'"'));return p.message!==d.message&&(p.message+=" (inner: ".concat(d.message,")")),p},s)}gN.Template=Ctl});var m0i=I(Qgt=>{"use strict";Object.defineProperty(Qgt,"__esModule",{value:!0});Qgt.Boolean=void 0;var Itl=kA(),h0i=sf(),g0i={tag:"boolean"};Qgt.Boolean=(0,Itl.create)(function(r){return typeof r=="boolean"?(0,h0i.SUCCESS)(r):h0i.FAILURE.TYPE_INCORRECT(g0i,r)},g0i)});var b0i=I(Lgt=>{"use strict";Object.defineProperty(Lgt,"__esModule",{value:!0});Lgt.Number=void 0;var vtl=kA(),y0i=sf(),E0i={tag:"number"};Lgt.Number=(0,vtl.create)(function(r){return typeof r=="number"?(0,y0i.SUCCESS)(r):y0i.FAILURE.TYPE_INCORRECT(E0i,r)},E0i)});var v0i=I(Fgt=>{"use strict";Object.defineProperty(Fgt,"__esModule",{value:!0});Fgt.BigInt=void 0;var Stl=kA(),C0i=sf(),I0i={tag:"bigint"};Fgt.BigInt=(0,Stl.create)(function(r){return typeof r=="bigint"?(0,C0i.SUCCESS)(r):C0i.FAILURE.TYPE_INCORRECT(I0i,r)},I0i)});var qbr=I(qgt=>{"use strict";Object.defineProperty(qgt,"__esModule",{value:!0});qgt.String=void 0;var _tl=kA(),S0i=sf(),_0i={tag:"string"};qgt.String=(0,_tl.create)(function(r){return typeof r=="string"?(0,S0i.SUCCESS)(r):S0i.FAILURE.TYPE_INCORRECT(_0i,r)},_0i)});var R0i=I(zgt=>{"use strict";Object.defineProperty(zgt,"__esModule",{value:!0});zgt.Symbol=void 0;var w0i=kA(),sFe=sf(),Otl=function(r){var t={tag:"symbol",key:r};return(0,w0i.create)(function(n){if(typeof n!="symbol")return sFe.FAILURE.TYPE_INCORRECT(t,n);var i=globalThis.Symbol.keyFor(n);return i!==r?sFe.FAILURE.VALUE_INCORRECT("symbol key",T0i(r),T0i(i)):(0,sFe.SUCCESS)(n)},t)},O0i={tag:"symbol"};zgt.Symbol=(0,w0i.create)(function(r){return typeof r=="symbol"?(0,sFe.SUCCESS)(r):sFe.FAILURE.TYPE_INCORRECT(O0i,r)},Object.assign(Otl,O0i));var T0i=function(r){return r===void 0?"undefined":'"'.concat(r,'"')}});var M0i=I(Ugt=>{"use strict";Object.defineProperty(Ugt,"__esModule",{value:!0});Ugt.Array=void 0;var B0i=kA(),aFe=sf();function x0i(r,t){var n={tag:"array",isReadonly:t,element:r};return wtl((0,B0i.create)(function(i,o){if(!Array.isArray(i))return aFe.FAILURE.TYPE_INCORRECT(n,i);var s=(0,aFe.enumerableKeysOf)(i),a=s.map(function(u){return(0,B0i.innerValidate)(r,i[u],o)}),l=s.reduce(function(u,c){var d=a[c];return d.success||(u[c]=d.details||d.message),u},[]);return(0,aFe.enumerableKeysOf)(l).length!==0?aFe.FAILURE.CONTENT_INCORRECT(n,l):(0,aFe.SUCCESS)(i)},n))}function Ttl(r){return x0i(r,!1)}Ugt.Array=Ttl;function wtl(r){return r.asReadonly=t,r;function t(){return x0i(r.element,!0)}}});var N0i=I(jgt=>{"use strict";Object.defineProperty(jgt,"__esModule",{value:!0});jgt.Tuple=void 0;var D0i=kA(),pEe=sf();function Rtl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n={tag:"tuple",components:r};return(0,D0i.create)(function(i,o){if(!Array.isArray(i))return pEe.FAILURE.TYPE_INCORRECT(n,i);if(i.length!==r.length)return pEe.FAILURE.CONSTRAINT_FAILED(n,"Expected length ".concat(r.length,", but was ").concat(i.length));var s=(0,pEe.enumerableKeysOf)(i),a=s.map(function(u){return(0,D0i.innerValidate)(r[u],i[u],o)}),l=s.reduce(function(u,c){var d=a[c];return d.success||(u[c]=d.details||d.message),u},[]);return(0,pEe.enumerableKeysOf)(l).length!==0?pEe.FAILURE.CONTENT_INCORRECT(n,l):(0,pEe.SUCCESS)(i)},n)}jgt.Tuple=Rtl});var k0i=I(tw=>{"use strict";var zbr=tw&&tw.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},Ubr=tw&&tw.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))};Object.defineProperty(tw,"__esModule",{value:!0});tw.Partial=tw.Record=tw.InternalRecord=void 0;var P0i=kA(),Yv=sf();function lY(r,t,n){var i={tag:"record",isPartial:t,isReadonly:n,fields:r};return Mtl((0,P0i.create)(function(o,s){if(o==null)return Yv.FAILURE.TYPE_INCORRECT(i,o);var a=(0,Yv.enumerableKeysOf)(r);if(a.length!==0&&typeof o!="object")return Yv.FAILURE.TYPE_INCORRECT(i,o);var l=Ubr([],zbr(new Set(Ubr(Ubr([],zbr(a),!1),zbr((0,Yv.enumerableKeysOf)(o)),!1))),!1),u=l.reduce(function(d,p){var f=(0,Yv.hasKey)(p,r),A=(0,Yv.hasKey)(p,o);if(f){var h=r[p],y=t||h.reflect.tag==="optional";if(A){var C=o[p];y&&C===void 0?d[p]=(0,Yv.SUCCESS)(C):d[p]=(0,P0i.innerValidate)(h,C,s)}else y?d[p]=(0,Yv.SUCCESS)(void 0):d[p]=Yv.FAILURE.PROPERTY_MISSING(h.reflect)}else if(A){var C=o[p];d[p]=(0,Yv.SUCCESS)(C)}else throw new Error("impossible");return d},{}),c=l.reduce(function(d,p){var f=u[p];return f.success||(d[p]=f.details||f.message),d},{});return(0,Yv.enumerableKeysOf)(c).length!==0?Yv.FAILURE.CONTENT_INCORRECT(i,c):(0,Yv.SUCCESS)(o)},i))}tw.InternalRecord=lY;function Btl(r){return lY(r,!1,!1)}tw.Record=Btl;function xtl(r){return lY(r,!0,!1)}tw.Partial=xtl;function Mtl(r){return r.asPartial=t,r.asReadonly=n,r.pick=i,r.omit=o,r.extend=s,r;function t(){return lY(r.fields,!0,r.isReadonly)}function n(){return lY(r.fields,r.isPartial,!0)}function i(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];var u={};return a.forEach(function(c){u[c]=r.fields[c]}),lY(u,r.isPartial,r.isReadonly)}function o(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];var u={},c=(0,Yv.enumerableKeysOf)(r.fields);return c.forEach(function(d){a.includes(d)||(u[d]=r.fields[d])}),lY(u,r.isPartial,r.isReadonly)}function s(a){return lY(Object.assign({},r.fields,a),r.isPartial,r.isReadonly)}}});var Gbr=I(fEe=>{"use strict";Object.defineProperty(fEe,"__esModule",{value:!0});fEe.Guard=fEe.Constraint=void 0;var Dtl=kA(),jbr=sf(),Ntl=xgt();function Ptl(r,t,n){var i=n&&n.name,o=n&&n.args,s={tag:"constraint",underlying:r,constraint:t,name:i,args:o};return(0,Dtl.create)(function(a){var l=r.validate(a);if(!l.success)return l;var u=t(l.value);return typeof u=="string"?jbr.FAILURE.CONSTRAINT_FAILED(s,u):u?(0,jbr.SUCCESS)(l.value):jbr.FAILURE.CONSTRAINT_FAILED(s)},s)}fEe.Constraint=Ptl;var ktl=function(r,t){return Ntl.Unknown.withGuard(r,t)};fEe.Guard=ktl});var L0i=I(Ggt=>{"use strict";Object.defineProperty(Ggt,"__esModule",{value:!0});Ggt.Dictionary=void 0;var Q0i=kA(),Wbr=qbr(),Qtl=Gbr(),Ltl=tFe(),Ile=sf(),Ftl=(0,Qtl.Constraint)(Wbr.String,function(r){return!isNaN(+r)},{name:"number"});function qtl(r,t){var n=t===void 0||t==="string"?Wbr.String:t==="number"?Ftl:t,i=(0,Ltl.default)(n),o={tag:"dictionary",key:i,value:r};return(0,Q0i.create)(function(s,a){if(s==null||typeof s!="object"||Object.getPrototypeOf(s)!==Object.prototype&&(!Array.isArray(s)||i==="string"))return Ile.FAILURE.TYPE_INCORRECT(o,s);var l=/^(?:NaN|-?\d+(?:\.\d+)?)$/,u=(0,Ile.enumerableKeysOf)(s),c=u.reduce(function(p,f){var A=typeof f=="string"&&l.test(f),h=A?globalThis.Number(f):f;return(A?!n.guard(h)&&!n.guard(f):!n.guard(h))?p[f]=Ile.FAILURE.KEY_INCORRECT(o,n.reflect,h):p[f]=(0,Q0i.innerValidate)(r,s[f],a),p},{}),d=u.reduce(function(p,f){var A=c[f];return A.success||(p[f]=A.details||A.message),p},{});return(0,Ile.enumerableKeysOf)(d).length!==0?Ile.FAILURE.CONTENT_INCORRECT(o,d):(0,Ile.SUCCESS)(s)},o)}Ggt.Dictionary=qtl});var q0i=I(AEe=>{"use strict";var ztl=AEe&&AEe.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(AEe,"__esModule",{value:!0});AEe.Intersect=void 0;var F0i=kA(),Utl=sf();function jtl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n={tag:"intersect",intersectees:r};return(0,F0i.create)(function(i,o){var s,a;try{for(var l=ztl(r),u=l.next();!u.done;u=l.next()){var c=u.value,d=(0,F0i.innerValidate)(c,i,o);if(!d.success)return d}}catch(p){s={error:p}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(s)throw s.error}}return(0,Utl.SUCCESS)(i)},n)}AEe.Intersect=jtl});var z0i=I(Wgt=>{"use strict";Object.defineProperty(Wgt,"__esModule",{value:!0});Wgt.Optional=void 0;var Gtl=kA(),Wtl=sf();function Htl(r){var t={tag:"optional",underlying:r};return(0,Gtl.create)(function(n){return n===void 0?(0,Wtl.SUCCESS)(n):r.validate(n)},t)}Wgt.Optional=Htl});var G0i=I(Hgt=>{"use strict";Object.defineProperty(Hgt,"__esModule",{value:!0});Hgt.Function=void 0;var Vtl=kA(),U0i=sf(),j0i={tag:"function"};Hgt.Function=(0,Vtl.create)(function(r){return typeof r=="function"?(0,U0i.SUCCESS)(r):U0i.FAILURE.TYPE_INCORRECT(j0i,r)},j0i)});var H0i=I(Vgt=>{"use strict";Object.defineProperty(Vgt,"__esModule",{value:!0});Vgt.InstanceOf=void 0;var Ytl=kA(),W0i=sf();function Ktl(r){var t={tag:"instanceof",ctor:r};return(0,Ytl.create)(function(n){return n instanceof r?(0,W0i.SUCCESS)(n):W0i.FAILURE.TYPE_INCORRECT(t,n)},t)}Vgt.InstanceOf=Ktl});var V0i=I(Ygt=>{"use strict";Object.defineProperty(Ygt,"__esModule",{value:!0});Ygt.Lazy=void 0;var Jtl=kA();function Xtl(r){var t={get tag(){return i().tag}},n;function i(){if(!n){n=r();for(var o in n)o!=="tag"&&(t[o]=n[o])}return n}return(0,Jtl.create)(function(o){return i().validate(o)},t)}Ygt.Lazy=Xtl});var Y0i=I(Kgt=>{"use strict";Object.defineProperty(Kgt,"__esModule",{value:!0});Kgt.Brand=void 0;var $tl=kA();function Ztl(r,t){var n={tag:"brand",brand:r,entity:t};return(0,$tl.create)(function(i){return t.validate(i)},n)}Kgt.Brand=Ztl});var K0i=I(hEe=>{"use strict";Object.defineProperty(hEe,"__esModule",{value:!0});hEe.checked=hEe.check=void 0;var erl=uEe(),trl=sf(),Hbr=new WeakMap;function rrl(r,t,n){var i=Hbr.get(r)||new Map;Hbr.set(r,i);var o=i.get(t)||[];i.set(t,o),o.push(n)}hEe.check=rrl;function nrl(r,t,n){var i=Hbr.get(r),o=i&&i.get(t);if(o)return o;for(var s=[],a=0;a<n;a++)s.push(a);return s}function irl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(r.length===0)throw new Error("No runtype provided to `@checked`. Please remove the decorator.");return function(n,i,o){var s=o.value,a=(n.name||n.constructor.name+".prototype")+(typeof i=="string"?'["'.concat(i,'"]'):"[".concat(String(i),"]")),l=nrl(n,i,r.length);if(l.length!==r.length)throw new Error("Number of `@checked` runtypes and @check parameters not matched.");if(l.length>s.length)throw new Error("Number of `@checked` runtypes exceeds actual parameter length.");o.value=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return r.forEach(function(d,p){var f=l[p],A=d.validate(u[f]);if(!A.success){var h="".concat(a,", argument #").concat(f,": ").concat(A.message),y=trl.FAILURE.ARGUMENT_INCORRECT(h);throw new erl.ValidationError(y)}}),s.apply(this,u)}}}hEe.checked=irl});var yE=I(yl=>{"use strict";var orl=yl&&yl.__createBinding||(Object.create?function(r,t,n,i){i===void 0&&(i=n),Object.defineProperty(r,i,{enumerable:!0,get:function(){return t[n]}})}:function(r,t,n,i){i===void 0&&(i=n),r[i]=t[n]}),ep=yl&&yl.__exportStar||function(r,t){for(var n in r)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&orl(t,r,n)};Object.defineProperty(yl,"__esModule",{value:!0});yl.InstanceOf=yl.Nullish=yl.Null=yl.Undefined=yl.Literal=void 0;ep($ui(),yl);ep(Rbr(),yl);ep(e0i(),yl);ep(n0i(),yl);ep(i0i(),yl);ep(uEe(),yl);ep(xgt(),yl);ep(a0i(),yl);ep(l0i(),yl);var Jgt=Pbr();Object.defineProperty(yl,"Literal",{enumerable:!0,get:function(){return Jgt.Literal}});Object.defineProperty(yl,"Undefined",{enumerable:!0,get:function(){return Jgt.Undefined}});Object.defineProperty(yl,"Null",{enumerable:!0,get:function(){return Jgt.Null}});Object.defineProperty(yl,"Nullish",{enumerable:!0,get:function(){return Jgt.Nullish}});ep(A0i(),yl);ep(m0i(),yl);ep(b0i(),yl);ep(v0i(),yl);ep(qbr(),yl);ep(R0i(),yl);ep(M0i(),yl);ep(N0i(),yl);ep(k0i(),yl);ep(L0i(),yl);ep(Mbr(),yl);ep(q0i(),yl);ep(z0i(),yl);ep(G0i(),yl);var srl=H0i();Object.defineProperty(yl,"InstanceOf",{enumerable:!0,get:function(){return srl.InstanceOf}});ep(V0i(),yl);ep(Gbr(),yl);ep(Y0i(),yl);ep(K0i(),yl)});var lFe=I((zMd,J0i)=>{var arl="2.0.0",lrl=Number.MAX_SAFE_INTEGER||9007199254740991,crl=16,url=250,drl=["major","premajor","minor","preminor","patch","prepatch","prerelease"];J0i.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:crl,MAX_SAFE_BUILD_LENGTH:url,MAX_SAFE_INTEGER:lrl,RELEASE_TYPES:drl,SEMVER_SPEC_VERSION:arl,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var cFe=I((UMd,X0i)=>{var prl=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};X0i.exports=prl});var gEe=I((Yq,$0i)=>{var{MAX_SAFE_COMPONENT_LENGTH:Vbr,MAX_SAFE_BUILD_LENGTH:frl,MAX_LENGTH:Arl}=lFe(),hrl=cFe();Yq=$0i.exports={};var grl=Yq.re=[],mrl=Yq.safeRe=[],cs=Yq.src=[],us=Yq.t={},yrl=0,Ybr="[a-zA-Z0-9-]",Erl=[["\\s",1],["\\d",Arl],[Ybr,frl]],brl=r=>{for(let[t,n]of Erl)r=r.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return r},oc=(r,t,n)=>{let i=brl(t),o=yrl++;hrl(r,o,t),us[r]=o,cs[o]=t,grl[o]=new RegExp(t,n?"g":void 0),mrl[o]=new RegExp(i,n?"g":void 0)};oc("NUMERICIDENTIFIER","0|[1-9]\\d*");oc("NUMERICIDENTIFIERLOOSE","\\d+");oc("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ybr}*`);oc("MAINVERSION",`(${cs[us.NUMERICIDENTIFIER]})\\.(${cs[us.NUMERICIDENTIFIER]})\\.(${cs[us.NUMERICIDENTIFIER]})`);oc("MAINVERSIONLOOSE",`(${cs[us.NUMERICIDENTIFIERLOOSE]})\\.(${cs[us.NUMERICIDENTIFIERLOOSE]})\\.(${cs[us.NUMERICIDENTIFIERLOOSE]})`);oc("PRERELEASEIDENTIFIER",`(?:${cs[us.NUMERICIDENTIFIER]}|${cs[us.NONNUMERICIDENTIFIER]})`);oc("PRERELEASEIDENTIFIERLOOSE",`(?:${cs[us.NUMERICIDENTIFIERLOOSE]}|${cs[us.NONNUMERICIDENTIFIER]})`);oc("PRERELEASE",`(?:-(${cs[us.PRERELEASEIDENTIFIER]}(?:\\.${cs[us.PRERELEASEIDENTIFIER]})*))`);oc("PRERELEASELOOSE",`(?:-?(${cs[us.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${cs[us.PRERELEASEIDENTIFIERLOOSE]})*))`);oc("BUILDIDENTIFIER",`${Ybr}+`);oc("BUILD",`(?:\\+(${cs[us.BUILDIDENTIFIER]}(?:\\.${cs[us.BUILDIDENTIFIER]})*))`);oc("FULLPLAIN",`v?${cs[us.MAINVERSION]}${cs[us.PRERELEASE]}?${cs[us.BUILD]}?`);oc("FULL",`^${cs[us.FULLPLAIN]}$`);oc("LOOSEPLAIN",`[v=\\s]*${cs[us.MAINVERSIONLOOSE]}${cs[us.PRERELEASELOOSE]}?${cs[us.BUILD]}?`);oc("LOOSE",`^${cs[us.LOOSEPLAIN]}$`);oc("GTLT","((?:<|>)?=?)");oc("XRANGEIDENTIFIERLOOSE",`${cs[us.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);oc("XRANGEIDENTIFIER",`${cs[us.NUMERICIDENTIFIER]}|x|X|\\*`);oc("XRANGEPLAIN",`[v=\\s]*(${cs[us.XRANGEIDENTIFIER]})(?:\\.(${cs[us.XRANGEIDENTIFIER]})(?:\\.(${cs[us.XRANGEIDENTIFIER]})(?:${cs[us.PRERELEASE]})?${cs[us.BUILD]}?)?)?`);oc("XRANGEPLAINLOOSE",`[v=\\s]*(${cs[us.XRANGEIDENTIFIERLOOSE]})(?:\\.(${cs[us.XRANGEIDENTIFIERLOOSE]})(?:\\.(${cs[us.XRANGEIDENTIFIERLOOSE]})(?:${cs[us.PRERELEASELOOSE]})?${cs[us.BUILD]}?)?)?`);oc("XRANGE",`^${cs[us.GTLT]}\\s*${cs[us.XRANGEPLAIN]}$`);oc("XRANGELOOSE",`^${cs[us.GTLT]}\\s*${cs[us.XRANGEPLAINLOOSE]}$`);oc("COERCE",`(^|[^\\d])(\\d{1,${Vbr}})(?:\\.(\\d{1,${Vbr}}))?(?:\\.(\\d{1,${Vbr}}))?(?:$|[^\\d])`);oc("COERCERTL",cs[us.COERCE],!0);oc("LONETILDE","(?:~>?)");oc("TILDETRIM",`(\\s*)${cs[us.LONETILDE]}\\s+`,!0);Yq.tildeTrimReplace="$1~";oc("TILDE",`^${cs[us.LONETILDE]}${cs[us.XRANGEPLAIN]}$`);oc("TILDELOOSE",`^${cs[us.LONETILDE]}${cs[us.XRANGEPLAINLOOSE]}$`);oc("LONECARET","(?:\\^)");oc("CARETTRIM",`(\\s*)${cs[us.LONECARET]}\\s+`,!0);Yq.caretTrimReplace="$1^";oc("CARET",`^${cs[us.LONECARET]}${cs[us.XRANGEPLAIN]}$`);oc("CARETLOOSE",`^${cs[us.LONECARET]}${cs[us.XRANGEPLAINLOOSE]}$`);oc("COMPARATORLOOSE",`^${cs[us.GTLT]}\\s*(${cs[us.LOOSEPLAIN]})$|^$`);oc("COMPARATOR",`^${cs[us.GTLT]}\\s*(${cs[us.FULLPLAIN]})$|^$`);oc("COMPARATORTRIM",`(\\s*)${cs[us.GTLT]}\\s*(${cs[us.LOOSEPLAIN]}|${cs[us.XRANGEPLAIN]})`,!0);Yq.comparatorTrimReplace="$1$2$3";oc("HYPHENRANGE",`^\\s*(${cs[us.XRANGEPLAIN]})\\s+-\\s+(${cs[us.XRANGEPLAIN]})\\s*$`);oc("HYPHENRANGELOOSE",`^\\s*(${cs[us.XRANGEPLAINLOOSE]})\\s+-\\s+(${cs[us.XRANGEPLAINLOOSE]})\\s*$`);oc("STAR","(<|>)?=?\\s*\\*");oc("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");oc("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Xgt=I((jMd,Z0i)=>{var Crl=Object.freeze({loose:!0}),Irl=Object.freeze({}),vrl=r=>r?typeof r!="object"?Crl:r:Irl;Z0i.exports=vrl});var Kbr=I((GMd,rdi)=>{var edi=/^[0-9]+$/,tdi=(r,t)=>{let n=edi.test(r),i=edi.test(t);return n&&i&&(r=+r,t=+t),r===t?0:n&&!i?-1:i&&!n?1:r<t?-1:1},Srl=(r,t)=>tdi(t,r);rdi.exports={compareIdentifiers:tdi,rcompareIdentifiers:Srl}});var tb=I((WMd,sdi)=>{var $gt=cFe(),{MAX_LENGTH:ndi,MAX_SAFE_INTEGER:Zgt}=lFe(),{safeRe:idi,t:odi}=gEe(),_rl=Xgt(),{compareIdentifiers:mEe}=Kbr(),Jbr=class r{constructor(t,n){if(n=_rl(n),t instanceof r){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>ndi)throw new TypeError(`version is longer than ${ndi} characters`);$gt("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=t.trim().match(n.loose?idi[odi.LOOSE]:idi[odi.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Zgt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zgt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zgt||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let s=+o;if(s>=0&&s<Zgt)return s}return o}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if($gt("SemVer.compare",this.version,this.options,t),!(t instanceof r)){if(typeof t=="string"&&t===this.version)return 0;t=new r(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof r||(t=new r(t,this.options)),mEe(this.major,t.major)||mEe(this.minor,t.minor)||mEe(this.patch,t.patch)}comparePre(t){if(t instanceof r||(t=new r(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],o=t.prerelease[n];if($gt("prerelease compare",n,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return mEe(i,o)}while(++n)}compareBuild(t){t instanceof r||(t=new r(t,this.options));let n=0;do{let i=this.build[n],o=t.build[n];if($gt("prerelease compare",n,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return mEe(i,o)}while(++n)}inc(t,n,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let o=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[o];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(n){let s=[n,o];i===!1&&(s=[n]),mEe(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};sdi.exports=Jbr});var vle=I((HMd,ldi)=>{var adi=tb(),Orl=(r,t,n=!1)=>{if(r instanceof adi)return r;try{return new adi(r,t)}catch(i){if(!n)return null;throw i}};ldi.exports=Orl});var udi=I((VMd,cdi)=>{var Trl=vle(),wrl=(r,t)=>{let n=Trl(r,t);return n?n.version:null};cdi.exports=wrl});var pdi=I((YMd,ddi)=>{var Rrl=vle(),Brl=(r,t)=>{let n=Rrl(r.trim().replace(/^[=v]+/,""),t);return n?n.version:null};ddi.exports=Brl});var hdi=I((KMd,Adi)=>{var fdi=tb(),xrl=(r,t,n,i,o)=>{typeof n=="string"&&(o=i,i=n,n=void 0);try{return new fdi(r instanceof fdi?r.version:r,n).inc(t,i,o).version}catch{return null}};Adi.exports=xrl});var ydi=I((JMd,mdi)=>{var gdi=vle(),Mrl=(r,t)=>{let n=gdi(r,null,!0),i=gdi(t,null,!0),o=n.compare(i);if(o===0)return null;let s=o>0,a=s?n:i,l=s?i:n,u=!!a.prerelease.length;if(!!l.prerelease.length&&!u)return!l.patch&&!l.minor?"major":a.patch?"patch":a.minor?"minor":"major";let d=u?"pre":"";return n.major!==i.major?d+"major":n.minor!==i.minor?d+"minor":n.patch!==i.patch?d+"patch":"prerelease"};mdi.exports=Mrl});var bdi=I((XMd,Edi)=>{var Drl=tb(),Nrl=(r,t)=>new Drl(r,t).major;Edi.exports=Nrl});var Idi=I(($Md,Cdi)=>{var Prl=tb(),krl=(r,t)=>new Prl(r,t).minor;Cdi.exports=krl});var Sdi=I((ZMd,vdi)=>{var Qrl=tb(),Lrl=(r,t)=>new Qrl(r,t).patch;vdi.exports=Lrl});var Odi=I((eDd,_di)=>{var Frl=vle(),qrl=(r,t)=>{let n=Frl(r,t);return n&&n.prerelease.length?n.prerelease:null};_di.exports=qrl});var rw=I((tDd,wdi)=>{var Tdi=tb(),zrl=(r,t,n)=>new Tdi(r,n).compare(new Tdi(t,n));wdi.exports=zrl});var Bdi=I((rDd,Rdi)=>{var Url=rw(),jrl=(r,t,n)=>Url(t,r,n);Rdi.exports=jrl});var Mdi=I((nDd,xdi)=>{var Grl=rw(),Wrl=(r,t)=>Grl(r,t,!0);xdi.exports=Wrl});var emt=I((iDd,Ndi)=>{var Ddi=tb(),Hrl=(r,t,n)=>{let i=new Ddi(r,n),o=new Ddi(t,n);return i.compare(o)||i.compareBuild(o)};Ndi.exports=Hrl});var kdi=I((oDd,Pdi)=>{var Vrl=emt(),Yrl=(r,t)=>r.sort((n,i)=>Vrl(n,i,t));Pdi.exports=Yrl});var Ldi=I((sDd,Qdi)=>{var Krl=emt(),Jrl=(r,t)=>r.sort((n,i)=>Krl(i,n,t));Qdi.exports=Jrl});var uFe=I((aDd,Fdi)=>{var Xrl=rw(),$rl=(r,t,n)=>Xrl(r,t,n)>0;Fdi.exports=$rl});var tmt=I((lDd,qdi)=>{var Zrl=rw(),enl=(r,t,n)=>Zrl(r,t,n)<0;qdi.exports=enl});var Xbr=I((cDd,zdi)=>{var tnl=rw(),rnl=(r,t,n)=>tnl(r,t,n)===0;zdi.exports=rnl});var $br=I((uDd,Udi)=>{var nnl=rw(),inl=(r,t,n)=>nnl(r,t,n)!==0;Udi.exports=inl});var rmt=I((dDd,jdi)=>{var onl=rw(),snl=(r,t,n)=>onl(r,t,n)>=0;jdi.exports=snl});var nmt=I((pDd,Gdi)=>{var anl=rw(),lnl=(r,t,n)=>anl(r,t,n)<=0;Gdi.exports=lnl});var Zbr=I((fDd,Wdi)=>{var cnl=Xbr(),unl=$br(),dnl=uFe(),pnl=rmt(),fnl=tmt(),Anl=nmt(),hnl=(r,t,n,i)=>{switch(t){case"===":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r===n;case"!==":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r!==n;case"":case"=":case"==":return cnl(r,n,i);case"!=":return unl(r,n,i);case">":return dnl(r,n,i);case">=":return pnl(r,n,i);case"<":return fnl(r,n,i);case"<=":return Anl(r,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};Wdi.exports=hnl});var Vdi=I((ADd,Hdi)=>{var gnl=tb(),mnl=vle(),{safeRe:imt,t:omt}=gEe(),ynl=(r,t)=>{if(r instanceof gnl)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;t=t||{};let n=null;if(!t.rtl)n=r.match(imt[omt.COERCE]);else{let i;for(;(i=imt[omt.COERCERTL].exec(r))&&(!n||n.index+n[0].length!==r.length);)(!n||i.index+i[0].length!==n.index+n[0].length)&&(n=i),imt[omt.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;imt[omt.COERCERTL].lastIndex=-1}return n===null?null:mnl(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};Hdi.exports=ynl});var Kdi=I((hDd,Ydi)=>{"use strict";Ydi.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}});var eCr=I((gDd,Jdi)=>{"use strict";Jdi.exports=d0;d0.Node=Sle;d0.create=d0;function d0(r){var t=this;if(t instanceof d0||(t=new d0),t.tail=null,t.head=null,t.length=0,r&&typeof r.forEach=="function")r.forEach(function(o){t.push(o)});else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}d0.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var t=r.next,n=r.prev;return t&&(t.prev=n),n&&(n.next=t),r===this.head&&(this.head=t),r===this.tail&&(this.tail=n),r.list.length--,r.next=null,r.prev=null,r.list=null,t};d0.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var t=this.head;r.list=this,r.next=t,t&&(t.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};d0.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var t=this.tail;r.list=this,r.prev=t,t&&(t.next=r),this.tail=r,this.head||(this.head=r),this.length++}};d0.prototype.push=function(){for(var r=0,t=arguments.length;r<t;r++)bnl(this,arguments[r]);return this.length};d0.prototype.unshift=function(){for(var r=0,t=arguments.length;r<t;r++)Cnl(this,arguments[r]);return this.length};d0.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};d0.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};d0.prototype.forEach=function(r,t){t=t||this;for(var n=this.head,i=0;n!==null;i++)r.call(t,n.value,i,this),n=n.next};d0.prototype.forEachReverse=function(r,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--)r.call(t,n.value,i,this),n=n.prev};d0.prototype.get=function(r){for(var t=0,n=this.head;n!==null&&t<r;t++)n=n.next;if(t===r&&n!==null)return n.value};d0.prototype.getReverse=function(r){for(var t=0,n=this.tail;n!==null&&t<r;t++)n=n.prev;if(t===r&&n!==null)return n.value};d0.prototype.map=function(r,t){t=t||this;for(var n=new d0,i=this.head;i!==null;)n.push(r.call(t,i.value,this)),i=i.next;return n};d0.prototype.mapReverse=function(r,t){t=t||this;for(var n=new d0,i=this.tail;i!==null;)n.push(r.call(t,i.value,this)),i=i.prev;return n};d0.prototype.reduce=function(r,t){var n,i=this.head;if(arguments.length>1)n=t;else if(this.head)i=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;i!==null;o++)n=r(n,i.value,o),i=i.next;return n};d0.prototype.reduceReverse=function(r,t){var n,i=this.tail;if(arguments.length>1)n=t;else if(this.tail)i=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;i!==null;o--)n=r(n,i.value,o),i=i.prev;return n};d0.prototype.toArray=function(){for(var r=new Array(this.length),t=0,n=this.head;n!==null;t++)r[t]=n.value,n=n.next;return r};d0.prototype.toArrayReverse=function(){for(var r=new Array(this.length),t=0,n=this.tail;n!==null;t++)r[t]=n.value,n=n.prev;return r};d0.prototype.slice=function(r,t){t=t||this.length,t<0&&(t+=this.length),r=r||0,r<0&&(r+=this.length);var n=new d0;if(t<r||t<0)return n;r<0&&(r=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(;o!==null&&i<t;i++,o=o.next)n.push(o.value);return n};d0.prototype.sliceReverse=function(r,t){t=t||this.length,t<0&&(t+=this.length),r=r||0,r<0&&(r+=this.length);var n=new d0;if(t<r||t<0)return n;r<0&&(r=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;o!==null&&i>t;i--)o=o.prev;for(;o!==null&&i>r;i--,o=o.prev)n.push(o.value);return n};d0.prototype.splice=function(r,t,...n){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(var s=[],i=0;o&&i<t;i++)s.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var i=0;i<n.length;i++)o=Enl(this,o,n[i]);return s};d0.prototype.reverse=function(){for(var r=this.head,t=this.tail,n=r;n!==null;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=r,this};function Enl(r,t,n){var i=t===r.head?new Sle(n,null,t,r):new Sle(n,t,t.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function bnl(r,t){r.tail=new Sle(t,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Cnl(r,t){r.head=new Sle(t,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Sle(r,t,n,i){if(!(this instanceof Sle))return new Sle(r,t,n,i);this.list=i,this.value=r,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{Kdi()(d0)}catch{}});var bEe=I((mDd,epi)=>{"use strict";var Inl=eCr(),_le=Symbol("max"),Jq=Symbol("length"),yEe=Symbol("lengthCalculator"),pFe=Symbol("allowStale"),Ole=Symbol("maxAge"),Kq=Symbol("dispose"),Xdi=Symbol("noDisposeOnSet"),P2=Symbol("lruList"),Ex=Symbol("cache"),Zdi=Symbol("updateAgeOnGet"),tCr=()=>1,nCr=class{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");let n=this[_le]=t.max||1/0,i=t.length||tCr;if(this[yEe]=typeof i!="function"?tCr:i,this[pFe]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ole]=t.maxAge||0,this[Kq]=t.dispose,this[Xdi]=t.noDisposeOnSet||!1,this[Zdi]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[_le]=t||1/0,dFe(this)}get max(){return this[_le]}set allowStale(t){this[pFe]=!!t}get allowStale(){return this[pFe]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Ole]=t,dFe(this)}get maxAge(){return this[Ole]}set lengthCalculator(t){typeof t!="function"&&(t=tCr),t!==this[yEe]&&(this[yEe]=t,this[Jq]=0,this[P2].forEach(n=>{n.length=this[yEe](n.value,n.key),this[Jq]+=n.length})),dFe(this)}get lengthCalculator(){return this[yEe]}get length(){return this[Jq]}get itemCount(){return this[P2].length}rforEach(t,n){n=n||this;for(let i=this[P2].tail;i!==null;){let o=i.prev;$di(this,t,i,n),i=o}}forEach(t,n){n=n||this;for(let i=this[P2].head;i!==null;){let o=i.next;$di(this,t,i,n),i=o}}keys(){return this[P2].toArray().map(t=>t.key)}values(){return this[P2].toArray().map(t=>t.value)}reset(){this[Kq]&&this[P2]&&this[P2].length&&this[P2].forEach(t=>this[Kq](t.key,t.value)),this[Ex]=new Map,this[P2]=new Inl,this[Jq]=0}dump(){return this[P2].map(t=>smt(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[P2]}set(t,n,i){if(i=i||this[Ole],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let o=i?Date.now():0,s=this[yEe](n,t);if(this[Ex].has(t)){if(s>this[_le])return EEe(this,this[Ex].get(t)),!1;let u=this[Ex].get(t).value;return this[Kq]&&(this[Xdi]||this[Kq](t,u.value)),u.now=o,u.maxAge=i,u.value=n,this[Jq]+=s-u.length,u.length=s,this.get(t),dFe(this),!0}let a=new iCr(t,n,s,o,i);return a.length>this[_le]?(this[Kq]&&this[Kq](t,n),!1):(this[Jq]+=a.length,this[P2].unshift(a),this[Ex].set(t,this[P2].head),dFe(this),!0)}has(t){if(!this[Ex].has(t))return!1;let n=this[Ex].get(t).value;return!smt(this,n)}get(t){return rCr(this,t,!0)}peek(t){return rCr(this,t,!1)}pop(){let t=this[P2].tail;return t?(EEe(this,t),t.value):null}del(t){EEe(this,this[Ex].get(t))}load(t){this.reset();let n=Date.now();for(let i=t.length-1;i>=0;i--){let o=t[i],s=o.e||0;if(s===0)this.set(o.k,o.v);else{let a=s-n;a>0&&this.set(o.k,o.v,a)}}}prune(){this[Ex].forEach((t,n)=>rCr(this,n,!1))}},rCr=(r,t,n)=>{let i=r[Ex].get(t);if(i){let o=i.value;if(smt(r,o)){if(EEe(r,i),!r[pFe])return}else n&&(r[Zdi]&&(i.value.now=Date.now()),r[P2].unshiftNode(i));return o.value}},smt=(r,t)=>{if(!t||!t.maxAge&&!r[Ole])return!1;let n=Date.now()-t.now;return t.maxAge?n>t.maxAge:r[Ole]&&n>r[Ole]},dFe=r=>{if(r[Jq]>r[_le])for(let t=r[P2].tail;r[Jq]>r[_le]&&t!==null;){let n=t.prev;EEe(r,t),t=n}},EEe=(r,t)=>{if(t){let n=t.value;r[Kq]&&r[Kq](n.key,n.value),r[Jq]-=n.length,r[Ex].delete(n.key),r[P2].removeNode(t)}},iCr=class{constructor(t,n,i,o,s){this.key=t,this.value=n,this.length=i,this.now=o,this.maxAge=s||0}},$di=(r,t,n,i)=>{let o=n.value;smt(r,o)&&(EEe(r,n),r[pFe]||(o=void 0)),o&&t.call(i,o.value,o.key,r)};epi.exports=nCr});var nw=I((yDd,ipi)=>{var oCr=class r{constructor(t,n){if(n=Snl(n),t instanceof r)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new r(t.raw,n);if(t instanceof sCr)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(o=>!rpi(o[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&xnl(o[0])){this.set=[o];break}}}this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let i=((this.options.includePrerelease&&Rnl)|(this.options.loose&&Bnl))+":"+t,o=tpi.get(i);if(o)return o;let s=this.options.loose,a=s?Kv[HC.HYPHENRANGELOOSE]:Kv[HC.HYPHENRANGE];t=t.replace(a,znl(this.options.includePrerelease)),b1("hyphen replace",t),t=t.replace(Kv[HC.COMPARATORTRIM],Onl),b1("comparator trim",t),t=t.replace(Kv[HC.TILDETRIM],Tnl),b1("tilde trim",t),t=t.replace(Kv[HC.CARETTRIM],wnl),b1("caret trim",t);let l=t.split(" ").map(p=>Mnl(p,this.options)).join(" ").split(/\s+/).map(p=>qnl(p,this.options));s&&(l=l.filter(p=>(b1("loose invalid filter",p,this.options),!!p.match(Kv[HC.COMPARATORLOOSE])))),b1("range list",l);let u=new Map,c=l.map(p=>new sCr(p,this.options));for(let p of c){if(rpi(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let d=[...u.values()];return tpi.set(i,d),d}intersects(t,n){if(!(t instanceof r))throw new TypeError("a Range is required");return this.set.some(i=>npi(i,n)&&t.set.some(o=>npi(o,n)&&i.every(s=>o.every(a=>s.intersects(a,n)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new _nl(t,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Unl(this.set[n],t,this.options))return!0;return!1}};ipi.exports=oCr;var vnl=bEe(),tpi=new vnl({max:1e3}),Snl=Xgt(),sCr=fFe(),b1=cFe(),_nl=tb(),{safeRe:Kv,t:HC,comparatorTrimReplace:Onl,tildeTrimReplace:Tnl,caretTrimReplace:wnl}=gEe(),{FLAG_INCLUDE_PRERELEASE:Rnl,FLAG_LOOSE:Bnl}=lFe(),rpi=r=>r.value==="<0.0.0-0",xnl=r=>r.value==="",npi=(r,t)=>{let n=!0,i=r.slice(),o=i.pop();for(;n&&i.length;)n=i.every(s=>o.intersects(s,t)),o=i.pop();return n},Mnl=(r,t)=>(b1("comp",r,t),r=Pnl(r,t),b1("caret",r),r=Dnl(r,t),b1("tildes",r),r=Qnl(r,t),b1("xrange",r),r=Fnl(r,t),b1("stars",r),r),VC=r=>!r||r.toLowerCase()==="x"||r==="*",Dnl=(r,t)=>r.trim().split(/\s+/).map(n=>Nnl(n,t)).join(" "),Nnl=(r,t)=>{let n=t.loose?Kv[HC.TILDELOOSE]:Kv[HC.TILDE];return r.replace(n,(i,o,s,a,l)=>{b1("tilde",r,i,o,s,a,l);let u;return VC(o)?u="":VC(s)?u=`>=${o}.0.0 <${+o+1}.0.0-0`:VC(a)?u=`>=${o}.${s}.0 <${o}.${+s+1}.0-0`:l?(b1("replaceTilde pr",l),u=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`):u=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`,b1("tilde return",u),u})},Pnl=(r,t)=>r.trim().split(/\s+/).map(n=>knl(n,t)).join(" "),knl=(r,t)=>{b1("caret",r,t);let n=t.loose?Kv[HC.CARETLOOSE]:Kv[HC.CARET],i=t.includePrerelease?"-0":"";return r.replace(n,(o,s,a,l,u)=>{b1("caret",r,o,s,a,l,u);let c;return VC(s)?c="":VC(a)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:VC(l)?s==="0"?c=`>=${s}.${a}.0${i} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.0${i} <${+s+1}.0.0-0`:u?(b1("replaceCaret pr",u),s==="0"?a==="0"?c=`>=${s}.${a}.${l}-${u} <${s}.${a}.${+l+1}-0`:c=`>=${s}.${a}.${l}-${u} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.${l}-${u} <${+s+1}.0.0-0`):(b1("no pr"),s==="0"?a==="0"?c=`>=${s}.${a}.${l}${i} <${s}.${a}.${+l+1}-0`:c=`>=${s}.${a}.${l}${i} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.${l} <${+s+1}.0.0-0`),b1("caret return",c),c})},Qnl=(r,t)=>(b1("replaceXRanges",r,t),r.split(/\s+/).map(n=>Lnl(n,t)).join(" ")),Lnl=(r,t)=>{r=r.trim();let n=t.loose?Kv[HC.XRANGELOOSE]:Kv[HC.XRANGE];return r.replace(n,(i,o,s,a,l,u)=>{b1("xRange",r,i,o,s,a,l,u);let c=VC(s),d=c||VC(a),p=d||VC(l),f=p;return o==="="&&f&&(o=""),u=t.includePrerelease?"-0":"",c?o===">"||o==="<"?i="<0.0.0-0":i="*":o&&f?(d&&(a=0),l=0,o===">"?(o=">=",d?(s=+s+1,a=0,l=0):(a=+a+1,l=0)):o==="<="&&(o="<",d?s=+s+1:a=+a+1),o==="<"&&(u="-0"),i=`${o+s}.${a}.${l}${u}`):d?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(i=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),b1("xRange return",i),i})},Fnl=(r,t)=>(b1("replaceStars",r,t),r.trim().replace(Kv[HC.STAR],"")),qnl=(r,t)=>(b1("replaceGTE0",r,t),r.trim().replace(Kv[t.includePrerelease?HC.GTE0PRE:HC.GTE0],"")),znl=r=>(t,n,i,o,s,a,l,u,c,d,p,f,A)=>(VC(i)?n="":VC(o)?n=`>=${i}.0.0${r?"-0":""}`:VC(s)?n=`>=${i}.${o}.0${r?"-0":""}`:a?n=`>=${n}`:n=`>=${n}${r?"-0":""}`,VC(c)?u="":VC(d)?u=`<${+c+1}.0.0-0`:VC(p)?u=`<${c}.${+d+1}.0-0`:f?u=`<=${c}.${d}.${p}-${f}`:r?u=`<${c}.${d}.${+p+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),Unl=(r,t,n)=>{for(let i=0;i<r.length;i++)if(!r[i].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let i=0;i<r.length;i++)if(b1(r[i].semver),r[i].semver!==sCr.ANY&&r[i].semver.prerelease.length>0){let o=r[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}});var fFe=I((EDd,upi)=>{var AFe=Symbol("SemVer ANY"),cCr=class r{static get ANY(){return AFe}constructor(t,n){if(n=opi(n),t instanceof r){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),lCr("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===AFe?this.value="":this.value=this.operator+this.semver.version,lCr("comp",this)}parse(t){let n=this.options.loose?spi[api.COMPARATORLOOSE]:spi[api.COMPARATOR],i=t.match(n);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new lpi(i[2],this.options.loose):this.semver=AFe}toString(){return this.value}test(t){if(lCr("Comparator.test",t,this.options.loose),this.semver===AFe||t===AFe)return!0;if(typeof t=="string")try{t=new lpi(t,this.options)}catch{return!1}return aCr(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new cpi(t.value,n).test(this.value):t.operator===""?t.value===""?!0:new cpi(this.value,n).test(t.semver):(n=opi(n),n.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||aCr(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||aCr(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};upi.exports=cCr;var opi=Xgt(),{safeRe:spi,t:api}=gEe(),aCr=Zbr(),lCr=cFe(),lpi=tb(),cpi=nw()});var hFe=I((bDd,dpi)=>{var jnl=nw(),Gnl=(r,t,n)=>{try{t=new jnl(t,n)}catch{return!1}return t.test(r)};dpi.exports=Gnl});var fpi=I((CDd,ppi)=>{var Wnl=nw(),Hnl=(r,t)=>new Wnl(r,t).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));ppi.exports=Hnl});var hpi=I((IDd,Api)=>{var Vnl=tb(),Ynl=nw(),Knl=(r,t,n)=>{let i=null,o=null,s=null;try{s=new Ynl(t,n)}catch{return null}return r.forEach(a=>{s.test(a)&&(!i||o.compare(a)===-1)&&(i=a,o=new Vnl(i,n))}),i};Api.exports=Knl});var mpi=I((vDd,gpi)=>{var Jnl=tb(),Xnl=nw(),$nl=(r,t,n)=>{let i=null,o=null,s=null;try{s=new Xnl(t,n)}catch{return null}return r.forEach(a=>{s.test(a)&&(!i||o.compare(a)===1)&&(i=a,o=new Jnl(i,n))}),i};gpi.exports=$nl});var bpi=I((SDd,Epi)=>{var uCr=tb(),Znl=nw(),ypi=uFe(),eil=(r,t)=>{r=new Znl(r,t);let n=new uCr("0.0.0");if(r.test(n)||(n=new uCr("0.0.0-0"),r.test(n)))return n;n=null;for(let i=0;i<r.set.length;++i){let o=r.set[i],s=null;o.forEach(a=>{let l=new uCr(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||ypi(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!n||ypi(n,s))&&(n=s)}return n&&r.test(n)?n:null};Epi.exports=eil});var Ipi=I((_Dd,Cpi)=>{var til=nw(),ril=(r,t)=>{try{return new til(r,t).range||"*"}catch{return null}};Cpi.exports=ril});var amt=I((ODd,Opi)=>{var nil=tb(),_pi=fFe(),{ANY:iil}=_pi,oil=nw(),sil=hFe(),vpi=uFe(),Spi=tmt(),ail=nmt(),lil=rmt(),cil=(r,t,n,i)=>{r=new nil(r,i),t=new oil(t,i);let o,s,a,l,u;switch(n){case">":o=vpi,s=ail,a=Spi,l=">",u=">=";break;case"<":o=Spi,s=lil,a=vpi,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sil(r,t,i))return!1;for(let c=0;c<t.set.length;++c){let d=t.set[c],p=null,f=null;if(d.forEach(A=>{A.semver===iil&&(A=new _pi(">=0.0.0")),p=p||A,f=f||A,o(A.semver,p.semver,i)?p=A:a(A.semver,f.semver,i)&&(f=A)}),p.operator===l||p.operator===u||(!f.operator||f.operator===l)&&s(r,f.semver))return!1;if(f.operator===u&&a(r,f.semver))return!1}return!0};Opi.exports=cil});var wpi=I((TDd,Tpi)=>{var uil=amt(),dil=(r,t,n)=>uil(r,t,">",n);Tpi.exports=dil});var Bpi=I((wDd,Rpi)=>{var pil=amt(),fil=(r,t,n)=>pil(r,t,"<",n);Rpi.exports=fil});var Dpi=I((RDd,Mpi)=>{var xpi=nw(),Ail=(r,t,n)=>(r=new xpi(r,n),t=new xpi(t,n),r.intersects(t,n));Mpi.exports=Ail});var Ppi=I((BDd,Npi)=>{var hil=hFe(),gil=rw();Npi.exports=(r,t,n)=>{let i=[],o=null,s=null,a=r.sort((d,p)=>gil(d,p,n));for(let d of a)hil(d,t,n)?(s=d,o||(o=d)):(s&&i.push([o,s]),s=null,o=null);o&&i.push([o,null]);let l=[];for(let[d,p]of i)d===p?l.push(d):!p&&d===a[0]?l.push("*"):p?d===a[0]?l.push(`<=${p}`):l.push(`${d} - ${p}`):l.push(`>=${d}`);let u=l.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return u.length<c.length?u:t}});var zpi=I((xDd,qpi)=>{var kpi=nw(),pCr=fFe(),{ANY:dCr}=pCr,gFe=hFe(),fCr=rw(),mil=(r,t,n={})=>{if(r===t)return!0;r=new kpi(r,n),t=new kpi(t,n);let i=!1;e:for(let o of r.set){for(let s of t.set){let a=Eil(o,s,n);if(i=i||a!==null,a)continue e}if(i)return!1}return!0},yil=[new pCr(">=0.0.0-0")],Qpi=[new pCr(">=0.0.0")],Eil=(r,t,n)=>{if(r===t)return!0;if(r.length===1&&r[0].semver===dCr){if(t.length===1&&t[0].semver===dCr)return!0;n.includePrerelease?r=yil:r=Qpi}if(t.length===1&&t[0].semver===dCr){if(n.includePrerelease)return!0;t=Qpi}let i=new Set,o,s;for(let A of r)A.operator===">"||A.operator===">="?o=Lpi(o,A,n):A.operator==="<"||A.operator==="<="?s=Fpi(s,A,n):i.add(A.semver);if(i.size>1)return null;let a;if(o&&s){if(a=fCr(o.semver,s.semver,n),a>0)return null;if(a===0&&(o.operator!==">="||s.operator!=="<="))return null}for(let A of i){if(o&&!gFe(A,String(o),n)||s&&!gFe(A,String(s),n))return null;for(let h of t)if(!gFe(A,String(h),n))return!1;return!0}let l,u,c,d,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let A of t){if(d=d||A.operator===">"||A.operator===">=",c=c||A.operator==="<"||A.operator==="<=",o){if(f&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===f.major&&A.semver.minor===f.minor&&A.semver.patch===f.patch&&(f=!1),A.operator===">"||A.operator===">="){if(l=Lpi(o,A,n),l===A&&l!==o)return!1}else if(o.operator===">="&&!gFe(o.semver,String(A),n))return!1}if(s){if(p&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===p.major&&A.semver.minor===p.minor&&A.semver.patch===p.patch&&(p=!1),A.operator==="<"||A.operator==="<="){if(u=Fpi(s,A,n),u===A&&u!==s)return!1}else if(s.operator==="<="&&!gFe(s.semver,String(A),n))return!1}if(!A.operator&&(s||o)&&a!==0)return!1}return!(o&&c&&!s&&a!==0||s&&d&&!o&&a!==0||f||p)},Lpi=(r,t,n)=>{if(!r)return t;let i=fCr(r.semver,t.semver,n);return i>0?r:i<0||t.operator===">"&&r.operator===">="?t:r},Fpi=(r,t,n)=>{if(!r)return t;let i=fCr(r.semver,t.semver,n);return i<0?r:i>0||t.operator==="<"&&r.operator==="<="?t:r};qpi.exports=mil});var CEe=I((MDd,Gpi)=>{var ACr=gEe(),Upi=lFe(),bil=tb(),jpi=Kbr(),Cil=vle(),Iil=udi(),vil=pdi(),Sil=hdi(),_il=ydi(),Oil=bdi(),Til=Idi(),wil=Sdi(),Ril=Odi(),Bil=rw(),xil=Bdi(),Mil=Mdi(),Dil=emt(),Nil=kdi(),Pil=Ldi(),kil=uFe(),Qil=tmt(),Lil=Xbr(),Fil=$br(),qil=rmt(),zil=nmt(),Uil=Zbr(),jil=Vdi(),Gil=fFe(),Wil=nw(),Hil=hFe(),Vil=fpi(),Yil=hpi(),Kil=mpi(),Jil=bpi(),Xil=Ipi(),$il=amt(),Zil=wpi(),eol=Bpi(),tol=Dpi(),rol=Ppi(),nol=zpi();Gpi.exports={parse:Cil,valid:Iil,clean:vil,inc:Sil,diff:_il,major:Oil,minor:Til,patch:wil,prerelease:Ril,compare:Bil,rcompare:xil,compareLoose:Mil,compareBuild:Dil,sort:Nil,rsort:Pil,gt:kil,lt:Qil,eq:Lil,neq:Fil,gte:qil,lte:zil,cmp:Uil,coerce:jil,Comparator:Gil,Range:Wil,satisfies:Hil,toComparators:Vil,maxSatisfying:Yil,minSatisfying:Kil,minVersion:Jil,validRange:Xil,outside:$il,gtr:Zil,ltr:eol,intersects:tol,simplifyRange:rol,subset:nol,SemVer:bil,re:ACr.re,src:ACr.src,tokens:ACr.t,SEMVER_SPEC_VERSION:Upi.SEMVER_SPEC_VERSION,RELEASE_TYPES:Upi.RELEASE_TYPES,compareIdentifiers:jpi.compareIdentifiers,rcompareIdentifiers:jpi.rcompareIdentifiers}});var mFe,iol,DDd,ool,YC,cY=et(()=>{"use strict";mFe=Et(yE()),iol=Et(CEe()),DDd=(0,mFe.Record)({version:mFe.String,hash:mFe.String}),ool=()=>({version:"7.18.2",hash:"e49f630580e73a6bee6430828b578311142067d9"}),YC=ool()});var j_,Wpi,yFe,lmt=et(()=>{"use strict";cY();Wpi=r=>{j_=r},yFe=r=>({coalesceSoftwareVersion:YC?.version||"",service:r,env:process.env.REACT_APP_OWNER??"",reactAppCoalesceDev:process.env.REACT_APP_COALESCE_DEV??""})});var Hpi,Vpi,G_,hCr,Ypi,Kpi,Jpi,EFe,gCr,cmt,aol,mCr,IEe,bFe,umt,yCr,Xpi,vEe=et(()=>{"use strict";Hpi=Et(XF()),Vpi=Et(hut()),G_=Et(Pse());ble();Ogt();lmt();Gl();yx();Er();hCr=null,Ypi=r=>{hCr=r},Kpi={emerg:"error",assert:"warn",alert:"warn",error:"warn",warn:"warn",app:"info",info:"info",debug:"debug"},Jpi={emerg:"emerg",assert:"alert",alert:"alert",error:"error",app:"info",info:"info",warn:"warn",debug:"debug"},EFe=class extends Hpi.default{baseContext;constructor(t){super(t),this.baseContext=yFe(j_)}log(t,n){hCr&&hCr.log({...t,level:Jpi[t.level]},{...this.baseContext,...mE},Kpi[t.level]),n()}},cmt=r=>{let t=yFe(r);gCr={host:"http-intake.logs.datadoghq.com",path:`/v1/input/pub04bd017317b60c96b62874179d82ff97?ddtags=env:${t.env},coalesceSoftwareVersion:${t.coalesceSoftwareVersion}&ddsource=nodejs&service=${r}`,ssl:!0}},aol=!1,mCr=()=>G_.format.combine(G_.format.timestamp(),G_.format.colorize({colors:_gt.COLORS}),G_.format.printf(r=>`|${r.timestamp}|${process.env.JEST_WORKER_ID?`[SHARD:${process.env.JEST_WORKER_ID}]`:""}[${r.loggingArea}]${r.orgID?`|(org:${r.orgID})`:""}${r.workspaceID?`|(env:${r.workspaceID})`:""}${r.userID?`|(user:${r.userID})`:""}${r.runID?`|run:${r.runID})`:""}(${r.nodeID?`|(node:${r.nodeID})`:""})|)|${r.level}:${r.message}`)),IEe=r=>new G_.transports.Console({format:process.env.CONSOLE_JSON_LOGS?G_.format.combine(G_.format.timestamp(),G_.format.json()):mCr(),level:r.level,silent:aol}),bFe=class extends Vpi.Http{running=0;rejectLogCalls=!1;constructor(){let t={batch:!1,...gCr,format:G_.format.combine(mCr(),G_.format.uncolorize())};super(t),this.on("logged",()=>{this.running-=1}),this.on("warn",()=>{this.running-=1})}log(t,n){if(this.rejectLogCalls)return;let i={...t,level:Jpi[t.level],status:Kpi[t.level]};this.running+=1,super.log?.(i,n)}async closeAndWait(t){this.rejectLogCalls=!0;let n=async()=>{let i=t>5e3?500:t/100,o=0;for(;o++*i<t;){if(this.running===0)return;await new Promise(s=>setTimeout(s,i))}if(this.running!==0)throw new At("should not be reachable")};this.close&&this.close(),await N2(t,"Close took too long",n())}},umt=()=>new bFe,yCr=()=>new G_.transports.File({filename:process.env.JEST_WORKER_ID?`test-shard-${process.env.JEST_WORKER_ID}.log`:"test.log",dirname:"./test-logs",format:mCr(),level:Sgt.debug}),Xpi=r=>{let t=[];return t.push(IEe(r)),gCr&&t.push(umt()),Rc().isTest&&t.push(yCr()),[new EFe,...t]}});var $pi,ECr,bCr,lol,col,CFe,CCr=et(()=>{"use strict";$pi=Et(Pse());lmt();ble();eFe();vEe();Gl();ECr=r=>r.includes("production")?"production":r.includes("staging")?"staging":r.includes("qa")?"qa":"development",bCr=()=>{if(f1()){let r=process.env.RUNTIME_ENVIRONMENT||"development";return lGn("coa")?WB()?ECr(r):void 0:ECr(r)}else{let r;try{r=self.ENVIRONMENT}catch{}return typeof r=="string"?ECr(r):void 0}},lol=()=>{let r=Rc();if(r.isTest)return{};let t=bCr();return r.isNode?{firebaseEnv:t}:{windowInfo:{frontendURLHost:self.location.host},firebaseEnv:t}},col=r=>{let t=yFe(j_);return{appEnv:lol(),loggingArea:r,...t}},CFe=r=>{let t=z_[r];if(!t)throw new Error(`Logging area "${r}" is not a valid LoggingAreas key`);return t.logger||(t.logger=$pi.createLogger({levels:_gt.LEVELS,defaultMeta:col(r),level:t.level,transports:Xpi(t)})),t.logger}});var Zpi,dmt,pmt,ICr,fmt,Xq,e1i=et(()=>{"use strict";Zpi=Et(Go()),dmt=Et(Pse());eFe();vEe();Gl();CCr();ble();_h();pmt=(r,t)=>{let n=r.toUpperCase(),i=[];if(n in z_||i.push(`invalid logging area '${n}'`),Sgt[t]||i.push("`invalid log level '${logLevel}'`"),i.length)throw i.forEach(l=>{console.error(l)}),new Error("Invalid logging area or log level: "+i.join(", "));let o=CFe(n),s=o.transports.filter(l=>l instanceof dmt.transports.Console),a=o.transports;s.length||(a=[...a,IEe(z_[n])]),a.filter(l=>l instanceof dmt.transports.Console)[0].level=t,o.configure({...o,transports:o.transports})},ICr=()=>{Object.keys(z_).forEach(r=>{pmt(r,"debug")})},fmt=(r,t)=>{for(let n in r){let i=n,o=CFe(i);r[i].defaultMeta={...o.defaultMeta,...r[i].defaultMeta,...t};let s=r[i].transports||o.transports,a;if(Rc().isTest&&s.length>0){let l=s[s.length-1];l instanceof dmt.transports.File&&(a=l,s=o.transports.slice(0,-1),s.push(yCr()))}o.configure({...o,...r[i],transports:s,level:r[i].level||o.level}),a&&a.close&&a.close()}},Xq=r=>{let t=Zpi.default.mapValues(z_,(n,i)=>({}));fmt(t,r)}});function IFe(r,t){return function(){return r.apply(t,arguments)}}var vCr=et(()=>{"use strict"});function dol(r){return r!==null&&!vFe(r)&&r.constructor!==null&&!vFe(r.constructor)&&W_(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}function pol(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&n1i(r.buffer),t}function SFe(r,t,{allOwnKeys:n=!1}={}){if(r===null||typeof r>"u")return;let i,o;if(typeof r!="object"&&(r=[r]),SEe(r))for(i=0,o=r.length;i<o;i++)t.call(null,r[i],i,r);else{let s=n?Object.getOwnPropertyNames(r):Object.keys(r),a=s.length,l;for(i=0;i<a;i++)l=s[i],t.call(null,r[l],l,r)}}function o1i(r,t){t=t.toLowerCase();let n=Object.keys(r),i=n.length,o;for(;i-- >0;)if(o=n[i],t===o.toLowerCase())return o;return null}function _Cr(){let{caseless:r}=s1i(this)&&this||{},t={},n=(i,o)=>{let s=r&&o1i(t,o)||o;Amt(t[s])&&Amt(i)?t[s]=_Cr(t[s],i):Amt(i)?t[s]=_Cr({},i):SEe(i)?t[s]=i.slice():t[s]=i};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&SFe(arguments[i],n);return t}function Gol(r){return!!(r&&W_(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}var uol,OCr,hmt,bx,gmt,SEe,vFe,n1i,fol,W_,i1i,mmt,Aol,Amt,hol,gol,mol,yol,Eol,bol,Col,Iol,vol,Sol,_ol,Ool,Tle,s1i,Tol,wol,Rol,Bol,xol,Mol,Dol,Nol,Pol,kol,Qol,t1i,Lol,a1i,Fol,qol,zol,Uol,SCr,r1i,l1i,jol,Wol,Hol,Vol,c1i,Yol,er,xd=et(()=>{"use strict";vCr();({toString:uol}=Object.prototype),{getPrototypeOf:OCr}=Object,hmt=(r=>t=>{let n=uol.call(t);return r[n]||(r[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),bx=r=>(r=r.toLowerCase(),t=>hmt(t)===r),gmt=r=>t=>typeof t===r,{isArray:SEe}=Array,vFe=gmt("undefined");n1i=bx("ArrayBuffer");fol=gmt("string"),W_=gmt("function"),i1i=gmt("number"),mmt=r=>r!==null&&typeof r=="object",Aol=r=>r===!0||r===!1,Amt=r=>{if(hmt(r)!=="object")return!1;let t=OCr(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},hol=bx("Date"),gol=bx("File"),mol=bx("Blob"),yol=bx("FileList"),Eol=r=>mmt(r)&&W_(r.pipe),bol=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||W_(r.append)&&((t=hmt(r))==="formdata"||t==="object"&&W_(r.toString)&&r.toString()==="[object FormData]"))},Col=bx("URLSearchParams"),[Iol,vol,Sol,_ol]=["ReadableStream","Request","Response","Headers"].map(bx),Ool=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");Tle=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,s1i=r=>!vFe(r)&&r!==Tle;Tol=(r,t,n,{allOwnKeys:i}={})=>(SFe(t,(o,s)=>{n&&W_(o)?r[s]=IFe(o,n):r[s]=o},{allOwnKeys:i}),r),wol=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Rol=(r,t,n,i)=>{r.prototype=Object.create(t.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),n&&Object.assign(r.prototype,n)},Bol=(r,t,n,i)=>{let o,s,a,l={};if(t=t||{},r==null)return t;do{for(o=Object.getOwnPropertyNames(r),s=o.length;s-- >0;)a=o[s],(!i||i(a,r,t))&&!l[a]&&(t[a]=r[a],l[a]=!0);r=n!==!1&&OCr(r)}while(r&&(!n||n(r,t))&&r!==Object.prototype);return t},xol=(r,t,n)=>{r=String(r),(n===void 0||n>r.length)&&(n=r.length),n-=t.length;let i=r.indexOf(t,n);return i!==-1&&i===n},Mol=r=>{if(!r)return null;if(SEe(r))return r;let t=r.length;if(!i1i(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=r[t];return n},Dol=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&OCr(Uint8Array)),Nol=(r,t)=>{let i=(r&&r[Symbol.iterator]).call(r),o;for(;(o=i.next())&&!o.done;){let s=o.value;t.call(r,s[0],s[1])}},Pol=(r,t)=>{let n,i=[];for(;(n=r.exec(t))!==null;)i.push(n);return i},kol=bx("HTMLFormElement"),Qol=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),t1i=(({hasOwnProperty:r})=>(t,n)=>r.call(t,n))(Object.prototype),Lol=bx("RegExp"),a1i=(r,t)=>{let n=Object.getOwnPropertyDescriptors(r),i={};SFe(n,(o,s)=>{let a;(a=t(o,s,r))!==!1&&(i[s]=a||o)}),Object.defineProperties(r,i)},Fol=r=>{a1i(r,(t,n)=>{if(W_(r)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let i=r[n];if(W_(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qol=(r,t)=>{let n={},i=o=>{o.forEach(s=>{n[s]=!0})};return SEe(r)?i(r):i(String(r).split(t)),n},zol=()=>{},Uol=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t,SCr="abcdefghijklmnopqrstuvwxyz",r1i="0123456789",l1i={DIGIT:r1i,ALPHA:SCr,ALPHA_DIGIT:SCr+SCr.toUpperCase()+r1i},jol=(r=16,t=l1i.ALPHA_DIGIT)=>{let n="",{length:i}=t;for(;r--;)n+=t[Math.random()*i|0];return n};Wol=r=>{let t=new Array(10),n=(i,o)=>{if(mmt(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[o]=i;let s=SEe(i)?[]:{};return SFe(i,(a,l)=>{let u=n(a,o+1);!vFe(u)&&(s[l]=u)}),t[o]=void 0,s}}return i};return n(r,0)},Hol=bx("AsyncFunction"),Vol=r=>r&&(mmt(r)||W_(r))&&W_(r.then)&&W_(r.catch),c1i=((r,t)=>r?setImmediate:t?((n,i)=>(Tle.addEventListener("message",({source:o,data:s})=>{o===Tle&&s===n&&i.length&&i.shift()()},!1),o=>{i.push(o),Tle.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",W_(Tle.postMessage)),Yol=typeof queueMicrotask<"u"?queueMicrotask.bind(Tle):typeof process<"u"&&process.nextTick||c1i,er={isArray:SEe,isArrayBuffer:n1i,isBuffer:dol,isFormData:bol,isArrayBufferView:pol,isString:fol,isNumber:i1i,isBoolean:Aol,isObject:mmt,isPlainObject:Amt,isReadableStream:Iol,isRequest:vol,isResponse:Sol,isHeaders:_ol,isUndefined:vFe,isDate:hol,isFile:gol,isBlob:mol,isRegExp:Lol,isFunction:W_,isStream:Eol,isURLSearchParams:Col,isTypedArray:Dol,isFileList:yol,forEach:SFe,merge:_Cr,extend:Tol,trim:Ool,stripBOM:wol,inherits:Rol,toFlatObject:Bol,kindOf:hmt,kindOfTest:bx,endsWith:xol,toArray:Mol,forEachEntry:Nol,matchAll:Pol,isHTMLForm:kol,hasOwnProperty:t1i,hasOwnProp:t1i,reduceDescriptors:a1i,freezeMethods:Fol,toObjectSet:qol,toCamelCase:Qol,noop:zol,toFiniteNumber:Uol,findKey:o1i,global:Tle,isContextDefined:s1i,ALPHABET:l1i,generateString:jol,isSpecCompliantForm:Gol,toJSONObject:Wol,isAsyncFn:Hol,isThenable:Vol,setImmediate:c1i,asap:Yol}});function _Ee(r,t,n,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status?o.status:null)}var u1i,d1i,so,H_=et(()=>{"use strict";xd();er.inherits(_Ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:er.toJSONObject(this.config),code:this.code,status:this.status}}});u1i=_Ee.prototype,d1i={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{d1i[r]={value:r}});Object.defineProperties(_Ee,d1i);Object.defineProperty(u1i,"isAxiosError",{value:!0});_Ee.from=(r,t,n,i,o,s)=>{let a=Object.create(u1i);return er.toFlatObject(r,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),_Ee.call(a,r.message,t,n,i,o),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};so=_Ee});var p1i,ymt,TCr=et(()=>{p1i=Et(yPe(),1),ymt=p1i.default});function wCr(r){return er.isPlainObject(r)||er.isArray(r)}function A1i(r){return er.endsWith(r,"[]")?r.slice(0,-2):r}function f1i(r,t,n){return r?r.concat(t).map(function(o,s){return o=A1i(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Kol(r){return er.isArray(r)&&!r.some(wCr)}function Xol(r,t,n){if(!er.isObject(r))throw new TypeError("target must be an object");t=t||new(ymt||FormData),n=er.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,C){return!er.isUndefined(C[y])});let i=n.metaTokens,o=n.visitor||d,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&er.isSpecCompliantForm(t);if(!er.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(er.isDate(h))return h.toISOString();if(!u&&er.isBlob(h))throw new so("Blob is not supported. Use a Buffer instead.");return er.isArrayBuffer(h)||er.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,y,C){let v=h;if(h&&!C&&typeof h=="object"){if(er.endsWith(y,"{}"))y=i?y:y.slice(0,-2),h=JSON.stringify(h);else if(er.isArray(h)&&Kol(h)||(er.isFileList(h)||er.endsWith(y,"[]"))&&(v=er.toArray(h)))return y=A1i(y),v.forEach(function(w,R){!(er.isUndefined(w)||w===null)&&t.append(a===!0?f1i([y],R,s):a===null?y:y+"[]",c(w))}),!1}return wCr(h)?!0:(t.append(f1i(C,y,s),c(h)),!1)}let p=[],f=Object.assign(Jol,{defaultVisitor:d,convertValue:c,isVisitable:wCr});function A(h,y){if(!er.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));p.push(h),er.forEach(h,function(v,O){(!(er.isUndefined(v)||v===null)&&o.call(t,v,er.isString(O)?O.trim():O,y,f))===!0&&A(v,y?y.concat(O):[O])}),p.pop()}}if(!er.isObject(r))throw new TypeError("data must be an object");return A(r),t}var Jol,uY,_Fe=et(()=>{"use strict";xd();H_();TCr();Jol=er.toFlatObject(er,{},null,function(t){return/^is[A-Z]/.test(t)});uY=Xol});function h1i(r){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function g1i(r,t){this._pairs=[],r&&uY(r,this,t)}var m1i,y1i,E1i=et(()=>{"use strict";_Fe();m1i=g1i.prototype;m1i.append=function(t,n){this._pairs.push([t,n])};m1i.toString=function(t){let n=t?function(i){return t.call(this,i,h1i)}:h1i;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};y1i=g1i});function $ol(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wle(r,t,n){if(!t)return r;let i=n&&n.encode||$ol,o=n&&n.serialize,s;if(o?s=o(t,n):s=er.isURLSearchParams(t)?t.toString():new y1i(t,n).toString(i),s){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}var Emt=et(()=>{"use strict";xd();E1i()});var RCr,BCr,b1i=et(()=>{"use strict";xd();RCr=class{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){er.forEach(this.handlers,function(i){i!==null&&t(i)})}},BCr=RCr});var OEe,bmt=et(()=>{"use strict";OEe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var C1i,I1i,v1i=et(()=>{"use strict";C1i=Et(require("url"),1),I1i=C1i.default.URLSearchParams});var S1i,_1i=et(()=>{v1i();TCr();S1i={isNode:!0,classes:{URLSearchParams:I1i,FormData:ymt,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]}});var DCr={};Ov(DCr,{hasBrowserEnv:()=>MCr,hasStandardBrowserEnv:()=>Zol,hasStandardBrowserWebWorkerEnv:()=>esl,navigator:()=>xCr,origin:()=>tsl});var MCr,xCr,Zol,esl,tsl,O1i=et(()=>{MCr=typeof window<"u"&&typeof document<"u",xCr=typeof navigator=="object"&&navigator||void 0,Zol=MCr&&(!xCr||["ReactNative","NativeScript","NS"].indexOf(xCr.product)<0),esl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tsl=MCr&&window.location.href||"http://localhost"});var tp,mN=et(()=>{_1i();O1i();tp={...DCr,...S1i}});function NCr(r,t){return uY(r,new tp.classes.URLSearchParams,Object.assign({visitor:function(n,i,o,s){return tp.isNode&&er.isBuffer(n)?(this.append(i,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}var T1i=et(()=>{"use strict";xd();_Fe();mN()});function rsl(r){return er.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nsl(r){let t={},n=Object.keys(r),i,o=n.length,s;for(i=0;i<o;i++)s=n[i],t[s]=r[s];return t}function isl(r){function t(n,i,o,s){let a=n[s++];if(a==="__proto__")return!0;let l=Number.isFinite(+a),u=s>=n.length;return a=!a&&er.isArray(o)?o.length:a,u?(er.hasOwnProp(o,a)?o[a]=[o[a],i]:o[a]=i,!l):((!o[a]||!er.isObject(o[a]))&&(o[a]=[]),t(n,i,o[a],s)&&er.isArray(o[a])&&(o[a]=nsl(o[a])),!l)}if(er.isFormData(r)&&er.isFunction(r.entries)){let n={};return er.forEachEntry(r,(i,o)=>{t(rsl(i),o,n,0)}),n}return null}var Cmt,PCr=et(()=>{"use strict";xd();Cmt=isl});function osl(r,t,n){if(er.isString(r))try{return(t||JSON.parse)(r),er.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(r)}var kCr,TEe,Imt=et(()=>{"use strict";xd();H_();bmt();_Fe();T1i();mN();PCr();kCr={transitional:OEe,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let i=n.getContentType()||"",o=i.indexOf("application/json")>-1,s=er.isObject(t);if(s&&er.isHTMLForm(t)&&(t=new FormData(t)),er.isFormData(t))return o?JSON.stringify(Cmt(t)):t;if(er.isArrayBuffer(t)||er.isBuffer(t)||er.isStream(t)||er.isFile(t)||er.isBlob(t)||er.isReadableStream(t))return t;if(er.isArrayBufferView(t))return t.buffer;if(er.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return NCr(t,this.formSerializer).toString();if((l=er.isFileList(t))||i.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return uY(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),osl(t)):t}],transformResponse:[function(t){let n=this.transitional||kCr.transitional,i=n&&n.forcedJSONParsing,o=this.responseType==="json";if(er.isResponse(t)||er.isReadableStream(t))return t;if(t&&er.isString(t)&&(i&&!this.responseType||o)){let a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?so.from(l,so.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tp.classes.FormData,Blob:tp.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};er.forEach(["delete","get","head","post","put","patch"],r=>{kCr.headers[r]={}});TEe=kCr});var ssl,w1i,R1i=et(()=>{"use strict";xd();ssl=er.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),w1i=r=>{let t={},n,i,o;return r&&r.split(`
|
|
179
|
+
Value: `,n),new tY(n,[{path:"",message:"value triggered unknown runtypes error"}])}}createValidationFailedResult(n,i){let o=[],s=(a,l)=>{for(let[u,c]of Object.entries(l)){let d=a.concat(u);typeof c=="string"?o.push({path:d.join("."),message:c}):s(d,c)}};if(n.code==="TYPE_INCORRECT"||n.code==="CONSTRAINT_FAILED")o.push({path:"",message:n.message});else{let a=n.details;a&&s([],a)}return new tY(i,o)}},Rd=(r,t)=>new mbr(r,t)});var bbr,xel,Mel,Ebr,br,Hui=et(()=>{"use strict";bbr=Et(Go());Er();_h();Cgt();sn();xel=r=>r.code==="unrecognized_keys"?r.keys.length:r.code==="invalid_type"&&r.received==="undefined"&&r.message==="Required"?1:r.code==="invalid_literal"?10:0,Mel=r=>bbr.default.sum(r.issues.map(t=>xel(t))),Ebr=class extends sEe{constructor(n,i){super(n);this.zodType=i;if(!i)throw new At(`Missing Zod type for ${n} validator. Did you use a circular import?`)}convertZodError=n=>{let i=[];for(let o of n.issues)if(o.code==="invalid_union"){let s=bbr.default.minBy(o.unionErrors,a=>Mel(a));s&&i.push(...this.convertZodError(s))}else i.push({path:o.path.join("."),message:o.message});return i};validate(n){try{let i=this.zodType.safeParse(n);if(i.success)return{valid:!0,value:i.data};let o=this.convertZodError(i.error);return new tY(n,o)}catch(i){let o=i instanceof T.ZodError?[i.flatten(),i.issues]:[];return tu().error(`ZodValidator: Unable to validate ${this.name} value`,"error: ",i,"value: ",n,...o),new tY(n,[{path:"",message:"value triggered unknown Zod error"}])}}},br=(r,t)=>new Ebr(r,t)});var aEe=et(()=>{"use strict";ybr();Cgt();Hui()});var Del,Nel,Vui,Cbr,Igt,Ibr,vgt,vbr,Sbr,_br,Obr,Tbr,Pel,Yui,Kui,rY=et(()=>{"use strict";sn();tAr();JV();v3r();q3r();yle();zui();yx();aEe();Del=T.object({auth:T.string(),firestore:T.string(),storage:T.string()}),Nel=T.object({apiKey:T.string(),authDomain:T.string(),projectId:T.string(),storageBucket:T.string(),messagingSenderId:T.string(),appId:T.string(),measurementId:T.string(),emulatorInfo:Del.optional()}),Vui=br("FirebaseConfig",Nel),Cbr=r=>{fN("firestore.delete",{path:r})},Igt=r=>{fN("firestore.set",{path:r})},Ibr=r=>{fN("firestore.update",{path:r})},vgt=r=>{fN("firestore.get",{path:r})},vbr=r=>{fN("firestore.transaction.get",{path:r})},Sbr=r=>{fN("firestore.transaction.set",{path:r})},_br=r=>{fN("firestore.transaction.update",{path:r})},Obr=r=>{fN("firestore.transaction.delete",{path:r})},Tbr=()=>{fN("firestore.batch")},Pel=q_.getTracer("firestore"),Yui=r=>(vgt(r.path),Pel.startActiveSpan(`get ${r.path}`,async t=>{t.setAttribute("path",r.path),t.setAttribute("operation","get");let n=await r.get();return t.end(),n})),Kui=async(r,t=1e3)=>{let n=()=>{},i=new Promise(o=>{n=r.onSnapshot(s=>{s.metadata.hasPendingWrites||o(s)})});return await N2(t,`Timed out in GetDocumentNoPendingWrites after ${t} ms`,i).finally(n)}});var Sgt,_gt,Jui,ble=et(()=>{"use strict";Sgt={emerg:"emerg",info:"info",error:"error",debug:"debug",assert:"assert",warn:"warn",alert:"alert",app:"app"},_gt={LEVELS:{emerg:0,assert:1,alert:2,error:3,app:4,info:5,debug:6,warn:4},COLORS:{emerg:"red",assert:"yellow",alert:"yellow",warn:"yellow",error:"cyan",app:"blue",info:"green",debug:"magenta"}},Jui=["Authorization","Token","Password","Secret","idToken","id_token","clientID","clientSecret","apiKey"]});var wbr,z_,eFe=et(()=>{"use strict";wbr=["ACTUAL_STATE","ADVANCED_DEPLOY","APP","AUTH","BULK_WRITE","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","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"],z_={...Object.fromEntries(wbr.map(r=>[r,{level:"info"}]))}});var Hq,lEe,mE,Ogt=et(()=>{"use strict";Hq=(r,t,n,i,o)=>({orgID:r,workspaceID:t,userID:n,runID:i,nodeID:o}),lEe=(r,t)=>{r.runID=t},mE={}});var $ui=I(Xui=>{"use strict";Object.defineProperty(Xui,"__esModule",{value:!0})});var Rbr=I(Tgt=>{"use strict";Object.defineProperty(Tgt,"__esModule",{value:!0});Tgt.Failcode=void 0;Tgt.Failcode={TYPE_INCORRECT:"TYPE_INCORRECT",VALUE_INCORRECT:"VALUE_INCORRECT",KEY_INCORRECT:"KEY_INCORRECT",CONTENT_INCORRECT:"CONTENT_INCORRECT",ARGUMENT_INCORRECT:"ARGUMENT_INCORRECT",RETURN_INCORRECT:"RETURN_INCORRECT",CONSTRAINT_FAILED:"CONSTRAINT_FAILED",PROPERTY_MISSING:"PROPERTY_MISSING",PROPERTY_PRESENT:"PROPERTY_PRESENT",NOTHING_EXPECTED:"NOTHING_EXPECTED"}});var uEe=I(cEe=>{"use strict";var kel=cEe&&cEe.__extends||function(){var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(i[s]=o[s])},r(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(cEe,"__esModule",{value:!0});cEe.ValidationError=void 0;var Qel=function(r){kel(t,r);function t(n){var i=r.call(this,n.message)||this;return i.name="ValidationError",i.code=n.code,n.details!==void 0&&(i.details=n.details),Object.setPrototypeOf(i,t.prototype),i}return t}(Error);cEe.ValidationError=Qel});var tFe=I(Bbr=>{"use strict";Object.defineProperty(Bbr,"__esModule",{value:!0});var wgt=function(r){return function(t){switch(t.tag){case"literal":return'"'.concat(String(t.value),'"');case"string":return"string";case"brand":return t.brand;case"constraint":return t.name||wgt(r)(t.underlying);case"union":return t.alternatives.map(wgt(r)).join(" | ");case"intersect":return t.intersectees.map(wgt(r)).join(" & ");default:break}return"`${".concat(U_(!1,r)(t),"}`")}},Rgt=function(r){return function(t){switch(t.tag){case"literal":return String(t.value);case"brand":return"${".concat(t.brand,"}");case"constraint":return t.name?"${".concat(t.name,"}"):Rgt(r)(t.underlying);case"union":if(t.alternatives.length===1){var n=t.alternatives[0];return Rgt(r)(n.reflect)}break;case"intersect":if(t.intersectees.length===1){var n=t.intersectees[0];return Rgt(r)(n.reflect)}break;default:break}return"${".concat(U_(!1,r)(t),"}")}},U_=function(r,t){return function(n){var i=function(c){return r?"(".concat(c,")"):c};if(t.has(n))return i("CIRCULAR ".concat(n.tag));t.add(n);try{switch(n.tag){case"unknown":case"never":case"void":case"boolean":case"number":case"bigint":case"string":case"symbol":case"function":return n.tag;case"literal":{var o=n.value;return typeof o=="string"?'"'.concat(o,'"'):String(o)}case"template":{if(n.strings.length===0)return'""';if(n.strings.length===1)return'"'.concat(n.strings[0],'"');if(n.strings.length===2&&n.strings.every(function(c){return c===""})){var s=n.runtypes[0];return wgt(t)(s.reflect)}var a=!1,l=n.strings.reduce(function(c,d,p){var f=c+d,A=n.runtypes[p];if(A){var h=Rgt(t)(A.reflect);return!a&&h.startsWith("$")&&(a=!0),f+h}else return f},"");return a?"`".concat(l,"`"):'"'.concat(l,'"')}case"array":return"".concat(Zui(n)).concat(U_(!0,t)(n.element),"[]");case"dictionary":return"{ [_: ".concat(n.key,"]: ").concat(U_(!1,t)(n.value)," }");case"record":{var u=Object.keys(n.fields);return u.length?"{ ".concat(u.map(function(c){return"".concat(Zui(n)).concat(c).concat(Lel(n,c),": ").concat(n.fields[c].tag==="optional"?U_(!1,t)(n.fields[c].underlying):U_(!1,t)(n.fields[c]),";")}).join(" ")," }"):"{}"}case"tuple":return"[".concat(n.components.map(U_(!1,t)).join(", "),"]");case"union":return i("".concat(n.alternatives.map(U_(!0,t)).join(" | ")));case"intersect":return i("".concat(n.intersectees.map(U_(!0,t)).join(" & ")));case"optional":return U_(r,t)(n.underlying)+" | undefined";case"constraint":return n.name||U_(r,t)(n.underlying);case"instanceof":return n.ctor.name;case"brand":return U_(r,t)(n.entity)}}finally{t.delete(n)}throw Error("impossible")}};Bbr.default=U_(!1,new Set);function Lel(r,t){var n=r.isPartial,i=r.fields;return n||t!==void 0&&i[t].tag==="optional"?"?":""}function Zui(r){var t=r.isReadonly;return t?"readonly ":""}});var sf=I(Bd=>{"use strict";var xbr=Bd&&Bd.__assign||function(){return xbr=Object.assign||function(r){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r},xbr.apply(this,arguments)};Object.defineProperty(Bd,"__esModule",{value:!0});Bd.FAILURE=Bd.SUCCESS=Bd.enumerableKeysOf=Bd.typeOf=Bd.hasKey=void 0;var AN=Rbr(),Cle=tFe();function Fel(r,t){return typeof t=="object"&&t!==null&&r in t}Bd.hasKey=Fel;var qel=function(r){var t,n,i;return typeof r=="object"?r===null?"null":Array.isArray(r)?"array":((t=r.constructor)===null||t===void 0?void 0:t.name)==="Object"?"object":(i=(n=r.constructor)===null||n===void 0?void 0:n.name)!==null&&i!==void 0?i:typeof r:typeof r};Bd.typeOf=qel;var zel=function(r){return typeof r=="object"&&r!==null?Reflect.ownKeys(r).filter(function(t){var n,i;return(i=(n=r.propertyIsEnumerable)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:!0}):[]};Bd.enumerableKeysOf=zel;function Uel(r){return{success:!0,value:r}}Bd.SUCCESS=Uel;Bd.FAILURE=Object.assign(function(r,t,n){return xbr({success:!1,code:r,message:t},n?{details:n}:{})},{TYPE_INCORRECT:function(r,t){var n="Expected ".concat(r.tag==="template"?"string ".concat((0,Cle.default)(r)):(0,Cle.default)(r),", but was ").concat((0,Bd.typeOf)(t));return(0,Bd.FAILURE)(AN.Failcode.TYPE_INCORRECT,n)},VALUE_INCORRECT:function(r,t,n){return(0,Bd.FAILURE)(AN.Failcode.VALUE_INCORRECT,"Expected ".concat(r," ").concat(String(t),", but was ").concat(String(n)))},KEY_INCORRECT:function(r,t,n){return(0,Bd.FAILURE)(AN.Failcode.KEY_INCORRECT,"Expected ".concat((0,Cle.default)(r)," key to be ").concat((0,Cle.default)(t),", but was ").concat((0,Bd.typeOf)(n)))},CONTENT_INCORRECT:function(r,t){var n="Expected ".concat((0,Cle.default)(r),", but was incompatible");return(0,Bd.FAILURE)(AN.Failcode.CONTENT_INCORRECT,n,t)},ARGUMENT_INCORRECT:function(r){return(0,Bd.FAILURE)(AN.Failcode.ARGUMENT_INCORRECT,r)},RETURN_INCORRECT:function(r){return(0,Bd.FAILURE)(AN.Failcode.RETURN_INCORRECT,r)},CONSTRAINT_FAILED:function(r,t){var n=t?": ".concat(t):"";return(0,Bd.FAILURE)(AN.Failcode.CONSTRAINT_FAILED,"Failed constraint check for ".concat((0,Cle.default)(r)).concat(n))},PROPERTY_MISSING:function(r){var t="Expected ".concat((0,Cle.default)(r),", but was missing");return(0,Bd.FAILURE)(AN.Failcode.PROPERTY_MISSING,t)},PROPERTY_PRESENT:function(r){var t="Expected nothing, but was ".concat((0,Bd.typeOf)(r));return(0,Bd.FAILURE)(AN.Failcode.PROPERTY_PRESENT,t)},NOTHING_EXPECTED:function(r){var t="Expected nothing, but was ".concat((0,Bd.typeOf)(r));return(0,Bd.FAILURE)(AN.Failcode.NOTHING_EXPECTED,t)}})});var e0i=I(nY=>{"use strict";var jel=nY&&nY.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},Gel=nY&&nY.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))};Object.defineProperty(nY,"__esModule",{value:!0});nY.Contract=void 0;var Wel=uEe(),Hel=sf();function Vel(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=r.length-1,i=r.slice(0,n),o=r[n];return{enforce:function(s){return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];if(a.length<i.length){var u="Expected ".concat(i.length," arguments but only received ").concat(a.length),c=Hel.FAILURE.ARGUMENT_INCORRECT(u);throw new Wel.ValidationError(c)}for(var d=0;d<i.length;d++)i[d].check(a[d]);return o.check(s.apply(void 0,Gel([],jel(a),!1)))}}}}nY.Contract=Vel});var n0i=I(iY=>{"use strict";var Yel=iY&&iY.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},Kel=iY&&iY.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))};Object.defineProperty(iY,"__esModule",{value:!0});iY.AsyncContract=void 0;var t0i=uEe(),r0i=sf();function Jel(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=r.length-1,i=r.slice(0,n),o=r[n];return{enforce:function(s){return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];if(a.length<i.length){var u="Expected ".concat(i.length," arguments but only received ").concat(a.length),c=r0i.FAILURE.ARGUMENT_INCORRECT(u);throw new t0i.ValidationError(c)}for(var d=0;d<i.length;d++)i[d].check(a[d]);var p=s.apply(void 0,Kel([],Yel(a),!1));if(!(p instanceof Promise)){var u="Expected function to return a promise, but instead got ".concat(p),c=r0i.FAILURE.RETURN_INCORRECT(u);throw new t0i.ValidationError(c)}return p.then(o.check)}}}}iY.AsyncContract=Jel});var i0i=I(hN=>{"use strict";var Xel=hN&&hN.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$el=hN&&hN.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s};Object.defineProperty(hN,"__esModule",{value:!0});hN.when=hN.match=void 0;function Zel(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return function(n){var i,o;try{for(var s=Xel(r),a=s.next();!a.done;a=s.next()){var l=$el(a.value,2),u=l[0],c=l[1];if(u.guard(n))return c(n)}}catch(d){i={error:d}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}throw new Error("No alternatives were matched")}}hN.match=Zel;function etl(r,t){return[r,t]}hN.when=etl});var kA=I(sY=>{"use strict";Object.defineProperty(sY,"__esModule",{value:!0});sY.innerValidate=sY.create=sY.isRuntype=void 0;var oY=yE(),ttl=tFe(),rtl=uEe(),o0i=sf(),s0i=Symbol(),ntl=function(r){return(0,o0i.hasKey)(s0i,r)};sY.isRuntype=ntl;function itl(r,t){return t[s0i]=!0,t.check=n,t.assert=n,t._innerValidate=function(p,f){return f.has(p,t)?(0,o0i.SUCCESS)(p):r(p,f)},t.validate=function(p){return t._innerValidate(p,stl())},t.guard=i,t.Or=o,t.And=s,t.optional=a,t.nullable=l,t.withConstraint=u,t.withGuard=c,t.withBrand=d,t.reflect=t,t.toString=function(){return"Runtype<".concat((0,ttl.default)(t),">")},t;function n(p){var f=t.validate(p);if(f.success)return f.value;throw new rtl.ValidationError(f)}function i(p){return t.validate(p).success}function o(p){return(0,oY.Union)(t,p)}function s(p){return(0,oY.Intersect)(t,p)}function a(){return(0,oY.Optional)(t)}function l(){return(0,oY.Union)(t,oY.Null)}function u(p,f){return(0,oY.Constraint)(t,p,f)}function c(p,f){return(0,oY.Constraint)(t,p,f)}function d(p){return(0,oY.Brand)(p,t)}}sY.create=itl;function otl(r,t,n){return r._innerValidate(t,n)}sY.innerValidate=otl;function stl(){var r=new WeakMap,t=function(i,o){if(!(i===null||typeof i!="object")){var s=r.get(i);r.set(i,s?s.set(o,!0):new WeakMap().set(o,!0))}},n=function(i,o){var s=r.get(i),a=s&&s.get(o)||!1;return t(i,o),a};return{has:n}}});var xgt=I(Bgt=>{"use strict";Object.defineProperty(Bgt,"__esModule",{value:!0});Bgt.Unknown=void 0;var atl=kA(),ltl=sf(),ctl={tag:"unknown"};Bgt.Unknown=(0,atl.create)(function(r){return(0,ltl.SUCCESS)(r)},ctl)});var a0i=I(Mgt=>{"use strict";Object.defineProperty(Mgt,"__esModule",{value:!0});Mgt.Never=void 0;var utl=kA(),dtl=sf(),ptl={tag:"never"};Mgt.Never=(0,utl.create)(dtl.FAILURE.NOTHING_EXPECTED,ptl)});var l0i=I(Dgt=>{"use strict";Object.defineProperty(Dgt,"__esModule",{value:!0});Dgt.Void=void 0;var ftl=xgt();Dgt.Void=ftl.Unknown});var Mbr=I(dEe=>{"use strict";var Ngt=dEe&&dEe.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(dEe,"__esModule",{value:!0});dEe.Union=void 0;var Pgt=kA(),rFe=sf();function Atl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return function(a){for(var l=0;l<r.length;l++)if(r[l].guard(a))return o[l](a)}},i={tag:"union",alternatives:r,match:n};return(0,Pgt.create)(function(o,s){var a,l,u,c,d,p,f,A;if(typeof o!="object"||o===null){try{for(var h=Ngt(r),y=h.next();!y.done;y=h.next()){var C=y.value;if((0,Pgt.innerValidate)(C,o,s).success)return(0,rFe.SUCCESS)(o)}}catch(X){a={error:X}}finally{try{y&&!y.done&&(l=h.return)&&l.call(h)}finally{if(a)throw a.error}}return rFe.FAILURE.TYPE_INCORRECT(i,o)}var v={};try{for(var O=Ngt(r),w=O.next();!w.done;w=O.next()){var C=w.value;if(C.reflect.tag==="record"){var R=function(Y){var L=C.reflect.fields[Y];L.tag==="literal"&&(v[Y]?v[Y].every(function($){return $!==L.value})&&v[Y].push(L.value):v[Y]=[L.value])};for(var P in C.reflect.fields)R(P)}}}catch(X){u={error:X}}finally{try{w&&!w.done&&(c=O.return)&&c.call(O)}finally{if(u)throw u.error}}for(var P in v)if(v[P].length===r.length)try{for(var z=(d=void 0,Ngt(r)),H=z.next();!H.done;H=z.next()){var C=H.value;if(C.reflect.tag==="record"){var J=C.reflect.fields[P];if(J.tag==="literal"&&(0,rFe.hasKey)(P,o)&&o[P]===J.value)return(0,Pgt.innerValidate)(C,o,s)}}}catch(Y){d={error:Y}}finally{try{H&&!H.done&&(p=z.return)&&p.call(z)}finally{if(d)throw d.error}}try{for(var K=Ngt(r),V=K.next();!V.done;V=K.next()){var F=V.value;if((0,Pgt.innerValidate)(F,o,s).success)return(0,rFe.SUCCESS)(o)}}catch(X){f={error:X}}finally{try{V&&!V.done&&(A=K.return)&&A.call(K)}finally{if(f)throw f.error}}return rFe.FAILURE.TYPE_INCORRECT(i,o)},i)}dEe.Union=Atl});var Pbr=I(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});Vv.Nullish=Vv.Null=Vv.Undefined=Vv.Literal=Vv.literal=void 0;var htl=kA(),c0i=sf(),gtl=Mbr();function Dbr(r){return Array.isArray(r)?String(r.map(String)):typeof r=="bigint"?String(r)+"n":String(r)}Vv.literal=Dbr;function Nbr(r){var t={tag:"literal",value:r};return(0,htl.create)(function(n){return n===r?(0,c0i.SUCCESS)(n):c0i.FAILURE.VALUE_INCORRECT("literal","`".concat(Dbr(r),"`"),"`".concat(Dbr(n),"`"))},t)}Vv.Literal=Nbr;Vv.Undefined=Nbr(void 0);Vv.Null=Nbr(null);Vv.Nullish=(0,gtl.Union)(Vv.Null,Vv.Undefined)});var A0i=I(gN=>{"use strict";var aY=gN&&gN.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},kbr=gN&&gN.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))},u0i=gN&&gN.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(gN,"__esModule",{value:!0});gN.Template=void 0;var kgt=kA(),d0i=tFe(),Vq=sf(),f0i=Pbr(),Qbr=function(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},mtl=function(r){if(0<r.length&&Array.isArray(r[0])){var t=aY(r),n=t[0],i=t.slice(1);return[Array.from(n),i]}else{var o=r,n=o.reduce(function(l,u){return(0,kgt.isRuntype)(u)?l.push(""):l.push(l.pop()+String(u)),l},[""]),i=o.filter(kgt.isRuntype);return[n,i]}},ytl=function(r,t){for(var n=0;n<t.length;)switch(t[n].reflect.tag){case"literal":{var i=t[n];t.splice(n,1);var o=String(i.value);r.splice(n,2,r[n]+o+r[n+1]);break}case"template":{var s=t[n];t.splice.apply(t,kbr([n,1],aY(s.runtypes),!1));var a=s.strings;if(a.length===1)r.splice(n,2,r[n]+a[0]+r[n+1]);else{var l=a[0],u=a.slice(1,-1),c=a[a.length-1];r.splice.apply(r,kbr(kbr([n,2,r[n]+l],aY(u),!1),[c+r[n+1]],!1))}break}case"union":{var d=t[n];if(d.alternatives.length===1)try{var p=oFe(d);t.splice(n,1);var o=String(p.value);r.splice(n,2,r[n]+o+r[n+1]);break}catch{n++;break}else{n++;break}}case"intersect":{var f=t[n];if(f.intersectees.length===1)try{var A=oFe(f);t.splice(n,1);var o=String(A.value);r.splice(n,2,r[n]+o+r[n+1]);break}catch{n++;break}else{n++;break}}default:n++;break}},Etl=function(r){var t=aY(mtl(r),2),n=t[0],i=t[1];return ytl(n,i),[n,i]},oFe=function(r){switch(r.reflect.tag){case"literal":return r;case"brand":return oFe(r.reflect.entity);case"union":if(r.reflect.alternatives.length===1)return oFe(r.reflect.alternatives[0]);break;case"intersect":if(r.reflect.intersectees.length===1)return oFe(r.reflect.intersectees[0]);break;default:break}throw void 0},p0i=function(r){return r},Lbr={string:[function(r){return globalThis.String(r)},".*"],number:[function(r){return globalThis.Number(r)},"[+-]?(?:\\d*\\.\\d+|\\d+\\.\\d*|\\d+)(?:[Ee][+-]?\\d+)?","0[Bb][01]+","0[Oo][0-7]+","0[Xx][0-9A-Fa-f]+"],bigint:[function(r){return globalThis.BigInt(r)},"-?[1-9]d*"],boolean:[function(r){return r!=="false"},"true","false"],null:[function(){return null},"null"],undefined:[function(){},"undefined"]},nFe=function(r){switch(r.tag){case"literal":{var t=aY(Lbr[(0,Vq.typeOf)(r.value)]||[p0i],1),n=t[0];return n}case"brand":return nFe(r.entity);case"constraint":return nFe(r.underlying);case"union":return r.alternatives.map(nFe);case"intersect":return r.intersectees.map(nFe);default:var i=aY(Lbr[r.tag]||[p0i],1),o=i[0];return o}},Fbr=function(r,t){return function(n){var i,o,s,a,l=nFe(r);if(Array.isArray(l))switch(r.tag){case"union":try{for(var u=u0i(r.alternatives),c=u.next();!c.done;c=u.next()){var d=c.value,p=Fbr(d.reflect,t)(n);if(p.success)return p}}catch(C){i={error:C}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return Vq.FAILURE.TYPE_INCORRECT(r,n);case"intersect":try{for(var f=u0i(r.intersectees),A=f.next();!A.done;A=f.next()){var h=A.value,p=Fbr(h.reflect,t)(n);if(!p.success)return p}}catch(C){s={error:C}}finally{try{A&&!A.done&&(a=f.return)&&a.call(f)}finally{if(s)throw s.error}}return(0,Vq.SUCCESS)(n);default:throw Error("impossible")}else{var y=l,p=(0,kgt.innerValidate)(r,y(n),t);return!p.success&&p.code==="VALUE_INCORRECT"&&r.tag==="literal"?Vq.FAILURE.VALUE_INCORRECT("literal",'"'.concat((0,f0i.literal)(r.value),'"'),'"'.concat(n,'"')):p}}},iFe=function(r){switch(r.tag){case"literal":return Qbr(String(r.value));case"brand":return iFe(r.entity);case"constraint":return iFe(r.underlying);case"union":return r.alternatives.map(iFe).join("|");case"template":return r.strings.map(Qbr).reduce(function(i,o,s){var a=i+o,l=r.runtypes[s];return l?a+"(?:".concat(iFe(l.reflect),")"):a},"");default:var t=aY(Lbr[r.tag]||[void 0,".*"]),n=t.slice(1);return n.join("|")}},btl=function(r){var t=r.strings.map(Qbr).reduce(function(n,i,o){var s=n+i,a=r.runtypes[o];return a?s+"(".concat(iFe(a.reflect),")"):s},"");return new RegExp("^".concat(t,"$"),"su")};function Ctl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=aY(Etl(r),2),i=n[0],o=n[1],s={tag:"template",strings:i,runtypes:o},a=btl(s),l=function(u,c){var d=u.match(a);if(d){for(var p=d.slice(1),f=0;f<o.length;f++){var A=o[f],h=p[f],y=Fbr(A.reflect,c)(h);if(!y.success)return y}return(0,Vq.SUCCESS)(u)}else return Vq.FAILURE.VALUE_INCORRECT("string","".concat((0,d0i.default)(s)),'"'.concat((0,f0i.literal)(u),'"'))};return(0,kgt.create)(function(u,c){if(typeof u!="string")return Vq.FAILURE.TYPE_INCORRECT(s,u);var d=l(u,c);if(d.success)return(0,Vq.SUCCESS)(u);var p=Vq.FAILURE.VALUE_INCORRECT("string","".concat((0,d0i.default)(s)),'"'.concat(u,'"'));return p.message!==d.message&&(p.message+=" (inner: ".concat(d.message,")")),p},s)}gN.Template=Ctl});var m0i=I(Qgt=>{"use strict";Object.defineProperty(Qgt,"__esModule",{value:!0});Qgt.Boolean=void 0;var Itl=kA(),h0i=sf(),g0i={tag:"boolean"};Qgt.Boolean=(0,Itl.create)(function(r){return typeof r=="boolean"?(0,h0i.SUCCESS)(r):h0i.FAILURE.TYPE_INCORRECT(g0i,r)},g0i)});var b0i=I(Lgt=>{"use strict";Object.defineProperty(Lgt,"__esModule",{value:!0});Lgt.Number=void 0;var vtl=kA(),y0i=sf(),E0i={tag:"number"};Lgt.Number=(0,vtl.create)(function(r){return typeof r=="number"?(0,y0i.SUCCESS)(r):y0i.FAILURE.TYPE_INCORRECT(E0i,r)},E0i)});var v0i=I(Fgt=>{"use strict";Object.defineProperty(Fgt,"__esModule",{value:!0});Fgt.BigInt=void 0;var Stl=kA(),C0i=sf(),I0i={tag:"bigint"};Fgt.BigInt=(0,Stl.create)(function(r){return typeof r=="bigint"?(0,C0i.SUCCESS)(r):C0i.FAILURE.TYPE_INCORRECT(I0i,r)},I0i)});var qbr=I(qgt=>{"use strict";Object.defineProperty(qgt,"__esModule",{value:!0});qgt.String=void 0;var _tl=kA(),S0i=sf(),_0i={tag:"string"};qgt.String=(0,_tl.create)(function(r){return typeof r=="string"?(0,S0i.SUCCESS)(r):S0i.FAILURE.TYPE_INCORRECT(_0i,r)},_0i)});var R0i=I(zgt=>{"use strict";Object.defineProperty(zgt,"__esModule",{value:!0});zgt.Symbol=void 0;var w0i=kA(),sFe=sf(),Otl=function(r){var t={tag:"symbol",key:r};return(0,w0i.create)(function(n){if(typeof n!="symbol")return sFe.FAILURE.TYPE_INCORRECT(t,n);var i=globalThis.Symbol.keyFor(n);return i!==r?sFe.FAILURE.VALUE_INCORRECT("symbol key",T0i(r),T0i(i)):(0,sFe.SUCCESS)(n)},t)},O0i={tag:"symbol"};zgt.Symbol=(0,w0i.create)(function(r){return typeof r=="symbol"?(0,sFe.SUCCESS)(r):sFe.FAILURE.TYPE_INCORRECT(O0i,r)},Object.assign(Otl,O0i));var T0i=function(r){return r===void 0?"undefined":'"'.concat(r,'"')}});var M0i=I(Ugt=>{"use strict";Object.defineProperty(Ugt,"__esModule",{value:!0});Ugt.Array=void 0;var B0i=kA(),aFe=sf();function x0i(r,t){var n={tag:"array",isReadonly:t,element:r};return wtl((0,B0i.create)(function(i,o){if(!Array.isArray(i))return aFe.FAILURE.TYPE_INCORRECT(n,i);var s=(0,aFe.enumerableKeysOf)(i),a=s.map(function(u){return(0,B0i.innerValidate)(r,i[u],o)}),l=s.reduce(function(u,c){var d=a[c];return d.success||(u[c]=d.details||d.message),u},[]);return(0,aFe.enumerableKeysOf)(l).length!==0?aFe.FAILURE.CONTENT_INCORRECT(n,l):(0,aFe.SUCCESS)(i)},n))}function Ttl(r){return x0i(r,!1)}Ugt.Array=Ttl;function wtl(r){return r.asReadonly=t,r;function t(){return x0i(r.element,!0)}}});var N0i=I(jgt=>{"use strict";Object.defineProperty(jgt,"__esModule",{value:!0});jgt.Tuple=void 0;var D0i=kA(),pEe=sf();function Rtl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n={tag:"tuple",components:r};return(0,D0i.create)(function(i,o){if(!Array.isArray(i))return pEe.FAILURE.TYPE_INCORRECT(n,i);if(i.length!==r.length)return pEe.FAILURE.CONSTRAINT_FAILED(n,"Expected length ".concat(r.length,", but was ").concat(i.length));var s=(0,pEe.enumerableKeysOf)(i),a=s.map(function(u){return(0,D0i.innerValidate)(r[u],i[u],o)}),l=s.reduce(function(u,c){var d=a[c];return d.success||(u[c]=d.details||d.message),u},[]);return(0,pEe.enumerableKeysOf)(l).length!==0?pEe.FAILURE.CONTENT_INCORRECT(n,l):(0,pEe.SUCCESS)(i)},n)}jgt.Tuple=Rtl});var k0i=I(tw=>{"use strict";var zbr=tw&&tw.__read||function(r,t){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return s},Ubr=tw&&tw.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))};Object.defineProperty(tw,"__esModule",{value:!0});tw.Partial=tw.Record=tw.InternalRecord=void 0;var P0i=kA(),Yv=sf();function lY(r,t,n){var i={tag:"record",isPartial:t,isReadonly:n,fields:r};return Mtl((0,P0i.create)(function(o,s){if(o==null)return Yv.FAILURE.TYPE_INCORRECT(i,o);var a=(0,Yv.enumerableKeysOf)(r);if(a.length!==0&&typeof o!="object")return Yv.FAILURE.TYPE_INCORRECT(i,o);var l=Ubr([],zbr(new Set(Ubr(Ubr([],zbr(a),!1),zbr((0,Yv.enumerableKeysOf)(o)),!1))),!1),u=l.reduce(function(d,p){var f=(0,Yv.hasKey)(p,r),A=(0,Yv.hasKey)(p,o);if(f){var h=r[p],y=t||h.reflect.tag==="optional";if(A){var C=o[p];y&&C===void 0?d[p]=(0,Yv.SUCCESS)(C):d[p]=(0,P0i.innerValidate)(h,C,s)}else y?d[p]=(0,Yv.SUCCESS)(void 0):d[p]=Yv.FAILURE.PROPERTY_MISSING(h.reflect)}else if(A){var C=o[p];d[p]=(0,Yv.SUCCESS)(C)}else throw new Error("impossible");return d},{}),c=l.reduce(function(d,p){var f=u[p];return f.success||(d[p]=f.details||f.message),d},{});return(0,Yv.enumerableKeysOf)(c).length!==0?Yv.FAILURE.CONTENT_INCORRECT(i,c):(0,Yv.SUCCESS)(o)},i))}tw.InternalRecord=lY;function Btl(r){return lY(r,!1,!1)}tw.Record=Btl;function xtl(r){return lY(r,!0,!1)}tw.Partial=xtl;function Mtl(r){return r.asPartial=t,r.asReadonly=n,r.pick=i,r.omit=o,r.extend=s,r;function t(){return lY(r.fields,!0,r.isReadonly)}function n(){return lY(r.fields,r.isPartial,!0)}function i(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];var u={};return a.forEach(function(c){u[c]=r.fields[c]}),lY(u,r.isPartial,r.isReadonly)}function o(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];var u={},c=(0,Yv.enumerableKeysOf)(r.fields);return c.forEach(function(d){a.includes(d)||(u[d]=r.fields[d])}),lY(u,r.isPartial,r.isReadonly)}function s(a){return lY(Object.assign({},r.fields,a),r.isPartial,r.isReadonly)}}});var Gbr=I(fEe=>{"use strict";Object.defineProperty(fEe,"__esModule",{value:!0});fEe.Guard=fEe.Constraint=void 0;var Dtl=kA(),jbr=sf(),Ntl=xgt();function Ptl(r,t,n){var i=n&&n.name,o=n&&n.args,s={tag:"constraint",underlying:r,constraint:t,name:i,args:o};return(0,Dtl.create)(function(a){var l=r.validate(a);if(!l.success)return l;var u=t(l.value);return typeof u=="string"?jbr.FAILURE.CONSTRAINT_FAILED(s,u):u?(0,jbr.SUCCESS)(l.value):jbr.FAILURE.CONSTRAINT_FAILED(s)},s)}fEe.Constraint=Ptl;var ktl=function(r,t){return Ntl.Unknown.withGuard(r,t)};fEe.Guard=ktl});var L0i=I(Ggt=>{"use strict";Object.defineProperty(Ggt,"__esModule",{value:!0});Ggt.Dictionary=void 0;var Q0i=kA(),Wbr=qbr(),Qtl=Gbr(),Ltl=tFe(),Ile=sf(),Ftl=(0,Qtl.Constraint)(Wbr.String,function(r){return!isNaN(+r)},{name:"number"});function qtl(r,t){var n=t===void 0||t==="string"?Wbr.String:t==="number"?Ftl:t,i=(0,Ltl.default)(n),o={tag:"dictionary",key:i,value:r};return(0,Q0i.create)(function(s,a){if(s==null||typeof s!="object"||Object.getPrototypeOf(s)!==Object.prototype&&(!Array.isArray(s)||i==="string"))return Ile.FAILURE.TYPE_INCORRECT(o,s);var l=/^(?:NaN|-?\d+(?:\.\d+)?)$/,u=(0,Ile.enumerableKeysOf)(s),c=u.reduce(function(p,f){var A=typeof f=="string"&&l.test(f),h=A?globalThis.Number(f):f;return(A?!n.guard(h)&&!n.guard(f):!n.guard(h))?p[f]=Ile.FAILURE.KEY_INCORRECT(o,n.reflect,h):p[f]=(0,Q0i.innerValidate)(r,s[f],a),p},{}),d=u.reduce(function(p,f){var A=c[f];return A.success||(p[f]=A.details||A.message),p},{});return(0,Ile.enumerableKeysOf)(d).length!==0?Ile.FAILURE.CONTENT_INCORRECT(o,d):(0,Ile.SUCCESS)(s)},o)}Ggt.Dictionary=qtl});var q0i=I(AEe=>{"use strict";var ztl=AEe&&AEe.__values||function(r){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&r[t],i=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(AEe,"__esModule",{value:!0});AEe.Intersect=void 0;var F0i=kA(),Utl=sf();function jtl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n={tag:"intersect",intersectees:r};return(0,F0i.create)(function(i,o){var s,a;try{for(var l=ztl(r),u=l.next();!u.done;u=l.next()){var c=u.value,d=(0,F0i.innerValidate)(c,i,o);if(!d.success)return d}}catch(p){s={error:p}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(s)throw s.error}}return(0,Utl.SUCCESS)(i)},n)}AEe.Intersect=jtl});var z0i=I(Wgt=>{"use strict";Object.defineProperty(Wgt,"__esModule",{value:!0});Wgt.Optional=void 0;var Gtl=kA(),Wtl=sf();function Htl(r){var t={tag:"optional",underlying:r};return(0,Gtl.create)(function(n){return n===void 0?(0,Wtl.SUCCESS)(n):r.validate(n)},t)}Wgt.Optional=Htl});var G0i=I(Hgt=>{"use strict";Object.defineProperty(Hgt,"__esModule",{value:!0});Hgt.Function=void 0;var Vtl=kA(),U0i=sf(),j0i={tag:"function"};Hgt.Function=(0,Vtl.create)(function(r){return typeof r=="function"?(0,U0i.SUCCESS)(r):U0i.FAILURE.TYPE_INCORRECT(j0i,r)},j0i)});var H0i=I(Vgt=>{"use strict";Object.defineProperty(Vgt,"__esModule",{value:!0});Vgt.InstanceOf=void 0;var Ytl=kA(),W0i=sf();function Ktl(r){var t={tag:"instanceof",ctor:r};return(0,Ytl.create)(function(n){return n instanceof r?(0,W0i.SUCCESS)(n):W0i.FAILURE.TYPE_INCORRECT(t,n)},t)}Vgt.InstanceOf=Ktl});var V0i=I(Ygt=>{"use strict";Object.defineProperty(Ygt,"__esModule",{value:!0});Ygt.Lazy=void 0;var Jtl=kA();function Xtl(r){var t={get tag(){return i().tag}},n;function i(){if(!n){n=r();for(var o in n)o!=="tag"&&(t[o]=n[o])}return n}return(0,Jtl.create)(function(o){return i().validate(o)},t)}Ygt.Lazy=Xtl});var Y0i=I(Kgt=>{"use strict";Object.defineProperty(Kgt,"__esModule",{value:!0});Kgt.Brand=void 0;var $tl=kA();function Ztl(r,t){var n={tag:"brand",brand:r,entity:t};return(0,$tl.create)(function(i){return t.validate(i)},n)}Kgt.Brand=Ztl});var K0i=I(hEe=>{"use strict";Object.defineProperty(hEe,"__esModule",{value:!0});hEe.checked=hEe.check=void 0;var erl=uEe(),trl=sf(),Hbr=new WeakMap;function rrl(r,t,n){var i=Hbr.get(r)||new Map;Hbr.set(r,i);var o=i.get(t)||[];i.set(t,o),o.push(n)}hEe.check=rrl;function nrl(r,t,n){var i=Hbr.get(r),o=i&&i.get(t);if(o)return o;for(var s=[],a=0;a<n;a++)s.push(a);return s}function irl(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(r.length===0)throw new Error("No runtype provided to `@checked`. Please remove the decorator.");return function(n,i,o){var s=o.value,a=(n.name||n.constructor.name+".prototype")+(typeof i=="string"?'["'.concat(i,'"]'):"[".concat(String(i),"]")),l=nrl(n,i,r.length);if(l.length!==r.length)throw new Error("Number of `@checked` runtypes and @check parameters not matched.");if(l.length>s.length)throw new Error("Number of `@checked` runtypes exceeds actual parameter length.");o.value=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return r.forEach(function(d,p){var f=l[p],A=d.validate(u[f]);if(!A.success){var h="".concat(a,", argument #").concat(f,": ").concat(A.message),y=trl.FAILURE.ARGUMENT_INCORRECT(h);throw new erl.ValidationError(y)}}),s.apply(this,u)}}}hEe.checked=irl});var yE=I(yl=>{"use strict";var orl=yl&&yl.__createBinding||(Object.create?function(r,t,n,i){i===void 0&&(i=n),Object.defineProperty(r,i,{enumerable:!0,get:function(){return t[n]}})}:function(r,t,n,i){i===void 0&&(i=n),r[i]=t[n]}),ep=yl&&yl.__exportStar||function(r,t){for(var n in r)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&orl(t,r,n)};Object.defineProperty(yl,"__esModule",{value:!0});yl.InstanceOf=yl.Nullish=yl.Null=yl.Undefined=yl.Literal=void 0;ep($ui(),yl);ep(Rbr(),yl);ep(e0i(),yl);ep(n0i(),yl);ep(i0i(),yl);ep(uEe(),yl);ep(xgt(),yl);ep(a0i(),yl);ep(l0i(),yl);var Jgt=Pbr();Object.defineProperty(yl,"Literal",{enumerable:!0,get:function(){return Jgt.Literal}});Object.defineProperty(yl,"Undefined",{enumerable:!0,get:function(){return Jgt.Undefined}});Object.defineProperty(yl,"Null",{enumerable:!0,get:function(){return Jgt.Null}});Object.defineProperty(yl,"Nullish",{enumerable:!0,get:function(){return Jgt.Nullish}});ep(A0i(),yl);ep(m0i(),yl);ep(b0i(),yl);ep(v0i(),yl);ep(qbr(),yl);ep(R0i(),yl);ep(M0i(),yl);ep(N0i(),yl);ep(k0i(),yl);ep(L0i(),yl);ep(Mbr(),yl);ep(q0i(),yl);ep(z0i(),yl);ep(G0i(),yl);var srl=H0i();Object.defineProperty(yl,"InstanceOf",{enumerable:!0,get:function(){return srl.InstanceOf}});ep(V0i(),yl);ep(Gbr(),yl);ep(Y0i(),yl);ep(K0i(),yl)});var lFe=I((zMd,J0i)=>{var arl="2.0.0",lrl=Number.MAX_SAFE_INTEGER||9007199254740991,crl=16,url=250,drl=["major","premajor","minor","preminor","patch","prepatch","prerelease"];J0i.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:crl,MAX_SAFE_BUILD_LENGTH:url,MAX_SAFE_INTEGER:lrl,RELEASE_TYPES:drl,SEMVER_SPEC_VERSION:arl,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var cFe=I((UMd,X0i)=>{var prl=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};X0i.exports=prl});var gEe=I((Yq,$0i)=>{var{MAX_SAFE_COMPONENT_LENGTH:Vbr,MAX_SAFE_BUILD_LENGTH:frl,MAX_LENGTH:Arl}=lFe(),hrl=cFe();Yq=$0i.exports={};var grl=Yq.re=[],mrl=Yq.safeRe=[],cs=Yq.src=[],us=Yq.t={},yrl=0,Ybr="[a-zA-Z0-9-]",Erl=[["\\s",1],["\\d",Arl],[Ybr,frl]],brl=r=>{for(let[t,n]of Erl)r=r.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return r},oc=(r,t,n)=>{let i=brl(t),o=yrl++;hrl(r,o,t),us[r]=o,cs[o]=t,grl[o]=new RegExp(t,n?"g":void 0),mrl[o]=new RegExp(i,n?"g":void 0)};oc("NUMERICIDENTIFIER","0|[1-9]\\d*");oc("NUMERICIDENTIFIERLOOSE","\\d+");oc("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ybr}*`);oc("MAINVERSION",`(${cs[us.NUMERICIDENTIFIER]})\\.(${cs[us.NUMERICIDENTIFIER]})\\.(${cs[us.NUMERICIDENTIFIER]})`);oc("MAINVERSIONLOOSE",`(${cs[us.NUMERICIDENTIFIERLOOSE]})\\.(${cs[us.NUMERICIDENTIFIERLOOSE]})\\.(${cs[us.NUMERICIDENTIFIERLOOSE]})`);oc("PRERELEASEIDENTIFIER",`(?:${cs[us.NUMERICIDENTIFIER]}|${cs[us.NONNUMERICIDENTIFIER]})`);oc("PRERELEASEIDENTIFIERLOOSE",`(?:${cs[us.NUMERICIDENTIFIERLOOSE]}|${cs[us.NONNUMERICIDENTIFIER]})`);oc("PRERELEASE",`(?:-(${cs[us.PRERELEASEIDENTIFIER]}(?:\\.${cs[us.PRERELEASEIDENTIFIER]})*))`);oc("PRERELEASELOOSE",`(?:-?(${cs[us.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${cs[us.PRERELEASEIDENTIFIERLOOSE]})*))`);oc("BUILDIDENTIFIER",`${Ybr}+`);oc("BUILD",`(?:\\+(${cs[us.BUILDIDENTIFIER]}(?:\\.${cs[us.BUILDIDENTIFIER]})*))`);oc("FULLPLAIN",`v?${cs[us.MAINVERSION]}${cs[us.PRERELEASE]}?${cs[us.BUILD]}?`);oc("FULL",`^${cs[us.FULLPLAIN]}$`);oc("LOOSEPLAIN",`[v=\\s]*${cs[us.MAINVERSIONLOOSE]}${cs[us.PRERELEASELOOSE]}?${cs[us.BUILD]}?`);oc("LOOSE",`^${cs[us.LOOSEPLAIN]}$`);oc("GTLT","((?:<|>)?=?)");oc("XRANGEIDENTIFIERLOOSE",`${cs[us.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);oc("XRANGEIDENTIFIER",`${cs[us.NUMERICIDENTIFIER]}|x|X|\\*`);oc("XRANGEPLAIN",`[v=\\s]*(${cs[us.XRANGEIDENTIFIER]})(?:\\.(${cs[us.XRANGEIDENTIFIER]})(?:\\.(${cs[us.XRANGEIDENTIFIER]})(?:${cs[us.PRERELEASE]})?${cs[us.BUILD]}?)?)?`);oc("XRANGEPLAINLOOSE",`[v=\\s]*(${cs[us.XRANGEIDENTIFIERLOOSE]})(?:\\.(${cs[us.XRANGEIDENTIFIERLOOSE]})(?:\\.(${cs[us.XRANGEIDENTIFIERLOOSE]})(?:${cs[us.PRERELEASELOOSE]})?${cs[us.BUILD]}?)?)?`);oc("XRANGE",`^${cs[us.GTLT]}\\s*${cs[us.XRANGEPLAIN]}$`);oc("XRANGELOOSE",`^${cs[us.GTLT]}\\s*${cs[us.XRANGEPLAINLOOSE]}$`);oc("COERCE",`(^|[^\\d])(\\d{1,${Vbr}})(?:\\.(\\d{1,${Vbr}}))?(?:\\.(\\d{1,${Vbr}}))?(?:$|[^\\d])`);oc("COERCERTL",cs[us.COERCE],!0);oc("LONETILDE","(?:~>?)");oc("TILDETRIM",`(\\s*)${cs[us.LONETILDE]}\\s+`,!0);Yq.tildeTrimReplace="$1~";oc("TILDE",`^${cs[us.LONETILDE]}${cs[us.XRANGEPLAIN]}$`);oc("TILDELOOSE",`^${cs[us.LONETILDE]}${cs[us.XRANGEPLAINLOOSE]}$`);oc("LONECARET","(?:\\^)");oc("CARETTRIM",`(\\s*)${cs[us.LONECARET]}\\s+`,!0);Yq.caretTrimReplace="$1^";oc("CARET",`^${cs[us.LONECARET]}${cs[us.XRANGEPLAIN]}$`);oc("CARETLOOSE",`^${cs[us.LONECARET]}${cs[us.XRANGEPLAINLOOSE]}$`);oc("COMPARATORLOOSE",`^${cs[us.GTLT]}\\s*(${cs[us.LOOSEPLAIN]})$|^$`);oc("COMPARATOR",`^${cs[us.GTLT]}\\s*(${cs[us.FULLPLAIN]})$|^$`);oc("COMPARATORTRIM",`(\\s*)${cs[us.GTLT]}\\s*(${cs[us.LOOSEPLAIN]}|${cs[us.XRANGEPLAIN]})`,!0);Yq.comparatorTrimReplace="$1$2$3";oc("HYPHENRANGE",`^\\s*(${cs[us.XRANGEPLAIN]})\\s+-\\s+(${cs[us.XRANGEPLAIN]})\\s*$`);oc("HYPHENRANGELOOSE",`^\\s*(${cs[us.XRANGEPLAINLOOSE]})\\s+-\\s+(${cs[us.XRANGEPLAINLOOSE]})\\s*$`);oc("STAR","(<|>)?=?\\s*\\*");oc("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");oc("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Xgt=I((jMd,Z0i)=>{var Crl=Object.freeze({loose:!0}),Irl=Object.freeze({}),vrl=r=>r?typeof r!="object"?Crl:r:Irl;Z0i.exports=vrl});var Kbr=I((GMd,rdi)=>{var edi=/^[0-9]+$/,tdi=(r,t)=>{let n=edi.test(r),i=edi.test(t);return n&&i&&(r=+r,t=+t),r===t?0:n&&!i?-1:i&&!n?1:r<t?-1:1},Srl=(r,t)=>tdi(t,r);rdi.exports={compareIdentifiers:tdi,rcompareIdentifiers:Srl}});var tb=I((WMd,sdi)=>{var $gt=cFe(),{MAX_LENGTH:ndi,MAX_SAFE_INTEGER:Zgt}=lFe(),{safeRe:idi,t:odi}=gEe(),_rl=Xgt(),{compareIdentifiers:mEe}=Kbr(),Jbr=class r{constructor(t,n){if(n=_rl(n),t instanceof r){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>ndi)throw new TypeError(`version is longer than ${ndi} characters`);$gt("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=t.trim().match(n.loose?idi[odi.LOOSE]:idi[odi.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Zgt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zgt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zgt||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let s=+o;if(s>=0&&s<Zgt)return s}return o}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if($gt("SemVer.compare",this.version,this.options,t),!(t instanceof r)){if(typeof t=="string"&&t===this.version)return 0;t=new r(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof r||(t=new r(t,this.options)),mEe(this.major,t.major)||mEe(this.minor,t.minor)||mEe(this.patch,t.patch)}comparePre(t){if(t instanceof r||(t=new r(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],o=t.prerelease[n];if($gt("prerelease compare",n,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return mEe(i,o)}while(++n)}compareBuild(t){t instanceof r||(t=new r(t,this.options));let n=0;do{let i=this.build[n],o=t.build[n];if($gt("prerelease compare",n,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return mEe(i,o)}while(++n)}inc(t,n,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let o=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[o];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(n){let s=[n,o];i===!1&&(s=[n]),mEe(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};sdi.exports=Jbr});var vle=I((HMd,ldi)=>{var adi=tb(),Orl=(r,t,n=!1)=>{if(r instanceof adi)return r;try{return new adi(r,t)}catch(i){if(!n)return null;throw i}};ldi.exports=Orl});var udi=I((VMd,cdi)=>{var Trl=vle(),wrl=(r,t)=>{let n=Trl(r,t);return n?n.version:null};cdi.exports=wrl});var pdi=I((YMd,ddi)=>{var Rrl=vle(),Brl=(r,t)=>{let n=Rrl(r.trim().replace(/^[=v]+/,""),t);return n?n.version:null};ddi.exports=Brl});var hdi=I((KMd,Adi)=>{var fdi=tb(),xrl=(r,t,n,i,o)=>{typeof n=="string"&&(o=i,i=n,n=void 0);try{return new fdi(r instanceof fdi?r.version:r,n).inc(t,i,o).version}catch{return null}};Adi.exports=xrl});var ydi=I((JMd,mdi)=>{var gdi=vle(),Mrl=(r,t)=>{let n=gdi(r,null,!0),i=gdi(t,null,!0),o=n.compare(i);if(o===0)return null;let s=o>0,a=s?n:i,l=s?i:n,u=!!a.prerelease.length;if(!!l.prerelease.length&&!u)return!l.patch&&!l.minor?"major":a.patch?"patch":a.minor?"minor":"major";let d=u?"pre":"";return n.major!==i.major?d+"major":n.minor!==i.minor?d+"minor":n.patch!==i.patch?d+"patch":"prerelease"};mdi.exports=Mrl});var bdi=I((XMd,Edi)=>{var Drl=tb(),Nrl=(r,t)=>new Drl(r,t).major;Edi.exports=Nrl});var Idi=I(($Md,Cdi)=>{var Prl=tb(),krl=(r,t)=>new Prl(r,t).minor;Cdi.exports=krl});var Sdi=I((ZMd,vdi)=>{var Qrl=tb(),Lrl=(r,t)=>new Qrl(r,t).patch;vdi.exports=Lrl});var Odi=I((eDd,_di)=>{var Frl=vle(),qrl=(r,t)=>{let n=Frl(r,t);return n&&n.prerelease.length?n.prerelease:null};_di.exports=qrl});var rw=I((tDd,wdi)=>{var Tdi=tb(),zrl=(r,t,n)=>new Tdi(r,n).compare(new Tdi(t,n));wdi.exports=zrl});var Bdi=I((rDd,Rdi)=>{var Url=rw(),jrl=(r,t,n)=>Url(t,r,n);Rdi.exports=jrl});var Mdi=I((nDd,xdi)=>{var Grl=rw(),Wrl=(r,t)=>Grl(r,t,!0);xdi.exports=Wrl});var emt=I((iDd,Ndi)=>{var Ddi=tb(),Hrl=(r,t,n)=>{let i=new Ddi(r,n),o=new Ddi(t,n);return i.compare(o)||i.compareBuild(o)};Ndi.exports=Hrl});var kdi=I((oDd,Pdi)=>{var Vrl=emt(),Yrl=(r,t)=>r.sort((n,i)=>Vrl(n,i,t));Pdi.exports=Yrl});var Ldi=I((sDd,Qdi)=>{var Krl=emt(),Jrl=(r,t)=>r.sort((n,i)=>Krl(i,n,t));Qdi.exports=Jrl});var uFe=I((aDd,Fdi)=>{var Xrl=rw(),$rl=(r,t,n)=>Xrl(r,t,n)>0;Fdi.exports=$rl});var tmt=I((lDd,qdi)=>{var Zrl=rw(),enl=(r,t,n)=>Zrl(r,t,n)<0;qdi.exports=enl});var Xbr=I((cDd,zdi)=>{var tnl=rw(),rnl=(r,t,n)=>tnl(r,t,n)===0;zdi.exports=rnl});var $br=I((uDd,Udi)=>{var nnl=rw(),inl=(r,t,n)=>nnl(r,t,n)!==0;Udi.exports=inl});var rmt=I((dDd,jdi)=>{var onl=rw(),snl=(r,t,n)=>onl(r,t,n)>=0;jdi.exports=snl});var nmt=I((pDd,Gdi)=>{var anl=rw(),lnl=(r,t,n)=>anl(r,t,n)<=0;Gdi.exports=lnl});var Zbr=I((fDd,Wdi)=>{var cnl=Xbr(),unl=$br(),dnl=uFe(),pnl=rmt(),fnl=tmt(),Anl=nmt(),hnl=(r,t,n,i)=>{switch(t){case"===":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r===n;case"!==":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r!==n;case"":case"=":case"==":return cnl(r,n,i);case"!=":return unl(r,n,i);case">":return dnl(r,n,i);case">=":return pnl(r,n,i);case"<":return fnl(r,n,i);case"<=":return Anl(r,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};Wdi.exports=hnl});var Vdi=I((ADd,Hdi)=>{var gnl=tb(),mnl=vle(),{safeRe:imt,t:omt}=gEe(),ynl=(r,t)=>{if(r instanceof gnl)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;t=t||{};let n=null;if(!t.rtl)n=r.match(imt[omt.COERCE]);else{let i;for(;(i=imt[omt.COERCERTL].exec(r))&&(!n||n.index+n[0].length!==r.length);)(!n||i.index+i[0].length!==n.index+n[0].length)&&(n=i),imt[omt.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;imt[omt.COERCERTL].lastIndex=-1}return n===null?null:mnl(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};Hdi.exports=ynl});var Kdi=I((hDd,Ydi)=>{"use strict";Ydi.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}});var eCr=I((gDd,Jdi)=>{"use strict";Jdi.exports=d0;d0.Node=Sle;d0.create=d0;function d0(r){var t=this;if(t instanceof d0||(t=new d0),t.tail=null,t.head=null,t.length=0,r&&typeof r.forEach=="function")r.forEach(function(o){t.push(o)});else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}d0.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var t=r.next,n=r.prev;return t&&(t.prev=n),n&&(n.next=t),r===this.head&&(this.head=t),r===this.tail&&(this.tail=n),r.list.length--,r.next=null,r.prev=null,r.list=null,t};d0.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var t=this.head;r.list=this,r.next=t,t&&(t.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};d0.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var t=this.tail;r.list=this,r.prev=t,t&&(t.next=r),this.tail=r,this.head||(this.head=r),this.length++}};d0.prototype.push=function(){for(var r=0,t=arguments.length;r<t;r++)bnl(this,arguments[r]);return this.length};d0.prototype.unshift=function(){for(var r=0,t=arguments.length;r<t;r++)Cnl(this,arguments[r]);return this.length};d0.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};d0.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};d0.prototype.forEach=function(r,t){t=t||this;for(var n=this.head,i=0;n!==null;i++)r.call(t,n.value,i,this),n=n.next};d0.prototype.forEachReverse=function(r,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--)r.call(t,n.value,i,this),n=n.prev};d0.prototype.get=function(r){for(var t=0,n=this.head;n!==null&&t<r;t++)n=n.next;if(t===r&&n!==null)return n.value};d0.prototype.getReverse=function(r){for(var t=0,n=this.tail;n!==null&&t<r;t++)n=n.prev;if(t===r&&n!==null)return n.value};d0.prototype.map=function(r,t){t=t||this;for(var n=new d0,i=this.head;i!==null;)n.push(r.call(t,i.value,this)),i=i.next;return n};d0.prototype.mapReverse=function(r,t){t=t||this;for(var n=new d0,i=this.tail;i!==null;)n.push(r.call(t,i.value,this)),i=i.prev;return n};d0.prototype.reduce=function(r,t){var n,i=this.head;if(arguments.length>1)n=t;else if(this.head)i=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;i!==null;o++)n=r(n,i.value,o),i=i.next;return n};d0.prototype.reduceReverse=function(r,t){var n,i=this.tail;if(arguments.length>1)n=t;else if(this.tail)i=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;i!==null;o--)n=r(n,i.value,o),i=i.prev;return n};d0.prototype.toArray=function(){for(var r=new Array(this.length),t=0,n=this.head;n!==null;t++)r[t]=n.value,n=n.next;return r};d0.prototype.toArrayReverse=function(){for(var r=new Array(this.length),t=0,n=this.tail;n!==null;t++)r[t]=n.value,n=n.prev;return r};d0.prototype.slice=function(r,t){t=t||this.length,t<0&&(t+=this.length),r=r||0,r<0&&(r+=this.length);var n=new d0;if(t<r||t<0)return n;r<0&&(r=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(;o!==null&&i<t;i++,o=o.next)n.push(o.value);return n};d0.prototype.sliceReverse=function(r,t){t=t||this.length,t<0&&(t+=this.length),r=r||0,r<0&&(r+=this.length);var n=new d0;if(t<r||t<0)return n;r<0&&(r=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;o!==null&&i>t;i--)o=o.prev;for(;o!==null&&i>r;i--,o=o.prev)n.push(o.value);return n};d0.prototype.splice=function(r,t,...n){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(var s=[],i=0;o&&i<t;i++)s.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var i=0;i<n.length;i++)o=Enl(this,o,n[i]);return s};d0.prototype.reverse=function(){for(var r=this.head,t=this.tail,n=r;n!==null;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=r,this};function Enl(r,t,n){var i=t===r.head?new Sle(n,null,t,r):new Sle(n,t,t.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function bnl(r,t){r.tail=new Sle(t,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Cnl(r,t){r.head=new Sle(t,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Sle(r,t,n,i){if(!(this instanceof Sle))return new Sle(r,t,n,i);this.list=i,this.value=r,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{Kdi()(d0)}catch{}});var bEe=I((mDd,epi)=>{"use strict";var Inl=eCr(),_le=Symbol("max"),Jq=Symbol("length"),yEe=Symbol("lengthCalculator"),pFe=Symbol("allowStale"),Ole=Symbol("maxAge"),Kq=Symbol("dispose"),Xdi=Symbol("noDisposeOnSet"),P2=Symbol("lruList"),Ex=Symbol("cache"),Zdi=Symbol("updateAgeOnGet"),tCr=()=>1,nCr=class{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");let n=this[_le]=t.max||1/0,i=t.length||tCr;if(this[yEe]=typeof i!="function"?tCr:i,this[pFe]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ole]=t.maxAge||0,this[Kq]=t.dispose,this[Xdi]=t.noDisposeOnSet||!1,this[Zdi]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[_le]=t||1/0,dFe(this)}get max(){return this[_le]}set allowStale(t){this[pFe]=!!t}get allowStale(){return this[pFe]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Ole]=t,dFe(this)}get maxAge(){return this[Ole]}set lengthCalculator(t){typeof t!="function"&&(t=tCr),t!==this[yEe]&&(this[yEe]=t,this[Jq]=0,this[P2].forEach(n=>{n.length=this[yEe](n.value,n.key),this[Jq]+=n.length})),dFe(this)}get lengthCalculator(){return this[yEe]}get length(){return this[Jq]}get itemCount(){return this[P2].length}rforEach(t,n){n=n||this;for(let i=this[P2].tail;i!==null;){let o=i.prev;$di(this,t,i,n),i=o}}forEach(t,n){n=n||this;for(let i=this[P2].head;i!==null;){let o=i.next;$di(this,t,i,n),i=o}}keys(){return this[P2].toArray().map(t=>t.key)}values(){return this[P2].toArray().map(t=>t.value)}reset(){this[Kq]&&this[P2]&&this[P2].length&&this[P2].forEach(t=>this[Kq](t.key,t.value)),this[Ex]=new Map,this[P2]=new Inl,this[Jq]=0}dump(){return this[P2].map(t=>smt(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[P2]}set(t,n,i){if(i=i||this[Ole],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let o=i?Date.now():0,s=this[yEe](n,t);if(this[Ex].has(t)){if(s>this[_le])return EEe(this,this[Ex].get(t)),!1;let u=this[Ex].get(t).value;return this[Kq]&&(this[Xdi]||this[Kq](t,u.value)),u.now=o,u.maxAge=i,u.value=n,this[Jq]+=s-u.length,u.length=s,this.get(t),dFe(this),!0}let a=new iCr(t,n,s,o,i);return a.length>this[_le]?(this[Kq]&&this[Kq](t,n),!1):(this[Jq]+=a.length,this[P2].unshift(a),this[Ex].set(t,this[P2].head),dFe(this),!0)}has(t){if(!this[Ex].has(t))return!1;let n=this[Ex].get(t).value;return!smt(this,n)}get(t){return rCr(this,t,!0)}peek(t){return rCr(this,t,!1)}pop(){let t=this[P2].tail;return t?(EEe(this,t),t.value):null}del(t){EEe(this,this[Ex].get(t))}load(t){this.reset();let n=Date.now();for(let i=t.length-1;i>=0;i--){let o=t[i],s=o.e||0;if(s===0)this.set(o.k,o.v);else{let a=s-n;a>0&&this.set(o.k,o.v,a)}}}prune(){this[Ex].forEach((t,n)=>rCr(this,n,!1))}},rCr=(r,t,n)=>{let i=r[Ex].get(t);if(i){let o=i.value;if(smt(r,o)){if(EEe(r,i),!r[pFe])return}else n&&(r[Zdi]&&(i.value.now=Date.now()),r[P2].unshiftNode(i));return o.value}},smt=(r,t)=>{if(!t||!t.maxAge&&!r[Ole])return!1;let n=Date.now()-t.now;return t.maxAge?n>t.maxAge:r[Ole]&&n>r[Ole]},dFe=r=>{if(r[Jq]>r[_le])for(let t=r[P2].tail;r[Jq]>r[_le]&&t!==null;){let n=t.prev;EEe(r,t),t=n}},EEe=(r,t)=>{if(t){let n=t.value;r[Kq]&&r[Kq](n.key,n.value),r[Jq]-=n.length,r[Ex].delete(n.key),r[P2].removeNode(t)}},iCr=class{constructor(t,n,i,o,s){this.key=t,this.value=n,this.length=i,this.now=o,this.maxAge=s||0}},$di=(r,t,n,i)=>{let o=n.value;smt(r,o)&&(EEe(r,n),r[pFe]||(o=void 0)),o&&t.call(i,o.value,o.key,r)};epi.exports=nCr});var nw=I((yDd,ipi)=>{var oCr=class r{constructor(t,n){if(n=Snl(n),t instanceof r)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new r(t.raw,n);if(t instanceof sCr)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(o=>!rpi(o[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&xnl(o[0])){this.set=[o];break}}}this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let i=((this.options.includePrerelease&&Rnl)|(this.options.loose&&Bnl))+":"+t,o=tpi.get(i);if(o)return o;let s=this.options.loose,a=s?Kv[HC.HYPHENRANGELOOSE]:Kv[HC.HYPHENRANGE];t=t.replace(a,znl(this.options.includePrerelease)),b1("hyphen replace",t),t=t.replace(Kv[HC.COMPARATORTRIM],Onl),b1("comparator trim",t),t=t.replace(Kv[HC.TILDETRIM],Tnl),b1("tilde trim",t),t=t.replace(Kv[HC.CARETTRIM],wnl),b1("caret trim",t);let l=t.split(" ").map(p=>Mnl(p,this.options)).join(" ").split(/\s+/).map(p=>qnl(p,this.options));s&&(l=l.filter(p=>(b1("loose invalid filter",p,this.options),!!p.match(Kv[HC.COMPARATORLOOSE])))),b1("range list",l);let u=new Map,c=l.map(p=>new sCr(p,this.options));for(let p of c){if(rpi(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let d=[...u.values()];return tpi.set(i,d),d}intersects(t,n){if(!(t instanceof r))throw new TypeError("a Range is required");return this.set.some(i=>npi(i,n)&&t.set.some(o=>npi(o,n)&&i.every(s=>o.every(a=>s.intersects(a,n)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new _nl(t,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Unl(this.set[n],t,this.options))return!0;return!1}};ipi.exports=oCr;var vnl=bEe(),tpi=new vnl({max:1e3}),Snl=Xgt(),sCr=fFe(),b1=cFe(),_nl=tb(),{safeRe:Kv,t:HC,comparatorTrimReplace:Onl,tildeTrimReplace:Tnl,caretTrimReplace:wnl}=gEe(),{FLAG_INCLUDE_PRERELEASE:Rnl,FLAG_LOOSE:Bnl}=lFe(),rpi=r=>r.value==="<0.0.0-0",xnl=r=>r.value==="",npi=(r,t)=>{let n=!0,i=r.slice(),o=i.pop();for(;n&&i.length;)n=i.every(s=>o.intersects(s,t)),o=i.pop();return n},Mnl=(r,t)=>(b1("comp",r,t),r=Pnl(r,t),b1("caret",r),r=Dnl(r,t),b1("tildes",r),r=Qnl(r,t),b1("xrange",r),r=Fnl(r,t),b1("stars",r),r),VC=r=>!r||r.toLowerCase()==="x"||r==="*",Dnl=(r,t)=>r.trim().split(/\s+/).map(n=>Nnl(n,t)).join(" "),Nnl=(r,t)=>{let n=t.loose?Kv[HC.TILDELOOSE]:Kv[HC.TILDE];return r.replace(n,(i,o,s,a,l)=>{b1("tilde",r,i,o,s,a,l);let u;return VC(o)?u="":VC(s)?u=`>=${o}.0.0 <${+o+1}.0.0-0`:VC(a)?u=`>=${o}.${s}.0 <${o}.${+s+1}.0-0`:l?(b1("replaceTilde pr",l),u=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`):u=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`,b1("tilde return",u),u})},Pnl=(r,t)=>r.trim().split(/\s+/).map(n=>knl(n,t)).join(" "),knl=(r,t)=>{b1("caret",r,t);let n=t.loose?Kv[HC.CARETLOOSE]:Kv[HC.CARET],i=t.includePrerelease?"-0":"";return r.replace(n,(o,s,a,l,u)=>{b1("caret",r,o,s,a,l,u);let c;return VC(s)?c="":VC(a)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:VC(l)?s==="0"?c=`>=${s}.${a}.0${i} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.0${i} <${+s+1}.0.0-0`:u?(b1("replaceCaret pr",u),s==="0"?a==="0"?c=`>=${s}.${a}.${l}-${u} <${s}.${a}.${+l+1}-0`:c=`>=${s}.${a}.${l}-${u} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.${l}-${u} <${+s+1}.0.0-0`):(b1("no pr"),s==="0"?a==="0"?c=`>=${s}.${a}.${l}${i} <${s}.${a}.${+l+1}-0`:c=`>=${s}.${a}.${l}${i} <${s}.${+a+1}.0-0`:c=`>=${s}.${a}.${l} <${+s+1}.0.0-0`),b1("caret return",c),c})},Qnl=(r,t)=>(b1("replaceXRanges",r,t),r.split(/\s+/).map(n=>Lnl(n,t)).join(" ")),Lnl=(r,t)=>{r=r.trim();let n=t.loose?Kv[HC.XRANGELOOSE]:Kv[HC.XRANGE];return r.replace(n,(i,o,s,a,l,u)=>{b1("xRange",r,i,o,s,a,l,u);let c=VC(s),d=c||VC(a),p=d||VC(l),f=p;return o==="="&&f&&(o=""),u=t.includePrerelease?"-0":"",c?o===">"||o==="<"?i="<0.0.0-0":i="*":o&&f?(d&&(a=0),l=0,o===">"?(o=">=",d?(s=+s+1,a=0,l=0):(a=+a+1,l=0)):o==="<="&&(o="<",d?s=+s+1:a=+a+1),o==="<"&&(u="-0"),i=`${o+s}.${a}.${l}${u}`):d?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(i=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),b1("xRange return",i),i})},Fnl=(r,t)=>(b1("replaceStars",r,t),r.trim().replace(Kv[HC.STAR],"")),qnl=(r,t)=>(b1("replaceGTE0",r,t),r.trim().replace(Kv[t.includePrerelease?HC.GTE0PRE:HC.GTE0],"")),znl=r=>(t,n,i,o,s,a,l,u,c,d,p,f,A)=>(VC(i)?n="":VC(o)?n=`>=${i}.0.0${r?"-0":""}`:VC(s)?n=`>=${i}.${o}.0${r?"-0":""}`:a?n=`>=${n}`:n=`>=${n}${r?"-0":""}`,VC(c)?u="":VC(d)?u=`<${+c+1}.0.0-0`:VC(p)?u=`<${c}.${+d+1}.0-0`:f?u=`<=${c}.${d}.${p}-${f}`:r?u=`<${c}.${d}.${+p+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),Unl=(r,t,n)=>{for(let i=0;i<r.length;i++)if(!r[i].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let i=0;i<r.length;i++)if(b1(r[i].semver),r[i].semver!==sCr.ANY&&r[i].semver.prerelease.length>0){let o=r[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}});var fFe=I((EDd,upi)=>{var AFe=Symbol("SemVer ANY"),cCr=class r{static get ANY(){return AFe}constructor(t,n){if(n=opi(n),t instanceof r){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),lCr("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===AFe?this.value="":this.value=this.operator+this.semver.version,lCr("comp",this)}parse(t){let n=this.options.loose?spi[api.COMPARATORLOOSE]:spi[api.COMPARATOR],i=t.match(n);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new lpi(i[2],this.options.loose):this.semver=AFe}toString(){return this.value}test(t){if(lCr("Comparator.test",t,this.options.loose),this.semver===AFe||t===AFe)return!0;if(typeof t=="string")try{t=new lpi(t,this.options)}catch{return!1}return aCr(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new cpi(t.value,n).test(this.value):t.operator===""?t.value===""?!0:new cpi(this.value,n).test(t.semver):(n=opi(n),n.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||aCr(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||aCr(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};upi.exports=cCr;var opi=Xgt(),{safeRe:spi,t:api}=gEe(),aCr=Zbr(),lCr=cFe(),lpi=tb(),cpi=nw()});var hFe=I((bDd,dpi)=>{var jnl=nw(),Gnl=(r,t,n)=>{try{t=new jnl(t,n)}catch{return!1}return t.test(r)};dpi.exports=Gnl});var fpi=I((CDd,ppi)=>{var Wnl=nw(),Hnl=(r,t)=>new Wnl(r,t).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));ppi.exports=Hnl});var hpi=I((IDd,Api)=>{var Vnl=tb(),Ynl=nw(),Knl=(r,t,n)=>{let i=null,o=null,s=null;try{s=new Ynl(t,n)}catch{return null}return r.forEach(a=>{s.test(a)&&(!i||o.compare(a)===-1)&&(i=a,o=new Vnl(i,n))}),i};Api.exports=Knl});var mpi=I((vDd,gpi)=>{var Jnl=tb(),Xnl=nw(),$nl=(r,t,n)=>{let i=null,o=null,s=null;try{s=new Xnl(t,n)}catch{return null}return r.forEach(a=>{s.test(a)&&(!i||o.compare(a)===1)&&(i=a,o=new Jnl(i,n))}),i};gpi.exports=$nl});var bpi=I((SDd,Epi)=>{var uCr=tb(),Znl=nw(),ypi=uFe(),eil=(r,t)=>{r=new Znl(r,t);let n=new uCr("0.0.0");if(r.test(n)||(n=new uCr("0.0.0-0"),r.test(n)))return n;n=null;for(let i=0;i<r.set.length;++i){let o=r.set[i],s=null;o.forEach(a=>{let l=new uCr(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||ypi(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!n||ypi(n,s))&&(n=s)}return n&&r.test(n)?n:null};Epi.exports=eil});var Ipi=I((_Dd,Cpi)=>{var til=nw(),ril=(r,t)=>{try{return new til(r,t).range||"*"}catch{return null}};Cpi.exports=ril});var amt=I((ODd,Opi)=>{var nil=tb(),_pi=fFe(),{ANY:iil}=_pi,oil=nw(),sil=hFe(),vpi=uFe(),Spi=tmt(),ail=nmt(),lil=rmt(),cil=(r,t,n,i)=>{r=new nil(r,i),t=new oil(t,i);let o,s,a,l,u;switch(n){case">":o=vpi,s=ail,a=Spi,l=">",u=">=";break;case"<":o=Spi,s=lil,a=vpi,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sil(r,t,i))return!1;for(let c=0;c<t.set.length;++c){let d=t.set[c],p=null,f=null;if(d.forEach(A=>{A.semver===iil&&(A=new _pi(">=0.0.0")),p=p||A,f=f||A,o(A.semver,p.semver,i)?p=A:a(A.semver,f.semver,i)&&(f=A)}),p.operator===l||p.operator===u||(!f.operator||f.operator===l)&&s(r,f.semver))return!1;if(f.operator===u&&a(r,f.semver))return!1}return!0};Opi.exports=cil});var wpi=I((TDd,Tpi)=>{var uil=amt(),dil=(r,t,n)=>uil(r,t,">",n);Tpi.exports=dil});var Bpi=I((wDd,Rpi)=>{var pil=amt(),fil=(r,t,n)=>pil(r,t,"<",n);Rpi.exports=fil});var Dpi=I((RDd,Mpi)=>{var xpi=nw(),Ail=(r,t,n)=>(r=new xpi(r,n),t=new xpi(t,n),r.intersects(t,n));Mpi.exports=Ail});var Ppi=I((BDd,Npi)=>{var hil=hFe(),gil=rw();Npi.exports=(r,t,n)=>{let i=[],o=null,s=null,a=r.sort((d,p)=>gil(d,p,n));for(let d of a)hil(d,t,n)?(s=d,o||(o=d)):(s&&i.push([o,s]),s=null,o=null);o&&i.push([o,null]);let l=[];for(let[d,p]of i)d===p?l.push(d):!p&&d===a[0]?l.push("*"):p?d===a[0]?l.push(`<=${p}`):l.push(`${d} - ${p}`):l.push(`>=${d}`);let u=l.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return u.length<c.length?u:t}});var zpi=I((xDd,qpi)=>{var kpi=nw(),pCr=fFe(),{ANY:dCr}=pCr,gFe=hFe(),fCr=rw(),mil=(r,t,n={})=>{if(r===t)return!0;r=new kpi(r,n),t=new kpi(t,n);let i=!1;e:for(let o of r.set){for(let s of t.set){let a=Eil(o,s,n);if(i=i||a!==null,a)continue e}if(i)return!1}return!0},yil=[new pCr(">=0.0.0-0")],Qpi=[new pCr(">=0.0.0")],Eil=(r,t,n)=>{if(r===t)return!0;if(r.length===1&&r[0].semver===dCr){if(t.length===1&&t[0].semver===dCr)return!0;n.includePrerelease?r=yil:r=Qpi}if(t.length===1&&t[0].semver===dCr){if(n.includePrerelease)return!0;t=Qpi}let i=new Set,o,s;for(let A of r)A.operator===">"||A.operator===">="?o=Lpi(o,A,n):A.operator==="<"||A.operator==="<="?s=Fpi(s,A,n):i.add(A.semver);if(i.size>1)return null;let a;if(o&&s){if(a=fCr(o.semver,s.semver,n),a>0)return null;if(a===0&&(o.operator!==">="||s.operator!=="<="))return null}for(let A of i){if(o&&!gFe(A,String(o),n)||s&&!gFe(A,String(s),n))return null;for(let h of t)if(!gFe(A,String(h),n))return!1;return!0}let l,u,c,d,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let A of t){if(d=d||A.operator===">"||A.operator===">=",c=c||A.operator==="<"||A.operator==="<=",o){if(f&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===f.major&&A.semver.minor===f.minor&&A.semver.patch===f.patch&&(f=!1),A.operator===">"||A.operator===">="){if(l=Lpi(o,A,n),l===A&&l!==o)return!1}else if(o.operator===">="&&!gFe(o.semver,String(A),n))return!1}if(s){if(p&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===p.major&&A.semver.minor===p.minor&&A.semver.patch===p.patch&&(p=!1),A.operator==="<"||A.operator==="<="){if(u=Fpi(s,A,n),u===A&&u!==s)return!1}else if(s.operator==="<="&&!gFe(s.semver,String(A),n))return!1}if(!A.operator&&(s||o)&&a!==0)return!1}return!(o&&c&&!s&&a!==0||s&&d&&!o&&a!==0||f||p)},Lpi=(r,t,n)=>{if(!r)return t;let i=fCr(r.semver,t.semver,n);return i>0?r:i<0||t.operator===">"&&r.operator===">="?t:r},Fpi=(r,t,n)=>{if(!r)return t;let i=fCr(r.semver,t.semver,n);return i<0?r:i>0||t.operator==="<"&&r.operator==="<="?t:r};qpi.exports=mil});var CEe=I((MDd,Gpi)=>{var ACr=gEe(),Upi=lFe(),bil=tb(),jpi=Kbr(),Cil=vle(),Iil=udi(),vil=pdi(),Sil=hdi(),_il=ydi(),Oil=bdi(),Til=Idi(),wil=Sdi(),Ril=Odi(),Bil=rw(),xil=Bdi(),Mil=Mdi(),Dil=emt(),Nil=kdi(),Pil=Ldi(),kil=uFe(),Qil=tmt(),Lil=Xbr(),Fil=$br(),qil=rmt(),zil=nmt(),Uil=Zbr(),jil=Vdi(),Gil=fFe(),Wil=nw(),Hil=hFe(),Vil=fpi(),Yil=hpi(),Kil=mpi(),Jil=bpi(),Xil=Ipi(),$il=amt(),Zil=wpi(),eol=Bpi(),tol=Dpi(),rol=Ppi(),nol=zpi();Gpi.exports={parse:Cil,valid:Iil,clean:vil,inc:Sil,diff:_il,major:Oil,minor:Til,patch:wil,prerelease:Ril,compare:Bil,rcompare:xil,compareLoose:Mil,compareBuild:Dil,sort:Nil,rsort:Pil,gt:kil,lt:Qil,eq:Lil,neq:Fil,gte:qil,lte:zil,cmp:Uil,coerce:jil,Comparator:Gil,Range:Wil,satisfies:Hil,toComparators:Vil,maxSatisfying:Yil,minSatisfying:Kil,minVersion:Jil,validRange:Xil,outside:$il,gtr:Zil,ltr:eol,intersects:tol,simplifyRange:rol,subset:nol,SemVer:bil,re:ACr.re,src:ACr.src,tokens:ACr.t,SEMVER_SPEC_VERSION:Upi.SEMVER_SPEC_VERSION,RELEASE_TYPES:Upi.RELEASE_TYPES,compareIdentifiers:jpi.compareIdentifiers,rcompareIdentifiers:jpi.rcompareIdentifiers}});var mFe,iol,DDd,ool,YC,cY=et(()=>{"use strict";mFe=Et(yE()),iol=Et(CEe()),DDd=(0,mFe.Record)({version:mFe.String,hash:mFe.String}),ool=()=>({version:"7.18.3",hash:"553253d213f70ac26c65fec2298842703d32f6b0"}),YC=ool()});var j_,Wpi,yFe,lmt=et(()=>{"use strict";cY();Wpi=r=>{j_=r},yFe=r=>({coalesceSoftwareVersion:YC?.version||"",service:r,env:process.env.REACT_APP_OWNER??"",reactAppCoalesceDev:process.env.REACT_APP_COALESCE_DEV??""})});var Hpi,Vpi,G_,hCr,Ypi,Kpi,Jpi,EFe,gCr,cmt,aol,mCr,IEe,bFe,umt,yCr,Xpi,vEe=et(()=>{"use strict";Hpi=Et(XF()),Vpi=Et(hut()),G_=Et(Pse());ble();Ogt();lmt();Gl();yx();Er();hCr=null,Ypi=r=>{hCr=r},Kpi={emerg:"error",assert:"warn",alert:"warn",error:"warn",warn:"warn",app:"info",info:"info",debug:"debug"},Jpi={emerg:"emerg",assert:"alert",alert:"alert",error:"error",app:"info",info:"info",warn:"warn",debug:"debug"},EFe=class extends Hpi.default{baseContext;constructor(t){super(t),this.baseContext=yFe(j_)}log(t,n){hCr&&hCr.log({...t,level:Jpi[t.level]},{...this.baseContext,...mE},Kpi[t.level]),n()}},cmt=r=>{let t=yFe(r);gCr={host:"http-intake.logs.datadoghq.com",path:`/v1/input/pub04bd017317b60c96b62874179d82ff97?ddtags=env:${t.env},coalesceSoftwareVersion:${t.coalesceSoftwareVersion}&ddsource=nodejs&service=${r}`,ssl:!0}},aol=!1,mCr=()=>G_.format.combine(G_.format.timestamp(),G_.format.colorize({colors:_gt.COLORS}),G_.format.printf(r=>`|${r.timestamp}|${process.env.JEST_WORKER_ID?`[SHARD:${process.env.JEST_WORKER_ID}]`:""}[${r.loggingArea}]${r.orgID?`|(org:${r.orgID})`:""}${r.workspaceID?`|(env:${r.workspaceID})`:""}${r.userID?`|(user:${r.userID})`:""}${r.runID?`|run:${r.runID})`:""}(${r.nodeID?`|(node:${r.nodeID})`:""})|)|${r.level}:${r.message}`)),IEe=r=>new G_.transports.Console({format:process.env.CONSOLE_JSON_LOGS?G_.format.combine(G_.format.timestamp(),G_.format.json()):mCr(),level:r.level,silent:aol}),bFe=class extends Vpi.Http{running=0;rejectLogCalls=!1;constructor(){let t={batch:!1,...gCr,format:G_.format.combine(mCr(),G_.format.uncolorize())};super(t),this.on("logged",()=>{this.running-=1}),this.on("warn",()=>{this.running-=1})}log(t,n){if(this.rejectLogCalls)return;let i={...t,level:Jpi[t.level],status:Kpi[t.level]};this.running+=1,super.log?.(i,n)}async closeAndWait(t){this.rejectLogCalls=!0;let n=async()=>{let i=t>5e3?500:t/100,o=0;for(;o++*i<t;){if(this.running===0)return;await new Promise(s=>setTimeout(s,i))}if(this.running!==0)throw new At("should not be reachable")};this.close&&this.close(),await N2(t,"Close took too long",n())}},umt=()=>new bFe,yCr=()=>new G_.transports.File({filename:process.env.JEST_WORKER_ID?`test-shard-${process.env.JEST_WORKER_ID}.log`:"test.log",dirname:"./test-logs",format:mCr(),level:Sgt.debug}),Xpi=r=>{let t=[];return t.push(IEe(r)),gCr&&t.push(umt()),Rc().isTest&&t.push(yCr()),[new EFe,...t]}});var $pi,ECr,bCr,lol,col,CFe,CCr=et(()=>{"use strict";$pi=Et(Pse());lmt();ble();eFe();vEe();Gl();ECr=r=>r.includes("production")?"production":r.includes("staging")?"staging":r.includes("qa")?"qa":"development",bCr=()=>{if(f1()){let r=process.env.RUNTIME_ENVIRONMENT||"development";return lGn("coa")?WB()?ECr(r):void 0:ECr(r)}else{let r;try{r=self.ENVIRONMENT}catch{}return typeof r=="string"?ECr(r):void 0}},lol=()=>{let r=Rc();if(r.isTest)return{};let t=bCr();return r.isNode?{firebaseEnv:t}:{windowInfo:{frontendURLHost:self.location.host},firebaseEnv:t}},col=r=>{let t=yFe(j_);return{appEnv:lol(),loggingArea:r,...t}},CFe=r=>{let t=z_[r];if(!t)throw new Error(`Logging area "${r}" is not a valid LoggingAreas key`);return t.logger||(t.logger=$pi.createLogger({levels:_gt.LEVELS,defaultMeta:col(r),level:t.level,transports:Xpi(t)})),t.logger}});var Zpi,dmt,pmt,ICr,fmt,Xq,e1i=et(()=>{"use strict";Zpi=Et(Go()),dmt=Et(Pse());eFe();vEe();Gl();CCr();ble();_h();pmt=(r,t)=>{let n=r.toUpperCase(),i=[];if(n in z_||i.push(`invalid logging area '${n}'`),Sgt[t]||i.push("`invalid log level '${logLevel}'`"),i.length)throw i.forEach(l=>{console.error(l)}),new Error("Invalid logging area or log level: "+i.join(", "));let o=CFe(n),s=o.transports.filter(l=>l instanceof dmt.transports.Console),a=o.transports;s.length||(a=[...a,IEe(z_[n])]),a.filter(l=>l instanceof dmt.transports.Console)[0].level=t,o.configure({...o,transports:o.transports})},ICr=()=>{Object.keys(z_).forEach(r=>{pmt(r,"debug")})},fmt=(r,t)=>{for(let n in r){let i=n,o=CFe(i);r[i].defaultMeta={...o.defaultMeta,...r[i].defaultMeta,...t};let s=r[i].transports||o.transports,a;if(Rc().isTest&&s.length>0){let l=s[s.length-1];l instanceof dmt.transports.File&&(a=l,s=o.transports.slice(0,-1),s.push(yCr()))}o.configure({...o,...r[i],transports:s,level:r[i].level||o.level}),a&&a.close&&a.close()}},Xq=r=>{let t=Zpi.default.mapValues(z_,(n,i)=>({}));fmt(t,r)}});function IFe(r,t){return function(){return r.apply(t,arguments)}}var vCr=et(()=>{"use strict"});function dol(r){return r!==null&&!vFe(r)&&r.constructor!==null&&!vFe(r.constructor)&&W_(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}function pol(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&n1i(r.buffer),t}function SFe(r,t,{allOwnKeys:n=!1}={}){if(r===null||typeof r>"u")return;let i,o;if(typeof r!="object"&&(r=[r]),SEe(r))for(i=0,o=r.length;i<o;i++)t.call(null,r[i],i,r);else{let s=n?Object.getOwnPropertyNames(r):Object.keys(r),a=s.length,l;for(i=0;i<a;i++)l=s[i],t.call(null,r[l],l,r)}}function o1i(r,t){t=t.toLowerCase();let n=Object.keys(r),i=n.length,o;for(;i-- >0;)if(o=n[i],t===o.toLowerCase())return o;return null}function _Cr(){let{caseless:r}=s1i(this)&&this||{},t={},n=(i,o)=>{let s=r&&o1i(t,o)||o;Amt(t[s])&&Amt(i)?t[s]=_Cr(t[s],i):Amt(i)?t[s]=_Cr({},i):SEe(i)?t[s]=i.slice():t[s]=i};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&SFe(arguments[i],n);return t}function Gol(r){return!!(r&&W_(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}var uol,OCr,hmt,bx,gmt,SEe,vFe,n1i,fol,W_,i1i,mmt,Aol,Amt,hol,gol,mol,yol,Eol,bol,Col,Iol,vol,Sol,_ol,Ool,Tle,s1i,Tol,wol,Rol,Bol,xol,Mol,Dol,Nol,Pol,kol,Qol,t1i,Lol,a1i,Fol,qol,zol,Uol,SCr,r1i,l1i,jol,Wol,Hol,Vol,c1i,Yol,er,xd=et(()=>{"use strict";vCr();({toString:uol}=Object.prototype),{getPrototypeOf:OCr}=Object,hmt=(r=>t=>{let n=uol.call(t);return r[n]||(r[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),bx=r=>(r=r.toLowerCase(),t=>hmt(t)===r),gmt=r=>t=>typeof t===r,{isArray:SEe}=Array,vFe=gmt("undefined");n1i=bx("ArrayBuffer");fol=gmt("string"),W_=gmt("function"),i1i=gmt("number"),mmt=r=>r!==null&&typeof r=="object",Aol=r=>r===!0||r===!1,Amt=r=>{if(hmt(r)!=="object")return!1;let t=OCr(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},hol=bx("Date"),gol=bx("File"),mol=bx("Blob"),yol=bx("FileList"),Eol=r=>mmt(r)&&W_(r.pipe),bol=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||W_(r.append)&&((t=hmt(r))==="formdata"||t==="object"&&W_(r.toString)&&r.toString()==="[object FormData]"))},Col=bx("URLSearchParams"),[Iol,vol,Sol,_ol]=["ReadableStream","Request","Response","Headers"].map(bx),Ool=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");Tle=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,s1i=r=>!vFe(r)&&r!==Tle;Tol=(r,t,n,{allOwnKeys:i}={})=>(SFe(t,(o,s)=>{n&&W_(o)?r[s]=IFe(o,n):r[s]=o},{allOwnKeys:i}),r),wol=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Rol=(r,t,n,i)=>{r.prototype=Object.create(t.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),n&&Object.assign(r.prototype,n)},Bol=(r,t,n,i)=>{let o,s,a,l={};if(t=t||{},r==null)return t;do{for(o=Object.getOwnPropertyNames(r),s=o.length;s-- >0;)a=o[s],(!i||i(a,r,t))&&!l[a]&&(t[a]=r[a],l[a]=!0);r=n!==!1&&OCr(r)}while(r&&(!n||n(r,t))&&r!==Object.prototype);return t},xol=(r,t,n)=>{r=String(r),(n===void 0||n>r.length)&&(n=r.length),n-=t.length;let i=r.indexOf(t,n);return i!==-1&&i===n},Mol=r=>{if(!r)return null;if(SEe(r))return r;let t=r.length;if(!i1i(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=r[t];return n},Dol=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&OCr(Uint8Array)),Nol=(r,t)=>{let i=(r&&r[Symbol.iterator]).call(r),o;for(;(o=i.next())&&!o.done;){let s=o.value;t.call(r,s[0],s[1])}},Pol=(r,t)=>{let n,i=[];for(;(n=r.exec(t))!==null;)i.push(n);return i},kol=bx("HTMLFormElement"),Qol=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),t1i=(({hasOwnProperty:r})=>(t,n)=>r.call(t,n))(Object.prototype),Lol=bx("RegExp"),a1i=(r,t)=>{let n=Object.getOwnPropertyDescriptors(r),i={};SFe(n,(o,s)=>{let a;(a=t(o,s,r))!==!1&&(i[s]=a||o)}),Object.defineProperties(r,i)},Fol=r=>{a1i(r,(t,n)=>{if(W_(r)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let i=r[n];if(W_(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qol=(r,t)=>{let n={},i=o=>{o.forEach(s=>{n[s]=!0})};return SEe(r)?i(r):i(String(r).split(t)),n},zol=()=>{},Uol=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t,SCr="abcdefghijklmnopqrstuvwxyz",r1i="0123456789",l1i={DIGIT:r1i,ALPHA:SCr,ALPHA_DIGIT:SCr+SCr.toUpperCase()+r1i},jol=(r=16,t=l1i.ALPHA_DIGIT)=>{let n="",{length:i}=t;for(;r--;)n+=t[Math.random()*i|0];return n};Wol=r=>{let t=new Array(10),n=(i,o)=>{if(mmt(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[o]=i;let s=SEe(i)?[]:{};return SFe(i,(a,l)=>{let u=n(a,o+1);!vFe(u)&&(s[l]=u)}),t[o]=void 0,s}}return i};return n(r,0)},Hol=bx("AsyncFunction"),Vol=r=>r&&(mmt(r)||W_(r))&&W_(r.then)&&W_(r.catch),c1i=((r,t)=>r?setImmediate:t?((n,i)=>(Tle.addEventListener("message",({source:o,data:s})=>{o===Tle&&s===n&&i.length&&i.shift()()},!1),o=>{i.push(o),Tle.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",W_(Tle.postMessage)),Yol=typeof queueMicrotask<"u"?queueMicrotask.bind(Tle):typeof process<"u"&&process.nextTick||c1i,er={isArray:SEe,isArrayBuffer:n1i,isBuffer:dol,isFormData:bol,isArrayBufferView:pol,isString:fol,isNumber:i1i,isBoolean:Aol,isObject:mmt,isPlainObject:Amt,isReadableStream:Iol,isRequest:vol,isResponse:Sol,isHeaders:_ol,isUndefined:vFe,isDate:hol,isFile:gol,isBlob:mol,isRegExp:Lol,isFunction:W_,isStream:Eol,isURLSearchParams:Col,isTypedArray:Dol,isFileList:yol,forEach:SFe,merge:_Cr,extend:Tol,trim:Ool,stripBOM:wol,inherits:Rol,toFlatObject:Bol,kindOf:hmt,kindOfTest:bx,endsWith:xol,toArray:Mol,forEachEntry:Nol,matchAll:Pol,isHTMLForm:kol,hasOwnProperty:t1i,hasOwnProp:t1i,reduceDescriptors:a1i,freezeMethods:Fol,toObjectSet:qol,toCamelCase:Qol,noop:zol,toFiniteNumber:Uol,findKey:o1i,global:Tle,isContextDefined:s1i,ALPHABET:l1i,generateString:jol,isSpecCompliantForm:Gol,toJSONObject:Wol,isAsyncFn:Hol,isThenable:Vol,setImmediate:c1i,asap:Yol}});function _Ee(r,t,n,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status?o.status:null)}var u1i,d1i,so,H_=et(()=>{"use strict";xd();er.inherits(_Ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:er.toJSONObject(this.config),code:this.code,status:this.status}}});u1i=_Ee.prototype,d1i={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{d1i[r]={value:r}});Object.defineProperties(_Ee,d1i);Object.defineProperty(u1i,"isAxiosError",{value:!0});_Ee.from=(r,t,n,i,o,s)=>{let a=Object.create(u1i);return er.toFlatObject(r,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),_Ee.call(a,r.message,t,n,i,o),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};so=_Ee});var p1i,ymt,TCr=et(()=>{p1i=Et(yPe(),1),ymt=p1i.default});function wCr(r){return er.isPlainObject(r)||er.isArray(r)}function A1i(r){return er.endsWith(r,"[]")?r.slice(0,-2):r}function f1i(r,t,n){return r?r.concat(t).map(function(o,s){return o=A1i(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Kol(r){return er.isArray(r)&&!r.some(wCr)}function Xol(r,t,n){if(!er.isObject(r))throw new TypeError("target must be an object");t=t||new(ymt||FormData),n=er.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,C){return!er.isUndefined(C[y])});let i=n.metaTokens,o=n.visitor||d,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&er.isSpecCompliantForm(t);if(!er.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(er.isDate(h))return h.toISOString();if(!u&&er.isBlob(h))throw new so("Blob is not supported. Use a Buffer instead.");return er.isArrayBuffer(h)||er.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,y,C){let v=h;if(h&&!C&&typeof h=="object"){if(er.endsWith(y,"{}"))y=i?y:y.slice(0,-2),h=JSON.stringify(h);else if(er.isArray(h)&&Kol(h)||(er.isFileList(h)||er.endsWith(y,"[]"))&&(v=er.toArray(h)))return y=A1i(y),v.forEach(function(w,R){!(er.isUndefined(w)||w===null)&&t.append(a===!0?f1i([y],R,s):a===null?y:y+"[]",c(w))}),!1}return wCr(h)?!0:(t.append(f1i(C,y,s),c(h)),!1)}let p=[],f=Object.assign(Jol,{defaultVisitor:d,convertValue:c,isVisitable:wCr});function A(h,y){if(!er.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));p.push(h),er.forEach(h,function(v,O){(!(er.isUndefined(v)||v===null)&&o.call(t,v,er.isString(O)?O.trim():O,y,f))===!0&&A(v,y?y.concat(O):[O])}),p.pop()}}if(!er.isObject(r))throw new TypeError("data must be an object");return A(r),t}var Jol,uY,_Fe=et(()=>{"use strict";xd();H_();TCr();Jol=er.toFlatObject(er,{},null,function(t){return/^is[A-Z]/.test(t)});uY=Xol});function h1i(r){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function g1i(r,t){this._pairs=[],r&&uY(r,this,t)}var m1i,y1i,E1i=et(()=>{"use strict";_Fe();m1i=g1i.prototype;m1i.append=function(t,n){this._pairs.push([t,n])};m1i.toString=function(t){let n=t?function(i){return t.call(this,i,h1i)}:h1i;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};y1i=g1i});function $ol(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wle(r,t,n){if(!t)return r;let i=n&&n.encode||$ol,o=n&&n.serialize,s;if(o?s=o(t,n):s=er.isURLSearchParams(t)?t.toString():new y1i(t,n).toString(i),s){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}var Emt=et(()=>{"use strict";xd();E1i()});var RCr,BCr,b1i=et(()=>{"use strict";xd();RCr=class{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){er.forEach(this.handlers,function(i){i!==null&&t(i)})}},BCr=RCr});var OEe,bmt=et(()=>{"use strict";OEe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var C1i,I1i,v1i=et(()=>{"use strict";C1i=Et(require("url"),1),I1i=C1i.default.URLSearchParams});var S1i,_1i=et(()=>{v1i();TCr();S1i={isNode:!0,classes:{URLSearchParams:I1i,FormData:ymt,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]}});var DCr={};Ov(DCr,{hasBrowserEnv:()=>MCr,hasStandardBrowserEnv:()=>Zol,hasStandardBrowserWebWorkerEnv:()=>esl,navigator:()=>xCr,origin:()=>tsl});var MCr,xCr,Zol,esl,tsl,O1i=et(()=>{MCr=typeof window<"u"&&typeof document<"u",xCr=typeof navigator=="object"&&navigator||void 0,Zol=MCr&&(!xCr||["ReactNative","NativeScript","NS"].indexOf(xCr.product)<0),esl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tsl=MCr&&window.location.href||"http://localhost"});var tp,mN=et(()=>{_1i();O1i();tp={...DCr,...S1i}});function NCr(r,t){return uY(r,new tp.classes.URLSearchParams,Object.assign({visitor:function(n,i,o,s){return tp.isNode&&er.isBuffer(n)?(this.append(i,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}var T1i=et(()=>{"use strict";xd();_Fe();mN()});function rsl(r){return er.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nsl(r){let t={},n=Object.keys(r),i,o=n.length,s;for(i=0;i<o;i++)s=n[i],t[s]=r[s];return t}function isl(r){function t(n,i,o,s){let a=n[s++];if(a==="__proto__")return!0;let l=Number.isFinite(+a),u=s>=n.length;return a=!a&&er.isArray(o)?o.length:a,u?(er.hasOwnProp(o,a)?o[a]=[o[a],i]:o[a]=i,!l):((!o[a]||!er.isObject(o[a]))&&(o[a]=[]),t(n,i,o[a],s)&&er.isArray(o[a])&&(o[a]=nsl(o[a])),!l)}if(er.isFormData(r)&&er.isFunction(r.entries)){let n={};return er.forEachEntry(r,(i,o)=>{t(rsl(i),o,n,0)}),n}return null}var Cmt,PCr=et(()=>{"use strict";xd();Cmt=isl});function osl(r,t,n){if(er.isString(r))try{return(t||JSON.parse)(r),er.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(r)}var kCr,TEe,Imt=et(()=>{"use strict";xd();H_();bmt();_Fe();T1i();mN();PCr();kCr={transitional:OEe,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let i=n.getContentType()||"",o=i.indexOf("application/json")>-1,s=er.isObject(t);if(s&&er.isHTMLForm(t)&&(t=new FormData(t)),er.isFormData(t))return o?JSON.stringify(Cmt(t)):t;if(er.isArrayBuffer(t)||er.isBuffer(t)||er.isStream(t)||er.isFile(t)||er.isBlob(t)||er.isReadableStream(t))return t;if(er.isArrayBufferView(t))return t.buffer;if(er.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return NCr(t,this.formSerializer).toString();if((l=er.isFileList(t))||i.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return uY(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),osl(t)):t}],transformResponse:[function(t){let n=this.transitional||kCr.transitional,i=n&&n.forcedJSONParsing,o=this.responseType==="json";if(er.isResponse(t)||er.isReadableStream(t))return t;if(t&&er.isString(t)&&(i&&!this.responseType||o)){let a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?so.from(l,so.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tp.classes.FormData,Blob:tp.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};er.forEach(["delete","get","head","post","put","patch"],r=>{kCr.headers[r]={}});TEe=kCr});var ssl,w1i,R1i=et(()=>{"use strict";xd();ssl=er.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),w1i=r=>{let t={},n,i,o;return r&&r.split(`
|
|
180
180
|
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),i=a.substring(o+1).trim(),!(!n||t[n]&&ssl[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t}});function OFe(r){return r&&String(r).trim().toLowerCase()}function vmt(r){return r===!1||r==null?r:er.isArray(r)?r.map(vmt):String(r)}function asl(r){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=n.exec(r);)t[i[1]]=i[2];return t}function QCr(r,t,n,i,o){if(er.isFunction(i))return i.call(this,t,n);if(o&&(t=n),!!er.isString(t)){if(er.isString(i))return t.indexOf(i)!==-1;if(er.isRegExp(i))return i.test(t)}}function csl(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function usl(r,t){let n=er.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+n,{value:function(o,s,a){return this[i].call(this,t,o,s,a)},configurable:!0})})}var B1i,lsl,wEe,Hf,yN=et(()=>{"use strict";xd();R1i();B1i=Symbol("internals");lsl=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());wEe=class{constructor(t){t&&this.set(t)}set(t,n,i){let o=this;function s(l,u,c){let d=OFe(u);if(!d)throw new Error("header name must be a non-empty string");let p=er.findKey(o,d);(!p||o[p]===void 0||c===!0||c===void 0&&o[p]!==!1)&&(o[p||u]=vmt(l))}let a=(l,u)=>er.forEach(l,(c,d)=>s(c,d,u));if(er.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(er.isString(t)&&(t=t.trim())&&!lsl(t))a(w1i(t),n);else if(er.isHeaders(t))for(let[l,u]of t.entries())s(u,l,i);else t!=null&&s(n,t,i);return this}get(t,n){if(t=OFe(t),t){let i=er.findKey(this,t);if(i){let o=this[i];if(!n)return o;if(n===!0)return asl(o);if(er.isFunction(n))return n.call(this,o,i);if(er.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=OFe(t),t){let i=er.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||QCr(this,this[i],i,n)))}return!1}delete(t,n){let i=this,o=!1;function s(a){if(a=OFe(a),a){let l=er.findKey(i,a);l&&(!n||QCr(i,i[l],l,n))&&(delete i[l],o=!0)}}return er.isArray(t)?t.forEach(s):s(t),o}clear(t){let n=Object.keys(this),i=n.length,o=!1;for(;i--;){let s=n[i];(!t||QCr(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){let n=this,i={};return er.forEach(this,(o,s)=>{let a=er.findKey(i,s);if(a){n[a]=vmt(o),delete n[s];return}let l=t?csl(s):String(s).trim();l!==s&&delete n[s],n[l]=vmt(o),i[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return er.forEach(this,(i,o)=>{i!=null&&i!==!1&&(n[o]=t&&er.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
181
181
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let i=new this(t);return n.forEach(o=>i.set(o)),i}static accessor(t){let i=(this[B1i]=this[B1i]={accessors:{}}).accessors,o=this.prototype;function s(a){let l=OFe(a);i[l]||(usl(o,a),i[l]=!0)}return er.isArray(t)?t.forEach(s):s(t),this}};wEe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);er.reduceDescriptors(wEe.prototype,({value:r},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(i){this[n]=i}}});er.freezeMethods(wEe);Hf=wEe});function TFe(r,t){let n=this||TEe,i=t||n,o=Hf.from(i.headers),s=i.data;return er.forEach(r,function(l){s=l.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}var x1i=et(()=>{"use strict";xd();Imt();yN()});function wFe(r){return!!(r&&r.__CANCEL__)}var LCr=et(()=>{"use strict"});function M1i(r,t,n){so.call(this,r??"canceled",so.ERR_CANCELED,t,n),this.name="CanceledError"}var V_,Rle=et(()=>{"use strict";H_();xd();er.inherits(M1i,so,{__CANCEL__:!0});V_=M1i});function EN(r,t,n){let i=n.config.validateStatus;!n.status||!i||i(n.status)?r(n):t(new so("Request failed with status code "+n.status,[so.ERR_BAD_REQUEST,so.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var Smt=et(()=>{"use strict";H_()});function FCr(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}var D1i=et(()=>{"use strict"});function qCr(r,t){return t?r.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):r}var N1i=et(()=>{"use strict"});function Ble(r,t){return r&&!FCr(t)?qCr(r,t):t}var _mt=et(()=>{"use strict";D1i();N1i()});var xle,Omt=et(()=>{xle="1.7.7"});function RFe(r){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}var zCr=et(()=>{"use strict"});function UCr(r,t,n){let i=n&&n.Blob||tp.classes.Blob,o=RFe(r);if(t===void 0&&i&&(t=!0),o==="data"){r=o.length?r.slice(o.length+1):r;let s=dsl.exec(r);if(!s)throw new so("Invalid URL",so.ERR_INVALID_URL);let a=s[1],l=s[2],u=s[3],c=Buffer.from(decodeURIComponent(u),l?"base64":"utf8");if(t){if(!i)throw new so("Blob is not supported",so.ERR_NOT_SUPPORT);return new i([c],{type:a})}return c}throw new so("Unsupported protocol "+o,so.ERR_NOT_SUPPORT)}var dsl,P1i=et(()=>{"use strict";H_();zCr();mN();dsl=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});var k1i,jCr,GCr,WCr,Q1i=et(()=>{"use strict";k1i=Et(require("stream"),1);xd();jCr=Symbol("internals"),GCr=class extends k1i.default.Transform{constructor(t){t=er.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,o)=>!er.isUndefined(o[i])),super({readableHighWaterMark:t.chunkSize});let n=this[jCr]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(n.isCaptured||(n.isCaptured=!0))})}_read(t){let n=this[jCr];return n.onReadCallback&&n.onReadCallback(),super._read(t)}_transform(t,n,i){let o=this[jCr],s=o.maxRate,a=this.readableHighWaterMark,l=o.timeWindow,u=1e3/l,c=s/u,d=o.minChunkSize!==!1?Math.max(o.minChunkSize,c*.01):0,p=(A,h)=>{let y=Buffer.byteLength(A);o.bytesSeen+=y,o.bytes+=y,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(A)?process.nextTick(h):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(h)}},f=(A,h)=>{let y=Buffer.byteLength(A),C=null,v=a,O,w=0;if(s){let R=Date.now();(!o.ts||(w=R-o.ts)>=l)&&(o.ts=R,O=c-o.bytes,o.bytes=O<0?-O:0,w=0),O=c-o.bytes}if(s){if(O<=0)return setTimeout(()=>{h(null,A)},l-w);O<v&&(v=O)}v&&y>v&&y-v>d&&(C=A.subarray(v),A=A.subarray(0,v)),p(A,C?()=>{process.nextTick(h,null,C)}:h)};f(t,function A(h,y){if(h)return i(h);y?f(y,A):i(null)})}},WCr=GCr});var L1i,psl,Tmt,HCr=et(()=>{({asyncIterator:L1i}=Symbol),psl=async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[L1i]?yield*r[L1i]():yield r},Tmt=psl});var F1i,q1i,fsl,BFe,dY,Asl,hsl,VCr,gsl,z1i,U1i=et(()=>{F1i=require("util"),q1i=require("stream");xd();HCr();fsl=er.ALPHABET.ALPHA_DIGIT+"-_",BFe=new F1i.TextEncoder,dY=`\r
|
|
182
182
|
`,Asl=BFe.encode(dY),hsl=2,VCr=class{constructor(t,n){let{escapeName:i}=this.constructor,o=er.isString(n),s=`Content-Disposition: form-data; name="${i(t)}"${!o&&n.name?`; filename="${i(n.name)}"`:""}${dY}`;o?n=BFe.encode(String(n).replace(/\r?\n|\r\n?/g,dY)):s+=`Content-Type: ${n.type||"application/octet-stream"}${dY}`,this.headers=BFe.encode(s+dY),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+hsl,this.name=t,this.value=n}async*encode(){yield this.headers;let{value:t}=this;er.isTypedArray(t)?yield t:yield*Tmt(t),yield Asl}static escapeName(t){return String(t).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},gsl=(r,t,n)=>{let{tag:i="form-data-boundary",size:o=25,boundary:s=i+"-"+er.generateString(o,fsl)}=n||{};if(!er.isFormData(r))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let a=BFe.encode("--"+s+dY),l=BFe.encode("--"+s+"--"+dY+dY),u=l.byteLength,c=Array.from(r.entries()).map(([p,f])=>{let A=new VCr(p,f);return u+=A.size,A});u+=a.byteLength*c.length,u=er.toFiniteNumber(u);let d={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(u)&&(d["Content-Length"]=u),t&&t(d),q1i.Readable.from(async function*(){for(let p of c)yield a,yield*p.encode();yield l}())},z1i=gsl});var j1i,YCr,G1i,W1i=et(()=>{"use strict";j1i=Et(require("stream"),1),YCr=class extends j1i.default.Transform{__transform(t,n,i){this.push(t),i()}_transform(t,n,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,n)}this.__transform(t,n,i)}},G1i=YCr});var msl,H1i,V1i=et(()=>{xd();msl=(r,t)=>er.isAsyncFn(r)?function(...n){let i=n.pop();r.apply(this,n).then(o=>{try{t?i(null,...t(o)):i(null,o)}catch(s){i(s)}},i)}:r,H1i=msl});function ysl(r,t){r=r||10;let n=new Array(r),i=new Array(r),o=0,s=0,a;return t=t!==void 0?t:1e3,function(u){let c=Date.now(),d=i[s];a||(a=c),n[o]=u,i[o]=c;let p=s,f=0;for(;p!==o;)f+=n[p++],p=p%r;if(o=(o+1)%r,o===s&&(s=(s+1)%r),c-a<t)return;let A=d&&c-d;return A?Math.round(f*1e3/A):void 0}}var Y1i,K1i=et(()=>{"use strict";Y1i=ysl});function Esl(r,t){let n=0,i=1e3/t,o,s,a=(c,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),r.apply(null,c)};return[(...c)=>{let d=Date.now(),p=d-n;p>=i?a(c,d):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},i-p)))},()=>o&&a(o)]}var J1i,X1i=et(()=>{J1i=Esl});var $q,REe,BEe,wmt=et(()=>{K1i();X1i();xd();$q=(r,t,n=3)=>{let i=0,o=Y1i(50,250);return J1i(s=>{let a=s.loaded,l=s.lengthComputable?s.total:void 0,u=a-i,c=o(u),d=a<=l;i=a;let p={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&d?(l-a)/c:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};r(p)},n)},REe=(r,t)=>{let n=r!=null;return[i=>t[0]({lengthComputable:n,total:r,loaded:i}),t[1]]},BEe=r=>(...t)=>er.asap(()=>r(...t))});function Ssl(r,t){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,t)}function cfi(r,t,n){let i=t;if(!i&&i!==!1){let o=(0,nfi.getProxyForUrl)(n);o&&(i=new URL(o))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let s=Buffer.from(i.auth,"utf8").toString("base64");r.headers["Proxy-Authorization"]="Basic "+s}r.headers.host=r.hostname+(r.port?":"+r.port:"");let o=i.hostname||i.host;r.hostname=o,r.host=o,r.port=i.port,r.path=n,i.protocol&&(r.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}r.beforeRedirects.proxy=function(s){cfi(s,t,s.href)}}var nfi,ifi,ofi,sfi,afi,Zq,Mle,lfi,$1i,bsl,Z1i,Csl,Isl,vsl,efi,tfi,_sl,Osl,Tsl,rfi,ufi,dfi=et(()=>{"use strict";xd();Smt();_mt();Emt();nfi=Et(EPe(),1),ifi=Et(require("http"),1),ofi=Et(require("https"),1),sfi=Et(require("util"),1),afi=Et(Jcr(),1),Zq=Et(require("zlib"),1);Omt();bmt();H_();Rle();mN();P1i();Mle=Et(require("stream"),1);yN();Q1i();lfi=require("events");U1i();HCr();W1i();V1i();wmt();$1i={flush:Zq.default.constants.Z_SYNC_FLUSH,finishFlush:Zq.default.constants.Z_SYNC_FLUSH},bsl={flush:Zq.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Zq.default.constants.BROTLI_OPERATION_FLUSH},Z1i=er.isFunction(Zq.default.createBrotliDecompress),{http:Csl,https:Isl}=afi.default,vsl=/https:?/,efi=tp.protocols.map(r=>r+":"),tfi=(r,[t,n])=>(r.on("end",n).on("error",n),t);_sl=typeof process<"u"&&er.kindOf(process)==="process",Osl=r=>new Promise((t,n)=>{let i,o,s=(u,c)=>{o||(o=!0,i&&i(u,c))},a=u=>{s(u),t(u)},l=u=>{s(u,!0),n(u)};r(a,l,u=>i=u).catch(l)}),Tsl=({address:r,family:t})=>{if(!er.isString(r))throw TypeError("address must be a string");return{address:r,family:t||(r.indexOf(".")<0?6:4)}},rfi=(r,t)=>Tsl(er.isObject(r)?r:{address:r,family:t}),ufi=_sl&&function(t){return Osl(async function(i,o,s){let{data:a,lookup:l,family:u}=t,{responseType:c,responseEncoding:d}=t,p=t.method.toUpperCase(),f,A=!1,h;if(l){let ne=H1i(l,ie=>er.isArray(ie)?ie:[ie]);l=(ie,W,se)=>{ne(ie,W,(le,oe,fe)=>{if(le)return se(le);let Be=er.isArray(oe)?oe.map(Fe=>rfi(Fe)):[rfi(oe,fe)];W.all?se(le,Be):se(le,Be[0].address,Be[0].family)})}}let y=new lfi.EventEmitter,C=()=>{t.cancelToken&&t.cancelToken.unsubscribe(v),t.signal&&t.signal.removeEventListener("abort",v),y.removeAllListeners()};s((ne,ie)=>{f=!0,ie&&(A=!0,C())});function v(ne){y.emit("abort",!ne||ne.type?new V_(null,t,h):ne)}y.once("abort",o),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(v),t.signal&&(t.signal.aborted?v():t.signal.addEventListener("abort",v)));let O=Ble(t.baseURL,t.url),w=new URL(O,tp.hasBrowserEnv?tp.origin:void 0),R=w.protocol||efi[0];if(R==="data:"){let ne;if(p!=="GET")return EN(i,o,{status:405,statusText:"method not allowed",headers:{},config:t});try{ne=UCr(t.url,c==="blob",{Blob:t.env&&t.env.Blob})}catch(ie){throw so.from(ie,so.ERR_BAD_REQUEST,t)}return c==="text"?(ne=ne.toString(d),(!d||d==="utf8")&&(ne=er.stripBOM(ne))):c==="stream"&&(ne=Mle.default.Readable.from(ne)),EN(i,o,{data:ne,status:200,statusText:"OK",headers:new Hf,config:t})}if(efi.indexOf(R)===-1)return o(new so("Unsupported protocol "+R,so.ERR_BAD_REQUEST,t));let P=Hf.from(t.headers).normalize();P.set("User-Agent","axios/"+xle,!1);let{onUploadProgress:z,onDownloadProgress:H}=t,J=t.maxRate,K,V;if(er.isSpecCompliantForm(a)){let ne=P.getContentType(/boundary=([-_\w\d]{10,70})/i);a=z1i(a,ie=>{P.set(ie)},{tag:`axios-${xle}-boundary`,boundary:ne&&ne[1]||void 0})}else if(er.isFormData(a)&&er.isFunction(a.getHeaders)){if(P.set(a.getHeaders()),!P.hasContentLength())try{let ne=await sfi.default.promisify(a.getLength).call(a);Number.isFinite(ne)&&ne>=0&&P.setContentLength(ne)}catch{}}else if(er.isBlob(a))a.size&&P.setContentType(a.type||"application/octet-stream"),P.setContentLength(a.size||0),a=Mle.default.Readable.from(Tmt(a));else if(a&&!er.isStream(a)){if(!Buffer.isBuffer(a))if(er.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(er.isString(a))a=Buffer.from(a,"utf-8");else return o(new so("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",so.ERR_BAD_REQUEST,t));if(P.setContentLength(a.length,!1),t.maxBodyLength>-1&&a.length>t.maxBodyLength)return o(new so("Request body larger than maxBodyLength limit",so.ERR_BAD_REQUEST,t))}let F=er.toFiniteNumber(P.getContentLength());er.isArray(J)?(K=J[0],V=J[1]):K=V=J,a&&(z||K)&&(er.isStream(a)||(a=Mle.default.Readable.from(a,{objectMode:!1})),a=Mle.default.pipeline([a,new WCr({maxRate:er.toFiniteNumber(K)})],er.noop),z&&a.on("progress",tfi(a,REe(F,$q(BEe(z),!1,3)))));let X;if(t.auth){let ne=t.auth.username||"",ie=t.auth.password||"";X=ne+":"+ie}if(!X&&w.username){let ne=w.username,ie=w.password;X=ne+":"+ie}X&&P.delete("authorization");let Y;try{Y=wle(w.pathname+w.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(ne){let ie=new Error(ne.message);return ie.config=t,ie.url=t.url,ie.exists=!0,o(ie)}P.set("Accept-Encoding","gzip, compress, deflate"+(Z1i?", br":""),!1);let L={path:Y,method:p,headers:P.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:X,protocol:R,family:u,beforeRedirect:Ssl,beforeRedirects:{}};!er.isUndefined(l)&&(L.lookup=l),t.socketPath?L.socketPath=t.socketPath:(L.hostname=w.hostname.startsWith("[")?w.hostname.slice(1,-1):w.hostname,L.port=w.port,cfi(L,t.proxy,R+"//"+w.hostname+(w.port?":"+w.port:"")+L.path));let $,te=vsl.test(L.protocol);if(L.agent=te?t.httpsAgent:t.httpAgent,t.transport?$=t.transport:t.maxRedirects===0?$=te?ofi.default:ifi.default:(t.maxRedirects&&(L.maxRedirects=t.maxRedirects),t.beforeRedirect&&(L.beforeRedirects.config=t.beforeRedirect),$=te?Isl:Csl),t.maxBodyLength>-1?L.maxBodyLength=t.maxBodyLength:L.maxBodyLength=1/0,t.insecureHTTPParser&&(L.insecureHTTPParser=t.insecureHTTPParser),h=$.request(L,function(ie){if(h.destroyed)return;let W=[ie],se=+ie.headers["content-length"];if(H||V){let Fe=new WCr({maxRate:er.toFiniteNumber(V)});H&&Fe.on("progress",tfi(Fe,REe(se,$q(BEe(H),!0,3)))),W.push(Fe)}let le=ie,oe=ie.req||h;if(t.decompress!==!1&&ie.headers["content-encoding"])switch((p==="HEAD"||ie.statusCode===204)&&delete ie.headers["content-encoding"],(ie.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":W.push(Zq.default.createUnzip($1i)),delete ie.headers["content-encoding"];break;case"deflate":W.push(new G1i),W.push(Zq.default.createUnzip($1i)),delete ie.headers["content-encoding"];break;case"br":Z1i&&(W.push(Zq.default.createBrotliDecompress(bsl)),delete ie.headers["content-encoding"])}le=W.length>1?Mle.default.pipeline(W,er.noop):W[0];let fe=Mle.default.finished(le,()=>{fe(),C()}),Be={status:ie.statusCode,statusText:ie.statusMessage,headers:new Hf(ie.headers),config:t,request:oe};if(c==="stream")Be.data=le,EN(i,o,Be);else{let Fe=[],me=0;le.on("data",function(Ye){Fe.push(Ye),me+=Ye.length,t.maxContentLength>-1&&me>t.maxContentLength&&(A=!0,le.destroy(),o(new so("maxContentLength size of "+t.maxContentLength+" exceeded",so.ERR_BAD_RESPONSE,t,oe)))}),le.on("aborted",function(){if(A)return;let Ye=new so("maxContentLength size of "+t.maxContentLength+" exceeded",so.ERR_BAD_RESPONSE,t,oe);le.destroy(Ye),o(Ye)}),le.on("error",function(Ye){h.destroyed||o(so.from(Ye,null,t,oe))}),le.on("end",function(){try{let Ye=Fe.length===1?Fe[0]:Buffer.concat(Fe);c!=="arraybuffer"&&(Ye=Ye.toString(d),(!d||d==="utf8")&&(Ye=er.stripBOM(Ye))),Be.data=Ye}catch(Ye){return o(so.from(Ye,null,t,Be.request,Be))}EN(i,o,Be)})}y.once("abort",Fe=>{le.destroyed||(le.emit("error",Fe),le.destroy())})}),y.once("abort",ne=>{o(ne),h.destroy(ne)}),h.on("error",function(ie){o(so.from(ie,null,t,h))}),h.on("socket",function(ie){ie.setKeepAlive(!0,1e3*60)}),t.timeout){let ne=parseInt(t.timeout,10);if(Number.isNaN(ne)){o(new so("error trying to parse `config.timeout` to int",so.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(ne,function(){if(f)return;let W=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",se=t.transitional||OEe;t.timeoutErrorMessage&&(W=t.timeoutErrorMessage),o(new so(W,se.clarifyTimeoutError?so.ETIMEDOUT:so.ECONNABORTED,t,h)),v()})}if(er.isStream(a)){let ne=!1,ie=!1;a.on("end",()=>{ne=!0}),a.once("error",W=>{ie=!0,h.destroy(W)}),a.on("close",()=>{!ne&&!ie&&v(new V_("Request stream has been aborted",t,h))}),a.pipe(h)}else h.end(a)})}});var pfi,ffi=et(()=>{"use strict";xd();mN();pfi=tp.hasStandardBrowserEnv?function(){let t=tp.navigator&&/(msie|trident)/i.test(tp.navigator.userAgent),n=document.createElement("a"),i;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=o(window.location.href),function(a){let l=er.isString(a)?o(a):a;return l.protocol===i.protocol&&l.host===i.host}}():function(){return function(){return!0}}()});var Afi,hfi=et(()=>{xd();mN();Afi=tp.hasStandardBrowserEnv?{write(r,t,n,i,o,s){let a=[r+"="+encodeURIComponent(t)];er.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),er.isString(i)&&a.push("path="+i),er.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(r){let t=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}}});function Cx(r,t){t=t||{};let n={};function i(c,d,p){return er.isPlainObject(c)&&er.isPlainObject(d)?er.merge.call({caseless:p},c,d):er.isPlainObject(d)?er.merge({},d):er.isArray(d)?d.slice():d}function o(c,d,p){if(er.isUndefined(d)){if(!er.isUndefined(c))return i(void 0,c,p)}else return i(c,d,p)}function s(c,d){if(!er.isUndefined(d))return i(void 0,d)}function a(c,d){if(er.isUndefined(d)){if(!er.isUndefined(c))return i(void 0,c)}else return i(void 0,d)}function l(c,d,p){if(p in t)return i(c,d);if(p in r)return i(void 0,c)}let u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(c,d)=>o(gfi(c),gfi(d),!0)};return er.forEach(Object.keys(Object.assign({},r,t)),function(d){let p=u[d]||o,f=p(r[d],t[d],d);er.isUndefined(f)&&p!==l||(n[d]=f)}),n}var gfi,Rmt=et(()=>{"use strict";xd();yN();gfi=r=>r instanceof Hf?{...r}:r});var Bmt,KCr=et(()=>{mN();xd();ffi();hfi();_mt();Rmt();yN();Emt();Bmt=r=>{let t=Cx({},r),{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=t;t.headers=a=Hf.from(a),t.url=wle(Ble(t.baseURL,t.url),r.params,r.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(er.isFormData(n)){if(tp.hasStandardBrowserEnv||tp.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){let[c,...d]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(tp.hasStandardBrowserEnv&&(i&&er.isFunction(i)&&(i=i(t)),i||i!==!1&&pfi(t.url))){let c=o&&s&&Afi.read(s);c&&a.set(o,c)}return t}});var wsl,mfi,yfi=et(()=>{xd();Smt();bmt();H_();Rle();zCr();mN();yN();wmt();KCr();wsl=typeof XMLHttpRequest<"u",mfi=wsl&&function(r){return new Promise(function(n,i){let o=Bmt(r),s=o.data,a=Hf.from(o.headers).normalize(),{responseType:l,onUploadProgress:u,onDownloadProgress:c}=o,d,p,f,A,h;function y(){A&&A(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let C=new XMLHttpRequest;C.open(o.method.toUpperCase(),o.url,!0),C.timeout=o.timeout;function v(){if(!C)return;let w=Hf.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),P={data:!l||l==="text"||l==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:w,config:r,request:C};EN(function(H){n(H),y()},function(H){i(H),y()},P),C=null}"onloadend"in C?C.onloadend=v:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(v)},C.onabort=function(){C&&(i(new so("Request aborted",so.ECONNABORTED,r,C)),C=null)},C.onerror=function(){i(new so("Network Error",so.ERR_NETWORK,r,C)),C=null},C.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",P=o.transitional||OEe;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),i(new so(R,P.clarifyTimeoutError?so.ETIMEDOUT:so.ECONNABORTED,r,C)),C=null},s===void 0&&a.setContentType(null),"setRequestHeader"in C&&er.forEach(a.toJSON(),function(R,P){C.setRequestHeader(P,R)}),er.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),l&&l!=="json"&&(C.responseType=o.responseType),c&&([f,h]=$q(c,!0),C.addEventListener("progress",f)),u&&C.upload&&([p,A]=$q(u),C.upload.addEventListener("progress",p),C.upload.addEventListener("loadend",A)),(o.cancelToken||o.signal)&&(d=w=>{C&&(i(!w||w.type?new V_(null,r,C):w),C.abort(),C=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));let O=RFe(o.url);if(O&&tp.protocols.indexOf(O)===-1){i(new so("Unsupported protocol "+O+":",so.ERR_BAD_REQUEST,r));return}C.send(s||null)})}});var Rsl,Efi,bfi=et(()=>{Rle();H_();xd();Rsl=(r,t)=>{let{length:n}=r=r?r.filter(Boolean):[];if(t||n){let i=new AbortController,o,s=function(c){if(!o){o=!0,l();let d=c instanceof Error?c:this.reason;i.abort(d instanceof so?d:new V_(d instanceof Error?d.message:d))}},a=t&&setTimeout(()=>{a=null,s(new so(`timeout ${t} of ms exceeded`,so.ETIMEDOUT))},t),l=()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),r=null)};r.forEach(c=>c.addEventListener("abort",s));let{signal:u}=i;return u.unsubscribe=()=>er.asap(l),u}},Efi=Rsl});var Bsl,xsl,Msl,JCr,Cfi=et(()=>{Bsl=function*(r,t){let n=r.byteLength;if(!t||n<t){yield r;return}let i=0,o;for(;i<n;)o=i+t,yield r.slice(i,o),i=o},xsl=async function*(r,t){for await(let n of Msl(r))yield*Bsl(n,t)},Msl=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let t=r.getReader();try{for(;;){let{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},JCr=(r,t,n,i)=>{let o=xsl(r,t),s=0,a,l=u=>{a||(a=!0,i&&i(u))};return new ReadableStream({async pull(u){try{let{done:c,value:d}=await o.next();if(c){l(),u.close();return}let p=d.byteLength;if(n){let f=s+=p;n(f)}u.enqueue(new Uint8Array(d))}catch(c){throw l(c),c}},cancel(u){return l(u),o.return()}},{highWaterMark:2})}});var Mmt,vfi,Dsl,Sfi,Nsl,Ifi,XCr,xmt,Psl,ksl,_fi,Ofi=et(()=>{mN();xd();H_();bfi();Cfi();yN();wmt();KCr();Smt();Mmt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",vfi=Mmt&&typeof ReadableStream=="function",Dsl=Mmt&&(typeof TextEncoder=="function"?(r=>t=>r.encode(t))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Sfi=(r,...t)=>{try{return!!r(...t)}catch{return!1}},Nsl=vfi&&Sfi(()=>{let r=!1,t=new Request(tp.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!t}),Ifi=64*1024,XCr=vfi&&Sfi(()=>er.isReadableStream(new Response("").body)),xmt={stream:XCr&&(r=>r.body)};Mmt&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xmt[t]&&(xmt[t]=er.isFunction(r[t])?n=>n[t]():(n,i)=>{throw new so(`Response type '${t}' is not supported`,so.ERR_NOT_SUPPORT,i)})})})(new Response);Psl=async r=>{if(r==null)return 0;if(er.isBlob(r))return r.size;if(er.isSpecCompliantForm(r))return(await new Request(tp.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(er.isArrayBufferView(r)||er.isArrayBuffer(r))return r.byteLength;if(er.isURLSearchParams(r)&&(r=r+""),er.isString(r))return(await Dsl(r)).byteLength},ksl=async(r,t)=>{let n=er.toFiniteNumber(r.getContentLength());return n??Psl(t)},_fi=Mmt&&(async r=>{let{url:t,method:n,data:i,signal:o,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:u,responseType:c,headers:d,withCredentials:p="same-origin",fetchOptions:f}=Bmt(r);c=c?(c+"").toLowerCase():"text";let A=Efi([o,s&&s.toAbortSignal()],a),h,y=A&&A.unsubscribe&&(()=>{A.unsubscribe()}),C;try{if(u&&Nsl&&n!=="get"&&n!=="head"&&(C=await ksl(d,i))!==0){let P=new Request(t,{method:"POST",body:i,duplex:"half"}),z;if(er.isFormData(i)&&(z=P.headers.get("content-type"))&&d.setContentType(z),P.body){let[H,J]=REe(C,$q(BEe(u)));i=JCr(P.body,Ifi,H,J)}}er.isString(p)||(p=p?"include":"omit");let v="credentials"in Request.prototype;h=new Request(t,{...f,signal:A,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:v?p:void 0});let O=await fetch(h),w=XCr&&(c==="stream"||c==="response");if(XCr&&(l||w&&y)){let P={};["status","statusText","headers"].forEach(K=>{P[K]=O[K]});let z=er.toFiniteNumber(O.headers.get("content-length")),[H,J]=l&&REe(z,$q(BEe(l),!0))||[];O=new Response(JCr(O.body,Ifi,H,()=>{J&&J(),y&&y()}),P)}c=c||"text";let R=await xmt[er.findKey(xmt,c)||"text"](O,r);return!w&&y&&y(),await new Promise((P,z)=>{EN(P,z,{data:R,headers:Hf.from(O.headers),status:O.status,statusText:O.statusText,config:r,request:h})})}catch(v){throw y&&y(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new so("Network Error",so.ERR_NETWORK,r,h),{cause:v.cause||v}):so.from(v,v&&v.code,r,h)}})});var $Cr,Tfi,Qsl,Dmt,ZCr=et(()=>{xd();dfi();yfi();Ofi();H_();$Cr={http:ufi,xhr:mfi,fetch:_fi};er.forEach($Cr,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});Tfi=r=>`- ${r}`,Qsl=r=>er.isFunction(r)||r===null||r===!1,Dmt={getAdapter:r=>{r=er.isArray(r)?r:[r];let{length:t}=r,n,i,o={};for(let s=0;s<t;s++){n=r[s];let a;if(i=n,!Qsl(n)&&(i=$Cr[(a=String(n)).toLowerCase()],i===void 0))throw new so(`Unknown adapter '${a}'`);if(i)break;o[a||"#"+s]=i}if(!i){let s=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build")),a=t?s.length>1?`since :
|
|
@@ -7207,7 +7207,7 @@ The delete attempt failed with this message:
|
|
|
7207
7207
|
|
|
7208
7208
|
`,r.UPLOAD_MISMATCH=`The uploaded data did not match the data from the server.
|
|
7209
7209
|
As a precaution, the file has been deleted.
|
|
7210
|
-
To be sure the content is the same, you should try uploading the file again.`,r.MD5_RESUMED_UPLOAD="MD5 cannot be used with a continued resumable upload as MD5 cannot be extended from an existing value",r.MISSING_RESUME_CRC32C_FINAL_UPLOAD="The CRC32C is missing for the final portion of a resumed upload, which is required for validation. Please provide `resumeCRC32C` if validation is required, or disable `validation`."})(E3||(E3={}));var bL=class r extends SS{constructor(t,n,i={}){var o,s;let a={},l;i.generation!==null&&(typeof i.generation=="string"?l=Number(i.generation):l=i.generation,isNaN(l)||(a.generation=l)),Object.assign(a,i.preconditionOpts);let u=i.userProject||t.userProject;typeof u=="string"&&(a.userProject=u);let c={delete:{reqOpts:{qs:a}},exists:{reqOpts:{qs:a}},get:{reqOpts:{qs:a}},getMetadata:{reqOpts:{qs:a}},setMetadata:{reqOpts:{qs:a}}};if(super({parent:t,baseUrl:"/o",id:encodeURIComponent(n),methods:c}),Hbn.add(this),this.bucket=t,this.storage=t.parent,i.generation!==null){let d;typeof i.generation=="string"?d=Number(i.generation):d=i.generation,isNaN(d)||(this.generation=d)}this.kmsKeyName=i.kmsKeyName,this.userProject=u,this.name=n,i.encryptionKey&&this.setEncryptionKey(i.encryptionKey),this.acl=new Pne({request:this.request.bind(this),pathPrefix:"/acl"}),this.crc32cGenerator=i.crc32cGenerator||this.bucket.crc32cGenerator,this.instanceRetryValue=(s=(o=this.storage)===null||o===void 0?void 0:o.retryOptions)===null||s===void 0?void 0:s.autoRetry,this.instancePreconditionOpts=i?.preconditionOpts}get cloudStorageURI(){let t=this.bucket.cloudStorageURI;return t.pathname=this.name,t}shouldRetryBasedOnPreconditionAndIdempotencyStrat(t){var n;return!(t?.ifGenerationMatch===void 0&&((n=this.instancePreconditionOpts)===null||n===void 0?void 0:n.ifGenerationMatch)===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)}copy(t,n,i){var o,s;let a=new Error(E3.DESTINATION_NO_NAME);if(!t)throw a;let l={};typeof n=="function"?i=n:n&&(l={...n}),i=i||Su.noop;let u,c,d;if(typeof t=="string"){let A=$O0.exec(t);A!==null&&A.length===3?(u=this.storage.bucket(A[1]),c=A[2]):(u=this.bucket,c=t)}else if(t instanceof CL)u=t,c=this.name;else if(t instanceof r)u=t.bucket,c=t.name,d=t;else throw a;let p={};this.generation!==void 0&&(p.sourceGeneration=this.generation),l.token!==void 0&&(p.rewriteToken=l.token),l.userProject!==void 0&&(p.userProject=l.userProject,delete l.userProject),l.predefinedAcl!==void 0&&(p.destinationPredefinedAcl=l.predefinedAcl,delete l.predefinedAcl),d=d||u.file(c);let f={};if(this.encryptionKey!==void 0&&(f["x-goog-copy-source-encryption-algorithm"]="AES256",f["x-goog-copy-source-encryption-key"]=this.encryptionKeyBase64,f["x-goog-copy-source-encryption-key-sha256"]=this.encryptionKeyHash),d.encryptionKey!==void 0?this.setEncryptionKey(d.encryptionKey):l.destinationKmsKeyName!==void 0?(p.destinationKmsKeyName=l.destinationKmsKeyName,delete l.destinationKmsKeyName):d.kmsKeyName!==void 0&&(p.destinationKmsKeyName=d.kmsKeyName),p.destinationKmsKeyName){this.kmsKeyName=p.destinationKmsKeyName;let A=this.interceptors.indexOf(this.encryptionKeyInterceptor);A>-1&&this.interceptors.splice(A,1)}this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(l?.preconditionOpts)||(this.storage.retryOptions.autoRetry=!1),((o=l.preconditionOpts)===null||o===void 0?void 0:o.ifGenerationMatch)!==void 0&&(p.ifGenerationMatch=(s=l.preconditionOpts)===null||s===void 0?void 0:s.ifGenerationMatch,delete l.preconditionOpts),this.request({method:"POST",uri:`/rewriteTo/b/${u.name}/o/${encodeURIComponent(d.name)}`,qs:p,json:l,headers:f},(A,h)=>{if(this.storage.retryOptions.autoRetry=this.instanceRetryValue,A){i(A,null,h);return}if(h.rewriteToken){let y={token:h.rewriteToken};p.userProject&&(y.userProject=p.userProject),p.destinationKmsKeyName&&(y.destinationKmsKeyName=p.destinationKmsKeyName),this.copy(d,y,i);return}i(null,d,h)})}createReadStream(t={}){t=Object.assign({decompress:!0},t);let n=typeof t.start=="number"||typeof t.end=="number",i=t.end<0,o,s,a=new urt,l=!0,u=!1;if(typeof t.validation=="string"){let A=t.validation.toLowerCase().trim();l=A==="crc32c",u=A==="md5"}else t.validation===!1&&(l=!1);let c=!n&&(l||u);if(n){if(typeof t.validation=="string"||t.validation===!0)throw new Error(E3.INVALID_VALIDATION_FILE_RANGE);l=!1,u=!1}let d=A=>{A&&(s?.agent&&s.agent.destroy(),a.destroy(A))},p=(A,h,y)=>{if(A){this.getBufferFromReadable(y).then(P=>{A.message=P.toString("utf8"),a.destroy(A)});return}s=y.request;let C=y.toJSON().headers,v=C["content-encoding"]==="gzip",O={},w=C["x-goog-stored-content-encoding"]==="gzip"&&v||C["x-goog-stored-content-encoding"]==="identity",R=[];if(c&&(typeof C["x-goog-hash"]=="string"&&C["x-goog-hash"].split(",").forEach(P=>{let z=P.indexOf("="),H=P.substring(0,z),J=P.substring(z+1);O[H]=J}),o=new grt({crc32c:l,md5:u,crc32cGenerator:this.crc32cGenerator,crc32cExpected:O.crc32c,md5Expected:O.md5})),u&&!O.md5){let P=new wfe(E3.MD5_NOT_AVAILABLE);P.code="MD5_NOT_AVAILABLE",a.destroy(P);return}w&&c&&o&&R.push(o),v&&t.decompress&&R.push(KHt.createGunzip()),(0,F8e.pipeline)(y,...R,a,d)},f=()=>{let A={alt:"media"};this.generation&&(A.generation=this.generation),t.userProject&&(A.userProject=t.userProject);let h={"Accept-Encoding":"gzip","Cache-Control":"no-store"};if(n){let C=typeof t.start=="number"?t.start:"0",v=typeof t.end=="number"?t.end:"";h.Range=`bytes=${i?v:`${C}-${v}`}`}let y={uri:"",headers:h,qs:A};t[ky]&&(y[ky]=t[ky]),this.requestStream(y).on("error",C=>{a.destroy(C)}).on("response",C=>{a.emit("response",C),Su.handleResp(null,C,null,p)}).resume()};return a.on("reading",f),a}createResumableUpload(t,n){var i,o;let s=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let a=this.storage.retryOptions;(((i=s?.preconditionOpts)===null||i===void 0?void 0:i.ifGenerationMatch)===void 0&&((o=this.instancePreconditionOpts)===null||o===void 0?void 0:o.ifGenerationMatch)===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(a.autoRetry=!1),_Ms({authClient:this.storage.authClient,apiEndpoint:this.storage.apiEndpoint,bucket:this.bucket.name,customRequestOptions:this.getRequestInterceptors().reduce((l,u)=>u(l),{}),file:this.name,generation:this.generation,key:this.encryptionKey,kmsKeyName:this.kmsKeyName,metadata:s.metadata,offset:s.offset,origin:s.origin,predefinedAcl:s.predefinedAcl,private:s.private,public:s.public,userProject:s.userProject||this.userProject,retryOptions:a,params:s?.preconditionOpts||this.instancePreconditionOpts,universeDomain:this.bucket.storage.universeDomain,[ky]:s[ky]},n),this.storage.retryOptions.autoRetry=this.instanceRetryValue}createWriteStream(t={}){var n;if((n=t.metadata)!==null&&n!==void 0||(t.metadata={}),t.contentType&&(t.metadata.contentType=t.contentType),!t.metadata.contentType||t.metadata.contentType==="auto"){let A=LMs.default.getType(this.name);A&&(t.metadata.contentType=A)}let i=t.gzip;i==="auto"&&(i=(0,kMs.default)(t.metadata.contentType||"")),i&&(t.metadata.contentEncoding="gzip");let o=!0,s=!1;if(typeof t.validation=="string"?(t.validation=t.validation.toLowerCase(),o=t.validation==="crc32c",s=t.validation==="md5"):t.validation===!1&&(o=!1,s=!1),t.offset){if(s)throw new RangeError(E3.MD5_RESUMED_UPLOAD);if(o&&!t.isPartialUpload&&!t.resumeCRC32C)throw new RangeError(E3.MISSING_RESUME_CRC32C_FINAL_UPLOAD)}let a=A=>{l.destroy(A||void 0)},l=new F8e.Writable({final(A){a=A,c.end()},write(A,h,y){c.write(A,h,y)}}),u=[];i&&u.push(KHt.createGzip());let c=new urt,d=null;if(o||s){let A=t.resumeCRC32C?Qne.from(t.resumeCRC32C):void 0;d=new grt({crc32c:o,crc32cInstance:A,md5:s,crc32cGenerator:this.crc32cGenerator,updateHashesOnly:!0}),u.push(d)}let p=(0,FMs.default)(),f=!1;return c.on("reading",()=>l.emit("reading")),c.on("writing",()=>l.emit("writing")),p.on("uri",A=>l.emit("uri",A)),p.on("progress",A=>l.emit("progress",A)),p.on("response",A=>l.emit("response",A)),p.once("metadata",()=>{f=!0}),l.once("writing",()=>{t.resumable===!1?this.startSimpleUpload_(p,t):this.startResumableUpload_(p,t),(0,F8e.pipeline)(c,...u,p,async A=>{if(A)return a(A);if(!f)try{await new Promise((h,y)=>{p.once("metadata",h),p.once("error",y)})}catch(h){return a(h)}d?.crc32c&&l.emit("crc32c",d.crc32c);try{let h=t.isPartialUpload&&!this.metadata;d&&!h&&await XO0(this,Hbn,"m",NMs).call(this,d,{crc32c:o,md5:s}),a()}catch(h){a(h)}})}),l}delete(t,n){let i=typeof t=="object"?t:{};n=typeof t=="function"?t:n,this.disableAutoRetryConditionallyIdempotent_(this.methods.delete,$M.delete,i),super.delete(i).then(o=>n(null,...o)).catch(n).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}download(t,n){let i;typeof t=="function"?(n=t,i={}):i=t;let o=!1,s=(...c)=>{o||n(...c),o=!0},a=i.destination;delete i.destination;let l=this.createReadStream(i),u=!1;a?l.on("error",s).once("data",c=>{u=!0;let d=YHt.createWriteStream(a);d.write(c),l.pipe(d).on("error",s).on("finish",s)}).on("end",()=>{if(!u){let c=Buffer.alloc(0);try{YHt.writeFileSync(a,c),s(null,c)}catch(d){s(d,c)}}}):this.getBufferFromReadable(l).then(c=>s?.(null,c)).catch(s)}setEncryptionKey(t){return this.encryptionKey=t,this.encryptionKeyBase64=Buffer.from(t).toString("base64"),this.encryptionKeyHash=QMs.createHash("sha256").update(this.encryptionKeyBase64,"base64").digest("base64"),this.encryptionKeyInterceptor={request:n=>(n.headers=n.headers||{},n.headers["x-goog-encryption-algorithm"]="AES256",n.headers["x-goog-encryption-key"]=this.encryptionKeyBase64,n.headers["x-goog-encryption-key-sha256"]=this.encryptionKeyHash,n)},this.interceptors.push(this.encryptionKeyInterceptor),this}getExpirationDate(t){this.getMetadata((n,i,o)=>{if(n){t(n,null,o);return}if(!i.retentionExpirationTime){let s=new Error(E3.EXPIRATION_TIME_NA);t(s,null,o);return}t(null,new Date(i.retentionExpirationTime),o)})}generateSignedPostPolicyV2(t,n){let i=kR(t,n),o=i.options,s=i.callback,a=new Date(o.expires);if(isNaN(a.getTime()))throw new Error(EL.EXPIRATION_DATE_INVALID);if(a.valueOf()<Date.now())throw new Error(EL.EXPIRATION_DATE_PAST);o=Object.assign({},o);let l=[["eq","$key",this.name],{bucket:this.bucket.name}];if(Array.isArray(o.equals)&&(Array.isArray(o.equals[0])||(o.equals=[o.equals]),o.equals.forEach(p=>{if(!Array.isArray(p)||p.length!==2)throw new Error(E3.EQUALS_CONDITION_TWO_ELEMENTS);l.push(["eq",p[0],p[1]])})),Array.isArray(o.startsWith)&&(Array.isArray(o.startsWith[0])||(o.startsWith=[o.startsWith]),o.startsWith.forEach(p=>{if(!Array.isArray(p)||p.length!==2)throw new Error(E3.STARTS_WITH_TWO_ELEMENTS);l.push(["starts-with",p[0],p[1]])})),o.acl&&l.push({acl:o.acl}),o.successRedirect&&l.push({success_action_redirect:o.successRedirect}),o.successStatus&&l.push({success_action_status:o.successStatus}),o.contentLengthRange){let p=o.contentLengthRange.min,f=o.contentLengthRange.max;if(typeof p!="number"||typeof f!="number")throw new Error(E3.CONTENT_LENGTH_RANGE_MIN_MAX);l.push(["content-length-range",p,f])}let u={expiration:a.toISOString(),conditions:l},c=JSON.stringify(u),d=Buffer.from(c).toString("base64");this.storage.authClient.sign(d,o.signingEndpoint).then(p=>{s(null,{string:c,base64:d,signature:p})},p=>{s(new Tfe(p.message))})}generateSignedPostPolicyV4(t,n){let i=kR(t,n),o=i.options,s=i.callback,a=new Date(o.expires);if(isNaN(a.getTime()))throw new Error(EL.EXPIRATION_DATE_INVALID);if(a.valueOf()<Date.now())throw new Error(EL.EXPIRATION_DATE_PAST);if(a.valueOf()-Date.now()>DMs*1e3)throw new Error(`Max allowed expiration is seven days (${DMs} seconds).`);o=Object.assign({},o);let l=Object.assign({},o.fields),u=new Date,c=Sfe(u,!0),d=Sfe(u);(async()=>{let{client_email:f}=await this.storage.authClient.getCredentials(),A=`${f}/${d}/auto/storage/goog4_request`;l={...l,bucket:this.bucket.name,key:this.name,"x-goog-date":c,"x-goog-credential":A,"x-goog-algorithm":"GOOG4-RSA-SHA256"};let h=o.conditions||[];Object.entries(l).forEach(([w,R])=>{w.startsWith("x-ignore-")||h.push({[w]:R})}),delete l.bucket;let y=Sfe(a,!0,"-",":"),v=lMs({conditions:h,expiration:y}),O=Buffer.from(v).toString("base64");try{let w=await this.storage.authClient.sign(O,o.signingEndpoint),R=Buffer.from(w,"base64").toString("hex"),P=this.parent.storage.universeDomain;l.policy=O,l["x-goog-signature"]=R;let z;return this.storage.customEndpoint?z=this.storage.apiEndpoint:o.virtualHostedStyle?z=`https://${this.bucket.name}.storage.${P}/`:o.bucketBoundHostname?z=`${o.bucketBoundHostname}/`:z=`https://storage.${P}/${this.bucket.name}/`,{url:z,fields:l}}catch(w){throw new Tfe(w.message)}})().then(f=>s(null,f),s)}getSignedUrl(t,n){let i=Vbn[t.action],o=aMs(t.extensionHeaders||{});t.action==="resumable"&&(o["x-goog-resumable"]="start");let s=Object.assign({},t.queryParams);typeof t.responseType=="string"&&(s["response-content-type"]=t.responseType),typeof t.promptSaveAs=="string"&&(s["response-content-disposition"]='attachment; filename="'+t.promptSaveAs+'"'),typeof t.responseDisposition=="string"&&(s["response-content-disposition"]=t.responseDisposition),this.generation&&(s.generation=this.generation.toString());let a={method:i,expires:t.expires,accessibleAt:t.accessibleAt,extensionHeaders:o,queryParams:s,contentMd5:t.contentMd5,contentType:t.contentType,host:t.host};t.cname&&(a.cname=t.cname),t.version&&(a.version=t.version),t.virtualHostedStyle&&(a.virtualHostedStyle=t.virtualHostedStyle),this.signer||(this.signer=new L8e(this.storage.authClient,this.bucket,this,this.storage)),this.signer.getSignedUrl(a).then(l=>n(null,l),n)}isPublic(t){var n;let i=((n=this.storage)===null||n===void 0?void 0:n.interceptors)||[],o=this.interceptors||[],a=i.concat(o).reduce((l,u)=>{let c=u.request({uri:`${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`});return Object.assign(l,c.headers),l},{});Su.makeRequest({method:"GET",uri:`${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`,headers:a},{retryOptions:this.storage.retryOptions},l=>{l?l.code===403?t(null,!1):t(l):t(null,!0)})}makePrivate(t,n){var i,o;let s=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let a={predefinedAcl:s.strict?"private":"projectPrivate"};((i=s.preconditionOpts)===null||i===void 0?void 0:i.ifMetagenerationMatch)!==void 0&&(a.ifMetagenerationMatch=(o=s.preconditionOpts)===null||o===void 0?void 0:o.ifMetagenerationMatch,delete s.preconditionOpts),s.userProject&&(a.userProject=s.userProject);let l={...s.metadata,acl:null};this.setMetadata(l,a,n)}makePublic(t){t=t||Su.noop,this.acl.add({entity:"allUsers",role:"READER"},(n,i,o)=>{t(n,o)})}publicUrl(){return`${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`}move(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,i=i||Su.noop,this.copy(t,o,(s,a,l)=>{if(s){s.message="file#copy failed with an error - "+s.message,i(s,null,l);return}this.name!==a.name||this.bucket.name!==a.bucket.name?this.delete(o,(u,c)=>{if(u){u.message="file#delete failed with an error - "+u.message,i(u,a,c);return}i(null,a,l)}):i(null,a,l)})}rename(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,i=i||Su.noop,this.move(t,o,i)}request(t,n){return this.parent.request.call(this,t,n)}rotateEncryptionKey(t,n){var i;n=typeof t=="function"?t:n;let o={};typeof t=="string"||t instanceof Buffer?o={encryptionKey:t}:typeof t=="object"&&(o=t);let s=this.bucket.file(this.id,o),a=((i=o.preconditionOpts)===null||i===void 0?void 0:i.ifGenerationMatch)!==void 0?{preconditionOpts:o.preconditionOpts}:{};this.copy(s,a,n)}save(t,n,i){i=typeof n=="function"?n:i;let o=typeof n=="object"?n:{},s=this.storage.retryOptions.maxRetries;this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(o?.preconditionOpts)||(s=0);let a=(0,qMs.default)(async l=>new Promise((u,c)=>{s===0&&(this.storage.retryOptions.autoRetry=!1);let d=this.createWriteStream(o);o.onUploadProgress&&d.on("progress",o.onUploadProgress);let p=f=>this.storage.retryOptions.autoRetry&&this.storage.retryOptions.retryableErrorFn(f)?c(f):l(f);typeof t=="string"||Buffer.isBuffer(t)?d.on("error",p).on("finish",()=>u()).end(t):(0,F8e.pipeline)(t,d,f=>{if(f){if(typeof t!="function")return l(f);p(f)}else u()})}),{retries:s,factor:this.storage.retryOptions.retryDelayMultiplier,maxTimeout:this.storage.retryOptions.maxRetryDelay*1e3,maxRetryTime:this.storage.retryOptions.totalTimeout*1e3});return i?a.then(()=>{if(i)return i()}).catch(i):a}setMetadata(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata,$M.setMetadata,o),super.setMetadata(t,o).then(s=>i(null,...s)).catch(i).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}setStorageClass(t,n,i){i=typeof n=="function"?n:i;let s={...typeof n=="object"?n:{},storageClass:t.replace(/-/g,"_").replace(/([a-z])([A-Z])/g,(a,l,u)=>l+"_"+u).toUpperCase()};this.copy(this,s,(a,l,u)=>{if(a){i(a,u);return}this.metadata=l.metadata,i(null,u)})}setUserProject(t){this.bucket.setUserProject.call(this,t)}startResumableUpload_(t,n={}){var i;(i=n.metadata)!==null&&i!==void 0||(n.metadata={});let o=this.storage.retryOptions;this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(n.preconditionOpts)||(o.autoRetry=!1);let s=SMs({authClient:this.storage.authClient,apiEndpoint:this.storage.apiEndpoint,bucket:this.bucket.name,customRequestOptions:this.getRequestInterceptors().reduce((a,l)=>l(a),{}),file:this.name,generation:this.generation,isPartialUpload:n.isPartialUpload,key:this.encryptionKey,kmsKeyName:this.kmsKeyName,metadata:n.metadata,offset:n.offset,predefinedAcl:n.predefinedAcl,private:n.private,public:n.public,uri:n.uri,userProject:n.userProject||this.userProject,retryOptions:{...o},params:n?.preconditionOpts||this.instancePreconditionOpts,chunkSize:n?.chunkSize,highWaterMark:n?.highWaterMark,universeDomain:this.bucket.storage.universeDomain,[ky]:n[ky]});s.on("response",a=>{t.emit("response",a)}).on("uri",a=>{t.emit("uri",a)}).on("metadata",a=>{this.metadata=a,t.emit("metadata")}).on("finish",()=>{t.emit("complete")}).on("progress",a=>t.emit("progress",a)),t.setWritable(s),this.storage.retryOptions.autoRetry=this.instanceRetryValue}startSimpleUpload_(t,n={}){var i;(i=n.metadata)!==null&&i!==void 0||(n.metadata={});let o=this.storage.apiEndpoint,s=this.bucket.name,a=`${o}/upload/storage/v1/b/${s}/o`,l={qs:{name:this.name},uri:a,[ky]:n[ky]};this.generation!==void 0&&(l.qs.ifGenerationMatch=this.generation),this.kmsKeyName!==void 0&&(l.qs.kmsKeyName=this.kmsKeyName),typeof n.timeout=="number"&&(l.timeout=n.timeout),(n.userProject||this.userProject)&&(l.qs.userProject=n.userProject||this.userProject),n.predefinedAcl?l.qs.predefinedAcl=n.predefinedAcl:n.private?l.qs.predefinedAcl="private":n.public&&(l.qs.predefinedAcl="publicRead"),Object.assign(l.qs,this.instancePreconditionOpts,n.preconditionOpts),Su.makeWritableStream(t,{makeAuthenticatedRequest:u=>{this.request(u,(c,d,p)=>{if(c){t.destroy(c);return}this.metadata=d,t.emit("metadata",d),t.emit("response",p),t.emit("complete")})},metadata:n.metadata,request:l})}disableAutoRetryConditionallyIdempotent_(t,n,i){var o,s,a,l;(typeof t=="object"&&((s=(o=t?.reqOpts)===null||o===void 0?void 0:o.qs)===null||s===void 0?void 0:s.ifGenerationMatch)===void 0&&i?.ifGenerationMatch===void 0&&n===$M.delete&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(this.storage.retryOptions.autoRetry=!1),(typeof t=="object"&&((l=(a=t?.reqOpts)===null||a===void 0?void 0:a.qs)===null||l===void 0?void 0:l.ifMetagenerationMatch)===void 0&&i?.ifMetagenerationMatch===void 0&&n===$M.setMetadata&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(this.storage.retryOptions.autoRetry=!1)}async getBufferFromReadable(t){let n=[];for await(let i of t)n.push(i);return Buffer.concat(n)}};Hbn=new WeakSet,NMs=async function(t,n={}){let i=this.metadata,o=!!(n.crc32c||n.md5);if(n.crc32c&&i.crc32c&&(o=!t.test("crc32c",i.crc32c)),n.md5&&i.md5Hash&&(o=!t.test("md5",i.md5Hash)),o){let s=[],a="",l="";try{await this.delete(),n.md5&&!i.md5Hash?(a="MD5_NOT_AVAILABLE",l=E3.MD5_NOT_AVAILABLE):(a="FILE_NO_UPLOAD",l=E3.UPLOAD_MISMATCH)}catch(c){let d=c;a="FILE_NO_UPLOAD_DELETE",l=`${E3.UPLOAD_MISMATCH_DELETE_FAIL}${d.message}`,s.push(d)}let u=new wfe(l);throw u.code=a,u.errors=s,u}return!0};(0,PMs.promisifyAll)(bL,{exclude:["cloudStorageURI","publicUrl","request","save","setEncryptionKey","shouldRetryBasedOnPreconditionAndIdempotencyStrat","getBufferFromReadable"]});var zMs=Et(o2(),1);var JHt;(function(r){r.POLICY_OBJECT_REQUIRED="A policy object is required.",r.PERMISSIONS_REQUIRED="Permissions are required."})(JHt||(JHt={}));var q8e=class{constructor(t){this.request_=t.request.bind(t),this.resourceId_="buckets/"+t.getId()}getPolicy(t,n){let{options:i,callback:o}=kR(t,n),s={};i.userProject&&(s.userProject=i.userProject),i.requestedPolicyVersion!==null&&i.requestedPolicyVersion!==void 0&&(s.optionsRequestedPolicyVersion=i.requestedPolicyVersion),this.request_({uri:"/iam",qs:s},o)}setPolicy(t,n,i){if(t===null||typeof t!="object")throw new Error(JHt.POLICY_OBJECT_REQUIRED);let{options:o,callback:s}=kR(n,i),a;t.etag===void 0&&(a=0),this.request_({method:"PUT",uri:"/iam",maxRetries:a,json:Object.assign({resourceId:this.resourceId_},t),qs:o},s)}testPermissions(t,n,i){if(!Array.isArray(t)&&typeof t!="string")throw new Error(JHt.PERMISSIONS_REQUIRED);let{options:o,callback:s}=kR(n,i),a=Array.isArray(t)?t:[t],l=Object.assign({permissions:a},o);this.request_({uri:"/iam/testPermissions",qs:l,useQuerystring:!0},(u,c)=>{if(u){s(u,null,c);return}let d=Array.isArray(c.permissions)?c.permissions:[],p=a.reduce((f,A)=>(f[A]=d.indexOf(A)>-1,f),{});s(null,p,c)})}};(0,zMs.promisifyAll)(q8e);var UMs=Et(o2(),1),z8e=class extends SS{constructor(t,n){let i={},o={create:!0,delete:{reqOpts:{qs:i}},get:{reqOpts:{qs:i}},getMetadata:{reqOpts:{qs:i}},exists:!0};super({parent:t,baseUrl:"/notificationConfigs",id:n.toString(),createMethod:t.createNotification.bind(t),methods:o})}};(0,UMs.promisifyAll)(z8e);var YMs=require("stream"),KMs=require("url"),Jbn;(function(r){r.list="GET"})(Jbn||(Jbn={}));var $M;(function(r){r[r.setMetadata=0]="setMetadata",r[r.delete=1]="delete"})($M||($M={}));var IL;(function(r){r.PROVIDE_SOURCE_FILE="You must provide at least one source file.",r.DESTINATION_FILE_NOT_SPECIFIED="A destination file must be specified.",r.CHANNEL_ID_REQUIRED="An ID is required to create a channel.",r.TOPIC_NAME_REQUIRED="A valid topic name is required.",r.CONFIGURATION_OBJECT_PREFIX_REQUIRED="A configuration object with a prefix is required.",r.SPECIFY_FILE_NAME="A file name must be specified.",r.METAGENERATION_NOT_PROVIDED="A metageneration must be provided.",r.SUPPLY_NOTIFICATION_ID="You must supply a notification ID."})(IL||(IL={}));var CL=class r extends SS{getFilesStream(t){return new YMs.Readable}constructor(t,n,i){var o,s,a,l;i=i||{},n=n.replace(/^gs:\/\//,"").replace(/\/+$/,"");let u={};!((o=i?.preconditionOpts)===null||o===void 0)&&o.ifGenerationMatch&&(u.ifGenerationMatch=i.preconditionOpts.ifGenerationMatch),!((s=i?.preconditionOpts)===null||s===void 0)&&s.ifGenerationNotMatch&&(u.ifGenerationNotMatch=i.preconditionOpts.ifGenerationNotMatch),!((a=i?.preconditionOpts)===null||a===void 0)&&a.ifMetagenerationMatch&&(u.ifMetagenerationMatch=i.preconditionOpts.ifMetagenerationMatch),!((l=i?.preconditionOpts)===null||l===void 0)&&l.ifMetagenerationNotMatch&&(u.ifMetagenerationNotMatch=i.preconditionOpts.ifMetagenerationNotMatch);let c=i.userProject;typeof c=="string"&&(u.userProject=c);let d={create:{reqOpts:{qs:u}},delete:{reqOpts:{qs:u}},exists:{reqOpts:{qs:u}},get:{reqOpts:{qs:u}},getMetadata:{reqOpts:{qs:u}},setMetadata:{reqOpts:{qs:u}}};super({parent:t,baseUrl:"/b",id:n,createMethod:t.createBucket.bind(t),methods:d}),this.name=n,this.storage=t,this.userProject=i.userProject,this.acl=new Pne({request:this.request.bind(this),pathPrefix:"/acl"}),this.acl.default=new Pne({request:this.request.bind(this),pathPrefix:"/defaultObjectAcl"}),this.crc32cGenerator=i.crc32cGenerator||this.storage.crc32cGenerator,this.iam=new q8e(this),this.getFilesStream=Xbn.paginator.streamify("getFiles"),this.instanceRetryValue=t.retryOptions.autoRetry,this.instancePreconditionOpts=i?.preconditionOpts}get cloudStorageURI(){let t=new KMs.URL("gs://");return t.host=this.name,t}addLifecycleRule(t,n,i){let o={};typeof n=="function"?i=n:n&&(o=n),o=o||{};let s=Array.isArray(t)?t:[t];for(let a of s)a.condition.createdBefore instanceof Date&&(a.condition.createdBefore=a.condition.createdBefore.toISOString().replace(/T.+$/,"")),a.condition.customTimeBefore instanceof Date&&(a.condition.customTimeBefore=a.condition.customTimeBefore.toISOString().replace(/T.+$/,"")),a.condition.noncurrentTimeBefore instanceof Date&&(a.condition.noncurrentTimeBefore=a.condition.noncurrentTimeBefore.toISOString().replace(/T.+$/,""));if(o.append===!1){this.setMetadata({lifecycle:{rule:s}},o,i);return}this.getMetadata((a,l)=>{var u,c;if(a){i(a);return}let d=Array.isArray((u=l.lifecycle)===null||u===void 0?void 0:u.rule)?(c=l.lifecycle)===null||c===void 0?void 0:c.rule:[];this.setMetadata({lifecycle:{rule:d.concat(s)}},o,i)})}combine(t,n,i,o){var s;if(!Array.isArray(t)||t.length===0)throw new Error(IL.PROVIDE_SOURCE_FILE);if(!n)throw new Error(IL.DESTINATION_FILE_NOT_SPECIFIED);let a={};typeof i=="function"?o=i:i&&(a=i),this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata,$M.setMetadata,a);let l=d=>d instanceof bL?d:this.file(d);t=t.map(l);let u=l(n);if(o=o||Su.noop,!u.metadata.contentType){let d=WMs.contentType(u.name);d&&(u.metadata.contentType=d)}let c=this.storage.retryOptions.maxRetries;(((s=u?.instancePreconditionOpts)===null||s===void 0?void 0:s.ifGenerationMatch)===void 0&&a.ifGenerationMatch===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(c=0),a.ifGenerationMatch===void 0&&Object.assign(a,u.instancePreconditionOpts,a),u.request({method:"POST",uri:"/compose",maxRetries:c,json:{destination:{contentType:u.metadata.contentType},sourceObjects:t.map(d=>{let p={name:d.name};return d.metadata&&d.metadata.generation&&(p.generation=parseInt(d.metadata.generation.toString())),p})},qs:a},(d,p)=>{if(this.storage.retryOptions.autoRetry=this.instanceRetryValue,d){o(d,null,p);return}o(null,u,p)})}createChannel(t,n,i,o){if(typeof t!="string")throw new Error(IL.CHANNEL_ID_REQUIRED);let s={};typeof i=="function"?o=i:i&&(s=i),this.request({method:"POST",uri:"/o/watch",json:Object.assign({id:t,type:"web_hook"},n),qs:s},(a,l)=>{if(a){o(a,null,l);return}let u=l.resourceId,c=this.storage.channel(t,u);c.metadata=l,o(null,c,l)})}createNotification(t,n,i){let o={};if(typeof n=="function"?i=n:n&&(o=n),t!==null&&typeof t=="object"&&Su.isCustomType(t,"pubsub/topic")&&(t=t.name),typeof t!="string")throw new Error(IL.TOPIC_NAME_REQUIRED);let a=Object.assign({topic:t},o);a.topic.indexOf("projects")!==0&&(a.topic="projects/{{projectId}}/topics/"+a.topic),a.topic=`//pubsub.${this.storage.universeDomain}/`+a.topic,a.payloadFormat||(a.payloadFormat="JSON_API_V1");let l={};a.userProject&&(l.userProject=a.userProject,delete a.userProject),this.request({method:"POST",uri:"/notificationConfigs",json:kHt(a),qs:l,maxRetries:0},(u,c)=>{if(u){i(u,null,c);return}let d=this.notification(c.id);d.metadata=c,i(null,d,c)})}deleteFiles(t,n){let i={};typeof t=="function"?n=t:t&&(i=t);let o=10,s=1e3,a=[],l=u=>u.delete(i).catch(c=>{if(!i.force)throw c;a.push(c)});(async()=>{try{let u=[],c=(0,Ybn.default)(o),d=this.getFilesStream(i);for await(let p of d)u.length>=s&&(await Promise.all(u),u=[]),u.push(c(()=>l(p)).catch(f=>{throw d.destroy(),f}));await Promise.all(u),n(a.length>0?a:null)}catch(u){n(u);return}})()}deleteLabels(t,n,i){let o=new Array,s={};typeof t=="function"?i=t:typeof t=="string"?o=[t]:Array.isArray(t)?o=t:t&&(s=t),typeof n=="function"?i=n:n&&(s=n);let a=l=>{let u=l.reduce((c,d)=>(c[d]=null,c),{});s?.ifMetagenerationMatch!==void 0?this.setLabels(u,s,i):this.setLabels(u,i)};o.length===0?this.getLabels((l,u)=>{if(l){i(l);return}a(Object.keys(u))}):a(o)}disableRequesterPays(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.setMetadata({billing:{requesterPays:!1}},i,n)}enableLogging(t,n){if(!t||typeof t=="function"||typeof t.prefix>"u")throw new Error(IL.CONFIGURATION_OBJECT_PREFIX_REQUIRED);let i=this.id;t.bucket&&t.bucket instanceof r?i=t.bucket.id:t.bucket&&typeof t.bucket=="string"&&(i=t.bucket);let o={};t?.ifMetagenerationMatch&&(o.ifMetagenerationMatch=t.ifMetagenerationMatch),t?.ifMetagenerationNotMatch&&(o.ifMetagenerationNotMatch=t.ifMetagenerationNotMatch),(async()=>{try{let[s]=await this.iam.getPolicy();s.bindings.push({members:["group:cloud-storage-analytics@google.com"],role:"roles/storage.objectCreator"}),await this.iam.setPolicy(s),this.setMetadata({logging:{logBucket:i,logObjectPrefix:t.prefix}},o,n)}catch(s){n(s);return}})()}enableRequesterPays(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.setMetadata({billing:{requesterPays:!0}},i,n)}file(t,n){if(!t)throw Error(IL.SPECIFY_FILE_NAME);return new bL(this,t,n)}getFiles(t,n){let i=typeof t=="object"?t:{};n||(n=t),i=Object.assign({},i),this.request({uri:"/o",qs:i},(o,s)=>{if(o){n(o,null,null,s);return}let l=(s.items?s.items:[]).map(c=>{let d={};i.versions&&(d.generation=c.generation),c.kmsKeyName&&(d.kmsKeyName=c.kmsKeyName);let p=this.file(c.name,d);return p.metadata=c,p}),u=null;s.nextPageToken&&(u=Object.assign({},i,{pageToken:s.nextPageToken})),n(null,l,u,s)})}getLabels(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.getMetadata(i,(o,s)=>{if(o){n(o,null);return}n(null,s?.labels||{})})}getNotifications(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.request({uri:"/notificationConfigs",qs:i},(o,s)=>{if(o){n(o,null,s);return}let l=(s.items?s.items:[]).map(u=>{let c=this.notification(u.id);return c.metadata=u,c});n(null,l,s)})}getSignedUrl(t,n){let o={method:Jbn[t.action],expires:t.expires,version:t.version,cname:t.cname,extensionHeaders:t.extensionHeaders||{},queryParams:t.queryParams||{},host:t.host,signingEndpoint:t.signingEndpoint};this.signer||(this.signer=new L8e(this.storage.authClient,this,void 0,this.storage)),this.signer.getSignedUrl(o).then(s=>n(null,s),n)}lock(t,n){let i=typeof t;if(i!=="number"&&i!=="string")throw new Error(IL.METAGENERATION_NOT_PROVIDED);this.request({method:"POST",uri:"/lockRetentionPolicy",qs:{ifMetagenerationMatch:t}},n)}makePrivate(t,n){var i,o,s,a;let l=typeof t=="object"?t:{};n=typeof t=="function"?t:n,l.private=!0;let u={predefinedAcl:"projectPrivate"};l.userProject&&(u.userProject=l.userProject),!((i=l.preconditionOpts)===null||i===void 0)&&i.ifGenerationMatch&&(u.ifGenerationMatch=l.preconditionOpts.ifGenerationMatch),!((o=l.preconditionOpts)===null||o===void 0)&&o.ifGenerationNotMatch&&(u.ifGenerationNotMatch=l.preconditionOpts.ifGenerationNotMatch),!((s=l.preconditionOpts)===null||s===void 0)&&s.ifMetagenerationMatch&&(u.ifMetagenerationMatch=l.preconditionOpts.ifMetagenerationMatch),!((a=l.preconditionOpts)===null||a===void 0)&&a.ifMetagenerationNotMatch&&(u.ifMetagenerationNotMatch=l.preconditionOpts.ifMetagenerationNotMatch);let c={...l.metadata,acl:null};this.setMetadata(c,u,d=>{d&&n(d),(l.includeFiles?(0,Kbn.promisify)(this.makeAllFilesPublicPrivate_).call(this,l):Promise.resolve([])).then(f=>n(null,f)).catch(n)})}makePublic(t,n){let i=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let o={public:!0,...i};this.acl.add({entity:"allUsers",role:"READER"}).then(()=>this.acl.default.add({entity:"allUsers",role:"READER"})).then(()=>o.includeFiles?(0,Kbn.promisify)(this.makeAllFilesPublicPrivate_).call(this,o):[]).then(s=>n(null,s),n)}notification(t){if(!t)throw new Error(IL.SUPPLY_NOTIFICATION_ID);return new z8e(this,t)}removeRetentionPeriod(t,n){let i=typeof t=="object"?t:{};n=typeof t=="function"?t:n,this.setMetadata({retentionPolicy:null},i,n)}request(t,n){return this.userProject&&(!t.qs||!t.qs.userProject)&&(t.qs={...t.qs,userProject:this.userProject}),super.request(t,n)}setLabels(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,i=i||Su.noop,this.setMetadata({labels:t},o,i)}setMetadata(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata,$M.setMetadata,o),super.setMetadata(t,o).then(s=>i(null,...s)).catch(i).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}setRetentionPeriod(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.setMetadata({retentionPolicy:{retentionPeriod:t.toString()}},o,i)}setCorsConfiguration(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.setMetadata({cors:t},o,i)}setStorageClass(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,t=t.replace(/-/g,"_").replace(/([a-z])([A-Z])/g,(s,a,l)=>a+"_"+l).toUpperCase(),this.setMetadata({storageClass:t},o,i)}setUserProject(t){this.userProject=t,["create","delete","exists","get","getMetadata","setMetadata"].forEach(i=>{let o=this.methods[i];typeof o=="object"&&(typeof o.reqOpts=="object"?Object.assign(o.reqOpts.qs,{userProject:t}):o.reqOpts={qs:{userProject:t}})})}upload(t,n,i){var o,s;let a=d=>{let p=(0,VMs.default)(async f=>{await new Promise((A,h)=>{var y,C;d===0&&(!((C=(y=c?.storage)===null||y===void 0?void 0:y.retryOptions)===null||C===void 0)&&C.autoRetry)&&(c.storage.retryOptions.autoRetry=!1);let v=c.createWriteStream(l);l.onUploadProgress&&v.on("progress",l.onUploadProgress),GMs.createReadStream(t).on("error",f).pipe(v).on("error",O=>this.storage.retryOptions.autoRetry&&this.storage.retryOptions.retryableErrorFn(O)?h(O):f(O)).on("finish",()=>A())})},{retries:d,factor:this.storage.retryOptions.retryDelayMultiplier,maxTimeout:this.storage.retryOptions.maxRetryDelay*1e3,maxRetryTime:this.storage.retryOptions.totalTimeout*1e3});return i?p.then(()=>{if(i)return i(null,c,c.metadata)}).catch(i):p};if(global.GCLOUD_SANDBOX_ENV)return;let l=typeof n=="object"?n:{};i=typeof n=="function"?n:i,l=Object.assign({metadata:{}},l);let u=this.storage.retryOptions.maxRetries;(((o=l?.preconditionOpts)===null||o===void 0?void 0:o.ifGenerationMatch)===void 0&&((s=this.instancePreconditionOpts)===null||s===void 0?void 0:s.ifGenerationMatch)===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(u=0);let c;if(l.destination instanceof bL)c=l.destination;else if(l.destination!==null&&typeof l.destination=="string")c=this.file(l.destination,{encryptionKey:l.encryptionKey,kmsKeyName:l.kmsKeyName,preconditionOpts:this.instancePreconditionOpts});else{let d=HMs.basename(t);c=this.file(d,{encryptionKey:l.encryptionKey,kmsKeyName:l.kmsKeyName,preconditionOpts:this.instancePreconditionOpts})}a(u)}makeAllFilesPublicPrivate_(t,n){let o=[],s=[],a=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let l=async u=>{try{await(a.public?u.makePublic():u.makePrivate(a)),s.push(u)}catch(c){if(!a.force)throw c;o.push(c)}};this.getFiles(a).then(([u])=>{let c=(0,Ybn.default)(10),d=u.map(p=>c(()=>l(p)));return Promise.all(d)}).then(()=>n(o.length>0?o:null,s),u=>n(u,s))}getId(){return this.id}disableAutoRetryConditionallyIdempotent_(t,n,i){var o,s;typeof t=="object"&&((s=(o=t?.reqOpts)===null||o===void 0?void 0:o.qs)===null||s===void 0?void 0:s.ifMetagenerationMatch)===void 0&&i?.ifMetagenerationMatch===void 0&&(n===$M.setMetadata||n===$M.delete)&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional?this.storage.retryOptions.autoRetry=!1:this.storage.retryOptions.idempotencyStrategy===fh.RetryNever&&(this.storage.retryOptions.autoRetry=!1)}};Xbn.paginator.extend(CL,"getFiles");(0,jMs.promisifyAll)(CL,{exclude:["cloudStorageURI","request","file","notification"]});var JMs=Et(o2(),1),Rfe=class extends SS{constructor(t,n,i){let o={parent:t,baseUrl:"/channels",id:"",methods:{}};super(o),this.metadata.id=n,this.metadata.resourceId=i}stop(t){t=t||Su.noop,this.request({method:"POST",uri:"/stop",json:this.metadata},(n,i)=>{t(n,i)})}};(0,JMs.promisifyAll)(Rfe);var ZMs=Et(N8e(),1);var XMs=Et(o2(),1),Bfe=class extends SS{constructor(t,n,i){let o={delete:!0,get:!0,getMetadata:!0,setMetadata:{reqOpts:{method:"PUT"}}},s=i&&i.projectId||t.projectId;super({parent:t,id:n,baseUrl:`/projects/${s}/hmacKeys`,methods:o}),this.storage=t,this.instanceRetryValue=t.retryOptions.autoRetry}setMetadata(t,n,i){this.storage.retryOptions.idempotencyStrategy!==fh.RetryAlways&&(this.storage.retryOptions.autoRetry=!1);let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,super.setMetadata(t,o).then(s=>i(null,...s)).catch(i).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}};(0,XMs.promisifyAll)(Bfe);var eDs=Et(u4(),1),fh;(function(r){r[r.RetryAlways=0]="RetryAlways",r[r.RetryConditional=1]="RetryConditional",r[r.RetryNever=2]="RetryNever"})(fh||(fh={}));var EL;(function(r){r.EXPIRATION_DATE_INVALID="The expiration date provided was invalid.",r.EXPIRATION_DATE_PAST="An expiration date cannot be in the past."})(EL||(EL={}));var U8e;(function(r){r.BUCKET_NAME_REQUIRED="A bucket name is needed to use Cloud Storage.",r.BUCKET_NAME_REQUIRED_CREATE="A name is required to create a bucket.",r.HMAC_SERVICE_ACCOUNT="The first argument must be a service account email to create an HMAC key.",r.HMAC_ACCESS_ID="An access ID is needed to create an HmacKey object."})(U8e||(U8e={}));var ZO0=/^(\w*):\/\//,e50=!0,t50=3,r50=2,n50=600,i50=64,o50=fh.RetryConditional,s50=function(r){var t;let n=i=>i.includes("eai_again")||i==="econnreset"||i==="unexpected connection closure"||i==="epipe"||i==="socket connection timeout";if(r){if([408,429,500,502,503,504].indexOf(r.code)!==-1)return!0;if(typeof r.code=="string"){if(["408","429","500","502","503","504"].indexOf(r.code)!==-1)return!0;let i=r.code.toLowerCase();if(n(i))return!0}if(r.errors)for(let i of r.errors){let o=(t=i?.reason)===null||t===void 0?void 0:t.toString().toLowerCase();if(o&&n(o))return!0}}return!1};var LR=class r extends prt{getBucketsStream(){return new $bn.Readable}getHmacKeysStream(){return new $bn.Readable}constructor(t={}){var n,i,o,s,a,l,u,c,d,p,f,A,h,y;let v=`https://storage.${t.universeDomain||eDs.DEFAULT_UNIVERSE}`,O=!1,w=process.env.STORAGE_EMULATOR_HOST;typeof w=="string"&&(v=r.sanitizeEndpoint(w),O=!0),t.apiEndpoint&&(v=r.sanitizeEndpoint(t.apiEndpoint),O=!0),t=Object.assign({},t,{apiEndpoint:v});let R=w||`${t.apiEndpoint}/storage/v1`,P={apiEndpoint:t.apiEndpoint,retryOptions:{autoRetry:((n=t.retryOptions)===null||n===void 0?void 0:n.autoRetry)!==void 0?(i=t.retryOptions)===null||i===void 0?void 0:i.autoRetry:e50,maxRetries:!((o=t.retryOptions)===null||o===void 0)&&o.maxRetries?(s=t.retryOptions)===null||s===void 0?void 0:s.maxRetries:t50,retryDelayMultiplier:!((a=t.retryOptions)===null||a===void 0)&&a.retryDelayMultiplier?(l=t.retryOptions)===null||l===void 0?void 0:l.retryDelayMultiplier:r50,totalTimeout:!((u=t.retryOptions)===null||u===void 0)&&u.totalTimeout?(c=t.retryOptions)===null||c===void 0?void 0:c.totalTimeout:n50,maxRetryDelay:!((d=t.retryOptions)===null||d===void 0)&&d.maxRetryDelay?(p=t.retryOptions)===null||p===void 0?void 0:p.maxRetryDelay:i50,retryableErrorFn:!((f=t.retryOptions)===null||f===void 0)&&f.retryableErrorFn?(A=t.retryOptions)===null||A===void 0?void 0:A.retryableErrorFn:s50,idempotencyStrategy:((h=t.retryOptions)===null||h===void 0?void 0:h.idempotencyStrategy)!==void 0?(y=t.retryOptions)===null||y===void 0?void 0:y.idempotencyStrategy:o50},baseUrl:R,customEndpoint:O,useAuthWithCustomEndpoint:t?.useAuthWithCustomEndpoint,projectIdRequired:!1,scopes:["https://www.googleapis.com/auth/iam","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/devstorage.full_control"],packageJson:(0,ZMs.getPackageJSON)()};super(P,t),this.acl=r.acl,this.crc32cGenerator=t.crc32cGenerator||WHt,this.retryOptions=P.retryOptions,this.getBucketsStream=XHt.paginator.streamify("getBuckets"),this.getHmacKeysStream=XHt.paginator.streamify("getHmacKeys")}static sanitizeEndpoint(t){return ZO0.test(t)||(t=`https://${t}`),t.replace(/\/+$/,"")}bucket(t,n){if(!t)throw new Error(U8e.BUCKET_NAME_REQUIRED);return new CL(this,t,n)}channel(t,n){return new Rfe(this,t,n)}createBucket(t,n,i){if(!t)throw new Error(U8e.BUCKET_NAME_REQUIRED_CREATE);let o;i?o=n:(i=n,o={});let s={...o,name:t},a={archive:"ARCHIVE",coldline:"COLDLINE",dra:"DURABLE_REDUCED_AVAILABILITY",multiRegional:"MULTI_REGIONAL",nearline:"NEARLINE",regional:"REGIONAL",standard:"STANDARD"},l=Object.keys(a);for(let c of l)if(s[c]){if(o.storageClass&&o.storageClass!==c)throw new Error(`Both \`${c}\` and \`storageClass\` were provided.`);s.storageClass=a[c],delete s[c]}s.requesterPays&&(s.billing={requesterPays:s.requesterPays},delete s.requesterPays);let u={project:this.projectId};s.userProject&&(u.userProject=s.userProject,delete s.userProject),s.enableObjectRetention&&(u.enableObjectRetention=s.enableObjectRetention,delete s.enableObjectRetention),this.request({method:"POST",uri:"/b",qs:u,json:s},(c,d)=>{if(c){i(c,null,d);return}let p=this.bucket(t);p.metadata=d,i(null,p,d)})}createHmacKey(t,n,i){if(typeof t!="string")throw new Error(U8e.HMAC_SERVICE_ACCOUNT);let{options:o,callback:s}=kR(n,i),a=Object.assign({},o,{serviceAccountEmail:t}),l=a.projectId||this.projectId;delete a.projectId,this.request({method:"POST",uri:`/projects/${l}/hmacKeys`,qs:a,maxRetries:0},(u,c)=>{if(u){s(u,null,null,c);return}let d=c.metadata,p=this.hmacKey(d.accessId,{projectId:d.projectId});p.metadata=c.metadata,s(null,p,c.secret,c)})}getBuckets(t,n){let{options:i,callback:o}=kR(t,n);i.project=i.project||this.projectId,this.request({uri:"/b",qs:i},(s,a)=>{if(s){o(s,null,null,a);return}let u=(a.items?a.items:[]).map(d=>{let p=this.bucket(d.id);return p.metadata=d,p}),c=a.nextPageToken?Object.assign({},i,{pageToken:a.nextPageToken}):null;o(null,u,c,a)})}getHmacKeys(t,n){let{options:i,callback:o}=kR(t,n),s=Object.assign({},i),a=s.projectId||this.projectId;delete s.projectId,this.request({uri:`/projects/${a}/hmacKeys`,qs:s},(l,u)=>{if(l){o(l,null,null,u);return}let d=(u.items?u.items:[]).map(f=>{let A=this.hmacKey(f.accessId,{projectId:f.projectId});return A.metadata=f,A}),p=u.nextPageToken?Object.assign({},i,{pageToken:u.nextPageToken}):null;o(null,d,p,u)})}getServiceAccount(t,n){let{options:i,callback:o}=kR(t,n);this.request({uri:`/projects/${this.projectId}/serviceAccount`,qs:i},(s,a)=>{if(s){o(s,null,a);return}let l={};for(let u in a)if(a.hasOwnProperty(u)){let c=u.replace(/_(\w)/g,(d,p)=>p.toUpperCase());l[c]=a[u]}o(null,l,a)})}hmacKey(t,n){if(!t)throw new Error(U8e.HMAC_ACCESS_ID);return new Bfe(this,t,n)}};LR.Bucket=CL;LR.Channel=Rfe;LR.File=bL;LR.HmacKey=Bfe;LR.acl={OWNER_ROLE:"OWNER",READER_ROLE:"READER",WRITER_ROLE:"WRITER"};XHt.paginator.extend(LR,["getBuckets","getHmacKeys"]);(0,$Ms.promisifyAll)(LR,{exclude:["bucket","channel","hmacKey"]});var u50=Et(b1e(),1);var d50=Et(u4(),1),tDs=Et(VTe(),1),p50=Et(I5(),1);var rDs=Et(N8e(),1);var a50,l50,c50,f50=(0,rDs.getPackageJSON)();var nP1=32*1024*1024,iP1=32*1024*1024,oP1=32*1024*1024;var Zbn={UPLOAD_MANY:"tm.upload_many",DOWNLOAD_MANY:"tm.download_many",UPLOAD_SHARDED:"tm.upload_sharded",DOWNLOAD_SHARDED:"tm.download_sharded"};a50=new WeakSet,l50=function(t={}){let n=!1,i=!1;for(let[o,s]of Object.entries(t))o.toLocaleLowerCase().trim()==="x-goog-api-client"?(n=!0,s.includes(Zbn.UPLOAD_SHARDED)||(t[o]=`${s} gccl-gcs-cmd/${Zbn.UPLOAD_SHARDED}`)):o.toLocaleLowerCase().trim()==="user-agent"&&(i=!0);return n||(t["x-goog-api-client"]=`${mL()} gccl/${f50.version} gccl-gcs-cmd/${Zbn.UPLOAD_SHARDED}`),i||(t["User-Agent"]=yL()),t},c50=function(t,n){if(this.bucket.storage.retryOptions.autoRetry&&this.bucket.storage.retryOptions.retryableErrorFn(t))throw t;n(t)};yle();var lW0=Et(z5n());ST();Er();rY();_h();var Sit=class{whereClauseDisjunctionLimits={in:30,"not-in":10,"array-contains-any":30};async selectInBatches(t,n,i,o,s){let a=[],l=this.whereClauseDisjunctionLimits[i];for(let u=0;u<o.length;u+=l){let c=o.slice(u,u+l),d=this.createQuery(t,{where:[...s,[n,i,c]]}),p=await this.runQuery(d);a.push(p)}return a.flat()}};var dF1=q_.getTracer("repository");Kf();Er();var FUs=(r="{}")=>{let t={},n=[];try{let i=JSON.parse(r);return Object.entries(i).forEach(([o,s])=>{s.split(",").forEach(a=>{let l=a.trim();Object.hasOwn(t,l)&&n.push(new At(`Duplicate target id ${l} found in feature config ${o} with value ${t[l]}. Existing value will be overwritten with ${o}`)),l&&(t[l]=o)})}),{configs:t,errors:n}}catch(i){return n.push(new At("Failed to parse feature configs",i.message)),{configs:t,errors:n}}};rY();var dW0=Et(z5n());mqe();var xF1=FUs(process.env.SERVICE_BACKED_REPOSITORIES);var Pie=nt.AUTH,pv=nt.RUNNER_BACKEND;var fW0=async r=>{let t=(await q3t()).apiKey;return bkr(`https://securetoken.googleapis.com/v1/token?key=${t}`,{refresh_token:r,grant_type:"refresh_token"}).then(n=>n.data.id_token)},qUs=async(r,t,n,i)=>{let o="[AuthenticateFirebaseTokenAndRetrieveTeamInfo]",s={};return O1(async()=>Du(o,s,"AUTH",()=>{let l,u,c,d,p,f,A,h;return Pie.debug("got auth request refresh:",!!r,"id token",!!t),t===void 0&&RN&&(t=r),Pie.debug("inAuthenticate, between 1st and 2nd",!!t),(t?Promise.resolve(t):fW0(r)).then(y=>(Pie.debug("inAuthenticate, before setting id token"),l=y,Pie.debug("inAuthenticate, setting up firebase 2"),n(l))).then(y=>(u=y.Firebase,c=y.rootRepository,f=y.uid,s.userID=f,Pie.debug("inAuthenticate, getting team data admin ",f),wBs(u.firestore(),y.uid))).then(y=>{d=y,s.orgID=y.fbTeamID;let C=q_.getActiveSpan();return C&&(C.setAttribute("userID",f),C.setAttribute("orgID",d.fbTeamID)),A=xBs(y.fbRole),Pie.debug("inAuthenticate, finishing...",f),i({org:{id:y.fbTeamID},user:{id:y.fbUserID},...YC&&{version:{id:YC.version}}},c,l)}).then(y=>(h=y,c.user(d.fbUserID).fetch())).then(y=>(p=y,c.org(d.fbTeamID).userRole(d.fbUserID).fetch())).then(y=>{let C;return y?C=new mWt(y,!!p.hasSuperUserAccess):C=new yWt(p.role,!!p.hasSuperUserAccess),{teamInfo:d,firebase:u,rootRepository:c,idToken:l,featureFlags:h,userPermissions:C,UserRolePrivilegeChecker:A}}).catch(y=>{let C=d?d.fbUserID:"",v=d?d.fbTeamID:"";Pie.errorContext({userID:C,orgID:v},"AuthenticateFirebaseTokenAndRetrieveTeamInfo",y);let O=y?.message||y?.error?.errorString;throw new At("Unable to authenticate, please check your network connection and ensure your token is valid",O)})},"appContext"),3,Pie,s,{alterRetryStrategy:l=>({name:"backoff",base:aOi(Hl(l,!0),"QUOTA_EXCEEDED")?60:0}),logOnRetry:`${o} retrying`,logOnFailure:`${o} failed, exhausted allotted retry attempts`})};var U5n=r=>r.map(t=>t.toLowerCase()),Aq1=new Set(["accesstoken","authcode","clientsecret","code","codeverifier","id_token","keypair","newpassword","password","refresh_token","snowflakekeypair","snowflakepassword","token","uid",...U5n(nbe),...U5n(x3t),...U5n(ibe)]);var j5n=(r,t,n,i)=>{let o=Jxe(r.userCredentials,t);return{runTimeParameters:r.runTimeParameters,runDetails:r.runDetails,userCredentials:o,runStatus:i?"waitingToRun":"initializing",userID:n,runType:"deploy",kubernetesJobUuid:i,origin:r.origin}},AW0=async(r,t,n,i,o,s,a,l=!1)=>{let{teamInfo:{fbTeamID:u},rootRepository:c}=r,{runID:d,cleanupHeartbeat:p,logContext:f}=await Vhn(t,c.org(u),s),A=t.runDetails.version===2?t.runDetails.phasedNodeEdits:t.runDetails.dividedStepDataWithWorkspaceEdits,h=l?Promise.resolve():ujt({allWorkspaceData:t.runDetails.fromWorkspaceData,connectionManager:i,logContext:f,platform:o,renderer:a,runID:d,runInfo:t,nodesInRun:one(A),teamInfoAndFirebase:r,workspaceID:n},p);return l&&(await p(),await i.teardown()),{runCounter:d,runCompletion:h}},hW0=(r,t,n)=>{let{toWorkspaceID:i}=t;return ys(t,o=>{o.fromWorkspaceData.userConnections={[i]:{[n]:r}}})},zUs=async(r,t,n,i,o,s)=>{let{teamInfo:{fbTeamID:a,fbUserID:l},rootRepository:u}=t,c=parseInt(r.runDetails.environmentID),d=r.runDetails.version===2?r.runDetails.phasedNodeEdits:r.runDetails.dividedStepDataWithWorkspaceEdits,p=Math.max(...Object.values(d).map(A=>Object.keys(A).length)),f=r.runDetails.planID;pv.infoContext(o,"Initializing deploy! planId:",f);try{let A=await ZR(u,a,l,c,n,o),h=SAe(A,l),y=s?1:r.runDetails.parallelism,C=wG(p,y),{connectionManager:v,platform:O}=await CG(A,t,C,!0,o);r.runDetails=hW0(h,r.runDetails,l),pv.appContext(o,Let(A),"BECLI_HandleDeploy");let w=j5n(r,A,l,s),R=await AW0(t,w,c,v,O,o,i,!!s);return await gW0(u,t,R.runCounter,c,l,o),R}catch(A){throw pv.errorContext(o,`Error during deploy for plan ${f}:`,A,A instanceof Error?A.stack:void 0),A}},gW0=async(r,t,n,i,o,s)=>{try{let a=`run-${n}.predeploy`,l=`user/${o}/environment/${i}/workspacePreDeploy/${a}`,u=await r.org(t.teamInfo.fbTeamID).workspace(i).fetch();pv.appContext(s,"saving workspace data",u),await r.storage().uploadFile(l,u),pv.appContext(s,`Run ${n}: Saved pre-deploy workspace state to ${l}`)}catch(a){pv.errorContext(s,"Error while saving preDeploy workspace state: ",a)}},G5n=r=>{let{runDetails:t}=r;if(t.jobID&&(t.includeNodesSelector||t.excludeNodesSelector))throw new Error("Unable to process, don't provide a JobID and Node Include/Exclude Selector(s) for 1 Refresh Run")},mW0=(r,t)=>{for(let n in t)t[n]&&(r[n]=t[n])},yW0=(r,t)=>{for(let n in t)t[n]&&(r[n]=t[n])},W5n=(r,t,n,i)=>{let o=Jxe(r.userCredentials,t),s={runTimeParameters:r.runTimeParameters,runDetails:{...r.runDetails,jobID:PGe(r.runDetails.jobID)},userCredentials:o,runStatus:i?"waitingToRun":"initializing",userID:n,runType:"refresh",kubernetesJobUuid:i,origin:r.origin};return ub(s),s},SAe=(r,t)=>{if(r.kind==="databricks")return{connectionKind:"databricks",connectionType:r.authenticator,connectionDetails:{userID:t,path:r.path}};if(r.kind==="fabric")return{connectionKind:"fabric",connectionType:r.authenticator,connectionDetails:{userID:t,connectionString:r.connectionString}};let n={connectionDetails:{userID:t,user:r.user,role:r.role,warehouse:r.warehouse},connectionType:r.authenticator};return r.authenticator==="KeyPair"&&(n.connectionDetails.keyPair=r.keyPairKey),n},ZR=async(r,t,n,i,o,s)=>{let a=r.org(t).workspace(i),[{accessUrl:l,connectionAccount:u},c]=await Promise.all([a.fetch(),aU(a.user(n),s)]),d=u||"",p=l||null;if(j5t(c)){if(o.kind!=="databricks")throw new Fo(`Got a userContext for a ${o.kind}, but the connection info on the workspace was for ${c.connectionKind??"snowflake"}`);let f={...o,path:c.connectionDetails.path,host:d,environmentID:i};return yW0(f,o),f}else if(NGe(c)){if(o.kind!=="snowflake")throw new Fo(`Got a userContext for a ${o.kind}, but the connection info on the workspace was for ${c.connectionKind??"snowflake"}`);let f={accountName:d,accessUrl:p,user:c.connectionDetails.user,role:c.connectionDetails.role,warehouse:c.connectionDetails.warehouse,environmentID:i,orgID:t,authenticator:c.connectionType,kind:"snowflake"};return mW0(f,o),f}else if(Nlo(c)){if(o.kind!=="fabric")throw new Fo(`Got a userContext for a ${o.kind}, but the connection info on the workspace was for ${c.connectionKind??"snowflake"}`);let A=await(await Ob()).Get(SPr,{orgId:t,userId:n,workspaceId:i.toString()});if(!A)throw new At("Fabric connection credentials not found","CreateUserContext");return{...o,connectionString:d,credentials:A.sensitiveValue,environmentID:i}}else{let f=c;throw new Fo(`Unknown user connection kind ${f.connectionKind}`)}},H5n=r=>({user:r.snowflakeUsername,role:r.snowflakeRole,warehouse:r.snowflakeWarehouse,authenticator:"Cloud",kind:"snowflake"}),_Ae=r=>r.platformKind==="databricks"?r.databricksAuthType==="OAuthM2M"?{kind:"databricks",authenticator:r.databricksAuthType,clientID:r.clientID,secret:r.clientSecret}:r.databricksAuthType==="OAuthU2M"?{kind:"databricks",authenticator:r.databricksAuthType,accessToken:r.accessToken}:{kind:"databricks",authenticator:r.databricksAuthType,token:r.databricksAuthType==="Token"?r.token:void 0}:r.platformKind==="fabric"?{kind:"fabric",authenticator:r.fabricAuthType,connectionString:r.connectionString}:F$(r,o=>({user:o.snowflakeUsername,password:o.snowflakePassword,role:o.snowflakeRole,warehouse:o.snowflakeWarehouse,authenticator:"Basic",kind:"snowflake"}),o=>{if(o.snowflakeKeyPairKey===void 0)throw new At("No private key was provided, cannot perform key pair authentication with Snowflake");let s=o.snowflakeKeyPairPass?new Wc(o.snowflakeKeyPairPass):void 0,a=uGe(new Wc(o.snowflakeKeyPairKey),s);return{user:o.snowflakeUsername,keyPairKey:a.sensitiveValue,keyPairPass:o.snowflakeKeyPairPass,role:o.snowflakeRole,warehouse:o.snowflakeWarehouse,authenticator:"KeyPair",kind:"snowflake"}},o=>({warehouse:o.snowflakeWarehouse,authenticator:"OAuth",kind:"snowflake"}),H5n),UUs=async(r,t,n,i,o,s,a,l,u=!1,c)=>{pv.infoContext(s,"Securing workspace status and starting refresh:",i);let{teamInfo:{fbTeamID:d},rootRepository:p}=r;n.runDetails={...n.runDetails,refreshDescription:Ket(n.runDetails,a.jobs)};let{runID:f,cleanupHeartbeat:A,logContext:h}=await Vhn(n,p.org(d),s),y=u?Promise.resolve():Yet({allWorkspaceData:a,connectionManager:o,logContext:h,platform:t,renderer:c,runID:f,runInfo:n,nodesInRun:l,teamInfoAndFirebase:r,workspaceID:i},A);return u&&(await A(),await o.teardown()),{runCounter:f,runCompletion:y}},EW0=async(r,t,n,i)=>i?(pv.infoContext(n,"Refreshing job:",i),await r.workspace(t).job(i).fetch().then(()=>!0).catch(o=>{if(o instanceof eu)return!1;throw o})):(pv.infoContext(n,"No job ID, refreshing all steps"),!0),jUs=async(r,t,n,i,o,s)=>{let{teamInfo:{fbTeamID:a,fbUserID:l},rootRepository:u}=t,c=parseInt(r.runDetails.environmentID),d=u.org(a);r.runTimeParameters=await dW(u,a,c,r.runTimeParameters),G5n(r);let p=PGe(r.runDetails.jobID),f=EW0(d,c,o,p);try{let A=await ZR(u,a,l,c,n,o),h=SAe(A,l);if(pv.appContext(o,Let(A),"BECLI_HandleRefresh"),!await f)throw tOr(400,`Unable to start job ${p}`,`Job ${p} did not exist`);let y=W5n(r,A,l,s),C={steps:{},folders:{},jobs:{},macros:{},stepTypes:{}},v=new Set;s||(C=await C0e(+y.runDetails.environmentID,u.org(a)),C.userConnections[c][l]=h,v=$xe(y.runDetails,C));let O=s?1:wG(v.size,r.runDetails.parallelism),{connectionManager:w,platform:R}=await CG(A,t,O,!0,o);return UUs(t,R,y,c,w,o,C,v,!!s,i)}catch(A){throw pv.errorContext(o,"Error during refresh:",A),A}};var bW0=async(r,t,n)=>{let o=(await r.org(t).workspace(n).fetch()).runTimeParameters??"";return aRt(o)},dW=async(r,t,n,i)=>i?Jjt(i):bW0(r,t,n),V5n=async(r,t,n,i,o,s)=>{let a=Jxe(t.userCredentials,i),l=await dW(r,o.fbTeamID,parseInt(n.runDetails.environmentID),t.runTimeParameters);return n.runType==="refresh"&&(t.runDetails.forceIgnoreWorkspaceStatus!==void 0?n.runDetails.forceIgnoreWorkspaceStatus=t.runDetails.forceIgnoreWorkspaceStatus:n.runDetails.forceIgnoreWorkspaceStatus!==void 0&&delete n.runDetails.forceIgnoreWorkspaceStatus,n.runDetails.executor=t.runDetails.executor),{kubernetesJobUuid:s,origin:t.origin,reRunID:t.runDetails.runID,runDetails:n.runDetails,runStatus:s?"waitingToRun":"initializing",runTimeParameters:l,runType:"refresh",userCredentials:a,userID:o.fbUserID,version:3}},CW0=async(r,t,n,i,o,s,a)=>{let l="[ReRunRefresh]",{rootRepository:u,teamInfo:c,teamInfo:{fbUserID:d,fbTeamID:p}}=n,f=u.org(p),A=parseInt(t.runDetails.environmentID),h=await ZR(u,p,d,A,i,s),y=SAe(h,d),C=await V5n(u,r,t,h,c,a);if(!Q3t(C)){let H=`invalid rerun ID ${C.reRunID}`;throw pv.errorContext(s,l,H),new At(H)}let v=await C0e(+C.runDetails.environmentID,f);v.userConnections[A][d]=y;let O=await pGt(f,C,v),w=a?1:C.runDetails.parallelism,R=wG(O.size,w),{platform:P,connectionManager:z}=await CG(h,n,R,!0,s);return r.runTimeParameters=await dW(u,p,A,r.runTimeParameters),UUs(n,P,C,A,z,s,v,O,!!a,o)},GUs=async(r,t,n,i,o,s,a)=>{if(pv.appContext(s,"BECLI_HandleRerun"),t.runStatus!=="failed")throw new Error("Only failed jobs can be re-run!");if(k3t(t))return CW0(r,t,n,i,o,s,a);throw new Error(`Run type ${t.runType} is not eligible for re-run`)},WUs=r=>HUs(r,"runCounter"),IDe=r=>HUs(r,"environment ID"),HUs=(r,t)=>{let n=typeof r=="number"?r:parseInt(r||"");if(!r||isNaN(n))throw new Fo(`Specify a valid ${t}`,`400: ${n} is not valid`);return n};hd();var{PLAN:_it}=nt,JUs=async(r,t,n,i,o,s,a,l,u,c,d,p)=>{let f=`[performPlanCreation | enablePlanRendering=${r}]`,{measure:A,printSummary:h}=i4(f,d);try{let y=await A("plan calculation (total)",()=>kgn({disablePresync:l,enablePlanRendering:r,skipPlanContextUpload:p},t,n,i,o,s,a,u,c,d)),C=await A("calculate plan size",()=>nce(uz(y)));_it.appContext(d,f,`Processing for plan ${n} completed. Size was ${C}mb. Storing compressed data`);let v=await A("stringify & compress plan",async()=>{let O=await(0,VUs.stringify)({body:y});return(0,KUs.deflate)(O,{to:"string"})});await A("store completed plan",()=>f5s(c,o,i,n,v,d)),_it.appContext(d,f,`Storage for plan ${n} completed`)}catch(y){_it.errorContext(d,f,"Plan creation failed",y),await A5s(c,o,i,n,{status:"failed",error:y instanceof At?y.toTRunError():Hl(y)},d)}finally{h()}},XUs=async(r,t,n,i,o,s,a)=>{let l,u=i.org(t).workspace(n).user(r);try{let c=await aU(u,a);await z$(t,r,n,o,c,s);let d=_Ae(o),p=await ZR(i,t,r,n,d,a);l=await SGt(p,a,s)}catch(c){let{message:d,detail:p}=await IW0(c,u,a);throw new At(d,p)}return await l.testConnection(),l},IW0=async(r,t,n)=>{let i="[createPlan (endpoint)]";_it.errorContext(n,i,"Error authenticating user",r);let o;try{({connectionKind:o}=await t.fetch())}catch(l){_it.errorContext(n,i,"Couldn't fetch workspace user",l)}let{error:{errorString:s,errorDetail:a}}=Hl(r);return{message:`${o?(0,YUs.capitalize)(o)+" u":"U"}ser authentication unsuccessful: ${s}`,detail:a}};var $Us=Et(X3t());Ar();var US=r=>{let t;return process.env.COALESCE_RENDERER_UNIX_SOCKET_PATH?r.isFeatureEnabled("enablePyodideAsValidator")?t="dual":t="unix":t="pyodide",nt.RENDERER.info(`Getting a pool of kind ${t}`),$Us.GetPool(t)};yw();ki();Er();var ZUs=(r,t,n,i)=>{if(t.kind==="none")throw new DB(t.kind,"CreateActiveRunInfoFromDevRun");let o=Jxe(r.userCredentials,t),s={userID:n,userCredentials:o,runTimeParameters:r.runTimeParameters,runDetails:{...r.runDetails,jobID:PGe(r.runDetails.jobID)},runStatus:i?"waitingToRun":"initializing",runType:"devRun",kubernetesJobUuid:i,origin:r.origin};return ub(s),s};ST();Gl();vE();Gl();var vW0=new Map([["securetoken.googleapis.com",{path:"/securetoken",featureFlagName:"proxyGoogleAuth",enableByDefault:!1}],["identitytoolkit.googleapis.com",{path:"/identitytoolkit",featureFlagName:"proxyGoogleAuth",enableByDefault:!1}]]),ijs=r=>{let t=vW0.get(r.hostname);if(t&&Kge(t.enableByDefault,t.featureFlagName)){let n=new URL(Jge()),i=n.pathname;i.endsWith("/")&&(i=i.slice(0,-1)),r.pathname=i+t.path+r.pathname,r.hostname=n.hostname,r.protocol=n.protocol,r.port=n.port}return r},ojs=async(r=f1())=>{if(r){let t=await I1,n=t.interceptors.request.use(i=>(typeof i.url=="string"&&(i.url=ijs(new URL(i.url)).toString()),i));return()=>t.interceptors.request.eject(n)}else{let t=njs().register;return t({request:(n,i)=>{let o=n;return typeof n=="string"&&(o=ijs(new URL(n)).toString()),[o,i]}})}};Kf();var ajs=Et(Jre());ST();Er();F3r();var sjs=Et(Jre());Er();var vDe=class{constructor(t){this._storage=t}async uploadToStorage(t,n){let i=GLe(this._storage,t),o=(0,sjs.gzip)(new TextEncoder().encode(JSON.stringify(n)));await $ht(i,o,{contentType:"application/json",contentEncoding:"gzip"})}async downloadFromStorage(t){let n=async()=>{let i=await Cci(this._storage.ref(t));return JSON.parse(Buffer.from(i).toString())};return await this.handleStorageNotFoundError("download",n(),t)}async deleteFileFromStorage(t){await this.handleStorageNotFoundError("delete",this._storage.ref(t).delete(),t)}async checkIfStorageReferenceExists(t){try{return!!await this._storage.ref(t).getDownloadURL()}catch(n){if(n instanceof E1&&n.code==="storage/object-not-found")return!1;throw n}}async handleStorageNotFoundError(t,n,i){try{return await n}catch(o){throw o instanceof E1&&o.code==="storage/object-not-found"?new eu(`Could not ${t} file from storage (compat) - no file exists at provided path ${i}`):o}}};vE();ki();Gl();Kf();Ar();o4();var SDe=nt.FIREBASE,SW0=3,OXt=class extends vDe{_backendUrl;_bucketPath;_forceBypassProxy;_baseStorageUrl;_axiosClient;constructor(t){super(t.storage),this._bucketPath=`v0/b/${t.bucket}/o`,this._backendUrl=t?.backendUrl??oE(),this._forceBypassProxy=!!t?.forceBypassProxy,this._axiosClient=t?.axiosClient,this._baseStorageUrl=t.emulatorStorageHost?`http://${t.emulatorStorageHost}`:"https://firebasestorage.googleapis.com"}async uploadToStorage(t,n){if(!this.isProxyEnabled)return super.uploadToStorage(t,n);SDe.info(`Uploading file to '${t}' via proxy`);let i=(0,ajs.gzip)(new TextEncoder().encode(JSON.stringify(n))),o=await this.axios();try{let s=await o.post(this.determineProxyUrl(this._bucketPath,{name:t}),{contentEncoding:"gzip",contentType:"application/json",name:t},{headers:{Authorization:`Firebase ${await this.token()}`,"X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${i.length}`,"X-Goog-Upload-Header-Content-Type":"application/json","X-Goog-Upload-Protocol":"resumable"}}),a=s.headers["x-goog-upload-url"];Ph(!!a,"Missing upload URL in firebase cloud storage upload response","FIREBASE"),a=await this.determineProxyUrl(a);let l=+s.headers["x-goog-upload-chunk-granularity"]||262144,c=i.length,d=0;for(;c>l;){let p=Math.min(c,l),f=d+p,A=i.slice(d,f);await this.uploadChunk(a,A,d,!1),c-=p,d+=p}await this.uploadChunk(a,i.slice(d),d,!0)}catch(s){throw this.handleAxiosError(s)}}async downloadFromStorage(t){if(!this.isProxyEnabled)return super.downloadFromStorage(t);SDe.info(`Downloading file from '${t}' via proxy`);let n=await this.axios();try{return(await n.get(this.determineProxyUrl(`${this._bucketPath}/${encodeURIComponent(t)}`,{alt:"media"}),{headers:{Authorization:`Firebase ${await this.token()}`}})).data}catch(i){throw this.handleAxiosError(i)}}async deleteFileFromStorage(t){if(!this.isProxyEnabled)return super.deleteFileFromStorage(t);SDe.info(`Deleting file at '${t}' via proxy`);let n=await this.axios();try{await n.delete(this.determineProxyUrl(`${this._bucketPath}/${encodeURIComponent(t)}`,{alt:"media"}),{headers:{Authorization:`Firebase ${await this.token()}`}})}catch(i){throw this.handleAxiosError(i)}}async checkIfStorageReferenceExists(t){if(!this.isProxyEnabled)return super.checkIfStorageReferenceExists(t);SDe.info(`Checking if file at '${t}' exists via proxy`);let n=await this.axios();try{return await n.get(this.determineProxyUrl(`${this._bucketPath}/${encodeURIComponent(t)}`),{headers:{Authorization:`Firebase ${await this.token()}`}}),!0}catch(i){if(Em(i)&&i.status===404)return!1;throw this.handleAxiosError(i)}}determineProxyUrl(t,n){t=t.replace(/^https:\/\/firebasestorage\.googleapis\.com\//,"");let i="?";if(n)for(let o in n){let s=n[o];s!==void 0&&(t+=`${i}${o}=${encodeURIComponent(s)}`,i="&")}return`${this.proxyUrl}?gcsforward=${encodeURIComponent(t)}`}get isProxyEnabled(){let t=!1;return typeof window<"u"&&(t=window.location.hostname==="localhost"||/(^|\.)local\./.test(window.location.hostname)),!t&&!this._forceBypassProxy&&this._baseStorageUrl==="https://firebasestorage.googleapis.com"&&$1().featureFlags.isFeatureEnabled("proxyGoogleStorage")}async uploadChunk(t,n,i,o){await O1(async()=>{SDe.info(`Uploading ${n.length} bytes at offset ${i} to '${t}'`),await(await this.axios()).post(t,n,{headers:{Authorization:`Firebase ${await this.token()}`,"X-Goog-Upload-Command":`upload${o?", finalize":""}`,"X-Goog-Upload-Offset":`${i}`}})},SW0,SDe,{})}get proxyUrl(){return`${this._backendUrl}/gcs`}async token(){return cbe(this._storage.app.auth().currentUser)}async axios(){return this._axiosClient||(this._axiosClient=await I1),this._axiosClient}handleAxiosError(t){if(Em(t)){let i=t.response?.data?.message??t.message;switch(t.status){case 403:return new tE(i);case 404:return new eu(i);default:return new At(i)}}return t}};cY();aEt();aEt();yle();rY();Er();var ID=q_.getTracer("repository"),Y5n=class{constructor(t){this.transaction=t}async get(t){return vbr(t.path),ID.startActiveSpan(`get ${t.path}`,async n=>{n.setAttribute("repositoryType","web"),n.setAttribute("path",t.path),n.setAttribute("operation","get");let i=await this.transaction.get(t);return n.end(),i})}set(t,n){return Sbr(t.path),ID.startActiveSpan(`set ${t.path}`,i=>(i.setAttribute("repositoryType","web"),i.setAttribute("path",t.path),i.setAttribute("operation","set"),this.transaction.set(t,n),i.end(),this))}async update(t,n){return _br(t.path),ID.startActiveSpan(`update ${t.path}`,i=>(i.setAttribute("repositoryType","web"),i.setAttribute("path",t.path),i.setAttribute("operation","update"),this.transaction.update(t,n),i.end(),this))}delete(t){return Obr(t.path),ID.startActiveSpan(`delete ${t.path}`,n=>(n.setAttribute("repositoryType","web"),n.setAttribute("path",t.path),n.setAttribute("operation","delete"),this.transaction.delete(t),n.end(),this))}getQuery(t){throw new bc("getQuery is not supported with the web sdk.")}},TXt=class r extends Sit{constructor(n,i=new vDe(n.storage())){super();this.app=n;this.storage=i}get db(){return this.app.firestore()}currentUser(){return this.db.app.auth().currentUser?.uid}currentLogContext(){return{userID:this.db.app.auth().currentUser?.uid}}collectionRef(n,i){return n.collection(i)}data(n){return n.data()}docRef(n,i){return n.doc(i)}exists(n){return n.exists}hasPendingWrites(n){return n.metadata.hasPendingWrites}async getDoc(n,i){let o=n;return vgt(o.path),ID.startActiveSpan(`get ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","get");let a=await o.get();if(!a.metadata.hasPendingWrites)return s.end(),a;let l=Kui(o,i?.pendingWritesTimeoutMs);return s.end(),l})}async addDoc(n,i){let o=n;Igt(o.path),await ID.startActiveSpan(`set ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","set"),await o.set(i),s.end()})}async saveDoc(n,i){let o=n;return Igt(n.path),ID.startActiveSpan(`set ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","set"),await o.set(i),s.end()})}async updateDoc(n,i){let o=n;return Ibr(n.path),ID.startActiveSpan(`update ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","update"),await o.update(i),s.end()})}async deleteDoc(n){let i=n;return Cbr(n.path),ID.startActiveSpan(`delete ${n.path}`,async o=>{o.setAttribute("repositoryType","web"),o.setAttribute("path",n.path),o.setAttribute("operation","delete"),await i.delete(),o.end()})}createQuery(n,i){let o=n;if(i?.where?.filter(s=>s[2]!==void 0).forEach(s=>o=o.where(r.replaceIDSentinel(s[0]),s[1],s[2])),i?.orderBy?.forEach(s=>o=o.orderBy(s[0],s[1])),i?.startingFrom!==void 0&&(i.orderBy?.length?o=o.startAfter(i.startingFrom):(o=o.orderBy(Kd.firestore.FieldPath.documentId()),o=o.startAfter(i.startingFrom.toString()))),i?.limit&&(o=o.limit(i.limit)),i?.selectFields)throw new bc("Selecting specific fields is not supported with the Firebase web SDK");return o}runQuery(n){return ID.startActiveSpan("get query.unknown",async i=>{i.setAttribute("repositoryType","web"),i.setAttribute("path","query.unknown"),i.setAttribute("operation","get");let o=await n.get();return i.end(),o})}onDocSnapshot(n,i,o){return n.onSnapshot(i,o)}onCollectionSnapshot(n,i,o){return this.onQuerySnapshot(n,i,o)}onQuerySnapshot(n,i,o){return n.onSnapshot(i,o)}snapShotChanges(n){return n.docChanges()}runTransaction(n){return this.db.runTransaction(i=>n(new Y5n(i)))}batch(){return this.db.batch()}saveDocBatch(n,i,o){n.set(i,o)}updateDocBatch(n,i,o){n.update(i,o)}deleteDocBatch(n,i){n.delete(i)}commitBatch(n){return Tbr(),ID.startActiveSpan("batch",async i=>{i.setAttribute("repositoryType","web"),i.setAttribute("operation","batch commit"),await n.commit(),i.end()})}getServerTimestampSentinel(){return Kd.firestore.FieldValue.serverTimestamp()}getDeleteSentinel(){return Kd.firestore.FieldValue.delete()}uploadToStorage(n,i){return this.storage.uploadToStorage(n,i)}downloadFromStorage(n){return this.storage.downloadFromStorage(n)}deleteFileFromStorage(n){return this.storage.deleteFileFromStorage(n)}getCount(n){throw new bc("getCount is not supported with the web sdk.")}async checkIfStorageReferenceExists(n){return this.storage.checkIfStorageReferenceExists(n)}static replaceIDSentinel(n){return n instanceof yqe?Kd.firestore.FieldPath.documentId():n}};ST();var K5n=new Map,_W0=r=>$1().featureFlags.getStringValue("serviceBackedRepositories","").split(",").includes(r)?"service":"firebase",ljs=(r,t)=>{r||(r=Kd.app());let n=K5n.get(r.name);return n||(n=wbn(new TXt(r,t),_W0),K5n.set(r.name,n)),n},cjs=()=>{K5n.clear()};var OW0=0,TW0=async(r,t)=>{try{await wTr(t);let n=r+OW0++,i=yze().initializeApp(t,n);RTr(i,!1);let o=await UP("/scheduler/generateLoginToken",null,r),{customToken:s,uid:a}=o.data;await i.auth().signInWithCustomToken(s);let l;return WB()||(l=new OXt({storage:i.storage(),backendUrl:t.emulatorInfo?.storage,bucket:t.storageBucket})),{Firebase:i,rootRepository:ljs(i,l),uid:a}}catch(n){throw pv.error("GetOrSetupFirebase",n),n}},wXt=async(r,t,n)=>{let o=await s4(n.origin).GetDatabase(),s=j3t().instance,a=P0r(n.hostname);return process.env.SCHEDULER_ADDRESS=n.origin,s.isInitialized||await s.initializeDefaultFlags(P0r(n.hostname)),WY({logContext:$1().logContext,featureFlags:s.currentFlags},async()=>(s.currentFlags,await ojs(),await PTi(o),qUs(r,t,l=>TW0(l,o),async(l,u,c)=>(a&&(l.subdomain={id:a}),YC&&(l.version={id:YC.version}),await s.initialize({context:l,rootRepository:()=>u,firebaseAuth:c}),s.currentFlags))))};fW();var wW0=async(r,t,n,i,o)=>{Ho.infoContext(o,`Starting deploy job coa-${r}`);let s=Glo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),a=new f_e(s),l=IDe(a.runDetails.environmentID),u={...o,runID:i,workspaceID:l},{teamInfo:{fbTeamID:c,fbUserID:d},rootRepository:p}=t,f=p.org(c),A=await aU(f.workspace(l).user(d),u),h=$1().featureFlags;await z$(c,d,l,a.userCredentials,A,h);let y=await ZR(p,c,d,l,_Ae(a.userCredentials),u),C=j5n(a,y,d,r);C.id=i;let v=f.run(i);await v.updateHeartbeat({runStatus:"initializing"});let O=Z1e(u,v,C.runType);try{let w=a.runDetails.version===2?a.runDetails.phasedNodeEdits:a.runDetails.dividedStepDataWithWorkspaceEdits,R=Math.max(...Object.values(w).map(H=>Object.keys(H).length)),{connectionManager:P,platform:z}=await CG(y,t,wG(R,a.runDetails.parallelism),!1,u);return ujt({allWorkspaceData:C.runDetails.fromWorkspaceData,connectionManager:P,logContext:u,platform:z,renderer:US(h),runID:i,runInfo:C,nodesInRun:one(w),teamInfoAndFirebase:t,workspaceID:l},O)}catch(w){try{await O()}catch(R){Ho.error("Unable to clean up hearbeat after handling error",w,"innerError",R)}throw w}},RW0=async(r,t,n,i,o)=>{Ho.infoContext(o,`Starting refresh job coa-${r}`);let a=Vlo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),l=IDe(a.runDetails.environmentID),u={...o,runID:i,workspaceID:l},{teamInfo:{fbTeamID:c,fbUserID:d},rootRepository:p}=t,f=p.org(c),A=await aU(f.workspace(l).user(d),u),h=$1().featureFlags;await z$(c,d,l,a.userCredentials,A,h);let y=await ZR(p,c,d,l,_Ae(a.userCredentials),u);a.runTimeParameters=await dW(p,c,l,a.runTimeParameters),G5n(a);let C=W5n(a,y,d,r);C.id=i;let v=f.run(i);await v.updateHeartbeat({runStatus:"initializing"});let O=Z1e(u,v,C.runType);try{let w=await C0e(l,f),R=$xe(C.runDetails,w),P=Ket(C.runDetails,w.jobs);await v.merge({runDetails:{...C.runDetails,refreshDescription:P}});let z=SAe(y,d);w.userConnections[l][d]=z;let{connectionManager:H,platform:J}=await CG(y,t,wG(R.size,a.runDetails.parallelism),!1,u);return Yet({allWorkspaceData:w,connectionManager:H,logContext:u,platform:J,renderer:US(h),runID:i,runInfo:C,nodesInRun:R,teamInfoAndFirebase:t,workspaceID:l},O)}catch(w){try{await O()}catch(R){Ho.error("Unable to clean up hearbeat after handling error",w,"innerError",R)}throw w}},BW0=async(r,t,n,i,o)=>{let s="[CloudReRun]";Ho.infoContext(o,`Starting re-run job coa-${r}`);let a=Klo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),l=new A_e(a);ub(l);let{teamInfo:u,teamInfo:{fbTeamID:c,fbUserID:d},rootRepository:p}=t,f=p.org(c),A=WUs(l.runDetails.runID),h=await f.run(A).fetch();if(!h)throw new Error(`Could not find runInfo for teamID=${c}, oldRunID=${A}`);if(!k3t(h))throw new Error("Run is not eligible for rerun or a dev run");let y=IDe(h.runDetails.environmentID),C={...o,runID:i,workspaceID:y},v=await aU(f.workspace(y).user(d),C),O=$1().featureFlags;await z$(c,d,y,l.userCredentials,v,O);let w=await ZR(p,c,d,y,_Ae(l.userCredentials),C),R=await V5n(p,l,h,w,u,r);if(R.id=i,!Q3t(R)){let J=`Invalid rerun ID ${R.reRunID}`;throw Ho.errorContext(C,s,J),new Fo(J)}let P=IDe(R.runDetails.environmentID);ou("RUNNER_BACKEND",P===y,C,"Unexpected mismatch between workspace IDs for re-run and original run; workspace for re-run:",P,"workspace for original run:",y);let z=f.run(i);await z.updateHeartbeat({runStatus:"initializing"});let H=Z1e(C,z,R.runType);try{let J=await C0e(P,f),K=Ket(R.runDetails,J.jobs);await z.merge({runDetails:{...R.runDetails,refreshDescription:K}});let V=await pGt(f,R,J),F=SAe(w,d);J.userConnections[P][d]=F;let{connectionManager:X,platform:Y}=await CG(w,t,wG(V.size,R.runDetails.parallelism),!1,C);return Yet({allWorkspaceData:J,connectionManager:X,logContext:C,platform:Y,renderer:US(O),runID:i,runInfo:R,nodesInRun:V,teamInfoAndFirebase:t,workspaceID:P},H)}catch(J){try{await H()}catch(K){Ho.error("Unable to clean up hearbeat after handling error",J,"innerError",K)}}},xW0=async(r,t,n,i,o)=>{let s="CloudDevRun:";Ho.infoContext(o,s,`Starting dev run job coa-${r}`);let a=Wlo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),l=IDe(a.runDetails.environmentID),u={...o,runID:i,workspaceID:l},{rootRepository:c,teamInfo:{fbTeamID:d,fbUserID:p}}=t,f=c.org(d),A=await aU(f.workspace(l).user(p),u),h=$1().featureFlags;await z$(d,p,l,a.userCredentials,A,h);let y=await ZR(c,d,p,l,_Ae(a.userCredentials),u),C=f.devRun(i);await C.updateHeartbeat({runStatus:"initializing"});let v={...ZUs(a,y,p,r),id:i},O=Z1e(u,C,v.runType);try{let w=await C0e(l,f);w.userConnections[l][p]=SAe(y,p);let R=$xe(v.runDetails,w),{connectionManager:P,platform:z}=await CG(y,t,wG(R.size,a.runDetails.parallelism),!1,u);return YSs({allWorkspaceData:w,connectionManager:P,logContext:u,platform:z,renderer:US(h),runID:i,runInfo:v,nodesInRun:R,teamInfoAndFirebase:t,workspaceID:l},O)}catch(w){try{await O()}catch(R){Ho.errorContext(u,s,"unable to clean up heartbeat with error",R,"following run error",w)}throw w}},MW0=async(r,t,n,i,o)=>{let s="[CloudPlan]",{rootRepository:a,teamInfo:{fbTeamID:l,fbUserID:u}}=t,c=$1().featureFlags,{currentWorkspaceData:d,desiredWorkspaceData:p,disablePresync:f,enablePlanRendering:A,workspaceID:h,parameters:y,userCredentials:C,skippedBeforeCollection:v}=n,O={...o,planID:i,workspaceID:h},w={currentWorkspaceData:d,desiredWorkspaceData:p,skippedBeforeCollection:v},R=await XUs(u,l,h,a,C,c,O);Ho.infoContext(O,s,`Starting plan job coa-${r}`),await JUs(!!A,US(c),i,h,u,R,y,f,w,a,O,c.isFeatureEnabled("skipPlanContextUpload"))},fjs=async r=>{let t="[CloudEntry]";if(Ho.debug("Cloud entrypoint."),!process.env.SCHEDULER_ADDRESS){let c="No SCHEDULER_ADDRESS defined for cloud entrypoint";throw Ho.emerg(c),new At(c)}let n=await wXt(process.env.COALESCE_COA_CLOUD_TOKEN,void 0,new URL(process.env.SCHEDULER_ADDRESS)),{rootRepository:i,teamInfo:{fbTeamID:o,fbUserID:s},featureFlags:a}=n,l={kubernetesJobUuid:r,orgID:o,userID:s};Ho.infoContext(l,t,"authenticated user");let u;try{await RBs(i,o)&&(ICr(),Ho.debugContext(l,t,"super Debug enabled"));let d=process.env.COALESCE_COA_CLOUD_REQUEST_PATH;if(!d){let C="COALESCE_COA_CLOUD_REQUEST_PATH not set!";throw Ho.emergContext(l,t,C),new At(C)}Ho.infoContext(l,t,"downloading request data from",d);let p=await i.storage().downloadFile(d),f=p9(p);Ho.infoContext(l,t,"finished parsing request data as JSON completed; deleting stored request",f),await i.storage().deleteFile(d),Ho.infoContext(l,t,"finished deleting stored request; dispatching cloud run");let A=process.env.COALESCE_COA_CLOUD_ACTION,{cloudAction:h,actionID:y}=DW0(A,l);u=WY({userID:s,orgID:o,logContext:l,featureFlags:a},()=>h(r,n,p,y,l))}catch(c){Ho.errorContext(l,t,"error starting coa run",c);let d={error:{errorString:pOi(c),errorDetail:""},statusCode:500};c instanceof At?(d.error=c.toTRunError().error,d.statusCode=c.statusCode()):(d.error.errorString=c.error?.errorString??d.error.errorString,d.error.errorDetail=c.error?.errorDetail??d.error.errorDetail,d.statusCode=c.statusCode??d.statusCode),await dO(1);return}try{Ho.infoContext(l,t,"job started, waiting for completion"),await u,Ho.infoContext(l,t,"job completed without exception")}catch(c){Ho.errorContext(l,t,"exception thrown during job",c),await dO(1)}await dO(0)},DW0=(r,t)=>{let n="[performCloudAction]",i;if(r==="plan"){let s=process.env.COALESCE_COA_CLOUD_PLAN_ID;if(!s){let a=`Plan ID was ${s}`;throw Ho.emergContext(t,n,a),new At(a)}i=s,t.planID=s}else{let s=process.env.COALESCE_COA_CLOUD_RUN_COUNTER,a=parseInt(s);if(Number.isNaN(a)){let l=`Unable to parse runCounter: ${s}!`;throw Ho.emergContext(t,n,l),new At(l)}i=a}let o;switch(r){case"deploy":o=wW0;break;case"refresh":o=RW0;break;case"rerun":o=BW0;break;case"devRun":o=xW0;break;case"plan":o=MW0;break;default:{let s=r;throw Ho.emergContext(t,n,`received unexpected COALESCE_COA_CLOUD_ACTION value ${s}`),new At(`Error: COALESCE_COA_CLOUD_ACTION is invalid! value=${s}`)}}return{cloudAction:o,actionID:i}};fW();var wjs=Et(Tjs(),1),{program:yU1,createCommand:EU1,createArgument:bU1,createOption:CU1,CommanderError:IU1,InvalidArgumentError:Rjs,InvalidOptionArgumentError:vU1,Command:Bjs,Argument:SU1,Option:jS,Help:_U1}=wjs.default;cY();var bXs=Et(Go());var F9e=Et(require("fs")),CXs=Et(Njs());Er();var Pjs={openapi:"3.0.3",info:{version:"1.0.0",title:"Coalesce API",description:"REST API for performing operations with the Coalesce backend."},servers:[{url:"https://app.coalescesoftware.io",description:"US primary"},{url:"https://app.eu.coalescesoftware.io",description:"Europe primary"},{url:"https://app.australia-southeast1.gcp.coalescesoftware.io",description:"Australia primary"},{url:"https://app.us-east-1.aws.coalescesoftware.io",description:"US AWS US East"},{url:"https://app.us-east-1.aws.privatelink.coalescesoftware.io",description:"US AWS US East with PrivateLink"},{url:"https://app.us-west-2.aws.coalescesoftware.io",description:"US AWS US West"},{url:"https://app.us-west-2.aws.privatelink.coalescesoftware.io",description:"US AWS US West with PrivateLink"},{url:"https://app.northamerica-northeast1.gcp.coalescesoftware.io",description:"Canada Primary"},{url:"https://app.westus2.azure.coalescesoftware.io",description:"US Azure West 2"},{url:"https://app.eastus2.azure.coalescesoftware.io",description:"US Azure East 2"}],security:[{BearerAuth:[]}],"x-coa-private-pointers":["/paths/~1api~1v2~1render","/paths/~1api~1v2~1render~1health","/components/schemas/PackageDefinition","/components/schemas/RenderRequestV2"],components:{schemas:{DatabaseInfo:{type:"object",required:["apiKey","authDomain","projectId","storageBucket","messagingSenderId","appId","measurementId"],properties:{apiKey:{type:"string"},authDomain:{type:"string"},projectId:{type:"string"},storageBucket:{type:"string"},messagingSenderId:{type:"string"},appId:{type:"string"},measurementId:{type:"string"},emulatorInfo:{type:"object",required:["auth","firestore","storage"],properties:{auth:{type:"string"},firestore:{type:"string"},storage:{type:"string"}}}}},EnvironmentsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of environment information.",anyOf:[{type:"array",items:{$ref:"#/components/schemas/Environment"}},{type:"array",items:{$ref:"#/components/schemas/EnvironmentSummary"}}]},total:{type:"integer",description:"The size of the result set."},startingFrom:{type:"string",description:"The cursor value used in the request."},limit:{type:"integer",description:"The requested page size."},next:{type:"number",nullable:!0,description:"The field value where the next page of result starts after."}}},FeatureFlagsClientConfig:{type:"object",description:"Information a client needs to connect to the feature flag service.",required:["launchDarklyClientID"],properties:{launchDarklyClientID:{type:"string"}}},FeatureFlagsValues:{type:"object",description:"Feature flag values.",properties:{featureFlags:{additionalProperties:{oneOf:[{type:"boolean"},{type:"string"},{type:"number"},{type:"object"},{type:"array"}]}}},required:["featureFlags"]},ProjectsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of project information.",type:"array",items:{$ref:"#/components/schemas/Project"}}}},ProjectResponse:{type:"object",required:["data"],properties:{data:{description:"Information about a project.",$ref:"#/components/schemas/Project"}}},TypesenseConfigResponse:{description:"Summary of configuration data for Typesense in a given org.","x-coa-private":!0,type:"object",required:["typesenseKey","typesenseHosts"],properties:{typesenseKey:{description:"The Typesense access key scoped to a users org.",type:"string"},typesenseHosts:{description:"The Typesense host address(es) for our cluster(s).",type:"array",items:{type:"string"}}}},EnvironmentSummary:{type:"object",description:"Summary information about an environment.",additionalProperties:!1,properties:{createdAt:{type:"string",format:"date-time"},createdBy:{$ref:"#/components/schemas/UserSummary"},id:{type:"string",description:"The Environment ID."},name:{type:"string",description:"Name of the Environment."},project:{type:"string",description:"The Project ID."},status:{$ref:"#/components/schemas/EnvironmentHealth",description:"Status of the Environment."}},required:["createdAt","id","name","project","status"]},ErrorResponse:{description:"Error detail in addition to the HTTP status code and text.",type:"object",required:["error"],properties:{error:{$ref:"#/components/schemas/Error"}}},NodesResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of nodes for an environment.",anyOf:[{type:"array",items:{$ref:"#/components/schemas/NodeSummary"}},{type:"array",items:{$ref:"#/components/schemas/Node"}}]},total:{type:"integer",description:"The size of the result set."},startingFrom:{type:"string",description:"The cursor value used in the request."},limit:{type:"integer",description:"The requested page size."},next:{type:"string",nullable:!0,description:"The field value where the next page of result starts after."}}},NodeSummary:{type:"object",properties:{database:{type:"string",description:"The Snowflake database name."},id:{type:"string",description:"The Coalesce Node ID."},locationName:{type:"string",description:"The Storage Mapping location."},name:{type:"string",description:"The Node name."},nodeType:{$ref:"#/components/schemas/NodeType"},schema:{type:"string",description:"The database schema name."}},required:["database","id","locationName","name","nodeType","schema"]},OrderByDirection:{description:"The sort order for query results.",type:"string",enum:["asc","desc"]},PackageCreateEntity:{description:"A single package entity to be created.","x-coa-private":!0,type:"object",properties:{macros:{type:"string"},dependencies:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageDependency"}},nodeTypes:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageNodeType"}}},required:["macros","dependencies","nodeTypes"]},PackageDependency:{description:"A package dependency.","x-coa-private":!0,type:"object",required:["version","macros","dependencies","releaseID","alias","packageID"],properties:{packageID:{type:"string",minLength:1},alias:{type:"string"},version:{type:"string"},releaseID:{type:"string",minLength:1},macros:{type:"string"},dependencies:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageDependency"}}},example:{name:"foo",version:"1.2.3",macros:"{% macro bar() %}hello,{% endmacro %}",nodeTypes:{},dependencies:{dep:{name:"baz",version:"1.1.1",macros:"{% macro bar() %}world!{% endmacro %}",dependencies:{}}}}},PackageEntityTagV1:{description:"Identifies the package from which the entity came. (Deprecated, see PackageEntityTagV2).","x-coa-private":!0,type:"object",required:["id","version"],properties:{id:{type:"string"},version:{type:"string"}}},PackageEntityTagV2:{description:"Identifies the package from which the entity came.","x-coa-private":!0,type:"object",required:["id","releaseID"],properties:{id:{type:"string"},releaseID:{type:"string"}}},PackageMacro:{description:"A macro in a package.","x-coa-private":!0,type:"string"},PackageNodeType:{description:"A node type in a collection of nodeTypes to be packaged.","x-coa-private":!0,type:"object",required:["name","version","isDisabled","metadata","id"],properties:{name:{type:"string"},version:{type:"number"},id:{type:"string"},isDisabled:{type:"boolean"},metadata:{type:"object"}}},PackageCreateReleaseInfo:{description:"Package release information for a create operation.","x-coa-private":!0,type:"object",properties:{changeLog:{type:"string"},version:{type:"string"},certified:{type:"boolean"}},required:["changeLog","version"]},PackageCreateEntities:{description:"Entities that are part of a package release.","x-coa-private":!0,required:["dependencies","nodeTypes","macros"],properties:{dependencies:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageDependency"}},nodeTypes:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageNodeType"}},macros:{type:"string"}}},RunsOrderBy:{description:"The field used to sort query results.",type:"string",enum:["id","runStartTime","runEndTime"],default:"id"},RunsResponse:{description:"A collection of runs.",type:"object",required:["limit","orderBy","orderByDirection","data"],properties:{limit:{description:"The maximum number of runs returned by this query.",type:"integer"},orderByDirection:{$ref:"#/components/schemas/OrderByDirection"},orderBy:{$ref:"#/components/schemas/RunsOrderBy"},data:{description:"A collection of runs.",anyOf:[{type:"array",items:{$ref:"#/components/schemas/RunSummary"}},{type:"array",items:{$ref:"#/components/schemas/RunInfo"}}]}}},RunResultsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of run results.",type:"array",items:{$ref:"#/components/schemas/RunResult"}}}},RunSummary:{type:"object",properties:{id:{description:"The run ID.",type:"integer"},reRunID:{description:"If this is a re-run, the ID of the original operation.",type:"string"},runStartTime:{description:"The datetime the run started.",type:"string",format:"date-time"},runEndTime:{description:"The datetime the run ended.",type:"string",format:"date-time"},runType:{$ref:"#/components/schemas/RunType"},runStatus:{$ref:"#/components/schemas/RunStatus"},environmentID:{description:"The environment in which the run operation was applied.",type:"string"},runFailureReason:{description:"Information about the cause of a run failure.",type:"string"}},required:["id","runType","runStatus"]},UserEnvironmentRolesResponse:{type:"array",items:{$ref:"#/components/schemas/UserEnvironmentRoles"},additionalProperties:!1},UserProjectRolesResponse:{type:"array",items:{$ref:"#/components/schemas/UserProjectRoles"},additionalProperties:!1},UserRolesResponse:{type:"array",items:{$ref:"#/components/schemas/UserOrgRoles"},additionalProperties:!1},FivetranProjectsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of project information.",type:"array",items:{$ref:"#/components/schemas/FivetranProject"}}}},FivetranProjectResponse:{type:"object",required:["data"],properties:{data:{description:"Fivetran project data.",$ref:"#/components/schemas/FivetranProject"}}},FivetranJobsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of job information.",type:"array",items:{$ref:"#/components/schemas/FivetranJob"}}}},FivetranJobHistoryResponse:{type:"object",required:["data"],properties:{data:{description:"Fivetran job history data.",$ref:"#/components/schemas/FivetranJobHistory"}}},FivetranRefreshJobResponse:{type:"object",required:["data"],properties:{data:{description:"A fivetran job",$ref:"#/components/schemas/FivetranJobHistory"}}},MetricsItem:{type:"object",required:["name","tags","count"],properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}},count:{type:"integer"}}},MetricsRequest:{type:"object",required:["metrics"],properties:{metrics:{type:"array",items:{$ref:"#/components/schemas/MetricsItem"}}}},BaseEnvironment:{type:"object",description:"Environments are used for deploying your data pipelines to production, test, QA, and other environments.",additionalProperties:!0,properties:{connectionAccount:{type:"string",description:"The account name for the environment connection."},defaultStorageMapping:{type:"string",nullable:!0},description:{type:"string",description:"The Environment description."},name:{type:"string",description:"The Environment name."},oauthEnabled:{type:"boolean",description:"If OAuth is enabled."},runTimeParameters:{type:"object",additionalProperties:!0,description:"The default Environment parameters. Parameters changed during deploy will not show here."},tagColors:{$ref:"#/components/schemas/TagColor"},project:{type:"string"}},required:["name","oauthEnabled","project"]},Environment:{description:"Environments are used for deploying your data pipelines to production, test, QA, and other environments.",allOf:[{$ref:"#/components/schemas/BaseWorkspaceEnv"},{type:"object",additionalProperties:!0,properties:{runTimeParameters:{type:"object",additionalProperties:!0,description:"The default Environment parameters. Parameters changed during deploy will not show here."},currentMappings:{$ref:"#/components/schemas/EnvironmentStorageLocationMappings"}},required:["createdAt","id","status"]}]},EnvironmentCreateRequest:{"x-coa-private":!0,type:"object",description:"Initial values to set on a newly created environment.",allOf:[{$ref:"#/components/schemas/BaseEnvironment"},{type:"object",properties:{mappings:{$ref:"#/components/schemas/EnvironmentStorageLocationMappings"}},additionalProperties:!0}]},EnvironmentHealth:{type:"string",enum:["Deleting","Deploying","Failed Deploy","Failed Dev Run","Failed Refresh","Initializing","Refreshing","Running Dev Run","Waiting"]},EnvironmentStorageLocationMappings:{type:"object",description:"The Storage Mapping name.",additionalProperties:{type:"object",properties:{database:{type:"string",description:"The database name."},schema:{type:"string",description:"The database schema."}}}},BaseProject:{type:"object",description:"A project groups environments and workspaces for easier management and access control.",additionalProperties:!0,properties:{platformKind:{$ref:"#/components/schemas/PlatformKind"},description:{type:"string"},gitRepoURL:{type:"string"},name:{type:"string"}},required:["name"]},Project:{description:"A project groups environments and workspaces for easier management and access control.",allOf:[{$ref:"#/components/schemas/BaseProject"},{type:"object",additionalProperties:!0,properties:{createdAt:{type:"string",format:"date-time"},createdBy:{$ref:"#/components/schemas/UserSummary"},updatedAt:{type:"string",format:"date-time"},updatedBy:{$ref:"#/components/schemas/UserSummary"},id:{type:"string"},status:{$ref:"#/components/schemas/ProjectStatus"},workspaces:{type:"array",items:{$ref:"#/components/schemas/WorkspaceSummary"}}},required:["createdAt","updatedAt","id","status","name"]}]},ProjectCreateRequest:{$ref:"#/components/schemas/BaseProject"},ProjectStatus:{type:"string",enum:["active","deleted"]},UserSummary:{type:"object",description:"Summary information about a user.",additionalProperties:!1,properties:{id:{type:"string",description:"The user ID."},firstName:{type:"string",description:"User first name."},lastName:{type:"string",description:"User last name."},email:{type:"string"},accountType:{type:"string",enum:["SSO","normal"]}},required:["id"]},FirestoreWebTimestamp:{type:"object",description:"Timestamp from the web Firestore SDK.",additionalProperties:!1,properties:{seconds:{type:"number"},nanoseconds:{type:"number"}},required:["seconds","nanoseconds"]},FirestoreAdminTimestamp:{type:"object",description:"Timestamp from the admin Firestore SDK.",additionalProperties:!1,properties:{_seconds:{type:"number"},_nanoseconds:{type:"number"}},required:["_seconds","_nanoseconds"]},FirestoreTimestamp:{type:"object",description:"Timestamp from either the web admin Firestore SDKs.",oneOf:[{$ref:"#/components/schemas/FirestoreWebTimestamp"},{$ref:"#/components/schemas/FirestoreAdminTimestamp"}]},PlatformKind:{type:"string",enum:["snowflake","databricks","fabric"]},Error:{type:"object",additionalProperties:!1,properties:{errorString:{description:"The error message.",type:"string"},errorDetail:{description:"Additional detail about the error.",type:"string"}},required:["errorString"]},Node:{type:"object",oneOf:[{$ref:"#/components/schemas/SourceNode"},{$ref:"#/components/schemas/SQLNode"}]},NodeCreateRequest:{type:"object",properties:{nodeType:{$ref:"#/components/schemas/NodeType"},predecessorNodeIDs:{default:[],type:"array",items:{type:"string"},description:"The IDs of the nodes that are predecessors to this node. It can also be empty if it has no predecessors"}},additionalProperties:!1,required:["nodeType","predecessorNodeIDs"]},AliasToStepIDMapping:{type:"object",additionalProperties:{type:"string"}},AppliedColumnTests:{type:"object",description:"Will return `hasNull` or `isDistinct` as true or false if testing is enabled.",additionalProperties:{type:"boolean"}},BaseNode:{type:"object",additionalProperties:!0,properties:{database:{type:"string",description:"The Snowflake database name."},description:{type:"string",description:"The Node description."},id:{type:"string",description:"The Node ID."},locationName:{type:"string",description:"The Storage Mapping location."},name:{type:"string",description:"The Node name."},nodeType:{$ref:"#/components/schemas/NodeType"},schema:{type:"string",description:"The Snowflake schema name."}},required:["database","description","id","locationName","name","nodeType","schema"]},ColumnMetadata:{type:"object",additionalProperties:!1,properties:{appliedColumnTests:{$ref:"#/components/schemas/AppliedColumnTests"},columnID:{type:"string",description:"The column ID."},columnReferences:{items:{$ref:"#/components/schemas/IntermediateColumnRefResult"},type:"array"},config:{type:"object",description:"Returns any configuration options from the Node Config Tab.",additionalProperties:!0},dataType:{type:"string",description:"Column data type."},defaultValue:{type:"string",description:"The default column value."},description:{type:"string",description:"The column description."},hashDetails:{$ref:"#/components/schemas/HashMetadata"},hashedColumns:{type:"array",items:{$ref:"#/components/schemas/ColumnReference"}},isBusinessKey:{type:"boolean",description:"Tags the column as a business key."},isChangeTracking:{type:"boolean",description:"Tags the column as a change tracking column in type 2 dimensions."},isSurrogateKey:{type:"boolean",description:"Tags the column as a surrogate key, e.g. DIM_CUSTOMER_KEY."},keyColumnType:{type:"string",enum:["None","primaryBusinessKey","surrogateKey"]},name:{type:"string",description:"The column name."},nullable:{type:"boolean",description:"If the column can contain null values."},primaryKey:{description:"Tags the column as a primary key.",type:"boolean"},sources:{items:{$ref:"#/components/schemas/SourceColumnReferenceV1"},type:"array"},systemColumnType:{type:"string",enum:["None","sysCreateDate","sysCurrentFlag","sysEndDate","sysStartDate","sysUpdateDate","sysVersion"]},transform:{type:"string"},uniqueKey:{type:"boolean"}},required:["columnID","dataType","description","name","nullable"]},ColumnReference:{type:"object",additionalProperties:!1,properties:{columnID:{type:"string",description:"Column ID of the source column."},nodeID:{type:"string",description:"Node ID of the source columm."}},required:["columnID","nodeID"]},CustomSQL:{type:"object",additionalProperties:!1,properties:{customSQL:{type:"string"}},required:["customSQL"]},HashAlgorithm:{type:"string",enum:["MD5","SHA1","SHA256"]},HashMetadata:{type:"object",additionalProperties:!1,properties:{hashAlgorithm:{$ref:"#/components/schemas/HashAlgorithm"},hashType:{enum:["ChangeHash","Hash","HubHash","LinkHash","None"],type:"string"},hubHashes:{items:{$ref:"#/components/schemas/ColumnReference"},type:"array"}},required:["hashAlgorithm"]},IntermediateColumnRefResult:{additionalProperties:!1,properties:{columnName:{type:"string"},tableName:{type:"string",nullable:!0}},required:["columnName","tableName"],type:"object"},JoinCondition:{type:"object",additionalProperties:!1,properties:{joinCondition:{type:"string"}},required:["joinCondition"]},NodeType:{anyOf:[{type:"string",enum:["Dimension","Fact","Hub","Link","Satellite","Source","Stage","View","persistentStage"]},{type:"string"}]},RefLink:{type:"object",additionalProperties:!1,properties:{locationName:{type:"string"},nodeName:{type:"string"}},required:["locationName","nodeName"]},SourceColumnReference:{anyOf:[{$ref:"#/components/schemas/SourceColumnReferenceV1"},{$ref:"#/components/schemas/SourceColumnReferenceV2"}]},SourceColumnReferenceV1:{type:"object",additionalProperties:!1,properties:{columnReferences:{items:{$ref:"#/components/schemas/ColumnReference"},type:"array"},transform:{type:"string",description:"Returns the SQL of any column transformations."}},required:["columnReferences","transform"]},SourceColumnReferenceV2:{type:"object",additionalProperties:!1,properties:{transform:{type:"string",description:"Returns the SQL of any column transformations."}},required:["transform"]},SourceMap:{additionalProperties:!1,properties:{aliases:{$ref:"#/components/schemas/AliasToStepIDMapping"},customSQL:{$ref:"#/components/schemas/CustomSQL"},dependencies:{items:{$ref:"#/components/schemas/RefLink"},type:"array"},join:{$ref:"#/components/schemas/JoinCondition"},name:{type:"string"},noLinkRefs:{items:{$ref:"#/components/schemas/RefLink"},type:"array"}},required:["dependencies","join","name","noLinkRefs"],type:"object"},RunStatus:{enum:["canceled","completed","failed","initializing","rendering","running","waitingToRun"],type:"string"},RunType:{enum:["deploy","refresh"],type:"string"},DatabricksUserConnectionType:{type:"string",enum:["Token","Cloud","OAuthU2M","OAuthM2M"]},FabricUserConnectionType:{type:"string",enum:["oauth"]},SnowflakeUserConnectionType:{type:"string",enum:["Basic","Cloud","KeyPair","OAuth"]},DeployRunDetails:{type:"object",additionalProperties:!1,description:"Deployment run details.",properties:{canceled:{type:"boolean",description:"If the run was canceled."},deployCommit:{type:"string",description:"The full commit hash."},deployCommitMessage:{type:"string",description:"The commit message."},environmentID:{type:"string",description:"The Environment ID for this run."},parallelism:{type:"integer",description:"The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse."},nodesInRun:{type:"integer",description:"The number of Nodes deployed."}},required:["deployCommit","environmentID"]},RefreshRunDetails:{type:"object",additionalProperties:!1,description:"Refresh run details.",properties:{canceled:{type:"boolean",description:"If the run was canceled."},environmentID:{type:"string",description:"The Environment ID for this run."},excludeNodesSelector:{type:"string",description:"A selector string of nodes to exclude."},forceIgnoreEnvironmentStatus:{type:"boolean"},includeNodesSelector:{type:"string",description:"A selector string of nodes to include."},jobID:{type:"integer",description:"The Job ID."},parallelism:{type:"integer",description:"The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse."},refreshDescription:{type:"string",description:"The Job name."},nodesForRefresh:{type:"integer"},nodesInRun:{type:"integer",description:"The number of Nodes deployed."},executor:{type:"string"}},required:["environmentID"]},RunDetails:{description:"Detailed information about a run.",anyOf:[{$ref:"#/components/schemas/DeployRunDetails"},{$ref:"#/components/schemas/RefreshRunDetails"}]},RunInfo:{description:"The full details of a run, without the run results.",type:"object",additionalProperties:!1,properties:{id:{type:"integer"},reRunID:{type:"string",description:"If this is a re-run, the ID of the original operation."},runDetails:{$ref:"#/components/schemas/RunDetails"},runEndTime:{format:"date-time",type:"string",description:"The datetime when the run ended."},runHistory:{items:{type:"integer"},type:"array"},runStartTime:{format:"date-time",type:"string",description:"The datetime the run started."},runStatus:{$ref:"#/components/schemas/RunStatus"},runTimeParameters:{type:"object",description:"The default Environment parameters. Parameters changed during deploy will not show here.",additionalProperties:!0},runType:{$ref:"#/components/schemas/RunType"},userCredentials:{oneOf:[{$ref:"#/components/schemas/SnowflakeUserCredentials"},{$ref:"#/components/schemas/DatabricksUserCredentials"},{$ref:"#/components/schemas/FabricUserCredentials"}]},userID:{type:"string"},projectID:{type:"string"},hasTestFailures:{type:"boolean",description:"Whether the run has test failures."},version:{type:"integer"}},required:["id","runDetails","runStatus","runTimeParameters","runType","projectID"]},FabricUserCredentials:{description:"Information about the Fabric account used to perform a run.",type:"object",additionalProperties:!1,properties:{fabricConnectionString:{type:"string"},fabricAuthType:{$ref:"#/components/schemas/FabricUserConnectionType"},platformKind:{type:"string"}},required:["fabricConnectionString","fabricAuthType"]},DatabricksUserCredentials:{description:"Information about the Databricks account used to perform a run.",type:"object",additionalProperties:!1,properties:{databricksHost:{type:"string"},databricksAuthType:{$ref:"#/components/schemas/DatabricksUserConnectionType"},databricksPath:{type:"string"}},required:["databricksHost","databricksAuthType","databricksPath"]},SnowflakeUserCredentials:{description:"Information about the Snowflake account used to perform a run.",type:"object",additionalProperties:!1,properties:{snowflakeAccount:{type:"string"},snowflakeAuthType:{$ref:"#/components/schemas/SnowflakeUserConnectionType"},snowflakeRole:{type:"string"},snowflakeUsername:{type:"string"},snowflakeWarehouse:{type:"string"}},required:["snowflakeAccount","snowflakeAuthType","snowflakeUsername"]},QueryResult:{type:"object",additionalProperties:!1,properties:{endTime:{type:"string",format:"date-time"},error:{$ref:"#/components/schemas/Error"},isRunning:{type:"boolean",description:"If the queried run is still running."},name:{type:"string",description:"The name of the Stage the query ran on."},queryID:{type:"string"},rowsDeleted:{type:"integer"},rowsInserted:{type:"integer"},rowsUpdated:{type:"integer"},sql:{type:"string",description:"The SQL query run during the stage."},startTime:{type:"string",format:"date-time"},status:{type:"string",description:"The query status."},success:{type:"boolean",description:"If the query results were run successfully."},type:{type:"string",enum:["sql","sqlTest"]},warehouse:{type:"string",description:"Name of the warehouse."}},required:["isRunning","name","sql","status","success"]},RunResult:{type:"object",additionalProperties:!1,description:"The result output describing each query processed during a run.",properties:{isRunning:{type:"boolean",description:"If the queried run is still running."},name:{type:"string"},nodeID:{type:"string"},runState:{type:"string"},hasTestFailures:{type:"boolean"},origin:{$ref:"#/components/schemas/RunOrigins"},queryResults:{description:"The query result returns the status of different stages such as Delete Table or Rename Table. See the queryResults name for the stage.",items:{$ref:"#/components/schemas/QueryResult"},type:"array"},renderQueryResult:{$ref:"#/components/schemas/QueryResult"}},required:["isRunning","name","nodeID","queryResults"]},RunOrigins:{enum:["API","CLI","UI","fivetranAPI"]},OrgRoles:{type:"object",description:"Specifies role assignments.",required:["organizationRoles","projects"],properties:{organizationRoles:{description:"The organization roles assigned to the user.",type:"array",items:{type:"string"}},projects:{description:"A dictionary of project role assignments keyed by project ID.",type:"object",additionalProperties:{$ref:"#/components/schemas/ProjectRoles"}}},additionalProperties:!0},ProjectRoles:{type:"object",description:"Specifies project role assignments.",required:["projectRoles","environments"],properties:{projectRoles:{type:"array",items:{type:"string"}},environments:{description:"A dictionary of environment role assignments keyed by environment ID.",type:"object",additionalProperties:{$ref:"#/components/schemas/EnvironmentRoles"}}},additionalProperties:!0},EnvironmentRoles:{type:"object",description:"Specifies environment role assignments.",required:["environmentRoles"],properties:{environmentRoles:{description:"The environment roles assigned to the user.",type:"array",items:{type:"string"}}},additionalProperties:!0},UserOrgRoles:{description:"The roles assigned to a user.",allOf:[{$ref:"#/components/schemas/OrgRoles"},{type:"object",required:["user","organizationRoles","projects"],properties:{user:{$ref:"#/components/schemas/UserSummary"}},additionalProperties:!0}]},UserProjectRoles:{description:"The project roles assigned to the user.",allOf:[{$ref:"#/components/schemas/ProjectRoles"},{type:"object",required:["user","projectRoles","environments"],properties:{user:{$ref:"#/components/schemas/UserSummary"}},additionalProperties:!0}]},UserEnvironmentRoles:{description:"The environment roles assigned to the user.",allOf:[{$ref:"#/components/schemas/EnvironmentRoles"},{type:"object",required:["user"],properties:{user:{$ref:"#/components/schemas/UserSummary"}},additionalProperties:!0}]},FivetranProject:{type:"object",properties:{id:{type:"string"},name:{type:"string"},createdAtUtc:{type:"string",format:"date-time"},updatedAtUtc:{type:"string",format:"date-time"},extras:{type:"object",description:"Additional data, if applicable"}},required:["id","name","createdAtUtc","updatedAtUtc"]},FivetranJob:{type:"object",properties:{id:{type:"string"},projectId:{type:"string"},name:{type:"string"},createdAtUtc:{type:"string",format:"date-time"},updatedAtUtc:{type:"string",format:"date-time"},extras:{type:"object",description:"Additional data, if applicable"}}},FivetranJobHistory:{type:"object",properties:{id:{type:"string"},jobId:{type:"string"},status:{$ref:"#/components/schemas/FivetranJobStatus"},startedAtUtc:{type:"string",format:"date-time",nullable:!0},endedAtUtc:{type:"string",format:"date-time",nullable:!0},logs:{type:"array",items:{type:"string"}},extras:{type:"object",description:"Additional data, if applicable"}}},FivetranJobStatus:{type:"string",description:"Possible statuses of jobs",enum:["SCHEDULING","RUNNING","SUCCEEDED","TERMINATING","FAILED"]},FivetranJobRunCause:{type:"string",description:"Possible run cause",enum:["Triggered by Fivetran"]},JobName:{type:"string",minLength:1,maxLength:100,description:"Name of the job"},JobRequest:{"x-coa-private":!0,type:"object",additionalProperties:!1,description:"Request body for creating or updating a job",properties:{name:{$ref:"#/components/schemas/JobName"},includeSelector:{type:"string",description:"A selector string of nodes to include"},excludeSelector:{type:"string",description:"A selector string of nodes to exclude"}},required:["name","includeSelector","excludeSelector"]},Job:{type:"object",description:"A Coalesce job.",additionalProperties:!0,properties:{id:{type:"string",description:"The Job ID."},name:{type:"string",description:"The Job name."},includeSelector:{type:"string",description:"A selector string of nodes to include."},excludeSelector:{type:"string",description:"A selector string of nodes to exclude."},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"}},required:["id","name","includeSelector","excludeSelector","createdAt","updatedAt"]},RegistryPackageReleaseResult:{description:"A single release of a package in the registry.",type:"object",properties:{createdAt:{type:"string",format:"date-time"},createdBy:{type:"string"},updatedBy:{type:"string"},updatedAt:{type:"string",format:"date-time"},version:{type:"string"},changeLog:{type:"string"},releaseID:{type:"string"},storagePath:{type:"string"},privacy:{type:"string",enum:["public","private","unlisted"]}},required:["createdAt","updatedAt","version","changeLog","releaseID","storagePath","privacy"]},RegistryPackageResult:{description:"A single package in the registry.",type:"object",properties:{updatedBy:{type:"string"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},publisherID:{type:"string"},description:{type:"string"},org:{type:"string"},latestRelease:{type:"string"},overview:{type:"string"},featured:{type:"boolean"},tags:{type:"array",minItems:0,items:{type:"string"}},certified:{type:"boolean"},packageID:{type:"string"},id:{type:"string"},platformKind:{type:"string",enum:["fabric","snowflake","databricks"]}},required:["name","description","org","latestRelease","overview","tags","featured","certified","publisherID","packageID","id","platformKind"]},ColumnDescription:{type:"object",properties:{name:{type:"string",description:"The name of the column."},description:{type:"string",description:"The generated description of the column."}},required:["name","description"]},ColumnDescriptions:{type:"object",description:"A dictionary of column descriptions keyed by column ID.",additionalProperties:{$ref:"#/components/schemas/ColumnDescription"}},ColumnDescriptionsRequest:{type:"object",properties:{workspaceID:{type:"number",description:"The development workspace ID."},nodeID:{type:"string",description:"The node ID.",minLength:1}},required:["workspaceID","nodeID"]},NodeDescription:{type:"object",description:"An object containing node description",properties:{description:{type:"string",description:"AI generated description of the node.",minLength:1}},required:["description"]},NodeDescriptionRequest:{type:"object",properties:{workspaceID:{type:"number",description:"The workspace ID."},nodeID:{type:"string",description:"The node ID.",minLength:1}},required:["workspaceID","nodeID"]},CreatePlanRequest:{type:"object",required:["parameters","runDetails","userCredentials"],properties:{parameters:{type:"object"},runDetails:{type:"object",required:["currentWorkspaceDataFilePath","desiredWorkspaceDataFilePath","disablePresync","environmentID","planID"],properties:{currentWorkspaceDataFilePath:{type:"string"},desiredWorkspaceDataFilePath:{type:"string"},disablePresync:{type:"boolean"},enablePlanRendering:{type:"boolean"},environmentID:{type:"string"},planID:{type:"string"},skippedBeforeCollection:{type:"boolean",default:!1}}},userCredentials:{type:"object"}}},PlanRequestAcceptedResponse:{type:"object",required:["message","planID"],properties:{message:{type:"string"},planID:{type:"string"}}},PlanResponse:{type:"object",required:["planStorageFilePath"],properties:{planStorageFilePath:{type:"string"}}},InFlightPlanResponse:{type:"object",required:["status"],properties:{status:{type:"string",enum:["planning"]}}},GitCommitMessageRequest:{type:"object",properties:{files:{type:"array",items:{type:"object",properties:{path:{type:"string",description:"File path relative to repository root"},before:{type:"string",description:"File content before changes"},after:{type:"string",description:"File content after changes"}},required:["path","before","after"]},description:"Array of files being committed with their before/after content",minItems:1}},required:["files"]},GitCommitMessageResponse:{type:"object",properties:{message:{type:"string",description:"AI generated git commit message (Soft max 200 chars, Hard max 400 chars)",maxLength:400}},required:["message"]},WriteInfo:{type:"object",required:["entityType","writeType","data"],properties:{entityType:{anyOf:[{type:"string",enum:["node","workspace","run","subgraph","job","macro","nodeType","installedPackage"]}]},writeType:{anyOf:[{type:"string",enum:["save","delete","merge"]}]},data:{type:"object",required:["id","version"],properties:{id:{anyOf:[{type:"string"},{type:"number"}]},version:{anyOf:[{type:"string"},{type:"number"}]}}}}},ChatRequest:{type:"object",required:["messages","threadId","userMessageKey","assistantMessageKey","subgraphContext"],properties:{messages:{type:"array",description:"An array of message objects representing the conversation history.",items:{type:"object",required:["role","content"],properties:{role:{type:"string",enum:["user","assistant"],description:"The role of the message sender."},content:{type:"string",description:"The text content of the message."}}}},systemPrompt:{type:"string",description:"Optional system prompt"},responseSchema:{type:"object",description:"Optional schema for structuring the response format"},threadId:{type:"string",description:"Identifier for the conversation thread"},userMessageKey:{type:"string",description:"Identifier for the latest user message in this request"},assistantMessageKey:{type:"string",description:"Identifier for the expected assistant message response"},subgraphContext:{type:"object",description:"The subgraph context data used for AI operations"}}},ChatResponse:{type:"object",required:["text"],properties:{text:{type:"string",description:"AI-generated response text"},usage:{type:"object",properties:{inputUsage:{type:"number"},outputUsage:{type:"number"},unit:{type:"string",enum:["token","char"]}}}}},SubgraphName:{type:"string",minLength:1,maxLength:100,description:"Name of the subgraph"},SubgraphRequest:{"x-coa-private":!0,type:"object",additionalProperties:!1,description:"Request body for creating or updating a subgraph",properties:{name:{$ref:"#/components/schemas/SubgraphName"},steps:{type:"array",description:"Array of node IDs in the subgraph",items:{type:"string",maxLength:64}}},required:["name","steps"]},Subgraph:{"x-coa-private":!0,type:"object",additionalProperties:!1,description:"A partial collection of nodes from the node graph, allowing easier viewing and editing of a portion of a large graph.",properties:{id:{type:"string",description:"Unique identifier for the subgraph"},name:{$ref:"#/components/schemas/SubgraphName"},steps:{type:"array",description:"Array of node IDs in the subgraph",items:{type:"string",maxLength:64}},version:{type:"integer",enum:[1],default:1,description:"Version of the subgraph schema"},folderCounter:{type:"string",description:"ID for the subgraph - technically deprecated, but required for now"},createdAt:{type:"string",format:"date-time",description:"Date and time the subgraph was created"},updatedAt:{type:"string",format:"date-time",description:"Date and time the subgraph was last updated"},createdBy:{type:"string",description:"ID of the user who created the subgraph"},updatedBy:{type:"string",description:"ID of the user who last updated the subgraph"}},required:["id","name","steps","version","folderCounter"]},DatabricksWarehouse:{type:"object",description:"A minimal Databricks SQL warehouse configuration returned from GetDatabricksWarehouse.",properties:{id:{type:"string",description:"The unique identifier of the warehouse"},name:{type:"string",description:"The name of the warehouse"},odbc_params:{type:"object",description:"The connection parameters for the warehouse",properties:{path:{type:"string",description:"The path for the SQL warehouse"}},required:["path"]}},required:["id","name","odbc_params"]},DatabricksWarehouseResponse:{type:"object",description:"Response containing a list of Databricks SQL warehouses.",properties:{warehouses:{type:"array",items:{$ref:"#/components/schemas/DatabricksWarehouse"}}},required:["warehouses"]},BaseWorkspaceEnv:{type:"object",description:"A workspace is a collection of resources that are used to develop, test, and deploy code.",additionalProperties:!0,properties:{connectionAccount:{type:"string",description:"The Snowflake account name."},defaultStorageMapping:{type:"string",nullable:!0},description:{type:"string",description:"The Workspace description."},name:{type:"string",description:"The Workspace name."},oauthEnabled:{type:"boolean",description:"If Snowflake OAuth is enabled."},tagColors:{$ref:"#/components/schemas/TagColor"},project:{type:"string",description:"The Project ID."},createdAt:{type:"string",format:"date-time"},createdBy:{$ref:"#/components/schemas/UserSummary"},updatedAt:{type:"string",format:"date-time"},currentGitBranch:{type:"string",description:"The branch most recently run on this environment."},currentGitCommit:{type:"string"},currentGitURL:{type:"string"},currentlyRunningJobs:{description:"An array of any running Jobs. If there are not Jobs running, this will return empty.",type:"array",items:{type:"integer"}},id:{type:"string"},deployedCommit:{type:"string",description:"The most recently deployed commit ID."},status:{$ref:"#/components/schemas/WorkspaceEnvHealth"},platformKind:{$ref:"#/components/schemas/PlatformKind"}},required:["createdAt","updatedAt","id","name","oauthEnabled","project","status"]},Workspace:{allOf:[{$ref:"#/components/schemas/BaseWorkspaceEnv"},{type:"object",additionalProperties:!0,properties:{mappingsV1:{type:"string"},runTimeParameters:{type:"string"},jobs:{type:"array",items:{$ref:"#/components/schemas/Job"}}}}]},WorkspaceSummary:{type:"object",description:"A set of minimal workspace data.",additionalProperties:!0,properties:{id:{type:"string"},name:{type:"string"},project:{type:"string",description:"The Project ID."},status:{$ref:"#/components/schemas/WorkspaceEnvHealth"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},jobs:{type:"array",items:{$ref:"#/components/schemas/Job"}}},required:["createdAt","createdBy","updatedAt","id","name","status","project"]},WorkspaceEnvHealth:{type:"string",enum:["Deleting","Deploying","Failed Deploy","Failed Refresh","Initializing","Refreshing","Waiting"]},TagColor:{type:"object",description:"The tag color from the Environment settings.",additionalProperties:!1,properties:{backgroundColor:{type:"string"},textColor:{type:"string"}}},SourceColumnMetadata:{type:"object",additionalProperties:!1,properties:{columns:{items:{$ref:"#/components/schemas/ColumnMetadata"},type:"array"},join:{description:"The join condition of the source node.",type:"object",additionalProperties:!1,properties:{joinCondition:{type:"string",description:"Returns SQL from the Join tab."}},required:["joinCondition"]},sourceMapping:{type:"array",items:{$ref:"#/components/schemas/SourceMap"}}},required:["columns"]},SourceNode:{type:"object",description:"A source node returned by the API.",allOf:[{$ref:"#/components/schemas/BaseNode"},{type:"object",properties:{metadata:{$ref:"#/components/schemas/SourceColumnMetadata"},table:{description:"The table name of the source node.",type:"string"}},required:["metadata","table"]}]},MaterializationType:{anyOf:[{type:"string",enum:["table","view"]},{type:"string"}]},NodeTest:{type:"object",additionalProperties:!1,properties:{continueOnFailure:{type:"boolean"},description:{type:"string"},name:{type:"string"},runOrder:{$ref:"#/components/schemas/TestRunOrder"},templateString:{type:"string"}},required:["continueOnFailure","description","name","runOrder","templateString"]},SQLNode:{type:"object",description:"A SQL node returned by the API.",allOf:[{$ref:"#/components/schemas/BaseNode"},{type:"object",properties:{config:{$ref:"#/components/schemas/UserConfig"},isMultisource:{type:"boolean"},materializationType:{$ref:"#/components/schemas/MaterializationType"},metadata:{$ref:"#/components/schemas/SQLNodeMetadata"},overrideSQL:{type:"boolean"}},required:["config","isMultisource","materializationType","metadata","overrideSQL"]}]},SQLNodeMetadata:{type:"object",additionalProperties:!1,properties:{appliedNodeTests:{default:[],items:{$ref:"#/components/schemas/NodeTest"},type:"array"},columns:{default:[],items:{$ref:"#/components/schemas/ColumnMetadata"},type:"array"},cteString:{type:"string"},description:{type:"string"},destinationName:{type:"string"},enabledColumnTestIDs:{type:"array",items:{type:"string"}},mapping:{type:"object",additionalProperties:{anyOf:[{type:"object"},{type:"string"},{type:"number"},{type:"boolean"}]}},materializationOption:{type:"string"},sourceMapping:{type:"array",items:{$ref:"#/components/schemas/SourceMap"}}},required:["appliedNodeTests","columns","enabledColumnTestIDs","sourceMapping"]},TestRunOrder:{type:"string",enum:["After","Before"]},UserConfig:{type:"object",additionalProperties:{anyOf:[{type:"object"},{type:"string"},{type:"number"},{type:"boolean"}]}}},responses:{CoaTagResponse:{description:"The coa image tag being used.","x-coa-private":!0,content:{"application/json":{schema:{type:"string"}}}},CoaTagReportResponse:{description:"A report of what coa image tags are being used for what orgs.","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["defaultTag","deviatingOrgs"],properties:{defaultTag:{type:"string"},deviatingOrgs:{type:"array",items:{type:"object",required:["orgID","orgName","tag","image"],properties:{orgID:{type:"string"},orgName:{type:"string"},tag:{type:"string"},image:{type:"string"}}}}}}}}},CustomTokenResponse:{description:"The Coalesce custom token response","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["customToken"],properties:{customToken:{description:"A Coalesce token",type:"string"}}}}}},EnvironmentResponse:{description:"Information about an environment.",content:{"application/json":{schema:{$ref:"#/components/schemas/Environment"}}}},EnvironmentsResponse:{description:"A collection of environment information.",content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentsResponse"}}}},JobSummaryResponse:{description:"Information about a job.",content:{"application/json":{schema:{$ref:"#/components/schemas/Job"}}}},ProjectsResponse:{description:"A collection of project information.",content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectsResponse"}}}},FeatureFlagsClientConfigResponse:{description:"Information used by the client to connect to feature flags service.","x-coa-private":!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FeatureFlagsClientConfig"}}}},FeatureFlagsResponse:{description:"Feature flags.","x-coa-private":!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FeatureFlagsValues"}}}},FivetranProjectsResponse:{description:"A collection of project information.",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranProjectsResponse"}}}},FivetranJobsResponse:{description:"A collection of Fivetran job information.",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranJobsResponse"}}}},FivetranJobHistoryResponse:{description:"Fivetran job history data.",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranJobHistoryResponse"}}}},FivetranRefreshJobResponse:{description:"The Fivetran start job refresh response.",content:{"application/json":{schema:{type:"object",required:["data"],properties:{data:{description:"Fivetran job history for the new run.",$ref:"#/components/schemas/FivetranJobHistory"}}}}}},NodeResponse:{description:"A node for an environment.",content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},NodesResponse:{description:"A collection of nodes for an environment.",content:{"application/json":{schema:{$ref:"#/components/schemas/NodesResponse"}}}},PackageResponse:{description:"A package registration","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["releaseID","packageID","storePath","publisherID"],properties:{releaseID:{type:"string",minLength:1},publisherID:{type:"string"},packageID:{type:"string",minLength:1},storePath:{type:"string"}}}}}},PackageResponseV2:{description:"A package","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["org","packageID","name","description","overview","tags","featured","certified","platformKind"],properties:{org:{type:"string"},name:{type:"string"},description:{type:"string"},overview:{type:"string"},tags:{type:"array",minItems:0,items:{type:"string"}},featured:{type:"boolean"},certified:{type:"boolean"},packageID:{type:"string"},id:{type:"string"},publisherID:{type:"string"},latestRelease:{type:"string"},platformKind:{type:"string",enum:["snowflake","fabric","databricks"]}}}}}},PackageUpdateResponse:{description:"Successful package update","x-coa-private":!0,content:{"application/json":{schema:{type:"string"}}}},AllRegistryPackagesResult:{description:"A list of all packages in the registry.",content:{"application/json":{schema:{type:"array",minItems:0,items:{$ref:"#/components/schemas/RegistryPackageResult"}}}}},AllRegistryPackageReleasesResult:{description:"A list of all releases for a single package in the registry.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/RegistryPackageReleaseResult"}}}}},RegistryPackageResult:{description:"A single package in the registry.",content:{"application/json":{schema:{$ref:"#/components/schemas/RegistryPackageResult"}}}},RegistryPackageReleaseResult:{description:"A single release for a single package in the registry.",content:{"application/json":{schema:{$ref:"#/components/schemas/RegistryPackageReleaseResult"}}}},ProjectResponse:{description:"Information about a project.",content:{"application/json":{schema:{$ref:"#/components/schemas/Project"}}}},RunResultsResponse:{description:"A collection of results for a deploy or refresh run.",content:{"application/json":{schema:{$ref:"#/components/schemas/RunResultsResponse"}}}},RunResponse:{description:"A single run.",content:{"application/json":{schema:{$ref:"#/components/schemas/RunInfo"}}}},RunsResponse:{description:"A collection of runs.",content:{"application/json":{schema:{$ref:"#/components/schemas/RunsResponse"}}}},DatabaseInfoResponse:{description:"Information required to connect to the Coalesce database.",content:{"application/json":{schema:{$ref:"#/components/schemas/DatabaseInfo"}}}},secretExists:{"x-coa-private":!0,description:"Specifies whether or not a value for the secret exists.",content:{"application/json":{schema:{type:"boolean"}}}},ValidHostname:{"x-coa-private":!0,description:"A whitelisted version of the passed hostname.",content:{"application/json":{schema:{type:"string"}}}},TypesenseConfigurationResponse:{"x-coa-private":!0,description:"The typesense configuration data for a given org.",content:{"application/json":{schema:{$ref:"#/components/schemas/TypesenseConfigResponse"}}}},UserEnvironmentRoleResponse:{description:"A user's environment role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentRoles"}}}},UserEnvironmentRolesResponse:{description:"A collection of user environment role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/UserEnvironmentRolesResponse"}}}},UserProjectRoleResponse:{description:"A user's project role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectRoles"}}}},UserProjectRolesResponse:{description:"A collection of user project role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/UserProjectRolesResponse"}}}},UserRoleResponse:{description:"A user's role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/OrgRoles"}}}},UserRolesResponse:{description:"A collection of user role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/UserRolesResponse"}}}},ColumnDescriptionsResponse:{description:"The AI generated column description.",content:{"application/json":{schema:{$ref:"#/components/schemas/ColumnDescriptions"}}}},NodeDescriptionResponse:{description:"The AI generated node description.",content:{"application/json":{schema:{$ref:"#/components/schemas/NodeDescription"}}}},PlanRequestAcceptedResponse:{description:"The request has been accepted for processing, but processing has not been completed.",content:{"application/json":{schema:{$ref:"#/components/schemas/PlanRequestAcceptedResponse"}}}},PlanResponse:{description:"A collection of plan information.",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/PlanResponse"},{$ref:"#/components/schemas/InFlightPlanResponse"}]}}}},AlreadyExistsError:{description:"The requested resource already exists.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},BadGatewayError:{description:"The server received an error from an upstream system.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},ForbiddenError:{description:"The client is not permitted to perform the requested operation.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},GatewayTimeoutError:{description:"The server did not receive a response in time from an upstream system.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},InternalServerError:{description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},InvalidRequestError:{description:"The request was invalid.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},NotFoundError:{description:"The requested resource could not be found.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},ServiceUnavailableError:{description:"The service is currently unavailable.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},Unauthorized:{description:"User lacks authorization to perform this action.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},GitCommitMessageResponse:{description:"AI generated git commit message",content:{"application/json":{schema:{$ref:"#/components/schemas/GitCommitMessageResponse"}}}}},parameters:{orderByDirection:{name:"orderByDirection",description:"The sort order for query results.",in:"query",schema:{description:"The sort order for query results.",type:"string",enum:["asc","desc"],default:"desc"},required:!1},secretType:{"x-coa-private":!0,description:"The name of the secret type.",name:"secretType",in:"path",schema:{type:"string"},required:!0},context:{description:"Contextual information required to identify a particular secret.",name:"context",in:"path",schema:{type:"string"},required:!0},newSecretType:{"x-coa-private":!0,description:"The name of the secret type to upgrade to.",name:"newSecretType",in:"path",schema:{type:"string"},required:!0},orgId:{"x-coa-private":!0,description:"The Organization ID of the organization that will be affected by the API call.",name:"orgId",in:"path",schema:{type:"string"},required:!0},runId:{"x-coa-private":!0,description:"The Run ID of the run that will be affected by the API call.",name:"runId",in:"path",schema:{type:"integer"},required:!0},coaTag:{"x-coa-private":!0,description:"A coa container image tag in Google Container Registry.",name:"coaTag",in:"path",schema:{type:"string"},required:!0}},securitySchemes:{BearerAuth:{type:"http",scheme:"bearer"}}},paths:{"/api/v1/customToken":{summary:"Custom Token","x-coa-private":!0,post:{summary:"Generate Custom Token",description:"Generate a Coalesce token from the provided OpenID Connect ID token",operationId:"GenerateCustomToken","x-eov-operation-handler":"SSOHandlers",requestBody:{description:"The information from the OpenID Connect authorization server required to sign into Coalesce.",required:!0,content:{"application/json":{schema:{oneOf:[{type:"object",description:"Token information for OpenID connect authorization completed on the client.",required:["type","idToken","accessToken","orgID"],properties:{type:{type:"string",enum:["token"]},idToken:{type:"string"},accessToken:{type:"string"},orgID:{type:"string"}},additionalProperties:!1},{type:"object",description:"Information for completing the authorization code grant on the backend.",required:["type","code","redirectURI","codeVerifier","orgID"],properties:{type:{type:"string",enum:["code"]},code:{type:"string"},redirectURI:{type:"string"},codeVerifier:{type:"string"},orgID:{type:"string"},extraTokenParams:{type:"object"}},additionalProperties:!1}]}}}},security:[],tags:["Authorization"],responses:{"200":{$ref:"#/components/responses/CustomTokenResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments":{summary:"Environments","x-coa-command-group":"environments",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Environments",description:"Get a collection of Environment information.",operationId:"GetEnvironments","x-eov-operation-handler":"EnvironmentHandlers","x-coa-command":"list",parameters:[{name:"detail",description:"Include the full detail of the environments.",in:"query",schema:{type:"boolean",default:!1},required:!1},{name:"limit",description:"The maximum number of environments to return.",in:"query",schema:{type:"integer",minimum:1,maximum:500,default:100},required:!1},{name:"startingFrom",description:"The cursor point for paging the query results.",in:"query",allowReserved:!0,schema:{type:"string"},required:!1},{name:"orderBy",description:"The field to order the results by.",in:"query",schema:{type:"string",enum:["id"],default:"id"},required:!1}],security:[{BearerAuth:[]}],tags:["Environments"],responses:{"200":{$ref:"#/components/responses/EnvironmentsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{summary:"Create Environment",description:"Create a new environment.",operationId:"CreateEnvironment","x-eov-operation-handler":"EnvironmentHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Environments"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentCreateRequest"}}}},responses:{"201":{$ref:"#/components/responses/EnvironmentResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}":{summary:"Environment","x-coa-command-group":"environments",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],delete:{summary:"Delete Environment",description:"Delete an environment.",operationId:"DeleteEnvironment","x-eov-operation-handler":"EnvironmentHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Environments"],responses:{"204":{description:"The environment was successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},get:{summary:"Get Environment",description:"Get information about an environment.",operationId:"GetEnvironment","x-eov-operation-handler":"EnvironmentHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Environments"],responses:{"200":{$ref:"#/components/responses/EnvironmentResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}/nodes":{summary:"Nodes","x-coa-command-group":"nodes",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Nodes",description:"Get a collection of nodes for an environment",operationId:"GetNodes","x-eov-operation-handler":"NodeHandlers","x-coa-command":"list",parameters:[{name:"detail",description:"Include the full detail of the nodes.",in:"query",schema:{type:"boolean",default:!1},required:!1},{name:"limit",description:"The maximum number of nodes to return.",in:"query",schema:{type:"integer",minimum:1,maximum:500,default:100},required:!1},{name:"startingFrom",description:"The cursor point for paging the query results.",in:"query",allowReserved:!0,schema:{type:"string"},required:!1},{name:"orderBy",description:"The field to order the results by.",in:"query",schema:{type:"string",enum:["id"],default:"id"},required:!1}],security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodesResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}/nodes/{nodeID}":{summary:"Node","x-coa-command-group":"nodes",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"nodeID",description:"The node ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"Get Node",description:"Get information about a node in an environment.",operationId:"GetNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/jobs":{summary:"Jobs","x-coa-command-group":"jobs",parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0}],post:{summary:"Create Job",description:"Create a new job in a workspace.",operationId:"CreateJob","x-eov-operation-handler":"JobHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Jobs"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/JobRequest"}}}},responses:{"201":{$ref:"#/components/responses/JobSummaryResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/jobs/{jobID}":{summary:"Job","x-coa-private":!0,parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0},{name:"jobID",description:"The job ID.",in:"path",schema:{type:"string"},required:!0}],put:{summary:"Update Job",description:"Update all fields of an existing job in a workspace.",operationId:"UpdateJob","x-eov-operation-handler":"JobHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Jobs"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/JobRequest"}}}},responses:{"204":{description:"Job updated successfully"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{summary:"Delete Job",description:"Delete a job from a workspace.",operationId:"DeleteJob","x-eov-operation-handler":"JobHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Jobs"],responses:{"204":{description:"Job successfully deleted"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}/jobs/{jobID}":{summary:"Job","x-coa-command-group":"jobs",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"jobID",description:"The job ID.",in:"path",schema:{type:"string"},required:!0}],get:{summary:"Get Job",description:"Get information about a job in an environment.",operationId:"GetJob","x-eov-operation-handler":"JobHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Jobs"],responses:{"200":{$ref:"#/components/responses/JobSummaryResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/featureFlags/config":{summary:"Feature Flags Configuration","x-coa-private":!0,get:{summary:"Get Feature Flags Configuration",description:"Gets information the client needs to connect to the feature flags service.",operationId:"GetFeatureFlagsClientConfig","x-eov-operation-handler":"FeatureFlagsHandlers",tags:["FeatureFlags"],security:[],responses:{"200":{$ref:"#/components/responses/FeatureFlagsClientConfigResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/featureFlags/default":{summary:"Default Feature Flags","x-coa-private":!0,get:{summary:"Get Default Feature Flags",description:"Gets default feature flags for the unauthenticated users.",operationId:"GetDefaultFeatureFlags","x-eov-operation-handler":"FeatureFlagsHandlers",tags:["FeatureFlags"],security:[],responses:{"200":{$ref:"#/components/responses/FeatureFlagsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/featureFlags":{summary:"Feature Flags","x-coa-private":!0,get:{summary:"Get Feature Flags",description:"Gets feature flags for the authenticated user.",operationId:"GetFeatureFlags","x-eov-operation-handler":"FeatureFlagsHandlers",parameters:[{name:"subdomain",description:"The customer subdomain.",in:"query",required:!1,schema:{type:"string"}}],tags:["FeatureFlags"],security:[{BearerAuth:[]},{}],responses:{"200":{$ref:"#/components/responses/FeatureFlagsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/nodes":{summary:"Nodes","x-coa-command-group":"workspace-nodes",parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Workspace Nodes",description:"Get a collection of nodes for a workspace.",operationId:"GetWorkspaceNodes","x-eov-operation-handler":"NodeHandlers","x-coa-command":"list",parameters:[{name:"detail",description:"Include the full detail of the nodes.",in:"query",schema:{type:"boolean",default:!1},required:!1},{name:"limit",description:"The maximum number of nodes to return.",in:"query",schema:{type:"integer",minimum:1,maximum:500,default:100},required:!1},{name:"startingFrom",description:"The cursor point for paging the query results.",in:"query",allowReserved:!0,schema:{type:"string"},required:!1},{name:"orderBy",description:"The field to order the results by.",in:"query",schema:{type:"string",enum:["id"],default:"id"},required:!1}],security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodesResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{summary:"Create Node",description:"Create a new node in a workspace.",operationId:"CreateNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"create",parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],security:[{BearerAuth:[]}],tags:["Nodes"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NodeCreateRequest"}}}},responses:{"201":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/nodes/{nodeID}":{summary:"Node","x-coa-command-group":"workspace-nodes",parameters:[{name:"workspaceID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"nodeID",description:"The node ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"Get Node",description:"Get information about a node in a workspace.",operationId:"GetWorkspaceNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{summary:"Set Node",description:"Replace all fields of a node in a workspace.",operationId:"SetWorkspaceNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"put",security:[{BearerAuth:[]}],tags:["Nodes"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},responses:{"200":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/projects":{summary:"Projects","x-coa-private":!1,"x-coa-command-group":"projects",get:{summary:"Get Projects",description:"Get projects in org.",operationId:"GetProjectsInOrg","x-eov-operation-handler":"ProjectHandlers","x-coa-command":"list",parameters:[{name:"includeWorkspaces",description:"Whether or not to include nested workspace data for all projects.",in:"query",schema:{type:"boolean"},required:!1},{name:"includeJobs",description:"Whether or not to include nested job data for all workspaces in the projects.",in:"query",schema:{type:"boolean"},required:!1}],security:[{BearerAuth:[]}],tags:["Projects"],responses:{"200":{$ref:"#/components/responses/ProjectsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{summary:"Create Project",description:"Create a new project.",operationId:"CreateProject","x-eov-operation-handler":"ProjectHandlers","x-coa-command":"create",security:[{BearerAuth:[]}],tags:["Projects"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectCreateRequest"}}}},responses:{"201":{$ref:"#/components/responses/ProjectResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/projects/{projectID}":{summary:"Projects","x-coa-private":!1,"x-coa-command-group":"projects",parameters:[{name:"projectID",description:"The project ID.",in:"path",schema:{type:"string"},required:!0},{name:"includeWorkspaces",description:"Whether or not to include nested workspace data for all projects.",in:"query",schema:{type:"boolean"},required:!1},{name:"includeJobs",description:"Whether or not to include nested job data for all workspaces in the projects.",in:"query",schema:{type:"boolean"},required:!1}],get:{summary:"Get Project",description:"Get a project.",operationId:"GetProjectInOrg","x-eov-operation-handler":"ProjectHandlers","x-coa-private":!1,"x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Projects"],responses:{"200":{description:"Successful response",content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{summary:"Delete Project",description:"Delete a project.",operationId:"DeleteProject","x-eov-operation-handler":"ProjectHandlers","x-coa-command":"delete","x-coa-private":!1,security:[{BearerAuth:[]}],tags:["Projects"],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",nullable:!0}}}},responses:{"204":{description:"The project was successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/projects":{summary:"Fivetran Projects","x-coa-private":!0,get:{summary:"Get Fivetran Projects",description:"Get fivetran projects in org.",operationId:"GetFivetranProjects","x-eov-operation-handler":"FivetranHandlers",security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"200":{$ref:"#/components/responses/FivetranProjectsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/projects/{projectId}":{"x-coa-private":!0,get:{summary:"Gets a single Fivetran project.",operationId:"GetFivetranProject","x-eov-operation-handler":"FivetranHandlers",tags:["FivetranIntegration"],parameters:[{name:"projectId",in:"path",description:"The unique identifier for the project",required:!0,schema:{type:"string"}}],responses:{"200":{description:"Successful response",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranProjectResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/projects/{projectId}/jobs":{summary:"Fivetran Jobs","x-coa-private":!0,get:{summary:"Get Fivetran jobs",description:"Get Fivetran jobs.",operationId:"GetFivetranJobs","x-eov-operation-handler":"FivetranHandlers",parameters:[{name:"projectId",in:"path",description:"The unique identifier for the project",required:!0,schema:{type:"string"}}],security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"200":{$ref:"#/components/responses/FivetranJobsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/jobs/{jobId}/history/{historyId}":{summary:"Fivetran Job History","x-coa-private":!0,get:{parameters:[{name:"jobId",description:"The Fivetran job ID.",in:"path",schema:{type:"string"},required:!0},{name:"historyId",description:"The Fivetran history ID.",in:"path",schema:{type:"string"},required:!0}],summary:"Get Fivetran Job History",description:"Get Fivetran job history in org.",operationId:"GetFivetranJobHistory","x-eov-operation-handler":"FivetranHandlers",security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"200":{$ref:"#/components/responses/FivetranJobHistoryResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/jobs/{jobId}/run":{summary:"Start a refresh job via Fivetran","x-coa-private":!0,post:{parameters:[{name:"jobId",description:"The Fivetran job ID.",in:"path",schema:{type:"string"},required:!0}],requestBody:{description:"Request body for start Fivetran run.",required:!0,content:{"application/json":{schema:{type:"object",required:["cause"],properties:{cause:{$ref:"#/components/schemas/FivetranJobRunCause"}}}}}},summary:"Start a refresh job via Fivetran",operationId:"PostFivetranJobRefresh","x-eov-operation-handler":"FivetranHandlers",security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"201":{$ref:"#/components/responses/FivetranRefreshJobResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles":{summary:"User Roles","x-coa-private":!0,get:{summary:"List User Roles",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.",operationId:"GetUserRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],parameters:[{name:"excludeOrgRoles",description:"Exclude organization level roles from the results.",in:"query",schema:{type:"boolean"}},{name:"projectID",description:"Return only user roles pertaining to the specified project.",in:"query",schema:{type:"string"},required:!1},{name:"environmentID",description:"Return only user roles pertaining to the specified environment.",in:"query",schema:{type:"string"},required:!1}],responses:{"200":{$ref:"#/components/responses/UserRolesResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles/{userID}/organizationRoles":{summary:"Organization User Roles","x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0}],put:{summary:"Create/Update User Organization Roles",description:"Creates or updates all of a user's organization roles. Only org admins may use this API.",operationId:"UpsertUserOrganizationRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],requestBody:{description:"The user's organization roles.",required:!0,content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}},responses:{"200":{$ref:"#/components/responses/UserRoleResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles/{userID}/projects/{projectID}/environments/{environmentID}":{summary:"Environment User Roles","x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0},{name:"projectID",description:"The project ID.",in:"path",schema:{type:"string"},required:!0},{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0}],delete:{summary:"Delete Environment User Roles",description:"Deletes all of a user's environment roles.",operationId:"DeleteUserEnvironmentRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],responses:{"204":{description:"The user's environment roles were successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{summary:"Create/Update Environment User Roles",description:"Creates or updates all of a user's environment roles.",operationId:"UpsertUserEnvironmentRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],requestBody:{description:"The user environment roles.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentRoles"}}}},responses:{"200":{$ref:"#/components/responses/UserEnvironmentRoleResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles/{userID}/projects/{projectID}":{summary:"Project User Roles","x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0},{name:"projectID",description:"The project ID.",in:"path",schema:{type:"string"},required:!0}],delete:{summary:"Delete Project User Roles",description:"Deletes all of a user's project roles. Only org and project admins may user this API.",operationId:"DeleteUserProjectRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],responses:{"204":{description:"The user's project roles were successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{summary:"Create/Update Project User Roles",description:"Creates or updates all of a user's project roles. Only org and project admins may user this API.",operationId:"UpsertUserProjectRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],requestBody:{description:"The user project roles.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectRoles"}}}},responses:{"200":{$ref:"#/components/responses/UserProjectRoleResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/all":{summary:"All Packages","x-coa-private":!0,get:{description:"Get all available packages on the registry.",operationId:"GetAllRegistryPackages","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],responses:{"200":{$ref:"#/components/responses/AllRegistryPackagesResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/{packageID}/releases/privacy/{privacy}":{summary:"All Package Releases","x-coa-private":!0,get:{description:"Get all available releases for a package on the registry.",operationId:"GetAllRegistryPackageReleases","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0},{name:"privacy",description:"The privacy level of the packages requested",in:"path",schema:{type:"string",enum:["public","private","unlisted","all"],minLength:1},required:!0}],responses:{"200":{$ref:"#/components/responses/AllRegistryPackageReleasesResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/{packageID}":{summary:"Package","x-coa-private":!0,get:{description:"Get a package on the registry.",operationId:"GetRegistryPackage","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0}],responses:{"200":{$ref:"#/components/responses/RegistryPackageResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{description:"Update an existing package's information.",operationId:"updatePackageV2","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],parameters:[{name:"packageID",description:"The id of the package.",in:"path",schema:{type:"string",minLength:1},required:!0}],requestBody:{description:"Updated package details. Does not include package content held in a release.",required:!0,content:{"application/json":{schema:{type:"object",required:["description","overview","tags","featured","certified"],properties:{description:{type:"string"},overview:{type:"string",maxLength:200},tags:{type:"array",items:{type:"string"}},featured:{type:"boolean"},certified:{type:"boolean"}}}}}},responses:{"200":{$ref:"#/components/responses/PackageResponseV2"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/{packageID}/releases/{releaseID}":{summary:"Package Release","x-coa-private":!0,put:{description:"Update a package release.",operationId:"updatePackageReleaseV2","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0},{name:"releaseID",description:"The package release ID.",in:"path",schema:{type:"string",minLength:1},required:!0}],requestBody:{description:"The package release info to update with.",required:!0,content:{"application/json":{schema:{type:"object",required:["changeLog","privacy"],properties:{changeLog:{type:"string",minLength:1},privacy:{type:"string",minLength:1,enum:["public","private","unlisted"]}}}}}},responses:{"200":{$ref:"#/components/responses/RegistryPackageReleaseResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},get:{description:"Get a release from a package in the registry.",operationId:"GetRegistryPackageRelease","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0},{name:"releaseID",description:"The package release ID.",in:"path",schema:{type:"string",minLength:1},required:!0}],responses:{"200":{$ref:"#/components/responses/RegistryPackageReleaseResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/org":{summary:"Organization Packages","x-coa-private":!0,get:{description:"Get a release from a package in the registry.",operationId:"GetRegistryPackagesForOrg","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],responses:{"200":{$ref:"#/components/responses/AllRegistryPackagesResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/createPackage":{summary:"Packages","x-coa-private":!0,post:{description:"Create a package.",operationId:"CreatePackage","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"The package info to create with.",required:!0,content:{"application/json":{schema:{type:"object",required:["release","name","description","entities","privacy","packageVariables"],properties:{release:{$ref:"#/components/schemas/PackageCreateReleaseInfo"},name:{type:"string"},description:{type:"string"},overview:{type:"string",maxLength:200},privacy:{type:"string",enum:["public","private","unlisted"]},entities:{$ref:"#/components/schemas/PackageCreateEntities"},packageVariables:{type:"string"}}}}}},responses:{"201":{$ref:"#/components/responses/PackageResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/createPackageV2":{summary:"Packages","x-coa-private":!0,post:{description:"Create a package without a release.",operationId:"createPackageV2","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"Info describing and defining the package. Does not include package content held in a release",required:!0,content:{"application/json":{schema:{type:"object",required:["name","description","overview","tags","featured","certified","platformKind"],properties:{name:{type:"string"},description:{type:"string"},overview:{type:"string",maxLength:200},tags:{type:"array",items:{type:"string"}},featured:{type:"boolean"},certified:{type:"boolean"},platformKind:{type:"string",enum:["snowflake","fabric","databricks"]}}}}}},responses:{"201":{$ref:"#/components/responses/PackageResponseV2"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/createRelease":{"x-coa-private":!0,post:{description:"Add a new package release to an existing package.",operationId:"AddPackageRelease","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"The package release info.",required:!0,content:{"application/json":{schema:{type:"object",required:["release","entities","privacy","packageVariables","packageID"],properties:{release:{$ref:"#/components/schemas/PackageCreateReleaseInfo"},privacy:{type:"string",enum:["public","private","unlisted"]},entities:{$ref:"#/components/schemas/PackageCreateEntities"},packageVariables:{type:"string"},packageID:{type:"string",minLength:1}}}}}},responses:{"201":{$ref:"#/components/responses/RegistryPackageReleaseResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/update":{"x-coa-private":!0,put:{description:"Update a package.",operationId:"UpdatePackage","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"The package info to create with.",required:!0,content:{"application/json":{schema:{type:"object",required:["packageID","releaseID"],properties:{packageID:{type:"string",minLength:1},releaseID:{type:"string",minLength:1},changeLog:{type:"string"},description:{type:"string"},privacy:{type:"string",enum:["public","private","unlisted"]}}}}}},responses:{"200":{$ref:"#/components/responses/PackageUpdateResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/typesense/orgs/{orgID}/typesense-config":{summary:"Typesense Config","x-coa-private":!0,parameters:[{name:"orgID",description:"The organization ID.",in:"path",schema:{type:"string"},required:!0}],post:{description:"Returns Typesense configuration data for a given org.",operationId:"getTypesenseConfigForOrg","x-eov-operation-handler":"TypesenseHandlers",security:[{BearerAuth:[]}],tags:["CoalesceAPI"],responses:{"200":{$ref:"#/components/responses/TypesenseConfigurationResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/runs":{summary:"Runs","x-coa-command-group":"runs",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Runs",description:"Get a collection of information about runs.",operationId:"GetRuns","x-eov-operation-handler":"RunHandlers","x-coa-command":"list",security:[{BearerAuth:[]}],tags:["Runs"],parameters:[{name:"limit",description:"The maximum number of runs to return.",in:"query",schema:{type:"integer",minimum:0,maximum:1e3,default:25},required:!1},{name:"startingFrom",description:"The starting run ID, runStartTime, or runEndTime (exclusive) for paging the query results.",in:"query",allowReserved:!0,schema:{oneOf:[{type:"integer",minimum:0},{type:"string",format:"date-time"}]},required:!1},{name:"orderBy",description:"The field used to order results.",in:"query",schema:{$ref:"#/components/schemas/RunsOrderBy"},required:!1},{$ref:"#/components/parameters/orderByDirection"},{name:"runType",description:"A run type to filter the query results.",in:"query",schema:{$ref:"#/components/schemas/RunType"},required:!1},{name:"runStatus",description:"A status value to filter the query results.",in:"query",schema:{$ref:"#/components/schemas/RunStatus"},required:!1},{name:"environmentID",description:"An environment ID to filter the query results.",in:"query",schema:{type:"string"},required:!1},{name:"detail",description:"Include the full detail of the run.",in:"query",schema:{type:"boolean",default:!1},required:!1}],responses:{"200":{$ref:"#/components/responses/RunsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/runs/{runID}":{summary:"Run","x-coa-command-group":"runs",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"Get Run",description:"Gets a single run.",operationId:"GetRun","x-eov-operation-handler":"RunHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Runs"],parameters:[{name:"runID",description:"The run ID.",in:"path",schema:{type:"integer"},required:!0}],responses:{"200":{$ref:"#/components/responses/RunResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/runs/{runID}/results":{summary:"Run Results","x-coa-command-group":"runs",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Run Results",description:"Get a collection of the results of a deploy or refresh run",operationId:"GetRunResults","x-eov-operation-handler":"RunHandlers","x-coa-command":"list-results",security:[{BearerAuth:[]}],tags:["Runs"],parameters:[{name:"runID",description:"The run ID.",in:"path",schema:{type:"integer"},required:!0}],responses:{"200":{$ref:"#/components/responses/RunResultsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/database":{"x-coa-private":!0,get:{summary:"Get database connectivity information.",description:"Gets the information required to connect to the Coalesce database.",operationId:"GetDatabase","x-eov-operation-handler":"DatabaseHandlers",security:[],responses:{"200":{$ref:"#/components/responses/DatabaseInfoResponse"}}}},"/api/v1/secrets/{secretType}/{context}":{"x-coa-private":!0,get:{description:"Determines whether or not a git token value exists for a given project ID.",operationId:"SecretExists","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"200":{$ref:"#/components/responses/secretExists"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{description:"Upgrades a secret from secretType its upgrade target.",operationId:"UpgradeSecret","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"204":{description:"Successfully upgraded a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{description:"Sets the value of a secret.",operationId:"SetSecret","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],requestBody:{description:"The new value of the secret.",required:!0,content:{"application/json":{schema:{type:"object",required:["secretValue"],properties:{secretValue:{}}}}}},responses:{"204":{description:"Successfully set the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{description:"Deletes a secret.",operationId:"DeleteSecret","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"204":{description:"Successfully deleted the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/kill-job/{orgId}/{runId}":{"x-coa-private":!0,post:{description:"Deletes the Kubernetes job.",operationId:"KillJob","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"},{$ref:"#/components/parameters/runId"}],responses:{"204":{description:"Successfully killed the job."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/coa-tag":{"x-coa-private":!0,get:{description:"Gets a report of all organizations that are using a non-standard coa image tag.",operationId:"GetCoaTagReport","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],responses:{"200":{$ref:"#/components/responses/CoaTagReportResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/coa-tag/{orgId}":{"x-coa-private":!0,get:{description:"Gets the container image tag that should be used when running cloud coa jobs for a particular org.",operationId:"GetCoaTag","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"}],responses:{"200":{$ref:"#/components/responses/CoaTagResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{description:"Resets the container image tag that should be used when running cloud coa jobs for a particular org to the default.",operationId:"ResetCoaTag","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"}],responses:{"204":{description:"Successfully reset coa tag."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/coa-tag/{orgId}/{coaTag}":{"x-coa-private":!0,post:{description:"Sets the container image tag that should be used when running cloud coa jobs for a particular org.",operationId:"SetCoaTag","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"},{$ref:"#/components/parameters/coaTag"}],responses:{"204":{description:"Successfully set coa tag."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/scheduler/secret/{secretType}/{context}":{"x-coa-private":!0,get:{description:"Determines whether or not a git token value exists for a given project ID.",operationId:"SecretExistsV0","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!0,parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"200":{$ref:"#/components/responses/secretExists"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{description:"Sets the value of a secret.",operationId:"SetSecretV0","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!0,parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],requestBody:{description:"The new value of the secret.",required:!0,content:{"application/json":{schema:{type:"object",required:["secretValue"],properties:{secretValue:{}}}}}},responses:{"204":{description:"Successfully set the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{description:"Deletes a secret.",operationId:"DeleteSecretV0","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!0,parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"204":{description:"Successfully deleted the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/bulkWrite":{"x-coa-private":!0,post:{description:"Updates multiple documents for a workspace.",operationId:"BulkWrite","x-eov-operation-handler":"BulkWriteHandlers",security:[{BearerAuth:[]}],tags:["BulkOperations"],deprecated:!1,requestBody:{description:"The workspace to update and the data to update with.",required:!0,content:{"application/json":{schema:{type:"object",required:["workspaceID","writeInfo","requestID"],properties:{workspaceID:{type:"number"},requesetID:{type:"string"},writeInfo:{type:"array",items:{$ref:"#/components/schemas/WriteInfo"}}}}}}},responses:{"204":{description:"Successfully wrote the documents to the workspace."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/validHostname":{"x-coa-private":!0,post:{description:"Validates the passed hostname and returns an authorized version.",operationId:"ValidateHostname","x-eov-operation-handler":"ValidateHostnameHandlers",tags:["default"],deprecated:!1,security:[],requestBody:{description:"The hostname that needs to be validated.",required:!0,content:{"application/json":{schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string"}}}}}},responses:{"200":{$ref:"#/components/responses/ValidHostname"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/metrics":{"x-coa-private":!0,post:{description:"Submit a set of metrics",operationId:"SubmitMetrics","x-eov-operation-handler":"MetricsHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!1,requestBody:{description:"The metrics to submit",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/MetricsRequest"}}}},responses:{"204":{description:"Submitted metrics"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/multiFactorAuth/{userID}":{"x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0}],delete:{description:"Deletes the MFA for a user in firebase auth",operationId:"RemoveMultiFactor","x-eov-operation-handler":"MultiFactorAuthHandlers",deprecated:!1,tags:["default"],security:[{BearerAuth:[]}],responses:{"204":{description:"User's MFA successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/plan":{"x-coa-private":!0,post:{description:"Create a deployment plan",summary:"Create Plan",operationId:"createPlan","x-eov-operation-handler":"PlanHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!1,requestBody:{description:"Requirements for plan creation",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreatePlanRequest"}}}},responses:{"202":{$ref:"#/components/responses/PlanRequestAcceptedResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/plan/{environmentID}/{planID}":{"x-coa-private":!0,get:{description:"Get an existing deployment plan",summary:"Get Plan",operationId:"getPlan","x-eov-operation-handler":"PlanHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!1,parameters:[{name:"environmentID",description:"The environment ID",in:"path",schema:{type:"string"},required:!0},{name:"planID",description:"The plan ID",in:"path",schema:{type:"string"},required:!0}],responses:{"200":{$ref:"#/components/responses/PlanResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/llm/column-descriptions":{"x-coa-private":!0,post:{summary:"Get AI Descriptions for Columns",description:"Retrieve the generated AI descriptions for all the columns of a given node.",operationId:"GetAIColumnDescription","x-eov-operation-handler":"ColumnDescriptionsHandler",requestBody:{description:"workspaceID, nodeID of the node for which to generate the AI description.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ColumnDescriptionsRequest"}}}},responses:{"200":{$ref:"#/components/responses/ColumnDescriptionsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/llm/git-commit-message":{"x-coa-private":!0,post:{summary:"Generate AI Git Commit Message",description:"Generate an AI commit message based on git diffs",operationId:"GetAIGitCommitMessage","x-eov-operation-handler":"GitCommitMessageHandler",requestBody:{description:"Git diff context for commit message generation",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/GitCommitMessageRequest"}}}},responses:{"200":{$ref:"#/components/responses/GitCommitMessageResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/llm/node-description":{"x-coa-private":!0,post:{summary:"Get AI Descriptions for a node",description:"Retrieve the generated AI descriptions for a node.",operationId:"GetAINodeDescription","x-eov-operation-handler":"NodeDescriptionHandler",requestBody:{description:"workspaceID, nodeID of the node for which to generate the AI description.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NodeDescriptionRequest"}}}},responses:{"200":{$ref:"#/components/responses/NodeDescriptionResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/llm/chat":{"x-coa-private":!0,post:{summary:"Get AI Chat Message",description:"Get the generated AI chat message.",operationId:"GetChatMessage","x-eov-operation-handler":"ChatMessageHandler",requestBody:{description:"The prompt to generate the AI chat message.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ChatRequest"}}}},responses:{"200":{description:"Successful chat response",content:{"application/json":{schema:{$ref:"#/components/schemas/ChatResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/workspaces/{workspaceID}/subgraphs":{summary:"Subgraphs","x-coa-private":!0,post:{summary:"Create Subgraph",description:"Create a new subgraph for organizing and managing a collection of nodes.",operationId:"CreateSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SubgraphRequest"}}}},responses:{"201":{description:"The subgraph was successfully created.",content:{"application/json":{schema:{type:"object",required:["data"],properties:{data:{$ref:"#/components/schemas/Subgraph"}}}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/subgraphs/{subgraphID}":{summary:"Subgraphs","x-coa-private":!0,put:{summary:"Update Subgraph",description:"Update a subgraph.",operationId:"UpdateSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"subgraphID",required:!0,description:"ID of the subgraph being fetched",in:"path",schema:{type:"string"}},{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SubgraphRequest"}}}},responses:{"204":{description:"The subgraph was successfully updated."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{summary:"Delete Subgraph",description:"Delete a subgraph.",operationId:"DeleteSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"subgraphID",required:!0,description:"ID of the subgraph being fetched",in:"path",schema:{type:"string"}},{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],responses:{"204":{description:"Subgraph deleted successfully."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},get:{summary:"Get Subgraph",description:"Get a subgraph.",operationId:"GetSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"subgraphID",required:!0,description:"ID of the subgraph being fetched",in:"path",schema:{type:"string"}},{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],responses:{"200":{description:"The subgraph was successfully retrieved.",content:{"application/json":{schema:{type:"object",required:["data"],properties:{data:{$ref:"#/components/schemas/Subgraph"}}}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/databricks/warehouse":{"x-coa-private":!0,get:{summary:"Get list of Databricks SQL warehouses",description:"Retrieves a list of all SQL warehouses that a user has manager permissions on.",operationId:"GetDatabricksWarehouse","x-eov-operation-handler":"DatabricksHandlers",security:[{BearerAuth:[]}],tags:["Databricks"],parameters:[{name:"workspaceID",in:"path",required:!0,schema:{type:"string"},description:"The ID of the workspace"}],responses:{"200":{description:"Successfully retrieved warehouses from databricks.",content:{"application/json":{schema:{$ref:"#/components/schemas/DatabricksWarehouseResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}}}};var Vjs=require("fs/promises"),Yjs=Et(qjs()),Kjs=Et(require("os")),Jjs=Et(require("path"));ki();Ar();Er();var nH0={domain:{default:"https://app.coalescesoftware.io",description:"Coalesce domain name to use for API requests",value:""},environmentID:{description:"Environment ID",value:""},exclude:{description:"Coalesce Node Selector",value:""},include:{description:"Coalesce Node Selector",value:""},jobID:{description:"Coalesce JobID",value:""},parallelism:{description:"Parallelism level to use",value:""},parameters:{description:"Parameters",value:""},platformKind:{default:"Snowflake",description:"Platform Kind (Snowflake, Databricks)",value:""},profile:{description:"Profile To Use",value:""},token:{description:"Coalesce Refresh Token",value:""}},iH0={databricksAuthType:{description:"Databricks Auth Type (OAuthM2M, Token)",value:""},databricksClientID:{description:"Databricks Client ID",value:""},databricksClientSecret:{description:"Databricks Client Secret",value:""},databricksPath:{description:"Databricks Path",value:""},databricksToken:{description:"Databricks Token",value:""}},zjs=r=>"platformKind"in r&&r.platformKind?.value.toLowerCase()==="databricks"&&"databricksAuthType"in r&&!("snowflakeAuthType"in r),oH0={snowflakeAuthType:{description:"Snowflake Auth Type (Basic, KeyPair)",value:""},snowflakeKeyPairKey:{description:"Snowflake Key Pair Path",value:""},snowflakeKeyPairPass:{description:"Snowflake Key Pair Pass",value:""},snowflakePassword:{description:"Snowflake Password",value:""},snowflakeRole:{description:"Snowflake Role",value:""},snowflakeUsername:{description:"Snowflake Username",value:""},snowflakeWarehouse:{description:"Snowflake Warehouse",value:""},snowflakeKeyPairPath:{deprecationMessage:"This option has been replaced by snowflakeKeyPairKey.",description:"Snowflake Key Pair Path (deprecated, please use --snowflakeKeyPairKey)",value:""}},Ujs=r=>(!("platformKind"in r)||r.platformKind?.value.toLowerCase()==="snowflake")&&"snowflakeAuthType"in r&&!("databricksAuthType"in r),uC={...nH0,...iH0,...oH0};var jjs=r=>{let t="[authFromProfile]";if(zjs(r)){if(r.databricksAuthType?.value==="OAuthM2M")return Mlo.assert({clientID:r.databricksClientID?.value,clientSecret:r.databricksClientSecret?.value,databricksAuthType:r.databricksAuthType?.value,path:r.databricksPath?.value,platformKind:"databricks"});if(r.databricksAuthType.value==="Token")return Blo.assert({databricksAuthType:r.databricksAuthType?.value,path:r.databricksPath?.value,platformKind:"databricks",token:r.databricksToken?.value});throw new At(`${t} CLI config must have a valid credential type. Expected "OAuthM2M" or "Token", got ${JSON.stringify(r.databricksAuthType?.value)}`)}else if(Ujs(r)){if(r.snowflakeAuthType?.value==="Basic")return Ikr.assert({platformKind:"snowflake",snowflakeUsername:r.snowflakeUsername?.value,snowflakePassword:r.snowflakePassword?.value,snowflakeWarehouse:r.snowflakeWarehouse?.value,snowflakeRole:r.snowflakeRole?.value});if(r.snowflakeAuthType?.value==="KeyPair")return Skr.assert({platformKind:"snowflake",snowflakeUsername:r.snowflakeUsername?.value,snowflakeKeyPairKey:r.snowflakeKeyPairKey?.value||r.snowflakeKeyPairPath?.value,snowflakeKeyPairPass:r.snowflakeKeyPairPass?.value||"",snowflakeWarehouse:r.snowflakeWarehouse?.value,snowflakeRole:r.snowflakeRole?.value});throw new At(`${t} CLI config must have a valid credential type. Expected "Basic" or "KeyPair", got ${JSON.stringify(r.snowflakeAuthType?.value)}`)}else throw new At(`${t} Could not determine valid auth type from CLI config. Please check the required fields for your desired platform. Provided fields: ${JSON.stringify(Object.keys(r).sort())}`)};Ar();ao();var sH0=new Set(["snowflakePassword","token",...nbe,...x3t,...ibe]),pTn=r=>ys(r,t=>{for(let n of sH0)n in t&&(t[n].value="<REDACTED>")}),Gjs=r=>ys(r,t=>{for(let[n,i]of Object.entries(r))t[n]=pTn(i)});var{CLI_INTERNAL:aH0}=nt,Wjs=(r,t)=>{let n=r.default,i={};n&&(i=n);let o=t.profile?.value||n?.profile?.value||"";if(aH0.info("using profile",o,"cliProfiles",JSON.stringify(Gjs(r))),o){if(!(o in r))throw new Error(`Unable to find profile ${o}`);let s=r[o];i={...i,...s}}return i={...i,...t},i};Ar();var{CLI:PXt}=nt,Hjs=r=>Object.fromEntries(Object.entries(r).flatMap(([t,n])=>{if(!n||typeof n!="object")return PXt.error(`Unexpected top-level option '${t}' in config file.`),[];let i=Object.entries(n).flatMap(([o,s])=>uC[o]?!s||typeof s!="string"?(PXt.error(`Expected profile ${t} field ${o} to be a string, but it is of type ${typeof n}.`),[]):(uC[o]?.deprecationMessage&&PXt.error(`CLI profile ${t} is using deprecated option ${o}.`,uC[o]?.deprecationMessage),[[o,{...uC[o],value:s}]]):(PXt.error("Ignoring unknown field",o,`in CLI profile ${t}.`),[]));return[[t,Object.fromEntries(i)]]}));var{CLI:lH0,CLI_INTERNAL:kXt}=nt,Xjs=async(r,t)=>{let n="[getCLIConfig]",i;try{let f=await(0,Vjs.readFile)(t??cH0(),"utf-8"),A=Yjs.default.parse(f);i=Hjs(A)}catch(f){if(lH0.error(n,`Unable to read profile data from filepath ${t}; error:`,f),!t)i={};else throw new Error(`Unable to read cli profile: ${t}`)}let o=Wjs(i,r);kXt.info("got final cli profile configFileLocation:",t,JSON.stringify(pTn(o)));let s;try{s=H4i(o,["token","environmentID"])}catch(f){throw typeof f=="object"&&f instanceof zqe&&kXt.error(`cliProfile was missing ${f.missingProperties}`),f}let a=s.domain?.value||process.env.SCHEDULER_ADDRESS||uC.domain.default,l={domain:new URL(a),runDetails:{environmentID:s.environmentID.value,origin:"CLI"},runtimeParameters:s.parameters?.value||"",token:s.token.value,userCredentials:jjs(s)};if(!l.domain)throw new Error("Unable to determine Coalesce domain.");let u=s.jobID?.value;u&&(l.runDetails.jobID=u);let c=s.include?.value;c&&(l.runDetails.includeNodesSelector=c);let d=s.exclude?.value;d&&(l.runDetails.excludeNodesSelector=d);let p=s.parallelism?.value;if(p){let f=parseInt(p);if(isNaN(f)){let A=`Parameter 'parallelism' was set to '${s.parallelism}', which could not be interpreted as a number`;throw kXt.error(A),new Error(A)}else l.runDetails.parallelism=f}return ub(l),l},cH0=()=>{let r=Kjs.default.homedir(),t=Jjs.default.join(r,".coa/config");return kXt.info("using default location",t),t};fW();var HAe=Et(dC()),wBn=Et(require("util"));Er();vE();var TBn=Et(sXs()),Ztr=async(r,t=!1)=>{let n=[{name:"userResponse",type:"confirm",message:r,default:t}],{userResponse:i}=await TBn.default.prompt(n);return i},aXs=async(r,t)=>{let n=[{name:"userResponse",type:"input",message:r,default:t}],{userResponse:i}=await TBn.default.prompt(n);return i};ki();Gl();gz();Ar();Gl();Kf();Ar();var lXs=require("fs/promises");ki();Ar();var efd=nt.CLI,cXs=async(r,t,n,i)=>{let o=await JSs(i.org(t).run(n)),s=TRt.validate(o);s.valid||efd.emerg(`Got an unexpected error deserializing run output ${s.failureMessage}`);let a=W4i(o);return await(0,lXs.writeFile)(r,a+`
|
|
7210
|
+
To be sure the content is the same, you should try uploading the file again.`,r.MD5_RESUMED_UPLOAD="MD5 cannot be used with a continued resumable upload as MD5 cannot be extended from an existing value",r.MISSING_RESUME_CRC32C_FINAL_UPLOAD="The CRC32C is missing for the final portion of a resumed upload, which is required for validation. Please provide `resumeCRC32C` if validation is required, or disable `validation`."})(E3||(E3={}));var bL=class r extends SS{constructor(t,n,i={}){var o,s;let a={},l;i.generation!==null&&(typeof i.generation=="string"?l=Number(i.generation):l=i.generation,isNaN(l)||(a.generation=l)),Object.assign(a,i.preconditionOpts);let u=i.userProject||t.userProject;typeof u=="string"&&(a.userProject=u);let c={delete:{reqOpts:{qs:a}},exists:{reqOpts:{qs:a}},get:{reqOpts:{qs:a}},getMetadata:{reqOpts:{qs:a}},setMetadata:{reqOpts:{qs:a}}};if(super({parent:t,baseUrl:"/o",id:encodeURIComponent(n),methods:c}),Hbn.add(this),this.bucket=t,this.storage=t.parent,i.generation!==null){let d;typeof i.generation=="string"?d=Number(i.generation):d=i.generation,isNaN(d)||(this.generation=d)}this.kmsKeyName=i.kmsKeyName,this.userProject=u,this.name=n,i.encryptionKey&&this.setEncryptionKey(i.encryptionKey),this.acl=new Pne({request:this.request.bind(this),pathPrefix:"/acl"}),this.crc32cGenerator=i.crc32cGenerator||this.bucket.crc32cGenerator,this.instanceRetryValue=(s=(o=this.storage)===null||o===void 0?void 0:o.retryOptions)===null||s===void 0?void 0:s.autoRetry,this.instancePreconditionOpts=i?.preconditionOpts}get cloudStorageURI(){let t=this.bucket.cloudStorageURI;return t.pathname=this.name,t}shouldRetryBasedOnPreconditionAndIdempotencyStrat(t){var n;return!(t?.ifGenerationMatch===void 0&&((n=this.instancePreconditionOpts)===null||n===void 0?void 0:n.ifGenerationMatch)===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)}copy(t,n,i){var o,s;let a=new Error(E3.DESTINATION_NO_NAME);if(!t)throw a;let l={};typeof n=="function"?i=n:n&&(l={...n}),i=i||Su.noop;let u,c,d;if(typeof t=="string"){let A=$O0.exec(t);A!==null&&A.length===3?(u=this.storage.bucket(A[1]),c=A[2]):(u=this.bucket,c=t)}else if(t instanceof CL)u=t,c=this.name;else if(t instanceof r)u=t.bucket,c=t.name,d=t;else throw a;let p={};this.generation!==void 0&&(p.sourceGeneration=this.generation),l.token!==void 0&&(p.rewriteToken=l.token),l.userProject!==void 0&&(p.userProject=l.userProject,delete l.userProject),l.predefinedAcl!==void 0&&(p.destinationPredefinedAcl=l.predefinedAcl,delete l.predefinedAcl),d=d||u.file(c);let f={};if(this.encryptionKey!==void 0&&(f["x-goog-copy-source-encryption-algorithm"]="AES256",f["x-goog-copy-source-encryption-key"]=this.encryptionKeyBase64,f["x-goog-copy-source-encryption-key-sha256"]=this.encryptionKeyHash),d.encryptionKey!==void 0?this.setEncryptionKey(d.encryptionKey):l.destinationKmsKeyName!==void 0?(p.destinationKmsKeyName=l.destinationKmsKeyName,delete l.destinationKmsKeyName):d.kmsKeyName!==void 0&&(p.destinationKmsKeyName=d.kmsKeyName),p.destinationKmsKeyName){this.kmsKeyName=p.destinationKmsKeyName;let A=this.interceptors.indexOf(this.encryptionKeyInterceptor);A>-1&&this.interceptors.splice(A,1)}this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(l?.preconditionOpts)||(this.storage.retryOptions.autoRetry=!1),((o=l.preconditionOpts)===null||o===void 0?void 0:o.ifGenerationMatch)!==void 0&&(p.ifGenerationMatch=(s=l.preconditionOpts)===null||s===void 0?void 0:s.ifGenerationMatch,delete l.preconditionOpts),this.request({method:"POST",uri:`/rewriteTo/b/${u.name}/o/${encodeURIComponent(d.name)}`,qs:p,json:l,headers:f},(A,h)=>{if(this.storage.retryOptions.autoRetry=this.instanceRetryValue,A){i(A,null,h);return}if(h.rewriteToken){let y={token:h.rewriteToken};p.userProject&&(y.userProject=p.userProject),p.destinationKmsKeyName&&(y.destinationKmsKeyName=p.destinationKmsKeyName),this.copy(d,y,i);return}i(null,d,h)})}createReadStream(t={}){t=Object.assign({decompress:!0},t);let n=typeof t.start=="number"||typeof t.end=="number",i=t.end<0,o,s,a=new urt,l=!0,u=!1;if(typeof t.validation=="string"){let A=t.validation.toLowerCase().trim();l=A==="crc32c",u=A==="md5"}else t.validation===!1&&(l=!1);let c=!n&&(l||u);if(n){if(typeof t.validation=="string"||t.validation===!0)throw new Error(E3.INVALID_VALIDATION_FILE_RANGE);l=!1,u=!1}let d=A=>{A&&(s?.agent&&s.agent.destroy(),a.destroy(A))},p=(A,h,y)=>{if(A){this.getBufferFromReadable(y).then(P=>{A.message=P.toString("utf8"),a.destroy(A)});return}s=y.request;let C=y.toJSON().headers,v=C["content-encoding"]==="gzip",O={},w=C["x-goog-stored-content-encoding"]==="gzip"&&v||C["x-goog-stored-content-encoding"]==="identity",R=[];if(c&&(typeof C["x-goog-hash"]=="string"&&C["x-goog-hash"].split(",").forEach(P=>{let z=P.indexOf("="),H=P.substring(0,z),J=P.substring(z+1);O[H]=J}),o=new grt({crc32c:l,md5:u,crc32cGenerator:this.crc32cGenerator,crc32cExpected:O.crc32c,md5Expected:O.md5})),u&&!O.md5){let P=new wfe(E3.MD5_NOT_AVAILABLE);P.code="MD5_NOT_AVAILABLE",a.destroy(P);return}w&&c&&o&&R.push(o),v&&t.decompress&&R.push(KHt.createGunzip()),(0,F8e.pipeline)(y,...R,a,d)},f=()=>{let A={alt:"media"};this.generation&&(A.generation=this.generation),t.userProject&&(A.userProject=t.userProject);let h={"Accept-Encoding":"gzip","Cache-Control":"no-store"};if(n){let C=typeof t.start=="number"?t.start:"0",v=typeof t.end=="number"?t.end:"";h.Range=`bytes=${i?v:`${C}-${v}`}`}let y={uri:"",headers:h,qs:A};t[ky]&&(y[ky]=t[ky]),this.requestStream(y).on("error",C=>{a.destroy(C)}).on("response",C=>{a.emit("response",C),Su.handleResp(null,C,null,p)}).resume()};return a.on("reading",f),a}createResumableUpload(t,n){var i,o;let s=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let a=this.storage.retryOptions;(((i=s?.preconditionOpts)===null||i===void 0?void 0:i.ifGenerationMatch)===void 0&&((o=this.instancePreconditionOpts)===null||o===void 0?void 0:o.ifGenerationMatch)===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(a.autoRetry=!1),_Ms({authClient:this.storage.authClient,apiEndpoint:this.storage.apiEndpoint,bucket:this.bucket.name,customRequestOptions:this.getRequestInterceptors().reduce((l,u)=>u(l),{}),file:this.name,generation:this.generation,key:this.encryptionKey,kmsKeyName:this.kmsKeyName,metadata:s.metadata,offset:s.offset,origin:s.origin,predefinedAcl:s.predefinedAcl,private:s.private,public:s.public,userProject:s.userProject||this.userProject,retryOptions:a,params:s?.preconditionOpts||this.instancePreconditionOpts,universeDomain:this.bucket.storage.universeDomain,[ky]:s[ky]},n),this.storage.retryOptions.autoRetry=this.instanceRetryValue}createWriteStream(t={}){var n;if((n=t.metadata)!==null&&n!==void 0||(t.metadata={}),t.contentType&&(t.metadata.contentType=t.contentType),!t.metadata.contentType||t.metadata.contentType==="auto"){let A=LMs.default.getType(this.name);A&&(t.metadata.contentType=A)}let i=t.gzip;i==="auto"&&(i=(0,kMs.default)(t.metadata.contentType||"")),i&&(t.metadata.contentEncoding="gzip");let o=!0,s=!1;if(typeof t.validation=="string"?(t.validation=t.validation.toLowerCase(),o=t.validation==="crc32c",s=t.validation==="md5"):t.validation===!1&&(o=!1,s=!1),t.offset){if(s)throw new RangeError(E3.MD5_RESUMED_UPLOAD);if(o&&!t.isPartialUpload&&!t.resumeCRC32C)throw new RangeError(E3.MISSING_RESUME_CRC32C_FINAL_UPLOAD)}let a=A=>{l.destroy(A||void 0)},l=new F8e.Writable({final(A){a=A,c.end()},write(A,h,y){c.write(A,h,y)}}),u=[];i&&u.push(KHt.createGzip());let c=new urt,d=null;if(o||s){let A=t.resumeCRC32C?Qne.from(t.resumeCRC32C):void 0;d=new grt({crc32c:o,crc32cInstance:A,md5:s,crc32cGenerator:this.crc32cGenerator,updateHashesOnly:!0}),u.push(d)}let p=(0,FMs.default)(),f=!1;return c.on("reading",()=>l.emit("reading")),c.on("writing",()=>l.emit("writing")),p.on("uri",A=>l.emit("uri",A)),p.on("progress",A=>l.emit("progress",A)),p.on("response",A=>l.emit("response",A)),p.once("metadata",()=>{f=!0}),l.once("writing",()=>{t.resumable===!1?this.startSimpleUpload_(p,t):this.startResumableUpload_(p,t),(0,F8e.pipeline)(c,...u,p,async A=>{if(A)return a(A);if(!f)try{await new Promise((h,y)=>{p.once("metadata",h),p.once("error",y)})}catch(h){return a(h)}d?.crc32c&&l.emit("crc32c",d.crc32c);try{let h=t.isPartialUpload&&!this.metadata;d&&!h&&await XO0(this,Hbn,"m",NMs).call(this,d,{crc32c:o,md5:s}),a()}catch(h){a(h)}})}),l}delete(t,n){let i=typeof t=="object"?t:{};n=typeof t=="function"?t:n,this.disableAutoRetryConditionallyIdempotent_(this.methods.delete,$M.delete,i),super.delete(i).then(o=>n(null,...o)).catch(n).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}download(t,n){let i;typeof t=="function"?(n=t,i={}):i=t;let o=!1,s=(...c)=>{o||n(...c),o=!0},a=i.destination;delete i.destination;let l=this.createReadStream(i),u=!1;a?l.on("error",s).once("data",c=>{u=!0;let d=YHt.createWriteStream(a);d.write(c),l.pipe(d).on("error",s).on("finish",s)}).on("end",()=>{if(!u){let c=Buffer.alloc(0);try{YHt.writeFileSync(a,c),s(null,c)}catch(d){s(d,c)}}}):this.getBufferFromReadable(l).then(c=>s?.(null,c)).catch(s)}setEncryptionKey(t){return this.encryptionKey=t,this.encryptionKeyBase64=Buffer.from(t).toString("base64"),this.encryptionKeyHash=QMs.createHash("sha256").update(this.encryptionKeyBase64,"base64").digest("base64"),this.encryptionKeyInterceptor={request:n=>(n.headers=n.headers||{},n.headers["x-goog-encryption-algorithm"]="AES256",n.headers["x-goog-encryption-key"]=this.encryptionKeyBase64,n.headers["x-goog-encryption-key-sha256"]=this.encryptionKeyHash,n)},this.interceptors.push(this.encryptionKeyInterceptor),this}getExpirationDate(t){this.getMetadata((n,i,o)=>{if(n){t(n,null,o);return}if(!i.retentionExpirationTime){let s=new Error(E3.EXPIRATION_TIME_NA);t(s,null,o);return}t(null,new Date(i.retentionExpirationTime),o)})}generateSignedPostPolicyV2(t,n){let i=kR(t,n),o=i.options,s=i.callback,a=new Date(o.expires);if(isNaN(a.getTime()))throw new Error(EL.EXPIRATION_DATE_INVALID);if(a.valueOf()<Date.now())throw new Error(EL.EXPIRATION_DATE_PAST);o=Object.assign({},o);let l=[["eq","$key",this.name],{bucket:this.bucket.name}];if(Array.isArray(o.equals)&&(Array.isArray(o.equals[0])||(o.equals=[o.equals]),o.equals.forEach(p=>{if(!Array.isArray(p)||p.length!==2)throw new Error(E3.EQUALS_CONDITION_TWO_ELEMENTS);l.push(["eq",p[0],p[1]])})),Array.isArray(o.startsWith)&&(Array.isArray(o.startsWith[0])||(o.startsWith=[o.startsWith]),o.startsWith.forEach(p=>{if(!Array.isArray(p)||p.length!==2)throw new Error(E3.STARTS_WITH_TWO_ELEMENTS);l.push(["starts-with",p[0],p[1]])})),o.acl&&l.push({acl:o.acl}),o.successRedirect&&l.push({success_action_redirect:o.successRedirect}),o.successStatus&&l.push({success_action_status:o.successStatus}),o.contentLengthRange){let p=o.contentLengthRange.min,f=o.contentLengthRange.max;if(typeof p!="number"||typeof f!="number")throw new Error(E3.CONTENT_LENGTH_RANGE_MIN_MAX);l.push(["content-length-range",p,f])}let u={expiration:a.toISOString(),conditions:l},c=JSON.stringify(u),d=Buffer.from(c).toString("base64");this.storage.authClient.sign(d,o.signingEndpoint).then(p=>{s(null,{string:c,base64:d,signature:p})},p=>{s(new Tfe(p.message))})}generateSignedPostPolicyV4(t,n){let i=kR(t,n),o=i.options,s=i.callback,a=new Date(o.expires);if(isNaN(a.getTime()))throw new Error(EL.EXPIRATION_DATE_INVALID);if(a.valueOf()<Date.now())throw new Error(EL.EXPIRATION_DATE_PAST);if(a.valueOf()-Date.now()>DMs*1e3)throw new Error(`Max allowed expiration is seven days (${DMs} seconds).`);o=Object.assign({},o);let l=Object.assign({},o.fields),u=new Date,c=Sfe(u,!0),d=Sfe(u);(async()=>{let{client_email:f}=await this.storage.authClient.getCredentials(),A=`${f}/${d}/auto/storage/goog4_request`;l={...l,bucket:this.bucket.name,key:this.name,"x-goog-date":c,"x-goog-credential":A,"x-goog-algorithm":"GOOG4-RSA-SHA256"};let h=o.conditions||[];Object.entries(l).forEach(([w,R])=>{w.startsWith("x-ignore-")||h.push({[w]:R})}),delete l.bucket;let y=Sfe(a,!0,"-",":"),v=lMs({conditions:h,expiration:y}),O=Buffer.from(v).toString("base64");try{let w=await this.storage.authClient.sign(O,o.signingEndpoint),R=Buffer.from(w,"base64").toString("hex"),P=this.parent.storage.universeDomain;l.policy=O,l["x-goog-signature"]=R;let z;return this.storage.customEndpoint?z=this.storage.apiEndpoint:o.virtualHostedStyle?z=`https://${this.bucket.name}.storage.${P}/`:o.bucketBoundHostname?z=`${o.bucketBoundHostname}/`:z=`https://storage.${P}/${this.bucket.name}/`,{url:z,fields:l}}catch(w){throw new Tfe(w.message)}})().then(f=>s(null,f),s)}getSignedUrl(t,n){let i=Vbn[t.action],o=aMs(t.extensionHeaders||{});t.action==="resumable"&&(o["x-goog-resumable"]="start");let s=Object.assign({},t.queryParams);typeof t.responseType=="string"&&(s["response-content-type"]=t.responseType),typeof t.promptSaveAs=="string"&&(s["response-content-disposition"]='attachment; filename="'+t.promptSaveAs+'"'),typeof t.responseDisposition=="string"&&(s["response-content-disposition"]=t.responseDisposition),this.generation&&(s.generation=this.generation.toString());let a={method:i,expires:t.expires,accessibleAt:t.accessibleAt,extensionHeaders:o,queryParams:s,contentMd5:t.contentMd5,contentType:t.contentType,host:t.host};t.cname&&(a.cname=t.cname),t.version&&(a.version=t.version),t.virtualHostedStyle&&(a.virtualHostedStyle=t.virtualHostedStyle),this.signer||(this.signer=new L8e(this.storage.authClient,this.bucket,this,this.storage)),this.signer.getSignedUrl(a).then(l=>n(null,l),n)}isPublic(t){var n;let i=((n=this.storage)===null||n===void 0?void 0:n.interceptors)||[],o=this.interceptors||[],a=i.concat(o).reduce((l,u)=>{let c=u.request({uri:`${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`});return Object.assign(l,c.headers),l},{});Su.makeRequest({method:"GET",uri:`${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`,headers:a},{retryOptions:this.storage.retryOptions},l=>{l?l.code===403?t(null,!1):t(l):t(null,!0)})}makePrivate(t,n){var i,o;let s=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let a={predefinedAcl:s.strict?"private":"projectPrivate"};((i=s.preconditionOpts)===null||i===void 0?void 0:i.ifMetagenerationMatch)!==void 0&&(a.ifMetagenerationMatch=(o=s.preconditionOpts)===null||o===void 0?void 0:o.ifMetagenerationMatch,delete s.preconditionOpts),s.userProject&&(a.userProject=s.userProject);let l={...s.metadata,acl:null};this.setMetadata(l,a,n)}makePublic(t){t=t||Su.noop,this.acl.add({entity:"allUsers",role:"READER"},(n,i,o)=>{t(n,o)})}publicUrl(){return`${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`}move(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,i=i||Su.noop,this.copy(t,o,(s,a,l)=>{if(s){s.message="file#copy failed with an error - "+s.message,i(s,null,l);return}this.name!==a.name||this.bucket.name!==a.bucket.name?this.delete(o,(u,c)=>{if(u){u.message="file#delete failed with an error - "+u.message,i(u,a,c);return}i(null,a,l)}):i(null,a,l)})}rename(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,i=i||Su.noop,this.move(t,o,i)}request(t,n){return this.parent.request.call(this,t,n)}rotateEncryptionKey(t,n){var i;n=typeof t=="function"?t:n;let o={};typeof t=="string"||t instanceof Buffer?o={encryptionKey:t}:typeof t=="object"&&(o=t);let s=this.bucket.file(this.id,o),a=((i=o.preconditionOpts)===null||i===void 0?void 0:i.ifGenerationMatch)!==void 0?{preconditionOpts:o.preconditionOpts}:{};this.copy(s,a,n)}save(t,n,i){i=typeof n=="function"?n:i;let o=typeof n=="object"?n:{},s=this.storage.retryOptions.maxRetries;this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(o?.preconditionOpts)||(s=0);let a=(0,qMs.default)(async l=>new Promise((u,c)=>{s===0&&(this.storage.retryOptions.autoRetry=!1);let d=this.createWriteStream(o);o.onUploadProgress&&d.on("progress",o.onUploadProgress);let p=f=>this.storage.retryOptions.autoRetry&&this.storage.retryOptions.retryableErrorFn(f)?c(f):l(f);typeof t=="string"||Buffer.isBuffer(t)?d.on("error",p).on("finish",()=>u()).end(t):(0,F8e.pipeline)(t,d,f=>{if(f){if(typeof t!="function")return l(f);p(f)}else u()})}),{retries:s,factor:this.storage.retryOptions.retryDelayMultiplier,maxTimeout:this.storage.retryOptions.maxRetryDelay*1e3,maxRetryTime:this.storage.retryOptions.totalTimeout*1e3});return i?a.then(()=>{if(i)return i()}).catch(i):a}setMetadata(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata,$M.setMetadata,o),super.setMetadata(t,o).then(s=>i(null,...s)).catch(i).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}setStorageClass(t,n,i){i=typeof n=="function"?n:i;let s={...typeof n=="object"?n:{},storageClass:t.replace(/-/g,"_").replace(/([a-z])([A-Z])/g,(a,l,u)=>l+"_"+u).toUpperCase()};this.copy(this,s,(a,l,u)=>{if(a){i(a,u);return}this.metadata=l.metadata,i(null,u)})}setUserProject(t){this.bucket.setUserProject.call(this,t)}startResumableUpload_(t,n={}){var i;(i=n.metadata)!==null&&i!==void 0||(n.metadata={});let o=this.storage.retryOptions;this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(n.preconditionOpts)||(o.autoRetry=!1);let s=SMs({authClient:this.storage.authClient,apiEndpoint:this.storage.apiEndpoint,bucket:this.bucket.name,customRequestOptions:this.getRequestInterceptors().reduce((a,l)=>l(a),{}),file:this.name,generation:this.generation,isPartialUpload:n.isPartialUpload,key:this.encryptionKey,kmsKeyName:this.kmsKeyName,metadata:n.metadata,offset:n.offset,predefinedAcl:n.predefinedAcl,private:n.private,public:n.public,uri:n.uri,userProject:n.userProject||this.userProject,retryOptions:{...o},params:n?.preconditionOpts||this.instancePreconditionOpts,chunkSize:n?.chunkSize,highWaterMark:n?.highWaterMark,universeDomain:this.bucket.storage.universeDomain,[ky]:n[ky]});s.on("response",a=>{t.emit("response",a)}).on("uri",a=>{t.emit("uri",a)}).on("metadata",a=>{this.metadata=a,t.emit("metadata")}).on("finish",()=>{t.emit("complete")}).on("progress",a=>t.emit("progress",a)),t.setWritable(s),this.storage.retryOptions.autoRetry=this.instanceRetryValue}startSimpleUpload_(t,n={}){var i;(i=n.metadata)!==null&&i!==void 0||(n.metadata={});let o=this.storage.apiEndpoint,s=this.bucket.name,a=`${o}/upload/storage/v1/b/${s}/o`,l={qs:{name:this.name},uri:a,[ky]:n[ky]};this.generation!==void 0&&(l.qs.ifGenerationMatch=this.generation),this.kmsKeyName!==void 0&&(l.qs.kmsKeyName=this.kmsKeyName),typeof n.timeout=="number"&&(l.timeout=n.timeout),(n.userProject||this.userProject)&&(l.qs.userProject=n.userProject||this.userProject),n.predefinedAcl?l.qs.predefinedAcl=n.predefinedAcl:n.private?l.qs.predefinedAcl="private":n.public&&(l.qs.predefinedAcl="publicRead"),Object.assign(l.qs,this.instancePreconditionOpts,n.preconditionOpts),Su.makeWritableStream(t,{makeAuthenticatedRequest:u=>{this.request(u,(c,d,p)=>{if(c){t.destroy(c);return}this.metadata=d,t.emit("metadata",d),t.emit("response",p),t.emit("complete")})},metadata:n.metadata,request:l})}disableAutoRetryConditionallyIdempotent_(t,n,i){var o,s,a,l;(typeof t=="object"&&((s=(o=t?.reqOpts)===null||o===void 0?void 0:o.qs)===null||s===void 0?void 0:s.ifGenerationMatch)===void 0&&i?.ifGenerationMatch===void 0&&n===$M.delete&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(this.storage.retryOptions.autoRetry=!1),(typeof t=="object"&&((l=(a=t?.reqOpts)===null||a===void 0?void 0:a.qs)===null||l===void 0?void 0:l.ifMetagenerationMatch)===void 0&&i?.ifMetagenerationMatch===void 0&&n===$M.setMetadata&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(this.storage.retryOptions.autoRetry=!1)}async getBufferFromReadable(t){let n=[];for await(let i of t)n.push(i);return Buffer.concat(n)}};Hbn=new WeakSet,NMs=async function(t,n={}){let i=this.metadata,o=!!(n.crc32c||n.md5);if(n.crc32c&&i.crc32c&&(o=!t.test("crc32c",i.crc32c)),n.md5&&i.md5Hash&&(o=!t.test("md5",i.md5Hash)),o){let s=[],a="",l="";try{await this.delete(),n.md5&&!i.md5Hash?(a="MD5_NOT_AVAILABLE",l=E3.MD5_NOT_AVAILABLE):(a="FILE_NO_UPLOAD",l=E3.UPLOAD_MISMATCH)}catch(c){let d=c;a="FILE_NO_UPLOAD_DELETE",l=`${E3.UPLOAD_MISMATCH_DELETE_FAIL}${d.message}`,s.push(d)}let u=new wfe(l);throw u.code=a,u.errors=s,u}return!0};(0,PMs.promisifyAll)(bL,{exclude:["cloudStorageURI","publicUrl","request","save","setEncryptionKey","shouldRetryBasedOnPreconditionAndIdempotencyStrat","getBufferFromReadable"]});var zMs=Et(o2(),1);var JHt;(function(r){r.POLICY_OBJECT_REQUIRED="A policy object is required.",r.PERMISSIONS_REQUIRED="Permissions are required."})(JHt||(JHt={}));var q8e=class{constructor(t){this.request_=t.request.bind(t),this.resourceId_="buckets/"+t.getId()}getPolicy(t,n){let{options:i,callback:o}=kR(t,n),s={};i.userProject&&(s.userProject=i.userProject),i.requestedPolicyVersion!==null&&i.requestedPolicyVersion!==void 0&&(s.optionsRequestedPolicyVersion=i.requestedPolicyVersion),this.request_({uri:"/iam",qs:s},o)}setPolicy(t,n,i){if(t===null||typeof t!="object")throw new Error(JHt.POLICY_OBJECT_REQUIRED);let{options:o,callback:s}=kR(n,i),a;t.etag===void 0&&(a=0),this.request_({method:"PUT",uri:"/iam",maxRetries:a,json:Object.assign({resourceId:this.resourceId_},t),qs:o},s)}testPermissions(t,n,i){if(!Array.isArray(t)&&typeof t!="string")throw new Error(JHt.PERMISSIONS_REQUIRED);let{options:o,callback:s}=kR(n,i),a=Array.isArray(t)?t:[t],l=Object.assign({permissions:a},o);this.request_({uri:"/iam/testPermissions",qs:l,useQuerystring:!0},(u,c)=>{if(u){s(u,null,c);return}let d=Array.isArray(c.permissions)?c.permissions:[],p=a.reduce((f,A)=>(f[A]=d.indexOf(A)>-1,f),{});s(null,p,c)})}};(0,zMs.promisifyAll)(q8e);var UMs=Et(o2(),1),z8e=class extends SS{constructor(t,n){let i={},o={create:!0,delete:{reqOpts:{qs:i}},get:{reqOpts:{qs:i}},getMetadata:{reqOpts:{qs:i}},exists:!0};super({parent:t,baseUrl:"/notificationConfigs",id:n.toString(),createMethod:t.createNotification.bind(t),methods:o})}};(0,UMs.promisifyAll)(z8e);var YMs=require("stream"),KMs=require("url"),Jbn;(function(r){r.list="GET"})(Jbn||(Jbn={}));var $M;(function(r){r[r.setMetadata=0]="setMetadata",r[r.delete=1]="delete"})($M||($M={}));var IL;(function(r){r.PROVIDE_SOURCE_FILE="You must provide at least one source file.",r.DESTINATION_FILE_NOT_SPECIFIED="A destination file must be specified.",r.CHANNEL_ID_REQUIRED="An ID is required to create a channel.",r.TOPIC_NAME_REQUIRED="A valid topic name is required.",r.CONFIGURATION_OBJECT_PREFIX_REQUIRED="A configuration object with a prefix is required.",r.SPECIFY_FILE_NAME="A file name must be specified.",r.METAGENERATION_NOT_PROVIDED="A metageneration must be provided.",r.SUPPLY_NOTIFICATION_ID="You must supply a notification ID."})(IL||(IL={}));var CL=class r extends SS{getFilesStream(t){return new YMs.Readable}constructor(t,n,i){var o,s,a,l;i=i||{},n=n.replace(/^gs:\/\//,"").replace(/\/+$/,"");let u={};!((o=i?.preconditionOpts)===null||o===void 0)&&o.ifGenerationMatch&&(u.ifGenerationMatch=i.preconditionOpts.ifGenerationMatch),!((s=i?.preconditionOpts)===null||s===void 0)&&s.ifGenerationNotMatch&&(u.ifGenerationNotMatch=i.preconditionOpts.ifGenerationNotMatch),!((a=i?.preconditionOpts)===null||a===void 0)&&a.ifMetagenerationMatch&&(u.ifMetagenerationMatch=i.preconditionOpts.ifMetagenerationMatch),!((l=i?.preconditionOpts)===null||l===void 0)&&l.ifMetagenerationNotMatch&&(u.ifMetagenerationNotMatch=i.preconditionOpts.ifMetagenerationNotMatch);let c=i.userProject;typeof c=="string"&&(u.userProject=c);let d={create:{reqOpts:{qs:u}},delete:{reqOpts:{qs:u}},exists:{reqOpts:{qs:u}},get:{reqOpts:{qs:u}},getMetadata:{reqOpts:{qs:u}},setMetadata:{reqOpts:{qs:u}}};super({parent:t,baseUrl:"/b",id:n,createMethod:t.createBucket.bind(t),methods:d}),this.name=n,this.storage=t,this.userProject=i.userProject,this.acl=new Pne({request:this.request.bind(this),pathPrefix:"/acl"}),this.acl.default=new Pne({request:this.request.bind(this),pathPrefix:"/defaultObjectAcl"}),this.crc32cGenerator=i.crc32cGenerator||this.storage.crc32cGenerator,this.iam=new q8e(this),this.getFilesStream=Xbn.paginator.streamify("getFiles"),this.instanceRetryValue=t.retryOptions.autoRetry,this.instancePreconditionOpts=i?.preconditionOpts}get cloudStorageURI(){let t=new KMs.URL("gs://");return t.host=this.name,t}addLifecycleRule(t,n,i){let o={};typeof n=="function"?i=n:n&&(o=n),o=o||{};let s=Array.isArray(t)?t:[t];for(let a of s)a.condition.createdBefore instanceof Date&&(a.condition.createdBefore=a.condition.createdBefore.toISOString().replace(/T.+$/,"")),a.condition.customTimeBefore instanceof Date&&(a.condition.customTimeBefore=a.condition.customTimeBefore.toISOString().replace(/T.+$/,"")),a.condition.noncurrentTimeBefore instanceof Date&&(a.condition.noncurrentTimeBefore=a.condition.noncurrentTimeBefore.toISOString().replace(/T.+$/,""));if(o.append===!1){this.setMetadata({lifecycle:{rule:s}},o,i);return}this.getMetadata((a,l)=>{var u,c;if(a){i(a);return}let d=Array.isArray((u=l.lifecycle)===null||u===void 0?void 0:u.rule)?(c=l.lifecycle)===null||c===void 0?void 0:c.rule:[];this.setMetadata({lifecycle:{rule:d.concat(s)}},o,i)})}combine(t,n,i,o){var s;if(!Array.isArray(t)||t.length===0)throw new Error(IL.PROVIDE_SOURCE_FILE);if(!n)throw new Error(IL.DESTINATION_FILE_NOT_SPECIFIED);let a={};typeof i=="function"?o=i:i&&(a=i),this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata,$M.setMetadata,a);let l=d=>d instanceof bL?d:this.file(d);t=t.map(l);let u=l(n);if(o=o||Su.noop,!u.metadata.contentType){let d=WMs.contentType(u.name);d&&(u.metadata.contentType=d)}let c=this.storage.retryOptions.maxRetries;(((s=u?.instancePreconditionOpts)===null||s===void 0?void 0:s.ifGenerationMatch)===void 0&&a.ifGenerationMatch===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(c=0),a.ifGenerationMatch===void 0&&Object.assign(a,u.instancePreconditionOpts,a),u.request({method:"POST",uri:"/compose",maxRetries:c,json:{destination:{contentType:u.metadata.contentType},sourceObjects:t.map(d=>{let p={name:d.name};return d.metadata&&d.metadata.generation&&(p.generation=parseInt(d.metadata.generation.toString())),p})},qs:a},(d,p)=>{if(this.storage.retryOptions.autoRetry=this.instanceRetryValue,d){o(d,null,p);return}o(null,u,p)})}createChannel(t,n,i,o){if(typeof t!="string")throw new Error(IL.CHANNEL_ID_REQUIRED);let s={};typeof i=="function"?o=i:i&&(s=i),this.request({method:"POST",uri:"/o/watch",json:Object.assign({id:t,type:"web_hook"},n),qs:s},(a,l)=>{if(a){o(a,null,l);return}let u=l.resourceId,c=this.storage.channel(t,u);c.metadata=l,o(null,c,l)})}createNotification(t,n,i){let o={};if(typeof n=="function"?i=n:n&&(o=n),t!==null&&typeof t=="object"&&Su.isCustomType(t,"pubsub/topic")&&(t=t.name),typeof t!="string")throw new Error(IL.TOPIC_NAME_REQUIRED);let a=Object.assign({topic:t},o);a.topic.indexOf("projects")!==0&&(a.topic="projects/{{projectId}}/topics/"+a.topic),a.topic=`//pubsub.${this.storage.universeDomain}/`+a.topic,a.payloadFormat||(a.payloadFormat="JSON_API_V1");let l={};a.userProject&&(l.userProject=a.userProject,delete a.userProject),this.request({method:"POST",uri:"/notificationConfigs",json:kHt(a),qs:l,maxRetries:0},(u,c)=>{if(u){i(u,null,c);return}let d=this.notification(c.id);d.metadata=c,i(null,d,c)})}deleteFiles(t,n){let i={};typeof t=="function"?n=t:t&&(i=t);let o=10,s=1e3,a=[],l=u=>u.delete(i).catch(c=>{if(!i.force)throw c;a.push(c)});(async()=>{try{let u=[],c=(0,Ybn.default)(o),d=this.getFilesStream(i);for await(let p of d)u.length>=s&&(await Promise.all(u),u=[]),u.push(c(()=>l(p)).catch(f=>{throw d.destroy(),f}));await Promise.all(u),n(a.length>0?a:null)}catch(u){n(u);return}})()}deleteLabels(t,n,i){let o=new Array,s={};typeof t=="function"?i=t:typeof t=="string"?o=[t]:Array.isArray(t)?o=t:t&&(s=t),typeof n=="function"?i=n:n&&(s=n);let a=l=>{let u=l.reduce((c,d)=>(c[d]=null,c),{});s?.ifMetagenerationMatch!==void 0?this.setLabels(u,s,i):this.setLabels(u,i)};o.length===0?this.getLabels((l,u)=>{if(l){i(l);return}a(Object.keys(u))}):a(o)}disableRequesterPays(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.setMetadata({billing:{requesterPays:!1}},i,n)}enableLogging(t,n){if(!t||typeof t=="function"||typeof t.prefix>"u")throw new Error(IL.CONFIGURATION_OBJECT_PREFIX_REQUIRED);let i=this.id;t.bucket&&t.bucket instanceof r?i=t.bucket.id:t.bucket&&typeof t.bucket=="string"&&(i=t.bucket);let o={};t?.ifMetagenerationMatch&&(o.ifMetagenerationMatch=t.ifMetagenerationMatch),t?.ifMetagenerationNotMatch&&(o.ifMetagenerationNotMatch=t.ifMetagenerationNotMatch),(async()=>{try{let[s]=await this.iam.getPolicy();s.bindings.push({members:["group:cloud-storage-analytics@google.com"],role:"roles/storage.objectCreator"}),await this.iam.setPolicy(s),this.setMetadata({logging:{logBucket:i,logObjectPrefix:t.prefix}},o,n)}catch(s){n(s);return}})()}enableRequesterPays(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.setMetadata({billing:{requesterPays:!0}},i,n)}file(t,n){if(!t)throw Error(IL.SPECIFY_FILE_NAME);return new bL(this,t,n)}getFiles(t,n){let i=typeof t=="object"?t:{};n||(n=t),i=Object.assign({},i),this.request({uri:"/o",qs:i},(o,s)=>{if(o){n(o,null,null,s);return}let l=(s.items?s.items:[]).map(c=>{let d={};i.versions&&(d.generation=c.generation),c.kmsKeyName&&(d.kmsKeyName=c.kmsKeyName);let p=this.file(c.name,d);return p.metadata=c,p}),u=null;s.nextPageToken&&(u=Object.assign({},i,{pageToken:s.nextPageToken})),n(null,l,u,s)})}getLabels(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.getMetadata(i,(o,s)=>{if(o){n(o,null);return}n(null,s?.labels||{})})}getNotifications(t,n){let i={};typeof t=="function"?n=t:t&&(i=t),this.request({uri:"/notificationConfigs",qs:i},(o,s)=>{if(o){n(o,null,s);return}let l=(s.items?s.items:[]).map(u=>{let c=this.notification(u.id);return c.metadata=u,c});n(null,l,s)})}getSignedUrl(t,n){let o={method:Jbn[t.action],expires:t.expires,version:t.version,cname:t.cname,extensionHeaders:t.extensionHeaders||{},queryParams:t.queryParams||{},host:t.host,signingEndpoint:t.signingEndpoint};this.signer||(this.signer=new L8e(this.storage.authClient,this,void 0,this.storage)),this.signer.getSignedUrl(o).then(s=>n(null,s),n)}lock(t,n){let i=typeof t;if(i!=="number"&&i!=="string")throw new Error(IL.METAGENERATION_NOT_PROVIDED);this.request({method:"POST",uri:"/lockRetentionPolicy",qs:{ifMetagenerationMatch:t}},n)}makePrivate(t,n){var i,o,s,a;let l=typeof t=="object"?t:{};n=typeof t=="function"?t:n,l.private=!0;let u={predefinedAcl:"projectPrivate"};l.userProject&&(u.userProject=l.userProject),!((i=l.preconditionOpts)===null||i===void 0)&&i.ifGenerationMatch&&(u.ifGenerationMatch=l.preconditionOpts.ifGenerationMatch),!((o=l.preconditionOpts)===null||o===void 0)&&o.ifGenerationNotMatch&&(u.ifGenerationNotMatch=l.preconditionOpts.ifGenerationNotMatch),!((s=l.preconditionOpts)===null||s===void 0)&&s.ifMetagenerationMatch&&(u.ifMetagenerationMatch=l.preconditionOpts.ifMetagenerationMatch),!((a=l.preconditionOpts)===null||a===void 0)&&a.ifMetagenerationNotMatch&&(u.ifMetagenerationNotMatch=l.preconditionOpts.ifMetagenerationNotMatch);let c={...l.metadata,acl:null};this.setMetadata(c,u,d=>{d&&n(d),(l.includeFiles?(0,Kbn.promisify)(this.makeAllFilesPublicPrivate_).call(this,l):Promise.resolve([])).then(f=>n(null,f)).catch(n)})}makePublic(t,n){let i=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let o={public:!0,...i};this.acl.add({entity:"allUsers",role:"READER"}).then(()=>this.acl.default.add({entity:"allUsers",role:"READER"})).then(()=>o.includeFiles?(0,Kbn.promisify)(this.makeAllFilesPublicPrivate_).call(this,o):[]).then(s=>n(null,s),n)}notification(t){if(!t)throw new Error(IL.SUPPLY_NOTIFICATION_ID);return new z8e(this,t)}removeRetentionPeriod(t,n){let i=typeof t=="object"?t:{};n=typeof t=="function"?t:n,this.setMetadata({retentionPolicy:null},i,n)}request(t,n){return this.userProject&&(!t.qs||!t.qs.userProject)&&(t.qs={...t.qs,userProject:this.userProject}),super.request(t,n)}setLabels(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,i=i||Su.noop,this.setMetadata({labels:t},o,i)}setMetadata(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata,$M.setMetadata,o),super.setMetadata(t,o).then(s=>i(null,...s)).catch(i).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}setRetentionPeriod(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.setMetadata({retentionPolicy:{retentionPeriod:t.toString()}},o,i)}setCorsConfiguration(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,this.setMetadata({cors:t},o,i)}setStorageClass(t,n,i){let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,t=t.replace(/-/g,"_").replace(/([a-z])([A-Z])/g,(s,a,l)=>a+"_"+l).toUpperCase(),this.setMetadata({storageClass:t},o,i)}setUserProject(t){this.userProject=t,["create","delete","exists","get","getMetadata","setMetadata"].forEach(i=>{let o=this.methods[i];typeof o=="object"&&(typeof o.reqOpts=="object"?Object.assign(o.reqOpts.qs,{userProject:t}):o.reqOpts={qs:{userProject:t}})})}upload(t,n,i){var o,s;let a=d=>{let p=(0,VMs.default)(async f=>{await new Promise((A,h)=>{var y,C;d===0&&(!((C=(y=c?.storage)===null||y===void 0?void 0:y.retryOptions)===null||C===void 0)&&C.autoRetry)&&(c.storage.retryOptions.autoRetry=!1);let v=c.createWriteStream(l);l.onUploadProgress&&v.on("progress",l.onUploadProgress),GMs.createReadStream(t).on("error",f).pipe(v).on("error",O=>this.storage.retryOptions.autoRetry&&this.storage.retryOptions.retryableErrorFn(O)?h(O):f(O)).on("finish",()=>A())})},{retries:d,factor:this.storage.retryOptions.retryDelayMultiplier,maxTimeout:this.storage.retryOptions.maxRetryDelay*1e3,maxRetryTime:this.storage.retryOptions.totalTimeout*1e3});return i?p.then(()=>{if(i)return i(null,c,c.metadata)}).catch(i):p};if(global.GCLOUD_SANDBOX_ENV)return;let l=typeof n=="object"?n:{};i=typeof n=="function"?n:i,l=Object.assign({metadata:{}},l);let u=this.storage.retryOptions.maxRetries;(((o=l?.preconditionOpts)===null||o===void 0?void 0:o.ifGenerationMatch)===void 0&&((s=this.instancePreconditionOpts)===null||s===void 0?void 0:s.ifGenerationMatch)===void 0&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional||this.storage.retryOptions.idempotencyStrategy===fh.RetryNever)&&(u=0);let c;if(l.destination instanceof bL)c=l.destination;else if(l.destination!==null&&typeof l.destination=="string")c=this.file(l.destination,{encryptionKey:l.encryptionKey,kmsKeyName:l.kmsKeyName,preconditionOpts:this.instancePreconditionOpts});else{let d=HMs.basename(t);c=this.file(d,{encryptionKey:l.encryptionKey,kmsKeyName:l.kmsKeyName,preconditionOpts:this.instancePreconditionOpts})}a(u)}makeAllFilesPublicPrivate_(t,n){let o=[],s=[],a=typeof t=="object"?t:{};n=typeof t=="function"?t:n;let l=async u=>{try{await(a.public?u.makePublic():u.makePrivate(a)),s.push(u)}catch(c){if(!a.force)throw c;o.push(c)}};this.getFiles(a).then(([u])=>{let c=(0,Ybn.default)(10),d=u.map(p=>c(()=>l(p)));return Promise.all(d)}).then(()=>n(o.length>0?o:null,s),u=>n(u,s))}getId(){return this.id}disableAutoRetryConditionallyIdempotent_(t,n,i){var o,s;typeof t=="object"&&((s=(o=t?.reqOpts)===null||o===void 0?void 0:o.qs)===null||s===void 0?void 0:s.ifMetagenerationMatch)===void 0&&i?.ifMetagenerationMatch===void 0&&(n===$M.setMetadata||n===$M.delete)&&this.storage.retryOptions.idempotencyStrategy===fh.RetryConditional?this.storage.retryOptions.autoRetry=!1:this.storage.retryOptions.idempotencyStrategy===fh.RetryNever&&(this.storage.retryOptions.autoRetry=!1)}};Xbn.paginator.extend(CL,"getFiles");(0,jMs.promisifyAll)(CL,{exclude:["cloudStorageURI","request","file","notification"]});var JMs=Et(o2(),1),Rfe=class extends SS{constructor(t,n,i){let o={parent:t,baseUrl:"/channels",id:"",methods:{}};super(o),this.metadata.id=n,this.metadata.resourceId=i}stop(t){t=t||Su.noop,this.request({method:"POST",uri:"/stop",json:this.metadata},(n,i)=>{t(n,i)})}};(0,JMs.promisifyAll)(Rfe);var ZMs=Et(N8e(),1);var XMs=Et(o2(),1),Bfe=class extends SS{constructor(t,n,i){let o={delete:!0,get:!0,getMetadata:!0,setMetadata:{reqOpts:{method:"PUT"}}},s=i&&i.projectId||t.projectId;super({parent:t,id:n,baseUrl:`/projects/${s}/hmacKeys`,methods:o}),this.storage=t,this.instanceRetryValue=t.retryOptions.autoRetry}setMetadata(t,n,i){this.storage.retryOptions.idempotencyStrategy!==fh.RetryAlways&&(this.storage.retryOptions.autoRetry=!1);let o=typeof n=="object"?n:{};i=typeof n=="function"?n:i,super.setMetadata(t,o).then(s=>i(null,...s)).catch(i).finally(()=>{this.storage.retryOptions.autoRetry=this.instanceRetryValue})}};(0,XMs.promisifyAll)(Bfe);var eDs=Et(u4(),1),fh;(function(r){r[r.RetryAlways=0]="RetryAlways",r[r.RetryConditional=1]="RetryConditional",r[r.RetryNever=2]="RetryNever"})(fh||(fh={}));var EL;(function(r){r.EXPIRATION_DATE_INVALID="The expiration date provided was invalid.",r.EXPIRATION_DATE_PAST="An expiration date cannot be in the past."})(EL||(EL={}));var U8e;(function(r){r.BUCKET_NAME_REQUIRED="A bucket name is needed to use Cloud Storage.",r.BUCKET_NAME_REQUIRED_CREATE="A name is required to create a bucket.",r.HMAC_SERVICE_ACCOUNT="The first argument must be a service account email to create an HMAC key.",r.HMAC_ACCESS_ID="An access ID is needed to create an HmacKey object."})(U8e||(U8e={}));var ZO0=/^(\w*):\/\//,e50=!0,t50=3,r50=2,n50=600,i50=64,o50=fh.RetryConditional,s50=function(r){var t;let n=i=>i.includes("eai_again")||i==="econnreset"||i==="unexpected connection closure"||i==="epipe"||i==="socket connection timeout";if(r){if([408,429,500,502,503,504].indexOf(r.code)!==-1)return!0;if(typeof r.code=="string"){if(["408","429","500","502","503","504"].indexOf(r.code)!==-1)return!0;let i=r.code.toLowerCase();if(n(i))return!0}if(r.errors)for(let i of r.errors){let o=(t=i?.reason)===null||t===void 0?void 0:t.toString().toLowerCase();if(o&&n(o))return!0}}return!1};var LR=class r extends prt{getBucketsStream(){return new $bn.Readable}getHmacKeysStream(){return new $bn.Readable}constructor(t={}){var n,i,o,s,a,l,u,c,d,p,f,A,h,y;let v=`https://storage.${t.universeDomain||eDs.DEFAULT_UNIVERSE}`,O=!1,w=process.env.STORAGE_EMULATOR_HOST;typeof w=="string"&&(v=r.sanitizeEndpoint(w),O=!0),t.apiEndpoint&&(v=r.sanitizeEndpoint(t.apiEndpoint),O=!0),t=Object.assign({},t,{apiEndpoint:v});let R=w||`${t.apiEndpoint}/storage/v1`,P={apiEndpoint:t.apiEndpoint,retryOptions:{autoRetry:((n=t.retryOptions)===null||n===void 0?void 0:n.autoRetry)!==void 0?(i=t.retryOptions)===null||i===void 0?void 0:i.autoRetry:e50,maxRetries:!((o=t.retryOptions)===null||o===void 0)&&o.maxRetries?(s=t.retryOptions)===null||s===void 0?void 0:s.maxRetries:t50,retryDelayMultiplier:!((a=t.retryOptions)===null||a===void 0)&&a.retryDelayMultiplier?(l=t.retryOptions)===null||l===void 0?void 0:l.retryDelayMultiplier:r50,totalTimeout:!((u=t.retryOptions)===null||u===void 0)&&u.totalTimeout?(c=t.retryOptions)===null||c===void 0?void 0:c.totalTimeout:n50,maxRetryDelay:!((d=t.retryOptions)===null||d===void 0)&&d.maxRetryDelay?(p=t.retryOptions)===null||p===void 0?void 0:p.maxRetryDelay:i50,retryableErrorFn:!((f=t.retryOptions)===null||f===void 0)&&f.retryableErrorFn?(A=t.retryOptions)===null||A===void 0?void 0:A.retryableErrorFn:s50,idempotencyStrategy:((h=t.retryOptions)===null||h===void 0?void 0:h.idempotencyStrategy)!==void 0?(y=t.retryOptions)===null||y===void 0?void 0:y.idempotencyStrategy:o50},baseUrl:R,customEndpoint:O,useAuthWithCustomEndpoint:t?.useAuthWithCustomEndpoint,projectIdRequired:!1,scopes:["https://www.googleapis.com/auth/iam","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/devstorage.full_control"],packageJson:(0,ZMs.getPackageJSON)()};super(P,t),this.acl=r.acl,this.crc32cGenerator=t.crc32cGenerator||WHt,this.retryOptions=P.retryOptions,this.getBucketsStream=XHt.paginator.streamify("getBuckets"),this.getHmacKeysStream=XHt.paginator.streamify("getHmacKeys")}static sanitizeEndpoint(t){return ZO0.test(t)||(t=`https://${t}`),t.replace(/\/+$/,"")}bucket(t,n){if(!t)throw new Error(U8e.BUCKET_NAME_REQUIRED);return new CL(this,t,n)}channel(t,n){return new Rfe(this,t,n)}createBucket(t,n,i){if(!t)throw new Error(U8e.BUCKET_NAME_REQUIRED_CREATE);let o;i?o=n:(i=n,o={});let s={...o,name:t},a={archive:"ARCHIVE",coldline:"COLDLINE",dra:"DURABLE_REDUCED_AVAILABILITY",multiRegional:"MULTI_REGIONAL",nearline:"NEARLINE",regional:"REGIONAL",standard:"STANDARD"},l=Object.keys(a);for(let c of l)if(s[c]){if(o.storageClass&&o.storageClass!==c)throw new Error(`Both \`${c}\` and \`storageClass\` were provided.`);s.storageClass=a[c],delete s[c]}s.requesterPays&&(s.billing={requesterPays:s.requesterPays},delete s.requesterPays);let u={project:this.projectId};s.userProject&&(u.userProject=s.userProject,delete s.userProject),s.enableObjectRetention&&(u.enableObjectRetention=s.enableObjectRetention,delete s.enableObjectRetention),this.request({method:"POST",uri:"/b",qs:u,json:s},(c,d)=>{if(c){i(c,null,d);return}let p=this.bucket(t);p.metadata=d,i(null,p,d)})}createHmacKey(t,n,i){if(typeof t!="string")throw new Error(U8e.HMAC_SERVICE_ACCOUNT);let{options:o,callback:s}=kR(n,i),a=Object.assign({},o,{serviceAccountEmail:t}),l=a.projectId||this.projectId;delete a.projectId,this.request({method:"POST",uri:`/projects/${l}/hmacKeys`,qs:a,maxRetries:0},(u,c)=>{if(u){s(u,null,null,c);return}let d=c.metadata,p=this.hmacKey(d.accessId,{projectId:d.projectId});p.metadata=c.metadata,s(null,p,c.secret,c)})}getBuckets(t,n){let{options:i,callback:o}=kR(t,n);i.project=i.project||this.projectId,this.request({uri:"/b",qs:i},(s,a)=>{if(s){o(s,null,null,a);return}let u=(a.items?a.items:[]).map(d=>{let p=this.bucket(d.id);return p.metadata=d,p}),c=a.nextPageToken?Object.assign({},i,{pageToken:a.nextPageToken}):null;o(null,u,c,a)})}getHmacKeys(t,n){let{options:i,callback:o}=kR(t,n),s=Object.assign({},i),a=s.projectId||this.projectId;delete s.projectId,this.request({uri:`/projects/${a}/hmacKeys`,qs:s},(l,u)=>{if(l){o(l,null,null,u);return}let d=(u.items?u.items:[]).map(f=>{let A=this.hmacKey(f.accessId,{projectId:f.projectId});return A.metadata=f,A}),p=u.nextPageToken?Object.assign({},i,{pageToken:u.nextPageToken}):null;o(null,d,p,u)})}getServiceAccount(t,n){let{options:i,callback:o}=kR(t,n);this.request({uri:`/projects/${this.projectId}/serviceAccount`,qs:i},(s,a)=>{if(s){o(s,null,a);return}let l={};for(let u in a)if(a.hasOwnProperty(u)){let c=u.replace(/_(\w)/g,(d,p)=>p.toUpperCase());l[c]=a[u]}o(null,l,a)})}hmacKey(t,n){if(!t)throw new Error(U8e.HMAC_ACCESS_ID);return new Bfe(this,t,n)}};LR.Bucket=CL;LR.Channel=Rfe;LR.File=bL;LR.HmacKey=Bfe;LR.acl={OWNER_ROLE:"OWNER",READER_ROLE:"READER",WRITER_ROLE:"WRITER"};XHt.paginator.extend(LR,["getBuckets","getHmacKeys"]);(0,$Ms.promisifyAll)(LR,{exclude:["bucket","channel","hmacKey"]});var u50=Et(b1e(),1);var d50=Et(u4(),1),tDs=Et(VTe(),1),p50=Et(I5(),1);var rDs=Et(N8e(),1);var a50,l50,c50,f50=(0,rDs.getPackageJSON)();var nP1=32*1024*1024,iP1=32*1024*1024,oP1=32*1024*1024;var Zbn={UPLOAD_MANY:"tm.upload_many",DOWNLOAD_MANY:"tm.download_many",UPLOAD_SHARDED:"tm.upload_sharded",DOWNLOAD_SHARDED:"tm.download_sharded"};a50=new WeakSet,l50=function(t={}){let n=!1,i=!1;for(let[o,s]of Object.entries(t))o.toLocaleLowerCase().trim()==="x-goog-api-client"?(n=!0,s.includes(Zbn.UPLOAD_SHARDED)||(t[o]=`${s} gccl-gcs-cmd/${Zbn.UPLOAD_SHARDED}`)):o.toLocaleLowerCase().trim()==="user-agent"&&(i=!0);return n||(t["x-goog-api-client"]=`${mL()} gccl/${f50.version} gccl-gcs-cmd/${Zbn.UPLOAD_SHARDED}`),i||(t["User-Agent"]=yL()),t},c50=function(t,n){if(this.bucket.storage.retryOptions.autoRetry&&this.bucket.storage.retryOptions.retryableErrorFn(t))throw t;n(t)};yle();var lW0=Et(z5n());ST();Er();rY();_h();var Sit=class{whereClauseDisjunctionLimits={in:30,"not-in":10,"array-contains-any":30};async selectInBatches(t,n,i,o,s){let a=[],l=this.whereClauseDisjunctionLimits[i];for(let u=0;u<o.length;u+=l){let c=o.slice(u,u+l),d=this.createQuery(t,{where:[...s,[n,i,c]]}),p=await this.runQuery(d);a.push(p)}return a.flat()}};var dF1=q_.getTracer("repository");Kf();Er();var FUs=(r="{}")=>{let t={},n=[];try{let i=JSON.parse(r);return Object.entries(i).forEach(([o,s])=>{s.split(",").forEach(a=>{let l=a.trim();Object.hasOwn(t,l)&&n.push(new At(`Duplicate target id ${l} found in feature config ${o} with value ${t[l]}. Existing value will be overwritten with ${o}`)),l&&(t[l]=o)})}),{configs:t,errors:n}}catch(i){return n.push(new At("Failed to parse feature configs",i.message)),{configs:t,errors:n}}};rY();var dW0=Et(z5n());mqe();var xF1=FUs(process.env.SERVICE_BACKED_REPOSITORIES);var Pie=nt.AUTH,pv=nt.RUNNER_BACKEND;var fW0=async r=>{let t=(await q3t()).apiKey;return bkr(`https://securetoken.googleapis.com/v1/token?key=${t}`,{refresh_token:r,grant_type:"refresh_token"}).then(n=>n.data.id_token)},qUs=async(r,t,n,i)=>{let o="[AuthenticateFirebaseTokenAndRetrieveTeamInfo]",s={};return O1(async()=>Du(o,s,"AUTH",()=>{let l,u,c,d,p,f,A,h;return Pie.debug("got auth request refresh:",!!r,"id token",!!t),t===void 0&&RN&&(t=r),Pie.debug("inAuthenticate, between 1st and 2nd",!!t),(t?Promise.resolve(t):fW0(r)).then(y=>(Pie.debug("inAuthenticate, before setting id token"),l=y,Pie.debug("inAuthenticate, setting up firebase 2"),n(l))).then(y=>(u=y.Firebase,c=y.rootRepository,f=y.uid,s.userID=f,Pie.debug("inAuthenticate, getting team data admin ",f),wBs(u.firestore(),y.uid))).then(y=>{d=y,s.orgID=y.fbTeamID;let C=q_.getActiveSpan();return C&&(C.setAttribute("userID",f),C.setAttribute("orgID",d.fbTeamID)),A=xBs(y.fbRole),Pie.debug("inAuthenticate, finishing...",f),i({org:{id:y.fbTeamID},user:{id:y.fbUserID},...YC&&{version:{id:YC.version}}},c,l)}).then(y=>(h=y,c.user(d.fbUserID).fetch())).then(y=>(p=y,c.org(d.fbTeamID).userRole(d.fbUserID).fetch())).then(y=>{let C;return y?C=new mWt(y,!!p.hasSuperUserAccess):C=new yWt(p.role,!!p.hasSuperUserAccess),{teamInfo:d,firebase:u,rootRepository:c,idToken:l,featureFlags:h,userPermissions:C,UserRolePrivilegeChecker:A}}).catch(y=>{let C=d?d.fbUserID:"",v=d?d.fbTeamID:"";Pie.errorContext({userID:C,orgID:v},"AuthenticateFirebaseTokenAndRetrieveTeamInfo",y);let O=y?.message||y?.error?.errorString;throw new At("Unable to authenticate, please check your network connection and ensure your token is valid",O)})},"appContext"),3,Pie,s,{alterRetryStrategy:l=>({name:"backoff",base:aOi(Hl(l,!0),"QUOTA_EXCEEDED")?60:0}),logOnRetry:`${o} retrying`,logOnFailure:`${o} failed, exhausted allotted retry attempts`})};var U5n=r=>r.map(t=>t.toLowerCase()),Aq1=new Set(["accesstoken","authcode","clientsecret","code","codeverifier","id_token","keypair","newpassword","password","refresh_token","snowflakekeypair","snowflakepassword","token","uid",...U5n(nbe),...U5n(x3t),...U5n(ibe)]);var j5n=(r,t,n,i)=>{let o=Jxe(r.userCredentials,t);return{runTimeParameters:r.runTimeParameters,runDetails:r.runDetails,userCredentials:o,runStatus:i?"waitingToRun":"initializing",userID:n,runType:"deploy",kubernetesJobUuid:i,origin:r.origin}},AW0=async(r,t,n,i,o,s,a,l=!1)=>{let{teamInfo:{fbTeamID:u},rootRepository:c}=r,{runID:d,cleanupHeartbeat:p,logContext:f}=await Vhn(t,c.org(u),s),A=t.runDetails.version===2?t.runDetails.phasedNodeEdits:t.runDetails.dividedStepDataWithWorkspaceEdits,h=l?Promise.resolve():ujt({allWorkspaceData:t.runDetails.fromWorkspaceData,connectionManager:i,logContext:f,platform:o,renderer:a,runID:d,runInfo:t,nodesInRun:one(A),teamInfoAndFirebase:r,workspaceID:n},p);return l&&(await p(),await i.teardown()),{runCounter:d,runCompletion:h}},hW0=(r,t,n)=>{let{toWorkspaceID:i}=t;return ys(t,o=>{o.fromWorkspaceData.userConnections={[i]:{[n]:r}}})},zUs=async(r,t,n,i,o,s)=>{let{teamInfo:{fbTeamID:a,fbUserID:l},rootRepository:u}=t,c=parseInt(r.runDetails.environmentID),d=r.runDetails.version===2?r.runDetails.phasedNodeEdits:r.runDetails.dividedStepDataWithWorkspaceEdits,p=Math.max(...Object.values(d).map(A=>Object.keys(A).length)),f=r.runDetails.planID;pv.infoContext(o,"Initializing deploy! planId:",f);try{let A=await ZR(u,a,l,c,n,o),h=SAe(A,l),y=s?1:r.runDetails.parallelism,C=wG(p,y),{connectionManager:v,platform:O}=await CG(A,t,C,!0,o);r.runDetails=hW0(h,r.runDetails,l),pv.appContext(o,Let(A),"BECLI_HandleDeploy");let w=j5n(r,A,l,s),R=await AW0(t,w,c,v,O,o,i,!!s);return await gW0(u,t,R.runCounter,c,l,o),R}catch(A){throw pv.errorContext(o,`Error during deploy for plan ${f}:`,A,A instanceof Error?A.stack:void 0),A}},gW0=async(r,t,n,i,o,s)=>{try{let a=`run-${n}.predeploy`,l=`user/${o}/environment/${i}/workspacePreDeploy/${a}`,u=await r.org(t.teamInfo.fbTeamID).workspace(i).fetch();pv.appContext(s,"saving workspace data",u),await r.storage().uploadFile(l,u),pv.appContext(s,`Run ${n}: Saved pre-deploy workspace state to ${l}`)}catch(a){pv.errorContext(s,"Error while saving preDeploy workspace state: ",a)}},G5n=r=>{let{runDetails:t}=r;if(t.jobID&&(t.includeNodesSelector||t.excludeNodesSelector))throw new Error("Unable to process, don't provide a JobID and Node Include/Exclude Selector(s) for 1 Refresh Run")},mW0=(r,t)=>{for(let n in t)t[n]&&(r[n]=t[n])},yW0=(r,t)=>{for(let n in t)t[n]&&(r[n]=t[n])},W5n=(r,t,n,i)=>{let o=Jxe(r.userCredentials,t),s={runTimeParameters:r.runTimeParameters,runDetails:{...r.runDetails,jobID:PGe(r.runDetails.jobID)},userCredentials:o,runStatus:i?"waitingToRun":"initializing",userID:n,runType:"refresh",kubernetesJobUuid:i,origin:r.origin};return ub(s),s},SAe=(r,t)=>{if(r.kind==="databricks")return{connectionKind:"databricks",connectionType:r.authenticator,connectionDetails:{userID:t,path:r.path}};if(r.kind==="fabric")return{connectionKind:"fabric",connectionType:r.authenticator,connectionDetails:{userID:t,connectionString:r.connectionString}};let n={connectionDetails:{userID:t,user:r.user,role:r.role,warehouse:r.warehouse},connectionType:r.authenticator};return r.authenticator==="KeyPair"&&(n.connectionDetails.keyPair=r.keyPairKey),n},ZR=async(r,t,n,i,o,s)=>{let a=r.org(t).workspace(i),[{accessUrl:l,connectionAccount:u},c]=await Promise.all([a.fetch(),aU(a.user(n),s)]),d=u||"",p=l||null;if(j5t(c)){if(o.kind!=="databricks")throw new Fo(`Got a userContext for a ${o.kind}, but the connection info on the workspace was for ${c.connectionKind??"snowflake"}`);let f={...o,path:c.connectionDetails.path,host:d,environmentID:i};return yW0(f,o),f}else if(NGe(c)){if(o.kind!=="snowflake")throw new Fo(`Got a userContext for a ${o.kind}, but the connection info on the workspace was for ${c.connectionKind??"snowflake"}`);let f={accountName:d,accessUrl:p,user:c.connectionDetails.user,role:c.connectionDetails.role,warehouse:c.connectionDetails.warehouse,environmentID:i,orgID:t,authenticator:c.connectionType,kind:"snowflake"};return mW0(f,o),f}else if(Nlo(c)){if(o.kind!=="fabric")throw new Fo(`Got a userContext for a ${o.kind}, but the connection info on the workspace was for ${c.connectionKind??"snowflake"}`);let A=await(await Ob()).Get(SPr,{orgId:t,userId:n,workspaceId:i.toString()});if(!A)throw new At("Fabric connection credentials not found","CreateUserContext");return{...o,connectionString:d,credentials:A.sensitiveValue,environmentID:i}}else{let f=c;throw new Fo(`Unknown user connection kind ${f.connectionKind}`)}},H5n=r=>({user:r.snowflakeUsername,role:r.snowflakeRole,warehouse:r.snowflakeWarehouse,authenticator:"Cloud",kind:"snowflake"}),_Ae=r=>r.platformKind==="databricks"?r.databricksAuthType==="OAuthM2M"?{kind:"databricks",authenticator:r.databricksAuthType,clientID:r.clientID,secret:r.clientSecret}:r.databricksAuthType==="OAuthU2M"?{kind:"databricks",authenticator:r.databricksAuthType,accessToken:r.accessToken}:{kind:"databricks",authenticator:r.databricksAuthType,token:r.databricksAuthType==="Token"?r.token:void 0}:r.platformKind==="fabric"?{kind:"fabric",authenticator:r.fabricAuthType,connectionString:r.connectionString}:F$(r,o=>({user:o.snowflakeUsername,password:o.snowflakePassword,role:o.snowflakeRole,warehouse:o.snowflakeWarehouse,authenticator:"Basic",kind:"snowflake"}),o=>{if(o.snowflakeKeyPairKey===void 0)throw new At("No private key was provided, cannot perform key pair authentication with Snowflake");let s=o.snowflakeKeyPairPass?new Wc(o.snowflakeKeyPairPass):void 0,a=uGe(new Wc(o.snowflakeKeyPairKey),s);return{user:o.snowflakeUsername,keyPairKey:a.sensitiveValue,keyPairPass:o.snowflakeKeyPairPass,role:o.snowflakeRole,warehouse:o.snowflakeWarehouse,authenticator:"KeyPair",kind:"snowflake"}},o=>({warehouse:o.snowflakeWarehouse,authenticator:"OAuth",kind:"snowflake"}),H5n),UUs=async(r,t,n,i,o,s,a,l,u=!1,c)=>{pv.infoContext(s,"Securing workspace status and starting refresh:",i);let{teamInfo:{fbTeamID:d},rootRepository:p}=r;n.runDetails={...n.runDetails,refreshDescription:Ket(n.runDetails,a.jobs)};let{runID:f,cleanupHeartbeat:A,logContext:h}=await Vhn(n,p.org(d),s),y=u?Promise.resolve():Yet({allWorkspaceData:a,connectionManager:o,logContext:h,platform:t,renderer:c,runID:f,runInfo:n,nodesInRun:l,teamInfoAndFirebase:r,workspaceID:i},A);return u&&(await A(),await o.teardown()),{runCounter:f,runCompletion:y}},EW0=async(r,t,n,i)=>i?(pv.infoContext(n,"Refreshing job:",i),await r.workspace(t).job(i).fetch().then(()=>!0).catch(o=>{if(o instanceof eu)return!1;throw o})):(pv.infoContext(n,"No job ID, refreshing all steps"),!0),jUs=async(r,t,n,i,o,s)=>{let{teamInfo:{fbTeamID:a,fbUserID:l},rootRepository:u}=t,c=parseInt(r.runDetails.environmentID),d=u.org(a);r.runTimeParameters=await dW(u,a,c,r.runTimeParameters),G5n(r);let p=PGe(r.runDetails.jobID),f=EW0(d,c,o,p);try{let A=await ZR(u,a,l,c,n,o),h=SAe(A,l);if(pv.appContext(o,Let(A),"BECLI_HandleRefresh"),!await f)throw tOr(400,`Unable to start job ${p}`,`Job ${p} did not exist`);let y=W5n(r,A,l,s),C={steps:{},folders:{},jobs:{},macros:{},stepTypes:{}},v=new Set;s||(C=await C0e(+y.runDetails.environmentID,u.org(a)),C.userConnections[c][l]=h,v=$xe(y.runDetails,C));let O=s?1:wG(v.size,r.runDetails.parallelism),{connectionManager:w,platform:R}=await CG(A,t,O,!0,o);return UUs(t,R,y,c,w,o,C,v,!!s,i)}catch(A){throw pv.errorContext(o,"Error during refresh:",A),A}};var bW0=async(r,t,n)=>{let o=(await r.org(t).workspace(n).fetch()).runTimeParameters??"";return aRt(o)},dW=async(r,t,n,i)=>i?Jjt(i):bW0(r,t,n),V5n=async(r,t,n,i,o,s)=>{let a=Jxe(t.userCredentials,i),l=await dW(r,o.fbTeamID,parseInt(n.runDetails.environmentID),t.runTimeParameters);return n.runType==="refresh"&&(t.runDetails.forceIgnoreWorkspaceStatus!==void 0?n.runDetails.forceIgnoreWorkspaceStatus=t.runDetails.forceIgnoreWorkspaceStatus:n.runDetails.forceIgnoreWorkspaceStatus!==void 0&&delete n.runDetails.forceIgnoreWorkspaceStatus,n.runDetails.executor=t.runDetails.executor),{kubernetesJobUuid:s,origin:t.origin,reRunID:t.runDetails.runID,runDetails:n.runDetails,runStatus:s?"waitingToRun":"initializing",runTimeParameters:l,runType:"refresh",userCredentials:a,userID:o.fbUserID,version:3}},CW0=async(r,t,n,i,o,s,a)=>{let l="[ReRunRefresh]",{rootRepository:u,teamInfo:c,teamInfo:{fbUserID:d,fbTeamID:p}}=n,f=u.org(p),A=parseInt(t.runDetails.environmentID),h=await ZR(u,p,d,A,i,s),y=SAe(h,d),C=await V5n(u,r,t,h,c,a);if(!Q3t(C)){let H=`invalid rerun ID ${C.reRunID}`;throw pv.errorContext(s,l,H),new At(H)}let v=await C0e(+C.runDetails.environmentID,f);v.userConnections[A][d]=y;let O=await pGt(f,C,v),w=a?1:C.runDetails.parallelism,R=wG(O.size,w),{platform:P,connectionManager:z}=await CG(h,n,R,!0,s);return r.runTimeParameters=await dW(u,p,A,r.runTimeParameters),UUs(n,P,C,A,z,s,v,O,!!a,o)},GUs=async(r,t,n,i,o,s,a)=>{if(pv.appContext(s,"BECLI_HandleRerun"),t.runStatus!=="failed")throw new Error("Only failed jobs can be re-run!");if(k3t(t))return CW0(r,t,n,i,o,s,a);throw new Error(`Run type ${t.runType} is not eligible for re-run`)},WUs=r=>HUs(r,"runCounter"),IDe=r=>HUs(r,"environment ID"),HUs=(r,t)=>{let n=typeof r=="number"?r:parseInt(r||"");if(!r||isNaN(n))throw new Fo(`Specify a valid ${t}`,`400: ${n} is not valid`);return n};hd();var{PLAN:_it}=nt,JUs=async(r,t,n,i,o,s,a,l,u,c,d,p)=>{let f=`[performPlanCreation | enablePlanRendering=${r}]`,{measure:A,printSummary:h}=i4(f,d);try{let y=await A("plan calculation (total)",()=>kgn({disablePresync:l,enablePlanRendering:r,skipPlanContextUpload:p},t,n,i,o,s,a,u,c,d)),C=await A("calculate plan size",()=>nce(uz(y)));_it.appContext(d,f,`Processing for plan ${n} completed. Size was ${C}mb. Storing compressed data`);let v=await A("stringify & compress plan",async()=>{let O=await(0,VUs.stringify)({body:y});return(0,KUs.deflate)(O,{to:"string"})});await A("store completed plan",()=>f5s(c,o,i,n,v,d)),_it.appContext(d,f,`Storage for plan ${n} completed`)}catch(y){_it.errorContext(d,f,"Plan creation failed",y),await A5s(c,o,i,n,{status:"failed",error:y instanceof At?y.toTRunError():Hl(y)},d)}finally{h()}},XUs=async(r,t,n,i,o,s,a)=>{let l,u=i.org(t).workspace(n).user(r);try{let c=await aU(u,a);await z$(t,r,n,o,c,s);let d=_Ae(o),p=await ZR(i,t,r,n,d,a);l=await SGt(p,a,s)}catch(c){let{message:d,detail:p}=await IW0(c,u,a);throw new At(d,p)}return await l.testConnection(),l},IW0=async(r,t,n)=>{let i="[createPlan (endpoint)]";_it.errorContext(n,i,"Error authenticating user",r);let o;try{({connectionKind:o}=await t.fetch())}catch(l){_it.errorContext(n,i,"Couldn't fetch workspace user",l)}let{error:{errorString:s,errorDetail:a}}=Hl(r);return{message:`${o?(0,YUs.capitalize)(o)+" u":"U"}ser authentication unsuccessful: ${s}`,detail:a}};var $Us=Et(X3t());Ar();var US=r=>{let t;return process.env.COALESCE_RENDERER_UNIX_SOCKET_PATH?r.isFeatureEnabled("enablePyodideAsValidator")?t="dual":t="unix":t="pyodide",nt.RENDERER.info(`Getting a pool of kind ${t}`),$Us.GetPool(t)};yw();ki();Er();var ZUs=(r,t,n,i)=>{if(t.kind==="none")throw new DB(t.kind,"CreateActiveRunInfoFromDevRun");let o=Jxe(r.userCredentials,t),s={userID:n,userCredentials:o,runTimeParameters:r.runTimeParameters,runDetails:{...r.runDetails,jobID:PGe(r.runDetails.jobID)},runStatus:i?"waitingToRun":"initializing",runType:"devRun",kubernetesJobUuid:i,origin:r.origin};return ub(s),s};ST();Gl();vE();Gl();var vW0=new Map([["securetoken.googleapis.com",{path:"/securetoken",featureFlagName:"proxyGoogleAuth",enableByDefault:!1}],["identitytoolkit.googleapis.com",{path:"/identitytoolkit",featureFlagName:"proxyGoogleAuth",enableByDefault:!1}]]),ijs=r=>{let t=vW0.get(r.hostname);if(t&&Kge(t.enableByDefault,t.featureFlagName)){let n=new URL(Jge()),i=n.pathname;i.endsWith("/")&&(i=i.slice(0,-1)),r.pathname=i+t.path+r.pathname,r.hostname=n.hostname,r.protocol=n.protocol,r.port=n.port}return r},ojs=async(r=f1())=>{if(r){let t=await I1,n=t.interceptors.request.use(i=>(typeof i.url=="string"&&(i.url=ijs(new URL(i.url)).toString()),i));return()=>t.interceptors.request.eject(n)}else{let t=njs().register;return t({request:(n,i)=>{let o=n;return typeof n=="string"&&(o=ijs(new URL(n)).toString()),[o,i]}})}};Kf();var ajs=Et(Jre());ST();Er();F3r();var sjs=Et(Jre());Er();var vDe=class{constructor(t){this._storage=t}async uploadToStorage(t,n){let i=GLe(this._storage,t),o=(0,sjs.gzip)(new TextEncoder().encode(JSON.stringify(n)));await $ht(i,o,{contentType:"application/json",contentEncoding:"gzip"})}async downloadFromStorage(t){let n=async()=>{let i=await Cci(this._storage.ref(t));return JSON.parse(Buffer.from(i).toString())};return await this.handleStorageNotFoundError("download",n(),t)}async deleteFileFromStorage(t){await this.handleStorageNotFoundError("delete",this._storage.ref(t).delete(),t)}async checkIfStorageReferenceExists(t){try{return!!await this._storage.ref(t).getDownloadURL()}catch(n){if(n instanceof E1&&n.code==="storage/object-not-found")return!1;throw n}}async handleStorageNotFoundError(t,n,i){try{return await n}catch(o){throw o instanceof E1&&o.code==="storage/object-not-found"?new eu(`Could not ${t} file from storage (compat) - no file exists at provided path ${i}`):o}}};vE();ki();Gl();Kf();Ar();o4();var SDe=nt.FIREBASE,SW0=3,OXt=class extends vDe{_backendUrl;_bucketPath;_forceBypassProxy;_baseStorageUrl;_axiosClient;constructor(t){super(t.storage),this._bucketPath=`v0/b/${t.bucket}/o`,this._backendUrl=t?.backendUrl??oE(),this._forceBypassProxy=!!t?.forceBypassProxy,this._axiosClient=t?.axiosClient,this._baseStorageUrl=t.emulatorStorageHost?`http://${t.emulatorStorageHost}`:"https://firebasestorage.googleapis.com"}async uploadToStorage(t,n){if(!this.isProxyEnabled)return super.uploadToStorage(t,n);SDe.info(`Uploading file to '${t}' via proxy`);let i=(0,ajs.gzip)(new TextEncoder().encode(JSON.stringify(n))),o=await this.axios();try{let s=await o.post(this.determineProxyUrl(this._bucketPath,{name:t}),{contentEncoding:"gzip",contentType:"application/json",name:t},{headers:{Authorization:`Firebase ${await this.token()}`,"X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${i.length}`,"X-Goog-Upload-Header-Content-Type":"application/json","X-Goog-Upload-Protocol":"resumable"}}),a=s.headers["x-goog-upload-url"];Ph(!!a,"Missing upload URL in firebase cloud storage upload response","FIREBASE"),a=await this.determineProxyUrl(a);let l=+s.headers["x-goog-upload-chunk-granularity"]||262144,c=i.length,d=0;for(;c>l;){let p=Math.min(c,l),f=d+p,A=i.slice(d,f);await this.uploadChunk(a,A,d,!1),c-=p,d+=p}await this.uploadChunk(a,i.slice(d),d,!0)}catch(s){throw this.handleAxiosError(s)}}async downloadFromStorage(t){if(!this.isProxyEnabled)return super.downloadFromStorage(t);SDe.info(`Downloading file from '${t}' via proxy`);let n=await this.axios();try{return(await n.get(this.determineProxyUrl(`${this._bucketPath}/${encodeURIComponent(t)}`,{alt:"media"}),{headers:{Authorization:`Firebase ${await this.token()}`}})).data}catch(i){throw this.handleAxiosError(i)}}async deleteFileFromStorage(t){if(!this.isProxyEnabled)return super.deleteFileFromStorage(t);SDe.info(`Deleting file at '${t}' via proxy`);let n=await this.axios();try{await n.delete(this.determineProxyUrl(`${this._bucketPath}/${encodeURIComponent(t)}`,{alt:"media"}),{headers:{Authorization:`Firebase ${await this.token()}`}})}catch(i){throw this.handleAxiosError(i)}}async checkIfStorageReferenceExists(t){if(!this.isProxyEnabled)return super.checkIfStorageReferenceExists(t);SDe.info(`Checking if file at '${t}' exists via proxy`);let n=await this.axios();try{return await n.get(this.determineProxyUrl(`${this._bucketPath}/${encodeURIComponent(t)}`),{headers:{Authorization:`Firebase ${await this.token()}`}}),!0}catch(i){if(Em(i)&&i.status===404)return!1;throw this.handleAxiosError(i)}}determineProxyUrl(t,n){t=t.replace(/^https:\/\/firebasestorage\.googleapis\.com\//,"");let i="?";if(n)for(let o in n){let s=n[o];s!==void 0&&(t+=`${i}${o}=${encodeURIComponent(s)}`,i="&")}return`${this.proxyUrl}?gcsforward=${encodeURIComponent(t)}`}get isProxyEnabled(){let t=!1;return typeof window<"u"&&(t=window.location.hostname==="localhost"||/(^|\.)local\./.test(window.location.hostname)),!t&&!this._forceBypassProxy&&this._baseStorageUrl==="https://firebasestorage.googleapis.com"&&$1().featureFlags.isFeatureEnabled("proxyGoogleStorage")}async uploadChunk(t,n,i,o){await O1(async()=>{SDe.info(`Uploading ${n.length} bytes at offset ${i} to '${t}'`),await(await this.axios()).post(t,n,{headers:{Authorization:`Firebase ${await this.token()}`,"X-Goog-Upload-Command":`upload${o?", finalize":""}`,"X-Goog-Upload-Offset":`${i}`}})},SW0,SDe,{})}get proxyUrl(){return`${this._backendUrl}/gcs`}async token(){return cbe(this._storage.app.auth().currentUser)}async axios(){return this._axiosClient||(this._axiosClient=await I1),this._axiosClient}handleAxiosError(t){if(Em(t)){let i=t.response?.data?.message??t.message;switch(t.status){case 403:return new tE(i);case 404:return new eu(i);default:return new At(i)}}return t}};cY();aEt();aEt();yle();rY();Er();var ID=q_.getTracer("repository"),Y5n=class{constructor(t){this.transaction=t}async get(t){return vbr(t.path),ID.startActiveSpan(`get ${t.path}`,async n=>{n.setAttribute("repositoryType","web"),n.setAttribute("path",t.path),n.setAttribute("operation","get");let i=await this.transaction.get(t);return n.end(),i})}set(t,n){return Sbr(t.path),ID.startActiveSpan(`set ${t.path}`,i=>(i.setAttribute("repositoryType","web"),i.setAttribute("path",t.path),i.setAttribute("operation","set"),this.transaction.set(t,n),i.end(),this))}async update(t,n){return _br(t.path),ID.startActiveSpan(`update ${t.path}`,i=>(i.setAttribute("repositoryType","web"),i.setAttribute("path",t.path),i.setAttribute("operation","update"),this.transaction.update(t,n),i.end(),this))}delete(t){return Obr(t.path),ID.startActiveSpan(`delete ${t.path}`,n=>(n.setAttribute("repositoryType","web"),n.setAttribute("path",t.path),n.setAttribute("operation","delete"),this.transaction.delete(t),n.end(),this))}getQuery(t){throw new bc("getQuery is not supported with the web sdk.")}},TXt=class r extends Sit{constructor(n,i=new vDe(n.storage())){super();this.app=n;this.storage=i}get db(){return this.app.firestore()}currentUser(){return this.db.app.auth().currentUser?.uid}currentLogContext(){return{userID:this.db.app.auth().currentUser?.uid}}collectionRef(n,i){return n.collection(i)}data(n){return n.data()}docRef(n,i){return n.doc(i)}exists(n){return n.exists}hasPendingWrites(n){return n.metadata.hasPendingWrites}async getDoc(n,i){let o=n;return vgt(o.path),ID.startActiveSpan(`get ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","get");let a=await o.get();if(!a.metadata.hasPendingWrites)return s.end(),a;let l=Kui(o,i?.pendingWritesTimeoutMs);return s.end(),l})}async addDoc(n,i){let o=n;Igt(o.path),await ID.startActiveSpan(`set ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","set"),await o.set(i),s.end()})}async saveDoc(n,i){let o=n;return Igt(n.path),ID.startActiveSpan(`set ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","set"),await o.set(i),s.end()})}async updateDoc(n,i){let o=n;return Ibr(n.path),ID.startActiveSpan(`update ${n.path}`,async s=>{s.setAttribute("repositoryType","web"),s.setAttribute("path",n.path),s.setAttribute("operation","update"),await o.update(i),s.end()})}async deleteDoc(n){let i=n;return Cbr(n.path),ID.startActiveSpan(`delete ${n.path}`,async o=>{o.setAttribute("repositoryType","web"),o.setAttribute("path",n.path),o.setAttribute("operation","delete"),await i.delete(),o.end()})}createQuery(n,i){let o=n;if(i?.where?.filter(s=>s[2]!==void 0).forEach(s=>o=o.where(r.replaceIDSentinel(s[0]),s[1],s[2])),i?.orderBy?.forEach(s=>o=o.orderBy(s[0],s[1])),i?.startingFrom!==void 0&&(i.orderBy?.length?o=o.startAfter(i.startingFrom):(o=o.orderBy(Kd.firestore.FieldPath.documentId()),o=o.startAfter(i.startingFrom.toString()))),i?.limit&&(o=o.limit(i.limit)),i?.selectFields)throw new bc("Selecting specific fields is not supported with the Firebase web SDK");return o}runQuery(n){return ID.startActiveSpan("get query.unknown",async i=>{i.setAttribute("repositoryType","web"),i.setAttribute("path","query.unknown"),i.setAttribute("operation","get");let o=await n.get();return i.end(),o})}onDocSnapshot(n,i,o){return n.onSnapshot(i,o)}onCollectionSnapshot(n,i,o){return this.onQuerySnapshot(n,i,o)}onQuerySnapshot(n,i,o){return n.onSnapshot(i,o)}snapShotChanges(n){return n.docChanges()}runTransaction(n){return this.db.runTransaction(i=>n(new Y5n(i)))}batch(){return this.db.batch()}saveDocBatch(n,i,o){n.set(i,o)}updateDocBatch(n,i,o){n.update(i,o)}deleteDocBatch(n,i){n.delete(i)}commitBatch(n){return Tbr(),ID.startActiveSpan("batch",async i=>{i.setAttribute("repositoryType","web"),i.setAttribute("operation","batch commit"),await n.commit(),i.end()})}getServerTimestampSentinel(){return Kd.firestore.FieldValue.serverTimestamp()}getDeleteSentinel(){return Kd.firestore.FieldValue.delete()}uploadToStorage(n,i){return this.storage.uploadToStorage(n,i)}downloadFromStorage(n){return this.storage.downloadFromStorage(n)}deleteFileFromStorage(n){return this.storage.deleteFileFromStorage(n)}getCount(n){throw new bc("getCount is not supported with the web sdk.")}async checkIfStorageReferenceExists(n){return this.storage.checkIfStorageReferenceExists(n)}static replaceIDSentinel(n){return n instanceof yqe?Kd.firestore.FieldPath.documentId():n}};ST();var K5n=new Map,_W0=r=>$1().featureFlags.getStringValue("serviceBackedRepositories","").split(",").includes(r)?"service":"firebase",ljs=(r,t)=>{r||(r=Kd.app());let n=K5n.get(r.name);return n||(n=wbn(new TXt(r,t),_W0),K5n.set(r.name,n)),n},cjs=()=>{K5n.clear()};var OW0=0,TW0=async(r,t)=>{try{await wTr(t);let n=r+OW0++,i=yze().initializeApp(t,n);RTr(i,!1);let o=await UP("/scheduler/generateLoginToken",null,r),{customToken:s,uid:a}=o.data;await i.auth().signInWithCustomToken(s);let l;return WB()||(l=new OXt({storage:i.storage(),backendUrl:t.emulatorInfo?.storage,bucket:t.storageBucket})),{Firebase:i,rootRepository:ljs(i,l),uid:a}}catch(n){throw pv.error("GetOrSetupFirebase",n),n}},wXt=async(r,t,n)=>{let o=await s4(n.origin).GetDatabase(),s=j3t().instance,a=P0r(n.hostname);return process.env.SCHEDULER_ADDRESS=n.origin,s.isInitialized||await s.initializeDefaultFlags(P0r(n.hostname)),WY({logContext:$1().logContext,featureFlags:s.currentFlags},async()=>(s.currentFlags,await ojs(),await PTi(o),qUs(r,t,l=>TW0(l,o),async(l,u,c)=>(a&&(l.subdomain={id:a}),YC&&(l.version={id:YC.version}),await s.initialize({context:l,rootRepository:()=>u,firebaseAuth:c}),s.currentFlags))))};fW();var wW0=async(r,t,n,i,o)=>{Ho.infoContext(o,`Starting deploy job coa-${r}`);let s=Glo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),a=new f_e(s),l=IDe(a.runDetails.environmentID),u={...o,runID:i,workspaceID:l},{teamInfo:{fbTeamID:c,fbUserID:d},rootRepository:p}=t,f=p.org(c),A=await aU(f.workspace(l).user(d),u),h=$1().featureFlags;await z$(c,d,l,a.userCredentials,A,h);let y=await ZR(p,c,d,l,_Ae(a.userCredentials),u),C=j5n(a,y,d,r);C.id=i;let v=f.run(i);await v.updateHeartbeat({runStatus:"initializing"});let O=Z1e(u,v,C.runType);try{let w=a.runDetails.version===2?a.runDetails.phasedNodeEdits:a.runDetails.dividedStepDataWithWorkspaceEdits,R=Math.max(...Object.values(w).map(H=>Object.keys(H).length)),{connectionManager:P,platform:z}=await CG(y,t,wG(R,a.runDetails.parallelism),!1,u);return ujt({allWorkspaceData:C.runDetails.fromWorkspaceData,connectionManager:P,logContext:u,platform:z,renderer:US(h),runID:i,runInfo:C,nodesInRun:one(w),teamInfoAndFirebase:t,workspaceID:l},O)}catch(w){try{await O()}catch(R){Ho.error("Unable to clean up hearbeat after handling error",w,"innerError",R)}throw w}},RW0=async(r,t,n,i,o)=>{Ho.infoContext(o,`Starting refresh job coa-${r}`);let a=Vlo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),l=IDe(a.runDetails.environmentID),u={...o,runID:i,workspaceID:l},{teamInfo:{fbTeamID:c,fbUserID:d},rootRepository:p}=t,f=p.org(c),A=await aU(f.workspace(l).user(d),u),h=$1().featureFlags;await z$(c,d,l,a.userCredentials,A,h);let y=await ZR(p,c,d,l,_Ae(a.userCredentials),u);a.runTimeParameters=await dW(p,c,l,a.runTimeParameters),G5n(a);let C=W5n(a,y,d,r);C.id=i;let v=f.run(i);await v.updateHeartbeat({runStatus:"initializing"});let O=Z1e(u,v,C.runType);try{let w=await C0e(l,f),R=$xe(C.runDetails,w);C.runDetails.refreshDescription=Ket(C.runDetails,w.jobs),await v.merge({runDetails:C.runDetails});let P=SAe(y,d);w.userConnections[l][d]=P;let{connectionManager:z,platform:H}=await CG(y,t,wG(R.size,a.runDetails.parallelism),!1,u);return Yet({allWorkspaceData:w,connectionManager:z,logContext:u,platform:H,renderer:US(h),runID:i,runInfo:C,nodesInRun:R,teamInfoAndFirebase:t,workspaceID:l},O)}catch(w){try{await O()}catch(R){Ho.error("Unable to clean up hearbeat after handling error",w,"innerError",R)}throw w}},BW0=async(r,t,n,i,o)=>{let s="[CloudReRun]";Ho.infoContext(o,`Starting re-run job coa-${r}`);let a=Klo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),l=new A_e(a);ub(l);let{teamInfo:u,teamInfo:{fbTeamID:c,fbUserID:d},rootRepository:p}=t,f=p.org(c),A=WUs(l.runDetails.runID),h=await f.run(A).fetch();if(!h)throw new Error(`Could not find runInfo for teamID=${c}, oldRunID=${A}`);if(!k3t(h))throw new Error("Run is not eligible for rerun or a dev run");let y=IDe(h.runDetails.environmentID),C={...o,runID:i,workspaceID:y},v=await aU(f.workspace(y).user(d),C),O=$1().featureFlags;await z$(c,d,y,l.userCredentials,v,O);let w=await ZR(p,c,d,y,_Ae(l.userCredentials),C),R=await V5n(p,l,h,w,u,r);if(R.id=i,!Q3t(R)){let J=`Invalid rerun ID ${R.reRunID}`;throw Ho.errorContext(C,s,J),new Fo(J)}let P=IDe(R.runDetails.environmentID);ou("RUNNER_BACKEND",P===y,C,"Unexpected mismatch between workspace IDs for re-run and original run; workspace for re-run:",P,"workspace for original run:",y);let z=f.run(i);await z.updateHeartbeat({runStatus:"initializing"});let H=Z1e(C,z,R.runType);try{let J=await C0e(P,f),K=Ket(R.runDetails,J.jobs);await z.merge({runDetails:{...R.runDetails,refreshDescription:K}});let V=await pGt(f,R,J),F=SAe(w,d);J.userConnections[P][d]=F;let{connectionManager:X,platform:Y}=await CG(w,t,wG(V.size,R.runDetails.parallelism),!1,C);return Yet({allWorkspaceData:J,connectionManager:X,logContext:C,platform:Y,renderer:US(O),runID:i,runInfo:R,nodesInRun:V,teamInfoAndFirebase:t,workspaceID:P},H)}catch(J){try{await H()}catch(K){Ho.error("Unable to clean up hearbeat after handling error",J,"innerError",K)}}},xW0=async(r,t,n,i,o)=>{let s="CloudDevRun:";Ho.infoContext(o,s,`Starting dev run job coa-${r}`);let a=Wlo.assert(n,{logContext:o,logArea:"CLI",errorMessage:"failed to validate request body"}),l=IDe(a.runDetails.environmentID),u={...o,runID:i,workspaceID:l},{rootRepository:c,teamInfo:{fbTeamID:d,fbUserID:p}}=t,f=c.org(d),A=await aU(f.workspace(l).user(p),u),h=$1().featureFlags;await z$(d,p,l,a.userCredentials,A,h);let y=await ZR(c,d,p,l,_Ae(a.userCredentials),u),C=f.devRun(i);await C.updateHeartbeat({runStatus:"initializing"});let v={...ZUs(a,y,p,r),id:i},O=Z1e(u,C,v.runType);try{let w=await C0e(l,f);w.userConnections[l][p]=SAe(y,p);let R=$xe(v.runDetails,w),{connectionManager:P,platform:z}=await CG(y,t,wG(R.size,a.runDetails.parallelism),!1,u);return YSs({allWorkspaceData:w,connectionManager:P,logContext:u,platform:z,renderer:US(h),runID:i,runInfo:v,nodesInRun:R,teamInfoAndFirebase:t,workspaceID:l},O)}catch(w){try{await O()}catch(R){Ho.errorContext(u,s,"unable to clean up heartbeat with error",R,"following run error",w)}throw w}},MW0=async(r,t,n,i,o)=>{let s="[CloudPlan]",{rootRepository:a,teamInfo:{fbTeamID:l,fbUserID:u}}=t,c=$1().featureFlags,{currentWorkspaceData:d,desiredWorkspaceData:p,disablePresync:f,enablePlanRendering:A,workspaceID:h,parameters:y,userCredentials:C,skippedBeforeCollection:v}=n,O={...o,planID:i,workspaceID:h},w={currentWorkspaceData:d,desiredWorkspaceData:p,skippedBeforeCollection:v},R=await XUs(u,l,h,a,C,c,O);Ho.infoContext(O,s,`Starting plan job coa-${r}`),await JUs(!!A,US(c),i,h,u,R,y,f,w,a,O,c.isFeatureEnabled("skipPlanContextUpload"))},fjs=async r=>{let t="[CloudEntry]";if(Ho.debug("Cloud entrypoint."),!process.env.SCHEDULER_ADDRESS){let c="No SCHEDULER_ADDRESS defined for cloud entrypoint";throw Ho.emerg(c),new At(c)}let n=await wXt(process.env.COALESCE_COA_CLOUD_TOKEN,void 0,new URL(process.env.SCHEDULER_ADDRESS)),{rootRepository:i,teamInfo:{fbTeamID:o,fbUserID:s},featureFlags:a}=n,l={kubernetesJobUuid:r,orgID:o,userID:s};Ho.infoContext(l,t,"authenticated user");let u;try{await RBs(i,o)&&(ICr(),Ho.debugContext(l,t,"super Debug enabled"));let d=process.env.COALESCE_COA_CLOUD_REQUEST_PATH;if(!d){let C="COALESCE_COA_CLOUD_REQUEST_PATH not set!";throw Ho.emergContext(l,t,C),new At(C)}Ho.infoContext(l,t,"downloading request data from",d);let p=await i.storage().downloadFile(d),f=p9(p);Ho.infoContext(l,t,"finished parsing request data as JSON completed; deleting stored request",f),await i.storage().deleteFile(d),Ho.infoContext(l,t,"finished deleting stored request; dispatching cloud run");let A=process.env.COALESCE_COA_CLOUD_ACTION,{cloudAction:h,actionID:y}=DW0(A,l);u=WY({userID:s,orgID:o,logContext:l,featureFlags:a},()=>h(r,n,p,y,l))}catch(c){Ho.errorContext(l,t,"error starting coa run",c);let d={error:{errorString:pOi(c),errorDetail:""},statusCode:500};c instanceof At?(d.error=c.toTRunError().error,d.statusCode=c.statusCode()):(d.error.errorString=c.error?.errorString??d.error.errorString,d.error.errorDetail=c.error?.errorDetail??d.error.errorDetail,d.statusCode=c.statusCode??d.statusCode),await dO(1);return}try{Ho.infoContext(l,t,"job started, waiting for completion"),await u,Ho.infoContext(l,t,"job completed without exception")}catch(c){Ho.errorContext(l,t,"exception thrown during job",c),await dO(1)}await dO(0)},DW0=(r,t)=>{let n="[performCloudAction]",i;if(r==="plan"){let s=process.env.COALESCE_COA_CLOUD_PLAN_ID;if(!s){let a=`Plan ID was ${s}`;throw Ho.emergContext(t,n,a),new At(a)}i=s,t.planID=s}else{let s=process.env.COALESCE_COA_CLOUD_RUN_COUNTER,a=parseInt(s);if(Number.isNaN(a)){let l=`Unable to parse runCounter: ${s}!`;throw Ho.emergContext(t,n,l),new At(l)}i=a}let o;switch(r){case"deploy":o=wW0;break;case"refresh":o=RW0;break;case"rerun":o=BW0;break;case"devRun":o=xW0;break;case"plan":o=MW0;break;default:{let s=r;throw Ho.emergContext(t,n,`received unexpected COALESCE_COA_CLOUD_ACTION value ${s}`),new At(`Error: COALESCE_COA_CLOUD_ACTION is invalid! value=${s}`)}}return{cloudAction:o,actionID:i}};fW();var wjs=Et(Tjs(),1),{program:yU1,createCommand:EU1,createArgument:bU1,createOption:CU1,CommanderError:IU1,InvalidArgumentError:Rjs,InvalidOptionArgumentError:vU1,Command:Bjs,Argument:SU1,Option:jS,Help:_U1}=wjs.default;cY();var bXs=Et(Go());var F9e=Et(require("fs")),CXs=Et(Njs());Er();var Pjs={openapi:"3.0.3",info:{version:"1.0.0",title:"Coalesce API",description:"REST API for performing operations with the Coalesce backend."},servers:[{url:"https://app.coalescesoftware.io",description:"US primary"},{url:"https://app.eu.coalescesoftware.io",description:"Europe primary"},{url:"https://app.australia-southeast1.gcp.coalescesoftware.io",description:"Australia primary"},{url:"https://app.us-east-1.aws.coalescesoftware.io",description:"US AWS US East"},{url:"https://app.us-east-1.aws.privatelink.coalescesoftware.io",description:"US AWS US East with PrivateLink"},{url:"https://app.us-west-2.aws.coalescesoftware.io",description:"US AWS US West"},{url:"https://app.us-west-2.aws.privatelink.coalescesoftware.io",description:"US AWS US West with PrivateLink"},{url:"https://app.northamerica-northeast1.gcp.coalescesoftware.io",description:"Canada Primary"},{url:"https://app.westus2.azure.coalescesoftware.io",description:"US Azure West 2"},{url:"https://app.eastus2.azure.coalescesoftware.io",description:"US Azure East 2"}],security:[{BearerAuth:[]}],"x-coa-private-pointers":["/paths/~1api~1v2~1render","/paths/~1api~1v2~1render~1health","/components/schemas/PackageDefinition","/components/schemas/RenderRequestV2"],components:{schemas:{DatabaseInfo:{type:"object",required:["apiKey","authDomain","projectId","storageBucket","messagingSenderId","appId","measurementId"],properties:{apiKey:{type:"string"},authDomain:{type:"string"},projectId:{type:"string"},storageBucket:{type:"string"},messagingSenderId:{type:"string"},appId:{type:"string"},measurementId:{type:"string"},emulatorInfo:{type:"object",required:["auth","firestore","storage"],properties:{auth:{type:"string"},firestore:{type:"string"},storage:{type:"string"}}}}},EnvironmentsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of environment information.",anyOf:[{type:"array",items:{$ref:"#/components/schemas/Environment"}},{type:"array",items:{$ref:"#/components/schemas/EnvironmentSummary"}}]},total:{type:"integer",description:"The size of the result set."},startingFrom:{type:"string",description:"The cursor value used in the request."},limit:{type:"integer",description:"The requested page size."},next:{type:"number",nullable:!0,description:"The field value where the next page of result starts after."}}},FeatureFlagsClientConfig:{type:"object",description:"Information a client needs to connect to the feature flag service.",required:["launchDarklyClientID"],properties:{launchDarklyClientID:{type:"string"}}},FeatureFlagsValues:{type:"object",description:"Feature flag values.",properties:{featureFlags:{additionalProperties:{oneOf:[{type:"boolean"},{type:"string"},{type:"number"},{type:"object"},{type:"array"}]}}},required:["featureFlags"]},ProjectsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of project information.",type:"array",items:{$ref:"#/components/schemas/Project"}}}},ProjectResponse:{type:"object",required:["data"],properties:{data:{description:"Information about a project.",$ref:"#/components/schemas/Project"}}},TypesenseConfigResponse:{description:"Summary of configuration data for Typesense in a given org.","x-coa-private":!0,type:"object",required:["typesenseKey","typesenseHosts"],properties:{typesenseKey:{description:"The Typesense access key scoped to a users org.",type:"string"},typesenseHosts:{description:"The Typesense host address(es) for our cluster(s).",type:"array",items:{type:"string"}}}},EnvironmentSummary:{type:"object",description:"Summary information about an environment.",additionalProperties:!1,properties:{createdAt:{type:"string",format:"date-time"},createdBy:{$ref:"#/components/schemas/UserSummary"},id:{type:"string",description:"The Environment ID."},name:{type:"string",description:"Name of the Environment."},project:{type:"string",description:"The Project ID."},status:{$ref:"#/components/schemas/EnvironmentHealth",description:"Status of the Environment."}},required:["createdAt","id","name","project","status"]},ErrorResponse:{description:"Error detail in addition to the HTTP status code and text.",type:"object",required:["error"],properties:{error:{$ref:"#/components/schemas/Error"}}},NodesResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of nodes for an environment.",anyOf:[{type:"array",items:{$ref:"#/components/schemas/NodeSummary"}},{type:"array",items:{$ref:"#/components/schemas/Node"}}]},total:{type:"integer",description:"The size of the result set."},startingFrom:{type:"string",description:"The cursor value used in the request."},limit:{type:"integer",description:"The requested page size."},next:{type:"string",nullable:!0,description:"The field value where the next page of result starts after."}}},NodeSummary:{type:"object",properties:{database:{type:"string",description:"The Snowflake database name."},id:{type:"string",description:"The Coalesce Node ID."},locationName:{type:"string",description:"The Storage Mapping location."},name:{type:"string",description:"The Node name."},nodeType:{$ref:"#/components/schemas/NodeType"},schema:{type:"string",description:"The database schema name."}},required:["database","id","locationName","name","nodeType","schema"]},OrderByDirection:{description:"The sort order for query results.",type:"string",enum:["asc","desc"]},PackageCreateEntity:{description:"A single package entity to be created.","x-coa-private":!0,type:"object",properties:{macros:{type:"string"},dependencies:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageDependency"}},nodeTypes:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageNodeType"}}},required:["macros","dependencies","nodeTypes"]},PackageDependency:{description:"A package dependency.","x-coa-private":!0,type:"object",required:["version","macros","dependencies","releaseID","alias","packageID"],properties:{packageID:{type:"string",minLength:1},alias:{type:"string"},version:{type:"string"},releaseID:{type:"string",minLength:1},macros:{type:"string"},dependencies:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageDependency"}}},example:{name:"foo",version:"1.2.3",macros:"{% macro bar() %}hello,{% endmacro %}",nodeTypes:{},dependencies:{dep:{name:"baz",version:"1.1.1",macros:"{% macro bar() %}world!{% endmacro %}",dependencies:{}}}}},PackageEntityTagV1:{description:"Identifies the package from which the entity came. (Deprecated, see PackageEntityTagV2).","x-coa-private":!0,type:"object",required:["id","version"],properties:{id:{type:"string"},version:{type:"string"}}},PackageEntityTagV2:{description:"Identifies the package from which the entity came.","x-coa-private":!0,type:"object",required:["id","releaseID"],properties:{id:{type:"string"},releaseID:{type:"string"}}},PackageMacro:{description:"A macro in a package.","x-coa-private":!0,type:"string"},PackageNodeType:{description:"A node type in a collection of nodeTypes to be packaged.","x-coa-private":!0,type:"object",required:["name","version","isDisabled","metadata","id"],properties:{name:{type:"string"},version:{type:"number"},id:{type:"string"},isDisabled:{type:"boolean"},metadata:{type:"object"}}},PackageCreateReleaseInfo:{description:"Package release information for a create operation.","x-coa-private":!0,type:"object",properties:{changeLog:{type:"string"},version:{type:"string"},certified:{type:"boolean"}},required:["changeLog","version"]},PackageCreateEntities:{description:"Entities that are part of a package release.","x-coa-private":!0,required:["dependencies","nodeTypes","macros"],properties:{dependencies:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageDependency"}},nodeTypes:{type:"object",additionalProperties:{$ref:"#/components/schemas/PackageNodeType"}},macros:{type:"string"}}},RunsOrderBy:{description:"The field used to sort query results.",type:"string",enum:["id","runStartTime","runEndTime"],default:"id"},RunsResponse:{description:"A collection of runs.",type:"object",required:["limit","orderBy","orderByDirection","data"],properties:{limit:{description:"The maximum number of runs returned by this query.",type:"integer"},orderByDirection:{$ref:"#/components/schemas/OrderByDirection"},orderBy:{$ref:"#/components/schemas/RunsOrderBy"},data:{description:"A collection of runs.",anyOf:[{type:"array",items:{$ref:"#/components/schemas/RunSummary"}},{type:"array",items:{$ref:"#/components/schemas/RunInfo"}}]}}},RunResultsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of run results.",type:"array",items:{$ref:"#/components/schemas/RunResult"}}}},RunSummary:{type:"object",properties:{id:{description:"The run ID.",type:"integer"},reRunID:{description:"If this is a re-run, the ID of the original operation.",type:"string"},runStartTime:{description:"The datetime the run started.",type:"string",format:"date-time"},runEndTime:{description:"The datetime the run ended.",type:"string",format:"date-time"},runType:{$ref:"#/components/schemas/RunType"},runStatus:{$ref:"#/components/schemas/RunStatus"},environmentID:{description:"The environment in which the run operation was applied.",type:"string"},runFailureReason:{description:"Information about the cause of a run failure.",type:"string"}},required:["id","runType","runStatus"]},UserEnvironmentRolesResponse:{type:"array",items:{$ref:"#/components/schemas/UserEnvironmentRoles"},additionalProperties:!1},UserProjectRolesResponse:{type:"array",items:{$ref:"#/components/schemas/UserProjectRoles"},additionalProperties:!1},UserRolesResponse:{type:"array",items:{$ref:"#/components/schemas/UserOrgRoles"},additionalProperties:!1},FivetranProjectsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of project information.",type:"array",items:{$ref:"#/components/schemas/FivetranProject"}}}},FivetranProjectResponse:{type:"object",required:["data"],properties:{data:{description:"Fivetran project data.",$ref:"#/components/schemas/FivetranProject"}}},FivetranJobsResponse:{type:"object",required:["data"],properties:{data:{description:"A collection of job information.",type:"array",items:{$ref:"#/components/schemas/FivetranJob"}}}},FivetranJobHistoryResponse:{type:"object",required:["data"],properties:{data:{description:"Fivetran job history data.",$ref:"#/components/schemas/FivetranJobHistory"}}},FivetranRefreshJobResponse:{type:"object",required:["data"],properties:{data:{description:"A fivetran job",$ref:"#/components/schemas/FivetranJobHistory"}}},MetricsItem:{type:"object",required:["name","tags","count"],properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}},count:{type:"integer"}}},MetricsRequest:{type:"object",required:["metrics"],properties:{metrics:{type:"array",items:{$ref:"#/components/schemas/MetricsItem"}}}},BaseEnvironment:{type:"object",description:"Environments are used for deploying your data pipelines to production, test, QA, and other environments.",additionalProperties:!0,properties:{connectionAccount:{type:"string",description:"The account name for the environment connection."},defaultStorageMapping:{type:"string",nullable:!0},description:{type:"string",description:"The Environment description."},name:{type:"string",description:"The Environment name."},oauthEnabled:{type:"boolean",description:"If OAuth is enabled."},runTimeParameters:{type:"object",additionalProperties:!0,description:"The default Environment parameters. Parameters changed during deploy will not show here."},tagColors:{$ref:"#/components/schemas/TagColor"},project:{type:"string"}},required:["name","oauthEnabled","project"]},Environment:{description:"Environments are used for deploying your data pipelines to production, test, QA, and other environments.",allOf:[{$ref:"#/components/schemas/BaseWorkspaceEnv"},{type:"object",additionalProperties:!0,properties:{runTimeParameters:{type:"object",additionalProperties:!0,description:"The default Environment parameters. Parameters changed during deploy will not show here."},currentMappings:{$ref:"#/components/schemas/EnvironmentStorageLocationMappings"}},required:["createdAt","id","status"]}]},EnvironmentCreateRequest:{"x-coa-private":!0,type:"object",description:"Initial values to set on a newly created environment.",allOf:[{$ref:"#/components/schemas/BaseEnvironment"},{type:"object",properties:{mappings:{$ref:"#/components/schemas/EnvironmentStorageLocationMappings"}},additionalProperties:!0}]},EnvironmentHealth:{type:"string",enum:["Deleting","Deploying","Failed Deploy","Failed Dev Run","Failed Refresh","Initializing","Refreshing","Running Dev Run","Waiting"]},EnvironmentStorageLocationMappings:{type:"object",description:"The Storage Mapping name.",additionalProperties:{type:"object",properties:{database:{type:"string",description:"The database name."},schema:{type:"string",description:"The database schema."}}}},BaseProject:{type:"object",description:"A project groups environments and workspaces for easier management and access control.",additionalProperties:!0,properties:{platformKind:{$ref:"#/components/schemas/PlatformKind"},description:{type:"string"},gitRepoURL:{type:"string"},name:{type:"string"}},required:["name"]},Project:{description:"A project groups environments and workspaces for easier management and access control.",allOf:[{$ref:"#/components/schemas/BaseProject"},{type:"object",additionalProperties:!0,properties:{createdAt:{type:"string",format:"date-time"},createdBy:{$ref:"#/components/schemas/UserSummary"},updatedAt:{type:"string",format:"date-time"},updatedBy:{$ref:"#/components/schemas/UserSummary"},id:{type:"string"},status:{$ref:"#/components/schemas/ProjectStatus"},workspaces:{type:"array",items:{$ref:"#/components/schemas/WorkspaceSummary"}}},required:["createdAt","updatedAt","id","status","name"]}]},ProjectCreateRequest:{$ref:"#/components/schemas/BaseProject"},ProjectStatus:{type:"string",enum:["active","deleted"]},UserSummary:{type:"object",description:"Summary information about a user.",additionalProperties:!1,properties:{id:{type:"string",description:"The user ID."},firstName:{type:"string",description:"User first name."},lastName:{type:"string",description:"User last name."},email:{type:"string"},accountType:{type:"string",enum:["SSO","normal"]}},required:["id"]},FirestoreWebTimestamp:{type:"object",description:"Timestamp from the web Firestore SDK.",additionalProperties:!1,properties:{seconds:{type:"number"},nanoseconds:{type:"number"}},required:["seconds","nanoseconds"]},FirestoreAdminTimestamp:{type:"object",description:"Timestamp from the admin Firestore SDK.",additionalProperties:!1,properties:{_seconds:{type:"number"},_nanoseconds:{type:"number"}},required:["_seconds","_nanoseconds"]},FirestoreTimestamp:{type:"object",description:"Timestamp from either the web admin Firestore SDKs.",oneOf:[{$ref:"#/components/schemas/FirestoreWebTimestamp"},{$ref:"#/components/schemas/FirestoreAdminTimestamp"}]},PlatformKind:{type:"string",enum:["snowflake","databricks","fabric"]},Error:{type:"object",additionalProperties:!1,properties:{errorString:{description:"The error message.",type:"string"},errorDetail:{description:"Additional detail about the error.",type:"string"}},required:["errorString"]},Node:{type:"object",oneOf:[{$ref:"#/components/schemas/SourceNode"},{$ref:"#/components/schemas/SQLNode"}]},NodeCreateRequest:{type:"object",properties:{nodeType:{$ref:"#/components/schemas/NodeType"},predecessorNodeIDs:{default:[],type:"array",items:{type:"string"},description:"The IDs of the nodes that are predecessors to this node. It can also be empty if it has no predecessors"}},additionalProperties:!1,required:["nodeType","predecessorNodeIDs"]},AliasToStepIDMapping:{type:"object",additionalProperties:{type:"string"}},AppliedColumnTests:{type:"object",description:"Will return `hasNull` or `isDistinct` as true or false if testing is enabled.",additionalProperties:{type:"boolean"}},BaseNode:{type:"object",additionalProperties:!0,properties:{database:{type:"string",description:"The Snowflake database name."},description:{type:"string",description:"The Node description."},id:{type:"string",description:"The Node ID."},locationName:{type:"string",description:"The Storage Mapping location."},name:{type:"string",description:"The Node name."},nodeType:{$ref:"#/components/schemas/NodeType"},schema:{type:"string",description:"The Snowflake schema name."}},required:["database","description","id","locationName","name","nodeType","schema"]},ColumnMetadata:{type:"object",additionalProperties:!1,properties:{appliedColumnTests:{$ref:"#/components/schemas/AppliedColumnTests"},columnID:{type:"string",description:"The column ID."},columnReferences:{items:{$ref:"#/components/schemas/IntermediateColumnRefResult"},type:"array"},config:{type:"object",description:"Returns any configuration options from the Node Config Tab.",additionalProperties:!0},dataType:{type:"string",description:"Column data type."},defaultValue:{type:"string",description:"The default column value."},description:{type:"string",description:"The column description."},hashDetails:{$ref:"#/components/schemas/HashMetadata"},hashedColumns:{type:"array",items:{$ref:"#/components/schemas/ColumnReference"}},isBusinessKey:{type:"boolean",description:"Tags the column as a business key."},isChangeTracking:{type:"boolean",description:"Tags the column as a change tracking column in type 2 dimensions."},isSurrogateKey:{type:"boolean",description:"Tags the column as a surrogate key, e.g. DIM_CUSTOMER_KEY."},keyColumnType:{type:"string",enum:["None","primaryBusinessKey","surrogateKey"]},name:{type:"string",description:"The column name."},nullable:{type:"boolean",description:"If the column can contain null values."},primaryKey:{description:"Tags the column as a primary key.",type:"boolean"},sources:{items:{$ref:"#/components/schemas/SourceColumnReferenceV1"},type:"array"},systemColumnType:{type:"string",enum:["None","sysCreateDate","sysCurrentFlag","sysEndDate","sysStartDate","sysUpdateDate","sysVersion"]},transform:{type:"string"},uniqueKey:{type:"boolean"}},required:["columnID","dataType","description","name","nullable"]},ColumnReference:{type:"object",additionalProperties:!1,properties:{columnID:{type:"string",description:"Column ID of the source column."},nodeID:{type:"string",description:"Node ID of the source columm."}},required:["columnID","nodeID"]},CustomSQL:{type:"object",additionalProperties:!1,properties:{customSQL:{type:"string"}},required:["customSQL"]},HashAlgorithm:{type:"string",enum:["MD5","SHA1","SHA256"]},HashMetadata:{type:"object",additionalProperties:!1,properties:{hashAlgorithm:{$ref:"#/components/schemas/HashAlgorithm"},hashType:{enum:["ChangeHash","Hash","HubHash","LinkHash","None"],type:"string"},hubHashes:{items:{$ref:"#/components/schemas/ColumnReference"},type:"array"}},required:["hashAlgorithm"]},IntermediateColumnRefResult:{additionalProperties:!1,properties:{columnName:{type:"string"},tableName:{type:"string",nullable:!0}},required:["columnName","tableName"],type:"object"},JoinCondition:{type:"object",additionalProperties:!1,properties:{joinCondition:{type:"string"}},required:["joinCondition"]},NodeType:{anyOf:[{type:"string",enum:["Dimension","Fact","Hub","Link","Satellite","Source","Stage","View","persistentStage"]},{type:"string"}]},RefLink:{type:"object",additionalProperties:!1,properties:{locationName:{type:"string"},nodeName:{type:"string"}},required:["locationName","nodeName"]},SourceColumnReference:{anyOf:[{$ref:"#/components/schemas/SourceColumnReferenceV1"},{$ref:"#/components/schemas/SourceColumnReferenceV2"}]},SourceColumnReferenceV1:{type:"object",additionalProperties:!1,properties:{columnReferences:{items:{$ref:"#/components/schemas/ColumnReference"},type:"array"},transform:{type:"string",description:"Returns the SQL of any column transformations."}},required:["columnReferences","transform"]},SourceColumnReferenceV2:{type:"object",additionalProperties:!1,properties:{transform:{type:"string",description:"Returns the SQL of any column transformations."}},required:["transform"]},SourceMap:{additionalProperties:!1,properties:{aliases:{$ref:"#/components/schemas/AliasToStepIDMapping"},customSQL:{$ref:"#/components/schemas/CustomSQL"},dependencies:{items:{$ref:"#/components/schemas/RefLink"},type:"array"},join:{$ref:"#/components/schemas/JoinCondition"},name:{type:"string"},noLinkRefs:{items:{$ref:"#/components/schemas/RefLink"},type:"array"}},required:["dependencies","join","name","noLinkRefs"],type:"object"},RunStatus:{enum:["canceled","completed","failed","initializing","rendering","running","waitingToRun"],type:"string"},RunType:{enum:["deploy","refresh"],type:"string"},DatabricksUserConnectionType:{type:"string",enum:["Token","Cloud","OAuthU2M","OAuthM2M"]},FabricUserConnectionType:{type:"string",enum:["oauth"]},SnowflakeUserConnectionType:{type:"string",enum:["Basic","Cloud","KeyPair","OAuth"]},DeployRunDetails:{type:"object",additionalProperties:!1,description:"Deployment run details.",properties:{canceled:{type:"boolean",description:"If the run was canceled."},deployCommit:{type:"string",description:"The full commit hash."},deployCommitMessage:{type:"string",description:"The commit message."},environmentID:{type:"string",description:"The Environment ID for this run."},parallelism:{type:"integer",description:"The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse."},nodesInRun:{type:"integer",description:"The number of Nodes deployed."}},required:["deployCommit","environmentID"]},RefreshRunDetails:{type:"object",additionalProperties:!1,description:"Refresh run details.",properties:{canceled:{type:"boolean",description:"If the run was canceled."},environmentID:{type:"string",description:"The Environment ID for this run."},excludeNodesSelector:{type:"string",description:"A selector string of nodes to exclude."},forceIgnoreEnvironmentStatus:{type:"boolean"},includeNodesSelector:{type:"string",description:"A selector string of nodes to include."},jobID:{type:"integer",description:"The Job ID."},parallelism:{type:"integer",description:"The parallelism parameter determines how many nodes are processed simultaneously (in parallel) by the Snowflake compute warehouse."},refreshDescription:{type:"string",description:"The Job name."},nodesForRefresh:{type:"integer"},nodesInRun:{type:"integer",description:"The number of Nodes deployed."},executor:{type:"string"}},required:["environmentID"]},RunDetails:{description:"Detailed information about a run.",anyOf:[{$ref:"#/components/schemas/DeployRunDetails"},{$ref:"#/components/schemas/RefreshRunDetails"}]},RunInfo:{description:"The full details of a run, without the run results.",type:"object",additionalProperties:!1,properties:{id:{type:"integer"},reRunID:{type:"string",description:"If this is a re-run, the ID of the original operation."},runDetails:{$ref:"#/components/schemas/RunDetails"},runEndTime:{format:"date-time",type:"string",description:"The datetime when the run ended."},runHistory:{items:{type:"integer"},type:"array"},runStartTime:{format:"date-time",type:"string",description:"The datetime the run started."},runStatus:{$ref:"#/components/schemas/RunStatus"},runTimeParameters:{type:"object",description:"The default Environment parameters. Parameters changed during deploy will not show here.",additionalProperties:!0},runType:{$ref:"#/components/schemas/RunType"},userCredentials:{oneOf:[{$ref:"#/components/schemas/SnowflakeUserCredentials"},{$ref:"#/components/schemas/DatabricksUserCredentials"},{$ref:"#/components/schemas/FabricUserCredentials"}]},userID:{type:"string"},projectID:{type:"string"},hasTestFailures:{type:"boolean",description:"Whether the run has test failures."},version:{type:"integer"}},required:["id","runDetails","runStatus","runTimeParameters","runType","projectID"]},FabricUserCredentials:{description:"Information about the Fabric account used to perform a run.",type:"object",additionalProperties:!1,properties:{fabricConnectionString:{type:"string"},fabricAuthType:{$ref:"#/components/schemas/FabricUserConnectionType"},platformKind:{type:"string"}},required:["fabricConnectionString","fabricAuthType"]},DatabricksUserCredentials:{description:"Information about the Databricks account used to perform a run.",type:"object",additionalProperties:!1,properties:{databricksHost:{type:"string"},databricksAuthType:{$ref:"#/components/schemas/DatabricksUserConnectionType"},databricksPath:{type:"string"}},required:["databricksHost","databricksAuthType","databricksPath"]},SnowflakeUserCredentials:{description:"Information about the Snowflake account used to perform a run.",type:"object",additionalProperties:!1,properties:{snowflakeAccount:{type:"string"},snowflakeAuthType:{$ref:"#/components/schemas/SnowflakeUserConnectionType"},snowflakeRole:{type:"string"},snowflakeUsername:{type:"string"},snowflakeWarehouse:{type:"string"}},required:["snowflakeAccount","snowflakeAuthType","snowflakeUsername"]},QueryResult:{type:"object",additionalProperties:!1,properties:{endTime:{type:"string",format:"date-time"},error:{$ref:"#/components/schemas/Error"},isRunning:{type:"boolean",description:"If the queried run is still running."},name:{type:"string",description:"The name of the Stage the query ran on."},queryID:{type:"string"},rowsDeleted:{type:"integer"},rowsInserted:{type:"integer"},rowsUpdated:{type:"integer"},sql:{type:"string",description:"The SQL query run during the stage."},startTime:{type:"string",format:"date-time"},status:{type:"string",description:"The query status."},success:{type:"boolean",description:"If the query results were run successfully."},type:{type:"string",enum:["sql","sqlTest"]},warehouse:{type:"string",description:"Name of the warehouse."}},required:["isRunning","name","sql","status","success"]},RunResult:{type:"object",additionalProperties:!1,description:"The result output describing each query processed during a run.",properties:{isRunning:{type:"boolean",description:"If the queried run is still running."},name:{type:"string"},nodeID:{type:"string"},runState:{type:"string"},hasTestFailures:{type:"boolean"},origin:{$ref:"#/components/schemas/RunOrigins"},queryResults:{description:"The query result returns the status of different stages such as Delete Table or Rename Table. See the queryResults name for the stage.",items:{$ref:"#/components/schemas/QueryResult"},type:"array"},renderQueryResult:{$ref:"#/components/schemas/QueryResult"}},required:["isRunning","name","nodeID","queryResults"]},RunOrigins:{enum:["API","CLI","UI","fivetranAPI"]},OrgRoles:{type:"object",description:"Specifies role assignments.",required:["organizationRoles","projects"],properties:{organizationRoles:{description:"The organization roles assigned to the user.",type:"array",items:{type:"string"}},projects:{description:"A dictionary of project role assignments keyed by project ID.",type:"object",additionalProperties:{$ref:"#/components/schemas/ProjectRoles"}}},additionalProperties:!0},ProjectRoles:{type:"object",description:"Specifies project role assignments.",required:["projectRoles","environments"],properties:{projectRoles:{type:"array",items:{type:"string"}},environments:{description:"A dictionary of environment role assignments keyed by environment ID.",type:"object",additionalProperties:{$ref:"#/components/schemas/EnvironmentRoles"}}},additionalProperties:!0},EnvironmentRoles:{type:"object",description:"Specifies environment role assignments.",required:["environmentRoles"],properties:{environmentRoles:{description:"The environment roles assigned to the user.",type:"array",items:{type:"string"}}},additionalProperties:!0},UserOrgRoles:{description:"The roles assigned to a user.",allOf:[{$ref:"#/components/schemas/OrgRoles"},{type:"object",required:["user","organizationRoles","projects"],properties:{user:{$ref:"#/components/schemas/UserSummary"}},additionalProperties:!0}]},UserProjectRoles:{description:"The project roles assigned to the user.",allOf:[{$ref:"#/components/schemas/ProjectRoles"},{type:"object",required:["user","projectRoles","environments"],properties:{user:{$ref:"#/components/schemas/UserSummary"}},additionalProperties:!0}]},UserEnvironmentRoles:{description:"The environment roles assigned to the user.",allOf:[{$ref:"#/components/schemas/EnvironmentRoles"},{type:"object",required:["user"],properties:{user:{$ref:"#/components/schemas/UserSummary"}},additionalProperties:!0}]},FivetranProject:{type:"object",properties:{id:{type:"string"},name:{type:"string"},createdAtUtc:{type:"string",format:"date-time"},updatedAtUtc:{type:"string",format:"date-time"},extras:{type:"object",description:"Additional data, if applicable"}},required:["id","name","createdAtUtc","updatedAtUtc"]},FivetranJob:{type:"object",properties:{id:{type:"string"},projectId:{type:"string"},name:{type:"string"},createdAtUtc:{type:"string",format:"date-time"},updatedAtUtc:{type:"string",format:"date-time"},extras:{type:"object",description:"Additional data, if applicable"}}},FivetranJobHistory:{type:"object",properties:{id:{type:"string"},jobId:{type:"string"},status:{$ref:"#/components/schemas/FivetranJobStatus"},startedAtUtc:{type:"string",format:"date-time",nullable:!0},endedAtUtc:{type:"string",format:"date-time",nullable:!0},logs:{type:"array",items:{type:"string"}},extras:{type:"object",description:"Additional data, if applicable"}}},FivetranJobStatus:{type:"string",description:"Possible statuses of jobs",enum:["SCHEDULING","RUNNING","SUCCEEDED","TERMINATING","FAILED"]},FivetranJobRunCause:{type:"string",description:"Possible run cause",enum:["Triggered by Fivetran"]},JobName:{type:"string",minLength:1,maxLength:100,description:"Name of the job"},JobRequest:{"x-coa-private":!0,type:"object",additionalProperties:!1,description:"Request body for creating or updating a job",properties:{name:{$ref:"#/components/schemas/JobName"},includeSelector:{type:"string",description:"A selector string of nodes to include"},excludeSelector:{type:"string",description:"A selector string of nodes to exclude"}},required:["name","includeSelector","excludeSelector"]},Job:{type:"object",description:"A Coalesce job.",additionalProperties:!0,properties:{id:{type:"string",description:"The Job ID."},name:{type:"string",description:"The Job name."},includeSelector:{type:"string",description:"A selector string of nodes to include."},excludeSelector:{type:"string",description:"A selector string of nodes to exclude."},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"}},required:["id","name","includeSelector","excludeSelector","createdAt","updatedAt"]},RegistryPackageReleaseResult:{description:"A single release of a package in the registry.",type:"object",properties:{createdAt:{type:"string",format:"date-time"},createdBy:{type:"string"},updatedBy:{type:"string"},updatedAt:{type:"string",format:"date-time"},version:{type:"string"},changeLog:{type:"string"},releaseID:{type:"string"},storagePath:{type:"string"},privacy:{type:"string",enum:["public","private","unlisted"]}},required:["createdAt","updatedAt","version","changeLog","releaseID","storagePath","privacy"]},RegistryPackageResult:{description:"A single package in the registry.",type:"object",properties:{updatedBy:{type:"string"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},publisherID:{type:"string"},description:{type:"string"},org:{type:"string"},latestRelease:{type:"string"},overview:{type:"string"},featured:{type:"boolean"},tags:{type:"array",minItems:0,items:{type:"string"}},certified:{type:"boolean"},packageID:{type:"string"},id:{type:"string"},platformKind:{type:"string",enum:["fabric","snowflake","databricks"]}},required:["name","description","org","latestRelease","overview","tags","featured","certified","publisherID","packageID","id","platformKind"]},ColumnDescription:{type:"object",properties:{name:{type:"string",description:"The name of the column."},description:{type:"string",description:"The generated description of the column."}},required:["name","description"]},ColumnDescriptions:{type:"object",description:"A dictionary of column descriptions keyed by column ID.",additionalProperties:{$ref:"#/components/schemas/ColumnDescription"}},ColumnDescriptionsRequest:{type:"object",properties:{workspaceID:{type:"number",description:"The development workspace ID."},nodeID:{type:"string",description:"The node ID.",minLength:1}},required:["workspaceID","nodeID"]},NodeDescription:{type:"object",description:"An object containing node description",properties:{description:{type:"string",description:"AI generated description of the node.",minLength:1}},required:["description"]},NodeDescriptionRequest:{type:"object",properties:{workspaceID:{type:"number",description:"The workspace ID."},nodeID:{type:"string",description:"The node ID.",minLength:1}},required:["workspaceID","nodeID"]},CreatePlanRequest:{type:"object",required:["parameters","runDetails","userCredentials"],properties:{parameters:{type:"object"},runDetails:{type:"object",required:["currentWorkspaceDataFilePath","desiredWorkspaceDataFilePath","disablePresync","environmentID","planID"],properties:{currentWorkspaceDataFilePath:{type:"string"},desiredWorkspaceDataFilePath:{type:"string"},disablePresync:{type:"boolean"},enablePlanRendering:{type:"boolean"},environmentID:{type:"string"},planID:{type:"string"},skippedBeforeCollection:{type:"boolean",default:!1}}},userCredentials:{type:"object"}}},PlanRequestAcceptedResponse:{type:"object",required:["message","planID"],properties:{message:{type:"string"},planID:{type:"string"}}},PlanResponse:{type:"object",required:["planStorageFilePath"],properties:{planStorageFilePath:{type:"string"}}},InFlightPlanResponse:{type:"object",required:["status"],properties:{status:{type:"string",enum:["planning"]}}},GitCommitMessageRequest:{type:"object",properties:{files:{type:"array",items:{type:"object",properties:{path:{type:"string",description:"File path relative to repository root"},before:{type:"string",description:"File content before changes"},after:{type:"string",description:"File content after changes"}},required:["path","before","after"]},description:"Array of files being committed with their before/after content",minItems:1}},required:["files"]},GitCommitMessageResponse:{type:"object",properties:{message:{type:"string",description:"AI generated git commit message (Soft max 200 chars, Hard max 400 chars)",maxLength:400}},required:["message"]},WriteInfo:{type:"object",required:["entityType","writeType","data"],properties:{entityType:{anyOf:[{type:"string",enum:["node","workspace","run","subgraph","job","macro","nodeType","installedPackage"]}]},writeType:{anyOf:[{type:"string",enum:["save","delete","merge"]}]},data:{type:"object",required:["id","version"],properties:{id:{anyOf:[{type:"string"},{type:"number"}]},version:{anyOf:[{type:"string"},{type:"number"}]}}}}},ChatRequest:{type:"object",required:["messages","threadId","userMessageKey","assistantMessageKey","subgraphContext"],properties:{messages:{type:"array",description:"An array of message objects representing the conversation history.",items:{type:"object",required:["role","content"],properties:{role:{type:"string",enum:["user","assistant"],description:"The role of the message sender."},content:{type:"string",description:"The text content of the message."}}}},systemPrompt:{type:"string",description:"Optional system prompt"},responseSchema:{type:"object",description:"Optional schema for structuring the response format"},threadId:{type:"string",description:"Identifier for the conversation thread"},userMessageKey:{type:"string",description:"Identifier for the latest user message in this request"},assistantMessageKey:{type:"string",description:"Identifier for the expected assistant message response"},subgraphContext:{type:"object",description:"The subgraph context data used for AI operations"}}},ChatResponse:{type:"object",required:["text"],properties:{text:{type:"string",description:"AI-generated response text"},usage:{type:"object",properties:{inputUsage:{type:"number"},outputUsage:{type:"number"},unit:{type:"string",enum:["token","char"]}}}}},SubgraphName:{type:"string",minLength:1,maxLength:100,description:"Name of the subgraph"},SubgraphRequest:{"x-coa-private":!0,type:"object",additionalProperties:!1,description:"Request body for creating or updating a subgraph",properties:{name:{$ref:"#/components/schemas/SubgraphName"},steps:{type:"array",description:"Array of node IDs in the subgraph",items:{type:"string",maxLength:64}}},required:["name","steps"]},Subgraph:{"x-coa-private":!0,type:"object",additionalProperties:!1,description:"A partial collection of nodes from the node graph, allowing easier viewing and editing of a portion of a large graph.",properties:{id:{type:"string",description:"Unique identifier for the subgraph"},name:{$ref:"#/components/schemas/SubgraphName"},steps:{type:"array",description:"Array of node IDs in the subgraph",items:{type:"string",maxLength:64}},version:{type:"integer",enum:[1],default:1,description:"Version of the subgraph schema"},folderCounter:{type:"string",description:"ID for the subgraph - technically deprecated, but required for now"},createdAt:{type:"string",format:"date-time",description:"Date and time the subgraph was created"},updatedAt:{type:"string",format:"date-time",description:"Date and time the subgraph was last updated"},createdBy:{type:"string",description:"ID of the user who created the subgraph"},updatedBy:{type:"string",description:"ID of the user who last updated the subgraph"}},required:["id","name","steps","version","folderCounter"]},DatabricksWarehouse:{type:"object",description:"A minimal Databricks SQL warehouse configuration returned from GetDatabricksWarehouse.",properties:{id:{type:"string",description:"The unique identifier of the warehouse"},name:{type:"string",description:"The name of the warehouse"},odbc_params:{type:"object",description:"The connection parameters for the warehouse",properties:{path:{type:"string",description:"The path for the SQL warehouse"}},required:["path"]}},required:["id","name","odbc_params"]},DatabricksWarehouseResponse:{type:"object",description:"Response containing a list of Databricks SQL warehouses.",properties:{warehouses:{type:"array",items:{$ref:"#/components/schemas/DatabricksWarehouse"}}},required:["warehouses"]},BaseWorkspaceEnv:{type:"object",description:"A workspace is a collection of resources that are used to develop, test, and deploy code.",additionalProperties:!0,properties:{connectionAccount:{type:"string",description:"The Snowflake account name."},defaultStorageMapping:{type:"string",nullable:!0},description:{type:"string",description:"The Workspace description."},name:{type:"string",description:"The Workspace name."},oauthEnabled:{type:"boolean",description:"If Snowflake OAuth is enabled."},tagColors:{$ref:"#/components/schemas/TagColor"},project:{type:"string",description:"The Project ID."},createdAt:{type:"string",format:"date-time"},createdBy:{$ref:"#/components/schemas/UserSummary"},updatedAt:{type:"string",format:"date-time"},currentGitBranch:{type:"string",description:"The branch most recently run on this environment."},currentGitCommit:{type:"string"},currentGitURL:{type:"string"},currentlyRunningJobs:{description:"An array of any running Jobs. If there are not Jobs running, this will return empty.",type:"array",items:{type:"integer"}},id:{type:"string"},deployedCommit:{type:"string",description:"The most recently deployed commit ID."},status:{$ref:"#/components/schemas/WorkspaceEnvHealth"},platformKind:{$ref:"#/components/schemas/PlatformKind"}},required:["createdAt","updatedAt","id","name","oauthEnabled","project","status"]},Workspace:{allOf:[{$ref:"#/components/schemas/BaseWorkspaceEnv"},{type:"object",additionalProperties:!0,properties:{mappingsV1:{type:"string"},runTimeParameters:{type:"string"},jobs:{type:"array",items:{$ref:"#/components/schemas/Job"}}}}]},WorkspaceSummary:{type:"object",description:"A set of minimal workspace data.",additionalProperties:!0,properties:{id:{type:"string"},name:{type:"string"},project:{type:"string",description:"The Project ID."},status:{$ref:"#/components/schemas/WorkspaceEnvHealth"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},jobs:{type:"array",items:{$ref:"#/components/schemas/Job"}}},required:["createdAt","createdBy","updatedAt","id","name","status","project"]},WorkspaceEnvHealth:{type:"string",enum:["Deleting","Deploying","Failed Deploy","Failed Refresh","Initializing","Refreshing","Waiting"]},TagColor:{type:"object",description:"The tag color from the Environment settings.",additionalProperties:!1,properties:{backgroundColor:{type:"string"},textColor:{type:"string"}}},SourceColumnMetadata:{type:"object",additionalProperties:!1,properties:{columns:{items:{$ref:"#/components/schemas/ColumnMetadata"},type:"array"},join:{description:"The join condition of the source node.",type:"object",additionalProperties:!1,properties:{joinCondition:{type:"string",description:"Returns SQL from the Join tab."}},required:["joinCondition"]},sourceMapping:{type:"array",items:{$ref:"#/components/schemas/SourceMap"}}},required:["columns"]},SourceNode:{type:"object",description:"A source node returned by the API.",allOf:[{$ref:"#/components/schemas/BaseNode"},{type:"object",properties:{metadata:{$ref:"#/components/schemas/SourceColumnMetadata"},table:{description:"The table name of the source node.",type:"string"}},required:["metadata","table"]}]},MaterializationType:{anyOf:[{type:"string",enum:["table","view"]},{type:"string"}]},NodeTest:{type:"object",additionalProperties:!1,properties:{continueOnFailure:{type:"boolean"},description:{type:"string"},name:{type:"string"},runOrder:{$ref:"#/components/schemas/TestRunOrder"},templateString:{type:"string"}},required:["continueOnFailure","description","name","runOrder","templateString"]},SQLNode:{type:"object",description:"A SQL node returned by the API.",allOf:[{$ref:"#/components/schemas/BaseNode"},{type:"object",properties:{config:{$ref:"#/components/schemas/UserConfig"},isMultisource:{type:"boolean"},materializationType:{$ref:"#/components/schemas/MaterializationType"},metadata:{$ref:"#/components/schemas/SQLNodeMetadata"},overrideSQL:{type:"boolean"}},required:["config","isMultisource","materializationType","metadata","overrideSQL"]}]},SQLNodeMetadata:{type:"object",additionalProperties:!1,properties:{appliedNodeTests:{default:[],items:{$ref:"#/components/schemas/NodeTest"},type:"array"},columns:{default:[],items:{$ref:"#/components/schemas/ColumnMetadata"},type:"array"},cteString:{type:"string"},description:{type:"string"},destinationName:{type:"string"},enabledColumnTestIDs:{type:"array",items:{type:"string"}},mapping:{type:"object",additionalProperties:{anyOf:[{type:"object"},{type:"string"},{type:"number"},{type:"boolean"}]}},materializationOption:{type:"string"},sourceMapping:{type:"array",items:{$ref:"#/components/schemas/SourceMap"}}},required:["appliedNodeTests","columns","enabledColumnTestIDs","sourceMapping"]},TestRunOrder:{type:"string",enum:["After","Before"]},UserConfig:{type:"object",additionalProperties:{anyOf:[{type:"object"},{type:"string"},{type:"number"},{type:"boolean"}]}}},responses:{CoaTagResponse:{description:"The coa image tag being used.","x-coa-private":!0,content:{"application/json":{schema:{type:"string"}}}},CoaTagReportResponse:{description:"A report of what coa image tags are being used for what orgs.","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["defaultTag","deviatingOrgs"],properties:{defaultTag:{type:"string"},deviatingOrgs:{type:"array",items:{type:"object",required:["orgID","orgName","tag","image"],properties:{orgID:{type:"string"},orgName:{type:"string"},tag:{type:"string"},image:{type:"string"}}}}}}}}},CustomTokenResponse:{description:"The Coalesce custom token response","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["customToken"],properties:{customToken:{description:"A Coalesce token",type:"string"}}}}}},EnvironmentResponse:{description:"Information about an environment.",content:{"application/json":{schema:{$ref:"#/components/schemas/Environment"}}}},EnvironmentsResponse:{description:"A collection of environment information.",content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentsResponse"}}}},JobSummaryResponse:{description:"Information about a job.",content:{"application/json":{schema:{$ref:"#/components/schemas/Job"}}}},ProjectsResponse:{description:"A collection of project information.",content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectsResponse"}}}},FeatureFlagsClientConfigResponse:{description:"Information used by the client to connect to feature flags service.","x-coa-private":!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FeatureFlagsClientConfig"}}}},FeatureFlagsResponse:{description:"Feature flags.","x-coa-private":!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FeatureFlagsValues"}}}},FivetranProjectsResponse:{description:"A collection of project information.",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranProjectsResponse"}}}},FivetranJobsResponse:{description:"A collection of Fivetran job information.",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranJobsResponse"}}}},FivetranJobHistoryResponse:{description:"Fivetran job history data.",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranJobHistoryResponse"}}}},FivetranRefreshJobResponse:{description:"The Fivetran start job refresh response.",content:{"application/json":{schema:{type:"object",required:["data"],properties:{data:{description:"Fivetran job history for the new run.",$ref:"#/components/schemas/FivetranJobHistory"}}}}}},NodeResponse:{description:"A node for an environment.",content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},NodesResponse:{description:"A collection of nodes for an environment.",content:{"application/json":{schema:{$ref:"#/components/schemas/NodesResponse"}}}},PackageResponse:{description:"A package registration","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["releaseID","packageID","storePath","publisherID"],properties:{releaseID:{type:"string",minLength:1},publisherID:{type:"string"},packageID:{type:"string",minLength:1},storePath:{type:"string"}}}}}},PackageResponseV2:{description:"A package","x-coa-private":!0,content:{"application/json":{schema:{type:"object",required:["org","packageID","name","description","overview","tags","featured","certified","platformKind"],properties:{org:{type:"string"},name:{type:"string"},description:{type:"string"},overview:{type:"string"},tags:{type:"array",minItems:0,items:{type:"string"}},featured:{type:"boolean"},certified:{type:"boolean"},packageID:{type:"string"},id:{type:"string"},publisherID:{type:"string"},latestRelease:{type:"string"},platformKind:{type:"string",enum:["snowflake","fabric","databricks"]}}}}}},PackageUpdateResponse:{description:"Successful package update","x-coa-private":!0,content:{"application/json":{schema:{type:"string"}}}},AllRegistryPackagesResult:{description:"A list of all packages in the registry.",content:{"application/json":{schema:{type:"array",minItems:0,items:{$ref:"#/components/schemas/RegistryPackageResult"}}}}},AllRegistryPackageReleasesResult:{description:"A list of all releases for a single package in the registry.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/RegistryPackageReleaseResult"}}}}},RegistryPackageResult:{description:"A single package in the registry.",content:{"application/json":{schema:{$ref:"#/components/schemas/RegistryPackageResult"}}}},RegistryPackageReleaseResult:{description:"A single release for a single package in the registry.",content:{"application/json":{schema:{$ref:"#/components/schemas/RegistryPackageReleaseResult"}}}},ProjectResponse:{description:"Information about a project.",content:{"application/json":{schema:{$ref:"#/components/schemas/Project"}}}},RunResultsResponse:{description:"A collection of results for a deploy or refresh run.",content:{"application/json":{schema:{$ref:"#/components/schemas/RunResultsResponse"}}}},RunResponse:{description:"A single run.",content:{"application/json":{schema:{$ref:"#/components/schemas/RunInfo"}}}},RunsResponse:{description:"A collection of runs.",content:{"application/json":{schema:{$ref:"#/components/schemas/RunsResponse"}}}},DatabaseInfoResponse:{description:"Information required to connect to the Coalesce database.",content:{"application/json":{schema:{$ref:"#/components/schemas/DatabaseInfo"}}}},secretExists:{"x-coa-private":!0,description:"Specifies whether or not a value for the secret exists.",content:{"application/json":{schema:{type:"boolean"}}}},ValidHostname:{"x-coa-private":!0,description:"A whitelisted version of the passed hostname.",content:{"application/json":{schema:{type:"string"}}}},TypesenseConfigurationResponse:{"x-coa-private":!0,description:"The typesense configuration data for a given org.",content:{"application/json":{schema:{$ref:"#/components/schemas/TypesenseConfigResponse"}}}},UserEnvironmentRoleResponse:{description:"A user's environment role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentRoles"}}}},UserEnvironmentRolesResponse:{description:"A collection of user environment role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/UserEnvironmentRolesResponse"}}}},UserProjectRoleResponse:{description:"A user's project role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectRoles"}}}},UserProjectRolesResponse:{description:"A collection of user project role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/UserProjectRolesResponse"}}}},UserRoleResponse:{description:"A user's role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/OrgRoles"}}}},UserRolesResponse:{description:"A collection of user role information.",content:{"application/json":{schema:{$ref:"#/components/schemas/UserRolesResponse"}}}},ColumnDescriptionsResponse:{description:"The AI generated column description.",content:{"application/json":{schema:{$ref:"#/components/schemas/ColumnDescriptions"}}}},NodeDescriptionResponse:{description:"The AI generated node description.",content:{"application/json":{schema:{$ref:"#/components/schemas/NodeDescription"}}}},PlanRequestAcceptedResponse:{description:"The request has been accepted for processing, but processing has not been completed.",content:{"application/json":{schema:{$ref:"#/components/schemas/PlanRequestAcceptedResponse"}}}},PlanResponse:{description:"A collection of plan information.",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/PlanResponse"},{$ref:"#/components/schemas/InFlightPlanResponse"}]}}}},AlreadyExistsError:{description:"The requested resource already exists.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},BadGatewayError:{description:"The server received an error from an upstream system.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},ForbiddenError:{description:"The client is not permitted to perform the requested operation.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},GatewayTimeoutError:{description:"The server did not receive a response in time from an upstream system.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},InternalServerError:{description:"The server encountered an unexpected condition that prevented it from fulfilling the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},InvalidRequestError:{description:"The request was invalid.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},NotFoundError:{description:"The requested resource could not be found.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},ServiceUnavailableError:{description:"The service is currently unavailable.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},Unauthorized:{description:"User lacks authorization to perform this action.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}},GitCommitMessageResponse:{description:"AI generated git commit message",content:{"application/json":{schema:{$ref:"#/components/schemas/GitCommitMessageResponse"}}}}},parameters:{orderByDirection:{name:"orderByDirection",description:"The sort order for query results.",in:"query",schema:{description:"The sort order for query results.",type:"string",enum:["asc","desc"],default:"desc"},required:!1},secretType:{"x-coa-private":!0,description:"The name of the secret type.",name:"secretType",in:"path",schema:{type:"string"},required:!0},context:{description:"Contextual information required to identify a particular secret.",name:"context",in:"path",schema:{type:"string"},required:!0},newSecretType:{"x-coa-private":!0,description:"The name of the secret type to upgrade to.",name:"newSecretType",in:"path",schema:{type:"string"},required:!0},orgId:{"x-coa-private":!0,description:"The Organization ID of the organization that will be affected by the API call.",name:"orgId",in:"path",schema:{type:"string"},required:!0},runId:{"x-coa-private":!0,description:"The Run ID of the run that will be affected by the API call.",name:"runId",in:"path",schema:{type:"integer"},required:!0},coaTag:{"x-coa-private":!0,description:"A coa container image tag in Google Container Registry.",name:"coaTag",in:"path",schema:{type:"string"},required:!0}},securitySchemes:{BearerAuth:{type:"http",scheme:"bearer"}}},paths:{"/api/v1/customToken":{summary:"Custom Token","x-coa-private":!0,post:{summary:"Generate Custom Token",description:"Generate a Coalesce token from the provided OpenID Connect ID token",operationId:"GenerateCustomToken","x-eov-operation-handler":"SSOHandlers",requestBody:{description:"The information from the OpenID Connect authorization server required to sign into Coalesce.",required:!0,content:{"application/json":{schema:{oneOf:[{type:"object",description:"Token information for OpenID connect authorization completed on the client.",required:["type","idToken","accessToken","orgID"],properties:{type:{type:"string",enum:["token"]},idToken:{type:"string"},accessToken:{type:"string"},orgID:{type:"string"}},additionalProperties:!1},{type:"object",description:"Information for completing the authorization code grant on the backend.",required:["type","code","redirectURI","codeVerifier","orgID"],properties:{type:{type:"string",enum:["code"]},code:{type:"string"},redirectURI:{type:"string"},codeVerifier:{type:"string"},orgID:{type:"string"},extraTokenParams:{type:"object"}},additionalProperties:!1}]}}}},security:[],tags:["Authorization"],responses:{"200":{$ref:"#/components/responses/CustomTokenResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments":{summary:"Environments","x-coa-command-group":"environments",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Environments",description:"Get a collection of Environment information.",operationId:"GetEnvironments","x-eov-operation-handler":"EnvironmentHandlers","x-coa-command":"list",parameters:[{name:"detail",description:"Include the full detail of the environments.",in:"query",schema:{type:"boolean",default:!1},required:!1},{name:"limit",description:"The maximum number of environments to return.",in:"query",schema:{type:"integer",minimum:1,maximum:500,default:100},required:!1},{name:"startingFrom",description:"The cursor point for paging the query results.",in:"query",allowReserved:!0,schema:{type:"string"},required:!1},{name:"orderBy",description:"The field to order the results by.",in:"query",schema:{type:"string",enum:["id"],default:"id"},required:!1}],security:[{BearerAuth:[]}],tags:["Environments"],responses:{"200":{$ref:"#/components/responses/EnvironmentsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{summary:"Create Environment",description:"Create a new environment.",operationId:"CreateEnvironment","x-eov-operation-handler":"EnvironmentHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Environments"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentCreateRequest"}}}},responses:{"201":{$ref:"#/components/responses/EnvironmentResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}":{summary:"Environment","x-coa-command-group":"environments",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],delete:{summary:"Delete Environment",description:"Delete an environment.",operationId:"DeleteEnvironment","x-eov-operation-handler":"EnvironmentHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Environments"],responses:{"204":{description:"The environment was successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},get:{summary:"Get Environment",description:"Get information about an environment.",operationId:"GetEnvironment","x-eov-operation-handler":"EnvironmentHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Environments"],responses:{"200":{$ref:"#/components/responses/EnvironmentResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}/nodes":{summary:"Nodes","x-coa-command-group":"nodes",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Nodes",description:"Get a collection of nodes for an environment",operationId:"GetNodes","x-eov-operation-handler":"NodeHandlers","x-coa-command":"list",parameters:[{name:"detail",description:"Include the full detail of the nodes.",in:"query",schema:{type:"boolean",default:!1},required:!1},{name:"limit",description:"The maximum number of nodes to return.",in:"query",schema:{type:"integer",minimum:1,maximum:500,default:100},required:!1},{name:"startingFrom",description:"The cursor point for paging the query results.",in:"query",allowReserved:!0,schema:{type:"string"},required:!1},{name:"orderBy",description:"The field to order the results by.",in:"query",schema:{type:"string",enum:["id"],default:"id"},required:!1}],security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodesResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}/nodes/{nodeID}":{summary:"Node","x-coa-command-group":"nodes",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"nodeID",description:"The node ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"Get Node",description:"Get information about a node in an environment.",operationId:"GetNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/jobs":{summary:"Jobs","x-coa-command-group":"jobs",parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0}],post:{summary:"Create Job",description:"Create a new job in a workspace.",operationId:"CreateJob","x-eov-operation-handler":"JobHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Jobs"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/JobRequest"}}}},responses:{"201":{$ref:"#/components/responses/JobSummaryResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/jobs/{jobID}":{summary:"Job","x-coa-private":!0,parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0},{name:"jobID",description:"The job ID.",in:"path",schema:{type:"string"},required:!0}],put:{summary:"Update Job",description:"Update all fields of an existing job in a workspace.",operationId:"UpdateJob","x-eov-operation-handler":"JobHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Jobs"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/JobRequest"}}}},responses:{"204":{description:"Job updated successfully"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{summary:"Delete Job",description:"Delete a job from a workspace.",operationId:"DeleteJob","x-eov-operation-handler":"JobHandlers","x-coa-private":!0,security:[{BearerAuth:[]}],tags:["Jobs"],responses:{"204":{description:"Job successfully deleted"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/environments/{environmentID}/jobs/{jobID}":{summary:"Job","x-coa-command-group":"jobs",parameters:[{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"jobID",description:"The job ID.",in:"path",schema:{type:"string"},required:!0}],get:{summary:"Get Job",description:"Get information about a job in an environment.",operationId:"GetJob","x-eov-operation-handler":"JobHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Jobs"],responses:{"200":{$ref:"#/components/responses/JobSummaryResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/featureFlags/config":{summary:"Feature Flags Configuration","x-coa-private":!0,get:{summary:"Get Feature Flags Configuration",description:"Gets information the client needs to connect to the feature flags service.",operationId:"GetFeatureFlagsClientConfig","x-eov-operation-handler":"FeatureFlagsHandlers",tags:["FeatureFlags"],security:[],responses:{"200":{$ref:"#/components/responses/FeatureFlagsClientConfigResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/featureFlags/default":{summary:"Default Feature Flags","x-coa-private":!0,get:{summary:"Get Default Feature Flags",description:"Gets default feature flags for the unauthenticated users.",operationId:"GetDefaultFeatureFlags","x-eov-operation-handler":"FeatureFlagsHandlers",tags:["FeatureFlags"],security:[],responses:{"200":{$ref:"#/components/responses/FeatureFlagsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/featureFlags":{summary:"Feature Flags","x-coa-private":!0,get:{summary:"Get Feature Flags",description:"Gets feature flags for the authenticated user.",operationId:"GetFeatureFlags","x-eov-operation-handler":"FeatureFlagsHandlers",parameters:[{name:"subdomain",description:"The customer subdomain.",in:"query",required:!1,schema:{type:"string"}}],tags:["FeatureFlags"],security:[{BearerAuth:[]},{}],responses:{"200":{$ref:"#/components/responses/FeatureFlagsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/nodes":{summary:"Nodes","x-coa-command-group":"workspace-nodes",parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Workspace Nodes",description:"Get a collection of nodes for a workspace.",operationId:"GetWorkspaceNodes","x-eov-operation-handler":"NodeHandlers","x-coa-command":"list",parameters:[{name:"detail",description:"Include the full detail of the nodes.",in:"query",schema:{type:"boolean",default:!1},required:!1},{name:"limit",description:"The maximum number of nodes to return.",in:"query",schema:{type:"integer",minimum:1,maximum:500,default:100},required:!1},{name:"startingFrom",description:"The cursor point for paging the query results.",in:"query",allowReserved:!0,schema:{type:"string"},required:!1},{name:"orderBy",description:"The field to order the results by.",in:"query",schema:{type:"string",enum:["id"],default:"id"},required:!1}],security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodesResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{summary:"Create Node",description:"Create a new node in a workspace.",operationId:"CreateNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"create",parameters:[{name:"workspaceID",description:"The workspace ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],security:[{BearerAuth:[]}],tags:["Nodes"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NodeCreateRequest"}}}},responses:{"201":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/nodes/{nodeID}":{summary:"Node","x-coa-command-group":"workspace-nodes",parameters:[{name:"workspaceID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0},{name:"nodeID",description:"The node ID.",in:"path",schema:{type:"string"},required:!0},{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"Get Node",description:"Get information about a node in a workspace.",operationId:"GetWorkspaceNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Nodes"],responses:{"200":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{summary:"Set Node",description:"Replace all fields of a node in a workspace.",operationId:"SetWorkspaceNode","x-eov-operation-handler":"NodeHandlers","x-coa-command":"put",security:[{BearerAuth:[]}],tags:["Nodes"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},responses:{"200":{$ref:"#/components/responses/NodeResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/projects":{summary:"Projects","x-coa-private":!1,"x-coa-command-group":"projects",get:{summary:"Get Projects",description:"Get projects in org.",operationId:"GetProjectsInOrg","x-eov-operation-handler":"ProjectHandlers","x-coa-command":"list",parameters:[{name:"includeWorkspaces",description:"Whether or not to include nested workspace data for all projects.",in:"query",schema:{type:"boolean"},required:!1},{name:"includeJobs",description:"Whether or not to include nested job data for all workspaces in the projects.",in:"query",schema:{type:"boolean"},required:!1}],security:[{BearerAuth:[]}],tags:["Projects"],responses:{"200":{$ref:"#/components/responses/ProjectsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{summary:"Create Project",description:"Create a new project.",operationId:"CreateProject","x-eov-operation-handler":"ProjectHandlers","x-coa-command":"create",security:[{BearerAuth:[]}],tags:["Projects"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectCreateRequest"}}}},responses:{"201":{$ref:"#/components/responses/ProjectResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/projects/{projectID}":{summary:"Projects","x-coa-private":!1,"x-coa-command-group":"projects",parameters:[{name:"projectID",description:"The project ID.",in:"path",schema:{type:"string"},required:!0},{name:"includeWorkspaces",description:"Whether or not to include nested workspace data for all projects.",in:"query",schema:{type:"boolean"},required:!1},{name:"includeJobs",description:"Whether or not to include nested job data for all workspaces in the projects.",in:"query",schema:{type:"boolean"},required:!1}],get:{summary:"Get Project",description:"Get a project.",operationId:"GetProjectInOrg","x-eov-operation-handler":"ProjectHandlers","x-coa-private":!1,"x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Projects"],responses:{"200":{description:"Successful response",content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{summary:"Delete Project",description:"Delete a project.",operationId:"DeleteProject","x-eov-operation-handler":"ProjectHandlers","x-coa-command":"delete","x-coa-private":!1,security:[{BearerAuth:[]}],tags:["Projects"],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",nullable:!0}}}},responses:{"204":{description:"The project was successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/projects":{summary:"Fivetran Projects","x-coa-private":!0,get:{summary:"Get Fivetran Projects",description:"Get fivetran projects in org.",operationId:"GetFivetranProjects","x-eov-operation-handler":"FivetranHandlers",security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"200":{$ref:"#/components/responses/FivetranProjectsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/projects/{projectId}":{"x-coa-private":!0,get:{summary:"Gets a single Fivetran project.",operationId:"GetFivetranProject","x-eov-operation-handler":"FivetranHandlers",tags:["FivetranIntegration"],parameters:[{name:"projectId",in:"path",description:"The unique identifier for the project",required:!0,schema:{type:"string"}}],responses:{"200":{description:"Successful response",content:{"application/json":{schema:{$ref:"#/components/schemas/FivetranProjectResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/projects/{projectId}/jobs":{summary:"Fivetran Jobs","x-coa-private":!0,get:{summary:"Get Fivetran jobs",description:"Get Fivetran jobs.",operationId:"GetFivetranJobs","x-eov-operation-handler":"FivetranHandlers",parameters:[{name:"projectId",in:"path",description:"The unique identifier for the project",required:!0,schema:{type:"string"}}],security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"200":{$ref:"#/components/responses/FivetranJobsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/jobs/{jobId}/history/{historyId}":{summary:"Fivetran Job History","x-coa-private":!0,get:{parameters:[{name:"jobId",description:"The Fivetran job ID.",in:"path",schema:{type:"string"},required:!0},{name:"historyId",description:"The Fivetran history ID.",in:"path",schema:{type:"string"},required:!0}],summary:"Get Fivetran Job History",description:"Get Fivetran job history in org.",operationId:"GetFivetranJobHistory","x-eov-operation-handler":"FivetranHandlers",security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"200":{$ref:"#/components/responses/FivetranJobHistoryResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/integrations/fivetran/jobs/{jobId}/run":{summary:"Start a refresh job via Fivetran","x-coa-private":!0,post:{parameters:[{name:"jobId",description:"The Fivetran job ID.",in:"path",schema:{type:"string"},required:!0}],requestBody:{description:"Request body for start Fivetran run.",required:!0,content:{"application/json":{schema:{type:"object",required:["cause"],properties:{cause:{$ref:"#/components/schemas/FivetranJobRunCause"}}}}}},summary:"Start a refresh job via Fivetran",operationId:"PostFivetranJobRefresh","x-eov-operation-handler":"FivetranHandlers",security:[{BearerAuth:[]}],tags:["FivetranIntegration"],responses:{"201":{$ref:"#/components/responses/FivetranRefreshJobResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles":{summary:"User Roles","x-coa-private":!0,get:{summary:"List User Roles",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.",operationId:"GetUserRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],parameters:[{name:"excludeOrgRoles",description:"Exclude organization level roles from the results.",in:"query",schema:{type:"boolean"}},{name:"projectID",description:"Return only user roles pertaining to the specified project.",in:"query",schema:{type:"string"},required:!1},{name:"environmentID",description:"Return only user roles pertaining to the specified environment.",in:"query",schema:{type:"string"},required:!1}],responses:{"200":{$ref:"#/components/responses/UserRolesResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles/{userID}/organizationRoles":{summary:"Organization User Roles","x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0}],put:{summary:"Create/Update User Organization Roles",description:"Creates or updates all of a user's organization roles. Only org admins may use this API.",operationId:"UpsertUserOrganizationRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],requestBody:{description:"The user's organization roles.",required:!0,content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}},responses:{"200":{$ref:"#/components/responses/UserRoleResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles/{userID}/projects/{projectID}/environments/{environmentID}":{summary:"Environment User Roles","x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0},{name:"projectID",description:"The project ID.",in:"path",schema:{type:"string"},required:!0},{name:"environmentID",description:"The environment ID.",in:"path",schema:{type:"string"},required:!0}],delete:{summary:"Delete Environment User Roles",description:"Deletes all of a user's environment roles.",operationId:"DeleteUserEnvironmentRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],responses:{"204":{description:"The user's environment roles were successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{summary:"Create/Update Environment User Roles",description:"Creates or updates all of a user's environment roles.",operationId:"UpsertUserEnvironmentRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],requestBody:{description:"The user environment roles.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/EnvironmentRoles"}}}},responses:{"200":{$ref:"#/components/responses/UserEnvironmentRoleResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/userRoles/{userID}/projects/{projectID}":{summary:"Project User Roles","x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0},{name:"projectID",description:"The project ID.",in:"path",schema:{type:"string"},required:!0}],delete:{summary:"Delete Project User Roles",description:"Deletes all of a user's project roles. Only org and project admins may user this API.",operationId:"DeleteUserProjectRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],responses:{"204":{description:"The user's project roles were successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{summary:"Create/Update Project User Roles",description:"Creates or updates all of a user's project roles. Only org and project admins may user this API.",operationId:"UpsertUserProjectRoles","x-eov-operation-handler":"UserRolesHandlers",tags:["UserRoles"],requestBody:{description:"The user project roles.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ProjectRoles"}}}},responses:{"200":{$ref:"#/components/responses/UserProjectRoleResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/all":{summary:"All Packages","x-coa-private":!0,get:{description:"Get all available packages on the registry.",operationId:"GetAllRegistryPackages","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],responses:{"200":{$ref:"#/components/responses/AllRegistryPackagesResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/{packageID}/releases/privacy/{privacy}":{summary:"All Package Releases","x-coa-private":!0,get:{description:"Get all available releases for a package on the registry.",operationId:"GetAllRegistryPackageReleases","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0},{name:"privacy",description:"The privacy level of the packages requested",in:"path",schema:{type:"string",enum:["public","private","unlisted","all"],minLength:1},required:!0}],responses:{"200":{$ref:"#/components/responses/AllRegistryPackageReleasesResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/{packageID}":{summary:"Package","x-coa-private":!0,get:{description:"Get a package on the registry.",operationId:"GetRegistryPackage","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0}],responses:{"200":{$ref:"#/components/responses/RegistryPackageResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{description:"Update an existing package's information.",operationId:"updatePackageV2","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],parameters:[{name:"packageID",description:"The id of the package.",in:"path",schema:{type:"string",minLength:1},required:!0}],requestBody:{description:"Updated package details. Does not include package content held in a release.",required:!0,content:{"application/json":{schema:{type:"object",required:["description","overview","tags","featured","certified"],properties:{description:{type:"string"},overview:{type:"string",maxLength:200},tags:{type:"array",items:{type:"string"}},featured:{type:"boolean"},certified:{type:"boolean"}}}}}},responses:{"200":{$ref:"#/components/responses/PackageResponseV2"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/{packageID}/releases/{releaseID}":{summary:"Package Release","x-coa-private":!0,put:{description:"Update a package release.",operationId:"updatePackageReleaseV2","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0},{name:"releaseID",description:"The package release ID.",in:"path",schema:{type:"string",minLength:1},required:!0}],requestBody:{description:"The package release info to update with.",required:!0,content:{"application/json":{schema:{type:"object",required:["changeLog","privacy"],properties:{changeLog:{type:"string",minLength:1},privacy:{type:"string",minLength:1,enum:["public","private","unlisted"]}}}}}},responses:{"200":{$ref:"#/components/responses/RegistryPackageReleaseResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},get:{description:"Get a release from a package in the registry.",operationId:"GetRegistryPackageRelease","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],parameters:[{name:"packageID",description:"The package id.",in:"path",schema:{type:"string",minLength:1},required:!0},{name:"releaseID",description:"The package release ID.",in:"path",schema:{type:"string",minLength:1},required:!0}],responses:{"200":{$ref:"#/components/responses/RegistryPackageReleaseResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/org":{summary:"Organization Packages","x-coa-private":!0,get:{description:"Get a release from a package in the registry.",operationId:"GetRegistryPackagesForOrg","x-eov-operation-handler":"PackageRegistryHandlers",tags:["PackageRegistry"],responses:{"200":{$ref:"#/components/responses/AllRegistryPackagesResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/createPackage":{summary:"Packages","x-coa-private":!0,post:{description:"Create a package.",operationId:"CreatePackage","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"The package info to create with.",required:!0,content:{"application/json":{schema:{type:"object",required:["release","name","description","entities","privacy","packageVariables"],properties:{release:{$ref:"#/components/schemas/PackageCreateReleaseInfo"},name:{type:"string"},description:{type:"string"},overview:{type:"string",maxLength:200},privacy:{type:"string",enum:["public","private","unlisted"]},entities:{$ref:"#/components/schemas/PackageCreateEntities"},packageVariables:{type:"string"}}}}}},responses:{"201":{$ref:"#/components/responses/PackageResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/createPackageV2":{summary:"Packages","x-coa-private":!0,post:{description:"Create a package without a release.",operationId:"createPackageV2","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"Info describing and defining the package. Does not include package content held in a release",required:!0,content:{"application/json":{schema:{type:"object",required:["name","description","overview","tags","featured","certified","platformKind"],properties:{name:{type:"string"},description:{type:"string"},overview:{type:"string",maxLength:200},tags:{type:"array",items:{type:"string"}},featured:{type:"boolean"},certified:{type:"boolean"},platformKind:{type:"string",enum:["snowflake","fabric","databricks"]}}}}}},responses:{"201":{$ref:"#/components/responses/PackageResponseV2"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/createRelease":{"x-coa-private":!0,post:{description:"Add a new package release to an existing package.",operationId:"AddPackageRelease","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"The package release info.",required:!0,content:{"application/json":{schema:{type:"object",required:["release","entities","privacy","packageVariables","packageID"],properties:{release:{$ref:"#/components/schemas/PackageCreateReleaseInfo"},privacy:{type:"string",enum:["public","private","unlisted"]},entities:{$ref:"#/components/schemas/PackageCreateEntities"},packageVariables:{type:"string"},packageID:{type:"string",minLength:1}}}}}},responses:{"201":{$ref:"#/components/responses/RegistryPackageReleaseResult"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/packageRegistry/update":{"x-coa-private":!0,put:{description:"Update a package.",operationId:"UpdatePackage","x-eov-operation-handler":"PackagesHandlers",tags:["Packages"],requestBody:{description:"The package info to create with.",required:!0,content:{"application/json":{schema:{type:"object",required:["packageID","releaseID"],properties:{packageID:{type:"string",minLength:1},releaseID:{type:"string",minLength:1},changeLog:{type:"string"},description:{type:"string"},privacy:{type:"string",enum:["public","private","unlisted"]}}}}}},responses:{"200":{$ref:"#/components/responses/PackageUpdateResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/typesense/orgs/{orgID}/typesense-config":{summary:"Typesense Config","x-coa-private":!0,parameters:[{name:"orgID",description:"The organization ID.",in:"path",schema:{type:"string"},required:!0}],post:{description:"Returns Typesense configuration data for a given org.",operationId:"getTypesenseConfigForOrg","x-eov-operation-handler":"TypesenseHandlers",security:[{BearerAuth:[]}],tags:["CoalesceAPI"],responses:{"200":{$ref:"#/components/responses/TypesenseConfigurationResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/runs":{summary:"Runs","x-coa-command-group":"runs",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Runs",description:"Get a collection of information about runs.",operationId:"GetRuns","x-eov-operation-handler":"RunHandlers","x-coa-command":"list",security:[{BearerAuth:[]}],tags:["Runs"],parameters:[{name:"limit",description:"The maximum number of runs to return.",in:"query",schema:{type:"integer",minimum:0,maximum:1e3,default:25},required:!1},{name:"startingFrom",description:"The starting run ID, runStartTime, or runEndTime (exclusive) for paging the query results.",in:"query",allowReserved:!0,schema:{oneOf:[{type:"integer",minimum:0},{type:"string",format:"date-time"}]},required:!1},{name:"orderBy",description:"The field used to order results.",in:"query",schema:{$ref:"#/components/schemas/RunsOrderBy"},required:!1},{$ref:"#/components/parameters/orderByDirection"},{name:"runType",description:"A run type to filter the query results.",in:"query",schema:{$ref:"#/components/schemas/RunType"},required:!1},{name:"runStatus",description:"A status value to filter the query results.",in:"query",schema:{$ref:"#/components/schemas/RunStatus"},required:!1},{name:"environmentID",description:"An environment ID to filter the query results.",in:"query",schema:{type:"string"},required:!1},{name:"detail",description:"Include the full detail of the run.",in:"query",schema:{type:"boolean",default:!1},required:!1}],responses:{"200":{$ref:"#/components/responses/RunsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/runs/{runID}":{summary:"Run","x-coa-command-group":"runs",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"Get Run",description:"Gets a single run.",operationId:"GetRun","x-eov-operation-handler":"RunHandlers","x-coa-command":"get",security:[{BearerAuth:[]}],tags:["Runs"],parameters:[{name:"runID",description:"The run ID.",in:"path",schema:{type:"integer"},required:!0}],responses:{"200":{$ref:"#/components/responses/RunResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/runs/{runID}/results":{summary:"Run Results","x-coa-command-group":"runs",parameters:[{name:"overrideOrgID",description:"Runs an operation against the specified org. (Super-users only.)","x-coa-private":!0,in:"query",schema:{type:"string"},required:!1}],get:{summary:"List Run Results",description:"Get a collection of the results of a deploy or refresh run",operationId:"GetRunResults","x-eov-operation-handler":"RunHandlers","x-coa-command":"list-results",security:[{BearerAuth:[]}],tags:["Runs"],parameters:[{name:"runID",description:"The run ID.",in:"path",schema:{type:"integer"},required:!0}],responses:{"200":{$ref:"#/components/responses/RunResultsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/database":{"x-coa-private":!0,get:{summary:"Get database connectivity information.",description:"Gets the information required to connect to the Coalesce database.",operationId:"GetDatabase","x-eov-operation-handler":"DatabaseHandlers",security:[],responses:{"200":{$ref:"#/components/responses/DatabaseInfoResponse"}}}},"/api/v1/secrets/{secretType}/{context}":{"x-coa-private":!0,get:{description:"Determines whether or not a git token value exists for a given project ID.",operationId:"SecretExists","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"200":{$ref:"#/components/responses/secretExists"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{description:"Upgrades a secret from secretType its upgrade target.",operationId:"UpgradeSecret","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"204":{description:"Successfully upgraded a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},put:{description:"Sets the value of a secret.",operationId:"SetSecret","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],requestBody:{description:"The new value of the secret.",required:!0,content:{"application/json":{schema:{type:"object",required:["secretValue"],properties:{secretValue:{}}}}}},responses:{"204":{description:"Successfully set the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{description:"Deletes a secret.",operationId:"DeleteSecret","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["Secrets"],parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"204":{description:"Successfully deleted the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/kill-job/{orgId}/{runId}":{"x-coa-private":!0,post:{description:"Deletes the Kubernetes job.",operationId:"KillJob","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"},{$ref:"#/components/parameters/runId"}],responses:{"204":{description:"Successfully killed the job."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/coa-tag":{"x-coa-private":!0,get:{description:"Gets a report of all organizations that are using a non-standard coa image tag.",operationId:"GetCoaTagReport","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],responses:{"200":{$ref:"#/components/responses/CoaTagReportResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/coa-tag/{orgId}":{"x-coa-private":!0,get:{description:"Gets the container image tag that should be used when running cloud coa jobs for a particular org.",operationId:"GetCoaTag","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"}],responses:{"200":{$ref:"#/components/responses/CoaTagResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{description:"Resets the container image tag that should be used when running cloud coa jobs for a particular org to the default.",operationId:"ResetCoaTag","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"}],responses:{"204":{description:"Successfully reset coa tag."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/admin/coa-tag/{orgId}/{coaTag}":{"x-coa-private":!0,post:{description:"Sets the container image tag that should be used when running cloud coa jobs for a particular org.",operationId:"SetCoaTag","x-eov-operation-handler":"AdminHandlers",security:[{BearerAuth:[]}],tags:["Admin"],parameters:[{$ref:"#/components/parameters/orgId"},{$ref:"#/components/parameters/coaTag"}],responses:{"204":{description:"Successfully set coa tag."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/scheduler/secret/{secretType}/{context}":{"x-coa-private":!0,get:{description:"Determines whether or not a git token value exists for a given project ID.",operationId:"SecretExistsV0","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!0,parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"200":{$ref:"#/components/responses/secretExists"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},post:{description:"Sets the value of a secret.",operationId:"SetSecretV0","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!0,parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],requestBody:{description:"The new value of the secret.",required:!0,content:{"application/json":{schema:{type:"object",required:["secretValue"],properties:{secretValue:{}}}}}},responses:{"204":{description:"Successfully set the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{description:"Deletes a secret.",operationId:"DeleteSecretV0","x-eov-operation-handler":"SecretHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!0,parameters:[{$ref:"#/components/parameters/secretType"},{$ref:"#/components/parameters/context"}],responses:{"204":{description:"Successfully deleted the value of a secret."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/bulkWrite":{"x-coa-private":!0,post:{description:"Updates multiple documents for a workspace.",operationId:"BulkWrite","x-eov-operation-handler":"BulkWriteHandlers",security:[{BearerAuth:[]}],tags:["BulkOperations"],deprecated:!1,requestBody:{description:"The workspace to update and the data to update with.",required:!0,content:{"application/json":{schema:{type:"object",required:["workspaceID","writeInfo","requestID"],properties:{workspaceID:{type:"number"},requesetID:{type:"string"},writeInfo:{type:"array",items:{$ref:"#/components/schemas/WriteInfo"}}}}}}},responses:{"204":{description:"Successfully wrote the documents to the workspace."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/validHostname":{"x-coa-private":!0,post:{description:"Validates the passed hostname and returns an authorized version.",operationId:"ValidateHostname","x-eov-operation-handler":"ValidateHostnameHandlers",tags:["default"],deprecated:!1,security:[],requestBody:{description:"The hostname that needs to be validated.",required:!0,content:{"application/json":{schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string"}}}}}},responses:{"200":{$ref:"#/components/responses/ValidHostname"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/metrics":{"x-coa-private":!0,post:{description:"Submit a set of metrics",operationId:"SubmitMetrics","x-eov-operation-handler":"MetricsHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!1,requestBody:{description:"The metrics to submit",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/MetricsRequest"}}}},responses:{"204":{description:"Submitted metrics"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/multiFactorAuth/{userID}":{"x-coa-private":!0,parameters:[{name:"userID",description:"The user ID.",in:"path",schema:{type:"string"},required:!0}],delete:{description:"Deletes the MFA for a user in firebase auth",operationId:"RemoveMultiFactor","x-eov-operation-handler":"MultiFactorAuthHandlers",deprecated:!1,tags:["default"],security:[{BearerAuth:[]}],responses:{"204":{description:"User's MFA successfully deleted."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/plan":{"x-coa-private":!0,post:{description:"Create a deployment plan",summary:"Create Plan",operationId:"createPlan","x-eov-operation-handler":"PlanHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!1,requestBody:{description:"Requirements for plan creation",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreatePlanRequest"}}}},responses:{"202":{$ref:"#/components/responses/PlanRequestAcceptedResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/plan/{environmentID}/{planID}":{"x-coa-private":!0,get:{description:"Get an existing deployment plan",summary:"Get Plan",operationId:"getPlan","x-eov-operation-handler":"PlanHandlers",security:[{BearerAuth:[]}],tags:["default"],deprecated:!1,parameters:[{name:"environmentID",description:"The environment ID",in:"path",schema:{type:"string"},required:!0},{name:"planID",description:"The plan ID",in:"path",schema:{type:"string"},required:!0}],responses:{"200":{$ref:"#/components/responses/PlanResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/llm/column-descriptions":{"x-coa-private":!0,post:{summary:"Get AI Descriptions for Columns",description:"Retrieve the generated AI descriptions for all the columns of a given node.",operationId:"GetAIColumnDescription","x-eov-operation-handler":"ColumnDescriptionsHandler",requestBody:{description:"workspaceID, nodeID of the node for which to generate the AI description.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ColumnDescriptionsRequest"}}}},responses:{"200":{$ref:"#/components/responses/ColumnDescriptionsResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/llm/git-commit-message":{"x-coa-private":!0,post:{summary:"Generate AI Git Commit Message",description:"Generate an AI commit message based on git diffs",operationId:"GetAIGitCommitMessage","x-eov-operation-handler":"GitCommitMessageHandler",requestBody:{description:"Git diff context for commit message generation",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/GitCommitMessageRequest"}}}},responses:{"200":{$ref:"#/components/responses/GitCommitMessageResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/llm/node-description":{"x-coa-private":!0,post:{summary:"Get AI Descriptions for a node",description:"Retrieve the generated AI descriptions for a node.",operationId:"GetAINodeDescription","x-eov-operation-handler":"NodeDescriptionHandler",requestBody:{description:"workspaceID, nodeID of the node for which to generate the AI description.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NodeDescriptionRequest"}}}},responses:{"200":{$ref:"#/components/responses/NodeDescriptionResponse"},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/llm/chat":{"x-coa-private":!0,post:{summary:"Get AI Chat Message",description:"Get the generated AI chat message.",operationId:"GetChatMessage","x-eov-operation-handler":"ChatMessageHandler",requestBody:{description:"The prompt to generate the AI chat message.",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ChatRequest"}}}},responses:{"200":{description:"Successful chat response",content:{"application/json":{schema:{$ref:"#/components/schemas/ChatResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}},tags:["LLM"]}},"/api/v1/workspaces/{workspaceID}/subgraphs":{summary:"Subgraphs","x-coa-private":!0,post:{summary:"Create Subgraph",description:"Create a new subgraph for organizing and managing a collection of nodes.",operationId:"CreateSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SubgraphRequest"}}}},responses:{"201":{description:"The subgraph was successfully created.",content:{"application/json":{schema:{type:"object",required:["data"],properties:{data:{$ref:"#/components/schemas/Subgraph"}}}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/subgraphs/{subgraphID}":{summary:"Subgraphs","x-coa-private":!0,put:{summary:"Update Subgraph",description:"Update a subgraph.",operationId:"UpdateSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"subgraphID",required:!0,description:"ID of the subgraph being fetched",in:"path",schema:{type:"string"}},{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SubgraphRequest"}}}},responses:{"204":{description:"The subgraph was successfully updated."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"409":{$ref:"#/components/responses/AlreadyExistsError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},delete:{summary:"Delete Subgraph",description:"Delete a subgraph.",operationId:"DeleteSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"subgraphID",required:!0,description:"ID of the subgraph being fetched",in:"path",schema:{type:"string"}},{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],responses:{"204":{description:"Subgraph deleted successfully."},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}},get:{summary:"Get Subgraph",description:"Get a subgraph.",operationId:"GetSubgraph","x-eov-operation-handler":"SubgraphHandlers",security:[{BearerAuth:[]}],tags:["Subgraphs"],parameters:[{name:"subgraphID",required:!0,description:"ID of the subgraph being fetched",in:"path",schema:{type:"string"}},{name:"workspaceID",required:!0,description:"ID of the workspace containing the subgraph",in:"path",schema:{type:"string"}}],responses:{"200":{description:"The subgraph was successfully retrieved.",content:{"application/json":{schema:{type:"object",required:["data"],properties:{data:{$ref:"#/components/schemas/Subgraph"}}}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}},"/api/v1/workspaces/{workspaceID}/databricks/warehouse":{"x-coa-private":!0,get:{summary:"Get list of Databricks SQL warehouses",description:"Retrieves a list of all SQL warehouses that a user has manager permissions on.",operationId:"GetDatabricksWarehouse","x-eov-operation-handler":"DatabricksHandlers",security:[{BearerAuth:[]}],tags:["Databricks"],parameters:[{name:"workspaceID",in:"path",required:!0,schema:{type:"string"},description:"The ID of the workspace"}],responses:{"200":{description:"Successfully retrieved warehouses from databricks.",content:{"application/json":{schema:{$ref:"#/components/schemas/DatabricksWarehouseResponse"}}}},"400":{$ref:"#/components/responses/InvalidRequestError"},"401":{$ref:"#/components/responses/Unauthorized"},"403":{$ref:"#/components/responses/ForbiddenError"},"404":{$ref:"#/components/responses/NotFoundError"},"500":{$ref:"#/components/responses/InternalServerError"},"502":{$ref:"#/components/responses/BadGatewayError"},"503":{$ref:"#/components/responses/ServiceUnavailableError"},"504":{$ref:"#/components/responses/GatewayTimeoutError"}}}}}};var Vjs=require("fs/promises"),Yjs=Et(qjs()),Kjs=Et(require("os")),Jjs=Et(require("path"));ki();Ar();Er();var nH0={domain:{default:"https://app.coalescesoftware.io",description:"Coalesce domain name to use for API requests",value:""},environmentID:{description:"Environment ID",value:""},exclude:{description:"Coalesce Node Selector",value:""},include:{description:"Coalesce Node Selector",value:""},jobID:{description:"Coalesce JobID",value:""},parallelism:{description:"Parallelism level to use",value:""},parameters:{description:"Parameters",value:""},platformKind:{default:"Snowflake",description:"Platform Kind (Snowflake, Databricks)",value:""},profile:{description:"Profile To Use",value:""},token:{description:"Coalesce Refresh Token",value:""}},iH0={databricksAuthType:{description:"Databricks Auth Type (OAuthM2M, Token)",value:""},databricksClientID:{description:"Databricks Client ID",value:""},databricksClientSecret:{description:"Databricks Client Secret",value:""},databricksPath:{description:"Databricks Path",value:""},databricksToken:{description:"Databricks Token",value:""}},zjs=r=>"platformKind"in r&&r.platformKind?.value.toLowerCase()==="databricks"&&"databricksAuthType"in r&&!("snowflakeAuthType"in r),oH0={snowflakeAuthType:{description:"Snowflake Auth Type (Basic, KeyPair)",value:""},snowflakeKeyPairKey:{description:"Snowflake Key Pair Path",value:""},snowflakeKeyPairPass:{description:"Snowflake Key Pair Pass",value:""},snowflakePassword:{description:"Snowflake Password",value:""},snowflakeRole:{description:"Snowflake Role",value:""},snowflakeUsername:{description:"Snowflake Username",value:""},snowflakeWarehouse:{description:"Snowflake Warehouse",value:""},snowflakeKeyPairPath:{deprecationMessage:"This option has been replaced by snowflakeKeyPairKey.",description:"Snowflake Key Pair Path (deprecated, please use --snowflakeKeyPairKey)",value:""}},Ujs=r=>(!("platformKind"in r)||r.platformKind?.value.toLowerCase()==="snowflake")&&"snowflakeAuthType"in r&&!("databricksAuthType"in r),uC={...nH0,...iH0,...oH0};var jjs=r=>{let t="[authFromProfile]";if(zjs(r)){if(r.databricksAuthType?.value==="OAuthM2M")return Mlo.assert({clientID:r.databricksClientID?.value,clientSecret:r.databricksClientSecret?.value,databricksAuthType:r.databricksAuthType?.value,path:r.databricksPath?.value,platformKind:"databricks"});if(r.databricksAuthType.value==="Token")return Blo.assert({databricksAuthType:r.databricksAuthType?.value,path:r.databricksPath?.value,platformKind:"databricks",token:r.databricksToken?.value});throw new At(`${t} CLI config must have a valid credential type. Expected "OAuthM2M" or "Token", got ${JSON.stringify(r.databricksAuthType?.value)}`)}else if(Ujs(r)){if(r.snowflakeAuthType?.value==="Basic")return Ikr.assert({platformKind:"snowflake",snowflakeUsername:r.snowflakeUsername?.value,snowflakePassword:r.snowflakePassword?.value,snowflakeWarehouse:r.snowflakeWarehouse?.value,snowflakeRole:r.snowflakeRole?.value});if(r.snowflakeAuthType?.value==="KeyPair")return Skr.assert({platformKind:"snowflake",snowflakeUsername:r.snowflakeUsername?.value,snowflakeKeyPairKey:r.snowflakeKeyPairKey?.value||r.snowflakeKeyPairPath?.value,snowflakeKeyPairPass:r.snowflakeKeyPairPass?.value||"",snowflakeWarehouse:r.snowflakeWarehouse?.value,snowflakeRole:r.snowflakeRole?.value});throw new At(`${t} CLI config must have a valid credential type. Expected "Basic" or "KeyPair", got ${JSON.stringify(r.snowflakeAuthType?.value)}`)}else throw new At(`${t} Could not determine valid auth type from CLI config. Please check the required fields for your desired platform. Provided fields: ${JSON.stringify(Object.keys(r).sort())}`)};Ar();ao();var sH0=new Set(["snowflakePassword","token",...nbe,...x3t,...ibe]),pTn=r=>ys(r,t=>{for(let n of sH0)n in t&&(t[n].value="<REDACTED>")}),Gjs=r=>ys(r,t=>{for(let[n,i]of Object.entries(r))t[n]=pTn(i)});var{CLI_INTERNAL:aH0}=nt,Wjs=(r,t)=>{let n=r.default,i={};n&&(i=n);let o=t.profile?.value||n?.profile?.value||"";if(aH0.info("using profile",o,"cliProfiles",JSON.stringify(Gjs(r))),o){if(!(o in r))throw new Error(`Unable to find profile ${o}`);let s=r[o];i={...i,...s}}return i={...i,...t},i};Ar();var{CLI:PXt}=nt,Hjs=r=>Object.fromEntries(Object.entries(r).flatMap(([t,n])=>{if(!n||typeof n!="object")return PXt.error(`Unexpected top-level option '${t}' in config file.`),[];let i=Object.entries(n).flatMap(([o,s])=>uC[o]?!s||typeof s!="string"?(PXt.error(`Expected profile ${t} field ${o} to be a string, but it is of type ${typeof n}.`),[]):(uC[o]?.deprecationMessage&&PXt.error(`CLI profile ${t} is using deprecated option ${o}.`,uC[o]?.deprecationMessage),[[o,{...uC[o],value:s}]]):(PXt.error("Ignoring unknown field",o,`in CLI profile ${t}.`),[]));return[[t,Object.fromEntries(i)]]}));var{CLI:lH0,CLI_INTERNAL:kXt}=nt,Xjs=async(r,t)=>{let n="[getCLIConfig]",i;try{let f=await(0,Vjs.readFile)(t??cH0(),"utf-8"),A=Yjs.default.parse(f);i=Hjs(A)}catch(f){if(lH0.error(n,`Unable to read profile data from filepath ${t}; error:`,f),!t)i={};else throw new Error(`Unable to read cli profile: ${t}`)}let o=Wjs(i,r);kXt.info("got final cli profile configFileLocation:",t,JSON.stringify(pTn(o)));let s;try{s=H4i(o,["token","environmentID"])}catch(f){throw typeof f=="object"&&f instanceof zqe&&kXt.error(`cliProfile was missing ${f.missingProperties}`),f}let a=s.domain?.value||process.env.SCHEDULER_ADDRESS||uC.domain.default,l={domain:new URL(a),runDetails:{environmentID:s.environmentID.value,origin:"CLI"},runtimeParameters:s.parameters?.value||"",token:s.token.value,userCredentials:jjs(s)};if(!l.domain)throw new Error("Unable to determine Coalesce domain.");let u=s.jobID?.value;u&&(l.runDetails.jobID=u);let c=s.include?.value;c&&(l.runDetails.includeNodesSelector=c);let d=s.exclude?.value;d&&(l.runDetails.excludeNodesSelector=d);let p=s.parallelism?.value;if(p){let f=parseInt(p);if(isNaN(f)){let A=`Parameter 'parallelism' was set to '${s.parallelism}', which could not be interpreted as a number`;throw kXt.error(A),new Error(A)}else l.runDetails.parallelism=f}return ub(l),l},cH0=()=>{let r=Kjs.default.homedir(),t=Jjs.default.join(r,".coa/config");return kXt.info("using default location",t),t};fW();var HAe=Et(dC()),wBn=Et(require("util"));Er();vE();var TBn=Et(sXs()),Ztr=async(r,t=!1)=>{let n=[{name:"userResponse",type:"confirm",message:r,default:t}],{userResponse:i}=await TBn.default.prompt(n);return i},aXs=async(r,t)=>{let n=[{name:"userResponse",type:"input",message:r,default:t}],{userResponse:i}=await TBn.default.prompt(n);return i};ki();Gl();gz();Ar();Gl();Kf();Ar();var lXs=require("fs/promises");ki();Ar();var efd=nt.CLI,cXs=async(r,t,n,i)=>{let o=await JSs(i.org(t).run(n)),s=TRt.validate(o);s.valid||efd.emerg(`Got an unexpected error deserializing run output ${s.failureMessage}`);let a=W4i(o);return await(0,lXs.writeFile)(r,a+`
|
|
7211
7211
|
`)};var tfd=nt.RUNNER_BACKEND,rfd=nt.CLI_INTERNAL,uXs=async(r,t,n)=>{try{await r}finally{try{t&&(await z3t(t),cjs())}catch(i){tfd.errorContext(n,"Error during CLI cleanup: ",i)}}},uoe=async r=>{if(r.platformKind==="databricks")return r.databricksAuthType==="Token"?{kind:"databricks",authenticator:"Token",token:r.token}:{kind:"databricks",authenticator:"Cloud"};if(r.platformKind==="fabric")return{kind:"fabric",authenticator:"oauth"};let t=o=>{let s={user:o.snowflakeUsername,password:o.snowflakePassword,authenticator:"Basic",kind:"snowflake"};return o.snowflakeRole&&(s.role=o.snowflakeRole),o.snowflakeWarehouse&&(s.warehouse=o.snowflakeWarehouse),Promise.resolve(s)},n=async o=>{if(!o.snowflakeKeyPairKey)throw new Error("No private key was provided, cannot perform key pair authentication with Snowflake");let s=o.snowflakeKeyPairPass?new Wc(o.snowflakeKeyPairPass):void 0,a=vso(o.snowflakeKeyPairKey,s),l={user:o.snowflakeUsername,keyPairKey:a.sensitiveValue,keyPairPass:o.snowflakeKeyPairPass,authenticator:"KeyPair",kind:"snowflake"};return o.snowflakeRole&&(l.role=o.snowflakeRole),o.snowflakeWarehouse&&(l.warehouse=o.snowflakeWarehouse),l},i=async o=>({warehouse:o.snowflakeWarehouse,authenticator:"OAuth",kind:"snowflake"});return F$(r,t,n,WB()?i:void 0,async o=>H5n(o))},dXs=(r,t,n,i,o)=>t?(rfd.infoContext(r,"saving run results to file",t),cXs(t,n,i,o)):Promise.resolve();fW();Er();var k9e=class extends At{constructor(t="Plan cancelled",n){super(t,n)}statusCode(){return 499}toString=()=>"Plan cancelled"};var KS=(r,t)=>(Object.keys(uC).forEach(n=>{if(!t||t.includes(n)){let i=uC[n];r.option(`--${n} <value>`,i.description,i.default)}}),r),nfd=r=>{let t={};return Object.keys(uC).forEach(n=>{if(r.getOptionValueSource(n)=="cli"){let o=uC[n].deprecationMessage;o&&Ho.error(`Deprecated CLI option --${n} was used.`,o),t[n]={value:`${r.getOptionValue(n)}`,default:uC[n].default,description:uC[n].default}}}),t},ifd=async r=>{let t=nfd(r),n=r.optsWithGlobals();Rc().isTest||dwi(n.debug,n.verbose);let i=n.changeLogLevel;if(i){let[c,d]=i.split(":");ac("CLI_INTERNAL",!!c,"loggingArea is required"),ac("CLI_INTERNAL",!!d,"logLevel is required"),pW.info("changing log level ",c,d),pmt(c,d),nt.COMMON.debug("logging changed in coa")}let o=await Xjs(t,n.config),s=await wXt(o.token,void 0,o.domain),{teamInfo:{fbUserID:a,fbTeamID:l}}=s,u={orgID:l,workspaceID:+o.runDetails.environmentID,userID:a};return Xq(u),{teamDetails:s,config:o,optsWithGlobals:n,logContext:u}},JS=async(r,t,n,i)=>{pW.debug("Runtime environment",JSON.stringify(Rc(),void 0,2));let o=Hq();try{let s=await ifd(r),{teamDetails:a,config:l,optsWithGlobals:u,logContext:c}=s;o=c,i||Ho.infoContext(c,HAe.default.whiteBright(`${t} initialized.`)+` ${HAe.default.green("running")}...`),await WY({userID:a.teamInfo?.fbUserID,orgID:a.teamInfo?.fbTeamID,logContext:c,featureFlags:a.featureFlags},()=>uXs(n(a,l,u,c),a.firebase,c)),i||Ho.infoContext(c,HAe.default.whiteBright(`${t} successful!`)),await dO(0)}catch(s){if(s instanceof bze)throw s;if(s instanceof k9e){Ho.info(HAe.default.redBright("Plan cancelled by user")),await dO(0);return}pW.errorContext(o,`An error occurred during ${t}: ${wBn.default.inspect(s)}`),Ho.error(HAe.default.redBright(`An error occurred during ${t}:`,sfd(s))),await dO(1)}},Q9e=(r,t)=>async(n,i,o,s)=>{let a=await r(n,i,o,s),{runCounter:l,runCompletion:u,logContext:c}=a;s=c||s,Ho.infoContext(s,HAe.default.whiteBright(`${t} run initialized. RunCounter: ${l}`));try{await u}finally{let d=o.out;await dXs(s,d,n.teamInfo.fbTeamID,l,n.rootRepository)}},pXs=async r=>{let t=`You have uncommitted changes in this branch.
|
|
7212
7212
|
${r.map(n=>`
|
|
7213
7213
|
File: ${n.name}, Status: ${n.status}`)}
|