{"version":3,"sources":["jsdelivr-header.js","/npm/@haggholm/typeorm@0.2.1903/browser/src/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;SCJO,0BACC,sBAAwB,wCAExB,wBAA0B,6CAE1B,qBAAuB,qBAIvB,kBAAoB,kCAGpB,4BAA8B,8CAC9B,iBAAmB,4BAU3B,KAAc,oBAId,KAAc,iCACd,KAAc,mCACd,KAAc,6CACd,KAAc,mDACd,KAAc,0CACd,KAAc,6CACd,KAAc,0CACd,KAAc,uCACd,KAAc,2CACd,KAAc,0CACd,KAAc,wCACd,KAAc,0CACd,KAAc,0CACd,KAAc,2CACd,KAAc,2CACd,KAAc,2CACd,KAAc,8CAQd,KAAc,yCACd,KAAc,wCACd,KAAc,yCACd,KAAc,wCACd,KAAc,wCACd,KAAc,uCACd,KAAc,4CACd,KAAc,yCACd,KAAc,kCACd,KAAc,uCACd,KAAc,4CACd,KAAc,2CACd,KAAc,4CACd,KAAc,mDACd,KAAc,sDACd,KAAc,yCACd,KAAc,oCACd,KAAc,sCACd,KAAc,8BACd,KAAc,0BACd,KAAc,2BACd,KAAc,0BACd,KAAc,8BACd,KAAc,8BACd,KAAc,qCACd,KAAc,oCACd,KAAc,wCACd,KAAc,sCACd,KAAc,mCACd,KAAc,uCACd,KAAc,yCACd,KAAc,gDACd,KAAc,qCACd,KAAc,yCACd,KAAc,gDACd,KAAc,oCACd,KAAc,oCAId,KAAc,oCAKd,KAAc,uCACd,KAAc,qCACd,KAAc,4BACd,KAAc,kCACd,KAAc,uCACd,KAAc,wCACd,KAAc,gCACd,KAAc,gCACd,KAAc,oCACd,KAAc,qCAGd,KAAc,0CACd,KAAc,2CACd,KAAc,8CACd,KAAc,+CACd,KAAc,0CACd,KAAc,2CACd,KAAc,qCACd,KAAc,iCAEd,KAAc,2CAEN,4BAA8B,8CAC9B,eAAiB,iCACjB,sBAAwB,wCAGxB,iBAAmB,sCACnB,uBAAyB,4CACzB,uBAAyB,4CACzB,u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D,GAC/F,YAD+F,IAAA,MAAA,WACxF,uBAAuB,IAAI,GAAgB,cAAsB,EAC5E,QAKM,SAAU,kBAA0B,EAAwC,GAC9E,YAD8E,IAAA,MAAA,WACvE,uBAAuB,IAAI,GAAgB,kBAA0B,EAChF,QAKM,SAAU,oBAAuB,EAAiC,GACpE,YADoE,IAAA,MAAA,WAC7D,uBAAuB,IAAI,GAAgB,oBAAoB,EAC1E,QAKM,SAAU,mBAA2B,EAAwC,GAC/E,YAD+E,IAAA,MAAA,WACxE,uBAAuB,IAAI,GAAgB,mBAA2B,EACjF,QAKM,SAAU,mBAA2B,EAAyC,EAAgB,GAChG,YADgG,IAAA,MAAA,WAC5F,EACO,cAAc,EAAa,GAAgB,mBAAmB,GAGlE,cAAc,GAAgB,oBACzC","file":"/npm/@haggholm/typeorm@0.2.1903/browser/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@haggholm/typeorm@0.2.1903/browser/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*!\n */\nimport \"reflect-metadata\";\nimport {ConnectionManager} from \"./connection/ConnectionManager\";\nimport {Connection} from \"./connection/Connection\";\nimport {MetadataArgsStorage} from \"./metadata-args/MetadataArgsStorage\";\nimport {ConnectionOptions} from \"./connection/ConnectionOptions\";\nimport {getFromContainer} from \"./container\";\nimport {ObjectType} from \"./common/ObjectType\";\nimport {Repository} from \"./repository/Repository\";\nimport {EntityManager} from \"./entity-manager/EntityManager\";\nimport {PlatformTools} from \"./platform/PlatformTools\";\nimport {TreeRepository} from \"./repository/TreeRepository\";\nimport {MongoRepository} from \"./repository/MongoRepository\";\nimport {ConnectionOptionsReader} from \"./connection/ConnectionOptionsReader\";\nimport {PromiseUtils} from \"./util/PromiseUtils\";\nimport {MongoEntityManager} from \"./entity-manager/MongoEntityManager\";\nimport {SqljsEntityManager} from \"./entity-manager/SqljsEntityManager\";\nimport {SelectQueryBuilder} from \"./query-builder/SelectQueryBuilder\";\nimport {EntitySchema} from \"./entity-schema/EntitySchema\";\n\n// -------------------------------------------------------------------------\n// Commonly Used exports\n// -------------------------------------------------------------------------\n\nexport * from \"./container\";\nexport * from \"./common/ObjectType\";\nexport * from \"./common/ObjectLiteral\";\nexport * from \"./common/DeepPartial\";\nexport * from \"./error/QueryFailedError\";\nexport * from \"./decorator/columns/Column\";\nexport * from \"./decorator/columns/CreateDateColumn\";\nexport * from \"./decorator/columns/PrimaryGeneratedColumn\";\nexport * from \"./decorator/columns/PrimaryColumn\";\nexport * from \"./decorator/columns/UpdateDateColumn\";\nexport * from \"./decorator/columns/VersionColumn\";\nexport * from \"./decorator/columns/ViewColumn\";\nexport * from \"./decorator/columns/ObjectIdColumn\";\nexport * from \"./decorator/listeners/AfterInsert\";\nexport * from \"./decorator/listeners/AfterLoad\";\nexport * from \"./decorator/listeners/AfterRemove\";\nexport * from \"./decorator/listeners/AfterUpdate\";\nexport * from \"./decorator/listeners/BeforeInsert\";\nexport * from \"./decorator/listeners/BeforeRemove\";\nexport * from \"./decorator/listeners/BeforeUpdate\";\nexport * from \"./decorator/listeners/EventSubscriber\";\nexport * from \"./decorator/options/ColumnOptions\";\nexport * from \"./decorator/options/IndexOptions\";\nexport * from \"./decorator/options/JoinColumnOptions\";\nexport * from \"./decorator/options/JoinTableOptions\";\nexport * from \"./decorator/options/RelationOptions\";\nexport * from \"./decorator/options/EntityOptions\";\nexport * from \"./decorator/options/ValueTransformer\";\nexport * from \"./decorator/relations/JoinColumn\";\nexport * from \"./decorator/relations/JoinTable\";\nexport * from \"./decorator/relations/ManyToMany\";\nexport * from \"./decorator/relations/ManyToOne\";\nexport * from \"./decorator/relations/OneToMany\";\nexport * from \"./decorator/relations/OneToOne\";\nexport * from \"./decorator/relations/RelationCount\";\nexport * from \"./decorator/relations/RelationId\";\nexport * from \"./decorator/entity/Entity\";\nexport * from \"./decorator/entity/ChildEntity\";\nexport * from \"./decorator/entity/TableInheritance\";\nexport * from \"./decorator/entity-view/ViewEntity\";\nexport * from \"./decorator/transaction/Transaction\";\nexport * from \"./decorator/transaction/TransactionManager\";\nexport * from \"./decorator/transaction/TransactionRepository\";\nexport * from \"./decorator/tree/TreeLevelColumn\";\nexport * from \"./decorator/tree/TreeParent\";\nexport * from \"./decorator/tree/TreeChildren\";\nexport * from \"./decorator/tree/Tree\";\nexport * from \"./decorator/Index\";\nexport * from \"./decorator/Unique\";\nexport * from \"./decorator/Check\";\nexport * from \"./decorator/Exclusion\";\nexport * from \"./decorator/Generated\";\nexport * from \"./decorator/EntityRepository\";\nexport * from \"./find-options/operator/Any\";\nexport * from \"./find-options/operator/Between\";\nexport * from \"./find-options/operator/Equal\";\nexport * from \"./find-options/operator/In\";\nexport * from \"./find-options/operator/IsNull\";\nexport * from \"./find-options/operator/LessThan\";\nexport * from \"./find-options/operator/LessThanOrEqual\";\nexport * from \"./find-options/operator/Like\";\nexport * from \"./find-options/operator/MoreThan\";\nexport * from \"./find-options/operator/MoreThanOrEqual\";\nexport * from \"./find-options/operator/Not\";\nexport * from \"./find-options/operator/Raw\";\nexport * from \"./find-options/FindConditions\";\nexport * from \"./find-options/FindManyOptions\";\nexport * from \"./find-options/FindOneOptions\";\nexport * from \"./find-options/FindOperator\";\nexport * from \"./find-options/FindOperatorType\";\nexport * from \"./find-options/JoinOptions\";\nexport * from \"./find-options/OrderByCondition\";\nexport * from \"./logger/Logger\";\nexport * from \"./logger/AdvancedConsoleLogger\";\nexport * from \"./logger/SimpleConsoleLogger\";\nexport * from \"./logger/FileLogger\";\nexport * from \"./metadata/EntityMetadata\";\nexport * from \"./entity-manager/EntityManager\";\nexport * from \"./repository/AbstractRepository\";\nexport * from \"./repository/Repository\";\nexport * from \"./repository/BaseEntity\";\nexport * from \"./repository/TreeRepository\";\nexport * from \"./repository/MongoRepository\";\nexport * from \"./repository/RemoveOptions\";\nexport * from \"./repository/SaveOptions\";\nexport * from \"./schema-builder/table/TableCheck\";\nexport * from \"./schema-builder/table/TableColumn\";\nexport * from \"./schema-builder/table/TableExclusion\";\nexport * from \"./schema-builder/table/TableForeignKey\";\nexport * from \"./schema-builder/table/TableIndex\";\nexport * from \"./schema-builder/table/TableUnique\";\nexport * from \"./schema-builder/table/Table\";\nexport * from \"./driver/mongodb/typings\";\nexport * from \"./driver/types/DatabaseType\";\nexport * from \"./driver/sqlserver/MssqlParameter\";\n\nexport {ConnectionOptionsReader} from \"./connection/ConnectionOptionsReader\";\nexport {Connection} from \"./connection/Connection\";\nexport {ConnectionManager} from \"./connection/ConnectionManager\";\nexport {ConnectionOptions} from \"./connection/ConnectionOptions\";\nexport {Driver} from \"./driver/Driver\";\nexport {QueryBuilder} from \"./query-builder/QueryBuilder\";\nexport {SelectQueryBuilder} from \"./query-builder/SelectQueryBuilder\";\nexport {DeleteQueryBuilder} from \"./query-builder/DeleteQueryBuilder\";\nexport {InsertQueryBuilder} from \"./query-builder/InsertQueryBuilder\";\nexport {UpdateQueryBuilder} from \"./query-builder/UpdateQueryBuilder\";\nexport {RelationQueryBuilder} from \"./query-builder/RelationQueryBuilder\";\nexport {Brackets} from \"./query-builder/Brackets\";\nexport {WhereExpression} from \"./query-builder/WhereExpression\";\nexport {InsertResult} from \"./query-builder/result/InsertResult\";\nexport {UpdateResult} from \"./query-builder/result/UpdateResult\";\nexport {DeleteResult} from \"./query-builder/result/DeleteResult\";\nexport {QueryRunner} from \"./query-runner/QueryRunner\";\nexport {EntityManager} from \"./entity-manager/EntityManager\";\nexport {MongoEntityManager} from \"./entity-manager/MongoEntityManager\";\nexport {MigrationInterface} from \"./migration/MigrationInterface\";\nexport {DefaultNamingStrategy} from \"./naming-strategy/DefaultNamingStrategy\";\nexport {NamingStrategyInterface} from \"./naming-strategy/NamingStrategyInterface\";\nexport {Repository} from \"./repository/Repository\";\nexport {TreeRepository} from \"./repository/TreeRepository\";\nexport {MongoRepository} from \"./repository/MongoRepository\";\nexport {FindOneOptions} from \"./find-options/FindOneOptions\";\nexport {FindManyOptions} from \"./find-options/FindManyOptions\";\nexport {InsertEvent} from \"./subscriber/event/InsertEvent\";\nexport {UpdateEvent} from \"./subscriber/event/UpdateEvent\";\nexport {RemoveEvent} from \"./subscriber/event/RemoveEvent\";\nexport {EntitySubscriberInterface} from \"./subscriber/EntitySubscriberInterface\";\nexport {BaseEntity} from \"./repository/BaseEntity\";\nexport {EntitySchema} from \"./entity-schema/EntitySchema\";\nexport {EntitySchemaColumnOptions} from \"./entity-schema/EntitySchemaColumnOptions\";\nexport {EntitySchemaIndexOptions} from \"./entity-schema/EntitySchemaIndexOptions\";\nexport {EntitySchemaRelationOptions} from \"./entity-schema/EntitySchemaRelationOptions\";\nexport {ColumnType} from \"./driver/types/ColumnTypes\";\nexport {PromiseUtils} from \"./util/PromiseUtils\";\n\n// -------------------------------------------------------------------------\n// Deprecated\n// -------------------------------------------------------------------------\n\n// -------------------------------------------------------------------------\n// Commonly used functionality\n// -------------------------------------------------------------------------\n\n/**\n * Gets metadata args storage.\n */\nexport function getMetadataArgsStorage(): MetadataArgsStorage {\n    // we should store metadata storage in a global variable otherwise it brings too much problems\n    // one of the problem is that if any entity (or any other) will be imported before consumer will call\n    // useContainer method with his own container implementation, that entity will be registered in the\n    // old old container (default one post probably) and consumer will his entity.\n    // calling useContainer before he imports any entity (or any other) is not always convenient.\n    // another reason is that when we run migrations typeorm is being called from a global package\n    // and it may load entities which register decorators in typeorm of local package\n    // this leads to impossibility of usage of entities in migrations and cli related operations\n    const globalScope = PlatformTools.getGlobalVariable();\n    if (!globalScope.typeormMetadataArgsStorage)\n        globalScope.typeormMetadataArgsStorage = new MetadataArgsStorage();\n\n    return globalScope.typeormMetadataArgsStorage;\n}\n\n/**\n * Reads connection options stored in ormconfig configuration file.\n */\nexport async function getConnectionOptions(connectionName: string = \"default\"): Promise<ConnectionOptions> {\n    return new ConnectionOptionsReader().get(connectionName);\n}\n\n/**\n * Gets a ConnectionManager which creates connections.\n */\nexport function getConnectionManager(): ConnectionManager {\n    return getFromContainer(ConnectionManager);\n}\n\n/**\n * Creates a new connection and registers it in the manager.\n * Only one connection from ormconfig will be created (name \"default\" or connection without name).\n */\nexport async function createConnection(): Promise<Connection>;\n\n/**\n * Creates a new connection from the ormconfig file with a given name.\n */\nexport async function createConnection(name: string): Promise<Connection>;\n\n/**\n * Creates a new connection and registers it in the manager.\n */\nexport async function createConnection(options: ConnectionOptions): Promise<Connection>;\n\n/**\n * Creates a new connection and registers it in the manager.\n *\n * If connection options were not specified, then it will try to create connection automatically,\n * based on content of ormconfig (json/js/yml/xml/env) file or environment variables.\n * Only one connection from ormconfig will be created (name \"default\" or connection without name).\n */\nexport async function createConnection(optionsOrName?: any): Promise<Connection> {\n    const connectionName = typeof optionsOrName === \"string\" ? optionsOrName : \"default\";\n    const options = optionsOrName instanceof Object ? optionsOrName : await getConnectionOptions(connectionName);\n    return getConnectionManager().create(options).connect();\n}\n\n/**\n * Creates new connections and registers them in the manager.\n *\n * If connection options were not specified, then it will try to create connection automatically,\n * based on content of ormconfig (json/js/yml/xml/env) file or environment variables.\n * All connections from the ormconfig will be created.\n */\nexport async function createConnections(options?: ConnectionOptions[]): Promise<Connection[]> {\n    if (!options)\n        options = await new ConnectionOptionsReader().all();\n    const connections = options.map(options => getConnectionManager().create(options));\n    return PromiseUtils.runInSequence(connections, connection => connection.connect());\n}\n\n/**\n * Gets connection from the connection manager.\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\n */\nexport function getConnection(connectionName: string = \"default\"): Connection {\n    return getConnectionManager().get(connectionName);\n}\n\n/**\n * Gets entity manager from the connection.\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\n */\nexport function getManager(connectionName: string = \"default\"): EntityManager {\n    return getConnectionManager().get(connectionName).manager;\n}\n\n/**\n * Gets MongoDB entity manager from the connection.\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\n */\nexport function getMongoManager(connectionName: string = \"default\"): MongoEntityManager {\n    return getConnectionManager().get(connectionName).manager as MongoEntityManager;\n}\n\n/**\n * Gets Sqljs entity manager from connection name.\n * \"default\" connection is used, when no name is specified.\n * Only works when Sqljs driver is used.\n */\nexport function getSqljsManager(connectionName: string = \"default\"): SqljsEntityManager {\n    return getConnectionManager().get(connectionName).manager as SqljsEntityManager;\n}\n\n/**\n * Gets repository for the given entity class.\n */\nexport function getRepository<Entity>(entityClass: ObjectType<Entity>|EntitySchema<Entity>|string, connectionName: string = \"default\"): Repository<Entity> {\n    return getConnectionManager().get(connectionName).getRepository<Entity>(entityClass);\n}\n\n/**\n * Gets tree repository for the given entity class.\n */\nexport function getTreeRepository<Entity>(entityClass: ObjectType<Entity>|string, connectionName: string = \"default\"): TreeRepository<Entity> {\n    return getConnectionManager().get(connectionName).getTreeRepository<Entity>(entityClass);\n}\n\n/**\n * Gets tree repository for the given entity class.\n */\nexport function getCustomRepository<T>(customRepository: ObjectType<T>, connectionName: string = \"default\"): T {\n    return getConnectionManager().get(connectionName).getCustomRepository(customRepository);\n}\n\n/**\n * Gets mongodb repository for the given entity class or name.\n */\nexport function getMongoRepository<Entity>(entityClass: ObjectType<Entity>|string, connectionName: string = \"default\"): MongoRepository<Entity> {\n    return getConnectionManager().get(connectionName).getMongoRepository<Entity>(entityClass);\n}\n\n/**\n * Creates a new query builder.\n */\nexport function createQueryBuilder<Entity>(entityClass?: ObjectType<Entity>|string, alias?: string, connectionName: string = \"default\"): SelectQueryBuilder<Entity> {\n    if (entityClass) {\n        return getRepository(entityClass, connectionName).createQueryBuilder(alias);\n    }\n\n    return getConnection(connectionName).createQueryBuilder();\n}\n"]}