@zuplo/core 5.2343.0 → 5.2345.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 +3 -3
- package/package.json +1 -1
package/index.minified.js
CHANGED
|
@@ -317,9 +317,9 @@ No Segments
|
|
|
317
317
|
`;for(let r=0;r<e._capnp.segments.length;r++){t+=`================
|
|
318
318
|
Segment #${r}
|
|
319
319
|
================
|
|
320
|
-
`;let{buffer:n,byteLength:i}=e._capnp.segments[r],o=new Uint8Array(n,0,i);t+=k_.dumpBuffer(o)}return t}s(_B,"dump");It.dump=_B;function gB(e,t){let r=new e(t.getSegment(0),0);Qde.validate(dA.PointerType.STRUCT,r);let n=Qde.getTargetStructSize(r);return(n.dataByteLength<e._capnp.size.dataByteLength||n.pointerLength<e._capnp.size.pointerLength)&&(Ca("need to resize root struct %s",r),Zde.resize(e._capnp.size,r)),r}s(gB,"getRoot");It.getRoot=gB;function hA(e,t){let r=t._capnp.segments.length;if(e===0&&r===0){if(ol.Arena.getNumSegments(t._capnp.arena)===0?pA(hb.DEFAULT_BUFFER_SIZE,t):t._capnp.segments[0]=new mB.Segment(0,t,ol.Arena.getBuffer(0,t._capnp.arena)),!t._capnp.segments[0].hasCapacity(8))throw new Error(F_.MSG_SEGMENT_TOO_SMALL);return t._capnp.segments[0].allocate(8),t._capnp.segments[0]}if(e<0||e>=r)throw new Error(k_.format(F_.MSG_SEGMENT_OUT_OF_BOUNDS,e,t));return t._capnp.segments[e]}s(hA,"getSegment");It.getSegment=hA;function yB(e,t){let r=new e(t.getSegment(0),0);return Zde.initStruct(e._capnp.size,r),Ca("Initialized root pointer %s for %s.",r,t),r}s(yB,"initRoot");It.initRoot=yB;function ipe(e){return new dA.Pointer(new Bs(e).getSegment(0),0)}s(ipe,"readRawPointer");It.readRawPointer=ipe;function spe(e,t){dA.Pointer.copyFrom(e,new dA.Pointer(t.getSegment(0),0))}s(spe,"setRoot");It.setRoot=spe;function EB(e){let t=SB(e);e._capnp.segments.length===0&&hA(0,e);let r=e._capnp.segments,n=t.byteLength+r.reduce((a,u)=>a+k_.padToWord(u.byteLength),0),i=new Uint8Array(new ArrayBuffer(n)),o=t.byteLength;return i.set(new Uint8Array(t)),r.forEach(a=>{let u=k_.padToWord(a.byteLength);i.set(new Uint8Array(a.buffer,0,u),o),o+=u}),i.buffer}s(EB,"toArrayBuffer");It.toArrayBuffer=EB;function bB(e){let t=hB.pack(SB(e));e._capnp.segments.length===0&&e.getSegment(0);let r=e._capnp.segments.map(a=>hB.pack(a.buffer,0,k_.padToWord(a.byteLength))),n=t.byteLength+r.reduce((a,u)=>a+u.byteLength,0),i=new Uint8Array(new ArrayBuffer(n)),o=t.byteLength;return i.set(new Uint8Array(t)),r.forEach(a=>{i.set(new Uint8Array(a),o),o+=a.byteLength}),i.buffer}s(bB,"toPackedArrayBuffer");It.toPackedArrayBuffer=bB;function SB(e){let t=e._capnp.segments.length;if(t===0)return new Float64Array(1).buffer;let r=4+t*4+(1-t%2)*4,n=new DataView(new ArrayBuffer(r));return Ca("Writing message stream frame with segment count: %d.",t),n.setUint32(0,t-1,!0),e._capnp.segments.forEach((i,o)=>{Ca("Message segment %d word count: %d.",i.id,i.byteLength/8),n.setUint32(o*4+4,i.byteLength/8,!0)}),n.buffer}s(SB,"getStreamFrame");It.getStreamFrame=SB});var cpe=h(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.ObjectSize=Gs.readRawPointer=Gs.Message=Gs.ListElementSize=void 0;var ape=(at(),ct(ot));ape.__exportStar(Fle(),Gs);var Byt=cr();Object.defineProperty(Gs,"ListElementSize",{enumerable:!0,get:function(){return Byt.ListElementSize}});var upe=ope();Object.defineProperty(Gs,"Message",{enumerable:!0,get:function(){return upe.Message}});Object.defineProperty(Gs,"readRawPointer",{enumerable:!0,get:function(){return upe.readRawPointer}});var Gyt=zd();Object.defineProperty(Gs,"ObjectSize",{enumerable:!0,get:function(){return Gyt.ObjectSize}});ape.__exportStar(lA(),Gs)});var mA=h(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.Uint64=G.Int64=G.getUint8Mask=G.getUint64Mask=G.getUint32Mask=G.getUint16Mask=G.getInt8Mask=G.getInt64Mask=G.getInt32Mask=G.getInt16Mask=G.getFloat64Mask=G.getFloat32Mask=G.getBitMask=G.Void=G.VoidList=G.Uint8List=G.Uint64List=G.Uint32List=G.Uint16List=G.TextList=G.Text=G.Struct=G.Pointer=G.PointerType=G.PointerList=G.Orphan=G.List=G.InterfaceList=G.Interface=G.Int8List=G.Int64List=G.Int32List=G.Int16List=G.Float64List=G.Float32List=G.DataList=G.Data=G.CompositeList=G.BoolList=G.AnyPointerList=G.readRawPointer=G.ObjectSize=G.Message=G.ListElementSize=void 0;var Pe=cpe();Object.defineProperty(G,"ListElementSize",{enumerable:!0,get:function(){return Pe.ListElementSize}});Object.defineProperty(G,"Message",{enumerable:!0,get:function(){return Pe.Message}});Object.defineProperty(G,"ObjectSize",{enumerable:!0,get:function(){return Pe.ObjectSize}});Object.defineProperty(G,"readRawPointer",{enumerable:!0,get:function(){return Pe.readRawPointer}});Object.defineProperty(G,"AnyPointerList",{enumerable:!0,get:function(){return Pe.AnyPointerList}});Object.defineProperty(G,"BoolList",{enumerable:!0,get:function(){return Pe.BoolList}});Object.defineProperty(G,"CompositeList",{enumerable:!0,get:function(){return Pe.CompositeList}});Object.defineProperty(G,"Data",{enumerable:!0,get:function(){return Pe.Data}});Object.defineProperty(G,"DataList",{enumerable:!0,get:function(){return Pe.DataList}});Object.defineProperty(G,"Float32List",{enumerable:!0,get:function(){return Pe.Float32List}});Object.defineProperty(G,"Float64List",{enumerable:!0,get:function(){return Pe.Float64List}});Object.defineProperty(G,"Int16List",{enumerable:!0,get:function(){return Pe.Int16List}});Object.defineProperty(G,"Int32List",{enumerable:!0,get:function(){return Pe.Int32List}});Object.defineProperty(G,"Int64List",{enumerable:!0,get:function(){return Pe.Int64List}});Object.defineProperty(G,"Int8List",{enumerable:!0,get:function(){return Pe.Int8List}});Object.defineProperty(G,"Interface",{enumerable:!0,get:function(){return Pe.Interface}});Object.defineProperty(G,"InterfaceList",{enumerable:!0,get:function(){return Pe.InterfaceList}});Object.defineProperty(G,"List",{enumerable:!0,get:function(){return Pe.List}});Object.defineProperty(G,"Orphan",{enumerable:!0,get:function(){return Pe.Orphan}});Object.defineProperty(G,"PointerList",{enumerable:!0,get:function(){return Pe.PointerList}});Object.defineProperty(G,"PointerType",{enumerable:!0,get:function(){return Pe.PointerType}});Object.defineProperty(G,"Pointer",{enumerable:!0,get:function(){return Pe.Pointer}});Object.defineProperty(G,"Struct",{enumerable:!0,get:function(){return Pe.Struct}});Object.defineProperty(G,"Text",{enumerable:!0,get:function(){return Pe.Text}});Object.defineProperty(G,"TextList",{enumerable:!0,get:function(){return Pe.TextList}});Object.defineProperty(G,"Uint16List",{enumerable:!0,get:function(){return Pe.Uint16List}});Object.defineProperty(G,"Uint32List",{enumerable:!0,get:function(){return Pe.Uint32List}});Object.defineProperty(G,"Uint64List",{enumerable:!0,get:function(){return Pe.Uint64List}});Object.defineProperty(G,"Uint8List",{enumerable:!0,get:function(){return Pe.Uint8List}});Object.defineProperty(G,"VoidList",{enumerable:!0,get:function(){return Pe.VoidList}});Object.defineProperty(G,"Void",{enumerable:!0,get:function(){return Pe.Void}});Object.defineProperty(G,"getBitMask",{enumerable:!0,get:function(){return Pe.getBitMask}});Object.defineProperty(G,"getFloat32Mask",{enumerable:!0,get:function(){return Pe.getFloat32Mask}});Object.defineProperty(G,"getFloat64Mask",{enumerable:!0,get:function(){return Pe.getFloat64Mask}});Object.defineProperty(G,"getInt16Mask",{enumerable:!0,get:function(){return Pe.getInt16Mask}});Object.defineProperty(G,"getInt32Mask",{enumerable:!0,get:function(){return Pe.getInt32Mask}});Object.defineProperty(G,"getInt64Mask",{enumerable:!0,get:function(){return Pe.getInt64Mask}});Object.defineProperty(G,"getInt8Mask",{enumerable:!0,get:function(){return Pe.getInt8Mask}});Object.defineProperty(G,"getUint16Mask",{enumerable:!0,get:function(){return Pe.getUint16Mask}});Object.defineProperty(G,"getUint32Mask",{enumerable:!0,get:function(){return Pe.getUint32Mask}});Object.defineProperty(G,"getUint64Mask",{enumerable:!0,get:function(){return Pe.getUint64Mask}});Object.defineProperty(G,"getUint8Mask",{enumerable:!0,get:function(){return Pe.getUint8Mask}});var lpe=BN();Object.defineProperty(G,"Int64",{enumerable:!0,get:function(){return lpe.Int64}});Object.defineProperty(G,"Uint64",{enumerable:!0,get:function(){return lpe.Uint64}})});var PB=h(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.Extension=M.Extension_Module=M.TlsOptions=M.TlsOptions_Version=M.TlsOptions_Keypair=M.HttpOptions=M.HttpOptions_Header=M.HttpOptions_Style=M.DiskDirectory=M.Network=M.ExternalServer=M.ExternalServer_Which=M.ExternalServer_Tcp=M.ExternalServer_Https=M.Worker=M.Worker_Which=M.Worker_DurableObjectStorage=M.Worker_DurableObjectStorage_Which=M.Worker_DurableObjectNamespace=M.Worker_DurableObjectNamespace_Which=M.Worker_Binding=M.Worker_Binding_Which=M.Worker_Binding_MemoryCache=M.Worker_Binding_Hyperdrive=M.Worker_Binding_Parameter=M.Worker_Binding_WrappedBinding=M.Worker_Binding_MemoryCacheLimits=M.Worker_Binding_CryptoKey=M.Worker_Binding_CryptoKey_Which=M.Worker_Binding_CryptoKey_Algorithm=M.Worker_Binding_CryptoKey_Algorithm_Which=M.Worker_Binding_CryptoKey_Usage=M.Worker_Binding_DurableObjectNamespaceDesignator=M.Worker_Binding_Type=M.Worker_Binding_Type_Which=M.Worker_Module=M.Worker_Module_Which=M.ServiceDesignator=M.Service=M.Service_Which=M.Socket=M.Socket_Which=M.Socket_Https=M.Config=M._capnpFileId=void 0;var We=mA(),p=mA();M._capnpFileId="e6afd26682091c01";var tp=class e extends p.Struct{static{s(this,"Config")}adoptServices(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownServices(){return p.Struct.disown(this.getServices())}getServices(){return p.Struct.getList(0,e._Services,this)}hasServices(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initServices(t){return p.Struct.initList(0,e._Services,t,this)}setServices(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}adoptSockets(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownSockets(){return p.Struct.disown(this.getSockets())}getSockets(){return p.Struct.getList(1,e._Sockets,this)}hasSockets(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initSockets(t){return p.Struct.initList(1,e._Sockets,t,this)}setSockets(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptV8Flags(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownV8Flags(){return p.Struct.disown(this.getV8Flags())}getV8Flags(){return p.Struct.getList(2,We.TextList,this)}hasV8Flags(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initV8Flags(t){return p.Struct.initList(2,We.TextList,t,this)}setV8Flags(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptExtensions(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownExtensions(){return p.Struct.disown(this.getExtensions())}getExtensions(){return p.Struct.getList(3,e._Extensions,this)}hasExtensions(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initExtensions(t){return p.Struct.initList(3,e._Extensions,t,this)}setExtensions(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}adoptAutogates(t){p.Struct.adopt(t,p.Struct.getPointer(4,this))}disownAutogates(){return p.Struct.disown(this.getAutogates())}getAutogates(){return p.Struct.getList(4,We.TextList,this)}hasAutogates(){return!p.Struct.isNull(p.Struct.getPointer(4,this))}initAutogates(t){return p.Struct.initList(4,We.TextList,t,this)}setAutogates(t){p.Struct.copyFrom(t,p.Struct.getPointer(4,this))}toString(){return"Config_"+super.toString()}};M.Config=tp;tp._capnp={displayName:"Config",id:"8794486c76aaa7d6",size:new p.ObjectSize(0,5)};var B_=class extends p.Struct{static{s(this,"Socket_Https")}adoptOptions(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownOptions(){return p.Struct.disown(this.getOptions())}getOptions(){return p.Struct.getStruct(2,Rn,this)}hasOptions(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initOptions(){return p.Struct.initStructAt(2,Rn,this)}setOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(3,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initTlsOptions(){return p.Struct.initStructAt(3,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}toString(){return"Socket_Https_"+super.toString()}};M.Socket_Https=B_;B_._capnp={displayName:"https",id:"de123876383cbbdc",size:new p.ObjectSize(8,5)};var vB;(function(e){e[e.HTTP=0]="HTTP",e[e.HTTPS=1]="HTTPS"})(vB=M.Socket_Which||(M.Socket_Which={}));var rp=class extends p.Struct{static{s(this,"Socket")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getAddress(){return p.Struct.getText(1,this)}setAddress(t){p.Struct.setText(1,t,this)}adoptHttp(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownHttp(){return p.Struct.disown(this.getHttp())}getHttp(){return p.Struct.testWhich("http",p.Struct.getUint16(0,this),0,this),p.Struct.getStruct(2,Rn,this)}hasHttp(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initHttp(){return p.Struct.setUint16(0,0,this),p.Struct.initStructAt(2,Rn,this)}isHttp(){return p.Struct.getUint16(0,this)===0}setHttp(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}getHttps(){return p.Struct.testWhich("https",p.Struct.getUint16(0,this),1,this),p.Struct.getAs(B_,this)}initHttps(){return p.Struct.setUint16(0,1,this),p.Struct.getAs(B_,this)}isHttps(){return p.Struct.getUint16(0,this)===1}setHttps(){p.Struct.setUint16(0,1,this)}adoptService(t){p.Struct.adopt(t,p.Struct.getPointer(4,this))}disownService(){return p.Struct.disown(this.getService())}getService(){return p.Struct.getStruct(4,Xt,this)}hasService(){return!p.Struct.isNull(p.Struct.getPointer(4,this))}initService(){return p.Struct.initStructAt(4,Xt,this)}setService(t){p.Struct.copyFrom(t,p.Struct.getPointer(4,this))}toString(){return"Socket_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Socket=rp;rp.HTTP=vB.HTTP;rp.HTTPS=vB.HTTPS;rp._capnp={displayName:"Socket",id:"9a0eba45530ee79f",size:new p.ObjectSize(8,5)};var X_;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.WORKER=1]="WORKER",e[e.NETWORK=2]="NETWORK",e[e.EXTERNAL=3]="EXTERNAL",e[e.DISK=4]="DISK"})(X_=M.Service_Which||(M.Service_Which={}));var $a=class extends p.Struct{static{s(this,"Service")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}isUnspecified(){return p.Struct.getUint16(0,this)===0}setUnspecified(){p.Struct.setUint16(0,0,this)}adoptWorker(t){p.Struct.setUint16(0,1,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWorker(){return p.Struct.disown(this.getWorker())}getWorker(){return p.Struct.testWhich("worker",p.Struct.getUint16(0,this),1,this),p.Struct.getStruct(1,ti,this)}hasWorker(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWorker(){return p.Struct.setUint16(0,1,this),p.Struct.initStructAt(1,ti,this)}isWorker(){return p.Struct.getUint16(0,this)===1}setWorker(t){p.Struct.setUint16(0,1,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptNetwork(t){p.Struct.setUint16(0,2,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownNetwork(){return p.Struct.disown(this.getNetwork())}getNetwork(){return p.Struct.testWhich("network",p.Struct.getUint16(0,this),2,this),p.Struct.getStruct(1,W_,this)}hasNetwork(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initNetwork(){return p.Struct.setUint16(0,2,this),p.Struct.initStructAt(1,W_,this)}isNetwork(){return p.Struct.getUint16(0,this)===2}setNetwork(t){p.Struct.setUint16(0,2,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptExternal(t){p.Struct.setUint16(0,3,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownExternal(){return p.Struct.disown(this.getExternal())}getExternal(){return p.Struct.testWhich("external",p.Struct.getUint16(0,this),3,this),p.Struct.getStruct(1,Nu,this)}hasExternal(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initExternal(){return p.Struct.setUint16(0,3,this),p.Struct.initStructAt(1,Nu,this)}isExternal(){return p.Struct.getUint16(0,this)===3}setExternal(t){p.Struct.setUint16(0,3,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptDisk(t){p.Struct.setUint16(0,4,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDisk(){return p.Struct.disown(this.getDisk())}getDisk(){return p.Struct.testWhich("disk",p.Struct.getUint16(0,this),4,this),p.Struct.getStruct(1,Y_,this)}hasDisk(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDisk(){return p.Struct.setUint16(0,4,this),p.Struct.initStructAt(1,Y_,this)}isDisk(){return p.Struct.getUint16(0,this)===4}setDisk(t){p.Struct.setUint16(0,4,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}toString(){return"Service_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Service=$a;$a.UNSPECIFIED=X_.UNSPECIFIED;$a.WORKER=X_.WORKER;$a.NETWORK=X_.NETWORK;$a.EXTERNAL=X_.EXTERNAL;$a.DISK=X_.DISK;$a._capnp={displayName:"Service",id:"e5c88e8bb7bcb6b9",size:new p.ObjectSize(8,2)};var Xt=class extends p.Struct{static{s(this,"ServiceDesignator")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getEntrypoint(){return p.Struct.getText(1,this)}setEntrypoint(t){p.Struct.setText(1,t,this)}toString(){return"ServiceDesignator_"+super.toString()}};M.ServiceDesignator=Xt;Xt._capnp={displayName:"ServiceDesignator",id:"ae8ec91cee724450",size:new p.ObjectSize(0,2)};var Da;(function(e){e[e.ES_MODULE=0]="ES_MODULE",e[e.COMMON_JS_MODULE=1]="COMMON_JS_MODULE",e[e.TEXT=2]="TEXT",e[e.DATA=3]="DATA",e[e.WASM=4]="WASM",e[e.JSON=5]="JSON",e[e.NODE_JS_COMPAT_MODULE=6]="NODE_JS_COMPAT_MODULE",e[e.PYTHON_MODULE=7]="PYTHON_MODULE",e[e.PYTHON_REQUIREMENT=8]="PYTHON_REQUIREMENT"})(Da=M.Worker_Module_Which||(M.Worker_Module_Which={}));var ei=class extends p.Struct{static{s(this,"Worker_Module")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getEsModule(){return p.Struct.testWhich("esModule",p.Struct.getUint16(0,this),0,this),p.Struct.getText(1,this)}isEsModule(){return p.Struct.getUint16(0,this)===0}setEsModule(t){p.Struct.setUint16(0,0,this),p.Struct.setText(1,t,this)}getCommonJsModule(){return p.Struct.testWhich("commonJsModule",p.Struct.getUint16(0,this),1,this),p.Struct.getText(1,this)}isCommonJsModule(){return p.Struct.getUint16(0,this)===1}setCommonJsModule(t){p.Struct.setUint16(0,1,this),p.Struct.setText(1,t,this)}getText(){return p.Struct.testWhich("text",p.Struct.getUint16(0,this),2,this),p.Struct.getText(1,this)}isText(){return p.Struct.getUint16(0,this)===2}setText(t){p.Struct.setUint16(0,2,this),p.Struct.setText(1,t,this)}adoptData(t){p.Struct.setUint16(0,3,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownData(){return p.Struct.disown(this.getData())}getData(){return p.Struct.testWhich("data",p.Struct.getUint16(0,this),3,this),p.Struct.getData(1,this)}hasData(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initData(t){return p.Struct.setUint16(0,3,this),p.Struct.initData(1,t,this)}isData(){return p.Struct.getUint16(0,this)===3}setData(t){p.Struct.setUint16(0,3,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptWasm(t){p.Struct.setUint16(0,4,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWasm(){return p.Struct.disown(this.getWasm())}getWasm(){return p.Struct.testWhich("wasm",p.Struct.getUint16(0,this),4,this),p.Struct.getData(1,this)}hasWasm(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWasm(t){return p.Struct.setUint16(0,4,this),p.Struct.initData(1,t,this)}isWasm(){return p.Struct.getUint16(0,this)===4}setWasm(t){p.Struct.setUint16(0,4,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getJson(){return p.Struct.testWhich("json",p.Struct.getUint16(0,this),5,this),p.Struct.getText(1,this)}isJson(){return p.Struct.getUint16(0,this)===5}setJson(t){p.Struct.setUint16(0,5,this),p.Struct.setText(1,t,this)}getNodeJsCompatModule(){return p.Struct.testWhich("nodeJsCompatModule",p.Struct.getUint16(0,this),6,this),p.Struct.getText(1,this)}isNodeJsCompatModule(){return p.Struct.getUint16(0,this)===6}setNodeJsCompatModule(t){p.Struct.setUint16(0,6,this),p.Struct.setText(1,t,this)}getPythonModule(){return p.Struct.testWhich("pythonModule",p.Struct.getUint16(0,this),7,this),p.Struct.getText(1,this)}isPythonModule(){return p.Struct.getUint16(0,this)===7}setPythonModule(t){p.Struct.setUint16(0,7,this),p.Struct.setText(1,t,this)}getPythonRequirement(){return p.Struct.testWhich("pythonRequirement",p.Struct.getUint16(0,this),8,this),p.Struct.getText(1,this)}isPythonRequirement(){return p.Struct.getUint16(0,this)===8}setPythonRequirement(t){p.Struct.setUint16(0,8,this),p.Struct.setText(1,t,this)}toString(){return"Worker_Module_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Module=ei;ei.ES_MODULE=Da.ES_MODULE;ei.COMMON_JS_MODULE=Da.COMMON_JS_MODULE;ei.TEXT=Da.TEXT;ei.DATA=Da.DATA;ei.WASM=Da.WASM;ei.JSON=Da.JSON;ei.NODE_JS_COMPAT_MODULE=Da.NODE_JS_COMPAT_MODULE;ei.PYTHON_MODULE=Da.PYTHON_MODULE;ei.PYTHON_REQUIREMENT=Da.PYTHON_REQUIREMENT;ei._capnp={displayName:"Module",id:"d9d87a63770a12f3",size:new p.ObjectSize(8,2)};var ri;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TEXT=1]="TEXT",e[e.DATA=2]="DATA",e[e.JSON=3]="JSON",e[e.WASM=4]="WASM",e[e.CRYPTO_KEY=5]="CRYPTO_KEY",e[e.SERVICE=6]="SERVICE",e[e.DURABLE_OBJECT_NAMESPACE=7]="DURABLE_OBJECT_NAMESPACE",e[e.KV_NAMESPACE=8]="KV_NAMESPACE",e[e.R2BUCKET=9]="R2BUCKET",e[e.R2ADMIN=10]="R2ADMIN",e[e.QUEUE=11]="QUEUE",e[e.ANALYTICS_ENGINE=12]="ANALYTICS_ENGINE",e[e.HYPERDRIVE=13]="HYPERDRIVE"})(ri=M.Worker_Binding_Type_Which||(M.Worker_Binding_Type_Which={}));var Er=class extends p.Struct{static{s(this,"Worker_Binding_Type")}isUnspecified(){return p.Struct.getUint16(0,this)===0}setUnspecified(){p.Struct.setUint16(0,0,this)}isText(){return p.Struct.getUint16(0,this)===1}setText(){p.Struct.setUint16(0,1,this)}isData(){return p.Struct.getUint16(0,this)===2}setData(){p.Struct.setUint16(0,2,this)}isJson(){return p.Struct.getUint16(0,this)===3}setJson(){p.Struct.setUint16(0,3,this)}isWasm(){return p.Struct.getUint16(0,this)===4}setWasm(){p.Struct.setUint16(0,4,this)}adoptCryptoKey(t){p.Struct.setUint16(0,5,this),p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownCryptoKey(){return p.Struct.disown(this.getCryptoKey())}getCryptoKey(){return p.Struct.testWhich("cryptoKey",p.Struct.getUint16(0,this),5,this),p.Struct.getList(0,We.Uint16List,this)}hasCryptoKey(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initCryptoKey(t){return p.Struct.setUint16(0,5,this),p.Struct.initList(0,We.Uint16List,t,this)}isCryptoKey(){return p.Struct.getUint16(0,this)===5}setCryptoKey(t){p.Struct.setUint16(0,5,this),p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}isService(){return p.Struct.getUint16(0,this)===6}setService(){p.Struct.setUint16(0,6,this)}isDurableObjectNamespace(){return p.Struct.getUint16(0,this)===7}setDurableObjectNamespace(){p.Struct.setUint16(0,7,this)}isKvNamespace(){return p.Struct.getUint16(0,this)===8}setKvNamespace(){p.Struct.setUint16(0,8,this)}isR2Bucket(){return p.Struct.getUint16(0,this)===9}setR2Bucket(){p.Struct.setUint16(0,9,this)}isR2Admin(){return p.Struct.getUint16(0,this)===10}setR2Admin(){p.Struct.setUint16(0,10,this)}isQueue(){return p.Struct.getUint16(0,this)===11}setQueue(){p.Struct.setUint16(0,11,this)}isAnalyticsEngine(){return p.Struct.getUint16(0,this)===12}setAnalyticsEngine(){p.Struct.setUint16(0,12,this)}isHyperdrive(){return p.Struct.getUint16(0,this)===13}setHyperdrive(){p.Struct.setUint16(0,13,this)}toString(){return"Worker_Binding_Type_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Binding_Type=Er;Er.UNSPECIFIED=ri.UNSPECIFIED;Er.TEXT=ri.TEXT;Er.DATA=ri.DATA;Er.JSON=ri.JSON;Er.WASM=ri.WASM;Er.CRYPTO_KEY=ri.CRYPTO_KEY;Er.SERVICE=ri.SERVICE;Er.DURABLE_OBJECT_NAMESPACE=ri.DURABLE_OBJECT_NAMESPACE;Er.KV_NAMESPACE=ri.KV_NAMESPACE;Er.R2BUCKET=ri.R2BUCKET;Er.R2ADMIN=ri.R2ADMIN;Er.QUEUE=ri.QUEUE;Er.ANALYTICS_ENGINE=ri.ANALYTICS_ENGINE;Er.HYPERDRIVE=ri.HYPERDRIVE;Er._capnp={displayName:"Type",id:"8906a1296519bf8a",size:new p.ObjectSize(8,1)};var np=class extends p.Struct{static{s(this,"Worker_Binding_DurableObjectNamespaceDesignator")}getClassName(){return p.Struct.getText(0,this)}setClassName(t){p.Struct.setText(0,t,this)}getServiceName(){return p.Struct.getText(1,this)}setServiceName(t){p.Struct.setText(1,t,this)}toString(){return"Worker_Binding_DurableObjectNamespaceDesignator_"+super.toString()}};M.Worker_Binding_DurableObjectNamespaceDesignator=np;np._capnp={displayName:"DurableObjectNamespaceDesignator",id:"804f144ff477aac7",size:new p.ObjectSize(0,2)};var fpe;(function(e){e[e.ENCRYPT=0]="ENCRYPT",e[e.DECRYPT=1]="DECRYPT",e[e.SIGN=2]="SIGN",e[e.VERIFY=3]="VERIFY",e[e.DERIVE_KEY=4]="DERIVE_KEY",e[e.DERIVE_BITS=5]="DERIVE_BITS",e[e.WRAP_KEY=6]="WRAP_KEY",e[e.UNWRAP_KEY=7]="UNWRAP_KEY"})(fpe=M.Worker_Binding_CryptoKey_Usage||(M.Worker_Binding_CryptoKey_Usage={}));var OB;(function(e){e[e.NAME=0]="NAME",e[e.JSON=1]="JSON"})(OB=M.Worker_Binding_CryptoKey_Algorithm_Which||(M.Worker_Binding_CryptoKey_Algorithm_Which={}));var al=class extends p.Struct{static{s(this,"Worker_Binding_CryptoKey_Algorithm")}getName(){return p.Struct.testWhich("name",p.Struct.getUint16(2,this),0,this),p.Struct.getText(1,this)}isName(){return p.Struct.getUint16(2,this)===0}setName(t){p.Struct.setUint16(2,0,this),p.Struct.setText(1,t,this)}getJson(){return p.Struct.testWhich("json",p.Struct.getUint16(2,this),1,this),p.Struct.getText(1,this)}isJson(){return p.Struct.getUint16(2,this)===1}setJson(t){p.Struct.setUint16(2,1,this),p.Struct.setText(1,t,this)}toString(){return"Worker_Binding_CryptoKey_Algorithm_"+super.toString()}which(){return p.Struct.getUint16(2,this)}};M.Worker_Binding_CryptoKey_Algorithm=al;al.NAME=OB.NAME;al.JSON=OB.JSON;al._capnp={displayName:"algorithm",id:"a1a040c5e00d7021",size:new p.ObjectSize(8,3)};var up;(function(e){e[e.RAW=0]="RAW",e[e.HEX=1]="HEX",e[e.BASE64=2]="BASE64",e[e.PKCS8=3]="PKCS8",e[e.SPKI=4]="SPKI",e[e.JWK=5]="JWK"})(up=M.Worker_Binding_CryptoKey_Which||(M.Worker_Binding_CryptoKey_Which={}));var $i=class e extends p.Struct{static{s(this,"Worker_Binding_CryptoKey")}adoptRaw(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownRaw(){return p.Struct.disown(this.getRaw())}getRaw(){return p.Struct.testWhich("raw",p.Struct.getUint16(0,this),0,this),p.Struct.getData(0,this)}hasRaw(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initRaw(t){return p.Struct.setUint16(0,0,this),p.Struct.initData(0,t,this)}isRaw(){return p.Struct.getUint16(0,this)===0}setRaw(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}getHex(){return p.Struct.testWhich("hex",p.Struct.getUint16(0,this),1,this),p.Struct.getText(0,this)}isHex(){return p.Struct.getUint16(0,this)===1}setHex(t){p.Struct.setUint16(0,1,this),p.Struct.setText(0,t,this)}getBase64(){return p.Struct.testWhich("base64",p.Struct.getUint16(0,this),2,this),p.Struct.getText(0,this)}isBase64(){return p.Struct.getUint16(0,this)===2}setBase64(t){p.Struct.setUint16(0,2,this),p.Struct.setText(0,t,this)}getPkcs8(){return p.Struct.testWhich("pkcs8",p.Struct.getUint16(0,this),3,this),p.Struct.getText(0,this)}isPkcs8(){return p.Struct.getUint16(0,this)===3}setPkcs8(t){p.Struct.setUint16(0,3,this),p.Struct.setText(0,t,this)}getSpki(){return p.Struct.testWhich("spki",p.Struct.getUint16(0,this),4,this),p.Struct.getText(0,this)}isSpki(){return p.Struct.getUint16(0,this)===4}setSpki(t){p.Struct.setUint16(0,4,this),p.Struct.setText(0,t,this)}getJwk(){return p.Struct.testWhich("jwk",p.Struct.getUint16(0,this),5,this),p.Struct.getText(0,this)}isJwk(){return p.Struct.getUint16(0,this)===5}setJwk(t){p.Struct.setUint16(0,5,this),p.Struct.setText(0,t,this)}getAlgorithm(){return p.Struct.getAs(al,this)}initAlgorithm(){return p.Struct.getAs(al,this)}getExtractable(){return p.Struct.getBit(32,this,e._capnp.defaultExtractable)}setExtractable(t){p.Struct.setBit(32,t,this)}adoptUsages(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownUsages(){return p.Struct.disown(this.getUsages())}getUsages(){return p.Struct.getList(2,We.Uint16List,this)}hasUsages(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initUsages(t){return p.Struct.initList(2,We.Uint16List,t,this)}setUsages(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Worker_Binding_CryptoKey_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Binding_CryptoKey=$i;$i.RAW=up.RAW;$i.HEX=up.HEX;$i.BASE64=up.BASE64;$i.PKCS8=up.PKCS8;$i.SPKI=up.SPKI;$i.JWK=up.JWK;$i.Usage=fpe;$i._capnp={displayName:"CryptoKey",id:"b5e1bff0e57d6eb0",size:new p.ObjectSize(8,3),defaultExtractable:We.getBitMask(!1,0)};var ip=class extends p.Struct{static{s(this,"Worker_Binding_MemoryCacheLimits")}getMaxKeys(){return p.Struct.getUint32(0,this)}setMaxKeys(t){p.Struct.setUint32(0,t,this)}getMaxValueSize(){return p.Struct.getUint32(4,this)}setMaxValueSize(t){p.Struct.setUint32(4,t,this)}getMaxTotalValueSize(){return p.Struct.getUint64(8,this)}setMaxTotalValueSize(t){p.Struct.setUint64(8,t,this)}toString(){return"Worker_Binding_MemoryCacheLimits_"+super.toString()}};M.Worker_Binding_MemoryCacheLimits=ip;ip._capnp={displayName:"MemoryCacheLimits",id:"8d66725b0867e634",size:new p.ObjectSize(16,0)};var ul=class e extends p.Struct{static{s(this,"Worker_Binding_WrappedBinding")}getModuleName(){return p.Struct.getText(0,this)}setModuleName(t){p.Struct.setText(0,t,this)}getEntrypoint(){return p.Struct.getText(1,this,e._capnp.defaultEntrypoint)}setEntrypoint(t){p.Struct.setText(1,t,this)}adoptInnerBindings(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownInnerBindings(){return p.Struct.disown(this.getInnerBindings())}getInnerBindings(){return p.Struct.getList(2,e._InnerBindings,this)}hasInnerBindings(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initInnerBindings(t){return p.Struct.initList(2,e._InnerBindings,t,this)}setInnerBindings(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Worker_Binding_WrappedBinding_"+super.toString()}};M.Worker_Binding_WrappedBinding=ul;ul._capnp={displayName:"WrappedBinding",id:"e6f066b75f0ea113",size:new p.ObjectSize(0,3),defaultEntrypoint:"default"};var G_=class extends p.Struct{static{s(this,"Worker_Binding_Parameter")}adoptType(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownType(){return p.Struct.disown(this.getType())}getType(){return p.Struct.getStruct(1,Er,this)}hasType(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initType(){return p.Struct.initStructAt(1,Er,this)}setType(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getOptional(){return p.Struct.getBit(16,this)}setOptional(t){p.Struct.setBit(16,t,this)}toString(){return"Worker_Binding_Parameter_"+super.toString()}};M.Worker_Binding_Parameter=G_;G_._capnp={displayName:"parameter",id:"dc57e1258d26d152",size:new p.ObjectSize(8,6)};var V_=class extends p.Struct{static{s(this,"Worker_Binding_Hyperdrive")}adoptDesignator(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDesignator(){return p.Struct.disown(this.getDesignator())}getDesignator(){return p.Struct.getStruct(1,Xt,this)}hasDesignator(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDesignator(){return p.Struct.initStructAt(1,Xt,this)}setDesignator(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getDatabase(){return p.Struct.getText(2,this)}setDatabase(t){p.Struct.setText(2,t,this)}getUser(){return p.Struct.getText(3,this)}setUser(t){p.Struct.setText(3,t,this)}getPassword(){return p.Struct.getText(4,this)}setPassword(t){p.Struct.setText(4,t,this)}getScheme(){return p.Struct.getText(5,this)}setScheme(t){p.Struct.setText(5,t,this)}toString(){return"Worker_Binding_Hyperdrive_"+super.toString()}};M.Worker_Binding_Hyperdrive=V_;V_._capnp={displayName:"hyperdrive",id:"ad6c391cd55f3134",size:new p.ObjectSize(8,6)};var z_=class extends p.Struct{static{s(this,"Worker_Binding_MemoryCache")}getId(){return p.Struct.getText(1,this)}setId(t){p.Struct.setText(1,t,this)}adoptLimits(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownLimits(){return p.Struct.disown(this.getLimits())}getLimits(){return p.Struct.getStruct(2,ip,this)}hasLimits(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initLimits(){return p.Struct.initStructAt(2,ip,this)}setLimits(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Worker_Binding_MemoryCache_"+super.toString()}};M.Worker_Binding_MemoryCache=z_;z_._capnp={displayName:"memoryCache",id:"aed5760c349869da",size:new p.ObjectSize(8,6)};var Rr;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.PARAMETER=1]="PARAMETER",e[e.TEXT=2]="TEXT",e[e.DATA=3]="DATA",e[e.JSON=4]="JSON",e[e.WASM_MODULE=5]="WASM_MODULE",e[e.CRYPTO_KEY=6]="CRYPTO_KEY",e[e.SERVICE=7]="SERVICE",e[e.DURABLE_OBJECT_NAMESPACE=8]="DURABLE_OBJECT_NAMESPACE",e[e.KV_NAMESPACE=9]="KV_NAMESPACE",e[e.R2BUCKET=10]="R2BUCKET",e[e.R2ADMIN=11]="R2ADMIN",e[e.WRAPPED=12]="WRAPPED",e[e.QUEUE=13]="QUEUE",e[e.FROM_ENVIRONMENT=14]="FROM_ENVIRONMENT",e[e.ANALYTICS_ENGINE=15]="ANALYTICS_ENGINE",e[e.HYPERDRIVE=16]="HYPERDRIVE",e[e.UNSAFE_EVAL=17]="UNSAFE_EVAL",e[e.MEMORY_CACHE=18]="MEMORY_CACHE"})(Rr=M.Worker_Binding_Which||(M.Worker_Binding_Which={}));var St=class extends p.Struct{static{s(this,"Worker_Binding")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}isUnspecified(){return p.Struct.getUint16(0,this)===0}setUnspecified(){p.Struct.setUint16(0,0,this)}getParameter(){return p.Struct.testWhich("parameter",p.Struct.getUint16(0,this),1,this),p.Struct.getAs(G_,this)}initParameter(){return p.Struct.setUint16(0,1,this),p.Struct.getAs(G_,this)}isParameter(){return p.Struct.getUint16(0,this)===1}setParameter(){p.Struct.setUint16(0,1,this)}getText(){return p.Struct.testWhich("text",p.Struct.getUint16(0,this),2,this),p.Struct.getText(1,this)}isText(){return p.Struct.getUint16(0,this)===2}setText(t){p.Struct.setUint16(0,2,this),p.Struct.setText(1,t,this)}adoptData(t){p.Struct.setUint16(0,3,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownData(){return p.Struct.disown(this.getData())}getData(){return p.Struct.testWhich("data",p.Struct.getUint16(0,this),3,this),p.Struct.getData(1,this)}hasData(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initData(t){return p.Struct.setUint16(0,3,this),p.Struct.initData(1,t,this)}isData(){return p.Struct.getUint16(0,this)===3}setData(t){p.Struct.setUint16(0,3,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getJson(){return p.Struct.testWhich("json",p.Struct.getUint16(0,this),4,this),p.Struct.getText(1,this)}isJson(){return p.Struct.getUint16(0,this)===4}setJson(t){p.Struct.setUint16(0,4,this),p.Struct.setText(1,t,this)}adoptWasmModule(t){p.Struct.setUint16(0,5,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWasmModule(){return p.Struct.disown(this.getWasmModule())}getWasmModule(){return p.Struct.testWhich("wasmModule",p.Struct.getUint16(0,this),5,this),p.Struct.getData(1,this)}hasWasmModule(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWasmModule(t){return p.Struct.setUint16(0,5,this),p.Struct.initData(1,t,this)}isWasmModule(){return p.Struct.getUint16(0,this)===5}setWasmModule(t){p.Struct.setUint16(0,5,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptCryptoKey(t){p.Struct.setUint16(0,6,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownCryptoKey(){return p.Struct.disown(this.getCryptoKey())}getCryptoKey(){return p.Struct.testWhich("cryptoKey",p.Struct.getUint16(0,this),6,this),p.Struct.getStruct(1,$i,this)}hasCryptoKey(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initCryptoKey(){return p.Struct.setUint16(0,6,this),p.Struct.initStructAt(1,$i,this)}isCryptoKey(){return p.Struct.getUint16(0,this)===6}setCryptoKey(t){p.Struct.setUint16(0,6,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptService(t){p.Struct.setUint16(0,7,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownService(){return p.Struct.disown(this.getService())}getService(){return p.Struct.testWhich("service",p.Struct.getUint16(0,this),7,this),p.Struct.getStruct(1,Xt,this)}hasService(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initService(){return p.Struct.setUint16(0,7,this),p.Struct.initStructAt(1,Xt,this)}isService(){return p.Struct.getUint16(0,this)===7}setService(t){p.Struct.setUint16(0,7,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptDurableObjectNamespace(t){p.Struct.setUint16(0,8,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDurableObjectNamespace(){return p.Struct.disown(this.getDurableObjectNamespace())}getDurableObjectNamespace(){return p.Struct.testWhich("durableObjectNamespace",p.Struct.getUint16(0,this),8,this),p.Struct.getStruct(1,np,this)}hasDurableObjectNamespace(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDurableObjectNamespace(){return p.Struct.setUint16(0,8,this),p.Struct.initStructAt(1,np,this)}isDurableObjectNamespace(){return p.Struct.getUint16(0,this)===8}setDurableObjectNamespace(t){p.Struct.setUint16(0,8,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptKvNamespace(t){p.Struct.setUint16(0,9,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownKvNamespace(){return p.Struct.disown(this.getKvNamespace())}getKvNamespace(){return p.Struct.testWhich("kvNamespace",p.Struct.getUint16(0,this),9,this),p.Struct.getStruct(1,Xt,this)}hasKvNamespace(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initKvNamespace(){return p.Struct.setUint16(0,9,this),p.Struct.initStructAt(1,Xt,this)}isKvNamespace(){return p.Struct.getUint16(0,this)===9}setKvNamespace(t){p.Struct.setUint16(0,9,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptR2Bucket(t){p.Struct.setUint16(0,10,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownR2Bucket(){return p.Struct.disown(this.getR2Bucket())}getR2Bucket(){return p.Struct.testWhich("r2Bucket",p.Struct.getUint16(0,this),10,this),p.Struct.getStruct(1,Xt,this)}hasR2Bucket(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initR2Bucket(){return p.Struct.setUint16(0,10,this),p.Struct.initStructAt(1,Xt,this)}isR2Bucket(){return p.Struct.getUint16(0,this)===10}setR2Bucket(t){p.Struct.setUint16(0,10,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptR2Admin(t){p.Struct.setUint16(0,11,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownR2Admin(){return p.Struct.disown(this.getR2Admin())}getR2Admin(){return p.Struct.testWhich("r2Admin",p.Struct.getUint16(0,this),11,this),p.Struct.getStruct(1,Xt,this)}hasR2Admin(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initR2Admin(){return p.Struct.setUint16(0,11,this),p.Struct.initStructAt(1,Xt,this)}isR2Admin(){return p.Struct.getUint16(0,this)===11}setR2Admin(t){p.Struct.setUint16(0,11,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptWrapped(t){p.Struct.setUint16(0,12,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWrapped(){return p.Struct.disown(this.getWrapped())}getWrapped(){return p.Struct.testWhich("wrapped",p.Struct.getUint16(0,this),12,this),p.Struct.getStruct(1,ul,this)}hasWrapped(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWrapped(){return p.Struct.setUint16(0,12,this),p.Struct.initStructAt(1,ul,this)}isWrapped(){return p.Struct.getUint16(0,this)===12}setWrapped(t){p.Struct.setUint16(0,12,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptQueue(t){p.Struct.setUint16(0,13,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownQueue(){return p.Struct.disown(this.getQueue())}getQueue(){return p.Struct.testWhich("queue",p.Struct.getUint16(0,this),13,this),p.Struct.getStruct(1,Xt,this)}hasQueue(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initQueue(){return p.Struct.setUint16(0,13,this),p.Struct.initStructAt(1,Xt,this)}isQueue(){return p.Struct.getUint16(0,this)===13}setQueue(t){p.Struct.setUint16(0,13,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getFromEnvironment(){return p.Struct.testWhich("fromEnvironment",p.Struct.getUint16(0,this),14,this),p.Struct.getText(1,this)}isFromEnvironment(){return p.Struct.getUint16(0,this)===14}setFromEnvironment(t){p.Struct.setUint16(0,14,this),p.Struct.setText(1,t,this)}adoptAnalyticsEngine(t){p.Struct.setUint16(0,15,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownAnalyticsEngine(){return p.Struct.disown(this.getAnalyticsEngine())}getAnalyticsEngine(){return p.Struct.testWhich("analyticsEngine",p.Struct.getUint16(0,this),15,this),p.Struct.getStruct(1,Xt,this)}hasAnalyticsEngine(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initAnalyticsEngine(){return p.Struct.setUint16(0,15,this),p.Struct.initStructAt(1,Xt,this)}isAnalyticsEngine(){return p.Struct.getUint16(0,this)===15}setAnalyticsEngine(t){p.Struct.setUint16(0,15,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getHyperdrive(){return p.Struct.testWhich("hyperdrive",p.Struct.getUint16(0,this),16,this),p.Struct.getAs(V_,this)}initHyperdrive(){return p.Struct.setUint16(0,16,this),p.Struct.getAs(V_,this)}isHyperdrive(){return p.Struct.getUint16(0,this)===16}setHyperdrive(){p.Struct.setUint16(0,16,this)}isUnsafeEval(){return p.Struct.getUint16(0,this)===17}setUnsafeEval(){p.Struct.setUint16(0,17,this)}getMemoryCache(){return p.Struct.testWhich("memoryCache",p.Struct.getUint16(0,this),18,this),p.Struct.getAs(z_,this)}initMemoryCache(){return p.Struct.setUint16(0,18,this),p.Struct.getAs(z_,this)}isMemoryCache(){return p.Struct.getUint16(0,this)===18}setMemoryCache(){p.Struct.setUint16(0,18,this)}toString(){return"Worker_Binding_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Binding=St;St.UNSPECIFIED=Rr.UNSPECIFIED;St.PARAMETER=Rr.PARAMETER;St.TEXT=Rr.TEXT;St.DATA=Rr.DATA;St.JSON=Rr.JSON;St.WASM_MODULE=Rr.WASM_MODULE;St.CRYPTO_KEY=Rr.CRYPTO_KEY;St.SERVICE=Rr.SERVICE;St.DURABLE_OBJECT_NAMESPACE=Rr.DURABLE_OBJECT_NAMESPACE;St.KV_NAMESPACE=Rr.KV_NAMESPACE;St.R2BUCKET=Rr.R2BUCKET;St.R2ADMIN=Rr.R2ADMIN;St.WRAPPED=Rr.WRAPPED;St.QUEUE=Rr.QUEUE;St.FROM_ENVIRONMENT=Rr.FROM_ENVIRONMENT;St.ANALYTICS_ENGINE=Rr.ANALYTICS_ENGINE;St.HYPERDRIVE=Rr.HYPERDRIVE;St.UNSAFE_EVAL=Rr.UNSAFE_EVAL;St.MEMORY_CACHE=Rr.MEMORY_CACHE;St.Type=Er;St.DurableObjectNamespaceDesignator=np;St.CryptoKey=$i;St.MemoryCacheLimits=ip;St.WrappedBinding=ul;St._capnp={displayName:"Binding",id:"8e7e492fd7e35f3e",size:new p.ObjectSize(8,6)};var IB;(function(e){e[e.UNIQUE_KEY=0]="UNIQUE_KEY",e[e.EPHEMERAL_LOCAL=1]="EPHEMERAL_LOCAL"})(IB=M.Worker_DurableObjectNamespace_Which||(M.Worker_DurableObjectNamespace_Which={}));var cl=class extends p.Struct{static{s(this,"Worker_DurableObjectNamespace")}getClassName(){return p.Struct.getText(0,this)}setClassName(t){p.Struct.setText(0,t,this)}getUniqueKey(){return p.Struct.testWhich("uniqueKey",p.Struct.getUint16(0,this),0,this),p.Struct.getText(1,this)}isUniqueKey(){return p.Struct.getUint16(0,this)===0}setUniqueKey(t){p.Struct.setUint16(0,0,this),p.Struct.setText(1,t,this)}isEphemeralLocal(){return p.Struct.getUint16(0,this)===1}setEphemeralLocal(){p.Struct.setUint16(0,1,this)}getPreventEviction(){return p.Struct.getBit(16,this)}setPreventEviction(t){p.Struct.setBit(16,t,this)}toString(){return"Worker_DurableObjectNamespace_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_DurableObjectNamespace=cl;cl.UNIQUE_KEY=IB.UNIQUE_KEY;cl.EPHEMERAL_LOCAL=IB.EPHEMERAL_LOCAL;cl._capnp={displayName:"DurableObjectNamespace",id:"b429dd547d15747d",size:new p.ObjectSize(8,2)};var _A;(function(e){e[e.NONE=0]="NONE",e[e.IN_MEMORY=1]="IN_MEMORY",e[e.LOCAL_DISK=2]="LOCAL_DISK"})(_A=M.Worker_DurableObjectStorage_Which||(M.Worker_DurableObjectStorage_Which={}));var Tu=class extends p.Struct{static{s(this,"Worker_DurableObjectStorage")}isNone(){return p.Struct.getUint16(2,this)===0}setNone(){p.Struct.setUint16(2,0,this)}isInMemory(){return p.Struct.getUint16(2,this)===1}setInMemory(){p.Struct.setUint16(2,1,this)}getLocalDisk(){return p.Struct.testWhich("localDisk",p.Struct.getUint16(2,this),2,this),p.Struct.getText(8,this)}isLocalDisk(){return p.Struct.getUint16(2,this)===2}setLocalDisk(t){p.Struct.setUint16(2,2,this),p.Struct.setText(8,t,this)}toString(){return"Worker_DurableObjectStorage_"+super.toString()}which(){return p.Struct.getUint16(2,this)}};M.Worker_DurableObjectStorage=Tu;Tu.NONE=_A.NONE;Tu.IN_MEMORY=_A.IN_MEMORY;Tu.LOCAL_DISK=_A.LOCAL_DISK;Tu._capnp={displayName:"durableObjectStorage",id:"cc72b3faa57827d4",size:new p.ObjectSize(8,10)};var gA;(function(e){e[e.MODULES=0]="MODULES",e[e.SERVICE_WORKER_SCRIPT=1]="SERVICE_WORKER_SCRIPT",e[e.INHERIT=2]="INHERIT"})(gA=M.Worker_Which||(M.Worker_Which={}));var ti=class e extends p.Struct{static{s(this,"Worker")}adoptModules(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownModules(){return p.Struct.disown(this.getModules())}getModules(){return p.Struct.testWhich("modules",p.Struct.getUint16(0,this),0,this),p.Struct.getList(0,e._Modules,this)}hasModules(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initModules(t){return p.Struct.setUint16(0,0,this),p.Struct.initList(0,e._Modules,t,this)}isModules(){return p.Struct.getUint16(0,this)===0}setModules(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}getServiceWorkerScript(){return p.Struct.testWhich("serviceWorkerScript",p.Struct.getUint16(0,this),1,this),p.Struct.getText(0,this)}isServiceWorkerScript(){return p.Struct.getUint16(0,this)===1}setServiceWorkerScript(t){p.Struct.setUint16(0,1,this),p.Struct.setText(0,t,this)}getInherit(){return p.Struct.testWhich("inherit",p.Struct.getUint16(0,this),2,this),p.Struct.getText(0,this)}isInherit(){return p.Struct.getUint16(0,this)===2}setInherit(t){p.Struct.setUint16(0,2,this),p.Struct.setText(0,t,this)}getCompatibilityDate(){return p.Struct.getText(1,this)}setCompatibilityDate(t){p.Struct.setText(1,t,this)}adoptCompatibilityFlags(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownCompatibilityFlags(){return p.Struct.disown(this.getCompatibilityFlags())}getCompatibilityFlags(){return p.Struct.getList(2,We.TextList,this)}hasCompatibilityFlags(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initCompatibilityFlags(t){return p.Struct.initList(2,We.TextList,t,this)}setCompatibilityFlags(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptBindings(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownBindings(){return p.Struct.disown(this.getBindings())}getBindings(){return p.Struct.getList(3,e._Bindings,this)}hasBindings(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initBindings(t){return p.Struct.initList(3,e._Bindings,t,this)}setBindings(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}adoptGlobalOutbound(t){p.Struct.adopt(t,p.Struct.getPointer(4,this))}disownGlobalOutbound(){return p.Struct.disown(this.getGlobalOutbound())}getGlobalOutbound(){return p.Struct.getStruct(4,Xt,this,e._capnp.defaultGlobalOutbound)}hasGlobalOutbound(){return!p.Struct.isNull(p.Struct.getPointer(4,this))}initGlobalOutbound(){return p.Struct.initStructAt(4,Xt,this)}setGlobalOutbound(t){p.Struct.copyFrom(t,p.Struct.getPointer(4,this))}adoptCacheApiOutbound(t){p.Struct.adopt(t,p.Struct.getPointer(7,this))}disownCacheApiOutbound(){return p.Struct.disown(this.getCacheApiOutbound())}getCacheApiOutbound(){return p.Struct.getStruct(7,Xt,this)}hasCacheApiOutbound(){return!p.Struct.isNull(p.Struct.getPointer(7,this))}initCacheApiOutbound(){return p.Struct.initStructAt(7,Xt,this)}setCacheApiOutbound(t){p.Struct.copyFrom(t,p.Struct.getPointer(7,this))}adoptDurableObjectNamespaces(t){p.Struct.adopt(t,p.Struct.getPointer(5,this))}disownDurableObjectNamespaces(){return p.Struct.disown(this.getDurableObjectNamespaces())}getDurableObjectNamespaces(){return p.Struct.getList(5,e._DurableObjectNamespaces,this)}hasDurableObjectNamespaces(){return!p.Struct.isNull(p.Struct.getPointer(5,this))}initDurableObjectNamespaces(t){return p.Struct.initList(5,e._DurableObjectNamespaces,t,this)}setDurableObjectNamespaces(t){p.Struct.copyFrom(t,p.Struct.getPointer(5,this))}getDurableObjectUniqueKeyModifier(){return p.Struct.getText(6,this)}setDurableObjectUniqueKeyModifier(t){p.Struct.setText(6,t,this)}getDurableObjectStorage(){return p.Struct.getAs(Tu,this)}initDurableObjectStorage(){return p.Struct.getAs(Tu,this)}getModuleFallback(){return p.Struct.getText(9,this)}setModuleFallback(t){p.Struct.setText(9,t,this)}toString(){return"Worker_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker=ti;ti.MODULES=gA.MODULES;ti.SERVICE_WORKER_SCRIPT=gA.SERVICE_WORKER_SCRIPT;ti.INHERIT=gA.INHERIT;ti.Module=ei;ti.Binding=St;ti.DurableObjectNamespace=cl;ti._capnp={displayName:"Worker",id:"acfa77e88fd97d1c",size:new p.ObjectSize(8,10),defaultGlobalOutbound:We.readRawPointer(new Uint8Array([16,5,64,2,17,5,74,0,0,255,105,110,116,101,114,110,101,116,0,0,0]).buffer)};var H_=class extends p.Struct{static{s(this,"ExternalServer_Https")}adoptOptions(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownOptions(){return p.Struct.disown(this.getOptions())}getOptions(){return p.Struct.getStruct(1,Rn,this)}hasOptions(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initOptions(){return p.Struct.initStructAt(1,Rn,this)}setOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(2,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initTlsOptions(){return p.Struct.initStructAt(2,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}getCertificateHost(){return p.Struct.getText(3,this)}setCertificateHost(t){p.Struct.setText(3,t,this)}toString(){return"ExternalServer_Https_"+super.toString()}};M.ExternalServer_Https=H_;H_._capnp={displayName:"https",id:"ac37e02afd3dc6db",size:new p.ObjectSize(8,4)};var K_=class extends p.Struct{static{s(this,"ExternalServer_Tcp")}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(1,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initTlsOptions(){return p.Struct.initStructAt(1,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getCertificateHost(){return p.Struct.getText(2,this)}setCertificateHost(t){p.Struct.setText(2,t,this)}toString(){return"ExternalServer_Tcp_"+super.toString()}};M.ExternalServer_Tcp=K_;K_._capnp={displayName:"tcp",id:"d941637df0fb39f1",size:new p.ObjectSize(8,4)};var yA;(function(e){e[e.HTTP=0]="HTTP",e[e.HTTPS=1]="HTTPS",e[e.TCP=2]="TCP"})(yA=M.ExternalServer_Which||(M.ExternalServer_Which={}));var Nu=class extends p.Struct{static{s(this,"ExternalServer")}getAddress(){return p.Struct.getText(0,this)}setAddress(t){p.Struct.setText(0,t,this)}adoptHttp(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownHttp(){return p.Struct.disown(this.getHttp())}getHttp(){return p.Struct.testWhich("http",p.Struct.getUint16(0,this),0,this),p.Struct.getStruct(1,Rn,this)}hasHttp(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initHttp(){return p.Struct.setUint16(0,0,this),p.Struct.initStructAt(1,Rn,this)}isHttp(){return p.Struct.getUint16(0,this)===0}setHttp(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getHttps(){return p.Struct.testWhich("https",p.Struct.getUint16(0,this),1,this),p.Struct.getAs(H_,this)}initHttps(){return p.Struct.setUint16(0,1,this),p.Struct.getAs(H_,this)}isHttps(){return p.Struct.getUint16(0,this)===1}setHttps(){p.Struct.setUint16(0,1,this)}getTcp(){return p.Struct.testWhich("tcp",p.Struct.getUint16(0,this),2,this),p.Struct.getAs(K_,this)}initTcp(){return p.Struct.setUint16(0,2,this),p.Struct.getAs(K_,this)}isTcp(){return p.Struct.getUint16(0,this)===2}setTcp(){p.Struct.setUint16(0,2,this)}toString(){return"ExternalServer_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.ExternalServer=Nu;Nu.HTTP=yA.HTTP;Nu.HTTPS=yA.HTTPS;Nu.TCP=yA.TCP;Nu._capnp={displayName:"ExternalServer",id:"ff209f9aa352f5a4",size:new p.ObjectSize(8,4)};var W_=class e extends p.Struct{static{s(this,"Network")}adoptAllow(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownAllow(){return p.Struct.disown(this.getAllow())}getAllow(){return p.Struct.getList(0,We.TextList,this,e._capnp.defaultAllow)}hasAllow(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initAllow(t){return p.Struct.initList(0,We.TextList,t,this)}setAllow(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}adoptDeny(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDeny(){return p.Struct.disown(this.getDeny())}getDeny(){return p.Struct.getList(1,We.TextList,this)}hasDeny(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDeny(t){return p.Struct.initList(1,We.TextList,t,this)}setDeny(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(2,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initTlsOptions(){return p.Struct.initStructAt(2,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Network_"+super.toString()}};M.Network=W_;W_._capnp={displayName:"Network",id:"fa42244f950c9b9c",size:new p.ObjectSize(0,3),defaultAllow:We.readRawPointer(new Uint8Array([16,3,17,1,14,17,1,58,63,112,117,98,108,105,99]).buffer)};var Y_=class e extends p.Struct{static{s(this,"DiskDirectory")}getPath(){return p.Struct.getText(0,this)}setPath(t){p.Struct.setText(0,t,this)}getWritable(){return p.Struct.getBit(0,this,e._capnp.defaultWritable)}setWritable(t){p.Struct.setBit(0,t,this)}getAllowDotfiles(){return p.Struct.getBit(1,this,e._capnp.defaultAllowDotfiles)}setAllowDotfiles(t){p.Struct.setBit(1,t,this)}toString(){return"DiskDirectory_"+super.toString()}};M.DiskDirectory=Y_;Y_._capnp={displayName:"DiskDirectory",id:"9048ab22835f51c3",size:new p.ObjectSize(8,1),defaultWritable:We.getBitMask(!1,0),defaultAllowDotfiles:We.getBitMask(!1,1)};var dpe;(function(e){e[e.HOST=0]="HOST",e[e.PROXY=1]="PROXY"})(dpe=M.HttpOptions_Style||(M.HttpOptions_Style={}));var sp=class extends p.Struct{static{s(this,"HttpOptions_Header")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getValue(){return p.Struct.getText(1,this)}setValue(t){p.Struct.setText(1,t,this)}toString(){return"HttpOptions_Header_"+super.toString()}};M.HttpOptions_Header=sp;sp._capnp={displayName:"Header",id:"dc0394b5a6f3417e",size:new p.ObjectSize(0,2)};var Rn=class e extends p.Struct{static{s(this,"HttpOptions")}getStyle(){return p.Struct.getUint16(0,this,e._capnp.defaultStyle)}setStyle(t){p.Struct.setUint16(0,t,this)}getForwardedProtoHeader(){return p.Struct.getText(0,this)}setForwardedProtoHeader(t){p.Struct.setText(0,t,this)}getCfBlobHeader(){return p.Struct.getText(1,this)}setCfBlobHeader(t){p.Struct.setText(1,t,this)}adoptInjectRequestHeaders(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownInjectRequestHeaders(){return p.Struct.disown(this.getInjectRequestHeaders())}getInjectRequestHeaders(){return p.Struct.getList(2,e._InjectRequestHeaders,this)}hasInjectRequestHeaders(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initInjectRequestHeaders(t){return p.Struct.initList(2,e._InjectRequestHeaders,t,this)}setInjectRequestHeaders(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptInjectResponseHeaders(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownInjectResponseHeaders(){return p.Struct.disown(this.getInjectResponseHeaders())}getInjectResponseHeaders(){return p.Struct.getList(3,e._InjectResponseHeaders,this)}hasInjectResponseHeaders(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initInjectResponseHeaders(t){return p.Struct.initList(3,e._InjectResponseHeaders,t,this)}setInjectResponseHeaders(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}getCapnpConnectHost(){return p.Struct.getText(4,this)}setCapnpConnectHost(t){p.Struct.setText(4,t,this)}toString(){return"HttpOptions_"+super.toString()}};M.HttpOptions=Rn;Rn.Style=dpe;Rn.Header=sp;Rn._capnp={displayName:"HttpOptions",id:"aa8dc6885da78f19",size:new p.ObjectSize(8,5),defaultStyle:We.getUint16Mask(0)};var op=class extends p.Struct{static{s(this,"TlsOptions_Keypair")}getPrivateKey(){return p.Struct.getText(0,this)}setPrivateKey(t){p.Struct.setText(0,t,this)}getCertificateChain(){return p.Struct.getText(1,this)}setCertificateChain(t){p.Struct.setText(1,t,this)}toString(){return"TlsOptions_Keypair_"+super.toString()}};M.TlsOptions_Keypair=op;op._capnp={displayName:"Keypair",id:"f546bf2d5d8bd13e",size:new p.ObjectSize(0,2)};var ppe;(function(e){e[e.GOOD_DEFAULT=0]="GOOD_DEFAULT",e[e.SSL3=1]="SSL3",e[e.TLS1DOT0=2]="TLS1DOT0",e[e.TLS1DOT1=3]="TLS1DOT1",e[e.TLS1DOT2=4]="TLS1DOT2",e[e.TLS1DOT3=5]="TLS1DOT3"})(ppe=M.TlsOptions_Version||(M.TlsOptions_Version={}));var Di=class e extends p.Struct{static{s(this,"TlsOptions")}adoptKeypair(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownKeypair(){return p.Struct.disown(this.getKeypair())}getKeypair(){return p.Struct.getStruct(0,op,this)}hasKeypair(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initKeypair(){return p.Struct.initStructAt(0,op,this)}setKeypair(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}getRequireClientCerts(){return p.Struct.getBit(0,this,e._capnp.defaultRequireClientCerts)}setRequireClientCerts(t){p.Struct.setBit(0,t,this)}getTrustBrowserCas(){return p.Struct.getBit(1,this,e._capnp.defaultTrustBrowserCas)}setTrustBrowserCas(t){p.Struct.setBit(1,t,this)}adoptTrustedCertificates(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownTrustedCertificates(){return p.Struct.disown(this.getTrustedCertificates())}getTrustedCertificates(){return p.Struct.getList(1,We.TextList,this)}hasTrustedCertificates(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initTrustedCertificates(t){return p.Struct.initList(1,We.TextList,t,this)}setTrustedCertificates(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getMinVersion(){return p.Struct.getUint16(2,this,e._capnp.defaultMinVersion)}setMinVersion(t){p.Struct.setUint16(2,t,this)}getCipherList(){return p.Struct.getText(2,this)}setCipherList(t){p.Struct.setText(2,t,this)}toString(){return"TlsOptions_"+super.toString()}};M.TlsOptions=Di;Di.Keypair=op;Di.Version=ppe;Di._capnp={displayName:"TlsOptions",id:"aabb3c3778ac4311",size:new p.ObjectSize(8,3),defaultRequireClientCerts:We.getBitMask(!1,0),defaultTrustBrowserCas:We.getBitMask(!1,1),defaultMinVersion:We.getUint16Mask(0)};var J_=class e extends p.Struct{static{s(this,"Extension_Module")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getInternal(){return p.Struct.getBit(0,this,e._capnp.defaultInternal)}setInternal(t){p.Struct.setBit(0,t,this)}getEsModule(){return p.Struct.getText(1,this)}setEsModule(t){p.Struct.setText(1,t,this)}toString(){return"Extension_Module_"+super.toString()}};M.Extension_Module=J_;J_._capnp={displayName:"Module",id:"d5d16e76fdedc37d",size:new p.ObjectSize(8,2),defaultInternal:We.getBitMask(!1,0)};var ap=class e extends p.Struct{static{s(this,"Extension")}adoptModules(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownModules(){return p.Struct.disown(this.getModules())}getModules(){return p.Struct.getList(0,e._Modules,this)}hasModules(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initModules(t){return p.Struct.initList(0,e._Modules,t,this)}setModules(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}toString(){return"Extension_"+super.toString()}};M.Extension=ap;ap.Module=J_;ap._capnp={displayName:"Extension",id:"e390128a861973a6",size:new p.ObjectSize(0,1)};tp._Services=We.CompositeList($a);tp._Sockets=We.CompositeList(rp);tp._Extensions=We.CompositeList(ap);ul._InnerBindings=We.CompositeList(St);ti._Modules=We.CompositeList(ei);ti._Bindings=We.CompositeList(St);ti._DurableObjectNamespaces=We.CompositeList(cl);Rn._InjectRequestHeaders=We.CompositeList(sp);Rn._InjectResponseHeaders=We.CompositeList(sp);ap._Modules=We.CompositeList(J_)});var TB=h(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.kVoid=La.Worker_Binding_CryptoKey_Usage=La.TlsOptions_Version=La.HttpOptions_Style=void 0;var wB=PB();Object.defineProperty(La,"HttpOptions_Style",{enumerable:!0,get:function(){return wB.HttpOptions_Style}});Object.defineProperty(La,"TlsOptions_Version",{enumerable:!0,get:function(){return wB.TlsOptions_Version}});Object.defineProperty(La,"Worker_Binding_CryptoKey_Usage",{enumerable:!0,get:function(){return wB.Worker_Binding_CryptoKey_Usage}});La.kVoid=Symbol("kVoid")});var AB=h(Au=>{"use strict";var Vyt=Au&&Au.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),zyt=Au&&Au.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Vyt(t,e,r)};Object.defineProperty(Au,"__esModule",{value:!0});Au.serializeConfig=void 0;var Hyt=mA(),Kyt=TB(),Wyt=PB();function Yyt(e){return e.length>0?e[0].toUpperCase()+e.substring(1):e}s(Yyt,"capitalize");function NB(e,t){let r=t;for(let[n,i]of Object.entries(e)){let o=Yyt(n);if(i instanceof Uint8Array)r[`init${o}`](i.byteLength).copyBuffer(i);else if(Array.isArray(i)){let a=r[`init${o}`](i.length);for(let u=0;u<i.length;u++)typeof i[u]=="object"?NB(i[u],a.get(u)):a.set(u,i[u])}else if(typeof i=="object"){let a=r[`init${o}`]();NB(i,a)}else i===Kyt.kVoid?r[`set${o}`]():i!==void 0&&r[`set${o}`](i)}}s(NB,"encodeCapnpStruct");function Jyt(e){let t=new Hyt.Message,r=t.initRoot(Wyt.Config);return NB(e,r),Buffer.from(t.toArrayBuffer())}s(Jyt,"serializeConfig");Au.serializeConfig=Jyt;zyt(TB(),Au)});var bpe=h(Cr=>{"use strict";var ype=Cr&&Cr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Xyt=Cr&&Cr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Qyt=Cr&&Cr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ype(t,e,r);return Xyt(t,e),t},Zyt=Cr&&Cr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&ype(t,e,r)},DB=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.supportedCompatibilityDate=Cr.Runtime=Cr.kInspectorSocket=void 0;var e0t=Um(),t0t=DB(require("assert")),hpe=DB(require("child_process")),RB=require("events"),mpe=require("fs"),CB=DB(require("readline")),r0t=require("stream"),Epe=Qyt(require("workerd"));Object.defineProperty(Cr,"supportedCompatibilityDate",{enumerable:!0,get:function(){return Epe.compatibilityDate}});Cr.kInspectorSocket=Symbol("kInspectorSocket");async function n0t(e,t){if(t?.signal?.aborted)return;let r=CB.default.createInterface(e),n=s(()=>r.close(),"abortListener");t?.signal?.addEventListener("abort",n,{once:!0});let i=Array.from(t.requiredSockets),o=new Map;try{for await(let a of r){let u=JSON.parse(a),c=u.event==="listen-inspector"?Cr.kInspectorSocket:u.socket,l=i.indexOf(c);if(l!==-1&&(o.set(c,u.port),i.splice(l,1),i.length===0))return o}}finally{t?.signal?.removeEventListener("abort",n)}}s(n0t,"waitForPorts");function _pe(e){return new Promise(t=>{e.once("exit",()=>t())})}s(_pe,"waitForExit");function i0t(e,t){let r=(0,e0t.createNewLogger)({loggerOptions:{level:"debug",hooks:{}}});CB.default.createInterface(e).on("line",n=>{try{let i=JSON.parse(n),o=[...i.messages,{logOwner:i.logOwner,logSource:i.logSource,level:i.level,timestamp:i.timestamp,loggingId:i.loggingId,rayId:i.rayId,requestId:i.requestId,buildId:i.buildId}];switch(i.level){case"debug":o.forEach(a=>r.debug(a));break;case"warn":o.forEach(a=>r.warn(a));break;case"error":o.forEach(a=>r.error(a));break;default:o.forEach(a=>r.info(a))}}catch{r.info(n)}}),CB.default.createInterface(t).on("line",n=>r.error(n))}s(i0t,"pinoPretty");function gpe(){return Epe.default}s(gpe,"getRuntimeCommand");function s0t(e){let t=["serve","--binary","--experimental","--control-fd=3","-"];return e.inspectorAddress!==void 0&&t.push(`--inspector-addr=localhost:${e.inspectorAddress}`),e.verbose&&t.push("--verbose"),t}s(s0t,"getServeArgs");function o0t(e){let t=["compile","--binary","-"];return e.verbose&&t.push("--verbose"),t}s(o0t,"getCompileArgs");var $B=class{static{s(this,"Runtime")}process;processExitPromise;async updateConfig(t,r){await this.dispose();let n=gpe(),i=s0t(r),o=hpe.default.spawn(n,i,{stdio:["pipe","pipe","pipe","pipe"],env:{...process.env}});this.process=o,this.processExitPromise=_pe(o),(r.handleRuntimeStdio??i0t)(o.stdout,o.stderr);let u=o.stdio[3];return(0,t0t.default)(u instanceof r0t.Readable),o.stdin.write(t),o.stdin.end(),await(0,RB.once)(o.stdin,"finish"),n0t(u,r)}async compileBinary(t,r){await this.dispose();let n=gpe(),i=o0t(r),o=hpe.default.spawn(n,i,{stdio:["pipe","pipe","pipe"],env:{...process.env}});this.process=o,this.processExitPromise=_pe(o),o.stdin.write(t),o.stdin.end(),await(0,RB.once)(o.stdin,"finish");let a=(0,mpe.createWriteStream)(r.binaryPath);o.stdout.pipe(a),await(0,RB.once)(o.stdout,"finish"),(0,mpe.chmodSync)(r.binaryPath,493),await this.dispose()}dispose(){return this.process?.kill("SIGKILL"),this.processExitPromise}};Cr.Runtime=$B;Zyt(AB(),Cr)});var jB=h(Q_=>{"use strict";var a0t=Q_&&Q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Q_,"__esModule",{value:!0});Q_.ZuploWorkerd=void 0;var u0t=require("fs"),c0t=bpe(),Spe=AB(),l0t=require("url"),f0t=a0t(require("path")),LB=class{static{s(this,"ZuploWorkerd")}options;runtime;constructor(t){this.options=t,this.runtime=new c0t.Runtime}async serve(){let t=await this.configure(),r=(0,Spe.serializeConfig)(t),n={requiredSockets:["http"],inspectorAddress:this.options.inspectorPort};await this.runtime.updateConfig(r,n)}async compileBinary(t){let r=await this.configure(),n=(0,Spe.serializeConfig)(r);await this.runtime.compileBinary(n,t)}async dispose(){await this.runtime.dispose()}withSourceURL(t,r){if(t.lastIndexOf("//# sourceURL=")!==-1)return t;let i=`
|
|
320
|
+
`;let{buffer:n,byteLength:i}=e._capnp.segments[r],o=new Uint8Array(n,0,i);t+=k_.dumpBuffer(o)}return t}s(_B,"dump");It.dump=_B;function gB(e,t){let r=new e(t.getSegment(0),0);Qde.validate(dA.PointerType.STRUCT,r);let n=Qde.getTargetStructSize(r);return(n.dataByteLength<e._capnp.size.dataByteLength||n.pointerLength<e._capnp.size.pointerLength)&&(Ca("need to resize root struct %s",r),Zde.resize(e._capnp.size,r)),r}s(gB,"getRoot");It.getRoot=gB;function hA(e,t){let r=t._capnp.segments.length;if(e===0&&r===0){if(ol.Arena.getNumSegments(t._capnp.arena)===0?pA(hb.DEFAULT_BUFFER_SIZE,t):t._capnp.segments[0]=new mB.Segment(0,t,ol.Arena.getBuffer(0,t._capnp.arena)),!t._capnp.segments[0].hasCapacity(8))throw new Error(F_.MSG_SEGMENT_TOO_SMALL);return t._capnp.segments[0].allocate(8),t._capnp.segments[0]}if(e<0||e>=r)throw new Error(k_.format(F_.MSG_SEGMENT_OUT_OF_BOUNDS,e,t));return t._capnp.segments[e]}s(hA,"getSegment");It.getSegment=hA;function yB(e,t){let r=new e(t.getSegment(0),0);return Zde.initStruct(e._capnp.size,r),Ca("Initialized root pointer %s for %s.",r,t),r}s(yB,"initRoot");It.initRoot=yB;function ipe(e){return new dA.Pointer(new Bs(e).getSegment(0),0)}s(ipe,"readRawPointer");It.readRawPointer=ipe;function spe(e,t){dA.Pointer.copyFrom(e,new dA.Pointer(t.getSegment(0),0))}s(spe,"setRoot");It.setRoot=spe;function EB(e){let t=SB(e);e._capnp.segments.length===0&&hA(0,e);let r=e._capnp.segments,n=t.byteLength+r.reduce((a,u)=>a+k_.padToWord(u.byteLength),0),i=new Uint8Array(new ArrayBuffer(n)),o=t.byteLength;return i.set(new Uint8Array(t)),r.forEach(a=>{let u=k_.padToWord(a.byteLength);i.set(new Uint8Array(a.buffer,0,u),o),o+=u}),i.buffer}s(EB,"toArrayBuffer");It.toArrayBuffer=EB;function bB(e){let t=hB.pack(SB(e));e._capnp.segments.length===0&&e.getSegment(0);let r=e._capnp.segments.map(a=>hB.pack(a.buffer,0,k_.padToWord(a.byteLength))),n=t.byteLength+r.reduce((a,u)=>a+u.byteLength,0),i=new Uint8Array(new ArrayBuffer(n)),o=t.byteLength;return i.set(new Uint8Array(t)),r.forEach(a=>{i.set(new Uint8Array(a),o),o+=a.byteLength}),i.buffer}s(bB,"toPackedArrayBuffer");It.toPackedArrayBuffer=bB;function SB(e){let t=e._capnp.segments.length;if(t===0)return new Float64Array(1).buffer;let r=4+t*4+(1-t%2)*4,n=new DataView(new ArrayBuffer(r));return Ca("Writing message stream frame with segment count: %d.",t),n.setUint32(0,t-1,!0),e._capnp.segments.forEach((i,o)=>{Ca("Message segment %d word count: %d.",i.id,i.byteLength/8),n.setUint32(o*4+4,i.byteLength/8,!0)}),n.buffer}s(SB,"getStreamFrame");It.getStreamFrame=SB});var cpe=h(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.ObjectSize=Gs.readRawPointer=Gs.Message=Gs.ListElementSize=void 0;var ape=(at(),ct(ot));ape.__exportStar(Fle(),Gs);var Byt=cr();Object.defineProperty(Gs,"ListElementSize",{enumerable:!0,get:function(){return Byt.ListElementSize}});var upe=ope();Object.defineProperty(Gs,"Message",{enumerable:!0,get:function(){return upe.Message}});Object.defineProperty(Gs,"readRawPointer",{enumerable:!0,get:function(){return upe.readRawPointer}});var Gyt=zd();Object.defineProperty(Gs,"ObjectSize",{enumerable:!0,get:function(){return Gyt.ObjectSize}});ape.__exportStar(lA(),Gs)});var mA=h(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.Uint64=G.Int64=G.getUint8Mask=G.getUint64Mask=G.getUint32Mask=G.getUint16Mask=G.getInt8Mask=G.getInt64Mask=G.getInt32Mask=G.getInt16Mask=G.getFloat64Mask=G.getFloat32Mask=G.getBitMask=G.Void=G.VoidList=G.Uint8List=G.Uint64List=G.Uint32List=G.Uint16List=G.TextList=G.Text=G.Struct=G.Pointer=G.PointerType=G.PointerList=G.Orphan=G.List=G.InterfaceList=G.Interface=G.Int8List=G.Int64List=G.Int32List=G.Int16List=G.Float64List=G.Float32List=G.DataList=G.Data=G.CompositeList=G.BoolList=G.AnyPointerList=G.readRawPointer=G.ObjectSize=G.Message=G.ListElementSize=void 0;var Pe=cpe();Object.defineProperty(G,"ListElementSize",{enumerable:!0,get:function(){return Pe.ListElementSize}});Object.defineProperty(G,"Message",{enumerable:!0,get:function(){return Pe.Message}});Object.defineProperty(G,"ObjectSize",{enumerable:!0,get:function(){return Pe.ObjectSize}});Object.defineProperty(G,"readRawPointer",{enumerable:!0,get:function(){return Pe.readRawPointer}});Object.defineProperty(G,"AnyPointerList",{enumerable:!0,get:function(){return Pe.AnyPointerList}});Object.defineProperty(G,"BoolList",{enumerable:!0,get:function(){return Pe.BoolList}});Object.defineProperty(G,"CompositeList",{enumerable:!0,get:function(){return Pe.CompositeList}});Object.defineProperty(G,"Data",{enumerable:!0,get:function(){return Pe.Data}});Object.defineProperty(G,"DataList",{enumerable:!0,get:function(){return Pe.DataList}});Object.defineProperty(G,"Float32List",{enumerable:!0,get:function(){return Pe.Float32List}});Object.defineProperty(G,"Float64List",{enumerable:!0,get:function(){return Pe.Float64List}});Object.defineProperty(G,"Int16List",{enumerable:!0,get:function(){return Pe.Int16List}});Object.defineProperty(G,"Int32List",{enumerable:!0,get:function(){return Pe.Int32List}});Object.defineProperty(G,"Int64List",{enumerable:!0,get:function(){return Pe.Int64List}});Object.defineProperty(G,"Int8List",{enumerable:!0,get:function(){return Pe.Int8List}});Object.defineProperty(G,"Interface",{enumerable:!0,get:function(){return Pe.Interface}});Object.defineProperty(G,"InterfaceList",{enumerable:!0,get:function(){return Pe.InterfaceList}});Object.defineProperty(G,"List",{enumerable:!0,get:function(){return Pe.List}});Object.defineProperty(G,"Orphan",{enumerable:!0,get:function(){return Pe.Orphan}});Object.defineProperty(G,"PointerList",{enumerable:!0,get:function(){return Pe.PointerList}});Object.defineProperty(G,"PointerType",{enumerable:!0,get:function(){return Pe.PointerType}});Object.defineProperty(G,"Pointer",{enumerable:!0,get:function(){return Pe.Pointer}});Object.defineProperty(G,"Struct",{enumerable:!0,get:function(){return Pe.Struct}});Object.defineProperty(G,"Text",{enumerable:!0,get:function(){return Pe.Text}});Object.defineProperty(G,"TextList",{enumerable:!0,get:function(){return Pe.TextList}});Object.defineProperty(G,"Uint16List",{enumerable:!0,get:function(){return Pe.Uint16List}});Object.defineProperty(G,"Uint32List",{enumerable:!0,get:function(){return Pe.Uint32List}});Object.defineProperty(G,"Uint64List",{enumerable:!0,get:function(){return Pe.Uint64List}});Object.defineProperty(G,"Uint8List",{enumerable:!0,get:function(){return Pe.Uint8List}});Object.defineProperty(G,"VoidList",{enumerable:!0,get:function(){return Pe.VoidList}});Object.defineProperty(G,"Void",{enumerable:!0,get:function(){return Pe.Void}});Object.defineProperty(G,"getBitMask",{enumerable:!0,get:function(){return Pe.getBitMask}});Object.defineProperty(G,"getFloat32Mask",{enumerable:!0,get:function(){return Pe.getFloat32Mask}});Object.defineProperty(G,"getFloat64Mask",{enumerable:!0,get:function(){return Pe.getFloat64Mask}});Object.defineProperty(G,"getInt16Mask",{enumerable:!0,get:function(){return Pe.getInt16Mask}});Object.defineProperty(G,"getInt32Mask",{enumerable:!0,get:function(){return Pe.getInt32Mask}});Object.defineProperty(G,"getInt64Mask",{enumerable:!0,get:function(){return Pe.getInt64Mask}});Object.defineProperty(G,"getInt8Mask",{enumerable:!0,get:function(){return Pe.getInt8Mask}});Object.defineProperty(G,"getUint16Mask",{enumerable:!0,get:function(){return Pe.getUint16Mask}});Object.defineProperty(G,"getUint32Mask",{enumerable:!0,get:function(){return Pe.getUint32Mask}});Object.defineProperty(G,"getUint64Mask",{enumerable:!0,get:function(){return Pe.getUint64Mask}});Object.defineProperty(G,"getUint8Mask",{enumerable:!0,get:function(){return Pe.getUint8Mask}});var lpe=BN();Object.defineProperty(G,"Int64",{enumerable:!0,get:function(){return lpe.Int64}});Object.defineProperty(G,"Uint64",{enumerable:!0,get:function(){return lpe.Uint64}})});var PB=h(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.Extension=M.Extension_Module=M.TlsOptions=M.TlsOptions_Version=M.TlsOptions_Keypair=M.HttpOptions=M.HttpOptions_Header=M.HttpOptions_Style=M.DiskDirectory=M.Network=M.ExternalServer=M.ExternalServer_Which=M.ExternalServer_Tcp=M.ExternalServer_Https=M.Worker=M.Worker_Which=M.Worker_DurableObjectStorage=M.Worker_DurableObjectStorage_Which=M.Worker_DurableObjectNamespace=M.Worker_DurableObjectNamespace_Which=M.Worker_Binding=M.Worker_Binding_Which=M.Worker_Binding_MemoryCache=M.Worker_Binding_Hyperdrive=M.Worker_Binding_Parameter=M.Worker_Binding_WrappedBinding=M.Worker_Binding_MemoryCacheLimits=M.Worker_Binding_CryptoKey=M.Worker_Binding_CryptoKey_Which=M.Worker_Binding_CryptoKey_Algorithm=M.Worker_Binding_CryptoKey_Algorithm_Which=M.Worker_Binding_CryptoKey_Usage=M.Worker_Binding_DurableObjectNamespaceDesignator=M.Worker_Binding_Type=M.Worker_Binding_Type_Which=M.Worker_Module=M.Worker_Module_Which=M.ServiceDesignator=M.Service=M.Service_Which=M.Socket=M.Socket_Which=M.Socket_Https=M.Config=M._capnpFileId=void 0;var We=mA(),p=mA();M._capnpFileId="e6afd26682091c01";var tp=class e extends p.Struct{static{s(this,"Config")}adoptServices(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownServices(){return p.Struct.disown(this.getServices())}getServices(){return p.Struct.getList(0,e._Services,this)}hasServices(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initServices(t){return p.Struct.initList(0,e._Services,t,this)}setServices(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}adoptSockets(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownSockets(){return p.Struct.disown(this.getSockets())}getSockets(){return p.Struct.getList(1,e._Sockets,this)}hasSockets(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initSockets(t){return p.Struct.initList(1,e._Sockets,t,this)}setSockets(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptV8Flags(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownV8Flags(){return p.Struct.disown(this.getV8Flags())}getV8Flags(){return p.Struct.getList(2,We.TextList,this)}hasV8Flags(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initV8Flags(t){return p.Struct.initList(2,We.TextList,t,this)}setV8Flags(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptExtensions(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownExtensions(){return p.Struct.disown(this.getExtensions())}getExtensions(){return p.Struct.getList(3,e._Extensions,this)}hasExtensions(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initExtensions(t){return p.Struct.initList(3,e._Extensions,t,this)}setExtensions(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}adoptAutogates(t){p.Struct.adopt(t,p.Struct.getPointer(4,this))}disownAutogates(){return p.Struct.disown(this.getAutogates())}getAutogates(){return p.Struct.getList(4,We.TextList,this)}hasAutogates(){return!p.Struct.isNull(p.Struct.getPointer(4,this))}initAutogates(t){return p.Struct.initList(4,We.TextList,t,this)}setAutogates(t){p.Struct.copyFrom(t,p.Struct.getPointer(4,this))}toString(){return"Config_"+super.toString()}};M.Config=tp;tp._capnp={displayName:"Config",id:"8794486c76aaa7d6",size:new p.ObjectSize(0,5)};var B_=class extends p.Struct{static{s(this,"Socket_Https")}adoptOptions(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownOptions(){return p.Struct.disown(this.getOptions())}getOptions(){return p.Struct.getStruct(2,Rn,this)}hasOptions(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initOptions(){return p.Struct.initStructAt(2,Rn,this)}setOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(3,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initTlsOptions(){return p.Struct.initStructAt(3,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}toString(){return"Socket_Https_"+super.toString()}};M.Socket_Https=B_;B_._capnp={displayName:"https",id:"de123876383cbbdc",size:new p.ObjectSize(8,5)};var vB;(function(e){e[e.HTTP=0]="HTTP",e[e.HTTPS=1]="HTTPS"})(vB=M.Socket_Which||(M.Socket_Which={}));var rp=class extends p.Struct{static{s(this,"Socket")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getAddress(){return p.Struct.getText(1,this)}setAddress(t){p.Struct.setText(1,t,this)}adoptHttp(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownHttp(){return p.Struct.disown(this.getHttp())}getHttp(){return p.Struct.testWhich("http",p.Struct.getUint16(0,this),0,this),p.Struct.getStruct(2,Rn,this)}hasHttp(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initHttp(){return p.Struct.setUint16(0,0,this),p.Struct.initStructAt(2,Rn,this)}isHttp(){return p.Struct.getUint16(0,this)===0}setHttp(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}getHttps(){return p.Struct.testWhich("https",p.Struct.getUint16(0,this),1,this),p.Struct.getAs(B_,this)}initHttps(){return p.Struct.setUint16(0,1,this),p.Struct.getAs(B_,this)}isHttps(){return p.Struct.getUint16(0,this)===1}setHttps(){p.Struct.setUint16(0,1,this)}adoptService(t){p.Struct.adopt(t,p.Struct.getPointer(4,this))}disownService(){return p.Struct.disown(this.getService())}getService(){return p.Struct.getStruct(4,Xt,this)}hasService(){return!p.Struct.isNull(p.Struct.getPointer(4,this))}initService(){return p.Struct.initStructAt(4,Xt,this)}setService(t){p.Struct.copyFrom(t,p.Struct.getPointer(4,this))}toString(){return"Socket_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Socket=rp;rp.HTTP=vB.HTTP;rp.HTTPS=vB.HTTPS;rp._capnp={displayName:"Socket",id:"9a0eba45530ee79f",size:new p.ObjectSize(8,5)};var X_;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.WORKER=1]="WORKER",e[e.NETWORK=2]="NETWORK",e[e.EXTERNAL=3]="EXTERNAL",e[e.DISK=4]="DISK"})(X_=M.Service_Which||(M.Service_Which={}));var $a=class extends p.Struct{static{s(this,"Service")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}isUnspecified(){return p.Struct.getUint16(0,this)===0}setUnspecified(){p.Struct.setUint16(0,0,this)}adoptWorker(t){p.Struct.setUint16(0,1,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWorker(){return p.Struct.disown(this.getWorker())}getWorker(){return p.Struct.testWhich("worker",p.Struct.getUint16(0,this),1,this),p.Struct.getStruct(1,ti,this)}hasWorker(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWorker(){return p.Struct.setUint16(0,1,this),p.Struct.initStructAt(1,ti,this)}isWorker(){return p.Struct.getUint16(0,this)===1}setWorker(t){p.Struct.setUint16(0,1,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptNetwork(t){p.Struct.setUint16(0,2,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownNetwork(){return p.Struct.disown(this.getNetwork())}getNetwork(){return p.Struct.testWhich("network",p.Struct.getUint16(0,this),2,this),p.Struct.getStruct(1,W_,this)}hasNetwork(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initNetwork(){return p.Struct.setUint16(0,2,this),p.Struct.initStructAt(1,W_,this)}isNetwork(){return p.Struct.getUint16(0,this)===2}setNetwork(t){p.Struct.setUint16(0,2,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptExternal(t){p.Struct.setUint16(0,3,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownExternal(){return p.Struct.disown(this.getExternal())}getExternal(){return p.Struct.testWhich("external",p.Struct.getUint16(0,this),3,this),p.Struct.getStruct(1,Nu,this)}hasExternal(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initExternal(){return p.Struct.setUint16(0,3,this),p.Struct.initStructAt(1,Nu,this)}isExternal(){return p.Struct.getUint16(0,this)===3}setExternal(t){p.Struct.setUint16(0,3,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptDisk(t){p.Struct.setUint16(0,4,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDisk(){return p.Struct.disown(this.getDisk())}getDisk(){return p.Struct.testWhich("disk",p.Struct.getUint16(0,this),4,this),p.Struct.getStruct(1,Y_,this)}hasDisk(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDisk(){return p.Struct.setUint16(0,4,this),p.Struct.initStructAt(1,Y_,this)}isDisk(){return p.Struct.getUint16(0,this)===4}setDisk(t){p.Struct.setUint16(0,4,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}toString(){return"Service_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Service=$a;$a.UNSPECIFIED=X_.UNSPECIFIED;$a.WORKER=X_.WORKER;$a.NETWORK=X_.NETWORK;$a.EXTERNAL=X_.EXTERNAL;$a.DISK=X_.DISK;$a._capnp={displayName:"Service",id:"e5c88e8bb7bcb6b9",size:new p.ObjectSize(8,2)};var Xt=class extends p.Struct{static{s(this,"ServiceDesignator")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getEntrypoint(){return p.Struct.getText(1,this)}setEntrypoint(t){p.Struct.setText(1,t,this)}toString(){return"ServiceDesignator_"+super.toString()}};M.ServiceDesignator=Xt;Xt._capnp={displayName:"ServiceDesignator",id:"ae8ec91cee724450",size:new p.ObjectSize(0,2)};var Da;(function(e){e[e.ES_MODULE=0]="ES_MODULE",e[e.COMMON_JS_MODULE=1]="COMMON_JS_MODULE",e[e.TEXT=2]="TEXT",e[e.DATA=3]="DATA",e[e.WASM=4]="WASM",e[e.JSON=5]="JSON",e[e.NODE_JS_COMPAT_MODULE=6]="NODE_JS_COMPAT_MODULE",e[e.PYTHON_MODULE=7]="PYTHON_MODULE",e[e.PYTHON_REQUIREMENT=8]="PYTHON_REQUIREMENT"})(Da=M.Worker_Module_Which||(M.Worker_Module_Which={}));var ei=class extends p.Struct{static{s(this,"Worker_Module")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getEsModule(){return p.Struct.testWhich("esModule",p.Struct.getUint16(0,this),0,this),p.Struct.getText(1,this)}isEsModule(){return p.Struct.getUint16(0,this)===0}setEsModule(t){p.Struct.setUint16(0,0,this),p.Struct.setText(1,t,this)}getCommonJsModule(){return p.Struct.testWhich("commonJsModule",p.Struct.getUint16(0,this),1,this),p.Struct.getText(1,this)}isCommonJsModule(){return p.Struct.getUint16(0,this)===1}setCommonJsModule(t){p.Struct.setUint16(0,1,this),p.Struct.setText(1,t,this)}getText(){return p.Struct.testWhich("text",p.Struct.getUint16(0,this),2,this),p.Struct.getText(1,this)}isText(){return p.Struct.getUint16(0,this)===2}setText(t){p.Struct.setUint16(0,2,this),p.Struct.setText(1,t,this)}adoptData(t){p.Struct.setUint16(0,3,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownData(){return p.Struct.disown(this.getData())}getData(){return p.Struct.testWhich("data",p.Struct.getUint16(0,this),3,this),p.Struct.getData(1,this)}hasData(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initData(t){return p.Struct.setUint16(0,3,this),p.Struct.initData(1,t,this)}isData(){return p.Struct.getUint16(0,this)===3}setData(t){p.Struct.setUint16(0,3,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptWasm(t){p.Struct.setUint16(0,4,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWasm(){return p.Struct.disown(this.getWasm())}getWasm(){return p.Struct.testWhich("wasm",p.Struct.getUint16(0,this),4,this),p.Struct.getData(1,this)}hasWasm(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWasm(t){return p.Struct.setUint16(0,4,this),p.Struct.initData(1,t,this)}isWasm(){return p.Struct.getUint16(0,this)===4}setWasm(t){p.Struct.setUint16(0,4,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getJson(){return p.Struct.testWhich("json",p.Struct.getUint16(0,this),5,this),p.Struct.getText(1,this)}isJson(){return p.Struct.getUint16(0,this)===5}setJson(t){p.Struct.setUint16(0,5,this),p.Struct.setText(1,t,this)}getNodeJsCompatModule(){return p.Struct.testWhich("nodeJsCompatModule",p.Struct.getUint16(0,this),6,this),p.Struct.getText(1,this)}isNodeJsCompatModule(){return p.Struct.getUint16(0,this)===6}setNodeJsCompatModule(t){p.Struct.setUint16(0,6,this),p.Struct.setText(1,t,this)}getPythonModule(){return p.Struct.testWhich("pythonModule",p.Struct.getUint16(0,this),7,this),p.Struct.getText(1,this)}isPythonModule(){return p.Struct.getUint16(0,this)===7}setPythonModule(t){p.Struct.setUint16(0,7,this),p.Struct.setText(1,t,this)}getPythonRequirement(){return p.Struct.testWhich("pythonRequirement",p.Struct.getUint16(0,this),8,this),p.Struct.getText(1,this)}isPythonRequirement(){return p.Struct.getUint16(0,this)===8}setPythonRequirement(t){p.Struct.setUint16(0,8,this),p.Struct.setText(1,t,this)}toString(){return"Worker_Module_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Module=ei;ei.ES_MODULE=Da.ES_MODULE;ei.COMMON_JS_MODULE=Da.COMMON_JS_MODULE;ei.TEXT=Da.TEXT;ei.DATA=Da.DATA;ei.WASM=Da.WASM;ei.JSON=Da.JSON;ei.NODE_JS_COMPAT_MODULE=Da.NODE_JS_COMPAT_MODULE;ei.PYTHON_MODULE=Da.PYTHON_MODULE;ei.PYTHON_REQUIREMENT=Da.PYTHON_REQUIREMENT;ei._capnp={displayName:"Module",id:"d9d87a63770a12f3",size:new p.ObjectSize(8,2)};var ri;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TEXT=1]="TEXT",e[e.DATA=2]="DATA",e[e.JSON=3]="JSON",e[e.WASM=4]="WASM",e[e.CRYPTO_KEY=5]="CRYPTO_KEY",e[e.SERVICE=6]="SERVICE",e[e.DURABLE_OBJECT_NAMESPACE=7]="DURABLE_OBJECT_NAMESPACE",e[e.KV_NAMESPACE=8]="KV_NAMESPACE",e[e.R2BUCKET=9]="R2BUCKET",e[e.R2ADMIN=10]="R2ADMIN",e[e.QUEUE=11]="QUEUE",e[e.ANALYTICS_ENGINE=12]="ANALYTICS_ENGINE",e[e.HYPERDRIVE=13]="HYPERDRIVE"})(ri=M.Worker_Binding_Type_Which||(M.Worker_Binding_Type_Which={}));var Er=class extends p.Struct{static{s(this,"Worker_Binding_Type")}isUnspecified(){return p.Struct.getUint16(0,this)===0}setUnspecified(){p.Struct.setUint16(0,0,this)}isText(){return p.Struct.getUint16(0,this)===1}setText(){p.Struct.setUint16(0,1,this)}isData(){return p.Struct.getUint16(0,this)===2}setData(){p.Struct.setUint16(0,2,this)}isJson(){return p.Struct.getUint16(0,this)===3}setJson(){p.Struct.setUint16(0,3,this)}isWasm(){return p.Struct.getUint16(0,this)===4}setWasm(){p.Struct.setUint16(0,4,this)}adoptCryptoKey(t){p.Struct.setUint16(0,5,this),p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownCryptoKey(){return p.Struct.disown(this.getCryptoKey())}getCryptoKey(){return p.Struct.testWhich("cryptoKey",p.Struct.getUint16(0,this),5,this),p.Struct.getList(0,We.Uint16List,this)}hasCryptoKey(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initCryptoKey(t){return p.Struct.setUint16(0,5,this),p.Struct.initList(0,We.Uint16List,t,this)}isCryptoKey(){return p.Struct.getUint16(0,this)===5}setCryptoKey(t){p.Struct.setUint16(0,5,this),p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}isService(){return p.Struct.getUint16(0,this)===6}setService(){p.Struct.setUint16(0,6,this)}isDurableObjectNamespace(){return p.Struct.getUint16(0,this)===7}setDurableObjectNamespace(){p.Struct.setUint16(0,7,this)}isKvNamespace(){return p.Struct.getUint16(0,this)===8}setKvNamespace(){p.Struct.setUint16(0,8,this)}isR2Bucket(){return p.Struct.getUint16(0,this)===9}setR2Bucket(){p.Struct.setUint16(0,9,this)}isR2Admin(){return p.Struct.getUint16(0,this)===10}setR2Admin(){p.Struct.setUint16(0,10,this)}isQueue(){return p.Struct.getUint16(0,this)===11}setQueue(){p.Struct.setUint16(0,11,this)}isAnalyticsEngine(){return p.Struct.getUint16(0,this)===12}setAnalyticsEngine(){p.Struct.setUint16(0,12,this)}isHyperdrive(){return p.Struct.getUint16(0,this)===13}setHyperdrive(){p.Struct.setUint16(0,13,this)}toString(){return"Worker_Binding_Type_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Binding_Type=Er;Er.UNSPECIFIED=ri.UNSPECIFIED;Er.TEXT=ri.TEXT;Er.DATA=ri.DATA;Er.JSON=ri.JSON;Er.WASM=ri.WASM;Er.CRYPTO_KEY=ri.CRYPTO_KEY;Er.SERVICE=ri.SERVICE;Er.DURABLE_OBJECT_NAMESPACE=ri.DURABLE_OBJECT_NAMESPACE;Er.KV_NAMESPACE=ri.KV_NAMESPACE;Er.R2BUCKET=ri.R2BUCKET;Er.R2ADMIN=ri.R2ADMIN;Er.QUEUE=ri.QUEUE;Er.ANALYTICS_ENGINE=ri.ANALYTICS_ENGINE;Er.HYPERDRIVE=ri.HYPERDRIVE;Er._capnp={displayName:"Type",id:"8906a1296519bf8a",size:new p.ObjectSize(8,1)};var np=class extends p.Struct{static{s(this,"Worker_Binding_DurableObjectNamespaceDesignator")}getClassName(){return p.Struct.getText(0,this)}setClassName(t){p.Struct.setText(0,t,this)}getServiceName(){return p.Struct.getText(1,this)}setServiceName(t){p.Struct.setText(1,t,this)}toString(){return"Worker_Binding_DurableObjectNamespaceDesignator_"+super.toString()}};M.Worker_Binding_DurableObjectNamespaceDesignator=np;np._capnp={displayName:"DurableObjectNamespaceDesignator",id:"804f144ff477aac7",size:new p.ObjectSize(0,2)};var fpe;(function(e){e[e.ENCRYPT=0]="ENCRYPT",e[e.DECRYPT=1]="DECRYPT",e[e.SIGN=2]="SIGN",e[e.VERIFY=3]="VERIFY",e[e.DERIVE_KEY=4]="DERIVE_KEY",e[e.DERIVE_BITS=5]="DERIVE_BITS",e[e.WRAP_KEY=6]="WRAP_KEY",e[e.UNWRAP_KEY=7]="UNWRAP_KEY"})(fpe=M.Worker_Binding_CryptoKey_Usage||(M.Worker_Binding_CryptoKey_Usage={}));var OB;(function(e){e[e.NAME=0]="NAME",e[e.JSON=1]="JSON"})(OB=M.Worker_Binding_CryptoKey_Algorithm_Which||(M.Worker_Binding_CryptoKey_Algorithm_Which={}));var al=class extends p.Struct{static{s(this,"Worker_Binding_CryptoKey_Algorithm")}getName(){return p.Struct.testWhich("name",p.Struct.getUint16(2,this),0,this),p.Struct.getText(1,this)}isName(){return p.Struct.getUint16(2,this)===0}setName(t){p.Struct.setUint16(2,0,this),p.Struct.setText(1,t,this)}getJson(){return p.Struct.testWhich("json",p.Struct.getUint16(2,this),1,this),p.Struct.getText(1,this)}isJson(){return p.Struct.getUint16(2,this)===1}setJson(t){p.Struct.setUint16(2,1,this),p.Struct.setText(1,t,this)}toString(){return"Worker_Binding_CryptoKey_Algorithm_"+super.toString()}which(){return p.Struct.getUint16(2,this)}};M.Worker_Binding_CryptoKey_Algorithm=al;al.NAME=OB.NAME;al.JSON=OB.JSON;al._capnp={displayName:"algorithm",id:"a1a040c5e00d7021",size:new p.ObjectSize(8,3)};var up;(function(e){e[e.RAW=0]="RAW",e[e.HEX=1]="HEX",e[e.BASE64=2]="BASE64",e[e.PKCS8=3]="PKCS8",e[e.SPKI=4]="SPKI",e[e.JWK=5]="JWK"})(up=M.Worker_Binding_CryptoKey_Which||(M.Worker_Binding_CryptoKey_Which={}));var $i=class e extends p.Struct{static{s(this,"Worker_Binding_CryptoKey")}adoptRaw(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownRaw(){return p.Struct.disown(this.getRaw())}getRaw(){return p.Struct.testWhich("raw",p.Struct.getUint16(0,this),0,this),p.Struct.getData(0,this)}hasRaw(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initRaw(t){return p.Struct.setUint16(0,0,this),p.Struct.initData(0,t,this)}isRaw(){return p.Struct.getUint16(0,this)===0}setRaw(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}getHex(){return p.Struct.testWhich("hex",p.Struct.getUint16(0,this),1,this),p.Struct.getText(0,this)}isHex(){return p.Struct.getUint16(0,this)===1}setHex(t){p.Struct.setUint16(0,1,this),p.Struct.setText(0,t,this)}getBase64(){return p.Struct.testWhich("base64",p.Struct.getUint16(0,this),2,this),p.Struct.getText(0,this)}isBase64(){return p.Struct.getUint16(0,this)===2}setBase64(t){p.Struct.setUint16(0,2,this),p.Struct.setText(0,t,this)}getPkcs8(){return p.Struct.testWhich("pkcs8",p.Struct.getUint16(0,this),3,this),p.Struct.getText(0,this)}isPkcs8(){return p.Struct.getUint16(0,this)===3}setPkcs8(t){p.Struct.setUint16(0,3,this),p.Struct.setText(0,t,this)}getSpki(){return p.Struct.testWhich("spki",p.Struct.getUint16(0,this),4,this),p.Struct.getText(0,this)}isSpki(){return p.Struct.getUint16(0,this)===4}setSpki(t){p.Struct.setUint16(0,4,this),p.Struct.setText(0,t,this)}getJwk(){return p.Struct.testWhich("jwk",p.Struct.getUint16(0,this),5,this),p.Struct.getText(0,this)}isJwk(){return p.Struct.getUint16(0,this)===5}setJwk(t){p.Struct.setUint16(0,5,this),p.Struct.setText(0,t,this)}getAlgorithm(){return p.Struct.getAs(al,this)}initAlgorithm(){return p.Struct.getAs(al,this)}getExtractable(){return p.Struct.getBit(32,this,e._capnp.defaultExtractable)}setExtractable(t){p.Struct.setBit(32,t,this)}adoptUsages(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownUsages(){return p.Struct.disown(this.getUsages())}getUsages(){return p.Struct.getList(2,We.Uint16List,this)}hasUsages(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initUsages(t){return p.Struct.initList(2,We.Uint16List,t,this)}setUsages(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Worker_Binding_CryptoKey_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Binding_CryptoKey=$i;$i.RAW=up.RAW;$i.HEX=up.HEX;$i.BASE64=up.BASE64;$i.PKCS8=up.PKCS8;$i.SPKI=up.SPKI;$i.JWK=up.JWK;$i.Usage=fpe;$i._capnp={displayName:"CryptoKey",id:"b5e1bff0e57d6eb0",size:new p.ObjectSize(8,3),defaultExtractable:We.getBitMask(!1,0)};var ip=class extends p.Struct{static{s(this,"Worker_Binding_MemoryCacheLimits")}getMaxKeys(){return p.Struct.getUint32(0,this)}setMaxKeys(t){p.Struct.setUint32(0,t,this)}getMaxValueSize(){return p.Struct.getUint32(4,this)}setMaxValueSize(t){p.Struct.setUint32(4,t,this)}getMaxTotalValueSize(){return p.Struct.getUint64(8,this)}setMaxTotalValueSize(t){p.Struct.setUint64(8,t,this)}toString(){return"Worker_Binding_MemoryCacheLimits_"+super.toString()}};M.Worker_Binding_MemoryCacheLimits=ip;ip._capnp={displayName:"MemoryCacheLimits",id:"8d66725b0867e634",size:new p.ObjectSize(16,0)};var ul=class e extends p.Struct{static{s(this,"Worker_Binding_WrappedBinding")}getModuleName(){return p.Struct.getText(0,this)}setModuleName(t){p.Struct.setText(0,t,this)}getEntrypoint(){return p.Struct.getText(1,this,e._capnp.defaultEntrypoint)}setEntrypoint(t){p.Struct.setText(1,t,this)}adoptInnerBindings(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownInnerBindings(){return p.Struct.disown(this.getInnerBindings())}getInnerBindings(){return p.Struct.getList(2,e._InnerBindings,this)}hasInnerBindings(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initInnerBindings(t){return p.Struct.initList(2,e._InnerBindings,t,this)}setInnerBindings(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Worker_Binding_WrappedBinding_"+super.toString()}};M.Worker_Binding_WrappedBinding=ul;ul._capnp={displayName:"WrappedBinding",id:"e6f066b75f0ea113",size:new p.ObjectSize(0,3),defaultEntrypoint:"default"};var G_=class extends p.Struct{static{s(this,"Worker_Binding_Parameter")}adoptType(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownType(){return p.Struct.disown(this.getType())}getType(){return p.Struct.getStruct(1,Er,this)}hasType(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initType(){return p.Struct.initStructAt(1,Er,this)}setType(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getOptional(){return p.Struct.getBit(16,this)}setOptional(t){p.Struct.setBit(16,t,this)}toString(){return"Worker_Binding_Parameter_"+super.toString()}};M.Worker_Binding_Parameter=G_;G_._capnp={displayName:"parameter",id:"dc57e1258d26d152",size:new p.ObjectSize(8,6)};var V_=class extends p.Struct{static{s(this,"Worker_Binding_Hyperdrive")}adoptDesignator(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDesignator(){return p.Struct.disown(this.getDesignator())}getDesignator(){return p.Struct.getStruct(1,Xt,this)}hasDesignator(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDesignator(){return p.Struct.initStructAt(1,Xt,this)}setDesignator(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getDatabase(){return p.Struct.getText(2,this)}setDatabase(t){p.Struct.setText(2,t,this)}getUser(){return p.Struct.getText(3,this)}setUser(t){p.Struct.setText(3,t,this)}getPassword(){return p.Struct.getText(4,this)}setPassword(t){p.Struct.setText(4,t,this)}getScheme(){return p.Struct.getText(5,this)}setScheme(t){p.Struct.setText(5,t,this)}toString(){return"Worker_Binding_Hyperdrive_"+super.toString()}};M.Worker_Binding_Hyperdrive=V_;V_._capnp={displayName:"hyperdrive",id:"ad6c391cd55f3134",size:new p.ObjectSize(8,6)};var z_=class extends p.Struct{static{s(this,"Worker_Binding_MemoryCache")}getId(){return p.Struct.getText(1,this)}setId(t){p.Struct.setText(1,t,this)}adoptLimits(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownLimits(){return p.Struct.disown(this.getLimits())}getLimits(){return p.Struct.getStruct(2,ip,this)}hasLimits(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initLimits(){return p.Struct.initStructAt(2,ip,this)}setLimits(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Worker_Binding_MemoryCache_"+super.toString()}};M.Worker_Binding_MemoryCache=z_;z_._capnp={displayName:"memoryCache",id:"aed5760c349869da",size:new p.ObjectSize(8,6)};var Rr;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.PARAMETER=1]="PARAMETER",e[e.TEXT=2]="TEXT",e[e.DATA=3]="DATA",e[e.JSON=4]="JSON",e[e.WASM_MODULE=5]="WASM_MODULE",e[e.CRYPTO_KEY=6]="CRYPTO_KEY",e[e.SERVICE=7]="SERVICE",e[e.DURABLE_OBJECT_NAMESPACE=8]="DURABLE_OBJECT_NAMESPACE",e[e.KV_NAMESPACE=9]="KV_NAMESPACE",e[e.R2BUCKET=10]="R2BUCKET",e[e.R2ADMIN=11]="R2ADMIN",e[e.WRAPPED=12]="WRAPPED",e[e.QUEUE=13]="QUEUE",e[e.FROM_ENVIRONMENT=14]="FROM_ENVIRONMENT",e[e.ANALYTICS_ENGINE=15]="ANALYTICS_ENGINE",e[e.HYPERDRIVE=16]="HYPERDRIVE",e[e.UNSAFE_EVAL=17]="UNSAFE_EVAL",e[e.MEMORY_CACHE=18]="MEMORY_CACHE"})(Rr=M.Worker_Binding_Which||(M.Worker_Binding_Which={}));var St=class extends p.Struct{static{s(this,"Worker_Binding")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}isUnspecified(){return p.Struct.getUint16(0,this)===0}setUnspecified(){p.Struct.setUint16(0,0,this)}getParameter(){return p.Struct.testWhich("parameter",p.Struct.getUint16(0,this),1,this),p.Struct.getAs(G_,this)}initParameter(){return p.Struct.setUint16(0,1,this),p.Struct.getAs(G_,this)}isParameter(){return p.Struct.getUint16(0,this)===1}setParameter(){p.Struct.setUint16(0,1,this)}getText(){return p.Struct.testWhich("text",p.Struct.getUint16(0,this),2,this),p.Struct.getText(1,this)}isText(){return p.Struct.getUint16(0,this)===2}setText(t){p.Struct.setUint16(0,2,this),p.Struct.setText(1,t,this)}adoptData(t){p.Struct.setUint16(0,3,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownData(){return p.Struct.disown(this.getData())}getData(){return p.Struct.testWhich("data",p.Struct.getUint16(0,this),3,this),p.Struct.getData(1,this)}hasData(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initData(t){return p.Struct.setUint16(0,3,this),p.Struct.initData(1,t,this)}isData(){return p.Struct.getUint16(0,this)===3}setData(t){p.Struct.setUint16(0,3,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getJson(){return p.Struct.testWhich("json",p.Struct.getUint16(0,this),4,this),p.Struct.getText(1,this)}isJson(){return p.Struct.getUint16(0,this)===4}setJson(t){p.Struct.setUint16(0,4,this),p.Struct.setText(1,t,this)}adoptWasmModule(t){p.Struct.setUint16(0,5,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWasmModule(){return p.Struct.disown(this.getWasmModule())}getWasmModule(){return p.Struct.testWhich("wasmModule",p.Struct.getUint16(0,this),5,this),p.Struct.getData(1,this)}hasWasmModule(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWasmModule(t){return p.Struct.setUint16(0,5,this),p.Struct.initData(1,t,this)}isWasmModule(){return p.Struct.getUint16(0,this)===5}setWasmModule(t){p.Struct.setUint16(0,5,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptCryptoKey(t){p.Struct.setUint16(0,6,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownCryptoKey(){return p.Struct.disown(this.getCryptoKey())}getCryptoKey(){return p.Struct.testWhich("cryptoKey",p.Struct.getUint16(0,this),6,this),p.Struct.getStruct(1,$i,this)}hasCryptoKey(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initCryptoKey(){return p.Struct.setUint16(0,6,this),p.Struct.initStructAt(1,$i,this)}isCryptoKey(){return p.Struct.getUint16(0,this)===6}setCryptoKey(t){p.Struct.setUint16(0,6,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptService(t){p.Struct.setUint16(0,7,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownService(){return p.Struct.disown(this.getService())}getService(){return p.Struct.testWhich("service",p.Struct.getUint16(0,this),7,this),p.Struct.getStruct(1,Xt,this)}hasService(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initService(){return p.Struct.setUint16(0,7,this),p.Struct.initStructAt(1,Xt,this)}isService(){return p.Struct.getUint16(0,this)===7}setService(t){p.Struct.setUint16(0,7,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptDurableObjectNamespace(t){p.Struct.setUint16(0,8,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDurableObjectNamespace(){return p.Struct.disown(this.getDurableObjectNamespace())}getDurableObjectNamespace(){return p.Struct.testWhich("durableObjectNamespace",p.Struct.getUint16(0,this),8,this),p.Struct.getStruct(1,np,this)}hasDurableObjectNamespace(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDurableObjectNamespace(){return p.Struct.setUint16(0,8,this),p.Struct.initStructAt(1,np,this)}isDurableObjectNamespace(){return p.Struct.getUint16(0,this)===8}setDurableObjectNamespace(t){p.Struct.setUint16(0,8,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptKvNamespace(t){p.Struct.setUint16(0,9,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownKvNamespace(){return p.Struct.disown(this.getKvNamespace())}getKvNamespace(){return p.Struct.testWhich("kvNamespace",p.Struct.getUint16(0,this),9,this),p.Struct.getStruct(1,Xt,this)}hasKvNamespace(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initKvNamespace(){return p.Struct.setUint16(0,9,this),p.Struct.initStructAt(1,Xt,this)}isKvNamespace(){return p.Struct.getUint16(0,this)===9}setKvNamespace(t){p.Struct.setUint16(0,9,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptR2Bucket(t){p.Struct.setUint16(0,10,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownR2Bucket(){return p.Struct.disown(this.getR2Bucket())}getR2Bucket(){return p.Struct.testWhich("r2Bucket",p.Struct.getUint16(0,this),10,this),p.Struct.getStruct(1,Xt,this)}hasR2Bucket(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initR2Bucket(){return p.Struct.setUint16(0,10,this),p.Struct.initStructAt(1,Xt,this)}isR2Bucket(){return p.Struct.getUint16(0,this)===10}setR2Bucket(t){p.Struct.setUint16(0,10,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptR2Admin(t){p.Struct.setUint16(0,11,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownR2Admin(){return p.Struct.disown(this.getR2Admin())}getR2Admin(){return p.Struct.testWhich("r2Admin",p.Struct.getUint16(0,this),11,this),p.Struct.getStruct(1,Xt,this)}hasR2Admin(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initR2Admin(){return p.Struct.setUint16(0,11,this),p.Struct.initStructAt(1,Xt,this)}isR2Admin(){return p.Struct.getUint16(0,this)===11}setR2Admin(t){p.Struct.setUint16(0,11,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptWrapped(t){p.Struct.setUint16(0,12,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownWrapped(){return p.Struct.disown(this.getWrapped())}getWrapped(){return p.Struct.testWhich("wrapped",p.Struct.getUint16(0,this),12,this),p.Struct.getStruct(1,ul,this)}hasWrapped(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initWrapped(){return p.Struct.setUint16(0,12,this),p.Struct.initStructAt(1,ul,this)}isWrapped(){return p.Struct.getUint16(0,this)===12}setWrapped(t){p.Struct.setUint16(0,12,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptQueue(t){p.Struct.setUint16(0,13,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownQueue(){return p.Struct.disown(this.getQueue())}getQueue(){return p.Struct.testWhich("queue",p.Struct.getUint16(0,this),13,this),p.Struct.getStruct(1,Xt,this)}hasQueue(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initQueue(){return p.Struct.setUint16(0,13,this),p.Struct.initStructAt(1,Xt,this)}isQueue(){return p.Struct.getUint16(0,this)===13}setQueue(t){p.Struct.setUint16(0,13,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getFromEnvironment(){return p.Struct.testWhich("fromEnvironment",p.Struct.getUint16(0,this),14,this),p.Struct.getText(1,this)}isFromEnvironment(){return p.Struct.getUint16(0,this)===14}setFromEnvironment(t){p.Struct.setUint16(0,14,this),p.Struct.setText(1,t,this)}adoptAnalyticsEngine(t){p.Struct.setUint16(0,15,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownAnalyticsEngine(){return p.Struct.disown(this.getAnalyticsEngine())}getAnalyticsEngine(){return p.Struct.testWhich("analyticsEngine",p.Struct.getUint16(0,this),15,this),p.Struct.getStruct(1,Xt,this)}hasAnalyticsEngine(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initAnalyticsEngine(){return p.Struct.setUint16(0,15,this),p.Struct.initStructAt(1,Xt,this)}isAnalyticsEngine(){return p.Struct.getUint16(0,this)===15}setAnalyticsEngine(t){p.Struct.setUint16(0,15,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getHyperdrive(){return p.Struct.testWhich("hyperdrive",p.Struct.getUint16(0,this),16,this),p.Struct.getAs(V_,this)}initHyperdrive(){return p.Struct.setUint16(0,16,this),p.Struct.getAs(V_,this)}isHyperdrive(){return p.Struct.getUint16(0,this)===16}setHyperdrive(){p.Struct.setUint16(0,16,this)}isUnsafeEval(){return p.Struct.getUint16(0,this)===17}setUnsafeEval(){p.Struct.setUint16(0,17,this)}getMemoryCache(){return p.Struct.testWhich("memoryCache",p.Struct.getUint16(0,this),18,this),p.Struct.getAs(z_,this)}initMemoryCache(){return p.Struct.setUint16(0,18,this),p.Struct.getAs(z_,this)}isMemoryCache(){return p.Struct.getUint16(0,this)===18}setMemoryCache(){p.Struct.setUint16(0,18,this)}toString(){return"Worker_Binding_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_Binding=St;St.UNSPECIFIED=Rr.UNSPECIFIED;St.PARAMETER=Rr.PARAMETER;St.TEXT=Rr.TEXT;St.DATA=Rr.DATA;St.JSON=Rr.JSON;St.WASM_MODULE=Rr.WASM_MODULE;St.CRYPTO_KEY=Rr.CRYPTO_KEY;St.SERVICE=Rr.SERVICE;St.DURABLE_OBJECT_NAMESPACE=Rr.DURABLE_OBJECT_NAMESPACE;St.KV_NAMESPACE=Rr.KV_NAMESPACE;St.R2BUCKET=Rr.R2BUCKET;St.R2ADMIN=Rr.R2ADMIN;St.WRAPPED=Rr.WRAPPED;St.QUEUE=Rr.QUEUE;St.FROM_ENVIRONMENT=Rr.FROM_ENVIRONMENT;St.ANALYTICS_ENGINE=Rr.ANALYTICS_ENGINE;St.HYPERDRIVE=Rr.HYPERDRIVE;St.UNSAFE_EVAL=Rr.UNSAFE_EVAL;St.MEMORY_CACHE=Rr.MEMORY_CACHE;St.Type=Er;St.DurableObjectNamespaceDesignator=np;St.CryptoKey=$i;St.MemoryCacheLimits=ip;St.WrappedBinding=ul;St._capnp={displayName:"Binding",id:"8e7e492fd7e35f3e",size:new p.ObjectSize(8,6)};var IB;(function(e){e[e.UNIQUE_KEY=0]="UNIQUE_KEY",e[e.EPHEMERAL_LOCAL=1]="EPHEMERAL_LOCAL"})(IB=M.Worker_DurableObjectNamespace_Which||(M.Worker_DurableObjectNamespace_Which={}));var cl=class extends p.Struct{static{s(this,"Worker_DurableObjectNamespace")}getClassName(){return p.Struct.getText(0,this)}setClassName(t){p.Struct.setText(0,t,this)}getUniqueKey(){return p.Struct.testWhich("uniqueKey",p.Struct.getUint16(0,this),0,this),p.Struct.getText(1,this)}isUniqueKey(){return p.Struct.getUint16(0,this)===0}setUniqueKey(t){p.Struct.setUint16(0,0,this),p.Struct.setText(1,t,this)}isEphemeralLocal(){return p.Struct.getUint16(0,this)===1}setEphemeralLocal(){p.Struct.setUint16(0,1,this)}getPreventEviction(){return p.Struct.getBit(16,this)}setPreventEviction(t){p.Struct.setBit(16,t,this)}toString(){return"Worker_DurableObjectNamespace_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker_DurableObjectNamespace=cl;cl.UNIQUE_KEY=IB.UNIQUE_KEY;cl.EPHEMERAL_LOCAL=IB.EPHEMERAL_LOCAL;cl._capnp={displayName:"DurableObjectNamespace",id:"b429dd547d15747d",size:new p.ObjectSize(8,2)};var _A;(function(e){e[e.NONE=0]="NONE",e[e.IN_MEMORY=1]="IN_MEMORY",e[e.LOCAL_DISK=2]="LOCAL_DISK"})(_A=M.Worker_DurableObjectStorage_Which||(M.Worker_DurableObjectStorage_Which={}));var Tu=class extends p.Struct{static{s(this,"Worker_DurableObjectStorage")}isNone(){return p.Struct.getUint16(2,this)===0}setNone(){p.Struct.setUint16(2,0,this)}isInMemory(){return p.Struct.getUint16(2,this)===1}setInMemory(){p.Struct.setUint16(2,1,this)}getLocalDisk(){return p.Struct.testWhich("localDisk",p.Struct.getUint16(2,this),2,this),p.Struct.getText(8,this)}isLocalDisk(){return p.Struct.getUint16(2,this)===2}setLocalDisk(t){p.Struct.setUint16(2,2,this),p.Struct.setText(8,t,this)}toString(){return"Worker_DurableObjectStorage_"+super.toString()}which(){return p.Struct.getUint16(2,this)}};M.Worker_DurableObjectStorage=Tu;Tu.NONE=_A.NONE;Tu.IN_MEMORY=_A.IN_MEMORY;Tu.LOCAL_DISK=_A.LOCAL_DISK;Tu._capnp={displayName:"durableObjectStorage",id:"cc72b3faa57827d4",size:new p.ObjectSize(8,10)};var gA;(function(e){e[e.MODULES=0]="MODULES",e[e.SERVICE_WORKER_SCRIPT=1]="SERVICE_WORKER_SCRIPT",e[e.INHERIT=2]="INHERIT"})(gA=M.Worker_Which||(M.Worker_Which={}));var ti=class e extends p.Struct{static{s(this,"Worker")}adoptModules(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownModules(){return p.Struct.disown(this.getModules())}getModules(){return p.Struct.testWhich("modules",p.Struct.getUint16(0,this),0,this),p.Struct.getList(0,e._Modules,this)}hasModules(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initModules(t){return p.Struct.setUint16(0,0,this),p.Struct.initList(0,e._Modules,t,this)}isModules(){return p.Struct.getUint16(0,this)===0}setModules(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}getServiceWorkerScript(){return p.Struct.testWhich("serviceWorkerScript",p.Struct.getUint16(0,this),1,this),p.Struct.getText(0,this)}isServiceWorkerScript(){return p.Struct.getUint16(0,this)===1}setServiceWorkerScript(t){p.Struct.setUint16(0,1,this),p.Struct.setText(0,t,this)}getInherit(){return p.Struct.testWhich("inherit",p.Struct.getUint16(0,this),2,this),p.Struct.getText(0,this)}isInherit(){return p.Struct.getUint16(0,this)===2}setInherit(t){p.Struct.setUint16(0,2,this),p.Struct.setText(0,t,this)}getCompatibilityDate(){return p.Struct.getText(1,this)}setCompatibilityDate(t){p.Struct.setText(1,t,this)}adoptCompatibilityFlags(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownCompatibilityFlags(){return p.Struct.disown(this.getCompatibilityFlags())}getCompatibilityFlags(){return p.Struct.getList(2,We.TextList,this)}hasCompatibilityFlags(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initCompatibilityFlags(t){return p.Struct.initList(2,We.TextList,t,this)}setCompatibilityFlags(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptBindings(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownBindings(){return p.Struct.disown(this.getBindings())}getBindings(){return p.Struct.getList(3,e._Bindings,this)}hasBindings(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initBindings(t){return p.Struct.initList(3,e._Bindings,t,this)}setBindings(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}adoptGlobalOutbound(t){p.Struct.adopt(t,p.Struct.getPointer(4,this))}disownGlobalOutbound(){return p.Struct.disown(this.getGlobalOutbound())}getGlobalOutbound(){return p.Struct.getStruct(4,Xt,this,e._capnp.defaultGlobalOutbound)}hasGlobalOutbound(){return!p.Struct.isNull(p.Struct.getPointer(4,this))}initGlobalOutbound(){return p.Struct.initStructAt(4,Xt,this)}setGlobalOutbound(t){p.Struct.copyFrom(t,p.Struct.getPointer(4,this))}adoptCacheApiOutbound(t){p.Struct.adopt(t,p.Struct.getPointer(7,this))}disownCacheApiOutbound(){return p.Struct.disown(this.getCacheApiOutbound())}getCacheApiOutbound(){return p.Struct.getStruct(7,Xt,this)}hasCacheApiOutbound(){return!p.Struct.isNull(p.Struct.getPointer(7,this))}initCacheApiOutbound(){return p.Struct.initStructAt(7,Xt,this)}setCacheApiOutbound(t){p.Struct.copyFrom(t,p.Struct.getPointer(7,this))}adoptDurableObjectNamespaces(t){p.Struct.adopt(t,p.Struct.getPointer(5,this))}disownDurableObjectNamespaces(){return p.Struct.disown(this.getDurableObjectNamespaces())}getDurableObjectNamespaces(){return p.Struct.getList(5,e._DurableObjectNamespaces,this)}hasDurableObjectNamespaces(){return!p.Struct.isNull(p.Struct.getPointer(5,this))}initDurableObjectNamespaces(t){return p.Struct.initList(5,e._DurableObjectNamespaces,t,this)}setDurableObjectNamespaces(t){p.Struct.copyFrom(t,p.Struct.getPointer(5,this))}getDurableObjectUniqueKeyModifier(){return p.Struct.getText(6,this)}setDurableObjectUniqueKeyModifier(t){p.Struct.setText(6,t,this)}getDurableObjectStorage(){return p.Struct.getAs(Tu,this)}initDurableObjectStorage(){return p.Struct.getAs(Tu,this)}getModuleFallback(){return p.Struct.getText(9,this)}setModuleFallback(t){p.Struct.setText(9,t,this)}toString(){return"Worker_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.Worker=ti;ti.MODULES=gA.MODULES;ti.SERVICE_WORKER_SCRIPT=gA.SERVICE_WORKER_SCRIPT;ti.INHERIT=gA.INHERIT;ti.Module=ei;ti.Binding=St;ti.DurableObjectNamespace=cl;ti._capnp={displayName:"Worker",id:"acfa77e88fd97d1c",size:new p.ObjectSize(8,10),defaultGlobalOutbound:We.readRawPointer(new Uint8Array([16,5,64,2,17,5,74,0,0,255,105,110,116,101,114,110,101,116,0,0,0]).buffer)};var H_=class extends p.Struct{static{s(this,"ExternalServer_Https")}adoptOptions(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownOptions(){return p.Struct.disown(this.getOptions())}getOptions(){return p.Struct.getStruct(1,Rn,this)}hasOptions(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initOptions(){return p.Struct.initStructAt(1,Rn,this)}setOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(2,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initTlsOptions(){return p.Struct.initStructAt(2,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}getCertificateHost(){return p.Struct.getText(3,this)}setCertificateHost(t){p.Struct.setText(3,t,this)}toString(){return"ExternalServer_Https_"+super.toString()}};M.ExternalServer_Https=H_;H_._capnp={displayName:"https",id:"ac37e02afd3dc6db",size:new p.ObjectSize(8,4)};var K_=class extends p.Struct{static{s(this,"ExternalServer_Tcp")}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(1,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initTlsOptions(){return p.Struct.initStructAt(1,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getCertificateHost(){return p.Struct.getText(2,this)}setCertificateHost(t){p.Struct.setText(2,t,this)}toString(){return"ExternalServer_Tcp_"+super.toString()}};M.ExternalServer_Tcp=K_;K_._capnp={displayName:"tcp",id:"d941637df0fb39f1",size:new p.ObjectSize(8,4)};var yA;(function(e){e[e.HTTP=0]="HTTP",e[e.HTTPS=1]="HTTPS",e[e.TCP=2]="TCP"})(yA=M.ExternalServer_Which||(M.ExternalServer_Which={}));var Nu=class extends p.Struct{static{s(this,"ExternalServer")}getAddress(){return p.Struct.getText(0,this)}setAddress(t){p.Struct.setText(0,t,this)}adoptHttp(t){p.Struct.setUint16(0,0,this),p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownHttp(){return p.Struct.disown(this.getHttp())}getHttp(){return p.Struct.testWhich("http",p.Struct.getUint16(0,this),0,this),p.Struct.getStruct(1,Rn,this)}hasHttp(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initHttp(){return p.Struct.setUint16(0,0,this),p.Struct.initStructAt(1,Rn,this)}isHttp(){return p.Struct.getUint16(0,this)===0}setHttp(t){p.Struct.setUint16(0,0,this),p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getHttps(){return p.Struct.testWhich("https",p.Struct.getUint16(0,this),1,this),p.Struct.getAs(H_,this)}initHttps(){return p.Struct.setUint16(0,1,this),p.Struct.getAs(H_,this)}isHttps(){return p.Struct.getUint16(0,this)===1}setHttps(){p.Struct.setUint16(0,1,this)}getTcp(){return p.Struct.testWhich("tcp",p.Struct.getUint16(0,this),2,this),p.Struct.getAs(K_,this)}initTcp(){return p.Struct.setUint16(0,2,this),p.Struct.getAs(K_,this)}isTcp(){return p.Struct.getUint16(0,this)===2}setTcp(){p.Struct.setUint16(0,2,this)}toString(){return"ExternalServer_"+super.toString()}which(){return p.Struct.getUint16(0,this)}};M.ExternalServer=Nu;Nu.HTTP=yA.HTTP;Nu.HTTPS=yA.HTTPS;Nu.TCP=yA.TCP;Nu._capnp={displayName:"ExternalServer",id:"ff209f9aa352f5a4",size:new p.ObjectSize(8,4)};var W_=class e extends p.Struct{static{s(this,"Network")}adoptAllow(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownAllow(){return p.Struct.disown(this.getAllow())}getAllow(){return p.Struct.getList(0,We.TextList,this,e._capnp.defaultAllow)}hasAllow(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initAllow(t){return p.Struct.initList(0,We.TextList,t,this)}setAllow(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}adoptDeny(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownDeny(){return p.Struct.disown(this.getDeny())}getDeny(){return p.Struct.getList(1,We.TextList,this)}hasDeny(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initDeny(t){return p.Struct.initList(1,We.TextList,t,this)}setDeny(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}adoptTlsOptions(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownTlsOptions(){return p.Struct.disown(this.getTlsOptions())}getTlsOptions(){return p.Struct.getStruct(2,Di,this)}hasTlsOptions(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initTlsOptions(){return p.Struct.initStructAt(2,Di,this)}setTlsOptions(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}toString(){return"Network_"+super.toString()}};M.Network=W_;W_._capnp={displayName:"Network",id:"fa42244f950c9b9c",size:new p.ObjectSize(0,3),defaultAllow:We.readRawPointer(new Uint8Array([16,3,17,1,14,17,1,58,63,112,117,98,108,105,99]).buffer)};var Y_=class e extends p.Struct{static{s(this,"DiskDirectory")}getPath(){return p.Struct.getText(0,this)}setPath(t){p.Struct.setText(0,t,this)}getWritable(){return p.Struct.getBit(0,this,e._capnp.defaultWritable)}setWritable(t){p.Struct.setBit(0,t,this)}getAllowDotfiles(){return p.Struct.getBit(1,this,e._capnp.defaultAllowDotfiles)}setAllowDotfiles(t){p.Struct.setBit(1,t,this)}toString(){return"DiskDirectory_"+super.toString()}};M.DiskDirectory=Y_;Y_._capnp={displayName:"DiskDirectory",id:"9048ab22835f51c3",size:new p.ObjectSize(8,1),defaultWritable:We.getBitMask(!1,0),defaultAllowDotfiles:We.getBitMask(!1,1)};var dpe;(function(e){e[e.HOST=0]="HOST",e[e.PROXY=1]="PROXY"})(dpe=M.HttpOptions_Style||(M.HttpOptions_Style={}));var sp=class extends p.Struct{static{s(this,"HttpOptions_Header")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getValue(){return p.Struct.getText(1,this)}setValue(t){p.Struct.setText(1,t,this)}toString(){return"HttpOptions_Header_"+super.toString()}};M.HttpOptions_Header=sp;sp._capnp={displayName:"Header",id:"dc0394b5a6f3417e",size:new p.ObjectSize(0,2)};var Rn=class e extends p.Struct{static{s(this,"HttpOptions")}getStyle(){return p.Struct.getUint16(0,this,e._capnp.defaultStyle)}setStyle(t){p.Struct.setUint16(0,t,this)}getForwardedProtoHeader(){return p.Struct.getText(0,this)}setForwardedProtoHeader(t){p.Struct.setText(0,t,this)}getCfBlobHeader(){return p.Struct.getText(1,this)}setCfBlobHeader(t){p.Struct.setText(1,t,this)}adoptInjectRequestHeaders(t){p.Struct.adopt(t,p.Struct.getPointer(2,this))}disownInjectRequestHeaders(){return p.Struct.disown(this.getInjectRequestHeaders())}getInjectRequestHeaders(){return p.Struct.getList(2,e._InjectRequestHeaders,this)}hasInjectRequestHeaders(){return!p.Struct.isNull(p.Struct.getPointer(2,this))}initInjectRequestHeaders(t){return p.Struct.initList(2,e._InjectRequestHeaders,t,this)}setInjectRequestHeaders(t){p.Struct.copyFrom(t,p.Struct.getPointer(2,this))}adoptInjectResponseHeaders(t){p.Struct.adopt(t,p.Struct.getPointer(3,this))}disownInjectResponseHeaders(){return p.Struct.disown(this.getInjectResponseHeaders())}getInjectResponseHeaders(){return p.Struct.getList(3,e._InjectResponseHeaders,this)}hasInjectResponseHeaders(){return!p.Struct.isNull(p.Struct.getPointer(3,this))}initInjectResponseHeaders(t){return p.Struct.initList(3,e._InjectResponseHeaders,t,this)}setInjectResponseHeaders(t){p.Struct.copyFrom(t,p.Struct.getPointer(3,this))}getCapnpConnectHost(){return p.Struct.getText(4,this)}setCapnpConnectHost(t){p.Struct.setText(4,t,this)}toString(){return"HttpOptions_"+super.toString()}};M.HttpOptions=Rn;Rn.Style=dpe;Rn.Header=sp;Rn._capnp={displayName:"HttpOptions",id:"aa8dc6885da78f19",size:new p.ObjectSize(8,5),defaultStyle:We.getUint16Mask(0)};var op=class extends p.Struct{static{s(this,"TlsOptions_Keypair")}getPrivateKey(){return p.Struct.getText(0,this)}setPrivateKey(t){p.Struct.setText(0,t,this)}getCertificateChain(){return p.Struct.getText(1,this)}setCertificateChain(t){p.Struct.setText(1,t,this)}toString(){return"TlsOptions_Keypair_"+super.toString()}};M.TlsOptions_Keypair=op;op._capnp={displayName:"Keypair",id:"f546bf2d5d8bd13e",size:new p.ObjectSize(0,2)};var ppe;(function(e){e[e.GOOD_DEFAULT=0]="GOOD_DEFAULT",e[e.SSL3=1]="SSL3",e[e.TLS1DOT0=2]="TLS1DOT0",e[e.TLS1DOT1=3]="TLS1DOT1",e[e.TLS1DOT2=4]="TLS1DOT2",e[e.TLS1DOT3=5]="TLS1DOT3"})(ppe=M.TlsOptions_Version||(M.TlsOptions_Version={}));var Di=class e extends p.Struct{static{s(this,"TlsOptions")}adoptKeypair(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownKeypair(){return p.Struct.disown(this.getKeypair())}getKeypair(){return p.Struct.getStruct(0,op,this)}hasKeypair(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initKeypair(){return p.Struct.initStructAt(0,op,this)}setKeypair(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}getRequireClientCerts(){return p.Struct.getBit(0,this,e._capnp.defaultRequireClientCerts)}setRequireClientCerts(t){p.Struct.setBit(0,t,this)}getTrustBrowserCas(){return p.Struct.getBit(1,this,e._capnp.defaultTrustBrowserCas)}setTrustBrowserCas(t){p.Struct.setBit(1,t,this)}adoptTrustedCertificates(t){p.Struct.adopt(t,p.Struct.getPointer(1,this))}disownTrustedCertificates(){return p.Struct.disown(this.getTrustedCertificates())}getTrustedCertificates(){return p.Struct.getList(1,We.TextList,this)}hasTrustedCertificates(){return!p.Struct.isNull(p.Struct.getPointer(1,this))}initTrustedCertificates(t){return p.Struct.initList(1,We.TextList,t,this)}setTrustedCertificates(t){p.Struct.copyFrom(t,p.Struct.getPointer(1,this))}getMinVersion(){return p.Struct.getUint16(2,this,e._capnp.defaultMinVersion)}setMinVersion(t){p.Struct.setUint16(2,t,this)}getCipherList(){return p.Struct.getText(2,this)}setCipherList(t){p.Struct.setText(2,t,this)}toString(){return"TlsOptions_"+super.toString()}};M.TlsOptions=Di;Di.Keypair=op;Di.Version=ppe;Di._capnp={displayName:"TlsOptions",id:"aabb3c3778ac4311",size:new p.ObjectSize(8,3),defaultRequireClientCerts:We.getBitMask(!1,0),defaultTrustBrowserCas:We.getBitMask(!1,1),defaultMinVersion:We.getUint16Mask(0)};var J_=class e extends p.Struct{static{s(this,"Extension_Module")}getName(){return p.Struct.getText(0,this)}setName(t){p.Struct.setText(0,t,this)}getInternal(){return p.Struct.getBit(0,this,e._capnp.defaultInternal)}setInternal(t){p.Struct.setBit(0,t,this)}getEsModule(){return p.Struct.getText(1,this)}setEsModule(t){p.Struct.setText(1,t,this)}toString(){return"Extension_Module_"+super.toString()}};M.Extension_Module=J_;J_._capnp={displayName:"Module",id:"d5d16e76fdedc37d",size:new p.ObjectSize(8,2),defaultInternal:We.getBitMask(!1,0)};var ap=class e extends p.Struct{static{s(this,"Extension")}adoptModules(t){p.Struct.adopt(t,p.Struct.getPointer(0,this))}disownModules(){return p.Struct.disown(this.getModules())}getModules(){return p.Struct.getList(0,e._Modules,this)}hasModules(){return!p.Struct.isNull(p.Struct.getPointer(0,this))}initModules(t){return p.Struct.initList(0,e._Modules,t,this)}setModules(t){p.Struct.copyFrom(t,p.Struct.getPointer(0,this))}toString(){return"Extension_"+super.toString()}};M.Extension=ap;ap.Module=J_;ap._capnp={displayName:"Extension",id:"e390128a861973a6",size:new p.ObjectSize(0,1)};tp._Services=We.CompositeList($a);tp._Sockets=We.CompositeList(rp);tp._Extensions=We.CompositeList(ap);ul._InnerBindings=We.CompositeList(St);ti._Modules=We.CompositeList(ei);ti._Bindings=We.CompositeList(St);ti._DurableObjectNamespaces=We.CompositeList(cl);Rn._InjectRequestHeaders=We.CompositeList(sp);Rn._InjectResponseHeaders=We.CompositeList(sp);ap._Modules=We.CompositeList(J_)});var TB=h(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.kVoid=La.Worker_Binding_CryptoKey_Usage=La.TlsOptions_Version=La.HttpOptions_Style=void 0;var wB=PB();Object.defineProperty(La,"HttpOptions_Style",{enumerable:!0,get:function(){return wB.HttpOptions_Style}});Object.defineProperty(La,"TlsOptions_Version",{enumerable:!0,get:function(){return wB.TlsOptions_Version}});Object.defineProperty(La,"Worker_Binding_CryptoKey_Usage",{enumerable:!0,get:function(){return wB.Worker_Binding_CryptoKey_Usage}});La.kVoid=Symbol("kVoid")});var AB=h(Au=>{"use strict";var Vyt=Au&&Au.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),zyt=Au&&Au.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Vyt(t,e,r)};Object.defineProperty(Au,"__esModule",{value:!0});Au.serializeConfig=void 0;var Hyt=mA(),Kyt=TB(),Wyt=PB();function Yyt(e){return e.length>0?e[0].toUpperCase()+e.substring(1):e}s(Yyt,"capitalize");function NB(e,t){let r=t;for(let[n,i]of Object.entries(e)){let o=Yyt(n);if(i instanceof Uint8Array)r[`init${o}`](i.byteLength).copyBuffer(i);else if(Array.isArray(i)){let a=r[`init${o}`](i.length);for(let u=0;u<i.length;u++)typeof i[u]=="object"?NB(i[u],a.get(u)):a.set(u,i[u])}else if(typeof i=="object"){let a=r[`init${o}`]();NB(i,a)}else i===Kyt.kVoid?r[`set${o}`]():i!==void 0&&r[`set${o}`](i)}}s(NB,"encodeCapnpStruct");function Jyt(e){let t=new Hyt.Message,r=t.initRoot(Wyt.Config);return NB(e,r),Buffer.from(t.toArrayBuffer())}s(Jyt,"serializeConfig");Au.serializeConfig=Jyt;zyt(TB(),Au)});var bpe=h(Cr=>{"use strict";var ype=Cr&&Cr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Xyt=Cr&&Cr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Qyt=Cr&&Cr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ype(t,e,r);return Xyt(t,e),t},Zyt=Cr&&Cr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&ype(t,e,r)},DB=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.supportedCompatibilityDate=Cr.Runtime=Cr.kInspectorSocket=void 0;var e0t=Um(),t0t=DB(require("assert")),hpe=DB(require("child_process")),RB=require("events"),mpe=require("fs"),CB=DB(require("readline")),r0t=require("stream"),Epe=Qyt(require("workerd"));Object.defineProperty(Cr,"supportedCompatibilityDate",{enumerable:!0,get:function(){return Epe.compatibilityDate}});Cr.kInspectorSocket=Symbol("kInspectorSocket");async function n0t(e,t){if(t?.signal?.aborted)return;let r=CB.default.createInterface(e),n=s(()=>r.close(),"abortListener");t?.signal?.addEventListener("abort",n,{once:!0});let i=Array.from(t.requiredSockets),o=new Map;try{for await(let a of r){let u=JSON.parse(a),c=u.event==="listen-inspector"?Cr.kInspectorSocket:u.socket,l=i.indexOf(c);if(l!==-1&&(o.set(c,u.port),i.splice(l,1),i.length===0))return o}}finally{t?.signal?.removeEventListener("abort",n)}}s(n0t,"waitForPorts");function _pe(e){return new Promise(t=>{e.once("exit",()=>t())})}s(_pe,"waitForExit");function i0t(e,t){let r=(0,e0t.createNewLogger)({loggerOptions:{level:"debug",hooks:{}}});CB.default.createInterface(e).on("line",n=>{try{let i=JSON.parse(n),o=[...i.messages,{logOwner:i.logOwner,logSource:i.logSource,level:i.level,timestamp:i.timestamp,loggingId:i.loggingId,rayId:i.rayId,requestId:i.requestId,buildId:i.buildId}];switch(i.level){case"debug":o.forEach(a=>r.debug(a));break;case"warn":o.forEach(a=>r.warn(a));break;case"error":o.forEach(a=>r.error(a));break;default:o.forEach(a=>r.info(a))}}catch{r.info(n)}}),CB.default.createInterface(t).on("line",n=>r.error(n))}s(i0t,"pinoPretty");function gpe(){return Epe.default}s(gpe,"getRuntimeCommand");function s0t(e){let t=["serve","--binary","--experimental","--control-fd=3","-"];return e.inspectorAddress!==void 0&&t.push(`--inspector-addr=localhost:${e.inspectorAddress}`),e.verbose&&t.push("--verbose"),t}s(s0t,"getServeArgs");function o0t(e){let t=["compile","--binary","-"];return e.verbose&&t.push("--verbose"),t}s(o0t,"getCompileArgs");var $B=class{static{s(this,"Runtime")}process;processExitPromise;async updateConfig(t,r){await this.dispose();let n=gpe(),i=s0t(r),o=hpe.default.spawn(n,i,{stdio:["pipe","pipe","pipe","pipe"],env:{...process.env}});this.process=o,this.processExitPromise=_pe(o),(r.handleRuntimeStdio??i0t)(o.stdout,o.stderr);let u=o.stdio[3];return(0,t0t.default)(u instanceof r0t.Readable),o.stdin.write(t),o.stdin.end(),await(0,RB.once)(o.stdin,"finish"),n0t(u,r)}async compileBinary(t,r){await this.dispose();let n=gpe(),i=o0t(r),o=hpe.default.spawn(n,i,{stdio:["pipe","pipe","pipe"],env:{...process.env}});this.process=o,this.processExitPromise=_pe(o),o.stdin.write(t),o.stdin.end(),await(0,RB.once)(o.stdin,"finish");let a=(0,mpe.createWriteStream)(r.binaryPath);o.stdout.pipe(a),await(0,RB.once)(o.stdout,"finish"),(0,mpe.chmodSync)(r.binaryPath,493),await this.dispose()}dispose(){return this.process?.kill("SIGKILL"),this.processExitPromise}};Cr.Runtime=$B;Zyt(AB(),Cr)});var jB=h(Q_=>{"use strict";var a0t=Q_&&Q_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Q_,"__esModule",{value:!0});Q_.ZuploWorkerd=void 0;var u0t=require("fs"),c0t=bpe(),Spe=AB(),l0t=require("url"),f0t=a0t(require("path")),LB=class{static{s(this,"ZuploWorkerd")}options;runtime;constructor(t){this.options=t,this.runtime=new c0t.Runtime}async serve(){let t=await this.configure(),r=(0,Spe.serializeConfig)(t),n={requiredSockets:["http"],inspectorAddress:this.options.inspectorPort};await this.runtime.updateConfig(r,n)}async compileBinary(t){let r=await this.configure({embedVariables:!1}),n=(0,Spe.serializeConfig)(r);await this.runtime.compileBinary(n,t)}async dispose(){await this.runtime.dispose()}withSourceURL(t,r){if(t.lastIndexOf("//# sourceURL=")!==-1)return t;let i=`
|
|
321
321
|
//# sourceURL=${(0,l0t.pathToFileURL)(r)}
|
|
322
|
-
`;return t+i}async configure(){let
|
|
322
|
+
`;return t+i}async configure(t={embedVariables:!0}){let r=f0t.default.join(this.options.scriptDirectory,this.options.scriptName),n=(0,u0t.readFileSync)(r,"utf8"),i=this.withSourceURL(n,r),o=this.options.compatibilityDate??"2024-04-05",a;return t.embedVariables?a=Object.entries(this.options.bindings).map(([u,c])=>({name:u,json:JSON.stringify(c)})):a=Object.entries(this.options.bindings).map(([u])=>({name:u,fromEnvironment:u})),{services:[{name:"zuplo-entry",worker:{modules:[{name:"bundled-worker-script",esModule:i}],compatibilityDate:o,compatibilityFlags:["nodejs_compat"],bindings:a,cacheApiOutbound:{name:"noop-cache"}}},{name:"noop-cache",worker:{modules:[{name:"noop-cache.js",esModule:`
|
|
323
323
|
var CacheHeaders = {
|
|
324
324
|
NAMESPACE: "cf-cache-namespace",
|
|
325
325
|
STATUS: "cf-cache-status"
|
|
@@ -336,5 +336,5 @@ Segment #${r}
|
|
|
336
336
|
export {
|
|
337
337
|
cache_entry_noop_worker_default as default
|
|
338
338
|
};
|
|
339
|
-
`}],compatibilityDate:
|
|
339
|
+
`}],compatibilityDate:o,compatibilityFlags:["nodejs_compat"]}},{name:"internet",network:{allow:["public","private"],deny:[],tlsOptions:{trustBrowserCas:!0,trustedCertificates:[]}}}],sockets:[{name:"http",address:`*:${this.options.port}`,http:{},service:{name:"zuplo-entry"}}]}}};Q_.ZuploWorkerd=LB});var vpe=h(Z_=>{"use strict";var d0t=Z_&&Z_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.isPortAvailable=void 0;var p0t=d0t(require("net"));function h0t(e,t){return new Promise(r=>{let n=new p0t.default.Socket;n.connect(t,e),n.on("connect",()=>{n.destroy(),r(!1)}),n.on("error",()=>{n.destroy(),r(!0)})})}s(h0t,"isPortAvailable");Z_.isPortAvailable=h0t});var Ppe=h(eg=>{"use strict";var Ipe=eg&&eg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(eg,"__esModule",{value:!0});eg.WorkerdServer=void 0;var m0t=Um(),_0t=Ipe(require("path")),g0t=P1(),y0t=Ik(),Ope=Ipe(Xs()),E0t=jB(),b0t=vpe(),MB=class{static{s(this,"WorkerdServer")}sourceDirectory;port;debugPort;logger;buildWatcher;workerd;constructor(t){this.sourceDirectory=t.sourceDirectory,this.port=t.port??Ope.default.DEV_SERVER_PORT,this.debugPort=t.debugPort,this.logger=t.logger??(0,m0t.createNewLogger)(),t.zupTestMode||(this.buildWatcher=new g0t.BuildWatcher({...t,dev:!Ope.default.isProduction(),logger:this.logger,generateSourceMaps:!0,publicZuploEnvironmentVariables:t.publicZuploEnvironmentVariables??{ZUPLO_ENVIRONMENT_TYPE:"LOCAL_DEVELOPMENT"}}),this.buildWatcher.watchEnvFiles())}async start(){if(!await(0,b0t.isPortAvailable)("localhost",this.port))throw new Error(`Port ${this.port} is currently in use. Please use a different port.`);if(this.buildWatcher)try{await this.buildWatcher.start()}catch{this.logger.info("Ran into irrecoverable error while starting watcher. Fix the error and restart the server."),process.exit(1)}await this.startOrReload(),this.buildWatcher?.onReload((r,n,i)=>{n||i&&i.errors&&i.errors.length>0||(this.logger.info("Reloading the contents of the zup locally"),this.startOrReload(r).catch(o=>{this.logger.error(o)}))})}async startOrReload(t){try{let r={};await(0,y0t.setEnvironment)(r,this.sourceDirectory),await this.workerd?.dispose(),this.workerd=new E0t.ZuploWorkerd({compatibilityDate:t?.compatibilityDate,scriptDirectory:_0t.default.join(this.sourceDirectory,"dist"),scriptName:"worker.js",port:this.port,inspectorPort:this.debugPort??void 0,bindings:r}),await this.workerd.serve()}catch{}}async stop(){await this.buildWatcher?.close(),await this.workerd?.dispose()}};eg.WorkerdServer=MB});var wpe=h(EA=>{"use strict";Object.defineProperty(EA,"__esModule",{value:!0});EA.startDevServer=void 0;var S0t=Ppe();async function v0t({sourceDirectory:e,port:t,debugPort:r,publicZuploEnvironmentVariables:n,logger:i}){let o=new S0t.WorkerdServer({sourceDirectory:e,port:t,debugPort:r,publicZuploEnvironmentVariables:n,logger:i});await o.start();async function a(){await o.stop()}s(a,"handle"),process.on("SIGTERM",a),process.on("SIGINT",a)}s(v0t,"startDevServer");EA.startDevServer=v0t});var Rpe=h(tg=>{"use strict";var Ape=tg&&tg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tg,"__esModule",{value:!0});tg.compileWorkerdServer=void 0;var O0t=Um(),Tpe=Ape(Xs()),I0t=P1(),P0t=jB(),Npe=Ape(require("path")),w0t=Ik();async function T0t({sourceDirectory:e,port:t,binaryName:r,publicZuploEnvironmentVariables:n,logger:i}){let o=i??(0,O0t.createNewLogger)(),a=new I0t.BuildWatcher({sourceDirectory:e,dev:!Tpe.default.isProduction(),logger:o,generateSourceMaps:!0,publicZuploEnvironmentVariables:n??{ZUPLO_ENVIRONMENT_TYPE:"LOCAL_DEVELOPMENT"}});try{await a.start()}catch{o.info("Ran into irrecoverable error while building. Fix the error and rerun the command."),process.exit(1)}return new Promise((u,c)=>{a.onReload((l,f,d)=>{(f||d&&d.errors&&d.errors.length>0)&&c(f??d?.errors),(async()=>{let _={};await(0,w0t.setEnvironment)(_,e);let m=new P0t.ZuploWorkerd({compatibilityDate:l?.compatibilityDate,scriptDirectory:Npe.default.join(e,"dist"),scriptName:"worker.js",port:t??Tpe.default.DEV_SERVER_PORT,bindings:_}),g=r??"compiled-zup";await m.compileBinary({binaryPath:Npe.default.join(e,"dist",g)}),await m.dispose(),u(void 0)})().catch(_=>{i.error(_),c(_)})})})}s(T0t,"compileWorkerdServer");tg.compileWorkerdServer=T0t});var Cpe=h(bA=>{"use strict";Object.defineProperty(bA,"__esModule",{value:!0});bA.TestHelper=void 0;var N0t=Um();bA.TestHelper={get TEST_URL(){let e=process.env.TEST_URL;if(!e)throw new Error("Test url not set, invalid state");return e},logger:N0t.logger}});var $pe=h(ke=>{"use strict";var A0t=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ke,"__esModule",{value:!0});ke.TestHelper=ke.sanitize=ke.env=ke.compileWorkerdServer=ke.startDevServer=ke.create=ke.ZUPLO_PREFERRED_JSON_FILE=ke.ZUPLO_FALLBACK_JSON_FILE=ke.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE=ke.WORKER_BUILD_OUTPUT_FILE=ke.USER_CONFIG_DIR_NAME=ke.OPEN_API_FILE_SUFFIX=ke.DEV_PORTAL_OUTPUT_DIR_NAME=ke.BUILD_OUTPUT_DIR=ke.BuildWatcher=ke.CompilerResult=ke.build=void 0;var R0t=Y2();Object.defineProperty(ke,"build",{enumerable:!0,get:function(){return R0t.build}});var C0t=$I();Object.defineProperty(ke,"CompilerResult",{enumerable:!0,get:function(){return C0t.CompilerResult}});var $0t=P1();Object.defineProperty(ke,"BuildWatcher",{enumerable:!0,get:function(){return $0t.BuildWatcher}});var ll=kt();Object.defineProperty(ke,"BUILD_OUTPUT_DIR",{enumerable:!0,get:function(){return ll.BUILD_OUTPUT_DIR}});Object.defineProperty(ke,"DEV_PORTAL_OUTPUT_DIR_NAME",{enumerable:!0,get:function(){return ll.DEV_PORTAL_OUTPUT_DIR_NAME}});Object.defineProperty(ke,"OPEN_API_FILE_SUFFIX",{enumerable:!0,get:function(){return ll.OPEN_API_FILE_SUFFIX}});Object.defineProperty(ke,"USER_CONFIG_DIR_NAME",{enumerable:!0,get:function(){return ll.USER_CONFIG_DIR_NAME}});Object.defineProperty(ke,"WORKER_BUILD_OUTPUT_FILE",{enumerable:!0,get:function(){return ll.WORKER_BUILD_OUTPUT_FILE}});Object.defineProperty(ke,"WORKER_BUILD_OUTPUT_SOURCEMAP_FILE",{enumerable:!0,get:function(){return ll.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE}});Object.defineProperty(ke,"ZUPLO_FALLBACK_JSON_FILE",{enumerable:!0,get:function(){return ll.ZUPLO_FALLBACK_JSON_FILE}});Object.defineProperty(ke,"ZUPLO_PREFERRED_JSON_FILE",{enumerable:!0,get:function(){return ll.ZUPLO_PREFERRED_JSON_FILE}});var D0t=_ue();Object.defineProperty(ke,"create",{enumerable:!0,get:function(){return D0t.create}});var L0t=wpe();Object.defineProperty(ke,"startDevServer",{enumerable:!0,get:function(){return L0t.startDevServer}});var j0t=Rpe();Object.defineProperty(ke,"compileWorkerdServer",{enumerable:!0,get:function(){return j0t.compileWorkerdServer}});var M0t=Xs();Object.defineProperty(ke,"env",{enumerable:!0,get:function(){return A0t(M0t).default}});var U0t=ek();Object.defineProperty(ke,"sanitize",{enumerable:!0,get:function(){return U0t.sanitize}});var x0t=Cpe();Object.defineProperty(ke,"TestHelper",{enumerable:!0,get:function(){return x0t.TestHelper}})});RA().config();module.exports=$pe();
|
|
340
340
|
/*! For license information please see index.minified.js.LEGAL.txt */
|