@zuplo/graphql 5.1519.0 → 5.1520.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/index.minified.js +1 -1
- package/package.json +1 -1
package/index.minified.js
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
`))):c=t.stylize("[Circular]","special")),eh(a)){if(s&&i.match(/^\d+$/))return c;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+c}o(ru,"formatProperty");function HE(t,e){if(eh(e))return t.stylize("undefined","undefined");if(th(e)){let r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(ME(e))return t.stylize(""+e,"number");if(DE(e))return t.stylize(""+e,"boolean");if(rh(e))return t.stylize("null","null")}o(HE,"formatPrimitive");function qE(t,e,r){let n=0;return t.reduce(function(s,a){return n++,a.indexOf(`
|
|
33
33
|
`)>=0&&n++,s+a.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(e===""?"":e+`
|
|
34
34
|
`)+" "+t.join(`,
|
|
35
|
-
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}o(qE,"reduceToSingleString")});var oh=g(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.format=void 0;var $E=Zp(),jE=ih(),VE=o((t,...e)=>(0,$E.format)(jE.inspect,t,e),"format");to.format=VE});var Er=g(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.debug=jt.withoutEnv=jt.Debugger=void 0;var GE=Yp(),BE=oh(),ro=class{static{o(this,"Debugger")}manager;ns;color;last;enabled;constructor(e,r){this.manager=e,this.ns=r,this.color=(0,GE.generateColor)(r),this.last=0,this.enabled=e.enabled.some(n=>n.test(r))}log(...e){if(!this.enabled)return;let r,n=e[0];typeof n=="function"?r=n():r=String(n);let i=Date.now()-(this.last||Date.now());r=(0,BE.format)(r,...e);let s=`${this.color(this.ns)} ${r} ${this.color(`+${i}ms`)}`;console.log(s),this.last=Date.now()}};jt.Debugger=ro;var no=class{static{o(this,"DebugManager")}debuggers;enabled;constructor(e){this.debuggers=new Map,this.enabled=e??[]}};function sh(t){return!t||t.length===0?[]:(t=t.replace(/\s/g,"").replace(/\*/g,".+"),t.split(",").map(e=>new RegExp(`^${e}$`)))}o(sh,"extract");var zn;function KE(t){t||(t=[]),typeof t=="string"&&(t=sh(t)),zn=new no(t)}o(KE,"withoutEnv");jt.withoutEnv=KE;function JE(t){let e=globalThis.DEBUG;zn||(zn=new no(sh(e)));let r=new ro(zn,t);return zn.debuggers.set(t,r),Object.assign(r.log.bind(r),{self:r})}o(JE,"debug");jt.debug=JE});var oo=g(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.ProblemResponseFormatter=Fr.InternalProblemResponseFormatter=void 0;var zE=D(),io=class t{static{o(this,"InternalProblemResponseFormatter")}static problemResponseFormat=async e=>{let r=e.problem,n=JSON.stringify(r,null,2);return new Response(n,{status:e.problem.status,statusText:e.statusText,headers:{...e.additionalHeaders,"content-type":"application/problem+json"}})};static setProblemResponseFormat(e){e&&(t.problemResponseFormat=(r,n,i)=>{try{return e(r,n,i)}catch(s){throw new zE.RuntimeError("Error in custom 'problemResponseFormat'",{cause:s})}})}};Fr.InternalProblemResponseFormatter=io;var ou=class{static{o(this,"ProblemResponseFormatter")}static async format(e,r,n){return await io.problemResponseFormat(e,r,n)}};Fr.ProblemResponseFormatter=ou});var Rt=g(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.initializeRuntime=me.invokeOnResponseSendingFinalExtensions=me.invokeOnResponseSendingExtensions=me.invokeOnRequestExtensions=me.plugins=me.runtimeExtensions=me.InitializableRuntimePlugin=me.RuntimePlugin=void 0;var WE=oo(),ao=class{static{o(this,"RuntimePlugin")}};me.RuntimePlugin=ao;var co=class extends ao{static{o(this,"InitializableRuntimePlugin")}};me.InitializableRuntimePlugin=co;me.runtimeExtensions={};var su=[];me.plugins=su;var ah=[],ch=[],uh=[],so={addPlugin(t){su.push(t)},addRequestHook(t){ah.push(t)},addResponseSendingHook(t){ch.push(t)},addResponseSendingFinalHook(t){uh.push(t)}},QE=o(async(t,e)=>{let r=t;for(let n of ah)if(r=await n(r,e),r instanceof Response)return r;return r},"invokeOnRequestExtensions");me.invokeOnRequestExtensions=QE;var YE=o(async(t,e,r)=>{let n=t;for(let i of ch)n=await i(t,e,r);return n},"invokeOnResponseSendingExtensions");me.invokeOnResponseSendingExtensions=YE;var ZE=o(async(t,e,r)=>{for(let n of uh)await n(t,e,r)},"invokeOnResponseSendingFinalExtensions");me.invokeOnResponseSendingFinalExtensions=ZE;async function XE(t=()=>Promise.resolve()){await t(so),me.runtimeExtensions.value=so;let e=su.filter(r=>r instanceof co);for(let r of e)await r.initialize(so);WE.InternalProblemResponseFormatter.setProblemResponseFormat(so.problemResponseFormat)}o(XE,"initializeRuntime");me.initializeRuntime=XE});var Vt=g(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.Pipeline=void 0;var ew=ke(),au=wr(),lh=Rt(),cu=class{static{o(this,"Pipeline")}constructor(e,r,n){this.execute=this.#t(e,r,n)}execute;#e=(e,r)=>async(n,i)=>{try{return await e(n,i)}catch(s){return i.log.error("Error executing request handler.",s),r.errorHandler(n,i,s)}};#t=(e,r,n)=>async(i,s)=>{let a=[...e],c=o(async y=>{let v=a.pop();return v?v(i,s,n,c):await this.#e(async I=>{let k=await r(I,s);return tw(k)},n)(y,s)},"nextPipe"),l=await c(i),d=new au.ResponseSendingEvent(i,l);s.dispatchEvent(d);let p=au.ZuploContextExtensions.getContextExtensions(s),m=p.latestRequest,f;try{f=await d.mutableResponse}catch(y){return s.log.error(y),n.errorHandler(i,s,y)}try{f=await p.onResponseSending(f,m,s)}catch(y){return s.log.error(`Error invoking 'context.onResponseSending' hook: '${y.message}'`,y),n.errorHandler(i,s,y)}try{f=await(0,lh.invokeOnResponseSendingExtensions)(f,m,s)}catch(y){return s.log.error(`Error invoking 'context.onResponseSending' hook: '${y.message}'`,y),n.errorHandler(i,s,y)}s.dispatchEvent(new au.ResponseSentEvent(i,f));try{await p.onResponseSendingFinal(l,m,s)}catch(y){throw s.log.error(`Error invoking 'runtime.onResponseSending' hook: '${y.message}'`,y),y}try{await(0,lh.invokeOnResponseSendingFinalExtensions)(l,m,s)}catch(y){throw s.log.error(`Error invoking 'runtime.onResponseSending' hook: '${y.message}'`,y),y}return f}};uo.Pipeline=cu;function tw(t){return t instanceof Response?t:typeof t>"u"?new Response:new Response((0,ew.serialize)(t),{headers:{"content-type":"application/json"}})}o(tw,"resultToResponse")});var po=g(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.MetricsPlugin=void 0;var rw=Rt(),uu=class extends rw.RuntimePlugin{static{o(this,"MetricsPlugin")}};lo.MetricsPlugin=uu});var Ge=g(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.SystemLogMap=void 0;var nw=D(),lu=class t{static{o(this,"SystemLogMap")}static#e=new WeakMap;static getLogger(e){let r=t.#e.get(e);if(!r){let n=`No system logger found for context with requestId '${e.requestId}'`;throw console.error(n),new nw.SystemError(n)}return r}static addLogger(e,r){t.#e.set(e,r)}};ho.SystemLogMap=lu});var we=g(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.BatchDispatch=void 0;var du=class{static{o(this,"BatchDispatch")}constructor(e,r,n,i){this.#t=e,this.#o=r,this.#n=n,this.#r=i}#e=void 0;#t;#r;#n;#i=[];#o;enqueue=e=>{this.#i.push(e),this.#e||(this.#e=new Promise(r=>{setTimeout(()=>{if(this.#i.length>0){let n=[...this.#i];this.#i.length=0,this.#e=void 0,this.#n(n).catch(i=>{this.#r&&this.#r.error(`Uncaught error in BatchDispatcher named '${this.#t}'}`,i.message,i.stack)}).finally(()=>{r()})}},this.#o)}))};waitUntilFlushed=async()=>{if(this.#e)return this.#e}};fo.BatchDispatch=du});var ph=g(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.EllieMetricsTransport=void 0;var dh=Ge(),iw=we(),mo=te(),pu=class{static{o(this,"EllieMetricsTransport")}#e;#t;#r;constructor(e){this.#r=mo.Environment.instance.loggingId,this.#e=e,this.#t=new iw.BatchDispatch("ellie-metrics-transport",10,this.dispatchFunction,dh.SystemLogMap.getLogger(e))}pushMetrics(e,r){this.#r!==void 0&&(this.#t.enqueue(e),r.waitUntil(this.#t.waitUntilFlushed()))}dispatchFunction=async e=>{if(e.length===0)return;let r,{loggingId:n,remoteLogURL:i,deploymentName:s}=mo.Environment.instance,a=e.map(c=>{let u=Object.assign({},c);return delete u.requestContentLength,delete u.responseContentLength,u});if(n&&s&&(r=`${i}/v1-alpha/metrics?loggingId=${encodeURI(n)}&deploymentName=${encodeURI(s)}`),r){let c=await fetch(r,{method:"POST",body:JSON.stringify(a),headers:{"content-type":"application/json","zp-dn":mo.Environment.instance.deploymentName??"unknown","user-agent":mo.Environment.instance.systemUserAgent}});if(!c.ok){let u=await c.text();dh.SystemLogMap.getLogger(this.#e).error(`Metrics POST responded ${c.status}: ${c.statusText}`,u)}}}};yo.EllieMetricsTransport=pu});var ft=g(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.systemNoVersion=vr.SystemRouteConfiguration=void 0;var hu=class{static{o(this,"SystemRouteConfiguration")}constructor({label:e,path:r,methods:n,systemRouteName:i,corsPolicy:s="none"}){this.label=e,this.path=r,this.methods=n,this.corsPolicy=s,this.version=vr.systemNoVersion.name,this.handler={export:"SYSTEM_IGNORED",module:"SYSTEM_IGNORED"},this.systemRouteName=i}label;path;methods;handler;corsPolicy;version;policies;systemRouteName;raw(){return{}}};vr.SystemRouteConfiguration=hu;vr.systemNoVersion={name:"__system-no-version",pathPrefix:""}});var Tr=g(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.metricsProcessor=void 0;var hh=Jn(),ow=wr(),sw=Rt(),aw=po(),cw=ph(),uw=ft(),lw=o(async(t,e,r,n)=>{let i=new Date,s=Date.now(),a=await n(t),c=t.headers.get(hh.RAY_ID_HEADER)??void 0,u=t.headers.get(hh.TRUE_CLIENT_IP)??void 0,l=e.incomingRequestProperties,d;e.route instanceof uw.SystemRouteConfiguration&&(d=e.route.systemRouteName);let p=ow.ZuploContextExtensions.getContextExtensions(e).latestRequest,m={timestamp:i,statusCode:a.status,durationMs:Date.now()-s,requestContentLength:t.headers.get("content-length")?Number(t.headers.get("content-length")):void 0,responseContentLength:a.headers.get("content-length")?Number(a.headers.get("content-length")):void 0,routePath:e.route?.path??"SYSTEM_OR_NOT_FOUND",systemRouteName:d,requestId:e.requestId,method:t.method,asn:l.asn,asOrganization:l.asOrganization,colo:l.colo,continent:l.continent,country:l.country,city:l.city,latitude:l.latitude,longitude:l.longitude,rayId:c,instanceId:r.instanceId,userSub:p.user?.sub,clientIp:u},f=[];return f.push(new cw.EllieMetricsTransport(e)),sw.plugins.forEach(y=>{if(y instanceof aw.MetricsPlugin){let v=y.getTransport();f.push(v)}}),f.forEach(y=>{y.pushMetrics(m,e)}),a},"metricsProcessor");go.metricsProcessor=lw});var mh=g(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.SystemRouteName=void 0;var fh;(function(t){t.Build="build-data",t.CorsPreflight="cors-preflight",t.DeveloperPortal="developer-portal",t.DeveloperPortalLegacy="developer-portal-legacy",t.EmptyGatewayCatchall="empty-gateway-catchall",t.Ping="ping",t.UnmatchedPath="unmatched-path"})(fh||(_o.SystemRouteName=fh={}))});var gh=g(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0})});var Sr=g(Gt=>{"use strict";var dw=Gt&&Gt.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),_h=Gt&&Gt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dw(e,t,r)};Object.defineProperty(Gt,"__esModule",{value:!0});_h(mh(),Gt);_h(gh(),Gt)});var bh=g(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.registerBuildRoute=void 0;var pw=Ot(),hw=Vt(),fw=Tr(),mw=Sr(),yw=ft(),gw=Ge(),_w=te(),bw=o((t,e)=>{let r=o(async(s,a)=>{let u=new URL(s.url).hostname.toLowerCase();if(!u.endsWith(".zuplo.app")&&!u.endsWith(".zuplo.dev")&&!u.endsWith(".fly.dev")&&!u.endsWith("zuplotest.com")&&u!=="localhost")return pw.HttpProblems.notFound(s,a);let l=_w.Environment.instance.build,d={buildId:l.BUILD_ID,zuploVersion:l.ZUPLO_VERSION,apiVersion:l.API_VERSION,gitSha:l.GIT_SHA,timestamp:l.TIMESTAMP,isProduction:l.IS_PRODUCTION},p=s.url.toString().split("?");return p.length>0&&new URLSearchParams(p[1]).get("system_log")==="true"&&gw.SystemLogMap.getLogger(a).error("Test System Log",d),new Response(JSON.stringify(d,null,2),{status:200,headers:{"content-type":"application/json"}})},"buildRouteHandler"),n=new hw.Pipeline([fw.metricsProcessor],r,e),i=new yw.SystemRouteConfiguration({label:"SYSTEM_BUILD_ROUTE",methods:["GET"],path:"/__zuplo/build",systemRouteName:mw.SystemRouteName.Build});t.addRoute(i,n.execute)},"registerBuildRoute");bo.registerBuildRoute=bw});var fu=g(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.HTTP_STATUS_TITLES=Hr.HttpStatusCode=void 0;var Eh;(function(t){t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.EARLY_HINTS=103]="EARLY_HINTS",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.CONTENT_TOO_LARGE=413]="CONTENT_TOO_LARGE",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.UNPROCESSABLE_CONTENT=422]="UNPROCESSABLE_CONTENT",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.TOO_EARLY=425]="TOO_EARLY",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"})(Eh||(Hr.HttpStatusCode=Eh={}));Hr.HTTP_STATUS_TITLES={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Switch Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Content Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var ve=g(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.HttpProblems=void 0;var Ew=ke(),ww=Jn(),R=fu(),vw=te(),mu=oo();function Tw(t){return`${new URL(t.url).pathname}`}o(Tw,"instance");function Sw(t,e){let r={timestamp:new Date().toISOString(),requestId:e.requestId,buildId:vw.Environment.instance.build.BUILD_ID},n=t.headers.get(ww.RAY_ID_HEADER);return n&&(r.rayId=n),r}o(Sw,"trace");var Iw=o((t,e,r,n,i)=>({problem:{type:t.type,title:t.title,status:t.status,detail:t.detail,instance:Tw(e),trace:Sw(e,r),...n},additionalHeaders:i,statusText:Ew.httpStatuses[t.status]}),"merge"),yu=class{static{o(this,"HttpProblemsBase")}static format=(e,r,n)=>"problem"in e?mu.ProblemResponseFormatter.format(e,r,n):mu.ProblemResponseFormatter.format({problem:e},r,n);static getProblemFromStatus(e,r){return{type:`https://httpproblems.com/http-status/${e}`,status:e,title:R.HTTP_STATUS_TITLES[e],...r}}},gu=class extends yu{static{o(this,"HttpProblems")}static#e(e,r,n,i,s){let a=Iw(this.getProblemFromStatus(e),r,n,i,s);return mu.ProblemResponseFormatter.format(a,r,n)}static continue=(e,r,n,i)=>this.#e(R.HttpStatusCode.OK,e,r,n,i);static switchingProtocols=(e,r,n,i)=>this.#e(R.HttpStatusCode.SWITCHING_PROTOCOLS,e,r,n,i);static processing=(e,r,n,i)=>this.#e(R.HttpStatusCode.PROCESSING,e,r,n,i);static earlyHints=(e,r,n,i)=>this.#e(R.HttpStatusCode.EARLY_HINTS,e,r,n,i);static ok=(e,r,n,i)=>this.#e(R.HttpStatusCode.OK,e,r,n,i);static created=(e,r,n,i)=>this.#e(R.HttpStatusCode.CREATED,e,r,n,i);static accepted=(e,r,n,i)=>this.#e(R.HttpStatusCode.ACCEPTED,e,r,n,i);static nonAuthoritativeInformation=(e,r,n,i)=>this.#e(R.HttpStatusCode.NON_AUTHORITATIVE_INFORMATION,e,r,n,i);static noContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.NO_CONTENT,e,r,n,i);static resetContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.RESET_CONTENT,e,r,n,i);static partialContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.PARTIAL_CONTENT,e,r,n,i);static multiStatus=(e,r,n,i)=>this.#e(R.HttpStatusCode.MULTI_STATUS,e,r,n,i);static alreadyReported=(e,r,n,i)=>this.#e(R.HttpStatusCode.ALREADY_REPORTED,e,r,n,i);static imUsed=(e,r,n,i)=>this.#e(R.HttpStatusCode.IM_USED,e,r,n,i);static multipleChoices=(e,r,n,i)=>this.#e(R.HttpStatusCode.MULTIPLE_CHOICES,e,r,n,i);static movedPermanently=(e,r,n,i)=>this.#e(R.HttpStatusCode.MOVED_PERMANENTLY,e,r,n,i);static found=(e,r,n,i)=>this.#e(R.HttpStatusCode.FOUND,e,r,n,i);static seeOther=(e,r,n,i)=>this.#e(R.HttpStatusCode.SEE_OTHER,e,r,n,i);static notModified=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_MODIFIED,e,r,n,i);static useProxy=(e,r,n,i)=>this.#e(R.HttpStatusCode.USE_PROXY,e,r,n,i);static switchProxy=(e,r,n,i)=>this.#e(R.HttpStatusCode.SWITCH_PROXY,e,r,n,i);static temporaryRedirect=(e,r,n,i)=>this.#e(R.HttpStatusCode.TEMPORARY_REDIRECT,e,r,n,i);static permanentRedirect=(e,r,n,i)=>this.#e(R.HttpStatusCode.PERMANENT_REDIRECT,e,r,n,i);static badRequest=(e,r,n,i)=>this.#e(R.HttpStatusCode.BAD_REQUEST,e,r,n,i);static unauthorized=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNAUTHORIZED,e,r,n,i);static paymentRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.PAYMENT_REQUIRED,e,r,n,i);static forbidden=(e,r,n,i)=>this.#e(R.HttpStatusCode.FORBIDDEN,e,r,n,i);static notFound=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_FOUND,e,r,n,i);static methodNotAllowed=(e,r,n,i)=>this.#e(R.HttpStatusCode.METHOD_NOT_ALLOWED,e,r,n,i);static notAcceptable=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_ACCEPTABLE,e,r,n,i);static proxyAuthenticationRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.PROXY_AUTHENTICATION_REQUIRED,e,r,n,i);static requestTimeout=(e,r,n,i)=>this.#e(R.HttpStatusCode.REQUEST_TIMEOUT,e,r,n,i);static conflict=(e,r,n,i)=>this.#e(R.HttpStatusCode.CONFLICT,e,r,n,i);static gone=(e,r,n,i)=>this.#e(R.HttpStatusCode.GONE,e,r,n,i);static lengthRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.LENGTH_REQUIRED,e,r,n,i);static preconditionFailed=(e,r,n,i)=>this.#e(R.HttpStatusCode.PRECONDITION_FAILED,e,r,n,i);static contentTooLarge=(e,r,n,i)=>this.#e(R.HttpStatusCode.CONTENT_TOO_LARGE,e,r,n,i);static uriTooLong=(e,r,n,i)=>this.#e(R.HttpStatusCode.URI_TOO_LONG,e,r,n,i);static unsupportedMediaType=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNSUPPORTED_MEDIA_TYPE,e,r,n,i);static rangeNotSatisfiable=(e,r,n,i)=>this.#e(R.HttpStatusCode.RANGE_NOT_SATISFIABLE,e,r,n,i);static expectationFailed=(e,r,n,i)=>this.#e(R.HttpStatusCode.EXPECTATION_FAILED,e,r,n,i);static imATeapot=(e,r,n,i)=>this.#e(R.HttpStatusCode.I_AM_A_TEAPOT,e,r,n,i);static misdirectedRequest=(e,r,n,i)=>this.#e(R.HttpStatusCode.MISDIRECTED_REQUEST,e,r,n,i);static unprocessableContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNPROCESSABLE_CONTENT,e,r,n,i);static locked=(e,r,n,i)=>this.#e(R.HttpStatusCode.LOCKED,e,r,n,i);static failedDependency=(e,r,n,i)=>this.#e(R.HttpStatusCode.FAILED_DEPENDENCY,e,r,n,i);static tooEarly=(e,r,n,i)=>this.#e(R.HttpStatusCode.TOO_EARLY,e,r,n,i);static upgradeRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.UPGRADE_REQUIRED,e,r,n,i);static preconditionRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.PRECONDITION_REQUIRED,e,r,n,i);static tooManyRequests=(e,r,n,i)=>this.#e(R.HttpStatusCode.TOO_MANY_REQUESTS,e,r,n,i);static requestHeaderFieldsTooLarge=(e,r,n,i)=>this.#e(R.HttpStatusCode.REQUEST_HEADER_FIELDS_TOO_LARGE,e,r,n,i);static unavailableForLegalReasons=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNAVAILABLE_FOR_LEGAL_REASONS,e,r,n,i);static internalServerError=(e,r,n,i)=>this.#e(R.HttpStatusCode.INTERNAL_SERVER_ERROR,e,r,n,i);static notImplemented=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_IMPLEMENTED,e,r,n,i);static badGateway=(e,r,n,i)=>this.#e(R.HttpStatusCode.BAD_GATEWAY,e,r,n,i);static serviceUnavailable=(e,r,n,i)=>this.#e(R.HttpStatusCode.SERVICE_UNAVAILABLE,e,r,n,i);static gatewayTimeout=(e,r,n,i)=>this.#e(R.HttpStatusCode.GATEWAY_TIMEOUT,e,r,n,i);static httpVersionNotSupported=(e,r,n,i)=>this.#e(R.HttpStatusCode.HTTP_VERSION_NOT_SUPPORTED,e,r,n,i);static variantAlsoNegotiates=(e,r,n,i)=>this.#e(R.HttpStatusCode.VARIANT_ALSO_NEGOTIATES,e,r,n,i);static insufficientStorage=(e,r,n,i)=>this.#e(R.HttpStatusCode.INSUFFICIENT_STORAGE,e,r,n,i);static loopDetected=(e,r,n,i)=>this.#e(R.HttpStatusCode.LOOP_DETECTED,e,r,n,i);static notExtended=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_EXTENDED,e,r,n,i);static networkAuthenticationRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.NETWORK_AUTHENTICATION_REQUIRED,e,r,n,i)};Eo.HttpProblems=gu});var _u=g(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.generateCorsHeaders=qr.findMatchingOrigin=void 0;var Aw=o((t,e)=>{if(e!==null)if(t){let r=wo(t).split(",");if(r.find(c=>c==="*"))return e;let i=r.map(c=>c.trim().toLowerCase()),s=e.toLowerCase();return i.find(c=>c===s)}else return},"findMatchingOrigin");qr.findMatchingOrigin=Aw;var Pw=o((t,e)=>{let r={"access-control-allow-origin":e};t.allowedHeaders&&(r["access-control-allow-headers"]=wo(t.allowedHeaders)),t.allowedMethods&&(r["access-control-allow-methods"]=wo(t.allowedMethods)),t.exposeHeaders&&(r["access-control-expose-headers"]=wo(t.exposeHeaders));let n=t.allowCredentials?.toString()??void 0;n&&(r["access-control-allow-credentials"]=n);let i=t.maxAge?.toString()??void 0;return i&&(r["access-control-max-age"]=i),r},"generateCorsHeaders");qr.generateCorsHeaders=Pw;var wo=o(t=>Array.isArray(t)?t.map(e=>e.trim()).join(", "):t,"normalizePolicies")});var vh=g(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.registerCorsRoute=void 0;var Rw=D(),Ow=Vt(),bu=ve(),xw=Tr(),Nw=Sr(),Cw=ft(),wh=_u(),Lw=o((t,e)=>{let r=e.routeData.corsPolicies,n=o(async(a,c)=>{let u=new URL(a.url.toString()).pathname,l=a.headers.get("access-control-request-method"),d=a.headers.get("access-control-request-headers"),p=a.headers.get("origin");if(p===null||l===null)return bu.HttpProblems.badRequest(a,c,{detail:"Expect headers origin and access-control-request-method"});let m=t.lookup(l,u);if(!m)return bu.HttpProblems.notFound(a,c);let f=m.routeConfiguration,y=Dw(l,d,p,f,r);return y.isValid?new Response(void 0,{status:200,statusText:"OK",headers:y.headers}):bu.HttpProblems.notFound(a,c)},"optionsHandler"),i=new Ow.Pipeline([xw.metricsProcessor],n,e),s=new Cw.SystemRouteConfiguration({label:"SYSTEM_CORS_ROUTE",methods:["OPTIONS"],path:"/(.*)",systemRouteName:Nw.SystemRouteName.CorsPreflight});t.addRoute(s,i.execute)},"registerCorsRoute");vo.registerCorsRoute=Lw;var Dw=o((t,e,r,n,i)=>{let s={isValid:!1,headers:{}};if(n.corsPolicy==="anything-goes")return{isValid:!0,headers:{"access-control-allow-origin":r,"access-control-allow-methods":t,"access-control-allow-headers":e??"*","access-control-expose-headers":"*","access-control-allow-credentials":"true","access-control-max-age":"600"}};if(n.corsPolicy==="none")return s;let a=i?.find(l=>l.name===n.corsPolicy);if(!a)throw new Rw.ConfigurationError(`Invalid Configuration - corsPolicy '${n.corsPolicy}' not found in *.oas.json 'corsPolicies' section`);let c=(0,wh.findMatchingOrigin)(a.allowedOrigins,r);return c?{isValid:!0,headers:(0,wh.generateCorsHeaders)(a,c)}:s},"validateAndBuildResponseHeaders")});var Th=g(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.registerNoRoutes=void 0;var Uw=Vt(),Mw=Tr(),kw=Sr(),Fw=ft(),Hw=o((t,e)=>{let r=o(async()=>new Response("You have no routes. Add a route in routes.oas.json to get started",{status:200}),"noRoutesHandler"),n=new Uw.Pipeline([Mw.metricsProcessor],r,e),i=new Fw.SystemRouteConfiguration({label:"SYSTEM_NO_ROUTES",methods:["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"],path:"/(.*)",systemRouteName:kw.SystemRouteName.EmptyGatewayCatchall});t.addRoute(i,n.execute)},"registerNoRoutes");To.registerNoRoutes=Hw});var Sh=g(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.registerNotMatchedHandler=Ir.notFoundRouteConfiguration=void 0;var qw=wr(),$w=Rt(),jw=Vt(),Vw=ve(),Gw=Tr(),Bw=Sr(),Kw=ft();Ir.notFoundRouteConfiguration=new Kw.SystemRouteConfiguration({label:"SYSTEM_NOT_FOUND_ROUTE",methods:["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"],path:"/(.*)",systemRouteName:Bw.SystemRouteName.UnmatchedPath});var Jw=o((t,e)=>{let r=o(async(i,s)=>{let a=$w.runtimeExtensions.value?.notFoundHandler;if(a){let c=qw.ZuploContextExtensions.getContextExtensions(s);return a(i,s,{routesMatchedByPathOnly:c.pathOnlyMatches??[]})}return Vw.HttpProblems.notFound(i,s)},"notFoundHandler"),n=new jw.Pipeline([Gw.metricsProcessor],r,e);t.addRoute(Ir.notFoundRouteConfiguration,n.execute)},"registerNotMatchedHandler");Ir.registerNotMatchedHandler=Jw});var Eu=g(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.corsProcessor=void 0;var Ph=D(),Ih=_u(),zw=["access-control-allow-origin","access-control-allow-headers","access-control-expose-headers","access-control-allow-credentials","access-control-max-age"],Ah=o(t=>{zw.forEach(e=>t.delete(e))},"stripCorsHeaders"),Ww=o(async(t,e,r,n)=>{let i=e.route;if(!i.corsPolicy||i.corsPolicy==="none"){let d=await n(t),p=new Headers(d.headers);return Ah(p),new Response(d.body,{status:d.status,statusText:d.statusText,headers:p,webSocket:d.webSocket})}let s=await n(t);if(!(s instanceof Response))throw new Ph.SystemError(`The CorsProcessor is in the wrong place in the pipeline. It should only receive HttpResponse type but got '${typeof s}'`);let a=Qw(i,r.routeData.corsPolicies),c=Yw(t,a),u=new Headers(s.headers);return Ah(u),Object.entries(c).forEach(([d,p])=>{u.set(d,p)}),new Response(s.body,{status:s.status,statusText:s.statusText,headers:u,webSocket:s.webSocket})},"corsProcessor");So.corsProcessor=Ww;var Qw=o((t,e)=>{if(t.corsPolicy==="anything-goes")return{name:"anything-goes",allowedHeaders:["*"],allowedOrigins:["*"],allowedMethods:t.methods,exposeHeaders:["*"],allowCredentials:!0,maxAge:600};let r=e?.find(n=>n.name===t.corsPolicy);if(r===void 0)throw new Ph.ConfigurationError(`Invalid Configuration - no corsPolicy '${t.corsPolicy}' found in *.oas.json`);return r},"getCorsPolicy"),Yw=o((t,e)=>{let r=(0,Ih.findMatchingOrigin)(e.allowedOrigins,t.headers.get("origin"));return r?(0,Ih.generateCorsHeaders)(e,r):{}},"getCorsHeaders")});var Rh=g(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.registerPingRoute=void 0;var Zw=Vt(),Xw=Eu(),ev=Sr(),tv=ft(),rv=o((t,e)=>{let r=o(async()=>new Response(null,{status:200}),"pingRouteHandler"),n=new Zw.Pipeline([Xw.corsProcessor],r,e),i=new tv.SystemRouteConfiguration({corsPolicy:"anything-goes",label:"SYSTEM_PING_ROUTE",methods:["GET"],path:"/__zuplo/ping",systemRouteName:ev.SystemRouteName.Ping});t.addRoute(i,n.execute)},"registerPingRoute");Io.registerPingRoute=rv});var xh=g(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.deepFreeze=void 0;function Oh(t){for(let e in t){let r=t[e];r&&typeof r=="object"&&Oh(r)}return Object.freeze(t)}o(Oh,"deepFreeze");Ao.deepFreeze=Oh});var Wn=g(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.ZuploRequest=void 0;var Nh=xh(),wu=class t extends Request{static{o(this,"ZuploRequest")}#e=void 0;#t;constructor(e,r){super(e,r);let n=r?.params;n?this.#t=n:e instanceof t?this.#t=e.#t:this.#t={};let i=r?.user;i?this.user=i:e instanceof t&&(this.user=e.user)}get query(){if(this.#e===void 0){this.#e={};let e=new URL(this.url).searchParams;for(let[r,n]of e.entries())this.#e[r]=n}return(0,Nh.deepFreeze)(this.#e)}get params(){return(0,Nh.deepFreeze)(this.#t)}user};Po.ZuploRequest=wu});var Qn=g(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.policyProcessor=xt.toStackedInboundHandler=xt.getInboundPolicyHandlerAndOptions=void 0;var nv=wr(),$r=D(),Ch=Wn();function Lh(t,e){let r,n;return Array.isArray(t)?r=t:(r=t.policies?.inbound??[],n=t.path),r.map(s=>{let a=e?.find(u=>u.name===s);if(!a)throw new $r.ConfigurationError(`Invalid state - no Policy with the name '${s}' ${n&&`on route '${n}'`} was found in the policies configuration (check case).`);let c;if(typeof a.handler?.module=="object"&&(c=a.handler?.module[a.handler.export]),typeof c!="function")throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${s}' ${n&&`on route '${n}'`}. Expected a function, received '${typeof c}'`);return{exportName:a.handler.export,handler:c,options:a.handler.options,policyName:a.name}})}o(Lh,"getInboundPolicyHandlerAndOptions");xt.getInboundPolicyHandlerAndOptions=Lh;function iv(t,e){return(t.policies?.outbound??[]).map(i=>{let s=e?.find(c=>c.name===i);if(!s)throw new $r.ConfigurationError(`Invalid state - no Policy with the name '${i}' on route '${t.path}' was found in the policies configuration (check case).`);let a;if(typeof s.handler?.module=="object"&&(a=s.handler?.module[s.handler.export]),typeof a!="function")throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${i}' on route '${t.path}'`);return{exportName:s.handler.export,handler:a,options:s.handler.options,policyName:s.name}})}o(iv,"getOutboundPolicyHandlerAndOptions");var ov=o(t=>async(e,r)=>{let n=nv.ZuploContextExtensions.getContextExtensions(r),i=[...t],s=e;for(;i.length>0;){let a=i.shift();if(!a)return s;let c=await a.handler(s,r,a.options,a.policyName);if(n.latestRequest=s,c instanceof Ch.ZuploRequest)s=c;else if(c instanceof Request)s=new Ch.ZuploRequest(e);else{if(c instanceof Response)return c;throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${a.policyName}'${a.routeName?` on route '${a.routeName}`:""}. The result of an inbound policy must be a Response or Request.`)}}return s},"toStackedInboundHandler");xt.toStackedInboundHandler=ov;var sv=o(t=>async(e,r,n)=>{let i=[...t],s=e;for(;i.length>0;){let a=i.shift();if(!a)return s;let c=await a.handler(s,r,n,a.options,a.policyName);if(!(c instanceof Response))throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${a.policyName}'${a.routeName?` on route '${a.routeName}`:""}. The result of an outbound policy must be a Response.`);s=c}return s},"toStackedOutboundHandler"),av=o(async(t,e,r,n)=>{let i=Lh(e.route,r.routeData.policies),s=iv(e.route,r.routeData.policies),a=(0,xt.toStackedInboundHandler)(i);try{let c=await a(t,e);if(c instanceof Response)return c;let u=await n(c),l=sv(s);return u.ok?l(u,t,e):u}catch(c){return e.log.error(c),r.errorHandler(t,e,c)}},"policyProcessor");xt.policyProcessor=av});var Dh=g(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.serialize=jr.parse=void 0;var cv=Object.prototype.toString,Ro=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function uv(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");let r={},i=(e||{}).decode||dv,s=0;for(;s<t.length;){let a=t.indexOf("=",s);if(a===-1)break;let c=t.indexOf(";",s);if(c===-1)c=t.length;else if(c<a){s=t.lastIndexOf(";",a-1)+1;continue}let u=t.slice(s,a).trim();if(r[u]===void 0){let l=t.slice(a+1,c).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1)),r[u]=fv(l,i)}s=c+1}return r}o(uv,"parse");jr.parse=uv;function lv(t,e,r){let n=r||{},i=n.encode||pv;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Ro.test(t))throw new TypeError("argument name is invalid");let s=i(e);if(s&&!Ro.test(s))throw new TypeError("argument val is invalid");let a=t+"="+s;if(n.maxAge!=null){let c=n.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(n.domain){if(!Ro.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!Ro.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){let c=n.expires;if(!hv(c)||isNaN(c.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+c.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}o(lv,"serialize");jr.serialize=lv;function dv(t){return t.indexOf("%")!==-1?decodeURIComponent(t):t}o(dv,"decode");function pv(t){return encodeURIComponent(t)}o(pv,"encode");function hv(t){return cv.call(t)==="[object Date]"||t instanceof Date}o(hv,"isDate");function fv(t,e){try{return e(t)}catch{return t}}o(fv,"tryDecode")});var Uh=g(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.devPortalBaseURL=void 0;var mv=Dh();function yv(t,e){try{let r=/v\d+(-\d+)?/g,i=(0,mv.parse)(e.get("Cookie")||"")["zp-dev-portal"];return i!==null&&i&&r.test(i)?`https://dev-portal-${i}.zuplo.com`:t}catch{}return t}o(yv,"devPortalBaseURL");Oo.devPortalBaseURL=yv});var qh=g(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.registerDevPortalLegacyRedirectRoute=Vr.registerDevPortalV3Route=void 0;var vu=Ot(),kh=Vt(),Fh=Tr(),gv=Qn(),Hh=ft(),_v=Uh(),Bt=te(),Mh="/__zuplo/dev-portal",bv="dev-portal-id",Ev="dev-portal-host",wv="zp-account",vv="zp-project",Tv="dev-portal-build",Sv=`
|
|
35
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}o(qE,"reduceToSingleString")});var oh=g(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.format=void 0;var $E=Zp(),jE=ih(),VE=o((t,...e)=>(0,$E.format)(jE.inspect,t,e),"format");to.format=VE});var Er=g(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.debug=jt.withoutEnv=jt.Debugger=void 0;var GE=Yp(),BE=oh(),ro=class{static{o(this,"Debugger")}manager;ns;color;last;enabled;constructor(e,r){this.manager=e,this.ns=r,this.color=(0,GE.generateColor)(r),this.last=0,this.enabled=e.enabled.some(n=>n.test(r))}log(...e){if(!this.enabled)return;let r,n=e[0];typeof n=="function"?r=n():r=String(n);let i=Date.now()-(this.last||Date.now());r=(0,BE.format)(r,...e);let s=`${this.color(this.ns)} ${r} ${this.color(`+${i}ms`)}`;console.log(s),this.last=Date.now()}};jt.Debugger=ro;var no=class{static{o(this,"DebugManager")}debuggers;enabled;constructor(e){this.debuggers=new Map,this.enabled=e??[]}};function sh(t){return!t||t.length===0?[]:(t=t.replace(/\s/g,"").replace(/\*/g,".+"),t.split(",").map(e=>new RegExp(`^${e}$`)))}o(sh,"extract");var zn;function KE(t){t||(t=[]),typeof t=="string"&&(t=sh(t)),zn=new no(t)}o(KE,"withoutEnv");jt.withoutEnv=KE;function JE(t){let e=globalThis.DEBUG;zn||(zn=new no(sh(e)));let r=new ro(zn,t);return zn.debuggers.set(t,r),Object.assign(r.log.bind(r),{self:r})}o(JE,"debug");jt.debug=JE});var oo=g(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.ProblemResponseFormatter=Fr.InternalProblemResponseFormatter=void 0;var zE=D(),io=class t{static{o(this,"InternalProblemResponseFormatter")}static problemResponseFormat=async e=>{let r=e.problem,n=JSON.stringify(r,null,2);return new Response(n,{status:e.problem.status,statusText:e.statusText,headers:{...e.additionalHeaders,"content-type":"application/problem+json"}})};static setProblemResponseFormat(e){e&&(t.problemResponseFormat=(r,n,i)=>{try{return e(r,n,i)}catch(s){throw new zE.RuntimeError("Error in custom 'problemResponseFormat'",{cause:s})}})}};Fr.InternalProblemResponseFormatter=io;var ou=class{static{o(this,"ProblemResponseFormatter")}static async format(e,r,n){return await io.problemResponseFormat(e,r,n)}};Fr.ProblemResponseFormatter=ou});var Rt=g(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.initializeRuntime=me.invokeOnResponseSendingFinalExtensions=me.invokeOnResponseSendingExtensions=me.invokeOnRequestExtensions=me.plugins=me.runtimeExtensions=me.InitializableRuntimePlugin=me.RuntimePlugin=void 0;var WE=oo(),ao=class{static{o(this,"RuntimePlugin")}};me.RuntimePlugin=ao;var co=class extends ao{static{o(this,"InitializableRuntimePlugin")}};me.InitializableRuntimePlugin=co;me.runtimeExtensions={};var su=[];me.plugins=su;var ah=[],ch=[],uh=[],so={addPlugin(t){su.push(t)},addRequestHook(t){ah.push(t)},addResponseSendingHook(t){ch.push(t)},addResponseSendingFinalHook(t){uh.push(t)}},QE=o(async(t,e)=>{let r=t;for(let n of ah)if(r=await n(r,e),r instanceof Response)return r;return r},"invokeOnRequestExtensions");me.invokeOnRequestExtensions=QE;var YE=o(async(t,e,r)=>{let n=t;for(let i of ch)n=await i(t,e,r);return n},"invokeOnResponseSendingExtensions");me.invokeOnResponseSendingExtensions=YE;var ZE=o(async(t,e,r)=>{for(let n of uh)await n(t,e,r)},"invokeOnResponseSendingFinalExtensions");me.invokeOnResponseSendingFinalExtensions=ZE;async function XE(t=()=>Promise.resolve()){await t(so),me.runtimeExtensions.value=so;let e=su.filter(r=>r instanceof co);for(let r of e)await r.initialize(so);WE.InternalProblemResponseFormatter.setProblemResponseFormat(so.problemResponseFormat)}o(XE,"initializeRuntime");me.initializeRuntime=XE});var Vt=g(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.Pipeline=void 0;var ew=ke(),au=wr(),lh=Rt(),cu=class{static{o(this,"Pipeline")}constructor(e,r,n){this.execute=this.#t(e,r,n)}execute;#e=(e,r)=>async(n,i)=>{try{return await e(n,i)}catch(s){return i.log.error("Error executing request handler.",s),r.errorHandler(n,i,s)}};#t=(e,r,n)=>async(i,s)=>{let a=[...e],c=o(async y=>{let v=a.pop();return v?v(i,s,n,c):await this.#e(async I=>{let k=await r(I,s);return tw(k)},n)(y,s)},"nextPipe"),l=await c(i),d=new au.ResponseSendingEvent(i,l);s.dispatchEvent(d);let p=au.ZuploContextExtensions.getContextExtensions(s),m=p.latestRequest,f;try{f=await d.mutableResponse}catch(y){return s.log.error(y),n.errorHandler(i,s,y)}try{f=await p.onResponseSending(f,m,s)}catch(y){return s.log.error(`Error invoking 'context.onResponseSending' hook: '${y.message}'`,y),n.errorHandler(i,s,y)}try{f=await(0,lh.invokeOnResponseSendingExtensions)(f,m,s)}catch(y){return s.log.error(`Error invoking 'context.onResponseSending' hook: '${y.message}'`,y),n.errorHandler(i,s,y)}s.dispatchEvent(new au.ResponseSentEvent(i,f));try{await p.onResponseSendingFinal(l,m,s)}catch(y){throw s.log.error(`Error invoking 'runtime.onResponseSending' hook: '${y.message}'`,y),y}try{await(0,lh.invokeOnResponseSendingFinalExtensions)(l,m,s)}catch(y){throw s.log.error(`Error invoking 'runtime.onResponseSending' hook: '${y.message}'`,y),y}return f}};uo.Pipeline=cu;function tw(t){return t instanceof Response?t:typeof t>"u"?new Response:new Response((0,ew.serialize)(t),{headers:{"content-type":"application/json"}})}o(tw,"resultToResponse")});var po=g(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.MetricsPlugin=void 0;var rw=Rt(),uu=class extends rw.RuntimePlugin{static{o(this,"MetricsPlugin")}};lo.MetricsPlugin=uu});var Ge=g(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.SystemLogMap=void 0;var nw=D(),lu=class t{static{o(this,"SystemLogMap")}static#e=new WeakMap;static getLogger(e){let r=t.#e.get(e);if(!r){let n=`No system logger found for context with requestId '${e.requestId}'`;throw console.error(n),new nw.SystemError(n)}return r}static addLogger(e,r){t.#e.set(e,r)}};ho.SystemLogMap=lu});var we=g(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.BatchDispatch=void 0;var du=class{static{o(this,"BatchDispatch")}constructor(e,r,n,i){this.#t=e,this.#o=r,this.#n=n,this.#r=i}#e=void 0;#t;#r;#n;#i=[];#o;enqueue=e=>{this.#i.push(e),this.#e||(this.#e=new Promise(r=>{setTimeout(()=>{if(this.#i.length>0){let n=[...this.#i];this.#i.length=0,this.#e=void 0,this.#n(n).catch(i=>{this.#r&&this.#r.error(`Uncaught error in BatchDispatcher named '${this.#t}'}`,i.message,i.stack)}).finally(()=>{r()})}},this.#o)}))};waitUntilFlushed=async()=>{if(this.#e)return this.#e}};fo.BatchDispatch=du});var ph=g(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.EllieMetricsTransport=void 0;var dh=Ge(),iw=we(),mo=te(),pu=class{static{o(this,"EllieMetricsTransport")}#e;#t;#r;constructor(e){this.#r=mo.Environment.instance.loggingId,this.#e=e,this.#t=new iw.BatchDispatch("ellie-metrics-transport",10,this.dispatchFunction,dh.SystemLogMap.getLogger(e))}pushMetrics(e,r){this.#r!==void 0&&(this.#t.enqueue(e),r.waitUntil(this.#t.waitUntilFlushed()))}dispatchFunction=async e=>{if(e.length===0)return;let r,{loggingId:n,remoteLogURL:i,deploymentName:s}=mo.Environment.instance,a=e.map(c=>{let u=Object.assign({},c);return delete u.requestContentLength,delete u.responseContentLength,u});if(n&&s&&(r=`${i}/v1-alpha/metrics?loggingId=${encodeURI(n)}&deploymentName=${encodeURI(s)}`),r){let c=await fetch(r,{method:"POST",body:JSON.stringify(a),headers:{"content-type":"application/json","zp-dn":mo.Environment.instance.deploymentName??"unknown","user-agent":mo.Environment.instance.systemUserAgent}});if(!c.ok){let u=await c.text();dh.SystemLogMap.getLogger(this.#e).error(`Metrics POST responded ${c.status}: ${c.statusText}`,u)}}}};yo.EllieMetricsTransport=pu});var ft=g(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.systemNoVersion=vr.SystemRouteConfiguration=void 0;var hu=class{static{o(this,"SystemRouteConfiguration")}constructor({label:e,path:r,methods:n,systemRouteName:i,corsPolicy:s="none"}){this.label=e,this.path=r,this.methods=n,this.corsPolicy=s,this.version=vr.systemNoVersion.name,this.handler={export:"SYSTEM_IGNORED",module:"SYSTEM_IGNORED"},this.systemRouteName=i}label;path;methods;handler;corsPolicy;version;policies;systemRouteName;raw(){return{}}};vr.SystemRouteConfiguration=hu;vr.systemNoVersion={name:"__system-no-version",pathPrefix:""}});var Tr=g(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.metricsProcessor=void 0;var hh=Jn(),ow=wr(),sw=Rt(),aw=po(),cw=ph(),uw=ft(),lw=o(async(t,e,r,n)=>{let i=new Date,s=Date.now(),a=await n(t),c=t.headers.get(hh.RAY_ID_HEADER)??void 0,u=t.headers.get(hh.TRUE_CLIENT_IP)??void 0,l=e.incomingRequestProperties,d;e.route instanceof uw.SystemRouteConfiguration&&(d=e.route.systemRouteName);let p=ow.ZuploContextExtensions.getContextExtensions(e).latestRequest,m={timestamp:i,statusCode:a.status,durationMs:Date.now()-s,requestContentLength:t.headers.get("content-length")?Number(t.headers.get("content-length")):void 0,responseContentLength:a.headers.get("content-length")?Number(a.headers.get("content-length")):void 0,routePath:e.route?.path??"SYSTEM_OR_NOT_FOUND",systemRouteName:d,requestId:e.requestId,method:t.method,asn:l.asn,asOrganization:l.asOrganization,colo:l.colo,continent:l.continent,country:l.country,city:l.city,latitude:l.latitude,longitude:l.longitude,rayId:c,instanceId:r.instanceId,userSub:p.user?.sub,clientIp:u},f=[];return f.push(new cw.EllieMetricsTransport(e)),sw.plugins.forEach(y=>{if(y instanceof aw.MetricsPlugin){let v=y.getTransport();f.push(v)}}),f.forEach(y=>{y.pushMetrics(m,e)}),a},"metricsProcessor");go.metricsProcessor=lw});var mh=g(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.SystemRouteName=void 0;var fh;(function(t){t.Build="build-data",t.CorsPreflight="cors-preflight",t.DeveloperPortal="developer-portal",t.DeveloperPortalLegacy="developer-portal-legacy",t.EmptyGatewayCatchall="empty-gateway-catchall",t.Ping="ping",t.UnmatchedPath="unmatched-path"})(fh||(_o.SystemRouteName=fh={}))});var gh=g(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0})});var Sr=g(Gt=>{"use strict";var dw=Gt&&Gt.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),_h=Gt&&Gt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dw(e,t,r)};Object.defineProperty(Gt,"__esModule",{value:!0});_h(mh(),Gt);_h(gh(),Gt)});var bh=g(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.registerBuildRoute=void 0;var pw=Ot(),hw=Vt(),fw=Tr(),mw=Sr(),yw=ft(),gw=Ge(),_w=te(),bw=o((t,e)=>{let r=o(async(s,a)=>{let u=new URL(s.url).hostname.toLowerCase();if(!u.endsWith(".zuplo.app")&&!u.endsWith(".zuplo.dev")&&!u.endsWith(".fly.dev")&&!u.endsWith("zuplotest.com")&&u!=="localhost")return pw.HttpProblems.notFound(s,a);let l=_w.Environment.instance.build,d={buildId:l.BUILD_ID,zuploVersion:l.ZUPLO_VERSION,apiVersion:l.API_VERSION,gitSha:l.GIT_SHA,timestamp:l.TIMESTAMP,isProduction:l.IS_PRODUCTION},p=s.url.toString().split("?");return p.length>0&&new URLSearchParams(p[1]).get("system_log")==="true"&&gw.SystemLogMap.getLogger(a).error("Test System Log",d),new Response(JSON.stringify(d,null,2),{status:200,headers:{"content-type":"application/json"}})},"buildRouteHandler"),n=new hw.Pipeline([fw.metricsProcessor],r,e),i=new yw.SystemRouteConfiguration({label:"SYSTEM_BUILD_ROUTE",methods:["GET"],path:"/__zuplo/build",systemRouteName:mw.SystemRouteName.Build});t.addRoute(i,n.execute)},"registerBuildRoute");bo.registerBuildRoute=bw});var fu=g(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.HTTP_STATUS_TITLES=Hr.HttpStatusCode=void 0;var Eh;(function(t){t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.EARLY_HINTS=103]="EARLY_HINTS",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.CONTENT_TOO_LARGE=413]="CONTENT_TOO_LARGE",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.UNPROCESSABLE_CONTENT=422]="UNPROCESSABLE_CONTENT",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.TOO_EARLY=425]="TOO_EARLY",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"})(Eh||(Hr.HttpStatusCode=Eh={}));Hr.HTTP_STATUS_TITLES={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Switch Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Content Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var ve=g(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.HttpProblems=void 0;var Ew=ke(),ww=Jn(),R=fu(),vw=te(),mu=oo();function Tw(t){return`${new URL(t.url).pathname}`}o(Tw,"instance");function Sw(t,e){let r={timestamp:new Date().toISOString(),requestId:e.requestId,buildId:vw.Environment.instance.build.BUILD_ID},n=t.headers.get(ww.RAY_ID_HEADER);return n&&(r.rayId=n),r}o(Sw,"trace");var Iw=o((t,e,r,n,i)=>({problem:{type:t.type,title:t.title,status:t.status,detail:t.detail,instance:Tw(e),trace:Sw(e,r),...n},additionalHeaders:i,statusText:Ew.httpStatuses[t.status]}),"merge"),yu=class{static{o(this,"HttpProblemsBase")}static format=(e,r,n)=>"problem"in e?mu.ProblemResponseFormatter.format(e,r,n):mu.ProblemResponseFormatter.format({problem:e},r,n);static getProblemFromStatus(e,r){return{type:`https://httpproblems.com/http-status/${e}`,status:e,title:R.HTTP_STATUS_TITLES[e],...r}}},gu=class extends yu{static{o(this,"HttpProblems")}static#e(e,r,n,i,s){let a=Iw(this.getProblemFromStatus(e),r,n,i,s);return mu.ProblemResponseFormatter.format(a,r,n)}static continue=(e,r,n,i)=>this.#e(R.HttpStatusCode.OK,e,r,n,i);static switchingProtocols=(e,r,n,i)=>this.#e(R.HttpStatusCode.SWITCHING_PROTOCOLS,e,r,n,i);static processing=(e,r,n,i)=>this.#e(R.HttpStatusCode.PROCESSING,e,r,n,i);static earlyHints=(e,r,n,i)=>this.#e(R.HttpStatusCode.EARLY_HINTS,e,r,n,i);static ok=(e,r,n,i)=>this.#e(R.HttpStatusCode.OK,e,r,n,i);static created=(e,r,n,i)=>this.#e(R.HttpStatusCode.CREATED,e,r,n,i);static accepted=(e,r,n,i)=>this.#e(R.HttpStatusCode.ACCEPTED,e,r,n,i);static nonAuthoritativeInformation=(e,r,n,i)=>this.#e(R.HttpStatusCode.NON_AUTHORITATIVE_INFORMATION,e,r,n,i);static noContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.NO_CONTENT,e,r,n,i);static resetContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.RESET_CONTENT,e,r,n,i);static partialContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.PARTIAL_CONTENT,e,r,n,i);static multiStatus=(e,r,n,i)=>this.#e(R.HttpStatusCode.MULTI_STATUS,e,r,n,i);static alreadyReported=(e,r,n,i)=>this.#e(R.HttpStatusCode.ALREADY_REPORTED,e,r,n,i);static imUsed=(e,r,n,i)=>this.#e(R.HttpStatusCode.IM_USED,e,r,n,i);static multipleChoices=(e,r,n,i)=>this.#e(R.HttpStatusCode.MULTIPLE_CHOICES,e,r,n,i);static movedPermanently=(e,r,n,i)=>this.#e(R.HttpStatusCode.MOVED_PERMANENTLY,e,r,n,i);static found=(e,r,n,i)=>this.#e(R.HttpStatusCode.FOUND,e,r,n,i);static seeOther=(e,r,n,i)=>this.#e(R.HttpStatusCode.SEE_OTHER,e,r,n,i);static notModified=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_MODIFIED,e,r,n,i);static useProxy=(e,r,n,i)=>this.#e(R.HttpStatusCode.USE_PROXY,e,r,n,i);static switchProxy=(e,r,n,i)=>this.#e(R.HttpStatusCode.SWITCH_PROXY,e,r,n,i);static temporaryRedirect=(e,r,n,i)=>this.#e(R.HttpStatusCode.TEMPORARY_REDIRECT,e,r,n,i);static permanentRedirect=(e,r,n,i)=>this.#e(R.HttpStatusCode.PERMANENT_REDIRECT,e,r,n,i);static badRequest=(e,r,n,i)=>this.#e(R.HttpStatusCode.BAD_REQUEST,e,r,n,i);static unauthorized=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNAUTHORIZED,e,r,n,i);static paymentRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.PAYMENT_REQUIRED,e,r,n,i);static forbidden=(e,r,n,i)=>this.#e(R.HttpStatusCode.FORBIDDEN,e,r,n,i);static notFound=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_FOUND,e,r,n,i);static methodNotAllowed=(e,r,n,i)=>this.#e(R.HttpStatusCode.METHOD_NOT_ALLOWED,e,r,n,i);static notAcceptable=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_ACCEPTABLE,e,r,n,i);static proxyAuthenticationRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.PROXY_AUTHENTICATION_REQUIRED,e,r,n,i);static requestTimeout=(e,r,n,i)=>this.#e(R.HttpStatusCode.REQUEST_TIMEOUT,e,r,n,i);static conflict=(e,r,n,i)=>this.#e(R.HttpStatusCode.CONFLICT,e,r,n,i);static gone=(e,r,n,i)=>this.#e(R.HttpStatusCode.GONE,e,r,n,i);static lengthRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.LENGTH_REQUIRED,e,r,n,i);static preconditionFailed=(e,r,n,i)=>this.#e(R.HttpStatusCode.PRECONDITION_FAILED,e,r,n,i);static contentTooLarge=(e,r,n,i)=>this.#e(R.HttpStatusCode.CONTENT_TOO_LARGE,e,r,n,i);static uriTooLong=(e,r,n,i)=>this.#e(R.HttpStatusCode.URI_TOO_LONG,e,r,n,i);static unsupportedMediaType=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNSUPPORTED_MEDIA_TYPE,e,r,n,i);static rangeNotSatisfiable=(e,r,n,i)=>this.#e(R.HttpStatusCode.RANGE_NOT_SATISFIABLE,e,r,n,i);static expectationFailed=(e,r,n,i)=>this.#e(R.HttpStatusCode.EXPECTATION_FAILED,e,r,n,i);static imATeapot=(e,r,n,i)=>this.#e(R.HttpStatusCode.I_AM_A_TEAPOT,e,r,n,i);static misdirectedRequest=(e,r,n,i)=>this.#e(R.HttpStatusCode.MISDIRECTED_REQUEST,e,r,n,i);static unprocessableContent=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNPROCESSABLE_CONTENT,e,r,n,i);static locked=(e,r,n,i)=>this.#e(R.HttpStatusCode.LOCKED,e,r,n,i);static failedDependency=(e,r,n,i)=>this.#e(R.HttpStatusCode.FAILED_DEPENDENCY,e,r,n,i);static tooEarly=(e,r,n,i)=>this.#e(R.HttpStatusCode.TOO_EARLY,e,r,n,i);static upgradeRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.UPGRADE_REQUIRED,e,r,n,i);static preconditionRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.PRECONDITION_REQUIRED,e,r,n,i);static tooManyRequests=(e,r,n,i)=>this.#e(R.HttpStatusCode.TOO_MANY_REQUESTS,e,r,n,i);static requestHeaderFieldsTooLarge=(e,r,n,i)=>this.#e(R.HttpStatusCode.REQUEST_HEADER_FIELDS_TOO_LARGE,e,r,n,i);static unavailableForLegalReasons=(e,r,n,i)=>this.#e(R.HttpStatusCode.UNAVAILABLE_FOR_LEGAL_REASONS,e,r,n,i);static internalServerError=(e,r,n,i)=>this.#e(R.HttpStatusCode.INTERNAL_SERVER_ERROR,e,r,n,i);static notImplemented=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_IMPLEMENTED,e,r,n,i);static badGateway=(e,r,n,i)=>this.#e(R.HttpStatusCode.BAD_GATEWAY,e,r,n,i);static serviceUnavailable=(e,r,n,i)=>this.#e(R.HttpStatusCode.SERVICE_UNAVAILABLE,e,r,n,i);static gatewayTimeout=(e,r,n,i)=>this.#e(R.HttpStatusCode.GATEWAY_TIMEOUT,e,r,n,i);static httpVersionNotSupported=(e,r,n,i)=>this.#e(R.HttpStatusCode.HTTP_VERSION_NOT_SUPPORTED,e,r,n,i);static variantAlsoNegotiates=(e,r,n,i)=>this.#e(R.HttpStatusCode.VARIANT_ALSO_NEGOTIATES,e,r,n,i);static insufficientStorage=(e,r,n,i)=>this.#e(R.HttpStatusCode.INSUFFICIENT_STORAGE,e,r,n,i);static loopDetected=(e,r,n,i)=>this.#e(R.HttpStatusCode.LOOP_DETECTED,e,r,n,i);static notExtended=(e,r,n,i)=>this.#e(R.HttpStatusCode.NOT_EXTENDED,e,r,n,i);static networkAuthenticationRequired=(e,r,n,i)=>this.#e(R.HttpStatusCode.NETWORK_AUTHENTICATION_REQUIRED,e,r,n,i)};Eo.HttpProblems=gu});var _u=g(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.generateCorsHeaders=qr.findMatchingOrigin=void 0;var Aw=o((t,e)=>{if(e!==null)if(t){let r=wo(t).split(",");if(r.find(c=>c==="*"))return e;let i=r.map(c=>c.trim().toLowerCase()),s=e.toLowerCase();return i.find(c=>c===s)}else return},"findMatchingOrigin");qr.findMatchingOrigin=Aw;var Pw=o((t,e)=>{let r={"access-control-allow-origin":e};t.allowedHeaders&&(r["access-control-allow-headers"]=wo(t.allowedHeaders)),t.allowedMethods&&(r["access-control-allow-methods"]=wo(t.allowedMethods)),t.exposeHeaders&&(r["access-control-expose-headers"]=wo(t.exposeHeaders));let n=t.allowCredentials?.toString()??void 0;n&&(r["access-control-allow-credentials"]=n);let i=t.maxAge?.toString()??void 0;return i&&(r["access-control-max-age"]=i),r},"generateCorsHeaders");qr.generateCorsHeaders=Pw;var wo=o(t=>Array.isArray(t)?t.map(e=>e.trim()).join(", "):t,"normalizePolicies")});var vh=g(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.registerCorsRoute=void 0;var Rw=D(),Ow=Vt(),bu=ve(),xw=Tr(),Nw=Sr(),Cw=ft(),wh=_u(),Lw=o((t,e)=>{let r=e.routeData.corsPolicies,n=o(async(a,c)=>{let u=new URL(a.url.toString()).pathname,l=a.headers.get("access-control-request-method"),d=a.headers.get("access-control-request-headers"),p=a.headers.get("origin");if(p===null||l===null)return bu.HttpProblems.badRequest(a,c,{detail:"Expect headers origin and access-control-request-method"});let m=t.lookup(l,u);if(!m)return bu.HttpProblems.notFound(a,c);let f=m.routeConfiguration,y=Dw(l,d,p,f,r);return y.isValid?new Response(void 0,{status:200,statusText:"OK",headers:y.headers}):bu.HttpProblems.notFound(a,c)},"optionsHandler"),i=new Ow.Pipeline([xw.metricsProcessor],n,e),s=new Cw.SystemRouteConfiguration({label:"SYSTEM_CORS_ROUTE",methods:["OPTIONS"],path:"/(.*)",systemRouteName:Nw.SystemRouteName.CorsPreflight});t.addRoute(s,i.execute)},"registerCorsRoute");vo.registerCorsRoute=Lw;var Dw=o((t,e,r,n,i)=>{let s={isValid:!1,headers:{}};if(n.corsPolicy==="anything-goes")return{isValid:!0,headers:{"access-control-allow-origin":r,"access-control-allow-methods":t,"access-control-allow-headers":e??"*","access-control-expose-headers":"*","access-control-allow-credentials":"true","access-control-max-age":"600"}};if(n.corsPolicy==="none")return s;let a=i?.find(l=>l.name===n.corsPolicy);if(!a)throw new Rw.ConfigurationError(`Invalid Configuration - corsPolicy '${n.corsPolicy}' not found in *.oas.json 'corsPolicies' section`);let c=(0,wh.findMatchingOrigin)(a.allowedOrigins,r);return c?{isValid:!0,headers:(0,wh.generateCorsHeaders)(a,c)}:s},"validateAndBuildResponseHeaders")});var Th=g(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.registerNoRoutes=void 0;var Uw=Vt(),Mw=Tr(),kw=Sr(),Fw=ft(),Hw=o((t,e)=>{let r=o(async()=>new Response("You have no routes. Add a route in routes.oas.json to get started",{status:200}),"noRoutesHandler"),n=new Uw.Pipeline([Mw.metricsProcessor],r,e),i=new Fw.SystemRouteConfiguration({label:"SYSTEM_NO_ROUTES",methods:["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"],path:"/(.*)",systemRouteName:kw.SystemRouteName.EmptyGatewayCatchall});t.addRoute(i,n.execute)},"registerNoRoutes");To.registerNoRoutes=Hw});var Sh=g(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.registerNotMatchedHandler=Ir.notFoundRouteConfiguration=void 0;var qw=wr(),$w=Rt(),jw=Vt(),Vw=ve(),Gw=Tr(),Bw=Sr(),Kw=ft();Ir.notFoundRouteConfiguration=new Kw.SystemRouteConfiguration({label:"SYSTEM_NOT_FOUND_ROUTE",methods:["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"],path:"/(.*)",systemRouteName:Bw.SystemRouteName.UnmatchedPath});var Jw=o((t,e)=>{let r=o(async(i,s)=>{let a=$w.runtimeExtensions.value?.notFoundHandler;if(a){let c=qw.ZuploContextExtensions.getContextExtensions(s);return a(i,s,{routesMatchedByPathOnly:c.pathOnlyMatches??[]})}return Vw.HttpProblems.notFound(i,s)},"notFoundHandler"),n=new jw.Pipeline([Gw.metricsProcessor],r,e);t.addRoute(Ir.notFoundRouteConfiguration,n.execute)},"registerNotMatchedHandler");Ir.registerNotMatchedHandler=Jw});var Eu=g(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.corsProcessor=void 0;var Ph=D(),Ih=_u(),zw=["access-control-allow-origin","access-control-allow-headers","access-control-expose-headers","access-control-allow-credentials","access-control-max-age"],Ah=o(t=>{zw.forEach(e=>t.delete(e))},"stripCorsHeaders"),Ww=o(async(t,e,r,n)=>{let i=e.route;if(!i.corsPolicy||i.corsPolicy==="none"){let d=await n(t),p=new Headers(d.headers);return Ah(p),new Response(d.body,{status:d.status,statusText:d.statusText,headers:p,webSocket:d.webSocket})}let s=await n(t);if(!(s instanceof Response))throw new Ph.SystemError(`The CorsProcessor is in the wrong place in the pipeline. It should only receive HttpResponse type but got '${typeof s}'`);let a=Qw(i,r.routeData.corsPolicies),c=Yw(t,a),u=new Headers(s.headers);return Ah(u),Object.entries(c).forEach(([d,p])=>{u.set(d,p)}),new Response(s.body,{status:s.status,statusText:s.statusText,headers:u,webSocket:s.webSocket})},"corsProcessor");So.corsProcessor=Ww;var Qw=o((t,e)=>{if(t.corsPolicy==="anything-goes")return{name:"anything-goes",allowedHeaders:["*"],allowedOrigins:["*"],allowedMethods:t.methods,exposeHeaders:["*"],allowCredentials:!0,maxAge:600};let r=e?.find(n=>n.name===t.corsPolicy);if(r===void 0)throw new Ph.ConfigurationError(`Invalid Configuration - no corsPolicy '${t.corsPolicy}' found in *.oas.json`);return r},"getCorsPolicy"),Yw=o((t,e)=>{let r=(0,Ih.findMatchingOrigin)(e.allowedOrigins,t.headers.get("origin"));return r?(0,Ih.generateCorsHeaders)(e,r):{}},"getCorsHeaders")});var Rh=g(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.registerPingRoute=void 0;var Zw=Vt(),Xw=Eu(),ev=Sr(),tv=ft(),rv=o((t,e)=>{let r=o(async()=>new Response(null,{status:200}),"pingRouteHandler"),n=new Zw.Pipeline([Xw.corsProcessor],r,e),i=new tv.SystemRouteConfiguration({corsPolicy:"anything-goes",label:"SYSTEM_PING_ROUTE",methods:["GET"],path:"/__zuplo/ping",systemRouteName:ev.SystemRouteName.Ping});t.addRoute(i,n.execute)},"registerPingRoute");Io.registerPingRoute=rv});var xh=g(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.deepFreeze=void 0;function Oh(t){for(let e in t){let r=t[e];r&&typeof r=="object"&&Oh(r)}return Object.freeze(t)}o(Oh,"deepFreeze");Ao.deepFreeze=Oh});var Wn=g(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.ZuploRequest=void 0;var Nh=xh(),wu=class t extends Request{static{o(this,"ZuploRequest")}#e=void 0;#t;constructor(e,r){super(e,r);let n=r?.params;n?this.#t=n:e instanceof t?this.#t=e.#t:this.#t={};let i=r?.user;i?this.user=i:e instanceof t&&(this.user=e.user)}get query(){if(this.#e===void 0){this.#e={};let e=new URL(this.url).searchParams;for(let[r,n]of e.entries())this.#e[r]=n}return(0,Nh.deepFreeze)(this.#e)}get params(){return(0,Nh.deepFreeze)(this.#t)}user};Po.ZuploRequest=wu});var Qn=g(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.policyProcessor=xt.toStackedInboundHandler=xt.getInboundPolicyHandlerAndOptions=void 0;var nv=wr(),$r=D(),Ch=Wn();function Lh(t,e){let r,n;return Array.isArray(t)?r=t:(r=t.policies?.inbound??[],n=t.path),r.map(s=>{let a=e?.find(u=>u.name===s);if(!a)throw new $r.ConfigurationError(`Invalid state - no Policy with the name '${s}' ${n&&`on route '${n}'`} was found in the policies configuration (check case).`);let c;if(typeof a.handler?.module=="object"&&(c=a.handler?.module[a.handler.export]),typeof c!="function")throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${s}' ${n&&`on route '${n}'`}. Expected a function, received '${typeof c}'`);return{exportName:a.handler.export,handler:c,options:a.handler.options,policyName:a.name}})}o(Lh,"getInboundPolicyHandlerAndOptions");xt.getInboundPolicyHandlerAndOptions=Lh;function iv(t,e){return(t.policies?.outbound??[]).map(i=>{let s=e?.find(c=>c.name===i);if(!s)throw new $r.ConfigurationError(`Invalid state - no Policy with the name '${i}' on route '${t.path}' was found in the policies configuration (check case).`);let a;if(typeof s.handler?.module=="object"&&(a=s.handler?.module[s.handler.export]),typeof a!="function")throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${i}' on route '${t.path}'`);return{exportName:s.handler.export,handler:a,options:s.handler.options,policyName:s.name}})}o(iv,"getOutboundPolicyHandlerAndOptions");var ov=o(t=>async(e,r)=>{let n=nv.ZuploContextExtensions.getContextExtensions(r),i=[...t],s=e;for(;i.length>0;){let a=i.shift();if(!a)return s;let c=await a.handler(s,r,a.options,a.policyName);if(c instanceof Ch.ZuploRequest)s=c;else if(c instanceof Request)s=new Ch.ZuploRequest(c);else{if(c instanceof Response)return c;throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${a.policyName}'${a.routeName?` on route '${a.routeName}`:""}. The result of an inbound policy must be a Response or Request.`)}n.latestRequest=s}return s},"toStackedInboundHandler");xt.toStackedInboundHandler=ov;var sv=o(t=>async(e,r,n)=>{let i=[...t],s=e;for(;i.length>0;){let a=i.shift();if(!a)return s;let c=await a.handler(s,r,n,a.options,a.policyName);if(!(c instanceof Response))throw new $r.ConfigurationError(`Invalid state - invalid handler on policy '${a.policyName}'${a.routeName?` on route '${a.routeName}`:""}. The result of an outbound policy must be a Response.`);s=c}return s},"toStackedOutboundHandler"),av=o(async(t,e,r,n)=>{let i=Lh(e.route,r.routeData.policies),s=iv(e.route,r.routeData.policies),a=(0,xt.toStackedInboundHandler)(i);try{let c=await a(t,e);if(c instanceof Response)return c;let u=await n(c),l=sv(s);return u.ok?l(u,t,e):u}catch(c){return e.log.error(c),r.errorHandler(t,e,c)}},"policyProcessor");xt.policyProcessor=av});var Dh=g(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.serialize=jr.parse=void 0;var cv=Object.prototype.toString,Ro=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function uv(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");let r={},i=(e||{}).decode||dv,s=0;for(;s<t.length;){let a=t.indexOf("=",s);if(a===-1)break;let c=t.indexOf(";",s);if(c===-1)c=t.length;else if(c<a){s=t.lastIndexOf(";",a-1)+1;continue}let u=t.slice(s,a).trim();if(r[u]===void 0){let l=t.slice(a+1,c).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1)),r[u]=fv(l,i)}s=c+1}return r}o(uv,"parse");jr.parse=uv;function lv(t,e,r){let n=r||{},i=n.encode||pv;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Ro.test(t))throw new TypeError("argument name is invalid");let s=i(e);if(s&&!Ro.test(s))throw new TypeError("argument val is invalid");let a=t+"="+s;if(n.maxAge!=null){let c=n.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(n.domain){if(!Ro.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!Ro.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){let c=n.expires;if(!hv(c)||isNaN(c.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+c.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}o(lv,"serialize");jr.serialize=lv;function dv(t){return t.indexOf("%")!==-1?decodeURIComponent(t):t}o(dv,"decode");function pv(t){return encodeURIComponent(t)}o(pv,"encode");function hv(t){return cv.call(t)==="[object Date]"||t instanceof Date}o(hv,"isDate");function fv(t,e){try{return e(t)}catch{return t}}o(fv,"tryDecode")});var Uh=g(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.devPortalBaseURL=void 0;var mv=Dh();function yv(t,e){try{let r=/v\d+(-\d+)?/g,i=(0,mv.parse)(e.get("Cookie")||"")["zp-dev-portal"];return i!==null&&i&&r.test(i)?`https://dev-portal-${i}.zuplo.com`:t}catch{}return t}o(yv,"devPortalBaseURL");Oo.devPortalBaseURL=yv});var qh=g(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.registerDevPortalLegacyRedirectRoute=Vr.registerDevPortalV3Route=void 0;var vu=Ot(),kh=Vt(),Fh=Tr(),gv=Qn(),Hh=ft(),_v=Uh(),Bt=te(),Mh="/__zuplo/dev-portal",bv="dev-portal-id",Ev="dev-portal-host",wv="zp-account",vv="zp-project",Tv="dev-portal-build",Sv=`
|
|
36
36
|
<!DOCTYPE html>
|
|
37
37
|
<html lang="en">
|
|
38
38
|
<head>
|