{"ast":null,"code":"\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.HttpCursor = void 0;\nconst byte_queue_js_1 = require(\"../byte_queue.js\");\nconst cursor_js_1 = require(\"../cursor.js\");\nconst jsond = __importStar(require(\"../encoding/json/decode.js\"));\nconst protobufd = __importStar(require(\"../encoding/protobuf/decode.js\"));\nconst errors_js_1 = require(\"../errors.js\");\nconst util_js_1 = require(\"../util.js\");\nconst json_decode_js_1 = require(\"./json_decode.js\");\nconst protobuf_decode_js_1 = require(\"./protobuf_decode.js\");\nconst json_decode_js_2 = require(\"../shared/json_decode.js\");\nconst protobuf_decode_js_2 = require(\"../shared/protobuf_decode.js\");\nclass HttpCursor extends cursor_js_1.Cursor {\n #stream;\n #encoding;\n #reader;\n #queue;\n #closed;\n #done;\n /** @private */\n constructor(stream, encoding) {\n super();\n this.#stream = stream;\n this.#encoding = encoding;\n this.#reader = undefined;\n this.#queue = new byte_queue_js_1.ByteQueue(16 * 1024);\n this.#closed = undefined;\n this.#done = false;\n }\n async open(response) {\n if (response.body === null) {\n throw new errors_js_1.ProtoError(\"No response body for cursor request\");\n }\n this.#reader = response.body.getReader();\n const respBody = await this.#nextItem(json_decode_js_1.CursorRespBody, protobuf_decode_js_1.CursorRespBody);\n if (respBody === undefined) {\n throw new errors_js_1.ProtoError(\"Empty response to cursor request\");\n }\n return respBody;\n }\n /** Fetch the next entry from the cursor. */\n next() {\n return this.#nextItem(json_decode_js_2.CursorEntry, protobuf_decode_js_2.CursorEntry);\n }\n /** Close the cursor. */\n close() {\n this._setClosed(new errors_js_1.ClientError(\"Cursor was manually closed\"));\n }\n /** @private */\n _setClosed(error) {\n if (this.#closed !== undefined) {\n return;\n }\n this.#closed = error;\n this.#stream._cursorClosed(this);\n if (this.#reader !== undefined) {\n this.#reader.cancel();\n }\n }\n /** True if the cursor is closed. */\n get closed() {\n return this.#closed !== undefined;\n }\n async #nextItem(jsonFun, protobufDef) {\n for (;;) {\n if (this.#done) {\n return undefined;\n } else if (this.#closed !== undefined) {\n throw new errors_js_1.ClosedError(\"Cursor is closed\", this.#closed);\n }\n if (this.#encoding === \"json\") {\n const jsonData = this.#parseItemJson();\n if (jsonData !== undefined) {\n const jsonText = new TextDecoder().decode(jsonData);\n const jsonValue = JSON.parse(jsonText);\n return jsond.readJsonObject(jsonValue, jsonFun);\n }\n } else if (this.#encoding === \"protobuf\") {\n const protobufData = this.#parseItemProtobuf();\n if (protobufData !== undefined) {\n return protobufd.readProtobufMessage(protobufData, protobufDef);\n }\n } else {\n throw (0, util_js_1.impossible)(this.#encoding, \"Impossible encoding\");\n }\n if (this.#reader === undefined) {\n throw new errors_js_1.InternalError(\"Attempted to read from HTTP cursor before it was opened\");\n }\n const {\n value,\n done\n } = await this.#reader.read();\n if (done && this.#queue.length === 0) {\n this.#done = true;\n } else if (done) {\n throw new errors_js_1.ProtoError(\"Unexpected end of cursor stream\");\n } else {\n this.#queue.push(value);\n }\n }\n }\n #parseItemJson() {\n const data = this.#queue.data();\n const newlineByte = 10;\n const newlinePos = data.indexOf(newlineByte);\n if (newlinePos < 0) {\n return undefined;\n }\n const jsonData = data.slice(0, newlinePos);\n this.#queue.shift(newlinePos + 1);\n return jsonData;\n }\n #parseItemProtobuf() {\n const data = this.#queue.data();\n let varintValue = 0;\n let varintLength = 0;\n for (;;) {\n if (varintLength >= data.byteLength) {\n return undefined;\n }\n const byte = data[varintLength];\n varintValue |= (byte & 0x7f) << 7 * varintLength;\n varintLength += 1;\n if (!(byte & 0x80)) {\n break;\n }\n }\n if (data.byteLength < varintLength + varintValue) {\n return undefined;\n }\n const protobufData = data.slice(varintLength, varintLength + varintValue);\n this.#queue.shift(varintLength + varintValue);\n return protobufData;\n }\n}\nexports.HttpCursor = HttpCursor;","map":{"version":3,"names":["__createBinding","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","exports","HttpCursor","byte_queue_js_1","require","cursor_js_1","jsond","protobufd","errors_js_1","util_js_1","json_decode_js_1","protobuf_decode_js_1","json_decode_js_2","protobuf_decode_js_2","Cursor","stream","encoding","reader","queue","closed","done","constructor","ByteQueue","open","response","body","ProtoError","getReader","respBody","nextItem","CursorRespBody","next","CursorEntry","close","_setClosed","ClientError","error","_cursorClosed","cancel","#nextItem","jsonFun","protobufDef","ClosedError","jsonData","parseItemJson","jsonText","TextDecoder","decode","jsonValue","JSON","parse","readJsonObject","protobufData","parseItemProtobuf","readProtobufMessage","impossible","InternalError","read","length","push","#parseItemJson","data","newlineByte","newlinePos","indexOf","slice","shift","#parseItemProtobuf","varintValue","varintLength","byteLength","byte"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/hrana-client/lib-cjs/http/cursor.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpCursor = void 0;\nconst byte_queue_js_1 = require(\"../byte_queue.js\");\nconst cursor_js_1 = require(\"../cursor.js\");\nconst jsond = __importStar(require(\"../encoding/json/decode.js\"));\nconst protobufd = __importStar(require(\"../encoding/protobuf/decode.js\"));\nconst errors_js_1 = require(\"../errors.js\");\nconst util_js_1 = require(\"../util.js\");\nconst json_decode_js_1 = require(\"./json_decode.js\");\nconst protobuf_decode_js_1 = require(\"./protobuf_decode.js\");\nconst json_decode_js_2 = require(\"../shared/json_decode.js\");\nconst protobuf_decode_js_2 = require(\"../shared/protobuf_decode.js\");\nclass HttpCursor extends cursor_js_1.Cursor {\n #stream;\n #encoding;\n #reader;\n #queue;\n #closed;\n #done;\n /** @private */\n constructor(stream, encoding) {\n super();\n this.#stream = stream;\n this.#encoding = encoding;\n this.#reader = undefined;\n this.#queue = new byte_queue_js_1.ByteQueue(16 * 1024);\n this.#closed = undefined;\n this.#done = false;\n }\n async open(response) {\n if (response.body === null) {\n throw new errors_js_1.ProtoError(\"No response body for cursor request\");\n }\n this.#reader = response.body.getReader();\n const respBody = await this.#nextItem(json_decode_js_1.CursorRespBody, protobuf_decode_js_1.CursorRespBody);\n if (respBody === undefined) {\n throw new errors_js_1.ProtoError(\"Empty response to cursor request\");\n }\n return respBody;\n }\n /** Fetch the next entry from the cursor. */\n next() {\n return this.#nextItem(json_decode_js_2.CursorEntry, protobuf_decode_js_2.CursorEntry);\n }\n /** Close the cursor. */\n close() {\n this._setClosed(new errors_js_1.ClientError(\"Cursor was manually closed\"));\n }\n /** @private */\n _setClosed(error) {\n if (this.#closed !== undefined) {\n return;\n }\n this.#closed = error;\n this.#stream._cursorClosed(this);\n if (this.#reader !== undefined) {\n this.#reader.cancel();\n }\n }\n /** True if the cursor is closed. */\n get closed() {\n return this.#closed !== undefined;\n }\n async #nextItem(jsonFun, protobufDef) {\n for (;;) {\n if (this.#done) {\n return undefined;\n }\n else if (this.#closed !== undefined) {\n throw new errors_js_1.ClosedError(\"Cursor is closed\", this.#closed);\n }\n if (this.#encoding === \"json\") {\n const jsonData = this.#parseItemJson();\n if (jsonData !== undefined) {\n const jsonText = new TextDecoder().decode(jsonData);\n const jsonValue = JSON.parse(jsonText);\n return jsond.readJsonObject(jsonValue, jsonFun);\n }\n }\n else if (this.#encoding === \"protobuf\") {\n const protobufData = this.#parseItemProtobuf();\n if (protobufData !== undefined) {\n return protobufd.readProtobufMessage(protobufData, protobufDef);\n }\n }\n else {\n throw (0, util_js_1.impossible)(this.#encoding, \"Impossible encoding\");\n }\n if (this.#reader === undefined) {\n throw new errors_js_1.InternalError(\"Attempted to read from HTTP cursor before it was opened\");\n }\n const { value, done } = await this.#reader.read();\n if (done && this.#queue.length === 0) {\n this.#done = true;\n }\n else if (done) {\n throw new errors_js_1.ProtoError(\"Unexpected end of cursor stream\");\n }\n else {\n this.#queue.push(value);\n }\n }\n }\n #parseItemJson() {\n const data = this.#queue.data();\n const newlineByte = 10;\n const newlinePos = data.indexOf(newlineByte);\n if (newlinePos < 0) {\n return undefined;\n }\n const jsonData = data.slice(0, newlinePos);\n this.#queue.shift(newlinePos + 1);\n return jsonData;\n }\n #parseItemProtobuf() {\n const data = this.#queue.data();\n let varintValue = 0;\n let varintLength = 0;\n for (;;) {\n if (varintLength >= data.byteLength) {\n return undefined;\n }\n const byte = data[varintLength];\n varintValue |= (byte & 0x7f) << (7 * varintLength);\n varintLength += 1;\n if (!(byte & 0x80)) {\n break;\n }\n }\n if (data.byteLength < varintLength + varintValue) {\n return undefined;\n }\n const protobufData = data.slice(varintLength, varintLength + varintValue);\n this.#queue.shift(varintLength + varintValue);\n return protobufData;\n }\n}\nexports.HttpCursor = HttpCursor;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,eAAe,GAAI,IAAI,IAAI,IAAI,CAACA,eAAe,KAAMC,MAAM,CAACC,MAAM,GAAI,UAASC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,EAAE,EAAE;EAC5F,IAAIA,EAAE,KAAKC,SAAS,EAAED,EAAE,GAAGD,CAAC;EAC5B,IAAIG,IAAI,GAAGP,MAAM,CAACQ,wBAAwB,CAACL,CAAC,EAAEC,CAAC,CAAC;EAChD,IAAI,CAACG,IAAI,KAAK,KAAK,IAAIA,IAAI,GAAG,CAACJ,CAAC,CAACM,UAAU,GAAGF,IAAI,CAACG,QAAQ,IAAIH,IAAI,CAACI,YAAY,CAAC,EAAE;IACjFJ,IAAI,GAAG;MAAEK,UAAU,EAAE,IAAI;MAAEC,GAAG,EAAE,SAAAA,CAAA,EAAW;QAAE,OAAOV,CAAC,CAACC,CAAC,CAAC;MAAE;IAAE,CAAC;EAC/D;EACAJ,MAAM,CAACc,cAAc,CAACZ,CAAC,EAAEG,EAAE,EAAEE,IAAI,CAAC;AACtC,CAAC,GAAK,UAASL,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,EAAE,EAAE;EACxB,IAAIA,EAAE,KAAKC,SAAS,EAAED,EAAE,GAAGD,CAAC;EAC5BF,CAAC,CAACG,EAAE,CAAC,GAAGF,CAAC,CAACC,CAAC,CAAC;AAChB,CAAE,CAAC;AACH,IAAIW,kBAAkB,GAAI,IAAI,IAAI,IAAI,CAACA,kBAAkB,KAAMf,MAAM,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