@ember-data/model 4.12.7 → 4.13.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/addon-main.cjs +5 -0
- package/blueprints/model/index.js +18 -5
- package/blueprints/model-test/index.js +16 -10
- package/blueprints/model-test/qunit-files/__root__/__path__/__test__.js +4 -5
- package/dist/-private.js +2 -0
- package/dist/-private.js.map +1 -0
- package/dist/has-many-CshPdrqR.js +842 -0
- package/dist/has-many-CshPdrqR.js.map +1 -0
- package/dist/hooks-DCYCaSEL.js +75 -0
- package/dist/hooks-DCYCaSEL.js.map +1 -0
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.js +4 -0
- package/{addon → dist}/index.js.map +1 -1
- package/{addon/has-many-d45aa09e.js → dist/legacy-relationships-support-D5m0xTYg.js} +5532 -5533
- package/dist/legacy-relationships-support-D5m0xTYg.js.map +1 -0
- package/dist/migration-support.js +210 -0
- package/dist/migration-support.js.map +1 -0
- package/dist/schema-provider-m94yB7iS.js +294 -0
- package/dist/schema-provider-m94yB7iS.js.map +1 -0
- package/ember-data-logo-dark.svg +12 -0
- package/ember-data-logo-light.svg +12 -0
- package/package.json +78 -44
- package/unstable-preview-types/-private/attr.d.ts +175 -0
- package/unstable-preview-types/-private/attr.d.ts.map +1 -0
- package/unstable-preview-types/-private/attr.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/attr.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/belongs-to.d.ts +180 -0
- package/unstable-preview-types/-private/belongs-to.d.ts.map +1 -0
- package/unstable-preview-types/-private/belongs-to.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/belongs-to.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts +8 -0
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts.map +1 -0
- package/unstable-preview-types/-private/deprecated-promise-proxy.d.ts +5 -0
- package/unstable-preview-types/-private/deprecated-promise-proxy.d.ts.map +1 -0
- package/unstable-preview-types/-private/errors.d.ts +303 -0
- package/unstable-preview-types/-private/errors.d.ts.map +1 -0
- package/unstable-preview-types/-private/has-many.d.ts +169 -0
- package/unstable-preview-types/-private/has-many.d.ts.map +1 -0
- package/unstable-preview-types/-private/has-many.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/has-many.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/hooks.d.ts +13 -0
- package/unstable-preview-types/-private/hooks.d.ts.map +1 -0
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts +60 -0
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts.map +1 -0
- package/unstable-preview-types/-private/many-array.d.ts +196 -0
- package/unstable-preview-types/-private/many-array.d.ts.map +1 -0
- package/unstable-preview-types/-private/model-for-mixin.d.ts +6 -0
- package/unstable-preview-types/-private/model-for-mixin.d.ts.map +1 -0
- package/unstable-preview-types/-private/model-methods.d.ts +37 -0
- package/unstable-preview-types/-private/model-methods.d.ts.map +1 -0
- package/unstable-preview-types/-private/model.d.ts +1305 -0
- package/unstable-preview-types/-private/model.d.ts.map +1 -0
- package/unstable-preview-types/-private/model.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/model.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/notify-changes.d.ts +8 -0
- package/unstable-preview-types/-private/notify-changes.d.ts.map +1 -0
- package/unstable-preview-types/-private/promise-belongs-to.d.ts +46 -0
- package/unstable-preview-types/-private/promise-belongs-to.d.ts.map +1 -0
- package/unstable-preview-types/-private/promise-many-array.d.ts +130 -0
- package/unstable-preview-types/-private/promise-many-array.d.ts.map +1 -0
- package/unstable-preview-types/-private/record-state.d.ts +90 -0
- package/unstable-preview-types/-private/record-state.d.ts.map +1 -0
- package/unstable-preview-types/-private/references/belongs-to.d.ts +503 -0
- package/unstable-preview-types/-private/references/belongs-to.d.ts.map +1 -0
- package/unstable-preview-types/-private/references/has-many.d.ts +515 -0
- package/unstable-preview-types/-private/references/has-many.d.ts.map +1 -0
- package/unstable-preview-types/-private/relationship-meta.d.ts +35 -0
- package/unstable-preview-types/-private/relationship-meta.d.ts.map +1 -0
- package/unstable-preview-types/-private/schema-provider.d.ts +64 -0
- package/unstable-preview-types/-private/schema-provider.d.ts.map +1 -0
- package/unstable-preview-types/-private/type-utils.d.ts +64 -0
- package/unstable-preview-types/-private/type-utils.d.ts.map +1 -0
- package/unstable-preview-types/-private/util.d.ts +8 -0
- package/unstable-preview-types/-private/util.d.ts.map +1 -0
- package/unstable-preview-types/-private.d.ts +13 -0
- package/unstable-preview-types/-private.d.ts.map +1 -0
- package/unstable-preview-types/hooks.d.ts +5 -0
- package/unstable-preview-types/hooks.d.ts.map +1 -0
- package/unstable-preview-types/index.d.ts +78 -0
- package/unstable-preview-types/index.d.ts.map +1 -0
- package/unstable-preview-types/migration-support.d.ts +56 -0
- package/unstable-preview-types/migration-support.d.ts.map +1 -0
- package/addon/-private.js +0 -95
- package/addon/-private.js.map +0 -1
- package/addon/has-many-d45aa09e.js.map +0 -1
- package/addon/index.js +0 -1
- package/addon-main.js +0 -93
- package/blueprints/model-test/mocha-files/__root__/__path__/__test__.js +0 -18
- package/blueprints/model-test/mocha-rfc-232-files/__root__/__path__/__test__.js +0 -15
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { recordIdentifierFor } from '@ember-data/store';
|
|
2
|
+
import { getOrSetGlobal } from '@warp-drive/core-types/-private';
|
|
3
|
+
import { Type } from '@warp-drive/core-types/symbols';
|
|
4
|
+
import '@ember/object';
|
|
5
|
+
import '@ember-data/store/-private';
|
|
6
|
+
import '@ember/debug';
|
|
7
|
+
import '@ember-data/request-utils/string';
|
|
8
|
+
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
9
|
+
import { u as unloadRecord, s as serialize, b as save, r as rollbackAttributes, c as reload, h as hasMany, E as Errors, d as destroyRecord, e as deleteRecord, f as RecordState, g as changedAttributes, i as belongsTo, j as createSnapshot } from "./legacy-relationships-support-D5m0xTYg.js";
|
|
10
|
+
import '@ember/application';
|
|
11
|
+
import { b as buildSchema } from "./schema-provider-m94yB7iS.js";
|
|
12
|
+
|
|
13
|
+
// 'isDestroying', 'isDestroyed'
|
|
14
|
+
const LegacyFields = ['_createSnapshot', 'adapterError', 'belongsTo', 'changedAttributes', 'constructor', 'currentState', 'deleteRecord', 'destroyRecord', 'dirtyType', 'errors', 'hasDirtyAttributes', 'hasMany', 'isDeleted', 'isEmpty', 'isError', 'isLoaded', 'isLoading', 'isNew', 'isSaving', 'isValid', 'reload', 'rollbackAttributes', 'save', 'serialize', 'unloadRecord'];
|
|
15
|
+
const LegacySupport = getOrSetGlobal('LegacySupport', new WeakMap());
|
|
16
|
+
function legacySupport(record, options, prop) {
|
|
17
|
+
let state = LegacySupport.get(record);
|
|
18
|
+
if (!state) {
|
|
19
|
+
state = {};
|
|
20
|
+
LegacySupport.set(record, state);
|
|
21
|
+
}
|
|
22
|
+
switch (prop) {
|
|
23
|
+
case '_createSnapshot':
|
|
24
|
+
return createSnapshot;
|
|
25
|
+
case 'adapterError':
|
|
26
|
+
return record.currentState.adapterError;
|
|
27
|
+
case 'belongsTo':
|
|
28
|
+
return belongsTo;
|
|
29
|
+
case 'changedAttributes':
|
|
30
|
+
return changedAttributes;
|
|
31
|
+
case 'constructor':
|
|
32
|
+
return state._constructor = state._constructor || {
|
|
33
|
+
isModel: true,
|
|
34
|
+
name: `Record<${recordIdentifierFor(record).type}>`,
|
|
35
|
+
modelName: recordIdentifierFor(record).type
|
|
36
|
+
};
|
|
37
|
+
case 'currentState':
|
|
38
|
+
return state.recordState = state.recordState || new RecordState(record);
|
|
39
|
+
case 'deleteRecord':
|
|
40
|
+
return deleteRecord;
|
|
41
|
+
case 'destroyRecord':
|
|
42
|
+
return destroyRecord;
|
|
43
|
+
case 'dirtyType':
|
|
44
|
+
return record.currentState.dirtyType;
|
|
45
|
+
case 'errors':
|
|
46
|
+
// @ts-expect-error
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
48
|
+
return state.errors = state.errors || Errors.create({
|
|
49
|
+
__record: record
|
|
50
|
+
});
|
|
51
|
+
case 'hasDirtyAttributes':
|
|
52
|
+
return record.currentState.isDirty;
|
|
53
|
+
case 'hasMany':
|
|
54
|
+
return hasMany;
|
|
55
|
+
case 'isDeleted':
|
|
56
|
+
return record.currentState.isDeleted;
|
|
57
|
+
case 'isEmpty':
|
|
58
|
+
return record.currentState.isEmpty;
|
|
59
|
+
case 'isError':
|
|
60
|
+
return record.currentState.isError;
|
|
61
|
+
case 'isLoaded':
|
|
62
|
+
return record.currentState.isLoaded;
|
|
63
|
+
case 'isLoading':
|
|
64
|
+
return record.currentState.isLoading;
|
|
65
|
+
case 'isNew':
|
|
66
|
+
return record.currentState.isNew;
|
|
67
|
+
case 'isSaving':
|
|
68
|
+
return record.currentState.isSaving;
|
|
69
|
+
case 'isValid':
|
|
70
|
+
return record.currentState.isValid;
|
|
71
|
+
case 'reload':
|
|
72
|
+
return reload;
|
|
73
|
+
case 'rollbackAttributes':
|
|
74
|
+
return rollbackAttributes;
|
|
75
|
+
case 'save':
|
|
76
|
+
return save;
|
|
77
|
+
case 'serialize':
|
|
78
|
+
return serialize;
|
|
79
|
+
case 'unloadRecord':
|
|
80
|
+
return unloadRecord;
|
|
81
|
+
default:
|
|
82
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
83
|
+
{
|
|
84
|
+
throw new Error(`${prop} is not a supported legacy field`);
|
|
85
|
+
}
|
|
86
|
+
})() : {};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
legacySupport[Type] = '@legacy';
|
|
90
|
+
function withDefaults(schema) {
|
|
91
|
+
schema.legacy = true;
|
|
92
|
+
schema.identity = {
|
|
93
|
+
kind: '@id',
|
|
94
|
+
name: 'id'
|
|
95
|
+
};
|
|
96
|
+
LegacyFields.forEach(field => {
|
|
97
|
+
schema.fields.push({
|
|
98
|
+
type: '@legacy',
|
|
99
|
+
name: field,
|
|
100
|
+
kind: 'derived'
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
schema.fields.push({
|
|
104
|
+
name: 'isReloading',
|
|
105
|
+
kind: '@local',
|
|
106
|
+
type: 'boolean',
|
|
107
|
+
options: {
|
|
108
|
+
defaultValue: false
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
schema.fields.push({
|
|
112
|
+
name: 'isDestroying',
|
|
113
|
+
kind: '@local',
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
options: {
|
|
116
|
+
defaultValue: false
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
schema.fields.push({
|
|
120
|
+
name: 'isDestroyed',
|
|
121
|
+
kind: '@local',
|
|
122
|
+
type: 'boolean',
|
|
123
|
+
options: {
|
|
124
|
+
defaultValue: false
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return schema;
|
|
128
|
+
}
|
|
129
|
+
function registerDerivations(schema) {
|
|
130
|
+
schema.registerDerivation(legacySupport);
|
|
131
|
+
}
|
|
132
|
+
class DelegatingSchemaService {
|
|
133
|
+
_preferred;
|
|
134
|
+
_secondary;
|
|
135
|
+
constructor(store, schema) {
|
|
136
|
+
this._preferred = schema;
|
|
137
|
+
this._secondary = buildSchema(store);
|
|
138
|
+
}
|
|
139
|
+
hasResource(resource) {
|
|
140
|
+
return this._preferred.hasResource(resource) || this._secondary.hasResource(resource);
|
|
141
|
+
}
|
|
142
|
+
hasTrait(type) {
|
|
143
|
+
if (this._preferred.hasResource({
|
|
144
|
+
type
|
|
145
|
+
})) {
|
|
146
|
+
return this._preferred.hasTrait(type);
|
|
147
|
+
}
|
|
148
|
+
return this._secondary.hasTrait(type);
|
|
149
|
+
}
|
|
150
|
+
resourceHasTrait(resource, trait) {
|
|
151
|
+
if (this._preferred.hasResource(resource)) {
|
|
152
|
+
return this._preferred.resourceHasTrait(resource, trait);
|
|
153
|
+
}
|
|
154
|
+
return this._secondary.resourceHasTrait(resource, trait);
|
|
155
|
+
}
|
|
156
|
+
fields(resource) {
|
|
157
|
+
if (this._preferred.hasResource(resource)) {
|
|
158
|
+
return this._preferred.fields(resource);
|
|
159
|
+
}
|
|
160
|
+
return this._secondary.fields(resource);
|
|
161
|
+
}
|
|
162
|
+
transformation(field) {
|
|
163
|
+
return this._preferred.transformation(field);
|
|
164
|
+
}
|
|
165
|
+
hashFn(field) {
|
|
166
|
+
return this._preferred.hashFn(field);
|
|
167
|
+
}
|
|
168
|
+
derivation(field) {
|
|
169
|
+
return this._preferred.derivation(field);
|
|
170
|
+
}
|
|
171
|
+
resource(resource) {
|
|
172
|
+
if (this._preferred.hasResource(resource)) {
|
|
173
|
+
return this._preferred.resource(resource);
|
|
174
|
+
}
|
|
175
|
+
return this._secondary.resource(resource);
|
|
176
|
+
}
|
|
177
|
+
registerResources(schemas) {
|
|
178
|
+
this._preferred.registerResources(schemas);
|
|
179
|
+
}
|
|
180
|
+
registerResource(schema) {
|
|
181
|
+
this._preferred.registerResource(schema);
|
|
182
|
+
}
|
|
183
|
+
registerTransformation(transform) {
|
|
184
|
+
this._preferred.registerTransformation(transform);
|
|
185
|
+
}
|
|
186
|
+
registerDerivation(derivation) {
|
|
187
|
+
this._preferred.registerDerivation(derivation);
|
|
188
|
+
}
|
|
189
|
+
registerHashFn(hashFn) {
|
|
190
|
+
this._preferred.registerHashFn(hashFn);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {
|
|
194
|
+
DelegatingSchemaService.prototype.attributesDefinitionFor = function (resource) {
|
|
195
|
+
if (this._preferred.hasResource(resource)) {
|
|
196
|
+
return this._preferred.attributesDefinitionFor(resource);
|
|
197
|
+
}
|
|
198
|
+
return this._secondary.attributesDefinitionFor(resource);
|
|
199
|
+
};
|
|
200
|
+
DelegatingSchemaService.prototype.relationshipsDefinitionFor = function (resource) {
|
|
201
|
+
if (this._preferred.hasResource(resource)) {
|
|
202
|
+
return this._preferred.relationshipsDefinitionFor(resource);
|
|
203
|
+
}
|
|
204
|
+
return this._secondary.relationshipsDefinitionFor(resource);
|
|
205
|
+
};
|
|
206
|
+
DelegatingSchemaService.prototype.doesTypeExist = function (type) {
|
|
207
|
+
return this._preferred.doesTypeExist?.(type) || this._secondary.doesTypeExist?.(type) || false;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
export { DelegatingSchemaService, registerDerivations, withDefaults };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-support.js","sources":["../src/migration-support.ts"],"sourcesContent":["import type Store from '@ember-data/store';\nimport { recordIdentifierFor } from '@ember-data/store';\nimport type { SchemaService } from '@ember-data/store/types';\nimport { ENABLE_LEGACY_SCHEMA_SERVICE } from '@warp-drive/build-config/deprecations';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { StableRecordIdentifier } from '@warp-drive/core-types';\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport type { ObjectValue } from '@warp-drive/core-types/json/raw';\nimport type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';\nimport type {\n ArrayField,\n DerivedField,\n FieldSchema,\n GenericField,\n HashField,\n ObjectField,\n ResourceSchema,\n} from '@warp-drive/core-types/schema/fields';\nimport { Type } from '@warp-drive/core-types/symbols';\nimport type { WithPartial } from '@warp-drive/core-types/utils';\n\nimport { Errors } from './-private';\nimport type { MinimalLegacyRecord } from './-private/model-methods';\nimport {\n belongsTo,\n changedAttributes,\n createSnapshot,\n deleteRecord,\n destroyRecord,\n hasMany,\n reload,\n rollbackAttributes,\n save,\n serialize,\n unloadRecord,\n} from './-private/model-methods';\nimport RecordState from './-private/record-state';\nimport { buildSchema } from './hooks';\n\ntype AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;\ntype RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;\n\n// 'isDestroying', 'isDestroyed'\nconst LegacyFields = [\n '_createSnapshot',\n 'adapterError',\n 'belongsTo',\n 'changedAttributes',\n 'constructor',\n 'currentState',\n 'deleteRecord',\n 'destroyRecord',\n 'dirtyType',\n 'errors',\n 'hasDirtyAttributes',\n 'hasMany',\n 'isDeleted',\n 'isEmpty',\n 'isError',\n 'isLoaded',\n 'isLoading',\n 'isNew',\n 'isSaving',\n 'isValid',\n 'reload',\n 'rollbackAttributes',\n 'save',\n 'serialize',\n 'unloadRecord',\n];\n\nconst LegacySupport = getOrSetGlobal('LegacySupport', new WeakMap<MinimalLegacyRecord, Record<string, unknown>>());\n\nfunction legacySupport(record: MinimalLegacyRecord, options: ObjectValue | null, prop: string): unknown {\n let state = LegacySupport.get(record);\n if (!state) {\n state = {};\n LegacySupport.set(record, state);\n }\n\n switch (prop) {\n case '_createSnapshot':\n return createSnapshot;\n case 'adapterError':\n return record.currentState.adapterError;\n case 'belongsTo':\n return belongsTo;\n case 'changedAttributes':\n return changedAttributes;\n case 'constructor':\n return (state._constructor = state._constructor || {\n isModel: true,\n name: `Record<${recordIdentifierFor(record).type}>`,\n modelName: recordIdentifierFor(record).type,\n });\n case 'currentState':\n return (state.recordState = state.recordState || new RecordState(record));\n case 'deleteRecord':\n return deleteRecord;\n case 'destroyRecord':\n return destroyRecord;\n case 'dirtyType':\n return record.currentState.dirtyType;\n case 'errors':\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n return (state.errors = state.errors || Errors.create({ __record: record }));\n case 'hasDirtyAttributes':\n return record.currentState.isDirty;\n case 'hasMany':\n return hasMany;\n case 'isDeleted':\n return record.currentState.isDeleted;\n case 'isEmpty':\n return record.currentState.isEmpty;\n case 'isError':\n return record.currentState.isError;\n case 'isLoaded':\n return record.currentState.isLoaded;\n case 'isLoading':\n return record.currentState.isLoading;\n case 'isNew':\n return record.currentState.isNew;\n case 'isSaving':\n return record.currentState.isSaving;\n case 'isValid':\n return record.currentState.isValid;\n case 'reload':\n return reload;\n case 'rollbackAttributes':\n return rollbackAttributes;\n case 'save':\n return save;\n case 'serialize':\n return serialize;\n case 'unloadRecord':\n return unloadRecord;\n default:\n assert(`${prop} is not a supported legacy field`, false);\n }\n}\nlegacySupport[Type] = '@legacy';\n\nexport function withDefaults(schema: WithPartial<ResourceSchema, 'legacy' | 'identity'>): ResourceSchema {\n schema.legacy = true;\n schema.identity = { kind: '@id', name: 'id' };\n\n LegacyFields.forEach((field) => {\n schema.fields.push({\n type: '@legacy',\n name: field,\n kind: 'derived',\n });\n });\n schema.fields.push({\n name: 'isReloading',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n schema.fields.push({\n name: 'isDestroying',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n schema.fields.push({\n name: 'isDestroyed',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n return schema as ResourceSchema;\n}\n\nexport function registerDerivations(schema: SchemaService) {\n schema.registerDerivation(legacySupport);\n}\n\nexport interface DelegatingSchemaService {\n attributesDefinitionFor?(resource: StableRecordIdentifier | { type: string }): AttributesSchema;\n relationshipsDefinitionFor?(resource: StableRecordIdentifier | { type: string }): RelationshipsSchema;\n doesTypeExist?(type: string): boolean;\n}\nexport class DelegatingSchemaService implements SchemaService {\n _preferred!: SchemaService;\n _secondary!: SchemaService;\n\n constructor(store: Store, schema: SchemaService) {\n this._preferred = schema;\n this._secondary = buildSchema(store);\n }\n hasResource(resource: StableRecordIdentifier | { type: string }): boolean {\n return this._preferred.hasResource(resource) || this._secondary.hasResource(resource);\n }\n hasTrait(type: string): boolean {\n if (this._preferred.hasResource({ type })) {\n return this._preferred.hasTrait(type);\n }\n return this._secondary.hasTrait(type);\n }\n resourceHasTrait(resource: StableRecordIdentifier | { type: string }, trait: string): boolean {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.resourceHasTrait(resource, trait);\n }\n return this._secondary.resourceHasTrait(resource, trait);\n }\n fields(resource: StableRecordIdentifier | { type: string }): Map<string, FieldSchema> {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.fields(resource);\n }\n return this._secondary.fields(resource);\n }\n transformation(field: GenericField | ObjectField | ArrayField | { type: string }): Transformation {\n return this._preferred.transformation(field);\n }\n hashFn(field: HashField | { type: string }): HashFn {\n return this._preferred.hashFn(field);\n }\n derivation(field: DerivedField | { type: string }): Derivation {\n return this._preferred.derivation(field);\n }\n resource(resource: StableRecordIdentifier | { type: string }): ResourceSchema {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.resource(resource);\n }\n return this._secondary.resource(resource);\n }\n registerResources(schemas: ResourceSchema[]): void {\n this._preferred.registerResources(schemas);\n }\n registerResource(schema: ResourceSchema): void {\n this._preferred.registerResource(schema);\n }\n registerTransformation(transform: Transformation): void {\n this._preferred.registerTransformation(transform);\n }\n registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void {\n this._preferred.registerDerivation(derivation);\n }\n registerHashFn(hashFn: HashFn): void {\n this._preferred.registerHashFn(hashFn);\n }\n}\n\nif (ENABLE_LEGACY_SCHEMA_SERVICE) {\n DelegatingSchemaService.prototype.attributesDefinitionFor = function (\n resource: StableRecordIdentifier | { type: string }\n ) {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.attributesDefinitionFor!(resource);\n }\n\n return this._secondary.attributesDefinitionFor!(resource);\n };\n DelegatingSchemaService.prototype.relationshipsDefinitionFor = function (\n resource: StableRecordIdentifier | { type: string }\n ) {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.relationshipsDefinitionFor!(resource);\n }\n\n return this._secondary.relationshipsDefinitionFor!(resource);\n };\n DelegatingSchemaService.prototype.doesTypeExist = function (type: string) {\n return this._preferred.doesTypeExist?.(type) || this._secondary.doesTypeExist?.(type) || false;\n };\n}\n"],"names":["LegacyFields","LegacySupport","getOrSetGlobal","WeakMap","legacySupport","record","options","prop","state","get","set","createSnapshot","currentState","adapterError","belongsTo","changedAttributes","_constructor","isModel","name","recordIdentifierFor","type","modelName","recordState","RecordState","deleteRecord","destroyRecord","dirtyType","errors","Errors","create","__record","isDirty","hasMany","isDeleted","isEmpty","isError","isLoaded","isLoading","isNew","isSaving","isValid","reload","rollbackAttributes","save","serialize","unloadRecord","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","Type","withDefaults","schema","legacy","identity","kind","forEach","field","fields","push","defaultValue","registerDerivations","registerDerivation","DelegatingSchemaService","_preferred","_secondary","constructor","store","buildSchema","hasResource","resource","hasTrait","resourceHasTrait","trait","transformation","hashFn","derivation","registerResources","schemas","registerResource","registerTransformation","transform","registerHashFn","deprecations","ENABLE_LEGACY_SCHEMA_SERVICE","prototype","attributesDefinitionFor","relationshipsDefinitionFor","doesTypeExist"],"mappings":";;;;;;;;;;;;AA0CA;AACA,MAAMA,YAAY,GAAG,CACnB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,WAAW,EACX,QAAQ,EACR,oBAAoB,EACpB,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,SAAS,EACT,QAAQ,EACR,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,cAAc,CACf;AAED,MAAMC,aAAa,GAAGC,cAAc,CAAC,eAAe,EAAE,IAAIC,OAAO,EAAgD,CAAC;AAElH,SAASC,aAAaA,CAACC,MAA2B,EAAEC,OAA2B,EAAEC,IAAY,EAAW;AACtG,EAAA,IAAIC,KAAK,GAAGP,aAAa,CAACQ,GAAG,CAACJ,MAAM,CAAC;EACrC,IAAI,CAACG,KAAK,EAAE;IACVA,KAAK,GAAG,EAAE;AACVP,IAAAA,aAAa,CAACS,GAAG,CAACL,MAAM,EAAEG,KAAK,CAAC;AAClC;AAEA,EAAA,QAAQD,IAAI;AACV,IAAA,KAAK,iBAAiB;AACp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,CAAEhB,QAAQ,CAAC;GAC1D;AACDP,EAAAA,uBAAuB,CAACsB,SAAS,CAACE,0BAA0B,GAAG,UAC7DjB,QAAmD,EACnD;IACA,IAAI,IAAI,CAACN,UAAU,CAACK,WAAW,CAACC,QAAQ,CAAC,EAAE;AACzC,MAAA,OAAO,IAAI,CAACN,UAAU,CAACuB,0BAA0B,CAAEjB,QAAQ,CAAC;AAC9D;AAEA,IAAA,OAAO,IAAI,CAACL,UAAU,CAACsB,0BAA0B,CAAEjB,QAAQ,CAAC;GAC7D;AACDP,EAAAA,uBAAuB,CAACsB,SAAS,CAACG,aAAa,GAAG,UAAUvE,IAAY,EAAE;AACxE,IAAA,OAAO,IAAI,CAAC+C,UAAU,CAACwB,aAAa,GAAGvE,IAAI,CAAC,IAAI,IAAI,CAACgD,UAAU,CAACuB,aAAa,GAAGvE,IAAI,CAAC,IAAI,KAAK;GAC/F;AACH;;;;"}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { getOwner } from '@ember/application';
|
|
2
|
+
import { deprecate } from '@ember/debug';
|
|
3
|
+
import { M as Model, n as normalizeModelName } from "./legacy-relationships-support-D5m0xTYg.js";
|
|
4
|
+
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
In case someone defined a relationship to a mixin, for example:
|
|
8
|
+
```ts
|
|
9
|
+
class CommentModel extends Model {
|
|
10
|
+
@belongsTo('commentable', { polymorphic: true }) owner;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let Commentable = Mixin.create({
|
|
14
|
+
@hasMany('comment') comments;
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
we want to look up a Commentable class which has all the necessary
|
|
18
|
+
relationship meta data. Thus, we look up the mixin and create a mock
|
|
19
|
+
Model, so we can access the relationship CPs of the mixin (`comments`)
|
|
20
|
+
in this case
|
|
21
|
+
*/
|
|
22
|
+
function modelForMixin(store, normalizedModelName) {
|
|
23
|
+
const owner = getOwner(store);
|
|
24
|
+
const MaybeMixin = owner.factoryFor(`mixin:${normalizedModelName}`);
|
|
25
|
+
const mixin = MaybeMixin && MaybeMixin.class;
|
|
26
|
+
if (mixin) {
|
|
27
|
+
const ModelForMixin = Model.extend(mixin);
|
|
28
|
+
ModelForMixin.__isMixin = true;
|
|
29
|
+
ModelForMixin.__mixin = mixin;
|
|
30
|
+
//Cache the class as a model
|
|
31
|
+
owner.register(`model:${normalizedModelName}`, ModelForMixin);
|
|
32
|
+
}
|
|
33
|
+
return owner.factoryFor(`model:${normalizedModelName}`);
|
|
34
|
+
}
|
|
35
|
+
class ModelSchemaProvider {
|
|
36
|
+
constructor(store) {
|
|
37
|
+
this.store = store;
|
|
38
|
+
this._schemas = new Map();
|
|
39
|
+
this._typeMisses = new Set();
|
|
40
|
+
}
|
|
41
|
+
hasTrait(type) {
|
|
42
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
43
|
+
{
|
|
44
|
+
throw new Error(`hasTrait is not available with @ember-data/model's SchemaService`);
|
|
45
|
+
}
|
|
46
|
+
})() : {};
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
resourceHasTrait(resource, trait) {
|
|
50
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
51
|
+
{
|
|
52
|
+
throw new Error(`resourceHasTrait is not available with @ember-data/model's SchemaService`);
|
|
53
|
+
}
|
|
54
|
+
})() : {};
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
transformation(field) {
|
|
58
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
59
|
+
{
|
|
60
|
+
throw new Error(`transformation is not available with @ember-data/model's SchemaService`);
|
|
61
|
+
}
|
|
62
|
+
})() : {};
|
|
63
|
+
}
|
|
64
|
+
derivation(field) {
|
|
65
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
66
|
+
{
|
|
67
|
+
throw new Error(`derivation is not available with @ember-data/model's SchemaService`);
|
|
68
|
+
}
|
|
69
|
+
})() : {};
|
|
70
|
+
}
|
|
71
|
+
hashFn(field) {
|
|
72
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
73
|
+
{
|
|
74
|
+
throw new Error(`hashFn is not available with @ember-data/model's SchemaService`);
|
|
75
|
+
}
|
|
76
|
+
})() : {};
|
|
77
|
+
}
|
|
78
|
+
resource(resource) {
|
|
79
|
+
const type = normalizeModelName(resource.type);
|
|
80
|
+
if (!this._schemas.has(type)) {
|
|
81
|
+
this._loadModelSchema(type);
|
|
82
|
+
}
|
|
83
|
+
return this._schemas.get(type).schema;
|
|
84
|
+
}
|
|
85
|
+
registerResources(schemas) {
|
|
86
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
87
|
+
{
|
|
88
|
+
throw new Error(`registerResources is not available with @ember-data/model's SchemaService`);
|
|
89
|
+
}
|
|
90
|
+
})() : {};
|
|
91
|
+
}
|
|
92
|
+
registerResource(schema) {
|
|
93
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
94
|
+
{
|
|
95
|
+
throw new Error(`registerResource is not available with @ember-data/model's SchemaService`);
|
|
96
|
+
}
|
|
97
|
+
})() : {};
|
|
98
|
+
}
|
|
99
|
+
registerTransformation(transform) {
|
|
100
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
101
|
+
{
|
|
102
|
+
throw new Error(`registerTransformation is not available with @ember-data/model's SchemaService`);
|
|
103
|
+
}
|
|
104
|
+
})() : {};
|
|
105
|
+
}
|
|
106
|
+
registerDerivation(derivation) {
|
|
107
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
108
|
+
{
|
|
109
|
+
throw new Error(`registerDerivation is not available with @ember-data/model's SchemaService`);
|
|
110
|
+
}
|
|
111
|
+
})() : {};
|
|
112
|
+
}
|
|
113
|
+
registerHashFn(hashFn) {
|
|
114
|
+
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
115
|
+
{
|
|
116
|
+
throw new Error(`registerHashFn is not available with @ember-data/model's SchemaService`);
|
|
117
|
+
}
|
|
118
|
+
})() : {};
|
|
119
|
+
}
|
|
120
|
+
_loadModelSchema(type) {
|
|
121
|
+
const modelClass = this.store.modelFor(type);
|
|
122
|
+
const attributeMap = modelClass.attributes;
|
|
123
|
+
const attributes = Object.create(null);
|
|
124
|
+
attributeMap.forEach((meta, name) => attributes[name] = meta);
|
|
125
|
+
const relationships = modelClass.relationshipsObject || null;
|
|
126
|
+
const fields = new Map();
|
|
127
|
+
for (const attr of Object.values(attributes)) {
|
|
128
|
+
fields.set(attr.name, attr);
|
|
129
|
+
}
|
|
130
|
+
for (const rel of Object.values(relationships)) {
|
|
131
|
+
fields.set(rel.name, rel);
|
|
132
|
+
}
|
|
133
|
+
const schema = {
|
|
134
|
+
legacy: true,
|
|
135
|
+
identity: {
|
|
136
|
+
name: 'id',
|
|
137
|
+
kind: '@id'
|
|
138
|
+
},
|
|
139
|
+
type,
|
|
140
|
+
fields: Array.from(fields.values())
|
|
141
|
+
};
|
|
142
|
+
const internalSchema = {
|
|
143
|
+
schema,
|
|
144
|
+
attributes,
|
|
145
|
+
relationships,
|
|
146
|
+
fields
|
|
147
|
+
};
|
|
148
|
+
this._schemas.set(type, internalSchema);
|
|
149
|
+
return internalSchema;
|
|
150
|
+
}
|
|
151
|
+
fields(resource) {
|
|
152
|
+
const type = normalizeModelName(resource.type);
|
|
153
|
+
if (!this._schemas.has(type)) {
|
|
154
|
+
this._loadModelSchema(type);
|
|
155
|
+
}
|
|
156
|
+
return this._schemas.get(type).fields;
|
|
157
|
+
}
|
|
158
|
+
hasResource(resource) {
|
|
159
|
+
const type = normalizeModelName(resource.type);
|
|
160
|
+
if (this._schemas.has(type)) {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
if (this._typeMisses.has(type)) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
const factory = getModelFactory(this.store, type);
|
|
167
|
+
const exists = factory !== null;
|
|
168
|
+
if (!exists) {
|
|
169
|
+
this._typeMisses.add(type);
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {
|
|
176
|
+
ModelSchemaProvider.prototype.doesTypeExist = function (type) {
|
|
177
|
+
deprecate(`Use \`schema.hasResource({ type })\` instead of \`schema.doesTypeExist(type)\``, /* inline-macro-config */getGlobalConfig().WarpDrive.deprecations.DISABLE_6X_DEPRECATIONS, {
|
|
178
|
+
id: 'ember-data:schema-service-updates',
|
|
179
|
+
until: '6.0',
|
|
180
|
+
for: 'ember-data',
|
|
181
|
+
since: {
|
|
182
|
+
available: '4.13',
|
|
183
|
+
enabled: '5.4'
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
return this.hasResource({
|
|
187
|
+
type
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
ModelSchemaProvider.prototype.attributesDefinitionFor = function (resource) {
|
|
191
|
+
let rawType;
|
|
192
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_STRING_ARG_SCHEMAS)) {
|
|
193
|
+
if (typeof resource === 'string') {
|
|
194
|
+
deprecate(`relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`, false, {
|
|
195
|
+
id: 'ember-data:deprecate-string-arg-schemas',
|
|
196
|
+
for: 'ember-data',
|
|
197
|
+
until: '5.0',
|
|
198
|
+
since: {
|
|
199
|
+
enabled: '4.5',
|
|
200
|
+
available: '4.5'
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
rawType = resource;
|
|
204
|
+
} else {
|
|
205
|
+
rawType = resource.type;
|
|
206
|
+
}
|
|
207
|
+
} else {
|
|
208
|
+
rawType = resource.type;
|
|
209
|
+
}
|
|
210
|
+
deprecate(`Use \`schema.fields({ type })\` instead of \`schema.attributesDefinitionFor({ type })\``, /* inline-macro-config */getGlobalConfig().WarpDrive.deprecations.DISABLE_6X_DEPRECATIONS, {
|
|
211
|
+
id: 'ember-data:schema-service-updates',
|
|
212
|
+
until: '6.0',
|
|
213
|
+
for: 'ember-data',
|
|
214
|
+
since: {
|
|
215
|
+
available: '4.13',
|
|
216
|
+
enabled: '5.4'
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
const type = normalizeModelName(rawType);
|
|
220
|
+
if (!this._schemas.has(type)) {
|
|
221
|
+
this._loadModelSchema(type);
|
|
222
|
+
}
|
|
223
|
+
return this._schemas.get(type).attributes;
|
|
224
|
+
};
|
|
225
|
+
ModelSchemaProvider.prototype.relationshipsDefinitionFor = function (resource) {
|
|
226
|
+
let rawType;
|
|
227
|
+
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_STRING_ARG_SCHEMAS)) {
|
|
228
|
+
if (typeof resource === 'string') {
|
|
229
|
+
deprecate(`relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`, false, {
|
|
230
|
+
id: 'ember-data:deprecate-string-arg-schemas',
|
|
231
|
+
for: 'ember-data',
|
|
232
|
+
until: '5.0',
|
|
233
|
+
since: {
|
|
234
|
+
enabled: '4.5',
|
|
235
|
+
available: '4.5'
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
rawType = resource;
|
|
239
|
+
} else {
|
|
240
|
+
rawType = resource.type;
|
|
241
|
+
}
|
|
242
|
+
} else {
|
|
243
|
+
rawType = resource.type;
|
|
244
|
+
}
|
|
245
|
+
deprecate(`Use \`schema.fields({ type })\` instead of \`schema.relationshipsDefinitionFor({ type })\``, /* inline-macro-config */getGlobalConfig().WarpDrive.deprecations.DISABLE_6X_DEPRECATIONS, {
|
|
246
|
+
id: 'ember-data:schema-service-updates',
|
|
247
|
+
until: '6.0',
|
|
248
|
+
for: 'ember-data',
|
|
249
|
+
since: {
|
|
250
|
+
available: '4.13',
|
|
251
|
+
enabled: '5.4'
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
const type = normalizeModelName(rawType);
|
|
255
|
+
if (!this._schemas.has(type)) {
|
|
256
|
+
this._loadModelSchema(type);
|
|
257
|
+
}
|
|
258
|
+
return this._schemas.get(type).relationships;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
function buildSchema(store) {
|
|
262
|
+
return new ModelSchemaProvider(store);
|
|
263
|
+
}
|
|
264
|
+
function getModelFactory(store, type) {
|
|
265
|
+
if (!store._modelFactoryCache) {
|
|
266
|
+
store._modelFactoryCache = Object.create(null);
|
|
267
|
+
}
|
|
268
|
+
const cache = store._modelFactoryCache;
|
|
269
|
+
let factory = cache[type];
|
|
270
|
+
if (!factory) {
|
|
271
|
+
const owner = getOwner(store);
|
|
272
|
+
factory = owner.factoryFor(`model:${type}`);
|
|
273
|
+
if (!factory) {
|
|
274
|
+
//Support looking up mixins as base types for polymorphic relationships
|
|
275
|
+
factory = modelForMixin(store, type);
|
|
276
|
+
}
|
|
277
|
+
if (!factory) {
|
|
278
|
+
// we don't cache misses in case someone wants to register a missing model
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
const klass = factory.class;
|
|
282
|
+
if (klass.isModel) {
|
|
283
|
+
const hasOwnModelNameSet = klass.modelName && Object.prototype.hasOwnProperty.call(klass, 'modelName');
|
|
284
|
+
if (!hasOwnModelNameSet) {
|
|
285
|
+
Object.defineProperty(klass, 'modelName', {
|
|
286
|
+
value: type
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
cache[type] = factory;
|
|
291
|
+
}
|
|
292
|
+
return factory;
|
|
293
|
+
}
|
|
294
|
+
export { ModelSchemaProvider as M, buildSchema as b, getModelFactory as g };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-provider-m94yB7iS.js","sources":["../src/-private/model-for-mixin.ts","../src/-private/schema-provider.ts"],"sourcesContent":["import { getOwner } from '@ember/application';\n\nimport type Store from '@ember-data/store';\n\nimport { Model, type ModelFactory } from './model';\n\n/*\n In case someone defined a relationship to a mixin, for example:\n ```ts\n class CommentModel extends Model {\n @belongsTo('commentable', { polymorphic: true }) owner;\n }\n\n let Commentable = Mixin.create({\n @hasMany('comment') comments;\n });\n ```\n we want to look up a Commentable class which has all the necessary\n relationship meta data. Thus, we look up the mixin and create a mock\n Model, so we can access the relationship CPs of the mixin (`comments`)\n in this case\n */\nexport default function modelForMixin(store: Store, normalizedModelName: string): ModelFactory | undefined {\n const owner = getOwner(store)!;\n const MaybeMixin = owner.factoryFor(`mixin:${normalizedModelName}`);\n const mixin = MaybeMixin && MaybeMixin.class;\n if (mixin) {\n const ModelForMixin = Model.extend(mixin) as unknown as { __isMixin: boolean; __mixin: typeof mixin };\n ModelForMixin.__isMixin = true;\n ModelForMixin.__mixin = mixin;\n //Cache the class as a model\n owner.register(`model:${normalizedModelName}`, ModelForMixin);\n }\n return owner.factoryFor(`model:${normalizedModelName}`) as ModelFactory | undefined;\n}\n","import { getOwner } from '@ember/application';\nimport { deprecate } from '@ember/debug';\n\nimport type Store from '@ember-data/store';\nimport type { SchemaService } from '@ember-data/store/types';\nimport {\n DEPRECATE_STRING_ARG_SCHEMAS,\n DISABLE_6X_DEPRECATIONS,\n ENABLE_LEGACY_SCHEMA_SERVICE,\n} from '@warp-drive/build-config/deprecations';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { RecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier';\nimport type { ObjectValue } from '@warp-drive/core-types/json/raw';\nimport type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';\nimport type {\n ArrayField,\n DerivedField,\n GenericField,\n HashField,\n LegacyAttributeField,\n LegacyFieldSchema,\n LegacyRelationshipSchema,\n ObjectField,\n ResourceSchema,\n} from '@warp-drive/core-types/schema/fields';\n\nimport type { FactoryCache, Model, ModelFactory, ModelStore } from './model';\nimport _modelForMixin from './model-for-mixin';\nimport { normalizeModelName } from './util';\n\ntype AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;\ntype RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;\n\ntype InternalSchema = {\n schema: ResourceSchema;\n fields: Map<string, LegacyAttributeField | LegacyRelationshipSchema>;\n attributes: Record<string, LegacyAttributeField>;\n relationships: Record<string, LegacyRelationshipSchema>;\n};\n\nexport interface ModelSchemaProvider {\n attributesDefinitionFor(resource: RecordIdentifier | { type: string }): AttributesSchema;\n\n relationshipsDefinitionFor(resource: RecordIdentifier | { type: string }): RelationshipsSchema;\n\n doesTypeExist(type: string): boolean;\n}\nexport class ModelSchemaProvider implements SchemaService {\n declare store: ModelStore;\n declare _schemas: Map<string, InternalSchema>;\n declare _typeMisses: Set<string>;\n\n constructor(store: ModelStore) {\n this.store = store;\n this._schemas = new Map();\n this._typeMisses = new Set();\n }\n\n hasTrait(type: string): boolean {\n assert(`hasTrait is not available with @ember-data/model's SchemaService`);\n return false;\n }\n resourceHasTrait(resource: StableRecordIdentifier | { type: string }, trait: string): boolean {\n assert(`resourceHasTrait is not available with @ember-data/model's SchemaService`);\n return false;\n }\n transformation(field: GenericField | ObjectField | ArrayField | { type: string }): Transformation {\n assert(`transformation is not available with @ember-data/model's SchemaService`);\n }\n derivation(field: DerivedField | { type: string }): Derivation {\n assert(`derivation is not available with @ember-data/model's SchemaService`);\n }\n hashFn(field: HashField | { type: string }): HashFn {\n assert(`hashFn is not available with @ember-data/model's SchemaService`);\n }\n resource(resource: StableRecordIdentifier | { type: string }): ResourceSchema {\n const type = normalizeModelName(resource.type);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.schema;\n }\n registerResources(schemas: ResourceSchema[]): void {\n assert(`registerResources is not available with @ember-data/model's SchemaService`);\n }\n registerResource(schema: ResourceSchema): void {\n assert(`registerResource is not available with @ember-data/model's SchemaService`);\n }\n registerTransformation(transform: Transformation): void {\n assert(`registerTransformation is not available with @ember-data/model's SchemaService`);\n }\n registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void {\n assert(`registerDerivation is not available with @ember-data/model's SchemaService`);\n }\n registerHashFn(hashFn: HashFn): void {\n assert(`registerHashFn is not available with @ember-data/model's SchemaService`);\n }\n _loadModelSchema(type: string) {\n const modelClass = this.store.modelFor(type) as typeof Model;\n const attributeMap = modelClass.attributes;\n\n const attributes = Object.create(null) as AttributesSchema;\n attributeMap.forEach((meta, name) => (attributes[name] = meta));\n const relationships = modelClass.relationshipsObject || null;\n const fields = new Map<string, LegacyAttributeField | LegacyRelationshipSchema>();\n\n for (const attr of Object.values(attributes)) {\n fields.set(attr.name, attr);\n }\n\n for (const rel of Object.values(relationships)) {\n fields.set(rel.name, rel);\n }\n\n const schema: ResourceSchema = {\n legacy: true,\n identity: { name: 'id', kind: '@id' },\n type,\n fields: Array.from(fields.values()),\n };\n\n const internalSchema: InternalSchema = {\n schema,\n attributes,\n relationships,\n fields,\n };\n\n this._schemas.set(type, internalSchema);\n\n return internalSchema;\n }\n\n fields(resource: RecordIdentifier | { type: string }): Map<string, LegacyFieldSchema> {\n const type = normalizeModelName(resource.type);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.fields;\n }\n\n hasResource(resource: { type: string }): boolean {\n const type = normalizeModelName(resource.type);\n\n if (this._schemas.has(type)) {\n return true;\n }\n\n if (this._typeMisses.has(type)) {\n return false;\n }\n\n const factory = getModelFactory(this.store, type);\n const exists = factory !== null;\n\n if (!exists) {\n this._typeMisses.add(type);\n return false;\n }\n\n return true;\n }\n}\n\nif (ENABLE_LEGACY_SCHEMA_SERVICE) {\n ModelSchemaProvider.prototype.doesTypeExist = function (type: string): boolean {\n deprecate(\n `Use \\`schema.hasResource({ type })\\` instead of \\`schema.doesTypeExist(type)\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n return this.hasResource({ type });\n };\n\n ModelSchemaProvider.prototype.attributesDefinitionFor = function (\n resource: RecordIdentifier | { type: string }\n ): AttributesSchema {\n let rawType: string;\n if (DEPRECATE_STRING_ARG_SCHEMAS) {\n if (typeof resource === 'string') {\n deprecate(\n `relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`,\n false,\n {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: { enabled: '4.5', available: '4.5' },\n }\n );\n rawType = resource;\n } else {\n rawType = resource.type;\n }\n } else {\n rawType = resource.type;\n }\n\n deprecate(\n `Use \\`schema.fields({ type })\\` instead of \\`schema.attributesDefinitionFor({ type })\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n const type = normalizeModelName(rawType);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.attributes;\n };\n\n ModelSchemaProvider.prototype.relationshipsDefinitionFor = function (\n resource: RecordIdentifier | { type: string }\n ): RelationshipsSchema {\n let rawType: string;\n if (DEPRECATE_STRING_ARG_SCHEMAS) {\n if (typeof resource === 'string') {\n deprecate(\n `relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`,\n false,\n {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: { enabled: '4.5', available: '4.5' },\n }\n );\n rawType = resource;\n } else {\n rawType = resource.type;\n }\n } else {\n rawType = resource.type;\n }\n\n deprecate(\n `Use \\`schema.fields({ type })\\` instead of \\`schema.relationshipsDefinitionFor({ type })\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n const type = normalizeModelName(rawType);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.relationships;\n };\n}\n\nexport function buildSchema(store: Store): SchemaService {\n return new ModelSchemaProvider(store as ModelStore);\n}\n\nexport function getModelFactory(store: ModelStore, type: string): ModelFactory | null {\n if (!store._modelFactoryCache) {\n store._modelFactoryCache = Object.create(null) as FactoryCache;\n }\n const cache = store._modelFactoryCache;\n let factory: ModelFactory | undefined = cache[type];\n\n if (!factory) {\n const owner = getOwner(store)!;\n factory = owner.factoryFor(`model:${type}`) as ModelFactory | undefined;\n\n if (!factory) {\n //Support looking up mixins as base types for polymorphic relationships\n factory = _modelForMixin(store, type);\n }\n\n if (!factory) {\n // we don't cache misses in case someone wants to register a missing model\n return null;\n }\n\n const klass = factory.class;\n\n if (klass.isModel) {\n const hasOwnModelNameSet = klass.modelName && Object.prototype.hasOwnProperty.call(klass, 'modelName');\n if (!hasOwnModelNameSet) {\n Object.defineProperty(klass, 'modelName', { value: type });\n }\n }\n\n cache[type] = factory;\n }\n\n return factory;\n}\n"],"names":["modelForMixin","store","normalizedModelName","owner","getOwner","MaybeMixin","factoryFor","mixin","class","ModelForMixin","Model","extend","__isMixin","__mixin","register","ModelSchemaProvider","constructor","_schemas","Map","_typeMisses","Set","hasTrait","type","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","resourceHasTrait","resource","trait","transformation","field","derivation","hashFn","normalizeModelName","has","_loadModelSchema","get","schema","registerResources","schemas","registerResource","registerTransformation","transform","registerDerivation","registerHashFn","modelClass","modelFor","attributeMap","attributes","Object","create","forEach","meta","name","relationships","relationshipsObject","fields","attr","values","set","rel","legacy","identity","kind","Array","from","internalSchema","hasResource","factory","getModelFactory","exists","add","deprecations","ENABLE_LEGACY_SCHEMA_SERVICE","prototype","doesTypeExist","deprecate","DISABLE_6X_DEPRECATIONS","id","until","for","since","available","enabled","attributesDefinitionFor","rawType","DEPRECATE_STRING_ARG_SCHEMAS","relationshipsDefinitionFor","buildSchema","_modelFactoryCache","cache","_modelForMixin","klass","isModel","hasOwnModelNameSet","modelName","hasOwnProperty","call","defineProperty","value"],"mappings":";;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,aAAaA,CAACC,KAAY,EAAEC,mBAA2B,EAA4B;AACzG,EAAA,MAAMC,KAAK,GAAGC,QAAQ,CAACH,KAAK,CAAE;EAC9B,MAAMI,UAAU,GAAGF,KAAK,CAACG,UAAU,CAAC,CAAA,MAAA,EAASJ,mBAAmB,CAAA,CAAE,CAAC;AACnE,EAAA,MAAMK,KAAK,GAAGF,UAAU,IAAIA,UAAU,CAACG,KAAK;AAC5C,EAAA,IAAID,KAAK,EAAE;AACT,IAAA,MAAME,aAAa,GAAGC,KAAK,CAACC,MAAM,CAACJ,KAAK,CAA6D;IACrGE,aAAa,CAACG,SAAS,GAAG,IAAI;IAC9BH,aAAa,CAACI,OAAO,GAAGN,KAAK;AAC7B;IACAJ,KAAK,CAACW,QAAQ,CAAC,CAAA,MAAA,EAASZ,mBAAmB,CAAE,CAAA,EAAEO,aAAa,CAAC;AAC/D;AACA,EAAA,OAAON,KAAK,CAACG,UAAU,CAAC,CAASJ,MAAAA,EAAAA,mBAAmB,EAAE,CAAC;AACzD;;ACaO,MAAMa,mBAAmB,CAA0B;EAKxDC,WAAWA,CAACf,KAAiB,EAAE;IAC7B,IAAI,CAACA,KAAK,GAAGA,KAAK;AAClB,IAAA,IAAI,CAACgB,QAAQ,GAAG,IAAIC,GAAG,EAAE;AACzB,IAAA,IAAI,CAACC,WAAW,GAAG,IAAIC,GAAG,EAAE;AAC9B;EAEAC,QA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4F,kBAAkB;AACtC,EAAA,IAAIrB,OAAiC,GAAGsB,KAAK,CAACxE,IAAI,CAAC;EAEnD,IAAI,CAACkD,OAAO,EAAE;AACZ,IAAA,MAAMrE,KAAK,GAAGC,QAAQ,CAACH,KAAK,CAAE;IAC9BuE,OAAO,GAAGrE,KAAK,CAACG,UAAU,CAAC,CAASgB,MAAAA,EAAAA,IAAI,EAAE,CAA6B;IAEvE,IAAI,CAACkD,OAAO,EAAE;AACZ;AACAA,MAAAA,OAAO,GAAGuB,aAAc,CAAC9F,KAAK,EAAEqB,IAAI,CAAC;AACvC;IAEA,IAAI,CAACkD,OAAO,EAAE;AACZ;AACA,MAAA,OAAO,IAAI;AACb;AAEA,IAAA,MAAMwB,KAAK,GAAGxB,OAAO,CAAChE,KAAK;IAE3B,IAAIwF,KAAK,CAACC,OAAO,EAAE;AACjB,MAAA,MAAMC,kBAAkB,GAAGF,KAAK,CAACG,SAAS,IAAI9C,MAAM,CAACyB,SAAS,CAACsB,cAAc,CAACC,IAAI,CAACL,KAAK,EAAE,WAAW,CAAC;MACtG,IAAI,CAACE,kBAAkB,EAAE;AACvB7C,QAAAA,MAAM,CAACiD,cAAc,CAACN,KAAK,EAAE,WAAW,EAAE;AAAEO,UAAAA,KAAK,EAAEjF;AAAK,SAAC,CAAC;AAC5D;AACF;AAEAwE,IAAAA,KAAK,CAACxE,IAAI,CAAC,GAAGkD,OAAO;AACvB;AAEA,EAAA,OAAOA,OAAO;AAChB;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="1028" height="324" viewBox="0 0 1028 324" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g transform="translate(76.041 42)" fill="none" fill-rule="evenodd">
|
|
3
|
+
<g fill="#E04E39">
|
|
4
|
+
<path d="M507.552 137.229s-12.56 9.744-23.616 8.656c-11.056-1.088-7.584-25.792-7.584-25.792s2.384-22.656-4.128-24.56c-6.496-1.888-14.512 5.904-14.512 5.904s-9.968 11.056-14.736 25.152l-1.312.432s1.52-24.72-.208-30.352c-1.296-2.816-13.216-2.592-15.168 2.384-1.952 4.992-11.488 39.664-12.144 54.192 0 0-18.64 15.824-34.88 18.416-16.256 2.608-20.16-7.584-20.16-7.584s44.208-12.352 42.688-47.68c-1.504-35.328-35.648-22.256-39.504-19.36-3.744 2.816-23.696 14.848-29.52 48.176-.192 1.12-.544 6.08-.544 6.08s-17.12 11.472-26.656 14.512c0 0 26.656-44.864-5.84-65.232-9.14-5.502-17.106-.44-21.845 4.208-2.91 2.854 39.397-43.424 29.637-84.832C302.88.237 293.024-1.875 283.984 1.325c-13.728 5.408-18.928 13.424-18.928 13.424s-17.776 25.792-21.904 64.16c-4.112 38.352-10.176 84.736-10.176 84.736s-8.464 8.24-16.256 8.672c-7.808.416-4.336-23.2-4.336-23.2s6.064-35.968 5.648-42.048c-.448-6.064-.88-9.312-8.032-11.472-7.152-2.176-14.96 6.928-14.96 6.928s-20.576 31.2-22.304 35.968l-1.104 1.968-1.072-1.312s14.512-42.48.656-43.12c-13.872-.656-22.976 15.168-22.976 15.168s-15.824 26.448-16.48 29.472l-1.072-1.296s6.496-30.768 5.2-38.368c-1.312-7.584-8.448-6.064-8.448-6.064s-9.104-1.088-11.488 4.768c-2.384 5.856-11.056 44.64-12.144 56.992 0 0-22.752 16.256-37.712 16.464-14.944.224-13.424-9.472-13.424-9.472s54.832-18.768 39.872-55.824c-6.72-9.536-14.512-12.528-25.568-12.32-11.056.224-24.768 6.96-33.648 26.896-4.256 9.504-5.792 18.544-6.672 25.36 0 0-9.584 1.968-14.784-2.368-5.216-4.336-7.888 0-7.888 0s-8.928 11.392-.048 14.848c8.896 3.472 22.752 5.088 22.752 5.088 1.28 6.064 4.976 16.384 15.808 24.592 16.256 12.352 47.44-1.136 47.44-1.136l12.784-7.168s.432 11.728 9.76 13.44c9.312 1.712 13.216-.032 29.472-39.472 9.536-20.16 10.192-19.072 10.192-19.072 1.072-.224-6.288 38.352-3.472 48.752 2.816 10.416 15.168 9.328 15.168 9.328s6.72 1.296 12.144-17.776c5.408-19.072 15.824-40.096 15.824-40.096 1.28 0-3.264 39.44 3.664 52.016 6.944 12.576 24.928 4.224 24.928 4.224s12.576-6.336 14.528-8.288c0 0 14.912 12.704 35.952 10.4 47.04-9.264 63.776-21.776 63.776-21.776s8.08 20.48 33.12 22.384c28.592 2.16 44.208-15.824 44.208-15.824s-.224 11.696 9.744 15.824c9.984 4.112 16.688-19.04 16.688-19.04l16.688-45.984c1.52 0 2.384 29.904 18.864 34.672 16.464 4.768 37.92-11.168 37.92-11.168s5.2-2.864 4.336-11.536c-.88-8.672-8.672-5.44-8.672-5.44zm-434.08-21.696c5.84 5.632 3.68 17.76-7.376 25.344-11.04 7.6-16.032 6.08-16.032 6.08.656-25.792 17.568-37.072 23.408-31.424zM289.104 26.46c3.68 19.504-32.288 77.584-32.288 77.584.432-13.008 13.216-56.992 13.216-56.992s15.376-40.096 19.072-20.592zm-35.552 148.016s-2.816-9.536 5.2-36.192c8.032-26.656 26.88-16.256 26.88-16.256s13.008 9.968 2.816 36.624c-10.176 26.656-34.896 15.824-34.896 15.824zm109.664-52.224c8.88-16.256 15.824-7.376 15.824-7.376s7.584 8.24-1.088 20.592c-8.672 12.352-21.232 11.488-21.232 11.488s-2.384-8.464 6.496-24.704z"/>
|
|
5
|
+
<path d="M451.918 188.027v-3.112h1.974c.273 0 .547.028.835.057.288.043.562.115.793.216.245.101.432.245.576.433.159.187.23.446.23.763 0 .72-.216 1.182-.648 1.369-.432.187-.994.274-1.671.274h-2.09zm-2.349-4.942v11.843h2.349v-5.057h1.47l2.881 5.057h2.464l-3.17-5.172c.432-.044.836-.13 1.225-.26.374-.13.706-.317.98-.562.288-.245.504-.562.662-.95.173-.39.245-.85.245-1.398 0-1.282-.403-2.19-1.196-2.709-.807-.533-1.96-.792-3.443-.792h-4.467zm-3.76 5.936c0-1.21.201-2.32.62-3.328a8.09 8.09 0 0 1 1.7-2.608 7.71 7.71 0 0 1 2.52-1.73 7.864 7.864 0 0 1 3.127-.619c1.095 0 2.133.202 3.098.62.98.418 1.816.994 2.536 1.729.72.735 1.282 1.599 1.714 2.608.418 1.008.634 2.118.634 3.328s-.216 2.32-.634 3.342c-.432 1.009-.994 1.902-1.714 2.637a7.594 7.594 0 0 1-2.536 1.744 7.725 7.725 0 0 1-3.098.619 7.864 7.864 0 0 1-3.126-.62 7.535 7.535 0 0 1-2.522-1.743c-.72-.735-1.282-1.628-1.7-2.637-.418-1.022-.62-2.132-.62-3.342zm-2.896 0c0 1.628.302 3.083.893 4.38.605 1.311 1.398 2.42 2.392 3.343a10.57 10.57 0 0 0 3.472 2.117c1.311.49 2.68.735 4.106.735 1.441 0 2.81-.245 4.121-.735a10.57 10.57 0 0 0 3.472-2.117c.995-.923 1.787-2.032 2.392-3.343.59-1.297.879-2.752.879-4.38 0-1.6-.288-3.055-.879-4.351-.605-1.312-1.397-2.42-2.392-3.329a10.57 10.57 0 0 0-3.472-2.118 11.356 11.356 0 0 0-4.12-.749c-1.427 0-2.796.245-4.107.75a10.57 10.57 0 0 0-3.472 2.117c-.994.908-1.787 2.017-2.392 3.329-.59 1.296-.893 2.752-.893 4.35z"/>
|
|
6
|
+
</g>
|
|
7
|
+
<path d="M589.663 44.545c.42-4.718.63-8.462.63-11.226 0-3.638-.33-6.168-.975-7.583-.646-1.416-1.592-2.124-2.823-2.124-2.207 0-4.19 1.365-5.976 4.093-1.772 2.73-3.198 6.25-4.295 10.556-1.08 4.31-2.252 8.992-3.528 14.05-1.263 5.061-2.192 10.016-2.793 14.863-.57 4.85-1.051 9.221-1.397 13.115-.36 3.889-.615 6.654-.75 8.296-.3 3.348-.54 6.575-.721 9.68-.18 3.108-.315 5.943-.39 8.503a225.54 225.54 0 0 0-.107 6.71v5.432A515.125 515.125 0 0 0 576.9 92.079a452.907 452.907 0 0 0 3.903-11.879c1.277-4.125 2.554-8.216 3.815-12.274a145.287 145.287 0 0 0 3.213-12.052c.87-3.98 1.487-7.756 1.832-11.33zm-47.689 68.962a42.47 42.47 0 0 0-11.877 8.613c-3.468 3.566-6.366 8.267-8.694 14.114-2.312 5.843-4.084 10.873-5.3 15.086-1.216 4.21-1.817 8.014-1.817 11.414 0 1.055.15 2.106.449 3.162.302 1.055.857 2.004 1.668 2.85.81.84 1.952 1.528 3.439 2.054 1.471.53 3.393.793 5.766.793 1.2 0 2.402-.268 3.588-.81a16.08 16.08 0 0 0 3.379-2.102 24.957 24.957 0 0 0 3.093-2.96 31.904 31.904 0 0 0 2.673-3.453c1.892-2.75 3.618-5.854 5.165-9.318-.197-.95-.376-2.463-.51-4.538-.136-2.07-.24-5.231-.301-9.476-.075-4.247-.152-7.732-.21-10.448a519.42 519.42 0 0 1-.15-7.44c-.045-2.243-.09-4.075-.152-5.503-.074-1.427-.149-2.107-.209-2.038zm70.062 59.695c-4.775 3.934-9.505 7.443-14.144 10.52a127.062 127.062 0 0 1-6.173 3.812 76.437 76.437 0 0 1-6.367 3.328 48.4 48.4 0 0 1-6.094 2.362c-1.952.606-3.77.91-5.406.91-.976 0-2.404-.215-4.296-.643-1.892-.434-3.962-1.306-6.2-2.632-2.252-1.323-4.49-3.239-6.742-5.742-2.237-2.508-4.174-5.835-5.842-9.982a100.616 100.616 0 0 1-7.957 7.35 61.432 61.432 0 0 1-8.724 6.06c-3.003 1.72-6.051 3.098-9.114 4.132-3.08 1.04-6.171 1.557-9.28 1.557-4.384 0-8.168-.91-11.381-2.732a24.331 24.331 0 0 1-7.975-7.274c-2.13-3.025-3.709-6.458-4.758-10.299a45.513 45.513 0 0 1-1.562-11.912c0-4.374.556-8.802 1.667-13.285a62.3 62.3 0 0 1 4.85-13.028 306.475 306.475 0 0 1 7.072-13.185c2.598-4.58 6.036-8.752 10.316-12.516 4.279-3.762 8.678-6.6 13.183-8.516 4.518-1.913 9.34-3.11 14.46-3.59.209-8.754 1.141-16.469 2.793-23.14 1.651-6.668 3.437-13.846 5.345-21.532 1.907-7.683 4.37-14.76 7.388-21.227 3.018-6.47 6.321-12.062 9.91-16.778 3.589-4.717 7.416-8.406 11.487-11.067 4.069-2.66 8.273-3.992 12.613-3.992 3.153 0 5.854.827 8.078 2.48 2.222 1.653 4.04 3.847 5.42 6.583 1.365 2.734 2.358 5.907 2.974 9.517.6 3.612.915 7.342.915 11.19 0 2.402-.03 4.872-.075 7.41-.196 9.674-1.683 18.678-4.474 27.013-2.793 8.334-5.556 16.573-8.274 24.716-2.732 8.144-6.036 16.201-9.88 24.171-5.886 12.197-9.64 20.478-11.246 24.837-.346.954-.691 2.114-1.051 3.478a84.878 84.878 0 0 0-.991 4.443 70.896 70.896 0 0 0-.796 4.908 38.845 38.845 0 0 0-.316 4.852c0 1.977.106 3.853.346 5.625.225 1.77.6 3.356 1.126 4.75.525 1.399 1.23 2.507 2.132 3.323.871.817 1.967 1.226 3.289 1.226 1.276 0 2.687-.256 4.189-.765 1.516-.509 3.123-1.204 4.805-2.09a61.408 61.408 0 0 0 5.105-3.004 127.418 127.418 0 0 0 4.999-3.416c3.708-2.718 7.584-5.811 11.621-9.275l3.035 21.07z" fill="#FFFFFF"/>
|
|
8
|
+
<path d="M625.775 161.267c0 1.738.104 3.423.346 5.057.24 1.633.66 3.093 1.274 4.378.602 1.287 1.413 2.33 2.42 3.131 1.02.796 2.297 1.197 3.843 1.197 2.508 0 4.76-1.084 6.787-3.256 2.027-2.17 3.784-4.782 5.27-7.835a55.388 55.388 0 0 0 3.59-9.465c.915-3.256 1.5-5.972 1.771-8.143l7.538-32.86c-2.763 0-5.45.688-8.078 2.054-2.628 1.371-5.107 3.223-7.433 5.563-2.327 2.338-4.461 5.01-6.412 8.014-1.967 3.008-3.889 6.717-5.766 11.124-1.891 4.41-3.213 8.284-3.994 11.623-.78 3.34-1.156 6.482-1.156 9.418zm86.714 7.92c-1.547 2.179-3.62 4.735-6.216 7.666-2.598 2.93-5.511 5.725-8.74 8.381a54.956 54.956 0 0 1-10.42 6.748c-3.709 1.84-7.418 2.758-11.111 2.758-4.475 0-8.214-1.416-11.202-4.253-2.988-2.835-5.57-6.951-7.75-12.357-1.634 1.868-3.632 3.77-6.005 5.702a54.523 54.523 0 0 1-7.792 5.255 50.806 50.806 0 0 1-8.814 3.85c-3.063 1.002-6.126 1.5-9.174 1.5-3.244 0-6.382-.664-9.445-1.99-3.08-1.325-5.781-3.226-8.138-5.708-2.373-2.484-4.25-5.508-5.661-9.077-1.427-3.57-2.132-7.598-2.132-12.086 0-5.033.72-10.204 2.132-15.51 1.426-5.304 3.634-11.042 6.62-17.224 2.973-6.178 6.188-11.515 9.596-16.015 3.439-4.496 7.178-8.427 11.247-11.783 4.07-3.358 8.349-6.027 12.868-8.009 4.505-1.98 9.083-2.971 13.77-2.971 1.56 0 2.776.308 3.663.917a9.43 9.43 0 0 1 2.192 2.095c.57.784 1.126 1.552 1.667 2.3a4.674 4.674 0 0 0 2.04 1.634 9.3 9.3 0 0 0 2.495.664c.839.1 1.711.153 2.582.153.751 0 1.517-.017 2.298-.053.78-.033 1.531-.048 2.282-.048 1.021 0 1.965.1 2.853.303.87.206 1.652.646 2.327 1.33.676.684 1.201 1.633 1.577 2.858.36 1.225.555 2.895.555 5.006 0 3.223-.345 6.796-1.02 10.723a296.911 296.911 0 0 1-2.313 12.07c-.872 4.12-1.862 8.813-2.973 14.09-1.111 5.271-1.668 9.715-1.668 13.33 0 3.089.287 5.503.857 7.24.586 1.744 1.8 2.613 3.694 2.613 1.411 0 2.898-.351 4.443-1.05a27.945 27.945 0 0 0 4.701-2.755 53.642 53.642 0 0 0 4.76-3.86 70.739 70.739 0 0 0 4.49-4.461c3.302-3.605 6.637-7.682 10.015-12.223l4.85 22.247z" fill="#FFFFFF"/>
|
|
9
|
+
<path d="M765.867 172.704c-2.43 2.224-5.449 4.598-9.053 7.13a96.388 96.388 0 0 1-11.667 6.97 88.86 88.86 0 0 1-12.793 5.307c-4.34 1.416-8.47 2.123-12.372 2.123-3.514 0-6.457-.49-8.86-1.464-2.387-.977-4.324-2.34-5.81-4.094-1.472-1.751-2.538-3.895-3.169-6.418-.645-2.53-.976-5.308-.976-8.341 0-4.245.48-9.198 1.427-14.86 1.937-11.708 3.183-18.282 3.739-19.73.916-2.878 12.763-65.43 15.51-75.305 2.568-8.05 4.145-13.285 4.745-15.715.33-1.702 1.247-3.235 2.778-4.602a18.457 18.457 0 0 1 4.715-3.012 25.63 25.63 0 0 1 5.466-1.739c1.877-.375 3.588-.561 5.12-.561 2.778 0 4.655.52 5.66 1.569.992 1.044 1.487 2.441 1.487 4.192 0 1.484-.345 3.578-1.05 6.284-.691 2.709-1.472 5.793-2.358 9.254-.888 3.466-2.192 7.918-3.936 13.36-1.74 5.44-12.926 66.26-13.557 70.097a136.637 136.637 0 0 1-2.403 11.446c-.976 3.789-1.456 7.233-1.456 10.33 0 3.032.33 5.438 1.006 7.225.674 1.784 2.057 2.677 4.144 2.677 2.433 0 5.12-.84 8.094-2.527 2.958-1.682 5.96-3.724 8.994-6.117a202.022 202.022 0 0 0 8.889-7.428 276.486 276.486 0 0 1 7.686-6.57v20.519z" fill="#FFFFFF"/>
|
|
10
|
+
<path d="M809.167 146.295c-.272 2.171-.86 4.881-1.772 8.136a56.238 56.238 0 0 1-3.591 9.457c-1.482 3.053-3.238 5.66-5.26 7.827-2.027 2.17-4.284 3.258-6.781 3.258-1.548 0-2.834-.404-3.843-1.199-1.013-.799-1.821-1.837-2.426-3.126-.61-1.285-1.03-2.744-1.269-4.37a35.652 35.652 0 0 1-.354-5.055c0-2.941.387-6.08 1.162-9.416.775-3.337 2.105-7.205 3.99-11.616 1.884-4.404 3.803-8.107 5.76-11.114 1.953-3.003 4.09-5.672 6.41-8.008 2.327-2.335 4.803-4.189 7.426-5.56 2.628-1.368 5.318-2.052 8.081-2.052l-7.533 32.838zm64.903 14.042c.123-3.51-1.295-7.014-4.783-8.534-4.276-1.866-7.707.432-10.245 3.616a59.476 59.476 0 0 1-5.231 5.75c-4.102 3.955-10.434 10.064-16.514 10.064-1.886 0-3.114-.87-3.686-2.608-.574-1.738-.862-4.152-.862-7.237 0-3.609.561-8.053 1.668-13.322l2.974-14.079c.865-4.12 1.64-8.14 2.311-12.061.672-3.921 1.014-7.493 1.014-10.714 0-2.109-.185-3.777-.56-5-.371-1.228-.89-2.176-1.566-2.86-.679-.68-1.454-1.124-2.335-1.33a12.727 12.727 0 0 0-2.847-.305c-.745 0-1.508.02-2.285.054-.78.033-1.541.05-2.287.05-.877 0-1.747-.05-2.59-.153a9.082 9.082 0 0 1-2.488-.663c-.816-.338-1.492-.882-2.032-1.632a372 372 0 0 0-1.68-2.298c-.572-.783-1.302-1.479-2.184-2.093-.876-.613-2.1-.918-3.657-.918-4.676 0-9.265.988-13.766 2.97-4.506 1.981-8.79 4.646-12.857 8-4.066 3.356-7.806 7.282-11.228 11.776-3.42 4.498-6.625 9.832-9.602 16.007-2.978 6.175-5.182 11.913-6.603 17.21-1.426 5.302-2.135 10.467-2.135 15.5 0 4.486.709 8.51 2.122 12.074 1.413 3.567 3.296 6.59 5.656 9.07 2.356 2.48 5.066 4.383 8.131 5.706 3.065 1.326 6.212 1.99 9.446 1.99 3.051 0 6.108-.5 9.161-1.5a50.753 50.753 0 0 0 8.811-3.847c2.812-1.57 5.412-3.316 7.789-5.253 2.372-1.931 4.378-3.83 6.006-5.696 2.17 5.4 4.749 9.52 7.74 12.349 2.982 2.834 6.713 4.247 11.188 4.247 3.703 0 7.406-.919 11.113-2.756a54.844 54.844 0 0 0 10.401-6.739c3.233-2.657 6.146-5.45 8.74-8.378 3.387-3.827 7.18-7.736 8.993-12.613a12.37 12.37 0 0 0 .759-3.844zM751.618 85.583c.527-.25 1.428-.338 2.689-.267 1.261.075 2.718.096 4.37.069 1.651-.03 3.436-.063 5.358-.107 1.909-.04 3.77-.072 5.573-.097 1.801-.021 3.483-.036 5.045-.05 1.561-.009 2.851-.004 3.874.01 1.2.014 2.102.723 2.717 2.125.601 1.403.961 3.196 1.082 5.377.118 2.524-.376 4.613-1.502 6.259-1.111 1.65-2.387 2.507-3.829 2.58l-34.535 1.732-29.956-1.75c-1.832-.21-3.243-.421-4.25-.636a121.865 121.865 0 0 0-3.2-.629 78.107 78.107 0 0 0-4.292-.634c-1.742-.214-4.25-.467-7.523-.753-1.456-.154-2.597-.53-3.408-1.131-.811-.6-1.427-1.323-1.832-2.171a8.271 8.271 0 0 1-.766-2.678 36.448 36.448 0 0 1-.21-2.422c-.06-1.066.495-1.91 1.637-2.528 1.14-.622 2.627-1.116 4.443-1.49 1.832-.372 3.83-.63 6.037-.777 2.191-.143 4.295-.229 6.32-.265 2.014-.033 3.83-.073 5.422-.121 1.592-.044 2.688-.149 3.289-.316l37.447.67z" fill="#FFFFFF"/>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|