module.exports=[709203,e=>{"use strict";e.s(["DialectAdapterBase",0,class{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!1}get supportsOutput(){return!1}}])},622626,e=>{"use strict";var t=e.i(709203);class r extends t.DialectAdapterBase{get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(e,t){}async releaseMigrationLock(e,t){}}e.s(["SqliteAdapter",0,r])},529176,e=>{"use strict";var t=e.i(336496);let r=/"/g;class n extends t.DefaultQueryCompiler{visitOrAction(e){this.append("or "),this.append(e.action)}getCurrentParameterPlaceholder(){return"?"}getLeftExplainOptionsWrapper(){return""}getRightExplainOptionsWrapper(){return""}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}sanitizeIdentifier(e){return e.replace(r,'""')}visitDefaultInsertValue(e){this.append("null")}}e.s(["SqliteQueryCompiler",0,n])},980041,e=>{"use strict";var t=e.i(616722),r=e.i(622626),n=e.i(529176),a=class extends r.SqliteAdapter{},s=class{#e;#t;constructor(e){this.#e={...e}}async init(){this.#t=new i(this.#e.database),this.#e.onCreateConnection&&await this.#e.onCreateConnection(this.#t)}async acquireConnection(){return this.#t}async beginTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async commitTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async rollbackTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async releaseConnection(){}async destroy(){}},i=class{#r;constructor(e){this.#r=e}async executeQuery(e){let t=await this.#r.prepare(e.sql).bind(...e.parameters).all(),r=null!=t.meta.changes?BigInt(t.meta.changes):void 0;return{insertId:void 0===t.meta.last_row_id||null===t.meta.last_row_id?void 0:BigInt(t.meta.last_row_id),rows:t?.results||[],numAffectedRows:r,numUpdatedOrDeletedRows:r}}async *streamQuery(){throw Error("D1 does not support streaming queries.")}},o=class{#r;#n;constructor(e,t){this.#r=e,this.#n=t}async getSchemas(){return[]}async getTables(e={withInternalKyselyTables:!1}){let r=this.#r.selectFrom("sqlite_master").where("type","in",["table","view"]).where("name","not like","sqlite_%").where("name","not like","_cf_%").select(["name","type","sql"]).$castTo();e.withInternalKyselyTables||(r=r.where("name","!=",t.DEFAULT_MIGRATION_TABLE).where("name","!=",t.DEFAULT_MIGRATION_LOCK_TABLE));let n=await r.execute();if(0===n.length)return[];let a=n.map(e=>this.#n.prepare("SELECT * FROM pragma_table_info(?)").bind(e.name)),s=await this.#n.batch(a);return n.map((e,t)=>{let r=s[t]?.results??[],n=e.sql?.split(/[(),]/)?.find(e=>e.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.filter(Boolean)?.[0]?.replace(/["`]/g,"");if(!n){let e=r.filter(e=>e.pk>0),t=1===e.length?e[0]:void 0;t&&"integer"===t.type.toLowerCase()&&(n=t.name)}return{name:e.name,isView:"view"===e.type,columns:r.map(e=>({name:e.name,dataType:e.type,isNullable:!e.notnull,isAutoIncrementing:e.name===n,hasDefaultValue:null!=e.dflt_value}))}})}async getMetadata(e){return{tables:await this.getTables(e)}}},c=class extends n.SqliteQueryCompiler{};e.s(["D1SqliteDialect",0,class{#e;constructor(e){this.#e={...e}}createDriver(){return new s(this.#e)}createQueryCompiler(){return new c}createAdapter(){return new a}createIntrospector(e){return new o(e,this.#e.database)}}])}];

//# sourceMappingURL=node_modules__pnpm_09yxuk4._.js.map