1 line
2.9 KiB
JSON
1 line
2.9 KiB
JSON
{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Queue = void 0;\nclass Queue {\n #pushStack;\n #shiftStack;\n constructor() {\n this.#pushStack = [];\n this.#shiftStack = [];\n }\n get length() {\n return this.#pushStack.length + this.#shiftStack.length;\n }\n push(elem) {\n this.#pushStack.push(elem);\n }\n shift() {\n if (this.#shiftStack.length === 0 && this.#pushStack.length > 0) {\n this.#shiftStack = this.#pushStack.reverse();\n this.#pushStack = [];\n }\n return this.#shiftStack.pop();\n }\n first() {\n return this.#shiftStack.length !== 0 ? this.#shiftStack[this.#shiftStack.length - 1] : this.#pushStack[0];\n }\n}\nexports.Queue = Queue;","map":{"version":3,"names":["Object","defineProperty","exports","value","Queue","pushStack","shiftStack","constructor","length","push","elem","shift","reverse","pop","first"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/hrana-client/lib-cjs/queue.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Queue = void 0;\nclass Queue {\n #pushStack;\n #shiftStack;\n constructor() {\n this.#pushStack = [];\n this.#shiftStack = [];\n }\n get length() {\n return this.#pushStack.length + this.#shiftStack.length;\n }\n push(elem) {\n this.#pushStack.push(elem);\n }\n shift() {\n if (this.#shiftStack.length === 0 && this.#pushStack.length > 0) {\n this.#shiftStack = this.#pushStack.reverse();\n this.#pushStack = [];\n }\n return this.#shiftStack.pop();\n }\n first() {\n return this.#shiftStack.length !== 0\n ? this.#shiftStack[this.#shiftStack.length - 1]\n : this.#pushStack[0];\n }\n}\nexports.Queue = Queue;\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DD,OAAO,CAACE,KAAK,GAAG,KAAK,CAAC;AACtB,MAAMA,KAAK,CAAC;EACR,CAACC,SAAS;EACV,CAACC,UAAU;EACXC,WAAWA,CAAA,EAAG;IACV,IAAI,CAAC,CAACF,SAAS,GAAG,EAAE;IACpB,IAAI,CAAC,CAACC,UAAU,GAAG,EAAE;EACzB;EACA,IAAIE,MAAMA,CAAA,EAAG;IACT,OAAO,IAAI,CAAC,CAACH,SAAS,CAACG,MAAM,GAAG,IAAI,CAAC,CAACF,UAAU,CAACE,MAAM;EAC3D;EACAC,IAAIA,CAACC,IAAI,EAAE;IACP,IAAI,CAAC,CAACL,SAAS,CAACI,IAAI,CAACC,IAAI,CAAC;EAC9B;EACAC,KAAKA,CAAA,EAAG;IACJ,IAAI,IAAI,CAAC,CAACL,UAAU,CAACE,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,CAACH,SAAS,CAACG,MAAM,GAAG,CAAC,EAAE;MAC7D,IAAI,CAAC,CAACF,UAAU,GAAG,IAAI,CAAC,CAACD,SAAS,CAACO,OAAO,CAAC,CAAC;MAC5C,IAAI,CAAC,CAACP,SAAS,GAAG,EAAE;IACxB;IACA,OAAO,IAAI,CAAC,CAACC,UAAU,CAACO,GAAG,CAAC,CAAC;EACjC;EACAC,KAAKA,CAAA,EAAG;IACJ,OAAO,IAAI,CAAC,CAACR,UAAU,CAACE,MAAM,KAAK,CAAC,GAC9B,IAAI,CAAC,CAACF,UAAU,CAAC,IAAI,CAAC,CAACA,UAAU,CAACE,MAAM,GAAG,CAAC,CAAC,GAC7C,IAAI,CAAC,CAACH,SAAS,CAAC,CAAC,CAAC;EAC5B;AACJ;AACAH,OAAO,CAACE,KAAK,GAAGA,KAAK","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]} |