AK-21/Graphite-Industrial-Intelligence
0
1"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7 for (var name in all)8 __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11 if (from && typeof from === "object" || typeof from === "function") {12 for (let key of __getOwnPropNames(from))13 if (!__hasOwnProp.call(to, key) && key !== except)14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15 }16 return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var entity_exports = {};20__export(entity_exports, {21 entityKind: () => entityKind,22 hasOwnEntityKind: () => hasOwnEntityKind,23 is: () => is24});25module.exports = __toCommonJS(entity_exports);26const entityKind = Symbol.for("drizzle:entityKind");27const hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");28function is(value, type) {29 if (!value || typeof value !== "object") {30 return false;31 }32 if (value instanceof type) {33 return true;34 }35 if (!Object.prototype.hasOwnProperty.call(type, entityKind)) {36 throw new Error(37 `Class "${type.name ?? "<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`38 );39 }40 let cls = Object.getPrototypeOf(value).constructor;41 if (cls) {42 while (cls) {43 if (entityKind in cls && cls[entityKind] === type[entityKind]) {44 return true;45 }46 cls = Object.getPrototypeOf(cls);47 }48 }49 return false;50}51// Annotate the CommonJS export names for ESM import in node:520 && (module.exports = {53 entityKind,54 hasOwnEntityKind,55 is56});57//# sourceMappingURL=entity.cjs.map