@zuplo/core 5.1772.0 → 5.1775.0
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/create.index.minified.js +1 -1
- package/index.minified.js +1 -1
- package/package.json +1 -1
package/create.index.minified.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
"use strict";var Rxe=Object.create;var C2=Object.defineProperty;var Oxe=Object.getOwnPropertyDescriptor;var Nxe=Object.getOwnPropertyNames;var Ixe=Object.getPrototypeOf;var Pxe=Object.prototype.hasOwnProperty;var o=(t,e)=>C2(t,"name",{value:e,configurable:true});var Gr=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var DY=(t,e)=>{for(var r in e)C2(t,r,{get:e[r],enumerable:true})};var kY=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let i of Nxe(e))if(!Pxe.call(t,i)&&i!==r)C2(t,i,{get:()=>e[i],enumerable:!(n=Oxe(e,i))||n.enumerable})}return t};var Rf=(t,e,r)=>(r=t!=null?Rxe(Ixe(t)):{},kY(e||!t||!t.__esModule?C2(r,"default",{value:t,enumerable:true}):r,t));var zm=t=>kY(C2({},"__esModule",{value:true}),t);var Oa=_(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:true});Of.EnvironmentalVariableRequiredError=Of.getRequiredEnvVar=void 0;var eC=class{static{o(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.51.0"}get AUTH_API_URL(){return Jo("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return Jo("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return Jo("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return Jo("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return Jo("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return Jo("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return Jo("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return Jo("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return Jo("METERING_SERVICE_URL","https://metering-service-us-central1-eq7z4lly2a-uc.a.run.app")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new R2(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return Jo("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function Jo(t,e){const r=process.env[t];if(r===void 0&&(e===void 0||process.env.NODE_ENV==="production")){throw new R2(t)}return r??e}o(Jo,"getRequiredEnvVar");Of.getRequiredEnvVar=Jo;var R2=class extends Error{static{o(this,"EnvironmentalVariableRequiredError")}constructor(e){super(`The environmental variable '${e}' is required.'`)}};Of.EnvironmentalVariableRequiredError=R2;var Dxe=new eC;Of.default=Dxe});var tC=_(kb=>{"use strict";Object.defineProperty(kb,"__esModule",{value:true});kb.HttpStatusCode=void 0;var $Y;(function(t){t[t["CONTINUE"]=100]="CONTINUE";t[t["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";t[t["PROCESSING"]=102]="PROCESSING";t[t["OK"]=200]="OK";t[t["CREATED"]=201]="CREATED";t[t["ACCEPTED"]=202]="ACCEPTED";t[t["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";t[t["NO_CONTENT"]=204]="NO_CONTENT";t[t["RESET_CONTENT"]=205]="RESET_CONTENT";t[t["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";t[t["MULTI_STATUS"]=207]="MULTI_STATUS";t[t["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";t[t["IM_USED"]=226]="IM_USED";t[t["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";t[t["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";t[t["FOUND"]=302]="FOUND";t[t["SEE_OTHER"]=303]="SEE_OTHER";t[t["NOT_MODIFIED"]=304]="NOT_MODIFIED";t[t["USE_PROXY"]=305]="USE_PROXY";t[t["SWITCH_PROXY"]=306]="SWITCH_PROXY";t[t["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";t[t["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";t[t["BAD_REQUEST"]=400]="BAD_REQUEST";t[t["UNAUTHORIZED"]=401]="UNAUTHORIZED";t[t["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";t[t["FORBIDDEN"]=403]="FORBIDDEN";t[t["NOT_FOUND"]=404]="NOT_FOUND";t[t["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";t[t["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";t[t["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";t[t["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";t[t["CONFLICT"]=409]="CONFLICT";t[t["GONE"]=410]="GONE";t[t["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";t[t["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";t[t["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";t[t["URI_TOO_LONG"]=414]="URI_TOO_LONG";t[t["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";t[t["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";t[t["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";t[t["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";t[t["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";t[t["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";t[t["LOCKED"]=423]="LOCKED";t[t["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";t[t["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";t[t["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";t[t["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";t[t["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";t[t["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";t[t["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";t[t["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";t[t["BAD_GATEWAY"]=502]="BAD_GATEWAY";t[t["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";t[t["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";t[t["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";t[t["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";t[t["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";t[t["LOOP_DETECTED"]=508]="LOOP_DETECTED";t[t["NOT_EXTENDED"]=510]="NOT_EXTENDED";t[t["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})($Y||(kb.HttpStatusCode=$Y={}))});var LY=_($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:true});$b.getSourceControlProviderLabel=void 0;function kxe(t){let e="";switch(t){case"GITLAB":e="GitLab";break;case"GITHUB":e="GitHub";break;case"BITBUCKET":e="BitBucket";break;default:e=t;break}return e}o(kxe,"getSourceControlProviderLabel");$b.getSourceControlProviderLabel=kxe});var jY=_(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:true});N.DEPLOYMENT_CANNOT_DELETE_INSTANCE=N.DEPLOYMENT_INVALID_MULTI_PART=N.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=N.DEPLOYMENT_FILE_DOES_NOT_EXISTS=N.DEPLOYMENT_NOT_FOUND=N.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=N.DEPLOYMENT_NO_ACCESS=N.INVALID_SOURCE_REPO_URL=N.INVALID_EMAIL_FORMAT=N.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=N.PROJECT_MUST_HAVE_ONE_MEMBER=N.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=N.PROJECT_MEMBER_ALREADY_EXISTS=N.PROJECT_MEMBER_NOT_FOUND=N.INVALID_TEMPLATE_REPOSITORY=N.INCORRECT_PROJECT_TEMPLATE=N.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=N.PROJECT_NOT_FOUND=N.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=N.PROJECT_SHARING_DISABLED_ON_ACCOUNT=N.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=N.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=N.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=N.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=N.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=N.ACCOUNT_MEMBER_INVITE_INVALID=N.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=N.ACCOUNT_MEMBER_DOES_NOT_EXIST=N.ACCOUNT_MEMBER_INFO_MISSING=N.ACCOUNT_MEMBER_ALREADY_EXISTS=N.ACCOUNT_UPDATE_INFO_MISSING=N.ACCOUNT_INFO_MISSING=N.ACCOUNT_DOES_NOT_EXISTS=N.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=N.ACCOUNT_NAME_USES_RESERVED_KEYWORD=N.ACCOUNT_ALREADY_EXISTS=N.ACCOUNT_NOT_FOUND=N.USER_IS_NOT_SERVICE_ACCOUNT=N.USER_REMOVE_NOT_MEMBER_ACCOUNT=N.USER_HAS_NO_ACCESS_TO_ACCOUNT=N.USER_DETAILS_CANNOT_BE_FOUND=N.USER_ALREADY_EXISTS=N.CLIENT_NOT_FOUND=N.FORBIDDEN=N.UNAUTHORIZED=N.METHOD_NOT_ALLOWED=N.NOT_FOUND=N.CONFLICT=N.BAD_REQUEST=N.INTERNAL_SERVER_ERROR=void 0;N.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=N.GITHUB_INTEGRATION_DUPLICATE_REPO=N.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=N.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=N.GITHUB_INTEGRATION_BRANCH_BEHIND=N.GITHUB_INTEGRATION_NOT_FOUND=N.GITHUB_REPOSITORY_NOT_FOUND=N.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=N.GITHUB_INTEGRATION_ALREADY_EXISTS=N.FEATURE_FLAGS_NOT_FOUND=N.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=N.PROJECT_ALREADY_HAS_REPO=N.PROJECT_INVALID_NAME=N.FAILED_TO_REVOKE_GH_TOKEN=N.USER_ACCOUNT_NOT_FS_MIGRATED=N.USER_NO_ACCESS_GITLAB_REPO=N.USER_NO_ACCESS_BITBUCKET_REPO=N.GITHUB_APP_CONFIGURATION_NOT_FOUND=N.GITHUB_APP_NO_USER_ACCESS_=N.GITHUB_APP_NO_NAMESPACE_ACCESS=N.GENERIC_GITHUB_BRANCH_INFO_ERROR=N.GITHUB_USER_NO_READ_ACCESS_REPO=N.USER_NO_PULL_ACCESS_GITHUB_REPO=N.USER_NO_ACCESS_GITHUB_REPO=N.PROJECT_SHARING_REQUIRES_GIT_REPO=N.PROJECT_INVALID_GIT_REPO=N.PROJECT_INVALID_GIT_CLONE=N.USER_IS_PROJECT_MEMBER=N.USER_HAS_NO_ACCESS_TO_PROJECT=N.RUNTIME_FLAG_KEY_NOT_VALID=N.RUNTIME_FLAG_NOT_FOUND=N.RUNTIME_FLAG_ALREADY_EXISTS=N.PROJECT_NO_MEMBERS=N.PROJECT_ALREADY_EXISTS=N.SERVICE_CONFIGURATION_FAILED_DECRYPTION=N.WORKING_COPY_SERVICE_NOT_CREATED=N.WORKING_COPY_SERVICE_NOT_DELETED=N.WORKING_COPY_SERVICE_NOT_FOUND=N.SERVICE_CONFIGURATION_NOT_FOUND=N.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=N.DEPLOYMENT_INCORRECT_STATUS_PAUSE=N.DEPLOYMENT_NOT_WORKING_COPY=N.DEPLOYMENT_LOG_NOT_FOUND=N.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=N.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=N.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=N.DEPLOYMENT_DELETE_ERROR=void 0;N.INVALID_BRANCH_NAME=N.TARGET_BRANCH_ONLY_FOR_PREVIEW=N.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=N.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=N.DEPLOYMENT_NAME_MISSING=N.NON_EXISTENT_ENVIRONMENT_VARIABLE=N.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=N.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=N.DUPLICATE_ENVIRONMENT_VARIABLE=N.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=N.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=N.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=N.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=N.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=N.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=N.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=N.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=N.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=N.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=N.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=N.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=N.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=N.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=N.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=N.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=N.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=N.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=N.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=N.SOURCE_CONTROL_REPO_OPERATION_ERROR=N.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=N.SOURCE_CONTROL_REPO_NOT_FOUND=N.SOURCE_CONTROL_AUTHENTICATION_FAILED=N.EXTERNAL_SERVICE_GENERIC_ERROR=N.API_USER_NO_ACCESS=N.EXTERNAL_USER_NOT_CONFIGURED=N.EXTERNAL_USER_NO_ACCESS=N.CONSUMER_DOES_NOT_EXIST=N.CONSUMER_NO_ACCESS=N.GITLAB_ACCESS_LEVEL_CHECK_FAIL=N.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=N.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=N.GITLAB_DUPLICATE_REPO=N.GITLAB_FAILED_DURING_REPO_CREATION=N.GITLAB_QUERY_USER_INFO_FAILED=N.BITBUCKET_FAILED_DURING_REPO_CREATION=N.BITBUCKET_WORKSPACE_MISCONFIGURATION=N.BITBUCKET_QUERY_USER_INFO_FAILED=N.GITHUB_INTEGRATION_INVALID_REPO=N.GIT_CREATE_PROJECT_WITH_INVALID_REPO=N.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=void 0;N.UNABLE_UPGRADE_PLAN=N.BUCKET_API_KEY_SERVICE_CONFLICT=N.DIRECTORY_DELETE_FAILED=N.FILE_DELETE_FAILED=N.CANNOT_DELETE_SOLE_OPEN_API_FILE=N.CANNOT_DELETE_ESSENTIAL_DIRECTORY=N.CANNOT_DELETE_ESSENTIAL_FILE=N.FILE_WRITE_FAILED=N.FILE_RENAME_FAILED=N.FILE_RENAME_FILE_ALREADY_EXISTS=N.FILE_RENAME_CANNOT_CHANGE_EXTENSION=N.FILE_RENAME_PATHS_MATCH=N.DIRECTORY_CREATION_FAILED=N.DIRECTORY_OR_FILE_DOES_NOT_EXIST=N.DIRECTORY_DOES_NOT_EXIST=N.DIRECTORY_ALREADY_EXISTS=N.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=N.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=N.FAILED_DOWNLOAD_FROM_STORAGE=N.CANNOT_FIND_SRC_DIRECTORY=N.CANNOT_READ_PACKAGE_JSON=N.PACKAGE_JSON_NOT_FOUND=N.RUNTIME_VERSION_INCORRECT_FORMAT=N.MIGRATIONS_ONLY_ON_WORKING_COPY=N.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=N.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=N.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=N.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=N.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=N.NO_GLOBAL_SYMBOLS=N.NO_ZUPLO_PREFIXED_VARIABLES=N.NON_EMPTY_TARGETS_REQUIRED=N.CONFLICTING_TYPES=N.OVERLAPPING_TARGETS=void 0;var ae=tC();var qY=LY();var $xe="https://github.com/apps/zuplo/installations/new";N.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:ae.HttpStatusCode.BAD_REQUEST};N.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:ae.HttpStatusCode.CONFLICT};N.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:ae.HttpStatusCode.NOT_FOUND};N.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:ae.HttpStatusCode.METHOD_NOT_ALLOWED};N.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:ae.HttpStatusCode.UNAUTHORIZED};N.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:ae.HttpStatusCode.FORBIDDEN};N.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:ae.HttpStatusCode.NOT_FOUND};N.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:ae.HttpStatusCode.CONFLICT};N.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:ae.HttpStatusCode.NOT_FOUND};N.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:ae.HttpStatusCode.UNAUTHORIZED};N.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:ae.HttpStatusCode.BAD_REQUEST};N.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:ae.HttpStatusCode.CONFLICT};N.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:ae.HttpStatusCode.BAD_REQUEST};N.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:ae.HttpStatusCode.BAD_REQUEST};N.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:ae.HttpStatusCode.BAD_REQUEST};N.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:ae.HttpStatusCode.FORBIDDEN};N.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:ae.HttpStatusCode.NOT_FOUND};N.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:ae.HttpStatusCode.NOT_FOUND};N.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:ae.HttpStatusCode.FORBIDDEN};N.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:ae.HttpStatusCode.BAD_REQUEST};var Lxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${t} is not a valid Zuplo template repository`,status:ae.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");N.INVALID_TEMPLATE_REPOSITORY=Lxe;N.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:ae.HttpStatusCode.NOT_FOUND};N.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:ae.HttpStatusCode.BAD_REQUEST};N.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:ae.HttpStatusCode.BAD_REQUEST};N.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:ae.HttpStatusCode.BAD_REQUEST};N.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:ae.HttpStatusCode.NOT_FOUND};N.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:ae.HttpStatusCode.NOT_FOUND};N.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:ae.HttpStatusCode.BAD_REQUEST};N.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:ae.HttpStatusCode.BAD_REQUEST};N.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:ae.HttpStatusCode.NOT_FOUND};N.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:ae.HttpStatusCode.BAD_REQUEST};N.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:ae.HttpStatusCode.NOT_FOUND};N.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:ae.HttpStatusCode.BAD_REQUEST};N.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:ae.HttpStatusCode.FORBIDDEN};N.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:ae.HttpStatusCode.BAD_REQUEST};var qxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");N.USER_NO_ACCESS_GITHUB_REPO=qxe;var jxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");N.USER_NO_PULL_ACCESS_GITHUB_REPO=jxe;var Uxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");N.GITHUB_USER_NO_READ_ACCESS_REPO=Uxe;N.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:ae.HttpStatusCode.BAD_REQUEST};N.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:ae.HttpStatusCode.FORBIDDEN};var Fxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${t}'. Go to '${$xe}' to add the repository.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");N.GITHUB_APP_NO_USER_ACCESS_=Fxe;N.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:ae.HttpStatusCode.NOT_FOUND};var Mxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");N.USER_NO_ACCESS_BITBUCKET_REPO=Mxe;var Bxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");N.USER_NO_ACCESS_GITLAB_REPO=Bxe;N.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:ae.HttpStatusCode.FORBIDDEN};N.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:ae.HttpStatusCode.BAD_REQUEST};N.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:ae.HttpStatusCode.BAD_REQUEST};N.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:ae.HttpStatusCode.BAD_REQUEST};var Vxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:ae.HttpStatusCode.CONFLICT,detail:`The repository ${t} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");N.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Vxe;var Hxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:ae.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${t} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");N.GITHUB_REPOSITORY_NOT_FOUND=Hxe;N.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:ae.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};N.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};N.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};N.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:ae.HttpStatusCode.FORBIDDEN};var zxe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${t}' already exists on GitHub org '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");N.GITHUB_INTEGRATION_DUPLICATE_REPO=zxe;var Gxe=o(({repositoryName:t,details:e})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:e,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");N.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Gxe;var Kxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");N.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Kxe;var Yxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");N.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Yxe;var Wxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${t}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");N.GITHUB_INTEGRATION_INVALID_REPO=Wxe;N.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:ae.HttpStatusCode.FORBIDDEN};N.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:ae.HttpStatusCode.FORBIDDEN};var Jxe=o(({details:t})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");N.BITBUCKET_FAILED_DURING_REPO_CREATION=Jxe;N.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:ae.HttpStatusCode.FORBIDDEN};var Qxe=o(({details:t})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");N.GITLAB_FAILED_DURING_REPO_CREATION=Qxe;var Xxe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${t}' already exists in GitLab team '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");N.GITLAB_DUPLICATE_REPO=Xxe;var Zxe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");N.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=Zxe;var eCe=o(({namespaceLabel:t})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${t}'.`,details:`The user's GitLab access level does not allow the use of namespace '${t}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");N.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=eCe;var tCe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");N.GITLAB_ACCESS_LEVEL_CHECK_FAIL=tCe;N.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:ae.HttpStatusCode.UNAUTHORIZED};N.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:ae.HttpStatusCode.NOT_FOUND};N.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:ae.HttpStatusCode.UNAUTHORIZED};N.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:ae.HttpStatusCode.FORBIDDEN};N.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:ae.HttpStatusCode.FORBIDDEN};N.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};var rCe=o(({sourceControlProvider:t})=>{const e=(0,qY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${e}`,status:ae.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");N.SOURCE_CONTROL_AUTHENTICATION_FAILED=rCe;var nCe=o(({sourceControlProvider:t})=>{const e=(0,qY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${e} repository`,status:ae.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");N.SOURCE_CONTROL_REPO_NOT_FOUND=nCe;N.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:ae.HttpStatusCode.BAD_REQUEST};var iCe=o(({repoURL:t,operation:e})=>{return{type:`https://zup.fail/source-control-repo-${e}-error`,title:`Failed on ${e} operation to repository '${t}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:ae.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");N.SOURCE_CONTROL_REPO_OPERATION_ERROR=iCe;N.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:ae.HttpStatusCode.NOT_FOUND};N.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.NOT_FOUND};N.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:ae.HttpStatusCode.UNAUTHORIZED};N.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};N.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:ae.HttpStatusCode.BAD_REQUEST};N.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};N.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};N.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:ae.HttpStatusCode.NOT_FOUND};N.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:ae.HttpStatusCode.NOT_FOUND};N.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:ae.HttpStatusCode.FAILED_DEPENDENCY};N.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:ae.HttpStatusCode.FAILED_DEPENDENCY};N.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:ae.HttpStatusCode.FAILED_DEPENDENCY};N.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:ae.HttpStatusCode.BAD_REQUEST};N.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:ae.HttpStatusCode.BAD_REQUEST};N.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:ae.HttpStatusCode.BAD_REQUEST};N.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:ae.HttpStatusCode.BAD_REQUEST};N.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:ae.HttpStatusCode.BAD_REQUEST};N.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:ae.HttpStatusCode.BAD_REQUEST};N.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:ae.HttpStatusCode.BAD_REQUEST};N.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:ae.HttpStatusCode.BAD_REQUEST};N.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:ae.HttpStatusCode.BAD_REQUEST};N.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:ae.HttpStatusCode.BAD_REQUEST};N.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:ae.HttpStatusCode.FORBIDDEN};N.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:ae.HttpStatusCode.NOT_FOUND};var sCe=o(({operation:t,path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${t} file ${e} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");N.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=sCe;var aCe=o(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");N.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=aCe;N.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:ae.HttpStatusCode.BAD_REQUEST};N.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:ae.HttpStatusCode.BAD_REQUEST};N.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:ae.HttpStatusCode.NOT_FOUND};N.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:ae.HttpStatusCode.BAD_REQUEST};N.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:ae.HttpStatusCode.BAD_REQUEST};N.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:ae.HttpStatusCode.BAD_REQUEST};var oCe=o(({path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${t} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");N.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=oCe;var uCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${t} is not allowed.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");N.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=uCe;var lCe=o(({path:t})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${t}.`}),"DIRECTORY_ALREADY_EXISTS");N.DIRECTORY_ALREADY_EXISTS=lCe;var cCe=o(({path:t})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${t}`}),"DIRECTORY_DOES_NOT_EXIST");N.DIRECTORY_DOES_NOT_EXIST=cCe;var dCe=o(({path:t})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${t}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");N.DIRECTORY_OR_FILE_DOES_NOT_EXIST=dCe;var pCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${t}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");N.DIRECTORY_CREATION_FAILED=pCe;var fCe=o(({path:t})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${t} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");N.FILE_RENAME_PATHS_MATCH=fCe;var hCe=o(({oldExtension:t,newExtension:e})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${e} must match the old extension ${t}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");N.FILE_RENAME_CANNOT_CHANGE_EXTENSION=hCe;var mCe=o(({path:t})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${t}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");N.FILE_RENAME_FILE_ALREADY_EXISTS=mCe;var gCe=o(({path:t})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${t}. Please try again or contact support.`}),"FILE_RENAME_FAILED");N.FILE_RENAME_FAILED=gCe;var yCe=o(({path:t})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${t}. Please try again or contact support.`}),"FILE_WRITE_FAILED");N.FILE_WRITE_FAILED=yCe;var vCe=o(({path:t})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`File '${t}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");N.CANNOT_DELETE_ESSENTIAL_FILE=vCe;var _Ce=o(({path:t})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory '${t}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");N.CANNOT_DELETE_ESSENTIAL_DIRECTORY=_Ce;var ECe=o(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");N.CANNOT_DELETE_SOLE_OPEN_API_FILE=ECe;var bCe=o(({path:t})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${t}. Please try again or contact support.`}),"FILE_DELETE_FAILED");N.FILE_DELETE_FAILED=bCe;var wCe=o(({path:t})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${t}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");N.DIRECTORY_DELETE_FAILED=wCe;N.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:ae.HttpStatusCode.CONFLICT};N.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:ae.HttpStatusCode.BAD_REQUEST}});var FY=_(Js=>{"use strict";var SCe=Js&&Js.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var TCe=Js&&Js.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var ACe=Js&&Js.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null){for(var r in t)if(r!=="default"&&Object.prototype.hasOwnProperty.call(t,r))SCe(e,t,r)}TCe(e,t);return e};Object.defineProperty(Js,"__esModule",{value:true});Js.ApiNotFoundError=Js.ApiError=Js.Problems=void 0;var UY=ACe(jY());Js.Problems=UY;var Lb=class extends Error{static{o(this,"ApiError")}type;status;detail;instance;constructor(e){super(e.title);if(!e.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${e.type}`)}this.name="ApiProblemError";this.type=e.type;this.status=e.status;this.detail=e.detail;this.instance=e.instance}};Js.ApiError=Lb;var rC=class extends Lb{static{o(this,"ApiNotFoundError")}constructor(e={}){super({...e,...UY.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Js.ApiNotFoundError=rC});var As=_(rc=>{"use strict";var xCe=rc&&rc.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var CCe=rc&&rc.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))xCe(e,t,r)};Object.defineProperty(rc,"__esModule",{value:true});rc.HttpStatusCode=void 0;CCe(FY(),rc);var RCe=tC();Object.defineProperty(rc,"HttpStatusCode",{enumerable:true,get:function(){return RCe.HttpStatusCode}})});var iC=_(qb=>{"use strict";Object.defineProperty(qb,"__esModule",{value:true});qb.CommonAuth=void 0;var ad=As();var OCe=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var nC=class t{static{o(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(e){return OCe.includes(e)}isDeployerServiceAccount(e){return t.DEPLOYER_USER_SUB===e}static isAuthorizedSub(e,r){if(typeof r==="string"){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}try{const n=e.includes(r.sub);if(!n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}catch(n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}};qb.CommonAuth=nC});var sC=_(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:true});jb.FeatureFlags=void 0;jb.FeatureFlags=Object.freeze({remoteModules:(t,e)=>({flagName:"REMOTE_MODULES",defaultValue:false,accountName:t,projectName:e}),disableIntegratedDevPortalBuild:(t,e)=>({flagName:"DISABLE_INTEGRATED_DEV_PORTAL_BUILD",defaultValue:false,accountName:t,projectName:e}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var BY=_(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:true});od.hasBlockedNotifications=od.getBuildFlagsForDeployment=od.getDefaultFlags=void 0;var MY=sC();var NCe=["chocolate_bold_silverfish"];function ICe(t){const e={remoteModules:!!t?.remoteModules,disableIntegratedDevPortalBuild:!!t?.disableIntegratedDevPortalBuild};return e}o(ICe,"getDefaultFlags");od.getDefaultFlags=ICe;async function PCe(t,{accountName:e,projectName:r}){const n=await t.getFlagValue(MY.FeatureFlags.remoteModules(e,r));const i=await t.getFlagValue(MY.FeatureFlags.disableIntegratedDevPortalBuild(e,r));return{remoteModules:n,disableIntegratedDevPortalBuild:i}}o(PCe,"getBuildFlagsForDeployment");od.getBuildFlagsForDeployment=PCe;function DCe(t){return NCe.includes(t)}o(DCe,"hasBlockedNotifications");od.hasBlockedNotifications=DCe});var VY=_(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:true});Qs.BuildIssueError=Qs.WARNING_SEVERITY=Qs.ERROR_SEVERITY=Qs.FAILURE_STATUS=Qs.WARNING_STATUS=Qs.GOOD_STATUS=void 0;Qs.GOOD_STATUS="Good";Qs.WARNING_STATUS="Warnings";Qs.FAILURE_STATUS="Failed";Qs.ERROR_SEVERITY="error";Qs.WARNING_SEVERITY="warning";var aC=class extends Error{static{o(this,"BuildIssueError")}issue;constructor(e){super(e.message);this.issue=e}};Qs.BuildIssueError=aC});var HY=_(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:true});Ub.COMPATIBILITY_FLAG_MAPPINGS=void 0;Ub.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true}})});var zY=_((mjt,kCe)=>{kCe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2023-03-14",enum:["2023-03-14","2024-01-15"]}}}});var GY=_(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:true});Fb.VALID_COMPATIBILITY_DATES=void 0;Fb.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var KY=_(ud=>{"use strict";var $Ce=ud&&ud.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(ud,"__esModule",{value:true});ud.DEFAULT_COMPATIBILITY_DATE=ud.VALID_COMPATIBILITY_DATES=void 0;var LCe=$Ce(zY());var qCe=GY();Object.defineProperty(ud,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return qCe.VALID_COMPATIBILITY_DATES}});ud.DEFAULT_COMPATIBILITY_DATE=LCe.default.properties.compatibilityDate.default});var YY=_(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:true});ld.decrypt=ld.encrypt=ld.signString=void 0;var Gm=require("crypto");function jCe(t,e){return(0,Gm.createHmac)("sha256",e).update(t).digest("hex")}o(jCe,"signString");ld.signString=jCe;var oC={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var UCe=o(()=>(0,Gm.randomBytes)(oC.IV_BYTE_LEN),"getIV");function FCe(t,e){if(t===null){return null}const r=(0,Gm.createHash)("sha256").update(String(e)).digest("base64").substring(0,32);const n=UCe();const i=(0,Gm.createCipheriv)("aes-256-gcm",r,n,{authTagLength:oC.AUTH_TAG_BYTE_LEN});let s=i.update(t);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}o(FCe,"encrypt");ld.encrypt=FCe;function MCe(t,e){if(!t){return null}const r=Buffer.from(e);const n=(0,Gm.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(t,"hex");const s=i.slice(-16);const a=i.slice(0,12);const u=i.slice(12,-16);const l=(0,Gm.createDecipheriv)("aes-256-gcm",n,a,{authTagLength:oC.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}o(MCe,"decrypt");ld.decrypt=MCe});var WY=_(Mb=>{"use strict";Object.defineProperty(Mb,"__esModule",{value:true});Mb.getCurrentUtcDateTime=void 0;function BCe(){const t={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const e=new Date().toLocaleString("en-US",t);return e}o(BCe,"getCurrentUtcDateTime");Mb.getCurrentUtcDateTime=BCe});var uC=_(Bb=>{"use strict";Object.defineProperty(Bb,"__esModule",{value:true});Bb.DeploymentLogState=void 0;var JY;(function(t){t["ERROR"]="ERROR";t["IN_PROGRESS"]="IN_PROGRESS";t["SUCCESS"]="SUCCESS"})(JY||(Bb.DeploymentLogState=JY={}))});var lC=_(QY=>{"use strict";Object.defineProperty(QY,"__esModule",{value:true})});var ZY=_(XY=>{"use strict";Object.defineProperty(XY,"__esModule",{value:true})});var eW=_(Vb=>{"use strict";Object.defineProperty(Vb,"__esModule",{value:true});Vb.MARKDOWN_FRONTMATTER_KEYS=void 0;Vb.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var rW=_(tW=>{"use strict";Object.defineProperty(tW,"__esModule",{value:true})});var nW=_(Uu=>{"use strict";var VCe=Uu&&Uu.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var Hb=Uu&&Uu.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))VCe(e,t,r)};Object.defineProperty(Uu,"__esModule",{value:true});Hb(lC(),Uu);Hb(ZY(),Uu);Hb(eW(),Uu);Hb(rW(),Uu)});var zb=_(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:true});Fu.getLoggerContext=Fu.requestIdGenerator=Fu.REQUEST_ID_HEADER=Fu.LEGACY_REQUEST_ID_HEADER=void 0;var HCe=require("crypto");Fu.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Fu.REQUEST_ID_HEADER="zp-rid";var zCe=o(t=>{const e=t.headers["zuplo-request-id"];const r=t.headers["X-GitHub-Delivery"];if(e){const n=e;return`${n}`}else if(r){return`${r}`}return(0,HCe.randomUUID)()},"requestIdGenerator");Fu.requestIdGenerator=zCe;function GCe(t){const e=t.raw.url??"";const r={};try{const n=t.headers["zuplo-user"]??t.user?.sub;if(n){r.userSub=`${n}`}const i=e.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=e.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const a=e.match(/(projects)\/([a-zA-Z-0-9]*)/);if(a&&a!==null&&a.length>=2){r.project=a[2]}}catch(n){}return r}o(GCe,"getLoggerContext");Fu.getLoggerContext=GCe});var cC=_(Km=>{"use strict";var KCe=Km&&Km.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Km,"__esModule",{value:true});Km.errorHandler=void 0;var Ga=As();var YCe=KCe(Oa());var iW=zb();function WCe(t,e,r){let n=500;let i;if(t instanceof Ga.ApiError){n=t.status;i={type:t.type,title:t.message,status:t.status,detail:t.detail,instance:t.instance}}else if(typeof t==="object"&&"validation"in t&&"validationContext"in t){n=Ga.HttpStatusCode.BAD_REQUEST;i={...Ga.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${t.validationContext}.`,errors:t.validation}}else if(typeof t==="object"&&"code"in t&&t.code==="FST_ERR_NOT_FOUND"){n=404;i=Ga.Problems.NOT_FOUND}else if(typeof t==="object"&&"code"in t&&typeof t.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(t.code)){n=Ga.HttpStatusCode.BAD_REQUEST;i={...Ga.Problems.BAD_REQUEST,detail:t.message}}else{let a;if(!r.statusCode||r.statusCode===200){if(typeof t==="object"&&"statusCode"in t&&typeof t.statusCode==="number"){a=t.statusCode}else if(typeof t==="object"&&"status"in t&&typeof t.status==="number"){a=t.status}n=a&&a>=400?a:500}else{n=r.statusCode}i=JCe(n);if(YCe.default.NODE_ENV!=="production"){if(typeof t==="object"&&"message"in t){i.detail=t.message}else if(typeof t==="string"){i.detail=t}}}i.trace={timestamp:new Date().toJSON(),requestId:e.headers[iW.REQUEST_ID_HEADER]??e.headers[iW.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:t},t&&t.message)}else{r.log.error({req:e,res:r,err:t},t&&t.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}o(WCe,"errorHandler");Km.errorHandler=WCe;function JCe(t){if(t===401){return Ga.Problems.UNAUTHORIZED}else if(t===403){return Ga.Problems.FORBIDDEN}else if(t===404){return Ga.Problems.NOT_FOUND}else if(t===405){return Ga.Problems.METHOD_NOT_ALLOWED}else if(t<500&&t>=400){return Ga.Problems.BAD_REQUEST}return Ga.Problems.INTERNAL_SERVER_ERROR}o(JCe,"getProblemFromStatus")});var aW=_((Pjt,dC)=>{"use strict";var QCe=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var XCe=/(\w*(\.\w*)*)\..*/;dC.exports=o(function t(e){if(e.name.length>0)return e.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return sW(n.stack)}},"getPluginName");function sW(t){const e=t.match(QCe);return e?e[1].split(/[/\\]/).slice(-1)[0].match(XCe)[1]:"anonymous"}o(sW,"extractPluginName");dC.exports.extractPluginName=sW});var uW=_((kjt,oW)=>{"use strict";oW.exports=o(function t(e){if(e[0]==="@"){e=e.slice(1).replace("/","-")}const r=e.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var cd=_((Ljt,Gb)=>{"use strict";var ZCe=aW();var eRe=uW();var tRe=0;function pC(t,e={}){let r=false;if(typeof t.default!=="undefined"){t=t.default}if(typeof t!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof t}'`)}if(typeof e==="string"){e={fastify:e}}if(typeof e!=="object"||Array.isArray(e)||e===null){throw new TypeError("The options object should be an object")}if(e.fastify!==void 0&&typeof e.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof e.fastify}'`)}if(!e.name){r=true;e.name=ZCe(t)+"-auto-"+tRe++}t[Symbol.for("skip-override")]=e.encapsulate!==true;t[Symbol.for("fastify.display-name")]=e.name;t[Symbol.for("plugin-meta")]=e;if(!t.default){t.default=t}const n=eRe(e.name);if(!r&&!t[n]){t[n]=t}return t}o(pC,"plugin");Gb.exports=pC;Gb.exports.default=pC;Gb.exports.fastifyPlugin=pC});var cW=_(Ym=>{"use strict";var rRe=Ym&&Ym.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Ym,"__esModule",{value:true});Ym.apiKeyAuthPlugin=void 0;var Mu=As();var nRe=rRe(cd());var iRe="https://apikey.zuplo.com";var lW=`Bearer `;Ym.apiKeyAuthPlugin=(0,nRe.default)(async(t,e)=>{t.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new Mu.ApiError({...Mu.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(lW)){throw new Mu.ApiError({...Mu.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(lW.length);if(!i||i===""){throw new Mu.ApiError({...Mu.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const a=await fetch(`${iRe}/v1/$validate/${e.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(a.status===401){throw new Mu.ApiError(Mu.Problems.UNAUTHORIZED)}const u=await a.json();if(e.allowedSubs){if(!e.allowedSubs.includes(u.name)){throw new Mu.ApiError(Mu.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var dW=_(Wm=>{"use strict";var sRe=Wm&&Wm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Wm,"__esModule",{value:true});Wm.ensureServiceAccountPlugin=void 0;var Kb=As();var aRe=sRe(cd());Wm.ensureServiceAccountPlugin=(0,aRe.default)(async t=>{t.decorate("ensureServiceAccount",e=>async function(r){if(!r.user){r.log.error(`Bad request, zuplo:user header not present`);throw new Kb.ApiError(Kb.Problems.UNAUTHORIZED)}const n=r.user.sub;if(e!==n){r.log.error("The claim 'zuplo:user' is not from an authorized service account.");throw new Kb.ApiError(Kb.Problems.FORBIDDEN)}})},{name:"ensure-service-account-plugin"})});var pW=_(Jm=>{"use strict";var oRe=Jm&&Jm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Jm,"__esModule",{value:true});Jm.ensureZuploAdminPlugin=void 0;var Yb=As();var uRe=oRe(cd());var lRe=iC();Jm.ensureZuploAdminPlugin=(0,uRe.default)(async function(t){const e=new lRe.CommonAuth;t.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new Yb.ApiError(Yb.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&e.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new Yb.ApiError(Yb.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var hW=_(Qm=>{"use strict";var cRe=Qm&&Qm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Qm,"__esModule",{value:true});Qm.ensureZuploUserPlugin=void 0;var fW=As();var dRe=cRe(cd());Qm.ensureZuploUserPlugin=(0,dRe.default)(async t=>{t.decorate("ensureZuploUser",async function(e){const r=e.headers["zuplo-user"];if(!r||typeof r!=="string"){e.log.error("The 'zuplo-user' header is missing");throw new fW.ApiError(fW.Problems.UNAUTHORIZED)}e.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var yW=_(Xm=>{"use strict";var pRe=Xm&&Xm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Xm,"__esModule",{value:true});Xm.featureFlagsPlugin=void 0;var fRe=pRe(cd());var fC;async function mW(t,e){try{const r=await fC?.variation(e.flagName,{kind:e.kind,key:e.key},e.defaultValue);if(r===void 0){return e.defaultValue}else{return r}}catch(r){t.log.warn(`Failed to query Launch Darkly flag ${e.flagName}`);t.log.error(r)}return e.defaultValue}o(mW,"getFlagValue");function gW(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return false}o(gW,"fallback");Xm.featureFlagsPlugin=(0,fRe.default)(async(t,e)=>{try{if(typeof e.key!=="string"||!e.key||!e.client){t.decorateRequest("getFlagValue",gW);t.decorateRequest("getFlagValueByUser",gW);return}fC=e.client;t.log.info("Launch Darkly SDK successfully initialized!");t.decorate("flags",fC);t.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return mW(this,s)});t.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return mW(this,s)})}catch(r){t.log.warn("Launch Darkly failed to initialize");t.log.error(r)}},{name:"feature-flag-plugin"})});var hC=_(Zm=>{"use strict";var hRe=Zm&&Zm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Zm,"__esModule",{value:true});Zm.getUserSubPlugin=void 0;var vW=As();var mRe=hRe(cd());Zm.getUserSubPlugin=(0,mRe.default)(async t=>{t.decorateRequest("getUserSub",function(){const e=this.user?.sub;if(!e){this.log.error("Could not determine the user sub");throw new vW.ApiError(vW.Problems.UNAUTHORIZED)}return e})},{name:"get-user-sub-plugin"})});var mC=_(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:true});Xs.getUserSubPlugin=Xs.featureFlagsPlugin=Xs.ensureZuploUserPlugin=Xs.ensureZuploAdminPlugin=Xs.ensureServiceAccountPlugin=Xs.apiKeyAuthPlugin=void 0;var gRe=cW();Object.defineProperty(Xs,"apiKeyAuthPlugin",{enumerable:true,get:function(){return gRe.apiKeyAuthPlugin}});var yRe=dW();Object.defineProperty(Xs,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return yRe.ensureServiceAccountPlugin}});var vRe=pW();Object.defineProperty(Xs,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return vRe.ensureZuploAdminPlugin}});var _Re=hW();Object.defineProperty(Xs,"ensureZuploUserPlugin",{enumerable:true,get:function(){return _Re.ensureZuploUserPlugin}});var ERe=yW();Object.defineProperty(Xs,"featureFlagsPlugin",{enumerable:true,get:function(){return ERe.featureFlagsPlugin}});var bRe=hC();Object.defineProperty(Xs,"getUserSubPlugin",{enumerable:true,get:function(){return bRe.getUserSubPlugin}})});var Kr=_(qi=>{"use strict";var gC=Symbol.for("yaml.alias");var _W=Symbol.for("yaml.document");var Wb=Symbol.for("yaml.map");var EW=Symbol.for("yaml.pair");var yC=Symbol.for("yaml.scalar");var Jb=Symbol.for("yaml.seq");var nc=Symbol.for("yaml.node.type");var wRe=o(t=>!!t&&typeof t==="object"&&t[nc]===gC,"isAlias");var SRe=o(t=>!!t&&typeof t==="object"&&t[nc]===_W,"isDocument");var TRe=o(t=>!!t&&typeof t==="object"&&t[nc]===Wb,"isMap");var ARe=o(t=>!!t&&typeof t==="object"&&t[nc]===EW,"isPair");var bW=o(t=>!!t&&typeof t==="object"&&t[nc]===yC,"isScalar");var xRe=o(t=>!!t&&typeof t==="object"&&t[nc]===Jb,"isSeq");function wW(t){if(t&&typeof t==="object")switch(t[nc]){case Wb:case Jb:return true}return false}o(wW,"isCollection");function CRe(t){if(t&&typeof t==="object")switch(t[nc]){case gC:case Wb:case yC:case Jb:return true}return false}o(CRe,"isNode");var RRe=o(t=>(bW(t)||wW(t))&&!!t.anchor,"hasAnchor");qi.ALIAS=gC;qi.DOC=_W;qi.MAP=Wb;qi.NODE_TYPE=nc;qi.PAIR=EW;qi.SCALAR=yC;qi.SEQ=Jb;qi.hasAnchor=RRe;qi.isAlias=wRe;qi.isCollection=wW;qi.isDocument=SRe;qi.isMap=TRe;qi.isNode=CRe;qi.isPair=ARe;qi.isScalar=bW;qi.isSeq=xRe});var O2=_(vC=>{"use strict";var mi=Kr();var Zs=Symbol("break visit");var SW=Symbol("skip children");var Bu=Symbol("remove node");function Qb(t,e){const r=TW(e);if(mi.isDocument(t)){const n=e0(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else e0(null,t,r,Object.freeze([]))}o(Qb,"visit");Qb.BREAK=Zs;Qb.SKIP=SW;Qb.REMOVE=Bu;function e0(t,e,r,n){const i=AW(t,e,r,n);if(mi.isNode(i)||mi.isPair(i)){xW(t,n,i);return e0(t,i,r,n)}if(typeof i!=="symbol"){if(mi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=e0(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(mi.isPair(e)){n=Object.freeze(n.concat(e));const s=e0("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=e0("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(e0,"visit_");async function Xb(t,e){const r=TW(e);if(mi.isDocument(t)){const n=await t0(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else await t0(null,t,r,Object.freeze([]))}o(Xb,"visitAsync");Xb.BREAK=Zs;Xb.SKIP=SW;Xb.REMOVE=Bu;async function t0(t,e,r,n){const i=await AW(t,e,r,n);if(mi.isNode(i)||mi.isPair(i)){xW(t,n,i);return t0(t,i,r,n)}if(typeof i!=="symbol"){if(mi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=await t0(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(mi.isPair(e)){n=Object.freeze(n.concat(e));const s=await t0("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=await t0("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(t0,"visitAsync_");function TW(t){if(typeof t==="object"&&(t.Collection||t.Node||t.Value)){return Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t)}return t}o(TW,"initVisitor");function AW(t,e,r,n){if(typeof r==="function")return r(t,e,n);if(mi.isMap(e))return r.Map?.(t,e,n);if(mi.isSeq(e))return r.Seq?.(t,e,n);if(mi.isPair(e))return r.Pair?.(t,e,n);if(mi.isScalar(e))return r.Scalar?.(t,e,n);if(mi.isAlias(e))return r.Alias?.(t,e,n);return void 0}o(AW,"callVisitor");function xW(t,e,r){const n=e[e.length-1];if(mi.isCollection(n)){n.items[t]=r}else if(mi.isPair(n)){if(t==="key")n.key=r;else n.value=r}else if(mi.isDocument(n)){n.contents=r}else{const i=mi.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(xW,"replaceNode");vC.visit=Qb;vC.visitAsync=Xb});var _C=_(RW=>{"use strict";var CW=Kr();var ORe=O2();var NRe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var IRe=o(t=>t.replace(/[!,[\]{}]/g,e=>NRe[e]),"escapeTagName");var N2=class t{static{o(this,"Directives")}constructor(e,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},t.defaultYaml,e);this.tags=Object.assign({},t.defaultTags,r)}clone(){const e=new t(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){if(this.atNextDocument){this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},t.defaultTags);this.atNextDocument=false}const n=e.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,a]=n;this.tags[s]=a;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const a=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,a);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!"){r(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const a=e.slice(2,-1);if(a==="!"||a==="!!"){r(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")r("Verbatim tags must end with a >");return a}const[,n,i]=e.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${e} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(a){r(String(a));return null}}if(n==="!")return e;r(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[r,n]of Object.entries(this.tags)){if(e.startsWith(n))return r+IRe(e.substring(n.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(e&&n.length>0&&CW.isNode(e.contents)){const s={};ORe.visit(e.contents,(a,u)=>{if(CW.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,a]of n){if(s==="!!"&&a==="tag:yaml.org,2002:")continue;if(!e||i.some(u=>u.startsWith(a)))r.push(`%TAG ${s} ${a}`)}return r.join("\n")}};N2.defaultYaml={explicit:false,version:"1.2"};N2.defaultTags={"!!":"tag:yaml.org,2002:"};RW.Directives=N2});var Zb=_(I2=>{"use strict";var OW=Kr();var PRe=O2();function DRe(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const e=JSON.stringify(t);const r=`Anchor must not contain whitespace or control characters: ${e}`;throw new Error(r)}return true}o(DRe,"anchorIsValid");function NW(t){const e=new Set;PRe.visit(t,{Value(r,n){if(n.anchor)e.add(n.anchor)}});return e}o(NW,"anchorNames");function IW(t,e){for(let r=1;true;++r){const n=`${t}${r}`;if(!e.has(n))return n}}o(IW,"findNewAnchor");function kRe(t,e){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=NW(t);const a=IW(e,i);i.add(a);return a},setAnchors:()=>{for(const s of r){const a=n.get(s);if(typeof a==="object"&&a.anchor&&(OW.isScalar(a.node)||OW.isCollection(a.node))){a.node.anchor=a.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}o(kRe,"createNodeAnchors");I2.anchorIsValid=DRe;I2.anchorNames=NW;I2.createNodeAnchors=kRe;I2.findNewAnchor=IW});var EC=_(PW=>{"use strict";function P2(t,e,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const a=n[i];const u=P2(t,n,String(i),a);if(u===void 0)delete n[i];else if(u!==a)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const a=P2(t,n,i,s);if(a===void 0)n.delete(i);else if(a!==s)n.set(i,a)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=P2(t,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const a=P2(t,n,i,s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}}}return t.call(e,r,n)}o(P2,"applyReviver");PW.applyReviver=P2});var dd=_(kW=>{"use strict";var $Re=Kr();function DW(t,e,r){if(Array.isArray(t))return t.map((n,i)=>DW(n,String(i),r));if(t&&typeof t.toJSON==="function"){if(!r||!$Re.hasAnchor(t))return t.toJSON(e,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=t.toJSON(e,r);if(r.onCreate)r.onCreate(i);return i}if(typeof t==="bigint"&&!r?.keep)return Number(t);return t}o(DW,"toJS");kW.toJS=DW});var e3=_(LW=>{"use strict";var LRe=EC();var $W=Kr();var qRe=dd();var bC=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,$W.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!$W.isDocument(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=qRe.toJS(this,"",a);if(typeof i==="function")for(const{count:l,res:c}of a.anchors.values())i(c,l);return typeof s==="function"?LRe.applyReviver(s,{"":u},"",u):u}};LW.NodeBase=bC});var D2=_(jW=>{"use strict";var jRe=Zb();var qW=O2();var t3=Kr();var URe=e3();var FRe=dd();var wC=class extends URe.NodeBase{static{o(this,"Alias")}constructor(e){super(t3.ALIAS);this.source=e;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let r=void 0;qW.visit(e,{Node:(n,i)=>{if(i===this)return qW.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(e,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const a=this.resolve(i);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(a);if(!u){FRe.toJS(a,null,r);u=n.get(a)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=r3(i,a,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(e,r,n){const i=`*${this.source}`;if(e){jRe.anchorIsValid(this.source);if(e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function r3(t,e,r){if(t3.isAlias(e)){const n=e.resolve(t);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(t3.isCollection(e)){let n=0;for(const i of e.items){const s=r3(t,i,r);if(s>n)n=s}return n}else if(t3.isPair(e)){const n=r3(t,e.key,r);const i=r3(t,e.value,r);return Math.max(n,i)}return 1}o(r3,"getAliasCount");jW.Alias=wC});var si=_(SC=>{"use strict";var MRe=Kr();var BRe=e3();var VRe=dd();var HRe=o(t=>!t||typeof t!=="function"&&typeof t!=="object","isScalarValue");var pd=class extends BRe.NodeBase{static{o(this,"Scalar")}constructor(e){super(MRe.SCALAR);this.value=e}toJSON(e,r){return r?.keep?this.value:VRe.toJS(this.value,e,r)}toString(){return String(this.value)}};pd.BLOCK_FOLDED="BLOCK_FOLDED";pd.BLOCK_LITERAL="BLOCK_LITERAL";pd.PLAIN="PLAIN";pd.QUOTE_DOUBLE="QUOTE_DOUBLE";pd.QUOTE_SINGLE="QUOTE_SINGLE";SC.Scalar=pd;SC.isScalarValue=HRe});var k2=_(FW=>{"use strict";var zRe=D2();var Nf=Kr();var UW=si();var GRe="tag:yaml.org,2002:";function KRe(t,e,r){if(e){const n=r.filter(s=>s.tag===e);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}o(KRe,"findTagObject");function YRe(t,e,r){if(Nf.isDocument(t))t=t.contents;if(Nf.isNode(t))return t;if(Nf.isPair(t)){const p=r.schema[Nf.MAP].createNode?.(r.schema,null,r);p.items.push(t);return p}if(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt!=="undefined"&&t instanceof BigInt){t=t.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:u}=r;let l=void 0;if(n&&t&&typeof t==="object"){l=u.get(t);if(l){if(!l.anchor)l.anchor=i(t);return new zRe.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(t,l)}}if(e?.startsWith("!!"))e=GRe+e.slice(2);let c=KRe(t,e,a.tags);if(!c){if(t&&typeof t.toJSON==="function"){t=t.toJSON()}if(!t||typeof t!=="object"){const p=new UW.Scalar(t);if(l)l.node=p;return p}c=t instanceof Map?a[Nf.MAP]:Symbol.iterator in Object(t)?a[Nf.SEQ]:a[Nf.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,t,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,t,r):new UW.Scalar(t);if(e)d.tag=e;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}o(YRe,"createNode");FW.createNode=YRe});var $2=_(i3=>{"use strict";var WRe=k2();var Vu=Kr();var JRe=e3();function TC(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n;n=a}else{n=new Map([[s,n]])}}return WRe.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}o(TC,"collectionFromPath");var MW=o(t=>t==null||typeof t==="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath");var n3=class extends JRe.NodeBase{static{o(this,"Collection")}constructor(e,r){super(e);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(e){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)r.schema=e;r.items=r.items.map(n=>Vu.isNode(n)||Vu.isPair(n)?n.clone(e):n);if(this.range)r.range=this.range.slice();return r}addIn(e,r){if(MW(e))this.add(r);else{const[n,...i]=e;const s=this.get(n,true);if(Vu.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,TC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[r,...n]=e;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(Vu.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){const[n,...i]=e;const s=this.get(n,true);if(i.length===0)return!r&&Vu.isScalar(s)?s.value:s;else return Vu.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Vu.isPair(r))return false;const n=r.value;return n==null||e&&Vu.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[r,...n]=e;if(n.length===0)return this.has(r);const i=this.get(r,true);return Vu.isCollection(i)?i.hasIn(n):false}setIn(e,r){const[n,...i]=e;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(Vu.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,TC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};n3.maxFlowStringSingleLineLength=60;i3.Collection=n3;i3.collectionFromPath=TC;i3.isEmptyPath=MW});var L2=_(s3=>{"use strict";var QRe=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function AC(t,e){if(/^\n+$/.test(t))return t.substring(1);return e?t.replace(/^(?! *$)/gm,e):t}o(AC,"indentComment");var XRe=o((t,e,r)=>t.endsWith("\n")?AC(r,e):r.includes("\n")?"\n"+AC(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");s3.indentComment=AC;s3.lineComment=XRe;s3.stringifyComment=QRe});var VW=_(q2=>{"use strict";var ZRe="flow";var xC="block";var a3="quoted";function eOe(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:u}={}){if(!i||i<0)return t;const l=Math.max(1+s,1+i-e.length);if(t.length<=l)return t;const c=[];const d={};let p=i-e.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let h=void 0;let m=false;let g=-1;let y=-1;let v=-1;if(r===xC){g=BW(t,g);if(g!==-1)p=g+l}for(let E;E=t[g+=1];){if(r===a3&&E==="\\"){y=g;switch(t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===xC)g=BW(t,g);p=g+l;f=void 0}else{if(E===" "&&h&&h!==" "&&h!=="\n"&&h!==" "){const b=t[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===a3){while(h===" "||h===" "){h=E;E=t[g+=1];m=true}const b=g>v+1?g-2:y-1;if(d[b])return t;c.push(b);d[b]=true;p=b+l;f=void 0}else{m=true}}}h=E}if(m&&u)u();if(c.length===0)return t;if(a)a();let w=t.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const S=c[E+1]||t.length;if(b===0)w=`
|
|
25
|
+
"use strict";var Rxe=Object.create;var C2=Object.defineProperty;var Oxe=Object.getOwnPropertyDescriptor;var Nxe=Object.getOwnPropertyNames;var Ixe=Object.getPrototypeOf;var Pxe=Object.prototype.hasOwnProperty;var o=(t,e)=>C2(t,"name",{value:e,configurable:true});var Gr=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var DY=(t,e)=>{for(var r in e)C2(t,r,{get:e[r],enumerable:true})};var kY=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let i of Nxe(e))if(!Pxe.call(t,i)&&i!==r)C2(t,i,{get:()=>e[i],enumerable:!(n=Oxe(e,i))||n.enumerable})}return t};var Rf=(t,e,r)=>(r=t!=null?Rxe(Ixe(t)):{},kY(e||!t||!t.__esModule?C2(r,"default",{value:t,enumerable:true}):r,t));var zm=t=>kY(C2({},"__esModule",{value:true}),t);var Oa=_(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:true});Of.EnvironmentalVariableRequiredError=Of.getRequiredEnvVar=void 0;var eC=class{static{o(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.51.0"}get AUTH_API_URL(){return Jo("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return Jo("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return Jo("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return Jo("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return Jo("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return Jo("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return Jo("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return Jo("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return Jo("METERING_SERVICE_URL","https://meters.zuplo.com")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new R2(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return Jo("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function Jo(t,e){const r=process.env[t];if(r===void 0&&(e===void 0||process.env.NODE_ENV==="production")){throw new R2(t)}return r??e}o(Jo,"getRequiredEnvVar");Of.getRequiredEnvVar=Jo;var R2=class extends Error{static{o(this,"EnvironmentalVariableRequiredError")}constructor(e){super(`The environmental variable '${e}' is required.'`)}};Of.EnvironmentalVariableRequiredError=R2;var Dxe=new eC;Of.default=Dxe});var tC=_(kb=>{"use strict";Object.defineProperty(kb,"__esModule",{value:true});kb.HttpStatusCode=void 0;var $Y;(function(t){t[t["CONTINUE"]=100]="CONTINUE";t[t["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";t[t["PROCESSING"]=102]="PROCESSING";t[t["OK"]=200]="OK";t[t["CREATED"]=201]="CREATED";t[t["ACCEPTED"]=202]="ACCEPTED";t[t["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";t[t["NO_CONTENT"]=204]="NO_CONTENT";t[t["RESET_CONTENT"]=205]="RESET_CONTENT";t[t["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";t[t["MULTI_STATUS"]=207]="MULTI_STATUS";t[t["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";t[t["IM_USED"]=226]="IM_USED";t[t["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";t[t["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";t[t["FOUND"]=302]="FOUND";t[t["SEE_OTHER"]=303]="SEE_OTHER";t[t["NOT_MODIFIED"]=304]="NOT_MODIFIED";t[t["USE_PROXY"]=305]="USE_PROXY";t[t["SWITCH_PROXY"]=306]="SWITCH_PROXY";t[t["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";t[t["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";t[t["BAD_REQUEST"]=400]="BAD_REQUEST";t[t["UNAUTHORIZED"]=401]="UNAUTHORIZED";t[t["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";t[t["FORBIDDEN"]=403]="FORBIDDEN";t[t["NOT_FOUND"]=404]="NOT_FOUND";t[t["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";t[t["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";t[t["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";t[t["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";t[t["CONFLICT"]=409]="CONFLICT";t[t["GONE"]=410]="GONE";t[t["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";t[t["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";t[t["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";t[t["URI_TOO_LONG"]=414]="URI_TOO_LONG";t[t["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";t[t["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";t[t["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";t[t["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";t[t["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";t[t["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";t[t["LOCKED"]=423]="LOCKED";t[t["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";t[t["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";t[t["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";t[t["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";t[t["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";t[t["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";t[t["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";t[t["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";t[t["BAD_GATEWAY"]=502]="BAD_GATEWAY";t[t["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";t[t["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";t[t["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";t[t["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";t[t["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";t[t["LOOP_DETECTED"]=508]="LOOP_DETECTED";t[t["NOT_EXTENDED"]=510]="NOT_EXTENDED";t[t["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})($Y||(kb.HttpStatusCode=$Y={}))});var LY=_($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:true});$b.getSourceControlProviderLabel=void 0;function kxe(t){let e="";switch(t){case"GITLAB":e="GitLab";break;case"GITHUB":e="GitHub";break;case"BITBUCKET":e="BitBucket";break;default:e=t;break}return e}o(kxe,"getSourceControlProviderLabel");$b.getSourceControlProviderLabel=kxe});var jY=_(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:true});N.DEPLOYMENT_CANNOT_DELETE_INSTANCE=N.DEPLOYMENT_INVALID_MULTI_PART=N.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=N.DEPLOYMENT_FILE_DOES_NOT_EXISTS=N.DEPLOYMENT_NOT_FOUND=N.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=N.DEPLOYMENT_NO_ACCESS=N.INVALID_SOURCE_REPO_URL=N.INVALID_EMAIL_FORMAT=N.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=N.PROJECT_MUST_HAVE_ONE_MEMBER=N.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=N.PROJECT_MEMBER_ALREADY_EXISTS=N.PROJECT_MEMBER_NOT_FOUND=N.INVALID_TEMPLATE_REPOSITORY=N.INCORRECT_PROJECT_TEMPLATE=N.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=N.PROJECT_NOT_FOUND=N.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=N.PROJECT_SHARING_DISABLED_ON_ACCOUNT=N.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=N.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=N.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=N.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=N.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=N.ACCOUNT_MEMBER_INVITE_INVALID=N.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=N.ACCOUNT_MEMBER_DOES_NOT_EXIST=N.ACCOUNT_MEMBER_INFO_MISSING=N.ACCOUNT_MEMBER_ALREADY_EXISTS=N.ACCOUNT_UPDATE_INFO_MISSING=N.ACCOUNT_INFO_MISSING=N.ACCOUNT_DOES_NOT_EXISTS=N.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=N.ACCOUNT_NAME_USES_RESERVED_KEYWORD=N.ACCOUNT_ALREADY_EXISTS=N.ACCOUNT_NOT_FOUND=N.USER_IS_NOT_SERVICE_ACCOUNT=N.USER_REMOVE_NOT_MEMBER_ACCOUNT=N.USER_HAS_NO_ACCESS_TO_ACCOUNT=N.USER_DETAILS_CANNOT_BE_FOUND=N.USER_ALREADY_EXISTS=N.CLIENT_NOT_FOUND=N.FORBIDDEN=N.UNAUTHORIZED=N.METHOD_NOT_ALLOWED=N.NOT_FOUND=N.CONFLICT=N.BAD_REQUEST=N.INTERNAL_SERVER_ERROR=void 0;N.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=N.GITHUB_INTEGRATION_DUPLICATE_REPO=N.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=N.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=N.GITHUB_INTEGRATION_BRANCH_BEHIND=N.GITHUB_INTEGRATION_NOT_FOUND=N.GITHUB_REPOSITORY_NOT_FOUND=N.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=N.GITHUB_INTEGRATION_ALREADY_EXISTS=N.FEATURE_FLAGS_NOT_FOUND=N.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=N.PROJECT_ALREADY_HAS_REPO=N.PROJECT_INVALID_NAME=N.FAILED_TO_REVOKE_GH_TOKEN=N.USER_ACCOUNT_NOT_FS_MIGRATED=N.USER_NO_ACCESS_GITLAB_REPO=N.USER_NO_ACCESS_BITBUCKET_REPO=N.GITHUB_APP_CONFIGURATION_NOT_FOUND=N.GITHUB_APP_NO_USER_ACCESS_=N.GITHUB_APP_NO_NAMESPACE_ACCESS=N.GENERIC_GITHUB_BRANCH_INFO_ERROR=N.GITHUB_USER_NO_READ_ACCESS_REPO=N.USER_NO_PULL_ACCESS_GITHUB_REPO=N.USER_NO_ACCESS_GITHUB_REPO=N.PROJECT_SHARING_REQUIRES_GIT_REPO=N.PROJECT_INVALID_GIT_REPO=N.PROJECT_INVALID_GIT_CLONE=N.USER_IS_PROJECT_MEMBER=N.USER_HAS_NO_ACCESS_TO_PROJECT=N.RUNTIME_FLAG_KEY_NOT_VALID=N.RUNTIME_FLAG_NOT_FOUND=N.RUNTIME_FLAG_ALREADY_EXISTS=N.PROJECT_NO_MEMBERS=N.PROJECT_ALREADY_EXISTS=N.SERVICE_CONFIGURATION_FAILED_DECRYPTION=N.WORKING_COPY_SERVICE_NOT_CREATED=N.WORKING_COPY_SERVICE_NOT_DELETED=N.WORKING_COPY_SERVICE_NOT_FOUND=N.SERVICE_CONFIGURATION_NOT_FOUND=N.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=N.DEPLOYMENT_INCORRECT_STATUS_PAUSE=N.DEPLOYMENT_NOT_WORKING_COPY=N.DEPLOYMENT_LOG_NOT_FOUND=N.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=N.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=N.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=N.DEPLOYMENT_DELETE_ERROR=void 0;N.INVALID_BRANCH_NAME=N.TARGET_BRANCH_ONLY_FOR_PREVIEW=N.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=N.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=N.DEPLOYMENT_NAME_MISSING=N.NON_EXISTENT_ENVIRONMENT_VARIABLE=N.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=N.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=N.DUPLICATE_ENVIRONMENT_VARIABLE=N.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=N.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=N.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=N.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=N.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=N.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=N.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=N.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=N.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=N.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=N.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=N.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=N.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=N.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=N.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=N.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=N.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=N.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=N.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=N.SOURCE_CONTROL_REPO_OPERATION_ERROR=N.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=N.SOURCE_CONTROL_REPO_NOT_FOUND=N.SOURCE_CONTROL_AUTHENTICATION_FAILED=N.EXTERNAL_SERVICE_GENERIC_ERROR=N.API_USER_NO_ACCESS=N.EXTERNAL_USER_NOT_CONFIGURED=N.EXTERNAL_USER_NO_ACCESS=N.CONSUMER_DOES_NOT_EXIST=N.CONSUMER_NO_ACCESS=N.GITLAB_ACCESS_LEVEL_CHECK_FAIL=N.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=N.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=N.GITLAB_DUPLICATE_REPO=N.GITLAB_FAILED_DURING_REPO_CREATION=N.GITLAB_QUERY_USER_INFO_FAILED=N.BITBUCKET_FAILED_DURING_REPO_CREATION=N.BITBUCKET_WORKSPACE_MISCONFIGURATION=N.BITBUCKET_QUERY_USER_INFO_FAILED=N.GITHUB_INTEGRATION_INVALID_REPO=N.GIT_CREATE_PROJECT_WITH_INVALID_REPO=N.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=void 0;N.UNABLE_UPGRADE_PLAN=N.BUCKET_API_KEY_SERVICE_CONFLICT=N.DIRECTORY_DELETE_FAILED=N.FILE_DELETE_FAILED=N.CANNOT_DELETE_SOLE_OPEN_API_FILE=N.CANNOT_DELETE_ESSENTIAL_DIRECTORY=N.CANNOT_DELETE_ESSENTIAL_FILE=N.FILE_WRITE_FAILED=N.FILE_RENAME_FAILED=N.FILE_RENAME_FILE_ALREADY_EXISTS=N.FILE_RENAME_CANNOT_CHANGE_EXTENSION=N.FILE_RENAME_PATHS_MATCH=N.DIRECTORY_CREATION_FAILED=N.DIRECTORY_OR_FILE_DOES_NOT_EXIST=N.DIRECTORY_DOES_NOT_EXIST=N.DIRECTORY_ALREADY_EXISTS=N.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=N.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=N.FAILED_DOWNLOAD_FROM_STORAGE=N.CANNOT_FIND_SRC_DIRECTORY=N.CANNOT_READ_PACKAGE_JSON=N.PACKAGE_JSON_NOT_FOUND=N.RUNTIME_VERSION_INCORRECT_FORMAT=N.MIGRATIONS_ONLY_ON_WORKING_COPY=N.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=N.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=N.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=N.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=N.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=N.NO_GLOBAL_SYMBOLS=N.NO_ZUPLO_PREFIXED_VARIABLES=N.NON_EMPTY_TARGETS_REQUIRED=N.CONFLICTING_TYPES=N.OVERLAPPING_TARGETS=void 0;var ae=tC();var qY=LY();var $xe="https://github.com/apps/zuplo/installations/new";N.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:ae.HttpStatusCode.BAD_REQUEST};N.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:ae.HttpStatusCode.CONFLICT};N.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:ae.HttpStatusCode.NOT_FOUND};N.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:ae.HttpStatusCode.METHOD_NOT_ALLOWED};N.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:ae.HttpStatusCode.UNAUTHORIZED};N.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:ae.HttpStatusCode.FORBIDDEN};N.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:ae.HttpStatusCode.NOT_FOUND};N.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:ae.HttpStatusCode.CONFLICT};N.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:ae.HttpStatusCode.NOT_FOUND};N.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:ae.HttpStatusCode.UNAUTHORIZED};N.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:ae.HttpStatusCode.BAD_REQUEST};N.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:ae.HttpStatusCode.CONFLICT};N.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:ae.HttpStatusCode.NOT_FOUND};N.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:ae.HttpStatusCode.BAD_REQUEST};N.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:ae.HttpStatusCode.BAD_REQUEST};N.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:ae.HttpStatusCode.BAD_REQUEST};N.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:ae.HttpStatusCode.FORBIDDEN};N.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:ae.HttpStatusCode.NOT_FOUND};N.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:ae.HttpStatusCode.NOT_FOUND};N.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:ae.HttpStatusCode.FORBIDDEN};N.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:ae.HttpStatusCode.BAD_REQUEST};var Lxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${t} is not a valid Zuplo template repository`,status:ae.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");N.INVALID_TEMPLATE_REPOSITORY=Lxe;N.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:ae.HttpStatusCode.NOT_FOUND};N.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:ae.HttpStatusCode.BAD_REQUEST};N.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:ae.HttpStatusCode.BAD_REQUEST};N.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:ae.HttpStatusCode.FORBIDDEN};N.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:ae.HttpStatusCode.BAD_REQUEST};N.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:ae.HttpStatusCode.NOT_FOUND};N.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:ae.HttpStatusCode.NOT_FOUND};N.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:ae.HttpStatusCode.BAD_REQUEST};N.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:ae.HttpStatusCode.BAD_REQUEST};N.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:ae.HttpStatusCode.NOT_FOUND};N.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:ae.HttpStatusCode.BAD_REQUEST};N.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:ae.HttpStatusCode.NOT_FOUND};N.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:ae.HttpStatusCode.BAD_REQUEST};N.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:ae.HttpStatusCode.FORBIDDEN};N.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:ae.HttpStatusCode.BAD_REQUEST};var qxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");N.USER_NO_ACCESS_GITHUB_REPO=qxe;var jxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");N.USER_NO_PULL_ACCESS_GITHUB_REPO=jxe;var Uxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");N.GITHUB_USER_NO_READ_ACCESS_REPO=Uxe;N.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:ae.HttpStatusCode.BAD_REQUEST};N.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:ae.HttpStatusCode.FORBIDDEN};var Fxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${t}'. Go to '${$xe}' to add the repository.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");N.GITHUB_APP_NO_USER_ACCESS_=Fxe;N.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:ae.HttpStatusCode.NOT_FOUND};var Mxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");N.USER_NO_ACCESS_BITBUCKET_REPO=Mxe;var Bxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");N.USER_NO_ACCESS_GITLAB_REPO=Bxe;N.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:ae.HttpStatusCode.FORBIDDEN};N.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:ae.HttpStatusCode.BAD_REQUEST};N.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:ae.HttpStatusCode.BAD_REQUEST};N.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:ae.HttpStatusCode.BAD_REQUEST};N.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:ae.HttpStatusCode.BAD_REQUEST};var Vxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:ae.HttpStatusCode.CONFLICT,detail:`The repository ${t} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");N.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Vxe;var Hxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:ae.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${t} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");N.GITHUB_REPOSITORY_NOT_FOUND=Hxe;N.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:ae.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};N.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};N.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};N.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:ae.HttpStatusCode.FORBIDDEN};var zxe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${t}' already exists on GitHub org '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");N.GITHUB_INTEGRATION_DUPLICATE_REPO=zxe;var Gxe=o(({repositoryName:t,details:e})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:e,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");N.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Gxe;var Kxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");N.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Kxe;var Yxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");N.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Yxe;var Wxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${t}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");N.GITHUB_INTEGRATION_INVALID_REPO=Wxe;N.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:ae.HttpStatusCode.FORBIDDEN};N.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:ae.HttpStatusCode.FORBIDDEN};var Jxe=o(({details:t})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");N.BITBUCKET_FAILED_DURING_REPO_CREATION=Jxe;N.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:ae.HttpStatusCode.FORBIDDEN};var Qxe=o(({details:t})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");N.GITLAB_FAILED_DURING_REPO_CREATION=Qxe;var Xxe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${t}' already exists in GitLab team '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");N.GITLAB_DUPLICATE_REPO=Xxe;var Zxe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");N.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=Zxe;var eCe=o(({namespaceLabel:t})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${t}'.`,details:`The user's GitLab access level does not allow the use of namespace '${t}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");N.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=eCe;var tCe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");N.GITLAB_ACCESS_LEVEL_CHECK_FAIL=tCe;N.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:ae.HttpStatusCode.UNAUTHORIZED};N.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:ae.HttpStatusCode.NOT_FOUND};N.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:ae.HttpStatusCode.UNAUTHORIZED};N.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:ae.HttpStatusCode.FORBIDDEN};N.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:ae.HttpStatusCode.FORBIDDEN};N.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};var rCe=o(({sourceControlProvider:t})=>{const e=(0,qY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${e}`,status:ae.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");N.SOURCE_CONTROL_AUTHENTICATION_FAILED=rCe;var nCe=o(({sourceControlProvider:t})=>{const e=(0,qY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${e} repository`,status:ae.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");N.SOURCE_CONTROL_REPO_NOT_FOUND=nCe;N.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:ae.HttpStatusCode.BAD_REQUEST};var iCe=o(({repoURL:t,operation:e})=>{return{type:`https://zup.fail/source-control-repo-${e}-error`,title:`Failed on ${e} operation to repository '${t}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:ae.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");N.SOURCE_CONTROL_REPO_OPERATION_ERROR=iCe;N.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:ae.HttpStatusCode.NOT_FOUND};N.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.NOT_FOUND};N.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:ae.HttpStatusCode.UNAUTHORIZED};N.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:ae.HttpStatusCode.FORBIDDEN};N.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};N.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:ae.HttpStatusCode.BAD_REQUEST};N.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:ae.HttpStatusCode.BAD_REQUEST};N.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};N.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};N.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:ae.HttpStatusCode.NOT_FOUND};N.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:ae.HttpStatusCode.NOT_FOUND};N.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};N.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:ae.HttpStatusCode.FAILED_DEPENDENCY};N.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:ae.HttpStatusCode.FAILED_DEPENDENCY};N.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:ae.HttpStatusCode.FAILED_DEPENDENCY};N.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:ae.HttpStatusCode.BAD_REQUEST};N.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:ae.HttpStatusCode.BAD_REQUEST};N.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:ae.HttpStatusCode.BAD_REQUEST};N.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:ae.HttpStatusCode.NOT_FOUND};N.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:ae.HttpStatusCode.BAD_REQUEST};N.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:ae.HttpStatusCode.BAD_REQUEST};N.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:ae.HttpStatusCode.BAD_REQUEST};N.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:ae.HttpStatusCode.BAD_REQUEST};N.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:ae.HttpStatusCode.BAD_REQUEST};N.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:ae.HttpStatusCode.BAD_REQUEST};N.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:ae.HttpStatusCode.BAD_REQUEST};N.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:ae.HttpStatusCode.BAD_REQUEST};N.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:ae.HttpStatusCode.BAD_REQUEST};N.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:ae.HttpStatusCode.FORBIDDEN};N.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:ae.HttpStatusCode.NOT_FOUND};var sCe=o(({operation:t,path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${t} file ${e} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");N.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=sCe;var aCe=o(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");N.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=aCe;N.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:ae.HttpStatusCode.BAD_REQUEST};N.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:ae.HttpStatusCode.BAD_REQUEST};N.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:ae.HttpStatusCode.NOT_FOUND};N.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:ae.HttpStatusCode.BAD_REQUEST};N.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:ae.HttpStatusCode.BAD_REQUEST};N.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:ae.HttpStatusCode.BAD_REQUEST};var oCe=o(({path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${t} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");N.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=oCe;var uCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${t} is not allowed.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");N.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=uCe;var lCe=o(({path:t})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${t}.`}),"DIRECTORY_ALREADY_EXISTS");N.DIRECTORY_ALREADY_EXISTS=lCe;var cCe=o(({path:t})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${t}`}),"DIRECTORY_DOES_NOT_EXIST");N.DIRECTORY_DOES_NOT_EXIST=cCe;var dCe=o(({path:t})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${t}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");N.DIRECTORY_OR_FILE_DOES_NOT_EXIST=dCe;var pCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${t}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");N.DIRECTORY_CREATION_FAILED=pCe;var fCe=o(({path:t})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${t} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");N.FILE_RENAME_PATHS_MATCH=fCe;var hCe=o(({oldExtension:t,newExtension:e})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${e} must match the old extension ${t}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");N.FILE_RENAME_CANNOT_CHANGE_EXTENSION=hCe;var mCe=o(({path:t})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${t}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");N.FILE_RENAME_FILE_ALREADY_EXISTS=mCe;var gCe=o(({path:t})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${t}. Please try again or contact support.`}),"FILE_RENAME_FAILED");N.FILE_RENAME_FAILED=gCe;var yCe=o(({path:t})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${t}. Please try again or contact support.`}),"FILE_WRITE_FAILED");N.FILE_WRITE_FAILED=yCe;var vCe=o(({path:t})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`File '${t}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");N.CANNOT_DELETE_ESSENTIAL_FILE=vCe;var _Ce=o(({path:t})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory '${t}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");N.CANNOT_DELETE_ESSENTIAL_DIRECTORY=_Ce;var ECe=o(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");N.CANNOT_DELETE_SOLE_OPEN_API_FILE=ECe;var bCe=o(({path:t})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${t}. Please try again or contact support.`}),"FILE_DELETE_FAILED");N.FILE_DELETE_FAILED=bCe;var wCe=o(({path:t})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${t}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");N.DIRECTORY_DELETE_FAILED=wCe;N.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:ae.HttpStatusCode.CONFLICT};N.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:ae.HttpStatusCode.BAD_REQUEST}});var FY=_(Js=>{"use strict";var SCe=Js&&Js.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var TCe=Js&&Js.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var ACe=Js&&Js.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null){for(var r in t)if(r!=="default"&&Object.prototype.hasOwnProperty.call(t,r))SCe(e,t,r)}TCe(e,t);return e};Object.defineProperty(Js,"__esModule",{value:true});Js.ApiNotFoundError=Js.ApiError=Js.Problems=void 0;var UY=ACe(jY());Js.Problems=UY;var Lb=class extends Error{static{o(this,"ApiError")}type;status;detail;instance;constructor(e){super(e.title);if(!e.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${e.type}`)}this.name="ApiProblemError";this.type=e.type;this.status=e.status;this.detail=e.detail;this.instance=e.instance}};Js.ApiError=Lb;var rC=class extends Lb{static{o(this,"ApiNotFoundError")}constructor(e={}){super({...e,...UY.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Js.ApiNotFoundError=rC});var As=_(rc=>{"use strict";var xCe=rc&&rc.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var CCe=rc&&rc.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))xCe(e,t,r)};Object.defineProperty(rc,"__esModule",{value:true});rc.HttpStatusCode=void 0;CCe(FY(),rc);var RCe=tC();Object.defineProperty(rc,"HttpStatusCode",{enumerable:true,get:function(){return RCe.HttpStatusCode}})});var iC=_(qb=>{"use strict";Object.defineProperty(qb,"__esModule",{value:true});qb.CommonAuth=void 0;var ad=As();var OCe=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var nC=class t{static{o(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(e){return OCe.includes(e)}isDeployerServiceAccount(e){return t.DEPLOYER_USER_SUB===e}static isAuthorizedSub(e,r){if(typeof r==="string"){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}try{const n=e.includes(r.sub);if(!n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}catch(n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}};qb.CommonAuth=nC});var sC=_(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:true});jb.FeatureFlags=void 0;jb.FeatureFlags=Object.freeze({remoteModules:(t,e)=>({flagName:"REMOTE_MODULES",defaultValue:false,accountName:t,projectName:e}),disableIntegratedDevPortalBuild:(t,e)=>({flagName:"DISABLE_INTEGRATED_DEV_PORTAL_BUILD",defaultValue:false,accountName:t,projectName:e}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var BY=_(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:true});od.hasBlockedNotifications=od.getBuildFlagsForDeployment=od.getDefaultFlags=void 0;var MY=sC();var NCe=["chocolate_bold_silverfish"];function ICe(t){const e={remoteModules:!!t?.remoteModules,disableIntegratedDevPortalBuild:!!t?.disableIntegratedDevPortalBuild};return e}o(ICe,"getDefaultFlags");od.getDefaultFlags=ICe;async function PCe(t,{accountName:e,projectName:r}){const n=await t.getFlagValue(MY.FeatureFlags.remoteModules(e,r));const i=await t.getFlagValue(MY.FeatureFlags.disableIntegratedDevPortalBuild(e,r));return{remoteModules:n,disableIntegratedDevPortalBuild:i}}o(PCe,"getBuildFlagsForDeployment");od.getBuildFlagsForDeployment=PCe;function DCe(t){return NCe.includes(t)}o(DCe,"hasBlockedNotifications");od.hasBlockedNotifications=DCe});var VY=_(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:true});Qs.BuildIssueError=Qs.WARNING_SEVERITY=Qs.ERROR_SEVERITY=Qs.FAILURE_STATUS=Qs.WARNING_STATUS=Qs.GOOD_STATUS=void 0;Qs.GOOD_STATUS="Good";Qs.WARNING_STATUS="Warnings";Qs.FAILURE_STATUS="Failed";Qs.ERROR_SEVERITY="error";Qs.WARNING_SEVERITY="warning";var aC=class extends Error{static{o(this,"BuildIssueError")}issue;constructor(e){super(e.message);this.issue=e}};Qs.BuildIssueError=aC});var HY=_(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:true});Ub.COMPATIBILITY_FLAG_MAPPINGS=void 0;Ub.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true}})});var zY=_((mjt,kCe)=>{kCe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2023-03-14",enum:["2023-03-14","2024-01-15"]}}}});var GY=_(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:true});Fb.VALID_COMPATIBILITY_DATES=void 0;Fb.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var KY=_(ud=>{"use strict";var $Ce=ud&&ud.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(ud,"__esModule",{value:true});ud.DEFAULT_COMPATIBILITY_DATE=ud.VALID_COMPATIBILITY_DATES=void 0;var LCe=$Ce(zY());var qCe=GY();Object.defineProperty(ud,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return qCe.VALID_COMPATIBILITY_DATES}});ud.DEFAULT_COMPATIBILITY_DATE=LCe.default.properties.compatibilityDate.default});var YY=_(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:true});ld.decrypt=ld.encrypt=ld.signString=void 0;var Gm=require("crypto");function jCe(t,e){return(0,Gm.createHmac)("sha256",e).update(t).digest("hex")}o(jCe,"signString");ld.signString=jCe;var oC={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var UCe=o(()=>(0,Gm.randomBytes)(oC.IV_BYTE_LEN),"getIV");function FCe(t,e){if(t===null){return null}const r=(0,Gm.createHash)("sha256").update(String(e)).digest("base64").substring(0,32);const n=UCe();const i=(0,Gm.createCipheriv)("aes-256-gcm",r,n,{authTagLength:oC.AUTH_TAG_BYTE_LEN});let s=i.update(t);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}o(FCe,"encrypt");ld.encrypt=FCe;function MCe(t,e){if(!t){return null}const r=Buffer.from(e);const n=(0,Gm.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(t,"hex");const s=i.slice(-16);const a=i.slice(0,12);const u=i.slice(12,-16);const l=(0,Gm.createDecipheriv)("aes-256-gcm",n,a,{authTagLength:oC.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}o(MCe,"decrypt");ld.decrypt=MCe});var WY=_(Mb=>{"use strict";Object.defineProperty(Mb,"__esModule",{value:true});Mb.getCurrentUtcDateTime=void 0;function BCe(){const t={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const e=new Date().toLocaleString("en-US",t);return e}o(BCe,"getCurrentUtcDateTime");Mb.getCurrentUtcDateTime=BCe});var uC=_(Bb=>{"use strict";Object.defineProperty(Bb,"__esModule",{value:true});Bb.DeploymentLogState=void 0;var JY;(function(t){t["ERROR"]="ERROR";t["IN_PROGRESS"]="IN_PROGRESS";t["SUCCESS"]="SUCCESS"})(JY||(Bb.DeploymentLogState=JY={}))});var lC=_(QY=>{"use strict";Object.defineProperty(QY,"__esModule",{value:true})});var ZY=_(XY=>{"use strict";Object.defineProperty(XY,"__esModule",{value:true})});var eW=_(Vb=>{"use strict";Object.defineProperty(Vb,"__esModule",{value:true});Vb.MARKDOWN_FRONTMATTER_KEYS=void 0;Vb.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var rW=_(tW=>{"use strict";Object.defineProperty(tW,"__esModule",{value:true})});var nW=_(Uu=>{"use strict";var VCe=Uu&&Uu.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var Hb=Uu&&Uu.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))VCe(e,t,r)};Object.defineProperty(Uu,"__esModule",{value:true});Hb(lC(),Uu);Hb(ZY(),Uu);Hb(eW(),Uu);Hb(rW(),Uu)});var zb=_(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:true});Fu.getLoggerContext=Fu.requestIdGenerator=Fu.REQUEST_ID_HEADER=Fu.LEGACY_REQUEST_ID_HEADER=void 0;var HCe=require("crypto");Fu.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Fu.REQUEST_ID_HEADER="zp-rid";var zCe=o(t=>{const e=t.headers["zuplo-request-id"];const r=t.headers["X-GitHub-Delivery"];if(e){const n=e;return`${n}`}else if(r){return`${r}`}return(0,HCe.randomUUID)()},"requestIdGenerator");Fu.requestIdGenerator=zCe;function GCe(t){const e=t.raw.url??"";const r={};try{const n=t.headers["zuplo-user"]??t.user?.sub;if(n){r.userSub=`${n}`}const i=e.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=e.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const a=e.match(/(projects)\/([a-zA-Z-0-9]*)/);if(a&&a!==null&&a.length>=2){r.project=a[2]}}catch(n){}return r}o(GCe,"getLoggerContext");Fu.getLoggerContext=GCe});var cC=_(Km=>{"use strict";var KCe=Km&&Km.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Km,"__esModule",{value:true});Km.errorHandler=void 0;var Ga=As();var YCe=KCe(Oa());var iW=zb();function WCe(t,e,r){let n=500;let i;if(t instanceof Ga.ApiError){n=t.status;i={type:t.type,title:t.message,status:t.status,detail:t.detail,instance:t.instance}}else if(typeof t==="object"&&"validation"in t&&"validationContext"in t){n=Ga.HttpStatusCode.BAD_REQUEST;i={...Ga.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${t.validationContext}.`,errors:t.validation}}else if(typeof t==="object"&&"code"in t&&t.code==="FST_ERR_NOT_FOUND"){n=404;i=Ga.Problems.NOT_FOUND}else if(typeof t==="object"&&"code"in t&&typeof t.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(t.code)){n=Ga.HttpStatusCode.BAD_REQUEST;i={...Ga.Problems.BAD_REQUEST,detail:t.message}}else{let a;if(!r.statusCode||r.statusCode===200){if(typeof t==="object"&&"statusCode"in t&&typeof t.statusCode==="number"){a=t.statusCode}else if(typeof t==="object"&&"status"in t&&typeof t.status==="number"){a=t.status}n=a&&a>=400?a:500}else{n=r.statusCode}i=JCe(n);if(YCe.default.NODE_ENV!=="production"){if(typeof t==="object"&&"message"in t){i.detail=t.message}else if(typeof t==="string"){i.detail=t}}}i.trace={timestamp:new Date().toJSON(),requestId:e.headers[iW.REQUEST_ID_HEADER]??e.headers[iW.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:t},t&&t.message)}else{r.log.error({req:e,res:r,err:t},t&&t.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}o(WCe,"errorHandler");Km.errorHandler=WCe;function JCe(t){if(t===401){return Ga.Problems.UNAUTHORIZED}else if(t===403){return Ga.Problems.FORBIDDEN}else if(t===404){return Ga.Problems.NOT_FOUND}else if(t===405){return Ga.Problems.METHOD_NOT_ALLOWED}else if(t<500&&t>=400){return Ga.Problems.BAD_REQUEST}return Ga.Problems.INTERNAL_SERVER_ERROR}o(JCe,"getProblemFromStatus")});var aW=_((Pjt,dC)=>{"use strict";var QCe=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var XCe=/(\w*(\.\w*)*)\..*/;dC.exports=o(function t(e){if(e.name.length>0)return e.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return sW(n.stack)}},"getPluginName");function sW(t){const e=t.match(QCe);return e?e[1].split(/[/\\]/).slice(-1)[0].match(XCe)[1]:"anonymous"}o(sW,"extractPluginName");dC.exports.extractPluginName=sW});var uW=_((kjt,oW)=>{"use strict";oW.exports=o(function t(e){if(e[0]==="@"){e=e.slice(1).replace("/","-")}const r=e.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var cd=_((Ljt,Gb)=>{"use strict";var ZCe=aW();var eRe=uW();var tRe=0;function pC(t,e={}){let r=false;if(typeof t.default!=="undefined"){t=t.default}if(typeof t!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof t}'`)}if(typeof e==="string"){e={fastify:e}}if(typeof e!=="object"||Array.isArray(e)||e===null){throw new TypeError("The options object should be an object")}if(e.fastify!==void 0&&typeof e.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof e.fastify}'`)}if(!e.name){r=true;e.name=ZCe(t)+"-auto-"+tRe++}t[Symbol.for("skip-override")]=e.encapsulate!==true;t[Symbol.for("fastify.display-name")]=e.name;t[Symbol.for("plugin-meta")]=e;if(!t.default){t.default=t}const n=eRe(e.name);if(!r&&!t[n]){t[n]=t}return t}o(pC,"plugin");Gb.exports=pC;Gb.exports.default=pC;Gb.exports.fastifyPlugin=pC});var cW=_(Ym=>{"use strict";var rRe=Ym&&Ym.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Ym,"__esModule",{value:true});Ym.apiKeyAuthPlugin=void 0;var Mu=As();var nRe=rRe(cd());var iRe="https://apikey.zuplo.com";var lW=`Bearer `;Ym.apiKeyAuthPlugin=(0,nRe.default)(async(t,e)=>{t.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new Mu.ApiError({...Mu.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(lW)){throw new Mu.ApiError({...Mu.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(lW.length);if(!i||i===""){throw new Mu.ApiError({...Mu.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const a=await fetch(`${iRe}/v1/$validate/${e.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(a.status===401){throw new Mu.ApiError(Mu.Problems.UNAUTHORIZED)}const u=await a.json();if(e.allowedSubs){if(!e.allowedSubs.includes(u.name)){throw new Mu.ApiError(Mu.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var dW=_(Wm=>{"use strict";var sRe=Wm&&Wm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Wm,"__esModule",{value:true});Wm.ensureServiceAccountPlugin=void 0;var Kb=As();var aRe=sRe(cd());Wm.ensureServiceAccountPlugin=(0,aRe.default)(async t=>{t.decorate("ensureServiceAccount",e=>async function(r){if(!r.user){r.log.error(`Bad request, zuplo:user header not present`);throw new Kb.ApiError(Kb.Problems.UNAUTHORIZED)}const n=r.user.sub;if(e!==n){r.log.error("The claim 'zuplo:user' is not from an authorized service account.");throw new Kb.ApiError(Kb.Problems.FORBIDDEN)}})},{name:"ensure-service-account-plugin"})});var pW=_(Jm=>{"use strict";var oRe=Jm&&Jm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Jm,"__esModule",{value:true});Jm.ensureZuploAdminPlugin=void 0;var Yb=As();var uRe=oRe(cd());var lRe=iC();Jm.ensureZuploAdminPlugin=(0,uRe.default)(async function(t){const e=new lRe.CommonAuth;t.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new Yb.ApiError(Yb.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&e.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new Yb.ApiError(Yb.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var hW=_(Qm=>{"use strict";var cRe=Qm&&Qm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Qm,"__esModule",{value:true});Qm.ensureZuploUserPlugin=void 0;var fW=As();var dRe=cRe(cd());Qm.ensureZuploUserPlugin=(0,dRe.default)(async t=>{t.decorate("ensureZuploUser",async function(e){const r=e.headers["zuplo-user"];if(!r||typeof r!=="string"){e.log.error("The 'zuplo-user' header is missing");throw new fW.ApiError(fW.Problems.UNAUTHORIZED)}e.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var yW=_(Xm=>{"use strict";var pRe=Xm&&Xm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Xm,"__esModule",{value:true});Xm.featureFlagsPlugin=void 0;var fRe=pRe(cd());var fC;async function mW(t,e){try{const r=await fC?.variation(e.flagName,{kind:e.kind,key:e.key},e.defaultValue);if(r===void 0){return e.defaultValue}else{return r}}catch(r){t.log.warn(`Failed to query Launch Darkly flag ${e.flagName}`);t.log.error(r)}return e.defaultValue}o(mW,"getFlagValue");function gW(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return false}o(gW,"fallback");Xm.featureFlagsPlugin=(0,fRe.default)(async(t,e)=>{try{if(typeof e.key!=="string"||!e.key||!e.client){t.decorateRequest("getFlagValue",gW);t.decorateRequest("getFlagValueByUser",gW);return}fC=e.client;t.log.info("Launch Darkly SDK successfully initialized!");t.decorate("flags",fC);t.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return mW(this,s)});t.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return mW(this,s)})}catch(r){t.log.warn("Launch Darkly failed to initialize");t.log.error(r)}},{name:"feature-flag-plugin"})});var hC=_(Zm=>{"use strict";var hRe=Zm&&Zm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Zm,"__esModule",{value:true});Zm.getUserSubPlugin=void 0;var vW=As();var mRe=hRe(cd());Zm.getUserSubPlugin=(0,mRe.default)(async t=>{t.decorateRequest("getUserSub",function(){const e=this.user?.sub;if(!e){this.log.error("Could not determine the user sub");throw new vW.ApiError(vW.Problems.UNAUTHORIZED)}return e})},{name:"get-user-sub-plugin"})});var mC=_(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:true});Xs.getUserSubPlugin=Xs.featureFlagsPlugin=Xs.ensureZuploUserPlugin=Xs.ensureZuploAdminPlugin=Xs.ensureServiceAccountPlugin=Xs.apiKeyAuthPlugin=void 0;var gRe=cW();Object.defineProperty(Xs,"apiKeyAuthPlugin",{enumerable:true,get:function(){return gRe.apiKeyAuthPlugin}});var yRe=dW();Object.defineProperty(Xs,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return yRe.ensureServiceAccountPlugin}});var vRe=pW();Object.defineProperty(Xs,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return vRe.ensureZuploAdminPlugin}});var _Re=hW();Object.defineProperty(Xs,"ensureZuploUserPlugin",{enumerable:true,get:function(){return _Re.ensureZuploUserPlugin}});var ERe=yW();Object.defineProperty(Xs,"featureFlagsPlugin",{enumerable:true,get:function(){return ERe.featureFlagsPlugin}});var bRe=hC();Object.defineProperty(Xs,"getUserSubPlugin",{enumerable:true,get:function(){return bRe.getUserSubPlugin}})});var Kr=_(qi=>{"use strict";var gC=Symbol.for("yaml.alias");var _W=Symbol.for("yaml.document");var Wb=Symbol.for("yaml.map");var EW=Symbol.for("yaml.pair");var yC=Symbol.for("yaml.scalar");var Jb=Symbol.for("yaml.seq");var nc=Symbol.for("yaml.node.type");var wRe=o(t=>!!t&&typeof t==="object"&&t[nc]===gC,"isAlias");var SRe=o(t=>!!t&&typeof t==="object"&&t[nc]===_W,"isDocument");var TRe=o(t=>!!t&&typeof t==="object"&&t[nc]===Wb,"isMap");var ARe=o(t=>!!t&&typeof t==="object"&&t[nc]===EW,"isPair");var bW=o(t=>!!t&&typeof t==="object"&&t[nc]===yC,"isScalar");var xRe=o(t=>!!t&&typeof t==="object"&&t[nc]===Jb,"isSeq");function wW(t){if(t&&typeof t==="object")switch(t[nc]){case Wb:case Jb:return true}return false}o(wW,"isCollection");function CRe(t){if(t&&typeof t==="object")switch(t[nc]){case gC:case Wb:case yC:case Jb:return true}return false}o(CRe,"isNode");var RRe=o(t=>(bW(t)||wW(t))&&!!t.anchor,"hasAnchor");qi.ALIAS=gC;qi.DOC=_W;qi.MAP=Wb;qi.NODE_TYPE=nc;qi.PAIR=EW;qi.SCALAR=yC;qi.SEQ=Jb;qi.hasAnchor=RRe;qi.isAlias=wRe;qi.isCollection=wW;qi.isDocument=SRe;qi.isMap=TRe;qi.isNode=CRe;qi.isPair=ARe;qi.isScalar=bW;qi.isSeq=xRe});var O2=_(vC=>{"use strict";var mi=Kr();var Zs=Symbol("break visit");var SW=Symbol("skip children");var Bu=Symbol("remove node");function Qb(t,e){const r=TW(e);if(mi.isDocument(t)){const n=e0(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else e0(null,t,r,Object.freeze([]))}o(Qb,"visit");Qb.BREAK=Zs;Qb.SKIP=SW;Qb.REMOVE=Bu;function e0(t,e,r,n){const i=AW(t,e,r,n);if(mi.isNode(i)||mi.isPair(i)){xW(t,n,i);return e0(t,i,r,n)}if(typeof i!=="symbol"){if(mi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=e0(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(mi.isPair(e)){n=Object.freeze(n.concat(e));const s=e0("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=e0("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(e0,"visit_");async function Xb(t,e){const r=TW(e);if(mi.isDocument(t)){const n=await t0(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else await t0(null,t,r,Object.freeze([]))}o(Xb,"visitAsync");Xb.BREAK=Zs;Xb.SKIP=SW;Xb.REMOVE=Bu;async function t0(t,e,r,n){const i=await AW(t,e,r,n);if(mi.isNode(i)||mi.isPair(i)){xW(t,n,i);return t0(t,i,r,n)}if(typeof i!=="symbol"){if(mi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=await t0(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(mi.isPair(e)){n=Object.freeze(n.concat(e));const s=await t0("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=await t0("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(t0,"visitAsync_");function TW(t){if(typeof t==="object"&&(t.Collection||t.Node||t.Value)){return Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t)}return t}o(TW,"initVisitor");function AW(t,e,r,n){if(typeof r==="function")return r(t,e,n);if(mi.isMap(e))return r.Map?.(t,e,n);if(mi.isSeq(e))return r.Seq?.(t,e,n);if(mi.isPair(e))return r.Pair?.(t,e,n);if(mi.isScalar(e))return r.Scalar?.(t,e,n);if(mi.isAlias(e))return r.Alias?.(t,e,n);return void 0}o(AW,"callVisitor");function xW(t,e,r){const n=e[e.length-1];if(mi.isCollection(n)){n.items[t]=r}else if(mi.isPair(n)){if(t==="key")n.key=r;else n.value=r}else if(mi.isDocument(n)){n.contents=r}else{const i=mi.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(xW,"replaceNode");vC.visit=Qb;vC.visitAsync=Xb});var _C=_(RW=>{"use strict";var CW=Kr();var ORe=O2();var NRe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var IRe=o(t=>t.replace(/[!,[\]{}]/g,e=>NRe[e]),"escapeTagName");var N2=class t{static{o(this,"Directives")}constructor(e,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},t.defaultYaml,e);this.tags=Object.assign({},t.defaultTags,r)}clone(){const e=new t(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){if(this.atNextDocument){this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},t.defaultTags);this.atNextDocument=false}const n=e.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,a]=n;this.tags[s]=a;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const a=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,a);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!"){r(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const a=e.slice(2,-1);if(a==="!"||a==="!!"){r(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")r("Verbatim tags must end with a >");return a}const[,n,i]=e.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${e} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(a){r(String(a));return null}}if(n==="!")return e;r(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[r,n]of Object.entries(this.tags)){if(e.startsWith(n))return r+IRe(e.substring(n.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(e&&n.length>0&&CW.isNode(e.contents)){const s={};ORe.visit(e.contents,(a,u)=>{if(CW.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,a]of n){if(s==="!!"&&a==="tag:yaml.org,2002:")continue;if(!e||i.some(u=>u.startsWith(a)))r.push(`%TAG ${s} ${a}`)}return r.join("\n")}};N2.defaultYaml={explicit:false,version:"1.2"};N2.defaultTags={"!!":"tag:yaml.org,2002:"};RW.Directives=N2});var Zb=_(I2=>{"use strict";var OW=Kr();var PRe=O2();function DRe(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const e=JSON.stringify(t);const r=`Anchor must not contain whitespace or control characters: ${e}`;throw new Error(r)}return true}o(DRe,"anchorIsValid");function NW(t){const e=new Set;PRe.visit(t,{Value(r,n){if(n.anchor)e.add(n.anchor)}});return e}o(NW,"anchorNames");function IW(t,e){for(let r=1;true;++r){const n=`${t}${r}`;if(!e.has(n))return n}}o(IW,"findNewAnchor");function kRe(t,e){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=NW(t);const a=IW(e,i);i.add(a);return a},setAnchors:()=>{for(const s of r){const a=n.get(s);if(typeof a==="object"&&a.anchor&&(OW.isScalar(a.node)||OW.isCollection(a.node))){a.node.anchor=a.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}o(kRe,"createNodeAnchors");I2.anchorIsValid=DRe;I2.anchorNames=NW;I2.createNodeAnchors=kRe;I2.findNewAnchor=IW});var EC=_(PW=>{"use strict";function P2(t,e,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const a=n[i];const u=P2(t,n,String(i),a);if(u===void 0)delete n[i];else if(u!==a)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const a=P2(t,n,i,s);if(a===void 0)n.delete(i);else if(a!==s)n.set(i,a)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=P2(t,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const a=P2(t,n,i,s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}}}return t.call(e,r,n)}o(P2,"applyReviver");PW.applyReviver=P2});var dd=_(kW=>{"use strict";var $Re=Kr();function DW(t,e,r){if(Array.isArray(t))return t.map((n,i)=>DW(n,String(i),r));if(t&&typeof t.toJSON==="function"){if(!r||!$Re.hasAnchor(t))return t.toJSON(e,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=t.toJSON(e,r);if(r.onCreate)r.onCreate(i);return i}if(typeof t==="bigint"&&!r?.keep)return Number(t);return t}o(DW,"toJS");kW.toJS=DW});var e3=_(LW=>{"use strict";var LRe=EC();var $W=Kr();var qRe=dd();var bC=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,$W.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!$W.isDocument(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=qRe.toJS(this,"",a);if(typeof i==="function")for(const{count:l,res:c}of a.anchors.values())i(c,l);return typeof s==="function"?LRe.applyReviver(s,{"":u},"",u):u}};LW.NodeBase=bC});var D2=_(jW=>{"use strict";var jRe=Zb();var qW=O2();var t3=Kr();var URe=e3();var FRe=dd();var wC=class extends URe.NodeBase{static{o(this,"Alias")}constructor(e){super(t3.ALIAS);this.source=e;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let r=void 0;qW.visit(e,{Node:(n,i)=>{if(i===this)return qW.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(e,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const a=this.resolve(i);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(a);if(!u){FRe.toJS(a,null,r);u=n.get(a)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=r3(i,a,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(e,r,n){const i=`*${this.source}`;if(e){jRe.anchorIsValid(this.source);if(e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function r3(t,e,r){if(t3.isAlias(e)){const n=e.resolve(t);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(t3.isCollection(e)){let n=0;for(const i of e.items){const s=r3(t,i,r);if(s>n)n=s}return n}else if(t3.isPair(e)){const n=r3(t,e.key,r);const i=r3(t,e.value,r);return Math.max(n,i)}return 1}o(r3,"getAliasCount");jW.Alias=wC});var si=_(SC=>{"use strict";var MRe=Kr();var BRe=e3();var VRe=dd();var HRe=o(t=>!t||typeof t!=="function"&&typeof t!=="object","isScalarValue");var pd=class extends BRe.NodeBase{static{o(this,"Scalar")}constructor(e){super(MRe.SCALAR);this.value=e}toJSON(e,r){return r?.keep?this.value:VRe.toJS(this.value,e,r)}toString(){return String(this.value)}};pd.BLOCK_FOLDED="BLOCK_FOLDED";pd.BLOCK_LITERAL="BLOCK_LITERAL";pd.PLAIN="PLAIN";pd.QUOTE_DOUBLE="QUOTE_DOUBLE";pd.QUOTE_SINGLE="QUOTE_SINGLE";SC.Scalar=pd;SC.isScalarValue=HRe});var k2=_(FW=>{"use strict";var zRe=D2();var Nf=Kr();var UW=si();var GRe="tag:yaml.org,2002:";function KRe(t,e,r){if(e){const n=r.filter(s=>s.tag===e);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}o(KRe,"findTagObject");function YRe(t,e,r){if(Nf.isDocument(t))t=t.contents;if(Nf.isNode(t))return t;if(Nf.isPair(t)){const p=r.schema[Nf.MAP].createNode?.(r.schema,null,r);p.items.push(t);return p}if(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt!=="undefined"&&t instanceof BigInt){t=t.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:u}=r;let l=void 0;if(n&&t&&typeof t==="object"){l=u.get(t);if(l){if(!l.anchor)l.anchor=i(t);return new zRe.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(t,l)}}if(e?.startsWith("!!"))e=GRe+e.slice(2);let c=KRe(t,e,a.tags);if(!c){if(t&&typeof t.toJSON==="function"){t=t.toJSON()}if(!t||typeof t!=="object"){const p=new UW.Scalar(t);if(l)l.node=p;return p}c=t instanceof Map?a[Nf.MAP]:Symbol.iterator in Object(t)?a[Nf.SEQ]:a[Nf.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,t,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,t,r):new UW.Scalar(t);if(e)d.tag=e;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}o(YRe,"createNode");FW.createNode=YRe});var $2=_(i3=>{"use strict";var WRe=k2();var Vu=Kr();var JRe=e3();function TC(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n;n=a}else{n=new Map([[s,n]])}}return WRe.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}o(TC,"collectionFromPath");var MW=o(t=>t==null||typeof t==="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath");var n3=class extends JRe.NodeBase{static{o(this,"Collection")}constructor(e,r){super(e);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(e){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)r.schema=e;r.items=r.items.map(n=>Vu.isNode(n)||Vu.isPair(n)?n.clone(e):n);if(this.range)r.range=this.range.slice();return r}addIn(e,r){if(MW(e))this.add(r);else{const[n,...i]=e;const s=this.get(n,true);if(Vu.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,TC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[r,...n]=e;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(Vu.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){const[n,...i]=e;const s=this.get(n,true);if(i.length===0)return!r&&Vu.isScalar(s)?s.value:s;else return Vu.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Vu.isPair(r))return false;const n=r.value;return n==null||e&&Vu.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[r,...n]=e;if(n.length===0)return this.has(r);const i=this.get(r,true);return Vu.isCollection(i)?i.hasIn(n):false}setIn(e,r){const[n,...i]=e;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(Vu.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,TC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};n3.maxFlowStringSingleLineLength=60;i3.Collection=n3;i3.collectionFromPath=TC;i3.isEmptyPath=MW});var L2=_(s3=>{"use strict";var QRe=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function AC(t,e){if(/^\n+$/.test(t))return t.substring(1);return e?t.replace(/^(?! *$)/gm,e):t}o(AC,"indentComment");var XRe=o((t,e,r)=>t.endsWith("\n")?AC(r,e):r.includes("\n")?"\n"+AC(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");s3.indentComment=AC;s3.lineComment=XRe;s3.stringifyComment=QRe});var VW=_(q2=>{"use strict";var ZRe="flow";var xC="block";var a3="quoted";function eOe(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:u}={}){if(!i||i<0)return t;const l=Math.max(1+s,1+i-e.length);if(t.length<=l)return t;const c=[];const d={};let p=i-e.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let h=void 0;let m=false;let g=-1;let y=-1;let v=-1;if(r===xC){g=BW(t,g);if(g!==-1)p=g+l}for(let E;E=t[g+=1];){if(r===a3&&E==="\\"){y=g;switch(t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===xC)g=BW(t,g);p=g+l;f=void 0}else{if(E===" "&&h&&h!==" "&&h!=="\n"&&h!==" "){const b=t[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===a3){while(h===" "||h===" "){h=E;E=t[g+=1];m=true}const b=g>v+1?g-2:y-1;if(d[b])return t;c.push(b);d[b]=true;p=b+l;f=void 0}else{m=true}}}h=E}if(m&&u)u();if(c.length===0)return t;if(a)a();let w=t.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const S=c[E+1]||t.length;if(b===0)w=`
|
|
26
26
|
${e}${t.slice(0,S)}`;else{if(r===a3&&d[b])w+=`${t[b]}\\`;w+=`
|
|
27
27
|
${e}${t.slice(b+1,S)}`}}return w}o(eOe,"foldFlowLines");function BW(t,e){let r=t[e+1];while(r===" "||r===" "){do{r=t[e+=1]}while(r&&r!=="\n");r=t[e+1]}return e}o(BW,"consumeMoreIndentedLines");q2.FOLD_BLOCK=xC;q2.FOLD_FLOW=ZRe;q2.FOLD_QUOTED=a3;q2.foldFlowLines=eOe});var U2=_(HW=>{"use strict";var Hu=si();var fd=VW();var u3=o((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions");var l3=o(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function tOe(t,e,r){if(!e||e<0)return false;const n=e-r;const i=t.length;if(i<=n)return false;for(let s=0,a=0;s<i;++s){if(t[s]==="\n"){if(s-a>n)return true;a=s+1;if(i-a<=n)return false}}return true}o(tOe,"lineLengthOverLimit");function j2(t,e){const r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=e;const i=e.options.doubleQuotedMinMultiLineLength;const s=e.indent||(l3(t)?" ":"");let a="";let u=0;for(let l=0,c=r[l];c;c=r[++l]){if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n"){a+=r.slice(u,l)+"\\ ";l+=1;u=l;c="\\"}if(c==="\\")switch(r[l+1]){case"u":{a+=r.slice(u,l);const d=r.substr(l+2,4);switch(d){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:if(d.substr(0,2)==="00")a+="\\x"+d.substr(2);else a+=r.substr(l,6)}l+=5;u=l+1}break;case"n":if(n||r[l+2]==='"'||r.length<i){l+=1}else{a+=r.slice(u,l)+"\n\n";while(r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"'){a+="\n";l+=2}a+=s;if(r[l+2]===" ")a+="\\";l+=1;u=l+1}break;default:l+=1}}a=u?a+r.slice(u):r;return n?a:fd.foldFlowLines(a,s,fd.FOLD_QUOTED,u3(e,false))}o(j2,"doubleQuotedString");function CC(t,e){if(e.options.singleQuote===false||e.implicitKey&&t.includes("\n")||/[ \t]\n|\n[ \t]/.test(t))return j2(t,e);const r=e.indent||(l3(t)?" ":"");const n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
28
28
|
${r}`)+"'";return e.implicitKey?n:fd.foldFlowLines(n,r,fd.FOLD_FLOW,u3(e,false))}o(CC,"singleQuotedString");function r0(t,e){const{singleQuote:r}=e.options;let n;if(r===false)n=j2;else{const i=t.includes('"');const s=t.includes("'");if(i&&!s)n=CC;else if(s&&!i)n=j2;else n=r?CC:j2}return n(t,e)}o(r0,"quotedString");var RC;try{RC=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{RC=/\n+(?!\n|$)/g}function o3({comment:t,type:e,value:r},n,i,s){const{blockQuote:a,commentString:u,lineWidth:l}=n.options;if(!a||/\n[\t ]+$/.test(r)||/^\s*$/.test(r)){return r0(r,n)}const c=n.indent||(n.forceBlockIndent||l3(r)?" ":"");const d=a==="literal"?true:a==="folded"||e===Hu.Scalar.BLOCK_FOLDED?false:e===Hu.Scalar.BLOCK_LITERAL?true:!tOe(r,l,c.length);if(!r)return d?"|\n":">\n";let p;let f;for(f=r.length;f>0;--f){const T=r[f-1];if(T!=="\n"&&T!==" "&&T!==" ")break}let h=r.substring(f);const m=h.indexOf("\n");if(m===-1){p="-"}else if(r===h||m!==h.length-1){p="+";if(s)s()}else{p=""}if(h){r=r.slice(0,-h.length);if(h[h.length-1]==="\n")h=h.slice(0,-1);h=h.replace(RC,`$&${c}`)}let g=false;let y;let v=-1;for(y=0;y<r.length;++y){const T=r[y];if(T===" ")g=true;else if(T==="\n")v=y;else break}let w=r.substring(0,v<y?v+1:y);if(w){r=r.substring(w.length);w=w.replace(/\n+/g,`$&${c}`)}const E=c?"2":"1";let b=(d?"|":">")+(g?E:"")+p;if(t){b+=" "+u(t.replace(/ ?[\r\n]+/g," "));if(i)i()}if(d){r=r.replace(/\n+/g,`$&${c}`);return`${b}
|
package/index.minified.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
"use strict";var rvr=Object.create;var JD=Object.defineProperty;var nvr=Object.getOwnPropertyDescriptor;var ivr=Object.getOwnPropertyNames;var svr=Object.getPrototypeOf;var avr=Object.prototype.hasOwnProperty;var a=(e,t)=>JD(e,"name",{value:t,configurable:true});var Ii=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var QD=(e,t)=>{for(var r in t)JD(e,r,{get:t[r],enumerable:true})};var PGe=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of ivr(t))if(!avr.call(e,i)&&i!==r)JD(e,i,{get:()=>t[i],enumerable:!(n=nvr(t,i))||n.enumerable})}return e};var Si=(e,t,r)=>(r=e!=null?rvr(svr(e)):{},PGe(t||!e||!e.__esModule?JD(r,"default",{value:e,enumerable:true}):r,e));var Ct=e=>PGe(JD({},"__esModule",{value:true}),e);var NGe=y((Mus,ovr)=>{ovr.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var kGe=y((qus,$$)=>{var uvr=require("fs");var IGe=require("path");var lvr=require("os");var cvr=NGe();var dvr=cvr.version;var pvr=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function fvr(e){const t={};let r=e.toString();r=r.replace(/\r\n?/mg,"\n");let n;while((n=pvr.exec(r))!=null){const i=n[1];let s=n[2]||"";s=s.trim();const o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2");if(o==='"'){s=s.replace(/\\n/g,"\n");s=s.replace(/\\r/g,"\r")}t[i]=s}return t}a(fvr,"parse");function Fce(e){console.log(`[dotenv@${dvr}][DEBUG] ${e}`)}a(Fce,"_log");function mvr(e){return e[0]==="~"?IGe.join(lvr.homedir(),e.slice(1)):e}a(mvr,"_resolveHome");function hvr(e){let t=IGe.resolve(process.cwd(),".env");let r="utf8";const n=Boolean(e&&e.debug);const i=Boolean(e&&e.override);if(e){if(e.path!=null){t=mvr(e.path)}if(e.encoding!=null){r=e.encoding}}try{const s=U$.parse(uvr.readFileSync(t,{encoding:r}));Object.keys(s).forEach(function(o){if(!Object.prototype.hasOwnProperty.call(process.env,o)){process.env[o]=s[o]}else{if(i===true){process.env[o]=s[o]}if(n){if(i===true){Fce(`"${o}" is already defined in \`process.env\` and WAS overwritten`)}else{Fce(`"${o}" is already defined in \`process.env\` and was NOT overwritten`)}}}});return{parsed:s}}catch(s){if(n){Fce(`Failed to load ${t} ${s.message}`)}return{error:s}}}a(hvr,"config");var U$={config:hvr,parse:fvr};$$.exports.config=U$.config;$$.exports.parse=U$.parse;$$.exports=U$});var ep=y(J2=>{"use strict";Object.defineProperty(J2,"__esModule",{value:true});J2.EnvironmentalVariableRequiredError=J2.getRequiredEnvVar=void 0;var Bce=class{static{a(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.51.0"}get AUTH_API_URL(){return Nm("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return Nm("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return Nm("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return Nm("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return Nm("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return Nm("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return Nm("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return Nm("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return Nm("METERING_SERVICE_URL","https://metering-service-us-central1-eq7z4lly2a-uc.a.run.app")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new ZD(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return Nm("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function Nm(e,t){const r=process.env[e];if(r===void 0&&(t===void 0||process.env.NODE_ENV==="production")){throw new ZD(e)}return r??t}a(Nm,"getRequiredEnvVar");J2.getRequiredEnvVar=Nm;var ZD=class extends Error{static{a(this,"EnvironmentalVariableRequiredError")}constructor(t){super(`The environmental variable '${t}' is required.'`)}};J2.EnvironmentalVariableRequiredError=ZD;var gvr=new Bce;J2.default=gvr});var Mce=y(j$=>{"use strict";Object.defineProperty(j$,"__esModule",{value:true});j$.HttpStatusCode=void 0;var DGe;(function(e){e[e["CONTINUE"]=100]="CONTINUE";e[e["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";e[e["PROCESSING"]=102]="PROCESSING";e[e["OK"]=200]="OK";e[e["CREATED"]=201]="CREATED";e[e["ACCEPTED"]=202]="ACCEPTED";e[e["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";e[e["NO_CONTENT"]=204]="NO_CONTENT";e[e["RESET_CONTENT"]=205]="RESET_CONTENT";e[e["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";e[e["MULTI_STATUS"]=207]="MULTI_STATUS";e[e["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";e[e["IM_USED"]=226]="IM_USED";e[e["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";e[e["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";e[e["FOUND"]=302]="FOUND";e[e["SEE_OTHER"]=303]="SEE_OTHER";e[e["NOT_MODIFIED"]=304]="NOT_MODIFIED";e[e["USE_PROXY"]=305]="USE_PROXY";e[e["SWITCH_PROXY"]=306]="SWITCH_PROXY";e[e["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";e[e["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";e[e["BAD_REQUEST"]=400]="BAD_REQUEST";e[e["UNAUTHORIZED"]=401]="UNAUTHORIZED";e[e["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";e[e["FORBIDDEN"]=403]="FORBIDDEN";e[e["NOT_FOUND"]=404]="NOT_FOUND";e[e["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";e[e["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";e[e["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";e[e["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";e[e["CONFLICT"]=409]="CONFLICT";e[e["GONE"]=410]="GONE";e[e["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";e[e["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";e[e["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";e[e["URI_TOO_LONG"]=414]="URI_TOO_LONG";e[e["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";e[e["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";e[e["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";e[e["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";e[e["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";e[e["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";e[e["LOCKED"]=423]="LOCKED";e[e["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";e[e["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";e[e["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";e[e["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";e[e["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";e[e["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";e[e["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";e[e["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";e[e["BAD_GATEWAY"]=502]="BAD_GATEWAY";e[e["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";e[e["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";e[e["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";e[e["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";e[e["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";e[e["LOOP_DETECTED"]=508]="LOOP_DETECTED";e[e["NOT_EXTENDED"]=510]="NOT_EXTENDED";e[e["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})(DGe||(j$.HttpStatusCode=DGe={}))});var LGe=y(G$=>{"use strict";Object.defineProperty(G$,"__esModule",{value:true});G$.getSourceControlProviderLabel=void 0;function yvr(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}a(yvr,"getSourceControlProviderLabel");G$.getSourceControlProviderLabel=yvr});var BGe=y(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:true});z.DEPLOYMENT_CANNOT_DELETE_INSTANCE=z.DEPLOYMENT_INVALID_MULTI_PART=z.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=z.DEPLOYMENT_FILE_DOES_NOT_EXISTS=z.DEPLOYMENT_NOT_FOUND=z.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=z.DEPLOYMENT_NO_ACCESS=z.INVALID_SOURCE_REPO_URL=z.INVALID_EMAIL_FORMAT=z.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=z.PROJECT_MUST_HAVE_ONE_MEMBER=z.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=z.PROJECT_MEMBER_ALREADY_EXISTS=z.PROJECT_MEMBER_NOT_FOUND=z.INVALID_TEMPLATE_REPOSITORY=z.INCORRECT_PROJECT_TEMPLATE=z.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=z.PROJECT_NOT_FOUND=z.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=z.PROJECT_SHARING_DISABLED_ON_ACCOUNT=z.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=z.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=z.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=z.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=z.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=z.ACCOUNT_MEMBER_INVITE_INVALID=z.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=z.ACCOUNT_MEMBER_DOES_NOT_EXIST=z.ACCOUNT_MEMBER_INFO_MISSING=z.ACCOUNT_MEMBER_ALREADY_EXISTS=z.ACCOUNT_UPDATE_INFO_MISSING=z.ACCOUNT_INFO_MISSING=z.ACCOUNT_DOES_NOT_EXISTS=z.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=z.ACCOUNT_NAME_USES_RESERVED_KEYWORD=z.ACCOUNT_ALREADY_EXISTS=z.ACCOUNT_NOT_FOUND=z.USER_IS_NOT_SERVICE_ACCOUNT=z.USER_REMOVE_NOT_MEMBER_ACCOUNT=z.USER_HAS_NO_ACCESS_TO_ACCOUNT=z.USER_DETAILS_CANNOT_BE_FOUND=z.USER_ALREADY_EXISTS=z.CLIENT_NOT_FOUND=z.FORBIDDEN=z.UNAUTHORIZED=z.METHOD_NOT_ALLOWED=z.NOT_FOUND=z.CONFLICT=z.BAD_REQUEST=z.INTERNAL_SERVER_ERROR=void 0;z.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=z.GITHUB_INTEGRATION_DUPLICATE_REPO=z.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=z.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=z.GITHUB_INTEGRATION_BRANCH_BEHIND=z.GITHUB_INTEGRATION_NOT_FOUND=z.GITHUB_REPOSITORY_NOT_FOUND=z.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=z.GITHUB_INTEGRATION_ALREADY_EXISTS=z.FEATURE_FLAGS_NOT_FOUND=z.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=z.PROJECT_ALREADY_HAS_REPO=z.PROJECT_INVALID_NAME=z.FAILED_TO_REVOKE_GH_TOKEN=z.USER_ACCOUNT_NOT_FS_MIGRATED=z.USER_NO_ACCESS_GITLAB_REPO=z.USER_NO_ACCESS_BITBUCKET_REPO=z.GITHUB_APP_CONFIGURATION_NOT_FOUND=z.GITHUB_APP_NO_USER_ACCESS_=z.GITHUB_APP_NO_NAMESPACE_ACCESS=z.GENERIC_GITHUB_BRANCH_INFO_ERROR=z.GITHUB_USER_NO_READ_ACCESS_REPO=z.USER_NO_PULL_ACCESS_GITHUB_REPO=z.USER_NO_ACCESS_GITHUB_REPO=z.PROJECT_SHARING_REQUIRES_GIT_REPO=z.PROJECT_INVALID_GIT_REPO=z.PROJECT_INVALID_GIT_CLONE=z.USER_IS_PROJECT_MEMBER=z.USER_HAS_NO_ACCESS_TO_PROJECT=z.RUNTIME_FLAG_KEY_NOT_VALID=z.RUNTIME_FLAG_NOT_FOUND=z.RUNTIME_FLAG_ALREADY_EXISTS=z.PROJECT_NO_MEMBERS=z.PROJECT_ALREADY_EXISTS=z.SERVICE_CONFIGURATION_FAILED_DECRYPTION=z.WORKING_COPY_SERVICE_NOT_CREATED=z.WORKING_COPY_SERVICE_NOT_DELETED=z.WORKING_COPY_SERVICE_NOT_FOUND=z.SERVICE_CONFIGURATION_NOT_FOUND=z.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=z.DEPLOYMENT_INCORRECT_STATUS_PAUSE=z.DEPLOYMENT_NOT_WORKING_COPY=z.DEPLOYMENT_LOG_NOT_FOUND=z.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=z.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=z.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=z.DEPLOYMENT_DELETE_ERROR=void 0;z.INVALID_BRANCH_NAME=z.TARGET_BRANCH_ONLY_FOR_PREVIEW=z.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=z.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=z.DEPLOYMENT_NAME_MISSING=z.NON_EXISTENT_ENVIRONMENT_VARIABLE=z.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=z.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=z.DUPLICATE_ENVIRONMENT_VARIABLE=z.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=z.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=z.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=z.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=z.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=z.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=z.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=z.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=z.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=z.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=z.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=z.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=z.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=z.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=z.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=z.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=z.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=z.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=z.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=z.SOURCE_CONTROL_REPO_OPERATION_ERROR=z.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=z.SOURCE_CONTROL_REPO_NOT_FOUND=z.SOURCE_CONTROL_AUTHENTICATION_FAILED=z.EXTERNAL_SERVICE_GENERIC_ERROR=z.API_USER_NO_ACCESS=z.EXTERNAL_USER_NOT_CONFIGURED=z.EXTERNAL_USER_NO_ACCESS=z.CONSUMER_DOES_NOT_EXIST=z.CONSUMER_NO_ACCESS=z.GITLAB_ACCESS_LEVEL_CHECK_FAIL=z.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=z.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=z.GITLAB_DUPLICATE_REPO=z.GITLAB_FAILED_DURING_REPO_CREATION=z.GITLAB_QUERY_USER_INFO_FAILED=z.BITBUCKET_FAILED_DURING_REPO_CREATION=z.BITBUCKET_WORKSPACE_MISCONFIGURATION=z.BITBUCKET_QUERY_USER_INFO_FAILED=z.GITHUB_INTEGRATION_INVALID_REPO=z.GIT_CREATE_PROJECT_WITH_INVALID_REPO=z.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=void 0;z.UNABLE_UPGRADE_PLAN=z.BUCKET_API_KEY_SERVICE_CONFLICT=z.DIRECTORY_DELETE_FAILED=z.FILE_DELETE_FAILED=z.CANNOT_DELETE_SOLE_OPEN_API_FILE=z.CANNOT_DELETE_ESSENTIAL_DIRECTORY=z.CANNOT_DELETE_ESSENTIAL_FILE=z.FILE_WRITE_FAILED=z.FILE_RENAME_FAILED=z.FILE_RENAME_FILE_ALREADY_EXISTS=z.FILE_RENAME_CANNOT_CHANGE_EXTENSION=z.FILE_RENAME_PATHS_MATCH=z.DIRECTORY_CREATION_FAILED=z.DIRECTORY_OR_FILE_DOES_NOT_EXIST=z.DIRECTORY_DOES_NOT_EXIST=z.DIRECTORY_ALREADY_EXISTS=z.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=z.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=z.FAILED_DOWNLOAD_FROM_STORAGE=z.CANNOT_FIND_SRC_DIRECTORY=z.CANNOT_READ_PACKAGE_JSON=z.PACKAGE_JSON_NOT_FOUND=z.RUNTIME_VERSION_INCORRECT_FORMAT=z.MIGRATIONS_ONLY_ON_WORKING_COPY=z.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=z.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=z.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=z.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=z.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=z.NO_GLOBAL_SYMBOLS=z.NO_ZUPLO_PREFIXED_VARIABLES=z.NON_EMPTY_TARGETS_REQUIRED=z.CONFLICTING_TYPES=z.OVERLAPPING_TARGETS=void 0;var Me=Mce();var FGe=LGe();var _vr="https://github.com/apps/zuplo/installations/new";z.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:Me.HttpStatusCode.BAD_REQUEST};z.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:Me.HttpStatusCode.CONFLICT};z.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:Me.HttpStatusCode.NOT_FOUND};z.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:Me.HttpStatusCode.METHOD_NOT_ALLOWED};z.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:Me.HttpStatusCode.UNAUTHORIZED};z.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:Me.HttpStatusCode.FORBIDDEN};z.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:Me.HttpStatusCode.NOT_FOUND};z.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:Me.HttpStatusCode.CONFLICT};z.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:Me.HttpStatusCode.NOT_FOUND};z.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:Me.HttpStatusCode.UNAUTHORIZED};z.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:Me.HttpStatusCode.BAD_REQUEST};z.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:Me.HttpStatusCode.CONFLICT};z.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:Me.HttpStatusCode.BAD_REQUEST};z.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:Me.HttpStatusCode.BAD_REQUEST};z.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:Me.HttpStatusCode.BAD_REQUEST};z.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:Me.HttpStatusCode.FORBIDDEN};z.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:Me.HttpStatusCode.NOT_FOUND};z.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:Me.HttpStatusCode.NOT_FOUND};z.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:Me.HttpStatusCode.FORBIDDEN};z.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:Me.HttpStatusCode.BAD_REQUEST};var vvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:Me.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");z.INVALID_TEMPLATE_REPOSITORY=vvr;z.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:Me.HttpStatusCode.NOT_FOUND};z.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:Me.HttpStatusCode.BAD_REQUEST};z.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:Me.HttpStatusCode.BAD_REQUEST};z.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:Me.HttpStatusCode.BAD_REQUEST};z.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:Me.HttpStatusCode.NOT_FOUND};z.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:Me.HttpStatusCode.NOT_FOUND};z.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:Me.HttpStatusCode.BAD_REQUEST};z.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:Me.HttpStatusCode.BAD_REQUEST};z.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:Me.HttpStatusCode.NOT_FOUND};z.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:Me.HttpStatusCode.BAD_REQUEST};z.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:Me.HttpStatusCode.NOT_FOUND};z.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:Me.HttpStatusCode.BAD_REQUEST};z.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:Me.HttpStatusCode.FORBIDDEN};z.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:Me.HttpStatusCode.BAD_REQUEST};var Evr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");z.USER_NO_ACCESS_GITHUB_REPO=Evr;var bvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");z.USER_NO_PULL_ACCESS_GITHUB_REPO=bvr;var Svr=a(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");z.GITHUB_USER_NO_READ_ACCESS_REPO=Svr;z.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:Me.HttpStatusCode.BAD_REQUEST};z.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:Me.HttpStatusCode.FORBIDDEN};var Avr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${_vr}' to add the repository.`,status:Me.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");z.GITHUB_APP_NO_USER_ACCESS_=Avr;z.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:Me.HttpStatusCode.NOT_FOUND};var Cvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");z.USER_NO_ACCESS_BITBUCKET_REPO=Cvr;var wvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");z.USER_NO_ACCESS_GITLAB_REPO=wvr;z.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:Me.HttpStatusCode.FORBIDDEN};z.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:Me.HttpStatusCode.BAD_REQUEST};z.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:Me.HttpStatusCode.BAD_REQUEST};z.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:Me.HttpStatusCode.BAD_REQUEST};var Tvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:Me.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");z.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Tvr;var xvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:Me.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");z.GITHUB_REPOSITORY_NOT_FOUND=xvr;z.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:Me.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};z.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Me.HttpStatusCode.BAD_REQUEST};z.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:Me.HttpStatusCode.FORBIDDEN};z.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:Me.HttpStatusCode.FORBIDDEN};var Rvr=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");z.GITHUB_INTEGRATION_DUPLICATE_REPO=Rvr;var Ovr=a(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");z.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Ovr;var Pvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");z.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Pvr;var Nvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");z.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Nvr;var Ivr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");z.GITHUB_INTEGRATION_INVALID_REPO=Ivr;z.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:Me.HttpStatusCode.FORBIDDEN};z.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:Me.HttpStatusCode.FORBIDDEN};var kvr=a(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:Me.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");z.BITBUCKET_FAILED_DURING_REPO_CREATION=kvr;z.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:Me.HttpStatusCode.FORBIDDEN};var Dvr=a(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");z.GITLAB_FAILED_DURING_REPO_CREATION=Dvr;var Lvr=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");z.GITLAB_DUPLICATE_REPO=Lvr;var Fvr=a(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");z.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=Fvr;var Bvr=a(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");z.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=Bvr;var Mvr=a(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");z.GITLAB_ACCESS_LEVEL_CHECK_FAIL=Mvr;z.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:Me.HttpStatusCode.UNAUTHORIZED};z.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:Me.HttpStatusCode.NOT_FOUND};z.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:Me.HttpStatusCode.UNAUTHORIZED};z.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:Me.HttpStatusCode.FORBIDDEN};z.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:Me.HttpStatusCode.FORBIDDEN};z.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};var qvr=a(({sourceControlProvider:e})=>{const t=(0,FGe.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${t}`,status:Me.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");z.SOURCE_CONTROL_AUTHENTICATION_FAILED=qvr;var Uvr=a(({sourceControlProvider:e})=>{const t=(0,FGe.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${t} repository`,status:Me.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");z.SOURCE_CONTROL_REPO_NOT_FOUND=Uvr;z.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:Me.HttpStatusCode.BAD_REQUEST};var $vr=a(({repoURL:e,operation:t})=>{return{type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:Me.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");z.SOURCE_CONTROL_REPO_OPERATION_ERROR=$vr;z.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:Me.HttpStatusCode.NOT_FOUND};z.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:Me.HttpStatusCode.NOT_FOUND};z.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:Me.HttpStatusCode.UNAUTHORIZED};z.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:Me.HttpStatusCode.BAD_REQUEST};z.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:Me.HttpStatusCode.BAD_REQUEST};z.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Me.HttpStatusCode.BAD_REQUEST};z.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:Me.HttpStatusCode.FORBIDDEN};z.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:Me.HttpStatusCode.NOT_FOUND};z.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:Me.HttpStatusCode.NOT_FOUND};z.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:Me.HttpStatusCode.FAILED_DEPENDENCY};z.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:Me.HttpStatusCode.FAILED_DEPENDENCY};z.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:Me.HttpStatusCode.FAILED_DEPENDENCY};z.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:Me.HttpStatusCode.BAD_REQUEST};z.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:Me.HttpStatusCode.BAD_REQUEST};z.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:Me.HttpStatusCode.BAD_REQUEST};z.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:Me.HttpStatusCode.BAD_REQUEST};z.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:Me.HttpStatusCode.BAD_REQUEST};z.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:Me.HttpStatusCode.BAD_REQUEST};z.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:Me.HttpStatusCode.BAD_REQUEST};z.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:Me.HttpStatusCode.BAD_REQUEST};z.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:Me.HttpStatusCode.BAD_REQUEST};z.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:Me.HttpStatusCode.BAD_REQUEST};z.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:Me.HttpStatusCode.FORBIDDEN};z.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:Me.HttpStatusCode.NOT_FOUND};var jvr=a(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:Me.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");z.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=jvr;var Gvr=a(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:Me.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");z.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=Gvr;z.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:Me.HttpStatusCode.BAD_REQUEST};z.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:Me.HttpStatusCode.BAD_REQUEST};z.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:Me.HttpStatusCode.NOT_FOUND};z.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:Me.HttpStatusCode.BAD_REQUEST};z.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:Me.HttpStatusCode.BAD_REQUEST};z.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:Me.HttpStatusCode.BAD_REQUEST};var Hvr=a(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:Me.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");z.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=Hvr;var Vvr=a(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");z.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=Vvr;var zvr=a(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");z.DIRECTORY_ALREADY_EXISTS=zvr;var Kvr=a(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:Me.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");z.DIRECTORY_DOES_NOT_EXIST=Kvr;var Wvr=a(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:Me.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");z.DIRECTORY_OR_FILE_DOES_NOT_EXIST=Wvr;var Yvr=a(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");z.DIRECTORY_CREATION_FAILED=Yvr;var Xvr=a(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");z.FILE_RENAME_PATHS_MATCH=Xvr;var Jvr=a(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");z.FILE_RENAME_CANNOT_CHANGE_EXTENSION=Jvr;var Qvr=a(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");z.FILE_RENAME_FILE_ALREADY_EXISTS=Qvr;var Zvr=a(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");z.FILE_RENAME_FAILED=Zvr;var eEr=a(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");z.FILE_WRITE_FAILED=eEr;var tEr=a(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");z.CANNOT_DELETE_ESSENTIAL_FILE=tEr;var rEr=a(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");z.CANNOT_DELETE_ESSENTIAL_DIRECTORY=rEr;var nEr=a(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");z.CANNOT_DELETE_SOLE_OPEN_API_FILE=nEr;var iEr=a(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");z.FILE_DELETE_FAILED=iEr;var sEr=a(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");z.DIRECTORY_DELETE_FAILED=sEr;z.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:Me.HttpStatusCode.CONFLICT};z.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:Me.HttpStatusCode.BAD_REQUEST}});var qGe=y(Gc=>{"use strict";var aEr=Gc&&Gc.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var oEr=Gc&&Gc.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var uEr=Gc&&Gc.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))aEr(t,e,r)}oEr(t,e);return t};Object.defineProperty(Gc,"__esModule",{value:true});Gc.ApiNotFoundError=Gc.ApiError=Gc.Problems=void 0;var MGe=uEr(BGe());Gc.Problems=MGe;var H$=class extends Error{static{a(this,"ApiError")}type;status;detail;instance;constructor(t){super(t.title);if(!t.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`)}this.name="ApiProblemError";this.type=t.type;this.status=t.status;this.detail=t.detail;this.instance=t.instance}};Gc.ApiError=H$;var qce=class extends H${static{a(this,"ApiNotFoundError")}constructor(t={}){super({...t,...MGe.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Gc.ApiNotFoundError=qce});var ac=y(T1=>{"use strict";var lEr=T1&&T1.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var cEr=T1&&T1.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))lEr(t,e,r)};Object.defineProperty(T1,"__esModule",{value:true});T1.HttpStatusCode=void 0;cEr(qGe(),T1);var dEr=Mce();Object.defineProperty(T1,"HttpStatusCode",{enumerable:true,get:function(){return dEr.HttpStatusCode}})});var $ce=y(V$=>{"use strict";Object.defineProperty(V$,"__esModule",{value:true});V$.CommonAuth=void 0;var I_=ac();var pEr=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var Uce=class e{static{a(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(t){return pEr.includes(t)}isDeployerServiceAccount(t){return e.DEPLOYER_USER_SUB===t}static isAuthorizedSub(t,r){if(typeof r==="string"){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}try{const n=t.includes(r.sub);if(!n){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}}catch(n){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}}};V$.CommonAuth=Uce});var jce=y(z$=>{"use strict";Object.defineProperty(z$,"__esModule",{value:true});z$.FeatureFlags=void 0;z$.FeatureFlags=Object.freeze({remoteModules:(e,t)=>({flagName:"REMOTE_MODULES",defaultValue:false,accountName:e,projectName:t}),disableIntegratedDevPortalBuild:(e,t)=>({flagName:"DISABLE_INTEGRATED_DEV_PORTAL_BUILD",defaultValue:false,accountName:e,projectName:t}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var $Ge=y(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:true});k_.hasBlockedNotifications=k_.getBuildFlagsForDeployment=k_.getDefaultFlags=void 0;var UGe=jce();var fEr=["chocolate_bold_silverfish"];function mEr(e){const t={remoteModules:!!e?.remoteModules,disableIntegratedDevPortalBuild:!!e?.disableIntegratedDevPortalBuild};return t}a(mEr,"getDefaultFlags");k_.getDefaultFlags=mEr;async function hEr(e,{accountName:t,projectName:r}){const n=await e.getFlagValue(UGe.FeatureFlags.remoteModules(t,r));const i=await e.getFlagValue(UGe.FeatureFlags.disableIntegratedDevPortalBuild(t,r));return{remoteModules:n,disableIntegratedDevPortalBuild:i}}a(hEr,"getBuildFlagsForDeployment");k_.getBuildFlagsForDeployment=hEr;function gEr(e){return fEr.includes(e)}a(gEr,"hasBlockedNotifications");k_.hasBlockedNotifications=gEr});var jGe=y(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:true});Hc.BuildIssueError=Hc.WARNING_SEVERITY=Hc.ERROR_SEVERITY=Hc.FAILURE_STATUS=Hc.WARNING_STATUS=Hc.GOOD_STATUS=void 0;Hc.GOOD_STATUS="Good";Hc.WARNING_STATUS="Warnings";Hc.FAILURE_STATUS="Failed";Hc.ERROR_SEVERITY="error";Hc.WARNING_SEVERITY="warning";var Gce=class extends Error{static{a(this,"BuildIssueError")}issue;constructor(t){super(t.message);this.issue=t}};Hc.BuildIssueError=Gce});var GGe=y(K$=>{"use strict";Object.defineProperty(K$,"__esModule",{value:true});K$.COMPATIBILITY_FLAG_MAPPINGS=void 0;K$.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true}})});var HGe=y((sls,yEr)=>{yEr.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2023-03-14",enum:["2023-03-14","2024-01-15"]}}}});var VGe=y(W$=>{"use strict";Object.defineProperty(W$,"__esModule",{value:true});W$.VALID_COMPATIBILITY_DATES=void 0;W$.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var zGe=y(D_=>{"use strict";var _Er=D_&&D_.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(D_,"__esModule",{value:true});D_.DEFAULT_COMPATIBILITY_DATE=D_.VALID_COMPATIBILITY_DATES=void 0;var vEr=_Er(HGe());var EEr=VGe();Object.defineProperty(D_,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return EEr.VALID_COMPATIBILITY_DATES}});D_.DEFAULT_COMPATIBILITY_DATE=vEr.default.properties.compatibilityDate.default});var KGe=y(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:true});L_.decrypt=L_.encrypt=L_.signString=void 0;var _T=require("crypto");function bEr(e,t){return(0,_T.createHmac)("sha256",t).update(e).digest("hex")}a(bEr,"signString");L_.signString=bEr;var Hce={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var SEr=a(()=>(0,_T.randomBytes)(Hce.IV_BYTE_LEN),"getIV");function AEr(e,t){if(e===null){return null}const r=(0,_T.createHash)("sha256").update(String(t)).digest("base64").substring(0,32);const n=SEr();const i=(0,_T.createCipheriv)("aes-256-gcm",r,n,{authTagLength:Hce.AUTH_TAG_BYTE_LEN});let s=i.update(e);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}a(AEr,"encrypt");L_.encrypt=AEr;function CEr(e,t){if(!e){return null}const r=Buffer.from(t);const n=(0,_T.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(e,"hex");const s=i.slice(-16);const o=i.slice(0,12);const u=i.slice(12,-16);const l=(0,_T.createDecipheriv)("aes-256-gcm",n,o,{authTagLength:Hce.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}a(CEr,"decrypt");L_.decrypt=CEr});var WGe=y(Y$=>{"use strict";Object.defineProperty(Y$,"__esModule",{value:true});Y$.getCurrentUtcDateTime=void 0;function wEr(){const e={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const t=new Date().toLocaleString("en-US",e);return t}a(wEr,"getCurrentUtcDateTime");Y$.getCurrentUtcDateTime=wEr});var Vce=y(X$=>{"use strict";Object.defineProperty(X$,"__esModule",{value:true});X$.DeploymentLogState=void 0;var YGe;(function(e){e["ERROR"]="ERROR";e["IN_PROGRESS"]="IN_PROGRESS";e["SUCCESS"]="SUCCESS"})(YGe||(X$.DeploymentLogState=YGe={}))});var zce=y(XGe=>{"use strict";Object.defineProperty(XGe,"__esModule",{value:true})});var QGe=y(JGe=>{"use strict";Object.defineProperty(JGe,"__esModule",{value:true})});var ZGe=y(J$=>{"use strict";Object.defineProperty(J$,"__esModule",{value:true});J$.MARKDOWN_FRONTMATTER_KEYS=void 0;J$.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var tHe=y(eHe=>{"use strict";Object.defineProperty(eHe,"__esModule",{value:true})});var rHe=y(Qh=>{"use strict";var TEr=Qh&&Qh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var Q$=Qh&&Qh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))TEr(t,e,r)};Object.defineProperty(Qh,"__esModule",{value:true});Q$(zce(),Qh);Q$(QGe(),Qh);Q$(ZGe(),Qh);Q$(tHe(),Qh)});var Z$=y(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:true});Zh.getLoggerContext=Zh.requestIdGenerator=Zh.REQUEST_ID_HEADER=Zh.LEGACY_REQUEST_ID_HEADER=void 0;var xEr=require("crypto");Zh.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Zh.REQUEST_ID_HEADER="zp-rid";var REr=a(e=>{const t=e.headers["zuplo-request-id"];const r=e.headers["X-GitHub-Delivery"];if(t){const n=t;return`${n}`}else if(r){return`${r}`}return(0,xEr.randomUUID)()},"requestIdGenerator");Zh.requestIdGenerator=REr;function OEr(e){const t=e.raw.url??"";const r={};try{const n=e.headers["zuplo-user"]??e.user?.sub;if(n){r.userSub=`${n}`}const i=t.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=t.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const o=t.match(/(projects)\/([a-zA-Z-0-9]*)/);if(o&&o!==null&&o.length>=2){r.project=o[2]}}catch(n){}return r}a(OEr,"getLoggerContext");Zh.getLoggerContext=OEr});var Kce=y(vT=>{"use strict";var PEr=vT&&vT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(vT,"__esModule",{value:true});vT.errorHandler=void 0;var Up=ac();var NEr=PEr(ep());var nHe=Z$();function IEr(e,t,r){let n=500;let i;if(e instanceof Up.ApiError){n=e.status;i={type:e.type,title:e.message,status:e.status,detail:e.detail,instance:e.instance}}else if(typeof e==="object"&&"validation"in e&&"validationContext"in e){n=Up.HttpStatusCode.BAD_REQUEST;i={...Up.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${e.validationContext}.`,errors:e.validation}}else if(typeof e==="object"&&"code"in e&&e.code==="FST_ERR_NOT_FOUND"){n=404;i=Up.Problems.NOT_FOUND}else if(typeof e==="object"&&"code"in e&&typeof e.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(e.code)){n=Up.HttpStatusCode.BAD_REQUEST;i={...Up.Problems.BAD_REQUEST,detail:e.message}}else{let o;if(!r.statusCode||r.statusCode===200){if(typeof e==="object"&&"statusCode"in e&&typeof e.statusCode==="number"){o=e.statusCode}else if(typeof e==="object"&&"status"in e&&typeof e.status==="number"){o=e.status}n=o&&o>=400?o:500}else{n=r.statusCode}i=kEr(n);if(NEr.default.NODE_ENV!=="production"){if(typeof e==="object"&&"message"in e){i.detail=e.message}else if(typeof e==="string"){i.detail=e}}}i.trace={timestamp:new Date().toJSON(),requestId:t.headers[nHe.REQUEST_ID_HEADER]??t.headers[nHe.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:e},e&&e.message)}else{r.log.error({req:t,res:r,err:e},e&&e.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}a(IEr,"errorHandler");vT.errorHandler=IEr;function kEr(e){if(e===401){return Up.Problems.UNAUTHORIZED}else if(e===403){return Up.Problems.FORBIDDEN}else if(e===404){return Up.Problems.NOT_FOUND}else if(e===405){return Up.Problems.METHOD_NOT_ALLOWED}else if(e<500&&e>=400){return Up.Problems.BAD_REQUEST}return Up.Problems.INTERNAL_SERVER_ERROR}a(kEr,"getProblemFromStatus")});var sHe=y((Sls,Wce)=>{"use strict";var DEr=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var LEr=/(\w*(\.\w*)*)\..*/;Wce.exports=a(function e(t){if(t.name.length>0)return t.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return iHe(n.stack)}},"getPluginName");function iHe(e){const t=e.match(DEr);return t?t[1].split(/[/\\]/).slice(-1)[0].match(LEr)[1]:"anonymous"}a(iHe,"extractPluginName");Wce.exports.extractPluginName=iHe});var oHe=y((Cls,aHe)=>{"use strict";aHe.exports=a(function e(t){if(t[0]==="@"){t=t.slice(1).replace("/","-")}const r=t.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var F_=y((Tls,ej)=>{"use strict";var FEr=sHe();var BEr=oHe();var MEr=0;function Yce(e,t={}){let r=false;if(typeof e.default!=="undefined"){e=e.default}if(typeof e!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof e}'`)}if(typeof t==="string"){t={fastify:t}}if(typeof t!=="object"||Array.isArray(t)||t===null){throw new TypeError("The options object should be an object")}if(t.fastify!==void 0&&typeof t.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof t.fastify}'`)}if(!t.name){r=true;t.name=FEr(e)+"-auto-"+MEr++}e[Symbol.for("skip-override")]=t.encapsulate!==true;e[Symbol.for("fastify.display-name")]=t.name;e[Symbol.for("plugin-meta")]=t;if(!e.default){e.default=e}const n=BEr(t.name);if(!r&&!e[n]){e[n]=e}return e}a(Yce,"plugin");ej.exports=Yce;ej.exports.default=Yce;ej.exports.fastifyPlugin=Yce});var lHe=y(ET=>{"use strict";var qEr=ET&&ET.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(ET,"__esModule",{value:true});ET.apiKeyAuthPlugin=void 0;var e0=ac();var UEr=qEr(F_());var $Er="https://apikey.zuplo.com";var uHe=`Bearer `;ET.apiKeyAuthPlugin=(0,UEr.default)(async(e,t)=>{e.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new e0.ApiError({...e0.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(uHe)){throw new e0.ApiError({...e0.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(uHe.length);if(!i||i===""){throw new e0.ApiError({...e0.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const o=await fetch(`${$Er}/v1/$validate/${t.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(o.status===401){throw new e0.ApiError(e0.Problems.UNAUTHORIZED)}const u=await o.json();if(t.allowedSubs){if(!t.allowedSubs.includes(u.name)){throw new e0.ApiError(e0.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var cHe=y(bT=>{"use strict";var jEr=bT&&bT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(bT,"__esModule",{value:true});bT.ensureServiceAccountPlugin=void 0;var tj=ac();var GEr=jEr(F_());bT.ensureServiceAccountPlugin=(0,GEr.default)(async e=>{e.decorate("ensureServiceAccount",t=>async function(r){if(!r.user){r.log.error(`Bad request, zuplo:user header not present`);throw new tj.ApiError(tj.Problems.UNAUTHORIZED)}const n=r.user.sub;if(t!==n){r.log.error("The claim 'zuplo:user' is not from an authorized service account.");throw new tj.ApiError(tj.Problems.FORBIDDEN)}})},{name:"ensure-service-account-plugin"})});var dHe=y(ST=>{"use strict";var HEr=ST&&ST.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(ST,"__esModule",{value:true});ST.ensureZuploAdminPlugin=void 0;var rj=ac();var VEr=HEr(F_());var zEr=$ce();ST.ensureZuploAdminPlugin=(0,VEr.default)(async function(e){const t=new zEr.CommonAuth;e.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new rj.ApiError(rj.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&t.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new rj.ApiError(rj.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var fHe=y(AT=>{"use strict";var KEr=AT&&AT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(AT,"__esModule",{value:true});AT.ensureZuploUserPlugin=void 0;var pHe=ac();var WEr=KEr(F_());AT.ensureZuploUserPlugin=(0,WEr.default)(async e=>{e.decorate("ensureZuploUser",async function(t){const r=t.headers["zuplo-user"];if(!r||typeof r!=="string"){t.log.error("The 'zuplo-user' header is missing");throw new pHe.ApiError(pHe.Problems.UNAUTHORIZED)}t.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var gHe=y(CT=>{"use strict";var YEr=CT&&CT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(CT,"__esModule",{value:true});CT.featureFlagsPlugin=void 0;var XEr=YEr(F_());var Xce;async function mHe(e,t){try{const r=await Xce?.variation(t.flagName,{kind:t.kind,key:t.key},t.defaultValue);if(r===void 0){return t.defaultValue}else{return r}}catch(r){e.log.warn(`Failed to query Launch Darkly flag ${t.flagName}`);e.log.error(r)}return t.defaultValue}a(mHe,"getFlagValue");function hHe(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return false}a(hHe,"fallback");CT.featureFlagsPlugin=(0,XEr.default)(async(e,t)=>{try{if(typeof t.key!=="string"||!t.key||!t.client){e.decorateRequest("getFlagValue",hHe);e.decorateRequest("getFlagValueByUser",hHe);return}Xce=t.client;e.log.info("Launch Darkly SDK successfully initialized!");e.decorate("flags",Xce);e.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return mHe(this,s)});e.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return mHe(this,s)})}catch(r){e.log.warn("Launch Darkly failed to initialize");e.log.error(r)}},{name:"feature-flag-plugin"})});var Jce=y(wT=>{"use strict";var JEr=wT&&wT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(wT,"__esModule",{value:true});wT.getUserSubPlugin=void 0;var yHe=ac();var QEr=JEr(F_());wT.getUserSubPlugin=(0,QEr.default)(async e=>{e.decorateRequest("getUserSub",function(){const t=this.user?.sub;if(!t){this.log.error("Could not determine the user sub");throw new yHe.ApiError(yHe.Problems.UNAUTHORIZED)}return t})},{name:"get-user-sub-plugin"})});var Qce=y(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:true});Vc.getUserSubPlugin=Vc.featureFlagsPlugin=Vc.ensureZuploUserPlugin=Vc.ensureZuploAdminPlugin=Vc.ensureServiceAccountPlugin=Vc.apiKeyAuthPlugin=void 0;var ZEr=lHe();Object.defineProperty(Vc,"apiKeyAuthPlugin",{enumerable:true,get:function(){return ZEr.apiKeyAuthPlugin}});var ebr=cHe();Object.defineProperty(Vc,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return ebr.ensureServiceAccountPlugin}});var tbr=dHe();Object.defineProperty(Vc,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return tbr.ensureZuploAdminPlugin}});var rbr=fHe();Object.defineProperty(Vc,"ensureZuploUserPlugin",{enumerable:true,get:function(){return rbr.ensureZuploUserPlugin}});var nbr=gHe();Object.defineProperty(Vc,"featureFlagsPlugin",{enumerable:true,get:function(){return nbr.featureFlagsPlugin}});var ibr=Jce();Object.defineProperty(Vc,"getUserSubPlugin",{enumerable:true,get:function(){return ibr.getUserSubPlugin}})});var ls=y(Mu=>{"use strict";var Zce=Symbol.for("yaml.alias");var _He=Symbol.for("yaml.document");var nj=Symbol.for("yaml.map");var vHe=Symbol.for("yaml.pair");var ede=Symbol.for("yaml.scalar");var ij=Symbol.for("yaml.seq");var x1=Symbol.for("yaml.node.type");var sbr=a(e=>!!e&&typeof e==="object"&&e[x1]===Zce,"isAlias");var abr=a(e=>!!e&&typeof e==="object"&&e[x1]===_He,"isDocument");var obr=a(e=>!!e&&typeof e==="object"&&e[x1]===nj,"isMap");var ubr=a(e=>!!e&&typeof e==="object"&&e[x1]===vHe,"isPair");var EHe=a(e=>!!e&&typeof e==="object"&&e[x1]===ede,"isScalar");var lbr=a(e=>!!e&&typeof e==="object"&&e[x1]===ij,"isSeq");function bHe(e){if(e&&typeof e==="object")switch(e[x1]){case nj:case ij:return true}return false}a(bHe,"isCollection");function cbr(e){if(e&&typeof e==="object")switch(e[x1]){case Zce:case nj:case ede:case ij:return true}return false}a(cbr,"isNode");var dbr=a(e=>(EHe(e)||bHe(e))&&!!e.anchor,"hasAnchor");Mu.ALIAS=Zce;Mu.DOC=_He;Mu.MAP=nj;Mu.NODE_TYPE=x1;Mu.PAIR=vHe;Mu.SCALAR=ede;Mu.SEQ=ij;Mu.hasAnchor=dbr;Mu.isAlias=sbr;Mu.isCollection=bHe;Mu.isDocument=abr;Mu.isMap=obr;Mu.isNode=cbr;Mu.isPair=ubr;Mu.isScalar=EHe;Mu.isSeq=lbr});var e6=y(tde=>{"use strict";var Qo=ls();var zc=Symbol("break visit");var SHe=Symbol("skip children");var t0=Symbol("remove node");function sj(e,t){const r=AHe(t);if(Qo.isDocument(e)){const n=TT(null,e.contents,r,Object.freeze([e]));if(n===t0)e.contents=null}else TT(null,e,r,Object.freeze([]))}a(sj,"visit");sj.BREAK=zc;sj.SKIP=SHe;sj.REMOVE=t0;function TT(e,t,r,n){const i=CHe(e,t,r,n);if(Qo.isNode(i)||Qo.isPair(i)){wHe(e,n,i);return TT(e,i,r,n)}if(typeof i!=="symbol"){if(Qo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=TT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===zc)return zc;else if(o===t0){t.items.splice(s,1);s-=1}}}else if(Qo.isPair(t)){n=Object.freeze(n.concat(t));const s=TT("key",t.key,r,n);if(s===zc)return zc;else if(s===t0)t.key=null;const o=TT("value",t.value,r,n);if(o===zc)return zc;else if(o===t0)t.value=null}}return i}a(TT,"visit_");async function aj(e,t){const r=AHe(t);if(Qo.isDocument(e)){const n=await xT(null,e.contents,r,Object.freeze([e]));if(n===t0)e.contents=null}else await xT(null,e,r,Object.freeze([]))}a(aj,"visitAsync");aj.BREAK=zc;aj.SKIP=SHe;aj.REMOVE=t0;async function xT(e,t,r,n){const i=await CHe(e,t,r,n);if(Qo.isNode(i)||Qo.isPair(i)){wHe(e,n,i);return xT(e,i,r,n)}if(typeof i!=="symbol"){if(Qo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=await xT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===zc)return zc;else if(o===t0){t.items.splice(s,1);s-=1}}}else if(Qo.isPair(t)){n=Object.freeze(n.concat(t));const s=await xT("key",t.key,r,n);if(s===zc)return zc;else if(s===t0)t.key=null;const o=await xT("value",t.value,r,n);if(o===zc)return zc;else if(o===t0)t.value=null}}return i}a(xT,"visitAsync_");function AHe(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value)){return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e)}return e}a(AHe,"initVisitor");function CHe(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(Qo.isMap(t))return r.Map?.(e,t,n);if(Qo.isSeq(t))return r.Seq?.(e,t,n);if(Qo.isPair(t))return r.Pair?.(e,t,n);if(Qo.isScalar(t))return r.Scalar?.(e,t,n);if(Qo.isAlias(t))return r.Alias?.(e,t,n);return void 0}a(CHe,"callVisitor");function wHe(e,t,r){const n=t[t.length-1];if(Qo.isCollection(n)){n.items[e]=r}else if(Qo.isPair(n)){if(e==="key")n.key=r;else n.value=r}else if(Qo.isDocument(n)){n.contents=r}else{const i=Qo.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}a(wHe,"replaceNode");tde.visit=sj;tde.visitAsync=aj});var rde=y(xHe=>{"use strict";var THe=ls();var pbr=e6();var fbr={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var mbr=a(e=>e.replace(/[!,[\]{}]/g,t=>fbr[t]),"escapeTagName");var t6=class e{static{a(this,"Directives")}constructor(t,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},e.defaultYaml,t);this.tags=Object.assign({},e.defaultTags,r)}clone(){const t=new e(this.yaml,this.tags);t.docStart=this.docStart;return t}atDocument(){const t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){if(this.atNextDocument){this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},e.defaultTags);this.atNextDocument=false}const n=t.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,o]=n;this.tags[s]=o;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const o=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,o);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!"){r(`Not a valid tag: ${t}`);return null}if(t[1]==="<"){const o=t.slice(2,-1);if(o==="!"||o==="!!"){r(`Verbatim tags aren't resolved, so ${t} is invalid.`);return null}if(t[t.length-1]!==">")r("Verbatim tags must end with a >");return o}const[,n,i]=t.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${t} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(o){r(String(o));return null}}if(n==="!")return t;r(`Could not resolve tag: ${t}`);return null}tagString(t){for(const[r,n]of Object.entries(this.tags)){if(t.startsWith(n))return r+mbr(t.substring(n.length))}return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(t&&n.length>0&&THe.isNode(t.contents)){const s={};pbr.visit(t.contents,(o,u)=>{if(THe.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,o]of n){if(s==="!!"&&o==="tag:yaml.org,2002:")continue;if(!t||i.some(u=>u.startsWith(o)))r.push(`%TAG ${s} ${o}`)}return r.join("\n")}};t6.defaultYaml={explicit:false,version:"1.2"};t6.defaultTags={"!!":"tag:yaml.org,2002:"};xHe.Directives=t6});var oj=y(r6=>{"use strict";var RHe=ls();var hbr=e6();function gbr(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const r=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(r)}return true}a(gbr,"anchorIsValid");function OHe(e){const t=new Set;hbr.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}});return t}a(OHe,"anchorNames");function PHe(e,t){for(let r=1;true;++r){const n=`${e}${r}`;if(!t.has(n))return n}}a(PHe,"findNewAnchor");function ybr(e,t){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=OHe(e);const o=PHe(t,i);i.add(o);return o},setAnchors:()=>{for(const s of r){const o=n.get(s);if(typeof o==="object"&&o.anchor&&(RHe.isScalar(o.node)||RHe.isCollection(o.node))){o.node.anchor=o.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}a(ybr,"createNodeAnchors");r6.anchorIsValid=gbr;r6.anchorNames=OHe;r6.createNodeAnchors=ybr;r6.findNewAnchor=PHe});var nde=y(NHe=>{"use strict";function n6(e,t,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const o=n[i];const u=n6(e,n,String(i),o);if(u===void 0)delete n[i];else if(u!==o)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const o=n6(e,n,i,s);if(o===void 0)n.delete(i);else if(o!==s)n.set(i,o)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=n6(e,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const o=n6(e,n,i,s);if(o===void 0)delete n[i];else if(o!==s)n[i]=o}}}return e.call(t,r,n)}a(n6,"applyReviver");NHe.applyReviver=n6});var B_=y(kHe=>{"use strict";var _br=ls();function IHe(e,t,r){if(Array.isArray(e))return e.map((n,i)=>IHe(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!_br.hasAnchor(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}a(IHe,"toJS");kHe.toJS=IHe});var uj=y(LHe=>{"use strict";var vbr=nde();var DHe=ls();var Ebr=B_();var ide=class{static{a(this,"NodeBase")}constructor(t){Object.defineProperty(this,DHe.NODE_TYPE,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)t.range=this.range.slice();return t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!DHe.isDocument(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=Ebr.toJS(this,"",o);if(typeof i==="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s==="function"?vbr.applyReviver(s,{"":u},"",u):u}};LHe.NodeBase=ide});var i6=y(BHe=>{"use strict";var bbr=oj();var FHe=e6();var lj=ls();var Sbr=uj();var Abr=B_();var sde=class extends Sbr.NodeBase{static{a(this,"Alias")}constructor(t){super(lj.ALIAS);this.source=t;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let r=void 0;FHe.visit(t,{Node:(n,i)=>{if(i===this)return FHe.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(t,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(o);if(!u){Abr.toJS(o,null,r);u=n.get(o)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=cj(i,o,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(t,r,n){const i=`*${this.source}`;if(t){bbr.anchorIsValid(this.source);if(t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}};function cj(e,t,r){if(lj.isAlias(t)){const n=t.resolve(e);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(lj.isCollection(t)){let n=0;for(const i of t.items){const s=cj(e,i,r);if(s>n)n=s}return n}else if(lj.isPair(t)){const n=cj(e,t.key,r);const i=cj(e,t.value,r);return Math.max(n,i)}return 1}a(cj,"getAliasCount");BHe.Alias=sde});var xo=y(ade=>{"use strict";var Cbr=ls();var wbr=uj();var Tbr=B_();var xbr=a(e=>!e||typeof e!=="function"&&typeof e!=="object","isScalarValue");var M_=class extends wbr.NodeBase{static{a(this,"Scalar")}constructor(t){super(Cbr.SCALAR);this.value=t}toJSON(t,r){return r?.keep?this.value:Tbr.toJS(this.value,t,r)}toString(){return String(this.value)}};M_.BLOCK_FOLDED="BLOCK_FOLDED";M_.BLOCK_LITERAL="BLOCK_LITERAL";M_.PLAIN="PLAIN";M_.QUOTE_DOUBLE="QUOTE_DOUBLE";M_.QUOTE_SINGLE="QUOTE_SINGLE";ade.Scalar=M_;ade.isScalarValue=xbr});var s6=y(qHe=>{"use strict";var Rbr=i6();var Q2=ls();var MHe=xo();var Obr="tag:yaml.org,2002:";function Pbr(e,t,r){if(t){const n=r.filter(s=>s.tag===t);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return r.find(n=>n.identify?.(e)&&!n.format)}a(Pbr,"findTagObject");function Nbr(e,t,r){if(Q2.isDocument(e))e=e.contents;if(Q2.isNode(e))return e;if(Q2.isPair(e)){const p=r.schema[Q2.MAP].createNode?.(r.schema,null,r);p.items.push(e);return p}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:o,sourceObjects:u}=r;let l=void 0;if(n&&e&&typeof e==="object"){l=u.get(e);if(l){if(!l.anchor)l.anchor=i(e);return new Rbr.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(e,l)}}if(t?.startsWith("!!"))t=Obr+t.slice(2);let c=Pbr(e,t,o.tags);if(!c){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const p=new MHe.Scalar(e);if(l)l.node=p;return p}c=e instanceof Map?o[Q2.MAP]:Symbol.iterator in Object(e)?o[Q2.SEQ]:o[Q2.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new MHe.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}a(Nbr,"createNode");qHe.createNode=Nbr});var a6=y(pj=>{"use strict";var Ibr=s6();var r0=ls();var kbr=uj();function ode(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){const s=t[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=n;n=o}else{n=new Map([[s,n]])}}return Ibr.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}a(ode,"collectionFromPath");var UHe=a(e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done,"isEmptyPath");var dj=class extends kbr.NodeBase{static{a(this,"Collection")}constructor(t,r){super(t);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(t)r.schema=t;r.items=r.items.map(n=>r0.isNode(n)||r0.isPair(n)?n.clone(t):n);if(this.range)r.range=this.range.slice();return r}addIn(t,r){if(UHe(t))this.add(r);else{const[n,...i]=t;const s=this.get(n,true);if(r0.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,ode(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(t){const[r,...n]=t;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(r0.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){const[n,...i]=t;const s=this.get(n,true);if(i.length===0)return!r&&r0.isScalar(s)?s.value:s;else return r0.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!r0.isPair(r))return false;const n=r.value;return n==null||t&&r0.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){const[r,...n]=t;if(n.length===0)return this.has(r);const i=this.get(r,true);return r0.isCollection(i)?i.hasIn(n):false}setIn(t,r){const[n,...i]=t;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(r0.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,ode(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};dj.maxFlowStringSingleLineLength=60;pj.Collection=dj;pj.collectionFromPath=ode;pj.isEmptyPath=UHe});var o6=y(fj=>{"use strict";var Dbr=a(e=>e.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function ude(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}a(ude,"indentComment");var Lbr=a((e,t,r)=>e.endsWith("\n")?ude(r,t):r.includes("\n")?"\n"+ude(r,t):(e.endsWith(" ")?"":" ")+r,"lineComment");fj.indentComment=ude;fj.lineComment=Lbr;fj.stringifyComment=Dbr});var jHe=y(u6=>{"use strict";var Fbr="flow";var lde="block";var mj="quoted";function Bbr(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:u}={}){if(!i||i<0)return e;const l=Math.max(1+s,1+i-t.length);if(e.length<=l)return e;const c=[];const d={};let p=i-t.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let m=void 0;let h=false;let g=-1;let _=-1;let v=-1;if(r===lde){g=$He(e,g);if(g!==-1)p=g+l}for(let E;E=e[g+=1];){if(r===mj&&E==="\\"){_=g;switch(e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===lde)g=$He(e,g);p=g+l;f=void 0}else{if(E===" "&&m&&m!==" "&&m!=="\n"&&m!==" "){const b=e[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===mj){while(m===" "||m===" "){m=E;E=e[g+=1];h=true}const b=g>v+1?g-2:_-1;if(d[b])return e;c.push(b);d[b]=true;p=b+l;f=void 0}else{h=true}}}m=E}if(h&&u)u();if(c.length===0)return e;if(o)o();let S=e.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const A=c[E+1]||e.length;if(b===0)S=`
|
|
25
|
+
"use strict";var rvr=Object.create;var JD=Object.defineProperty;var nvr=Object.getOwnPropertyDescriptor;var ivr=Object.getOwnPropertyNames;var svr=Object.getPrototypeOf;var avr=Object.prototype.hasOwnProperty;var a=(e,t)=>JD(e,"name",{value:t,configurable:true});var Ii=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var QD=(e,t)=>{for(var r in t)JD(e,r,{get:t[r],enumerable:true})};var PGe=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of ivr(t))if(!avr.call(e,i)&&i!==r)JD(e,i,{get:()=>t[i],enumerable:!(n=nvr(t,i))||n.enumerable})}return e};var Si=(e,t,r)=>(r=e!=null?rvr(svr(e)):{},PGe(t||!e||!e.__esModule?JD(r,"default",{value:e,enumerable:true}):r,e));var Ct=e=>PGe(JD({},"__esModule",{value:true}),e);var NGe=y((Mus,ovr)=>{ovr.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var kGe=y((qus,$$)=>{var uvr=require("fs");var IGe=require("path");var lvr=require("os");var cvr=NGe();var dvr=cvr.version;var pvr=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function fvr(e){const t={};let r=e.toString();r=r.replace(/\r\n?/mg,"\n");let n;while((n=pvr.exec(r))!=null){const i=n[1];let s=n[2]||"";s=s.trim();const o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2");if(o==='"'){s=s.replace(/\\n/g,"\n");s=s.replace(/\\r/g,"\r")}t[i]=s}return t}a(fvr,"parse");function Fce(e){console.log(`[dotenv@${dvr}][DEBUG] ${e}`)}a(Fce,"_log");function mvr(e){return e[0]==="~"?IGe.join(lvr.homedir(),e.slice(1)):e}a(mvr,"_resolveHome");function hvr(e){let t=IGe.resolve(process.cwd(),".env");let r="utf8";const n=Boolean(e&&e.debug);const i=Boolean(e&&e.override);if(e){if(e.path!=null){t=mvr(e.path)}if(e.encoding!=null){r=e.encoding}}try{const s=U$.parse(uvr.readFileSync(t,{encoding:r}));Object.keys(s).forEach(function(o){if(!Object.prototype.hasOwnProperty.call(process.env,o)){process.env[o]=s[o]}else{if(i===true){process.env[o]=s[o]}if(n){if(i===true){Fce(`"${o}" is already defined in \`process.env\` and WAS overwritten`)}else{Fce(`"${o}" is already defined in \`process.env\` and was NOT overwritten`)}}}});return{parsed:s}}catch(s){if(n){Fce(`Failed to load ${t} ${s.message}`)}return{error:s}}}a(hvr,"config");var U$={config:hvr,parse:fvr};$$.exports.config=U$.config;$$.exports.parse=U$.parse;$$.exports=U$});var ep=y(J2=>{"use strict";Object.defineProperty(J2,"__esModule",{value:true});J2.EnvironmentalVariableRequiredError=J2.getRequiredEnvVar=void 0;var Bce=class{static{a(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.51.0"}get AUTH_API_URL(){return Nm("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return Nm("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return Nm("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return Nm("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return Nm("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return Nm("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return Nm("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return Nm("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return Nm("METERING_SERVICE_URL","https://meters.zuplo.com")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new ZD(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return Nm("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function Nm(e,t){const r=process.env[e];if(r===void 0&&(t===void 0||process.env.NODE_ENV==="production")){throw new ZD(e)}return r??t}a(Nm,"getRequiredEnvVar");J2.getRequiredEnvVar=Nm;var ZD=class extends Error{static{a(this,"EnvironmentalVariableRequiredError")}constructor(t){super(`The environmental variable '${t}' is required.'`)}};J2.EnvironmentalVariableRequiredError=ZD;var gvr=new Bce;J2.default=gvr});var Mce=y(j$=>{"use strict";Object.defineProperty(j$,"__esModule",{value:true});j$.HttpStatusCode=void 0;var DGe;(function(e){e[e["CONTINUE"]=100]="CONTINUE";e[e["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";e[e["PROCESSING"]=102]="PROCESSING";e[e["OK"]=200]="OK";e[e["CREATED"]=201]="CREATED";e[e["ACCEPTED"]=202]="ACCEPTED";e[e["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";e[e["NO_CONTENT"]=204]="NO_CONTENT";e[e["RESET_CONTENT"]=205]="RESET_CONTENT";e[e["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";e[e["MULTI_STATUS"]=207]="MULTI_STATUS";e[e["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";e[e["IM_USED"]=226]="IM_USED";e[e["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";e[e["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";e[e["FOUND"]=302]="FOUND";e[e["SEE_OTHER"]=303]="SEE_OTHER";e[e["NOT_MODIFIED"]=304]="NOT_MODIFIED";e[e["USE_PROXY"]=305]="USE_PROXY";e[e["SWITCH_PROXY"]=306]="SWITCH_PROXY";e[e["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";e[e["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";e[e["BAD_REQUEST"]=400]="BAD_REQUEST";e[e["UNAUTHORIZED"]=401]="UNAUTHORIZED";e[e["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";e[e["FORBIDDEN"]=403]="FORBIDDEN";e[e["NOT_FOUND"]=404]="NOT_FOUND";e[e["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";e[e["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";e[e["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";e[e["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";e[e["CONFLICT"]=409]="CONFLICT";e[e["GONE"]=410]="GONE";e[e["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";e[e["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";e[e["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";e[e["URI_TOO_LONG"]=414]="URI_TOO_LONG";e[e["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";e[e["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";e[e["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";e[e["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";e[e["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";e[e["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";e[e["LOCKED"]=423]="LOCKED";e[e["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";e[e["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";e[e["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";e[e["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";e[e["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";e[e["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";e[e["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";e[e["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";e[e["BAD_GATEWAY"]=502]="BAD_GATEWAY";e[e["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";e[e["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";e[e["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";e[e["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";e[e["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";e[e["LOOP_DETECTED"]=508]="LOOP_DETECTED";e[e["NOT_EXTENDED"]=510]="NOT_EXTENDED";e[e["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})(DGe||(j$.HttpStatusCode=DGe={}))});var LGe=y(G$=>{"use strict";Object.defineProperty(G$,"__esModule",{value:true});G$.getSourceControlProviderLabel=void 0;function yvr(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}a(yvr,"getSourceControlProviderLabel");G$.getSourceControlProviderLabel=yvr});var BGe=y(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:true});z.DEPLOYMENT_CANNOT_DELETE_INSTANCE=z.DEPLOYMENT_INVALID_MULTI_PART=z.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=z.DEPLOYMENT_FILE_DOES_NOT_EXISTS=z.DEPLOYMENT_NOT_FOUND=z.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=z.DEPLOYMENT_NO_ACCESS=z.INVALID_SOURCE_REPO_URL=z.INVALID_EMAIL_FORMAT=z.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=z.PROJECT_MUST_HAVE_ONE_MEMBER=z.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=z.PROJECT_MEMBER_ALREADY_EXISTS=z.PROJECT_MEMBER_NOT_FOUND=z.INVALID_TEMPLATE_REPOSITORY=z.INCORRECT_PROJECT_TEMPLATE=z.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=z.PROJECT_NOT_FOUND=z.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=z.PROJECT_SHARING_DISABLED_ON_ACCOUNT=z.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=z.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=z.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=z.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=z.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=z.ACCOUNT_MEMBER_INVITE_INVALID=z.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=z.ACCOUNT_MEMBER_DOES_NOT_EXIST=z.ACCOUNT_MEMBER_INFO_MISSING=z.ACCOUNT_MEMBER_ALREADY_EXISTS=z.ACCOUNT_UPDATE_INFO_MISSING=z.ACCOUNT_INFO_MISSING=z.ACCOUNT_DOES_NOT_EXISTS=z.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=z.ACCOUNT_NAME_USES_RESERVED_KEYWORD=z.ACCOUNT_ALREADY_EXISTS=z.ACCOUNT_NOT_FOUND=z.USER_IS_NOT_SERVICE_ACCOUNT=z.USER_REMOVE_NOT_MEMBER_ACCOUNT=z.USER_HAS_NO_ACCESS_TO_ACCOUNT=z.USER_DETAILS_CANNOT_BE_FOUND=z.USER_ALREADY_EXISTS=z.CLIENT_NOT_FOUND=z.FORBIDDEN=z.UNAUTHORIZED=z.METHOD_NOT_ALLOWED=z.NOT_FOUND=z.CONFLICT=z.BAD_REQUEST=z.INTERNAL_SERVER_ERROR=void 0;z.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=z.GITHUB_INTEGRATION_DUPLICATE_REPO=z.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=z.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=z.GITHUB_INTEGRATION_BRANCH_BEHIND=z.GITHUB_INTEGRATION_NOT_FOUND=z.GITHUB_REPOSITORY_NOT_FOUND=z.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=z.GITHUB_INTEGRATION_ALREADY_EXISTS=z.FEATURE_FLAGS_NOT_FOUND=z.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=z.PROJECT_ALREADY_HAS_REPO=z.PROJECT_INVALID_NAME=z.FAILED_TO_REVOKE_GH_TOKEN=z.USER_ACCOUNT_NOT_FS_MIGRATED=z.USER_NO_ACCESS_GITLAB_REPO=z.USER_NO_ACCESS_BITBUCKET_REPO=z.GITHUB_APP_CONFIGURATION_NOT_FOUND=z.GITHUB_APP_NO_USER_ACCESS_=z.GITHUB_APP_NO_NAMESPACE_ACCESS=z.GENERIC_GITHUB_BRANCH_INFO_ERROR=z.GITHUB_USER_NO_READ_ACCESS_REPO=z.USER_NO_PULL_ACCESS_GITHUB_REPO=z.USER_NO_ACCESS_GITHUB_REPO=z.PROJECT_SHARING_REQUIRES_GIT_REPO=z.PROJECT_INVALID_GIT_REPO=z.PROJECT_INVALID_GIT_CLONE=z.USER_IS_PROJECT_MEMBER=z.USER_HAS_NO_ACCESS_TO_PROJECT=z.RUNTIME_FLAG_KEY_NOT_VALID=z.RUNTIME_FLAG_NOT_FOUND=z.RUNTIME_FLAG_ALREADY_EXISTS=z.PROJECT_NO_MEMBERS=z.PROJECT_ALREADY_EXISTS=z.SERVICE_CONFIGURATION_FAILED_DECRYPTION=z.WORKING_COPY_SERVICE_NOT_CREATED=z.WORKING_COPY_SERVICE_NOT_DELETED=z.WORKING_COPY_SERVICE_NOT_FOUND=z.SERVICE_CONFIGURATION_NOT_FOUND=z.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=z.DEPLOYMENT_INCORRECT_STATUS_PAUSE=z.DEPLOYMENT_NOT_WORKING_COPY=z.DEPLOYMENT_LOG_NOT_FOUND=z.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=z.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=z.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=z.DEPLOYMENT_DELETE_ERROR=void 0;z.INVALID_BRANCH_NAME=z.TARGET_BRANCH_ONLY_FOR_PREVIEW=z.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=z.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=z.DEPLOYMENT_NAME_MISSING=z.NON_EXISTENT_ENVIRONMENT_VARIABLE=z.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=z.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=z.DUPLICATE_ENVIRONMENT_VARIABLE=z.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=z.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=z.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=z.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=z.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=z.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=z.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=z.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=z.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=z.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=z.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=z.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=z.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=z.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=z.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=z.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=z.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=z.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=z.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=z.SOURCE_CONTROL_REPO_OPERATION_ERROR=z.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=z.SOURCE_CONTROL_REPO_NOT_FOUND=z.SOURCE_CONTROL_AUTHENTICATION_FAILED=z.EXTERNAL_SERVICE_GENERIC_ERROR=z.API_USER_NO_ACCESS=z.EXTERNAL_USER_NOT_CONFIGURED=z.EXTERNAL_USER_NO_ACCESS=z.CONSUMER_DOES_NOT_EXIST=z.CONSUMER_NO_ACCESS=z.GITLAB_ACCESS_LEVEL_CHECK_FAIL=z.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=z.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=z.GITLAB_DUPLICATE_REPO=z.GITLAB_FAILED_DURING_REPO_CREATION=z.GITLAB_QUERY_USER_INFO_FAILED=z.BITBUCKET_FAILED_DURING_REPO_CREATION=z.BITBUCKET_WORKSPACE_MISCONFIGURATION=z.BITBUCKET_QUERY_USER_INFO_FAILED=z.GITHUB_INTEGRATION_INVALID_REPO=z.GIT_CREATE_PROJECT_WITH_INVALID_REPO=z.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=void 0;z.UNABLE_UPGRADE_PLAN=z.BUCKET_API_KEY_SERVICE_CONFLICT=z.DIRECTORY_DELETE_FAILED=z.FILE_DELETE_FAILED=z.CANNOT_DELETE_SOLE_OPEN_API_FILE=z.CANNOT_DELETE_ESSENTIAL_DIRECTORY=z.CANNOT_DELETE_ESSENTIAL_FILE=z.FILE_WRITE_FAILED=z.FILE_RENAME_FAILED=z.FILE_RENAME_FILE_ALREADY_EXISTS=z.FILE_RENAME_CANNOT_CHANGE_EXTENSION=z.FILE_RENAME_PATHS_MATCH=z.DIRECTORY_CREATION_FAILED=z.DIRECTORY_OR_FILE_DOES_NOT_EXIST=z.DIRECTORY_DOES_NOT_EXIST=z.DIRECTORY_ALREADY_EXISTS=z.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=z.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=z.FAILED_DOWNLOAD_FROM_STORAGE=z.CANNOT_FIND_SRC_DIRECTORY=z.CANNOT_READ_PACKAGE_JSON=z.PACKAGE_JSON_NOT_FOUND=z.RUNTIME_VERSION_INCORRECT_FORMAT=z.MIGRATIONS_ONLY_ON_WORKING_COPY=z.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=z.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=z.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=z.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=z.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=z.NO_GLOBAL_SYMBOLS=z.NO_ZUPLO_PREFIXED_VARIABLES=z.NON_EMPTY_TARGETS_REQUIRED=z.CONFLICTING_TYPES=z.OVERLAPPING_TARGETS=void 0;var Me=Mce();var FGe=LGe();var _vr="https://github.com/apps/zuplo/installations/new";z.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:Me.HttpStatusCode.BAD_REQUEST};z.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:Me.HttpStatusCode.CONFLICT};z.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:Me.HttpStatusCode.NOT_FOUND};z.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:Me.HttpStatusCode.METHOD_NOT_ALLOWED};z.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:Me.HttpStatusCode.UNAUTHORIZED};z.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:Me.HttpStatusCode.FORBIDDEN};z.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:Me.HttpStatusCode.NOT_FOUND};z.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:Me.HttpStatusCode.CONFLICT};z.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:Me.HttpStatusCode.NOT_FOUND};z.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:Me.HttpStatusCode.UNAUTHORIZED};z.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:Me.HttpStatusCode.BAD_REQUEST};z.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:Me.HttpStatusCode.CONFLICT};z.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:Me.HttpStatusCode.NOT_FOUND};z.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:Me.HttpStatusCode.BAD_REQUEST};z.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:Me.HttpStatusCode.BAD_REQUEST};z.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:Me.HttpStatusCode.BAD_REQUEST};z.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:Me.HttpStatusCode.FORBIDDEN};z.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:Me.HttpStatusCode.NOT_FOUND};z.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:Me.HttpStatusCode.NOT_FOUND};z.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:Me.HttpStatusCode.FORBIDDEN};z.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:Me.HttpStatusCode.BAD_REQUEST};var vvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:Me.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");z.INVALID_TEMPLATE_REPOSITORY=vvr;z.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:Me.HttpStatusCode.NOT_FOUND};z.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:Me.HttpStatusCode.BAD_REQUEST};z.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:Me.HttpStatusCode.BAD_REQUEST};z.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:Me.HttpStatusCode.FORBIDDEN};z.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:Me.HttpStatusCode.BAD_REQUEST};z.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:Me.HttpStatusCode.NOT_FOUND};z.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:Me.HttpStatusCode.NOT_FOUND};z.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:Me.HttpStatusCode.BAD_REQUEST};z.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:Me.HttpStatusCode.BAD_REQUEST};z.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:Me.HttpStatusCode.NOT_FOUND};z.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:Me.HttpStatusCode.BAD_REQUEST};z.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:Me.HttpStatusCode.NOT_FOUND};z.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:Me.HttpStatusCode.BAD_REQUEST};z.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:Me.HttpStatusCode.FORBIDDEN};z.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:Me.HttpStatusCode.BAD_REQUEST};var Evr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");z.USER_NO_ACCESS_GITHUB_REPO=Evr;var bvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");z.USER_NO_PULL_ACCESS_GITHUB_REPO=bvr;var Svr=a(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");z.GITHUB_USER_NO_READ_ACCESS_REPO=Svr;z.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:Me.HttpStatusCode.BAD_REQUEST};z.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:Me.HttpStatusCode.FORBIDDEN};var Avr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${_vr}' to add the repository.`,status:Me.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");z.GITHUB_APP_NO_USER_ACCESS_=Avr;z.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:Me.HttpStatusCode.NOT_FOUND};var Cvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");z.USER_NO_ACCESS_BITBUCKET_REPO=Cvr;var wvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Me.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");z.USER_NO_ACCESS_GITLAB_REPO=wvr;z.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:Me.HttpStatusCode.FORBIDDEN};z.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:Me.HttpStatusCode.BAD_REQUEST};z.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:Me.HttpStatusCode.BAD_REQUEST};z.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:Me.HttpStatusCode.BAD_REQUEST};z.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:Me.HttpStatusCode.BAD_REQUEST};var Tvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:Me.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");z.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Tvr;var xvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:Me.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");z.GITHUB_REPOSITORY_NOT_FOUND=xvr;z.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:Me.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};z.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Me.HttpStatusCode.BAD_REQUEST};z.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:Me.HttpStatusCode.FORBIDDEN};z.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:Me.HttpStatusCode.FORBIDDEN};var Rvr=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");z.GITHUB_INTEGRATION_DUPLICATE_REPO=Rvr;var Ovr=a(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");z.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Ovr;var Pvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");z.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Pvr;var Nvr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");z.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Nvr;var Ivr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");z.GITHUB_INTEGRATION_INVALID_REPO=Ivr;z.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:Me.HttpStatusCode.FORBIDDEN};z.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:Me.HttpStatusCode.FORBIDDEN};var kvr=a(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:Me.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");z.BITBUCKET_FAILED_DURING_REPO_CREATION=kvr;z.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:Me.HttpStatusCode.FORBIDDEN};var Dvr=a(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");z.GITLAB_FAILED_DURING_REPO_CREATION=Dvr;var Lvr=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");z.GITLAB_DUPLICATE_REPO=Lvr;var Fvr=a(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");z.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=Fvr;var Bvr=a(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");z.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=Bvr;var Mvr=a(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");z.GITLAB_ACCESS_LEVEL_CHECK_FAIL=Mvr;z.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:Me.HttpStatusCode.UNAUTHORIZED};z.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:Me.HttpStatusCode.NOT_FOUND};z.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:Me.HttpStatusCode.UNAUTHORIZED};z.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:Me.HttpStatusCode.FORBIDDEN};z.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:Me.HttpStatusCode.FORBIDDEN};z.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};var qvr=a(({sourceControlProvider:e})=>{const t=(0,FGe.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${t}`,status:Me.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");z.SOURCE_CONTROL_AUTHENTICATION_FAILED=qvr;var Uvr=a(({sourceControlProvider:e})=>{const t=(0,FGe.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${t} repository`,status:Me.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");z.SOURCE_CONTROL_REPO_NOT_FOUND=Uvr;z.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:Me.HttpStatusCode.BAD_REQUEST};var $vr=a(({repoURL:e,operation:t})=>{return{type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:Me.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");z.SOURCE_CONTROL_REPO_OPERATION_ERROR=$vr;z.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:Me.HttpStatusCode.NOT_FOUND};z.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:Me.HttpStatusCode.NOT_FOUND};z.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:Me.HttpStatusCode.UNAUTHORIZED};z.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:Me.HttpStatusCode.FORBIDDEN};z.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:Me.HttpStatusCode.BAD_REQUEST};z.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:Me.HttpStatusCode.BAD_REQUEST};z.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:Me.HttpStatusCode.BAD_REQUEST};z.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Me.HttpStatusCode.BAD_REQUEST};z.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:Me.HttpStatusCode.FORBIDDEN};z.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:Me.HttpStatusCode.NOT_FOUND};z.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:Me.HttpStatusCode.NOT_FOUND};z.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR};z.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:Me.HttpStatusCode.FAILED_DEPENDENCY};z.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:Me.HttpStatusCode.FAILED_DEPENDENCY};z.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:Me.HttpStatusCode.FAILED_DEPENDENCY};z.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:Me.HttpStatusCode.BAD_REQUEST};z.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:Me.HttpStatusCode.BAD_REQUEST};z.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:Me.HttpStatusCode.BAD_REQUEST};z.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:Me.HttpStatusCode.NOT_FOUND};z.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:Me.HttpStatusCode.BAD_REQUEST};z.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:Me.HttpStatusCode.BAD_REQUEST};z.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:Me.HttpStatusCode.BAD_REQUEST};z.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:Me.HttpStatusCode.BAD_REQUEST};z.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:Me.HttpStatusCode.BAD_REQUEST};z.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:Me.HttpStatusCode.BAD_REQUEST};z.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:Me.HttpStatusCode.BAD_REQUEST};z.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:Me.HttpStatusCode.BAD_REQUEST};z.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:Me.HttpStatusCode.BAD_REQUEST};z.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:Me.HttpStatusCode.FORBIDDEN};z.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:Me.HttpStatusCode.NOT_FOUND};var jvr=a(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:Me.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");z.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=jvr;var Gvr=a(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:Me.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");z.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=Gvr;z.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:Me.HttpStatusCode.BAD_REQUEST};z.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:Me.HttpStatusCode.BAD_REQUEST};z.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:Me.HttpStatusCode.NOT_FOUND};z.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:Me.HttpStatusCode.BAD_REQUEST};z.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:Me.HttpStatusCode.BAD_REQUEST};z.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:Me.HttpStatusCode.BAD_REQUEST};var Hvr=a(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:Me.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");z.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=Hvr;var Vvr=a(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:Me.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");z.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=Vvr;var zvr=a(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");z.DIRECTORY_ALREADY_EXISTS=zvr;var Kvr=a(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:Me.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");z.DIRECTORY_DOES_NOT_EXIST=Kvr;var Wvr=a(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:Me.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");z.DIRECTORY_OR_FILE_DOES_NOT_EXIST=Wvr;var Yvr=a(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");z.DIRECTORY_CREATION_FAILED=Yvr;var Xvr=a(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");z.FILE_RENAME_PATHS_MATCH=Xvr;var Jvr=a(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");z.FILE_RENAME_CANNOT_CHANGE_EXTENSION=Jvr;var Qvr=a(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");z.FILE_RENAME_FILE_ALREADY_EXISTS=Qvr;var Zvr=a(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");z.FILE_RENAME_FAILED=Zvr;var eEr=a(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");z.FILE_WRITE_FAILED=eEr;var tEr=a(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");z.CANNOT_DELETE_ESSENTIAL_FILE=tEr;var rEr=a(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");z.CANNOT_DELETE_ESSENTIAL_DIRECTORY=rEr;var nEr=a(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:Me.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");z.CANNOT_DELETE_SOLE_OPEN_API_FILE=nEr;var iEr=a(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");z.FILE_DELETE_FAILED=iEr;var sEr=a(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:Me.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");z.DIRECTORY_DELETE_FAILED=sEr;z.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:Me.HttpStatusCode.CONFLICT};z.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:Me.HttpStatusCode.BAD_REQUEST}});var qGe=y(Gc=>{"use strict";var aEr=Gc&&Gc.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var oEr=Gc&&Gc.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var uEr=Gc&&Gc.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))aEr(t,e,r)}oEr(t,e);return t};Object.defineProperty(Gc,"__esModule",{value:true});Gc.ApiNotFoundError=Gc.ApiError=Gc.Problems=void 0;var MGe=uEr(BGe());Gc.Problems=MGe;var H$=class extends Error{static{a(this,"ApiError")}type;status;detail;instance;constructor(t){super(t.title);if(!t.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`)}this.name="ApiProblemError";this.type=t.type;this.status=t.status;this.detail=t.detail;this.instance=t.instance}};Gc.ApiError=H$;var qce=class extends H${static{a(this,"ApiNotFoundError")}constructor(t={}){super({...t,...MGe.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Gc.ApiNotFoundError=qce});var ac=y(T1=>{"use strict";var lEr=T1&&T1.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var cEr=T1&&T1.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))lEr(t,e,r)};Object.defineProperty(T1,"__esModule",{value:true});T1.HttpStatusCode=void 0;cEr(qGe(),T1);var dEr=Mce();Object.defineProperty(T1,"HttpStatusCode",{enumerable:true,get:function(){return dEr.HttpStatusCode}})});var $ce=y(V$=>{"use strict";Object.defineProperty(V$,"__esModule",{value:true});V$.CommonAuth=void 0;var I_=ac();var pEr=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var Uce=class e{static{a(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(t){return pEr.includes(t)}isDeployerServiceAccount(t){return e.DEPLOYER_USER_SUB===t}static isAuthorizedSub(t,r){if(typeof r==="string"){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}try{const n=t.includes(r.sub);if(!n){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}}catch(n){throw new I_.ApiError(I_.Problems.API_USER_NO_ACCESS)}}};V$.CommonAuth=Uce});var jce=y(z$=>{"use strict";Object.defineProperty(z$,"__esModule",{value:true});z$.FeatureFlags=void 0;z$.FeatureFlags=Object.freeze({remoteModules:(e,t)=>({flagName:"REMOTE_MODULES",defaultValue:false,accountName:e,projectName:t}),disableIntegratedDevPortalBuild:(e,t)=>({flagName:"DISABLE_INTEGRATED_DEV_PORTAL_BUILD",defaultValue:false,accountName:e,projectName:t}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var $Ge=y(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:true});k_.hasBlockedNotifications=k_.getBuildFlagsForDeployment=k_.getDefaultFlags=void 0;var UGe=jce();var fEr=["chocolate_bold_silverfish"];function mEr(e){const t={remoteModules:!!e?.remoteModules,disableIntegratedDevPortalBuild:!!e?.disableIntegratedDevPortalBuild};return t}a(mEr,"getDefaultFlags");k_.getDefaultFlags=mEr;async function hEr(e,{accountName:t,projectName:r}){const n=await e.getFlagValue(UGe.FeatureFlags.remoteModules(t,r));const i=await e.getFlagValue(UGe.FeatureFlags.disableIntegratedDevPortalBuild(t,r));return{remoteModules:n,disableIntegratedDevPortalBuild:i}}a(hEr,"getBuildFlagsForDeployment");k_.getBuildFlagsForDeployment=hEr;function gEr(e){return fEr.includes(e)}a(gEr,"hasBlockedNotifications");k_.hasBlockedNotifications=gEr});var jGe=y(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:true});Hc.BuildIssueError=Hc.WARNING_SEVERITY=Hc.ERROR_SEVERITY=Hc.FAILURE_STATUS=Hc.WARNING_STATUS=Hc.GOOD_STATUS=void 0;Hc.GOOD_STATUS="Good";Hc.WARNING_STATUS="Warnings";Hc.FAILURE_STATUS="Failed";Hc.ERROR_SEVERITY="error";Hc.WARNING_SEVERITY="warning";var Gce=class extends Error{static{a(this,"BuildIssueError")}issue;constructor(t){super(t.message);this.issue=t}};Hc.BuildIssueError=Gce});var GGe=y(K$=>{"use strict";Object.defineProperty(K$,"__esModule",{value:true});K$.COMPATIBILITY_FLAG_MAPPINGS=void 0;K$.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true}})});var HGe=y((sls,yEr)=>{yEr.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2023-03-14",enum:["2023-03-14","2024-01-15"]}}}});var VGe=y(W$=>{"use strict";Object.defineProperty(W$,"__esModule",{value:true});W$.VALID_COMPATIBILITY_DATES=void 0;W$.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var zGe=y(D_=>{"use strict";var _Er=D_&&D_.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(D_,"__esModule",{value:true});D_.DEFAULT_COMPATIBILITY_DATE=D_.VALID_COMPATIBILITY_DATES=void 0;var vEr=_Er(HGe());var EEr=VGe();Object.defineProperty(D_,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return EEr.VALID_COMPATIBILITY_DATES}});D_.DEFAULT_COMPATIBILITY_DATE=vEr.default.properties.compatibilityDate.default});var KGe=y(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:true});L_.decrypt=L_.encrypt=L_.signString=void 0;var _T=require("crypto");function bEr(e,t){return(0,_T.createHmac)("sha256",t).update(e).digest("hex")}a(bEr,"signString");L_.signString=bEr;var Hce={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var SEr=a(()=>(0,_T.randomBytes)(Hce.IV_BYTE_LEN),"getIV");function AEr(e,t){if(e===null){return null}const r=(0,_T.createHash)("sha256").update(String(t)).digest("base64").substring(0,32);const n=SEr();const i=(0,_T.createCipheriv)("aes-256-gcm",r,n,{authTagLength:Hce.AUTH_TAG_BYTE_LEN});let s=i.update(e);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}a(AEr,"encrypt");L_.encrypt=AEr;function CEr(e,t){if(!e){return null}const r=Buffer.from(t);const n=(0,_T.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(e,"hex");const s=i.slice(-16);const o=i.slice(0,12);const u=i.slice(12,-16);const l=(0,_T.createDecipheriv)("aes-256-gcm",n,o,{authTagLength:Hce.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}a(CEr,"decrypt");L_.decrypt=CEr});var WGe=y(Y$=>{"use strict";Object.defineProperty(Y$,"__esModule",{value:true});Y$.getCurrentUtcDateTime=void 0;function wEr(){const e={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const t=new Date().toLocaleString("en-US",e);return t}a(wEr,"getCurrentUtcDateTime");Y$.getCurrentUtcDateTime=wEr});var Vce=y(X$=>{"use strict";Object.defineProperty(X$,"__esModule",{value:true});X$.DeploymentLogState=void 0;var YGe;(function(e){e["ERROR"]="ERROR";e["IN_PROGRESS"]="IN_PROGRESS";e["SUCCESS"]="SUCCESS"})(YGe||(X$.DeploymentLogState=YGe={}))});var zce=y(XGe=>{"use strict";Object.defineProperty(XGe,"__esModule",{value:true})});var QGe=y(JGe=>{"use strict";Object.defineProperty(JGe,"__esModule",{value:true})});var ZGe=y(J$=>{"use strict";Object.defineProperty(J$,"__esModule",{value:true});J$.MARKDOWN_FRONTMATTER_KEYS=void 0;J$.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var tHe=y(eHe=>{"use strict";Object.defineProperty(eHe,"__esModule",{value:true})});var rHe=y(Qh=>{"use strict";var TEr=Qh&&Qh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var Q$=Qh&&Qh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))TEr(t,e,r)};Object.defineProperty(Qh,"__esModule",{value:true});Q$(zce(),Qh);Q$(QGe(),Qh);Q$(ZGe(),Qh);Q$(tHe(),Qh)});var Z$=y(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:true});Zh.getLoggerContext=Zh.requestIdGenerator=Zh.REQUEST_ID_HEADER=Zh.LEGACY_REQUEST_ID_HEADER=void 0;var xEr=require("crypto");Zh.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Zh.REQUEST_ID_HEADER="zp-rid";var REr=a(e=>{const t=e.headers["zuplo-request-id"];const r=e.headers["X-GitHub-Delivery"];if(t){const n=t;return`${n}`}else if(r){return`${r}`}return(0,xEr.randomUUID)()},"requestIdGenerator");Zh.requestIdGenerator=REr;function OEr(e){const t=e.raw.url??"";const r={};try{const n=e.headers["zuplo-user"]??e.user?.sub;if(n){r.userSub=`${n}`}const i=t.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=t.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const o=t.match(/(projects)\/([a-zA-Z-0-9]*)/);if(o&&o!==null&&o.length>=2){r.project=o[2]}}catch(n){}return r}a(OEr,"getLoggerContext");Zh.getLoggerContext=OEr});var Kce=y(vT=>{"use strict";var PEr=vT&&vT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(vT,"__esModule",{value:true});vT.errorHandler=void 0;var Up=ac();var NEr=PEr(ep());var nHe=Z$();function IEr(e,t,r){let n=500;let i;if(e instanceof Up.ApiError){n=e.status;i={type:e.type,title:e.message,status:e.status,detail:e.detail,instance:e.instance}}else if(typeof e==="object"&&"validation"in e&&"validationContext"in e){n=Up.HttpStatusCode.BAD_REQUEST;i={...Up.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${e.validationContext}.`,errors:e.validation}}else if(typeof e==="object"&&"code"in e&&e.code==="FST_ERR_NOT_FOUND"){n=404;i=Up.Problems.NOT_FOUND}else if(typeof e==="object"&&"code"in e&&typeof e.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(e.code)){n=Up.HttpStatusCode.BAD_REQUEST;i={...Up.Problems.BAD_REQUEST,detail:e.message}}else{let o;if(!r.statusCode||r.statusCode===200){if(typeof e==="object"&&"statusCode"in e&&typeof e.statusCode==="number"){o=e.statusCode}else if(typeof e==="object"&&"status"in e&&typeof e.status==="number"){o=e.status}n=o&&o>=400?o:500}else{n=r.statusCode}i=kEr(n);if(NEr.default.NODE_ENV!=="production"){if(typeof e==="object"&&"message"in e){i.detail=e.message}else if(typeof e==="string"){i.detail=e}}}i.trace={timestamp:new Date().toJSON(),requestId:t.headers[nHe.REQUEST_ID_HEADER]??t.headers[nHe.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:e},e&&e.message)}else{r.log.error({req:t,res:r,err:e},e&&e.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}a(IEr,"errorHandler");vT.errorHandler=IEr;function kEr(e){if(e===401){return Up.Problems.UNAUTHORIZED}else if(e===403){return Up.Problems.FORBIDDEN}else if(e===404){return Up.Problems.NOT_FOUND}else if(e===405){return Up.Problems.METHOD_NOT_ALLOWED}else if(e<500&&e>=400){return Up.Problems.BAD_REQUEST}return Up.Problems.INTERNAL_SERVER_ERROR}a(kEr,"getProblemFromStatus")});var sHe=y((Sls,Wce)=>{"use strict";var DEr=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var LEr=/(\w*(\.\w*)*)\..*/;Wce.exports=a(function e(t){if(t.name.length>0)return t.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return iHe(n.stack)}},"getPluginName");function iHe(e){const t=e.match(DEr);return t?t[1].split(/[/\\]/).slice(-1)[0].match(LEr)[1]:"anonymous"}a(iHe,"extractPluginName");Wce.exports.extractPluginName=iHe});var oHe=y((Cls,aHe)=>{"use strict";aHe.exports=a(function e(t){if(t[0]==="@"){t=t.slice(1).replace("/","-")}const r=t.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var F_=y((Tls,ej)=>{"use strict";var FEr=sHe();var BEr=oHe();var MEr=0;function Yce(e,t={}){let r=false;if(typeof e.default!=="undefined"){e=e.default}if(typeof e!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof e}'`)}if(typeof t==="string"){t={fastify:t}}if(typeof t!=="object"||Array.isArray(t)||t===null){throw new TypeError("The options object should be an object")}if(t.fastify!==void 0&&typeof t.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof t.fastify}'`)}if(!t.name){r=true;t.name=FEr(e)+"-auto-"+MEr++}e[Symbol.for("skip-override")]=t.encapsulate!==true;e[Symbol.for("fastify.display-name")]=t.name;e[Symbol.for("plugin-meta")]=t;if(!e.default){e.default=e}const n=BEr(t.name);if(!r&&!e[n]){e[n]=e}return e}a(Yce,"plugin");ej.exports=Yce;ej.exports.default=Yce;ej.exports.fastifyPlugin=Yce});var lHe=y(ET=>{"use strict";var qEr=ET&&ET.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(ET,"__esModule",{value:true});ET.apiKeyAuthPlugin=void 0;var e0=ac();var UEr=qEr(F_());var $Er="https://apikey.zuplo.com";var uHe=`Bearer `;ET.apiKeyAuthPlugin=(0,UEr.default)(async(e,t)=>{e.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new e0.ApiError({...e0.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(uHe)){throw new e0.ApiError({...e0.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(uHe.length);if(!i||i===""){throw new e0.ApiError({...e0.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const o=await fetch(`${$Er}/v1/$validate/${t.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(o.status===401){throw new e0.ApiError(e0.Problems.UNAUTHORIZED)}const u=await o.json();if(t.allowedSubs){if(!t.allowedSubs.includes(u.name)){throw new e0.ApiError(e0.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var cHe=y(bT=>{"use strict";var jEr=bT&&bT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(bT,"__esModule",{value:true});bT.ensureServiceAccountPlugin=void 0;var tj=ac();var GEr=jEr(F_());bT.ensureServiceAccountPlugin=(0,GEr.default)(async e=>{e.decorate("ensureServiceAccount",t=>async function(r){if(!r.user){r.log.error(`Bad request, zuplo:user header not present`);throw new tj.ApiError(tj.Problems.UNAUTHORIZED)}const n=r.user.sub;if(t!==n){r.log.error("The claim 'zuplo:user' is not from an authorized service account.");throw new tj.ApiError(tj.Problems.FORBIDDEN)}})},{name:"ensure-service-account-plugin"})});var dHe=y(ST=>{"use strict";var HEr=ST&&ST.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(ST,"__esModule",{value:true});ST.ensureZuploAdminPlugin=void 0;var rj=ac();var VEr=HEr(F_());var zEr=$ce();ST.ensureZuploAdminPlugin=(0,VEr.default)(async function(e){const t=new zEr.CommonAuth;e.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new rj.ApiError(rj.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&t.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new rj.ApiError(rj.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var fHe=y(AT=>{"use strict";var KEr=AT&&AT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(AT,"__esModule",{value:true});AT.ensureZuploUserPlugin=void 0;var pHe=ac();var WEr=KEr(F_());AT.ensureZuploUserPlugin=(0,WEr.default)(async e=>{e.decorate("ensureZuploUser",async function(t){const r=t.headers["zuplo-user"];if(!r||typeof r!=="string"){t.log.error("The 'zuplo-user' header is missing");throw new pHe.ApiError(pHe.Problems.UNAUTHORIZED)}t.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var gHe=y(CT=>{"use strict";var YEr=CT&&CT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(CT,"__esModule",{value:true});CT.featureFlagsPlugin=void 0;var XEr=YEr(F_());var Xce;async function mHe(e,t){try{const r=await Xce?.variation(t.flagName,{kind:t.kind,key:t.key},t.defaultValue);if(r===void 0){return t.defaultValue}else{return r}}catch(r){e.log.warn(`Failed to query Launch Darkly flag ${t.flagName}`);e.log.error(r)}return t.defaultValue}a(mHe,"getFlagValue");function hHe(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return false}a(hHe,"fallback");CT.featureFlagsPlugin=(0,XEr.default)(async(e,t)=>{try{if(typeof t.key!=="string"||!t.key||!t.client){e.decorateRequest("getFlagValue",hHe);e.decorateRequest("getFlagValueByUser",hHe);return}Xce=t.client;e.log.info("Launch Darkly SDK successfully initialized!");e.decorate("flags",Xce);e.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return mHe(this,s)});e.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return mHe(this,s)})}catch(r){e.log.warn("Launch Darkly failed to initialize");e.log.error(r)}},{name:"feature-flag-plugin"})});var Jce=y(wT=>{"use strict";var JEr=wT&&wT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(wT,"__esModule",{value:true});wT.getUserSubPlugin=void 0;var yHe=ac();var QEr=JEr(F_());wT.getUserSubPlugin=(0,QEr.default)(async e=>{e.decorateRequest("getUserSub",function(){const t=this.user?.sub;if(!t){this.log.error("Could not determine the user sub");throw new yHe.ApiError(yHe.Problems.UNAUTHORIZED)}return t})},{name:"get-user-sub-plugin"})});var Qce=y(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:true});Vc.getUserSubPlugin=Vc.featureFlagsPlugin=Vc.ensureZuploUserPlugin=Vc.ensureZuploAdminPlugin=Vc.ensureServiceAccountPlugin=Vc.apiKeyAuthPlugin=void 0;var ZEr=lHe();Object.defineProperty(Vc,"apiKeyAuthPlugin",{enumerable:true,get:function(){return ZEr.apiKeyAuthPlugin}});var ebr=cHe();Object.defineProperty(Vc,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return ebr.ensureServiceAccountPlugin}});var tbr=dHe();Object.defineProperty(Vc,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return tbr.ensureZuploAdminPlugin}});var rbr=fHe();Object.defineProperty(Vc,"ensureZuploUserPlugin",{enumerable:true,get:function(){return rbr.ensureZuploUserPlugin}});var nbr=gHe();Object.defineProperty(Vc,"featureFlagsPlugin",{enumerable:true,get:function(){return nbr.featureFlagsPlugin}});var ibr=Jce();Object.defineProperty(Vc,"getUserSubPlugin",{enumerable:true,get:function(){return ibr.getUserSubPlugin}})});var ls=y(Mu=>{"use strict";var Zce=Symbol.for("yaml.alias");var _He=Symbol.for("yaml.document");var nj=Symbol.for("yaml.map");var vHe=Symbol.for("yaml.pair");var ede=Symbol.for("yaml.scalar");var ij=Symbol.for("yaml.seq");var x1=Symbol.for("yaml.node.type");var sbr=a(e=>!!e&&typeof e==="object"&&e[x1]===Zce,"isAlias");var abr=a(e=>!!e&&typeof e==="object"&&e[x1]===_He,"isDocument");var obr=a(e=>!!e&&typeof e==="object"&&e[x1]===nj,"isMap");var ubr=a(e=>!!e&&typeof e==="object"&&e[x1]===vHe,"isPair");var EHe=a(e=>!!e&&typeof e==="object"&&e[x1]===ede,"isScalar");var lbr=a(e=>!!e&&typeof e==="object"&&e[x1]===ij,"isSeq");function bHe(e){if(e&&typeof e==="object")switch(e[x1]){case nj:case ij:return true}return false}a(bHe,"isCollection");function cbr(e){if(e&&typeof e==="object")switch(e[x1]){case Zce:case nj:case ede:case ij:return true}return false}a(cbr,"isNode");var dbr=a(e=>(EHe(e)||bHe(e))&&!!e.anchor,"hasAnchor");Mu.ALIAS=Zce;Mu.DOC=_He;Mu.MAP=nj;Mu.NODE_TYPE=x1;Mu.PAIR=vHe;Mu.SCALAR=ede;Mu.SEQ=ij;Mu.hasAnchor=dbr;Mu.isAlias=sbr;Mu.isCollection=bHe;Mu.isDocument=abr;Mu.isMap=obr;Mu.isNode=cbr;Mu.isPair=ubr;Mu.isScalar=EHe;Mu.isSeq=lbr});var e6=y(tde=>{"use strict";var Qo=ls();var zc=Symbol("break visit");var SHe=Symbol("skip children");var t0=Symbol("remove node");function sj(e,t){const r=AHe(t);if(Qo.isDocument(e)){const n=TT(null,e.contents,r,Object.freeze([e]));if(n===t0)e.contents=null}else TT(null,e,r,Object.freeze([]))}a(sj,"visit");sj.BREAK=zc;sj.SKIP=SHe;sj.REMOVE=t0;function TT(e,t,r,n){const i=CHe(e,t,r,n);if(Qo.isNode(i)||Qo.isPair(i)){wHe(e,n,i);return TT(e,i,r,n)}if(typeof i!=="symbol"){if(Qo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=TT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===zc)return zc;else if(o===t0){t.items.splice(s,1);s-=1}}}else if(Qo.isPair(t)){n=Object.freeze(n.concat(t));const s=TT("key",t.key,r,n);if(s===zc)return zc;else if(s===t0)t.key=null;const o=TT("value",t.value,r,n);if(o===zc)return zc;else if(o===t0)t.value=null}}return i}a(TT,"visit_");async function aj(e,t){const r=AHe(t);if(Qo.isDocument(e)){const n=await xT(null,e.contents,r,Object.freeze([e]));if(n===t0)e.contents=null}else await xT(null,e,r,Object.freeze([]))}a(aj,"visitAsync");aj.BREAK=zc;aj.SKIP=SHe;aj.REMOVE=t0;async function xT(e,t,r,n){const i=await CHe(e,t,r,n);if(Qo.isNode(i)||Qo.isPair(i)){wHe(e,n,i);return xT(e,i,r,n)}if(typeof i!=="symbol"){if(Qo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=await xT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===zc)return zc;else if(o===t0){t.items.splice(s,1);s-=1}}}else if(Qo.isPair(t)){n=Object.freeze(n.concat(t));const s=await xT("key",t.key,r,n);if(s===zc)return zc;else if(s===t0)t.key=null;const o=await xT("value",t.value,r,n);if(o===zc)return zc;else if(o===t0)t.value=null}}return i}a(xT,"visitAsync_");function AHe(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value)){return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e)}return e}a(AHe,"initVisitor");function CHe(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(Qo.isMap(t))return r.Map?.(e,t,n);if(Qo.isSeq(t))return r.Seq?.(e,t,n);if(Qo.isPair(t))return r.Pair?.(e,t,n);if(Qo.isScalar(t))return r.Scalar?.(e,t,n);if(Qo.isAlias(t))return r.Alias?.(e,t,n);return void 0}a(CHe,"callVisitor");function wHe(e,t,r){const n=t[t.length-1];if(Qo.isCollection(n)){n.items[e]=r}else if(Qo.isPair(n)){if(e==="key")n.key=r;else n.value=r}else if(Qo.isDocument(n)){n.contents=r}else{const i=Qo.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}a(wHe,"replaceNode");tde.visit=sj;tde.visitAsync=aj});var rde=y(xHe=>{"use strict";var THe=ls();var pbr=e6();var fbr={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var mbr=a(e=>e.replace(/[!,[\]{}]/g,t=>fbr[t]),"escapeTagName");var t6=class e{static{a(this,"Directives")}constructor(t,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},e.defaultYaml,t);this.tags=Object.assign({},e.defaultTags,r)}clone(){const t=new e(this.yaml,this.tags);t.docStart=this.docStart;return t}atDocument(){const t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){if(this.atNextDocument){this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},e.defaultTags);this.atNextDocument=false}const n=t.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,o]=n;this.tags[s]=o;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const o=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,o);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!"){r(`Not a valid tag: ${t}`);return null}if(t[1]==="<"){const o=t.slice(2,-1);if(o==="!"||o==="!!"){r(`Verbatim tags aren't resolved, so ${t} is invalid.`);return null}if(t[t.length-1]!==">")r("Verbatim tags must end with a >");return o}const[,n,i]=t.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${t} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(o){r(String(o));return null}}if(n==="!")return t;r(`Could not resolve tag: ${t}`);return null}tagString(t){for(const[r,n]of Object.entries(this.tags)){if(t.startsWith(n))return r+mbr(t.substring(n.length))}return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(t&&n.length>0&&THe.isNode(t.contents)){const s={};pbr.visit(t.contents,(o,u)=>{if(THe.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,o]of n){if(s==="!!"&&o==="tag:yaml.org,2002:")continue;if(!t||i.some(u=>u.startsWith(o)))r.push(`%TAG ${s} ${o}`)}return r.join("\n")}};t6.defaultYaml={explicit:false,version:"1.2"};t6.defaultTags={"!!":"tag:yaml.org,2002:"};xHe.Directives=t6});var oj=y(r6=>{"use strict";var RHe=ls();var hbr=e6();function gbr(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const r=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(r)}return true}a(gbr,"anchorIsValid");function OHe(e){const t=new Set;hbr.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}});return t}a(OHe,"anchorNames");function PHe(e,t){for(let r=1;true;++r){const n=`${e}${r}`;if(!t.has(n))return n}}a(PHe,"findNewAnchor");function ybr(e,t){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=OHe(e);const o=PHe(t,i);i.add(o);return o},setAnchors:()=>{for(const s of r){const o=n.get(s);if(typeof o==="object"&&o.anchor&&(RHe.isScalar(o.node)||RHe.isCollection(o.node))){o.node.anchor=o.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}a(ybr,"createNodeAnchors");r6.anchorIsValid=gbr;r6.anchorNames=OHe;r6.createNodeAnchors=ybr;r6.findNewAnchor=PHe});var nde=y(NHe=>{"use strict";function n6(e,t,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const o=n[i];const u=n6(e,n,String(i),o);if(u===void 0)delete n[i];else if(u!==o)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const o=n6(e,n,i,s);if(o===void 0)n.delete(i);else if(o!==s)n.set(i,o)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=n6(e,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const o=n6(e,n,i,s);if(o===void 0)delete n[i];else if(o!==s)n[i]=o}}}return e.call(t,r,n)}a(n6,"applyReviver");NHe.applyReviver=n6});var B_=y(kHe=>{"use strict";var _br=ls();function IHe(e,t,r){if(Array.isArray(e))return e.map((n,i)=>IHe(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!_br.hasAnchor(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}a(IHe,"toJS");kHe.toJS=IHe});var uj=y(LHe=>{"use strict";var vbr=nde();var DHe=ls();var Ebr=B_();var ide=class{static{a(this,"NodeBase")}constructor(t){Object.defineProperty(this,DHe.NODE_TYPE,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)t.range=this.range.slice();return t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!DHe.isDocument(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=Ebr.toJS(this,"",o);if(typeof i==="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s==="function"?vbr.applyReviver(s,{"":u},"",u):u}};LHe.NodeBase=ide});var i6=y(BHe=>{"use strict";var bbr=oj();var FHe=e6();var lj=ls();var Sbr=uj();var Abr=B_();var sde=class extends Sbr.NodeBase{static{a(this,"Alias")}constructor(t){super(lj.ALIAS);this.source=t;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let r=void 0;FHe.visit(t,{Node:(n,i)=>{if(i===this)return FHe.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(t,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(o);if(!u){Abr.toJS(o,null,r);u=n.get(o)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=cj(i,o,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(t,r,n){const i=`*${this.source}`;if(t){bbr.anchorIsValid(this.source);if(t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}};function cj(e,t,r){if(lj.isAlias(t)){const n=t.resolve(e);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(lj.isCollection(t)){let n=0;for(const i of t.items){const s=cj(e,i,r);if(s>n)n=s}return n}else if(lj.isPair(t)){const n=cj(e,t.key,r);const i=cj(e,t.value,r);return Math.max(n,i)}return 1}a(cj,"getAliasCount");BHe.Alias=sde});var xo=y(ade=>{"use strict";var Cbr=ls();var wbr=uj();var Tbr=B_();var xbr=a(e=>!e||typeof e!=="function"&&typeof e!=="object","isScalarValue");var M_=class extends wbr.NodeBase{static{a(this,"Scalar")}constructor(t){super(Cbr.SCALAR);this.value=t}toJSON(t,r){return r?.keep?this.value:Tbr.toJS(this.value,t,r)}toString(){return String(this.value)}};M_.BLOCK_FOLDED="BLOCK_FOLDED";M_.BLOCK_LITERAL="BLOCK_LITERAL";M_.PLAIN="PLAIN";M_.QUOTE_DOUBLE="QUOTE_DOUBLE";M_.QUOTE_SINGLE="QUOTE_SINGLE";ade.Scalar=M_;ade.isScalarValue=xbr});var s6=y(qHe=>{"use strict";var Rbr=i6();var Q2=ls();var MHe=xo();var Obr="tag:yaml.org,2002:";function Pbr(e,t,r){if(t){const n=r.filter(s=>s.tag===t);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return r.find(n=>n.identify?.(e)&&!n.format)}a(Pbr,"findTagObject");function Nbr(e,t,r){if(Q2.isDocument(e))e=e.contents;if(Q2.isNode(e))return e;if(Q2.isPair(e)){const p=r.schema[Q2.MAP].createNode?.(r.schema,null,r);p.items.push(e);return p}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:o,sourceObjects:u}=r;let l=void 0;if(n&&e&&typeof e==="object"){l=u.get(e);if(l){if(!l.anchor)l.anchor=i(e);return new Rbr.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(e,l)}}if(t?.startsWith("!!"))t=Obr+t.slice(2);let c=Pbr(e,t,o.tags);if(!c){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const p=new MHe.Scalar(e);if(l)l.node=p;return p}c=e instanceof Map?o[Q2.MAP]:Symbol.iterator in Object(e)?o[Q2.SEQ]:o[Q2.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new MHe.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}a(Nbr,"createNode");qHe.createNode=Nbr});var a6=y(pj=>{"use strict";var Ibr=s6();var r0=ls();var kbr=uj();function ode(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){const s=t[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=n;n=o}else{n=new Map([[s,n]])}}return Ibr.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}a(ode,"collectionFromPath");var UHe=a(e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done,"isEmptyPath");var dj=class extends kbr.NodeBase{static{a(this,"Collection")}constructor(t,r){super(t);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(t)r.schema=t;r.items=r.items.map(n=>r0.isNode(n)||r0.isPair(n)?n.clone(t):n);if(this.range)r.range=this.range.slice();return r}addIn(t,r){if(UHe(t))this.add(r);else{const[n,...i]=t;const s=this.get(n,true);if(r0.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,ode(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(t){const[r,...n]=t;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(r0.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){const[n,...i]=t;const s=this.get(n,true);if(i.length===0)return!r&&r0.isScalar(s)?s.value:s;else return r0.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!r0.isPair(r))return false;const n=r.value;return n==null||t&&r0.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){const[r,...n]=t;if(n.length===0)return this.has(r);const i=this.get(r,true);return r0.isCollection(i)?i.hasIn(n):false}setIn(t,r){const[n,...i]=t;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(r0.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,ode(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};dj.maxFlowStringSingleLineLength=60;pj.Collection=dj;pj.collectionFromPath=ode;pj.isEmptyPath=UHe});var o6=y(fj=>{"use strict";var Dbr=a(e=>e.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function ude(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}a(ude,"indentComment");var Lbr=a((e,t,r)=>e.endsWith("\n")?ude(r,t):r.includes("\n")?"\n"+ude(r,t):(e.endsWith(" ")?"":" ")+r,"lineComment");fj.indentComment=ude;fj.lineComment=Lbr;fj.stringifyComment=Dbr});var jHe=y(u6=>{"use strict";var Fbr="flow";var lde="block";var mj="quoted";function Bbr(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:u}={}){if(!i||i<0)return e;const l=Math.max(1+s,1+i-t.length);if(e.length<=l)return e;const c=[];const d={};let p=i-t.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let m=void 0;let h=false;let g=-1;let _=-1;let v=-1;if(r===lde){g=$He(e,g);if(g!==-1)p=g+l}for(let E;E=e[g+=1];){if(r===mj&&E==="\\"){_=g;switch(e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===lde)g=$He(e,g);p=g+l;f=void 0}else{if(E===" "&&m&&m!==" "&&m!=="\n"&&m!==" "){const b=e[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===mj){while(m===" "||m===" "){m=E;E=e[g+=1];h=true}const b=g>v+1?g-2:_-1;if(d[b])return e;c.push(b);d[b]=true;p=b+l;f=void 0}else{h=true}}}m=E}if(h&&u)u();if(c.length===0)return e;if(o)o();let S=e.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const A=c[E+1]||e.length;if(b===0)S=`
|
|
26
26
|
${t}${e.slice(0,A)}`;else{if(r===mj&&d[b])S+=`${e[b]}\\`;S+=`
|
|
27
27
|
${t}${e.slice(b+1,A)}`}}return S}a(Bbr,"foldFlowLines");function $He(e,t){let r=e[t+1];while(r===" "||r===" "){do{r=e[t+=1]}while(r&&r!=="\n");r=e[t+1]}return t}a($He,"consumeMoreIndentedLines");u6.FOLD_BLOCK=lde;u6.FOLD_FLOW=Fbr;u6.FOLD_QUOTED=mj;u6.foldFlowLines=Bbr});var c6=y(GHe=>{"use strict";var n0=xo();var q_=jHe();var gj=a((e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),"getFoldOptions");var yj=a(e=>/^(%|---|\.\.\.)/m.test(e),"containsDocumentMarker");function Mbr(e,t,r){if(!t||t<0)return false;const n=t-r;const i=e.length;if(i<=n)return false;for(let s=0,o=0;s<i;++s){if(e[s]==="\n"){if(s-o>n)return true;o=s+1;if(i-o<=n)return false}}return true}a(Mbr,"lineLengthOverLimit");function l6(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t;const i=t.options.doubleQuotedMinMultiLineLength;const s=t.indent||(yj(e)?" ":"");let o="";let u=0;for(let l=0,c=r[l];c;c=r[++l]){if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n"){o+=r.slice(u,l)+"\\ ";l+=1;u=l;c="\\"}if(c==="\\")switch(r[l+1]){case"u":{o+=r.slice(u,l);const d=r.substr(l+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:if(d.substr(0,2)==="00")o+="\\x"+d.substr(2);else o+=r.substr(l,6)}l+=5;u=l+1}break;case"n":if(n||r[l+2]==='"'||r.length<i){l+=1}else{o+=r.slice(u,l)+"\n\n";while(r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"'){o+="\n";l+=2}o+=s;if(r[l+2]===" ")o+="\\";l+=1;u=l+1}break;default:l+=1}}o=u?o+r.slice(u):r;return n?o:q_.foldFlowLines(o,s,q_.FOLD_QUOTED,gj(t,false))}a(l6,"doubleQuotedString");function cde(e,t){if(t.options.singleQuote===false||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return l6(e,t);const r=t.indent||(yj(e)?" ":"");const n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
28
28
|
${r}`)+"'";return t.implicitKey?n:q_.foldFlowLines(n,r,q_.FOLD_FLOW,gj(t,false))}a(cde,"singleQuotedString");function RT(e,t){const{singleQuote:r}=t.options;let n;if(r===false)n=l6;else{const i=e.includes('"');const s=e.includes("'");if(i&&!s)n=cde;else if(s&&!i)n=l6;else n=r?cde:l6}return n(e,t)}a(RT,"quotedString");var dde;try{dde=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{dde=/\n+(?!\n|$)/g}function hj({comment:e,type:t,value:r},n,i,s){const{blockQuote:o,commentString:u,lineWidth:l}=n.options;if(!o||/\n[\t ]+$/.test(r)||/^\s*$/.test(r)){return RT(r,n)}const c=n.indent||(n.forceBlockIndent||yj(r)?" ":"");const d=o==="literal"?true:o==="folded"||t===n0.Scalar.BLOCK_FOLDED?false:t===n0.Scalar.BLOCK_LITERAL?true:!Mbr(r,l,c.length);if(!r)return d?"|\n":">\n";let p;let f;for(f=r.length;f>0;--f){const C=r[f-1];if(C!=="\n"&&C!==" "&&C!==" ")break}let m=r.substring(f);const h=m.indexOf("\n");if(h===-1){p="-"}else if(r===m||h!==m.length-1){p="+";if(s)s()}else{p=""}if(m){r=r.slice(0,-m.length);if(m[m.length-1]==="\n")m=m.slice(0,-1);m=m.replace(dde,`$&${c}`)}let g=false;let _;let v=-1;for(_=0;_<r.length;++_){const C=r[_];if(C===" ")g=true;else if(C==="\n")v=_;else break}let S=r.substring(0,v<_?v+1:_);if(S){r=r.substring(S.length);S=S.replace(/\n+/g,`$&${c}`)}const E=c?"2":"1";let b=(d?"|":">")+(g?E:"")+p;if(e){b+=" "+u(e.replace(/ ?[\r\n]+/g," "));if(i)i()}if(d){r=r.replace(/\n+/g,`$&${c}`);return`${b}
|