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AAK,MACpBA,GAAK,MAAUA,GAAK,MACf,OAANA,GACCA,GAAK,MAAUA,GAAK,MACf,OAANA,GACCA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACf,OAANA,GACCA,GAAK,MAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,KAC7B,CEvvCA,SAASouF,GAAcC,GACnBA,EAAI9zG,SAAQ,SAAUqxF,GAElB,UADOA,EAAG7uF,SACNikG,EAAgBpV,IAAOqV,EAAgBrV,GACvC,IAAK,IAAIx3D,KAAKw3D,EAAGh+D,eACNg+D,EAAGh+D,QAAQwG,GAAGr3B,SACrBqxG,GAAcxiB,EAAGh+D,QAAQwG,GAAG96B,YAG3Bs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,OAAO8E,OA2DkB,mBAApByiL,iBAAiCA","sources":["webpack://unattended-showing/./application/template.hbs","webpack://unattended-showing/./context/appointment-sgt3/template.hbs","webpack://unattended-showing/./components/appointment-list/index.hbs","webpack://unattended-showing/./components/appointment-list/index.js","webpack://unattended-showing/./context/appointment/template.hbs","webpack://unattended-showing/./context/available-units-list-sgt3/template.hbs","webpack://unattended-showing/./context/available-units-list/template.hbs","webpack://unattended-showing/./context/change-password-sgt3/template.hbs","webpack://unattended-showing/./context/change-password/template.hbs","webpack://unattended-showing/./context/faq-sgt3/template.hbs","webpack://unattended-showing/./context/faq/template.hbs","webpack://unattended-showing/./context/forgot-password-sgt3/template.hbs","webpack://unattended-showing/./context/forgot-password/template.hbs","webpack://unattended-showing/./components/phone-verification/index.hbs","webpack://unattended-showing/./components/phone-verification/index.ts","webpack://unattended-showing/./context/guest-phone-verification/template.hbs","webpack://unattended-showing/./context/guest-sign-up/template.hbs","webpack://unattended-showing/./components/book-tour/index.hbs","webpack://unattended-showing/./components/book-tour/index.ts","webpack://unattended-showing/./context/location-sgt3/template.hbs","webpack://unattended-showing/./components/modals/terms-and-conditions/index.hbs","webpack://unattended-showing/./components/modals/terms-and-conditions/index.js","webpack://unattended-showing/./components/appointment-schedule/index.hbs","webpack://unattended-showing/./components/appointment-schedule/index.js","webpack://unattended-showing/./context/location/template.hbs","webpack://unattended-showing/./context/login-sgt3/template.hbs","webpack://unattended-showing/./context/login/template.hbs","webpack://unattended-showing/./context/logout/template.hbs","webpack://unattended-showing/./context/not-found/template.hbs","webpack://unattended-showing/./context/profile-sgt3/template.hbs","webpack://unattended-showing/./context/profile/template.hbs","webpack://unattended-showing/./context/sign-up-sgt3/credit-card-verification/template.hbs","webpack://unattended-showing/./context/sign-up-sgt3/index/template.hbs","webpack://unattended-showing/./context/sign-up-sgt3/template.hbs","webpack://unattended-showing/./context/sign-up/index/template.hbs","webpack://unattended-showing/./context/sign-up/template.hbs","webpack://unattended-showing/./context/sign-up/verification/template.hbs","webpack://unattended-showing/./components/header-link.hbs","webpack://unattended-showing/./components/header-link.js","webpack://unattended-showing/./components/app-header/index.hbs","webpack://unattended-showing/./components/app-header/index.js","webpack://unattended-showing/./context/template.hbs","webpack://unattended-showing/./index/template.hbs","webpack://unattended-showing/./loading/template.hbs","webpack://unattended-showing/./not-found/template.hbs","webpack://unattended-showing/./adapters/application.js","webpack://unattended-showing/../rewritten-packages/ember-load-initializers.dd92ac3a/node_modules/ember-load-initializers/index.js","webpack://unattended-showing/./app.js","webpack://unattended-showing/./application/route.js","webpack://unattended-showing/./assets/unattended-showing.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/authenticators/base.js","webpack://unattended-showing/./authenticators/credentials.js","webpack://unattended-showing/./classes/base-route.js","webpack://unattended-showing/./classes/protected-route.js","webpack://unattended-showing/./components/app-footer/index.hbs","webpack://unattended-showing/./components/app-footer/index.js","webpack://unattended-showing/./components/input-form-row/index.hbs","webpack://unattended-showing/./components/input-form-row/index.js","webpack://unattended-showing/./components/input-form.hbs","webpack://unattended-showing/./components/input-form.js","webpack://unattended-showing/./config/environment.js","webpack://unattended-showing/./context/appointment-sgt3/controller.ts","webpack://unattended-showing/./context/appointment-sgt3/route.ts","webpack://unattended-showing/./context/appointment/controller.js","webpack://unattended-showing/./context/appointment/route.js","webpack://unattended-showing/./context/available-units-list-sgt3/route.ts","webpack://unattended-showing/./context/available-units-list/controller.js","webpack://unattended-showing/./context/available-units-list/route.js","webpack://unattended-showing/./context/change-password-sgt3/route.ts","webpack://unattended-showing/./context/change-password/controller.js","webpack://unattended-showing/./context/change-password/route.js","webpack://unattended-showing/./context/controller.js","webpack://unattended-showing/./context/faq-sgt3/route.ts","webpack://unattended-showing/./context/faq/controller.js","webpack://unattended-showing/./context/forgot-password-sgt3/route.ts","webpack://unattended-showing/./context/forgot-password/controller.js","webpack://unattended-showing/./context/forgot-password/route.js","webpack://unattended-showing/./context/guest-phone-verification/controller.ts","webpack://unattended-showing/./context/guest-phone-verification/route.ts","webpack://unattended-showing/./context/guest-sign-up/controller.ts","webpack://unattended-showing/./context/guest-sign-up/route.ts","webpack://unattended-showing/./context/location-sgt3/controller.ts","webpack://unattended-showing/./context/location-sgt3/route.ts","webpack://unattended-showing/./context/location/controller.js","webpack://unattended-showing/./context/location/route.js","webpack://unattended-showing/./context/login-sgt3/controller.ts","webpack://unattended-showing/./context/login-sgt3/route.ts","webpack://unattended-showing/./context/login/controller.js","webpack://unattended-showing/./context/login/route.js","webpack://unattended-showing/./context/logout/route.js","webpack://unattended-showing/./context/profile-sgt3/route.ts","webpack://unattended-showing/./context/profile/controller.js","webpack://unattended-showing/./context/profile/route.js","webpack://unattended-showing/./context/redirect/route.js","webpack://unattended-showing/./context/route.js","webpack://unattended-showing/./context/sign-up-sgt3/credit-card-verification/route.ts","webpack://unattended-showing/./context/sign-up-sgt3/index/route.ts","webpack://unattended-showing/./context/sign-up/index/controller.js","webpack://unattended-showing/./context/sign-up/index/route.js","webpack://unattended-showing/./context/sign-up/verification/controller.js","webpack://unattended-showing/./context/sign-up/verification/route.js","webpack://unattended-showing/./helpers/file-utils.js","webpack://unattended-showing/./index/controller.js","webpack://unattended-showing/./index/route.js","webpack://unattended-showing/./instance-initializers/env-settings.js","webpack://unattended-showing/./models/appointment.ts","webpack://unattended-showing/./models/available-units-list.js","webpack://unattended-showing/./models/base-location.ts","webpack://unattended-showing/./models/context.js","webpack://unattended-showing/./models/country.js","webpack://unattended-showing/./models/credit-card-verification.js","webpack://unattended-showing/./models/external-identifier.js","webpack://unattended-showing/./models/guest-appointment.ts","webpack://unattended-showing/./models/guest-sign-up.ts","webpack://unattended-showing/./models/location.ts","webpack://unattended-showing/./models/profile-password.js","webpack://unattended-showing/./models/profile.ts","webpack://unattended-showing/./models/sanitized-appointment.ts","webpack://unattended-showing/./models/sign-up.js","webpack://unattended-showing/./resolver.js","webpack://unattended-showing/../rewritten-packages/@ember/test-waiters.d540532b/node_modules/@ember/test-waiters/waiter-manager.js","webpack://unattended-showing/../rewritten-packages/@ember/test-waiters.d540532b/node_modules/@ember/test-waiters/build-waiter.js","webpack://unattended-showing/../src/index.ts","webpack://unattended-showing/../rewritten-packages/@ember/test-waiters.d540532b/node_modules/@ember/test-waiters/wait-for-promise.js","webpack://unattended-showing/../rewritten-packages/@ember/test-waiters.d540532b/node_modules/@ember/test-waiters/wait-for.js","webpack://unattended-showing/./router.js","webpack://unattended-showing/./serializers/application.js","webpack://unattended-showing/./serializers/sign-up.js","webpack://unattended-showing/./services/ajax.js","webpack://unattended-showing/./services/check-in.js","webpack://unattended-showing/./services/error-reporting.js","webpack://unattended-showing/./services/intl.js","webpack://unattended-showing/./services/login-pending-booking.ts","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/subMinutes/index.js","webpack://unattended-showing/./services/mock-time.ts","webpack://unattended-showing/./services/sgt-session.ts","webpack://unattended-showing/./session-stores/application.js","webpack://unattended-showing/./transforms/hours-of-operation.js","webpack://unattended-showing/./utils/datetime-utils.js","webpack://unattended-showing/./utils/validators.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-private/utils/parse-response-headers.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-private/utils/determine-body-promise.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-private/utils/continue-on-reject.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-private/utils/serialize-query-params.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-private/utils/fetch.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-private/build-url-mixin.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-private/utils/serialize-into-hash.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/error.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/index.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/json-api.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/rest.js","webpack://unattended-showing/../rewritten-packages/@ember-data/debug.d79ffbc1/node_modules/@ember-data/debug/index.js","webpack://unattended-showing/../rewritten-packages/@ember-data/debug.d79ffbc1/node_modules/@ember-data/debug/setup.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/util.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/attr.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/errors.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/legacy-data-utils.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/legacy-data-fetch.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/diff-array.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/many-array.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/promise-belongs-to.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/promise-many-array.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/references/belongs-to.js","webpack://unattended-showing/../rewritten-packages/ember-cached-decorator-polyfill.9e7651c3/node_modules/ember-cached-decorator-polyfill/index.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/references/has-many.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/legacy-relationships-support.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/record-state.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/notify-changes.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/model.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/relationship-meta.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/belongs-to.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/has-many.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-private/model-for-mixin.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/coerce-id.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/-utils.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/relationships/state/belongs-to.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/-state.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/relationships/state/has-many.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/relationships/state/implicit.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/-edge-definition.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/operations/replace-related-records.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/operations/add-to-related-records.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/operations/remove-from-related-records.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/normalize-link.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/index.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/operations/update-relationship.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/graph/operations/replace-related-record.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-private/record-data.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-private/embedded-records-mixin.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-private/utils.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-private/transforms/transform.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-private/transforms/boolean.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-private/transforms/date.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-private/transforms/number.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-private/transforms/string.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/index.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/json-api.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/json.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/rest.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/transform.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/backburner.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/coerce-id.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/common.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/errors-utils.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/request-cache.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/serializer-response.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/snapshot.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/identifer-debug-consts.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/weak-cache.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/fetch-manager.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/finders.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/normalize-model-name.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/utils/is-non-empty-string.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/identifier-cache.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/model/internal-model.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/internal-model-map.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/identity-map.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/utils/construct-resource.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/internal-model-factory.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/record-notification-manager.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/model/record-reference.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/record-data-for.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/record-data-store-wrapper.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/instance-cache.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/model/shim-model-class.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/promise-proxy-base.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/promise-proxies.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/snapshot-record-array.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/record-arrays/record-array.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/record-arrays/adapter-populated-record-array.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/record-array-manager.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/schema-definition-service.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/core-store.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-private/utils/promise-record.js","webpack://unattended-showing/../rewritten-packages/@ember/render-modifiers.436a303b/node_modules/@ember/render-modifiers/modifiers/did-insert.js","webpack://unattended-showing/../rewritten-packages/@ember/render-modifiers.436a303b/node_modules/@ember/render-modifiers/modifiers/did-update.js","webpack://unattended-showing/../rewritten-packages/@ember/render-modifiers.436a303b/node_modules/@ember/render-modifiers/modifiers/will-destroy.js","webpack://unattended-showing/../rewritten-packages/@ember/string.4a242b9a/node_modules/@ember/string/cache.js","webpack://unattended-showing/../rewritten-packages/@ember/string.4a242b9a/node_modules/@ember/string/index.js","webpack://unattended-showing/../rewritten-packages/@embroider/util.9c5279df/node_modules/@embroider/util/services/ensure-registered.js","webpack://unattended-showing/../rewritten-packages/@glimmer/component.b3400e67/node_modules/@glimmer/component/-private/component.js","webpack://unattended-showing/../rewritten-packages/@glimmer/component.b3400e67/node_modules/@glimmer/component/-private/destroyables.js","webpack://unattended-showing/../rewritten-packages/@glimmer/component.b3400e67/node_modules/@glimmer/component/-private/ember-component-manager.js","webpack://unattended-showing/../rewritten-packages/@glimmer/component.b3400e67/node_modules/@glimmer/component/-private/base-component-manager.js","webpack://unattended-showing/../rewritten-packages/@glimmer/component.b3400e67/node_modules/@glimmer/component/index.js","webpack://unattended-showing/../rewritten-packages/@glimmer/tracking.0f52e106/node_modules/@glimmer/tracking/index.js","webpack://unattended-showing/../rewritten-packages/@sentry/ember.1bea4619/node_modules/@sentry/ember/instance-initializers/sentry-performance.js","webpack://unattended-showing/../../src/dsn.ts","webpack://unattended-showing/../../src/envelope.ts","webpack://unattended-showing/../../src/error.ts","webpack://unattended-showing/../../src/api.ts","webpack://unattended-showing/../../src/baseclient.ts","webpack://unattended-showing/../../../src/metrics/envelope.ts","webpack://unattended-showing/../../../src/metrics/utils.ts","webpack://unattended-showing/../../../src/client.ts","webpack://unattended-showing/../../src/env.ts","webpack://unattended-showing/../../../src/userfeedback.ts","webpack://unattended-showing/../../src/clientreport.ts","webpack://unattended-showing/../../../src/stack-parsers.ts","webpack://unattended-showing/../../src/ratelimit.ts","webpack://unattended-showing/../../../src/transports/base.ts","webpack://unattended-showing/../../src/promisebuffer.ts","webpack://unattended-showing/../../../../src/transports/utils.ts","webpack://unattended-showing/../../../../src/transports/fetch.ts","webpack://unattended-showing/../../../../src/transports/xhr.ts","webpack://unattended-showing/../../../src/sdk.ts","webpack://unattended-showing/../rewritten-packages/@sentry/ember.1bea4619/node_modules/@sentry/ember/index.js","webpack://unattended-showing/../../src/sdk.ts","webpack://unattended-showing/../rewritten-packages/ember-cli-app-version.924df200/node_modules/ember-cli-app-version/initializer-factory.js","webpack://unattended-showing/../rewritten-packages/ember-cli-app-version.924df200/node_modules/ember-cli-app-version/_app_/initializers/app-version.js","webpack://unattended-showing/../rewritten-packages/ember-modifier.9c93520b/node_modules/ember-modifier/-private/compat.js","webpack://unattended-showing/../rewritten-packages/ember-modifier.9c93520b/node_modules/ember-modifier/-private/class/modifier-manager.js","webpack://unattended-showing/../rewritten-packages/ember-modifier.9c93520b/node_modules/ember-modifier/-private/class/modifier.js","webpack://unattended-showing/../rewritten-packages/ember-modifier.9c93520b/node_modules/ember-modifier/-private/function-based/modifier-manager.js","webpack://unattended-showing/../rewritten-packages/ember-modifier.9c93520b/node_modules/ember-modifier/-private/function-based/modifier.js","webpack://unattended-showing/../rewritten-packages/ember-click-outside.ccf54f40/node_modules/ember-click-outside/-private/matches-selector.js","webpack://unattended-showing/../rewritten-packages/ember-click-outside.ccf54f40/node_modules/ember-click-outside/utils.js","webpack://unattended-showing/../rewritten-packages/ember-click-outside.ccf54f40/node_modules/ember-click-outside/modifier.js","webpack://unattended-showing/../rewritten-packages/ember-cookies.7b6a648f/node_modules/ember-cookies/utils/serialize-cookie.js","webpack://unattended-showing/../rewritten-packages/ember-cookies.7b6a648f/node_modules/ember-cookies/services/cookies.js","webpack://unattended-showing/../rewritten-packages/ember-cookies.7b6a648f/node_modules/ember-cookies/_app_/services/cookies.js","webpack://unattended-showing/../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/_app_/initializers/ember-data.js","webpack://unattended-showing/../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/_app_/instance-initializers/ember-data.js","webpack://unattended-showing/../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/version.js","webpack://unattended-showing/../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/-private/core.js","webpack://unattended-showing/../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/index.js","webpack://unattended-showing/../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/setup-container.js","webpack://unattended-showing/../src/index.js","webpack://unattended-showing/../index.js","webpack://unattended-showing/../rewritten-packages/ember-focus-trap.310c6602/node_modules/ember-focus-trap/modifiers/focus-trap.js","webpack://unattended-showing/../rewritten-packages/ember-get-config.867fe42e/node_modules/ember-get-config/index.js","webpack://unattended-showing/../rewritten-packages/ember-inflector.4956360c/node_modules/ember-inflector/lib/system/inflections.js","webpack://unattended-showing/../rewritten-packages/ember-inflector.4956360c/node_modules/ember-inflector/lib/system/inflector.js","webpack://unattended-showing/../rewritten-packages/ember-inflector.4956360c/node_modules/ember-inflector/lib/system/string.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/helpers/format-date.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/helpers/t.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/utils/missing-message.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-messageformat-parser@2.7.8/node_modules/@formatjs/icu-messageformat-parser/lib/error.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-messageformat-parser@2.7.8/node_modules/@formatjs/icu-messageformat-parser/lib/types.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-messageformat-parser@2.7.8/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-skeleton-parser@1.8.2/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-skeleton-parser@1.8.2/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-skeleton-parser@1.8.2/node_modules/@formatjs/icu-skeleton-parser/lib/number.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-messageformat-parser@2.7.8/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-messageformat-parser@2.7.8/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-messageformat-parser@2.7.8/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+icu-messageformat-parser@2.7.8/node_modules/@formatjs/icu-messageformat-parser/lib/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+fast-memoize@2.2.0/node_modules/@formatjs/fast-memoize/lib/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/intl-messageformat@10.5.14/node_modules/intl-messageformat/lib/src/error.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/intl-messageformat@10.5.14/node_modules/intl-messageformat/lib/src/formatters.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/intl-messageformat@10.5.14/node_modules/intl-messageformat/lib/src/core.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/utils.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/number.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/relativeTime.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/dateTime.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/plural.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/message.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+ecma402-abstract@2.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/list.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/displayName.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/create-intl.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/formatters/-base.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/formatters/format-date.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/formatters/format-list.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/formatters/format-message.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/formatters/format-number.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/formatters/format-relative.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/formatters/format-time.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/utils/empty-object.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/utils/flatten.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/translations.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/utils/normalize-locale.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/services/intl.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/utils/is-array-equal.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/utils/hydrate.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-private/utils/get-dom.js","webpack://unattended-showing/../rewritten-packages/ember-metrics.267359ad/node_modules/ember-metrics/-private/utils/object-transforms.js","webpack://unattended-showing/../rewritten-packages/ember-metrics.267359ad/node_modules/ember-metrics/metrics-adapters/google-analytics.js","webpack://unattended-showing/../rewritten-packages/ember-metrics.267359ad/node_modules/ember-metrics/-private/utils/remove-from-dom.js","webpack://unattended-showing/../rewritten-packages/ember-metrics.267359ad/node_modules/ember-metrics/services/metrics.js","webpack://unattended-showing/../rewritten-packages/ember-metrics.267359ad/node_modules/ember-metrics/metrics-adapters/base.js","webpack://unattended-showing/../rewritten-packages/ember-noop.ed8e325e/node_modules/ember-noop/helpers/noop.js","webpack://unattended-showing/../rewritten-packages/ember-promise-helpers.93906283/node_modules/ember-promise-helpers/helpers/is-fulfilled.js","webpack://unattended-showing/../rewritten-packages/ember-promise-helpers.93906283/node_modules/ember-promise-helpers/helpers/is-pending.js","webpack://unattended-showing/../rewritten-packages/ember-promise-helpers.93906283/node_modules/ember-promise-helpers/helpers/await.js","webpack://unattended-showing/../rewritten-packages/ember-resolver.ee2dc081/node_modules/ember-resolver/resolvers/classic/container-debug-adapter.js","webpack://unattended-showing/../rewritten-packages/ember-resolver.ee2dc081/node_modules/ember-resolver/_app_/initializers/container-debug-adapter.js","webpack://unattended-showing/../rewritten-packages/ember-resolver.ee2dc081/node_modules/ember-resolver/resolvers/classic/index.js","webpack://unattended-showing/../rewritten-packages/ember-resolver.ee2dc081/node_modules/ember-resolver/utils/class-factory.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/_app_/breakpoints.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/helpers/media.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/initializers/responsive.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/_app_/initializers/ember-responsive-breakpoints.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/null-match-media.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/_app_/services/media.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/services/media.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/utils/assign.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/internal-session.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/session-stores/ephemeral.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/session-stores/adaptive.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/session-stores/local-storage.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/_app_/initializers/ember-simple-auth.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/initializers/setup-session.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/initializers/setup-session-restoration.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/_app_/instance-initializers/ember-simple-auth.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/_app_/services/session.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/use-session-setup-method.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/configuration.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/services/session.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/-internals/routing.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/utils/location.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/session-stores/base.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/session-stores/cookie.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/utils/is-fastboot.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/utils/objects-are-equal.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@embroider+macros@1.16.5_@glint+template@1.4.0/node_modules/@embroider/macros/src/addon/es-compat2.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@formatjs+intl@2.10.4_typescript@5.3.3/node_modules/@formatjs/intl/lib/src/error.js","webpack://unattended-showing/../../../src/debug-build.ts","webpack://unattended-showing/../../../src/eventbuilder.ts","webpack://unattended-showing/../../../src/helpers.ts","webpack://unattended-showing/../../src/eventbuilder.ts","webpack://unattended-showing/../../../src/integrations/linkederrors.ts","webpack://unattended-showing/../../../src/utils/hasTracingEnabled.ts","webpack://unattended-showing/../../../src/tracing/trace.ts","webpack://unattended-showing/../../../src/tracing/span.ts","webpack://unattended-showing/../../src/semanticAttributes.ts","webpack://unattended-showing/../../../src/tracing/transaction.ts","webpack://unattended-showing/../../../src/tracing/idletransaction.ts","webpack://unattended-showing/../../../src/tracing/utils.ts","webpack://unattended-showing/../../../src/tracing/errors.ts","webpack://unattended-showing/../../../src/tracing/sampling.ts","webpack://unattended-showing/../../../src/tracing/hubextensions.ts","webpack://unattended-showing/../../../src/common/debug-build.ts","webpack://unattended-showing/../../../src/browser/types.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/bindReporter.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/getNavigationEntry.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/getActivationStart.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/initMetric.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/generateUniqueID.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/observe.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/onHidden.ts","webpack://unattended-showing/../../../../src/browser/web-vitals/getCLS.ts","webpack://unattended-showing/../../../../../src/browser/web-vitals/lib/getVisibilityWatcher.ts","webpack://unattended-showing/../../../../src/browser/web-vitals/getFID.ts","webpack://unattended-showing/../../../../src/browser/web-vitals/getLCP.ts","webpack://unattended-showing/../../../src/browser/instrument.ts","webpack://unattended-showing/../../../../src/browser/metrics/utils.ts","webpack://unattended-showing/../../../../src/browser/metrics/index.ts","webpack://unattended-showing/../../../src/browser/request.ts","webpack://unattended-showing/../../../src/common/fetch.ts","webpack://unattended-showing/../../../src/browser/browsertracing.ts","webpack://unattended-showing/../../../src/browser/router.ts","webpack://unattended-showing/../../../src/browser/backgroundtab.ts","webpack://unattended-showing/../../../src/index.ts","webpack://unattended-showing/../../../src/instrument/dom.ts","webpack://unattended-showing/../../src/url.ts","webpack://unattended-showing/../../../../src/integrations/breadcrumbs.ts","webpack://unattended-showing/../../../../src/integrations/dedupe.ts","webpack://unattended-showing/../../../../src/integrations/globalhandlers.ts","webpack://unattended-showing/../../../../src/integrations/httpcontext.ts","webpack://unattended-showing/../../../../src/integrations/linkederrors.ts","webpack://unattended-showing/../../../../src/integrations/trycatch.ts","webpack://unattended-showing/../../src/constants.ts","webpack://unattended-showing/../../src/debug-build.ts","webpack://unattended-showing/../../src/eventProcessors.ts","webpack://unattended-showing/../../src/exports.ts","webpack://unattended-showing/../../src/hub.ts","webpack://unattended-showing/../../src/integration.ts","webpack://unattended-showing/../../../src/integrations/functiontostring.ts","webpack://unattended-showing/../../../src/integrations/inboundfilters.ts","webpack://unattended-showing/../../src/scope.ts","webpack://unattended-showing/../../src/session.ts","webpack://unattended-showing/../../../src/tracing/dynamicSamplingContext.ts","webpack://unattended-showing/../../../src/utils/applyScopeDataToEvent.ts","webpack://unattended-showing/../../../src/utils/prepareEvent.ts","webpack://unattended-showing/../../../src/utils/spanUtils.ts","webpack://unattended-showing/../../src/version.ts","webpack://unattended-showing/../../../src/captureconsole.ts","webpack://unattended-showing/../../src/aggregate-errors.ts","webpack://unattended-showing/../../src/baggage.ts","webpack://unattended-showing/../../src/browser.ts","webpack://unattended-showing/../../../src/instrument/_handlers.ts","webpack://unattended-showing/../../../src/instrument/console.ts","webpack://unattended-showing/../../../src/instrument/fetch.ts","webpack://unattended-showing/../../../src/instrument/globalError.ts","webpack://unattended-showing/../../../src/instrument/globalUnhandledRejection.ts","webpack://unattended-showing/../../../src/vendor/supportsHistory.ts","webpack://unattended-showing/../../../src/instrument/history.ts","webpack://unattended-showing/../../../src/instrument/xhr.ts","webpack://unattended-showing/../../src/is.ts","webpack://unattended-showing/../../src/logger.ts","webpack://unattended-showing/../../src/misc.ts","webpack://unattended-showing/../../src/normalize.ts","webpack://unattended-showing/../../src/memo.ts","webpack://unattended-showing/../../src/object.ts","webpack://unattended-showing/../../src/severity.ts","webpack://unattended-showing/../../src/stacktrace.ts","webpack://unattended-showing/../../src/string.ts","webpack://unattended-showing/../../src/supports.ts","webpack://unattended-showing/../../src/syncpromise.ts","webpack://unattended-showing/../../src/time.ts","webpack://unattended-showing/../../src/tracing.ts","webpack://unattended-showing/../../src/worldwide.ts","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/_lib/assign/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/_lib/cloneObject/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/_lib/toInteger/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultOptions/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/addDays/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/addMilliseconds/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/addMinutes/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/formatters/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeek/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/longFormatters/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/protectedTokens/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultLocale/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/format/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/subMilliseconds/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isAfter/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isBefore/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isEqual/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isDate/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isValid/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isWithinInterval/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/setDay/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/setHours/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/setMonth/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/getDaysInMonth/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/startOfDay/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/startOfHour/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/toDate/index.js","webpack://unattended-showing/../../src/-private/ember-environment.js","webpack://unattended-showing/../../../src/-private/external/environment.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/policies/bounded-policy.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/policies/drop-policy.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/policies/enqueued-policy.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/policies/execution-states.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/policies/keep-latest-policy.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/policies/restartable-policy.js","webpack://unattended-showing/../../../../src/-private/external/scheduler/refresh.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/state-tracker/state.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/state-tracker/state-tracker.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/state-tracker/null-state-tracker.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/state-tracker/null-state.js","webpack://unattended-showing/../../../../src/-private/external/scheduler/scheduler.js","webpack://unattended-showing/../../../../../src/-private/external/scheduler/policies/unbounded-policy.js","webpack://unattended-showing/../../../src/-private/external/task-factory.js","webpack://unattended-showing/../../../../src/-private/external/task-instance/cancelation.js","webpack://unattended-showing/../../../../src/-private/external/task-instance/completion-states.js","webpack://unattended-showing/../../../src/-private/external/generator-state.js","webpack://unattended-showing/../../../../src/-private/external/task-instance/executor.js","webpack://unattended-showing/../../../../src/-private/external/task-instance/initial-state.js","webpack://unattended-showing/../../../../src/-private/external/task/default-state.js","webpack://unattended-showing/../../../../src/-private/external/task/task-group.js","webpack://unattended-showing/../../../../src/-private/external/task/task.js","webpack://unattended-showing/../../../../src/-private/external/task/taskable.js","webpack://unattended-showing/../../../src/-private/external/yieldables.js","webpack://unattended-showing/../../../src/-private/scheduler/ember-scheduler.js","webpack://unattended-showing/../../src/-private/task-factory.js","webpack://unattended-showing/../../src/-private/task-group.js","webpack://unattended-showing/../../../../src/-private/external/task-instance/base.js","webpack://unattended-showing/../../src/-private/task-instance.js","webpack://unattended-showing/../../src/-private/task-properties.js","webpack://unattended-showing/../../src/-private/task.js","webpack://unattended-showing/../../src/-private/taskable-mixin.js","webpack://unattended-showing/../../src/-private/tracked-state.js","webpack://unattended-showing/../../src/-private/async-arrow-runtime.js","webpack://unattended-showing/../../src/-private/utils.js","webpack://unattended-showing/../../../src/-private/external/task-decorators.js","webpack://unattended-showing/../../src/-private/task-decorators.js","webpack://unattended-showing/../../src/-private/cancelable-promise-helpers.js","webpack://unattended-showing/../src/-private/class-based/modifier-manager.ts","webpack://unattended-showing/../src/-private/class-based/modifier.ts","webpack://unattended-showing/../src/-private/function-based/modifier.ts","webpack://unattended-showing/../src/-private/function-based/modifier-manager.ts","webpack://unattended-showing/../../src/helpers/and.ts","webpack://unattended-showing/../../src/helpers/not.ts","webpack://unattended-showing/../../src/helpers/or.ts","webpack://unattended-showing/../../src/helpers/eq.ts","webpack://unattended-showing/../../src/helpers/not-eq.ts","webpack://unattended-showing/../../src/utils/truth-convert.ts","webpack://unattended-showing/../../../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js","webpack://unattended-showing/../../src/utils/isBrowser.js","webpack://unattended-showing/../../src/utils/debounce.js","webpack://unattended-showing/../../src/utils/isFunction.js","webpack://unattended-showing/../../src/utils/getStyleComputedProperty.js","webpack://unattended-showing/../../src/utils/getParentNode.js","webpack://unattended-showing/../../src/utils/getScrollParent.js","webpack://unattended-showing/../../src/utils/getReferenceNode.js","webpack://unattended-showing/../../src/utils/isIE.js","webpack://unattended-showing/../../src/utils/getOffsetParent.js","webpack://unattended-showing/../../src/utils/getRoot.js","webpack://unattended-showing/../../src/utils/findCommonOffsetParent.js","webpack://unattended-showing/../../src/utils/isOffsetContainer.js","webpack://unattended-showing/../../src/utils/getScroll.js","webpack://unattended-showing/../../src/utils/getBordersSize.js","webpack://unattended-showing/../../src/utils/getWindowSizes.js","webpack://unattended-showing/../../src/utils/getClientRect.js","webpack://unattended-showing/../../src/utils/getBoundingClientRect.js","webpack://unattended-showing/../../src/utils/getOffsetRectRelativeToArbitraryNode.js","webpack://unattended-showing/../../src/utils/includeScroll.js","webpack://unattended-showing/../../src/utils/isFixed.js","webpack://unattended-showing/../../src/utils/getFixedPositionOffsetParent.js","webpack://unattended-showing/../../src/utils/getBoundaries.js","webpack://unattended-showing/../../src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","webpack://unattended-showing/../../src/utils/computeAutoPlacement.js","webpack://unattended-showing/../../src/utils/getReferenceOffsets.js","webpack://unattended-showing/../../src/utils/getOuterSizes.js","webpack://unattended-showing/../../src/utils/getOppositePlacement.js","webpack://unattended-showing/../../src/utils/getPopperOffsets.js","webpack://unattended-showing/../../src/utils/find.js","webpack://unattended-showing/../../src/utils/runModifiers.js","webpack://unattended-showing/../../src/utils/findIndex.js","webpack://unattended-showing/../../src/methods/update.js","webpack://unattended-showing/../../src/utils/isModifierEnabled.js","webpack://unattended-showing/../../src/utils/getSupportedPropertyName.js","webpack://unattended-showing/../../src/methods/destroy.js","webpack://unattended-showing/../../src/utils/getWindow.js","webpack://unattended-showing/../../src/utils/setupEventListeners.js","webpack://unattended-showing/../../src/methods/enableEventListeners.js","webpack://unattended-showing/../../src/methods/disableEventListeners.js","webpack://unattended-showing/../../src/utils/removeEventListeners.js","webpack://unattended-showing/../../src/utils/isNumeric.js","webpack://unattended-showing/../../src/utils/setStyles.js","webpack://unattended-showing/../../src/modifiers/computeStyle.js","webpack://unattended-showing/../../src/utils/isModifierRequired.js","webpack://unattended-showing/../../src/methods/placements.js","webpack://unattended-showing/../../src/utils/clockwise.js","webpack://unattended-showing/../../src/modifiers/index.js","webpack://unattended-showing/../../src/methods/defaults.js","webpack://unattended-showing/../../src/modifiers/shift.js","webpack://unattended-showing/../../src/modifiers/offset.js","webpack://unattended-showing/../../src/modifiers/preventOverflow.js","webpack://unattended-showing/../../src/modifiers/keepTogether.js","webpack://unattended-showing/../../src/modifiers/arrow.js","webpack://unattended-showing/../../src/modifiers/flip.js","webpack://unattended-showing/../../src/utils/getOppositeVariation.js","webpack://unattended-showing/../../src/modifiers/inner.js","webpack://unattended-showing/../../src/modifiers/hide.js","webpack://unattended-showing/../../src/utils/getRoundedOffsets.js","webpack://unattended-showing/../../src/modifiers/applyStyle.js","webpack://unattended-showing/../../src/utils/setAttributes.js","webpack://unattended-showing/../../src/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@babel+runtime@7.23.9/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns-tz@2.0.1_date-fns@2.29.3/node_modules/date-fns-tz/esm/_lib/newDateUTC/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns-tz@2.0.1_date-fns@2.29.3/node_modules/date-fns-tz/esm/_lib/tzTokenizeDate/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns-tz@2.0.1_date-fns@2.29.3/node_modules/date-fns-tz/esm/_lib/tzParseTimezone/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns-tz@2.0.1_date-fns@2.29.3/node_modules/date-fns-tz/esm/_lib/tzPattern/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns-tz@2.0.1_date-fns@2.29.3/node_modules/date-fns-tz/esm/toDate/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns-tz@2.0.1_date-fns@2.29.3/node_modules/date-fns-tz/esm/utcToZonedTime/index.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/date-fns-tz@2.0.1_date-fns@2.29.3/node_modules/date-fns-tz/esm/zonedTimeToUtc/index.js","webpack://unattended-showing/../src/runtime.ts","webpack://unattended-showing/../../../../../node_modules/.pnpm/tslib@2.6.3/node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{outlet}}\\n\",{ moduleName: \"unattended-showing/application/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

Appointment Page

\\n
\\n \\n Return to home\\n \\n
\\n
\\n
\\n {{#if (is-fulfilled @model)}}\\n
\\n

Appointment Details

\\n\\n
\\n Unit Description: {{this.model.appointment.location.unitDescription}}\\n
\\n\\n
\\n Date and Time: {{this.model.appointment.dateTimeUtc}}\\n
\\n
\\n {{else}}\\n \\n {{/if}}\\n
\",{ moduleName: \"unattended-showing/context/appointment-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#each @appointments as |map|}}\\n
\\n

{{format-date map.day weekday=\\'long\\' month=\\'short\\' day=\\'numeric\\' year=\\'numeric\\'}}

\\n
\\n {{#each map.appointments as |appointment|}}\\n
\\n \\n {{#if (and @upcomingAppointments appointment.location.hasCommunitySiteMap)}}\\n Community Site Map\\n {{/if}}\\n
\\n {{#if @upcomingAppointments}}\\n
\\n \\n
\\n {{#if (and (not appointment.userCode) appointment.showCheckIn)}}\\n
\\n \\n
\\n {{else if (and (not appointment.userCode) appointment.activePendingIdVerification)}}\\n
\\n \\n
\\n {{/if}}\\n {{/if}}\\n
\\n
\\n {{/each}}\\n
\\n
\\n {{/each}}\\n
\\n\",{ moduleName: \"unattended-showing/components/appointment-list/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\nexport default templateOnlyComponent();","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n

My Scheduled Appointments

\\n \\n {{#if future}}\\n \\n {{else}}\\n

You have no upcoming appointments scheduled.

\\n {{/if}}\\n \\n
\\n\\n {{#if (or (is-pending this.pastAppointments) (await this.pastAppointments))}}\\n
\\n

Past Appointments

\\n {{#if (is-pending this.pastAppointments)}}\\n \\n {{else}}\\n \\n {{/if}}\\n
\\n {{/if}}\\n
\",{ moduleName: \"unattended-showing/context/appointment/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

Bookings Page

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/available-units-list-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (is-fulfilled @model.availableUnitsList)}}\\n
\\n
\\n \\\"Dealer\\\"\\n {{#if (await @model.availableUnitsList.locations)}}\\n
\\n \\n

Please select a unit to tour. You can only select one unit at a time.

\\n

If you\\'d like to view multiple units, please book two separate tours.

\\n
\\n {{#if @model.context.hasCommunitySiteMap}}\\n Community Site Map\\n {{/if}}\\n
\\n
\\n {{#each (await @model.availableUnitsList.locations) as |location|}}\\n \\n {{/each}}\\n
\\n \\n
\\n
\\n {{else}}\\n
\\n

We\\'re sorry, there are no homes available to tour at this time.

\\n
\\n {{/if}}\\n
\\n
\\n{{else}}\\n \\n{{/if}}\",{ moduleName: \"unattended-showing/context/available-units-list/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

Change Password Page

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/change-password-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n
\\n \\n {{#if this.sgtSession.isAuthenticated}}\\n Back to my profile\\n {{/if}}\\n
\\n
\",{ moduleName: \"unattended-showing/context/change-password/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

FAQ Page

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/faq-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (is-fulfilled @model.context)}}\\n
\\n

Frequently Asked Questions

\\n {{#each (await this.pageContents) as |section|}}\\n

{{section.title}}

\\n {{#each section.questions as |question|}}\\n

{{question.title}}

\\n
    \\n {{#each question.answers as |answer|}}\\n
  • {{answer}}
  • \\n {{/each}}\\n
\\n {{/each}}\\n {{/each}}\\n
\\n{{else}}\\n \\n{{/if}}\",{ moduleName: \"unattended-showing/context/faq/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

Forgot Password Page

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/forgot-password-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

Password Recovery

\\n

\\n Enter your email address below and we will send you the instructions to change the password.\\n

\\n
\\n
\\n \\n
\\n
\\n
\\n \\n
\\n
\\n\",{ moduleName: \"unattended-showing/context/forgot-password/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

Verify Your Phone

\\n

We sent a code to your phone number

\\n
\\n
\\n {{#each this.verificationCode as |digit index|}}\\n \\n {{/each}}\\n
\\n \\n Resend Code\\n
\\n
\\n
\\n

Still need help?

\\n Click here for assistance\\n
\\n
\\n\\n\",{ moduleName: \"unattended-showing/components/phone-verification/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\ninterface VerificationCodeArgs {\n onSubmit: (code: string) => void;\n resendRoute: string;\n needHelpRoute: string;\n}\nexport default class PhoneVerification extends Component {\n verificationCode: string[] = Array(6).fill('');\n @tracked isCodeComplete = false;\n\n @action\n handleInput(index: number, event: InputEvent): void {\n const input = event.target as HTMLInputElement;\n\n // If the input is not a single number, 0-9, clear the value.\n if (!input.value.match(/^\\d$/)) {\n input.value = '';\n }\n\n this.verificationCode[index] = input.value;\n this.updateIsCodeComplete();\n this.updateFocus();\n }\n\n @action\n handleKeyDown(index: number, event: KeyboardEvent): void {\n // When the user hits backspace on an empty input box,\n // move the focus to the previous input box.\n if (event.key === 'Backspace' && index > 0) {\n const input = event.target as HTMLInputElement;\n if (input.value === '') {\n (\n document.querySelectorAll('.digit-input')[\n index - 1\n ] as HTMLInputElement\n ).focus();\n }\n }\n }\n\n @action\n handlePaste(event: ClipboardEvent): void {\n const pasteData = event.clipboardData?.getData('text') || '';\n // If the user tries to copy and past a 6 digit code,\n // then fill in the input.\n if (pasteData.match(/^\\d{6}$/)) {\n pasteData.split('').forEach((value, index) => {\n this.verificationCode[index] = value;\n // Directly set the value of the input field so the component re-renders.\n (\n document.querySelectorAll('.digit-input')[\n index\n ] as HTMLInputElement\n ).value = value;\n });\n\n this.updateIsCodeComplete();\n this.updateFocus();\n }\n event.preventDefault();\n }\n\n @action\n submitCode(): void {\n if (this.isCodeComplete) {\n // Execute function passed in from parent.\n this.args.onSubmit(this.verificationCode.join(''));\n }\n }\n\n private updateFocus(): void {\n let nextEmptyIndex = this.verificationCode.findIndex(\n (digit) => digit === ''\n );\n\n // if the code has been filled in, set the focus to the last input.\n if (nextEmptyIndex === -1) {\n nextEmptyIndex = this.verificationCode.length - 1;\n }\n\n (\n document.querySelectorAll('.digit-input')[\n nextEmptyIndex\n ] as HTMLInputElement\n ).focus();\n }\n\n private updateIsCodeComplete() {\n this.isCodeComplete = this.verificationCode.every(\n (digit) => digit !== ''\n );\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n
\",{ moduleName: \"unattended-showing/context/guest-phone-verification/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n

Guest Details

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n
\\n \\n \\n
\\n
\\n
\",{ moduleName: \"unattended-showing/context/guest-sign-up/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

Book a Tour

\\n
\\n \\n \\n

{{item.props.relativeDate}}

\\n
\\n

{{format-date item.props.date weekday=\\'long\\'}}

\\n

{{format-date item.props.date month=\\'long\\' day=\\'numeric\\'}}

\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n
\\n \\n
\",{ moduleName: \"unattended-showing/components/book-tour/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { action, computed } from '@ember/object';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport { datesAreOnSameDay } from 'unattended-showing/utils/datetime-utils';\nimport { inject as service } from '@ember/service';\nimport { set } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { utcToZonedTime } from 'date-fns-tz';\nimport Component from '@glimmer/component';\nimport DropdownSelectItem from '@adc/ui-components/utils/dropdown-select-item';\nimport {\n addDays,\n addMinutes,\n format,\n isAfter,\n isBefore,\n isEqual,\n isWithinInterval,\n startOfDay\n} from 'date-fns';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type ArrayProxy from '@ember/array/proxy';\nimport type LocationModel from 'unattended-showing/models/location';\nimport type MockTimeService from 'unattended-showing/services/mock-time';\nimport type SanitizedAppointment from 'unattended-showing/models/sanitized-appointment';\n\ninterface BookTourArgs {\n appointmentSettings: AppointmentSettings;\n location: LocationModel;\n targetMoveInDate?: Date;\n nextAction: (tourDateTime: Date, desiredMoveInDate: Date) => void;\n}\n\ninterface AppointmentSettings {\n appointmentLength: number;\n hoursOfOperationSchedule: Timeblock[];\n}\n\ninterface Timeblock {\n day: number;\n startMinutesLocal: number;\n endMinutesLocal: number;\n}\n\ninterface DateListItemProps {\n date: Date;\n relativeDate: string;\n timeSlotOptions: DropdownSelectItem[];\n}\n\ninterface TimeSlot {\n startDateTime: Date;\n endDateTime?: Date;\n available: boolean;\n currentTimeSlot: boolean;\n}\n\ninterface UnavailablePeriod {\n startTime: Date;\n isTourNow: boolean;\n}\n\nexport default class BookTour extends Component {\n @service declare mockTime: MockTimeService;\n @service\n declare notificationManager: ServiceRegistry['notification-manager'];\n\n @tracked tourDate = new Date();\n @tracked tourTime = '';\n @tracked desiredMoveInDate = this.desiredMoveInDateInitalValue;\n @tracked timeSlotSelectOptions: DropdownSelectItem[] = [];\n\n /**\n * Get the initial value to be used in the Desired Move-In Date datepicker. This value will come from the user's account if they are signed in.\n * @returns Previously saved desired move-in date if the user is signed in, or null if they are not.\n */\n get desiredMoveInDateInitalValue(): Date | null {\n return this.args.targetMoveInDate ?? null;\n }\n\n /**\n * Returns upcoming days for which appointment time slots can be booked.\n * @return List of BinaryListItems used to display Tour Date option buttons.\n */\n @computed(\n 'args.location.{timeZone,unavailablePeriods}',\n 'maxTourDates',\n 'mockTime.mockTime',\n 'unavailablePeriods'\n )\n get appointmentDays(): Promise[]> {\n return (async () => {\n const { timeZone } = this.args.location || {},\n maxTourDates: number = 7;\n\n // Get time slots which are unavailable.\n const unavailablePeriodModelsUTC = await this.args.location\n .unavailablePeriods,\n unavailablePeriodsLocal: UnavailablePeriod[] =\n this.getUnavailablePeriods(\n unavailablePeriodModelsUTC,\n timeZone\n );\n\n // Generate the date list items to display on the form.\n const daySlots: BinaryListItem[] = [];\n for (let i = 0; i < maxTourDates; i++) {\n daySlots.push(\n this.getTourDateBinaryListItem(\n i,\n timeZone,\n unavailablePeriodsLocal\n )\n );\n }\n\n // Set the auto-selected option to the first enabled date\n const firstAvailableDate = daySlots.find((dateItem) => {\n return !dateItem.disabled;\n });\n if (firstAvailableDate) {\n firstAvailableDate.state = true;\n this.setSelectedTourDate(firstAvailableDate);\n }\n\n return daySlots;\n })();\n }\n\n /**\n * Builds a binary list option for a tour date.\n * @returns A BinaryListItem to use to display an option button for a tour date.\n */\n getTourDateBinaryListItem(\n index: number,\n timeZone: string,\n unavailablePeriodsLocal: UnavailablePeriod[]\n ): BinaryListItem {\n const currentUnitDateLocal = this.getCurrentUnitDateLocal(timeZone);\n const today = startOfDay(currentUnitDateLocal);\n const day: Date = addDays(today, index);\n const timeSlotOptions = this.getAppointmentTimeSlots(\n day,\n unavailablePeriodsLocal\n );\n return new BinaryListItem({\n disabled: !this.hasAvailableTimeSlots(timeSlotOptions),\n props: {\n date: day,\n relativeDate: this.getRelativeDateText(day, today),\n timeSlotOptions: timeSlotOptions\n }\n });\n }\n\n /**\n * Checks a list of time slot dropdown options to see if at least one is available.\n * @returns True if at least one option is available to book.\n */\n hasAvailableTimeSlots(timeSlotOptions: DropdownSelectItem[]): boolean {\n if (timeSlotOptions.length < 1) {\n return false;\n }\n const availableTimeSlot = timeSlotOptions.find((option) => {\n return !option.disabled;\n });\n return availableTimeSlot !== undefined;\n }\n\n /**\n * Get the 'Today', 'Tomorrow', or 'Future' language for a Tour Date button.\n * @returns Language to display on the button.\n */\n getRelativeDateText(buttonDate: Date, today: Date): string {\n if (isEqual(buttonDate, today)) {\n return 'Today';\n } else if (isEqual(buttonDate, addDays(today, 1))) {\n return 'Tomorrow';\n }\n return 'Future';\n }\n\n /**\n * Update the selected tour date when it is changed.\n */\n @action\n onTourDateChange(\n items: BinaryListItem[]\n ): Promise {\n return (async () => {\n const appointmentDays: BinaryListItem[] =\n await this.appointmentDays;\n const selectedItem =\n items.find((item) => item.state) ?? appointmentDays[0];\n this.setSelectedTourDate(selectedItem);\n })();\n }\n\n /**\n * Sets the tour date and time slot options based on the given selected date button.\n */\n setSelectedTourDate(selectedItem: BinaryListItem): void {\n this.tourDate = selectedItem.props.date;\n this.timeSlotSelectOptions = selectedItem.props.timeSlotOptions;\n }\n\n /**\n * Get a list of time slot options for the Tour Time dropdown for a given date.\n * @returns List of options to use in the Tour Time select dropdown.\n */\n getAppointmentTimeSlots(\n date: Date,\n unavailablePeriodsLocal: UnavailablePeriod[]\n ): DropdownSelectItem[] {\n const { timeZone } = this.args.location || {},\n { appointmentLength } = this.args.appointmentSettings,\n currentUnitDateLocal = this.getCurrentUnitDateLocal(timeZone),\n timeSlotsLocal = this.getTimeSlotsLocal(date, currentUnitDateLocal);\n\n timeSlotsLocal\n .filter((timeSlot) => {\n return !this.isTimeSlotAvailable(\n timeSlot.startDateTime,\n unavailablePeriodsLocal,\n appointmentLength\n );\n })\n .forEach((t) => set(t, 'available', false));\n\n // Check if the first time slot is currently ongoing.\n if (timeSlotsLocal.length > 0) {\n if (\n this.hasStartTimePassed(timeSlotsLocal[0], currentUnitDateLocal)\n ) {\n timeSlotsLocal[0].currentTimeSlot = true;\n\n // If the first time slot is current and the second is unavailable, mark the first as unavailable as well.\n if (timeSlotsLocal.length > 1 && !timeSlotsLocal[1].available) {\n timeSlotsLocal[0].available = false;\n }\n }\n }\n\n return timeSlotsLocal.map((timeSlot) => {\n const timeSlotLabel: string =\n this.formatTimeSlotForDropdown(timeSlot);\n return DropdownSelectItem.create({\n name: timeSlotLabel,\n value: timeSlot.startDateTime.toString(),\n disabled: !timeSlot.available\n });\n });\n }\n\n /**\n * Checks if the given time slot has begun.\n * @returns True if the time slot's start time has already occurred.\n */\n hasStartTimePassed(timeSlot: TimeSlot, currentDateTime: Date): boolean {\n return (\n isAfter(currentDateTime, timeSlot.startDateTime) ||\n isEqual(currentDateTime, timeSlot.startDateTime)\n );\n }\n\n /**\n * Get the periods that are unavailable for tours.\n * @returns List of UnavailablePeriods.\n */\n getUnavailablePeriods(\n unavailablePeriodModelsUTC: ArrayProxy,\n timeZone: string\n ): UnavailablePeriod[] {\n return unavailablePeriodModelsUTC.map((unavailablePeriodModel) => {\n const dateTimeUTC = new Date(unavailablePeriodModel.dateTimeUtc),\n dateTimeLocal = utcToZonedTime(dateTimeUTC, timeZone),\n isTourNow = unavailablePeriodModel.isTourNow;\n return {\n startTime: dateTimeLocal,\n isTourNow: isTourNow\n };\n });\n }\n\n /**\n * Checks whether the given time slot is available (does not conflict with unavailable periods).\n * @returns True if the time slot does not conflict with the unavailable periods.\n */\n isTimeSlotAvailable(\n timeSlotStart: Date,\n unavailablePeriods: UnavailablePeriod[],\n appointmentLength: number\n ): boolean {\n return unavailablePeriods.every((unavailablePeriod) => {\n const timeSlotEnd = this.getAppointmentEndDate(\n timeSlotStart,\n appointmentLength\n ),\n unavailablePeriodEnd = this.getAppointmentEndDate(\n unavailablePeriod.startTime,\n unavailablePeriod.isTourNow\n ? appointmentLength * 2\n : appointmentLength\n );\n\n if (\n isEqual(timeSlotStart, unavailablePeriodEnd) ||\n isEqual(timeSlotEnd, unavailablePeriod.startTime)\n ) {\n return true;\n }\n\n const unavailableInterval = {\n start: unavailablePeriod.startTime,\n end: unavailablePeriodEnd\n },\n startAvailable = !isWithinInterval(\n timeSlotStart,\n unavailableInterval\n ),\n endAvailable = !isWithinInterval(\n timeSlotEnd,\n unavailableInterval\n );\n\n return startAvailable && endAvailable;\n });\n }\n\n /**\n * Get the string to show for a time slot in the Tour Time dropdown.\n * @returns Formatted string to display in Tour Time dropdown.\n */\n formatTimeSlotForDropdown(timeSlot: TimeSlot): string {\n if (timeSlot.currentTimeSlot) {\n return 'Tour Now';\n }\n return timeSlot.startDateTime.toLocaleString('en-US', {\n hour: 'numeric',\n minute: '2-digit'\n });\n }\n\n /**\n * Get the upcoming and current time slots for the given day.\n * @return List of upcoming and current time slots.\n */\n getTimeSlotsLocal(targetDay: Date, currentUnitDateLocal: Date): TimeSlot[] {\n let timeSlotsLocal: TimeSlot[] = [];\n\n // If the property is not getting their available times from a CRM integration, generate them.\n if (this.args.location.appointmentTimeSlotsFromCrmLocal == undefined) {\n timeSlotsLocal = this.generateTimeSlotsForDay(\n targetDay,\n currentUnitDateLocal\n );\n } else {\n timeSlotsLocal = this.getTimeSlotsFromCrmLocal(\n targetDay,\n currentUnitDateLocal\n );\n }\n\n return timeSlotsLocal.filter((slot) => slot.available);\n }\n\n /**\n * Generates all time slots, available and unavailable, for a given day based on the hours of operation schedule.\n * @returns List of time slots for the given day.\n */\n generateTimeSlotsForDay(\n targetDay: Date,\n currentUnitDateLocal: Date\n ): TimeSlot[] {\n const { appointmentLength, hoursOfOperationSchedule } =\n this.args.appointmentSettings;\n\n // Get the timeblocks for the selected day.\n const filteredTimeblocks = hoursOfOperationSchedule?.filter(\n (timeblock) => timeblock.day === targetDay.getDay()\n ),\n timeSlots: TimeSlot[] = [];\n\n // Iterate through the timeblocks and add appointment slots.\n filteredTimeblocks?.forEach(\n ({ startMinutesLocal, endMinutesLocal }) => {\n for (\n let currentTime = startMinutesLocal;\n currentTime <= endMinutesLocal;\n currentTime += appointmentLength\n ) {\n const startDateTime = new Date(targetDay);\n startDateTime.setMinutes(currentTime);\n const endDateTime = this.getAppointmentEndDate(\n new Date(startDateTime),\n appointmentLength\n );\n timeSlots.push({\n startDateTime,\n available: isAfter(endDateTime, currentUnitDateLocal),\n currentTimeSlot: false\n });\n }\n }\n );\n\n return timeSlots;\n }\n\n /**\n * Generates all time slots, available and unavailable, based on time slots given by the CRM.\n * @returns List of time slots for the given day.\n */\n getTimeSlotsFromCrmLocal(\n targetDay: Date,\n currentUnitDateLocal: Date\n ): TimeSlot[] {\n const timeSlots: TimeSlot[] = [];\n\n this.args.location.appointmentTimeSlotsFromCrmLocal.forEach(\n (slot: string) => {\n const startDateLocal = new Date(slot);\n const endDateLocal = this.getAppointmentEndDate(\n startDateLocal,\n this.args.appointmentSettings.appointmentLength\n );\n\n // Filter out time slots for different days and time slots that have already ended.\n if (\n !datesAreOnSameDay(startDateLocal, targetDay) ||\n !isAfter(endDateLocal, currentUnitDateLocal)\n ) {\n return;\n }\n\n // Check that time slots do not overlap (CRM time slots do not come with an end time).\n const previousSlot = timeSlots[timeSlots.length - 1];\n if (\n previousSlot?.endDateTime &&\n previousSlot?.endDateTime > startDateLocal\n ) {\n return;\n }\n\n timeSlots.push({\n startDateTime: startDateLocal,\n endDateTime: endDateLocal,\n available: true,\n currentTimeSlot: false\n });\n }\n );\n\n return timeSlots;\n }\n\n /**\n * Update the selected tour time when it is changed.\n */\n @action\n onTourTimeChange(newTime: string): void {\n this.tourTime = newTime;\n }\n\n /**\n * Update the selected desired move-in date when it is changed.\n */\n @action\n onDesiredMoveInDateChange(newDate: Date): void {\n this.desiredMoveInDate = newDate;\n }\n\n /**\n * Get the current day in the location's time zone. If mock time is being used, this will return the mock time.\n * @returns Current day Date object.\n */\n getCurrentUnitDateLocal(timeZone: string): Date {\n return (\n this.mockTime.mockTime ??\n new Date(new Date().toLocaleString('en-US', { timeZone: timeZone }))\n );\n }\n\n /**\n * Get end time of appointment.\n * @returns End time for the appointment.\n */\n getAppointmentEndDate(startTime: Date, appointmentLength: number): Date {\n return addMinutes(startTime, appointmentLength);\n }\n\n /**\n * Get the minimum allowable move-in date for the date picker. The minimum date will be the current day.\n * @returns Minimum date.\n */\n get minMoveInDate(): Date {\n const today = new Date();\n return today;\n }\n\n /**\n * Get the maximum allowable move-in date for the date picker. The maximum date will be a year from the current day.\n * @returns Maximum date.\n */\n get maxMoveInDate(): Date {\n const maxDate = new Date();\n maxDate.setFullYear(maxDate.getFullYear() + 1);\n return maxDate;\n }\n\n /**\n * Format a Date object as a string in the format YYYY-MM-DD.\n * @param date Date to format.\n * @returns A date string with the format YYYY-MM-DD.\n */\n toFormattedString(date: Date): string {\n return format(date, 'yyyy-MM-dd');\n }\n\n /**\n * Validates user input and sends it to the server if it is valid.\n */\n @action\n async next(event: Event): Promise {\n event.preventDefault();\n\n if (!this.validateUserInputs()) {\n return;\n }\n\n const tourDateTime = new Date(this.tourTime);\n const desiredMoveInDate = this.desiredMoveInDate!;\n this.args.nextAction(tourDateTime, desiredMoveInDate);\n }\n\n /**\n * Determines whether the user inputs are valid and adds the appropriate errors to the NotificationManager.\n * @returns Boolean indicating whether the user inputs are valid.\n */\n validateUserInputs(): boolean {\n // TODO: This method may need to be updated in POINT-6942 depending on how errors will be displayed.\n if (!this.tourTime) {\n this.notificationManager.addError('Tour time is required.');\n return false;\n }\n\n if (!this.desiredMoveInDate) {\n this.notificationManager.addError(\n 'Desired move-in date is required.'\n );\n return false;\n } else if (isBefore(this.desiredMoveInDate, this.minMoveInDate)) {\n this.notificationManager.addError(\n 'Desired move-in date must not be in the past.'\n );\n return false;\n } else if (isAfter(this.desiredMoveInDate, this.maxMoveInDate)) {\n this.notificationManager.addError(\n 'Desired move-in date must not be more than a year from today.'\n );\n return false;\n }\n\n return true;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n
\",{ moduleName: \"unattended-showing/context/location-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n I agree to the following Terms and Conditions\\n \\n\\n
\\n \\n \\n
\\n
\",{ moduleName: \"unattended-showing/components/modals/terms-and-conditions/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\nimport { dataUrlToObjectUrl } from 'unattended-showing/helpers/file-utils';\n\n/**\n * @classdesc\n * The modal that prompts the user to accept the terms and conditions.\n */\nexport default class TermsAndConditionsModal extends Component {\n @service modals;\n @service ajax;\n\n @tracked isChecked = false;\n\n /**\n * Opens a new tab for the terms and conditions.\n *\n * @function\n */\n @action async openTermsAndConditions(ev) {\n ev.preventDefault();\n\n const context = this.args.model.context;\n if (!context.termsAndConditionsObjectUrl) {\n const dataUrl = await this.ajax.apiRequest(\n `/fileUploads/terms/${context.systemGroupId}`\n );\n\n context.termsAndConditionsObjectUrl = dataUrlToObjectUrl(\n dataUrl.value\n );\n }\n\n window.open(\n context.termsAndConditionsObjectUrl,\n '_blank',\n 'noopener noreferrer'\n );\n }\n\n /**\n * Closes the modal.\n */\n @action closeAction() {\n this.modals.closeModal();\n }\n\n /**\n * Performs the save action and then closes the modal\n * @returns {Promise}\n */\n @action saveAndCloseAction() {\n return this.args.model.saveAction().then(() => this.closeAction());\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#if @model.hasAppointment}}\\n {{#if (is-fulfilled @model.nextAppointment)}}\\n {{#if @model.nextAppointment.gateCode}}\\n
\\n
\\n

{{@model.nextAppointment.gateCode}}

\\n

\\n GATE CODE\\n
\\n Use this code to access the parking area.\\n

\\n
\\n
\\n {{/if}}\\n {{#if @model.nextAppointment.userCode}}\\n
\\n
\\n

You\\'re all set!

\\n

{{@model.nextAppointment.userCode}}

\\n

\\n PIN CODE\\n
\\n Use this to access the property and unit\\n {{#if (await this.shouldDisplayNow)}}\\n from now until\\n {{else}}\\n on\\n {{format-date (await this.nextAppointmentLocalTime) weekday=\\'long\\' month=\\'long\\' day=\\'numeric\\' year=\\'numeric\\'}}\\n from\\n {{format-date (await this.nextAppointmentLocalTime) hour=\\'numeric\\' minute=\\'2-digit\\'}}\\n -\\n {{/if}}\\n {{format-date (await this.nextAppointmentLocalEndTime) hour=\\'numeric\\' minute=\\'2-digit\\'}}.\\n

\\n
\\n
\\n \\n
\\n
\\n {{else if @model.nextAppointment.showCheckIn}}\\n
\\n
\\n \\n

You\\'re Booked!

\\n

\\n \\n {{format-date (await this.nextAppointmentLocalTime) weekday=\\'long\\' month=\\'long\\' day=\\'numeric\\' year=\\'numeric\\'}}\\n \\n

\\n

\\n {{format-date (await this.nextAppointmentLocalTime) hour=\\'numeric\\' minute=\\'2-digit\\'}} -\\n {{format-date (await this.nextAppointmentLocalEndTime) hour=\\'numeric\\' minute=\\'2-digit\\'}}\\n

\\n
\\n \\n \\n
\\n {{else if @model.nextAppointment.activePendingIdVerification}}\\n
\\n

Check Your Texts

\\n

We sent you a link to verify your ID.

\\n
\\n \\n \\n
\\n
\\n {{else}}\\n
\\n
\\n \\n

You\\'re Booked!

\\n

\\n \\n {{format-date (await this.nextAppointmentLocalTime) weekday=\\'long\\' month=\\'long\\' day=\\'numeric\\' year=\\'numeric\\'}}\\n \\n

\\n

\\n {{format-date (await this.nextAppointmentLocalTime) hour=\\'numeric\\' minute=\\'2-digit\\'}} -\\n {{format-date (await this.nextAppointmentLocalEndTime) hour=\\'numeric\\' minute=\\'2-digit\\'}}\\n

\\n
\\n
\\n

\\n {{#if (and @model.geofenceEnabled @model.checkpointIdEnabled)}}\\n We\\'ll let you know when it\\'s time to check-in. Please note that you may need to log in and verify your location and ID.\\n {{else if @model.checkpointIdEnabled}}\\n We\\'ll let you know when it\\'s time to check-in. Please note that you may need to log in and verify your ID.\\n {{else if @model.geofenceEnabled}}\\n We\\'ll let you know when it\\'s time to check-in. Please note that you may need to log in and verify your location.\\n {{else}}\\n Check back here at the time of your tour to view your PIN code. It will also be sent to you via text and email.\\n {{/if}}\\n

\\n \\n
\\n
\\n {{/if}}\\n {{else}}\\n \\n {{/if}}\\n {{!-- If user tried to book appointment prior to logging in/signing-up, temporary load while appointment saves --}}\\n {{else if this.loginPendingBooking.enableTemporaryLoading}}\\n \\n {{else}}\\n
\\n

Schedule a Visit

\\n {{#if @model.checkpointIdEnabled}}\\n \\n
\\n \\n This unit requires you to upload your ID and take a live selfie in order to tour.\\n \\n
\\n {{/if}}\\n {{#if @model.geofenceEnabled}}\\n \\n
\\n \\n This unit requires you to share your location and confirm you are on site in order to tour.\\n \\n
\\n {{/if}}\\n
\\n {{#each this.appointmentDays as |day|}}\\n \\n
{{format-date day weekday=\\'short\\'}}
\\n
{{format-date day month=\\'short\\' day=\\'numeric\\'}}
\\n
\\n {{/each}}\\n
\\n

Please note the times below are in the community\\'s local time zone ({{@model.timeZoneAbbreviation}}).

\\n {{#if (await this.hasFutureAppointmentSlots)}}\\n
    \\n {{#each (await this.appointmentTimeSlots) as |slot|}}\\n
  • \\n
    \\n {{format-date slot.startDateTime hour=\\'numeric\\' minute=\\'2-digit\\'}}\\n
    \\n
    \\n \\n {{#if slot.available}}\\n {{#if slot.currentTimeSlot}}\\n Tour Now\\n {{else}}\\n Book Tour\\n {{/if}}\\n {{else}}\\n Unavailable\\n {{/if}}\\n \\n
    \\n
  • \\n {{/each}}\\n
\\n {{else}}\\n
There are no available times for this day.
\\n {{/if}}\\n
\\n {{/if}}\\n\\n\",{ moduleName: \"unattended-showing/components/appointment-schedule/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { set } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\nimport { alias, not } from '@ember/object/computed';\nimport addMinutes from 'date-fns/addMinutes';\nimport addDays from 'date-fns/addDays';\nimport isWithinInterval from 'date-fns/isWithinInterval';\nimport isEqual from 'date-fns/isEqual';\nimport isAfter from 'date-fns/isAfter';\nimport startOfDay from 'date-fns/startOfDay';\nimport { utcToZonedTime } from 'date-fns-tz';\nimport { inject as service } from '@ember/service';\nimport { datesAreOnSameDay } from '../../utils/datetime-utils';\nimport TermsAndConditionsModal from '../modals/terms-and-conditions/index';\n\n/**\n * Component for showing, scheduling, and deleting Self-Guided Tours time slots.\n */\nexport default class AppointmentSchedule extends Component {\n @service loginPendingBooking;\n @service checkIn;\n @service modals;\n @service mockTime;\n\n /**\n * Whether the appointment table should be shown or if there is already an existing appointment and we\n * want to hide the table.\n *\n * @type {boolean}\n */\n @not('args.model.hasAppointment')\n hasNoAppointment;\n\n /**\n * Stores selected appointment datetime.\n *\n * @type {Date}\n */\n selectedDate = null;\n\n /**\n * Number of days for which appointments can be booked in advance. There is currently no dealer setting for this.\n * Need to consult with PM to see if this is desired.\n *\n * @type {Number}\n */\n days = 7;\n\n /**\n * Get the collection of unavailable appointment blocks for this community.\n *\n * @type {Array<{models.SanitizedAppointment}>}\n */\n @alias('args.model.unavailablePeriods')\n unavailablePeriods;\n\n /**\n * Get end time of appointment.\n *\n * @param {Date} date\n * @param {Number} appointmentLength\n *\n * @returns {Date}\n */\n getAppointmentEndDate(date, appointmentLength) {\n return addMinutes(date, appointmentLength);\n }\n\n /**\n * Checks whether the time slot is available.\n *\n * @param {{startDateTime: {Date}, available: {boolean}}} timeSlotStart\n * @param {[Date]} unavailablePeriods\n * @param {Number} appointmentLength\n *\n * @returns {boolean}\n */\n isTimeSlotAvailable(timeSlotStart, unavailablePeriods, appointmentLength) {\n return unavailablePeriods.every((unavailablePeriod) => {\n const timeSlotEnd = this.getAppointmentEndDate(\n timeSlotStart,\n appointmentLength\n ),\n unavailablePeriodEnd = this.getAppointmentEndDate(\n unavailablePeriod.startTime,\n unavailablePeriod.isTourNow\n ? appointmentLength * 2\n : appointmentLength\n );\n\n if (\n isEqual(timeSlotStart, unavailablePeriodEnd) ||\n isEqual(timeSlotEnd, unavailablePeriod.startTime)\n ) {\n return true;\n }\n\n const unavailableInterval = {\n start: unavailablePeriod.startTime,\n end: unavailablePeriodEnd\n },\n startAvailable = !isWithinInterval(\n timeSlotStart,\n unavailableInterval\n ),\n endAvailable = !isWithinInterval(\n timeSlotEnd,\n unavailableInterval\n );\n\n return startAvailable && endAvailable;\n });\n }\n\n /**\n * Returns upcoming days for which appointment time slots can be booked.\n *\n * @type {[Date]}\n */\n @computed('args.model.timeZone', 'days', 'mockTime.mockTime')\n get appointmentDays() {\n const { timeZone } = this.args.model || {};\n const currentUnitDateLocal = new Date(\n new Date().toLocaleString('en-US', { timeZone: timeZone })\n );\n const today = startOfDay(\n this.mockTime.mockTime ?? currentUnitDateLocal\n );\n let daySlots = Array.from(new Array(this.days), (_, index) =>\n addDays(today, index)\n );\n\n // eslint-disable-next-line ember/no-side-effects\n set(this, 'selectedDate', daySlots[0]);\n return daySlots;\n }\n\n /**\n * Returns the NextAppointment's dateTimeUtc in local time. The dateTimeLocal property on the appointment model\n * is a date time object adjusted to the system's local timezone.\n *\n * @type {[Date]}\n */\n @computed('args.model.nextAppointment')\n get nextAppointmentLocalTime() {\n return (async () => {\n const nextAppointment = await this.args.model.nextAppointment;\n return nextAppointment.dateTimeLocal;\n })();\n }\n\n /**\n * Determines if the start time should be changed to 'now'.\n *\n * @returns {Boolean}\n */\n @computed('args.model.nextAppointment')\n get shouldDisplayNow() {\n return (async () => {\n // Compare the dateTimeUtc to the current time. The value of dateTimeUtc is automatically\n // converted from UTC to the time zone of the browser.\n const nextAppointment = await this.args.model.nextAppointment;\n return new Date() >= nextAppointment.dateTimeUtc;\n })();\n }\n\n /**\n * Returns the NextAppointment's end dateTimeUtc in local time. The dateTimeLocal property on the appointment model\n * is a date time object adjusted to the system's local timezone.\n *\n * @type {[Date]}\n */\n @computed(\n 'nextAppointmentLocalTime',\n 'args.{appointmentSettings.appointmentLength,model.nextAppointment}'\n )\n get nextAppointmentLocalEndTime() {\n return (async () => {\n const appointmentTime = await this.nextAppointmentLocalTime,\n appointmentEndTime = new Date(appointmentTime),\n nextAppointment = await this.args.model.nextAppointment;\n let length = nextAppointment.length;\n\n return new Date(\n appointmentEndTime.setMinutes(\n appointmentTime.getMinutes() + length\n )\n );\n })();\n }\n\n /**\n * Returns objects required to build appointment time slot rows.\n *\n * @type {Array<{startDateTime: {Date}, available: {Boolean}}>}\n */\n @computed(\n 'args.{appointmentSettings,model.timeZone,model.appointmentTimeSlotsFromCrmLocal}',\n 'mockTime.mockTime',\n 'selectedDate',\n 'unavailablePeriods.[]'\n )\n get appointmentTimeSlots() {\n return (async () => {\n const { timeZone } = await this.args.model,\n unavailablePeriodModelsUTC = await this.unavailablePeriods,\n { appointmentLength } = this.args.appointmentSettings,\n currentUnitDateLocal = new Date(\n new Date().toLocaleString('en-US', { timeZone: timeZone })\n ),\n timeSlotsLocal = this.getTimeSlotsLocal(\n this.mockTime.mockTime ?? currentUnitDateLocal\n );\n\n // Get location's unavailable times.\n const unavailablePeriodsLocal = unavailablePeriodModelsUTC.map(\n (model) => {\n const dateTimeUTC = new Date(model.dateTimeUtc),\n dateTimeLocal = utcToZonedTime(dateTimeUTC, timeZone),\n isTourNow = model.isTourNow;\n return {\n startTime: dateTimeLocal,\n isTourNow: isTourNow\n };\n }\n );\n\n // Set time slots which are unavailable for appointment.\n timeSlotsLocal\n .filter((timeSlot) => {\n return !this.isTimeSlotAvailable(\n timeSlot.startDateTime,\n unavailablePeriodsLocal,\n appointmentLength\n );\n })\n .forEach((t) => set(t, 'available', false));\n\n // If we have at least one time slot available, mark it as TOUR NOW.\n if (timeSlotsLocal.length > 0) {\n if (\n isAfter(\n this.mockTime.mockTime ?? currentUnitDateLocal,\n timeSlotsLocal[0].startDateTime\n )\n ) {\n timeSlotsLocal[0].currentTimeSlot = true;\n }\n\n // If the first time slot is current and the second is unavailable, mark the first as unavailable as well.\n if (timeSlotsLocal.length > 1) {\n if (\n !timeSlotsLocal[1].available &&\n timeSlotsLocal[0].currentTimeSlot\n ) {\n timeSlotsLocal[0].available = false;\n }\n }\n }\n\n return timeSlotsLocal;\n })();\n }\n\n @computed('appointmentTimeSlots')\n get hasFutureAppointmentSlots() {\n return (async () => {\n const slots = await this.appointmentTimeSlots;\n return slots.length > 0;\n })();\n }\n\n /**\n * Returns the time slots for display, with past slots filtered out.\n */\n getTimeSlotsLocal(currentUnitDateLocal) {\n let timeSlotsLocal;\n\n // If the property is not getting their available times from a CRM integration, generate them.\n if (this.args.model.appointmentTimeSlotsFromCrmLocal == undefined) {\n timeSlotsLocal = this.generateTimeSlotsForDay(currentUnitDateLocal);\n } else {\n timeSlotsLocal = this.getTimeSlotsForCrmLocal(currentUnitDateLocal);\n }\n\n return timeSlotsLocal.filter((slot) => slot.available);\n }\n\n /**\n * Generates time slots for the given date using the hours of operation schedule.\n */\n generateTimeSlotsForDay(currentUnitDateLocal) {\n const { appointmentLength, hoursOfOperationSchedule } =\n this.args.appointmentSettings,\n targetDay = this.selectedDate;\n\n if (!targetDay) {\n return [];\n }\n\n // Get the timeblocks for the selected day.\n const filteredTimeblocks = hoursOfOperationSchedule.filter(\n (tb) => tb.day === targetDay.getDay()\n ),\n appointments = [];\n\n // Iterate through the timeblocks and add appointment slots.\n filteredTimeblocks.forEach(({ startMinutesLocal, endMinutesLocal }) => {\n for (\n let currentTime = startMinutesLocal;\n currentTime <= endMinutesLocal;\n currentTime += appointmentLength\n ) {\n const startDateTime = new Date(targetDay);\n startDateTime.setMinutes(currentTime);\n const endDateTime = this.getAppointmentEndDate(\n new Date(startDateTime),\n appointmentLength\n );\n appointments.push({\n startDateTime,\n available: isAfter(endDateTime, currentUnitDateLocal),\n currentTimeSlot: false\n });\n }\n });\n\n return appointments;\n }\n\n /**\n * Filters down and returns the time slots for the given date, only for properties with CRM integrations.\n */\n getTimeSlotsForCrmLocal(currentUnitDateLocal) {\n const timeSlots = [];\n\n this.args.model.appointmentTimeSlotsFromCrmLocal.forEach((slot) => {\n const startDateLocal = new Date(slot);\n const endDateLocal = this.getAppointmentEndDate(\n startDateLocal,\n this.args.appointmentSettings.appointmentLength\n );\n\n // Time slot needs to be for the selected date and the end date needs to be past right now.\n if (\n !datesAreOnSameDay(startDateLocal, this.selectedDate) ||\n !isAfter(endDateLocal, currentUnitDateLocal)\n ) {\n return;\n }\n\n // Since CRM time slots do not come with an end time, we need to make sure they don't overlap.\n const previousSlot = timeSlots[timeSlots.length - 1];\n if (previousSlot?.endDateTime > startDateLocal) {\n return;\n }\n\n timeSlots.push({\n startDateTime: startDateLocal,\n endDateTime: endDateLocal,\n available: true,\n currentTimeSlot: false\n });\n });\n\n return timeSlots;\n }\n\n /**\n * Open terms and conditions modal.\n *\n * @param {Date} startDateTime\n */\n @action openTermsAndConditionsModal(startDateTime) {\n this.modals.showModal(TermsAndConditionsModal, {\n saveAction: () => this.args.saveAction(startDateTime),\n context: this.args.context\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (is-fulfilled @model)}}\\n
\\n
\\n
\\n \\n
\\n
\\n
{{@model.location.unitDescription}}
\\n
{{@model.location.streetAddress}}
\\n
{{@model.location.region}}
\\n
\\n
\\n {{#each @model.location.availableDetails as |detail|}}\\n {{! hide rent if = \\'-\\'. See location model}}\\n {{#if (not-eq detail.value \\'-\\')}}\\n
\\n
{{detail.value}}
\\n
{{detail.title}}
\\n
\\n {{/if}}\\n {{/each}}\\n
\\n {{#if @model.context.hasCommunitySiteMap}}\\n
\\n Community Site Map\\n
\\n {{/if}}\\n
\\n \\n
\\n{{else}}\\n \\n{{/if}}\",{ moduleName: \"unattended-showing/context/location/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n

Log In

\\n
\\n \\n \\n \\n \\n Reset password\\n \\n \\n \\n \\n
\\n \\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/login-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

Login to Self-Guided Tours

\\n
\\n
\\n
\\n {{!-- template-lint-disable require-input-label --}}\\n \\n
\\n
\\n {{!-- template-lint-disable require-input-label --}}\\n \\n
\\n
\\n
\\n \\n
Forgot your password? Reset it
\\n
\\n
\\n\\n\\n

Don\\'t have an account?

\\n
\\n Sign up for an account\\n
\\n
\\n\\n\\n\",{ moduleName: \"unattended-showing/context/login/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\",{ moduleName: \"unattended-showing/context/logout/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

Oops

\\n

The page you tried to reach is not available. That\\'s all we know, please go back to the property manager\\'s website to continue searching for properties.

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/not-found/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

Profile Page

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/profile-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n \\n
\\n \\n \\n \\n Change my password\\n \\n
\\n
\\n\\n\",{ moduleName: \"unattended-showing/context/profile/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

Credit Card Verification Page

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/sign-up-sgt3/credit-card-verification/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

SGT 3.0 placeholder

\\n

Sign-up Page

\\n
\\n \\n Return to home\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/sign-up-sgt3/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{outlet}}\",{ moduleName: \"unattended-showing/context/sign-up-sgt3/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

Sign Up for a Self-Guided Tours Account

\\n
\\n {{#each this.userInfoFields as |field|}}\\n \\n {{/each}}\\n\\n {{#each this.userPasswordFields as |field|}}\\n \\n {{/each}}\\n
\\n
\\n \\n
Already have an account? Login
\\n
\\n
\",{ moduleName: \"unattended-showing/context/sign-up/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{outlet}}\",{ moduleName: \"unattended-showing/context/sign-up/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n {{#each this.addressInfoFields as |field|}}\\n \\n {{/each}}\\n \\n\\n
\\n \\n
\\n
\",{ moduleName: \"unattended-showing/context/sign-up/verification/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n {{#if @icon}}\\n \\n {{/if}}\\n {{@text}}\\n\\n\",{ moduleName: \"unattended-showing/components/header-link.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './header-link.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\nexport default templateOnlyComponent();","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @showSGT3Header }}\\n \\n \\\"Dealer\\\"\\n \\n{{else}}\\n \\n \\n \\\"Dealer\\\"\\n \\n\\n \\n{{/if}}\\n\",{ moduleName: \"unattended-showing/components/app-header/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { computed, action } from '@ember/object';\n\n/**\n * Component for application header bar.\n */\nexport default class AppHeader extends Component {\n @service sgtSession;\n\n /**\n * Dealer logo's URL.\n *\n * @type {String}\n */\n get serverLogoUrl() {\n return this.args.serverLogoUrl ?? '';\n }\n\n /**\n * Whether menu items are collapsed in narrow windows.\n *\n * @type {Boolean}\n * @default true\n */\n @tracked isCollapsed = true;\n\n /**\n * Get the dealer logo's URL.\n *\n * @function\n * @returns {String}\n */\n @computed('serverLogoUrl')\n get logoUrl() {\n // If no dealer logo is provided, just show the PointCentral logo.\n return (\n this.serverLogoUrl ||\n 'https://alarmadmin.alarm.com//api/PublishedImage.ashx?guid=C7E50E3E-5E8C-4FC2-9F8F-042FA9A52572'\n );\n }\n\n /**\n * Get the logged-in user's name.\n *\n * @function\n * @returns {String}\n */\n @computed('sgtSession.{data.authenticated.userName,isAuthenticated}')\n get username() {\n return this.sgtSession.isAuthenticated\n ? this.sgtSession.data.authenticated.userName\n : 'Login';\n }\n\n /**\n * Set menu to collapsed state when user clicks on something.\n *\n * @function\n */\n @action handleClick() {\n this.isCollapsed = true;\n }\n\n /**\n * Toggles collapsed state.\n *\n * @function\n */\n @action toggleMenu() {\n this.isCollapsed = !this.isCollapsed;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n \\n \\n \\n {{outlet}}\\n \\n \\n
\",{ moduleName: \"unattended-showing/context/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n\\n
\\n
\\n
\\n

Self-Guided Tours:
The New Way to Tour

\\n

Say goodbye to keys in a key box

\\n

Builders and property managers, here is a way to increase showing hours, shorten vacancy periods, save money, and impress prospective residents and buyers.

\\n

Self-Guided Tours enables prospective residents and buyers to schedule a tour whenever it is convenient for them, using a temporary digital smart key that keeps all access secure and accountable.

\\n {{#each this.titleAreaCheckList as |item|}}\\n
\\n \\n {{item}}\\n
\\n {{/each}}\\n
\\n
\\n
\\n\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n {{#each this.howItWorksSteps as |step|}}\\n
\\n

{{step.step}}

\\n

{{step.text}}

\\n
\\n {{/each}}\\n
\\n
\\n\\n
\\n
\\n

A Solution for All Property Types

\\n
\\n
\\n
\\n \\n
\\n Builders\\n
\\n
\\n
\\n \\n
\\n Property Managers\\n
\\n
\\n {{#each this.solutionExplanation as |step|}}\\n
\\n
\\n
\\n \\n {{#if (not-eq step.icon \\\"phone\\\")}}\\n
\\n {{/if}}\\n
\\n
\\n
\\n {{#if step.homeOwner}}\\n
\\n {{/if}}\\n {{#if step.propertyManager}}\\n
\\n {{/if}}\\n
\\n

\\n {{step.header}}\\n
{{step.description}}\\n

\\n
\\n
\\n
\\n {{/each}}\\n
\\n
\\n\\n
\\n

Want a Free Demo?

\\n \\n
\\n\\n
\\n
\\n

FAQs

\\n {{#each this.faq as |section|}}\\n
\\n

{{section.section}}

\\n {{#each section.questions as |question|}}\\n
\\n \\n \\n
\\n
    \\n {{#each question.answers as |answer|}}\\n
  • {{answer}}
  • \\n {{/each}}\\n
\\n
\\n
\\n {{/each}}\\n
\\n {{/each}}\\n
\\n
\\n
\\n\\n \\n
\\n\",{ moduleName: \"unattended-showing/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\",{ moduleName: \"unattended-showing/loading/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

Oops

\\n

The page you tried to reach is not available. That\\'s all we know, please go back to the property manager\\'s website to continue searching for properties.

\\n
\",{ moduleName: \"unattended-showing/not-found/template.hbs\" })","import BaseAdapter from '@adc/app-infrastructure/adapters/base-adapter';\nimport { BuildURLMixin } from '@ember-data/adapter';\nimport { inject as service } from '@ember/service';\nimport { isEmpty } from '@ember/utils';\nimport { getCookie } from '@adc/ember-utils/utils/browser-helpers';\nimport {\n InvalidAntiForgeryToken,\n ServerProcessingError,\n ProcessingError\n} from '@adc/ajax/enums/AjaxResponseHttpCode';\n\n/**\n * @classdesc\n * Sets up properties for communicating with the backend.\n */\nexport default class ApplicationAdapter extends BaseAdapter.extend(\n BuildURLMixin\n) {\n @service notificationManager;\n @service sgtSession;\n\n /**\n * Namespace for API requests.\n */\n namespace = 'api';\n\n /**\n * Handles cases where AFG is invalid or login has expired. Application will reload\n * to get new AFG if AFG has expired or invalidate session if authentication JWT is expired.\n *\n * @param status {Number}\n * @param error {String}\n */\n handleError(status, error) {\n // Handle the case where an anti-forgery token is not valid\n // or is missing or if there is a server error. For either case,\n // we invalidate the current user session.\n if (\n status === ServerProcessingError ||\n status === InvalidAntiForgeryToken\n ) {\n this.notificationManager.addError(error);\n this.sgtSession.invalidate();\n }\n }\n\n /**\n * Expected request headers appended to each request.\n *\n * @override\n *\n * @function\n * @returns {{Accept: {String}, Content-Type: {String}, AjaxRequestUniqueKey: {String}, Authorization: {String}}}\n */\n get headers() {\n const headers = {\n Accept: 'application/vnd.api+json',\n 'Content-Type': 'application/json',\n AjaxRequestUniqueKey: getCookie('afg')\n };\n\n // Set Ember Simple Auth login token on header.\n const { token } = this.sgtSession.data.authenticated;\n if (!isEmpty(token)) {\n headers.Authorization = token;\n }\n\n return headers;\n }\n\n // region normalizing responses\n /**\n * @param {number} status\n * @param {Object} headers\n * @param {Object} payload\n *\n * @returns {Array} errors payload\n */\n normalizeErrorResponse(status, headers, payload) {\n payload = payload || { errors: null };\n const errors = payload.errors || [{ detail: null }];\n\n // Handle errors.\n errors.forEach((error) =>\n this.handleError(parseInt(error.status), error.detail)\n );\n\n const errorMessages = errors\n .map((error) => error.detail)\n .filter((error) => error);\n\n // Is this a processing error then add to notification manager.\n if (status === ProcessingError) {\n errors\n .filter(({ code }) => code === ProcessingError)\n .forEach(({ detail }) =>\n this.notificationManager.addError(detail)\n );\n\n return errors;\n }\n\n return errorMessages.length ? errorMessages : null;\n }\n\n /** @override **/\n findRecord(store, type, id, snapshot) {\n // If query parameters are passed in to findRecord, then send it along with GET request.\n if (snapshot.adapterOptions?.queryParams) {\n const url = this.buildURL(\n type.modelName,\n id,\n snapshot,\n 'findRecord'\n );\n\n return this.ajax(url, 'GET', {\n data: snapshot.adapterOptions.queryParams\n });\n }\n\n // Otherwise, just call base implementation.\n return super.findRecord(...arguments);\n }\n}\n","import require from 'require';\nfunction resolveInitializer(moduleName) {\n var module = require(moduleName, null, null, true);\n if (!module) {\n throw new Error(moduleName + ' must export an initializer.');\n }\n var initializer = module['default'];\n if (!initializer) {\n throw new Error(moduleName + ' must have a default export');\n }\n if (!initializer.name) {\n initializer.name = moduleName.slice(moduleName.lastIndexOf('/') + 1);\n }\n return initializer;\n}\nfunction registerInitializers(app, moduleNames) {\n for (var i = 0; i < moduleNames.length; i++) {\n app.initializer(resolveInitializer(moduleNames[i]));\n }\n}\nfunction registerInstanceInitializers(app, moduleNames) {\n for (var i = 0; i < moduleNames.length; i++) {\n app.instanceInitializer(resolveInitializer(moduleNames[i]));\n }\n}\nfunction _endsWith(str, suffix) {\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n}\n\n/**\n * Configure your application as it boots\n */\nexport default function loadInitializers(app, prefix) {\n var initializerPrefix = prefix + '/initializers/';\n var instanceInitializerPrefix = prefix + '/instance-initializers/';\n var initializers = [];\n var instanceInitializers = [];\n // this is 2 pass because generally the first pass is the problem\n // and is reduced, and resolveInitializer has potential to deopt\n var moduleNames = Object.keys(requirejs._eak_seen);\n for (var i = 0; i < moduleNames.length; i++) {\n var moduleName = moduleNames[i];\n if (moduleName.lastIndexOf(initializerPrefix, 0) === 0) {\n if (!_endsWith(moduleName, '-test')) {\n initializers.push(moduleName);\n }\n } else if (moduleName.lastIndexOf(instanceInitializerPrefix, 0) === 0) {\n if (!_endsWith(moduleName, '-test')) {\n instanceInitializers.push(moduleName);\n }\n }\n }\n registerInitializers(app, initializers);\n registerInstanceInitializers(app, instanceInitializers);\n}","import Application from '@ember/application';\nimport Resolver from 'ember-resolver';\nimport loadInitializers from 'ember-load-initializers';\nimport config from 'unattended-showing/config/environment';\n\n// Style imports for webpack\nimport './assets/styles/app.scss';\n\n// Imports for v2 addon styles\nimport '@adc/ui-components/addon.scss';\n\nexport default class App extends Application {\n modulePrefix = config.modulePrefix;\n podModulePrefix = config.podModulePrefix;\n Resolver = Resolver;\n}\n\nloadInitializers(App, config.modulePrefix);\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\n\n/**\n * @classdesc\n * The main application route.\n */\nexport default class ApplicationRoute extends Route {\n @service notificationManager;\n @service sgtSession;\n @service errorReporting;\n @service store;\n @service intl;\n @service router;\n\n async beforeModel() {\n this.intl.setLocale('en-US');\n await this.sgtSession.setup();\n }\n\n /** @override **/\n afterModel() {\n // Start Sentry Error Reporting\n this.errorReporting.initializeForSession();\n }\n\n /**\n * Error handler for the application.\n *\n * @param errors {Object}\n */\n @action error(errors) {\n let errorMessages = errors?.errors?.errors ?? errors?.errors ?? [];\n\n // Make sure errorMessages is an array.\n if (typeof errorMessages === 'string') {\n errorMessages = [errorMessages];\n }\n\n // Show the error message and then let the error reporting service handle it.\n errorMessages.forEach((error) =>\n this.notificationManager.addError(error)\n );\n\n // Redirect to error page.\n this.router.replaceWith('not-found', 'not-found');\n\n // Let error reporting report the error.\n throw errors;\n }\n}\n","\nimport { importSync as i, macroCondition, getGlobalConfig } from '@embroider/macros';\nlet w = window;\nlet d = w.define;\n\n\ni(\"./-embroider-implicit-modules.js\");\n\nd(\"unattended-showing/adapters/application\", function(){ return i(\"unattended-showing/adapters/application.js\");});\nd(\"unattended-showing/app\", function(){ return i(\"unattended-showing/app.js\");});\nd(\"unattended-showing/application/route\", function(){ return i(\"unattended-showing/application/route.js\");});\nd(\"unattended-showing/application/template\", function(){ return i(\"unattended-showing/application/template.hbs\");});\nd(\"unattended-showing/authenticators/credentials\", function(){ return i(\"unattended-showing/authenticators/credentials.js\");});\nd(\"unattended-showing/classes/base-route\", function(){ return i(\"unattended-showing/classes/base-route.js\");});\nd(\"unattended-showing/classes/protected-route\", function(){ return i(\"unattended-showing/classes/protected-route.js\");});\nd(\"unattended-showing/config/environment\", function(){ return i(\"unattended-showing/config/environment.js\");});\nd(\"unattended-showing/context/appointment-sgt3/controller\", function(){ return i(\"unattended-showing/context/appointment-sgt3/controller.ts\");});\nd(\"unattended-showing/context/appointment-sgt3/route\", function(){ return i(\"unattended-showing/context/appointment-sgt3/route.ts\");});\nd(\"unattended-showing/context/appointment-sgt3/template\", function(){ return i(\"unattended-showing/context/appointment-sgt3/template.hbs\");});\nd(\"unattended-showing/context/appointment/controller\", function(){ return i(\"unattended-showing/context/appointment/controller.js\");});\nd(\"unattended-showing/context/appointment/route\", function(){ return i(\"unattended-showing/context/appointment/route.js\");});\nd(\"unattended-showing/context/appointment/template\", function(){ return i(\"unattended-showing/context/appointment/template.hbs\");});\nd(\"unattended-showing/context/available-units-list-sgt3/route\", function(){ return i(\"unattended-showing/context/available-units-list-sgt3/route.ts\");});\nd(\"unattended-showing/context/available-units-list-sgt3/template\", function(){ return i(\"unattended-showing/context/available-units-list-sgt3/template.hbs\");});\nd(\"unattended-showing/context/available-units-list/controller\", function(){ return i(\"unattended-showing/context/available-units-list/controller.js\");});\nd(\"unattended-showing/context/available-units-list/route\", function(){ return i(\"unattended-showing/context/available-units-list/route.js\");});\nd(\"unattended-showing/context/available-units-list/template\", function(){ return i(\"unattended-showing/context/available-units-list/template.hbs\");});\nd(\"unattended-showing/context/change-password-sgt3/route\", function(){ return i(\"unattended-showing/context/change-password-sgt3/route.ts\");});\nd(\"unattended-showing/context/change-password-sgt3/template\", function(){ return i(\"unattended-showing/context/change-password-sgt3/template.hbs\");});\nd(\"unattended-showing/context/change-password/controller\", function(){ return i(\"unattended-showing/context/change-password/controller.js\");});\nd(\"unattended-showing/context/change-password/route\", function(){ return i(\"unattended-showing/context/change-password/route.js\");});\nd(\"unattended-showing/context/change-password/template\", function(){ return i(\"unattended-showing/context/change-password/template.hbs\");});\nd(\"unattended-showing/context/controller\", function(){ return i(\"unattended-showing/context/controller.js\");});\nd(\"unattended-showing/context/faq-sgt3/route\", function(){ return i(\"unattended-showing/context/faq-sgt3/route.ts\");});\nd(\"unattended-showing/context/faq-sgt3/template\", function(){ return i(\"unattended-showing/context/faq-sgt3/template.hbs\");});\nd(\"unattended-showing/context/faq/controller\", function(){ return i(\"unattended-showing/context/faq/controller.js\");});\nd(\"unattended-showing/context/faq/template\", function(){ return i(\"unattended-showing/context/faq/template.hbs\");});\nd(\"unattended-showing/context/forgot-password-sgt3/route\", function(){ return i(\"unattended-showing/context/forgot-password-sgt3/route.ts\");});\nd(\"unattended-showing/context/forgot-password-sgt3/template\", function(){ return i(\"unattended-showing/context/forgot-password-sgt3/template.hbs\");});\nd(\"unattended-showing/context/forgot-password/controller\", function(){ return i(\"unattended-showing/context/forgot-password/controller.js\");});\nd(\"unattended-showing/context/forgot-password/route\", function(){ return i(\"unattended-showing/context/forgot-password/route.js\");});\nd(\"unattended-showing/context/forgot-password/template\", function(){ return i(\"unattended-showing/context/forgot-password/template.hbs\");});\nd(\"unattended-showing/context/guest-phone-verification/controller\", function(){ return i(\"unattended-showing/context/guest-phone-verification/controller.ts\");});\nd(\"unattended-showing/context/guest-phone-verification/route\", function(){ return i(\"unattended-showing/context/guest-phone-verification/route.ts\");});\nd(\"unattended-showing/context/guest-phone-verification/template\", function(){ return i(\"unattended-showing/context/guest-phone-verification/template.hbs\");});\nd(\"unattended-showing/context/guest-sign-up/controller\", function(){ return i(\"unattended-showing/context/guest-sign-up/controller.ts\");});\nd(\"unattended-showing/context/guest-sign-up/route\", function(){ return i(\"unattended-showing/context/guest-sign-up/route.ts\");});\nd(\"unattended-showing/context/guest-sign-up/template\", function(){ return i(\"unattended-showing/context/guest-sign-up/template.hbs\");});\nd(\"unattended-showing/context/location-sgt3/controller\", function(){ return i(\"unattended-showing/context/location-sgt3/controller.ts\");});\nd(\"unattended-showing/context/location-sgt3/route\", function(){ return i(\"unattended-showing/context/location-sgt3/route.ts\");});\nd(\"unattended-showing/context/location-sgt3/template\", function(){ return i(\"unattended-showing/context/location-sgt3/template.hbs\");});\nd(\"unattended-showing/context/location/controller\", function(){ return i(\"unattended-showing/context/location/controller.js\");});\nd(\"unattended-showing/context/location/route\", function(){ return i(\"unattended-showing/context/location/route.js\");});\nd(\"unattended-showing/context/location/template\", function(){ return i(\"unattended-showing/context/location/template.hbs\");});\nd(\"unattended-showing/context/login-sgt3/controller\", function(){ return i(\"unattended-showing/context/login-sgt3/controller.ts\");});\nd(\"unattended-showing/context/login-sgt3/route\", function(){ return i(\"unattended-showing/context/login-sgt3/route.ts\");});\nd(\"unattended-showing/context/login-sgt3/template\", function(){ return i(\"unattended-showing/context/login-sgt3/template.hbs\");});\nd(\"unattended-showing/context/login/controller\", function(){ return i(\"unattended-showing/context/login/controller.js\");});\nd(\"unattended-showing/context/login/route\", function(){ return i(\"unattended-showing/context/login/route.js\");});\nd(\"unattended-showing/context/login/template\", function(){ return i(\"unattended-showing/context/login/template.hbs\");});\nd(\"unattended-showing/context/logout/route\", function(){ return i(\"unattended-showing/context/logout/route.js\");});\nd(\"unattended-showing/context/logout/template\", function(){ return i(\"unattended-showing/context/logout/template.hbs\");});\nd(\"unattended-showing/context/not-found/template\", function(){ return i(\"unattended-showing/context/not-found/template.hbs\");});\nd(\"unattended-showing/context/profile-sgt3/route\", function(){ return i(\"unattended-showing/context/profile-sgt3/route.ts\");});\nd(\"unattended-showing/context/profile-sgt3/template\", function(){ return i(\"unattended-showing/context/profile-sgt3/template.hbs\");});\nd(\"unattended-showing/context/profile/controller\", function(){ return i(\"unattended-showing/context/profile/controller.js\");});\nd(\"unattended-showing/context/profile/route\", function(){ return i(\"unattended-showing/context/profile/route.js\");});\nd(\"unattended-showing/context/profile/template\", function(){ return i(\"unattended-showing/context/profile/template.hbs\");});\nd(\"unattended-showing/context/redirect/route\", function(){ return i(\"unattended-showing/context/redirect/route.js\");});\nd(\"unattended-showing/context/route\", function(){ return i(\"unattended-showing/context/route.js\");});\nd(\"unattended-showing/context/sign-up-sgt3/credit-card-verification/route\", function(){ return i(\"unattended-showing/context/sign-up-sgt3/credit-card-verification/route.ts\");});\nd(\"unattended-showing/context/sign-up-sgt3/credit-card-verification/template\", function(){ return i(\"unattended-showing/context/sign-up-sgt3/credit-card-verification/template.hbs\");});\nd(\"unattended-showing/context/sign-up-sgt3/index/route\", function(){ return i(\"unattended-showing/context/sign-up-sgt3/index/route.ts\");});\nd(\"unattended-showing/context/sign-up-sgt3/index/template\", function(){ return i(\"unattended-showing/context/sign-up-sgt3/index/template.hbs\");});\nd(\"unattended-showing/context/sign-up-sgt3/template\", function(){ return i(\"unattended-showing/context/sign-up-sgt3/template.hbs\");});\nd(\"unattended-showing/context/sign-up/index/controller\", function(){ return i(\"unattended-showing/context/sign-up/index/controller.js\");});\nd(\"unattended-showing/context/sign-up/index/route\", function(){ return i(\"unattended-showing/context/sign-up/index/route.js\");});\nd(\"unattended-showing/context/sign-up/index/template\", function(){ return i(\"unattended-showing/context/sign-up/index/template.hbs\");});\nd(\"unattended-showing/context/sign-up/template\", function(){ return i(\"unattended-showing/context/sign-up/template.hbs\");});\nd(\"unattended-showing/context/sign-up/verification/controller\", function(){ return i(\"unattended-showing/context/sign-up/verification/controller.js\");});\nd(\"unattended-showing/context/sign-up/verification/route\", function(){ return i(\"unattended-showing/context/sign-up/verification/route.js\");});\nd(\"unattended-showing/context/sign-up/verification/template\", function(){ return i(\"unattended-showing/context/sign-up/verification/template.hbs\");});\nd(\"unattended-showing/context/template\", function(){ return i(\"unattended-showing/context/template.hbs\");});\nd(\"unattended-showing/index/controller\", function(){ return i(\"unattended-showing/index/controller.js\");});\nd(\"unattended-showing/index/route\", function(){ return i(\"unattended-showing/index/route.js\");});\nd(\"unattended-showing/index/template\", function(){ return i(\"unattended-showing/index/template.hbs\");});\nd(\"unattended-showing/instance-initializers/env-settings\", function(){ return i(\"unattended-showing/instance-initializers/env-settings.js\");});\nd(\"unattended-showing/loading/template\", function(){ return i(\"unattended-showing/loading/template.hbs\");});\nd(\"unattended-showing/models/appointment\", function(){ return i(\"unattended-showing/models/appointment.ts\");});\nd(\"unattended-showing/models/available-units-list\", function(){ return i(\"unattended-showing/models/available-units-list.js\");});\nd(\"unattended-showing/models/base-location\", function(){ return i(\"unattended-showing/models/base-location.ts\");});\nd(\"unattended-showing/models/context\", function(){ return i(\"unattended-showing/models/context.js\");});\nd(\"unattended-showing/models/country\", function(){ return i(\"unattended-showing/models/country.js\");});\nd(\"unattended-showing/models/credit-card-verification\", function(){ return i(\"unattended-showing/models/credit-card-verification.js\");});\nd(\"unattended-showing/models/external-identifier\", function(){ return i(\"unattended-showing/models/external-identifier.js\");});\nd(\"unattended-showing/models/guest-appointment\", function(){ return i(\"unattended-showing/models/guest-appointment.ts\");});\nd(\"unattended-showing/models/guest-sign-up\", function(){ return i(\"unattended-showing/models/guest-sign-up.ts\");});\nd(\"unattended-showing/models/location\", function(){ return i(\"unattended-showing/models/location.ts\");});\nd(\"unattended-showing/models/profile-password\", function(){ return i(\"unattended-showing/models/profile-password.js\");});\nd(\"unattended-showing/models/profile\", function(){ return i(\"unattended-showing/models/profile.ts\");});\nd(\"unattended-showing/models/sanitized-appointment\", function(){ return i(\"unattended-showing/models/sanitized-appointment.ts\");});\nd(\"unattended-showing/models/sign-up\", function(){ return i(\"unattended-showing/models/sign-up.js\");});\nd(\"unattended-showing/not-found/template\", function(){ return i(\"unattended-showing/not-found/template.hbs\");});\nd(\"unattended-showing/resolver\", function(){ return i(\"unattended-showing/resolver.js\");});\nd(\"unattended-showing/router\", function(){ return i(\"unattended-showing/router.js\");});\nd(\"unattended-showing/serializers/application\", function(){ return i(\"unattended-showing/serializers/application.js\");});\nd(\"unattended-showing/serializers/sign-up\", function(){ return i(\"unattended-showing/serializers/sign-up.js\");});\nd(\"unattended-showing/services/ajax\", function(){ return i(\"unattended-showing/services/ajax.js\");});\nd(\"unattended-showing/services/check-in\", function(){ return i(\"unattended-showing/services/check-in.js\");});\nd(\"unattended-showing/services/error-reporting\", function(){ return i(\"unattended-showing/services/error-reporting.js\");});\nd(\"unattended-showing/services/intl\", function(){ return i(\"unattended-showing/services/intl.js\");});\nd(\"unattended-showing/services/login-pending-booking\", function(){ return i(\"unattended-showing/services/login-pending-booking.ts\");});\nd(\"unattended-showing/services/mock-time\", function(){ return i(\"unattended-showing/services/mock-time.ts\");});\nd(\"unattended-showing/services/sgt-session\", function(){ return i(\"unattended-showing/services/sgt-session.ts\");});\nd(\"unattended-showing/session-stores/application\", function(){ return i(\"unattended-showing/session-stores/application.js\");});\nd(\"unattended-showing/transforms/hours-of-operation\", function(){ return i(\"unattended-showing/transforms/hours-of-operation.js\");});\nd(\"unattended-showing/utils/datetime-utils\", function(){ return i(\"unattended-showing/utils/datetime-utils.js\");});\nd(\"unattended-showing/utils/validators\", function(){ return i(\"unattended-showing/utils/validators.js\");});\nd(\"unattended-showing/services/dom\", function(){ return i(\"unattended-showing/services/dom.js\");});\nd(\"unattended-showing/services/adc-ajax\", function(){ return i(\"unattended-showing/services/adc-ajax.js\");});\nd(\"unattended-showing/services/adc-intl\", function(){ return i(\"unattended-showing/services/adc-intl.js\");});\nd(\"unattended-showing/adapters/base-adapter\", function(){ return i(\"unattended-showing/adapters/base-adapter.js\");});\nd(\"unattended-showing/adapters/base-json-api-content-adapter\", function(){ return i(\"unattended-showing/adapters/base-json-api-content-adapter.js\");});\nd(\"unattended-showing/adapters/base-micro-api-adapter\", function(){ return i(\"unattended-showing/adapters/base-micro-api-adapter.js\");});\nd(\"unattended-showing/models/base-model\", function(){ return i(\"unattended-showing/models/base-model.js\");});\nd(\"unattended-showing/models/locale\", function(){ return i(\"unattended-showing/models/locale.js\");});\nd(\"unattended-showing/models/micro-api-data-item\", function(){ return i(\"unattended-showing/models/micro-api-data-item.js\");});\nd(\"unattended-showing/models/micro-api-endpoint\", function(){ return i(\"unattended-showing/models/micro-api-endpoint.js\");});\nd(\"unattended-showing/serializers/base-serializer\", function(){ return i(\"unattended-showing/serializers/base-serializer.js\");});\nd(\"unattended-showing/serializers/common-serializer\", function(){ return i(\"unattended-showing/serializers/common-serializer.js\");});\nd(\"unattended-showing/serializers/polymorphic-serializer\", function(){ return i(\"unattended-showing/serializers/polymorphic-serializer.js\");});\nd(\"unattended-showing/services/base-engine-config\", function(){ return i(\"unattended-showing/services/base-engine-config.js\");});\nd(\"unattended-showing/services/base-error-reporting\", function(){ return i(\"unattended-showing/services/base-error-reporting.js\");});\nd(\"unattended-showing/services/browser\", function(){ return i(\"unattended-showing/services/browser.js\");});\nd(\"unattended-showing/services/context-manager\", function(){ return i(\"unattended-showing/services/context-manager.js\");});\nd(\"unattended-showing/services/cookie-manager\", function(){ return i(\"unattended-showing/services/cookie-manager.js\");});\nd(\"unattended-showing/services/env-settings\", function(){ return i(\"unattended-showing/services/env-settings.js\");});\nd(\"unattended-showing/services/locale\", function(){ return i(\"unattended-showing/services/locale.js\");});\nd(\"unattended-showing/services/native-bridge\", function(){ return i(\"unattended-showing/services/native-bridge.js\");});\nd(\"unattended-showing/services/performance-monitor\", function(){ return i(\"unattended-showing/services/performance-monitor.js\");});\nd(\"unattended-showing/services/session-activity\", function(){ return i(\"unattended-showing/services/session-activity.js\");});\nd(\"unattended-showing/services/websocket\", function(){ return i(\"unattended-showing/services/websocket.js\");});\nd(\"unattended-showing/transforms/array\", function(){ return i(\"unattended-showing/transforms/array.js\");});\nd(\"unattended-showing/transforms/nullable-boolean\", function(){ return i(\"unattended-showing/transforms/nullable-boolean.js\");});\nd(\"unattended-showing/initializers/setup-pikaday\", function(){ return i(\"unattended-showing/initializers/setup-pikaday.js\");});\nd(\"unattended-showing/initializers/setup-route-view\", function(){ return i(\"unattended-showing/initializers/setup-route-view.js\");});\nd(\"unattended-showing/initializers/setup-ui-components\", function(){ return i(\"unattended-showing/initializers/setup-ui-components.js\");});\nd(\"unattended-showing/services/accessibility\", function(){ return i(\"unattended-showing/services/accessibility.js\");});\nd(\"unattended-showing/services/modals\", function(){ return i(\"unattended-showing/services/modals.js\");});\nd(\"unattended-showing/services/notification-manager\", function(){ return i(\"unattended-showing/services/notification-manager.js\");});\nd(\"unattended-showing/vendor/qrcode\", function(){ return i(\"unattended-showing/vendor/qrcode.js\");});\nd(\"unattended-showing/services/cookies\", function(){ return i(\"unattended-showing/services/cookies.js\");});\nd(\"unattended-showing/utils/intl/missing-message\", function(){ return i(\"unattended-showing/utils/intl/missing-message.js\");});\nd(\"unattended-showing/instance-initializers/sentry-performance\", function(){ return i(\"unattended-showing/instance-initializers/sentry-performance.js\");});\nd(\"unattended-showing/data-adapter\", function(){ return i(\"unattended-showing/data-adapter.js\");});\nd(\"unattended-showing/initializers/ember-data-data-adapter\", function(){ return i(\"unattended-showing/initializers/ember-data-data-adapter.js\");});\nd(\"unattended-showing/adapters/-json-api\", function(){ return i(\"unattended-showing/adapters/-json-api.js\");});\nd(\"unattended-showing/initializers/ember-data\", function(){ return i(\"unattended-showing/initializers/ember-data.js\");});\nd(\"unattended-showing/instance-initializers/ember-data\", function(){ return i(\"unattended-showing/instance-initializers/ember-data.js\");});\nd(\"unattended-showing/serializers/-default\", function(){ return i(\"unattended-showing/serializers/-default.js\");});\nd(\"unattended-showing/serializers/-json-api\", function(){ return i(\"unattended-showing/serializers/-json-api.js\");});\nd(\"unattended-showing/serializers/-rest\", function(){ return i(\"unattended-showing/serializers/-rest.js\");});\nd(\"unattended-showing/services/store\", function(){ return i(\"unattended-showing/services/store.js\");});\nd(\"unattended-showing/transforms/boolean\", function(){ return i(\"unattended-showing/transforms/boolean.js\");});\nd(\"unattended-showing/transforms/date\", function(){ return i(\"unattended-showing/transforms/date.js\");});\nd(\"unattended-showing/transforms/number\", function(){ return i(\"unattended-showing/transforms/number.js\");});\nd(\"unattended-showing/transforms/string\", function(){ return i(\"unattended-showing/transforms/string.js\");});\nd(\"unattended-showing/services/-ensure-registered\", function(){ return i(\"unattended-showing/services/-ensure-registered.js\");});\nd(\"unattended-showing/breakpoints\", function(){ return i(\"unattended-showing/breakpoints.js\");});\nd(\"unattended-showing/initializers/ember-responsive-breakpoints\", function(){ return i(\"unattended-showing/initializers/ember-responsive-breakpoints.js\");});\nd(\"unattended-showing/services/media\", function(){ return i(\"unattended-showing/services/media.js\");});\nd(\"unattended-showing/component-managers/glimmer\", function(){ return i(\"unattended-showing/component-managers/glimmer.js\");});\nd(\"unattended-showing/initializers/app-version\", function(){ return i(\"unattended-showing/initializers/app-version.js\");});\nd(\"unattended-showing/metrics-adapters/base\", function(){ return i(\"unattended-showing/metrics-adapters/base.js\");});\nd(\"unattended-showing/metrics-adapters/google-analytics\", function(){ return i(\"unattended-showing/metrics-adapters/google-analytics.js\");});\nd(\"unattended-showing/services/metrics\", function(){ return i(\"unattended-showing/services/metrics.js\");});\nd(\"unattended-showing/initializers/container-debug-adapter\", function(){ return i(\"unattended-showing/initializers/container-debug-adapter.js\");});\nd(\"unattended-showing/initializers/ember-simple-auth\", function(){ return i(\"unattended-showing/initializers/ember-simple-auth.js\");});\nd(\"unattended-showing/instance-initializers/ember-simple-auth\", function(){ return i(\"unattended-showing/instance-initializers/ember-simple-auth.js\");});\nd(\"unattended-showing/services/session\", function(){ return i(\"unattended-showing/services/session.js\");});\nd(\"unattended-showing/routes/base-route\", function(){ return i(\"unattended-showing/routes/base-route.js\");});\nd(\"unattended-showing/routes/mixins/is-medium-width-page\", function(){ return i(\"unattended-showing/routes/mixins/is-medium-width-page.js\");});\n\n\n\n\n\nif (!runningTests) {\n i(\"../app\").default.create({\"name\":\"unattended-showing\",\"version\":\"1.0.0+3c8e4bd1\"});\n}\n\n","import RSVP from 'rsvp';\nimport Evented from '@ember/object/evented';\nimport EmberObject from '@ember/object';\n\n/**\n The base class for all authenticators. __This serves as a starting point for\n implementing custom authenticators and must not be used directly.__\n\n The authenticator authenticates the session. The actual mechanism used to do\n this might, e.g., post a set of credentials to a server and in exchange\n retrieve an access token, initiating authentication against an external\n provider like Facebook, etc. The details depend on the specific authenticator.\n Upon successful authentication, any data that the authenticator receives and\n resolves via the promise returned from the\n {{#crossLink \"BaseAuthenticator/authenticate:method\"}}{{/crossLink}}\n method is stored in the session and can be accessed via the session service\n to be used by the authorizer (see\n {{#crossLink \"BaseAuthorizer/authorize:method\"}}{{/crossLink}}) to e.g.,\n authorize outgoing requests.\n\n The authenticator also decides whether a set of data that was restored from\n the session store (see\n {{#crossLink \"BaseStore/restore:method\"}}{{/crossLink}}) makes up an\n authenticated session or not.\n\n __Authenticators for an application are defined in the `app/authenticators`\n directory__, e.g.:\n\n ```js\n // app/authenticators/oauth2.js\n import OAuth2PasswordGrantAuthenticator from 'ember-simple-auth/authenticators/oauth2-password-grant';\n\n export default class OAuth2Authenticator extends OAuth2PasswordGrantAuthenticator {\n ...\n }\n ```\n\n and can then be used via the name Ember CLI automatically registers for them\n within the Ember container.\n\n ```js\n // app/components/login-form.js\n import Component from '@ember/component';\n import { inject as service } from '@ember/service';\n import { action } from '@ember/object';\n\n export default class LoginFormComponent extends Component {\n @service session;\n\n @action\n authenticate() {\n this.session.authenticate('authenticator:oauth2');\n }\n }\n ```\n\n @class BaseAuthenticator\n @module ember-simple-auth/authenticators/base\n @extends Ember.Object\n @uses Ember.Evented\n @public\n*/\nexport default EmberObject.extend(Evented, {\n /**\n __Triggered when the authentication data is updated by the authenticator\n due to an external or scheduled event__. This might happen, e.g., if the\n authenticator refreshes an expired token or an event is triggered from an\n external authentication provider that the authenticator uses. The session\n handles that event, passes the updated data back to the authenticator's\n {{#crossLink \"BaseAuthenticator/restore:method\"}}{{/crossLink}}\n method and handles the result of that invocation accordingly.\n\n @event sessionDataUpdated\n @param {Object} data The updated session data\n @public\n */\n\n /**\n __Triggered when the authentication data is invalidated by the authenticator\n due to an external or scheduled event__. This might happen, e.g., if a token\n expires or an event is triggered from an external authentication provider\n that the authenticator uses. The session handles the event and will\n invalidate itself when it is triggered.\n\n @event sessionDataInvalidated\n @public\n */\n\n /**\n Restores the session from a session data object. __This method is invoked\n by the session either on application startup if session data is restored\n from the session store__ or when properties in the store change due to\n external events (e.g. in another tab) and the new session data needs to be\n validated for whether it constitutes an authenticated session.\n\n __This method returns a promise. A resolving promise results in the session\n becoming or remaining authenticated.__ Any data the promise resolves with\n will be saved in and accessible via the session service's\n `data.authenticated` property (see\n {{#crossLink \"SessionService/data:property\"}}{{/crossLink}}). A rejecting\n promise indicates that `data` does not constitute a valid session and will\n result in the session being invalidated or remaining unauthenticated.\n\n The `BaseAuthenticator`'s implementation always returns a rejecting\n promise. __This method must be overridden in subclasses.__\n\n @method restore\n @param {Object} data The data to restore the session from\n @return {Ember.RSVP.Promise} A promise that when it resolves results in the session becoming or remaining authenticated\n @public\n */\n restore() {\n return RSVP.reject();\n },\n\n /**\n Authenticates the session with the specified `args`. These options vary\n depending on the actual authentication mechanism the authenticator\n implements (e.g. a set of credentials or a Facebook account id etc.). __The\n session will invoke this method in order to authenticate itself__ (see\n {{#crossLink \"SessionService/authenticate:method\"}}{{/crossLink}}).\n\n __This method returns a promise. A resolving promise will result in the\n session becoming authenticated.__ Any data the promise resolves with will\n be saved in and accessible via the session service's `data.authenticated`\n property (see {{#crossLink \"SessionService/data:property\"}}{{/crossLink}}).\n A rejecting promise indicates that authentication failed and will result in\n the session remaining unauthenticated.\n\n The `BaseAuthenticator`'s implementation always returns a rejecting promise\n and thus never authenticates the session. __This method must be overridden\n in subclasses__.\n\n @method authenticate\n @param {Any} [...args] The arguments that the authenticator requires to authenticate the session\n @return {Ember.RSVP.Promise} A promise that when it resolves results in the session becoming authenticated\n @public\n */\n authenticate() {\n return RSVP.reject();\n },\n\n /**\n This method is invoked as a callback when the session is invalidated. While\n the session will invalidate itself and clear all authenticated session data,\n it might be necessary for some authenticators to perform additional tasks\n (e.g. invalidating an access token on the server side).\n\n __This method returns a promise. A resolving promise will result in the\n session becoming unauthenticated.__ A rejecting promise will result in\n invalidation being intercepted and the session remaining authenticated.\n\n The `BaseAuthenticator`'s implementation always returns a resolving promise\n and thus never intercepts session invalidation. __This method doesn't have\n to be overridden in custom authenticators__ if no actions need to be\n performed on session invalidation.\n\n @method invalidate\n @param {Object} data The current authenticated session data\n @param {Array} ...args additional arguments as required by the authenticator\n @return {Ember.RSVP.Promise} A promise that when it resolves results in the session being invalidated\n @public\n */\n invalidate() {\n return RSVP.resolve();\n }\n});\n","import Base from 'ember-simple-auth/authenticators/base';\nimport { inject as service } from '@ember/service';\nimport ApplicationAdapter from '../adapters/application';\n\n/**\n * @classdesc\n * Authenticator for Self-Guided Tours login.\n */\nexport default class CredentialsAuthenticator extends Base {\n @service ajax;\n\n /** @override **/\n async restore(data) {\n return Promise.resolve(data);\n }\n\n /** @override **/\n async authenticate(username, password) {\n let response;\n const adapter = ApplicationAdapter.create({});\n\n try {\n response = await this.ajax.request(\n this.ajax.apiBaseUrl + '/login',\n {\n body: JSON.stringify({\n username: username,\n password: password\n }),\n cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached\n credentials: 'same-origin', // include, same-origin, *omit\n headers: {\n 'content-type': 'application/json'\n },\n method: 'POST', // *GET, POST, PUT, DELETE, etc.\n mode: 'same-origin', // no-cors, cors, *same-origin\n redirect: 'follow', // manual, *follow, error\n referrer: window.location.href // *client, no-referrer\n }\n );\n } catch (exception) {\n response = {\n value: undefined,\n errors: adapter.normalizeErrorResponse(0, '', exception)\n };\n }\n\n // Get data in response from backend authentication request.\n const { value } = response;\n\n // Throw the error if response doesn't contain value expected.\n if (!value) {\n throw {\n errors: response.errors || [\n 'Unable to authenticate user. Please try again later.'\n ]\n };\n }\n\n // These values are expected by the application once the user is logged in.\n return {\n profileId: value.id,\n token: value.token\n };\n }\n}\n","import Route from '@ember/routing/route';\n\n/**\n * @classdesc\n * Base class for routes that automatically scrolls to the top of the page.\n */\nexport default class BaseRoute extends Route {\n activate() {\n super.activate();\n window.scrollTo(0, 0);\n }\n}\n","import BaseRoute from 'unattended-showing/classes/base-route';\nimport { inject as service } from '@ember/service';\n\n/**\n * @classdesc\n * Base class for all protected routes which ensures a user is logged in.\n */\nexport default class ProtectedRoute extends BaseRoute {\n @service sgtSession;\n\n beforeModel(transition) {\n this.sgtSession.requireAuthentication(transition, 'context.login');\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n \\\"Dealer\\\"\\n \\n

© {{this.copyrightYear}} {{this.poweredByName}}. All Rights Reserved.

\\n \\n
\\n\",{ moduleName: \"unattended-showing/components/app-footer/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\n\n/**\n * Component for application footer.\n */\nexport default class AppFooter extends Component {\n /**\n * Company name to display for who's powering the website.\n *\n * @type {String}\n */\n get poweredByName() {\n return this.args.poweredByName ?? 'Alarm.com';\n }\n\n /**\n * URL for website's privacy policy.\n *\n * @type {String}\n */\n @computed('args.hasPointCentralDealer')\n get privacyPolicyUrl() {\n return this.args.hasPointCentralDealer\n ? 'https://www.pointcentral.com/privacy-policy/'\n : 'https://alarm.com/privacy/';\n }\n\n /**\n * URL for website's terms of use.\n *\n * @type {String}\n */\n @computed('args.hasPointCentralDealer')\n get termsOfUseUrl() {\n return this.args.hasPointCentralDealer\n ? 'https://www.pointcentral.com/terms-of-use/'\n : 'https://www.alarm.com/terms_conditions.aspx/';\n }\n\n /**\n * URL for 'powered by' image.\n *\n * @type {String}\n */\n @computed('args.hasPointCentralDealer')\n get poweredByUrl() {\n return this.args.hasPointCentralDealer\n ? 'https://www.pointcentral.com/'\n : 'https://www.alarm.com/';\n }\n\n /**\n * Current year for copyright text.\n *\n * @type {Number}\n */\n copyrightYear = new Date().getFullYear();\n\n /**\n * Link for 'powered by' image.\n *\n * @type {String}\n */\n @computed('args.hasPointCentralDealer')\n get poweredByLogo() {\n return this.args.hasPointCentralDealer\n ? '/app/assets/images/poweredbyPC.png'\n : '/app/assets/images/powered_by_adc.png';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n \\n {{#each @field.subFields as |subField|}}\\n {{#if (eq subField.inputType \\'dropdown\\')}}\\n \\n {{else}}\\n \\n {{/if}}\\n {{/each}}\\n
\\n\\n {{#unless this.isValid}}\\n

\\n {{@field.errorMessage}}\\n

\\n {{/unless}}\\n
\\n\",{ moduleName: \"unattended-showing/components/input-form-row/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed, notifyPropertyChange } from '@ember/object';\nimport { action, get } from '@ember/object';\n\n/**\n * Create a new input row item.\n *\n * @param {String} label\n * @param {Array} subFields\n * @param {Function} validator\n * @param {String} errorMessage\n *\n * @returns {{label: String, subFields: Array<{Object}>, validator: {Function}, errorMessage: {String}}}\n */\nexport function createRowItem(label, subFields, validator, errorMessage) {\n return { label, subFields, validator, errorMessage };\n}\n\n/**\n * Create a new dropdown subfield.\n *\n * @param {String} propertyName\n * @param {String} placeHolder\n * @param {Function} valueChange\n * @param {Array} dropdownItems\n *\n * @returns {{inputType: String, propertyName: String, placeHolder: String, valueChange: Function, dropdownItems: Array}}\n */\nexport function createDropdownSubField(\n propertyName,\n valueChange,\n dropdownItems,\n placeHolder = ''\n) {\n return {\n inputType: 'dropdown',\n propertyName,\n placeHolder,\n valueChange,\n dropdownItems\n };\n}\n\n/**\n * Create a new input subfield.\n *\n * @param {String} inputType\n * @param {String} propertyName\n * @param {Number} maxLength\n *\n * @returns {{inputType: String, propertyName: String, maxLength: Number}}\n */\nexport function createNativeSubField(\n propertyName,\n inputType = 'text',\n maxLength = ''\n) {\n return { inputType, propertyName, maxLength };\n}\n\n/**\n * Component that shows rows of user input fields.\n */\nexport default class InputFormRow extends Component {\n /**\n * True if all of the validator functions that were passed in to the inputs are true, returns false otherwise.\n *\n * @type {boolean}\n */\n @computed('args.{field,model}')\n get isValid() {\n const { field = {}, model } = this.args,\n { validator = () => true, subFields = [] } = field;\n\n if (!model) {\n return true;\n }\n\n return subFields.every(({ propertyName }) =>\n validator(get(model, propertyName))\n );\n }\n\n /**\n * Call this action on change of an input. This will recompute the validity property that will update styling.\n */\n @action recomputeValidity() {\n notifyPropertyChange(this, 'args.model');\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n

{{@title}}

\\n

{{@description}}

\\n {{#if @error}}\\n

{{@error}}

\\n {{/if}}\\n
\\n {{#each @userInfoFields as |field|}}\\n \\n {{/each}}\\n\\n {{yield}}\\n
\\n
\\n\",{ moduleName: \"unattended-showing/components/input-form.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './input-form.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\nexport default templateOnlyComponent();","export default {\"modulePrefix\":\"unattended-showing\",\"environment\":\"production\",\"rootURL\":\"/app/\",\"locationType\":\"history\",\"apiBaseUrl\":\"/api\",\"isRemoteBuild\":true,\"EmberENV\":{\"EXTEND_PROTOTYPES\":false,\"FEATURES\":{},\"_APPLICATION_TEMPLATE_WRAPPER\":false,\"_DEFAULT_ASYNC_OBSERVERS\":true,\"_JQUERY_INTEGRATION\":false,\"_TEMPLATE_ONLY_GLIMMER_COMPONENTS\":true},\"APP\":{\"name\":\"unattended-showing\",\"version\":\"1.0.0+3c8e4bd1\"},\"metricsAdapters\":[{\"name\":\"GoogleAnalytics\",\"environments\":[\"production\"],\"config\":{\"id\":\"UA-81847905-3\"}}],\"ember-cli-mirage\":{\"enabled\":false,\"usingProxy\":false,\"useDefaultPassthroughs\":true},\"notificationManager\":{\"error\":{\"autoCloseDuration\":10000}},\"errorReporting\":{\"dsn\":\"https://34e22b3ab5a444bb8a46a780c15cf0e5@sentry.io/1458620\",\"environment\":\"production\",\"isEnabled\":true,\"showDebugInfo\":false}};","import Controller from '@ember/controller';\n\nexport default class AppointmenSgt3Controller extends Controller {\n queryParams = ['token'];\n token = null;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n undefined: AppointmenSgt3Controller;\n }\n}\n","import Route from '@ember/routing/route';\nimport Context from '../../models/context';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\n\ninterface ContextModel {\n context: Promise;\n}\n\n/**\n * @classdesc\n * Route for viewing and managing existing Self-Guided Tours appointments.\n */\nexport default class AppointmentSgt3Route extends Route {\n @service declare store: ServiceRegistry['store'];\n @service declare router: ServiceRegistry['router'];\n\n /**\n * @param model\n * @returns {{appointments: (model.appointment|Promise), context: (models.context|promise)}}\n */\n async model(params: { token: string }) {\n try {\n const contextModel = this.modelFor('context') as ContextModel;\n const context = await contextModel.context;\n const appointment = this.store.queryRecord(\n 'guest-appointment',\n params\n );\n\n return {\n appointment,\n context\n };\n } catch (error) {\n this.send('error', error);\n\n return {};\n }\n }\n\n /**\n * @param model\n * redirects to not-found page if context does not have SGT3 toggle.\n */\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import { computed, setProperties } from '@ember/object';\nimport Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\nimport startOfDay from 'date-fns/startOfDay';\nimport { getCommunitySiteMapObjectUrl } from 'unattended-showing/helpers/file-utils';\n\n/**\n * Main controller for appointment route.\n */\nexport default class AppointmentController extends Controller {\n @service sgtSession;\n @service store;\n @service router;\n @service ajax;\n @service checkIn;\n\n /**\n * Each Appointment is placed in a map, categorized by individual days. This gets the map key for the Appointment object.\n *\n * @param {models.Appointment} appointment\n * @type {number}\n */\n appointmentKey(appointment) {\n return startOfDay(new Date(appointment.dateTimeLocal)).valueOf();\n }\n\n /**\n * Get appointments filtered by filter function, sorted ascending, and placed into day-buckets.\n *\n * @param {function} filter\n * @param {Boolean} reverseDayOrder\n *\n * @type {Array<{day: {Date}, appointments: Array>}\n */\n async filteredAppointments(filter, reverseDayOrder = false) {\n const appointments = await this.model.appointments,\n context = await this.model.context;\n await Promise.all(\n appointments.map((a) => {\n const locationId = a.belongsTo('location').id();\n return this.store.findRecord('location', locationId, {\n adapterOptions: {\n queryParams: {\n systemGroupId: context.systemGroupId,\n loadAppointments: false\n }\n }\n });\n })\n );\n\n const appointmentMap = new Map();\n\n // Start with all of the user's appointments.\n // eslint-disable-next-line ember/no-array-prototype-extensions\n appointments\n .toArray()\n .filter(filter)\n .sort((a, b) => new Date(a.dateTimeUtc) - new Date(b.dateTimeUtc))\n .forEach((appointment) => {\n const key = this.appointmentKey(appointment);\n\n if (appointmentMap.has(key)) {\n appointmentMap.get(key).push(appointment);\n } else {\n appointmentMap.set(key, [appointment]);\n }\n });\n\n const appointmentObjects = [...appointmentMap].map(\n ([day, appointments]) => ({\n day: new Date(day),\n appointments\n })\n );\n\n if (reverseDayOrder) {\n return appointmentObjects.reverse();\n }\n\n return appointmentObjects;\n }\n\n /**\n * Get all of the user's upcoming appointments (including pending appointments).\n *\n * @type {Array<{day: {Date}, appointments: Array}>}\n */\n @computed('model.appointments.[]')\n get futureAppointments() {\n return this.filteredAppointments((appointment) => {\n // Return future appointments with non-empty date and location.\n return (\n !!appointment.current &&\n !!appointment.dateTimeUtc &&\n !!appointment.fullAddress\n );\n }, false);\n }\n\n /**\n * Get all of the user's past appointments (not including pending appointments).\n *\n * @type {Array<{day: {Date}, appointments: Array}>}\n */\n @computed('model.appointments.[]')\n get pastAppointments() {\n return this.filteredAppointments((appointment) => {\n // Return past appointments with non-empty date and location.\n return (\n !!appointment.past &&\n !!appointment.dateTimeUtc &&\n !!appointment.fullAddress\n );\n }, true);\n }\n\n /**\n * Delete appointment.\n *\n * @param {models.Appointment} appointment\n * @returns {models.Appointment|Promise}\n */\n @action async deleteAppointment(appointment) {\n try {\n await appointment.destroyRecord();\n location.reload();\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n \"We couldn't cancel your appointment.\"\n );\n }\n }\n\n /**\n * Check-in the user.\n *\n * @param {models.Appointment} appointment\n */\n @action async checkInAppointment(appointment) {\n const location = await appointment.location;\n const cpidEnabled = location.checkpointIdEnabled;\n await this.checkIn.appointmentCheckIn(location, appointment);\n\n if (cpidEnabled) {\n setProperties(appointment, {\n showCheckIn: false\n });\n\n this.goToLocation(appointment);\n } else {\n window.location.reload();\n }\n }\n\n /**\n * Send user the CPID verification.\n *\n * @param {models.Appointment} appointment\n */\n @action async reVerify(appointment) {\n await this.checkIn.sendCheckpointIdVerification(appointment.id);\n this.goToLocation(appointment);\n }\n\n /**\n * Transition to location page for appointment.\n *\n * @param {models.Appointment} appointment\n */\n @action goToLocation(appointment) {\n const locationId = appointment.belongsTo('location').id();\n\n if (locationId) {\n const contextId = appointment.subdomain;\n\n // If the subdomain is not populated, do not try to transition.\n if (!contextId) {\n return;\n }\n this.router.transitionTo('context.location', contextId, locationId);\n return;\n }\n }\n\n /**\n * Opens a new tab for the community site map.\n *\n * @function\n */\n @action async openCommunitySiteMap(groupId, ev) {\n ev.preventDefault();\n\n await getCommunitySiteMapObjectUrl(\n this.model.context,\n groupId,\n this.ajax\n );\n\n window.open(\n this.model.context.communitySiteMapObjectUrls[groupId],\n '_blank',\n 'noopener noreferrer'\n );\n }\n}\n","import ProtectedRoute from 'unattended-showing/classes/protected-route';\nimport { inject as service } from '@ember/service';\n\n/**\n * @classdesc\n * Route for viewing and managing existing Self-Guided Tours appointments.\n */\nexport default class AppointmentRoute extends ProtectedRoute {\n @service store;\n\n /**\n * @returns {{appointments: (model.appointment|Promise)}}\n */\n model() {\n const { context } = this.modelFor('context'),\n appointments = this.store.findAll('appointment');\n\n return {\n appointments,\n context\n };\n }\n}\n","import Route from '@ember/routing/route';\nimport Context from '../../models/context';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\n\ninterface ContextModel {\n context: Promise;\n}\n\n/**\n * @classdesc URL is /bookings-sgt3/ but we use AvailableUnitsList in the code.\n *\n * @class availableUnitsListSgt3.AvailableUnitsListSgt3Route\n * @extends Route\n *\n */\nexport default class AvailableUnitsListSgt3Route extends Route {\n @service declare store: ServiceRegistry['store'];\n @service declare router: ServiceRegistry['router'];\n\n /**\n * @param model\n * @returns {{availableUnitsList: (models.availableUnitsList|promise), context: (models.context|promise)}}\n */\n async model(model: { available_units_list_id: string | number }) {\n try {\n const contextModel = this.modelFor('context') as ContextModel;\n const context = await contextModel.context;\n const availableUnitsList = await this.store.findRecord(\n 'available-units-list',\n model.available_units_list_id\n );\n\n return {\n availableUnitsList,\n context\n };\n } catch (error) {\n this.send('error', error);\n\n return {};\n }\n }\n\n /**\n * @param model\n * redirects to not-found page if context does not have SGT3 toggle.\n */\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { getCommunitySiteMapObjectUrl } from 'unattended-showing/helpers/file-utils';\n\n/**\n * @classdesc\n * Controller for Self-Guided Tours availableUnitsList (bookings) page.\n */\nexport default class AvailableUnitsListController extends Controller {\n @service ajax;\n\n @tracked currentId = null;\n\n /**\n * Redirect user to the scheduling page for the selected location\n *\n * @function\n */\n @action redirectAction() {\n if (this.currentId != null) {\n var locationUrl = 'location/' + String(this.currentId);\n window.open(\n String(window.location).replace(/bookings.*/, locationUrl)\n );\n }\n }\n\n /**\n * Sets the id of the unit that is selected\n *\n * @function\n * @param {models.availableUnitsList.locations.id} locationId\n */\n @action selectLocation(locationId) {\n this.currentId = locationId;\n }\n\n /**\n * Opens a new tab for the community site map.\n *\n * @function\n */\n @action async openCommunitySiteMap(ev) {\n ev.preventDefault();\n\n await getCommunitySiteMapObjectUrl(\n this.model.context,\n this.model.context.systemGroupId,\n this.ajax\n );\n\n window.open(\n this.model.context.communitySiteMapObjectUrls[\n this.model.context.systemGroupId\n ],\n '_blank',\n 'noopener noreferrer'\n );\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\n/**\n * @classdesc Route for Self-Guided Tours Single Link Showings. URL is /bookings/ but we use AvailableUnitsList in the code.\n *\n * @class availableUnitsList.AvailableUnitsListRoute\n * @extends Route\n *\n */\nexport default class AvailableUnitsListRoute extends Route {\n /**\n * Inject notification manager to show messages.\n */\n @service notificationManager;\n @service store;\n @service cookies;\n\n /**\n * @param model\n * @returns {{availableUnitsList: (models.availableUnitsList|promise), context: (models.context|promise)}}\n */\n async model(model) {\n try {\n const context = this.modelFor('context').context;\n const availableUnitsList = await this.store.findRecord(\n 'available-units-list',\n model.available_units_list_id\n );\n\n // Construct availableUnitsList Url to restore if the user signs up,\n // but only store it if it is valid (both of the values below exist)\n const validUrl =\n context.id != null && availableUnitsList.id != null;\n\n if (validUrl) {\n const redirectUrl =\n '/' + context.id + '/bookings/' + availableUnitsList.id;\n this.cookies.write(\n 'ember_simple_auth-redirectTarget',\n redirectUrl\n );\n }\n\n return {\n availableUnitsList,\n context\n };\n } catch (error) {\n this.send('error', error);\n }\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport Context from '../../models/context';\n\nexport default class ChangePasswordSgt3Route extends Route {\n @service declare router: ServiceRegistry['router'];\n\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport {\n createRowItem,\n createNativeSubField\n} from '../../components/input-form-row/index';\nimport { inject as service } from '@ember/service';\nimport { validateTextInputPassword } from '../../utils/validators';\n\n/**\n * Controller for changing user's password.\n */\nexport default class ChangePasswordController extends Controller {\n @service notificationManager;\n @service sgtSession;\n @service ajax;\n @service router;\n\n /**\n * Query parameter.\n *\n * @type {[String]}\n */\n queryParams = ['token'];\n\n /**\n * Default token value.\n *\n * @type {String}\n * @default: null\n */\n @tracked token = null;\n\n /**\n * Returns data for template to generate required input fields.\n *\n * @function\n * @returns {Array<{label: {String}, subFields: Array<{inputType: {String}, propertyName: {String}}>, validator: {Function}, errorMessage: {String}}>}\n */\n get userPasswordInfoFields() {\n return [\n createRowItem(\n 'New Password',\n [createNativeSubField('password', 'password')],\n validateTextInputPassword,\n 'Password must contain at least eight characters, one number (0-9), and one capital letter.'\n ),\n createRowItem(\n 'Confirm Password',\n [createNativeSubField('confirmPassword', 'password')],\n validateTextInputPassword,\n 'Please enter the same password again.'\n )\n ];\n }\n\n /**\n * Saves new password.\n *\n * @param {models.ProfilePassword} model\n * @returns {models.ProfilePassword|promise}\n */\n @action save(model) {\n // Set token if it is provided as a query parameter to send along to server. This indicates a password reset.\n if (this.token) {\n this.model.profilePassword.set('token', this.token);\n }\n\n // Save new password.\n return model\n .save()\n .then(() => {\n this.token = null;\n this.router.transitionTo('context.login');\n this.notificationManager.addSuccess(\n 'Your password has been updated.'\n );\n })\n .catch((errors) => {\n return this.ajax.handleAjaxError(\n errors,\n 'Unable to update password. Please try again later.'\n );\n });\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n/**\n * Route for user password change.\n */\nexport default class ChangePasswordRoute extends Route {\n @service store;\n\n /**\n * Creates new ProfilePassword record.\n *\n * @returns {{profilePassword: (models.ProfilePassword|promise)}}\n */\n model() {\n return {\n profilePassword: this.store.createRecord('profile-password')\n };\n }\n\n /**\n * Deletes created model if not saving when exiting route.\n */\n deactivate() {\n this.currentModel.profilePassword.unloadRecord();\n }\n}\n","import Controller from '@ember/controller';\nimport ENV from 'unattended-showing/config/environment';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport { computed } from '@ember/object';\n\n/**\n * The main application controller. Responsible for loading dealer-specific styling.\n */\nexport default class ContextController extends Controller {\n @service router;\n\n @computed('router.currentRouteName')\n get showSGT3Header() {\n const { currentRouteName } = this.router;\n return (\n currentRouteName === 'context.login-sgt3' ||\n currentRouteName === 'context.guest-sign-up'\n );\n }\n\n /**\n * The root URL path for all SVG sprites.\n *\n * @type {String}\n */\n get svgSpriteRoot() {\n return htmlSafe(`${ENV.rootURL}assets/svg-sprites`);\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport Context from '../../models/context';\n\nexport default class FaqSgt3Route extends Route {\n @service declare router: ServiceRegistry['router'];\n\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { computed } from '@ember/object';\n\n/**\n * Controller for FAQ page.\n */\nexport default class FaqController extends Controller {\n /**\n *\n * Function that returns content for FAQ page.\n *\n * @function\n *\n * @returns {Array<{title: String, questions: Array<{title: String, answers: Array}>}>}\n */\n @computed('model.context.{hasPointCentralDealer,poweredByName}')\n get pageContents() {\n return (async () => {\n const poweredByName = await this.model.context.poweredByName;\n const forRentText = (await this.model.context.hasPointCentralDealer)\n ? ' for rent'\n : '';\n const noLongerAvailableText = (await this.model.context\n .hasPointCentralDealer)\n ? 'property has been recently reserved or leased'\n : 'property is no longer available';\n const unlockInstructions = (await this.model.context\n .hasPointCentralDealer)\n ? 'To unlock the door, enter your 6 digit lock code then press the (✔) or (*) key on the lower left corner of the keypad on the lock.'\n : 'To access: (1) if lock keypad has * or Schlage button, press it first. (2) Enter lock code. (3) Press * or Schlage button if present.';\n\n return [\n {\n title: 'Overview',\n questions: [\n {\n title: `How does ${poweredByName}’s Self-Guided Tours feature work?`,\n answers: [\n `After creating an account, you’ll have access to search all properties${forRentText} that have been loaded into the Self-Guided Tours feature by the property manager.`,\n 'After finding your desired property, you can view a calendar of available timeslots in which you can schedule a viewing.',\n 'After selecting a time on the calendar, you will receive a lock code for the front door lock which will be usable for the duration of your scheduled showing.',\n 'When your visit is complete, you’ll simply want to close and lock the door as you leave. That’s it!'\n ]\n },\n {\n title: `Is the property owned or managed by ${poweredByName}?`,\n answers: [\n `No. The property is owned and managed by the property manager independently from ${poweredByName}. ${poweredByName} is the technology provider that the property manager leverages to provide a Self-Guided Tours experience to their tenant prospects.`\n ]\n }\n ]\n },\n {\n title: 'Creating an Account',\n questions: [\n {\n title: 'Why won’t it let me create an account?',\n answers: [\n 'Make sure all requested information is filled out from the Identity verification page. All boxes are required to be completed for sign up.',\n 'Double check that your credit card number is entered correctly.',\n 'If you do not have a credit card, please contact the property manager to see if there are alternative methods for viewing the home.'\n ]\n },\n {\n title: `Does ${poweredByName} keep my Credit/Debit Card info on file?`,\n answers: [\n 'No. We will not store your credit card information after the verification check is complete.'\n ]\n },\n {\n title: 'What if I don’t have a credit card?',\n answers: [\n 'A debit or credit card will be required to create a Self-Guided Tours account for verification purposes. If you do not have a credit card, please contact the property manager for alternative methods of access to view the property.'\n ]\n },\n {\n title: 'Why do I need a credit card?',\n answers: [\n 'A credit card is required to schedule Self-Guided Tours to verify your stated identity.'\n ]\n }\n ]\n },\n {\n title: 'Viewing a Property',\n questions: [\n {\n title: 'Why can’t I find the property I’m looking for?',\n answers: [\n `It’s possible that the property is not integrated with ${poweredByName}’s website, or may no longer be available${forRentText}. If the property you are looking for cannot be found, please contact the property manager to confirm its availability.`\n ]\n },\n {\n title: 'Why won’t it let me schedule a showing on the property?',\n answers: [\n 'The ability to schedule a showing is dependent on wireless communication both in and outside of the home. In the event the lock is unable to communicate through the Self-Guided Tours app, please contact the property manager for alternative methods to schedule and view the property.',\n `Another reason may be that the ${noLongerAvailableText} but not removed yet. Please contact the property manager for alternative methods to schedule and view another property.`\n ]\n },\n {\n title: 'Why doesn’t my lock code unlock the lock?',\n answers: [\n 'Double check that you are trying to use the assigned lock code during the previously scheduled period of time.',\n 'Double check that you are using the correct lock code.',\n unlockInstructions,\n 'If the lock is unable to unlock, contact the property manager for assistance accessing the home.'\n ]\n },\n {\n title: 'Who do I contact if I notice something wrong at the property?',\n answers: [\n 'If you identify property damage, or any other items you feel should be reported, please contact the property manager.'\n ]\n },\n {\n title: 'Can I see a property more than once?',\n answers: [\n 'Yes. If the property is still available, you can feel free to schedule additional showings on a property you’ve already visited.'\n ]\n }\n ]\n }\n ];\n })();\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport SGTSession from 'unattended-showing/services/sgt-session';\nimport Context from '../../models/context';\n\ninterface ProhibitAuthentication {\n prohibitAuthentication(route: string): void;\n}\n\ntype SessionServiceWithProhibitAuthentication = SGTSession &\n ProhibitAuthentication;\n\nexport default class ForgotPasswordSgt3Route extends Route {\n @service declare router: ServiceRegistry['router'];\n @service declare sgtSession: SessionServiceWithProhibitAuthentication;\n\n beforeModel() {\n this.sgtSession.prohibitAuthentication('context.appointment');\n }\n\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\nimport ApplicationAdapter from '../../adapters/application';\n\n/**\n * @classdesc\n * Controller for sending password reset requests.\n */\nexport default class ForgotPasswordController extends Controller {\n @service ajax;\n @service notificationManager;\n\n /**\n * Submits password reset request.\n */\n @action async submit() {\n try {\n const { email, notificationManager } = this;\n\n // Send password reset request.\n const response = await this.ajax.request(\n this.ajax.apiBaseUrl + '/login/forgotPassword',\n {\n body: JSON.stringify({\n email: email\n }),\n cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached\n credentials: 'same-origin', // include, same-origin, *omit\n headers: {\n 'content-type': 'application/json'\n },\n method: 'POST', // *GET, POST, PUT, DELETE, etc.\n mode: 'same-origin', // no-cors, cors, *same-origin\n redirect: 'follow', // manual, *follow, error\n referrer: window.location.href // *client, no-referrer\n }\n );\n\n notificationManager.addSuccess(response);\n } catch (exception) {\n // Normalize errors.\n const adapter = ApplicationAdapter.create({});\n const errors = {\n errors: adapter.normalizeErrorResponse(0, '', exception)\n };\n\n (\n errors.errors || [\n 'Unable to request password reset. Please try again later.'\n ]\n ).forEach((error) => this.notificationManager.addError(error));\n\n return Promise.reject(errors.errors);\n }\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\n/**\n * Route for password reset.\n */\nexport default class ForgotPasswordRoute extends Route {\n @service sgtSession;\n\n beforeModel() {\n this.sgtSession.prohibitAuthentication('context.appointment');\n }\n}\n","import Controller from '@ember/controller';\nimport { action } from '@ember/object';\n\nexport default class GuestPhoneVerificationController extends Controller {\n @action\n handleVerificationCodeSubmit(): void {\n // Handle the submitted verification code.\n // TODO in POINT-4475\n }\n\n @action\n handleResendCode(code: string): void {\n console.log('User entered code: ' + code);\n // Handle the resend code action.\n // TODO in POINT-4475\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n 'context/guest-phone-verification': GuestPhoneVerificationController;\n }\n}\n","import Route from '@ember/routing/route';\n\nexport default class ContextGuestPhoneVerificationRoute extends Route {}\n","import Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport LoginPendingBookingService from 'unattended-showing/services/login-pending-booking';\nimport Ajax from 'unattended-showing/services/ajax';\nimport { tracked } from '@glimmer/tracking';\n// import GuestSignUp from 'unattended-showing/models/guest-sign-up';\nimport NotificationManager from '@adc/ui-components/services/notification-manager';\nimport {\n validatePhoneNumber,\n validateEmail\n} from 'unattended-showing/utils/validators';\nimport type { ModelFrom } from '../../../../customer-site/app/utils/type-utils';\nimport type GuestSignUpRoute from './route';\n\n/**\n * @classdesc\n * Controller for Guest Sign Up controller.\n */\nexport default class GuestSignUpController extends Controller {\n @service declare router: ServiceRegistry['router'];\n @service declare ajax: Ajax;\n @service declare store: ServiceRegistry['store'];\n @service declare loginPendingBooking: LoginPendingBookingService;\n @service declare notificationManager: NotificationManager;\n\n declare model: ModelFrom;\n\n @tracked firstName: string = '';\n @tracked lastName: string = '';\n @tracked email: string = '';\n @tracked phoneNumber: string = '';\n\n @action formatPhoneNumber(event: InputEvent) {\n const input = event.target as HTMLInputElement;\n let formattedNumber = input.value;\n\n // Remove non-numeric characters.\n formattedNumber = formattedNumber.replace(/\\D/g, '');\n\n // Ensure number is not longer than 10 digits.\n if (formattedNumber.length > 10) {\n formattedNumber = formattedNumber.substring(0, 10);\n }\n\n // Add dashes to the phone number.\n if (formattedNumber.length > 3 && formattedNumber.length <= 6) {\n formattedNumber = formattedNumber.replace(/(\\d{3})(\\d+)/, '$1-$2');\n } else if (formattedNumber.length > 6) {\n formattedNumber = formattedNumber.replace(\n /(\\d{3})(\\d{3})(\\d+)/,\n '$1-$2-$3'\n );\n }\n\n this.phoneNumber = formattedNumber;\n }\n\n /**\n * Sends user info to server.\n * If successful, transition to verify phone number page.\n */\n @action\n async signupAsGuest() {\n //Check that the user inputs are valid.\n try {\n if (!this.firstName || this.firstName.trim() === '') {\n this.notificationManager.addError('First name is required.');\n return;\n }\n\n if (this.firstName.length > 100) {\n this.notificationManager.addError(\n 'First name cannot be longer than 100 characters.'\n );\n return;\n }\n\n if (!this.lastName || this.lastName.trim() === '') {\n this.notificationManager.addError('Last name is required.');\n return;\n }\n\n if (this.lastName.length > 100) {\n this.notificationManager.addError(\n 'Last name cannot be longer than 100 characters.'\n );\n return;\n }\n\n if (!validatePhoneNumber(this.phoneNumber)) {\n this.notificationManager.addError(\n 'Valid U.S. phone number is required.'\n );\n return;\n }\n\n if (!validateEmail(this.email)) {\n this.notificationManager.addError('Valid email is required.');\n return;\n }\n\n if (this.email.length > 100) {\n this.notificationManager.addError(\n 'Email cannot be longer than 100 characters.'\n );\n return;\n }\n\n this.model.guestSignUp = this.store.createRecord('guest-sign-up', {\n firstName: this.firstName,\n lastName: this.lastName,\n email: this.email,\n phoneNumber: this.phoneNumber,\n systemGroupId: this.model.context?.systemGroupId\n });\n this.model.guestSignUp = await this.model.guestSignUp.save();\n\n /**\n * Do nothing.\n * We will transition to the Verify Phone page when after it is created.\n */\n } catch (error) {\n return this.ajax.handleAjaxError(\n error,\n 'Unable to sign up as guest.'\n );\n }\n }\n\n /**\n * Transitions route back to the login page.\n */\n @action async back(): Promise {\n try {\n this.router.transitionTo('context.login-sgt3');\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to go to login page. Please try again later.'\n );\n }\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n 'context/guest-sign-up': GuestSignUpController;\n }\n}\n","import Route from '@ember/routing/route';\nimport Context from '../../models/context';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\n\ninterface ContextModel {\n context: Promise;\n}\n\n/**\n * @classdesc Route for sign-up SGT3.\n */\nexport default class GuestSignUpRoute extends Route {\n @service declare store: ServiceRegistry['store'];\n @service declare router: ServiceRegistry['router'];\n\n /**\n * Returns model for new user sign-up.\n *\n * @returns {{context: (models.context|promise), guestSignUp: (models.GuestSignUp|promise), countries: (Array)}}\n */\n async model() {\n try {\n const contextModel = this.modelFor('context') as ContextModel;\n const context = await contextModel.context;\n const guestSignUp = this.store.createRecord('guest-sign-up');\n\n return { context, guestSignUp };\n } catch (error) {\n this.send('error', error);\n\n return {};\n }\n }\n\n /**\n * @param model\n * redirects to not-found page if context does not have SGT3 toggle.\n */\n async afterModel(model: { context: Context }) {\n if (!model.context || !model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import { action, computed, setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { ModelFrom } from '../../../../customer-site/app/utils/type-utils';\nimport { zonedTimeToUtc } from 'date-fns-tz';\nimport Controller from '@ember/controller';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type Appointment from 'unattended-showing/models/appointment';\nimport type LocationSgt3Route from './route';\nimport type SGTSession from 'unattended-showing/services/sgt-session';\n\nexport default class LocationController extends Controller {\n @service declare sgtSession: SGTSession;\n @service declare ajax: ServiceRegistry['ajax'];\n @service declare router: ServiceRegistry['router'];\n @service declare store: ServiceRegistry['store'];\n @service\n declare notificationManager: ServiceRegistry['notification-manager'];\n\n declare model: ModelFrom;\n\n /**\n * Settings for appointment-schedule component.\n *\n * @function\n * @returns {appointmentLength: Number, hoursOfOperationSchedule: List of timeblocks ({day: Number, startMinutesLocal: Number, endMinutesLocal: Number})}\n */\n @computed('model.context')\n get appointmentSettings() {\n const { appointmentLength, hoursOfOperationSchedule } =\n this.model.context || {};\n return {\n appointmentLength,\n hoursOfOperationSchedule\n };\n }\n\n /**\n * Creates a new appointment record.\n * @returns A new appointment record.\n */\n @computed('context', 'model.{context,location}', 'store')\n get appointment(): Promise {\n return (async () => {\n const location = await this.model.location;\n const newAppointment = this.store.createRecord('appointment', {\n context: this.model.context,\n location: location\n });\n return newAppointment;\n })();\n }\n\n /**\n * Steps to take when the user clicks Next on the Book a Tour screen.\n * @param tourDateTime Tour date and time selected by the user.\n * @param desiredMoveInDate Desired move-in date entered by the user.\n * @returns Void.\n */\n @action async bookTourNextAction(\n tourDateTime: Date,\n desiredMoveInDate: Date\n ): Promise {\n const appointment = await this.appointment,\n property = await this.model.location,\n context = await this.store.peekAll('context').objectAt(0),\n defaultErrorMsg =\n 'Unable to request Self-Guided Tours appointment. Please try again later.';\n\n if (!property || !context) {\n this.notificationManager.addError(defaultErrorMsg);\n return;\n }\n\n const appointmentUtcDate = zonedTimeToUtc(\n tourDateTime,\n property.timeZone\n ),\n activePendingIdVerification = property.reverificationRequired,\n geofenceEnabled = property.geofenceEnabled;\n\n setProperties(appointment, {\n dateTimeUtc: appointmentUtcDate,\n current: true,\n past: false,\n activePendingIdVerification: activePendingIdVerification,\n showCheckIn: geofenceEnabled,\n subdomain: context.id\n });\n\n // Redirect to the login route if user is not logged in.\n const profileId = this.sgtSession.data?.authenticated?.profileId;\n if (!this.sgtSession.isAuthenticated || !profileId) {\n this.router.transitionTo('context.login-sgt3');\n return;\n }\n\n // Redirect to credit card verification if user has not verified credit card\n // and the dealer requires that the credit card be verified.\n const profile = await this.store.findRecord('profile', profileId);\n if (context.showCCPage && !profile.creditCardValidated) {\n this.router.transitionTo(\n 'context.sign-up-sgt3.credit-card-verification'\n );\n return;\n }\n\n // TODO POINT-4484 & POINT-6907: User is sent to the Review & Book page before the appointment and desired move-in date are saved.\n console.log('Tour Time:', tourDateTime);\n console.log('Desired Move-In Date:', desiredMoveInDate);\n return;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n 'context/location-sgt3': LocationController;\n }\n}\n","import Route from '@ember/routing/route';\nimport Context from '../../models/context';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport SGTSession from 'unattended-showing/services/sgt-session';\n\ninterface ContextModel {\n context: Promise;\n}\n\n/**\n * @classdesc Route for unattended property locationsSGT3.\n */\nexport default class LocationSgt3Route extends Route {\n @service declare sgtSession: SGTSession;\n @service declare store: ServiceRegistry['store'];\n @service declare router: ServiceRegistry['router'];\n\n /**\n * @param model\n * @returns {{location: (models.location|promise), context: (models.context|promise)}}\n */\n async model(model: { location_id: string | number }) {\n try {\n const contextModel = this.modelFor('context') as ContextModel;\n const context = await contextModel.context;\n const location = await this.store.findRecord(\n 'location',\n model.location_id,\n {\n adapterOptions: {\n queryParams: { systemGroupId: context.systemGroupId }\n }\n }\n );\n let profile = null;\n const profileId = this.sgtSession.data?.authenticated?.profileId;\n if (profileId) {\n profile = await this.store.findRecord('profile', profileId);\n }\n\n return {\n context,\n location,\n profile\n };\n } catch (error) {\n this.send('error', error);\n\n return {};\n }\n }\n\n /**\n * @param model\n * redirects to not-found page if context does not have SGT3 toggle.\n */\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { computed, action, setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { zonedTimeToUtc } from 'date-fns-tz';\nimport { getCommunitySiteMapObjectUrl } from 'unattended-showing/helpers/file-utils';\n\n/**\n * @classdesc\n * Controller for Self-Guided Tours location page.\n */\nexport default class LocationController extends Controller {\n @service sgtSession;\n @service cookies;\n @service store;\n @service ajax;\n @service loginPendingBooking;\n @service checkIn;\n @service router;\n @service mockTime;\n\n @action\n handleImageError(event) {\n event.target.src = '../../assets/images/property-default-image.png';\n }\n\n /**\n * Settings for appointment-schedule component.\n *\n * @function\n * @returns {appointmentLength: Number, hoursOfOperationSchedule: List of timeblocks ({day: Number, startMinutesLocal: Number, endMinutesLocal: Number})}\n */\n @computed('model.context')\n get appointmentSettings() {\n const { appointmentLength, hoursOfOperationSchedule } =\n this.model.context;\n return {\n appointmentLength,\n hoursOfOperationSchedule\n };\n }\n\n /**\n * Gets user's current appointment at community or creates a new record if it does not exist.\n *\n * @function\n * @returns {models.Appointment}\n */\n @computed('context', 'model.location.hasAppointment')\n get appointment() {\n return (async () => {\n const location = await this.model.location;\n\n // Return existing appointment.\n if (location.hasAppointment) {\n return location.nextAppointment;\n }\n\n // Create a new one since one does not already exist.\n let newAppointment = this.store.createRecord('appointment');\n newAppointment.set('context', this.context);\n newAppointment.set('location', location);\n return newAppointment;\n })();\n }\n\n /**\n * Save new appointment. The Date passed in should be in the local timezone.\n * The Date passed to the backend should be UTC\n *\n * @function\n * @param {Date} date\n * @returns {models.Appointment|promise|null}\n */\n @action async save(date) {\n // Redirect to login route if user is not logged in.\n const context = await this.store.peekAll('context').objectAt(0),\n property = await this.model.location, // This is an ember object, timeZone is local.\n appointmentUtcDate = zonedTimeToUtc(date, property.timeZone),\n appointment = await this.appointment,\n activePendingIdVerification = property.reverificationRequired,\n geofenceEnabled = property.geofenceEnabled;\n\n // Try to save new appointment.\n setProperties(appointment, {\n dateTimeUtc: appointmentUtcDate,\n current: true,\n past: false,\n activePendingIdVerification: activePendingIdVerification,\n showCheckIn: geofenceEnabled,\n subdomain: context.id\n });\n\n if (!this.sgtSession.isAuthenticated) {\n this.loginPendingBooking.loadAppointment(appointment, property);\n this.router.transitionTo('context.login');\n return null;\n }\n\n // Redirect to credit card verification if user has not verified credit card and the dealer\n // requires that the credit card be verified.\n const profile = await this.store.findRecord(\n 'profile',\n this.sgtSession.data.authenticated.profileId\n );\n\n if (context.showCCPage && !profile.creditCardValidated) {\n this.router.transitionTo('context.sign-up.verification');\n return null;\n }\n\n try {\n await appointment.save();\n property.reload();\n window.scrollTo(0, 0);\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to request Self-Guided Tours appointment. Please try again later.'\n );\n }\n\n const tourWindowStart = new Date(\n appointmentUtcDate.getTime() - 5 * 60000\n );\n const withinTourWindow =\n tourWindowStart <= (this.mockTime.mockTime ?? new Date());\n\n // Send the CPID verification if user needs to be verified and it is not within tour time.\n if (property.reverificationRequired && !withinTourWindow) {\n await this.checkIn.sendCheckpointIdVerification(\n appointment.id,\n false\n );\n }\n }\n\n /**\n * Cancel existing appointment at location.\n *\n * @function\n * @returns {models.Appointment|promise}\n */\n @action async delete() {\n let appt = await this.appointment;\n\n try {\n await appt.destroyRecord();\n const location = await this.model.location;\n location.reload();\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to cancel Self-Guided Tours appointment. Please try again later.'\n );\n }\n }\n\n /**\n * Check-in the current appointment.\n */\n @action async checkInAppointment() {\n const appointment = await this.appointment;\n const property = await appointment.location;\n const cpidEnabled = await property.checkpointIdEnabled;\n await this.checkIn.appointmentCheckIn(property, appointment);\n\n if (cpidEnabled) {\n setProperties(appointment, {\n showCheckIn: false\n });\n } else {\n window.location.reload();\n }\n }\n\n /**\n * Send user the CPID verification.\n *\n * @function\n * @returns {models.Appointment|promise}\n */\n @action async reVerify() {\n const appointment = await this.appointment;\n await this.checkIn.sendCheckpointIdVerification(appointment.id);\n }\n\n /**\n * Opens a new tab for the community site map.\n *\n * @function\n */\n @action async openCommunitySiteMap(ev) {\n ev.preventDefault();\n\n await getCommunitySiteMapObjectUrl(\n this.model.context,\n this.model.context.systemGroupId,\n this.ajax\n );\n\n window.open(\n this.model.context.communitySiteMapObjectUrls[\n this.model.context.systemGroupId\n ],\n '_blank',\n 'noopener noreferrer'\n );\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\n/**\n * Route for unattended property locations.\n */\nexport default class LocationRoute extends Route {\n @service store;\n @service cookies;\n\n /**\n * @param model\n * @returns {{location: (models.location|promise), context: (models.context|promise)}}\n */\n async model(model) {\n try {\n const context = this.modelFor('context').context;\n const location = await this.store.findRecord(\n 'location',\n model.location_id,\n {\n adapterOptions: {\n queryParams: { systemGroupId: context.systemGroupId }\n }\n }\n );\n\n // Construct this location's Url to restore if the user signs up,\n // but only store it if it is valid (both of the values below exist)\n const validUrl = context.id != null && location.id != null;\n\n if (validUrl) {\n const redirectUrl =\n '/' + context.id + '/location/' + location.id;\n this.cookies.write(\n 'ember_simple_auth-redirectTarget',\n redirectUrl\n );\n }\n\n return {\n location,\n context\n };\n } catch (error) {\n this.send('error', error);\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport LoginPendingBookingService from 'unattended-showing/services/login-pending-booking';\nimport Ajax from 'unattended-showing/services/ajax';\nimport SGTSession from 'unattended-showing/services/sgt-session';\n\n/**\n * @classdesc\n * Controller for login route.\n */\nexport default class LoginController extends Controller {\n @service declare sgtSession: SGTSession;\n @service declare router: ServiceRegistry['router'];\n @service declare ajax: Ajax;\n @service\n declare loginPendingBooking: LoginPendingBookingService;\n declare model: { context: { id: string; systemGroupId: string } };\n\n /**\n * Stores messages from backend requests.\n */\n requestMessage = '';\n\n username?: string;\n password?: string;\n\n /**\n * Attempt to authenticate user.\n */\n @action async login(): Promise {\n const { username, password, sgtSession } = this,\n { context } = this.model;\n\n try {\n // Try to authenticate user against backend.\n await sgtSession.authenticate(\n 'authenticator:credentials',\n username!,\n password!,\n context.systemGroupId\n );\n this.router.transitionTo('context.profile', context.id);\n\n // Pending appointments are appointments the user tried to book before logging\n // in that should be automatically booked upon login.\n if (this.loginPendingBooking.hasPendingAppointments) {\n await this.loginPendingBooking.processPendingAppointments();\n }\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to login. Please try again later.'\n );\n }\n }\n\n /**\n * Transitions route to the signup page.\n */\n @action async signup(): Promise {\n const { context } = this.model;\n\n try {\n this.router.transitionTo('context.sign-up-sgt3', context.id);\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to sign up. Please try again later.'\n );\n }\n }\n\n /**\n * Transitions route to the continue as guest page.\n */\n @action async continueAsGuest(): Promise {\n const { context } = this.model;\n\n try {\n this.router.transitionTo('context.guest-sign-up', context.id);\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to continue as guest. Please try again later.'\n );\n }\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n 'context/login-sgt3': LoginController;\n }\n}\n","import Route from '@ember/routing/route';\nimport Context from '../../models/context';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\n\n/**\n * @classdesc Route for login SGT3 route.\n */\nexport default class LoginSgt3Route extends Route {\n @service declare router: ServiceRegistry['router'];\n\n /**\n * @param model\n * redirects to not-found page if context does not have SGT3 toggle.\n */\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\n\n/**\n * @classdesc\n * Controller for login route.\n */\nexport default class LoginController extends Controller {\n @service sgtSession;\n @service router;\n @service ajax;\n @service loginPendingBooking;\n\n /**\n * Stores messages from backend requests.\n *\n * @type {string}\n */\n requestMessage = '';\n\n username;\n password;\n\n /**\n * Attempt to authenticate user.\n *\n * @returns {Promise}\n */\n @action async login() {\n const { username, password, sgtSession } = this,\n { context } = this.model;\n\n try {\n // Try to authenticate user against backend.\n await sgtSession.authenticate(\n 'authenticator:credentials',\n username,\n password,\n context.systemGroupId\n );\n this.router.transitionTo('context.appointment', context.id);\n\n // Pending appointments are appointments the user tried to book before logging\n // in that should be automatically booked upon login.\n if (this.loginPendingBooking.hasPendingAppointments) {\n await this.loginPendingBooking.processPendingAppointments();\n }\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to login. Please try again later.'\n );\n }\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\n/**\n * @classdesc Route for login.\n */\nexport default class LoginRoute extends Route {\n @service sgtSession;\n\n beforeModel() {\n this.sgtSession.prohibitAuthentication('context.appointment');\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\n/**\n * Route for logging out user.\n */\nexport default class LogoutRoute extends Route {\n @service router;\n @service sgtSession;\n @service loginPendingBooking;\n\n /**\n * Logs out current user by invalidating session.\n */\n beforeModel() {\n const { sgtSession } = this,\n contextId = this.paramsFor('context').context_id;\n\n if (sgtSession.isAuthenticated) {\n Object.assign(sgtSession.data, { contextId });\n this.loginPendingBooking.resetAppointmentData();\n sgtSession.invalidate();\n return;\n }\n\n this.router.transitionTo('context.login', contextId);\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport Context from '../../models/context';\nimport SGTSession from 'unattended-showing/services/sgt-session';\n\ninterface ContextModel {\n context: Promise;\n}\n\ninterface ProfileSessionService extends SGTSession {\n data: {\n authenticated: {\n profileId: string;\n };\n };\n}\n\nexport default class ProfileSgt3Route extends Route {\n @service declare router: ServiceRegistry['router'];\n @service declare store: ServiceRegistry['store'];\n @service declare session: ProfileSessionService;\n\n /**\n * Returns profile model.\n *\n * @type {{profile: (models.Profile|promise)}}\n */\n async model() {\n try {\n const contextModel = this.modelFor('context') as ContextModel;\n const context = await contextModel.context;\n const countries = await this.store.findAll('country');\n const profile = await this.store.findRecord(\n 'profile',\n this.session.data.authenticated.profileId\n );\n\n return {\n profile,\n countries,\n context\n };\n } catch (error) {\n this.send('error', error);\n\n return {};\n }\n }\n\n async afterModel(model: { context: Context }) {\n if (!model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { computed } from '@ember/object';\nimport { action } from '@ember/object';\nimport {\n createRowItem,\n createNativeSubField\n} from '../../components/input-form-row/index';\nimport { inject as service } from '@ember/service';\nimport {\n validateTextInputCustomRegex,\n validateTextInputEmail\n} from '../../utils/validators';\n\n/**\n * @classdesc\n * Controller for user profile.\n */\nexport default class ProfileController extends Controller {\n @service notificationManager;\n @service ajax;\n @service modals;\n @service router;\n\n /**\n * Save profile model.\n *\n * @type {models.Profile|promise}\n */\n @action async save(profile) {\n try {\n const result = await profile.save();\n this.notificationManager.addSuccess(\n 'Your profile has been updated.'\n );\n return result;\n } catch (response) {\n this.ajax.handleAjaxError(\n response,\n 'Unable to update profile. Please try again later.'\n );\n }\n }\n\n /**\n * Deletes a user's account.\n *\n * @param {*} profile\n */\n @action delete(profile) {\n this.modals.showConfirmationDialog(\n 'Confirm Delete',\n 'Are you sure you want to delete your account?',\n {\n text: 'Confirm',\n css: 'delete-profile',\n action: async () => {\n try {\n await profile.destroyRecord();\n this.router.transitionTo('context.logout');\n } catch (response) {\n this.ajax.handleAjaxError(\n response,\n 'Unable to delete profile. Please try again later.'\n );\n }\n }\n }\n );\n }\n\n /**\n * Returns object for country data\n *\n * @type {Array<{zipValidator: {Function}}>}\n */\n @computed('model.countries')\n get zipValidators() {\n return this.model.countries.map((country) =>\n validateTextInputCustomRegex.bind(\n null,\n new RegExp(country.zipValidator)\n )\n );\n }\n\n /**\n * Returns data needed to construct user input form on template.\n *\n * @type {Array<{label: {String}, subFields: Array<{inputType: {String}, propertyName: {String}}>, validator: {Function}, errorMessage: {String}}>}\n */\n get userInfoFields() {\n const fnTextValidate = validateTextInputCustomRegex.bind(\n null,\n /[a-zA-Z]+/\n );\n const fnNumberValidate = validateTextInputCustomRegex.bind(\n null,\n /^[0-9]+$/\n );\n const postalCodeValidate = (input) =>\n this.zipValidators.some((validator) => validator(input));\n\n return [\n createRowItem(\n 'First name',\n [createNativeSubField('firstName')],\n fnTextValidate,\n 'Please enter your first name.'\n ),\n createRowItem(\n 'Last name',\n [createNativeSubField('lastName')],\n fnTextValidate,\n 'Please enter your last name.'\n ),\n createRowItem(\n 'Email',\n [createNativeSubField('email')],\n validateTextInputEmail,\n 'Please enter a valid email.'\n ),\n createRowItem(\n 'Mobile number',\n [createNativeSubField('mobileNumber', 'text', 11)],\n fnNumberValidate,\n 'Please enter a valid mobile number (include area code).'\n ),\n createRowItem(\n 'Postal code',\n [createNativeSubField('zipCode', 'text', 5)],\n postalCodeValidate,\n 'Please enter a valid postal code.'\n )\n ];\n }\n}\n","import ProtectedRoute from 'unattended-showing/classes/protected-route';\nimport { inject as service } from '@ember/service';\n\n/**\n * @classdesc\n * Route for user profile.\n */\nexport default class ProfileRoute extends ProtectedRoute {\n @service sgtSession;\n @service store;\n\n /**\n * Returns profile model.\n *\n * @type {{profile: (models.Profile|promise)}}\n */\n async model() {\n const countries = await this.store.findAll('country');\n\n return {\n profile: this.store.findRecord(\n 'profile',\n this.sgtSession.data.authenticated.profileId\n ),\n countries\n };\n }\n\n /**\n * Rollback model if not saving when exiting route.\n */\n async deactivate() {\n const profile = await this.currentModel.profile;\n if (profile.hasDirtyAttributes && !profile.isSaving) {\n profile.rollbackAttributes();\n }\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\n/**\n * Route for redirecting to location's scheduling page using dealer's external identifier.\n */\nexport default class RedirectRoute extends Route {\n @service store;\n @service router;\n\n /** @override **/\n model(param) {\n return {\n externalIdentifier: this.store.findRecord(\n 'external-identifier',\n param.external_identifier_id,\n {\n adapterOptions: {\n queryParams: {\n systemGroupId:\n this.modelFor('context').context.systemGroupId\n }\n }\n }\n )\n };\n }\n\n /** @override **/\n async afterModel(model) {\n const externalIdentifier = await model.externalIdentifier;\n this.router.transitionTo(\n 'context.location',\n externalIdentifier.internalId\n );\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\n\n/**\n * Calculate hex color code for luminance changes. Taken from: http://www.sitepoint.com/javascript-generate-lighter-darker-color/.\n *\n * @param {String} hex\n * @param {Number} lum\n *\n * @returns {String}\n *\n * @private\n */\nfunction changeBrightness(hex, lum) {\n // Validate hex string.\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex.replace(/(.)/g, '$1$1');\n }\n\n lum = lum || 0;\n\n // Convert to decimal and change luminosity.\n let rgb = '#',\n c;\n for (let i = 0; i < 3; ++i) {\n c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);\n rgb += ('00' + c).substr(c.length);\n }\n\n return rgb;\n}\n\n/**\n * @classdesc\n * Parent route for any pages that need dealer context.\n */\nexport default class ContextRoute extends Route {\n @service notificationManager;\n @service errorReporting;\n @service store;\n @service router;\n\n /**\n * @returns {{Context: (models.Context|Promise)}}\n */\n async model(param) {\n return {\n context: await this.store.findRecord('context', param.context_id)\n };\n }\n\n afterModel(model) {\n const dealerBrandedColor = model.context.backgroundColor;\n if (dealerBrandedColor) {\n const rootStyle = document.documentElement.style;\n rootStyle.setProperty(`--dealer-branded-color`, dealerBrandedColor);\n rootStyle.setProperty(\n `--dealer-branded-color-hover`,\n changeBrightness(dealerBrandedColor, -0.2)\n );\n }\n\n // Update favIcon.\n const favIcon = document.querySelector(\"link[rel*='icon']\");\n if (favIcon) {\n favIcon.href = `/app/assets/images/${\n model.context.hasPointCentralDealer ? 'pcfavicon' : 'adcfavicon'\n }.png`;\n }\n\n // Set context for Sentry error reporting\n this.errorReporting.setContext({\n user: {\n id: model.context.id\n },\n tags: model.context.toJSON(),\n extra: { model: model.context }\n });\n }\n\n @action error(error) {\n const context = this.store.peekAll('context').objectAt(0);\n\n if (context) {\n let errorMessages = error?.errors?.errors ?? error?.errors ?? [];\n\n // Make sure errorMessages is an array.\n if (typeof errorMessages === 'string') {\n errorMessages = [errorMessages];\n }\n\n // Show the error message first since we're handling the error here.\n errorMessages.forEach((error) =>\n this.notificationManager.addError(error.detail ?? error)\n );\n this.router.transitionTo('context.not-found', 'not-found');\n } else {\n // If no context was found, the error cannot be handled here. Let the application error route handle it.\n return true;\n }\n\n // Let error reporting service report it.\n throw error;\n }\n}\n","import ProtectedRoute from 'unattended-showing/classes/protected-route';\nimport { inject as service } from '@ember/service';\nimport Store from '@ember-data/store';\nimport Context from '../../../models/context';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\n\ninterface ContextModel {\n context: Promise;\n}\n\n/**\n * @classdesc\n * Verification sub-route for user sign-up.\n */\nexport default class CreditCardVerificationRoute extends ProtectedRoute {\n @service declare router: ServiceRegistry['router'];\n @service declare store: Store;\n\n /**\n * Creates new credit card verification model.\n */\n async model() {\n const contextModel = this.modelFor('context') as ContextModel;\n const context = await contextModel.context;\n const countries = await this.store.findAll('country');\n return {\n context,\n countries\n };\n }\n\n /**\n * @param model\n * redirects to not-found page if context does not have SGT3 toggle.\n */\n async afterModel(model: { context: Context }) {\n if (!model.context || !model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Route from '@ember/routing/route';\nimport Context from '../../../models/context';\nimport { inject as service } from '@ember/service';\nimport type { Registry as ServiceRegistry } from '@ember/service';\n\ninterface ContextModel {\n context: Promise;\n}\n\n/**\n * @classdesc Route for sign-up SGT3.\n */\nexport default class SignUpSgt3Route extends Route {\n @service declare store: ServiceRegistry['store'];\n @service declare router: ServiceRegistry['router'];\n\n /**\n * Returns model for new user sign-up.\n *\n * @returns {{context: (models.context|promise), signUp: (models.SignUp|promise), countries: (Array)}}\n */\n async model() {\n try {\n const contextModel = this.modelFor('context') as ContextModel;\n const context = await contextModel.context;\n const signUp = this.store.createRecord('sign-up');\n const countries = await this.store.findAll('country');\n signUp.set('profile', this.store.createRecord('profile'));\n signUp.set('password', this.store.createRecord('profile-password'));\n\n return { context, signUp, countries };\n } catch (error) {\n this.send('error', error);\n\n return {};\n }\n }\n\n /**\n * @param model\n * redirects to not-found page if context does not have SGT3 toggle.\n */\n async afterModel(model: { context: Context }) {\n if (!model.context || !model.context.useSGT3) {\n this.router.transitionTo('context.not-found', 'not-found');\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { computed, action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport {\n createRowItem,\n createNativeSubField\n} from '../../../components/input-form-row/index';\nimport {\n validateTextInputPassword,\n validateTextInputEmail,\n validateTextInputCustomRegex\n} from '../../../utils/validators';\n\n/**\n * Controller for personal-information sign-up sub-route.\n */\nexport default class SignUpPersonalInformationController extends Controller {\n @service sgtSession;\n @service cookies;\n @service store;\n @service router;\n @service ajax;\n @service loginPendingBooking;\n\n /**\n * Response message from server requests.\n *\n * @type {String}\n * @default ''\n */\n requestMessage = '';\n\n /**\n * Returns object for country data\n *\n * @function\n * @returns {Array<{zipValidator: {Function}}>}\n */\n @computed('model.countries')\n get zipValidators() {\n return this.model.countries.map((country) =>\n validateTextInputCustomRegex.bind(\n null,\n new RegExp('^' + country.zipValidator + '$')\n )\n );\n }\n\n /**\n * Returns fields needed for template to generate sign up fields for user's personal information.\n *\n * @function\n * @returns {Array<{label: {String}, subFields: Array<{inputType: {String}, propertyName: {String}}>, validator: {Function}, errorMessage: {String}}>}\n */\n @computed('zipValidators')\n get userInfoFields() {\n const fnTextValidate = validateTextInputCustomRegex.bind(\n null,\n /[a-zA-Z]+/\n );\n const fnNumberValidate = validateTextInputCustomRegex.bind(\n null,\n /^[0-9]+$/\n );\n const postalCodeValidate = (input) =>\n this.zipValidators.some((validator) => validator(input));\n\n return [\n createRowItem(\n 'First name',\n [createNativeSubField('firstName')],\n fnTextValidate,\n 'Please enter your first name.'\n ),\n createRowItem(\n 'Last name',\n [createNativeSubField('lastName')],\n fnTextValidate,\n 'Please enter your last name.'\n ),\n createRowItem(\n 'Email',\n [createNativeSubField('email')],\n validateTextInputEmail,\n 'Please enter a valid email.'\n ),\n createRowItem(\n 'Mobile number',\n [createNativeSubField('mobileNumber', 'text', 11)],\n fnNumberValidate,\n 'Please enter a valid mobile number (include area code).'\n ),\n createRowItem(\n 'Postal code',\n [createNativeSubField('zipCode', 'text', 6)],\n postalCodeValidate,\n 'Please enter a valid postal code.'\n )\n ];\n }\n\n /**\n * Returns fields needed for template to generate sign up fields for user's password.\n *\n * @function\n * @returns {Array<{label: {String}, subFields: Array<{inputType: {String}, propertyName: {String}}>, validator: {Function}, errorMessage: {String}}>}\n */\n get userPasswordFields() {\n return [\n createRowItem(\n 'Password',\n [createNativeSubField('password', 'password')],\n validateTextInputPassword,\n 'Password must contain at least eight characters, one number (0-9), and one capital letter.'\n ),\n createRowItem(\n 'Confirm password',\n [createNativeSubField('confirmPassword', 'password')],\n validateTextInputPassword,\n 'Please enter the same password again.'\n )\n ];\n }\n\n /**\n * Save new user profile.\n *\n * @param {models.SignUp} model\n * @returns {models.SignUp|promise}\n */\n @action async save(model) {\n const signUp = await model.signUp,\n profile = await model.signUp.profile,\n password = await model.signUp.password,\n { cookies, router } = this;\n\n // Save user profile and then transition to credit card verification route.\n try {\n await signUp.save();\n\n // Cache and restore redirect URL cookie value because authentication call will wipe it.\n const redirectUrl = this.cookies.read(\n 'ember_simple_auth-redirectTarget'\n );\n\n await this.sgtSession.authenticate(\n 'authenticator:credentials',\n profile.email,\n password.password\n );\n\n // If the redirect cookie was set before the authenticate call, then restore it.\n if (redirectUrl) {\n cookies.write('ember_simple_auth-redirectTarget', redirectUrl);\n }\n\n // If the dealer requires credit card verification, redirect to cc verification\n // Else if the user has a pending appointment (appointment selected prior to logging in),\n // then that appointment should be automatically booked.\n // Otherwise, redirect user to the saved cookie, if it exists.\n const context = await this.store.peekAll('context').objectAt(0);\n if (context.showCCPage) {\n router.transitionTo('context.sign-up.verification', context.id);\n } else if (this.loginPendingBooking.hasPendingAppointments) {\n await this.loginPendingBooking.processPendingAppointments();\n } else {\n // eslint-disable-next-line ember/no-array-prototype-extensions\n cookies.clear('ember_simple_auth-redirectTarget');\n router.transitionTo(\n redirectUrl || 'context.appointment',\n context.id\n );\n }\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable sign up new user.'\n );\n }\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { run } from '@ember/runloop';\n\n/**\n * @classdesc Personal Information sub-route for user sign-up.\n */\nexport default class SignUpPersonalInformationRoute extends Route {\n @service sgtSession;\n @service store;\n\n /**\n * Verify that user is not logged in; otherwise redirect user to appointments page. We do not use the UnauthenticatedRouteMixin\n * mixin here because we login the user after signing up. That mixin will cause the user to be redirected immediately.\n */\n beforeModel() {\n this.sgtSession.prohibitAuthentication('context.appointment');\n }\n\n /**\n * Returns model for new user sign-up.\n *\n * @returns {{signUp: (models.SignUp|promise)}}\n */\n async model() {\n const signUp = this.store.createRecord('sign-up');\n const countries = await this.store.findAll('country');\n signUp.set('profile', this.store.createRecord('profile'));\n signUp.set('password', this.store.createRecord('profile-password'));\n\n return { signUp, countries };\n }\n\n /**\n * Deletes created model if not saving when exiting route.\n */\n async deactivate() {\n const profile = await this.currentModel.signUp.profile;\n const password = await this.currentModel.signUp.password;\n\n // Need the explicit run loops here for unit tests.\n // Do not copy this deprecated usage. If you see this, please convert to using ember-lifeline.\n // eslint-disable-next-line ember/no-runloop\n run(() => profile.unloadRecord());\n // Do not copy this deprecated usage. If you see this, please convert to using ember-lifeline.\n // eslint-disable-next-line ember/no-runloop\n run(() => password.unloadRecord());\n // Do not copy this deprecated usage. If you see this, please convert to using ember-lifeline.\n // eslint-disable-next-line ember/no-runloop\n run(() => this.currentModel.signUp.unloadRecord());\n }\n}\n","import Controller from '@ember/controller';\nimport { computed, action } from '@ember/object';\nimport DropdownSelectItem from '@adc/ui-components/utils/dropdown-select-item';\nimport { inject as service } from '@ember/service';\nimport {\n createRowItem,\n createNativeSubField,\n createDropdownSubField\n} from '../../../components/input-form-row/index';\nimport { validateTextInputCustomRegex } from '../../../utils/validators';\n\n/**\n * Get DropdownSelectItem options for credit card expiration year.\n *\n * @function\n * @private\n * @static\n * @returns [Array]\n */\nfunction creditCardExpirationMonthOptions() {\n const monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ];\n\n return Array.from(new Array(12), (_, index) =>\n DropdownSelectItem.create({\n name:\n (index + 1).toLocaleString('en-US', {\n minimumIntegerDigits: 2\n }) +\n ' - ' +\n monthNames[index],\n value: index + 1\n })\n );\n}\n\n/**\n * Get DropdownSelectItem options for credit card expiration month.\n *\n * @function\n * @private\n * @static\n * @returns {Array}\n */\nfunction creditCardExpirationYearOptions() {\n const currentDate = new Date();\n\n return Array.from(new Array(11)).map((_, index) => {\n const newDate = new Date(currentDate);\n newDate.setFullYear(currentDate.getFullYear() + index);\n const year = newDate.getFullYear();\n\n return DropdownSelectItem.create({\n name: year,\n value: year\n });\n });\n}\n\n/**\n * Get DropdownSelectItem options for country dropdown.\n *\n * @function\n * @private\n * @static\n * @returns {Array}\n */\nfunction createCountryListItems(countryData) {\n return Object.keys(countryData).map((enumValue) =>\n DropdownSelectItem.create({\n name: countryData[enumValue].name,\n value: enumValue\n })\n );\n}\n\n/**\n * Get DropdownSelectItem options for states dropdown.\n *\n * @function\n * @private\n * @static\n * @returns {Array}\n */\nfunction createStateListItems(states) {\n return (states || []).map((name) =>\n DropdownSelectItem.create({\n name,\n value: name\n })\n );\n}\n\nconst fnTextValidate = validateTextInputCustomRegex.bind(null, /[a-zA-Z]+/);\nconst fnNumberValidate = validateTextInputCustomRegex.bind(null, /^[0-9]+$/);\n\n/**\n * @classdesc Verification controller for user sign-up.\n *\n * @class context.sign-up.verification.SignUpVerificationController\n * @extends Controller\n *\n */\nexport default class SignUpVerificationController extends Controller {\n @service cookies;\n @service store;\n @service ajax;\n @service loginPendingBooking;\n @service router;\n\n /**\n * Returns object for country data\n *\n * @function\n * @returns {Array<{name: {String}, states: Array, address: {zipLength: {Number}, zipValidator: {Function}}}>}\n */\n @computed('model.countries')\n get countryData() {\n // eslint-disable-next-line ember/no-array-prototype-extensions\n return this.model.countries\n .toArray()\n .map((country) => {\n return {\n [country.id]: {\n name: country.countryName,\n states: country.states,\n address: {\n zipLength: country.zipLength,\n zipValidator: validateTextInputCustomRegex.bind(\n null,\n new RegExp(country.zipValidator)\n )\n },\n zipFieldName: country.zipFieldName,\n stateFieldName: country.stateFieldName\n }\n };\n })\n .reduce(function (obj, item) {\n for (let key in item) obj[key] = item[key];\n return obj;\n }, {});\n }\n\n /**\n * Returns object for generating credit card verification user input fields.\n *\n * @function\n * @returns {Array<{label: {String}, subFields: Array<{inputType: {String}, propertyName: {String}, placeHolder: {String}, valueChange: {Function}, dropdownItems: Array, maxLength: {Number}}>, validator: {Function}, errorMessage: {String}}>}\n */\n @computed(\n 'countryData',\n 'model.creditCardVerification',\n 'updateModelProperty'\n )\n get userInfoFields() {\n return [\n createRowItem(\n 'First name',\n [createNativeSubField('firstName')],\n fnTextValidate,\n 'Please enter your first name.'\n ),\n createRowItem(\n 'Last name',\n [createNativeSubField('lastName')],\n fnTextValidate,\n 'Please enter your last name.'\n ),\n createRowItem(\n 'Card number',\n [createNativeSubField('cardNumber', 'text', 16)],\n fnNumberValidate,\n 'Please enter a valid credit card number.'\n ),\n createRowItem('Expiration', [\n createDropdownSubField(\n 'expirationMonth',\n this.updateModelProperty,\n creditCardExpirationMonthOptions(),\n 'Month'\n ),\n createDropdownSubField(\n 'expirationYear',\n this.updateModelProperty,\n creditCardExpirationYearOptions(),\n 'Year'\n )\n ]),\n createRowItem(\n 'Security code',\n [createNativeSubField('securityCode', 'password')],\n fnNumberValidate,\n 'Please enter the security code on the credit card.'\n ),\n createRowItem('Country', [\n createDropdownSubField(\n 'country',\n this.updateModelProperty,\n createCountryListItems(this.countryData),\n 'Country'\n )\n ])\n ];\n }\n\n /**\n * Returns object for generating billing address user input fields.\n *\n * @function\n * @returns {Array<{label: {String}, subFields: Array<{inputType: {String}, propertyName: {String}, placeHolder: {String}, valueChange: {Function}, dropdownItems: Array, maxLength: {Number}}>, validator: {Function}, errorMessage: {String}}>}\n */\n @computed(\n 'updateModelProperty',\n 'countryData',\n 'model.creditCardVerification.country'\n )\n get addressInfoFields() {\n const countryData = this.countryData;\n const selectedCountry = this.model.creditCardVerification.country;\n return selectedCountry === 0\n ? []\n : [\n createRowItem(\n 'Address',\n [createNativeSubField('address')],\n fnTextValidate,\n 'Please enter your address.'\n ),\n createRowItem(\n 'City',\n [createNativeSubField('city')],\n fnTextValidate,\n 'Please enter your city.'\n ),\n createRowItem(countryData[selectedCountry].stateFieldName, [\n createDropdownSubField(\n 'state',\n this.updateModelProperty,\n createStateListItems(\n countryData[selectedCountry].states\n ),\n countryData[selectedCountry].stateFieldName\n )\n ]),\n createRowItem(\n countryData[selectedCountry].zipFieldName,\n [\n createNativeSubField(\n 'zipCode',\n 'text',\n countryData[selectedCountry].address.zipLength\n )\n ],\n countryData[selectedCountry].address.zipValidator,\n `Please enter your ${countryData[selectedCountry].zipFieldName}.`\n )\n ];\n }\n\n /**\n * Sends user credit card information to backend server to be verified.\n *\n * @function\n * @param {models.CreditCardVerification} model\n * @returns {models.CreditCardVerification|promise}\n */\n @action async save(model) {\n // Send credit card information to backend and redirect to profile route if successful.\n try {\n let creditCardVerification = await model.creditCardVerification;\n await creditCardVerification.save();\n\n // Remove cached versions of profile so next time we read, we grab a new version which should contain\n // fresh cc validation state.\n this.store.unloadAll('profile');\n const redirectUrl = this.cookies.read(\n 'ember_simple_auth-redirectTarget'\n );\n // eslint-disable-next-line ember/no-array-prototype-extensions\n this.cookies.clear('ember_simple_auth-redirectTarget');\n if (this.loginPendingBooking.hasPendingAppointments) {\n await this.loginPendingBooking.processPendingAppointments();\n } else {\n this.router.transitionTo(redirectUrl || 'context.profile');\n }\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to verify credit card information. Please try again later.'\n );\n }\n }\n\n /**\n * Helper action to set model properties. Used by the ADC dropdown on-change.\n *\n * @function\n * @param model\n * @param property\n * @param value\n */\n updateModelProperty(model, property, value) {\n model.set(property, value);\n }\n}\n","import ProtectedRoute from 'unattended-showing/classes/protected-route';\nimport { inject as service } from '@ember/service';\n\n/**\n * @classdesc\n * Verification sub-route for user sign-up.\n */\nexport default class SignUpVerificationRoute extends ProtectedRoute {\n @service store;\n\n /**\n * Creates new credit card verification model.\n *\n * @returns {{creditCardVerification: (models.CreditCardVerification|promise)}}\n */\n async model() {\n const countries = await this.store.findAll('country');\n return {\n creditCardVerification: this.store.createRecord(\n 'credit-card-verification'\n ),\n countries\n };\n }\n\n /**\n * Deletes created model if not saving when exiting route.\n */\n async deactivate() {\n const creditCardVerificationModel = await this.currentModel\n .creditCardVerification;\n creditCardVerificationModel.unloadRecord();\n }\n}\n","/**\n * Create an object url from a data url.\n *\n * @param {string} dataUrl\n * @returns {string} The object url\n */\nexport function dataUrlToObjectUrl(dataUrl) {\n if (!dataUrl) {\n return null;\n }\n\n const data = dataUrl.split(',');\n const byteString = window.atob(data[1]);\n const fileType = data[0].split(':')[1].split(';')[0];\n\n const bytes = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n bytes[i] = byteString.charCodeAt(i);\n }\n\n const file = new Blob([bytes.buffer], { type: fileType });\n return URL.createObjectURL(file);\n}\n\n/**\n * Gets the community site map object url and caches it in the context.\n *\n * @param {ContextModel} context\n * @param {Number} groupId\n * @param {Ajax} ajax\n */\nexport async function getCommunitySiteMapObjectUrl(context, groupId, ajax) {\n // Initialize cache if undefined.\n if (!context.communitySiteMapObjectUrls) {\n context.communitySiteMapObjectUrls = {};\n }\n\n // Fetch the map if it is not cached.\n // There can be multiple upcoming appointments from different groups with different maps.\n if (!(groupId in context.communitySiteMapObjectUrls)) {\n const dataUrl = await ajax.apiRequest(`/fileUploads/map/${groupId}`);\n\n context.communitySiteMapObjectUrls[groupId] = dataUrlToObjectUrl(\n dataUrl.value\n );\n }\n}\n","import Controller from '@ember/controller';\nimport ENV from 'unattended-showing/config/environment';\nimport { htmlSafe } from '@ember/template';\n\nexport default class LandingPageController extends Controller {\n /**\n * The root URL path for all SVG sprites.\n *\n * @type {String}\n */\n get svgSpriteRoot() {\n return htmlSafe(`${ENV.rootURL}assets/svg-sprites`);\n }\n\n /**\n * Returns check list items for title area section of landing page.\n *\n * @type {Array<{String}>}\n */\n get titleAreaCheckList() {\n return [\n 'Around 30% of prospects who stop by a leasing office find the leasing office closed',\n \"Over 40% of U.S. adults have searched for an apartment in the last two years, yet four in ten have passed on an apartment because they couldn't find time to see it\"\n ];\n }\n\n /**\n * Returns \"How it Works\" steps for landing page.\n *\n * @type {{step: string, text: string}[]}\n */\n get howItWorksSteps() {\n return [\n 'Enable Self-Guided Tours links on your property page',\n 'Prospective resident finds a property online and schedules Self-Guided Tours via the Self-Guided Tours link',\n 'The renter receives a confirmation text with a temporary lock code to access the property',\n 'A notification is sent to the property manager or builder letting them know it is being viewed',\n 'When the tour is complete, the temporary digital smart key is deleted and another notification is sent to the property manager or builder, allowing them to follow up with the prospective resident'\n ].map((text, idx) => ({\n step: idx + 1,\n text\n }));\n }\n\n get solutionExplanation() {\n return [\n {\n id: 1,\n header: 'Self-Guided Tours',\n description:\n 'Prospective homeowners or renters can schedule a tour whenever convenient with a user code that keeps all access secure and accounted for.',\n icon: 'touchpad-lock',\n homeOwner: true,\n propertyManager: true\n },\n {\n id: 2,\n header: 'Operational Efficiencies and Asset Protection',\n description:\n \"Self-Guided Tours, keyless locks that don't need to be rekeyed, leak detectors, HVAC efficiency and predictive notifications, curb to couch access control,\" +\n ' and other services help your staff save time and money, while also helping operators better protect assets.',\n icon: 'thermostat',\n propertyManager: true\n },\n {\n id: 3,\n header: 'Resident Amenity',\n description:\n 'Keyless access, HVAC savings and add-ons like video cameras or monitored life safety services provide in-demand amenities that short and long term renters are looking for.',\n icon: 'lock',\n propertyManager: true\n },\n {\n id: 4,\n header: 'Upsell Options',\n description:\n 'Provide an easy upgrade path to professionally monitored security, life safety, and video monitoring.',\n icon: 'video',\n homeOwner: true,\n propertyManager: true\n },\n {\n id: 5,\n header: 'Single App Experience',\n description:\n \"Seamlessly integrate with homeowners' devices. Control the system through one application, via computer, tablet or smartphone.\",\n icon: 'phone',\n homeOwner: true,\n propertyManager: true\n }\n ];\n }\n\n /**\n * Returns FAQ items for landing page. Each question must have a unique id in order for dropdown tabs to work.\n *\n * @type {Array<{section: {String}, questions: Array<{id: {Number}, question: {String}, answers: Array<{String}>}>}>}\n */\n get faq() {\n return [\n {\n section: 'Overview',\n questions: [\n {\n id: 1,\n question:\n 'How does Alarm.com’s Self-Guided Tours feature work?',\n answers: [\n 'After creating an account, you’ll have access to search all properties that have been loaded into the Self-Guided Tours feature by the property manager.',\n 'After finding your desired property, you can view a calendar of available timeslots in which you can schedule a viewing.',\n 'After selecting a time on the calendar, you will receive a lock code for the front door lock which will be usable for the duration of your scheduled showing.',\n 'When your visit is complete, you’ll simply want to close and lock the door as you leave. That’s it!'\n ]\n },\n {\n id: 2,\n question: 'Do Prospects need to download an app?',\n answers: [\n 'No app is needed. Simply input the code that is emailed to you in the lock at the property.'\n ]\n },\n {\n id: 3,\n question: 'Is Wi-Fi needed?',\n answers: [\n 'No, you can implement Self-Guided Tours with a cellular lock and a hub.'\n ]\n },\n {\n id: 4,\n question:\n 'Is the property owned or managed by Alarm.com?',\n answers: [\n 'No, the property is owned and managed by the property manager independently from Alarm.com. Alarm.com is the technology provider that the property manager leverages to provide a self-guided tour to their tenant prospects.'\n ]\n }\n ]\n },\n {\n section: 'Creating an Account',\n questions: [\n {\n id: 5,\n question: 'Why won’t it let me create an account?',\n answers: [\n 'Make sure all requested information is filled out from the Identity verification page. All boxes are required to be completed for sign up.',\n 'Double check that your credit card number is entered correctly.',\n 'If you do not have a credit card, please contact the property manager to see if there are alternative methods for viewing the home.'\n ]\n },\n {\n id: 6,\n question:\n 'Does Alarm.com keep my Credit/Debit Card info on file?',\n answers: [\n 'No, we will not store your credit card information after the verification check is complete.'\n ]\n },\n {\n id: 7,\n question: \"What if I don't have a credit card?\",\n answers: [\n 'A debit or credit card will be required to create a Self-Guided Tours account for verification purposes. If you do not have a credit card, please contact the property manager for alternative methods of access to view the property.'\n ]\n },\n {\n id: 8,\n question: 'Why do I need a credit card?',\n answers: [\n 'A credit card is required to schedule Self-Guided Tours to verify your stated identity.'\n ]\n }\n ]\n },\n {\n section: 'Viewing a Property',\n questions: [\n {\n id: 9,\n question:\n 'Why can’t I find the property I’m looking for?',\n answers: [\n 'It’s possible that the property is not integrated with Alarm.com’s website, or may no longer be available. If the property you are looking for cannot be found, please contact the property manager to confirm its availability.'\n ]\n },\n {\n id: 10,\n question:\n 'Why won’t it let me schedule a showing on the property?',\n answers: [\n 'The ability to schedule a showing is dependent on wireless communication both in and outside of the home. In the event the lock is unable to communicate through the Self-Guided Tours app, please contact the property manager for alternative methods to schedule and view the property.',\n 'Another reason may be that the property is no longer available but not removed yet. Please contact the property manager for alternative methods to schedule and view another property.'\n ]\n },\n {\n id: 11,\n question: 'Why doesn’t my lock code unlock the lock?',\n answers: [\n 'Double check that you are trying to use the assigned lock code during the previously scheduled period of time.',\n 'Double check that you are using the correct lock code.',\n 'To access: (1) if lock keypad has * or Schlage button, press it first. (2) Enter lock code. (3) Press * or Schlage button if present.',\n 'If the lock in unable to unlock, contact the property manager for assistance accessing the home.'\n ]\n },\n {\n id: 12,\n question:\n 'Who do I contact if I notice something wrong at the property?',\n answers: [\n 'If you identify property damage, or any other items you feel should be reported, please contact the property manager.'\n ]\n },\n {\n id: 13,\n question: 'Can I see a property more than once?',\n answers: [\n 'Yes, if the property is still available, then feel free to schedule additional showings on a property you’ve already visited.'\n ]\n }\n ]\n }\n ];\n }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class IndexRoute extends Route {\n @service router;\n @service metrics;\n\n constructor(...args) {\n super(...args);\n\n const { router } = this;\n\n this.metrics.trackPage({\n page: router.currentURL,\n title: router.currentRouteName || 'unknown'\n });\n }\n}\n","import ENV from 'unattended-showing/config/environment';\n\n/**\n * Environment settings instance initializer\n *\n * @param {Ember.ApplicationInstance} applicationInstance\n */\nexport function initialize(applicationInstance) {\n let envSettings = applicationInstance.lookup('service:envSettings');\n if (envSettings) {\n envSettings.setEnvironment(ENV);\n }\n}\n\nexport default {\n initialize\n};\n","import Model, { attr, belongsTo } from '@ember-data/model';\nimport { computed } from '@ember/object';\nimport { alias } from '@ember/object/computed';\n\nimport type Location from './location';\nimport type Context from './context';\nimport type { AsyncBelongsTo } from '@ember-data/model';\n\n/**\n * @classdesc\n * Model for user appointment data.\n */\nexport default class Appointment extends Model {\n /**\n * Date appointment was created.\n */\n @attr('date') declare createdAt: Date;\n\n /**\n * Date appointment was updated.\n */\n @attr('date') declare updatedAt: Date;\n\n /**\n * Appointment lock code.\n */\n @attr('string') declare userCode: string;\n\n /**\n * Code for onsite non-ADC integrated gate.\n */\n @attr('string') declare gateCode: string;\n\n /**\n * Appointment date and time. The dateTimeUtc passed from the backend should be in UTC.\n * Note: This time will be converted to the browser's local time.\n */\n @attr('date') declare dateTimeUtc: Date;\n\n /**\n * Appointment date and time in system's local timezone as a string for displaying.\n * The `dateTimeLocal` property creates a date time object from this string, so use\n * that object when displaying the local date time of an appointment for the end-user.\n */\n @attr('string') declare localAppointmentStartTime: string;\n\n /**\n * Whether the appointment is an upcoming appointment.\n */\n @attr('boolean') declare activePendingIdVerification: boolean;\n\n /**\n * Appointment location.\n */\n @belongsTo('location', { async: true, inverse: null })\n declare location: AsyncBelongsTo;\n\n /**\n * Appointment's dealer.\n */\n @belongsTo('context', { async: true, inverse: null })\n declare context: AsyncBelongsTo;\n\n /**\n * Whether the appointment is a current appointment (i.e. not expired).\n */\n @attr('boolean') declare current: boolean;\n\n /**\n * Whether the appointment is a past appointment (i.e. completed successfully).\n */\n @attr('boolean') declare past: boolean;\n\n /**\n * Returns street address of associated location.\n */\n @alias('location.streetAddress')\n declare streetAddress: Location['streetAddress'];\n\n /**\n * Returns region of associated location.\n */\n @alias('location.region') declare region: Location['region'];\n\n /**\n * Returns full address of associated location.\n */\n @alias('location.fullAddress') declare fullAddress: Location['fullAddress'];\n\n /**\n * Appointment subdomain.\n */\n @attr('string') declare subdomain: string;\n\n /**\n * Whether the check-in button should be displayed.\n */\n @attr('boolean') declare showCheckIn: boolean;\n\n /**\n * Returns the timezone of the appointment.\n */\n @computed('location.timeZone')\n get timeZone(): string {\n // DO NOT COPY THIS, PLEASE IMPLEMENT THE SUGGESTION AND TEST.\n // @ts-expect-error `location` is async so we have to await it before we query it's properties.\n return this.location.timeZone;\n }\n\n /**\n * Local appointment date and time.\n */\n @computed('localAppointmentStartTime')\n get dateTimeLocal(): Date {\n return new Date(this.localAppointmentStartTime);\n }\n\n /**\n * Appointment length.\n */\n @attr('number') declare length: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n appointment: Appointment;\n }\n}\n","import BaseLocation from './base-location';\nimport { hasMany } from '@ember-data/model';\n\n/**\n * @classdesc\n * Model for storing Self-Guided Tours availableUnitsList (Single Link Showings) information.\n */\nexport default class AvailableUnitsList extends BaseLocation {\n /**\n * List of properties in this Self-Guided Tours group.\n *\n * @type {model.Location[]}\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('location', { async: true })\n locations;\n}\n","import Model, { attr, belongsTo } from '@ember-data/model';\nimport { computed } from '@ember/object';\nimport { bool } from '@ember/object/computed';\n\nimport type Appointment from './appointment';\nimport type { AsyncBelongsTo } from '@ember-data/model';\n\n/**\n * @classdesc\n * Base model for common data in models.Location.\n */\nexport default class BaseLocation extends Model {\n /**\n * Street address line 1 for Self-Guided Tours location.\n */\n @attr('string')\n declare street1: string;\n\n /**\n * Street address line 2 for Self-Guided Tours location.\n */\n @attr('string')\n declare street2: string;\n\n /**\n * City for Self-Guided Tours location address.\n */\n @attr('string')\n declare city: string;\n\n /**\n * State for Self-Guided Tours location address.\n */\n @attr('string')\n declare state: string;\n\n /**\n * Zip code for Self-Guided Tours location address.\n */\n @attr('string')\n declare zipCode: string;\n\n /**\n * URL of picture for Self-Guided Tours location.\n */\n @attr('string')\n declare pictureUrl: string;\n\n /**\n * Current user's appointment slot.\n */\n @belongsTo('appointment', { async: true, inverse: null })\n declare nextAppointment: AsyncBelongsTo;\n\n /**\n * Time zone of Self-Guided Tours location.\n */\n @attr('string')\n declare timeZone: string;\n\n /**\n * Abbreviation of the time zone of Self-Guided Tours location.\n */\n @attr('string')\n declare timeZoneAbbreviation: string;\n\n /**\n * Returns the appointment ID if the user has an appointment scheduled at this location.\n */\n @bool('nextAppointment.id')\n declare hasAppointment: boolean;\n\n /**\n * If the unit requires photo verification in order to tour\n */\n @attr('boolean')\n declare checkpointIdEnabled: boolean;\n\n /**\n * Whether this location has geofencing enabled.\n */\n @attr('boolean')\n declare geofenceEnabled: boolean;\n\n /**\n * If the user needs to be verified\n */\n @attr('boolean')\n declare reverificationRequired: boolean;\n\n /**\n * UserId\n */\n @attr('string')\n declare userId: string;\n\n /**\n * GroupId\n */\n @attr('string')\n declare groupId: string;\n\n /**\n * Location ID for CheckpointID\n */\n @attr('string')\n declare checkpointIDLocationID: string;\n\n /**\n * API Key for CheckpointID\n */\n @attr('string')\n declare checkpointIDApiKey: string;\n\n /**\n * Returns the street address of the location.\n */\n @computed('street1', 'street2')\n get streetAddress(): string {\n if (!this.street2) {\n return this.street1;\n }\n return `${this.street1}, ${this.street2}`;\n }\n\n /**\n * Returns the region portion of the location.\n */\n @computed('city', 'state', 'zipCode')\n get region(): string {\n return `${this.city}, ${this.state} ${this.zipCode}`;\n }\n\n /**\n * Returns the full address of the location.\n */\n @computed('streetAddress', 'region')\n get fullAddress(): string {\n return `${this.streetAddress}, ${this.region}`;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'base-location': BaseLocation;\n }\n}\n","import Model, { attr } from '@ember-data/model';\nimport { get } from '@ember/object';\n\n/**\n * @classdesc\n * Model for loading dealer-specific branding and styling.\n */\nexport default class ContextModel extends Model {\n /**\n * Color of application body.\n *\n * @type {String}\n */\n @attr('string')\n backgroundColor;\n\n /**\n * URL of dealer logo.\n *\n * @type {String}\n */\n @attr('string')\n logoUrl;\n\n /**\n * Length of Self-Guided Tours appointments. Default is 90 minutes.\n *\n * @type {Number}\n * @default 90\n */\n @attr('number', { defaultValue: 90 })\n appointmentLength;\n\n /**\n * System Group ID for context.\n *\n * @type {number}\n */\n @attr('number')\n systemGroupId;\n\n /**\n * Does the dealer require credit card verification\n *\n * @type {boolean}\n */\n @attr('boolean')\n showCCPage;\n\n /**\n * Is the dealer a PointCentral dealer?\n *\n * @type {boolean}\n */\n @attr('boolean')\n hasPointCentralDealer;\n\n /**\n * What name should we show as powering the website?\n *\n * @type {String}\n */\n @attr('string')\n poweredByName;\n\n /**\n * Whether there is a community site map.\n *\n * @type {boolean}\n */\n @attr('boolean')\n hasCommunitySiteMap;\n\n /**\n * Whether there are terms and conditions a prospect must accept in order to book a tour.\n *\n * @type {boolean}\n */\n @attr('boolean')\n hasTermsAndConditions;\n\n /**\n * Cache for community site map object urls for different groups.\n * The Appointments page can have upcoming apppointments for different groups with different maps.\n *\n * @type {Object.}\n */\n @attr()\n communitySiteMapObjectUrls;\n\n /**\n * Object url for the terms and conditions file.\n *\n * @type {String}\n */\n @attr('string')\n termsAndConditionsObjectUrl;\n\n /**\n * Schedule for available tour times.\n *\n * @type {object}\n */\n @attr('hours-of-operation')\n hoursOfOperationSchedule;\n\n /**\n * Whether the group context can use Self-Guided Tours 3.0.\n *\n * @type {boolean}\n */\n @attr('boolean', { defaultValue: false })\n useSGT3;\n\n toJSON() {\n const json = {};\n this.eachAttribute((a) => (json[a] = get(this, a)));\n return json;\n }\n}\n","import Model, { attr } from '@ember-data/model';\n\n/**\n * @classdesc\n * Model for storing countries Self-Guided Tours is available in.\n */\nexport default class Country extends Model {\n /**\n * Name of country\n *\n * @type {String}\n */\n @attr('string')\n countryName;\n\n /**\n * Array of states for country\n *\n * @type {Array}\n */\n @attr()\n states;\n\n /**\n * Name of \"Zip\" type field for country\n *\n * @type {String}\n */\n @attr('string')\n zipFieldName;\n\n /**\n * Name of \"State\" type field for country\n *\n * @type {String}\n */\n @attr('string')\n stateFieldName;\n\n /**\n * Required length for zip/postal code for country\n *\n * @type {Number}\n */\n @attr('number')\n zipLength;\n\n /**\n * Regex, as a string, for zip/postal code validation\n *\n * @type {String}\n */\n @attr('string')\n zipValidator;\n}\n","import Model, { attr } from '@ember-data/model';\n\n/**\n * Model for storing credit card validation information.\n */\nexport default class CreditCardVerification extends Model {\n /**\n * First name on credit card.\n *\n * @type {String}\n */\n @attr('string')\n firstName;\n\n /**\n * Last name on credit card.\n *\n * @type {String}\n */\n @attr('string')\n lastName;\n\n /**\n * Credit card number.\n *\n * @type {Number}\n */\n @attr('number')\n cardNumber;\n\n /**\n * Credit card expiration month in MM.\n *\n * @type {Number}\n */\n @attr('number')\n expirationMonth;\n\n /**\n * Credit card expiration year in YYYY.\n *\n * @type {Number}\n */\n @attr('number')\n expirationYear;\n\n /**\n * Credit card security code.\n *\n * @type {Number}\n */\n @attr('number')\n securityCode;\n\n /**\n * Credit card billing street address.\n *\n * @type {String}\n */\n @attr('string')\n address;\n\n /**\n * Credit card billing address city.\n *\n * @type {String}\n */\n @attr('string')\n city;\n\n /**\n * Credit card billing address state.\n *\n * @type {String}\n */\n @attr('string')\n state;\n\n /**\n * Credit card billing address zip code.\n *\n * @type {Number}\n */\n @attr('string')\n zipCode;\n\n /**\n * Credit card billing address country.\n *\n * @type {String}\n */\n @attr('number', { defaultValue: 0 })\n country;\n}\n","import Model, { attr } from '@ember-data/model';\n\n/**\n * @classdesc\n * Model for storing mapping information between dealer external identifier and internal ID.\n */\nexport default class ExternalIdentifier extends Model {\n /**\n * Internal ID mapped to external identifier.\n *\n * @type {number}\n */\n @attr('number', { defaultValue: 0 })\n internalId;\n}\n","import Appointment from './appointment';\n\nexport default class GuestAppointment extends Appointment {}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n undefined: GuestAppointment;\n }\n}\n","import Model, { attr } from '@ember-data/model';\n\nexport default class GuestSignUp extends Model {\n @attr('string') declare firstName: string;\n @attr('string') declare lastName: string;\n @attr('string') declare phoneNumber: string;\n @attr('string') declare email: string;\n @attr('number') declare systemGroupId: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'guest-sign-up': GuestSignUp;\n }\n}\n","import { computed } from '@ember/object';\nimport { attr, hasMany } from '@ember-data/model';\nimport BaseLocation from './base-location';\nimport SanitizedAppointment from './sanitized-appointment';\n\nimport type { AsyncHasMany } from '@ember-data/model';\n\n/**\n * @classdesc\n * Model for storing Self-Guided Tours property information.\n */\nexport default class LocationModel extends BaseLocation {\n /**\n * Number of bedrooms for Self-Guided Tours property.\n */\n @attr('number') declare numberOfBedrooms: number;\n\n /**\n * Number of bathrooms for Self-Guided Tours property.\n */\n @attr('number') declare numberOfBathrooms: number;\n\n /**\n * Square footage of Self-Guided Tours property.\n */\n @attr('number') declare squareFootage: number;\n\n /**\n * Rent for Self-Guided Tours property.\n */\n @attr('number') declare rent: number;\n\n /**\n * Localized string for rent or price\n */\n @attr('string') declare rentOrPriceString: string;\n\n /**\n * Unit name\n */\n @attr('string') declare unitDescription: string;\n\n /**\n * Creation date for Self-Guided Tours property record.\n */\n @attr('date') declare createdAt: Date;\n\n /**\n * Last updated date for Self-Guided Tours property record.\n */\n @attr('date') declare updatedAt: Date;\n\n /**\n * Appointment slots for property that are unavailable.\n */\n @hasMany('sanitized-appointment', {\n inverse: 'location',\n async: true\n })\n declare unavailablePeriods: AsyncHasMany;\n\n /**\n * Appointment slots retrieved from the CRM integration if the property is integrated.\n */\n @attr() declare appointmentTimeSlotsFromCrmLocal: any;\n\n /**\n * Whether the location's community has a site map.\n */\n @attr('boolean') declare hasCommunitySiteMap: boolean;\n\n /**\n * Returns property details along with its label.\n */\n @computed(\n 'formattedRent',\n 'numberOfBathrooms',\n 'numberOfBedrooms',\n 'rent',\n 'rentOrPriceString',\n 'squareFootage'\n )\n get availableDetails(): { title: string; value: string }[] {\n return [\n ['Beds', this.numberOfBedrooms.toLocaleString()],\n ['Baths', this.numberOfBathrooms.toLocaleString()],\n ['Sq. Ft.', this.squareFootage.toLocaleString()],\n [this.rentOrPriceString, this.formattedRent]\n ]\n .map(([title, value]) => ({ title, value }))\n .filter((attribute) => attribute.value);\n }\n\n /**\n * Returns the locations rent as a formatted string.\n */\n @computed('rent')\n get formattedRent(): string {\n if (!this.rent) {\n return '-';\n }\n\n const wholeNumberRent = Math.trunc(this.rent);\n return `$${wholeNumberRent.toLocaleString()}`;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n location: LocationModel;\n }\n}\n","import Model, { attr } from '@ember-data/model';\n\n/**\n * @classdesc\n * Model for storing user profile password.\n */\nexport default class ProfilePassword extends Model {\n /**\n * User's new password.\n *\n * @type {String}\n */\n @attr('string')\n password;\n\n /**\n * User's password confirmation.\n *\n * @type {String}\n */\n @attr('string')\n confirmPassword;\n\n /**\n * Authorization token used when resetting password.\n *\n * @type {String}\n */\n @attr('string')\n token;\n}\n","import Model, { attr } from '@ember-data/model';\nimport { computed } from '@ember/object';\n\n/**\n * @classdesc\n * Model for storing user profile information.\n */\nexport default class ProfileModel extends Model {\n /**\n * First name of user.\n */\n @attr('string')\n declare firstName: string;\n\n /**\n * Last name of user.\n */\n @attr('string')\n declare lastName: string;\n\n /**\n * Email of user.\n */\n @attr('string')\n declare email: string;\n\n /**\n * Mobile phone number of user.\n */\n @attr('number')\n declare mobileNumber: number;\n\n /**\n * Zip code of user.\n */\n @attr('string')\n declare zipCode: string;\n\n /**\n * User profile creation date.\n */\n @attr('date')\n declare createdAt: Date;\n\n /**\n * User profile last updated date.\n */\n @attr('date')\n declare updatedAt: Date;\n\n /**\n * Whether a forced password reset is required.\n */\n @attr('boolean', { defaultValue: false })\n declare forcePasswordReset: boolean;\n\n /**\n * Whether user's credit card has been validated.\n */\n @attr('boolean', { defaultValue: false })\n declare creditCardValidated: boolean;\n\n /**\n * User's desired move in date.\n */\n @attr('date')\n declare targetMoveInDate: Date;\n\n /**\n * Return full name of user.\n *\n * @type {String}\n */\n @computed('firstName', 'lastName')\n get fullName(): string {\n return `${this.firstName} ${this.lastName}`;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n profile: ProfileModel;\n }\n}\n","import Model, { attr, belongsTo } from '@ember-data/model';\n\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type LocationModel from './location';\n/**\n * @classdesc\n * Model for storing locations' unavailable appointment slots.\n */\nexport default class SanitizedAppointment extends Model {\n /**\n * Date of unavailable appointment slot.\n */\n @attr('date')\n declare dateTimeUtc: Date;\n\n /**\n * Whether the appointment is a Tour Now.\n */\n @attr('boolean')\n declare isTourNow: boolean;\n\n /**\n * Location reference of unavailable appointment slot.\n */\n @belongsTo('location', { inverse: 'unavailablePeriods', async: true })\n declare location: AsyncBelongsTo;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'sanitized-appointment': SanitizedAppointment;\n }\n}\n","import Model, { belongsTo } from '@ember-data/model';\n\n/**\n * @classdesc\n * Model for storing new user's signup information.\n */\nexport default class SignUpModel extends Model {\n /**\n * New user's profile\n *\n * @type {Profile}\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @belongsTo('profile', { async: true })\n profile;\n\n /**\n * New user's password.\n *\n * @type {ProfilePassword}\n */\n @belongsTo('profile-password', { async: true, inverse: null })\n password;\n}\n","import Resolver from 'ember-resolver';\n\nexport default Resolver;\n","import Ember from 'ember';\nimport { registerWaiter } from '@ember/test';\n\n// this ensures that if @ember/test-waiters exists in multiple places in the\n// build output we will still use a single map of waiters (there really should\n// only be one of them, or else `settled` will not work at all)\nconst WAITERS = function () {\n const HAS_SYMBOL = typeof Symbol !== 'undefined';\n let symbolName = 'TEST_WAITERS';\n let symbol = HAS_SYMBOL ? Symbol.for(symbolName) : symbolName;\n let global = getGlobal();\n let waiters = global[symbol];\n if (waiters === undefined) {\n waiters = global[symbol] = new Map();\n }\n return waiters;\n}();\nfunction indexable(input) {\n return input;\n}\nfunction getGlobal() {\n // eslint-disable-next-line node/no-unsupported-features/es-builtins\n if (typeof globalThis !== 'undefined') return indexable(globalThis);\n if (typeof self !== 'undefined') return indexable(self);\n if (typeof window !== 'undefined') return indexable(window);\n if (typeof global !== 'undefined') return indexable(global);\n throw new Error('unable to locate global object');\n}\n/**\n * Backwards compatibility with legacy waiters system.\n *\n * We want to always register a waiter using the legacy waiter system, as right\n * now if consumers are not on the right version of @ember/test-helpers, using\n * this addon will result in none of these waiters waiting.\n */\n// eslint-disable-next-line ember/new-module-imports\n\nif (Ember.Test) {\n registerWaiter(() => !hasPendingWaiters());\n}\n/**\n * Registers a waiter.\n *\n * @public\n * @param waiter {Waiter} A test waiter instance\n */\n\nexport function register(waiter) {\n WAITERS.set(waiter.name, waiter);\n}\n/**\n * Un-registers a waiter.\n *\n * @public\n * @param waiter {Waiter} A test waiter instance\n */\n\nexport function unregister(waiter) {\n WAITERS.delete(waiter.name);\n}\n/**\n * Gets an array of all waiters current registered.\n *\n * @public\n * @returns {Waiter[]}\n */\n\nexport function getWaiters() {\n let result = [];\n WAITERS.forEach(value => {\n result.push(value);\n });\n return result;\n}\n/**\n * Clears all waiters.\n *\n * @private\n */\n\nexport function _reset() {\n for (let waiter of getWaiters()) {\n waiter.isRegistered = false;\n }\n WAITERS.clear();\n}\n/**\n * Gets the current state of all waiters. Any waiters whose\n * `waitUntil` method returns false will be considered `pending`.\n *\n * @returns {PendingWaiterState} An object containing a count of all waiters\n * pending and a `waiters` object containing the name of all pending waiters\n * and their debug info.\n */\n\nexport function getPendingWaiterState() {\n let result = {\n pending: 0,\n waiters: {}\n };\n WAITERS.forEach(waiter => {\n if (!waiter.waitUntil()) {\n result.pending++;\n let debugInfo = waiter.debugInfo();\n result.waiters[waiter.name] = debugInfo || true;\n }\n });\n return result;\n}\n/**\n * Determines if there are any pending waiters.\n *\n * @returns {boolean} `true` if there are pending waiters, otherwise `false`.\n */\n\nexport function hasPendingWaiters() {\n let state = getPendingWaiterState();\n return state.pending > 0;\n}","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { DEBUG } from '@glimmer/env';\nimport { warn } from '@ember/debug';\nimport Token from './token';\nimport { register } from './waiter-manager';\nconst WAITER_NAME_PATTERN = /^[^:]*:?.*/;\nlet WAITER_NAMES = DEBUG ? new Set() : undefined;\nexport function _resetWaiterNames() {\n WAITER_NAMES = new Set();\n}\nfunction getNextToken() {\n return new Token();\n}\nclass TestWaiterImpl {\n constructor(name, nextToken) {\n _defineProperty(this, \"isRegistered\", false);\n _defineProperty(this, \"items\", new Map());\n _defineProperty(this, \"completedOperationsForTokens\", new WeakMap());\n _defineProperty(this, \"completedOperationsForPrimitives\", new Map());\n this.name = name; // @ts-ignore\n\n this.nextToken = nextToken || getNextToken;\n }\n beginAsync(token = this.nextToken(), label) {\n this._register();\n if (this.items.has(token)) {\n throw new Error(`beginAsync called for ${token} but it is already pending.`);\n }\n let error = new Error();\n this.items.set(token, {\n get stack() {\n return error.stack;\n },\n label\n });\n return token;\n }\n endAsync(token) {\n if (!this.items.has(token) && !this._getCompletedOperations(token).has(token)) {\n throw new Error(`testWaiter.endAsync called with no preceding testWaiter.beginAsync call.\n Test waiter calls should always be paired. This can occur when a test waiter's paired calls are invoked in a non-deterministic order.\n\n See https://github.com/emberjs/ember-test-waiters#keep-beginasyncendasync-in-same-block-scope for more information.`);\n }\n this.items.delete(token); // Mark when a waiter operation has completed so we can distinguish\n // whether endAsync is being called before a prior beginAsync call above.\n\n this._getCompletedOperations(token).set(token, true);\n }\n waitUntil() {\n return this.items.size === 0;\n }\n debugInfo() {\n let result = [];\n this.items.forEach(value => {\n result.push(value);\n });\n return result;\n }\n reset() {\n this.items.clear();\n }\n _register() {\n if (!this.isRegistered) {\n register(this);\n this.isRegistered = true;\n }\n }\n _getCompletedOperations(token) {\n let type = typeof token;\n let isFunction = type === 'function';\n let isObject = token !== null && type === 'object';\n let isPrimitive = !isFunction && !isObject;\n return isPrimitive ? this.completedOperationsForPrimitives : this.completedOperationsForTokens;\n }\n}\nclass NoopTestWaiter {\n constructor(name) {\n this.name = name;\n }\n beginAsync() {\n return this;\n }\n endAsync() {}\n waitUntil() {\n return true;\n }\n debugInfo() {\n return [];\n }\n reset() {}\n}\n/**\n * Builds and returns a test waiter. The type of the\n * returned waiter is dependent on whether the app or\n * addon is in `DEBUG` mode or not.\n *\n * @public\n *\n * @param name {string} The name of the test waiter\n * @returns {TestWaiter}\n *\n * @example\n *\n * import Component from '@ember/component';\n * import { buildWaiter } from '@ember/test-waiters';\n *\n * if (DEBUG) {\n * let waiter = buildWaiter('friend-waiter');\n * }\n *\n * export default class Friendz extends Component {\n * didInsertElement() {\n * let token = waiter.beginAsync(this);\n *\n * someAsyncWork().then(() => {\n * waiter.endAsync(token);\n * });\n * }\n * }\n */\n\nexport default function buildWaiter(name) {\n if (DEBUG) {\n warn(`The waiter name '${name}' is already in use`, !WAITER_NAMES.has(name), {\n id: '@ember/test-waiters.duplicate-waiter-name'\n });\n WAITER_NAMES.add(name);\n }\n if (!DEBUG) {\n return new NoopTestWaiter(name);\n } else {\n warn(`You must provide a name that contains a descriptive prefix separated by a colon.\n\n Example: ember-fictitious-addon:some-file\n\n You passed: ${name}`, WAITER_NAME_PATTERN.test(name), {\n id: '@ember/test-waiters.invalid-waiter-name'\n });\n return new TestWaiterImpl(name);\n }\n}","/* eslint-disable ember/no-private-routing-service */\n/*\n This code is adapted from ember-engines/addon/-private/router-ext.js.\n*/\nimport EmberRouter from '@ember/routing/router';\nimport { buildWaiter } from '@ember/test-waiters';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\ninterface GlobalConfig {\n '@embroider/core'?: { active: boolean };\n}\n\nlet Router: typeof EmberRouter;\n\ninterface GetRoute {\n (name: string): unknown;\n isEmbroiderRouterHandler?: true;\n}\n\ninterface Internals {\n _engineInfoByRoute: Record;\n _routerMicrolib: {\n getRoute: GetRoute;\n };\n}\n\ninterface EmbroiderBundle {\n names: string[];\n loaded?: true;\n load: () => Promise;\n}\n\nif (macroCondition(getGlobalConfig()['@embroider/core']?.active ?? false)) {\n const waiter = buildWaiter('@embroider/router:lazy-route-waiter');\n\n function embroiderBundles(): {\n _embroiderEngineBundles_?: EmbroiderBundle[];\n _embroiderRouteBundles_?: EmbroiderBundle[];\n } {\n return window as ReturnType;\n }\n\n class EmbroiderRouter extends EmberRouter {\n private seenByRoute = new Set();\n\n private lazyRoute(this: this & Internals, routeName: string): EmbroiderBundle | undefined {\n let bundles = embroiderBundles();\n if (bundles._embroiderRouteBundles_) {\n return bundles._embroiderRouteBundles_.find(bundle => bundle.names.indexOf(routeName) !== -1);\n }\n return undefined;\n }\n\n private lazyEngine(this: this & Internals, routeName: string): EmbroiderBundle | undefined {\n // Here we map engine names to route names. We need to do this because\n // engines can be specified with \"as\" such as:\n //\n // this.mount('lazy-engine', { path: '/use-lazy-engine', as: 'use-lazy-engine' });\n //\n // This presents a problem at build time since we cant get this \"mount point\" name. This is because the\n // router is dynamic and the string could be defined as anything. Luckly, this._engineInfoByRoute contains\n // mappings from routeName to the engines \"original name\" (which we know at build time).\n let bundles = embroiderBundles();\n let engine = this._engineInfoByRoute[routeName];\n if (engine && bundles._embroiderEngineBundles_) {\n let engineName = engine.name;\n return bundles._embroiderEngineBundles_.find(bundle => bundle.names.indexOf(engineName) !== -1);\n }\n return undefined;\n }\n\n private isEngine(this: this & Internals, name: string): boolean {\n return Boolean(this._engineInfoByRoute[name]);\n }\n\n // This is necessary in order to prevent the premature loading of lazy routes\n // when we are merely trying to render a link-to that points at them.\n // Unfortunately the stock query parameter behavior pulls on routes just to\n // check what their previous QP values were.\n _getQPMeta(this: this & Internals, handlerInfo: { name: string }, ...rest: unknown[]) {\n let bundle = this.lazyRoute(handlerInfo.name);\n if (bundle && !bundle.loaded) {\n // unloaded split routes\n return undefined;\n }\n\n if (this.isEngine(handlerInfo.name) && !this.seenByRoute.has(handlerInfo.name)) {\n // unvisited engines, whether loaded or not, because the same bundle\n // could by mounted multiple places and engines expect to only run the\n // super._getQPMeta after they've been visited.\n return undefined;\n }\n\n bundle = this.lazyEngine(handlerInfo.name);\n if (bundle && !bundle.loaded) {\n // unloaded lazy engines\n return undefined;\n }\n\n // @ts-expect-error extending private method\n return super._getQPMeta(handlerInfo, ...rest);\n }\n\n // This is the framework method that we're overriding to provide our own\n // handlerResolver.\n setupRouter(this: this & Internals, ...args: unknown[]) {\n // @ts-expect-error extending private method\n let isSetup = super.setupRouter(...args);\n let microLib = this._routerMicrolib;\n if (!microLib.getRoute.isEmbroiderRouterHandler) {\n microLib.getRoute = this._handlerResolver(microLib.getRoute.bind(microLib));\n }\n return isSetup;\n }\n\n private _handlerResolver(this: this & Internals, original: (name: string) => unknown) {\n let handler = ((name: string) => {\n const bundle = this.lazyRoute(name) ?? this.lazyEngine(name);\n this.seenByRoute.add(name);\n if (!bundle || bundle.loaded) {\n return original(name);\n }\n\n let token = waiter.beginAsync();\n\n return bundle.load().then(\n () => {\n waiter.endAsync(token);\n bundle.loaded = true;\n return original(name);\n },\n err => {\n waiter.endAsync(token);\n throw err;\n }\n );\n }) as GetRoute;\n handler.isEmbroiderRouterHandler = true;\n return handler;\n }\n }\n\n Router = EmbroiderRouter;\n} else {\n Router = EmberRouter;\n}\n\nexport default Router;\n","import { DEBUG } from '@glimmer/env';\nimport buildWaiter from './build-waiter';\nconst PROMISE_WAITER = buildWaiter('@ember/test-waiters:promise-waiter');\n/**\n * A convenient utility function to simplify waiting for a promise.\n *\n * @public\n * @param promise {Promise | RSVP.Promise} The promise to track async operations for\n * @param label {string} An optional string to identify the promise\n *\n * @example\n *\n * import Component from '@ember/component';\n * import { waitForPromise } from '@ember/test-waiters';\n *\n * export default class Friendz extends Component {\n * didInsertElement() {\n * waitForPromise(new Promise(resolve => {\n * doSomeWork();\n * resolve();\n * }));\n * }\n * }\n */\n\nexport default function waitForPromise(promise, label) {\n let result = promise;\n if (DEBUG) {\n PROMISE_WAITER.beginAsync(promise, label);\n result = promise.then(value => {\n PROMISE_WAITER.endAsync(promise);\n return value;\n }, error => {\n PROMISE_WAITER.endAsync(promise);\n throw error;\n });\n }\n return result;\n}","import { DEBUG } from '@glimmer/env';\nimport waitForPromise from './wait-for-promise';\nimport buildWaiter from './build-waiter';\nexport default function waitFor(...args) {\n let isFunction = args.length < 3;\n if (isFunction) {\n let [fn, label] = args;\n return wrapFunction(fn, label);\n } else {\n let [,, descriptor, label] = args;\n if (!DEBUG) {\n return descriptor;\n }\n let fn = descriptor.value;\n descriptor.value = wrapFunction(fn, label);\n return descriptor;\n }\n}\nfunction wrapFunction(fn, label) {\n if (!DEBUG) {\n return fn;\n }\n return function (...args) {\n let result = fn.call(this, ...args);\n if (isThenable(result)) {\n return waitForPromise(result, label);\n } else if (isGenerator(result)) {\n return waitForGenerator(result, label);\n } else {\n return result;\n }\n };\n}\nfunction isThenable(maybePromise) {\n let type = typeof maybePromise;\n return (maybePromise !== null && type === 'object' || type === 'function') && typeof maybePromise.then === 'function';\n}\nfunction isGenerator(maybeGenerator) {\n // Because we don't have Symbol.iterator in IE11\n return typeof maybeGenerator.next === 'function' && typeof maybeGenerator.return === 'function' && typeof maybeGenerator.throw === 'function';\n}\nconst GENERATOR_WAITER = buildWaiter('@ember/test-waiters:generator-waiter');\nfunction waitForGenerator(generator, label) {\n GENERATOR_WAITER.beginAsync(generator, label);\n let isWaiting = true;\n function stopWaiting() {\n if (isWaiting) {\n GENERATOR_WAITER.endAsync(generator);\n isWaiting = false;\n }\n }\n return {\n next(...args) {\n let hasErrored = true;\n try {\n let val = generator.next(...args);\n hasErrored = false;\n if (val.done) {\n stopWaiting();\n }\n return val;\n } finally {\n // If generator.next() throws, we need to stop waiting. But if we catch\n // and re-throw exceptions, it could move the location from which the\n // uncaught exception is thrown, interfering with the developer\n // debugging experience if they have break-on-exceptions enabled. So we\n // use a boolean flag and a finally block to emulate a catch block.\n if (hasErrored) {\n stopWaiting();\n }\n }\n },\n return(...args) {\n stopWaiting();\n return generator.return(...args);\n },\n throw(...args) {\n stopWaiting();\n return generator.throw(...args);\n }\n };\n}","import EmberRouter from '@embroider/router';\nimport config from 'unattended-showing/config/environment';\n\nexport default class Router extends EmberRouter {\n location = config.locationType;\n rootURL = config.rootURL;\n}\n\nRouter.map(function () {\n this.route('context', { path: '/:context_id' }, function () {\n this.route('login');\n this.route('logout');\n this.route('forgot-password');\n this.route('sign-up', function () {\n this.route('verification');\n });\n this.route('profile');\n this.route('appointment', { path: '/' });\n this.route('location', { path: '/location/:location_id' });\n this.route('loading');\n this.route('change-password');\n this.route('faq');\n this.route('available-units-list', {\n path: '/bookings/:available_units_list_id'\n });\n this.route('redirect', { path: '/redirect/:external_identifier_id' });\n this.route('not-found', { path: '/*path' });\n this.route('available-units-list-sgt3', {\n path: '/bookings-sgt3/:available_units_list_id'\n });\n this.route('location-sgt3', { path: '/location-sgt3/:location_id' });\n this.route('login-sgt3');\n this.route('sign-up-sgt3', function () {\n this.route('credit-card-verification');\n });\n this.route('appointment-sgt3');\n this.route('forgot-password-sgt3');\n this.route('change-password-sgt3');\n this.route('faq-sgt3');\n this.route('profile-sgt3');\n this.route('guest-sign-up');\n this.route('guest-phone-verification');\n });\n this.route('not-found', { path: '/*path' });\n});\n","import BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\nexport default BaseSerializer;\n","import ApplicationSerializer from './application';\nimport { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n\n/**\n * @classdesc\n * Serializer for SignUp model so profile and password data are sent along to backend.\n */\nexport default class SignUpSerializer extends ApplicationSerializer.extend(\n EmbeddedRecordsMixin\n) {\n isEmbeddedRecordsMixinCompatible = true;\n\n /** override **/\n attrs = {\n profile: {\n embedded: 'always'\n },\n password: {\n embedded: 'always'\n }\n };\n}\n","import BaseAjaxService from '@adc/ajax/services/adc-ajax';\n\nexport default class Ajax extends BaseAjaxService {\n handleAjaxError(response, defaultMessage) {\n const errors = [{ detail: defaultMessage, message: response.errors }];\n\n return Promise.reject(errors);\n }\n}\n","import Service from '@ember/service';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class CheckInService extends Service {\n @service ajax;\n @service sgtSession;\n @service notificationManager;\n\n @tracked isSendCheckpointIdVerificationDisabled = false;\n\n /**\n * Check the prospect in. If geofencing is enabled, perform a location scan. If CPID is enabled and the prospect\n * needs to scan, transition to CPID.\n */\n @action async appointmentCheckIn(property, appointment) {\n if (property.geofenceEnabled) {\n await this.validateLocation(appointment);\n }\n\n if (appointment.get('activePendingIdVerification')) {\n await this.sendCheckpointIdVerification(\n appointment.get('id'),\n false\n );\n }\n }\n\n /**\n * Validate prospect's coordinates.\n */\n @action async validateLocation(appointment) {\n try {\n const options = {\n enableHighAccuracy: false,\n timeout: 60000,\n maximumAge: 0\n };\n await new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n async (position) => {\n try {\n await this.compareLocation(position, appointment);\n resolve();\n } catch (error) {\n reject(error);\n }\n },\n async () => {\n reject(this.locationShareError);\n },\n options\n );\n });\n } catch (response) {\n this.notificationManager.addError(response);\n return this.ajax.handleAjaxError(response, 'Unable to check-in.');\n }\n }\n\n /**\n * Takes in position and appointment arguments and makes a request to determine if the\n * prospect is within the geofence.\n */\n @action async compareLocation(position, appointment) {\n const loadedAppointment = await appointment,\n appointmentId = parseInt(loadedAppointment.id),\n latitude = position.coords.latitude,\n longitude = position.coords.longitude;\n\n const requestUrl = '/appointments/checkin',\n newOptions = this.getAuthHeaders(),\n body = JSON.stringify({\n appointmentId,\n latitude,\n longitude\n }),\n httpMethod = 'POST';\n\n try {\n await this.ajax.apiRequest(\n requestUrl,\n newOptions,\n body,\n httpMethod\n );\n } catch (error) {\n const errorMessage = error.errors[0].detail;\n return Promise.reject(errorMessage);\n }\n }\n\n /**\n * Error message if prospect chooses to not share location.\n */\n locationShareError =\n 'Please enable location services on your device and share your location in the browser in order to check-in.';\n\n /**\n * Gets necessary authorization for header.\n */\n getAuthHeaders() {\n const { token } = this.sgtSession.data.authenticated;\n return {\n headers: {\n authorization: token\n }\n };\n }\n\n /**\n * Formats error to be displayed for the prospect.\n */\n formatError(error) {\n const response = {\n errors: {\n errors: [\n {\n detail: error\n }\n ]\n }\n };\n return response;\n }\n\n /**\n * Send CPID verification to the user.\n * @param {string} appointmentId\n * @param {boolean} disableButton\n * @returns\n */\n async sendCheckpointIdVerification(appointmentId, disableButton = true) {\n if (this.isSendCheckpointIdVerificationDisabled) {\n return;\n }\n\n const requestUrl = '/checkpointId/verify',\n newOptions = this.getAuthHeaders(),\n body = JSON.stringify({\n appointmentId\n }),\n httpMethod = 'POST';\n\n try {\n await this.ajax.apiRequest(\n requestUrl,\n newOptions,\n body,\n httpMethod\n );\n } catch (error) {\n const formattedError = this.formatError(error.errors[0].detail);\n return this.ajax.handleAjaxError(\n formattedError,\n 'Unable to send id verification text.'\n );\n } finally {\n if (disableButton) {\n this.isSendCheckpointIdVerificationDisabled = true;\n\n setTimeout(\n () => (this.isSendCheckpointIdVerificationDisabled = false),\n 30000\n );\n }\n }\n }\n}\n","import BaseErrorReporting from '@adc/app-infrastructure/services/base-error-reporting';\nimport { inject as service } from '@ember/service';\nimport { set } from '@ember/object';\n\n/**\n * @classdesc\n * The Sentry error reporting service.\n */\nexport default class ErrorReportingService extends BaseErrorReporting {\n @service envSettings;\n @service router;\n @service store;\n\n /** @override */\n get errorsToIgnore() {\n return [\n ...super.errorsToIgnore,\n ...['Unhandled Promise error detected', 'TransitionAborted'].map(\n (value) => ({\n propertyType: 'message',\n value\n })\n )\n ];\n }\n\n /**\n * Initializes error reporting.\n */\n initializeForSession() {\n const {\n errorReporting: { dsn, environment, showDebugInfo, isEnabled } = {}\n } = this.envSettings.getEnvironment();\n if (dsn) {\n this.configure({ dsn, environment, showDebugInfo });\n }\n\n set(this, 'isEnabled', isEnabled);\n }\n\n /** @override **/\n beforeSend(event) {\n event = super.beforeSend(...arguments);\n const { isEnabled } = this;\n return isEnabled ? event : null;\n }\n}\n","import ADCIntlService from '@adc/i18n/services/adc-intl';\n\nexport default class UnattendedShowingIntlService extends ADCIntlService {}\n","import Service from '@ember/service';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { subMinutes } from 'date-fns';\n\nimport type Appointment from 'unattended-showing/models/appointment';\nimport type LocationModel from 'unattended-showing/models/location';\nimport type CheckInService from './check-in';\nimport type AjaxService from './ajax';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type { AsyncBelongsTo } from '@ember-data/model';\n\nexport default class LoginPendingBookingService extends Service {\n @service declare router: ServiceRegistry['router'];\n @service declare ajax: AjaxService;\n @service declare checkIn: CheckInService;\n\n /**\n * Flag to determine whether user tried to book appointment before\n * logging in or signing up.\n */\n @tracked hasPendingAppointments = false;\n\n /**\n * Flag to determine whether to load scheduling page before saving\n * pending appointment.\n */\n @tracked enableTemporaryLoading = false;\n\n /**\n * Appointment object to be booked upon logging in or signing up.\n */\n @tracked appointment?: Appointment;\n\n /**\n * Location that appointment is booked at.\n */\n @tracked property?: LocationModel;\n\n loadAppointment(appointment: Appointment, property: LocationModel) {\n (this.hasPendingAppointments = true),\n (this.appointment = appointment),\n (this.property = property);\n }\n\n resetAppointmentData() {\n this.hasPendingAppointments = false;\n this.enableTemporaryLoading = false;\n this.appointment = undefined;\n this.property = undefined;\n }\n\n transitionRoute() {\n if (this.property) {\n this.enableTemporaryLoading = true;\n const propertyId = this.property.id;\n const baseRoute = 'context.location';\n this.router.transitionTo(baseRoute, propertyId);\n }\n }\n\n async processPendingAppointments() {\n this.transitionRoute();\n if (this.appointment && this.property) {\n try {\n // Save the appointment.\n await this.appointment.save();\n // DO NOT COPY THIS, PLEASE IMPLEMENT THE SUGGESTION AND TEST.\n // @ts-expect-error `location` is async so this code should be replaced with: `await (await this.appointment.location).reload();`.\n await this.appointment.location.reload();\n\n this.property.nextAppointment = this\n .appointment as unknown as AsyncBelongsTo;\n\n const tourWindowStart = new Date(\n subMinutes(this.appointment.dateTimeUtc, 5)\n );\n const withinTourWindow =\n tourWindowStart <= this.appointment.createdAt;\n\n // Send the CPID verification if user needs to be verified and it is not within tour time.\n if (this.property.reverificationRequired && !withinTourWindow) {\n await this.checkIn.sendCheckpointIdVerification(\n this.appointment.id,\n false\n );\n }\n } catch (response) {\n return this.ajax.handleAjaxError(\n response,\n 'Unable to request Self-Guided Tours appointment. Please try again later.'\n );\n } finally {\n // Reset stored appointment data.\n this.resetAppointmentData();\n }\n }\n }\n}\n","import addMinutes from \"../addMinutes/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMinutes\n * @category Minute Helpers\n * @summary Subtract the specified number of minutes from the given date.\n *\n * @description\n * Subtract the specified number of minutes from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the minutes subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 30 minutes from 10 July 2014 12:00:00:\n * const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 11:30:00\n */\n\nexport default function subMinutes(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMinutes(dirtyDate, -amount);\n}","import Service from '@ember/service';\n\nexport default class MockTimeService extends Service {\n mockTime?: Date = undefined;\n}\n","import SessionService from 'ember-simple-auth/services/session';\nimport ENV from 'unattended-showing/config/environment';\n\n/**\n * Class extending Ember Simple Auth's SessionService.\n * By default, ESA will redirect to the rootURL specified in environment.js when the session is invalidated.\n * This class is extended so that we can send the user to the login page upon session invalidation rather than rootURL.\n * Ideally, we would be able to provide a custom route for handleInvalidation, but this is not an available feature as of 2025-01-06.\n * A GitHub issue has been raised: https://github.com/mainmatter/ember-simple-auth/issues/2915\n */\nexport default class SGTSession extends SessionService {\n handleInvalidation(routeAfterInvalidation: string): void {\n const id = this.data?.contextId;\n super.handleInvalidation(\n id ? `${ENV.rootURL}${id}` : routeAfterInvalidation\n );\n }\n}\n","import CookieStore from 'ember-simple-auth/session-stores/cookie';\n\nexport default class ApplicationSessionStore extends CookieStore {}\n","import Transform from '@ember-data/serializer/transform';\nimport { A } from '@ember/array';\n\nexport default class HoursOfOperation extends Transform {\n deserialize(scheduleDictionary) {\n return A(\n Object.keys(scheduleDictionary || {}).map((scheduleDay) => {\n const { startMinutesLocal, durationMinutes, day } =\n scheduleDictionary[Number(scheduleDay)];\n\n return {\n day,\n startMinutesLocal,\n endMinutesLocal: startMinutesLocal + durationMinutes\n };\n })\n );\n }\n\n serialize(schedule) {\n return schedule.reduce(\n (\n scheduleDictionary,\n { day, startMinutesLocal, endMinutesLocal },\n index\n ) => {\n scheduleDictionary[index] = {\n day,\n startMinutesLocal,\n durationMinutes: endMinutesLocal - startMinutesLocal\n };\n return scheduleDictionary;\n },\n {}\n );\n }\n}\n","/**\n * Returns true if the two dates are on the same day, else false.\n * @param {Date} date1 First date to compare.\n * @param {Date} date2 Second date to compare.\n * @returns a boolean based on if the dates are on the same day.\n */\nexport function datesAreOnSameDay(date1, date2) {\n return (\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate()\n );\n}\n","/**\n * Utility helper module for validating inputs.\n * @module\n */\n\n/**\n * Takes a Regex and an input and checks if the input with Regex selected characters removed is greater than 0.\n *\n * EXAMPLE: Passing /\\D/g as regEx and '123456' as input will return true.\n *\n * @function\n *\n * @param {RegExp} regEx\n * @param {String} input\n * @returns {Boolean}\n */\nexport function validateCustomRegex(regEx, input) {\n return regEx.test(input.toString());\n}\n\n/**\n * Takes an email, as a string, for emailInput and checks if it meets the RFC5322 standard (https://www.ietf.org/rfc/rfc5322.txt).\n *\n * @function\n *\n * @param {String} emailInput\n * @returns {Boolean}\n */\nexport function validateEmail(emailInput) {\n return /^((([!#$%'*+\\-/0-9=?A-Z^_'a-z{|}~]{1,})|(\"([^\"\\r\\n]|(\\\\[.\\n\\r]))*\"))(\\.(([!#$%'*+\\-/0-9=?A-Z^_'a-z{|}~]{1,})|(\"([^\"\\r\\n]|(\\\\[.\\n\\r]))*\")))*)@(([-0-9a-zA-Z]{1,})(\\.([-0-9a-zA-Z]{1,})){1,})$/.test(\n emailInput.toString()\n );\n}\n\n/**\n * Takes a password, as a string, for passwordInput and checks if it has at least 1 number, 8 or more characters, and at least 1 uppercase character.\n *\n * @function\n *\n * @param {String} passwordInput\n * @returns {Boolean}\n */\nexport function validatePassword(passwordInput) {\n return (\n passwordInput.toString().replace(/\\D/g, '').length > 0 &&\n passwordInput.toString().replace(/\\s/g, '').length >= 8 &&\n passwordInput.toString().replace(/[^A-Z]/g, '').length > 0\n );\n}\n\n/**\n * Takes a Regex and an input and checks if the input with Regex selected characters removed is greater than 0.\n * Also returns true for empty and undefined inputs (to not display error messages on input boxes for empty inputs).\n *\n * EXAMPLE: Passing /\\D/g as regEx and '123456' as input will return true.\n * EXAMPLE: Passing /\\s/g as regEx and '' as input will return true.\n *\n * @function\n *\n * @param {RegExp} regEx\n * @param {String} input\n * @returns {Boolean}\n */\nexport function validateTextInputCustomRegex(regEx, input) {\n return (\n input === undefined || input === '' || validateCustomRegex(regEx, input)\n );\n}\n\n/**\n * Takes an email, as a string, for emailInput and checks if it meets the RFC5322 standard (https://www.ietf.org/rfc/rfc5322.txt).\n * Also returns true for empty and undefined inputs (to not display error messages on input boxes for empty inputs).\n *\n * @function\n *\n * @param {String} emailInput\n * @returns {Boolean}\n */\nexport function validateTextInputEmail(emailInput) {\n return (\n emailInput === undefined ||\n emailInput === '' ||\n validateEmail(emailInput)\n );\n}\n\n/**\n * Takes a password, as a string, for passwordInput and checks if it has at least 1 number, 8 or more characters, and at least 1 uppercase character.\n * Also returns true for empty and undefined inputs (to not display error messages on input boxes for empty inputs).\n *\n * @function\n *\n * @param {String} passwordInput\n * @returns {Boolean}\n */\nexport function validateTextInputPassword(passwordInput) {\n return (\n passwordInput === undefined ||\n passwordInput === '' ||\n validatePassword(passwordInput)\n );\n}\n\n/**\n * Takes a phone number as a string and checks if it is 10 numbers with optional dashes.\n * The number must be formatted with the dashes in the correct location, e.g. 123-456-7890.\n *\n * @function\n *\n * @param {String} phoneNumber\n * @returns {Boolean}\n */\nexport function validatePhoneNumber(phoneNumber) {\n const phoneRegex = /^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/;\n return phoneRegex.test(phoneNumber);\n}\n","const newline = /\\r?\\n/;\nexport default function parseResponseHeaders(headersString) {\n const headers = Object.create(null);\n if (!headersString) {\n return headers;\n }\n const headerPairs = headersString.split(newline);\n for (let i = 0; i < headerPairs.length; i++) {\n let header = headerPairs[i];\n let j = 0;\n let foundSep = false;\n for (; j < header.length; j++) {\n if (header.charCodeAt(j) === 58 /* ':' */) {\n foundSep = true;\n break;\n }\n }\n if (foundSep === false) {\n continue;\n }\n let field = header.substring(0, j).trim();\n let value = header.substring(j + 1, header.length).trim();\n if (value) {\n let lowerCasedField = field.toLowerCase();\n headers[lowerCasedField] = value;\n headers[field] = value;\n }\n }\n return headers;\n}","import { warn } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport continueOnReject from './continue-on-reject';\n/*\n * Function that always attempts to parse the response as json, and if an error is thrown,\n * returns `undefined` if the response is successful and has a status code of 204 (No Content),\n * or 205 (Reset Content) or if the request method was 'HEAD', and the plain payload otherwise.\n */\nfunction _determineContent(response, requestData, payload) {\n let ret = payload;\n let error = null;\n if (!response.ok) {\n return payload;\n }\n let status = response.status;\n let payloadIsEmpty = payload === '' || payload === null;\n let statusIndicatesEmptyResponse = status === 204 || status === 205 || requestData.method === 'HEAD';\n if (DEBUG) {\n if (payloadIsEmpty && !statusIndicatesEmptyResponse) {\n let message = `The server returned an empty string for ${requestData.method} ${requestData.url}, which cannot be parsed into a valid JSON. Return either null or {}.`;\n if (payload === '') {\n warn(message, {\n id: 'ds.adapter.returned-empty-string-as-JSON'\n });\n }\n }\n }\n if (response.ok && (statusIndicatesEmptyResponse || payloadIsEmpty)) {\n return;\n }\n try {\n ret = JSON.parse(payload);\n } catch (e) {\n if (!(e instanceof SyntaxError)) {\n return e;\n }\n e.payload = payload;\n error = e;\n }\n if (error) {\n if (DEBUG) {\n // eslint-disable-next-line no-console\n console.warn('This response was unable to be parsed as json.', payload);\n }\n return error;\n }\n return ret;\n}\nexport function determineBodyPromise(response, requestData) {\n // response.text() may resolve or reject\n // it is a native promise, may not have finally\n return continueOnReject(response.text()).then(payload => _determineContent(response, requestData, payload));\n}","import { resolve } from 'rsvp';\nexport default function continueOnReject(promise) {\n return resolve(promise).catch(e => e);\n}","const RBRACKET = /\\[\\]$/;\nfunction isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\n\n/*\n * Helper function that turns the data/body of a request into a query param string.\n * This is directly copied from jQuery.param.\n */\nexport function serializeQueryParams(queryParamsObject) {\n let s = [];\n function buildParams(prefix, obj) {\n let i, len, key;\n if (prefix) {\n if (Array.isArray(obj)) {\n for (i = 0, len = obj.length; i < len; i++) {\n if (RBRACKET.test(prefix)) {\n add(s, prefix, obj[i]);\n } else {\n buildParams(prefix + '[' + (typeof obj[i] === 'object' && obj[i] !== null ? i : '') + ']', obj[i]);\n }\n }\n } else if (isPlainObject(obj)) {\n for (key in obj) {\n buildParams(prefix + '[' + key + ']', obj[key]);\n }\n } else {\n add(s, prefix, obj);\n }\n } else if (Array.isArray(obj)) {\n for (i = 0, len = obj.length; i < len; i++) {\n add(s, obj[i].name, obj[i].value);\n }\n } else {\n for (key in obj) {\n buildParams(key, obj[key]);\n }\n }\n return s;\n }\n return buildParams('', queryParamsObject).join('&');\n}\n\n/*\n * Part of the `serializeQueryParams` helper function.\n */\nfunction add(s, k, v) {\n // Strip out keys with undefined value and replace null values with\n // empty strings (mimics jQuery.ajax)\n if (v === undefined) {\n return;\n } else if (v === null) {\n v = '';\n }\n v = typeof v === 'function' ? v() : v;\n s[s.length] = `${encodeURIComponent(k)}=${encodeURIComponent(v)}`;\n}","import require, { has } from 'require';\nlet _fetch = null;\nexport default function getFetchFunction() {\n if (_fetch !== null) {\n return _fetch();\n }\n if (has('fetch')) {\n // use `fetch` module by default, this is commonly provided by ember-fetch\n let fetchFn = require('fetch').default;\n _fetch = () => fetchFn;\n } else if (typeof fetch === 'function') {\n // fallback to using global fetch\n _fetch = () => fetch;\n } else {\n throw new Error('cannot find the `fetch` module or the `fetch` global. Did you mean to install the `ember-fetch` addon?');\n }\n return _fetch();\n}","import Mixin from '@ember/object/mixin';\nimport { camelize } from '@ember/string';\nimport { pluralize } from 'ember-inflector';\n\n/**\n @module @ember-data/adapter\n*/\n\n/*\n The structure of this file is such because typing Mixins is hard. Here we've structured it in\n such a way as to maximize the type information that a consumer can utilize. There are simpler\n ways to type a mixin but we would not be able to provide the nice overload signature for buildURL\n*/\n// the interface must fully declare the function signatures that the individual functions\n// will also declare. If instead we try to keep them in sync by doing something like\n// `interface BuildURLMixin { buildURL: typeof buildURL }`\n// then an extending class overwriting one of the methods will break because typescript\n// thinks it is a switch from an instance prop (that is a method) to an instance method.\n\n// prevents the final constructed object from needing to add\n// host and namespace which are provided by the final consuming\n// class to the prototype which can result in overwrite errors\n\n/**\n ## Using BuildURLMixin\n\n To use URL building, include the mixin when extending an adapter, and call `buildURL` where needed.\n The default behaviour is designed for RESTAdapter.\n\n ### Example\n\n ```javascript\n import Adapter, { BuildURLMixin } from '@ember-data/adapter';\n\n export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) {\n findRecord(store, type, id, snapshot) {\n var url = this.buildURL(type.modelName, id, snapshot, 'findRecord');\n return this.ajax(url, 'GET');\n }\n }\n ```\n\n ### Attributes\n\n The `host` and `namespace` attributes will be used if defined, and are optional.\n\n @class BuildURLMixin\n @public\n*/\n/**\n Builds a URL for a given type and optional ID.\n\n By default, it pluralizes the type's name (for example, 'post'\n becomes 'posts' and 'person' becomes 'people'). To override the\n pluralization see [pathForType](./pathForType?anchor=pathForType).\n\n If an ID is specified, it adds the ID to the path generated\n for the type, separated by a `/`.\n\n When called by `RESTAdapter.findMany()` the `id` and `snapshot` parameters\n will be arrays of ids and snapshots.\n\n @method buildURL\n @public\n @param {String} modelName\n @param {(String|Array|Object)} id single id or array of ids or query\n @param {(Snapshot|SnapshotRecordArray)} snapshot single snapshot or array of snapshots\n @param {String} requestType\n @param {Object} query object of query parameters to send for query requests.\n @return {String} url\n */\n\nfunction buildURL(modelName, id, snapshot, requestType, query) {\n /*\n Switch statements in typescript don't currently narrow even when the function is implemented\n with overloads.\n We still extract this to stand alone so that we can provide nice overloads for calling signatures,\n but we will still require all of this casting (or a ridiculous number of assertsthat narrow it down\n for us).\n */\n switch (requestType) {\n case 'findRecord':\n return this.urlForFindRecord(id, modelName, snapshot);\n case 'findAll':\n return this.urlForFindAll(modelName, snapshot);\n case 'query':\n return this.urlForQuery(query || {}, modelName);\n case 'queryRecord':\n return this.urlForQueryRecord(query || {}, modelName);\n case 'findMany':\n return this.urlForFindMany(id, modelName, snapshot);\n case 'findHasMany':\n return this.urlForFindHasMany(id, modelName, snapshot);\n case 'findBelongsTo':\n return this.urlForFindBelongsTo(id, modelName, snapshot);\n case 'createRecord':\n return this.urlForCreateRecord(modelName, snapshot);\n case 'updateRecord':\n return this.urlForUpdateRecord(id, modelName, snapshot);\n case 'deleteRecord':\n return this.urlForDeleteRecord(id, modelName, snapshot);\n default:\n // this is the 'never' case but someone may call `buildURL` manually so\n // we try to do something for them.\n return this._buildURL(modelName, id);\n }\n}\n\n/**\n @method _buildURL\n @private\n @param {String} modelName\n @param {String} id\n @return {String} url\n */\nfunction _buildURL(modelName, id) {\n let path;\n let url = [];\n let {\n host\n } = this;\n let prefix = this.urlPrefix();\n if (modelName) {\n path = this.pathForType(modelName);\n if (path) {\n url.push(path);\n }\n }\n if (id) {\n url.push(encodeURIComponent(id));\n }\n if (prefix) {\n url.unshift(prefix);\n }\n let urlString = url.join('/');\n if (!host && urlString && urlString.charAt(0) !== '/') {\n urlString = '/' + urlString;\n }\n return urlString;\n}\n\n/**\n Builds a URL for a `store.findRecord(type, id)` call.\n\n Example:\n\n ```app/adapters/user.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class ApplicationAdapter extends JSONAPIAdapter {\n urlForFindRecord(id, modelName, snapshot) {\n let baseUrl = this.buildURL(modelName, id, snapshot);\n return `${baseUrl}/users/${snapshot.adapterOptions.user_id}/playlists/${id}`;\n }\n }\n ```\n\n @method urlForFindRecord\n @public\n @param {String} id\n @param {String} modelName\n @param {Snapshot} snapshot\n @return {String} url\n\n */\nfunction urlForFindRecord(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n}\n\n/**\n Builds a URL for a `store.findAll(type)` call.\n\n Example:\n\n ```app/adapters/comment.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class ApplicationAdapter extends JSONAPIAdapter {\n urlForFindAll(modelName, snapshot) {\n let baseUrl = this.buildURL(modelName);\n return `${baseUrl}/data/comments.json`;\n }\n }\n ```\n\n @method urlForFindAll\n @public\n @param {String} modelName\n @param {SnapshotRecordArray} snapshot\n @return {String} url\n */\nfunction urlForFindAll(modelName, snapshots) {\n return this._buildURL(modelName);\n}\n\n/**\n Builds a URL for a `store.query(type, query)` call.\n\n Example:\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n host = 'https://api.github.com';\n urlForQuery (query, modelName) {\n switch(modelName) {\n case 'repo':\n return `https://api.github.com/orgs/${query.orgId}/repos`;\n default:\n return super.urlForQuery(...arguments);\n }\n }\n }\n ```\n\n @method urlForQuery\n @public\n @param {Object} query\n @param {String} modelName\n @return {String} url\n */\nfunction urlForQuery(query, modelName) {\n return this._buildURL(modelName);\n}\n\n/**\n Builds a URL for a `store.queryRecord(type, query)` call.\n\n Example:\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n urlForQueryRecord({ slug }, modelName) {\n let baseUrl = this.buildURL();\n return `${baseUrl}/${encodeURIComponent(slug)}`;\n }\n }\n ```\n\n @method urlForQueryRecord\n @public\n @param {Object} query\n @param {String} modelName\n @return {String} url\n */\nfunction urlForQueryRecord(query, modelName) {\n return this._buildURL(modelName);\n}\n\n/**\n Builds a URL for coalescing multiple `store.findRecord(type, id)`\n records into 1 request when the adapter's `coalesceFindRequests`\n property is `true`.\n\n Example:\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n urlForFindMany(ids, modelName) {\n let baseUrl = this.buildURL();\n return `${baseUrl}/coalesce`;\n }\n }\n ```\n\n @method urlForFindMany\n @public\n @param {Array} ids\n @param {String} modelName\n @param {Array} snapshots\n @return {String} url\n */\nfunction urlForFindMany(ids, modelName, snapshots) {\n return this._buildURL(modelName);\n}\n\n/**\n Builds a URL for fetching an async `hasMany` relationship when a URL\n is not provided by the server.\n\n Example:\n\n ```app/adapters/application.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class ApplicationAdapter extends JSONAPIAdapter {\n urlForFindHasMany(id, modelName, snapshot) {\n let baseUrl = this.buildURL(modelName, id);\n return `${baseUrl}/relationships`;\n }\n }\n ```\n\n @method urlForFindHasMany\n @public\n @param {String} id\n @param {String} modelName\n @param {Snapshot} snapshot\n @return {String} url\n */\nfunction urlForFindHasMany(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n}\n\n/**\n Builds a URL for fetching an async `belongsTo` relationship when a url\n is not provided by the server.\n\n Example:\n\n ```app/adapters/application.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class ApplicationAdapter extends JSONAPIAdapter {\n urlForFindBelongsTo(id, modelName, snapshot) {\n let baseUrl = this.buildURL(modelName, id);\n return `${baseUrl}/relationships`;\n }\n }\n ```\n\n @method urlForFindBelongsTo\n @public\n @param {String} id\n @param {String} modelName\n @param {Snapshot} snapshot\n @return {String} url\n */\nfunction urlForFindBelongsTo(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n}\n\n/**\n Builds a URL for a `record.save()` call when the record was created\n locally using `store.createRecord()`.\n\n Example:\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n urlForCreateRecord(modelName, snapshot) {\n return super.urlForCreateRecord(...arguments) + '/new';\n }\n }\n ```\n\n @method urlForCreateRecord\n @public\n @param {String} modelName\n @param {Snapshot} snapshot\n @return {String} url\n */\nfunction urlForCreateRecord(modelName, snapshot) {\n return this._buildURL(modelName);\n}\n\n/**\n Builds a URL for a `record.save()` call when the record has been updated locally.\n\n Example:\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n urlForUpdateRecord(id, modelName, snapshot) {\n return `/${id}/feed?access_token=${snapshot.adapterOptions.token}`;\n }\n }\n ```\n\n @method urlForUpdateRecord\n @public\n @param {String} id\n @param {String} modelName\n @param {Snapshot} snapshot\n @return {String} url\n */\nfunction urlForUpdateRecord(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n}\n\n/**\n Builds a URL for a `record.save()` call when the record has been deleted locally.\n\n Example:\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n urlForDeleteRecord(id, modelName, snapshot) {\n return super.urlForDeleteRecord(...arguments) + '/destroy';\n }\n }\n ```\n\n @method urlForDeleteRecord\n @public\n @param {String} id\n @param {String} modelName\n @param {Snapshot} snapshot\n @return {String} url\n */\nfunction urlForDeleteRecord(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n}\n\n/**\n @method urlPrefix\n @private\n @param {String} path\n @param {String} parentURL\n @return {String} urlPrefix\n */\nfunction urlPrefix(path, parentURL) {\n let {\n host,\n namespace\n } = this;\n if (!host || host === '/') {\n host = '';\n }\n if (path) {\n // Protocol relative url\n if (/^\\/\\//.test(path) || /http(s)?:\\/\\//.test(path)) {\n // Do nothing, the full host is already included.\n return path;\n\n // Absolute path\n } else if (path.charAt(0) === '/') {\n return `${host}${path}`;\n // Relative path\n } else {\n return `${parentURL}/${path}`;\n }\n }\n\n // No path provided\n let url = [];\n if (host) {\n url.push(host);\n }\n if (namespace) {\n url.push(namespace);\n }\n return url.join('/');\n}\n\n/**\n Determines the pathname for a given type.\n\n By default, it pluralizes the type's name (for example,\n 'post' becomes 'posts' and 'person' becomes 'people').\n\n ### Pathname customization\n\n For example, if you have an object `LineItem` with an\n endpoint of `/line_items/`.\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n import { decamelize } from '@ember/string';\n import { pluralize } from 'ember-inflector';\n\n export default class ApplicationAdapter extends RESTAdapter {\n pathForType(modelName) {\n var decamelized = decamelize(modelName);\n return pluralize(decamelized);\n }\n }\n ```\n\n @method pathForType\n @public\n @param {String} modelName\n @return {String} path\n **/\nfunction pathForType(modelName) {\n let camelized = camelize(modelName);\n return pluralize(camelized);\n}\n\n// we build it this way vs casting to BuildURLMixin so that any\n// changes to the interface surface as errors here.\nconst mixinProps = {\n buildURL,\n _buildURL,\n urlForFindRecord,\n urlForFindAll,\n urlForQueryRecord,\n urlForQuery,\n urlForFindMany,\n urlForFindHasMany,\n urlForFindBelongsTo,\n urlForCreateRecord,\n urlForDeleteRecord,\n urlForUpdateRecord,\n urlPrefix,\n pathForType\n};\nexport default Mixin.create(mixinProps);","import { assert } from '@ember/debug';\nexport default function serializeIntoHash(store, modelClass, snapshot, options = {\n includeId: true\n}) {\n const serializer = store.serializerFor(modelClass.modelName);\n assert(`Cannot serialize record, no serializer defined`, serializer);\n if (typeof serializer.serializeIntoHash === 'function') {\n const data = {};\n serializer.serializeIntoHash(data, modelClass, snapshot, options);\n return data;\n }\n return serializer.serialize(snapshot, options);\n}","/**\n @module @ember-data/adapter/error\n */\nimport { assert } from '@ember/debug';\nimport EmberError from '@ember/error';\n\n/**\n A `AdapterError` is used by an adapter to signal that an error occurred\n during a request to an external API. It indicates a generic error, and\n subclasses are used to indicate specific error states. The following\n subclasses are provided:\n\n - `InvalidError`\n - `TimeoutError`\n - `AbortError`\n - `UnauthorizedError`\n - `ForbiddenError`\n - `NotFoundError`\n - `ConflictError`\n - `ServerError`\n\n To create a custom error to signal a specific error state in communicating\n with an external API, extend the `AdapterError`. For example, if the\n external API exclusively used HTTP `503 Service Unavailable` to indicate\n it was closed for maintenance:\n\n ```app/adapters/maintenance-error.js\n import AdapterError from '@ember-data/adapter/error';\n\n export default AdapterError.extend({ message: \"Down for maintenance.\" });\n ```\n\n This error would then be returned by an adapter's `handleResponse` method:\n\n ```app/adapters/application.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n import MaintenanceError from './maintenance-error';\n\n export default class ApplicationAdapter extends JSONAPIAdapter {\n handleResponse(status) {\n if (503 === status) {\n return new MaintenanceError();\n }\n\n return super.handleResponse(...arguments);\n }\n }\n ```\n\n And can then be detected in an application and used to send the user to an\n `under-maintenance` route:\n\n ```app/routes/application.js\n import Route from '@ember/routing/route';\n import MaintenanceError from '../adapters/maintenance-error';\n\n export default class ApplicationRoute extends Route {\n actions: {\n error(error, transition) {\n if (error instanceof MaintenanceError) {\n this.transitionTo('under-maintenance');\n return;\n }\n\n // ...other error handling logic\n }\n }\n }\n ```\n\n @main @ember-data/adapter/error\n @class AdapterError\n @public\n*/\nfunction AdapterError(errors, message = 'Adapter operation failed') {\n this.isAdapterError = true;\n let error = EmberError.call(this, message);\n\n // in ember 3.8+ Error is a Native Error and we don't\n // gain these automatically from the EmberError.call\n if (error) {\n this.stack = error.stack;\n this.description = error.description;\n this.fileName = error.fileName;\n this.lineNumber = error.lineNumber;\n this.message = error.message;\n this.name = error.name;\n this.number = error.number;\n }\n this.errors = errors || [{\n title: 'Adapter Error',\n detail: message\n }];\n}\nexport default AdapterError;\nfunction extendFn(ErrorClass) {\n return function ({\n message: defaultMessage\n } = {}) {\n return extend(ErrorClass, defaultMessage);\n };\n}\nfunction extend(ParentErrorClass, defaultMessage) {\n let ErrorClass = function (errors, message) {\n assert('`AdapterError` expects json-api formatted errors array.', Array.isArray(errors || []));\n ParentErrorClass.call(this, errors, message || defaultMessage);\n };\n ErrorClass.prototype = Object.create(ParentErrorClass.prototype);\n ErrorClass.extend = extendFn(ErrorClass);\n return ErrorClass;\n}\nAdapterError.prototype = Object.create(EmberError.prototype);\nAdapterError.prototype.code = 'AdapterError';\nAdapterError.extend = extendFn(AdapterError);\n\n/**\n A `InvalidError` is used by an adapter to signal the external API\n was unable to process a request because the content was not\n semantically correct or meaningful per the API. Usually, this means a\n record failed some form of server-side validation. When a promise\n from an adapter is rejected with a `InvalidError` the record will\n transition to the `invalid` state and the errors will be set to the\n `errors` property on the record.\n\n For Ember Data to correctly map errors to their corresponding\n properties on the model, Ember Data expects each error to be\n a valid JSON-API error object with a `source/pointer` that matches\n the property name. For example, if you had a Post model that\n looked like this.\n\n ```app/models/post.js\n import Model, { attr } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @attr('string') title;\n @attr('string') content;\n }\n ```\n\n To show an error from the server related to the `title` and\n `content` properties your adapter could return a promise that\n rejects with a `InvalidError` object that looks like this:\n\n ```app/adapters/post.js\n import RSVP from 'RSVP';\n import RESTAdapter from '@ember-data/adapter/rest';\n import { InvalidError } from '@ember-data/adapter/error';\n\n export default class ApplicationAdapter extends RESTAdapter {\n updateRecord() {\n // Fictional adapter that always rejects\n return RSVP.reject(new InvalidError([\n {\n detail: 'Must be unique',\n source: { pointer: '/data/attributes/title' }\n },\n {\n detail: 'Must not be blank',\n source: { pointer: '/data/attributes/content'}\n }\n ]));\n }\n }\n ```\n\n Your backend may use different property names for your records the\n store will attempt to extract and normalize the errors using the\n serializer's `extractErrors` method before the errors get added to\n the model. As a result, it is safe for the `InvalidError` to\n wrap the error payload unaltered.\n\n @class InvalidError\n @public\n @extends AdapterError\n*/\nexport const InvalidError = extend(AdapterError, 'The adapter rejected the commit because it was invalid');\nInvalidError.prototype.code = 'InvalidError';\n\n/**\n A `TimeoutError` is used by an adapter to signal that a request\n to the external API has timed out. I.e. no response was received from\n the external API within an allowed time period.\n\n An example use case would be to warn the user to check their internet\n connection if an adapter operation has timed out:\n\n ```app/routes/application.js\n import Route from '@ember/routing/route';\n import { TimeoutError } from '@ember-data/adapter/error';\n import { action } from '@ember/object';\n\n export default class ApplicationRoute extends Route {\n @action\n error(error, transition) {\n if (error instanceof TimeoutError) {\n // alert the user\n alert('Are you still connected to the Internet?');\n return;\n }\n\n // ...other error handling logic\n }\n }\n ```\n\n @class TimeoutError\n @public\n @extends AdapterError\n*/\nexport const TimeoutError = extend(AdapterError, 'The adapter operation timed out');\nTimeoutError.prototype.code = 'TimeoutError';\n\n/**\n A `AbortError` is used by an adapter to signal that a request to\n the external API was aborted. For example, this can occur if the user\n navigates away from the current page after a request to the external API\n has been initiated but before a response has been received.\n\n @class AbortError\n @public\n @extends AdapterError\n*/\nexport const AbortError = extend(AdapterError, 'The adapter operation was aborted');\nAbortError.prototype.code = 'AbortError';\n\n/**\n A `UnauthorizedError` equates to a HTTP `401 Unauthorized` response\n status. It is used by an adapter to signal that a request to the external\n API was rejected because authorization is required and has failed or has not\n yet been provided.\n\n An example use case would be to redirect the user to a login route if a\n request is unauthorized:\n\n ```app/routes/application.js\n import Route from '@ember/routing/route';\n import { UnauthorizedError } from '@ember-data/adapter/error';\n import { action } from '@ember/object';\n\n export default class ApplicationRoute extends Route {\n @action\n error(error, transition) {\n if (error instanceof UnauthorizedError) {\n // go to the login route\n this.transitionTo('login');\n return;\n }\n\n // ...other error handling logic\n }\n }\n ```\n\n @class UnauthorizedError\n @public\n @extends AdapterError\n*/\nexport const UnauthorizedError = extend(AdapterError, 'The adapter operation is unauthorized');\nUnauthorizedError.prototype.code = 'UnauthorizedError';\n\n/**\n A `ForbiddenError` equates to a HTTP `403 Forbidden` response status.\n It is used by an adapter to signal that a request to the external API was\n valid but the server is refusing to respond to it. If authorization was\n provided and is valid, then the authenticated user does not have the\n necessary permissions for the request.\n\n @class ForbiddenError\n @public\n @extends AdapterError\n*/\nexport const ForbiddenError = extend(AdapterError, 'The adapter operation is forbidden');\nForbiddenError.prototype.code = 'ForbiddenError';\n\n/**\n A `NotFoundError` equates to a HTTP `404 Not Found` response status.\n It is used by an adapter to signal that a request to the external API\n was rejected because the resource could not be found on the API.\n\n An example use case would be to detect if the user has entered a route\n for a specific model that does not exist. For example:\n\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n import { NotFoundError } from '@ember-data/adapter/error';\n import { inject as service } from '@ember/service';\n import { action } from '@ember/object';\n\n export default class PostRoute extends Route {\n @service store;\n model(params) {\n return this.get('store').findRecord('post', params.post_id);\n }\n @action\n error(error, transition) {\n if (error instanceof NotFoundError) {\n // redirect to a list of all posts instead\n this.transitionTo('posts');\n } else {\n // otherwise let the error bubble\n return true;\n }\n }\n }\n ```\n\n @class NotFoundError\n @public\n @extends AdapterError\n*/\nexport const NotFoundError = extend(AdapterError, 'The adapter could not find the resource');\nNotFoundError.prototype.code = 'NotFoundError';\n\n/**\n A `ConflictError` equates to a HTTP `409 Conflict` response status.\n It is used by an adapter to indicate that the request could not be processed\n because of a conflict in the request. An example scenario would be when\n creating a record with a client-generated ID but that ID is already known\n to the external API.\n\n @class ConflictError\n @public\n @extends AdapterError\n*/\nexport const ConflictError = extend(AdapterError, 'The adapter operation failed due to a conflict');\nConflictError.prototype.code = 'ConflictError';\n\n/**\n A `ServerError` equates to a HTTP `500 Internal Server Error` response\n status. It is used by the adapter to indicate that a request has failed\n because of an error in the external API.\n\n @class ServerError\n @public\n @extends AdapterError\n*/\nexport const ServerError = extend(AdapterError, 'The adapter operation failed due to a server error');\nServerError.prototype.code = 'ServerError';\nexport { errorsHashToArray, errorsArrayToHash } from '@ember-data/store/-private';","var _class, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\n/**\n ## Overview\n\n In order to properly fetch and update data, EmberData\n needs to understand how to connect to your API.\n\n `Adapters` accept various kinds of requests from the store\n and manage fulfillment of the request from your API.\n\n ### Request Flow\n\n When the store decides it needs to issue a request it uses the\n following flow to manage the request and process the data.\n\n - find the appropriate adapter\n - issue the request to the adapter\n - await the adapter's response\n - if an error occurs reject with the error\n - if no error\n - if there is response data\n - pass the response data to the appropriate serializer\n - update the cache using the JSON:API formatted data from the serializer's response\n - return the primary record(s) associated with the request\n\n ### Request Errors\n\n When a request errors and your adapter does not have the ability to recover from the error,\n you may either reject the promise returned by your adapter method with the error or simply\n throw the error.\n\n If the request was for a `createRecord` `updateRecord` or `deleteRecord` special rules\n apply to how this error will affect the state of the store and additional properties on\n the `Error` class may be used. See the documentation for these methods in the\n `MinimumAdapterInterface` for more information.\n\n ### Implementing an Adapter\n\n There are seven required adapter methods, one for each of\n the primary request types that EmberData issues.\n\n They are:\n\n - findRecord\n - findAll\n - queryRecord\n - query\n - createRecord\n - updateRecord\n - deleteRecord\n\n Each of these request types has a matching store method that triggers it\n and matching `requestType` that is passed to the serializer's\n `normalizeResponse` method.\n\n If your app only reads data but never writes data, it is not necessary\n to implement the methods for create, update, and delete. This extends to\n all of the store's find methods with the exception of `findRecord` (`findAll`,\n `query`, `queryRecord`): if you do not use the store method in your app then\n your Adapter does not need the method.\n\n ```ts\n import EmberObject from '@ember/object';\n\n async function fetchData(url, options = {}) {\n let response = await fetch(url, options);\n return response.toJSON();\n }\n\n export default class ApplicationAdapter extends EmberObject {\n findRecord(_, { modelName }, id) {\n return fetchData(`./${modelName}s/${id}`);\n }\n }\n ```\n\n ### Adapter Resolution\n\n `store.adapterFor(name)` will lookup adapters defined in `app/adapters/` and\n return an instance.\n\n `adapterFor` first attempts to find an adapter with an exact match on `name`,\n then falls back to checking for the presence of an adapter named `application`.\n\n If no adapter is found, an error will be thrown.\n\n ```ts\n store.adapterFor('author');\n\n // lookup paths (in order) =>\n // app/adapters/author.js\n // app/adapters/application.js\n ```\n\n Most requests in EmberData are made with respect to a particular `type` (or `modelName`)\n (e.g., \"get me the full collection of **books**\" or \"get me the **employee** whose id is 37\"). We\n refer to this as the **primary** resource `type`.\n\n `adapterFor` is used by the store to find an adapter with a name matching that of the primary\n resource `type` for the request, which then falls back to the `application` adapter.\n\n It is recommended that applications define only a single `application` adapter and serializer\n where possible, only implementing an adapter specific to the `type` when absolutely necessary.\n\n If you need to support multiple API versions for the same type, the per-type strategy for\n defining adapters might not be adequate.\n\n If you have multiple APIs or multiple API versions and the single application adapter and per-type\n strategy does not suite your needs, one strategy is to write an `application` adapter and serializer\n that make use of `options` to specify the desired format when making a request, then forwards to the\n request to the desired adapter or serializer as needed.\n\n ```app/adapters/application.js\n export default class Adapter extends EmberObject {\n findRecord(store, schema, id, snapshot) {\n let { apiVersion } = snapshot.adapterOptions;\n return this.adapterFor(`-api-${apiVersion}`).findRecord(store, schema, id, snapshot);\n }\n }\n ```\n\n ### Using an Adapter\n\n Any adapter in `app/adapters/` can be looked up by `name` using `store.adapterFor(name)`.\n\n ### Default Adapters\n\n Applications whose API's structure endpoint URLs *very close to* or *exactly* the **REST**\n or **JSON:API** convention, the `@ember-data/adapter` package contains implementations\n these applications can extend.\n\n Many applications will find writing their own adapter to be allow greater flexibility,\n customization, and maintenance than attempting to override methods in these adapters.\n\n @module @ember-data/adapter\n @main @ember-data/adapter\n*/\n\nimport EmberObject from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { DEBUG } from '@glimmer/env';\nimport { Promise as RSVPPromise } from 'rsvp';\n/**\n An adapter is an object that receives requests from a store and\n translates them into the appropriate action to take against your\n persistence layer. The persistence layer is usually an HTTP API but\n may be anything, such as the browser's local storage. Typically the\n adapter is not invoked directly instead its functionality is accessed\n through the `store`.\n\n ### Creating an Adapter\n\n Create a new subclass of `Adapter` in the `app/adapters` folder:\n\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n\n export default Adapter.extend({\n // ...your code here\n });\n ```\n\n Model-specific adapters can be created by putting your adapter\n class in an `app/adapters/` + `model-name` + `.js` file of the application.\n\n ```app/adapters/post.js\n import Adapter from '@ember-data/adapter';\n\n export default Adapter.extend({\n // ...Post-specific adapter code goes here\n });\n ```\n\n `Adapter` is an abstract base class that you should override in your\n application to customize it for your backend. The minimum set of methods\n that you should implement is:\n\n * `findRecord()`\n * `createRecord()`\n * `updateRecord()`\n * `deleteRecord()`\n * `findAll()`\n * `query()`\n\n To improve the network performance of your application, you can optimize\n your adapter by overriding these lower-level methods:\n\n * `findMany()`\n\n\n For an example of the implementation, see `RESTAdapter`, the\n included REST adapter.\n\n @class Adapter\n @public\n @extends Ember.EmberObject\n*/\nlet Adapter = (_class = class Adapter extends EmberObject {\n constructor(...args) {\n super(...args);\n _initializerDefineProperty(this, \"store\", _descriptor, this);\n }\n /**\n The `findRecord()` method is invoked when the store is asked for a record that\n has not previously been loaded. In response to `findRecord()` being called, you\n should query your persistence layer for a record with the given ID. The `findRecord`\n method should return a promise that will resolve to a JavaScript object that will be\n normalized by the serializer.\n Here is an example of the `findRecord` implementation:\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter {\n findRecord(store, type, id, snapshot) {\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}/${id}`).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n }\n ```\n @method findRecord\n @param {Store} store\n @param {Model} type\n @param {String} id\n @param {Snapshot} snapshot\n @return {Promise} promise\n @public\n */\n findRecord(store, type, id, snapshot) {\n if (DEBUG) {\n throw new Error('You subclassed the Adapter class but missing a findRecord override');\n }\n return RSVPPromise.resolve();\n }\n\n /**\n The `findAll()` method is used to retrieve all records for a given type.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter {\n findAll(store, type) {\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}`).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n }\n ```\n @method findAll\n @param {Store} store\n @param {Model} type\n @param {undefined} neverSet a value is never provided to this argument\n @param {SnapshotRecordArray} snapshotRecordArray\n @return {Promise} promise\n @public\n */\n findAll(store, type, neverSet, snapshotRecordArray) {\n if (DEBUG) {\n throw new Error('You subclassed the Adapter class but missing a findAll override');\n }\n return RSVPPromise.resolve();\n }\n\n /**\n This method is called when you call `query` on the store.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter {\n query(store, type, query) {\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}`, query).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n }\n ```\n @method query\n @param {Store} store\n @param {Model} type\n @param {Object} query\n @param {AdapterPopulatedRecordArray} recordArray\n @param {Object} adapterOptions\n @return {Promise} promise\n @public\n */\n query(store, type, query) {\n if (DEBUG) {\n throw new Error('You subclassed the Adapter class but missing a query override');\n }\n return RSVPPromise.resolve();\n }\n\n /**\n The `queryRecord()` method is invoked when the store is asked for a single\n record through a query object.\n In response to `queryRecord()` being called, you should always fetch fresh\n data. Once found, you can asynchronously call the store's `push()` method\n to push the record into the store.\n Here is an example `queryRecord` implementation:\n Example\n ```app/adapters/application.js\n import Adapter, { BuildURLMixin } from '@ember-data/adapter';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) {\n queryRecord(store, type, query) {\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}`, query).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n }\n ```\n @method queryRecord\n @param {Store} store\n @param {subclass of Model} type\n @param {Object} query\n @param {Object} adapterOptions\n @return {Promise} promise\n @public\n */\n queryRecord(store, type, query, adapterOptions) {\n if (DEBUG) {\n throw new Error('You subclassed the Adapter class but missing a queryRecord override');\n }\n return RSVPPromise.resolve();\n }\n\n /**\n If the globally unique IDs for your records should be generated on the client,\n implement the `generateIdForRecord()` method. This method will be invoked\n each time you create a new record, and the value returned from it will be\n assigned to the record's `primaryKey`.\n Most traditional REST-like HTTP APIs will not use this method. Instead, the ID\n of the record will be set by the server, and your adapter will update the store\n with the new ID when it calls `didCreateRecord()`. Only implement this method if\n you intend to generate record IDs on the client-side.\n The `generateIdForRecord()` method will be invoked with the requesting store as\n the first parameter and the newly created record as the second parameter:\n ```javascript\n import Adapter from '@ember-data/adapter';\n import { v4 } from 'uuid';\n export default class ApplicationAdapter extends Adapter {\n generateIdForRecord(store, type, inputProperties) {\n return v4();\n }\n }\n ```\n @method generateIdForRecord\n @param {Store} store\n @param {Model} type the Model class of the record\n @param {Object} inputProperties a hash of properties to set on the\n newly created record.\n @return {(String|Number)} id\n @public\n */\n\n /**\n Proxies to the serializer's `serialize` method.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n export default class ApplicationAdapter extends Adapter {\n createRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n let url = `/${type.modelName}`;\n // ...\n }\n }\n ```\n @method serialize\n @param {Snapshot} snapshot\n @param {Object} options\n @return {Object} serialized snapshot\n @public\n */\n serialize(snapshot, options) {\n return snapshot.serialize(options);\n }\n\n /**\n Implement this method in a subclass to handle the creation of\n new records.\n Serializes the record and sends it to the server.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter {\n createRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n return new RSVP.Promise(function (resolve, reject) {\n $.ajax({\n type: 'POST',\n url: `/${type.modelName}`,\n dataType: 'json',\n data: data\n }).then(function (data) {\n run(null, resolve, data);\n }, function (jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n }\n ```\n @method createRecord\n @param {Store} store\n @param {Model} type the Model class of the record\n @param {Snapshot} snapshot\n @return {Promise} promise\n @public\n */\n createRecord(store, type, snapshot) {\n if (DEBUG) {\n throw new Error('You subclassed the Adapter class but missing a createRecord override');\n }\n return RSVPPromise.resolve();\n }\n\n /**\n Implement this method in a subclass to handle the updating of\n a record.\n Serializes the record update and sends it to the server.\n The updateRecord method is expected to return a promise that will\n resolve with the serialized record. This allows the backend to\n inform the Ember Data store the current state of this record after\n the update. If it is not possible to return a serialized record\n the updateRecord promise can also resolve with `undefined` and the\n Ember Data store will assume all of the updates were successfully\n applied on the backend.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter {\n updateRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n let id = snapshot.id;\n return new RSVP.Promise(function(resolve, reject) {\n $.ajax({\n type: 'PUT',\n url: `/${type.modelName}/${id}`,\n dataType: 'json',\n data: data\n }).then(function(data) {\n run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n }\n ```\n @method updateRecord\n @param {Store} store\n @param {Model} type the Model class of the record\n @param {Snapshot} snapshot\n @return {Promise} promise\n @public\n */\n updateRecord(store, type, snapshot) {\n if (DEBUG) {\n throw new Error('You subclassed the Adapter class but missing a updateRecord override');\n }\n return RSVPPromise.resolve();\n }\n\n /**\n Implement this method in a subclass to handle the deletion of\n a record.\n Sends a delete request for the record to the server.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter {\n deleteRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n let id = snapshot.id;\n return new RSVP.Promise(function(resolve, reject) {\n $.ajax({\n type: 'DELETE',\n url: `/${type.modelName}/${id}`,\n dataType: 'json',\n data: data\n }).then(function(data) {\n run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n }\n ```\n @method deleteRecord\n @param {Store} store\n @param {Model} type the Model class of the record\n @param {Snapshot} snapshot\n @return {Promise} promise\n @public\n */\n deleteRecord(store, type, snapshot) {\n if (DEBUG) {\n throw new Error('You subclassed the Adapter class but missing a deleteRecord override');\n }\n return RSVPPromise.resolve();\n }\n\n /**\n By default the store will try to coalesce all `findRecord` calls within the same runloop\n into as few requests as possible by calling groupRecordsForFindMany and passing it into a findMany call.\n You can opt out of this behaviour by either not implementing the findMany hook or by setting\n coalesceFindRequests to false.\n @property coalesceFindRequests\n @public\n @type {boolean}\n */\n get coalesceFindRequests() {\n let coalesceFindRequests = this._coalesceFindRequests;\n if (typeof coalesceFindRequests === 'boolean') {\n return coalesceFindRequests;\n }\n return this._coalesceFindRequests = true;\n }\n set coalesceFindRequests(value) {\n this._coalesceFindRequests = value;\n }\n\n /**\n The store will call `findMany` instead of multiple `findRecord`\n requests to find multiple records at once if coalesceFindRequests\n is true.\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default class ApplicationAdapter extends Adapter {\n findMany(store, type, ids, snapshots) {\n return new RSVP.Promise(function(resolve, reject) {\n $.ajax({\n type: 'GET',\n url: `/${type.modelName}/`,\n dataType: 'json',\n data: { filter: { id: ids.join(',') } }\n }).then(function(data) {\n run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n }\n ```\n @method findMany\n @param {Store} store\n @param {Model} type the Model class of the records\n @param {Array} ids\n @param {Array} snapshots\n @return {Promise} promise\n @public\n */\n\n /**\n Organize records into groups, each of which is to be passed to separate\n calls to `findMany`.\n For example, if your API has nested URLs that depend on the parent, you will\n want to group records by their parent.\n The default implementation returns the records as a single group.\n @method groupRecordsForFindMany\n @public\n @param {Store} store\n @param {Array} snapshots\n @return {Array} an array of arrays of records, each of which is to be\n loaded separately by `findMany`.\n */\n groupRecordsForFindMany(store, snapshots) {\n return [snapshots];\n }\n\n /**\n This method is used by the store to determine if the store should\n reload a record from the adapter when a record is requested by\n `store.findRecord`.\n If this method returns `true`, the store will re-fetch a record from\n the adapter. If this method returns `false`, the store will resolve\n immediately using the cached record.\n For example, if you are building an events ticketing system, in which users\n can only reserve tickets for 20 minutes at a time, and want to ensure that\n in each route you have data that is no more than 20 minutes old you could\n write:\n ```javascript\n shouldReloadRecord(store, ticketSnapshot) {\n let lastAccessedAt = ticketSnapshot.attr('lastAccessedAt');\n let timeDiff = moment().diff(lastAccessedAt, 'minutes');\n if (timeDiff > 20) {\n return true;\n } else {\n return false;\n }\n }\n ```\n This method would ensure that whenever you do `store.findRecord('ticket',\n id)` you will always get a ticket that is no more than 20 minutes old. In\n case the cached version is more than 20 minutes old, `findRecord` will not\n resolve until you fetched the latest version.\n By default this hook returns `false`, as most UIs should not block user\n interactions while waiting on data update.\n Note that, with default settings, `shouldBackgroundReloadRecord` will always\n re-fetch the records in the background even if `shouldReloadRecord` returns\n `false`. You can override `shouldBackgroundReloadRecord` if this does not\n suit your use case.\n @since 1.13.0\n @method shouldReloadRecord\n @param {Store} store\n @param {Snapshot} snapshot\n @return {Boolean}\n @public\n */\n shouldReloadRecord(store, snapshot) {\n return false;\n }\n\n /**\n This method is used by the store to determine if the store should\n reload all records from the adapter when records are requested by\n `store.findAll`.\n If this method returns `true`, the store will re-fetch all records from\n the adapter. If this method returns `false`, the store will resolve\n immediately using the cached records.\n For example, if you are building an events ticketing system, in which users\n can only reserve tickets for 20 minutes at a time, and want to ensure that\n in each route you have data that is no more than 20 minutes old you could\n write:\n ```javascript\n shouldReloadAll(store, snapshotArray) {\n let snapshots = snapshotArray.snapshots();\n return snapshots.any((ticketSnapshot) => {\n let lastAccessedAt = ticketSnapshot.attr('lastAccessedAt');\n let timeDiff = moment().diff(lastAccessedAt, 'minutes');\n if (timeDiff > 20) {\n return true;\n } else {\n return false;\n }\n });\n }\n ```\n This method would ensure that whenever you do `store.findAll('ticket')` you\n will always get a list of tickets that are no more than 20 minutes old. In\n case a cached version is more than 20 minutes old, `findAll` will not\n resolve until you fetched the latest versions.\n By default, this method returns `true` if the passed `snapshotRecordArray`\n is empty (meaning that there are no records locally available yet),\n otherwise, it returns `false`.\n Note that, with default settings, `shouldBackgroundReloadAll` will always\n re-fetch all the records in the background even if `shouldReloadAll` returns\n `false`. You can override `shouldBackgroundReloadAll` if this does not suit\n your use case.\n @since 1.13.0\n @method shouldReloadAll\n @param {Store} store\n @param {SnapshotRecordArray} snapshotRecordArray\n @return {Boolean}\n @public\n */\n shouldReloadAll(store, snapshotRecordArray) {\n return !snapshotRecordArray.length;\n }\n\n /**\n This method is used by the store to determine if the store should\n reload a record after the `store.findRecord` method resolves a\n cached record.\n This method is *only* checked by the store when the store is\n returning a cached record.\n If this method returns `true` the store will re-fetch a record from\n the adapter.\n For example, if you do not want to fetch complex data over a mobile\n connection, or if the network is down, you can implement\n `shouldBackgroundReloadRecord` as follows:\n ```javascript\n shouldBackgroundReloadRecord(store, snapshot) {\n let { downlink, effectiveType } = navigator.connection;\n return downlink > 0 && effectiveType === '4g';\n }\n ```\n By default, this hook returns `true` so the data for the record is updated\n in the background.\n @since 1.13.0\n @method shouldBackgroundReloadRecord\n @param {Store} store\n @param {Snapshot} snapshot\n @return {Boolean}\n @public\n */\n shouldBackgroundReloadRecord(store, Snapshot) {\n return true;\n }\n\n /**\n This method is used by the store to determine if the store should\n reload a record array after the `store.findAll` method resolves\n with a cached record array.\n This method is *only* checked by the store when the store is\n returning a cached record array.\n If this method returns `true` the store will re-fetch all records\n from the adapter.\n For example, if you do not want to fetch complex data over a mobile\n connection, or if the network is down, you can implement\n `shouldBackgroundReloadAll` as follows:\n ```javascript\n shouldBackgroundReloadAll(store, snapshotArray) {\n let { downlink, effectiveType } = navigator.connection;\n return downlink > 0 && effectiveType === '4g';\n }\n ```\n By default this method returns `true`, indicating that a background reload\n should always be triggered.\n @since 1.13.0\n @method shouldBackgroundReloadAll\n @param {Store} store\n @param {SnapshotRecordArray} snapshotRecordArray\n @return {Boolean}\n @public\n */\n shouldBackgroundReloadAll(store, snapshotRecordArray) {\n return true;\n }\n}, _descriptor = _applyDecoratedDescriptor(_class.prototype, \"store\", [service], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class);\nexport { Adapter as default };\nexport { BuildURLMixin } from './-private';","/**\n @module @ember-data/adapter/json-api\n */\nimport { assert } from '@ember/debug';\nimport { dasherize } from '@ember/string';\nimport { pluralize } from 'ember-inflector';\nimport { serializeIntoHash } from './-private';\nimport RESTAdapter from './rest';\n\n/**\n The `JSONAPIAdapter` is the default adapter used by Ember Data. It\n is responsible for transforming the store's requests into HTTP\n requests that follow the [JSON API](http://jsonapi.org/format/)\n format.\n\n ## JSON API Conventions\n\n The JSONAPIAdapter uses JSON API conventions for building the URL\n for a record and selecting the HTTP verb to use with a request. The\n actions you can take on a record map onto the following URLs in the\n JSON API adapter:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Action\n \n HTTP Verb\n \n URL\n
\n `store.findRecord('post', 123)`\n \n GET\n \n /posts/123\n
\n `store.findAll('post')`\n \n GET\n \n /posts\n
\n Update `postRecord.save()`\n \n PATCH\n \n /posts/123\n
\n Create `store.createRecord('post').save()`\n \n POST\n \n /posts\n
\n Delete `postRecord.destroyRecord()`\n \n DELETE\n \n /posts/123\n
\n\n ## Success and failure\n\n The JSONAPIAdapter will consider a success any response with a\n status code of the 2xx family (\"Success\"), as well as 304 (\"Not\n Modified\"). Any other status code will be considered a failure.\n\n On success, the request promise will be resolved with the full\n response payload.\n\n Failed responses with status code 422 (\"Unprocessable Entity\") will\n be considered \"invalid\". The response will be discarded, except for\n the `errors` key. The request promise will be rejected with a\n `InvalidError`. This error object will encapsulate the saved\n `errors` value.\n\n Any other status codes will be treated as an adapter error. The\n request promise will be rejected, similarly to the invalid case,\n but with an instance of `AdapterError` instead.\n\n ### Endpoint path customization\n\n Endpoint paths can be prefixed with a `namespace` by setting the\n namespace property on the adapter:\n\n ```app/adapters/application.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class ApplicationAdapter extends JSONAPIAdapter {\n namespace = 'api/1';\n }\n ```\n Requests for the `person` model would now target `/api/1/people/1`.\n\n ### Host customization\n\n An adapter can target other hosts by setting the `host` property.\n\n ```app/adapters/application.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class ApplicationAdapter extends JSONAPIAdapter {\n host = 'https://api.example.com';\n }\n ```\n\n Requests for the `person` model would now target\n `https://api.example.com/people/1`.\n\n @since 1.13.0\n @class JSONAPIAdapter\n @main @ember-data/adapter/json-api\n @public\n @constructor\n @extends RESTAdapter\n*/\nclass JSONAPIAdapter extends RESTAdapter {\n constructor(...args) {\n super(...args);\n this._defaultContentType = 'application/vnd.api+json';\n }\n /**\n @method ajaxOptions\n @private\n @param {String} url\n @param {String} type The request type GET, POST, PUT, DELETE etc.\n @param {Object} options\n @return {Object}\n */\n ajaxOptions(url, type, options = {}) {\n let hash = super.ajaxOptions(url, type, options);\n hash.headers['Accept'] = hash.headers['Accept'] || 'application/vnd.api+json';\n return hash;\n }\n\n /**\n By default the JSONAPIAdapter will send each find request coming from a `store.find`\n or from accessing a relationship separately to the server. If your server supports passing\n ids as a query string, you can set coalesceFindRequests to true to coalesce all find requests\n within a single runloop.\n For example, if you have an initial payload of:\n ```javascript\n {\n data: {\n id: 1,\n type: 'post',\n relationship: {\n comments: {\n data: [\n { id: 1, type: 'comment' },\n { id: 2, type: 'comment' }\n ]\n }\n }\n }\n }\n ```\n By default calling `post.get('comments')` will trigger the following requests(assuming the\n comments haven't been loaded before):\n ```\n GET /comments/1\n GET /comments/2\n ```\n If you set coalesceFindRequests to `true` it will instead trigger the following request:\n ```\n GET /comments?filter[id]=1,2\n ```\n Setting coalesceFindRequests to `true` also works for `store.find` requests and `belongsTo`\n relationships accessed within the same runloop. If you set `coalesceFindRequests: true`\n ```javascript\n store.findRecord('comment', 1);\n store.findRecord('comment', 2);\n ```\n will also send a request to: `GET /comments?filter[id]=1,2`\n Note: Requests coalescing rely on URL building strategy. So if you override `buildURL` in your app\n `groupRecordsForFindMany` more likely should be overridden as well in order for coalescing to work.\n @property coalesceFindRequests\n @public\n @type {boolean}\n */\n get coalesceFindRequests() {\n let coalesceFindRequests = this._coalesceFindRequests;\n if (typeof coalesceFindRequests === 'boolean') {\n return coalesceFindRequests;\n }\n return this._coalesceFindRequests = false;\n }\n set coalesceFindRequests(value) {\n this._coalesceFindRequests = value;\n }\n findMany(store, type, ids, snapshots) {\n let url = this.buildURL(type.modelName, ids, snapshots, 'findMany');\n return this.ajax(url, 'GET', {\n data: {\n filter: {\n id: ids.join(',')\n }\n }\n });\n }\n pathForType(modelName) {\n let dasherized = dasherize(modelName);\n return pluralize(dasherized);\n }\n updateRecord(store, schema, snapshot) {\n const data = serializeIntoHash(store, schema, snapshot);\n const type = snapshot.modelName;\n const id = snapshot.id;\n assert(`Attempted to update the ${type} record, but the record has no id`, typeof id === 'string' && id.length > 0);\n let url = this.buildURL(type, id, snapshot, 'updateRecord');\n return this.ajax(url, 'PATCH', {\n data: data\n });\n }\n}\nexport default JSONAPIAdapter;","var _dec, _class;\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\n/**\n @module @ember-data/adapter/rest\n*/\nimport { getOwner } from '@ember/application';\nimport { assert, warn } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { join } from '@ember/runloop';\nimport { DEBUG } from '@glimmer/env';\nimport { Promise as RSVPPromise } from 'rsvp';\nimport { determineBodyPromise, fetch, parseResponseHeaders, serializeIntoHash, serializeQueryParams } from './-private';\nimport AdapterError, { AbortError, ConflictError, ForbiddenError, InvalidError, NotFoundError, ServerError, TimeoutError, UnauthorizedError } from './error';\nimport Adapter, { BuildURLMixin } from './index';\n/**\n The REST adapter allows your store to communicate with an HTTP server by\n transmitting JSON via XHR. Most Ember.js apps that consume a JSON API\n should use the REST adapter.\n\n This adapter is designed around the idea that the JSON exchanged with\n the server should be conventional.\n\n ## Success and failure\n\n The REST adapter will consider a success any response with a status code\n of the 2xx family (\"Success\"), as well as 304 (\"Not Modified\"). Any other\n status code will be considered a failure.\n\n On success, the request promise will be resolved with the full response\n payload.\n\n Failed responses with status code 422 (\"Unprocessable Entity\") will be\n considered \"invalid\". The response will be discarded, except for the\n `errors` key. The request promise will be rejected with a `InvalidError`.\n This error object will encapsulate the saved `errors` value.\n\n Any other status codes will be treated as an \"adapter error\". The request\n promise will be rejected, similarly to the \"invalid\" case, but with\n an instance of `AdapterError` instead.\n\n ## JSON Structure\n\n The REST adapter expects the JSON returned from your server to follow\n these conventions.\n\n ### Object Root\n\n The JSON payload should be an object that contains the record inside a\n root property. For example, in response to a `GET` request for\n `/posts/1`, the JSON should look like this:\n\n ```js\n {\n \"posts\": {\n \"id\": 1,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\"\n }\n }\n ```\n\n Similarly, in response to a `GET` request for `/posts`, the JSON should\n look like this:\n\n ```js\n {\n \"posts\": [\n {\n \"id\": 1,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\"\n },\n {\n \"id\": 2,\n \"title\": \"Rails is omakase\",\n \"author\": \"D2H\"\n }\n ]\n }\n ```\n\n Note that the object root can be pluralized for both a single-object response\n and an array response: the REST adapter is not strict on this. Further, if the\n HTTP server responds to a `GET` request to `/posts/1` (e.g. the response to a\n `findRecord` query) with more than one object in the array, Ember Data will\n only display the object with the matching ID.\n\n ### Conventional Names\n\n Attribute names in your JSON payload should be the camelCased versions of\n the attributes in your Ember.js models.\n\n For example, if you have a `Person` model:\n\n ```app/models/person.js\n import Model, { attr } from '@ember-data/model';\n\n export default Model.extend({\n firstName: attr('string'),\n lastName: attr('string'),\n occupation: attr('string')\n });\n ```\n\n The JSON returned should look like this:\n\n ```js\n {\n \"people\": {\n \"id\": 5,\n \"firstName\": \"Zaphod\",\n \"lastName\": \"Beeblebrox\",\n \"occupation\": \"President\"\n }\n }\n ```\n\n #### Relationships\n\n Relationships are usually represented by ids to the record in the\n relationship. The related records can then be sideloaded in the\n response under a key for the type.\n\n ```js\n {\n \"posts\": {\n \"id\": 5,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\",\n \"comments\": [1, 2]\n },\n \"comments\": [{\n \"id\": 1,\n \"author\": \"User 1\",\n \"message\": \"First!\",\n }, {\n \"id\": 2,\n \"author\": \"User 2\",\n \"message\": \"Good Luck!\",\n }]\n }\n ```\n\n If the records in the relationship are not known when the response\n is serialized it's also possible to represent the relationship as a\n URL using the `links` key in the response. Ember Data will fetch\n this URL to resolve the relationship when it is accessed for the\n first time.\n\n ```js\n {\n \"posts\": {\n \"id\": 5,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\",\n \"links\": {\n \"comments\": \"/posts/5/comments\"\n }\n }\n }\n ```\n\n ### Errors\n\n If a response is considered a failure, the JSON payload is expected to include\n a top-level key `errors`, detailing any specific issues. For example:\n\n ```js\n {\n \"errors\": {\n \"msg\": \"Something went wrong\"\n }\n }\n ```\n\n This adapter does not make any assumptions as to the format of the `errors`\n object. It will simply be passed along as is, wrapped in an instance\n of `InvalidError` or `AdapterError`. The serializer can interpret it\n afterwards.\n\n ## Customization\n\n ### Endpoint path customization\n\n Endpoint paths can be prefixed with a `namespace` by setting the namespace\n property on the adapter:\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n namespace = 'api/1';\n }\n ```\n Requests for the `Person` model would now target `/api/1/people/1`.\n\n ### Host customization\n\n An adapter can target other hosts by setting the `host` property.\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n\n export default class ApplicationAdapter extends RESTAdapter {\n host = 'https://api.example.com';\n }\n ```\n\n ### Headers customization\n\n Some APIs require HTTP headers, e.g. to provide an API key. Arbitrary\n headers can be set as key/value pairs on the `RESTAdapter`'s `headers`\n object and Ember Data will send them along with each ajax request.\n\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n import { computed } from '@ember/object';\n\n export default class ApplicationAdapter extends RESTAdapter {\n headers: computed(function() {\n return {\n 'API_KEY': 'secret key',\n 'ANOTHER_HEADER': 'Some header value'\n };\n }\n }\n ```\n\n `headers` can also be used as a computed property to support dynamic\n headers. In the example below, the `session` object has been\n injected into an adapter by Ember's container.\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n import { computed } from '@ember/object';\n\n export default class ApplicationAdapter extends RESTAdapter {\n headers: computed('session.authToken', function() {\n return {\n 'API_KEY': this.get('session.authToken'),\n 'ANOTHER_HEADER': 'Some header value'\n };\n })\n }\n ```\n\n In some cases, your dynamic headers may require data from some\n object outside of Ember's observer system (for example\n `document.cookie`). You can use the\n [volatile](/api/classes/Ember.ComputedProperty.html?anchor=volatile)\n function to set the property into a non-cached mode causing the headers to\n be recomputed with every request.\n\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n import { get } from '@ember/object';\n import { computed } from '@ember/object';\n\n export default class ApplicationAdapter extends RESTAdapter {\n headers: computed(function() {\n return {\n 'API_KEY': get(document.cookie.match(/apiKey\\=([^;]*)/), '1'),\n 'ANOTHER_HEADER': 'Some header value'\n };\n }).volatile()\n }\n ```\n\n @class RESTAdapter\n @main @ember-data/adapter/rest\n @public\n @constructor\n @extends Adapter\n @uses BuildURLMixin\n*/\nlet RESTAdapter = (_dec = computed(), _class = class RESTAdapter extends Adapter.extend(BuildURLMixin) {\n constructor(...args) {\n super(...args);\n /**\n This property allows ajax to still be used instead when `false`.\n @property useFetch\n @type {Boolean}\n @default true\n @public\n */\n this.useFetch = true;\n this._defaultContentType = 'application/json; charset=utf-8';\n // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers\n this.maxURLLength = 2048;\n }\n get fastboot() {\n // Avoid computed property override deprecation in fastboot as suggested by:\n // https://deprecations.emberjs.com/v3.x/#toc_computed-property-override\n let fastboot = this._fastboot;\n if (fastboot) {\n return fastboot;\n }\n return this._fastboot = getOwner(this).lookup('service:fastboot');\n }\n set fastboot(value) {\n this._fastboot = value;\n }\n\n /**\n By default, the RESTAdapter will send the query params sorted alphabetically to the\n server.\n For example:\n ```js\n store.query('posts', { sort: 'price', category: 'pets' });\n ```\n will generate a requests like this `/posts?category=pets&sort=price`, even if the\n parameters were specified in a different order.\n That way the generated URL will be deterministic and that simplifies caching mechanisms\n in the backend.\n Setting `sortQueryParams` to a falsey value will respect the original order.\n In case you want to sort the query parameters with a different criteria, set\n `sortQueryParams` to your custom sort function.\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n export default class ApplicationAdapter extends RESTAdapter {\n sortQueryParams(params) {\n let sortedKeys = Object.keys(params).sort().reverse();\n let len = sortedKeys.length, newParams = {};\n for (let i = 0; i < len; i++) {\n newParams[sortedKeys[i]] = params[sortedKeys[i]];\n }\n return newParams;\n }\n }\n ```\n @method sortQueryParams\n @param {Object} obj\n @return {Object}\n @public\n */\n sortQueryParams(obj) {\n let keys = Object.keys(obj);\n let len = keys.length;\n if (len < 2) {\n return obj;\n }\n let newQueryParams = {};\n let sortedKeys = keys.sort();\n for (let i = 0; i < len; i++) {\n newQueryParams[sortedKeys[i]] = obj[sortedKeys[i]];\n }\n return newQueryParams;\n }\n\n /**\n By default the RESTAdapter will send each find request coming from a `store.find`\n or from accessing a relationship separately to the server. If your server supports passing\n ids as a query string, you can set coalesceFindRequests to true to coalesce all find requests\n within a single runloop.\n For example, if you have an initial payload of:\n ```javascript\n {\n post: {\n id: 1,\n comments: [1, 2]\n }\n }\n ```\n By default calling `post.get('comments')` will trigger the following requests(assuming the\n comments haven't been loaded before):\n ```\n GET /comments/1\n GET /comments/2\n ```\n If you set coalesceFindRequests to `true` it will instead trigger the following request:\n ```\n GET /comments?ids[]=1&ids[]=2\n ```\n Setting coalesceFindRequests to `true` also works for `store.find` requests and `belongsTo`\n relationships accessed within the same runloop. If you set `coalesceFindRequests: true`\n ```javascript\n store.findRecord('comment', 1);\n store.findRecord('comment', 2);\n ```\n will also send a request to: `GET /comments?ids[]=1&ids[]=2`\n Note: Requests coalescing rely on URL building strategy. So if you override `buildURL` in your app\n `groupRecordsForFindMany` more likely should be overridden as well in order for coalescing to work.\n @property coalesceFindRequests\n @public\n @type {boolean}\n */\n get coalesceFindRequests() {\n let coalesceFindRequests = this._coalesceFindRequests;\n if (typeof coalesceFindRequests === 'boolean') {\n return coalesceFindRequests;\n }\n return this._coalesceFindRequests = false;\n }\n set coalesceFindRequests(value) {\n this._coalesceFindRequests = value;\n }\n\n /**\n Endpoint paths can be prefixed with a `namespace` by setting the namespace\n property on the adapter:\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n export default class ApplicationAdapter extends RESTAdapter {\n namespace = 'api/1';\n }\n ```\n Requests for the `Post` model would now target `/api/1/post/`.\n @property namespace\n @public\n @type {String}\n */\n\n /**\n An adapter can target other hosts by setting the `host` property.\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n export default class ApplicationAdapter extends RESTAdapter {\n host = 'https://api.example.com';\n }\n ```\n Requests for the `Post` model would now target `https://api.example.com/post/`.\n @property host\n @public\n @type {String}\n */\n\n /**\n Some APIs require HTTP headers, e.g. to provide an API\n key. Arbitrary headers can be set as key/value pairs on the\n `RESTAdapter`'s `headers` object and Ember Data will send them\n along with each ajax request. For dynamic headers see [headers\n customization](/ember-data/release/classes/RESTAdapter).\n ```app/adapters/application.js\n import RESTAdapter from '@ember-data/adapter/rest';\n import { computed } from '@ember/object';\n export default class ApplicationAdapter extends RESTAdapter {\n headers: computed(function() {\n return {\n 'API_KEY': 'secret key',\n 'ANOTHER_HEADER': 'Some header value'\n };\n })\n }\n ```\n @property headers\n @public\n @type {Object}\n */\n\n /**\n Called by the store in order to fetch the JSON for a given\n type and ID.\n The `findRecord` method makes an Ajax request to a URL computed by\n `buildURL`, and returns a promise for the resulting payload.\n This method performs an HTTP `GET` request with the id provided as part of the query string.\n @since 1.13.0\n @method findRecord\n @public\n @param {Store} store\n @param {Model} type\n @param {String} id\n @param {Snapshot} snapshot\n @return {Promise} promise\n */\n findRecord(store, type, id, snapshot) {\n let url = this.buildURL(type.modelName, id, snapshot, 'findRecord');\n let query = this.buildQuery(snapshot);\n return this.ajax(url, 'GET', {\n data: query\n });\n }\n\n /**\n Called by the store in order to fetch a JSON array for all\n of the records for a given type.\n The `findAll` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n promise for the resulting payload.\n @method findAll\n @public\n @param {Store} store\n @param {Model} type\n @param {undefined} neverSet a value is never provided to this argument\n @param {SnapshotRecordArray} snapshotRecordArray\n @return {Promise} promise\n */\n findAll(store, type, sinceToken, snapshotRecordArray) {\n let query = this.buildQuery(snapshotRecordArray);\n let url = this.buildURL(type.modelName, null, snapshotRecordArray, 'findAll');\n if (sinceToken) {\n query.since = sinceToken;\n }\n return this.ajax(url, 'GET', {\n data: query\n });\n }\n\n /**\n Called by the store in order to fetch a JSON array for\n the records that match a particular query.\n The `query` method makes an Ajax (HTTP GET) request to a URL\n computed by `buildURL`, and returns a promise for the resulting\n payload.\n The `query` argument is a simple JavaScript object that will be passed directly\n to the server as parameters.\n @method query\n @public\n @param {Store} store\n @param {Model} type\n @param {Object} query\n @param {AdapterPopulatedRecordArray} recordArray\n @param {Object} adapterOptions\n @return {Promise} promise\n */\n query(store, type, query) {\n let url = this.buildURL(type.modelName, null, null, 'query', query);\n if (this.sortQueryParams) {\n query = this.sortQueryParams(query);\n }\n return this.ajax(url, 'GET', {\n data: query\n });\n }\n\n /**\n Called by the store in order to fetch a JSON object for\n the record that matches a particular query.\n The `queryRecord` method makes an Ajax (HTTP GET) request to a URL\n computed by `buildURL`, and returns a promise for the resulting\n payload.\n The `query` argument is a simple JavaScript object that will be passed directly\n to the server as parameters.\n @since 1.13.0\n @method queryRecord\n @public\n @param {Store} store\n @param {Model} type\n @param {Object} query\n @param {Object} adapterOptions\n @return {Promise} promise\n */\n queryRecord(store, type, query, adapterOptions) {\n let url = this.buildURL(type.modelName, null, null, 'queryRecord', query);\n if (this.sortQueryParams) {\n query = this.sortQueryParams(query);\n }\n return this.ajax(url, 'GET', {\n data: query\n });\n }\n\n /**\n Called by the store in order to fetch several records together if `coalesceFindRequests` is true\n For example, if the original payload looks like:\n ```js\n {\n \"id\": 1,\n \"title\": \"Rails is omakase\",\n \"comments\": [ 1, 2, 3 ]\n }\n ```\n The IDs will be passed as a URL-encoded Array of IDs, in this form:\n ```\n ids[]=1&ids[]=2&ids[]=3\n ```\n Many servers, such as Rails and PHP, will automatically convert this URL-encoded array\n into an Array for you on the server-side. If you want to encode the\n IDs, differently, just override this (one-line) method.\n The `findMany` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n promise for the resulting payload.\n @method findMany\n @public\n @param {Store} store\n @param {Model} type\n @param {Array} ids\n @param {Array} snapshots\n @return {Promise} promise\n */\n findMany(store, type, ids, snapshots) {\n let url = this.buildURL(type.modelName, ids, snapshots, 'findMany');\n return this.ajax(url, 'GET', {\n data: {\n ids: ids\n }\n });\n }\n\n /**\n Called by the store in order to fetch a JSON array for\n the unloaded records in a has-many relationship that were originally\n specified as a URL (inside of `links`).\n For example, if your original payload looks like this:\n ```js\n {\n \"post\": {\n \"id\": 1,\n \"title\": \"Rails is omakase\",\n \"links\": { \"comments\": \"/posts/1/comments\" }\n }\n }\n ```\n This method will be called with the parent record and `/posts/1/comments`.\n The `findHasMany` method will make an Ajax (HTTP GET) request to the originally specified URL.\n The format of your `links` value will influence the final request URL via the `urlPrefix` method:\n * Links beginning with `//`, `http://`, `https://`, will be used as is, with no further manipulation.\n * Links beginning with a single `/` will have the current adapter's `host` value prepended to it.\n * Links with no beginning `/` will have a parentURL prepended to it, via the current adapter's `buildURL`.\n @method findHasMany\n @public\n @param {Store} store\n @param {Snapshot} snapshot\n @param {String} url\n @param {Object} relationship meta object describing the relationship\n @return {Promise} promise\n */\n findHasMany(store, snapshot, url, relationship) {\n let id = snapshot.id;\n let type = snapshot.modelName;\n assert(`Attempted to fetch the hasMany relationship for ${type}, but the record has no id`, typeof id === 'string' && id.length > 0);\n url = this.urlPrefix(url, this.buildURL(type, id, snapshot, 'findHasMany'));\n return this.ajax(url, 'GET');\n }\n\n /**\n Called by the store in order to fetch the JSON for the unloaded record in a\n belongs-to relationship that was originally specified as a URL (inside of\n `links`).\n For example, if your original payload looks like this:\n ```js\n {\n \"person\": {\n \"id\": 1,\n \"name\": \"Tom Dale\",\n \"links\": { \"group\": \"/people/1/group\" }\n }\n }\n ```\n This method will be called with the parent record and `/people/1/group`.\n The `findBelongsTo` method will make an Ajax (HTTP GET) request to the originally specified URL.\n The format of your `links` value will influence the final request URL via the `urlPrefix` method:\n * Links beginning with `//`, `http://`, `https://`, will be used as is, with no further manipulation.\n * Links beginning with a single `/` will have the current adapter's `host` value prepended to it.\n * Links with no beginning `/` will have a parentURL prepended to it, via the current adapter's `buildURL`.\n @method findBelongsTo\n @public\n @param {Store} store\n @param {Snapshot} snapshot\n @param {String} url\n @param {Object} relationship meta object describing the relationship\n @return {Promise} promise\n */\n findBelongsTo(store, snapshot, url, relationship) {\n let id = snapshot.id;\n let type = snapshot.modelName;\n assert(`Attempted to fetch the belongsTo relationship for ${type}, but the record has no id`, typeof id === 'string' && id.length > 0);\n url = this.urlPrefix(url, this.buildURL(type, id, snapshot, 'findBelongsTo'));\n return this.ajax(url, 'GET');\n }\n\n /**\n Called by the store when a newly created record is\n saved via the `save` method on a model record instance.\n The `createRecord` method serializes the record and makes an Ajax (HTTP POST) request\n to a URL computed by `buildURL`.\n See `serialize` for information on how to customize the serialized form\n of a record.\n @method createRecord\n @public\n @param {Store} store\n @param {Model} type\n @param {Snapshot} snapshot\n @return {Promise} promise\n */\n createRecord(store, type, snapshot) {\n let url = this.buildURL(type.modelName, null, snapshot, 'createRecord');\n const data = serializeIntoHash(store, type, snapshot);\n return this.ajax(url, 'POST', {\n data\n });\n }\n\n /**\n Called by the store when an existing record is saved\n via the `save` method on a model record instance.\n The `updateRecord` method serializes the record and makes an Ajax (HTTP PUT) request\n to a URL computed by `buildURL`.\n See `serialize` for information on how to customize the serialized form\n of a record.\n @method updateRecord\n @public\n @param {Store} store\n @param {Model} schema\n @param {Snapshot} snapshot\n @return {Promise} promise\n */\n updateRecord(store, schema, snapshot) {\n const data = serializeIntoHash(store, schema, snapshot, {});\n const type = snapshot.modelName;\n const id = snapshot.id;\n assert(`Attempted to update the ${type} record, but the record has no id`, typeof id === 'string' && id.length > 0);\n let url = this.buildURL(type, id, snapshot, 'updateRecord');\n return this.ajax(url, 'PUT', {\n data\n });\n }\n\n /**\n Called by the store when a record is deleted.\n The `deleteRecord` method makes an Ajax (HTTP DELETE) request to a URL computed by `buildURL`.\n @method deleteRecord\n @public\n @param {Store} store\n @param {Model} type\n @param {Snapshot} snapshot\n @return {Promise} promise\n */\n deleteRecord(store, schema, snapshot) {\n const type = snapshot.modelName;\n const id = snapshot.id;\n assert(`Attempted to delete the ${type} record, but the record has no id`, typeof id === 'string' && id.length > 0);\n return this.ajax(this.buildURL(type, id, snapshot, 'deleteRecord'), 'DELETE');\n }\n _stripIDFromURL(store, snapshot) {\n const type = snapshot.modelName;\n const id = snapshot.id;\n assert(`Attempted to strip the url from the ${type} record for coalescing, but the record has no id`, typeof id === 'string' && id.length > 0);\n let url = this.buildURL(type, id, snapshot);\n let expandedURL = url.split('/');\n // Case when the url is of the format ...something/:id\n // We are decodeURIComponent-ing the lastSegment because if it represents\n // the id, it has been encodeURIComponent-ified within `buildURL`. If we\n // don't do this, then records with id having special characters are not\n // coalesced correctly (see GH #4190 for the reported bug)\n let lastSegment = expandedURL[expandedURL.length - 1];\n if (decodeURIComponent(lastSegment) === id) {\n expandedURL[expandedURL.length - 1] = '';\n } else if (id && endsWith(lastSegment, '?id=' + id)) {\n //Case when the url is of the format ...something?id=:id\n expandedURL[expandedURL.length - 1] = lastSegment.substring(0, lastSegment.length - id.length - 1);\n }\n return expandedURL.join('/');\n }\n /**\n Organize records into groups, each of which is to be passed to separate\n calls to `findMany`.\n This implementation groups together records that have the same base URL but\n differing ids. For example `/comments/1` and `/comments/2` will be grouped together\n because we know findMany can coalesce them together as `/comments?ids[]=1&ids[]=2`\n It also supports urls where ids are passed as a query param, such as `/comments?id=1`\n but not those where there is more than 1 query param such as `/comments?id=2&name=David`\n Currently only the query param of `id` is supported. If you need to support others, please\n override this or the `_stripIDFromURL` method.\n It does not group records that have differing base urls, such as for example: `/posts/1/comments/2`\n and `/posts/2/comments/3`\n @method groupRecordsForFindMany\n @public\n @param {Store} store\n @param {Array} snapshots\n @return {Array} an array of arrays of records, each of which is to be\n loaded separately by `findMany`.\n */\n groupRecordsForFindMany(store, snapshots) {\n let groups = new Map();\n let adapter = this;\n let maxURLLength = this.maxURLLength;\n snapshots.forEach(snapshot => {\n let baseUrl = adapter._stripIDFromURL(store, snapshot);\n if (!groups.has(baseUrl)) {\n groups.set(baseUrl, []);\n }\n groups.get(baseUrl).push(snapshot);\n });\n function splitGroupToFitInUrl(group, maxURLLength, paramNameLength) {\n let idsSize = 0;\n let baseUrl = adapter._stripIDFromURL(store, group[0]);\n let splitGroups = [[]];\n group.forEach(snapshot => {\n let additionalLength = encodeURIComponent(snapshot.id).length + paramNameLength;\n if (baseUrl.length + idsSize + additionalLength >= maxURLLength) {\n idsSize = 0;\n splitGroups.push([]);\n }\n idsSize += additionalLength;\n let lastGroupIndex = splitGroups.length - 1;\n splitGroups[lastGroupIndex].push(snapshot);\n });\n return splitGroups;\n }\n let groupsArray = [];\n groups.forEach((group, key) => {\n let paramNameLength = '&ids%5B%5D='.length;\n let splitGroups = splitGroupToFitInUrl(group, maxURLLength, paramNameLength);\n splitGroups.forEach(splitGroup => groupsArray.push(splitGroup));\n });\n return groupsArray;\n }\n\n /**\n Takes an ajax response, and returns the json payload or an error.\n By default this hook just returns the json payload passed to it.\n You might want to override it in two cases:\n 1. Your API might return useful results in the response headers.\n Response headers are passed in as the second argument.\n 2. Your API might return errors as successful responses with status code\n 200 and an Errors text or object. You can return a `InvalidError` or a\n `AdapterError` (or a sub class) from this hook and it will automatically\n reject the promise and put your record into the invalid or error state.\n Returning a `InvalidError` from this method will cause the\n record to transition into the `invalid` state and make the\n `errors` object available on the record. When returning an\n `InvalidError` the store will attempt to normalize the error data\n returned from the server using the serializer's `extractErrors`\n method.\n @since 1.13.0\n @method handleResponse\n @public\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @param {Object} requestData - the original request information\n @return {Object | AdapterError} response\n */\n handleResponse(status, headers, payload, requestData) {\n if (this.isSuccess(status, headers, payload)) {\n return payload;\n } else if (this.isInvalid(status, headers, payload)) {\n return new InvalidError(typeof payload === 'object' && 'errors' in payload ? payload.errors : undefined);\n }\n let errors = this.normalizeErrorResponse(status, headers, payload);\n let detailedMessage = this.generatedDetailedMessage(status, headers, payload, requestData);\n switch (status) {\n case 401:\n return new UnauthorizedError(errors, detailedMessage);\n case 403:\n return new ForbiddenError(errors, detailedMessage);\n case 404:\n return new NotFoundError(errors, detailedMessage);\n case 409:\n return new ConflictError(errors, detailedMessage);\n default:\n if (status >= 500) {\n return new ServerError(errors, detailedMessage);\n }\n }\n return new AdapterError(errors, detailedMessage);\n }\n\n /**\n Default `handleResponse` implementation uses this hook to decide if the\n response is a success.\n @since 1.13.0\n @method isSuccess\n @public\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @return {Boolean}\n */\n isSuccess(status, _headers, _payload) {\n return status >= 200 && status < 300 || status === 304;\n }\n\n /**\n Default `handleResponse` implementation uses this hook to decide if the\n response is an invalid error.\n @since 1.13.0\n @method isInvalid\n @public\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @return {Boolean}\n */\n isInvalid(status, _headers, _payload) {\n return status === 422;\n }\n\n /**\n Takes a URL, an HTTP method and a hash of data, and makes an\n HTTP request.\n When the server responds with a payload, Ember Data will call into `extractSingle`\n or `extractArray` (depending on whether the original query was for one record or\n many records).\n By default, `ajax` method has the following behavior:\n * It sets the response `dataType` to `\"json\"`\n * If the HTTP method is not `\"GET\"`, it sets the `Content-Type` to be\n `application/json; charset=utf-8`\n * If the HTTP method is not `\"GET\"`, it stringifies the data passed in. The\n data is the serialized record in the case of a save.\n * Registers success and failure handlers.\n @method ajax\n @private\n @param {String} url\n @param {String} type The request type GET, POST, PUT, DELETE etc.\n @param {Object} options\n @return {Promise} promise\n */\n async ajax(url, type, options = {}) {\n let adapter = this;\n let requestData = {\n url: url,\n method: type\n };\n if (this.useFetch) {\n let hash = adapter.ajaxOptions(url, type, options);\n let response = await this._fetchRequest(hash);\n let payload = await determineBodyPromise(response, requestData);\n if (response.ok && !(payload instanceof Error)) {\n return fetchSuccessHandler(adapter, payload, response, requestData);\n } else {\n throw fetchErrorHandler(adapter, payload, response, null, requestData);\n }\n } else {\n let hash = adapter.ajaxOptions(url, type, options);\n return new RSVPPromise(function (resolve, reject) {\n hash.success = function (payload, textStatus, jqXHR) {\n let response = ajaxSuccessHandler(adapter, payload, jqXHR, requestData);\n join(null, resolve, response);\n };\n hash.error = function (jqXHR, textStatus, errorThrown) {\n let error = ajaxErrorHandler(adapter, jqXHR, errorThrown, requestData);\n join(null, reject, error);\n };\n adapter._ajax(hash);\n }, 'DS: RESTAdapter#ajax ' + type + ' to ' + url);\n }\n }\n\n /**\n @method _ajaxRequest\n @private\n @param {Object} options jQuery ajax options to be used for the ajax request\n */\n _ajaxRequest(options) {\n // TODO add assertion that jquery is there rather then equality check\n typeof jQuery !== 'undefined' && jQuery.ajax(options);\n }\n _fetchRequest(options) {\n let fetchFunction = fetch();\n if (fetchFunction) {\n return fetchFunction(options.url, options);\n } else {\n throw new Error('cannot find the `fetch` module or the `fetch` global. Did you mean to install the `ember-fetch` addon?');\n }\n }\n _ajax(options) {\n if (this.useFetch) {\n this._fetchRequest(options);\n } else {\n this._ajaxRequest(options);\n }\n }\n\n /**\n @method ajaxOptions\n @private\n @param {String} url\n @param {String} type The request type GET, POST, PUT, DELETE etc.\n @param {Object} options\n @return {Object}\n */\n ajaxOptions(url, method, options) {\n let reqOptions = Object.assign({\n url,\n method,\n type: method\n }, options);\n if (this.headers !== undefined) {\n reqOptions.headers = {\n ...this.headers,\n ...reqOptions.headers\n };\n } else if (!options.headers) {\n reqOptions.headers = {};\n }\n let contentType = reqOptions.contentType || this._defaultContentType;\n if (this.useFetch) {\n if (reqOptions.data && reqOptions.type !== 'GET' && reqOptions.headers) {\n if (!reqOptions.headers['Content-Type'] && !reqOptions.headers['content-type']) {\n reqOptions.headers['content-type'] = contentType;\n }\n }\n reqOptions = fetchOptions(reqOptions, this);\n } else {\n // GET requests without a body should not have a content-type header\n // and may be unexpected by a server\n if (reqOptions.data && reqOptions.type !== 'GET') {\n reqOptions = {\n ...reqOptions,\n contentType\n };\n }\n reqOptions = ajaxOptions(reqOptions, this);\n }\n reqOptions.url = this._ajaxURL(reqOptions.url);\n return reqOptions;\n }\n _ajaxURL(url) {\n if (this.fastboot?.isFastBoot) {\n let httpRegex = /^https?:\\/\\//;\n let protocolRelativeRegex = /^\\/\\//;\n let protocol = this.fastboot.request.protocol;\n let host = this.fastboot.request.host;\n if (protocolRelativeRegex.test(url)) {\n return `${protocol}${url}`;\n } else if (!httpRegex.test(url)) {\n try {\n return `${protocol}//${host}${url}`;\n } catch (fbError) {\n throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message);\n }\n }\n }\n return url;\n }\n\n /**\n @method parseErrorResponse\n @private\n @param {String} responseText\n @return {Object}\n */\n parseErrorResponse(responseText) {\n let json = responseText;\n try {\n json = JSON.parse(responseText);\n } catch (e) {\n // ignored\n }\n return json;\n }\n\n /**\n @method normalizeErrorResponse\n @private\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @return {Array} errors payload\n */\n normalizeErrorResponse(status, _headers, payload) {\n if (payload && typeof payload === 'object' && 'errors' in payload && Array.isArray(payload.errors)) {\n return payload.errors;\n } else {\n return [{\n status: `${status}`,\n // Set to a string per the JSON API spec: https://jsonapi.org/format/#errors\n title: 'The backend responded with an error',\n detail: `${payload}`\n }];\n }\n }\n\n /**\n Generates a detailed (\"friendly\") error message, with plenty\n of information for debugging (good luck!)\n @method generatedDetailedMessage\n @private\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @param {Object} requestData\n @return {String} detailed error message\n */\n generatedDetailedMessage(status, headers, payload, requestData) {\n let shortenedPayload;\n let payloadContentType = headers['content-type'] || 'Empty Content-Type';\n if (payloadContentType === 'text/html' && typeof payload === 'string' && payload.length > 250) {\n shortenedPayload = '[Omitted Lengthy HTML]';\n } else {\n shortenedPayload = payload;\n }\n let requestDescription = requestData.method + ' ' + requestData.url;\n let payloadDescription = 'Payload (' + payloadContentType + ')';\n return ['Ember Data Request ' + requestDescription + ' returned a ' + status, payloadDescription, shortenedPayload].join('\\n');\n }\n\n /**\n Used by `findAll` and `findRecord` to build the query's `data` hash\n supplied to the ajax method.\n @method buildQuery\n @since 2.5.0\n @public\n @param {Snapshot} snapshot\n @return {Object}\n */\n buildQuery(snapshot) {\n let query = {};\n if (snapshot) {\n let {\n include\n } = snapshot;\n if (include) {\n query.include = include;\n }\n }\n return query;\n }\n}, _applyDecoratedDescriptor(_class.prototype, \"fastboot\", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, \"fastboot\"), _class.prototype), _class);\nfunction ajaxSuccess(adapter, payload, requestData, responseData) {\n let response;\n try {\n response = adapter.handleResponse(responseData.status, responseData.headers, payload, requestData);\n } catch (error) {\n return RSVPPromise.reject(error);\n }\n if (response && response.isAdapterError) {\n return RSVPPromise.reject(response);\n } else {\n return response;\n }\n}\nfunction ajaxError(adapter, payload, requestData, responseData) {\n let error;\n if (responseData.errorThrown instanceof Error && payload !== '') {\n error = responseData.errorThrown;\n } else if (responseData.textStatus === 'timeout') {\n error = new TimeoutError();\n } else if (responseData.textStatus === 'abort' || responseData.status === 0) {\n error = handleAbort(requestData, responseData);\n } else {\n try {\n error = adapter.handleResponse(responseData.status, responseData.headers, payload || responseData.errorThrown, requestData);\n } catch (e) {\n error = e;\n }\n }\n return error;\n}\n\n// Adapter abort error to include any relevent info, e.g. request/response:\nfunction handleAbort(requestData, responseData) {\n let {\n method,\n url,\n errorThrown\n } = requestData;\n let {\n status\n } = responseData;\n let msg = `Request failed: ${method} ${url} ${errorThrown || ''}`;\n let errors = [{\n title: 'Adapter Error',\n detail: msg.trim(),\n status\n }];\n return new AbortError(errors);\n}\n\n//From http://stackoverflow.com/questions/280634/endswith-in-javascript\nfunction endsWith(string, suffix) {\n if (typeof String.prototype.endsWith !== 'function') {\n return string.indexOf(suffix, string.length - suffix.length) !== -1;\n } else {\n return string.endsWith(suffix);\n }\n}\nfunction fetchSuccessHandler(adapter, payload, response, requestData) {\n let responseData = fetchResponseData(response);\n return ajaxSuccess(adapter, payload, requestData, responseData);\n}\nfunction fetchErrorHandler(adapter, payload, response, errorThrown, requestData) {\n let responseData = fetchResponseData(response);\n if (responseData.status === 200 && payload instanceof Error) {\n responseData.errorThrown = payload;\n payload = responseData.errorThrown.payload;\n } else {\n responseData.errorThrown = errorThrown;\n if (typeof payload === 'string') {\n payload = adapter.parseErrorResponse(payload);\n }\n }\n return ajaxError(adapter, payload, requestData, responseData);\n}\nfunction ajaxSuccessHandler(adapter, payload, jqXHR, requestData) {\n let responseData = ajaxResponseData(jqXHR);\n return ajaxSuccess(adapter, payload, requestData, responseData);\n}\nfunction ajaxErrorHandler(adapter, jqXHR, errorThrown, requestData) {\n let responseData = ajaxResponseData(jqXHR);\n responseData.errorThrown = errorThrown;\n let payload = adapter.parseErrorResponse(jqXHR.responseText);\n if (DEBUG) {\n let message = `The server returned an empty string for ${requestData.method} ${requestData.url}, which cannot be parsed into a valid JSON. Return either null or {}.`;\n let validJSONString = !(responseData.textStatus === 'parsererror' && payload === '');\n warn(message, validJSONString, {\n id: 'ds.adapter.returned-empty-string-as-JSON'\n });\n }\n return ajaxError(adapter, payload, requestData, responseData);\n}\nfunction fetchResponseData(response) {\n return {\n status: response.status,\n textStatus: response.statusText,\n headers: headersToObject(response.headers)\n };\n}\nfunction ajaxResponseData(jqXHR) {\n return {\n status: jqXHR.status,\n textStatus: jqXHR.statusText,\n headers: parseResponseHeaders(jqXHR.getAllResponseHeaders())\n };\n}\nfunction headersToObject(headers) {\n let headersObject = {};\n if (headers) {\n headers.forEach((value, key) => headersObject[key] = value);\n }\n return headersObject;\n}\n\n/**\n * Helper function that translates the options passed to `jQuery.ajax` into a format that `fetch` expects.\n *\n * @method fetchOptions\n * @for @ember-data/adapter/rest\n * @param {Object} _options\n * @param {Adapter} adapter\n * @private\n * @returns {Object}\n */\nexport function fetchOptions(options, adapter) {\n options.credentials = options.credentials || 'same-origin';\n if (options.data) {\n // GET and HEAD requests can't have a `body`\n if (options.method === 'GET' || options.method === 'HEAD') {\n // If no options are passed, Ember Data sets `data` to an empty object, which we test for.\n if (Object.keys(options.data).length && options.url) {\n // Test if there are already query params in the url (mimics jQuey.ajax).\n const queryParamDelimiter = options.url.indexOf('?') > -1 ? '&' : '?';\n options.url += `${queryParamDelimiter}${serializeQueryParams(options.data)}`;\n }\n } else {\n // NOTE: a request's body cannot be an object, so we stringify it if it is.\n // JSON.stringify removes keys with values of `undefined` (mimics jQuery.ajax).\n // If the data is not a POJO (it's a String, FormData, etc), we just set it.\n // If the data is a string, we assume it's a stringified object.\n\n /* We check for Objects this way because we want the logic inside the consequent to run\n * if `options.data` is a POJO, not if it is a data structure whose `typeof` returns \"object\"\n * when it's not (Array, FormData, etc). The reason we don't use `options.data.constructor`\n * to check is in case `data` is an object with no prototype (e.g. created with null).\n */\n if (Object.prototype.toString.call(options.data) === '[object Object]') {\n options.body = JSON.stringify(options.data);\n } else {\n options.body = options.data;\n }\n }\n }\n return options;\n}\nfunction ajaxOptions(options, adapter) {\n options.dataType = 'json';\n options.context = adapter;\n if (options.data && options.type !== 'GET') {\n options.data = JSON.stringify(options.data);\n }\n options.beforeSend = function (xhr) {\n if (options.headers) {\n Object.keys(options.headers).forEach(key => {\n let headerValue = options.headers && options.headers[key];\n const isString = value => typeof value === 'string';\n if (isString(headerValue)) {\n xhr.setRequestHeader(key, headerValue);\n }\n });\n }\n };\n return options;\n}\nexport default RESTAdapter;","/**\n # Overview\n\n This package provides the `DataAdapter` which the [Ember Inspector](https://github.com/emberjs/ember-inspector)\n uses to subscribe and retrieve information for the `data` tab in the inspector.\n\n This package adds roughly .6 KB when minified and compressed to your application in production; however,\n you can opt out of shipping this addon in production via options in `ember-cli-build.js`\n\n ```js\n let app = new EmberApp(defaults, {\n emberData: {\n includeDataAdapterInProduction: false\n }\n });\n ```\n\n When using `ember-data` as a dependency of your app, the default is to ship the inspector support to production.\n\n When not using `ember-data` as a dependency but instead using EmberData via declaring specific `@ember-data/`\n dependencies the default is to not ship to production.\n\n @module @ember-data/debug\n @main @ember-data/debug\n*/\nimport { A } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport DataAdapter from '@ember/debug/data-adapter';\nimport { get } from '@ember/object';\nimport { addObserver, removeObserver } from '@ember/object/observers';\nimport { inject as service } from '@ember/service';\nimport { capitalize, underscore } from '@ember/string';\nimport { next } from '@ember/runloop';\nimport { typesMapFor } from './setup';\n\n/**\n Implements `@ember/debug/data-adapter` with for EmberData\n integration with the ember-inspector.\n\n @class InspectorDataAdapter\n @extends DataAdapter\n @private\n*/\nexport default DataAdapter.extend({\n store: service('store'),\n /**\n Specifies how records can be filtered based on the state of the record\n Records returned will need to have a `filterValues`\n property with a key for every name in the returned array\n @method getFilters\n @private\n @return {Array} List of objects defining filters\n The object should have a `name` and `desc` property\n */\n getFilters() {\n return [{\n name: 'isNew',\n desc: 'New'\n }, {\n name: 'isModified',\n desc: 'Modified'\n }, {\n name: 'isClean',\n desc: 'Clean'\n }];\n },\n _nameToClass(type) {\n return get(this, 'store').modelFor(type);\n },\n /**\n Fetch the model types and observe them for changes.\n Maintains the list of model types without needing the Model package for detection.\n @method watchModelTypes\n @private\n @param {Function} typesAdded Callback to call to add types.\n Takes an array of objects containing wrapped types (returned from `wrapModelType`).\n @param {Function} typesUpdated Callback to call when a type has changed.\n Takes an array of objects containing wrapped types.\n @return {Function} Method to call to remove all observers\n */\n watchModelTypes(typesAdded, typesUpdated) {\n const store = get(this, 'store');\n const __createRecordData = store._instanceCache._createRecordData;\n const _releaseMethods = [];\n const discoveredTypes = typesMapFor(store);\n\n // Add any models that were added during initialization of the app, before the inspector was opened\n discoveredTypes.forEach((_, type) => {\n this.watchTypeIfUnseen(store, discoveredTypes, type, typesAdded, typesUpdated, _releaseMethods);\n });\n\n // Overwrite _createRecordData so newly added models will get added to the list\n store._instanceCache._createRecordData = identifier => {\n // defer to ensure first-create does not result in an infinite loop, see https://github.com/emberjs/data/issues/8006\n next(() => this.watchTypeIfUnseen(store, discoveredTypes, identifier.type, typesAdded, typesUpdated, _releaseMethods));\n return __createRecordData.call(store._instanceCache, identifier);\n };\n let release = () => {\n _releaseMethods.forEach(fn => fn());\n store._instanceCache._createRecordData = __createRecordData;\n // reset the list so the models can be added if the inspector is re-opened\n // the entries are set to false instead of removed, since the models still exist in the app\n // we just need the inspector to become aware of them\n discoveredTypes.forEach((value, key) => {\n discoveredTypes.set(key, false);\n });\n this.releaseMethods.removeObject(release);\n };\n this.releaseMethods.pushObject(release);\n return release;\n },\n /**\n * Loop over the discovered types and use the callbacks from watchModelTypes to notify\n * the consumer of this adapter about the mdoels.\n *\n * @method watchTypeIfUnseen\n * @param {store} store\n * @param {Map} discoveredTypes\n * @param {String} type\n * @param {Function} typesAdded\n * @param {Function} typesUpdated\n * @param {Array} releaseMethods\n * @private\n */\n watchTypeIfUnseen(store, discoveredTypes, type, typesAdded, typesUpdated, releaseMethods) {\n if (discoveredTypes.get(type) !== true) {\n let klass = store.modelFor(type);\n let wrapped = this.wrapModelType(klass, type);\n releaseMethods.push(this.observeModelType(type, typesUpdated));\n typesAdded([wrapped]);\n discoveredTypes.set(type, true);\n }\n },\n /**\n Creates a human readable string used for column headers\n @method columnNameToDesc\n @private\n @param {String} name The attribute name\n @return {String} Human readable string based on the attribute name\n */\n columnNameToDesc(name) {\n return capitalize(underscore(name).replace(/_/g, ' ').trim());\n },\n /**\n Get the columns for a given model type\n @method columnsForType\n @private\n @param {Model} typeClass\n @return {Array} An array of columns of the following format:\n name: {String} The name of the column\n desc: {String} Humanized description (what would show in a table column name)\n */\n columnsForType(typeClass) {\n let columns = [{\n name: 'id',\n desc: 'Id'\n }];\n let count = 0;\n let self = this;\n get(typeClass, 'attributes').forEach((meta, name) => {\n if (count++ > self.attributeLimit) {\n return false;\n }\n let desc = this.columnNameToDesc(name);\n columns.push({\n name: name,\n desc: desc\n });\n });\n return columns;\n },\n /**\n Fetches all loaded records for a given type\n @method getRecords\n @private\n @param {Model} modelClass of the record\n @param {String} modelName of the record\n @return {Array} An array of Model records\n This array will be observed for changes,\n so it should update when new records are added/removed\n */\n getRecords(modelClass, modelName) {\n if (arguments.length < 2) {\n // Legacy Ember.js < 1.13 support\n let containerKey = modelClass._debugContainerKey;\n if (containerKey) {\n let match = containerKey.match(/model:(.*)/);\n if (match !== null) {\n modelName = match[1];\n }\n }\n }\n assert('Cannot find model name. Please upgrade to Ember.js >= 1.13 for Ember Inspector support', !!modelName);\n return this.get('store').peekAll(modelName);\n },\n /**\n Gets the values for each column\n This is the attribute values for a given record\n @method getRecordColumnValues\n @private\n @param {Model} record to get values from\n @return {Object} Keys should match column names defined by the model type\n */\n getRecordColumnValues(record) {\n let count = 0;\n let columnValues = {\n id: get(record, 'id')\n };\n record.eachAttribute(key => {\n if (count++ > this.attributeLimit) {\n return false;\n }\n columnValues[key] = get(record, key);\n });\n return columnValues;\n },\n /**\n Returns keywords to match when searching records\n @method getRecordKeywords\n @private\n @param {Model} record\n @return {Array} Relevant keywords for search based on the record's attribute values\n */\n getRecordKeywords(record) {\n let keywords = [];\n let keys = A(['id']);\n record.eachAttribute(key => keys.push(key));\n keys.forEach(key => keywords.push(get(record, key)));\n return keywords;\n },\n /**\n Returns the values of filters defined by `getFilters`\n These reflect the state of the record\n @method getRecordFilterValues\n @private\n @param {Model} record\n @return {Object} The record state filter values\n */\n getRecordFilterValues(record) {\n return {\n isNew: record.get('isNew'),\n isModified: record.get('hasDirtyAttributes') && !record.get('isNew'),\n isClean: !record.get('hasDirtyAttributes')\n };\n },\n /**\n Returns a color that represents the record's state\n Possible colors: black, blue, green\n @method getRecordColor\n @private\n @param {Model} record\n @return {String} The record color\n */\n getRecordColor(record) {\n let color = 'black';\n if (record.get('isNew')) {\n color = 'green';\n } else if (record.get('hasDirtyAttributes')) {\n color = 'blue';\n }\n return color;\n },\n /**\n Observes all relevant properties and re-sends the wrapped record\n when a change occurs\n @method observeRecord\n @private\n @param {Model} record\n @param {Function} recordUpdated Callback used to notify changes\n @return {Function} The function to call to remove all observers\n */\n observeRecord(record, recordUpdated) {\n let releaseMethods = A();\n let keysToObserve = A(['id', 'isNew', 'hasDirtyAttributes']);\n record.eachAttribute(key => keysToObserve.push(key));\n let adapter = this;\n keysToObserve.forEach(function (key) {\n let handler = function () {\n recordUpdated(adapter.wrapRecord(record));\n };\n addObserver(record, key, handler);\n releaseMethods.push(function () {\n removeObserver(record, key, handler);\n });\n });\n let release = function () {\n releaseMethods.forEach(fn => fn());\n };\n return release;\n }\n});","import Store from '@ember-data/store';\nconst StoreTypesMap = new WeakMap();\nexport function typesMapFor(store) {\n let typesMap = StoreTypesMap.get(store);\n if (typesMap === undefined) {\n typesMap = new Map();\n StoreTypesMap.set(store, typesMap);\n }\n return typesMap;\n}\n\n// override _createRecordData to add the known models to the typesMap\nconst __createRecordData = Store.prototype._createRecordData;\nStore.prototype._createRecordData = function (identifier) {\n const typesMap = typesMapFor(this);\n if (!typesMap.has(identifier.type)) {\n typesMap.set(identifier.type, false);\n }\n return __createRecordData.call(this, identifier);\n};\nexport default {\n name: '@ember-data/data-adapter',\n initialize() {}\n};","export function isElementDescriptor(args) {\n let [maybeTarget, maybeKey, maybeDesc] = args;\n return (\n // Ensure we have the right number of args\n args.length === 3 && (\n // Make sure the target is a class or object (prototype)\n typeof maybeTarget === 'function' || typeof maybeTarget === 'object' && maybeTarget !== null) &&\n // Make sure the key is a string\n typeof maybeKey === 'string' && (\n // Make sure the descriptor is the right shape\n typeof maybeDesc === 'object' && maybeDesc !== null && 'enumerable' in maybeDesc && 'configurable' in maybeDesc ||\n // TS compatibility\n maybeDesc === undefined)\n );\n}\nexport function computedMacroWithOptionalParams(fn) {\n if (true) {\n return (...maybeDesc) => isElementDescriptor(maybeDesc) ? fn()(...maybeDesc) : fn(...maybeDesc);\n } else {\n return fn;\n }\n}","import { assert } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { DEBUG } from '@glimmer/env';\nimport { recordIdentifierFor, storeFor } from '@ember-data/store';\nimport { recordDataFor } from '@ember-data/store/-private';\nimport { computedMacroWithOptionalParams } from './util';\n\n/**\n @module @ember-data/model\n*/\n\nfunction getDefaultValue(record, options, key) {\n if (typeof options.defaultValue === 'function') {\n return options.defaultValue.apply(null, arguments);\n } else {\n let defaultValue = options.defaultValue;\n assert(`Non primitive defaultValues are not supported because they are shared between all instances. If you would like to use a complex object as a default value please provide a function that returns the complex object.`, typeof defaultValue !== 'object' || defaultValue === null);\n return defaultValue;\n }\n}\n\n/**\n `attr` defines an attribute on a [Model](/ember-data/release/classes/Model).\n By default, attributes are passed through as-is, however you can specify an\n optional type to have the value automatically transformed.\n Ember Data ships with four basic transform types: `string`, `number`,\n `boolean` and `date`. You can define your own transforms by subclassing\n [Transform](/ember-data/release/classes/Transform).\n\n Note that you cannot use `attr` to define an attribute of `id`.\n\n `attr` takes an optional hash as a second parameter, currently\n supported options are:\n\n - `defaultValue`: Pass a string or a function to be called to set the attribute\n to a default value if and only if the key is absent from the payload response.\n\n Example\n\n ```app/models/user.js\n import Model, { attr } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @attr('string') username;\n @attr('string') email;\n @attr('boolean', { defaultValue: false }) verified;\n }\n ```\n\n Default value can also be a function. This is useful it you want to return\n a new object for each attribute.\n\n ```app/models/user.js\n import Model, { attr } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @attr('string') username;\n @attr('string') email;\n\n @attr({\n defaultValue() {\n return {};\n }\n })\n settings;\n }\n ```\n\n The `options` hash is passed as second argument to a transforms'\n `serialize` and `deserialize` method. This allows to configure a\n transformation and adapt the corresponding value, based on the config:\n\n ```app/models/post.js\n import Model, { attr } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @attr('text', {\n uppercase: true\n })\n text;\n }\n ```\n\n ```app/transforms/text.js\n import Transform from '@ember-data/serializer/transform';\n\n export default class TextTransform extends Transform {\n serialize(value, options) {\n if (options.uppercase) {\n return value.toUpperCase();\n }\n\n return value;\n }\n\n deserialize(value) {\n return value;\n }\n }\n ```\n\n @method attr\n @public\n @static\n @for @ember-data/model\n @param {String|Object} type the attribute type\n @param {Object} options a hash of options\n @return {Attribute}\n*/\nfunction attr(type, options) {\n if (typeof type === 'object') {\n options = type;\n type = undefined;\n } else {\n options = options || {};\n }\n let meta = {\n type: type,\n isAttribute: true,\n kind: 'attribute',\n options: options\n };\n return computed({\n get(key) {\n if (DEBUG) {\n if (['_internalModel', 'currentState'].indexOf(key) !== -1) {\n throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your attr on ${this.constructor.toString()}`);\n }\n }\n let recordData = recordDataFor(this);\n if (recordData.hasAttr(key)) {\n return recordData.getAttr(key);\n } else {\n return getDefaultValue(this, options, key);\n }\n },\n set(key, value) {\n if (DEBUG) {\n if (['_internalModel', 'currentState'].indexOf(key) !== -1) {\n throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your attr on ${this.constructor.toString()}`);\n }\n }\n assert(`Attempted to set '${key}' on the deleted record ${recordIdentifierFor(this)}`, !this.currentState.isDeleted);\n const recordData = storeFor(this)._instanceCache.getRecordData(recordIdentifierFor(this));\n let currentValue = recordData.getAttr(key);\n if (currentValue !== value) {\n recordData.setDirtyAttribute(key, value);\n if (!this.isValid) {\n const {\n errors\n } = this;\n if (errors.get(key)) {\n errors.remove(key);\n this.currentState.cleanErrorRequests();\n }\n }\n }\n return value;\n }\n }).meta(meta);\n}\nexport default computedMacroWithOptionalParams(attr);","var _dec, _dec2, _dec3, _dec4, _class, _descriptor, _descriptor2;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\nimport { computed, get } from '@ember/object';\nimport { mapBy, not } from '@ember/object/computed';\n\n/**\n @module @ember-data/model\n*/\n\n// we force the type here to our own construct because mixin and extend patterns\n// lose generic signatures. We also do this because we need to Omit `clear` from\n// the type of ArrayProxy as we override it's signature.\nconst ArrayProxyWithCustomOverrides = ArrayProxy;\n\n/**\n Holds validation errors for a given record, organized by attribute names.\n\n This class is not directly instantiable.\n\n Every `Model` has an `errors` property that is an instance of\n `Errors`. This can be used to display validation error\n messages returned from the server when a `record.save()` rejects.\n\n For Example, if you had a `User` model that looked like this:\n\n ```app/models/user.js\n import Model, { attr } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @attr('string') username;\n @attr('string') email;\n }\n ```\n And you attempted to save a record that did not validate on the backend:\n\n ```javascript\n let user = store.createRecord('user', {\n username: 'tomster',\n email: 'invalidEmail'\n });\n user.save();\n ```\n\n Your backend would be expected to return an error response that described\n the problem, so that error messages can be generated on the app.\n\n API responses will be translated into instances of `Errors` differently,\n depending on the specific combination of adapter and serializer used. You\n may want to check the documentation or the source code of the libraries\n that you are using, to know how they expect errors to be communicated.\n\n Errors can be displayed to the user by accessing their property name\n to get an array of all the error objects for that property. Each\n error object is a JavaScript object with two keys:\n\n - `message` A string containing the error message from the backend\n - `attribute` The name of the property associated with this error message\n\n ```handlebars\n \n {{#each @model.errors.username as |error|}}\n
\n {{error.message}}\n
\n {{/each}}\n\n \n {{#each @model.errors.email as |error|}}\n
\n {{error.message}}\n
\n {{/each}}\n ```\n\n You can also access the special `messages` property on the error\n object to get an array of all the error strings.\n\n ```handlebars\n {{#each @model.errors.messages as |message|}}\n
\n {{message}}\n
\n {{/each}}\n ```\n\n @class Errors\n @public\n @extends Ember.ArrayProxy\n */\nlet Errors = (_dec = computed(), _dec2 = mapBy('content', 'message'), _dec3 = computed(), _dec4 = not('length'), _class = class Errors extends ArrayProxyWithCustomOverrides {\n constructor(...args) {\n super(...args);\n /**\n An array containing all of the error messages for this\n record. This is useful for displaying all errors to the user.\n ```handlebars\n {{#each @model.errors.messages as |message|}}\n
\n {{message}}\n
\n {{/each}}\n ```\n @property messages\n @public\n @type {Array}\n */\n _initializerDefineProperty(this, \"messages\", _descriptor, this);\n /**\n Total number of errors.\n @property length\n @type {Number}\n @public\n @readOnly\n */\n /**\n `true` if we have no errors.\n @property isEmpty\n @type {Boolean}\n @public\n @readOnly\n */\n _initializerDefineProperty(this, \"isEmpty\", _descriptor2, this);\n }\n /**\n @property errorsByAttributeName\n @type {MapWithDefault}\n @private\n */\n get errorsByAttributeName() {\n return new Map();\n }\n\n /**\n Returns errors for a given attribute\n ```javascript\n let user = store.createRecord('user', {\n username: 'tomster',\n email: 'invalidEmail'\n });\n user.save().catch(function(){\n user.get('errors').errorsFor('email'); // returns:\n // [{attribute: \"email\", message: \"Doesn't look like a valid email.\"}]\n });\n ```\n @method errorsFor\n @public\n @param {String} attribute\n @return {Array}\n */\n errorsFor(attribute) {\n let map = this.errorsByAttributeName;\n let errors = map.get(attribute);\n if (errors === undefined) {\n errors = A();\n map.set(attribute, errors);\n }\n\n // Errors may be a native array with extensions turned on. Since we access\n // the array via a method, and not a computed or using `Ember.get`, it does\n // not entangle properly with autotracking, so we entangle manually by\n // getting the `[]` property.\n get(errors, '[]');\n return errors;\n }\n /**\n @property content\n @type {Array}\n @private\n */\n get content() {\n return A();\n }\n\n /**\n @method unknownProperty\n @private\n */\n unknownProperty(attribute) {\n let errors = this.errorsFor(attribute);\n if (errors.length === 0) {\n return undefined;\n }\n return errors;\n }\n /**\n Manually adds errors to the record. This will trigger the `becameInvalid` event/ lifecycle method on\n the record and transition the record into an `invalid` state.\n Example\n ```javascript\n let errors = get(user, 'errors');\n // add multiple errors\n errors.add('password', [\n 'Must be at least 12 characters',\n 'Must contain at least one symbol',\n 'Cannot contain your name'\n ]);\n errors.errorsFor('password');\n // =>\n // [\n // { attribute: 'password', message: 'Must be at least 12 characters' },\n // { attribute: 'password', message: 'Must contain at least one symbol' },\n // { attribute: 'password', message: 'Cannot contain your name' },\n // ]\n // add a single error\n errors.add('username', 'This field is required');\n errors.errorsFor('username');\n // =>\n // [\n // { attribute: 'username', message: 'This field is required' },\n // ]\n ```\n @method add\n @public\n @param {string} attribute - the property name of an attribute or relationship\n @param {string[]|string} messages - an error message or array of error messages for the attribute\n */\n add(attribute, messages) {\n const errors = this._findOrCreateMessages(attribute, messages);\n this.addObjects(errors);\n this.errorsFor(attribute).addObjects(errors);\n this.__record.currentState.notify('isValid');\n this.notifyPropertyChange(attribute);\n }\n\n /**\n @method _findOrCreateMessages\n @private\n */\n _findOrCreateMessages(attribute, messages) {\n let errors = this.errorsFor(attribute);\n let messagesArray = Array.isArray(messages) ? messages : [messages];\n let _messages = new Array(messagesArray.length);\n for (let i = 0; i < messagesArray.length; i++) {\n let message = messagesArray[i];\n let err = errors.findBy('message', message);\n if (err) {\n _messages[i] = err;\n } else {\n _messages[i] = {\n attribute: attribute,\n message\n };\n }\n }\n return _messages;\n }\n\n /**\n Manually removes all errors for a given member from the record.\n This will transition the record into a `valid` state, and\n triggers the `becameValid` event and lifecycle method.\n Example:\n ```javascript\n let errors = get('user', errors);\n errors.add('phone', ['error-1', 'error-2']);\n errors.errorsFor('phone');\n // =>\n // [\n // { attribute: 'phone', message: 'error-1' },\n // { attribute: 'phone', message: 'error-2' },\n // ]\n errors.remove('phone');\n errors.errorsFor('phone');\n // => undefined\n ```\n @method remove\n @public\n @param {string} member - the property name of an attribute or relationship\n */\n remove(attribute) {\n if (this.isEmpty) {\n return;\n }\n let content = this.rejectBy('attribute', attribute);\n this.content.setObjects(content);\n\n // Although errorsByAttributeName.delete is technically enough to sync errors state, we also\n // must mutate the array as well for autotracking\n let errors = this.errorsFor(attribute);\n for (let i = 0; i < errors.length; i++) {\n if (errors[i].attribute === attribute) {\n // .replace from Ember.NativeArray is necessary. JS splice will not work.\n errors.replace(i, 1);\n }\n }\n this.errorsByAttributeName.delete(attribute);\n this.__record.currentState.notify('isValid');\n this.notifyPropertyChange(attribute);\n this.notifyPropertyChange('length');\n }\n\n /**\n Manually clears all errors for the record.\n This will transition the record into a `valid` state, and\n will trigger the `becameValid` event and lifecycle method.\n Example:\n ```javascript\n let errors = get('user', errors);\n errors.add('username', ['error-a']);\n errors.add('phone', ['error-1', 'error-2']);\n errors.errorsFor('username');\n // =>\n // [\n // { attribute: 'username', message: 'error-a' },\n // ]\n errors.errorsFor('phone');\n // =>\n // [\n // { attribute: 'phone', message: 'error-1' },\n // { attribute: 'phone', message: 'error-2' },\n // ]\n errors.clear();\n errors.errorsFor('username');\n // => undefined\n errors.errorsFor('phone');\n // => undefined\n errors.get('messages')\n // => []\n ```\n @method clear\n @public\n */\n clear() {\n if (this.isEmpty) {\n return;\n }\n let errorsByAttributeName = this.errorsByAttributeName;\n let attributes = [];\n errorsByAttributeName.forEach(function (_, attribute) {\n attributes.push(attribute);\n });\n errorsByAttributeName.clear();\n attributes.forEach(attribute => {\n this.notifyPropertyChange(attribute);\n });\n this.__record.currentState.notify('isValid');\n super.clear();\n }\n\n /**\n Checks if there are error messages for the given attribute.\n ```app/controllers/user/edit.js\n import Controller from '@ember/controller';\n import { action } from '@ember/object';\n export default class UserEditController extends Controller {\n @action\n save(user) {\n if (user.get('errors').has('email')) {\n return alert('Please update your email before attempting to save.');\n }\n user.save();\n }\n }\n ```\n @method has\n @public\n @param {String} attribute\n @return {Boolean} true if there some errors on given attribute\n */\n has(attribute) {\n return this.errorsFor(attribute).length > 0;\n }\n}, _applyDecoratedDescriptor(_class.prototype, \"errorsByAttributeName\", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, \"errorsByAttributeName\"), _class.prototype), _descriptor = _applyDecoratedDescriptor(_class.prototype, \"messages\", [_dec2], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _applyDecoratedDescriptor(_class.prototype, \"content\", [_dec3], Object.getOwnPropertyDescriptor(_class.prototype, \"content\"), _class.prototype), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, \"isEmpty\", [_dec4], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class);\nexport { Errors as default };","import { assert } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nexport function iterateData(data, fn) {\n if (Array.isArray(data)) {\n return data.map(fn);\n } else {\n return fn(data);\n }\n}\nexport function assertIdentifierHasId(identifier) {\n assert(`Attempted to schedule a fetch for a record without an id.`, identifier.id !== null);\n}\nexport function normalizeResponseHelper(serializer, store, modelClass, payload, id, requestType) {\n let normalizedResponse = serializer ? serializer.normalizeResponse(store, modelClass, payload, id, requestType) : payload;\n validateDocumentStructure(normalizedResponse);\n return normalizedResponse;\n}\nexport function validateDocumentStructure(doc) {\n if (DEBUG) {\n let errors = [];\n if (!doc || typeof doc !== 'object') {\n errors.push('Top level of a JSON API document must be an object');\n } else {\n if (!('data' in doc) && !('errors' in doc) && !('meta' in doc)) {\n errors.push('One or more of the following keys must be present: \"data\", \"errors\", \"meta\".');\n } else {\n if ('data' in doc && 'errors' in doc) {\n errors.push('Top level keys \"errors\" and \"data\" cannot both be present in a JSON API document');\n }\n }\n if ('data' in doc) {\n if (!(doc.data === null || Array.isArray(doc.data) || typeof doc.data === 'object')) {\n errors.push('data must be null, an object, or an array');\n }\n }\n if ('meta' in doc) {\n if (typeof doc.meta !== 'object') {\n errors.push('meta must be an object');\n }\n }\n if ('errors' in doc) {\n if (!Array.isArray(doc.errors)) {\n errors.push('errors must be an array');\n }\n }\n if ('links' in doc) {\n if (typeof doc.links !== 'object') {\n errors.push('links must be an object');\n }\n }\n if ('jsonapi' in doc) {\n if (typeof doc.jsonapi !== 'object') {\n errors.push('jsonapi must be an object');\n }\n }\n if ('included' in doc) {\n if (typeof doc.included !== 'object') {\n errors.push('included must be an array');\n }\n }\n }\n assert(`Response must be normalized to a valid JSON API document:\\n\\t* ${errors.join('\\n\\t* ')}`, errors.length === 0);\n }\n}","import { assert, deprecate } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport { resolve } from 'rsvp';\nimport { iterateData, normalizeResponseHelper } from './legacy-data-utils';\nexport function _findHasMany(adapter, store, identifier, link, relationship, options) {\n const snapshot = store._instanceCache.createSnapshot(identifier, options);\n let modelClass = store.modelFor(relationship.type);\n let useLink = !link || typeof link === 'string';\n let relatedLink = useLink ? link : link.href;\n let promise = adapter.findHasMany(store, snapshot, relatedLink, relationship);\n let label = `DS: Handle Adapter#findHasMany of '${identifier.type}' : '${relationship.type}'`;\n promise = guardDestroyedStore(promise, store, label);\n promise = promise.then(adapterPayload => {\n if (!_objectIsAlive(store._instanceCache.getInternalModel(identifier))) {\n if (true /* DEPRECATE_RSVP_PROMISE */) {\n deprecate(`A Promise for fetching ${relationship.type} did not resolve by the time your model was destroyed. This will error in a future release.`, false, {\n id: 'ember-data:rsvp-unresolved-async',\n until: '5.0',\n for: '@ember-data/store',\n since: {\n available: '4.5',\n enabled: '4.5'\n }\n });\n }\n }\n assert(`You made a 'findHasMany' request for a ${identifier.type}'s '${relationship.key}' relationship, using link '${link}' , but the adapter's response did not have any data`, payloadIsNotBlank(adapterPayload));\n let serializer = store.serializerFor(relationship.type);\n let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findHasMany');\n assert(`fetched the hasMany relationship '${relationship.name}' for ${identifier.type}:${identifier.id} with link '${link}', but no data member is present in the response. If no data exists, the response should set { data: [] }`, 'data' in payload && Array.isArray(payload.data));\n payload = syncRelationshipDataFromLink(store, payload, identifier, relationship);\n return store._push(payload);\n }, null, `DS: Extract payload of '${identifier.type}' : hasMany '${relationship.type}'`);\n if (true /* DEPRECATE_RSVP_PROMISE */) {\n promise = _guard(promise, _bind(_objectIsAlive, store._instanceCache.getInternalModel(identifier)));\n }\n return promise;\n}\nexport function _findBelongsTo(store, identifier, link, relationship, options) {\n let adapter = store.adapterFor(identifier.type);\n assert(`You tried to load a belongsTo relationship but you have no adapter (for ${identifier.type})`, adapter);\n assert(`You tried to load a belongsTo relationship from a specified 'link' in the original payload but your adapter does not implement 'findBelongsTo'`, typeof adapter.findBelongsTo === 'function');\n let snapshot = store._instanceCache.createSnapshot(identifier, options);\n let modelClass = store.modelFor(relationship.type);\n let useLink = !link || typeof link === 'string';\n let relatedLink = useLink ? link : link.href;\n let promise = adapter.findBelongsTo(store, snapshot, relatedLink, relationship);\n let label = `DS: Handle Adapter#findBelongsTo of ${identifier.type} : ${relationship.type}`;\n promise = guardDestroyedStore(promise, store, label);\n promise = _guard(promise, _bind(_objectIsAlive, store._instanceCache.getInternalModel(identifier)));\n promise = promise.then(adapterPayload => {\n if (!_objectIsAlive(store._instanceCache.getInternalModel(identifier))) {\n if (true /* DEPRECATE_RSVP_PROMISE */) {\n deprecate(`A Promise for fetching ${relationship.type} did not resolve by the time your model was destroyed. This will error in a future release.`, false, {\n id: 'ember-data:rsvp-unresolved-async',\n until: '5.0',\n for: '@ember-data/store',\n since: {\n available: '4.5',\n enabled: '4.5'\n }\n });\n }\n }\n let serializer = store.serializerFor(relationship.type);\n let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findBelongsTo');\n assert(`fetched the belongsTo relationship '${relationship.name}' for ${identifier.type}:${identifier.id} with link '${link}', but no data member is present in the response. If no data exists, the response should set { data: null }`, 'data' in payload && (payload.data === null || typeof payload.data === 'object' && !Array.isArray(payload.data)));\n if (!payload.data && !payload.links && !payload.meta) {\n return null;\n }\n payload = syncRelationshipDataFromLink(store, payload, identifier, relationship);\n return store._push(payload);\n }, null, `DS: Extract payload of ${identifier.type} : ${relationship.type}`);\n if (true /* DEPRECATE_RSVP_PROMISE */) {\n promise = _guard(promise, _bind(_objectIsAlive, store._instanceCache.getInternalModel(identifier)));\n }\n return promise;\n}\n\n// sync\n// iterate over records in payload.data\n// for each record\n// assert that record.relationships[inverse] is either undefined (so we can fix it)\n// or provide a data: {id, type} that matches the record that requested it\n// return the relationship data for the parent\nfunction syncRelationshipDataFromLink(store, payload, parentIdentifier, relationship) {\n // ensure the right hand side (incoming payload) points to the parent record that\n // requested this relationship\n let relationshipData = payload.data ? iterateData(payload.data, (data, index) => {\n const {\n id,\n type\n } = data;\n ensureRelationshipIsSetToParent(data, parentIdentifier, store, relationship, index);\n return {\n id,\n type\n };\n }) : null;\n const relatedDataHash = {};\n if ('meta' in payload) {\n relatedDataHash.meta = payload.meta;\n }\n if ('links' in payload) {\n relatedDataHash.links = payload.links;\n }\n if ('data' in payload) {\n relatedDataHash.data = relationshipData;\n }\n\n // now, push the left hand side (the parent record) to ensure things are in sync, since\n // the payload will be pushed with store._push\n const parentPayload = {\n id: parentIdentifier.id,\n type: parentIdentifier.type,\n relationships: {\n [relationship.key]: relatedDataHash\n }\n };\n if (!Array.isArray(payload.included)) {\n payload.included = [];\n }\n payload.included.push(parentPayload);\n return payload;\n}\nfunction ensureRelationshipIsSetToParent(payload, parentIdentifier, store, parentRelationship, index) {\n let {\n id,\n type\n } = payload;\n if (!payload.relationships) {\n payload.relationships = {};\n }\n let {\n relationships\n } = payload;\n let inverse = getInverse(store, parentIdentifier, parentRelationship, type);\n if (inverse) {\n let {\n inverseKey,\n kind\n } = inverse;\n let relationshipData = relationships[inverseKey] && relationships[inverseKey].data;\n if (DEBUG && typeof relationshipData !== 'undefined' && !relationshipDataPointsToParent(relationshipData, parentIdentifier)) {\n let inspect = function inspect(thing) {\n return `'${JSON.stringify(thing)}'`;\n };\n let quotedType = inspect(type);\n let quotedInverse = inspect(inverseKey);\n let expected = inspect({\n id: parentIdentifier.id,\n type: parentIdentifier.type\n });\n let expectedModel = `${parentIdentifier.type}:${parentIdentifier.id}`;\n let got = inspect(relationshipData);\n let prefix = typeof index === 'number' ? `data[${index}]` : `data`;\n let path = `${prefix}.relationships.${inverseKey}.data`;\n let other = relationshipData ? `<${relationshipData.type}:${relationshipData.id}>` : null;\n let relationshipFetched = `${expectedModel}.${parentRelationship.kind}(\"${parentRelationship.name}\")`;\n let includedRecord = `<${type}:${id}>`;\n let message = [`Encountered mismatched relationship: Ember Data expected ${path} in the payload from ${relationshipFetched} to include ${expected} but got ${got} instead.\\n`, `The ${includedRecord} record loaded at ${prefix} in the payload specified ${other} as its ${quotedInverse}, but should have specified ${expectedModel} (the record the relationship is being loaded from) as its ${quotedInverse} instead.`, `This could mean that the response for ${relationshipFetched} may have accidentally returned ${quotedType} records that aren't related to ${expectedModel} and could be related to a different ${parentIdentifier.type} record instead.`, `Ember Data has corrected the ${includedRecord} record's ${quotedInverse} relationship to ${expectedModel} so that ${relationshipFetched} will include ${includedRecord}.`, `Please update the response from the server or change your serializer to either ensure that the response for only includes ${quotedType} records that specify ${expectedModel} as their ${quotedInverse}, or omit the ${quotedInverse} relationship from the response.`].join('\\n');\n assert(message);\n }\n if (kind !== 'hasMany' || typeof relationshipData !== 'undefined') {\n relationships[inverseKey] = relationships[inverseKey] || {};\n relationships[inverseKey].data = fixRelationshipData(relationshipData, kind, parentIdentifier);\n }\n }\n}\nfunction getInverse(store, parentInternalModel, parentRelationship, type) {\n return recordDataFindInverseRelationshipInfo(store, parentInternalModel, parentRelationship, type);\n}\nfunction recordDataFindInverseRelationshipInfo(store, parentIdentifier, parentRelationship, type) {\n let {\n name: lhs_relationshipName\n } = parentRelationship;\n let {\n type: parentType\n } = parentIdentifier;\n let inverseKey = store._instanceCache._storeWrapper.inverseForRelationship(parentType, lhs_relationshipName);\n if (inverseKey) {\n let {\n meta: {\n kind\n }\n } = store._instanceCache._storeWrapper.relationshipsDefinitionFor(type)[inverseKey];\n return {\n inverseKey,\n kind\n };\n }\n}\nfunction relationshipDataPointsToParent(relationshipData, identifier) {\n if (relationshipData === null) {\n return false;\n }\n if (Array.isArray(relationshipData)) {\n if (relationshipData.length === 0) {\n return false;\n }\n for (let i = 0; i < relationshipData.length; i++) {\n let entry = relationshipData[i];\n if (validateRelationshipEntry(entry, identifier)) {\n return true;\n }\n }\n } else {\n return validateRelationshipEntry(relationshipData, identifier);\n }\n return false;\n}\nfunction fixRelationshipData(relationshipData, relationshipKind, {\n id,\n type\n}) {\n let parentRelationshipData = {\n id,\n type\n };\n let payload;\n if (relationshipKind === 'hasMany') {\n payload = relationshipData || [];\n if (relationshipData) {\n // these arrays could be massive so this is better than filter\n // Note: this is potentially problematic if type/id are not in the\n // same state of normalization.\n let found = relationshipData.find(v => {\n return v.type === parentRelationshipData.type && v.id === parentRelationshipData.id;\n });\n if (!found) {\n payload.push(parentRelationshipData);\n }\n } else {\n payload.push(parentRelationshipData);\n }\n } else {\n payload = relationshipData || {};\n Object.assign(payload, parentRelationshipData);\n }\n return payload;\n}\nfunction validateRelationshipEntry({\n id\n}, {\n id: parentModelID\n}) {\n return id && id.toString() === parentModelID;\n}\nfunction _bind(fn, ...args) {\n return function () {\n return fn.apply(undefined, args);\n };\n}\nfunction _guard(promise, test) {\n let guarded = promise.finally(() => {\n if (!test()) {\n guarded._subscribers.length = 0;\n }\n });\n return guarded;\n}\nfunction _objectIsAlive(object) {\n return !(object.isDestroyed || object.isDestroying);\n}\nfunction payloadIsNotBlank(adapterPayload) {\n if (Array.isArray(adapterPayload)) {\n return true;\n } else {\n return Object.keys(adapterPayload || {}).length;\n }\n}\nfunction guardDestroyedStore(promise, store, label) {\n let token;\n if (DEBUG) {\n token = store._trackAsyncRequestStart(label);\n }\n let wrapperPromise = resolve(promise, label).then(_v => {\n if (!_objectIsAlive(store)) {\n if (true /* DEPRECATE_RSVP_PROMISE */) {\n deprecate(`A Promise did not resolve by the time the store was destroyed. This will error in a future release.`, false, {\n id: 'ember-data:rsvp-unresolved-async',\n until: '5.0',\n for: '@ember-data/store',\n since: {\n available: '4.5',\n enabled: '4.5'\n }\n });\n }\n }\n return promise;\n });\n return _guard(wrapperPromise, () => {\n if (DEBUG) {\n store._trackAsyncRequestEnd(token);\n }\n return _objectIsAlive(store);\n });\n}","/**\n @module @ember-data/model\n*/\n\n/**\n @method diffArray\n @internal\n @param {Array} oldArray the old array\n @param {Array} newArray the new array\n @return {hash} {\n firstChangeIndex: , // null if no change\n addedCount: , // 0 if no change\n removedCount: // 0 if no change\n }\n*/\nexport default function diffArray(oldArray, newArray) {\n const oldLength = oldArray.length;\n const newLength = newArray.length;\n const shortestLength = Math.min(oldLength, newLength);\n let firstChangeIndex = null; // null signifies no changes\n\n // find the first change\n for (let i = 0; i < shortestLength; i++) {\n // compare each item in the array\n if (oldArray[i] !== newArray[i]) {\n firstChangeIndex = i;\n break;\n }\n }\n if (firstChangeIndex === null && newLength !== oldLength) {\n // no change found in the overlapping block\n // and array lengths differ,\n // so change starts at end of overlap\n firstChangeIndex = shortestLength;\n }\n let addedCount = 0;\n let removedCount = 0;\n if (firstChangeIndex !== null) {\n // we found a change, find the end of the change\n let unchangedEndBlockLength = shortestLength - firstChangeIndex;\n // walk back from the end of both arrays until we find a change\n for (let i = 1; i <= shortestLength; i++) {\n // compare each item in the array\n if (oldArray[oldLength - i] !== newArray[newLength - i]) {\n unchangedEndBlockLength = i - 1;\n break;\n }\n }\n addedCount = newLength - unchangedEndBlockLength - firstChangeIndex;\n removedCount = oldLength - unchangedEndBlockLength - firstChangeIndex;\n }\n return {\n firstChangeIndex,\n addedCount,\n removedCount\n };\n}","/**\n @module @ember-data/store\n*/\nimport EmberArray from '@ember/array';\nimport MutableArray from '@ember/array/mutable';\nimport { assert } from '@ember/debug';\nimport EmberObject, { get } from '@ember/object';\nimport { all } from 'rsvp';\nimport { PromiseArray, recordDataFor } from '@ember-data/store/-private';\nimport diffArray from './diff-array';\nconst MutableArrayWithObject = EmberObject.extend(MutableArray);\n/**\n A `ManyArray` is a `MutableArray` that represents the contents of a has-many\n relationship.\n\n The `ManyArray` is instantiated lazily the first time the relationship is\n requested.\n\n This class is not intended to be directly instantiated by consuming applications.\n\n ### Inverses\n\n Often, the relationships in Ember Data applications will have\n an inverse. For example, imagine the following models are\n defined:\n\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @hasMany('comment') comments;\n }\n ```\n\n ```app/models/comment.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class CommentModel extends Model {\n @belongsTo('post') post;\n }\n ```\n\n If you created a new instance of `Post` and added\n a `Comment` record to its `comments` has-many\n relationship, you would expect the comment's `post`\n property to be set to the post that contained\n the has-many.\n\n We call the record to which a relationship belongs-to the\n relationship's _owner_.\n\n @class ManyArray\n @public\n @extends Ember.EmberObject\n @uses Ember.MutableArray\n*/\nexport default class ManyArray extends MutableArrayWithObject {\n // override the base declaration\n\n init() {\n super.init();\n\n /**\n The loading state of this array\n @property {Boolean} isLoaded\n @public\n */\n this.isLoaded = this.isLoaded || false;\n this.isAsync = this.isAsync || false;\n this._length = 0;\n\n /**\n Metadata associated with the request for async hasMany relationships.\n Example\n Given that the server returns the following JSON payload when fetching a\n hasMany relationship:\n ```js\n {\n \"comments\": [{\n \"id\": 1,\n \"comment\": \"This is the first comment\",\n }, {\n // ...\n }],\n \"meta\": {\n \"page\": 1,\n \"total\": 5\n }\n }\n ```\n You can then access the meta data via the `meta` property:\n ```js\n let comments = await post.comments;\n let meta = comments.meta;\n // meta.page => 1\n // meta.total => 5\n ```\n @property {Object | null} meta\n @public\n */\n this._meta = this._meta || null;\n\n /**\n * Retrieve the links for this relationship\n *\n @property {Object | null} links\n @public\n */\n this._links = this._links || null;\n\n /**\n `true` if the relationship is polymorphic, `false` otherwise.\n @property {Boolean} isPolymorphic\n @private\n */\n this.isPolymorphic = this.isPolymorphic || false;\n\n /**\n The relationship which manages this array.\n @property {ManyRelationship} relationship\n @private\n */\n this.currentState = [];\n this._isUpdating = false;\n this._isDirty = false;\n /*\n * Unfortunately ArrayProxy adds it's observers lazily,\n * so in a first-render situation we may sometimes notify\n * prior to the ArrayProxy having installed it's observers\n * (which occurs during _revalidate()).\n *\n * This leads to the flush occuring on access, the flush takes\n * the hasObservers codepath which in code out of our control\n * notifies again leading to a glimmer rendering invalidation error.\n *\n * We use this flag to detect the case where we notified without\n * array observers but observers were installed prior to flush.\n *\n * We do not need to fire array observers at all in this case\n * since it will be the first-access for those observers.\n */\n this._hasNotified = false;\n // make sure we initialize to the correct state\n // since the user has already accessed\n this.retrieveLatest();\n }\n\n // TODO refactor away _hasArrayObservers for tests\n get _hasArrayObservers() {\n // cast necessary because hasArrayObservers is typed as a ComputedProperty vs a boolean;\n return this.hasArrayObservers || this.__hasArrayObservers;\n }\n notify() {\n this._isDirty = true;\n if (this._hasArrayObservers && !this._hasNotified) {\n this.retrieveLatest();\n } else {\n this._hasNotified = true;\n this.notifyPropertyChange('[]');\n this.notifyPropertyChange('length');\n this.notifyPropertyChange('firstObject');\n this.notifyPropertyChange('lastObject');\n }\n }\n get length() {\n if (this._isDirty) {\n this.retrieveLatest();\n }\n // By using `get()`, the tracking system knows to pay attention to changes that occur.\n get(this, '[]');\n return this._length;\n }\n set length(value) {\n this._length = value;\n }\n get links() {\n get(this, '[]');\n if (this._isDirty) {\n this.retrieveLatest();\n }\n return this._links;\n }\n set links(v) {\n this._links = v;\n }\n get meta() {\n get(this, '[]');\n if (this._isDirty) {\n this.retrieveLatest();\n }\n return this._meta;\n }\n set meta(v) {\n this._meta = v;\n }\n objectAt(index) {\n if (this._isDirty) {\n this.retrieveLatest();\n }\n let identifier = this.currentState[index];\n if (identifier === undefined) {\n return;\n }\n return this.store._instanceCache.getRecord(identifier);\n }\n replace(idx, amt, objects) {\n assert(`Cannot push mutations to the cache while updating the relationship from cache`, !this._isUpdating);\n const {\n store\n } = this;\n store._backburner.join(() => {\n let identifiers;\n if (amt > 0) {\n identifiers = this.currentState.slice(idx, idx + amt);\n this.recordData.removeFromHasMany(this.key,\n // TODO RecordData V2: recordData should take identifiers not RecordDatas\n identifiers.map(identifier => store._instanceCache.getRecordData(identifier)));\n }\n if (objects) {\n assert('The third argument to replace needs to be an array.', Array.isArray(objects) || EmberArray.detect(objects));\n this.recordData.addToHasMany(this.key, objects.map(obj => recordDataFor(obj)), idx);\n }\n this.notify();\n });\n }\n retrieveLatest() {\n // It’s possible the parent side of the relationship may have been destroyed by this point\n if (this.isDestroyed || this.isDestroying || this._isUpdating) {\n return;\n }\n this._isDirty = false;\n this._isUpdating = true;\n let jsonApi = this.recordData.getHasMany(this.key);\n let identifiers = [];\n if (jsonApi.data) {\n for (let i = 0; i < jsonApi.data.length; i++) {\n // TODO figure out where this state comes from\n let im = this.store._instanceCache._internalModelForResource(jsonApi.data[i]);\n let shouldRemove = im._isDematerializing || im.isEmpty || !im.isLoaded;\n if (!shouldRemove) {\n identifiers.push(im.identifier);\n }\n }\n }\n if (jsonApi.meta) {\n this._meta = jsonApi.meta;\n }\n if (jsonApi.links) {\n this._links = jsonApi.links;\n }\n if (this._hasArrayObservers && !this._hasNotified) {\n // diff to find changes\n let diff = diffArray(this.currentState, identifiers);\n // it's null if no change found\n if (diff.firstChangeIndex !== null) {\n // we found a change\n this.arrayContentWillChange(diff.firstChangeIndex, diff.removedCount, diff.addedCount);\n this._length = identifiers.length;\n this.currentState = identifiers;\n this.arrayContentDidChange(diff.firstChangeIndex, diff.removedCount, diff.addedCount);\n }\n } else {\n this._hasNotified = false;\n this._length = identifiers.length;\n this.currentState = identifiers;\n }\n this._isUpdating = false;\n }\n\n /**\n Reloads all of the records in the manyArray. If the manyArray\n holds a relationship that was originally fetched using a links url\n Ember Data will revisit the original links url to repopulate the\n relationship.\n If the manyArray holds the result of a `store.query()` reload will\n re-run the original query.\n Example\n ```javascript\n let user = store.peekRecord('user', '1')\n await login(user);\n let permissions = await user.permissions;\n await permissions.reload();\n ```\n @method reload\n @public\n */\n reload(options) {\n // TODO this is odd, we don't ask the store for anything else like this?\n return this.legacySupport.reloadHasMany(this.key, options);\n }\n\n /**\n Saves all of the records in the `ManyArray`.\n Example\n ```javascript\n let inbox = await store.findRecord('inbox', '1');\n let messages = await inbox.messages;\n messages.forEach((message) => {\n message.isRead = true;\n });\n messages.save();\n ```\n @method save\n @public\n @return {PromiseArray} promise\n */\n save() {\n let manyArray = this;\n let promiseLabel = 'DS: ManyArray#save ' + this.type.modelName;\n let promise = all(this.invoke('save'), promiseLabel).then(() => manyArray, null, 'DS: ManyArray#save return ManyArray');\n\n // TODO deprecate returning a promiseArray here\n return PromiseArray.create({\n promise\n });\n }\n\n /**\n Create a child record within the owner\n @method createRecord\n @public\n @param {Object} hash\n @return {Model} record\n */\n createRecord(hash) {\n const {\n store,\n type\n } = this;\n const record = store.createRecord(type.modelName, hash);\n this.pushObject(record);\n return record;\n }\n}","var _dec, _class;\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nimport { assert } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { PromiseObject } from '@ember-data/store/-private';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\nconst Extended = PromiseObject;\n\n/**\n @module @ember-data/model\n */\n\n/**\n A PromiseBelongsTo is a PromiseObject that also proxies certain method calls\n to the underlying belongsTo model.\n Right now we proxy:\n * `reload()`\n @class PromiseBelongsTo\n @extends PromiseObject\n @private\n*/\nlet PromiseBelongsTo = (_dec = computed(), _class = class PromiseBelongsTo extends Extended {\n // we don't proxy meta because we would need to proxy it to the relationship state container\n // however, meta on relationships does not trigger change notifications.\n // if you need relationship meta, you should do `record.belongsTo(relationshipName).meta()`\n get meta() {\n // eslint-disable-next-line no-constant-condition\n if (1) {\n assert('You attempted to access meta on the promise for the async belongsTo relationship ' + `${this.get('_belongsToState').modelName}:${this.get('_belongsToState').key}'.` + '\\nUse `record.belongsTo(relationshipName).meta()` instead.', false);\n }\n return;\n }\n async reload(options) {\n assert('You are trying to reload an async belongsTo before it has been created', this.content !== undefined);\n let {\n key,\n legacySupport\n } = this._belongsToState;\n await legacySupport.reloadBelongsTo(key, options);\n return this;\n }\n}, _applyDecoratedDescriptor(_class.prototype, \"meta\", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, \"meta\"), _class.prototype), _class);\nexport default PromiseBelongsTo;","var _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport ArrayMixin, { NativeArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { dependentKeyCompat } from '@ember/object/compat';\nimport { tracked } from '@glimmer/tracking';\nimport Ember from 'ember';\nimport { resolve } from 'rsvp';\n\n/**\n @module @ember-data/model\n */\n/**\n This class is returned as the result of accessing an async hasMany relationship\n on an instance of a Model extending from `@ember-data/model`.\n\n A PromiseManyArray is an array-like proxy that also proxies certain method calls\n to the underlying ManyArray in addition to being \"promisified\".\n\n Right now we proxy:\n\n * `reload()`\n * `createRecord()`\n\n This promise-proxy behavior is primarily to ensure that async relationship interact\n nicely with templates. In your JS code you should resolve the promise first.\n\n ```js\n const comments = await post.comments;\n ```\n\n @class PromiseManyArray\n @public\n*/\nlet PromiseManyArray = (_class = class PromiseManyArray {\n constructor(promise, content) {\n //---- Methods/Properties on ArrayProxy that we will keep as our API\n _initializerDefineProperty(this, \"content\", _descriptor, this);\n //---- Properties/Methods from the PromiseProxyMixin that we will keep as our API\n /**\n * Whether the loading promise is still pending\n *\n * @property {boolean} isPending\n * @public\n */\n _initializerDefineProperty(this, \"isPending\", _descriptor2, this);\n /**\n * Whether the loading promise rejected\n *\n * @property {boolean} isRejected\n * @public\n */\n _initializerDefineProperty(this, \"isRejected\", _descriptor3, this);\n /**\n * Whether the loading promise succeeded\n *\n * @property {boolean} isFulfilled\n * @public\n */\n _initializerDefineProperty(this, \"isFulfilled\", _descriptor4, this);\n /**\n * Whether the loading promise completed (resolved or rejected)\n *\n * @property {boolean} isSettled\n * @public\n */\n _initializerDefineProperty(this, \"isSettled\", _descriptor5, this);\n this._update(promise, content);\n this.isDestroyed = false;\n this.isDestroying = false;\n const meta = Ember.meta(this);\n meta.hasMixin = mixin => {\n if (mixin === NativeArray || mixin === ArrayMixin) {\n return true;\n }\n return false;\n };\n }\n /**\n * Retrieve the length of the content\n * @property length\n * @public\n */\n get length() {\n // shouldn't be needed, but ends up being needed\n // for computed chains even in 4.x\n this['[]'];\n return this.content ? this.content.length : 0;\n }\n\n // ember-source < 3.23 (e.g. 3.20 lts)\n // requires that the tag `'[]'` be notified\n // on the ArrayProxy in order for `{{#each}}`\n // to recompute. We entangle the '[]' tag from\n get '[]'() {\n return this.content ? this.content['[]'] : this.content;\n }\n\n /**\n * Iterate the proxied content. Called by the glimmer iterator in #each\n *\n * @method forEach\n * @param cb\n * @returns\n * @private\n */\n forEach(cb) {\n this['[]']; // needed for < 3.23 support e.g. 3.20 lts\n if (this.content && this.length) {\n this.content.forEach(cb);\n }\n }\n /**\n * chain this promise\n *\n * @method then\n * @public\n * @param success\n * @param fail\n * @returns Promise\n */\n then(s, f) {\n return this.promise.then(s, f);\n }\n\n /**\n * catch errors thrown by this promise\n * @method catch\n * @public\n * @param callback\n * @returns Promise\n */\n catch(cb) {\n return this.promise.catch(cb);\n }\n\n /**\n * run cleanup after this promise completes\n *\n * @method finally\n * @public\n * @param callback\n * @returns Promise\n */\n finally(cb) {\n return this.promise.finally(cb);\n }\n\n //---- Methods on EmberObject that we should keep\n\n destroy() {\n this.isDestroying = true;\n this.isDestroyed = true;\n this.content = null;\n this.promise = null;\n }\n\n //---- Methods/Properties on ManyArray that we own and proxy to\n\n /**\n * Retrieve the links for this relationship\n * @property links\n * @public\n */\n get links() {\n return this.content ? this.content.links : undefined;\n }\n\n /**\n * Retrieve the meta for this relationship\n * @property meta\n * @public\n */\n get meta() {\n return this.content ? this.content.meta : undefined;\n }\n\n /**\n * Reload the relationship\n * @method reload\n * @public\n * @param options\n * @returns\n */\n reload(options) {\n assert('You are trying to reload an async manyArray before it has been created', this.content);\n this.content.reload(options);\n return this;\n }\n\n //---- Our own stuff\n\n _update(promise, content) {\n if (content !== undefined) {\n this.content = content;\n }\n this.promise = tapPromise(this, promise);\n }\n static create({\n promise,\n content\n }) {\n return new this(promise, content);\n }\n\n // Methods on ManyArray which people should resolve the relationship first before calling\n createRecord(...args) {\n assert('You are trying to createRecord on an async manyArray before it has been created', this.content);\n return this.content.createRecord(...args);\n }\n\n // Properties/Methods on ArrayProxy we should deprecate\n\n get firstObject() {\n return this.content ? this.content.firstObject : undefined;\n }\n get lastObject() {\n return this.content ? this.content.lastObject : undefined;\n }\n}, _descriptor = _applyDecoratedDescriptor(_class.prototype, \"content\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return null;\n }\n}), _applyDecoratedDescriptor(_class.prototype, \"length\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"length\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, '[]', [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, '[]'), _class.prototype), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, \"isPending\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return false;\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, \"isRejected\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return false;\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, \"isFulfilled\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return false;\n }\n}), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, \"isSettled\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return false;\n }\n}), _applyDecoratedDescriptor(_class.prototype, \"links\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"links\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"meta\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"meta\"), _class.prototype), _class);\nexport { PromiseManyArray as default };\nfunction tapPromise(proxy, promise) {\n proxy.isPending = true;\n proxy.isSettled = false;\n proxy.isFulfilled = false;\n proxy.isRejected = false;\n return resolve(promise).then(content => {\n proxy.isPending = false;\n proxy.isFulfilled = true;\n proxy.isSettled = true;\n proxy.content = content;\n return content;\n }, error => {\n proxy.isPending = false;\n proxy.isFulfilled = false;\n proxy.isRejected = true;\n proxy.isSettled = true;\n throw error;\n });\n}\nconst EmberObjectMethods = ['addObserver', 'cacheFor', 'decrementProperty', 'get', 'getProperties', 'incrementProperty', 'notifyPropertyChange', 'removeObserver', 'set', 'setProperties', 'toggleProperty'];\nEmberObjectMethods.forEach(method => {\n PromiseManyArray.prototype[method] = function delegatedMethod(...args) {\n return Ember[method](this, ...args);\n };\n});\nconst InheritedProxyMethods = ['addArrayObserver', 'addObject', 'addObjects', 'any', 'arrayContentDidChange', 'arrayContentWillChange', 'clear', 'compact', 'every', 'filter', 'filterBy', 'find', 'findBy', 'getEach', 'includes', 'indexOf', 'insertAt', 'invoke', 'isAny', 'isEvery', 'lastIndexOf', 'map', 'mapBy', 'objectAt', 'objectsAt', 'popObject', 'pushObject', 'pushObjects', 'reduce', 'reject', 'rejectBy', 'removeArrayObserver', 'removeAt', 'removeObject', 'removeObjects', 'replace', 'reverseObjects', 'setEach', 'setObjects', 'shiftObject', 'slice', 'sortBy', 'toArray', 'uniq', 'uniqBy', 'unshiftObject', 'unshiftObjects', 'without'];\nInheritedProxyMethods.forEach(method => {\n PromiseManyArray.prototype[method] = function proxiedMethod(...args) {\n assert(`Cannot call ${method} before content is assigned.`, this.content);\n return this.content[method](...args);\n };\n});","var _class, _descriptor, _identifier, _token, _relatedToken;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError(\"attempted to use private field on non-instance\"); return e; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(e) { return \"__private_\" + id++ + \"_\" + e; }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { dependentKeyCompat } from '@ember/object/compat';\nimport { tracked } from '@glimmer/tracking';\nimport { cached } from \"ember-cached-decorator-polyfill\";\nimport { resolve } from 'rsvp';\nimport { recordIdentifierFor } from '@ember-data/store/-private';\nimport { LEGACY_SUPPORT } from '../model';\n\n/**\n @module @ember-data/model\n*/\n\nfunction isResourceIdentiferWithRelatedLinks(value) {\n return Boolean(value && value.links && value.links.related);\n}\n\n/**\n A `BelongsToReference` is a low-level API that allows users and\n addon authors to perform meta-operations on a belongs-to\n relationship.\n\n @class BelongsToReference\n @public\n */\nlet BelongsToReference = (_class = (_identifier = /*#__PURE__*/_classPrivateFieldLooseKey(\"identifier\"), _token = /*#__PURE__*/_classPrivateFieldLooseKey(\"token\"), _relatedToken = /*#__PURE__*/_classPrivateFieldLooseKey(\"relatedToken\"), class BelongsToReference {\n constructor(store, parentIdentifier, belongsToRelationship, key) {\n Object.defineProperty(this, _identifier, {\n writable: true,\n value: void 0\n });\n // unsubscribe tokens given to us by the notification manager\n Object.defineProperty(this, _token, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _relatedToken, {\n writable: true,\n value: null\n });\n _initializerDefineProperty(this, \"_ref\", _descriptor, this);\n this.key = key;\n this.belongsToRelationship = belongsToRelationship;\n this.type = belongsToRelationship.definition.type;\n this.store = store;\n _classPrivateFieldLooseBase(this, _identifier)[_identifier] = parentIdentifier;\n _classPrivateFieldLooseBase(this, _token)[_token] = store._notificationManager.subscribe(parentIdentifier, (_, bucket, notifiedKey) => {\n if ((bucket === 'relationships' || bucket === 'property') && notifiedKey === key) {\n this._ref++;\n }\n });\n\n // TODO inverse\n }\n destroy() {\n // TODO @feature we need the notification manager often enough\n // we should potentially just expose it fully public\n this.store._notificationManager.unsubscribe(_classPrivateFieldLooseBase(this, _token)[_token]);\n _classPrivateFieldLooseBase(this, _token)[_token] = null;\n if (_classPrivateFieldLooseBase(this, _relatedToken)[_relatedToken]) {\n this.store._notificationManager.unsubscribe(_classPrivateFieldLooseBase(this, _relatedToken)[_relatedToken]);\n _classPrivateFieldLooseBase(this, _relatedToken)[_relatedToken] = null;\n }\n }\n get _relatedIdentifier() {\n this._ref; // consume the tracked prop\n if (_classPrivateFieldLooseBase(this, _relatedToken)[_relatedToken]) {\n this.store._notificationManager.unsubscribe(_classPrivateFieldLooseBase(this, _relatedToken)[_relatedToken]);\n _classPrivateFieldLooseBase(this, _relatedToken)[_relatedToken] = null;\n }\n let resource = this._resource();\n if (resource && resource.data) {\n const identifier = this.store.identifierCache.getOrCreateRecordIdentifier(resource.data);\n _classPrivateFieldLooseBase(this, _relatedToken)[_relatedToken] = this.store._notificationManager.subscribe(identifier, (_, bucket, notifiedKey) => {\n if (bucket === 'identity' || (bucket === 'attributes' || bucket === 'property') && notifiedKey === 'id') {\n this._ref++;\n }\n });\n return identifier;\n }\n return null;\n }\n\n /**\n The `id` of the record that this reference refers to. Together, the\n `type()` and `id()` methods form a composite key for the identity\n map. This can be used to access the id of an async relationship\n without triggering a fetch that would normally happen if you\n attempted to use `record.get('relationship.id')`.\n Example\n ```javascript\n // models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default class BlogModel extends Model {\n @belongsTo({ async: true }) user;\n }\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n // get the identifier of the reference\n if (userRef.remoteType() === \"id\") {\n let id = userRef.id();\n }\n ```\n @method id\n @public\n @return {String} The id of the record in this belongsTo relationship.\n */\n id() {\n return this._relatedIdentifier?.id || null;\n }\n\n /**\n The link Ember Data will use to fetch or reload this belongs-to\n relationship. By default it uses only the \"related\" resource linkage.\n Example\n ```javascript\n // models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default Model.extend({\n user: belongsTo({ async: true })\n });\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n links: {\n related: '/articles/1/author'\n }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n // get the identifier of the reference\n if (userRef.remoteType() === \"link\") {\n let link = userRef.link();\n }\n ```\n @method link\n @public\n @return {String} The link Ember Data will use to fetch or reload this belongs-to relationship.\n */\n link() {\n let resource = this._resource();\n if (isResourceIdentiferWithRelatedLinks(resource)) {\n if (resource.links) {\n let related = resource.links.related;\n return !related || typeof related === 'string' ? related : related.href;\n }\n }\n return null;\n }\n\n /**\n * any links that have been received for this relationship\n *\n * @method links\n * @public\n * @returns\n */\n links() {\n let resource = this._resource();\n return resource && resource.links ? resource.links : null;\n }\n\n /**\n The meta data for the belongs-to relationship.\n Example\n ```javascript\n // models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default Model.extend({\n user: belongsTo({ async: true })\n });\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n links: {\n related: {\n href: '/articles/1/author'\n },\n },\n meta: {\n lastUpdated: 1458014400000\n }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n userRef.meta() // { lastUpdated: 1458014400000 }\n ```\n @method meta\n @public\n @return {Object} The meta information for the belongs-to relationship.\n */\n meta() {\n let meta = null;\n let resource = this._resource();\n if (resource && resource.meta && typeof resource.meta === 'object') {\n meta = resource.meta;\n }\n return meta;\n }\n _resource() {\n return this.store._instanceCache.recordDataFor(_classPrivateFieldLooseBase(this, _identifier)[_identifier], false).getBelongsTo(this.key);\n }\n\n /**\n This returns a string that represents how the reference will be\n looked up when it is loaded. If the relationship has a link it will\n use the \"link\" otherwise it defaults to \"id\".\n Example\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany({ async: true }) comments;\n }\n ```\n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n let commentsRef = post.hasMany('comments');\n // get the identifier of the reference\n if (commentsRef.remoteType() === \"ids\") {\n let ids = commentsRef.ids();\n } else if (commentsRef.remoteType() === \"link\") {\n let link = commentsRef.link();\n }\n ```\n @method remoteType\n @public\n @return {String} The name of the remote type. This should either be `link` or `id`\n */\n remoteType() {\n let value = this._resource();\n if (isResourceIdentiferWithRelatedLinks(value)) {\n return 'link';\n }\n return 'id';\n }\n\n /**\n `push` can be used to update the data in the relationship and Ember\n Data will treat the new data as the canonical value of this\n relationship on the backend.\n Example\n ```app/models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default class BlogModel extends Model {\n @belongsTo({ async: true }) user;\n }\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n // provide data for reference\n userRef.push({\n data: {\n type: 'user',\n id: 1,\n attributes: {\n username: \"@user\"\n }\n }\n }).then(function(user) {\n userRef.value() === user;\n });\n ```\n @method push\n @public\n @param {Object|Promise} objectOrPromise a promise that resolves to a JSONAPI document object describing the new value of this relationship.\n @return {Promise} A promise that resolves with the new value in this belongs-to relationship.\n */\n async push(data) {\n // TODO @deprecate pushing unresolved payloads\n const jsonApiDoc = await resolve(data);\n let record = this.store.push(jsonApiDoc);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\n const {\n graph,\n identifier\n } = this.belongsToRelationship;\n this.store._backburner.join(() => {\n graph.push({\n op: 'replaceRelatedRecord',\n record: identifier,\n field: this.key,\n value: recordIdentifierFor(record)\n });\n });\n return record;\n }\n\n /**\n `value()` synchronously returns the current value of the belongs-to\n relationship. Unlike `record.get('relationshipName')`, calling\n `value()` on a reference does not trigger a fetch if the async\n relationship is not yet loaded. If the relationship is not loaded\n it will always return `null`.\n Example\n ```javascript\n // models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default class BlogModel extends Model {\n @belongsTo({ async: true }) user;\n }\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n userRef.value(); // null\n // provide data for reference\n userRef.push({\n data: {\n type: 'user',\n id: 1,\n attributes: {\n username: \"@user\"\n }\n }\n }).then(function(user) {\n userRef.value(); // user\n });\n ```\n @method value\n @public\n @return {Model} the record in this relationship\n */\n value() {\n let resource = this._resource();\n return resource && resource.data ? this.store.peekRecord(resource.data) : null;\n }\n\n /**\n Loads a record in a belongs-to relationship if it is not already\n loaded. If the relationship is already loaded this method does not\n trigger a new load.\n Example\n ```javascript\n // models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default class BlogModel extends Model {\n @belongsTo({ async: true }) user;\n }\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n userRef.value(); // null\n userRef.load().then(function(user) {\n userRef.value() === user\n });\n ```\n You may also pass in an options object whose properties will be\n fed forward. This enables you to pass `adapterOptions` into the\n request given to the adapter via the reference.\n Example\n ```javascript\n userRef.load({ adapterOptions: { isPrivate: true } }).then(function(user) {\n userRef.value() === user;\n });\n ```\n ```app/adapters/user.js\n import Adapter from '@ember-data/adapter';\n export default class UserAdapter extends Adapter {\n findRecord(store, type, id, snapshot) {\n // In the adapter you will have access to adapterOptions.\n let adapterOptions = snapshot.adapterOptions;\n }\n });\n ```\n @method load\n @public\n @param {Object} options the options to pass in.\n @return {Promise} a promise that resolves with the record in this belongs-to relationship.\n */\n load(options) {\n const support = LEGACY_SUPPORT.getWithError(_classPrivateFieldLooseBase(this, _identifier)[_identifier]);\n return support.getBelongsTo(this.key, options);\n }\n\n /**\n Triggers a reload of the value in this relationship. If the\n remoteType is `\"link\"` Ember Data will use the relationship link to\n reload the relationship. Otherwise it will reload the record by its\n id.\n Example\n ```javascript\n // models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default class BlogModel extends Model {\n @belongsTo({ async: true }) user;\n }\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n userRef.reload().then(function(user) {\n userRef.value() === user\n });\n ```\n You may also pass in an options object whose properties will be\n fed forward. This enables you to pass `adapterOptions` into the\n request given to the adapter via the reference. A full example\n can be found in the `load` method.\n Example\n ```javascript\n userRef.reload({ adapterOptions: { isPrivate: true } })\n ```\n @method reload\n @public\n @param {Object} options the options to pass in.\n @return {Promise} a promise that resolves with the record in this belongs-to relationship after the reload has completed.\n */\n reload(options) {\n const support = LEGACY_SUPPORT.getWithError(_classPrivateFieldLooseBase(this, _identifier)[_identifier]);\n return support.reloadBelongsTo(this.key, options).then(() => this.value());\n }\n}), _descriptor = _applyDecoratedDescriptor(_class.prototype, \"_ref\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return 0;\n }\n}), _applyDecoratedDescriptor(_class.prototype, \"_relatedIdentifier\", [cached, dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"_relatedIdentifier\"), _class.prototype), _class);\nexport { BelongsToReference as default };","import { createCache, getValue } from '@glimmer/tracking/primitives/cache';\nimport { assert } from '@ember/debug';\n\nexport function cached(...args) {\n const [target, key, descriptor] = args;\n\n // Error on `@cached()`, `@cached(...args)`, and `@cached propName = value;`\n assert(\n 'You attempted to use @cached(), which is not necessary nor supported. Remove the parentheses and you will be good to go!',\n target !== undefined\n );\n assert(\n `You attempted to use @cached on with ${\n args.length > 1 ? 'arguments' : 'an argument'\n } ( @cached(${args\n .map(d => `'${d}'`)\n .join(\n ', '\n )}), which is not supported. Dependencies are automatically tracked, so you can just use ${'`@cached`'}`,\n typeof target === 'object' &&\n typeof key === 'string' &&\n typeof descriptor === 'object' &&\n args.length === 3\n );\n assert(\n `The @cached decorator must be applied to getters. '${key}' is not a getter.`,\n typeof descriptor.get == 'function'\n );\n\n const caches = new WeakMap();\n const getter = descriptor.get;\n descriptor.get = function () {\n if (!caches.has(this)) caches.set(this, createCache(getter.bind(this)));\n return getValue(caches.get(this));\n };\n}\n","var _class, _descriptor, _token, _identifier, _relatedTokenMap;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError(\"attempted to use private field on non-instance\"); return e; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(e) { return \"__private_\" + id++ + \"_\" + e; }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { dependentKeyCompat } from '@ember/object/compat';\nimport { DEBUG } from '@glimmer/env';\nimport { tracked } from '@glimmer/tracking';\nimport { cached } from \"ember-cached-decorator-polyfill\";\nimport { resolve } from 'rsvp';\nimport { recordIdentifierFor } from '@ember-data/store';\nimport { LEGACY_SUPPORT } from '../model';\n\n/**\n @module @ember-data/model\n*/\n\nfunction isResourceIdentiferWithRelatedLinks(value) {\n return Boolean(value && value.links && value.links.related);\n}\n/**\n A `HasManyReference` is a low-level API that allows users and addon\n authors to perform meta-operations on a has-many relationship.\n\n @class HasManyReference\n @public\n @extends Reference\n */\nlet HasManyReference = (_class = (_token = /*#__PURE__*/_classPrivateFieldLooseKey(\"token\"), _identifier = /*#__PURE__*/_classPrivateFieldLooseKey(\"identifier\"), _relatedTokenMap = /*#__PURE__*/_classPrivateFieldLooseKey(\"relatedTokenMap\"), class HasManyReference {\n constructor(store, parentIdentifier, hasManyRelationship, key) {\n // unsubscribe tokens given to us by the notification manager\n Object.defineProperty(this, _token, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _identifier, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _relatedTokenMap, {\n writable: true,\n value: void 0\n });\n _initializerDefineProperty(this, \"_ref\", _descriptor, this);\n this.key = key;\n this.hasManyRelationship = hasManyRelationship;\n this.type = hasManyRelationship.definition.type;\n this.store = store;\n _classPrivateFieldLooseBase(this, _identifier)[_identifier] = parentIdentifier;\n _classPrivateFieldLooseBase(this, _token)[_token] = store._notificationManager.subscribe(parentIdentifier, (_, bucket, notifiedKey) => {\n if ((bucket === 'relationships' || bucket === 'property') && notifiedKey === key) {\n this._ref++;\n }\n });\n _classPrivateFieldLooseBase(this, _relatedTokenMap)[_relatedTokenMap] = new Map();\n // TODO inverse\n }\n destroy() {\n this.store._notificationManager.unsubscribe(_classPrivateFieldLooseBase(this, _token)[_token]);\n _classPrivateFieldLooseBase(this, _relatedTokenMap)[_relatedTokenMap].forEach(token => {\n this.store._notificationManager.unsubscribe(token);\n });\n _classPrivateFieldLooseBase(this, _relatedTokenMap)[_relatedTokenMap].clear();\n }\n get _relatedIdentifiers() {\n this._ref; // consume the tracked prop\n\n let resource = this._resource();\n let map = _classPrivateFieldLooseBase(this, _relatedTokenMap)[_relatedTokenMap];\n _classPrivateFieldLooseBase(this, _relatedTokenMap)[_relatedTokenMap] = new Map();\n if (resource && resource.data) {\n return resource.data.map(resourceIdentifier => {\n const identifier = this.store.identifierCache.getOrCreateRecordIdentifier(resourceIdentifier);\n let token = map.get(identifier);\n if (token) {\n map.delete(identifier);\n } else {\n token = this.store._notificationManager.subscribe(identifier, (_, bucket, notifiedKey) => {\n if (bucket === 'identity' || bucket === 'attributes' && notifiedKey === 'id') {\n this._ref++;\n }\n });\n }\n _classPrivateFieldLooseBase(this, _relatedTokenMap)[_relatedTokenMap].set(identifier, token);\n return identifier;\n });\n }\n map.forEach(token => {\n this.store._notificationManager.unsubscribe(token);\n });\n map.clear();\n return [];\n }\n _resource() {\n return this.store._instanceCache.recordDataFor(_classPrivateFieldLooseBase(this, _identifier)[_identifier], false).getHasMany(this.key);\n }\n\n /**\n This returns a string that represents how the reference will be\n looked up when it is loaded. If the relationship has a link it will\n use the \"link\" otherwise it defaults to \"id\".\n Example\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany({ async: true }) comments;\n }\n ```\n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n let commentsRef = post.hasMany('comments');\n // get the identifier of the reference\n if (commentsRef.remoteType() === \"ids\") {\n let ids = commentsRef.ids();\n } else if (commentsRef.remoteType() === \"link\") {\n let link = commentsRef.link();\n }\n ```\n @method remoteType\n @public\n @return {String} The name of the remote type. This should either be `link` or `ids`\n */\n remoteType() {\n let value = this._resource();\n if (value && value.links && value.links.related) {\n return 'link';\n }\n return 'ids';\n }\n\n /**\n `ids()` returns an array of the record IDs in this relationship.\n Example\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany({ async: true }) comments;\n }\n ```\n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n let commentsRef = post.hasMany('comments');\n commentsRef.ids(); // ['1']\n ```\n @method ids\n @public\n @return {Array} The ids in this has-many relationship\n */\n ids() {\n return this._relatedIdentifiers.map(identifier => identifier.id);\n }\n\n /**\n The link Ember Data will use to fetch or reload this belongs-to\n relationship. By default it uses only the \"related\" resource linkage.\n Example\n ```javascript\n // models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default Model.extend({\n user: belongsTo({ async: true })\n });\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n links: {\n related: '/articles/1/author'\n }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n // get the identifier of the reference\n if (userRef.remoteType() === \"link\") {\n let link = userRef.link();\n }\n ```\n @method link\n @public\n @return {String} The link Ember Data will use to fetch or reload this belongs-to relationship.\n */\n link() {\n let resource = this._resource();\n if (isResourceIdentiferWithRelatedLinks(resource)) {\n if (resource.links) {\n let related = resource.links.related;\n return !related || typeof related === 'string' ? related : related.href;\n }\n }\n return null;\n }\n\n /**\n * any links that have been received for this relationship\n *\n * @method links\n * @public\n * @returns\n */\n links() {\n let resource = this._resource();\n return resource && resource.links ? resource.links : null;\n }\n\n /**\n The meta data for the has-many relationship.\n Example\n ```javascript\n // models/blog.js\n import Model, { hasMany } from '@ember-data/model';\n export default Model.extend({\n users: hasMany({ async: true })\n });\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n users: {\n links: {\n related: {\n href: '/articles/1/authors'\n },\n },\n meta: {\n lastUpdated: 1458014400000\n }\n }\n }\n }\n });\n let usersRef = blog.hasMany('user');\n usersRef.meta() // { lastUpdated: 1458014400000 }\n ```\n @method meta\n @public\n @return {Object} The meta information for the belongs-to relationship.\n */\n meta() {\n let meta = null;\n let resource = this._resource();\n if (resource && resource.meta && typeof resource.meta === 'object') {\n meta = resource.meta;\n }\n return meta;\n }\n\n /**\n `push` can be used to update the data in the relationship and Ember\n Data will treat the new data as the canonical value of this\n relationship on the backend.\n Example\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany({ async: true }) comments;\n }\n ```\n ```\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n let commentsRef = post.hasMany('comments');\n commentsRef.ids(); // ['1']\n commentsRef.push([\n [{ type: 'comment', id: 2 }],\n [{ type: 'comment', id: 3 }],\n ])\n commentsRef.ids(); // ['2', '3']\n ```\n @method push\n @public\n @param {Array|Promise} objectOrPromise a promise that resolves to a JSONAPI document object describing the new value of this relationship.\n @return {ManyArray}\n */\n async push(objectOrPromise) {\n const payload = await resolve(objectOrPromise);\n let array;\n if (!Array.isArray(payload) && typeof payload === 'object' && Array.isArray(payload.data)) {\n array = payload.data;\n } else {\n array = payload;\n }\n const {\n store\n } = this;\n let identifiers = array.map(obj => {\n let record;\n if ('data' in obj) {\n // TODO deprecate pushing non-valid JSON:API here\n record = store.push(obj);\n } else {\n record = store.push({\n data: obj\n });\n }\n if (DEBUG) {\n let relationshipMeta = this.hasManyRelationship.definition;\n let identifier = this.hasManyRelationship.identifier;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n }\n return recordIdentifierFor(record);\n });\n const {\n graph,\n identifier\n } = this.hasManyRelationship;\n store._backburner.join(() => {\n graph.push({\n op: 'replaceRelatedRecords',\n record: identifier,\n field: this.key,\n value: identifiers\n });\n });\n return this.load();\n }\n _isLoaded() {\n let hasRelationshipDataProperty = this.hasManyRelationship.state.hasReceivedData;\n if (!hasRelationshipDataProperty) {\n return false;\n }\n let members = this.hasManyRelationship.currentState;\n\n //TODO @runspired determine isLoaded via a better means\n return members.every(identifier => {\n let internalModel = this.store._instanceCache._internalModelForResource(identifier);\n return internalModel.isLoaded === true;\n });\n }\n\n /**\n `value()` synchronously returns the current value of the has-many\n relationship. Unlike `record.get('relationshipName')`, calling\n `value()` on a reference does not trigger a fetch if the async\n relationship is not yet loaded. If the relationship is not loaded\n it will always return `null`.\n Example\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany({ async: true }) comments;\n }\n ```\n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n let commentsRef = post.hasMany('comments');\n post.get('comments').then(function(comments) {\n commentsRef.value() === comments\n })\n ```\n @method value\n @public\n @return {ManyArray}\n */\n value() {\n const support = LEGACY_SUPPORT.getWithError(_classPrivateFieldLooseBase(this, _identifier)[_identifier]);\n return this._isLoaded() ? support.getManyArray(this.key) : null;\n }\n\n /**\n Loads the relationship if it is not already loaded. If the\n relationship is already loaded this method does not trigger a new\n load. This causes a request to the specified\n relationship link or reloads all items currently in the relationship.\n Example\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany({ async: true }) comments;\n }\n ```\n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n let commentsRef = post.hasMany('comments');\n commentsRef.load().then(function(comments) {\n //...\n });\n ```\n You may also pass in an options object whose properties will be\n fed forward. This enables you to pass `adapterOptions` into the\n request given to the adapter via the reference.\n Example\n ```javascript\n commentsRef.load({ adapterOptions: { isPrivate: true } })\n .then(function(comments) {\n //...\n });\n ```\n ```app/adapters/comment.js\n export default ApplicationAdapter.extend({\n findMany(store, type, id, snapshots) {\n // In the adapter you will have access to adapterOptions.\n let adapterOptions = snapshots[0].adapterOptions;\n }\n });\n ```\n @method load\n @public\n @param {Object} options the options to pass in.\n @return {Promise} a promise that resolves with the ManyArray in\n this has-many relationship.\n */\n async load(options) {\n const support = LEGACY_SUPPORT.getWithError(_classPrivateFieldLooseBase(this, _identifier)[_identifier]);\n return support.getHasMany(this.key, options); // this cast is necessary because typescript does not work properly with custom thenables;\n }\n\n /**\n Reloads this has-many relationship. This causes a request to the specified\n relationship link or reloads all items currently in the relationship.\n Example\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany({ async: true }) comments;\n }\n ```\n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n let commentsRef = post.hasMany('comments');\n commentsRef.reload().then(function(comments) {\n //...\n });\n ```\n You may also pass in an options object whose properties will be\n fed forward. This enables you to pass `adapterOptions` into the\n request given to the adapter via the reference. A full example\n can be found in the `load` method.\n Example\n ```javascript\n commentsRef.reload({ adapterOptions: { isPrivate: true } })\n ```\n @method reload\n @public\n @param {Object} options the options to pass in.\n @return {Promise} a promise that resolves with the ManyArray in this has-many relationship.\n */\n reload(options) {\n const support = LEGACY_SUPPORT.getWithError(_classPrivateFieldLooseBase(this, _identifier)[_identifier]);\n return support.reloadHasMany(this.key, options);\n }\n}), _descriptor = _applyDecoratedDescriptor(_class.prototype, \"_ref\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return 0;\n }\n}), _applyDecoratedDescriptor(_class.prototype, \"_relatedIdentifiers\", [cached, dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"_relatedIdentifiers\"), _class.prototype), _class);\nexport { HasManyReference as default };","import { A, default as EmberArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport { importSync } from '@embroider/macros';\nimport { all, resolve } from 'rsvp';\nimport { recordDataFor, recordIdentifierFor, storeFor } from '@ember-data/store/-private';\nimport { _findBelongsTo, _findHasMany } from './legacy-data-fetch';\nimport { assertIdentifierHasId } from './legacy-data-utils';\nimport ManyArray from './many-array';\nimport PromiseBelongsTo from './promise-belongs-to';\nimport PromiseManyArray from './promise-many-array';\nimport BelongsToReference from './references/belongs-to';\nimport HasManyReference from './references/has-many';\nexport class LegacySupport {\n constructor(record) {\n this.record = record;\n this.store = storeFor(record);\n this.identifier = recordIdentifierFor(record);\n this.recordData = this.store._instanceCache.getRecordData(this.identifier);\n this._manyArrayCache = Object.create(null);\n this._relationshipPromisesCache = Object.create(null);\n this._relationshipProxyCache = Object.create(null);\n this.references = Object.create(null);\n }\n _findBelongsTo(key, resource, relationshipMeta, options) {\n // TODO @runspired follow up if parent isNew then we should not be attempting load here\n // TODO @runspired follow up on whether this should be in the relationship requests cache\n return this._findBelongsToByJsonApiResource(resource, this.identifier, relationshipMeta, options).then(identifier => handleCompletedRelationshipRequest(this, key, resource._relationship, identifier), e => handleCompletedRelationshipRequest(this, key, resource._relationship, null, e));\n }\n reloadBelongsTo(key, options) {\n let loadingPromise = this._relationshipPromisesCache[key];\n if (loadingPromise) {\n return loadingPromise;\n }\n let resource = this.recordData.getBelongsTo(key);\n // TODO move this to a public api\n if (resource._relationship) {\n resource._relationship.state.hasFailedLoadAttempt = false;\n resource._relationship.state.shouldForceReload = true;\n }\n let relationshipMeta = this.store.getSchemaDefinitionService().relationshipsDefinitionFor(this.identifier)[key];\n assert(`Attempted to reload a belongsTo relationship but no definition exists for it`, relationshipMeta);\n let promise = this._findBelongsTo(key, resource, relationshipMeta, options);\n if (this._relationshipProxyCache[key]) {\n return this._updatePromiseProxyFor('belongsTo', key, {\n promise\n });\n }\n return promise;\n }\n getBelongsTo(key, options) {\n const {\n identifier,\n recordData\n } = this;\n let resource = recordData.getBelongsTo(key);\n let relatedIdentifier = resource && resource.data ? this.store.identifierCache.getOrCreateRecordIdentifier(resource.data) : null;\n let relationshipMeta = this.store.getSchemaDefinitionService().relationshipsDefinitionFor(identifier)[key];\n assert(`Attempted to access a belongsTo relationship but no definition exists for it`, relationshipMeta);\n let store = this.store;\n let async = relationshipMeta.options.async;\n let isAsync = typeof async === 'undefined' ? true : async;\n let _belongsToState = {\n key,\n store,\n legacySupport: this,\n modelName: relationshipMeta.type\n };\n if (isAsync) {\n if (resource._relationship.state.hasFailedLoadAttempt) {\n return this._relationshipProxyCache[key];\n }\n let promise = this._findBelongsTo(key, resource, relationshipMeta, options);\n return this._updatePromiseProxyFor('belongsTo', key, {\n promise,\n content: relatedIdentifier ? store._instanceCache.getRecord(relatedIdentifier) : null,\n _belongsToState\n });\n } else {\n if (relatedIdentifier === null) {\n return null;\n } else {\n let toReturn = store._instanceCache.getRecord(relatedIdentifier);\n assert(`You looked up the '${key}' relationship on a '${identifier.type}' with id ${identifier.id || 'null'} but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (\\`belongsTo({ async: true })\\`)`, toReturn === null || !store._instanceCache.getInternalModel(relatedIdentifier).isEmpty);\n return toReturn;\n }\n }\n }\n setDirtyBelongsTo(key, value) {\n return this.recordData.setDirtyBelongsTo(key, extractRecordDataFromRecord(value));\n }\n getManyArray(key, definition) {\n assert('hasMany only works with the @ember-data/record-data package', true /* HAS_RECORD_DATA_PACKAGE */);\n let manyArray = this._manyArrayCache[key];\n if (!definition) {\n const graphFor = importSync('@ember-data/record-data/-private').graphFor;\n definition = graphFor(this.store).get(this.identifier, key).definition;\n }\n if (!manyArray) {\n manyArray = ManyArray.create({\n store: this.store,\n type: this.store.modelFor(definition.type),\n recordData: this.recordData,\n key,\n isPolymorphic: definition.isPolymorphic,\n isAsync: definition.isAsync,\n _inverseIsAsync: definition.inverseIsAsync,\n legacySupport: this,\n isLoaded: !definition.isAsync\n });\n this._manyArrayCache[key] = manyArray;\n }\n return manyArray;\n }\n fetchAsyncHasMany(key, relationship, manyArray, options) {\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n let loadingPromise = this._relationshipPromisesCache[key];\n if (loadingPromise) {\n return loadingPromise;\n }\n const jsonApi = this.recordData.getHasMany(key);\n loadingPromise = this._findHasManyByJsonApiResource(jsonApi, this.identifier, relationship, options).then(() => handleCompletedRelationshipRequest(this, key, relationship, manyArray), e => handleCompletedRelationshipRequest(this, key, relationship, manyArray, e));\n this._relationshipPromisesCache[key] = loadingPromise;\n return loadingPromise;\n }\n assert('hasMany only works with the @ember-data/record-data package');\n }\n reloadHasMany(key, options) {\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n let loadingPromise = this._relationshipPromisesCache[key];\n if (loadingPromise) {\n return loadingPromise;\n }\n const graphFor = importSync('@ember-data/record-data/-private').graphFor;\n const relationship = graphFor(this.store).get(this.identifier, key);\n const {\n definition,\n state\n } = relationship;\n state.hasFailedLoadAttempt = false;\n state.shouldForceReload = true;\n let manyArray = this.getManyArray(key, definition);\n let promise = this.fetchAsyncHasMany(key, relationship, manyArray, options);\n if (this._relationshipProxyCache[key]) {\n return this._updatePromiseProxyFor('hasMany', key, {\n promise\n });\n }\n return promise;\n }\n assert(`hasMany only works with the @ember-data/record-data package`);\n }\n getHasMany(key, options) {\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n const graphFor = importSync('@ember-data/record-data/-private').graphFor;\n const relationship = graphFor(this.store).get(this.identifier, key);\n const {\n definition,\n state\n } = relationship;\n let manyArray = this.getManyArray(key, definition);\n if (definition.isAsync) {\n if (state.hasFailedLoadAttempt) {\n return this._relationshipProxyCache[key];\n }\n let promise = this.fetchAsyncHasMany(key, relationship, manyArray, options);\n return this._updatePromiseProxyFor('hasMany', key, {\n promise,\n content: manyArray\n });\n } else {\n assert(`You looked up the '${key}' relationship on a '${this.identifier.type}' with id ${this.identifier.id || 'null'} but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async ('hasMany({ async: true })')`, !anyUnloaded(this.store, relationship));\n return manyArray;\n }\n }\n assert(`hasMany only works with the @ember-data/record-data package`);\n }\n setDirtyHasMany(key, records) {\n assertRecordsPassedToHasMany(records);\n return this.recordData.setDirtyHasMany(key, extractRecordDatasFromRecords(records));\n }\n _updatePromiseProxyFor(kind, key, args) {\n let promiseProxy = this._relationshipProxyCache[key];\n if (kind === 'hasMany') {\n const {\n promise,\n content\n } = args;\n if (promiseProxy) {\n assert(`Expected a PromiseManyArray`, '_update' in promiseProxy);\n promiseProxy._update(promise, content);\n } else {\n promiseProxy = this._relationshipProxyCache[key] = new PromiseManyArray(promise, content);\n }\n return promiseProxy;\n }\n if (promiseProxy) {\n const {\n promise,\n content\n } = args;\n assert(`Expected a PromiseBelongsTo`, '_belongsToState' in promiseProxy);\n if (content !== undefined) {\n promiseProxy.set('content', content);\n }\n void promiseProxy.set('promise', promise);\n } else {\n promiseProxy = PromiseBelongsTo.create(args);\n this._relationshipProxyCache[key] = promiseProxy;\n }\n return promiseProxy;\n }\n referenceFor(kind, name) {\n let reference = this.references[name];\n if (!reference) {\n if (!true /* HAS_RECORD_DATA_PACKAGE */) {\n // TODO @runspired while this feels odd, it is not a regression in capability because we do\n // not today support references pulling from RecordDatas other than our own\n // because of the intimate API access involved. This is something we will need to redesign.\n assert(`snapshot.belongsTo only supported for @ember-data/record-data`);\n }\n const graphFor = importSync('@ember-data/record-data/-private').graphFor;\n const relationship = graphFor(this.store).get(this.identifier, name);\n if (DEBUG && kind) {\n let modelName = this.identifier.type;\n let actualRelationshipKind = relationship.definition.kind;\n assert(`You tried to get the '${name}' relationship on a '${modelName}' via record.${kind}('${name}'), but the relationship is of kind '${actualRelationshipKind}'. Use record.${actualRelationshipKind}('${name}') instead.`, actualRelationshipKind === kind);\n }\n let relationshipKind = relationship.definition.kind;\n if (relationshipKind === 'belongsTo') {\n reference = new BelongsToReference(this.store, this.identifier, relationship, name);\n } else if (relationshipKind === 'hasMany') {\n reference = new HasManyReference(this.store, this.identifier, relationship, name);\n }\n this.references[name] = reference;\n }\n return reference;\n }\n _findHasManyByJsonApiResource(resource, parentIdentifier, relationship, options = {}) {\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n if (!resource) {\n return resolve();\n }\n const {\n definition,\n state\n } = relationship;\n let adapter = this.store.adapterFor(definition.type);\n let {\n isStale,\n hasDematerializedInverse,\n hasReceivedData,\n isEmpty,\n shouldForceReload\n } = state;\n const allInverseRecordsAreLoaded = areAllInverseRecordsLoaded(this.store, resource);\n let shouldFindViaLink = resource.links && resource.links.related && (typeof adapter.findHasMany === 'function' || typeof resource.data === 'undefined') && (shouldForceReload || hasDematerializedInverse || isStale || !allInverseRecordsAreLoaded && !isEmpty);\n\n // fetch via link\n if (shouldFindViaLink) {\n // findHasMany, although not public, does not need to care about our upgrade relationship definitions\n // and can stick with the public definition API for now.\n const relationshipMeta = this.store._instanceCache._storeWrapper.relationshipsDefinitionFor(definition.inverseType)[definition.key];\n let adapter = this.store.adapterFor(parentIdentifier.type);\n\n /*\n If a relationship was originally populated by the adapter as a link\n (as opposed to a list of IDs), this method is called when the\n relationship is fetched.\n The link (which is usually a URL) is passed through unchanged, so the\n adapter can make whatever request it wants.\n The usual use-case is for the server to register a URL as a link, and\n then use that URL in the future to make a request for the relationship.\n */\n assert(`You tried to load a hasMany relationship but you have no adapter (for ${parentIdentifier.type})`, adapter);\n assert(`You tried to load a hasMany relationship from a specified 'link' in the original payload but your adapter does not implement 'findHasMany'`, typeof adapter.findHasMany === 'function');\n return _findHasMany(adapter, this.store, parentIdentifier, resource.links.related, relationshipMeta, options);\n }\n let preferLocalCache = hasReceivedData && !isEmpty;\n let hasLocalPartialData = hasDematerializedInverse || isEmpty && Array.isArray(resource.data) && resource.data.length > 0;\n\n // fetch using data, pulling from local cache if possible\n if (!shouldForceReload && !isStale && (preferLocalCache || hasLocalPartialData)) {\n let finds = new Array(resource.data.length);\n for (let i = 0; i < resource.data.length; i++) {\n let identifier = this.store.identifierCache.getOrCreateRecordIdentifier(resource.data[i]);\n finds[i] = this.store._instanceCache._fetchDataIfNeededForIdentifier(identifier, options);\n }\n return all(finds);\n }\n let hasData = hasReceivedData && !isEmpty;\n\n // fetch by data\n if (hasData || hasLocalPartialData) {\n let identifiers = resource.data.map(json => this.store.identifierCache.getOrCreateRecordIdentifier(json));\n let fetches = new Array(identifiers.length);\n const manager = this.store._fetchManager;\n for (let i = 0; i < identifiers.length; i++) {\n let identifier = identifiers[i];\n assertIdentifierHasId(identifier);\n fetches[i] = manager.scheduleFetch(identifier, options);\n }\n return all(fetches);\n }\n\n // we were explicitly told we have no data and no links.\n // TODO if the relationshipIsStale, should we hit the adapter anyway?\n return resolve();\n }\n assert(`hasMany only works with the @ember-data/record-data package`);\n }\n _findBelongsToByJsonApiResource(resource, parentIdentifier, relationshipMeta, options = {}) {\n if (!resource) {\n return resolve(null);\n }\n const internalModel = resource.data ? this.store._instanceCache._internalModelForResource(resource.data) : null;\n let {\n isStale,\n hasDematerializedInverse,\n hasReceivedData,\n isEmpty,\n shouldForceReload\n } = resource._relationship.state;\n const allInverseRecordsAreLoaded = areAllInverseRecordsLoaded(this.store, resource);\n let shouldFindViaLink = resource.links && resource.links.related && (shouldForceReload || hasDematerializedInverse || isStale || !allInverseRecordsAreLoaded && !isEmpty);\n if (internalModel) {\n // short circuit if we are already loading\n let pendingRequest = this.store._fetchManager.getPendingFetch(internalModel.identifier, options);\n if (pendingRequest) {\n return pendingRequest;\n }\n }\n\n // fetch via link\n if (shouldFindViaLink) {\n return _findBelongsTo(this.store, parentIdentifier, resource.links.related, relationshipMeta, options);\n }\n let preferLocalCache = hasReceivedData && allInverseRecordsAreLoaded && !isEmpty;\n let hasLocalPartialData = hasDematerializedInverse || isEmpty && resource.data;\n // null is explicit empty, undefined is \"we don't know anything\"\n let localDataIsEmpty = resource.data === undefined || resource.data === null;\n\n // fetch using data, pulling from local cache if possible\n if (!shouldForceReload && !isStale && (preferLocalCache || hasLocalPartialData)) {\n /*\n We have canonical data, but our local state is empty\n */\n if (localDataIsEmpty) {\n return resolve(null);\n }\n if (!internalModel) {\n assert(`No InternalModel found for ${resource.lid}`, internalModel);\n }\n return this.store._instanceCache._fetchDataIfNeededForIdentifier(internalModel.identifier, options);\n }\n let resourceIsLocal = !localDataIsEmpty && resource.data.id === null;\n if (internalModel && resourceIsLocal) {\n return resolve(internalModel.identifier);\n }\n\n // fetch by data\n if (internalModel && !localDataIsEmpty) {\n let identifier = internalModel.identifier;\n assertIdentifierHasId(identifier);\n return this.store._fetchManager.scheduleFetch(identifier, options);\n }\n\n // we were explicitly told we have no data and no links.\n // TODO if the relationshipIsStale, should we hit the adapter anyway?\n return resolve(null);\n }\n destroy() {\n assert('Cannot destroy an internalModel while its record is materialized', !this.record || this.record.isDestroyed || this.record.isDestroying);\n this.isDestroying = true;\n const cache = this._manyArrayCache;\n Object.keys(cache).forEach(key => {\n cache[key].destroy();\n delete cache[key];\n });\n const keys = Object.keys(this._relationshipProxyCache);\n keys.forEach(key => {\n const proxy = this._relationshipProxyCache[key];\n if (proxy.destroy) {\n proxy.destroy();\n }\n delete this._relationshipProxyCache[key];\n });\n if (this.references) {\n const refs = this.references;\n Object.keys(refs).forEach(key => {\n refs[key].destroy();\n delete refs[key];\n });\n }\n this.isDestroyed = true;\n }\n}\nfunction handleCompletedRelationshipRequest(recordExt, key, relationship, value, error) {\n delete recordExt._relationshipPromisesCache[key];\n relationship.state.shouldForceReload = false;\n const isHasMany = relationship.definition.kind === 'hasMany';\n if (isHasMany) {\n // we don't notify the record property here to avoid refetch\n // only the many array\n value.notify();\n }\n if (error) {\n relationship.state.hasFailedLoadAttempt = true;\n let proxy = recordExt._relationshipProxyCache[key];\n // belongsTo relationships are sometimes unloaded\n // when a load fails, in this case we need\n // to make sure that we aren't proxying\n // to destroyed content\n // for the sync belongsTo reload case there will be no proxy\n // for the async reload case there will be no proxy if the ui\n // has never been accessed\n if (proxy && !isHasMany) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (proxy.content && proxy.content.isDestroying) {\n proxy.set('content', null);\n }\n }\n throw error;\n }\n if (isHasMany) {\n value.set('isLoaded', true);\n }\n relationship.state.hasFailedLoadAttempt = false;\n // only set to not stale if no error is thrown\n relationship.state.isStale = false;\n return isHasMany || !value ? value : recordExt.store.peekRecord(value);\n}\nfunction assertRecordsPassedToHasMany(records) {\n assert(`You must pass an array of records to set a hasMany relationship`, Array.isArray(records) || EmberArray.detect(records));\n assert(`All elements of a hasMany relationship must be instances of Model, you passed ${records.map(r => `${typeof r}`).join(', ')}`, function () {\n return A(records).every(record => Object.prototype.hasOwnProperty.call(record, '_internalModel') === true);\n }());\n}\nfunction extractRecordDatasFromRecords(records) {\n return records.map(extractRecordDataFromRecord);\n}\nfunction extractRecordDataFromRecord(recordOrPromiseRecord) {\n if (!recordOrPromiseRecord) {\n return null;\n }\n if (isPromiseRecord(recordOrPromiseRecord)) {\n let content = recordOrPromiseRecord.get && recordOrPromiseRecord.get('content');\n assert('You passed in a promise that did not originate from an EmberData relationship. You can only pass promises that come from a belongsTo or hasMany relationship to the get call.', content !== undefined);\n return content ? recordDataFor(content) : null;\n }\n return recordDataFor(recordOrPromiseRecord);\n}\nfunction isPromiseRecord(record) {\n return !!record.then;\n}\nfunction anyUnloaded(store, relationship) {\n let state = relationship.currentState;\n const unloaded = state.find(s => {\n let im = store._instanceCache.getInternalModel(s);\n return im._isDematerializing || !im.isLoaded;\n });\n return unloaded || false;\n}\n\n/**\n * Flag indicating whether all inverse records are available\n *\n * true if the inverse exists and is loaded (not empty)\n * true if there is no inverse\n * false if the inverse exists and is not loaded (empty)\n *\n * @internal\n * @return {boolean}\n */\nfunction areAllInverseRecordsLoaded(store, resource) {\n const cache = store.identifierCache;\n if (Array.isArray(resource.data)) {\n // treat as collection\n // check for unloaded records\n let hasEmptyRecords = resource.data.reduce((hasEmptyModel, resourceIdentifier) => {\n return hasEmptyModel || internalModelForRelatedResource(store, cache, resourceIdentifier).isEmpty;\n }, false);\n return !hasEmptyRecords;\n } else {\n // treat as single resource\n if (!resource.data) {\n return true;\n } else {\n const internalModel = internalModelForRelatedResource(store, cache, resource.data);\n return !internalModel.isEmpty;\n }\n }\n}\nfunction internalModelForRelatedResource(store, cache, resource) {\n const identifier = cache.getOrCreateRecordIdentifier(resource);\n return store._instanceCache._internalModelForResource(identifier);\n}","var _class, _descriptor, _class2, _descriptor2;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { assert } from '@ember/debug';\nimport { dependentKeyCompat } from '@ember/object/compat';\nimport { DEBUG } from '@glimmer/env';\nimport { tracked } from '@glimmer/tracking';\nimport { cached } from \"ember-cached-decorator-polyfill\";\nimport { storeFor } from '@ember-data/store';\nimport { errorsArrayToHash, recordIdentifierFor } from '@ember-data/store/-private';\nfunction isInvalidError(error) {\n return error && error.isAdapterError === true && error.code === 'InvalidError';\n}\n\n/**\n * Tag provides a cache for a getter\n * that recomputes only when a specific\n * tracked property that it manages is dirtied.\n *\n * This allows us to bust the cache for a value\n * that otherwise doesn't access anything tracked\n * as well as control the timing of that notification.\n *\n * @internal\n */\nlet Tag = (_class = class Tag {\n constructor() {\n _initializerDefineProperty(this, \"_tracking\", _descriptor, this);\n this.rev = 1;\n this.isDirty = true;\n this.value = undefined;\n }\n subscribe() {\n this._tracking;\n }\n notify() {\n this.isDirty = true;\n this._tracking = this.rev;\n this.rev++;\n }\n consume(v) {\n this.isDirty = false;\n this.value = v; // set cached value\n }\n}, _descriptor = _applyDecoratedDescriptor(_class.prototype, \"_tracking\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return 0;\n }\n}), _class);\nconst Tags = new WeakMap();\nfunction getTag(record, key) {\n let tags = Tags.get(record);\n if (!tags) {\n tags = Object.create(null);\n Tags.set(record, tags);\n }\n return tags[key] = tags[key] || new Tag();\n}\nexport function peekTag(record, key) {\n let tags = Tags.get(record);\n return tags && tags[key];\n}\n\n/**\n * A decorattor that caches a getter while\n * providing the ability to bust that cache\n * when we so choose in a way that notifies\n * glimmer's tracking system.\n *\n * @internal\n */\nexport function tagged(_target, key, desc) {\n const getter = desc.get;\n const setter = desc.set;\n desc.get = function () {\n let tag = getTag(this, key);\n tag.subscribe();\n if (tag.isDirty) {\n tag.consume(getter.call(this));\n }\n return tag.value;\n };\n desc.set = function (v) {\n getTag(this, key); // ensure tag is setup in case we want to use it.\n // probably notify here but not yet.\n setter.call(this, v);\n };\n dependentKeyCompat(desc);\n return desc;\n}\n\n/**\nHistorically InternalModel managed a state machine\nthe currentState for which was reflected onto Model.\n\nThis implements the flags and stateName for backwards compat\nwith the state tree that used to be possible (listed below).\n\nstateName and dirtyType are candidates for deprecation.\n\nroot\n empty\n deleted // hidden from stateName\n preloaded // hidden from stateName\n\n loading\n empty // hidden from stateName\n preloaded // hidden from stateName\n\n loaded\n saved\n updated\n uncommitted\n invalid\n inFlight\n created\n uncommitted\n invalid\n inFlight\n\n deleted\n saved\n new // hidden from stateName\n uncommitted\n invalid\n inFlight\n\n @internal\n*/\nlet RecordState = (_class2 = class RecordState {\n constructor(record) {\n _initializerDefineProperty(this, \"isSaving\", _descriptor2, this);\n const store = storeFor(record);\n const identity = recordIdentifierFor(record);\n this.identifier = identity;\n this.record = record;\n this.recordData = store._instanceCache.getRecordData(identity);\n this.pendingCount = 0;\n this.fulfilledCount = 0;\n this.rejectedCount = 0;\n this._errorRequests = [];\n this._lastError = null;\n let requests = store.getRequestStateService();\n let notifications = store._notificationManager;\n const handleRequest = req => {\n if (req.type === 'mutation') {\n switch (req.state) {\n case 'pending':\n this.isSaving = true;\n break;\n case 'rejected':\n this.isSaving = false;\n this._lastError = req;\n if (!(req.response && isInvalidError(req.response.data))) {\n this._errorRequests.push(req);\n }\n notifyErrorsStateChanged(this);\n break;\n case 'fulfilled':\n this._errorRequests = [];\n this._lastError = null;\n this.isSaving = false;\n notifyErrorsStateChanged(this);\n break;\n }\n } else {\n switch (req.state) {\n case 'pending':\n this.pendingCount++;\n this.notify('isLoading');\n break;\n case 'rejected':\n this.pendingCount--;\n this._lastError = req;\n if (!(req.response && isInvalidError(req.response.data))) {\n this._errorRequests.push(req);\n }\n this.notify('isLoading');\n notifyErrorsStateChanged(this);\n break;\n case 'fulfilled':\n this.pendingCount--;\n this.fulfilledCount++;\n this.notify('isLoading');\n this.notify('isDirty');\n notifyErrorsStateChanged(this);\n this._errorRequests = [];\n this._lastError = null;\n break;\n }\n }\n };\n requests.subscribeForRecord(identity, handleRequest);\n\n // we instantiate lazily\n // so we grab anything we don't have yet\n if (!DEBUG) {\n const lastRequest = requests.getLastRequestForRecord(identity);\n if (lastRequest) {\n handleRequest(lastRequest);\n }\n }\n notifications.subscribe(identity, (identifier, type, key) => {\n switch (type) {\n case 'state':\n this.notify('isNew');\n this.notify('isDeleted');\n this.notify('isDirty');\n break;\n case 'attributes':\n this.notify('isEmpty');\n this.notify('isDirty');\n break;\n case 'unload':\n this.notify('isNew');\n this.notify('isDeleted');\n break;\n case 'errors':\n // we only hit this if a foreign RecordData notifies\n // errors changed. Our own implementation does not\n // take this path currently, but we should probably\n // fix that.\n this.updateInvalidErrors();\n this.notify('isValid');\n break;\n }\n });\n }\n notify(key) {\n getTag(this, key).notify();\n }\n updateInvalidErrors() {\n let jsonApiErrors = this.recordData.getErrors(this.identifier);\n const {\n errors\n } = this.record;\n errors.clear();\n let newErrors = errorsArrayToHash(jsonApiErrors);\n let errorKeys = Object.keys(newErrors);\n for (let i = 0; i < errorKeys.length; i++) {\n errors.add(errorKeys[i], newErrors[errorKeys[i]]);\n }\n }\n cleanErrorRequests() {\n this.notify('isValid');\n this.notify('isError');\n this.notify('adapterError');\n this._errorRequests = [];\n this._lastError = null;\n }\n get isLoading() {\n return !this.isLoaded && this.pendingCount > 0 && this.fulfilledCount === 0;\n }\n\n // TODO @runspired handle \"unloadRecord\" see note in InternalModel\n get isLoaded() {\n if (this.isNew) {\n return true;\n }\n return this.fulfilledCount > 0 || !this.isEmpty;\n }\n get isSaved() {\n let rd = this.recordData;\n if (this.isDeleted) {\n assert(`Expected RecordData to implement isDeletionCommitted()`, rd.isDeletionCommitted);\n return rd.isDeletionCommitted();\n }\n if (this.isNew || this.isEmpty || !this.isValid || this.isDirty || this.isLoading) {\n return false;\n }\n return true;\n }\n get isEmpty() {\n let rd = this.recordData;\n // TODO this is not actually an RFC'd concept. Determine the\n // correct heuristic to replace this with.\n assert(`Expected RecordData to implement isEmpty()`, rd.isEmpty);\n return !this.isNew && rd.isEmpty();\n }\n get isNew() {\n let rd = this.recordData;\n assert(`Expected RecordData to implement isNew()`, rd.isNew);\n return rd.isNew();\n }\n get isDeleted() {\n let rd = this.recordData;\n assert(`Expected RecordData to implement isDeleted()`, rd.isDeleted);\n return rd.isDeleted();\n }\n get isValid() {\n return this.record.errors.length === 0;\n }\n get isDirty() {\n let rd = this.recordData;\n assert(`Expected RecordData to implement hasChangedAttributes()`, rd.hasChangedAttributes);\n assert(`Expected RecordData to implement isDeletionCommitted()`, rd.isDeletionCommitted);\n if (rd.isDeletionCommitted() || this.isDeleted && this.isNew) {\n return false;\n }\n return this.isNew || rd.hasChangedAttributes();\n }\n get isError() {\n let errorReq = this._errorRequests[this._errorRequests.length - 1];\n if (!errorReq) {\n return false;\n } else {\n return true;\n }\n }\n get adapterError() {\n let request = this._lastError;\n if (!request) {\n return null;\n }\n return request.state === 'rejected' && request.response.data;\n }\n get isPreloaded() {\n return !this.isEmpty && this.isLoading;\n }\n get stateName() {\n // we might be empty while loading so check this first\n if (this.isLoading) {\n return 'root.loading';\n\n // got nothing yet or were unloaded\n } else if (this.isEmpty) {\n return 'root.empty';\n\n // deleted substates\n } else if (this.isDeleted) {\n if (this.isSaving) {\n return 'root.deleted.inFlight';\n } else if (this.isSaved) {\n // TODO ensure isSaved isn't true from previous requests\n return 'root.deleted.saved';\n } else if (!this.isValid) {\n return 'root.deleted.invalid';\n } else {\n return 'root.deleted.uncommitted';\n }\n\n // loaded.created substates\n } else if (this.isNew) {\n if (this.isSaving) {\n return 'root.loaded.created.inFlight';\n } else if (!this.isValid) {\n return 'root.loaded.created.invalid';\n }\n return 'root.loaded.created.uncommitted';\n\n // loaded.updated substates\n } else if (this.isSaving) {\n return 'root.loaded.updated.inFlight';\n } else if (!this.isValid) {\n return 'root.loaded.updated.invalid';\n } else if (this.isDirty) {\n return 'root.loaded.updated.uncommitted';\n\n // if nothing remains, we are loaded saved!\n } else {\n return 'root.loaded.saved';\n }\n }\n get dirtyType() {\n // we might be empty while loading so check this first\n if (this.isLoading || this.isEmpty) {\n return '';\n\n // deleted substates\n } else if (this.isDeleted) {\n return 'deleted';\n\n // loaded.created substates\n } else if (this.isNew) {\n return 'created';\n\n // loaded.updated substates\n } else if (this.isSaving || !this.isValid || this.isDirty) {\n return 'updated';\n\n // if nothing remains, we are loaded saved!\n } else {\n return '';\n }\n }\n}, _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"isSaving\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return false;\n }\n}), _applyDecoratedDescriptor(_class2.prototype, \"isLoading\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isLoading\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isLoaded\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isLoaded\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isSaved\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isSaved\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isEmpty\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isEmpty\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isNew\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isNew\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isDeleted\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isDeleted\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isValid\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isValid\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isDirty\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isDirty\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isError\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"isError\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"adapterError\", [tagged], Object.getOwnPropertyDescriptor(_class2.prototype, \"adapterError\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"isPreloaded\", [cached], Object.getOwnPropertyDescriptor(_class2.prototype, \"isPreloaded\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"stateName\", [cached], Object.getOwnPropertyDescriptor(_class2.prototype, \"stateName\"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, \"dirtyType\", [cached], Object.getOwnPropertyDescriptor(_class2.prototype, \"dirtyType\"), _class2.prototype), _class2);\nexport { RecordState as default };\nfunction notifyErrorsStateChanged(state) {\n state.notify('isValid');\n state.notify('isError');\n state.notify('adapterError');\n}","import { cacheFor } from '@ember/object/internals';\nimport { LEGACY_SUPPORT } from './model';\nexport default function notifyChanges(identifier, value, key, record, store) {\n if (value === 'attributes') {\n if (key) {\n notifyAttribute(store, identifier, key, record);\n } else {\n record.eachAttribute(key => {\n notifyAttribute(store, identifier, key, record);\n });\n }\n } else if (value === 'relationships') {\n if (key) {\n let meta = record.constructor.relationshipsByName.get(key);\n notifyRelationship(identifier, key, record, meta);\n } else {\n record.eachRelationship((key, meta) => {\n notifyRelationship(identifier, key, record, meta);\n });\n }\n } else if (value === 'identity') {\n record.notifyPropertyChange('id');\n }\n}\nfunction notifyRelationship(identifier, key, record, meta) {\n if (meta.kind === 'belongsTo') {\n record.notifyPropertyChange(key);\n } else if (meta.kind === 'hasMany') {\n let support = LEGACY_SUPPORT.get(identifier);\n let manyArray = support && support._manyArrayCache[key];\n let hasPromise = support && support._relationshipPromisesCache[key];\n if (manyArray && hasPromise) {\n // do nothing, we will notify the ManyArray directly\n // once the fetch has completed.\n return;\n }\n if (manyArray) {\n manyArray.notify();\n\n //We need to notifyPropertyChange in the adding case because we need to make sure\n //we fetch the newly added record in case it is unloaded\n //TODO(Igor): Consider whether we could do this only if the record state is unloaded\n if (!meta.options || meta.options.async || meta.options.async === undefined) {\n record.notifyPropertyChange(key);\n }\n }\n }\n}\nfunction notifyAttribute(store, identifier, key, record) {\n let currentValue = cacheFor(record, key);\n if (currentValue !== store._instanceCache.getRecordData(identifier).getAttr(key)) {\n record.notifyPropertyChange(key);\n }\n}","var _class, _descriptor, _descriptor2, _Model;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\n/**\n @module @ember-data/model\n */\n\nimport { assert, warn } from '@ember/debug';\nimport EmberError from '@ember/error';\nimport EmberObject, { get } from '@ember/object';\nimport { dependentKeyCompat } from '@ember/object/compat';\nimport { run } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { isNone } from '@ember/utils';\nimport { DEBUG } from '@glimmer/env';\nimport { tracked } from '@glimmer/tracking';\nimport Ember from 'ember';\nimport { resolve } from 'rsvp';\nimport { recordIdentifierFor, storeFor } from '@ember-data/store';\nimport { coerceId, deprecatedPromiseObject, errorsArrayToHash, InternalModel, recordDataFor, WeakCache } from '@ember-data/store/-private';\nimport Errors from './errors';\nimport { LegacySupport } from './legacy-relationships-support';\nimport notifyChanges from './notify-changes';\nimport RecordState, { peekTag, tagged } from './record-state';\nimport { relationshipFromMeta } from './relationship-meta';\nconst {\n changeProperties\n} = Ember;\nexport const LEGACY_SUPPORT = new WeakCache(DEBUG ? 'legacy-relationships' : '');\nLEGACY_SUPPORT._generator = record => {\n const identifier = recordIdentifierFor(record);\n let support = LEGACY_SUPPORT.get(identifier);\n if (!support) {\n support = new LegacySupport(record);\n LEGACY_SUPPORT.set(identifier, support);\n }\n return support;\n};\nfunction findPossibleInverses(type, inverseType, name, relationshipsSoFar) {\n let possibleRelationships = relationshipsSoFar || [];\n let relationshipMap = inverseType.relationships;\n if (!relationshipMap) {\n return possibleRelationships;\n }\n let relationshipsForType = relationshipMap.get(type.modelName);\n let relationships = Array.isArray(relationshipsForType) ? relationshipsForType.filter(relationship => {\n let optionsForRelationship = inverseType.metaForProperty(relationship.name).options;\n if (!optionsForRelationship.inverse && optionsForRelationship.inverse !== null) {\n return true;\n }\n return name === optionsForRelationship.inverse;\n }) : null;\n if (relationships) {\n possibleRelationships.push.apply(possibleRelationships, relationships);\n }\n\n //Recurse to support polymorphism\n if (type.superclass) {\n findPossibleInverses(type.superclass, inverseType, name, possibleRelationships);\n }\n return possibleRelationships;\n}\n\n/*\n * This decorator allows us to lazily compute\n * an expensive getter on first-access and thereafter\n * never recompute it.\n */\nfunction computeOnce(target, key, desc) {\n const cache = new WeakMap();\n let getter = desc.get;\n desc.get = function () {\n let meta = cache.get(this);\n if (!meta) {\n meta = {\n hasComputed: false,\n value: undefined\n };\n cache.set(this, meta);\n }\n if (!meta.hasComputed) {\n meta.value = getter.call(this);\n meta.hasComputed = true;\n }\n return meta.value;\n };\n return desc;\n}\n\n/**\n Base class from which Models can be define.\n\n ```js\n import Model, { attr } from '@ember-data/model';\n\n export default class User extends Model {\n @attr name;\n }\n ```\n\n @class Model\n @public\n @extends Ember.EmberObject\n*/\nlet Model = (_class = (_Model = class Model extends EmberObject {\n constructor(...args) {\n super(...args);\n _initializerDefineProperty(this, \"store\", _descriptor, this);\n /**\n If `true` the store is attempting to reload the record from the adapter.\n Example\n ```javascript\n record.isReloading; // false\n record.reload();\n record.isReloading; // true\n ```\n @property isReloading\n @public\n @type {Boolean}\n @readOnly\n */\n _initializerDefineProperty(this, \"isReloading\", _descriptor2, this);\n }\n init(options = {}) {\n if (DEBUG && !options._secretInit && !options._internalModel && !options._createProps) {\n throw new EmberError('You should not call `create` on a model. Instead, call `store.createRecord` with the attributes you would like to set.');\n }\n const createProps = options._createProps;\n const _secretInit = options._secretInit;\n delete options._createProps;\n delete options._secretInit;\n super.init(options);\n _secretInit(this);\n this.___recordState = DEBUG ? new RecordState(this) : null;\n this.setProperties(createProps);\n\n // TODO pass something in such that we don't need internalModel\n // to get this info\n let store = storeFor(this);\n let notifications = store._notificationManager;\n let identity = recordIdentifierFor(this);\n notifications.subscribe(identity, (identifier, type, key) => {\n notifyChanges(identifier, type, key, this, store);\n });\n }\n willDestroy() {\n LEGACY_SUPPORT.get(this)?.destroy();\n }\n\n /**\n If this property is `true` the record is in the `empty`\n state. Empty is the first state all records enter after they have\n been created. Most records created by the store will quickly\n transition to the `loading` state if data needs to be fetched from\n the server or the `created` state if the record is created on the\n client. A record can also enter the empty state if the adapter is\n unable to locate the record.\n @property isEmpty\n @public\n @type {Boolean}\n @readOnly\n */\n get isEmpty() {\n return this.currentState.isEmpty;\n }\n\n /**\n If this property is `true` the record is in the `loading` state. A\n record enters this state when the store asks the adapter for its\n data. It remains in this state until the adapter provides the\n requested data.\n @property isLoading\n @public\n @type {Boolean}\n @readOnly\n */\n get isLoading() {\n return this.currentState.isLoading;\n }\n\n /**\n If this property is `true` the record is in the `loaded` state. A\n record enters this state when its data is populated. Most of a\n record's lifecycle is spent inside substates of the `loaded`\n state.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isLoaded'); // true\n store.findRecord('model', 1).then(function(model) {\n model.get('isLoaded'); // true\n });\n ```\n @property isLoaded\n @public\n @type {Boolean}\n @readOnly\n */\n get isLoaded() {\n return this.currentState.isLoaded;\n }\n\n /**\n If this property is `true` the record is in the `dirty` state. The\n record has local changes that have not yet been saved by the\n adapter. This includes records that have been created (but not yet\n saved) or deleted.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('hasDirtyAttributes'); // true\n store.findRecord('model', 1).then(function(model) {\n model.get('hasDirtyAttributes'); // false\n model.set('foo', 'some value');\n model.get('hasDirtyAttributes'); // true\n });\n ```\n @since 1.13.0\n @property hasDirtyAttributes\n @public\n @type {Boolean}\n @readOnly\n */\n get hasDirtyAttributes() {\n return this.currentState.isDirty;\n }\n\n /**\n If this property is `true` the record is in the `saving` state. A\n record enters the saving state when `save` is called, but the\n adapter has not yet acknowledged that the changes have been\n persisted to the backend.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isSaving'); // false\n let promise = record.save();\n record.get('isSaving'); // true\n promise.then(function() {\n record.get('isSaving'); // false\n });\n ```\n @property isSaving\n @public\n @type {Boolean}\n @readOnly\n */\n get isSaving() {\n return this.currentState.isSaving;\n }\n\n /**\n If this property is `true` the record is in the `deleted` state\n and has been marked for deletion. When `isDeleted` is true and\n `hasDirtyAttributes` is true, the record is deleted locally but the deletion\n was not yet persisted. When `isSaving` is true, the change is\n in-flight. When both `hasDirtyAttributes` and `isSaving` are false, the\n change has persisted.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isDeleted'); // false\n record.deleteRecord();\n // Locally deleted\n record.get('isDeleted'); // true\n record.get('hasDirtyAttributes'); // true\n record.get('isSaving'); // false\n // Persisting the deletion\n let promise = record.save();\n record.get('isDeleted'); // true\n record.get('isSaving'); // true\n // Deletion Persisted\n promise.then(function() {\n record.get('isDeleted'); // true\n record.get('isSaving'); // false\n record.get('hasDirtyAttributes'); // false\n });\n ```\n @property isDeleted\n @public\n @type {Boolean}\n @readOnly\n */\n get isDeleted() {\n return this.currentState.isDeleted;\n }\n\n /**\n If this property is `true` the record is in the `new` state. A\n record will be in the `new` state when it has been created on the\n client and the adapter has not yet report that it was successfully\n saved.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isNew'); // true\n record.save().then(function(model) {\n model.get('isNew'); // false\n });\n ```\n @property isNew\n @public\n @type {Boolean}\n @readOnly\n */\n get isNew() {\n return this.currentState.isNew;\n }\n\n /**\n If this property is `true` the record is in the `valid` state.\n A record will be in the `valid` state when the adapter did not report any\n server-side validation failures.\n @property isValid\n @public\n @type {Boolean}\n @readOnly\n */\n get isValid() {\n return this.currentState.isValid;\n }\n\n /**\n If the record is in the dirty state this property will report what\n kind of change has caused it to move into the dirty\n state. Possible values are:\n - `created` The record has been created by the client and not yet saved to the adapter.\n - `updated` The record has been updated by the client and not yet saved to the adapter.\n - `deleted` The record has been deleted by the client and not yet saved to the adapter.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('dirtyType'); // 'created'\n ```\n @property dirtyType\n @public\n @type {String}\n @readOnly\n */\n get dirtyType() {\n return this.currentState.dirtyType;\n }\n\n /**\n If `true` the adapter reported that it was unable to save local\n changes to the backend for any reason other than a server-side\n validation error.\n Example\n ```javascript\n record.get('isError'); // false\n record.set('foo', 'valid value');\n record.save().then(null, function() {\n record.get('isError'); // true\n });\n ```\n @property isError\n @public\n @type {Boolean}\n @readOnly\n */\n get isError() {\n return this.currentState.isError;\n }\n set isError(v) {\n if (DEBUG) {\n throw new Error(`isError is not directly settable`);\n }\n }\n /**\n All ember models have an id property. This is an identifier\n managed by an external source. These are always coerced to be\n strings before being used internally. Note when declaring the\n attributes for a model it is an error to declare an id\n attribute.\n ```javascript\n let record = store.createRecord('model');\n record.get('id'); // null\n store.findRecord('model', 1).then(function(model) {\n model.get('id'); // '1'\n });\n ```\n @property id\n @public\n @type {String}\n */\n get id() {\n // the _internalModel guard exists, because some dev-only deprecation code\n // (addListener via validatePropertyInjections) invokes toString before the\n // object is real.\n if (DEBUG) {\n if (!this._internalModel) {\n return void 0;\n }\n }\n return this._internalModel.id;\n }\n set id(id) {\n const normalizedId = coerceId(id);\n if (normalizedId !== null) {\n this._internalModel.setId(normalizedId);\n }\n }\n\n /**\n @property currentState\n @private\n @type {Object}\n */\n // TODO we can probably make this a computeOnce\n // we likely do not need to notify the currentState root anymore\n get currentState() {\n // descriptors are called with the wrong `this` context during mergeMixins\n // when using legacy/classic ember classes. Basically: lazy in prod and eager in dev.\n // so we do this to try to steer folks to the nicer \"dont user currentState\"\n // error.\n if (!DEBUG && !this.___recordState) {\n this.___recordState = new RecordState(this);\n }\n return this.___recordState;\n }\n set currentState(_v) {\n throw new Error('cannot set currentState');\n }\n\n /**\n @property _internalModel\n @private\n @type {Object}\n */\n\n /**\n The store service instance which created this record instance\n @property store\n @public\n */\n\n /**\n When the record is in the `invalid` state this object will contain\n any errors returned by the adapter. When present the errors hash\n contains keys corresponding to the invalid property names\n and values which are arrays of Javascript objects with two keys:\n - `message` A string containing the error message from the backend\n - `attribute` The name of the property associated with this error message\n ```javascript\n record.get('errors.length'); // 0\n record.set('foo', 'invalid value');\n record.save().catch(function() {\n record.get('errors').get('foo');\n // [{message: 'foo should be a number.', attribute: 'foo'}]\n });\n ```\n The `errors` property is useful for displaying error messages to\n the user.\n ```handlebars\n \n {{#each @model.errors.username as |error|}}\n
\n {{error.message}}\n
\n {{/each}}\n \n {{#each @model.errors.email as |error|}}\n
\n {{error.message}}\n
\n {{/each}}\n ```\n You can also access the special `messages` property on the error\n object to get an array of all the error strings.\n ```handlebars\n {{#each @model.errors.messages as |message|}}\n
\n {{message}}\n
\n {{/each}}\n ```\n @property errors\n @public\n @type {Errors}\n */\n get errors() {\n let errors = Errors.create({\n __record: this\n });\n // TODO we should unify how errors gets populated\n // with the code managing the update. Probably a\n // lazy flush similar to retrieveLatest in ManyArray\n let recordData = recordDataFor(this);\n let jsonApiErrors;\n if (recordData.getErrors) {\n jsonApiErrors = recordData.getErrors();\n if (jsonApiErrors) {\n let errorsHash = errorsArrayToHash(jsonApiErrors);\n let errorKeys = Object.keys(errorsHash);\n for (let i = 0; i < errorKeys.length; i++) {\n errors.add(errorKeys[i], errorsHash[errorKeys[i]]);\n }\n }\n }\n return errors;\n }\n\n /**\n This property holds the `AdapterError` object with which\n last adapter operation was rejected.\n @property adapterError\n @public\n @type {AdapterError}\n */\n get adapterError() {\n return this.currentState.adapterError;\n }\n set adapterError(v) {\n throw new Error(`adapterError is not directly settable`);\n }\n\n /**\n Create a JSON representation of the record, using the serialization\n strategy of the store's adapter.\n `serialize` takes an optional hash as a parameter, currently\n supported options are:\n - `includeId`: `true` if the record's ID should be included in the\n JSON representation.\n @method serialize\n @public\n @param {Object} options\n @return {Object} an object whose values are primitive JSON values only\n */\n serialize(options) {\n return storeFor(this)._instanceCache.createSnapshot(recordIdentifierFor(this)).serialize(options);\n }\n\n /*\n We hook the default implementation to ensure\n our tagged properties are properly notified\n as well. We still super for everything because\n sync observers require a direct call occuring\n to trigger their flush. We wouldn't need to\n super in 4.0+ where sync observers are removed.\n */\n notifyPropertyChange(key) {\n let tag = peekTag(this, key);\n if (tag) {\n tag.notify();\n }\n super.notifyPropertyChange(key);\n }\n\n /**\n Marks the record as deleted but does not save it. You must call\n `save` afterwards if you want to persist it. You might use this\n method if you want to allow the user to still `rollbackAttributes()`\n after a delete was made.\n Example\n ```app/controllers/model/delete.js\n import Controller from '@ember/controller';\n import { action } from '@ember/object';\n export default class ModelDeleteController extends Controller {\n @action\n softDelete() {\n this.model.deleteRecord();\n }\n @action\n confirm() {\n this.model.save();\n }\n @action\n undo() {\n this.model.rollbackAttributes();\n }\n }\n ```\n @method deleteRecord\n @public\n */\n deleteRecord() {\n // ensure we've populated currentState prior to deleting a new record\n if (this.currentState) {\n storeFor(this).deleteRecord(this);\n }\n }\n\n /**\n Same as `deleteRecord`, but saves the record immediately.\n Example\n ```app/controllers/model/delete.js\n import Controller from '@ember/controller';\n import { action } from '@ember/object';\n export default class ModelDeleteController extends Controller {\n @action\n delete() {\n this.model.destroyRecord().then(function() {\n this.transitionToRoute('model.index');\n });\n }\n }\n ```\n If you pass an object on the `adapterOptions` property of the options\n argument it will be passed to your adapter via the snapshot\n ```js\n record.destroyRecord({ adapterOptions: { subscribe: false } });\n ```\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default class PostAdapter extends MyCustomAdapter {\n deleteRecord(store, type, snapshot) {\n if (snapshot.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n }\n ```\n @method destroyRecord\n @public\n @param {Object} options\n @return {Promise} a promise that will be resolved when the adapter returns\n successfully or rejected if the adapter returns with an error.\n */\n destroyRecord(options) {\n const {\n isNew\n } = this.currentState;\n this.deleteRecord();\n if (isNew) {\n return resolve(this);\n }\n return this.save(options).then(_ => {\n run(() => {\n this.unloadRecord();\n });\n return this;\n });\n }\n\n /**\n Unloads the record from the store. This will not send a delete request\n to your server, it just unloads the record from memory.\n @method unloadRecord\n @public\n */\n unloadRecord() {\n if (this.currentState.isNew && (this.isDestroyed || this.isDestroying)) {\n return;\n }\n storeFor(this).unloadRecord(this);\n }\n\n /**\n @method _notifyProperties\n @private\n */\n _notifyProperties(keys) {\n // changeProperties defers notifications until after the delegate\n // and protects with a try...finally block\n // previously used begin...endPropertyChanges but this is private API\n changeProperties(() => {\n let key;\n for (let i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n this.notifyPropertyChange(key);\n }\n });\n }\n\n /**\n Returns an object, whose keys are changed properties, and value is\n an [oldProp, newProp] array.\n The array represents the diff of the canonical state with the local state\n of the model. Note: if the model is created locally, the canonical state is\n empty since the adapter hasn't acknowledged the attributes yet:\n Example\n ```app/models/mascot.js\n import Model, { attr } from '@ember-data/model';\n export default class MascotModel extends Model {\n @attr('string') name;\n @attr('boolean', {\n defaultValue: false\n })\n isAdmin;\n }\n ```\n ```javascript\n let mascot = store.createRecord('mascot');\n mascot.changedAttributes(); // {}\n mascot.set('name', 'Tomster');\n mascot.changedAttributes(); // { name: [undefined, 'Tomster'] }\n mascot.set('isAdmin', true);\n mascot.changedAttributes(); // { isAdmin: [undefined, true], name: [undefined, 'Tomster'] }\n mascot.save().then(function() {\n mascot.changedAttributes(); // {}\n mascot.set('isAdmin', false);\n mascot.changedAttributes(); // { isAdmin: [true, false] }\n });\n ```\n @method changedAttributes\n @public\n @return {Object} an object, whose keys are changed properties,\n and value is an [oldProp, newProp] array.\n */\n changedAttributes() {\n return this._internalModel.changedAttributes();\n }\n\n /**\n If the model `hasDirtyAttributes` this function will discard any unsaved\n changes. If the model `isNew` it will be removed from the store.\n Example\n ```javascript\n record.get('name'); // 'Untitled Document'\n record.set('name', 'Doc 1');\n record.get('name'); // 'Doc 1'\n record.rollbackAttributes();\n record.get('name'); // 'Untitled Document'\n ```\n @since 1.13.0\n @method rollbackAttributes\n @public\n */\n rollbackAttributes() {\n const {\n currentState\n } = this;\n this._internalModel.rollbackAttributes();\n currentState.cleanErrorRequests();\n }\n\n /**\n @method _createSnapshot\n @private\n */\n // TODO @deprecate in favor of a public API or examples of how to test successfully\n _createSnapshot() {\n return storeFor(this)._instanceCache.createSnapshot(recordIdentifierFor(this));\n }\n toStringExtension() {\n // the _internalModel guard exists, because some dev-only deprecation code\n // (addListener via validatePropertyInjections) invokes toString before the\n // object is real.\n return this._internalModel && this._internalModel.id;\n }\n\n /**\n Save the record and persist any changes to the record to an\n external source via the adapter.\n Example\n ```javascript\n record.set('name', 'Tomster');\n record.save().then(function() {\n // Success callback\n }, function() {\n // Error callback\n });\n ```\n If you pass an object using the `adapterOptions` property of the options\n argument it will be passed to your adapter via the snapshot.\n ```js\n record.save({ adapterOptions: { subscribe: false } });\n ```\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default class PostAdapter extends MyCustomAdapter {\n updateRecord(store, type, snapshot) {\n if (snapshot.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n }\n ```\n @method save\n @public\n @param {Object} options\n @return {Promise} a promise that will be resolved when the adapter returns\n successfully or rejected if the adapter returns with an error.\n */\n save(options) {\n let promise;\n if (this.currentState.isNew && this.currentState.isDeleted) {\n promise = resolve(this);\n } else {\n promise = storeFor(this).saveRecord(this, options);\n }\n if (true /* DEPRECATE_SAVE_PROMISE_ACCESS */) {\n return deprecatedPromiseObject(promise);\n }\n return promise;\n }\n\n /**\n Reload the record from the adapter.\n This will only work if the record has already finished loading.\n Example\n ```app/controllers/model/view.js\n import Controller from '@ember/controller';\n import { action } from '@ember/object';\n export default class ViewController extends Controller {\n @action\n reload() {\n this.model.reload().then(function(model) {\n // do something with the reloaded model\n });\n }\n }\n ```\n @method reload\n @public\n @param {Object} options optional, may include `adapterOptions` hash which will be passed to adapter request\n @return {Promise} a promise that will be resolved with the record when the\n adapter returns successfully or rejected if the adapter returns\n with an error.\n */\n reload(_options) {\n let options = {};\n if (typeof _options === 'object' && _options !== null && _options.adapterOptions) {\n options.adapterOptions = _options.adapterOptions;\n }\n options.isReloading = true;\n let identifier = recordIdentifierFor(this);\n assert(`You cannot reload a record without an ID`, identifier.id);\n this.isReloading = true;\n const promise = storeFor(this)._fetchManager.scheduleFetch(identifier, options).then(() => this).finally(() => {\n this.isReloading = false;\n });\n if (true /* DEPRECATE_SAVE_PROMISE_ACCESS */) {\n return deprecatedPromiseObject(promise);\n }\n return promise;\n }\n attr() {\n assert('The `attr` method is not available on Model, a Snapshot was probably expected. Are you passing a Model instead of a Snapshot to your serializer?', false);\n }\n\n /**\n Get the reference for the specified belongsTo relationship.\n Example\n ```app/models/blog.js\n import Model, { belongsTo } from '@ember-data/model';\n export default class BlogModel extends Model {\n @belongsTo({ async: true }) user;\n }\n ```\n ```javascript\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n // check if the user relationship is loaded\n let isLoaded = userRef.value() !== null;\n // get the record of the reference (null if not yet available)\n let user = userRef.value();\n // get the identifier of the reference\n if (userRef.remoteType() === \"id\") {\n let id = userRef.id();\n } else if (userRef.remoteType() === \"link\") {\n let link = userRef.link();\n }\n // load user (via store.findRecord or store.findBelongsTo)\n userRef.load().then(...)\n // or trigger a reload\n userRef.reload().then(...)\n // provide data for reference\n userRef.push({\n type: 'user',\n id: 1,\n attributes: {\n username: \"@user\"\n }\n }).then(function(user) {\n userRef.value() === user;\n });\n ```\n @method belongsTo\n @public\n @param {String} name of the relationship\n @since 2.5.0\n @return {BelongsToReference} reference for this relationship\n */\n belongsTo(name) {\n return LEGACY_SUPPORT.lookup(this).referenceFor('belongsTo', name);\n }\n\n /**\n Get the reference for the specified hasMany relationship.\n Example\n ```app/models/blog.js\n import Model, { hasMany } from '@ember-data/model';\n export default class BlogModel extends Model {\n @hasMany({ async: true }) comments;\n }\n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n comments: {\n data: [\n { type: 'comment', id: 1 },\n { type: 'comment', id: 2 }\n ]\n }\n }\n }\n });\n let commentsRef = blog.hasMany('comments');\n // check if the comments are loaded already\n let isLoaded = commentsRef.value() !== null;\n // get the records of the reference (null if not yet available)\n let comments = commentsRef.value();\n // get the identifier of the reference\n if (commentsRef.remoteType() === \"ids\") {\n let ids = commentsRef.ids();\n } else if (commentsRef.remoteType() === \"link\") {\n let link = commentsRef.link();\n }\n // load comments (via store.findMany or store.findHasMany)\n commentsRef.load().then(...)\n // or trigger a reload\n commentsRef.reload().then(...)\n // provide data for reference\n commentsRef.push([{ type: 'comment', id: 1 }, { type: 'comment', id: 2 }]).then(function(comments) {\n commentsRef.value() === comments;\n });\n ```\n @method hasMany\n @public\n @param {String} name of the relationship\n @since 2.5.0\n @return {HasManyReference} reference for this relationship\n */\n hasMany(name) {\n return LEGACY_SUPPORT.lookup(this).referenceFor('hasMany', name);\n }\n\n /**\n Given a callback, iterates over each of the relationships in the model,\n invoking the callback with the name of each relationship and its relationship\n descriptor.\n The callback method you provide should have the following signature (all\n parameters are optional):\n ```javascript\n function(name, descriptor);\n ```\n - `name` the name of the current property in the iteration\n - `descriptor` the meta object that describes this relationship\n The relationship descriptor argument is an object with the following properties.\n - **key** String the name of this relationship on the Model\n - **kind** String \"hasMany\" or \"belongsTo\"\n - **options** Object the original options hash passed when the relationship was declared\n - **parentType** Model the type of the Model that owns this relationship\n - **type** String the type name of the related Model\n Note that in addition to a callback, you can also pass an optional target\n object that will be set as `this` on the context.\n Example\n ```app/serializers/application.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class ApplicationSerializer extends JSONSerializer {\n serialize(record, options) {\n let json = {};\n record.eachRelationship(function(name, descriptor) {\n if (descriptor.kind === 'hasMany') {\n let serializedHasManyName = name.toUpperCase() + '_IDS';\n json[serializedHasManyName] = record.get(name).mapBy('id');\n }\n });\n return json;\n }\n }\n ```\n @method eachRelationship\n @public\n @param {Function} callback the callback to invoke\n @param {any} binding the value to which the callback's `this` should be bound\n */\n eachRelationship(callback, binding) {\n this.constructor.eachRelationship(callback, binding);\n }\n relationshipFor(name) {\n return this.constructor.relationshipsByName.get(name);\n }\n inverseFor(key) {\n return this.constructor.inverseFor(key, storeFor(this));\n }\n eachAttribute(callback, binding) {\n this.constructor.eachAttribute(callback, binding);\n }\n /*\n These class methods below provide relationship\n introspection abilities about relationships.\n A note about the computed properties contained here:\n **These properties are effectively sealed once called for the first time.**\n To avoid repeatedly doing expensive iteration over a model's fields, these\n values are computed once and then cached for the remainder of the runtime of\n your application.\n If your application needs to modify a class after its initial definition\n (for example, using `reopen()` to add additional attributes), make sure you\n do it before using your model with the store, which uses these properties\n extensively.\n */\n\n /**\n For a given relationship name, returns the model type of the relationship.\n For example, if you define a model like this:\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany('comment') comments;\n }\n ```\n Calling `store.modelFor('post').typeForRelationship('comments', store)` will return `Comment`.\n @method typeForRelationship\n @public\n @static\n @param {String} name the name of the relationship\n @param {store} store an instance of Store\n @return {Model} the type of the relationship, or undefined\n */\n static typeForRelationship(name, store) {\n let relationship = this.relationshipsByName.get(name);\n return relationship && store.modelFor(relationship.type);\n }\n static get inverseMap() {\n return Object.create(null);\n }\n\n /**\n Find the relationship which is the inverse of the one asked for.\n For example, if you define models like this:\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n export default class PostModel extends Model {\n @hasMany('message') comments;\n }\n ```\n ```app/models/message.js\n import Model, { belongsTo } from '@ember-data/model';\n export default class MessageModel extends Model {\n @belongsTo('post') owner;\n }\n ```\n ``` js\n store.modelFor('post').inverseFor('comments', store) // { type: App.Message, name: 'owner', kind: 'belongsTo' }\n store.modelFor('message').inverseFor('owner', store) // { type: App.Post, name: 'comments', kind: 'hasMany' }\n ```\n @method inverseFor\n @public\n @static\n @param {String} name the name of the relationship\n @param {Store} store\n @return {Object} the inverse relationship, or null\n */\n static inverseFor(name, store) {\n let inverseMap = this.inverseMap;\n if (inverseMap[name]) {\n return inverseMap[name];\n } else {\n let inverse = this._findInverseFor(name, store);\n inverseMap[name] = inverse;\n return inverse;\n }\n }\n\n //Calculate the inverse, ignoring the cache\n static _findInverseFor(name, store) {\n let inverseType = this.typeForRelationship(name, store);\n if (!inverseType) {\n return null;\n }\n let propertyMeta = this.metaForProperty(name);\n //If inverse is manually specified to be null, like `comments: hasMany('message', { inverse: null })`\n let options = propertyMeta.options;\n if (options.inverse === null) {\n return null;\n }\n let inverseName, inverseKind, inverse, inverseOptions;\n\n //If inverse is specified manually, return the inverse\n if (options.inverse) {\n inverseName = options.inverse;\n inverse = inverseType.relationshipsByName.get(inverseName);\n assert(\"We found no inverse relationships by the name of '\" + inverseName + \"' on the '\" + inverseType.modelName + \"' model. This is most likely due to a missing attribute on your model definition.\", !isNone(inverse));\n\n // TODO probably just return the whole inverse here\n inverseKind = inverse.kind;\n inverseOptions = inverse.options;\n } else {\n //No inverse was specified manually, we need to use a heuristic to guess one\n if (propertyMeta.type === propertyMeta.parentModelName) {\n warn(`Detected a reflexive relationship by the name of '${name}' without an inverse option. Look at https://guides.emberjs.com/current/models/relationships/#toc_reflexive-relations for how to explicitly specify inverses.`, false, {\n id: 'ds.model.reflexive-relationship-without-inverse'\n });\n }\n let possibleRelationships = findPossibleInverses(this, inverseType, name);\n if (possibleRelationships.length === 0) {\n return null;\n }\n let filteredRelationships = possibleRelationships.filter(possibleRelationship => {\n let optionsForRelationship = inverseType.metaForProperty(possibleRelationship.name).options;\n return name === optionsForRelationship.inverse;\n });\n assert(\"You defined the '\" + name + \"' relationship on \" + this + ', but you defined the inverse relationships of type ' + inverseType.toString() + ' multiple times. Look at https://guides.emberjs.com/current/models/relationships/#toc_explicit-inverses for how to explicitly specify inverses', filteredRelationships.length < 2);\n if (filteredRelationships.length === 1) {\n possibleRelationships = filteredRelationships;\n }\n assert(\"You defined the '\" + name + \"' relationship on \" + this + ', but multiple possible inverse relationships of type ' + this + ' were found on ' + inverseType + '. Look at https://guides.emberjs.com/current/models/relationships/#toc_explicit-inverses for how to explicitly specify inverses', possibleRelationships.length === 1);\n inverseName = possibleRelationships[0].name;\n inverseKind = possibleRelationships[0].kind;\n inverseOptions = possibleRelationships[0].options;\n }\n assert(`The ${inverseType.modelName}:${inverseName} relationship declares 'inverse: null', but it was resolved as the inverse for ${this.modelName}:${name}.`, !inverseOptions || inverseOptions.inverse !== null);\n return {\n type: inverseType,\n name: inverseName,\n kind: inverseKind,\n options: inverseOptions\n };\n }\n\n /**\n The model's relationships as a map, keyed on the type of the\n relationship. The value of each entry is an array containing a descriptor\n for each relationship with that type, describing the name of the relationship\n as well as the type.\n For example, given the following model definition:\n ```app/models/blog.js\n import Model, { belongsTo, hasMany } from '@ember-data/model';\n export default class BlogModel extends Model {\n @hasMany('user') users;\n @belongsTo('user') owner;\n @hasMany('post') posts;\n }\n ```\n This computed property would return a map describing these\n relationships, like this:\n ```javascript\n import { get } from '@ember/object';\n import Blog from 'app/models/blog';\n import User from 'app/models/user';\n import Post from 'app/models/post';\n let relationships = Blog.relationships;\n relationships.get('user');\n //=> [ { name: 'users', kind: 'hasMany' },\n // { name: 'owner', kind: 'belongsTo' } ]\n relationships.get('post');\n //=> [ { name: 'posts', kind: 'hasMany' } ]\n ```\n @property relationships\n @public\n @static\n @type Map\n @readOnly\n */\n\n static get relationships() {\n let map = new Map();\n let relationshipsByName = this.relationshipsByName;\n\n // Loop through each computed property on the class\n relationshipsByName.forEach(desc => {\n let {\n type\n } = desc;\n if (!map.has(type)) {\n map.set(type, []);\n }\n map.get(type).push(desc);\n });\n return map;\n }\n\n /**\n A hash containing lists of the model's relationships, grouped\n by the relationship kind. For example, given a model with this\n definition:\n ```app/models/blog.js\n import Model, { belongsTo, hasMany } from '@ember-data/model';\n export default class BlogModel extends Model {\n @hasMany('user') users;\n @belongsTo('user') owner;\n @hasMany('post') posts;\n }\n ```\n This property would contain the following:\n ```javascript\n import { get } from '@ember/object';\n import Blog from 'app/models/blog';\n let relationshipNames = Blog.relationshipNames;\n relationshipNames.hasMany;\n //=> ['users', 'posts']\n relationshipNames.belongsTo;\n //=> ['owner']\n ```\n @property relationshipNames\n @public\n @static\n @type Object\n @readOnly\n */\n static get relationshipNames() {\n let names = {\n hasMany: [],\n belongsTo: []\n };\n this.eachComputedProperty((name, meta) => {\n if (meta.isRelationship) {\n names[meta.kind].push(name);\n }\n });\n return names;\n }\n\n /**\n An array of types directly related to a model. Each type will be\n included once, regardless of the number of relationships it has with\n the model.\n For example, given a model with this definition:\n ```app/models/blog.js\n import Model, { belongsTo, hasMany } from '@ember-data/model';\n export default class BlogModel extends Model {\n @hasMany('user') users;\n @belongsTo('user') owner;\n @hasMany('post') posts;\n }\n ```\n This property would contain the following:\n ```javascript\n import { get } from '@ember/object';\n import Blog from 'app/models/blog';\n let relatedTypes = Blog.relatedTypes');\n //=> [ User, Post ]\n ```\n @property relatedTypes\n @public\n @static\n @type Ember.Array\n @readOnly\n */\n static get relatedTypes() {\n let types = [];\n let rels = this.relationshipsObject;\n let relationships = Object.keys(rels);\n\n // create an array of the unique types involved\n // in relationships\n for (let i = 0; i < relationships.length; i++) {\n let name = relationships[i];\n let meta = rels[name];\n let modelName = meta.type;\n if (types.indexOf(modelName) === -1) {\n types.push(modelName);\n }\n }\n return types;\n }\n\n /**\n A map whose keys are the relationships of a model and whose values are\n relationship descriptors.\n For example, given a model with this\n definition:\n ```app/models/blog.js\n import Model, { belongsTo, hasMany } from '@ember-data/model';\n export default class BlogModel extends Model {\n @hasMany('user') users;\n @belongsTo('user') owner;\n @hasMany('post') posts;\n }\n ```\n This property would contain the following:\n ```javascript\n import { get } from '@ember/object';\n import Blog from 'app/models/blog';\n let relationshipsByName = Blog.relationshipsByName;\n relationshipsByName.get('users');\n //=> { key: 'users', kind: 'hasMany', type: 'user', options: Object, isRelationship: true }\n relationshipsByName.get('owner');\n //=> { key: 'owner', kind: 'belongsTo', type: 'user', options: Object, isRelationship: true }\n ```\n @property relationshipsByName\n @public\n @static\n @type Map\n @readOnly\n */\n static get relationshipsByName() {\n let map = new Map();\n let rels = this.relationshipsObject;\n let relationships = Object.keys(rels);\n for (let i = 0; i < relationships.length; i++) {\n let key = relationships[i];\n let value = rels[key];\n map.set(value.key, value);\n }\n return map;\n }\n static get relationshipsObject() {\n let relationships = Object.create(null);\n let modelName = this.modelName;\n this.eachComputedProperty((name, meta) => {\n if (meta.isRelationship) {\n meta.key = name;\n meta.name = name;\n meta.parentModelName = modelName;\n relationships[name] = relationshipFromMeta(meta);\n }\n });\n return relationships;\n }\n\n /**\n A map whose keys are the fields of the model and whose values are strings\n describing the kind of the field. A model's fields are the union of all of its\n attributes and relationships.\n For example:\n ```app/models/blog.js\n import Model, { attr, belongsTo, hasMany } from '@ember-data/model';\n export default class BlogModel extends Model {\n @hasMany('user') users;\n @belongsTo('user') owner;\n @hasMany('post') posts;\n @attr('string') title;\n }\n ```\n ```js\n import { get } from '@ember/object';\n import Blog from 'app/models/blog'\n let fields = Blog.fields;\n fields.forEach(function(kind, field) {\n console.log(field, kind);\n });\n // prints:\n // users, hasMany\n // owner, belongsTo\n // posts, hasMany\n // title, attribute\n ```\n @property fields\n @public\n @static\n @type Map\n @readOnly\n */\n static get fields() {\n let map = new Map();\n this.eachComputedProperty((name, meta) => {\n if (meta.isRelationship) {\n map.set(name, meta.kind);\n } else if (meta.isAttribute) {\n map.set(name, 'attribute');\n }\n });\n return map;\n }\n\n /**\n Given a callback, iterates over each of the relationships in the model,\n invoking the callback with the name of each relationship and its relationship\n descriptor.\n @method eachRelationship\n @public\n @static\n @param {Function} callback the callback to invoke\n @param {any} binding the value to which the callback's `this` should be bound\n */\n static eachRelationship(callback, binding) {\n this.relationshipsByName.forEach((relationship, name) => {\n callback.call(binding, name, relationship);\n });\n }\n\n /**\n Given a callback, iterates over each of the types related to a model,\n invoking the callback with the related type's class. Each type will be\n returned just once, regardless of how many different relationships it has\n with a model.\n @method eachRelatedType\n @public\n @static\n @param {Function} callback the callback to invoke\n @param {any} binding the value to which the callback's `this` should be bound\n */\n static eachRelatedType(callback, binding) {\n let relationshipTypes = this.relatedTypes;\n for (let i = 0; i < relationshipTypes.length; i++) {\n let type = relationshipTypes[i];\n callback.call(binding, type);\n }\n }\n static determineRelationshipType(knownSide, store) {\n let knownKey = knownSide.key;\n let knownKind = knownSide.kind;\n let inverse = this.inverseFor(knownKey, store);\n // let key;\n let otherKind;\n if (!inverse) {\n return knownKind === 'belongsTo' ? 'oneToNone' : 'manyToNone';\n }\n\n // key = inverse.name;\n otherKind = inverse.kind;\n if (otherKind === 'belongsTo') {\n return knownKind === 'belongsTo' ? 'oneToOne' : 'manyToOne';\n } else {\n return knownKind === 'belongsTo' ? 'oneToMany' : 'manyToMany';\n }\n }\n\n /**\n A map whose keys are the attributes of the model (properties\n described by attr) and whose values are the meta object for the\n property.\n Example\n ```app/models/person.js\n import Model, { attr } from '@ember-data/model';\n export default class PersonModel extends Model {\n @attr('string') firstName;\n @attr('string') lastName;\n @attr('date') birthday;\n }\n ```\n ```javascript\n import { get } from '@ember/object';\n import Person from 'app/models/person'\n let attributes = Person.attributes\n attributes.forEach(function(meta, name) {\n console.log(name, meta);\n });\n // prints:\n // firstName {type: \"string\", isAttribute: true, options: Object, parentType: function, name: \"firstName\"}\n // lastName {type: \"string\", isAttribute: true, options: Object, parentType: function, name: \"lastName\"}\n // birthday {type: \"date\", isAttribute: true, options: Object, parentType: function, name: \"birthday\"}\n ```\n @property attributes\n @public\n @static\n @type {Map}\n @readOnly\n */\n static get attributes() {\n let map = new Map();\n this.eachComputedProperty((name, meta) => {\n if (meta.isAttribute) {\n assert(\"You may not set `id` as an attribute on your model. Please remove any lines that look like: `id: attr('')` from \" + this.toString(), name !== 'id');\n meta.name = name;\n map.set(name, meta);\n }\n });\n return map;\n }\n\n /**\n A map whose keys are the attributes of the model (properties\n described by attr) and whose values are type of transformation\n applied to each attribute. This map does not include any\n attributes that do not have an transformation type.\n Example\n ```app/models/person.js\n import Model, { attr } from '@ember-data/model';\n export default class PersonModel extends Model {\n @attr firstName;\n @attr('string') lastName;\n @attr('date') birthday;\n }\n ```\n ```javascript\n import { get } from '@ember/object';\n import Person from 'app/models/person';\n let transformedAttributes = Person.transformedAttributes\n transformedAttributes.forEach(function(field, type) {\n console.log(field, type);\n });\n // prints:\n // lastName string\n // birthday date\n ```\n @property transformedAttributes\n @public\n @static\n @type {Map}\n @readOnly\n */\n static get transformedAttributes() {\n let map = new Map();\n this.eachAttribute((key, meta) => {\n if (meta.type) {\n map.set(key, meta.type);\n }\n });\n return map;\n }\n\n /**\n Iterates through the attributes of the model, calling the passed function on each\n attribute.\n The callback method you provide should have the following signature (all\n parameters are optional):\n ```javascript\n function(name, meta);\n ```\n - `name` the name of the current property in the iteration\n - `meta` the meta object for the attribute property in the iteration\n Note that in addition to a callback, you can also pass an optional target\n object that will be set as `this` on the context.\n Example\n ```javascript\n import Model, { attr } from '@ember-data/model';\n class PersonModel extends Model {\n @attr('string') firstName;\n @attr('string') lastName;\n @attr('date') birthday;\n }\n PersonModel.eachAttribute(function(name, meta) {\n console.log(name, meta);\n });\n // prints:\n // firstName {type: \"string\", isAttribute: true, options: Object, parentType: function, name: \"firstName\"}\n // lastName {type: \"string\", isAttribute: true, options: Object, parentType: function, name: \"lastName\"}\n // birthday {type: \"date\", isAttribute: true, options: Object, parentType: function, name: \"birthday\"}\n ```\n @method eachAttribute\n @public\n @param {Function} callback The callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @static\n */\n static eachAttribute(callback, binding) {\n this.attributes.forEach((meta, name) => {\n callback.call(binding, name, meta);\n });\n }\n\n /**\n Iterates through the transformedAttributes of the model, calling\n the passed function on each attribute. Note the callback will not be\n called for any attributes that do not have an transformation type.\n The callback method you provide should have the following signature (all\n parameters are optional):\n ```javascript\n function(name, type);\n ```\n - `name` the name of the current property in the iteration\n - `type` a string containing the name of the type of transformed\n applied to the attribute\n Note that in addition to a callback, you can also pass an optional target\n object that will be set as `this` on the context.\n Example\n ```javascript\n import Model, { attr } from '@ember-data/model';\n let Person = Model.extend({\n firstName: attr(),\n lastName: attr('string'),\n birthday: attr('date')\n });\n Person.eachTransformedAttribute(function(name, type) {\n console.log(name, type);\n });\n // prints:\n // lastName string\n // birthday date\n ```\n @method eachTransformedAttribute\n @public\n @param {Function} callback The callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @static\n */\n static eachTransformedAttribute(callback, binding) {\n this.transformedAttributes.forEach((type, name) => {\n callback.call(binding, name, type);\n });\n }\n\n /**\n Returns the name of the model class.\n @method toString\n @public\n @static\n */\n static toString() {\n return `model:${get(this, 'modelName')}`;\n }\n}, _Model.isModel = true, _Model.modelName = null, _Model), _descriptor = _applyDecoratedDescriptor(_class.prototype, \"store\", [service], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _applyDecoratedDescriptor(_class.prototype, \"isEmpty\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isEmpty\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"isLoading\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isLoading\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"isLoaded\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isLoaded\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"hasDirtyAttributes\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"hasDirtyAttributes\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"isSaving\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isSaving\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"isDeleted\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isDeleted\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"isNew\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isNew\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"isValid\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isValid\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"dirtyType\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"dirtyType\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"isError\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"isError\"), _class.prototype), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, \"isReloading\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return false;\n }\n}), _applyDecoratedDescriptor(_class.prototype, \"id\", [tagged], Object.getOwnPropertyDescriptor(_class.prototype, \"id\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"currentState\", [tagged], Object.getOwnPropertyDescriptor(_class.prototype, \"currentState\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"errors\", [computeOnce], Object.getOwnPropertyDescriptor(_class.prototype, \"errors\"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, \"adapterError\", [dependentKeyCompat], Object.getOwnPropertyDescriptor(_class.prototype, \"adapterError\"), _class.prototype), _applyDecoratedDescriptor(_class, \"inverseMap\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"inverseMap\"), _class), _applyDecoratedDescriptor(_class, \"relationships\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"relationships\"), _class), _applyDecoratedDescriptor(_class, \"relationshipNames\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"relationshipNames\"), _class), _applyDecoratedDescriptor(_class, \"relatedTypes\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"relatedTypes\"), _class), _applyDecoratedDescriptor(_class, \"relationshipsByName\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"relationshipsByName\"), _class), _applyDecoratedDescriptor(_class, \"relationshipsObject\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"relationshipsObject\"), _class), _applyDecoratedDescriptor(_class, \"fields\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"fields\"), _class), _applyDecoratedDescriptor(_class, \"attributes\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"attributes\"), _class), _applyDecoratedDescriptor(_class, \"transformedAttributes\", [computeOnce], Object.getOwnPropertyDescriptor(_class, \"transformedAttributes\"), _class), _class); // this is required to prevent `init` from passing\n// the values initialized during create to `setUnknownProperty`\nModel.prototype._internalModel = null;\nModel.prototype._createProps = null;\nModel.prototype._secretInit = null;\nif (true /* HAS_DEBUG_PACKAGE */) {\n /**\n Provides info about the model for debugging purposes\n by grouping the properties into more semantic groups.\n Meant to be used by debugging tools such as the Chrome Ember Extension.\n - Groups all attributes in \"Attributes\" group.\n - Groups all belongsTo relationships in \"Belongs To\" group.\n - Groups all hasMany relationships in \"Has Many\" group.\n - Groups all flags in \"Flags\" group.\n - Flags relationship CPs as expensive properties.\n @method _debugInfo\n @for Model\n @private\n */\n Model.prototype._debugInfo = function () {\n let attributes = ['id'];\n let relationships = {};\n let expensiveProperties = [];\n this.eachAttribute((name, meta) => attributes.push(name));\n let groups = [{\n name: 'Attributes',\n properties: attributes,\n expand: true\n }];\n this.eachRelationship((name, relationship) => {\n let properties = relationships[relationship.kind];\n if (properties === undefined) {\n properties = relationships[relationship.kind] = [];\n groups.push({\n name: relationship.kind,\n properties,\n expand: true\n });\n }\n properties.push(name);\n expensiveProperties.push(name);\n });\n groups.push({\n name: 'Flags',\n properties: ['isLoaded', 'hasDirtyAttributes', 'isSaving', 'isDeleted', 'isError', 'isNew', 'isValid']\n });\n return {\n propertyInfo: {\n // include all other mixins / properties (not just the grouped ones)\n includeOtherProperties: true,\n groups: groups,\n // don't pre-calculate unless cached\n expensiveProperties: expensiveProperties\n }\n };\n };\n}\nif (DEBUG) {\n let lookupDescriptor = function lookupDescriptor(obj, keyName) {\n let current = obj;\n do {\n let descriptor = Object.getOwnPropertyDescriptor(current, keyName);\n if (descriptor !== undefined) {\n return descriptor;\n }\n current = Object.getPrototypeOf(current);\n } while (current !== null);\n return null;\n };\n let isBasicDesc = function isBasicDesc(desc) {\n return !desc || !desc.get && !desc.set && desc.enumerable === true && desc.writable === true && desc.configurable === true;\n };\n let isDefaultEmptyDescriptor = function isDefaultEmptyDescriptor(obj, keyName) {\n let instanceDesc = lookupDescriptor(obj, keyName);\n return isBasicDesc(instanceDesc) && lookupDescriptor(obj.constructor, keyName) === null;\n };\n Model.reopen({\n init() {\n this._super(...arguments);\n if (!isDefaultEmptyDescriptor(this, '_internalModel') || !(this._internalModel instanceof InternalModel)) {\n throw new Error(`'_internalModel' is a reserved property name on instances of classes extending Model. Please choose a different property name for ${this.constructor.toString()}`);\n }\n let ourDescriptor = lookupDescriptor(Model.prototype, 'currentState');\n let theirDescriptor = lookupDescriptor(this, 'currentState');\n let realState = this.___recordState;\n if (ourDescriptor.get !== theirDescriptor.get || realState !== this.currentState) {\n throw new Error(`'currentState' is a reserved property name on instances of classes extending Model. Please choose a different property name for ${this.constructor.toString()}`);\n }\n const ID_DESCRIPTOR = lookupDescriptor(Model.prototype, 'id');\n let idDesc = lookupDescriptor(this, 'id');\n if (idDesc.get !== ID_DESCRIPTOR.get) {\n throw new EmberError(`You may not set 'id' as an attribute on your model. Please remove any lines that look like: \\`id: attr('')\\` from ${this.constructor.toString()}`);\n }\n }\n });\n}\nexport default Model;","import { DEBUG } from '@glimmer/env';\nimport { singularize } from 'ember-inflector';\nimport { normalizeModelName } from '@ember-data/store/-private';\n/**\n @module @ember-data/store\n*/\n\nfunction typeForRelationshipMeta(meta) {\n let modelName = normalizeModelName(meta.type || meta.key);\n if (meta.kind === 'hasMany') {\n modelName = singularize(modelName);\n }\n return modelName;\n}\nfunction shouldFindInverse(relationshipMeta) {\n let options = relationshipMeta.options;\n return !(options && options.inverse === null);\n}\nexport class RelationshipDefinition {\n constructor(meta) {\n this._type = '';\n this.__inverseKey = '';\n this.__inverseIsAsync = true;\n this.__hasCalculatedInverse = false;\n this.parentModelName = meta.parentModelName;\n this.meta = meta;\n }\n\n /**\n * @internal\n * @deprecated\n */\n get key() {\n return this.meta.key;\n }\n get kind() {\n return this.meta.kind;\n }\n get type() {\n if (this._type) {\n return this._type;\n }\n this._type = typeForRelationshipMeta(this.meta);\n return this._type;\n }\n get options() {\n return this.meta.options;\n }\n get name() {\n return this.meta.name;\n }\n _inverseKey(store, modelClass) {\n if (this.__hasCalculatedInverse === false) {\n this._calculateInverse(store, modelClass);\n }\n return this.__inverseKey;\n }\n _inverseIsAsync(store, modelClass) {\n if (this.__hasCalculatedInverse === false) {\n this._calculateInverse(store, modelClass);\n }\n return this.__inverseIsAsync;\n }\n _calculateInverse(store, modelClass) {\n this.__hasCalculatedInverse = true;\n let inverseKey, inverseIsAsync;\n let inverse = null;\n if (shouldFindInverse(this.meta)) {\n inverse = modelClass.inverseFor(this.key, store);\n } else if (DEBUG) {\n modelClass.typeForRelationship(this.key, store);\n }\n if (inverse) {\n inverseKey = inverse.name;\n inverseIsAsync = isRelationshipAsync(inverse);\n } else {\n inverseKey = null;\n inverseIsAsync = false;\n }\n this.__inverseKey = inverseKey;\n this.__inverseIsAsync = inverseIsAsync;\n }\n}\nfunction isRelationshipAsync(meta) {\n let inverseAsync = meta.options && meta.options.async;\n return typeof inverseAsync === 'undefined' ? true : inverseAsync;\n}\nexport function relationshipFromMeta(meta) {\n return new RelationshipDefinition(meta);\n}","import { assert, inspect, warn } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { DEBUG } from '@glimmer/env';\nimport { LEGACY_SUPPORT } from './model';\nimport { computedMacroWithOptionalParams } from './util';\n\n/**\n @module @ember-data/model\n*/\n\n/**\n `belongsTo` is used to define One-To-One and One-To-Many\n relationships on a [Model](/ember-data/release/classes/Model).\n\n\n `belongsTo` takes an optional hash as a second parameter, currently\n supported options are:\n\n - `async`: A boolean value used to explicitly declare this to be an async relationship. The default is true.\n - `inverse`: A string used to identify the inverse property on a\n related model in a One-To-Many relationship. See [Explicit Inverses](#explicit-inverses)\n - `polymorphic` A boolean value to mark the relationship as polymorphic\n\n #### One-To-One\n To declare a one-to-one relationship between two models, use\n `belongsTo`:\n\n ```app/models/user.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @belongsTo('profile') profile;\n }\n ```\n\n ```app/models/profile.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class ProfileModel extends Model {\n @belongsTo('user') user;\n }\n ```\n\n #### One-To-Many\n To declare a one-to-many relationship between two models, use\n `belongsTo` in combination with `hasMany`, like this:\n\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @hasMany('comment') comments;\n }\n ```\n\n ```app/models/comment.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class CommentModel extends Model {\n @belongsTo('post') post;\n }\n ```\n\n You can avoid passing a string as the first parameter. In that case Ember Data\n will infer the type from the key name.\n\n ```app/models/comment.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class CommentModel extends Model {\n @belongsTo post;\n }\n ```\n\n will lookup for a Post type.\n\n #### Sync relationships\n\n Ember Data resolves sync relationships with the related resources\n available in its local store, hence it is expected these resources\n to be loaded before or along-side the primary resource.\n\n ```app/models/comment.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class CommentModel extends Model {\n @belongsTo('post', {\n async: false\n })\n post;\n }\n ```\n\n In contrast to async relationship, accessing a sync relationship\n will always return the record (Model instance) for the existing\n local resource, or null. But it will error on access when\n a related resource is known to exist and it has not been loaded.\n\n ```\n let post = comment.get('post');\n\n ```\n\n @method belongsTo\n @public\n @static\n @for @ember-data/model\n @param {String} modelName (optional) type of the relationship\n @param {Object} options (optional) a hash of options\n @return {Ember.computed} relationship\n*/\nfunction belongsTo(modelName, options) {\n let opts, userEnteredModelName;\n if (typeof modelName === 'object') {\n opts = modelName;\n userEnteredModelName = undefined;\n } else {\n opts = options;\n userEnteredModelName = modelName;\n }\n assert('The first argument to belongsTo must be a string representing a model type key, not an instance of ' + inspect(userEnteredModelName) + \". E.g., to define a relation to the Person model, use belongsTo('person')\", typeof userEnteredModelName === 'string' || typeof userEnteredModelName === 'undefined');\n opts = opts || {};\n if (!('async' in opts)) {\n opts.async = true;\n }\n let meta = {\n type: userEnteredModelName,\n isRelationship: true,\n options: opts,\n kind: 'belongsTo',\n name: 'Belongs To',\n key: null\n };\n return computed({\n get(key) {\n const support = LEGACY_SUPPORT.lookup(this);\n if (DEBUG) {\n if (['_internalModel', 'recordData', 'currentState'].indexOf(key) !== -1) {\n throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your belongsTo on ${this.constructor.toString()}`);\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'serialize')) {\n warn(`You provided a serialize option on the \"${key}\" property in the \"${support.identifier.type}\" class, this belongs in the serializer. See Serializer and it's implementations https://api.emberjs.com/ember-data/release/classes/Serializer`, false, {\n id: 'ds.model.serialize-option-in-belongs-to'\n });\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'embedded')) {\n warn(`You provided an embedded option on the \"${key}\" property in the \"${support.identifier.type}\" class, this belongs in the serializer. See EmbeddedRecordsMixin https://api.emberjs.com/ember-data/release/classes/EmbeddedRecordsMixin`, false, {\n id: 'ds.model.embedded-option-in-belongs-to'\n });\n }\n }\n return support.getBelongsTo(key);\n },\n set(key, value) {\n const support = LEGACY_SUPPORT.lookup(this);\n if (DEBUG) {\n if (['_internalModel', 'recordData', 'currentState'].indexOf(key) !== -1) {\n throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your belongsTo on ${this.constructor.toString()}`);\n }\n }\n this.store._backburner.join(() => {\n support.setDirtyBelongsTo(key, value);\n });\n return support.getBelongsTo(key);\n }\n }).meta(meta);\n}\nexport default computedMacroWithOptionalParams(belongsTo);","/**\n @module @ember-data/model\n*/\nimport { assert, inspect } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { DEBUG } from '@glimmer/env';\nimport { LEGACY_SUPPORT } from './model';\nimport { computedMacroWithOptionalParams } from './util';\n\n/**\n `hasMany` is used to define One-To-Many and Many-To-Many\n relationships on a [Model](/ember-data/release/classes/Model).\n\n `hasMany` takes an optional hash as a second parameter, currently\n supported options are:\n\n - `async`: A boolean value used to explicitly declare this to be an async relationship. The default is true.\n - `inverse`: A string used to identify the inverse property on a related model.\n - `polymorphic` A boolean value to mark the relationship as polymorphic\n\n #### One-To-Many\n To declare a one-to-many relationship between two models, use\n `belongsTo` in combination with `hasMany`, like this:\n\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @hasMany('comment') comments;\n }\n ```\n\n ```app/models/comment.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class CommentModel extends Model {\n @belongsTo('post') post;\n }\n ```\n\n #### Many-To-Many\n To declare a many-to-many relationship between two models, use\n `hasMany`:\n\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @hasMany('tag') tags;\n }\n ```\n\n ```app/models/tag.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class TagModel extends Model {\n @hasMany('post') posts;\n }\n ```\n\n You can avoid passing a string as the first parameter. In that case Ember Data\n will infer the type from the singularized key name.\n\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @hasMany tags;\n }\n ```\n\n will lookup for a Tag type.\n\n #### Explicit Inverses\n\n Ember Data will do its best to discover which relationships map to\n one another. In the one-to-many code above, for example, Ember Data\n can figure out that changing the `comments` relationship should update\n the `post` relationship on the inverse because post is the only\n relationship to that model.\n\n However, sometimes you may have multiple `belongsTo`/`hasMany` for the\n same type. You can specify which property on the related model is\n the inverse using `hasMany`'s `inverse` option:\n\n ```app/models/comment.js\n import Model, { belongsTo } from '@ember-data/model';\n\n export default class CommentModel extends Model {\n @belongsTo('post') onePost;\n @belongsTo('post') twoPost\n @belongsTo('post') redPost;\n @belongsTo('post') bluePost;\n }\n ```\n\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @hasMany('comment', {\n inverse: 'redPost'\n })\n comments;\n }\n ```\n\n You can also specify an inverse on a `belongsTo`, which works how\n you'd expect.\n\n #### Sync relationships\n\n Ember Data resolves sync relationships with the related resources\n available in its local store, hence it is expected these resources\n to be loaded before or along-side the primary resource.\n\n ```app/models/post.js\n import Model, { hasMany } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @hasMany('comment', {\n async: false\n })\n comments;\n }\n ```\n\n In contrast to async relationship, accessing a sync relationship\n will always return a [ManyArray](/ember-data/release/classes/ManyArray) instance\n containing the existing local resources. But it will error on access\n when any of the known related resources have not been loaded.\n\n ```\n post.get('comments').forEach((comment) => {\n\n });\n\n ```\n\n If you are using `links` with sync relationships, you have to use\n `ref.reload` to fetch the resources.\n\n @method hasMany\n @public\n @static\n @for @ember-data/model\n @param {String} type (optional) type of the relationship\n @param {Object} options (optional) a hash of options\n @return {Ember.computed} relationship\n*/\nfunction hasMany(type, options) {\n if (typeof type === 'object') {\n options = type;\n type = undefined;\n }\n assert(`The first argument to hasMany must be a string representing a model type key, not an instance of ${inspect(type)}. E.g., to define a relation to the Comment model, use hasMany('comment')`, typeof type === 'string' || typeof type === 'undefined');\n options = options || {};\n if (!('async' in options)) {\n options.async = true;\n }\n\n // Metadata about relationships is stored on the meta of\n // the relationship. This is used for introspection and\n // serialization. Note that `key` is populated lazily\n // the first time the CP is called.\n let meta = {\n type,\n options,\n isRelationship: true,\n kind: 'hasMany',\n name: 'Has Many',\n key: null\n };\n return computed({\n get(key) {\n if (DEBUG) {\n if (['_internalModel', 'currentState'].indexOf(key) !== -1) {\n throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your hasMany on ${this.constructor.toString()}`);\n }\n }\n return LEGACY_SUPPORT.lookup(this).getHasMany(key);\n },\n set(key, records) {\n if (DEBUG) {\n if (['_internalModel', 'currentState'].indexOf(key) !== -1) {\n throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your hasMany on ${this.constructor.toString()}`);\n }\n }\n const support = LEGACY_SUPPORT.lookup(this);\n this.store._backburner.join(() => {\n support.setDirtyHasMany(key, records);\n });\n return support.getHasMany(key);\n }\n }).meta(meta);\n}\nexport default computedMacroWithOptionalParams(hasMany);","import { getOwner } from '@ember/application';\nimport Model from './model';\n\n/*\n In case someone defined a relationship to a mixin, for example:\n ```\n import Model, { belongsTo, hasMany } from '@ember-data/model';\n import Mixin from '@ember/object/mixin';\n\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, normalizedModelName) {\n let owner = getOwner(store);\n let MaybeMixin = owner.factoryFor(`mixin:${normalizedModelName}`);\n let mixin = MaybeMixin && MaybeMixin.class;\n if (mixin) {\n let ModelForMixin = Model.extend(mixin);\n ModelForMixin.reopenClass({\n __isMixin: true,\n __mixin: mixin\n });\n //Cache the class as a model\n owner.register('model:' + normalizedModelName, ModelForMixin);\n }\n return owner.factoryFor(`model:${normalizedModelName}`);\n}","import { DEBUG } from '@glimmer/env';\n\n// Used by the store to normalize IDs entering the store. Despite the fact\n// that developers may provide IDs as numbers (e.g., `store.findRecord('person', 1)`),\n// it is important that internally we use strings, since IDs may be serialized\n// and lose type information. For example, Ember's router may put a record's\n// ID into the URL, and if we later try to deserialize that URL and find the\n// corresponding record, we will not know if it is a string or a number.\n\nfunction coerceId(id) {\n if (id === null || id === undefined || id === '') {\n return null;\n }\n if (typeof id === 'string') {\n return id;\n }\n if (typeof id === 'symbol') {\n return id.toString();\n }\n return '' + id;\n}\nexport function ensureStringId(id) {\n let normalized = null;\n if (typeof id === 'string') {\n normalized = id.length > 0 ? id : null;\n } else if (typeof id === 'number' && !isNaN(id)) {\n normalized = '' + id;\n }\n if (DEBUG && normalized === null) {\n throw new Error(`Expected id to be a string or number, received ${String(id)}`);\n }\n return normalized;\n}\nexport default coerceId;","import { assert, inspect, warn } from '@ember/debug';\nimport { coerceId, recordDataFor as peekRecordData } from '@ember-data/store/-private';\nexport function expandingGet(cache, key1, key2) {\n let mainCache = cache[key1] = cache[key1] || Object.create(null);\n return mainCache[key2];\n}\nexport function expandingSet(cache, key1, key2, value) {\n let mainCache = cache[key1] = cache[key1] || Object.create(null);\n mainCache[key2] = value;\n}\nexport function assertValidRelationshipPayload(graph, op) {\n const relationship = graph.get(op.record, op.field);\n assert(`Cannot update an implicit relationship`, isHasMany(relationship) || isBelongsTo(relationship));\n const payload = op.value;\n const {\n definition,\n identifier,\n state\n } = relationship;\n const {\n type\n } = identifier;\n const {\n field\n } = op;\n const {\n isAsync,\n kind\n } = definition;\n if (payload.links) {\n warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. EmberData will treat this relationship as known-to-be-empty.`, isAsync || !!payload.data || state.hasReceivedData, {\n id: 'ds.store.push-link-for-sync-relationship'\n });\n } else if (payload.data) {\n if (kind === 'belongsTo') {\n assert(`A ${type} record was pushed into the store with the value of ${field} being ${inspect(payload.data)}, but ${field} is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.`, !Array.isArray(payload.data));\n assertRelationshipData(graph.store._store, identifier, payload.data, definition);\n } else if (kind === 'hasMany') {\n assert(`A ${type} record was pushed into the store with the value of ${field} being '${inspect(payload.data)}', but ${field} is a hasMany relationship so the value must be an array. You should probably check your data payload or serializer.`, Array.isArray(payload.data));\n if (Array.isArray(payload.data)) {\n for (let i = 0; i < payload.data.length; i++) {\n assertRelationshipData(graph.store._store, identifier, payload.data[i], definition);\n }\n }\n }\n }\n}\nexport function isNew(identifier) {\n if (!identifier.id) {\n return true;\n }\n const recordData = peekRecordData(identifier);\n return recordData ? isRelationshipRecordData(recordData) && recordData.isNew() : false;\n}\nfunction isRelationshipRecordData(recordData) {\n return typeof recordData.isNew === 'function';\n}\nexport function isBelongsTo(relationship) {\n return relationship.definition.kind === 'belongsTo';\n}\nexport function isImplicit(relationship) {\n return relationship.definition.isImplicit;\n}\nexport function isHasMany(relationship) {\n return relationship.definition.kind === 'hasMany';\n}\nexport function assertRelationshipData(store, identifier, data, meta) {\n assert(`A ${identifier.type} record was pushed into the store with the value of ${meta.key} being '${JSON.stringify(data)}', but ${meta.key} is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.`, !Array.isArray(data));\n assert(`Encountered a relationship identifier without a type for the ${meta.kind} relationship '${meta.key}' on <${identifier.type}:${identifier.id}>, expected a json-api identifier with type '${meta.type}' but found '${JSON.stringify(data)}'. Please check your serializer and make sure it is serializing the relationship payload into a JSON API format.`, data === null || typeof data.type === 'string' && data.type.length);\n assert(`Encountered a relationship identifier without an id for the ${meta.kind} relationship '${meta.key}' on <${identifier.type}:${identifier.id}>, expected a json-api identifier but found '${JSON.stringify(data)}'. Please check your serializer and make sure it is serializing the relationship payload into a JSON API format.`, data === null || !!coerceId(data.id));\n assert(`Encountered a relationship identifier with type '${data.type}' for the ${meta.kind} relationship '${meta.key}' on <${identifier.type}:${identifier.id}>, Expected a json-api identifier with type '${meta.type}'. No model was found for '${data.type}'.`, data === null || !data.type || store.getSchemaDefinitionService().doesTypeExist(data.type));\n}","import { createState } from '../../graph/-state';\nimport { isNew } from '../../graph/-utils';\nexport default class BelongsToRelationship {\n constructor(graph, definition, identifier) {\n this.graph = graph;\n this.store = graph.store;\n this.definition = definition;\n this.identifier = identifier;\n this._state = null;\n this.transactionRef = 0;\n this.meta = null;\n this.links = null;\n this.localState = null;\n this.remoteState = null;\n }\n get state() {\n let {\n _state\n } = this;\n if (!_state) {\n _state = this._state = createState();\n }\n return _state;\n }\n recordDataDidDematerialize() {\n if (this.definition.inverseIsImplicit) {\n return;\n }\n const inverseKey = this.definition.inverseKey;\n const callback = inverseIdentifier => {\n if (!inverseIdentifier || !this.graph.has(inverseIdentifier, inverseKey)) {\n return;\n }\n let relationship = this.graph.get(inverseIdentifier, inverseKey);\n\n // For canonical members, it is possible that inverseRecordData has already been associated to\n // to another record. For such cases, do not dematerialize the inverseRecordData\n if (relationship.definition.kind !== 'belongsTo' || !relationship.localState || this.identifier === relationship.localState) {\n relationship.inverseDidDematerialize(this.identifier);\n }\n };\n if (this.remoteState) {\n callback(this.remoteState);\n }\n if (this.localState && this.localState !== this.remoteState) {\n callback(this.localState);\n }\n }\n inverseDidDematerialize() {\n const inverseRecordData = this.localState;\n if (!this.definition.isAsync || inverseRecordData && isNew(inverseRecordData)) {\n // unloading inverse of a sync relationship is treated as a client-side\n // delete, so actually remove the models don't merely invalidate the cp\n // cache.\n // if the record being unloaded only exists on the client, we similarly\n // treat it as a client side delete\n if (this.localState === inverseRecordData && inverseRecordData !== null) {\n this.localState = null;\n }\n if (this.remoteState === inverseRecordData && inverseRecordData !== null) {\n this.remoteState = null;\n this.state.hasReceivedData = true;\n this.state.isEmpty = true;\n if (this.localState && !isNew(this.localState)) {\n this.localState = null;\n }\n }\n } else {\n this.state.hasDematerializedInverse = true;\n }\n this.notifyBelongsToChange();\n }\n getData() {\n let data;\n let payload = {};\n if (this.localState) {\n data = this.localState;\n }\n if (this.localState === null && this.state.hasReceivedData) {\n data = null;\n }\n if (this.links) {\n payload.links = this.links;\n }\n if (data !== undefined) {\n payload.data = data;\n }\n if (this.meta) {\n payload.meta = this.meta;\n }\n payload._relationship = this;\n return payload;\n }\n\n /*\n Removes the given RecordData from BOTH canonical AND current state.\n This method is useful when either a deletion or a rollback on a new record\n needs to entirely purge itself from an inverse relationship.\n */\n removeCompletelyFromOwn(recordData) {\n if (this.remoteState === recordData) {\n this.remoteState = null;\n }\n if (this.localState === recordData) {\n this.localState = null;\n // This allows dematerialized inverses to be rematerialized\n // we shouldn't be notifying here though, figure out where\n // a notification was missed elsewhere.\n this.notifyBelongsToChange();\n }\n }\n notifyBelongsToChange() {\n let recordData = this.identifier;\n this.store.notifyBelongsToChange(recordData.type, recordData.id, recordData.lid, this.definition.key);\n }\n clear() {\n this.localState = null;\n this.remoteState = null;\n this.state.hasReceivedData = false;\n this.state.isEmpty = true;\n }\n}","export function createState() {\n return {\n hasReceivedData: false,\n isEmpty: true,\n isStale: false,\n hasFailedLoadAttempt: false,\n shouldForceReload: false,\n hasDematerializedInverse: false\n };\n}","import { assert } from '@ember/debug';\nimport { createState } from '../../graph/-state';\nimport { isImplicit, isNew } from '../../graph/-utils';\nexport default class ManyRelationship {\n constructor(graph, definition, identifier) {\n this.graph = graph;\n this.store = graph.store;\n this.definition = definition;\n this.identifier = identifier;\n this._state = null;\n this.transactionRef = 0;\n this.members = new Set();\n this.canonicalMembers = new Set();\n this.meta = null;\n this.links = null;\n\n // persisted state\n this.canonicalState = [];\n // local client state\n this.currentState = [];\n this._willUpdateManyArray = false;\n this._pendingManyArrayUpdates = null;\n }\n get state() {\n let {\n _state\n } = this;\n if (!_state) {\n _state = this._state = createState();\n }\n return _state;\n }\n recordDataDidDematerialize() {\n if (this.definition.inverseIsImplicit) {\n return;\n }\n const inverseKey = this.definition.inverseKey;\n this.forAllMembers(inverseIdentifier => {\n inverseIdentifier;\n if (!inverseIdentifier || !this.graph.has(inverseIdentifier, inverseKey)) {\n return;\n }\n let relationship = this.graph.get(inverseIdentifier, inverseKey);\n assert(`expected no implicit`, !isImplicit(relationship));\n\n // For canonical members, it is possible that inverseRecordData has already been associated to\n // to another record. For such cases, do not dematerialize the inverseRecordData\n if (relationship.definition.kind !== 'belongsTo' || !relationship.localState || this.identifier === relationship.localState) {\n relationship.inverseDidDematerialize(this.identifier);\n }\n });\n }\n forAllMembers(callback) {\n // ensure we don't walk anything twice if an entry is\n // in both members and canonicalMembers\n let seen = Object.create(null);\n for (let i = 0; i < this.currentState.length; i++) {\n const inverseInternalModel = this.currentState[i];\n const id = inverseInternalModel.lid;\n if (!seen[id]) {\n seen[id] = true;\n callback(inverseInternalModel);\n }\n }\n for (let i = 0; i < this.canonicalState.length; i++) {\n const inverseInternalModel = this.canonicalState[i];\n const id = inverseInternalModel.lid;\n if (!seen[id]) {\n seen[id] = true;\n callback(inverseInternalModel);\n }\n }\n }\n clear() {\n this.members.clear();\n this.canonicalMembers.clear();\n this.currentState = [];\n this.canonicalState = [];\n }\n inverseDidDematerialize(inverseRecordData) {\n if (!this.definition.isAsync || inverseRecordData && isNew(inverseRecordData)) {\n // unloading inverse of a sync relationship is treated as a client-side\n // delete, so actually remove the models don't merely invalidate the cp\n // cache.\n // if the record being unloaded only exists on the client, we similarly\n // treat it as a client side delete\n this.removeCompletelyFromOwn(inverseRecordData);\n } else {\n this.state.hasDematerializedInverse = true;\n }\n this.notifyHasManyChange();\n }\n\n /*\n Removes the given RecordData from BOTH canonical AND current state.\n This method is useful when either a deletion or a rollback on a new record\n needs to entirely purge itself from an inverse relationship.\n */\n removeCompletelyFromOwn(recordData) {\n this.canonicalMembers.delete(recordData);\n this.members.delete(recordData);\n const canonicalIndex = this.canonicalState.indexOf(recordData);\n if (canonicalIndex !== -1) {\n this.canonicalState.splice(canonicalIndex, 1);\n }\n const currentIndex = this.currentState.indexOf(recordData);\n if (currentIndex !== -1) {\n this.currentState.splice(currentIndex, 1);\n // This allows dematerialized inverses to be rematerialized\n // we shouldn't be notifying here though, figure out where\n // a notification was missed elsewhere.\n this.notifyHasManyChange();\n }\n }\n notifyHasManyChange() {\n const {\n store,\n identifier: recordData\n } = this;\n store.notifyHasManyChange(recordData.type, recordData.id, recordData.lid, this.definition.key);\n }\n getData() {\n let payload = {};\n if (this.state.hasReceivedData) {\n payload.data = this.currentState.slice();\n }\n if (this.links) {\n payload.links = this.links;\n }\n if (this.meta) {\n payload.meta = this.meta;\n }\n return payload;\n }\n}","/**\n @module @ember-data/store\n*/\nexport default class ImplicitRelationship {\n constructor(graph, definition, identifier) {\n this.graph = graph;\n this.definition = definition;\n this.identifier = identifier;\n this.members = new Set();\n this.canonicalMembers = new Set();\n }\n addCanonicalRecordData(recordData, idx) {\n if (!this.canonicalMembers.has(recordData)) {\n this.canonicalMembers.add(recordData);\n this.members.add(recordData);\n }\n }\n addRecordData(recordData, idx) {\n if (!this.members.has(recordData)) {\n this.members.add(recordData);\n }\n }\n removeRecordData(recordData) {\n if (recordData && this.members.has(recordData)) {\n this.members.delete(recordData);\n }\n }\n removeCompletelyFromOwn(recordData) {\n this.canonicalMembers.delete(recordData);\n this.members.delete(recordData);\n }\n clear() {\n this.canonicalMembers.clear();\n this.members.clear();\n }\n}","import { assert } from '@ember/debug';\nimport { expandingGet, expandingSet } from './-utils';\nconst BOOL_LATER = null;\nconst STR_LATER = '';\nconst IMPLICIT_KEY_RAND = Date.now();\nfunction implicitKeyFor(type, key) {\n return `implicit-${type}:${key}${IMPLICIT_KEY_RAND}`;\n}\nfunction syncMeta(definition, inverseDefinition) {\n definition.inverseKind = inverseDefinition.kind;\n definition.inverseKey = inverseDefinition.key;\n definition.inverseType = inverseDefinition.type;\n definition.inverseIsAsync = inverseDefinition.isAsync;\n definition.inverseIsCollection = inverseDefinition.isCollection;\n definition.inverseIsPolymorphic = inverseDefinition.isPolymorphic;\n definition.inverseIsImplicit = inverseDefinition.isImplicit;\n}\nfunction upgradeMeta(meta) {\n let niceMeta = {};\n let options = meta.options;\n niceMeta.kind = meta.kind;\n niceMeta.key = meta.name;\n niceMeta.type = meta.type;\n niceMeta.isAsync = options && options.async !== undefined ? !!options.async : true;\n niceMeta.isImplicit = false;\n niceMeta.isCollection = meta.kind === 'hasMany';\n niceMeta.isPolymorphic = options && !!options.polymorphic;\n niceMeta.inverseKey = options && options.inverse || STR_LATER;\n niceMeta.inverseType = STR_LATER;\n niceMeta.inverseIsAsync = BOOL_LATER;\n niceMeta.inverseIsImplicit = options && options.inverse === null || BOOL_LATER;\n niceMeta.inverseIsCollection = BOOL_LATER;\n return niceMeta;\n}\nexport function isLHS(info, type, key) {\n let isSelfReferential = info.isSelfReferential;\n let isRelationship = key === info.lhs_relationshipName;\n if (isRelationship === true) {\n return isSelfReferential === true ||\n // itself\n type === info.lhs_baseModelName ||\n // base or non-polymorphic\n // if the other side is polymorphic then we need to scan our modelNames\n info.rhs_isPolymorphic && info.lhs_modelNames.indexOf(type) !== -1 // polymorphic\n ;\n }\n return false;\n}\nexport function isRHS(info, type, key) {\n let isSelfReferential = info.isSelfReferential;\n let isRelationship = key === info.rhs_relationshipName;\n if (isRelationship === true) {\n return isSelfReferential === true ||\n // itself\n type === info.rhs_baseModelName ||\n // base or non-polymorphic\n // if the other side is polymorphic then we need to scan our modelNames\n info.lhs_isPolymorphic && info.rhs_modelNames.indexOf(type) !== -1 // polymorphic\n ;\n }\n return false;\n}\nexport function upgradeDefinition(graph, identifier, propertyName, isImplicit = false) {\n const cache = graph._definitionCache;\n const storeWrapper = graph.store;\n const polymorphicLookup = graph._potentialPolymorphicTypes;\n const {\n type\n } = identifier;\n let cached = expandingGet(cache, type, propertyName);\n\n // CASE: We have a cached resolution (null if no relationship exists)\n if (cached !== undefined) {\n return cached;\n }\n assert(`Expected to find relationship definition in the cache for the implicit relationship ${propertyName}`, !isImplicit);\n let relationships = storeWrapper.relationshipsDefinitionFor(type);\n assert(`Expected to have a relationship definition for ${type} but none was found.`, relationships);\n let meta = relationships[propertyName];\n if (!meta) {\n if (polymorphicLookup[type]) {\n const altTypes = Object.keys(polymorphicLookup[type]);\n for (let i = 0; i < altTypes.length; i++) {\n let cached = expandingGet(cache, altTypes[i], propertyName);\n if (cached) {\n expandingSet(cache, type, propertyName, cached);\n return cached;\n }\n }\n }\n\n // CASE: We don't have a relationship at all\n // we should only hit this in prod\n assert(`Expected to find a relationship definition for ${type}.${propertyName} but none was found.`, meta);\n cache[type][propertyName] = null;\n return null;\n }\n const definition = upgradeMeta(meta);\n let inverseDefinition;\n let inverseKey;\n const inverseType = definition.type;\n\n // CASE: Inverse is explicitly null\n if (definition.inverseKey === null) {\n assert(`Expected the inverse model to exist`, storeWrapper._store.modelFor(inverseType));\n inverseDefinition = null;\n } else {\n inverseKey = storeWrapper.inverseForRelationship(type, propertyName);\n\n // CASE: Inverse resolves to null\n if (!inverseKey) {\n inverseDefinition = null;\n } else {\n // CASE: We have an explicit inverse or were able to resolve one\n let inverseDefinitions = storeWrapper.relationshipsDefinitionFor(inverseType);\n assert(`Expected to have a relationship definition for ${inverseType} but none was found.`, inverseDefinitions);\n let meta = inverseDefinitions[inverseKey];\n assert(`Expected to find a relationship definition for ${inverseType}.${inverseKey} but none was found.`, meta);\n inverseDefinition = upgradeMeta(meta);\n }\n }\n\n // CASE: We have no inverse\n if (!inverseDefinition) {\n // polish off meta\n inverseKey = implicitKeyFor(type, propertyName);\n inverseDefinition = {\n kind: 'implicit',\n key: inverseKey,\n type: type,\n isAsync: false,\n isImplicit: true,\n isCollection: true,\n // with implicits any number of records could point at us\n isPolymorphic: false\n };\n syncMeta(definition, inverseDefinition);\n syncMeta(inverseDefinition, definition);\n const info = {\n lhs_key: `${type}:${propertyName}`,\n lhs_modelNames: [type],\n lhs_baseModelName: type,\n lhs_relationshipName: propertyName,\n lhs_definition: definition,\n lhs_isPolymorphic: definition.isPolymorphic,\n rhs_key: '',\n rhs_modelNames: [],\n rhs_baseModelName: inverseType,\n rhs_relationshipName: '',\n rhs_definition: inverseDefinition,\n rhs_isPolymorphic: false,\n hasInverse: false,\n isSelfReferential: type === inverseType,\n // this could be wrong if we are self-referential but also polymorphic\n isReflexive: false // we can't be reflexive if we don't define an inverse\n };\n expandingSet(cache, inverseType, inverseKey, info);\n expandingSet(cache, type, propertyName, info);\n return info;\n }\n\n // CASE: We do have an inverse\n const baseType = inverseDefinition.type;\n\n // TODO we want to assert this but this breaks all of our shoddily written tests\n /*\n if (DEBUG) {\n let inverseDoubleCheck = inverseMeta.type.inverseFor(inverseRelationshipName, store);\n assert(`The ${inverseBaseModelName}:${inverseRelationshipName} relationship declares 'inverse: null', but it was resolved as the inverse for ${baseModelName}:${relationshipName}.`, inverseDoubleCheck);\n }\n */\n // CASE: We may have already discovered the inverse for the baseModelName\n // CASE: We have already discovered the inverse\n cached = expandingGet(cache, baseType, propertyName) || expandingGet(cache, inverseType, inverseKey);\n if (cached) {\n // TODO this assert can be removed if the above assert is enabled\n assert(`The ${inverseType}:${inverseKey} relationship declares 'inverse: null', but it was resolved as the inverse for ${type}:${propertyName}.`, cached.hasInverse !== false);\n let isLHS = cached.lhs_baseModelName === baseType;\n let modelNames = isLHS ? cached.lhs_modelNames : cached.rhs_modelNames;\n // make this lookup easier in the future by caching the key\n modelNames.push(type);\n expandingSet(cache, type, propertyName, cached);\n return cached;\n }\n\n // this is our first time so polish off the metas\n syncMeta(definition, inverseDefinition);\n syncMeta(inverseDefinition, definition);\n const lhs_modelNames = [type];\n if (type !== baseType) {\n lhs_modelNames.push(baseType);\n }\n const isSelfReferential = type === inverseType;\n const info = {\n lhs_key: `${baseType}:${propertyName}`,\n lhs_modelNames,\n lhs_baseModelName: baseType,\n lhs_relationshipName: propertyName,\n lhs_definition: definition,\n lhs_isPolymorphic: definition.isPolymorphic,\n rhs_key: `${inverseType}:${inverseKey}`,\n rhs_modelNames: [inverseType],\n rhs_baseModelName: inverseType,\n rhs_relationshipName: inverseKey,\n rhs_definition: inverseDefinition,\n rhs_isPolymorphic: inverseDefinition.isPolymorphic,\n hasInverse: true,\n isSelfReferential,\n isReflexive: isSelfReferential && propertyName === inverseKey\n };\n\n // Create entries for the baseModelName as well as modelName to speed up\n // inverse lookups\n expandingSet(cache, baseType, propertyName, info);\n expandingSet(cache, type, propertyName, info);\n\n // Greedily populate the inverse\n expandingSet(cache, inverseType, inverseKey, info);\n return info;\n}","import { assert } from '@ember/debug';\nimport { isBelongsTo, isHasMany, isNew } from '../-utils';\n/*\n case many:1\n ========\n In a bi-directional graph with Many:1 edges, adding a value\n results in up-to 3 discrete value transitions, while removing\n a value is only 2 transitions.\n\n For adding C to A\n If: A <<-> B, C <->> D is the initial state,\n and: B <->> A <<-> C, D is the final state\n\n then we would undergo the following transitions.\n\n add C to A\n remove C from D\n add A to C\n\n For removing B from A\n If: A <<-> B, C <->> D is the initial state,\n and: A, B, C <->> D is the final state\n\n then we would undergo the following transitions.\n\n remove B from A\n remove A from B\n\n case many:many\n ===========\n In a bi-directional graph with Many:Many edges, adding or\n removing a value requires only 2 value transitions.\n\n For Adding\n If: A<<->>B, C<<->>D is the initial state (double arrows representing the many side)\n And: D<<->>C<<->>A<<->>B is the final state\n\n Then we would undergo two transitions.\n\n add C to A.\n add A to C\n\n For Removing\n If: A<<->>B, C<<->>D is the initial state (double arrows representing the many side)\n And: A, B, C<<->>D is the final state\n\n Then we would undergo two transitions.\n\n remove B from A\n remove A from B\n\n case many:?\n ========\n In a uni-directional graph with Many:? edges (modeled in EmberData with `inverse:null`) with\n artificial (implicit) inverses, replacing a value results in 2 discrete value transitions.\n This is because a Many:? relationship is effectively Many:Many.\n */\nexport default function replaceRelatedRecords(graph, op, isRemote) {\n if (isRemote) {\n replaceRelatedRecordsRemote(graph, op, isRemote);\n } else {\n replaceRelatedRecordsLocal(graph, op, isRemote);\n }\n}\nfunction replaceRelatedRecordsLocal(graph, op, isRemote) {\n const identifiers = op.value;\n const relationship = graph.get(op.record, op.field);\n assert(`expected hasMany relationship`, isHasMany(relationship));\n relationship.state.hasReceivedData = true;\n\n // cache existing state\n const {\n currentState,\n members,\n definition\n } = relationship;\n const newValues = new Set(identifiers);\n const identifiersLength = identifiers.length;\n const newState = new Array(newValues.size);\n const newMembership = new Set();\n\n // wipe existing state\n relationship.members = newMembership;\n relationship.currentState = newState;\n const {\n type\n } = relationship.definition;\n let changed = false;\n const currentLength = currentState.length;\n const iterationLength = currentLength > identifiersLength ? currentLength : identifiersLength;\n const equalLength = currentLength === identifiersLength;\n for (let i = 0, j = 0; i < iterationLength; i++) {\n let adv = false;\n if (i < identifiersLength) {\n const identifier = identifiers[i];\n // skip processing if we encounter a duplicate identifier in the array\n if (!newMembership.has(identifier)) {\n if (type !== identifier.type) {\n graph.registerPolymorphicType(type, identifier.type);\n }\n newState[j] = identifier;\n adv = true;\n newMembership.add(identifier);\n if (!members.has(identifier)) {\n changed = true;\n addToInverse(graph, identifier, definition.inverseKey, op.record, isRemote);\n }\n }\n }\n if (i < currentLength) {\n const identifier = currentState[i];\n\n // detect reordering\n if (!newMembership.has(identifier)) {\n if (equalLength && newState[i] !== identifier) {\n changed = true;\n }\n if (!newValues.has(identifier)) {\n changed = true;\n removeFromInverse(graph, identifier, definition.inverseKey, op.record, isRemote);\n }\n }\n }\n if (adv) {\n j++;\n }\n }\n if (changed) {\n relationship.notifyHasManyChange();\n }\n}\nfunction replaceRelatedRecordsRemote(graph, op, isRemote) {\n const identifiers = op.value;\n const relationship = graph.get(op.record, op.field);\n assert(`You can only '${op.op}' on a hasMany relationship. ${op.record.type}.${op.field} is a ${relationship.definition.kind}`, isHasMany(relationship));\n if (isRemote) {\n graph._addToTransaction(relationship);\n }\n relationship.state.hasReceivedData = true;\n\n // cache existing state\n const {\n canonicalState,\n canonicalMembers,\n definition\n } = relationship;\n const newValues = new Set(identifiers);\n const identifiersLength = identifiers.length;\n const newState = new Array(newValues.size);\n const newMembership = new Set();\n\n // wipe existing state\n relationship.canonicalMembers = newMembership;\n relationship.canonicalState = newState;\n const {\n type\n } = relationship.definition;\n let changed = false;\n const canonicalLength = canonicalState.length;\n const iterationLength = canonicalLength > identifiersLength ? canonicalLength : identifiersLength;\n const equalLength = canonicalLength === identifiersLength;\n for (let i = 0, j = 0; i < iterationLength; i++) {\n let adv = false;\n if (i < identifiersLength) {\n const identifier = identifiers[i];\n if (!newMembership.has(identifier)) {\n if (type !== identifier.type) {\n graph.registerPolymorphicType(type, identifier.type);\n }\n newState[j] = identifier;\n newMembership.add(identifier);\n adv = true;\n if (!canonicalMembers.has(identifier)) {\n changed = true;\n addToInverse(graph, identifier, definition.inverseKey, op.record, isRemote);\n }\n }\n }\n if (i < canonicalLength) {\n const identifier = canonicalState[i];\n if (!newMembership.has(identifier)) {\n // detect reordering\n if (equalLength && newState[j] !== identifier) {\n changed = true;\n }\n if (!newValues.has(identifier)) {\n changed = true;\n removeFromInverse(graph, identifier, definition.inverseKey, op.record, isRemote);\n }\n }\n }\n if (adv) {\n j++;\n }\n }\n if (changed) {\n flushCanonical(graph, relationship);\n /*\n replaceRelatedRecordsLocal(\n graph,\n {\n op: op.op,\n record: op.record,\n field: op.field,\n value: canonicalState,\n },\n false\n );*/\n } else {\n // preserve legacy behavior we want to change but requires some sort\n // of deprecation.\n flushCanonical(graph, relationship);\n }\n}\nexport function addToInverse(graph, identifier, key, value, isRemote) {\n const relationship = graph.get(identifier, key);\n const {\n type\n } = relationship.definition;\n if (type !== value.type) {\n graph.registerPolymorphicType(type, value.type);\n }\n if (isBelongsTo(relationship)) {\n relationship.state.hasReceivedData = true;\n relationship.state.isEmpty = false;\n if (isRemote) {\n graph._addToTransaction(relationship);\n if (relationship.remoteState !== null) {\n removeFromInverse(graph, relationship.remoteState, relationship.definition.inverseKey, identifier, isRemote);\n }\n relationship.remoteState = value;\n }\n if (relationship.localState !== value) {\n if (!isRemote && relationship.localState) {\n removeFromInverse(graph, relationship.localState, relationship.definition.inverseKey, identifier, isRemote);\n }\n relationship.localState = value;\n relationship.notifyBelongsToChange();\n }\n } else if (isHasMany(relationship)) {\n if (isRemote) {\n if (!relationship.canonicalMembers.has(value)) {\n graph._addToTransaction(relationship);\n relationship.canonicalState.push(value);\n relationship.canonicalMembers.add(value);\n relationship.state.hasReceivedData = true;\n flushCanonical(graph, relationship);\n }\n } else {\n if (!relationship.members.has(value)) {\n relationship.currentState.push(value);\n relationship.members.add(value);\n relationship.state.hasReceivedData = true;\n relationship.notifyHasManyChange();\n }\n }\n } else {\n if (isRemote) {\n relationship.addCanonicalRecordData(value);\n } else {\n relationship.addRecordData(value);\n }\n }\n}\nexport function notifyInverseOfPotentialMaterialization(graph, identifier, key, value, isRemote) {\n const relationship = graph.get(identifier, key);\n if (isHasMany(relationship) && isRemote && relationship.canonicalMembers.has(value)) {\n relationship.notifyHasManyChange();\n }\n}\nexport function removeFromInverse(graph, identifier, key, value, isRemote) {\n const relationship = graph.get(identifier, key);\n if (isBelongsTo(relationship)) {\n relationship.state.isEmpty = true;\n if (isRemote) {\n graph._addToTransaction(relationship);\n relationship.remoteState = null;\n }\n if (relationship.localState === value) {\n relationship.localState = null;\n relationship.notifyBelongsToChange();\n }\n } else if (isHasMany(relationship)) {\n if (isRemote) {\n graph._addToTransaction(relationship);\n let index = relationship.canonicalState.indexOf(value);\n if (index !== -1) {\n relationship.canonicalMembers.delete(value);\n relationship.canonicalState.splice(index, 1);\n }\n }\n let index = relationship.currentState.indexOf(value);\n if (index !== -1) {\n relationship.members.delete(value);\n relationship.currentState.splice(index, 1);\n }\n relationship.notifyHasManyChange();\n } else {\n if (isRemote) {\n relationship.removeCompletelyFromOwn(value);\n } else {\n relationship.removeRecordData(value);\n }\n }\n}\nexport function syncRemoteToLocal(rel) {\n let toSet = rel.canonicalState;\n let newRecordDatas = rel.currentState.filter(recordData => isNew(recordData) && toSet.indexOf(recordData) === -1);\n let existingState = rel.currentState;\n rel.currentState = toSet.concat(newRecordDatas);\n let members = rel.members = new Set();\n rel.canonicalMembers.forEach(v => members.add(v));\n for (let i = 0; i < newRecordDatas.length; i++) {\n members.add(newRecordDatas[i]);\n }\n\n // TODO always notifying fails only one test and we should probably do away with it\n if (existingState.length !== rel.currentState.length) {\n rel.notifyHasManyChange();\n } else {\n for (let i = 0; i < existingState.length; i++) {\n if (existingState[i] !== rel.currentState[i]) {\n rel.notifyHasManyChange();\n break;\n }\n }\n }\n}\nfunction flushCanonical(graph, rel) {\n graph._scheduleLocalSync(rel);\n}","import { assert } from '@ember/debug';\nimport { isHasMany } from '../-utils';\nimport { addToInverse } from './replace-related-records';\nexport default function addToRelatedRecords(graph, op, isRemote) {\n const {\n record,\n value,\n index\n } = op;\n const relationship = graph.get(record, op.field);\n assert(`You can only '${op.op}' on a hasMany relationship. ${record.type}.${op.field} is a ${relationship.definition.kind}`, isHasMany(relationship));\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n addRelatedRecord(graph, relationship, record, value[i], index !== undefined ? index + i : index, isRemote);\n }\n } else {\n addRelatedRecord(graph, relationship, record, value, index, isRemote);\n }\n relationship.notifyHasManyChange();\n}\nfunction addRelatedRecord(graph, relationship, record, value, index, isRemote) {\n assert(`expected an identifier to add to the relationship`, value);\n const {\n members,\n currentState\n } = relationship;\n if (members.has(value)) {\n return;\n }\n const {\n type\n } = relationship.definition;\n if (type !== value.type) {\n graph.registerPolymorphicType(value.type, type);\n }\n relationship.state.hasReceivedData = true;\n members.add(value);\n if (index === undefined) {\n currentState.push(value);\n } else {\n currentState.splice(index, 0, value);\n }\n addToInverse(graph, value, relationship.definition.inverseKey, record, isRemote);\n}","import { assert } from '@ember/debug';\nimport { isHasMany } from '../-utils';\nimport { removeFromInverse } from './replace-related-records';\nexport default function removeFromRelatedRecords(graph, op, isRemote) {\n const {\n record,\n value\n } = op;\n const relationship = graph.get(record, op.field);\n assert(`You can only '${op.op}' on a hasMany relationship. ${record.type}.${op.field} is a ${relationship.definition.kind}`, isHasMany(relationship));\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n removeRelatedRecord(graph, relationship, record, value[i], isRemote);\n }\n } else {\n removeRelatedRecord(graph, relationship, record, value, isRemote);\n }\n relationship.notifyHasManyChange();\n}\nfunction removeRelatedRecord(graph, relationship, record, value, isRemote) {\n assert(`expected an identifier to add to the relationship`, value);\n const {\n members,\n currentState\n } = relationship;\n if (!members.has(value)) {\n return;\n }\n members.delete(value);\n let index = currentState.indexOf(value);\n assert(`expected members and currentState to be in sync`, index !== -1);\n currentState.splice(index, 1);\n removeFromInverse(graph, value, relationship.definition.inverseKey, record, isRemote);\n}","/*\n This method normalizes a link to an \"links object\". If the passed link is\n already an object it's returned without any modifications.\n\n See http://jsonapi.org/format/#document-links for more information.\n*/\nexport default function _normalizeLink(link) {\n switch (typeof link) {\n case 'object':\n return link;\n case 'string':\n return {\n href: link\n };\n }\n}","import { assert } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport { WeakCache } from '@ember-data/store/-private';\nimport BelongsToRelationship from '../relationships/state/belongs-to';\nimport ManyRelationship from '../relationships/state/has-many';\nimport ImplicitRelationship from '../relationships/state/implicit';\nimport { isLHS, upgradeDefinition } from './-edge-definition';\nimport { assertValidRelationshipPayload, isBelongsTo, isHasMany, isImplicit } from './-utils';\nimport addToRelatedRecords from './operations/add-to-related-records';\nimport removeFromRelatedRecords from './operations/remove-from-related-records';\nimport replaceRelatedRecord from './operations/replace-related-record';\nimport replaceRelatedRecords, { syncRemoteToLocal } from './operations/replace-related-records';\nimport updateRelationshipOperation from './operations/update-relationship';\nconst Graphs = new WeakCache(DEBUG ? 'graph' : '');\nGraphs._generator = wrapper => {\n const graph = new Graph(wrapper);\n\n // in DEBUG we attach the graph to the main store for improved debuggability\n if (DEBUG) {\n Graphs.set(wrapper._store, graph);\n }\n return graph;\n};\nfunction isStore(maybeStore) {\n return maybeStore._instanceCache !== undefined;\n}\nfunction getWrapper(store) {\n return isStore(store) ? store._instanceCache._storeWrapper : store;\n}\nexport function peekGraph(store) {\n return Graphs.get(getWrapper(store));\n}\nexport function graphFor(store) {\n return Graphs.lookup(getWrapper(store));\n}\n\n/*\n * Graph acts as the cache for relationship data. It allows for\n * us to ask about and update relationships for a given Identifier\n * without requiring other objects for that Identifier to be\n * instantiated (such as `InternalModel`, `RecordData` or a `Record`)\n *\n * This also allows for us to make more substantive changes to relationships\n * with increasingly minor alterations to other portions of the internals\n * over time.\n *\n * The graph is made up of nodes and edges. Each unique identifier gets\n * its own node, which is a dictionary with a list of that node's edges\n * (or connections) to other nodes. In `Model` terms, a node represents a\n * record instance, with each key (an edge) in the dictionary correlating\n * to either a `hasMany` or `belongsTo` field on that record instance.\n *\n * The value for each key, or `edge` is the identifier(s) the node relates\n * to in the graph from that key.\n */\nexport class Graph {\n constructor(store) {\n this._definitionCache = Object.create(null);\n this._potentialPolymorphicTypes = Object.create(null);\n this.identifiers = new Map();\n this.store = store;\n this._willSyncRemote = false;\n this._willSyncLocal = false;\n this._pushedUpdates = {\n belongsTo: [],\n hasMany: [],\n deletions: []\n };\n this._updatedRelationships = new Set();\n this._transaction = null;\n }\n has(identifier, propertyName) {\n let relationships = this.identifiers.get(identifier);\n if (!relationships) {\n return false;\n }\n return relationships[propertyName] !== undefined;\n }\n get(identifier, propertyName) {\n assert(`expected propertyName`, propertyName);\n let relationships = this.identifiers.get(identifier);\n if (!relationships) {\n relationships = Object.create(null);\n this.identifiers.set(identifier, relationships);\n }\n let relationship = relationships[propertyName];\n if (!relationship) {\n const info = upgradeDefinition(this, identifier, propertyName);\n assert(`Could not determine relationship information for ${identifier.type}.${propertyName}`, info !== null);\n const meta = isLHS(info, identifier.type, propertyName) ? info.lhs_definition : info.rhs_definition;\n const Klass = meta.kind === 'hasMany' ? ManyRelationship : meta.kind === 'belongsTo' ? BelongsToRelationship : ImplicitRelationship;\n relationship = relationships[propertyName] = new Klass(this, meta, identifier);\n }\n return relationship;\n }\n\n /*\n * Allows for the graph to dynamically discover polymorphic connections\n * without needing to walk prototype chains.\n *\n * Used by edges when an added `type` does not match the expected `type`\n * for that edge.\n *\n * Currently we assert before calling this. For a public API we will want\n * to call out to the schema manager to ask if we should consider these\n * types as equivalent for a given relationship.\n */\n registerPolymorphicType(type1, type2) {\n const typeCache = this._potentialPolymorphicTypes;\n let t1 = typeCache[type1];\n if (!t1) {\n t1 = typeCache[type1] = Object.create(null);\n }\n t1[type2] = true;\n let t2 = typeCache[type2];\n if (!t2) {\n t2 = typeCache[type2] = Object.create(null);\n }\n t2[type1] = true;\n }\n\n /*\n TODO move this comment somewhere else\n implicit relationships are relationships which have not been declared but the inverse side exists on\n another record somewhere\n For example if there was:\n ```app/models/comment.js\n import Model, { attr } from '@ember-data/model';\n export default class Comment extends Model {\n @attr text;\n }\n ```\n and there is also:\n ```app/models/post.js\n import Model, { attr, hasMany } from '@ember-data/model';\n export default class Post extends Model {\n @attr title;\n @hasMany('comment') comments;\n }\n ```\n Then we would have a implicit 'post' relationship for the comment record in order\n to be do things like remove the comment from the post if the comment were to be deleted.\n */\n\n isReleasable(identifier) {\n const relationships = this.identifiers.get(identifier);\n if (!relationships) {\n return true;\n }\n const keys = Object.keys(relationships);\n for (let i = 0; i < keys.length; i++) {\n const relationship = relationships[keys[i]];\n assert(`Expected a relationship`, relationship);\n if (relationship.definition.inverseIsAsync) {\n return false;\n }\n }\n return true;\n }\n unload(identifier) {\n const relationships = this.identifiers.get(identifier);\n if (relationships) {\n // cleans up the graph but retains some nodes\n // to allow for rematerialization\n Object.keys(relationships).forEach(key => {\n let rel = relationships[key];\n destroyRelationship(rel);\n if (isImplicit(rel)) {\n delete relationships[key];\n }\n });\n }\n }\n remove(identifier) {\n this.unload(identifier);\n this.identifiers.delete(identifier);\n }\n\n /*\n * Remote state changes\n */\n push(op) {\n if (op.op === 'deleteRecord') {\n this._pushedUpdates.deletions.push(op);\n } else if (op.op === 'replaceRelatedRecord') {\n this._pushedUpdates.belongsTo.push(op);\n } else {\n const relationship = this.get(op.record, op.field);\n assert(`Cannot push a remote update for an implicit relationship`, !relationship.definition.isImplicit);\n this._pushedUpdates[relationship.definition.kind].push(op);\n }\n if (!this._willSyncRemote) {\n this._willSyncRemote = true;\n const backburner = this.store._store._backburner;\n backburner.schedule('coalesce', this, this._flushRemoteQueue);\n }\n }\n\n /*\n * Local state changes\n */\n\n update(op, isRemote = false) {\n assert(`Cannot update an implicit relationship`, op.op === 'deleteRecord' || !isImplicit(this.get(op.record, op.field)));\n switch (op.op) {\n case 'updateRelationship':\n assert(`Can only perform the operation updateRelationship on remote state`, isRemote);\n if (DEBUG) {\n // in debug, assert payload validity eagerly\n // TODO add deprecations/assertion here for duplicates\n assertValidRelationshipPayload(this, op);\n }\n updateRelationshipOperation(this, op);\n break;\n case 'deleteRecord':\n {\n assert(`Can only perform the operation deleteRelationship on remote state`, isRemote);\n const identifier = op.record;\n const relationships = this.identifiers.get(identifier);\n if (relationships) {\n Object.keys(relationships).forEach(key => {\n const rel = relationships[key];\n // works together with the has check\n delete relationships[key];\n removeCompletelyFromInverse(rel);\n });\n this.identifiers.delete(identifier);\n }\n break;\n }\n case 'replaceRelatedRecord':\n replaceRelatedRecord(this, op, isRemote);\n break;\n case 'addToRelatedRecords':\n addToRelatedRecords(this, op, isRemote);\n break;\n case 'removeFromRelatedRecords':\n removeFromRelatedRecords(this, op, isRemote);\n break;\n case 'replaceRelatedRecords':\n replaceRelatedRecords(this, op, isRemote);\n break;\n default:\n assert(`No local relationship update operation exists for '${op.op}'`);\n }\n }\n _scheduleLocalSync(relationship) {\n this._updatedRelationships.add(relationship);\n if (!this._willSyncLocal) {\n this._willSyncLocal = true;\n const backburner = this.store._store._backburner;\n backburner.schedule('sync', this, this._flushLocalQueue);\n }\n }\n _flushRemoteQueue() {\n if (!this._willSyncRemote) {\n return;\n }\n this._transaction = new Set();\n this._willSyncRemote = false;\n const {\n deletions,\n hasMany,\n belongsTo\n } = this._pushedUpdates;\n this._pushedUpdates.deletions = [];\n this._pushedUpdates.hasMany = [];\n this._pushedUpdates.belongsTo = [];\n for (let i = 0; i < deletions.length; i++) {\n this.update(deletions[i], true);\n }\n for (let i = 0; i < hasMany.length; i++) {\n this.update(hasMany[i], true);\n }\n for (let i = 0; i < belongsTo.length; i++) {\n this.update(belongsTo[i], true);\n }\n this._finalize();\n }\n _addToTransaction(relationship) {\n assert(`expected a transaction`, this._transaction !== null);\n relationship.transactionRef++;\n this._transaction.add(relationship);\n }\n _finalize() {\n if (this._transaction) {\n this._transaction.forEach(v => v.transactionRef = 0);\n this._transaction = null;\n }\n }\n _flushLocalQueue() {\n if (!this._willSyncLocal) {\n return;\n }\n this._willSyncLocal = false;\n let updated = this._updatedRelationships;\n this._updatedRelationships = new Set();\n updated.forEach(syncRemoteToLocal);\n }\n willDestroy() {\n this.identifiers.clear();\n this.store = null;\n }\n destroy() {\n Graphs.delete(this.store);\n if (DEBUG) {\n Graphs.delete(this.store._store);\n }\n }\n}\n\n// Handle dematerialization for relationship `rel`. In all cases, notify the\n// relationship of the dematerialization: this is done so the relationship can\n// notify its inverse which needs to update state\n//\n// If the inverse is sync, unloading this record is treated as a client-side\n// delete, so we remove the inverse records from this relationship to\n// disconnect the graph. Because it's not async, we don't need to keep around\n// the internalModel as an id-wrapper for references and because the graph is\n// disconnected we can actually destroy the internalModel when checking for\n// orphaned models.\nfunction destroyRelationship(rel) {\n if (isImplicit(rel)) {\n if (rel.graph.isReleasable(rel.identifier)) {\n removeCompletelyFromInverse(rel);\n }\n return;\n }\n rel.recordDataDidDematerialize();\n if (!rel.definition.inverseIsImplicit && !rel.definition.inverseIsAsync) {\n rel.state.isStale = true;\n rel.clear();\n\n // necessary to clear relationships in the ui from dematerialized records\n // hasMany is managed by InternalModel which calls `retreiveLatest` after\n // dematerializing the recordData instance.\n // but sync belongsTo require this since they don't have a proxy to update.\n // so we have to notify so it will \"update\" to null.\n // we should discuss whether we still care about this, probably fine to just\n // leave the ui relationship populated since the record is destroyed and\n // internally we've fully cleaned up.\n if (!rel.definition.isAsync) {\n if (isBelongsTo(rel)) {\n rel.notifyBelongsToChange();\n } else {\n rel.notifyHasManyChange();\n }\n }\n }\n}\nfunction removeCompletelyFromInverse(relationship) {\n // we actually want a union of members and canonicalMembers\n // they should be disjoint but currently are not due to a bug\n const seen = Object.create(null);\n const {\n identifier\n } = relationship;\n const {\n inverseKey\n } = relationship.definition;\n const unload = inverseIdentifier => {\n const id = inverseIdentifier.lid;\n if (seen[id] === undefined) {\n if (relationship.graph.has(inverseIdentifier, inverseKey)) {\n relationship.graph.get(inverseIdentifier, inverseKey).removeCompletelyFromOwn(identifier);\n }\n seen[id] = true;\n }\n };\n if (isBelongsTo(relationship)) {\n if (relationship.localState) {\n unload(relationship.localState);\n }\n if (relationship.remoteState) {\n unload(relationship.remoteState);\n }\n if (!relationship.definition.isAsync) {\n relationship.clear();\n }\n relationship.localState = null;\n } else if (isHasMany(relationship)) {\n relationship.members.forEach(unload);\n relationship.canonicalMembers.forEach(unload);\n if (!relationship.definition.isAsync) {\n relationship.clear();\n relationship.notifyHasManyChange();\n }\n } else {\n relationship.members.forEach(unload);\n relationship.canonicalMembers.forEach(unload);\n relationship.clear();\n }\n}","import { assert, warn } from '@ember/debug';\nimport _normalizeLink from '../../normalize-link';\nimport { isBelongsTo, isHasMany } from '../-utils';\n/*\n Updates the \"canonical\" or \"remote\" state of a relationship, replacing any existing\n state and blowing away any local changes (excepting new records).\n*/\nexport default function updateRelationshipOperation(graph, op) {\n const relationship = graph.get(op.record, op.field);\n assert(`Cannot update an implicit relationship`, isHasMany(relationship) || isBelongsTo(relationship));\n const {\n definition,\n state,\n identifier\n } = relationship;\n const {\n isCollection\n } = definition;\n const payload = op.value;\n let hasRelationshipDataProperty = false;\n let hasUpdatedLink = false;\n if (payload.meta) {\n relationship.meta = payload.meta;\n }\n if (payload.data !== undefined) {\n hasRelationshipDataProperty = true;\n if (isCollection) {\n // TODO deprecate this case. We\n // have tests saying we support it.\n if (payload.data === null) {\n payload.data = [];\n }\n assert(`Expected an array`, Array.isArray(payload.data));\n graph.update({\n op: 'replaceRelatedRecords',\n record: identifier,\n field: op.field,\n value: payload.data.map(i => graph.store.identifierCache.getOrCreateRecordIdentifier(i))\n }, true);\n } else {\n graph.update({\n op: 'replaceRelatedRecord',\n record: identifier,\n field: op.field,\n value: payload.data ? graph.store.identifierCache.getOrCreateRecordIdentifier(payload.data) : null\n }, true);\n }\n } else if (definition.isAsync === false && !state.hasReceivedData) {\n hasRelationshipDataProperty = true;\n if (isCollection) {\n graph.update({\n op: 'replaceRelatedRecords',\n record: identifier,\n field: op.field,\n value: []\n }, true);\n } else {\n graph.update({\n op: 'replaceRelatedRecord',\n record: identifier,\n field: op.field,\n value: null\n }, true);\n }\n }\n if (payload.links) {\n let originalLinks = relationship.links;\n relationship.links = payload.links;\n if (payload.links.related) {\n let relatedLink = _normalizeLink(payload.links.related);\n let currentLink = originalLinks && originalLinks.related ? _normalizeLink(originalLinks.related) : null;\n let currentLinkHref = currentLink ? currentLink.href : null;\n if (relatedLink && relatedLink.href && relatedLink.href !== currentLinkHref) {\n warn(`You pushed a record of type '${identifier.type}' with a relationship '${definition.key}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. EmberData will treat this relationship as known-to-be-empty.`, definition.isAsync || state.hasReceivedData, {\n id: 'ds.store.push-link-for-sync-relationship'\n });\n assert(`You have pushed a record of type '${identifier.type}' with '${definition.key}' as a link, but the value of that link is not a string.`, typeof relatedLink.href === 'string' || relatedLink.href === null);\n hasUpdatedLink = true;\n }\n }\n }\n\n /*\n Data being pushed into the relationship might contain only data or links,\n or a combination of both.\n IF contains only data\n IF contains both links and data\n state.isEmpty -> true if is empty array (has-many) or is null (belongs-to)\n state.hasReceivedData -> true\n hasDematerializedInverse -> false\n state.isStale -> false\n allInverseRecordsAreLoaded -> run-check-to-determine\n IF contains only links\n state.isStale -> true\n */\n relationship.state.hasFailedLoadAttempt = false;\n if (hasRelationshipDataProperty) {\n let relationshipIsEmpty = payload.data === null || Array.isArray(payload.data) && payload.data.length === 0;\n\n // we don't need to notify here as the update op we pushed in above will notify once\n // membership is in the correct state.\n relationship.state.hasReceivedData = true;\n relationship.state.isStale = false;\n relationship.state.hasDematerializedInverse = false;\n relationship.state.isEmpty = relationshipIsEmpty;\n } else if (hasUpdatedLink) {\n // only notify stale if we have not previously received membership data.\n // within this same transaction\n // this prevents refetching when only one side of the relationship in the\n // payload contains the info while the other side contains just a link\n // this only works when the side with just a link is a belongsTo, as we\n // don't know if a hasMany has full information or not.\n // see #7049 for context.\n if (isCollection || !relationship.state.hasReceivedData || relationship.transactionRef === 0) {\n relationship.state.isStale = true;\n if (isHasMany(relationship)) {\n relationship.notifyHasManyChange();\n } else {\n relationship.notifyBelongsToChange();\n }\n } else {\n relationship.state.isStale = false;\n }\n }\n}","import { assert } from '@ember/debug';\nimport { isBelongsTo, isNew } from '../-utils';\nimport { addToInverse, notifyInverseOfPotentialMaterialization, removeFromInverse } from './replace-related-records';\nexport default function replaceRelatedRecord(graph, op, isRemote = false) {\n const relationship = graph.get(op.record, op.field);\n assert(`You can only '${op.op}' on a belongsTo relationship. ${op.record.type}.${op.field} is a ${relationship.definition.kind}`, isBelongsTo(relationship));\n if (isRemote) {\n graph._addToTransaction(relationship);\n }\n const {\n definition,\n state\n } = relationship;\n const prop = isRemote ? 'remoteState' : 'localState';\n const existingState = relationship[prop];\n\n /*\n case 1:1\n ========\n In a bi-directional graph with 1:1 edges, replacing a value\n results in up-to 4 discrete value transitions.\n If: A <-> B, C <-> D is the initial state,\n and: A <-> C, B, D is the final state\n then we would undergo the following 4 transitions.\n remove A from B\n add C to A\n remove C from D\n add A to C\n case 1:many\n ===========\n In a bi-directional graph with 1:Many edges, replacing a value\n results in up-to 3 discrete value transitions.\n If: A<->>B<<->D, C<<->D is the initial state (double arrows representing the many side)\n And: A<->>C<<->D, B<<->D is the final state\n Then we would undergo three transitions.\n remove A from B\n add C to A.\n add A to C\n case 1:?\n ========\n In a uni-directional graph with 1:? edges (modeled in EmberData with `inverse:null`) with\n artificial (implicit) inverses, replacing a value results in up-to 3 discrete value transitions.\n This is because a 1:? relationship is effectively 1:many.\n If: A->B, C->B is the initial state\n And: A->C, C->B is the final state\n Then we would undergo three transitions.\n Remove A from B\n Add C to A\n Add A to C\n */\n\n // nothing for us to do\n if (op.value === existingState) {\n // if we were empty before but now know we are empty this needs to be true\n state.hasReceivedData = true;\n // if this is a remote update we still sync\n if (isRemote) {\n const {\n localState\n } = relationship;\n // don't sync if localState is a new record and our canonicalState is null\n if (localState && isNew(localState) && !existingState) {\n return;\n }\n if (existingState && localState === existingState) {\n notifyInverseOfPotentialMaterialization(graph, existingState, definition.inverseKey, op.record, isRemote);\n } else {\n relationship.localState = existingState;\n relationship.notifyBelongsToChange();\n }\n }\n return;\n }\n\n // remove this value from the inverse if required\n if (existingState) {\n removeFromInverse(graph, existingState, definition.inverseKey, op.record, isRemote);\n }\n\n // update value to the new value\n relationship[prop] = op.value;\n state.hasReceivedData = true;\n state.isEmpty = op.value === null;\n state.isStale = false;\n state.hasFailedLoadAttempt = false;\n if (op.value) {\n if (definition.type !== op.value.type) {\n graph.registerPolymorphicType(definition.type, op.value.type);\n }\n addToInverse(graph, op.value, definition.inverseKey, op.record, isRemote);\n }\n if (isRemote) {\n const {\n localState,\n remoteState\n } = relationship;\n if (localState && isNew(localState) && !remoteState) {\n return;\n }\n if (localState !== remoteState) {\n relationship.localState = remoteState;\n relationship.notifyBelongsToChange();\n }\n } else {\n relationship.notifyBelongsToChange();\n }\n}","/**\n * @module @ember-data/record-data\n */\nimport { assert } from '@ember/debug';\nimport { _backburner as emberBackburner } from '@ember/runloop';\nimport { isEqual } from '@ember/utils';\nimport { recordDataFor, recordIdentifierFor, removeRecordDataFor } from '@ember-data/store/-private';\nimport coerceId from './coerce-id';\nimport { isImplicit } from './graph/-utils';\nimport { graphFor } from './graph/index';\nlet nextBfsId = 1;\nconst EMPTY_ITERATOR = {\n iterator() {\n return {\n next() {\n return {\n done: true,\n value: undefined\n };\n }\n };\n }\n};\n\n/**\n The default cache implementation used by ember-data. The cache\n is configurable and using a different implementation can be\n achieved by implementing the store's createRecordDataFor hook.\n\n @class RecordDataDefault\n @public\n */\nexport default class RecordDataDefault {\n constructor(identifier, storeWrapper) {\n /*\n Iterates over the set of internal models reachable from `this` across exactly one\n relationship.\n */\n this._directlyRelatedRecordDatasIterable = () => {\n const graph = graphFor(this.storeWrapper);\n const initializedRelationships = graph.identifiers.get(this.identifier);\n if (!initializedRelationships) {\n return EMPTY_ITERATOR;\n }\n const initializedRelationshipsArr = Object.keys(initializedRelationships).map(key => initializedRelationships[key]).filter(rel => {\n return !isImplicit(rel);\n });\n let i = 0;\n let j = 0;\n let k = 0;\n const findNext = () => {\n while (i < initializedRelationshipsArr.length) {\n while (j < 2) {\n let members = j === 0 ? getLocalState(initializedRelationshipsArr[i]) : getRemoteState(initializedRelationshipsArr[i]);\n while (k < members.length) {\n let member = members[k++];\n if (member !== null) {\n return recordDataFor(member);\n }\n }\n k = 0;\n j++;\n }\n j = 0;\n i++;\n }\n return undefined;\n };\n return {\n iterator() {\n return {\n next: () => {\n const value = findNext();\n return {\n value,\n done: value === undefined\n };\n }\n };\n }\n };\n };\n this.modelName = identifier.type;\n this.clientId = identifier.lid;\n this.id = identifier.id;\n this.identifier = identifier;\n this.storeWrapper = storeWrapper;\n this.isDestroyed = false;\n this._isNew = false;\n this._isDeleted = false;\n // Used during the mark phase of unloading to avoid checking the same internal\n // model twice in the same scan\n this._bfsId = 0;\n this.reset();\n }\n\n // PUBLIC API\n getResourceIdentifier() {\n return this.identifier;\n }\n pushData(data, calculateChange) {\n let changedKeys;\n if (this._isNew) {\n this._isNew = false;\n this.notifyStateChange();\n }\n if (calculateChange) {\n changedKeys = this._changedKeys(data.attributes);\n }\n Object.assign(this._data, data.attributes);\n if (this.__attributes) {\n // only do if we have attribute changes\n this._updateChangedAttributes();\n }\n if (data.relationships) {\n this._setupRelationships(data);\n }\n if (data.id) {\n if (!this.id) {\n this.id = coerceId(data.id);\n }\n }\n if (changedKeys && changedKeys.length) {\n this._notifyAttributes(changedKeys);\n }\n return changedKeys;\n }\n willCommit() {\n this._inFlightAttributes = this._attributes;\n this._attributes = null;\n }\n hasChangedAttributes() {\n return this.__attributes !== null && Object.keys(this.__attributes).length > 0;\n }\n _clearErrors() {\n if (this._errors) {\n this._errors = undefined;\n this.storeWrapper.notifyErrorsChange(this.modelName, this.id, this.clientId);\n }\n }\n getErrors() {\n let errors = this._errors || [];\n return errors;\n }\n\n // this is a hack bc we don't have access to the state machine\n // and relationships need this info and @runspired didn't see\n // how to get it just yet from storeWrapper.\n isEmpty() {\n return this.__attributes === null && this.__inFlightAttributes === null && this.__data === null;\n }\n isDeleted() {\n return this._isDeleted;\n }\n setIsDeleted(isDeleted) {\n this._isDeleted = isDeleted;\n if (this._isNew) {\n this._deletionConfirmed();\n }\n this.notifyStateChange();\n }\n isDeletionCommitted() {\n return this._isDeletionCommited;\n }\n reset() {\n this.__attributes = null;\n this.__inFlightAttributes = null;\n this.__data = null;\n this._errors = undefined;\n }\n _setupRelationships(data) {\n // TODO @runspired iterating by definitions instead of by payload keys\n // allows relationship payloads to be ignored silently if no relationship\n // definition exists. Ensure there's a test for this and then consider\n // moving this to an assertion. This check should possibly live in the graph.\n let relationships = this.storeWrapper.relationshipsDefinitionFor(this.modelName);\n let keys = Object.keys(relationships);\n for (let i = 0; i < keys.length; i++) {\n let relationshipName = keys[i];\n if (!data.relationships[relationshipName]) {\n continue;\n }\n let relationshipData = data.relationships[relationshipName];\n graphFor(this.storeWrapper).push({\n op: 'updateRelationship',\n record: this.identifier,\n field: relationshipName,\n value: relationshipData\n });\n }\n }\n\n /**\n Checks if the attributes which are considered as changed are still\n different to the state which is acknowledged by the server.\n This method is needed when data for the internal model is pushed and the\n pushed data might acknowledge dirty attributes as confirmed.\n @method updateChangedAttributes\n @private\n */\n _updateChangedAttributes() {\n let changedAttributes = this.changedAttributes();\n let changedAttributeNames = Object.keys(changedAttributes);\n let attrs = this._attributes;\n for (let i = 0, length = changedAttributeNames.length; i < length; i++) {\n let attribute = changedAttributeNames[i];\n let data = changedAttributes[attribute];\n let oldData = data[0];\n let newData = data[1];\n if (oldData === newData) {\n delete attrs[attribute];\n }\n }\n this._notifyAttributes(changedAttributeNames);\n }\n _notifyAttributes(keys) {\n const {\n type,\n id,\n lid\n } = this.identifier;\n const manager = this.storeWrapper;\n if (!keys) {\n manager.notifyPropertyChange(type, id, lid);\n return;\n }\n for (let i = 0; i < keys.length; i++) {\n manager.notifyPropertyChange(type, id, lid, keys[i]);\n }\n }\n\n /**\n Returns an object, whose keys are changed properties, and value is an\n [oldProp, newProp] array.\n @method changedAttributes\n @private\n */\n changedAttributes() {\n let oldData = this._data;\n let currentData = this._attributes;\n let inFlightData = this._inFlightAttributes;\n let newData = {\n ...inFlightData,\n ...currentData\n };\n let diffData = Object.create(null);\n let newDataKeys = Object.keys(newData);\n for (let i = 0, length = newDataKeys.length; i < length; i++) {\n let key = newDataKeys[i];\n diffData[key] = [oldData[key], newData[key]];\n }\n return diffData;\n }\n isNew() {\n return this._isNew;\n }\n rollbackAttributes() {\n let dirtyKeys;\n this._isDeleted = false;\n if (this.hasChangedAttributes()) {\n dirtyKeys = Object.keys(this._attributes);\n this._attributes = null;\n }\n if (this.isNew()) {\n this.removeFromInverseRelationships();\n this._isDeleted = true;\n this._isNew = false;\n }\n this._inFlightAttributes = null;\n this._clearErrors();\n this.notifyStateChange();\n return dirtyKeys;\n }\n _deletionConfirmed() {\n this.removeFromInverseRelationships();\n }\n didCommit(data) {\n if (this._isDeleted) {\n this._deletionConfirmed();\n this._isDeletionCommited = true;\n }\n this._isNew = false;\n let newCanonicalAttributes;\n if (data) {\n if (data.id) {\n // didCommit provided an ID, notify the store of it\n this.storeWrapper.setRecordId(this.modelName, data.id, this.clientId);\n this.id = coerceId(data.id);\n }\n if (data.relationships) {\n this._setupRelationships(data);\n }\n newCanonicalAttributes = data.attributes;\n }\n let changedKeys = this._changedKeys(newCanonicalAttributes);\n Object.assign(this._data, this.__inFlightAttributes, newCanonicalAttributes);\n this._inFlightAttributes = null;\n this._updateChangedAttributes();\n this._notifyAttributes(changedKeys);\n this._clearErrors();\n this.notifyStateChange();\n return changedKeys;\n }\n notifyStateChange() {\n this.storeWrapper.notifyStateChange(this.modelName, this.id, this.clientId);\n }\n\n // get ResourceIdentifiers for \"current state\"\n getHasMany(key) {\n return graphFor(this.storeWrapper).get(this.identifier, key).getData();\n }\n\n // set a new \"current state\" via ResourceIdentifiers\n setDirtyHasMany(key, recordDatas) {\n graphFor(this.storeWrapper).update({\n op: 'replaceRelatedRecords',\n record: this.identifier,\n field: key,\n value: recordDatas.map(recordIdentifierFor)\n });\n }\n\n // append to \"current state\" via RecordDatas\n addToHasMany(key, recordDatas, idx) {\n graphFor(this.storeWrapper).update({\n op: 'addToRelatedRecords',\n record: this.identifier,\n field: key,\n value: recordDatas.map(recordIdentifierFor),\n index: idx\n });\n }\n\n // remove from \"current state\" via RecordDatas\n removeFromHasMany(key, recordDatas) {\n graphFor(this.storeWrapper).update({\n op: 'removeFromRelatedRecords',\n record: this.identifier,\n field: key,\n value: recordDatas.map(recordIdentifierFor)\n });\n }\n commitWasRejected(identifier, errors) {\n let keys = Object.keys(this._inFlightAttributes);\n if (keys.length > 0) {\n let attrs = this._attributes;\n for (let i = 0; i < keys.length; i++) {\n if (attrs[keys[i]] === undefined) {\n attrs[keys[i]] = this._inFlightAttributes[keys[i]];\n }\n }\n }\n this._inFlightAttributes = null;\n if (errors) {\n this._errors = errors;\n }\n this.storeWrapper.notifyErrorsChange(this.modelName, this.id, this.clientId);\n }\n getBelongsTo(key) {\n return graphFor(this.storeWrapper).get(this.identifier, key).getData();\n }\n setDirtyBelongsTo(key, recordData) {\n graphFor(this.storeWrapper).update({\n op: 'replaceRelatedRecord',\n record: this.identifier,\n field: key,\n value: recordData ? recordIdentifierFor(recordData) : null\n });\n }\n setDirtyAttribute(key, value) {\n const {\n type,\n id,\n lid\n } = this.identifier;\n this.storeWrapper.notifyPropertyChange(type, id, lid, key);\n let originalValue;\n // Add the new value to the changed attributes hash\n this._attributes[key] = value;\n if (key in this._inFlightAttributes) {\n originalValue = this._inFlightAttributes[key];\n } else {\n originalValue = this._data[key];\n }\n // If we went back to our original value, we shouldn't keep the attribute around anymore\n if (value === originalValue) {\n delete this._attributes[key];\n }\n }\n\n // internal set coming from the model\n __setId(id) {\n if (this.id !== id) {\n this.id = id;\n }\n }\n getAttr(key) {\n if (key in this._attributes) {\n return this._attributes[key];\n } else if (key in this._inFlightAttributes) {\n return this._inFlightAttributes[key];\n } else {\n return this._data[key];\n }\n }\n hasAttr(key) {\n return key in this._attributes || key in this._inFlightAttributes || key in this._data;\n }\n unloadRecord() {\n if (this.isDestroyed) {\n return;\n }\n graphFor(this.storeWrapper).unload(this.identifier);\n this.reset();\n if (!this._scheduledDestroy) {\n this._scheduledDestroy = emberBackburner.schedule('destroy', this, '_cleanupOrphanedRecordDatas');\n }\n }\n _cleanupOrphanedRecordDatas() {\n let relatedRecordDatas = this._allRelatedRecordDatas();\n if (areAllModelsUnloaded(relatedRecordDatas)) {\n // we don't have a backburner queue yet since\n // we scheduled this into ember's destroy\n // disconnectRecord called from destroy will teardown\n // relationships. We do this to queue that.\n this.storeWrapper._store._backburner.join(() => {\n for (let i = 0; i < relatedRecordDatas.length; ++i) {\n let recordData = relatedRecordDatas[i];\n if (!recordData.isDestroyed) {\n // TODO @runspired we do not currently destroy RecordData instances *except* via this relationship\n // traversal. This seems like an oversight since the store should be able to notify destroy.\n removeRecordDataFor(recordData.identifier);\n recordData.destroy();\n }\n }\n });\n }\n this._scheduledDestroy = null;\n }\n destroy() {\n this.isDestroyed = true;\n this.storeWrapper.disconnectRecord(this.modelName, this.id, this.clientId);\n }\n isRecordInUse() {\n return this.storeWrapper.isRecordInUse(this.modelName, this.id, this.clientId);\n }\n /*\n Computes the set of internal models reachable from this internal model.\n Reachability is determined over the relationship graph (ie a graph where\n nodes are internal models and edges are belongs to or has many\n relationships).\n Returns an array including `this` and all internal models reachable\n from `this`.\n */\n _allRelatedRecordDatas() {\n let array = [];\n let queue = [];\n let bfsId = nextBfsId++;\n queue.push(this);\n this._bfsId = bfsId;\n while (queue.length > 0) {\n let node = queue.shift();\n array.push(node);\n const iterator = this._directlyRelatedRecordDatasIterable().iterator();\n for (let obj = iterator.next(); !obj.done; obj = iterator.next()) {\n const recordData = obj.value;\n if (recordData && recordData instanceof RecordDataDefault) {\n assert('Internal Error: seen a future bfs iteration', recordData._bfsId <= bfsId);\n if (recordData._bfsId < bfsId) {\n queue.push(recordData);\n recordData._bfsId = bfsId;\n }\n }\n }\n }\n return array;\n }\n isAttrDirty(key) {\n if (this._attributes[key] === undefined) {\n return false;\n }\n let originalValue;\n if (this._inFlightAttributes[key] !== undefined) {\n originalValue = this._inFlightAttributes[key];\n } else {\n originalValue = this._data[key];\n }\n return originalValue !== this._attributes[key];\n }\n get _attributes() {\n if (this.__attributes === null) {\n this.__attributes = Object.create(null);\n }\n return this.__attributes;\n }\n set _attributes(v) {\n this.__attributes = v;\n }\n get _data() {\n if (this.__data === null) {\n this.__data = Object.create(null);\n }\n return this.__data;\n }\n set _data(v) {\n this.__data = v;\n }\n get _inFlightAttributes() {\n if (this.__inFlightAttributes === null) {\n this.__inFlightAttributes = Object.create(null);\n }\n return this.__inFlightAttributes;\n }\n set _inFlightAttributes(v) {\n this.__inFlightAttributes = v;\n }\n\n /**\n * Receives options passed to `store.createRecord` and is given the opportunity\n * to handle them.\n *\n * The return value is an object of options to pass to `Record.create()`\n *\n * @name _initRecordCreateOptions\n * @param options\n * @private\n */\n _initRecordCreateOptions(options) {\n let createOptions = {};\n if (options !== undefined) {\n const {\n storeWrapper,\n identifier\n } = this;\n let attributeDefs = storeWrapper.attributesDefinitionFor(identifier.type);\n let relationshipDefs = storeWrapper.relationshipsDefinitionFor(identifier.type);\n const graph = graphFor(storeWrapper);\n let propertyNames = Object.keys(options);\n for (let i = 0; i < propertyNames.length; i++) {\n let name = propertyNames[i];\n let propertyValue = options[name];\n if (name === 'id') {\n this.id = propertyValue;\n continue;\n }\n let fieldType = relationshipDefs[name] || attributeDefs[name];\n let kind = fieldType !== undefined ? fieldType.kind : null;\n let relationship;\n switch (kind) {\n case 'attribute':\n this.setDirtyAttribute(name, propertyValue);\n break;\n case 'belongsTo':\n this.setDirtyBelongsTo(name, propertyValue);\n relationship = graph.get(identifier, name);\n relationship.state.hasReceivedData = true;\n relationship.state.isEmpty = false;\n break;\n case 'hasMany':\n this.setDirtyHasMany(name, propertyValue);\n relationship = graph.get(identifier, name);\n relationship.state.hasReceivedData = true;\n relationship.state.isEmpty = false;\n break;\n default:\n // reflect back (pass-thru) unknown properties\n createOptions[name] = propertyValue;\n }\n }\n }\n return createOptions;\n }\n\n /*\n TODO IGOR AND DAVID this shouldn't be public\n This method should only be called by records in the `isNew()` state OR once the record\n has been deleted and that deletion has been persisted.\n It will remove this record from any associated relationships.\n If `isNew` is true (default false), it will also completely reset all\n relationships to an empty state as well.\n @method removeFromInverseRelationships\n @param {Boolean} isNew whether to unload from the `isNew` perspective\n @private\n */\n removeFromInverseRelationships() {\n graphFor(this.storeWrapper).push({\n op: 'deleteRecord',\n record: this.identifier,\n isNew: this.isNew()\n });\n }\n clientDidCreate() {\n this._isNew = true;\n }\n\n /*\n Ember Data has 3 buckets for storing the value of an attribute on an internalModel.\n `_data` holds all of the attributes that have been acknowledged by\n a backend via the adapter. When rollbackAttributes is called on a model all\n attributes will revert to the record's state in `_data`.\n `_attributes` holds any change the user has made to an attribute\n that has not been acknowledged by the adapter. Any values in\n `_attributes` are have priority over values in `_data`.\n `_inFlightAttributes`. When a record is being synced with the\n backend the values in `_attributes` are copied to\n `_inFlightAttributes`. This way if the backend acknowledges the\n save but does not return the new state Ember Data can copy the\n values from `_inFlightAttributes` to `_data`. Without having to\n worry about changes made to `_attributes` while the save was\n happenign.\n Changed keys builds a list of all of the values that may have been\n changed by the backend after a successful save.\n It does this by iterating over each key, value pair in the payload\n returned from the server after a save. If the `key` is found in\n `_attributes` then the user has a local changed to the attribute\n that has not been synced with the server and the key is not\n included in the list of changed keys.\n \n If the value, for a key differs from the value in what Ember Data\n believes to be the truth about the backend state (A merger of the\n `_data` and `_inFlightAttributes` objects where\n `_inFlightAttributes` has priority) then that means the backend\n has updated the value and the key is added to the list of changed\n keys.\n @method _changedKeys\n @private\n */\n /*\n TODO IGOR DAVID\n There seems to be a potential bug here, where we will return keys that are not\n in the schema\n */\n _changedKeys(updates) {\n let changedKeys = [];\n if (updates) {\n let original, i, value, key;\n let keys = Object.keys(updates);\n let length = keys.length;\n let hasAttrs = this.hasChangedAttributes();\n let attrs;\n if (hasAttrs) {\n attrs = this._attributes;\n }\n original = Object.assign(Object.create(null), this._data, this.__inFlightAttributes);\n for (i = 0; i < length; i++) {\n key = keys[i];\n value = updates[key];\n\n // A value in _attributes means the user has a local change to\n // this attributes. We never override this value when merging\n // updates from the backend so we should not sent a change\n // notification if the server value differs from the original.\n if (hasAttrs === true && attrs[key] !== undefined) {\n continue;\n }\n if (!isEqual(original[key], value)) {\n changedKeys.push(key);\n }\n }\n }\n return changedKeys;\n }\n toString() {\n return `<${this.modelName}:${this.id}>`;\n }\n}\nfunction areAllModelsUnloaded(recordDatas) {\n for (let i = 0; i < recordDatas.length; ++i) {\n if (recordDatas[i].isRecordInUse()) {\n return false;\n }\n }\n return true;\n}\nfunction getLocalState(rel) {\n if (rel.definition.kind === 'belongsTo') {\n return rel.localState ? [rel.localState] : [];\n }\n return rel.currentState;\n}\nfunction getRemoteState(rel) {\n if (rel.definition.kind === 'belongsTo') {\n return rel.remoteState ? [rel.remoteState] : [];\n }\n return rel.canonicalState;\n}","import { A } from '@ember/array';\nimport { warn } from '@ember/debug';\nimport { get, set } from '@ember/object';\nimport Mixin from '@ember/object/mixin';\nimport { camelize } from '@ember/string';\nimport { typeOf } from '@ember/utils';\n\n/**\n @module @ember-data/serializer/rest\n*/\n\n/**\n ## Using Embedded Records\n\n `EmbeddedRecordsMixin` supports serializing embedded records.\n\n To set up embedded records, include the mixin when extending a serializer,\n then define and configure embedded (model) relationships.\n\n Note that embedded records will serialize with the serializer for their model instead of the serializer in which they are defined.\n\n Note also that this mixin does not work with JSONAPISerializer because the JSON:API specification does not describe how to format embedded resources.\n\n Below is an example of a per-type serializer (`post` type).\n\n ```app/serializers/post.js\n import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n\n export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n attrs = {\n author: { embedded: 'always' },\n comments: { serialize: 'ids' }\n }\n }\n ```\n Note that this use of `{ embedded: 'always' }` is unrelated to\n the `{ embedded: 'always' }` that is defined as an option on `attr` as part of\n defining a model while working with the `ActiveModelSerializer`. Nevertheless,\n using `{ embedded: 'always' }` as an option to `attr` is not a valid way to set up\n embedded records.\n\n The `attrs` option for a resource `{ embedded: 'always' }` is shorthand for:\n\n ```js\n {\n serialize: 'records',\n deserialize: 'records'\n }\n ```\n\n ### Configuring Attrs\n\n A resource's `attrs` option may be set to use `ids`, `records` or false for the\n `serialize` and `deserialize` settings.\n\n The `attrs` property can be set on the `ApplicationSerializer` or a per-type\n serializer.\n\n In the case where embedded JSON is expected while extracting a payload (reading)\n the setting is `deserialize: 'records'`, there is no need to use `ids` when\n extracting as that is the default behaviour without this mixin if you are using\n the vanilla `EmbeddedRecordsMixin`. Likewise, to embed JSON in the payload while\n serializing `serialize: 'records'` is the setting to use. There is an option of\n not embedding JSON in the serialized payload by using `serialize: 'ids'`. If you\n do not want the relationship sent at all, you can use `serialize: false`.\n\n\n ### EmbeddedRecordsMixin defaults\n If you do not overwrite `attrs` for a specific relationship, the `EmbeddedRecordsMixin`\n will behave in the following way:\n\n BelongsTo: `{ serialize: 'id', deserialize: 'id' }`\n HasMany: `{ serialize: false, deserialize: 'ids' }`\n\n ### Model Relationships\n\n Embedded records must have a model defined to be extracted and serialized. Note that\n when defining any relationships on your model such as `belongsTo` and `hasMany`, you\n should not both specify `async: true` and also indicate through the serializer's\n `attrs` attribute that the related model should be embedded for deserialization.\n If a model is declared embedded for deserialization (`embedded: 'always'` or `deserialize: 'records'`),\n then do not use `async: true`.\n\n To successfully extract and serialize embedded records the model relationships\n must be set up correctly. See the\n [defining relationships](https://guides.emberjs.com/current/models/relationships)\n section of the **Defining Models** guide page.\n\n Records without an `id` property are not considered embedded records, model\n instances must have an `id` property to be used with Ember Data.\n\n ### Example JSON payloads, Models and Serializers\n\n **When customizing a serializer it is important to grok what the customizations\n are. Please read the docs for the methods this mixin provides, in case you need\n to modify it to fit your specific needs.**\n\n For example, review the docs for each method of this mixin:\n * [normalize](/ember-data/release/classes/EmbeddedRecordsMixin/methods/normalize?anchor=normalize)\n * [serializeBelongsTo](/ember-data/release/classes/EmbeddedRecordsMixin/methods/serializeBelongsTo?anchor=serializeBelongsTo)\n * [serializeHasMany](/ember-data/release/classes/EmbeddedRecordsMixin/methods/serializeHasMany?anchor=serializeHasMany)\n\n @class EmbeddedRecordsMixin\n @public\n*/\nexport default Mixin.create({\n /**\n Normalize the record and recursively normalize/extract all the embedded records\n while pushing them into the store as they are encountered\n A payload with an attr configured for embedded records needs to be extracted:\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"comments\": [{\n \"id\": \"1\",\n \"body\": \"Rails is unagi\"\n }, {\n \"id\": \"2\",\n \"body\": \"Omakase O_o\"\n }]\n }\n }\n ```\n @method normalize\n @public\n @param {Model} typeClass\n @param {Object} hash to be normalized\n @param {String} prop the hash has been referenced by\n @return {Object} the normalized hash\n **/\n normalize(typeClass, hash, prop) {\n let normalizedHash = this._super(typeClass, hash, prop);\n return this._extractEmbeddedRecords(this, this.store, typeClass, normalizedHash);\n },\n keyForRelationship(key, typeClass, method) {\n if (method === 'serialize' && this.hasSerializeRecordsOption(key) || method === 'deserialize' && this.hasDeserializeRecordsOption(key)) {\n return this.keyForAttribute(key, method);\n } else {\n return this._super(key, typeClass, method) || key;\n }\n },\n /**\n Serialize `belongsTo` relationship when it is configured as an embedded object.\n This example of an author model belongs to a post model:\n ```js\n import Model, { attr, belongsTo } from '@ember-data/model';\n Post = Model.extend({\n title: attr('string'),\n body: attr('string'),\n author: belongsTo('author')\n });\n Author = Model.extend({\n name: attr('string'),\n post: belongsTo('post')\n });\n ```\n Use a custom (type) serializer for the post model to configure embedded author\n ```app/serializers/post.js\n import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n attrs = {\n author: { embedded: 'always' }\n }\n }\n ```\n A payload with an attribute configured for embedded records can serialize\n the records together under the root attribute's payload:\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"author\": {\n \"id\": \"2\"\n \"name\": \"dhh\"\n }\n }\n }\n ```\n @method serializeBelongsTo\n @public\n @param {Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeBelongsTo(snapshot, json, relationship) {\n let attr = relationship.key;\n if (this.noSerializeOptionSpecified(attr)) {\n this._super(snapshot, json, relationship);\n return;\n }\n let includeIds = this.hasSerializeIdsOption(attr);\n let includeRecords = this.hasSerializeRecordsOption(attr);\n let embeddedSnapshot = snapshot.belongsTo(attr);\n if (includeIds) {\n let schema = this.store.modelFor(snapshot.modelName);\n let serializedKey = this._getMappedKey(relationship.key, schema);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, 'serialize');\n }\n if (!embeddedSnapshot) {\n json[serializedKey] = null;\n } else {\n json[serializedKey] = embeddedSnapshot.id;\n if (relationship.options.polymorphic) {\n this.serializePolymorphicType(snapshot, json, relationship);\n }\n }\n } else if (includeRecords) {\n this._serializeEmbeddedBelongsTo(snapshot, json, relationship);\n }\n },\n _serializeEmbeddedBelongsTo(snapshot, json, relationship) {\n let embeddedSnapshot = snapshot.belongsTo(relationship.key);\n let schema = this.store.modelFor(snapshot.modelName);\n let serializedKey = this._getMappedKey(relationship.key, schema);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, 'serialize');\n }\n if (!embeddedSnapshot) {\n json[serializedKey] = null;\n } else {\n json[serializedKey] = embeddedSnapshot.serialize({\n includeId: true\n });\n this.removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, json[serializedKey]);\n if (relationship.options.polymorphic) {\n this.serializePolymorphicType(snapshot, json, relationship);\n }\n }\n },\n /**\n Serializes `hasMany` relationships when it is configured as embedded objects.\n This example of a post model has many comments:\n ```js\n import Model, { attr, belongsTo, hasMany } from '@ember-data/model';\n Post = Model.extend({\n title: attr('string'),\n body: attr('string'),\n comments: hasMany('comment')\n });\n Comment = Model.extend({\n body: attr('string'),\n post: belongsTo('post')\n });\n ```\n Use a custom (type) serializer for the post model to configure embedded comments\n ```app/serializers/post.js\n import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n attrs = {\n comments: { embedded: 'always' }\n }\n }\n ```\n A payload with an attribute configured for embedded records can serialize\n the records together under the root attribute's payload:\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"body\": \"I want this for my ORM, I want that for my template language...\"\n \"comments\": [{\n \"id\": \"1\",\n \"body\": \"Rails is unagi\"\n }, {\n \"id\": \"2\",\n \"body\": \"Omakase O_o\"\n }]\n }\n }\n ```\n The attrs options object can use more specific instruction for extracting and\n serializing. When serializing, an option to embed `ids`, `ids-and-types` or `records` can be set.\n When extracting the only option is `records`.\n So `{ embedded: 'always' }` is shorthand for:\n `{ serialize: 'records', deserialize: 'records' }`\n To embed the `ids` for a related object (using a hasMany relationship):\n ```app/serializers/post.js\n import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n attrs = {\n comments: { serialize: 'ids', deserialize: 'records' }\n }\n }\n ```\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"body\": \"I want this for my ORM, I want that for my template language...\"\n \"comments\": [\"1\", \"2\"]\n }\n }\n ```\n To embed the relationship as a collection of objects with `id` and `type` keys, set\n `ids-and-types` for the related object.\n This is particularly useful for polymorphic relationships where records don't share\n the same table and the `id` is not enough information.\n For example having a user that has many pets:\n ```js\n User = Model.extend({\n name: attr('string'),\n pets: hasMany('pet', { polymorphic: true })\n });\n Pet = Model.extend({\n name: attr('string'),\n });\n Cat = Pet.extend({\n // ...\n });\n Parrot = Pet.extend({\n // ...\n });\n ```\n ```app/serializers/user.js\n import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n export default class UserSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n attrs = {\n pets: { serialize: 'ids-and-types', deserialize: 'records' }\n }\n }\n ```\n ```js\n {\n \"user\": {\n \"id\": \"1\"\n \"name\": \"Bertin Osborne\",\n \"pets\": [\n { \"id\": \"1\", \"type\": \"Cat\" },\n { \"id\": \"1\", \"type\": \"Parrot\"}\n ]\n }\n }\n ```\n @method serializeHasMany\n @public\n @param {Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeHasMany(snapshot, json, relationship) {\n let attr = relationship.key;\n if (this.noSerializeOptionSpecified(attr)) {\n this._super(snapshot, json, relationship);\n return;\n }\n if (this.hasSerializeIdsOption(attr)) {\n let schema = this.store.modelFor(snapshot.modelName);\n let serializedKey = this._getMappedKey(relationship.key, schema);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, 'serialize');\n }\n json[serializedKey] = snapshot.hasMany(attr, {\n ids: true\n });\n } else if (this.hasSerializeRecordsOption(attr)) {\n this._serializeEmbeddedHasMany(snapshot, json, relationship);\n } else {\n if (this.hasSerializeIdsAndTypesOption(attr)) {\n this._serializeHasManyAsIdsAndTypes(snapshot, json, relationship);\n }\n }\n },\n /*\n Serializes a hasMany relationship as an array of objects containing only `id` and `type`\n keys.\n This has its use case on polymorphic hasMany relationships where the server is not storing\n all records in the same table using STI, and therefore the `id` is not enough information\n TODO: Make the default in Ember-data 3.0??\n */\n _serializeHasManyAsIdsAndTypes(snapshot, json, relationship) {\n let serializedKey = this.keyForAttribute(relationship.key, 'serialize');\n let hasMany = snapshot.hasMany(relationship.key);\n json[serializedKey] = A(hasMany).map(function (recordSnapshot) {\n //\n // I'm sure I'm being utterly naive here. Probably id is a configurable property and\n // type too, and the modelName has to be normalized somehow.\n //\n return {\n id: recordSnapshot.id,\n type: recordSnapshot.modelName\n };\n });\n },\n _serializeEmbeddedHasMany(snapshot, json, relationship) {\n let schema = this.store.modelFor(snapshot.modelName);\n let serializedKey = this._getMappedKey(relationship.key, schema);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, 'serialize');\n }\n warn(`The embedded relationship '${serializedKey}' is undefined for '${snapshot.modelName}' with id '${snapshot.id}'. Please include it in your original payload.`, typeOf(snapshot.hasMany(relationship.key)) !== 'undefined', {\n id: 'ds.serializer.embedded-relationship-undefined'\n });\n json[serializedKey] = this._generateSerializedHasMany(snapshot, relationship);\n },\n /*\n Returns an array of embedded records serialized to JSON\n */\n _generateSerializedHasMany(snapshot, relationship) {\n let hasMany = snapshot.hasMany(relationship.key);\n let manyArray = A(hasMany);\n let ret = new Array(manyArray.length);\n for (let i = 0; i < manyArray.length; i++) {\n let embeddedSnapshot = manyArray[i];\n let embeddedJson = embeddedSnapshot.serialize({\n includeId: true\n });\n this.removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, embeddedJson);\n ret[i] = embeddedJson;\n }\n return ret;\n },\n /**\n When serializing an embedded record, modify the property (in the `JSON` payload)\n that refers to the parent record (foreign key for the relationship).\n Serializing a `belongsTo` relationship removes the property that refers to the\n parent record\n Serializing a `hasMany` relationship does not remove the property that refers to\n the parent record.\n @method removeEmbeddedForeignKey\n @public\n @param {Snapshot} snapshot\n @param {Snapshot} embeddedSnapshot\n @param {Object} relationship\n @param {Object} json\n */\n removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, json) {\n if (relationship.kind === 'belongsTo') {\n let schema = this.store.modelFor(snapshot.modelName);\n let parentRecord = schema.inverseFor(relationship.key, this.store);\n if (parentRecord) {\n let name = parentRecord.name;\n let embeddedSerializer = this.store.serializerFor(embeddedSnapshot.modelName);\n let parentKey = embeddedSerializer.keyForRelationship(name, parentRecord.kind, 'deserialize');\n if (parentKey) {\n delete json[parentKey];\n }\n }\n } /*else if (relationship.kind === 'hasMany') {\n return;\n }*/\n },\n // checks config for attrs option to embedded (always) - serialize and deserialize\n hasEmbeddedAlwaysOption(attr) {\n let option = this.attrsOption(attr);\n return option && option.embedded === 'always';\n },\n // checks config for attrs option to serialize ids\n hasSerializeRecordsOption(attr) {\n let alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n let option = this.attrsOption(attr);\n return alwaysEmbed || option && option.serialize === 'records';\n },\n // checks config for attrs option to serialize records\n hasSerializeIdsOption(attr) {\n let option = this.attrsOption(attr);\n return option && (option.serialize === 'ids' || option.serialize === 'id');\n },\n // checks config for attrs option to serialize records as objects containing id and types\n hasSerializeIdsAndTypesOption(attr) {\n let option = this.attrsOption(attr);\n return option && (option.serialize === 'ids-and-types' || option.serialize === 'id-and-type');\n },\n // checks config for attrs option to serialize records\n noSerializeOptionSpecified(attr) {\n let option = this.attrsOption(attr);\n return !(option && (option.serialize || option.embedded));\n },\n // checks config for attrs option to deserialize records\n // a defined option object for a resource is treated the same as\n // `deserialize: 'records'`\n hasDeserializeRecordsOption(attr) {\n let alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n let option = this.attrsOption(attr);\n return alwaysEmbed || option && option.deserialize === 'records';\n },\n attrsOption(attr) {\n let attrs = this.get('attrs');\n return attrs && (attrs[camelize(attr)] || attrs[attr]);\n },\n /**\n @method _extractEmbeddedRecords\n @private\n */\n _extractEmbeddedRecords(serializer, store, typeClass, partial) {\n typeClass.eachRelationship((key, relationship) => {\n if (serializer.hasDeserializeRecordsOption(key)) {\n if (relationship.kind === 'hasMany') {\n this._extractEmbeddedHasMany(store, key, partial, relationship);\n }\n if (relationship.kind === 'belongsTo') {\n this._extractEmbeddedBelongsTo(store, key, partial, relationship);\n }\n }\n });\n return partial;\n },\n /**\n @method _extractEmbeddedHasMany\n @private\n */\n _extractEmbeddedHasMany(store, key, hash, relationshipMeta) {\n let relationshipHash = get(hash, `data.relationships.${key}.data`);\n if (!relationshipHash) {\n return;\n }\n let hasMany = new Array(relationshipHash.length);\n for (let i = 0; i < relationshipHash.length; i++) {\n let item = relationshipHash[i];\n let {\n data,\n included\n } = this._normalizeEmbeddedRelationship(store, relationshipMeta, item);\n hash.included = hash.included || [];\n hash.included.push(data);\n if (included) {\n hash.included = hash.included.concat(included);\n }\n hasMany[i] = {\n id: data.id,\n type: data.type\n };\n }\n let relationship = {\n data: hasMany\n };\n set(hash, `data.relationships.${key}`, relationship);\n },\n /**\n @method _extractEmbeddedBelongsTo\n @private\n */\n _extractEmbeddedBelongsTo(store, key, hash, relationshipMeta) {\n let relationshipHash = get(hash, `data.relationships.${key}.data`);\n if (!relationshipHash) {\n return;\n }\n let {\n data,\n included\n } = this._normalizeEmbeddedRelationship(store, relationshipMeta, relationshipHash);\n hash.included = hash.included || [];\n hash.included.push(data);\n if (included) {\n hash.included = hash.included.concat(included);\n }\n let belongsTo = {\n id: data.id,\n type: data.type\n };\n let relationship = {\n data: belongsTo\n };\n set(hash, `data.relationships.${key}`, relationship);\n },\n /**\n @method _normalizeEmbeddedRelationship\n @private\n */\n _normalizeEmbeddedRelationship(store, relationshipMeta, relationshipHash) {\n let modelName = relationshipMeta.type;\n if (relationshipMeta.options.polymorphic) {\n modelName = relationshipHash.type;\n }\n let modelClass = store.modelFor(modelName);\n let serializer = store.serializerFor(modelName);\n return serializer.normalize(modelClass, relationshipHash, null);\n },\n isEmbeddedRecordsMixin: true\n});","import { get } from '@ember/object';\n\n/*\n Check if the passed model has a `type` attribute or a relationship named `type`.\n */\nfunction modelHasAttributeOrRelationshipNamedType(modelClass) {\n return get(modelClass, 'attributes').has('type') || get(modelClass, 'relationshipsByName').has('type');\n}\nexport { modelHasAttributeOrRelationshipNamedType };","import EmberObject from '@ember/object';\n\n/**\n @module @ember-data/serializer\n*/\n\n/**\n The `Transform` class is used to serialize and deserialize model\n attributes when they are saved or loaded from an\n adapter. Subclassing `Transform` is useful for creating custom\n attributes. All subclasses of `Transform` must implement a\n `serialize` and a `deserialize` method.\n\n Example\n\n ```app/transforms/temperature.js\n import Transform from '@ember-data/serializer/transform';\n\n // Converts centigrade in the JSON to fahrenheit in the app\n export default class TemperatureTransform extends Transform {\n deserialize(serialized, options) {\n return (serialized * 1.8) + 32;\n }\n\n serialize(deserialized, options) {\n return (deserialized - 32) / 1.8;\n }\n }\n ```\n\n Usage\n\n ```app/models/requirement.js\n import Model, { attr } from '@ember-data/model';\n\n export default class RequirementModel extends Model {\n @attr('string') name;\n @attr('temperature') temperature;\n }\n ```\n\n The options passed into the `attr` function when the attribute is\n declared on the model is also available in the transform.\n\n ```app/models/post.js\n import Model, { attr } from '@ember-data/model';\n\n export default class PostModel extends Model {\n @attr('string') title;\n @attr('markdown', {\n markdown: {\n gfm: false,\n sanitize: true\n }\n })\n markdown;\n }\n ```\n\n ```app/transforms/markdown.js\n import Transform from '@ember-data/serializer/transform';\n\n export default class MarkdownTransform extends Transform {\n serialize(deserialized, options) {\n return deserialized.raw;\n }\n\n deserialize(serialized, options) {\n let markdownOptions = options.markdown || {};\n\n return marked(serialized, markdownOptions);\n }\n }\n ```\n\n @class Transform\n @public\n */\nexport default class Transform extends EmberObject {\n /**\n When given a deserialized value from a record attribute this\n method must return the serialized value.\n Example\n ```javascript\n import { isEmpty } from '@ember/utils';\n serialize(deserialized, options) {\n return isEmpty(deserialized) ? null : Number(deserialized);\n }\n ```\n @method serialize\n @public\n @param deserialized The deserialized value\n @param options hash of options passed to `attr`\n @return The serialized value\n */\n /**\n When given a serialized value from a JSON object this method must\n return the deserialized value for the record attribute.\n Example\n ```javascript\n deserialize(serialized, options) {\n return empty(serialized) ? null : Number(serialized);\n }\n ```\n @method deserialize\n @public\n @param serialized The serialized value\n @param options hash of options passed to `attr`\n @return The deserialized value\n */\n}","import { isNone } from '@ember/utils';\nimport Transform from './transform';\n\n/**\n @module @ember-data/serializer\n*/\n\n/**\n The `BooleanTransform` class is used to serialize and deserialize\n boolean attributes on Ember Data record objects. This transform is\n used when `boolean` is passed as the type parameter to the\n [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function.\n\n Usage\n\n ```app/models/user.js\n import Model, { attr } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @attr('boolean') isAdmin;\n @attr('string') name;\n @attr('string') email;\n }\n ```\n\n By default, the boolean transform only allows for values of `true` or\n `false`. You can opt into allowing `null` values for\n boolean attributes via `attr('boolean', { allowNull: true })`\n\n ```app/models/user.js\n import Model, { attr } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @attr('string') email;\n @attr('string') username;\n @attr('boolean', { allowNull: true }) wantsWeeklyEmail;\n }\n ```\n\n @class BooleanTransform\n @public\n @extends Transform\n */\nexport default class BooleanTransform extends Transform {\n deserialize(serialized, options) {\n if (isNone(serialized) && options.allowNull === true) {\n return null;\n }\n let type = typeof serialized;\n if (type === 'boolean') {\n return serialized;\n } else if (type === 'string') {\n return /^(true|t|1)$/i.test(serialized);\n } else if (type === 'number') {\n return serialized === 1;\n } else {\n return false;\n }\n }\n serialize(deserialized, options) {\n if (isNone(deserialized) && options.allowNull === true) {\n return null;\n }\n return Boolean(deserialized);\n }\n}","import Transform from './transform';\n\n/**\n @module @ember-data/serializer\n*/\n\n/**\n The `DateTransform` class is used to serialize and deserialize\n date attributes on Ember Data record objects. This transform is used\n when `date` is passed as the type parameter to the\n [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function. It uses the [`ISO 8601`](https://en.wikipedia.org/wiki/ISO_8601)\n standard.\n\n ```app/models/score.js\n import Model, { attr, belongsTo } from '@ember-data/model';\n\n export default class ScoreModel extends Model {\n @attr('number') value;\n @belongsTo('player') player;\n @attr('date') date;\n }\n ```\n\n @class DateTransform\n @public\n @extends Transform\n */\n\nexport default class DateTransform extends Transform {\n deserialize(serialized) {\n let type = typeof serialized;\n if (type === 'string') {\n let offset = serialized.indexOf('+');\n if (offset !== -1 && serialized.length - 5 === offset) {\n offset += 3;\n return new Date(serialized.slice(0, offset) + ':' + serialized.slice(offset));\n }\n return new Date(serialized);\n } else if (type === 'number') {\n return new Date(serialized);\n } else if (serialized === null || serialized === undefined) {\n // if the value is null return null\n // if the value is not present in the data return undefined\n return serialized;\n } else {\n return null;\n }\n }\n serialize(date) {\n if (date instanceof Date && !isNaN(date)) {\n return date.toISOString();\n } else {\n return null;\n }\n }\n}","import Transform from './transform';\n\n/**\n @module @ember-data/serializer\n*/\n\nfunction isNumber(value) {\n return value === value && value !== Infinity && value !== -Infinity;\n}\n\n/**\n The `NumberTransform` class is used to serialize and deserialize\n numeric attributes on Ember Data record objects. This transform is\n used when `number` is passed as the type parameter to the\n [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function.\n\n Usage\n\n ```app/models/score.js\n import Model, { attr, belongsTo } from '@ember-data/model';\n\n export default class ScoreModel extends Model {\n @attr('number') value;\n @belongsTo('player') player;\n @attr('date') date;\n }\n ```\n\n @class NumberTransform\n @public\n @extends Transform\n */\nexport default class NumberTransform extends Transform {\n deserialize(serialized) {\n let transformed;\n if (serialized === '' || serialized === null || serialized === undefined) {\n return null;\n } else {\n transformed = Number(serialized);\n return isNumber(transformed) ? transformed : null;\n }\n }\n serialize(deserialized) {\n let transformed;\n if (deserialized === '' || deserialized === null || deserialized === undefined) {\n return null;\n } else {\n transformed = Number(deserialized);\n return isNumber(transformed) ? transformed : null;\n }\n }\n}","import { isNone as none } from '@ember/utils';\nimport Transform from './transform';\n\n/**\n @module @ember-data/serializer\n*/\n\n/**\n The `StringTransform` class is used to serialize and deserialize\n string attributes on Ember Data record objects. This transform is\n used when `string` is passed as the type parameter to the\n [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function.\n\n Usage\n\n ```app/models/user.js\n import Model, { attr, belongsTo } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @attr('boolean') isAdmin;\n @attr('string') name;\n @attr('string') email;\n }\n ```\n\n @class StringTransform\n @public\n @extends Transform\n */\nexport default class StringTransform extends Transform {\n deserialize(serialized) {\n return none(serialized) ? null : String(serialized);\n }\n serialize(deserialized) {\n return none(deserialized) ? null : String(deserialized);\n }\n}","var _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\n/**\n ## Overview\n\n In order to properly manage and present your data, EmberData\n needs to understand the structure of data it receives.\n\n `Serializers` convert data between the server's API format and\n the format EmberData understands.\n\n Data received from an API response is **normalized** into\n [JSON:API](https://jsonapi.org/) (the format used internally\n by EmberData), while data sent to an API is **serialized**\n into the format the API expects.\n\n ### Implementing a Serializer\n\n There are only two required serializer methods, one for\n normalizing data from the server API format into JSON:API, and\n another for serializing records via `Snapshots` into the expected\n server API format.\n\n To implement a serializer, export a class that conforms to the structure\n described by the [MinimumSerializerInterface](/ember-data/release/classes/MinimumSerializerInterface)\n from the `app/serializers/` directory. An example is below.\n\n ```ts\n import EmberObject from '@ember/object';\n\n export default class ApplicationSerializer extends EmberObject {\n normalizeResponse(store, schema, rawPayload) {\n return rawPayload;\n }\n\n serialize(snapshot, options) {\n const serializedResource = {\n id: snapshot.id,\n type: snapshot.modelName,\n attributes: snapshot.attributes()\n };\n\n return serializedResource;\n }\n }\n ```\n\n\n ### Serializer Resolution\n\n `store.serializerFor(name)` will lookup serializers defined in\n `app/serializers/` and return an instance. If no serializer is found, an\n error will be thrown.\n\n `serializerFor` first attempts to find a serializer with an exact match on `name`,\n then falls back to checking for the presence of a serializer named `application`.\n\n ```ts\n store.serializerFor('author');\n\n // lookup paths (in order) =>\n // app/serializers/author.js\n // app/serializers/application.js\n ```\n\n Most requests in EmberData are made with respect to a particular `type` (or `modelName`)\n (e.g., \"get me the full collection of **books**\" or \"get me the **employee** whose id is 37\"). We\n refer to this as the **primary** resource `type`.\n\n Typically `serializerFor` will be used to find a serializer with a name matching that of the primary\n resource `type` for the request, falling back to the `application` serializer for those types that\n do not have a defined serializer. This is often described as a `per-model` or `per-type` strategy\n for defining serializers. However, because APIs rarely format payloads per-type but rather\n per-API-version, this may not be a desired strategy.\n\n It is recommended that applications define only a single `application` adapter and serializer\n where possible.\n\n If you have multiple API formats and the per-type strategy is not viable, one strategy is to\n write an `application` adapter and serializer that make use of `options` to specify the desired\n format when making a request.\n\n ### Using a Serializer\n\n Any serializer in `app/serializers/` can be looked up by `name` using `store.serializerFor(name)`.\n\n ### Default Serializers\n\n For applications whose APIs are *very close to* or *exactly* the **REST** format or **JSON:API**\n format the `@ember-data/serializer` package contains implementations these applications can\n extend. It also contains a simple `JSONSerializer` for serializing to/from very basic JSON objects.\n\n Many applications will find writing their own serializer to be more performant and less\n complex than extending these classes even when their API format is very close to that expected\n by these serializers.\n\n It is recommended that apps write their own serializer to best suit the needs of their API and\n application.\n\n @module @ember-data/serializer\n @main @ember-data/serializer\n*/\n\nimport EmberObject from '@ember/object';\nimport { inject as service } from '@ember/service';\n/**\n `Serializer` is an abstract base class that you should override in your\n application to customize it for your backend. The minimum set of methods\n that you should implement is:\n\n * `normalizeResponse()`\n * `serialize()`\n\n And you can optionally override the following methods:\n\n * `normalize()`\n\n For an example implementation, see\n [JSONSerializer](JSONSerializer), the included JSON serializer.\n\n @class Serializer\n @public\n @extends Ember.EmberObject\n*/\nlet _class = (_class2 = class _class2 extends EmberObject {\n constructor(...args) {\n super(...args);\n _initializerDefineProperty(this, \"store\", _descriptor, this);\n }\n /**\n The `store` property is the application's `store` that contains\n all records. It can be used to look up serializers for other model\n types that may be nested inside the payload response.\n Example:\n ```js\n Serializer.extend({\n extractRelationship(relationshipModelName, relationshipHash) {\n let modelClass = this.store.modelFor(relationshipModelName);\n let relationshipSerializer = this.store.serializerFor(relationshipModelName);\n return relationshipSerializer.normalize(modelClass, relationshipHash);\n }\n });\n ```\n @property store\n @type {Store}\n @public\n */\n\n /**\n The `normalizeResponse` method is used to normalize a payload from the\n server to a JSON-API Document.\n http://jsonapi.org/format/#document-structure\n Example:\n ```js\n Serializer.extend({\n normalizeResponse(store, primaryModelClass, payload, id, requestType) {\n if (requestType === 'findRecord') {\n return this.normalize(primaryModelClass, payload);\n } else {\n return payload.reduce(function(documentHash, item) {\n let { data, included } = this.normalize(primaryModelClass, item);\n documentHash.included.push(...included);\n documentHash.data.push(data);\n return documentHash;\n }, { data: [], included: [] })\n }\n }\n });\n ```\n @since 1.13.0\n @method normalizeResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n\n /**\n The `serialize` method is used when a record is saved in order to convert\n the record into the form that your external data source expects.\n `serialize` takes an optional `options` hash with a single option:\n - `includeId`: If this is `true`, `serialize` should include the ID\n in the serialized object it builds.\n Example:\n ```js\n Serializer.extend({\n serialize(snapshot, options) {\n let json = {\n id: snapshot.id\n };\n snapshot.eachAttribute((key, attribute) => {\n json[key] = snapshot.attr(key);\n });\n snapshot.eachRelationship((key, relationship) => {\n if (relationship.kind === 'belongsTo') {\n json[key] = snapshot.belongsTo(key, { id: true });\n } else if (relationship.kind === 'hasMany') {\n json[key] = snapshot.hasMany(key, { ids: true });\n }\n });\n return json;\n },\n });\n ```\n @method serialize\n @public\n @param {Snapshot} snapshot\n @param {Object} [options]\n @return {Object}\n */\n\n /**\n The `normalize` method is used to convert a payload received from your\n external data source into the normalized form `store.push()` expects. You\n should override this method, munge the hash and return the normalized\n payload.\n Example:\n ```js\n Serializer.extend({\n normalize(modelClass, resourceHash) {\n let data = {\n id: resourceHash.id,\n type: modelClass.modelName,\n attributes: resourceHash\n };\n return { data: data };\n }\n })\n ```\n @method normalize\n @public\n @param {Model} typeClass\n @param {Object} hash\n @return {Object}\n */\n normalize(typeClass, hash) {\n return hash;\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"store\", [service], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2);\nexport { _class as default };","/**\n * @module @ember-data/serializer/json-api\n */\nimport { assert, warn } from '@ember/debug';\nimport { dasherize } from '@ember/string';\nimport { isNone, typeOf } from '@ember/utils';\nimport { DEBUG } from '@glimmer/env';\nimport { pluralize, singularize } from 'ember-inflector';\nimport JSONSerializer from '@ember-data/serializer/json';\nimport { normalizeModelName } from '@ember-data/store';\n\n/**\n Ember Data 2.0 Serializer:\n\n In Ember Data a Serializer is used to serialize and deserialize\n records when they are transferred in and out of an external source.\n This process involves normalizing property names, transforming\n attribute values and serializing relationships.\n\n `JSONAPISerializer` supports the http://jsonapi.org/ spec and is the\n serializer recommended by Ember Data.\n\n This serializer normalizes a JSON API payload that looks like:\n\n ```app/models/player.js\n import Model, { attr, belongsTo } from '@ember-data/model';\n\n export default class Player extends Model {\n @attr('string') name;\n @attr('string') skill;\n @attr('number') gamesPlayed;\n @belongsTo('club') club;\n }\n ```\n\n ```app/models/club.js\n import Model, { attr, hasMany } from '@ember-data/model';\n\n export default class Club extends Model {\n @attr('string') name;\n @attr('string') location;\n @hasMany('player') players;\n }\n ```\n\n ```js\n {\n \"data\": [\n {\n \"attributes\": {\n \"name\": \"Benfica\",\n \"location\": \"Portugal\"\n },\n \"id\": \"1\",\n \"relationships\": {\n \"players\": {\n \"data\": [\n {\n \"id\": \"3\",\n \"type\": \"players\"\n }\n ]\n }\n },\n \"type\": \"clubs\"\n }\n ],\n \"included\": [\n {\n \"attributes\": {\n \"name\": \"Eusebio Silva Ferreira\",\n \"skill\": \"Rocket shot\",\n \"games-played\": 431\n },\n \"id\": \"3\",\n \"relationships\": {\n \"club\": {\n \"data\": {\n \"id\": \"1\",\n \"type\": \"clubs\"\n }\n }\n },\n \"type\": \"players\"\n }\n ]\n }\n ```\n\n to the format that the Ember Data store expects.\n\n ### Customizing meta\n\n Since a JSON API Document can have meta defined in multiple locations you can\n use the specific serializer hooks if you need to customize the meta.\n\n One scenario would be to camelCase the meta keys of your payload. The example\n below shows how this could be done using `normalizeArrayResponse` and\n `extractRelationship`.\n\n ```app/serializers/application.js\n import JSONAPISerializer from '@ember-data/serializer/json-api';\n\n export default class ApplicationSerializer extends JSONAPISerializer {\n normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {\n let normalizedDocument = super.normalizeArrayResponse(...arguments);\n\n // Customize document meta\n normalizedDocument.meta = camelCaseKeys(normalizedDocument.meta);\n\n return normalizedDocument;\n }\n\n extractRelationship(relationshipHash) {\n let normalizedRelationship = super.extractRelationship(...arguments);\n\n // Customize relationship meta\n normalizedRelationship.meta = camelCaseKeys(normalizedRelationship.meta);\n\n return normalizedRelationship;\n }\n }\n ```\n\n @main @ember-data/serializer/json-api\n @since 1.13.0\n @class JSONAPISerializer\n @public\n @extends JSONSerializer\n*/\nconst JSONAPISerializer = JSONSerializer.extend({\n /**\n @method _normalizeDocumentHelper\n @param {Object} documentHash\n @return {Object}\n @private\n */\n _normalizeDocumentHelper(documentHash) {\n if (typeOf(documentHash.data) === 'object') {\n documentHash.data = this._normalizeResourceHelper(documentHash.data);\n } else if (Array.isArray(documentHash.data)) {\n let ret = new Array(documentHash.data.length);\n for (let i = 0; i < documentHash.data.length; i++) {\n let data = documentHash.data[i];\n ret[i] = this._normalizeResourceHelper(data);\n }\n documentHash.data = ret;\n }\n if (Array.isArray(documentHash.included)) {\n let ret = new Array();\n for (let i = 0; i < documentHash.included.length; i++) {\n let included = documentHash.included[i];\n let normalized = this._normalizeResourceHelper(included);\n if (normalized !== null) {\n // can be null when unknown type is encountered\n ret.push(normalized);\n }\n }\n documentHash.included = ret;\n }\n return documentHash;\n },\n /**\n @method _normalizeRelationshipDataHelper\n @param {Object} relationshipDataHash\n @return {Object}\n @private\n */\n _normalizeRelationshipDataHelper(relationshipDataHash) {\n relationshipDataHash.type = this.modelNameFromPayloadKey(relationshipDataHash.type);\n return relationshipDataHash;\n },\n /**\n @method _normalizeResourceHelper\n @param {Object} resourceHash\n @return {Object}\n @private\n */\n _normalizeResourceHelper(resourceHash) {\n assert(this.warnMessageForUndefinedType(), !isNone(resourceHash.type));\n let modelName, usedLookup;\n modelName = this.modelNameFromPayloadKey(resourceHash.type);\n usedLookup = 'modelNameFromPayloadKey';\n if (!this.store.getSchemaDefinitionService().doesTypeExist(modelName)) {\n warn(this.warnMessageNoModelForType(modelName, resourceHash.type, usedLookup), false, {\n id: 'ds.serializer.model-for-type-missing'\n });\n return null;\n }\n let modelClass = this.store.modelFor(modelName);\n let serializer = this.store.serializerFor(modelName);\n let {\n data\n } = serializer.normalize(modelClass, resourceHash);\n return data;\n },\n /**\n Normalize some data and push it into the store.\n @method pushPayload\n @public\n @param {Store} store\n @param {Object} payload\n */\n pushPayload(store, payload) {\n let normalizedPayload = this._normalizeDocumentHelper(payload);\n store.push(normalizedPayload);\n },\n /**\n @method _normalizeResponse\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @param {Boolean} isSingle\n @return {Object} JSON-API Document\n @private\n */\n _normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {\n let normalizedPayload = this._normalizeDocumentHelper(payload);\n return normalizedPayload;\n },\n normalizeQueryRecordResponse() {\n let normalized = this._super(...arguments);\n assert('Expected the primary data returned by the serializer for a `queryRecord` response to be a single object but instead it was an array.', !Array.isArray(normalized.data));\n return normalized;\n },\n extractAttributes(modelClass, resourceHash) {\n let attributes = {};\n if (resourceHash.attributes) {\n modelClass.eachAttribute(key => {\n let attributeKey = this.keyForAttribute(key, 'deserialize');\n if (resourceHash.attributes[attributeKey] !== undefined) {\n attributes[key] = resourceHash.attributes[attributeKey];\n }\n if (DEBUG) {\n if (resourceHash.attributes[attributeKey] === undefined && resourceHash.attributes[key] !== undefined) {\n assert(`Your payload for '${modelClass.modelName}' contains '${key}', but your serializer is setup to look for '${attributeKey}'. This is most likely because Ember Data's JSON API serializer dasherizes attribute keys by default. You should subclass JSONAPISerializer and implement 'keyForAttribute(key) { return key; }' to prevent Ember Data from customizing your attribute keys.`, false);\n }\n }\n });\n }\n return attributes;\n },\n /**\n Returns a relationship formatted as a JSON-API \"relationship object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n @method extractRelationship\n @public\n @param {Object} relationshipHash\n @return {Object}\n */\n extractRelationship(relationshipHash) {\n if (typeOf(relationshipHash.data) === 'object') {\n relationshipHash.data = this._normalizeRelationshipDataHelper(relationshipHash.data);\n }\n if (Array.isArray(relationshipHash.data)) {\n let ret = new Array(relationshipHash.data.length);\n for (let i = 0; i < relationshipHash.data.length; i++) {\n let data = relationshipHash.data[i];\n ret[i] = this._normalizeRelationshipDataHelper(data);\n }\n relationshipHash.data = ret;\n }\n return relationshipHash;\n },\n /**\n Returns the resource's relationships formatted as a JSON-API \"relationships object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n @method extractRelationships\n @public\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {Object}\n */\n extractRelationships(modelClass, resourceHash) {\n let relationships = {};\n if (resourceHash.relationships) {\n modelClass.eachRelationship((key, relationshipMeta) => {\n let relationshipKey = this.keyForRelationship(key, relationshipMeta.kind, 'deserialize');\n if (resourceHash.relationships[relationshipKey] !== undefined) {\n let relationshipHash = resourceHash.relationships[relationshipKey];\n relationships[key] = this.extractRelationship(relationshipHash);\n }\n if (DEBUG) {\n if (resourceHash.relationships[relationshipKey] === undefined && resourceHash.relationships[key] !== undefined) {\n assert(`Your payload for '${modelClass.modelName}' contains '${key}', but your serializer is setup to look for '${relationshipKey}'. This is most likely because Ember Data's JSON API serializer dasherizes relationship keys by default. You should subclass JSONAPISerializer and implement 'keyForRelationship(key) { return key; }' to prevent Ember Data from customizing your relationship keys.`, false);\n }\n }\n });\n }\n return relationships;\n },\n /**\n @method _extractType\n @param {Model} modelClass\n @param {Object} resourceHash\n @return {String}\n @private\n */\n _extractType(modelClass, resourceHash) {\n return this.modelNameFromPayloadKey(resourceHash.type);\n },\n /**\n Dasherizes and singularizes the model name in the payload to match\n the format Ember Data uses internally for the model name.\n For example the key `posts` would be converted to `post` and the\n key `studentAssesments` would be converted to `student-assesment`.\n @method modelNameFromPayloadKey\n @public\n @param {String} key\n @return {String} the model's modelName\n */\n modelNameFromPayloadKey(key) {\n return singularize(normalizeModelName(key));\n },\n /**\n Converts the model name to a pluralized version of the model name.\n For example `post` would be converted to `posts` and\n `student-assesment` would be converted to `student-assesments`.\n @method payloadKeyFromModelName\n @public\n @param {String} modelName\n @return {String}\n */\n // TODO @deprecated Use payloadTypeFromModelName instead\n payloadKeyFromModelName(modelName) {\n return pluralize(modelName);\n },\n normalize(modelClass, resourceHash) {\n if (resourceHash.attributes) {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash.attributes);\n }\n if (resourceHash.relationships) {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash.relationships);\n }\n let data = {\n id: this.extractId(modelClass, resourceHash),\n type: this._extractType(modelClass, resourceHash),\n attributes: this.extractAttributes(modelClass, resourceHash),\n relationships: this.extractRelationships(modelClass, resourceHash)\n };\n this.applyTransforms(modelClass, data.attributes);\n return {\n data\n };\n },\n /**\n `keyForAttribute` can be used to define rules for how to convert an\n attribute name in your model to a key in your JSON.\n By default `JSONAPISerializer` follows the format used on the examples of\n http://jsonapi.org/format and uses dashes as the word separator in the JSON\n attribute keys.\n This behaviour can be easily customized by extending this method.\n Example\n ```app/serializers/application.js\n import JSONAPISerializer from '@ember-data/serializer/json-api';\n import { dasherize } from '@ember/string';\n export default class ApplicationSerializer extends JSONAPISerializer {\n keyForAttribute(attr, method) {\n return dasherize(attr).toUpperCase();\n }\n }\n ```\n @method keyForAttribute\n @public\n @param {String} key\n @param {String} method\n @return {String} normalized key\n */\n keyForAttribute(key, method) {\n return dasherize(key);\n },\n /**\n `keyForRelationship` can be used to define a custom key when\n serializing and deserializing relationship properties.\n By default `JSONAPISerializer` follows the format used on the examples of\n http://jsonapi.org/format and uses dashes as word separators in\n relationship properties.\n This behaviour can be easily customized by extending this method.\n Example\n ```app/serializers/post.js\n import JSONAPISerializer from '@ember-data/serializer/json-api';\n import { underscore } from '@ember/string';\n export default class ApplicationSerializer extends JSONAPISerializer {\n keyForRelationship(key, relationship, method) {\n return underscore(key);\n }\n }\n ```\n @method keyForRelationship\n @public\n @param {String} key\n @param {String} typeClass\n @param {String} method\n @return {String} normalized key\n */\n keyForRelationship(key, typeClass, method) {\n return dasherize(key);\n },\n /**\n Called when a record is saved in order to convert the\n record into JSON.\n For example, consider this model:\n ```app/models/comment.js\n import Model, { attr, belongsTo } from '@ember-data/model';\n export default class CommentModel extends Model {\n @attr title;\n @attr body;\n @belongsTo('user', { async: false, inverse: null })\n author;\n }\n ```\n The default serialization would create a JSON-API resource object like:\n ```javascript\n {\n \"data\": {\n \"type\": \"comments\",\n \"attributes\": {\n \"title\": \"Rails is unagi\",\n \"body\": \"Rails? Omakase? O_O\",\n },\n \"relationships\": {\n \"author\": {\n \"data\": {\n \"id\": \"12\",\n \"type\": \"users\"\n }\n }\n }\n }\n }\n ```\n By default, attributes are passed through as-is, unless\n you specified an attribute type (`attr('date')`). If\n you specify a transform, the JavaScript value will be\n serialized when inserted into the attributes hash.\n Belongs-to relationships are converted into JSON-API\n resource identifier objects.\n ## IDs\n `serialize` takes an options hash with a single option:\n `includeId`. If this option is `true`, `serialize` will,\n by default include the ID in the JSON object it builds.\n The JSONAPIAdapter passes in `includeId: true` when serializing a record\n for `createRecord` or `updateRecord`.\n ## Customization\n Your server may expect data in a different format than the\n built-in serialization format.\n In that case, you can implement `serialize` yourself and\n return data formatted to match your API's expectations, or override\n the invoked adapter method and do the serialization in the adapter directly\n by using the provided snapshot.\n If your API's format differs greatly from the JSON:API spec, you should\n consider authoring your own adapter and serializer instead of extending\n this class.\n ```app/serializers/post.js\n import JSONAPISerializer from '@ember-data/serializer/json-api';\n export default class PostSerializer extends JSONAPISerializer {\n serialize(snapshot, options) {\n let json = {\n POST_TTL: snapshot.attr('title'),\n POST_BDY: snapshot.attr('body'),\n POST_CMS: snapshot.hasMany('comments', { ids: true })\n };\n if (options.includeId) {\n json.POST_ID_ = snapshot.id;\n }\n return json;\n }\n }\n ```\n ## Customizing an App-Wide Serializer\n If you want to define a serializer for your entire\n application, you'll probably want to use `eachAttribute`\n and `eachRelationship` on the record.\n ```app/serializers/application.js\n import JSONAPISerializer from '@ember-data/serializer/json-api';\n import { singularize } from 'ember-inflector';\n import { underscore } from '@ember/string';\n export default class ApplicationSerializer extends JSONAPISerializer {\n serialize(snapshot, options) {\n let json = {};\n snapshot.eachAttribute((name) => {\n json[serverAttributeName(name)] = snapshot.attr(name);\n });\n snapshot.eachRelationship((name, relationship) => {\n if (relationship.kind === 'hasMany') {\n json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });\n }\n });\n if (options.includeId) {\n json.ID_ = snapshot.id;\n }\n return json;\n }\n }\n function serverAttributeName(attribute) {\n return underscore(attribute).toUpperCase();\n }\n function serverHasManyName(name) {\n return serverAttributeName(singularize(name)) + '_IDS';\n }\n ```\n This serializer will generate JSON that looks like this:\n ```javascript\n {\n \"TITLE\": \"Rails is omakase\",\n \"BODY\": \"Yep. Omakase.\",\n \"COMMENT_IDS\": [ \"1\", \"2\", \"3\" ]\n }\n ```\n ## Tweaking the Default Formatting\n If you just want to do some small tweaks on the default JSON:API formatted response,\n you can call `super.serialize` first and make the tweaks\n on the returned object.\n ```app/serializers/post.js\n import JSONAPISerializer from '@ember-data/serializer/json-api';\n export default class PostSerializer extends JSONAPISerializer {\n serialize(snapshot, options) {\n let json = super.serialize(...arguments);\n json.data.attributes.subject = json.data.attributes.title;\n delete json.data.attributes.title;\n return json;\n }\n }\n ```\n @method serialize\n @public\n @param {Snapshot} snapshot\n @param {Object} options\n @return {Object} json\n */\n serialize(snapshot, options) {\n let data = this._super(...arguments);\n data.type = this.payloadKeyFromModelName(snapshot.modelName);\n return {\n data\n };\n },\n serializeAttribute(snapshot, json, key, attribute) {\n let type = attribute.type;\n if (this._canSerialize(key)) {\n json.attributes = json.attributes || {};\n let value = snapshot.attr(key);\n if (type) {\n let transform = this.transformFor(type);\n value = transform.serialize(value, attribute.options);\n }\n let schema = this.store.modelFor(snapshot.modelName);\n let payloadKey = this._getMappedKey(key, schema);\n if (payloadKey === key) {\n payloadKey = this.keyForAttribute(key, 'serialize');\n }\n json.attributes[payloadKey] = value;\n }\n },\n serializeBelongsTo(snapshot, json, relationship) {\n let key = relationship.key;\n if (this._canSerialize(key)) {\n let belongsTo = snapshot.belongsTo(key);\n let belongsToIsNotNew = belongsTo && !belongsTo.isNew;\n if (belongsTo === null || belongsToIsNotNew) {\n json.relationships = json.relationships || {};\n let schema = this.store.modelFor(snapshot.modelName);\n let payloadKey = this._getMappedKey(key, schema);\n if (payloadKey === key) {\n payloadKey = this.keyForRelationship(key, 'belongsTo', 'serialize');\n }\n let data = null;\n if (belongsTo) {\n let payloadType = this.payloadKeyFromModelName(belongsTo.modelName);\n data = {\n type: payloadType,\n id: belongsTo.id\n };\n }\n json.relationships[payloadKey] = {\n data\n };\n }\n }\n },\n serializeHasMany(snapshot, json, relationship) {\n let key = relationship.key;\n if (this.shouldSerializeHasMany(snapshot, key, relationship)) {\n let hasMany = snapshot.hasMany(key);\n if (hasMany !== undefined) {\n json.relationships = json.relationships || {};\n let schema = this.store.modelFor(snapshot.modelName);\n let payloadKey = this._getMappedKey(key, schema);\n if (payloadKey === key && this.keyForRelationship) {\n payloadKey = this.keyForRelationship(key, 'hasMany', 'serialize');\n }\n\n // only serialize has many relationships that are not new\n let nonNewHasMany = hasMany.filter(item => item.record && !item.record.get('isNew'));\n let data = new Array(nonNewHasMany.length);\n for (let i = 0; i < nonNewHasMany.length; i++) {\n let item = hasMany[i];\n let payloadType = this.payloadKeyFromModelName(item.modelName);\n data[i] = {\n type: payloadType,\n id: item.id\n };\n }\n json.relationships[payloadKey] = {\n data\n };\n }\n }\n }\n});\nif (DEBUG) {\n JSONAPISerializer.reopen({\n init(...args) {\n this._super(...args);\n assert(`You've used the EmbeddedRecordsMixin in ${this.toString()} which is not fully compatible with the JSON:API specification. Please confirm that this works for your specific API and add \\`this.isEmbeddedRecordsMixinCompatible = true\\` to your serializer.`, !this.isEmbeddedRecordsMixin || this.isEmbeddedRecordsMixinCompatible === true);\n let constructor = this.constructor;\n warn(`You've defined 'extractMeta' in ${constructor.toString()} which is not used for serializers extending JSONAPISerializer. Read more at https://api.emberjs.com/ember-data/release/classes/JSONAPISerializer on how to customize meta when using JSON API.`, this.extractMeta === JSONSerializer.prototype.extractMeta, {\n id: 'ds.serializer.json-api.extractMeta'\n });\n },\n warnMessageForUndefinedType() {\n return 'Encountered a resource object with an undefined type (resolved resource using ' + this.constructor.toString() + ')';\n },\n warnMessageNoModelForType(modelName, originalType, usedLookup) {\n return `Encountered a resource object with type \"${originalType}\", but no model was found for model name \"${modelName}\" (resolved model name using '${this.constructor.toString()}.${usedLookup}(\"${originalType}\")').`;\n }\n });\n}\nexport default JSONAPISerializer;","/**\n * @module @ember-data/serializer/json\n */\nimport { getOwner } from '@ember/application';\nimport { assert, warn } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { isNone, typeOf } from '@ember/utils';\nimport Serializer from '@ember-data/serializer';\nimport { normalizeModelName } from '@ember-data/store';\nimport { coerceId, errorsArrayToHash } from '@ember-data/store/-private';\nimport { modelHasAttributeOrRelationshipNamedType } from './-private';\n\n/**\n Ember Data 2.0 Serializer:\n\n In Ember Data a Serializer is used to serialize and deserialize\n records when they are transferred in and out of an external source.\n This process involves normalizing property names, transforming\n attribute values and serializing relationships.\n\n By default, Ember Data uses and recommends the `JSONAPISerializer`.\n\n `JSONSerializer` is useful for simpler or legacy backends that may\n not support the http://jsonapi.org/ spec.\n\n For example, given the following `User` model and JSON payload:\n\n ```app/models/user.js\n import Model, { attr, belongsTo, hasMany } from '@ember-data/model';\n\n export default class UserModel extends Model {\n @hasMany('user') friends;\n @belongsTo('location') house;\n\n @attr('string') name;\n }\n ```\n\n ```js\n {\n id: 1,\n name: 'Sebastian',\n friends: [3, 4],\n links: {\n house: '/houses/lefkada'\n }\n }\n ```\n\n `JSONSerializer` will normalize the JSON payload to the JSON API format that the\n Ember Data store expects.\n\n You can customize how JSONSerializer processes its payload by passing options in\n the `attrs` hash or by subclassing the `JSONSerializer` and overriding hooks:\n\n - To customize how a single record is normalized, use the `normalize` hook.\n - To customize how `JSONSerializer` normalizes the whole server response, use the\n `normalizeResponse` hook.\n - To customize how `JSONSerializer` normalizes a specific response from the server,\n use one of the many specific `normalizeResponse` hooks.\n - To customize how `JSONSerializer` normalizes your id, attributes or relationships,\n use the `extractId`, `extractAttributes` and `extractRelationships` hooks.\n\n The `JSONSerializer` normalization process follows these steps:\n\n 1. `normalizeResponse`\n - entry method to the serializer.\n 2. `normalizeCreateRecordResponse`\n - a `normalizeResponse` for a specific operation is called.\n 3. `normalizeSingleResponse`|`normalizeArrayResponse`\n - for methods like `createRecord` we expect a single record back, while for methods like `findAll` we expect multiple records back.\n 4. `normalize`\n - `normalizeArrayResponse` iterates and calls `normalize` for each of its records while `normalizeSingle`\n calls it once. This is the method you most likely want to subclass.\n 5. `extractId` | `extractAttributes` | `extractRelationships`\n - `normalize` delegates to these methods to\n turn the record payload into the JSON API format.\n\n @main @ember-data/serializer/json\n @class JSONSerializer\n @public\n @extends Serializer\n*/\nconst JSONSerializer = Serializer.extend({\n /**\n The `primaryKey` is used when serializing and deserializing\n data. Ember Data always uses the `id` property to store the id of\n the record. The external source may not always follow this\n convention. In these cases it is useful to override the\n `primaryKey` property to match the `primaryKey` of your external\n store.\n Example\n ```app/serializers/application.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class ApplicationSerializer extends JSONSerializer {\n primaryKey = '_id'\n }\n ```\n @property primaryKey\n @type {String}\n @public\n @default 'id'\n */\n primaryKey: 'id',\n /**\n The `attrs` object can be used to declare a simple mapping between\n property names on `Model` records and payload keys in the\n serialized JSON object representing the record. An object with the\n property `key` can also be used to designate the attribute's key on\n the response payload.\n Example\n ```app/models/person.js\n import Model, { attr } from '@ember-data/model';\n export default class PersonModel extends Model {\n @attr('string') firstName;\n @attr('string') lastName;\n @attr('string') occupation;\n @attr('boolean') admin;\n }\n ```\n ```app/serializers/person.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class PersonSerializer extends JSONSerializer {\n attrs = {\n admin: 'is_admin',\n occupation: { key: 'career' }\n }\n }\n ```\n You can also remove attributes and relationships by setting the `serialize`\n key to `false` in your mapping object.\n Example\n ```app/serializers/person.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class PostSerializer extends JSONSerializer {\n attrs = {\n admin: { serialize: false },\n occupation: { key: 'career' }\n }\n }\n ```\n When serialized:\n ```javascript\n {\n \"firstName\": \"Harry\",\n \"lastName\": \"Houdini\",\n \"career\": \"magician\"\n }\n ```\n Note that the `admin` is now not included in the payload.\n Setting `serialize` to `true` enforces serialization for hasMany\n relationships even if it's neither a many-to-many nor many-to-none\n relationship.\n @property attrs\n @public\n @type {Object}\n */\n mergedProperties: ['attrs'],\n /**\n Given a subclass of `Model` and a JSON object this method will\n iterate through each attribute of the `Model` and invoke the\n `Transform#deserialize` method on the matching property of the\n JSON object. This method is typically called after the\n serializer's `normalize` method.\n @method applyTransforms\n @private\n @param {Model} typeClass\n @param {Object} data The data to transform\n @return {Object} data The transformed data object\n */\n applyTransforms(typeClass, data) {\n let attributes = get(typeClass, 'attributes');\n typeClass.eachTransformedAttribute((key, typeClass) => {\n if (data[key] === undefined) {\n return;\n }\n let transform = this.transformFor(typeClass);\n let transformMeta = attributes.get(key);\n data[key] = transform.deserialize(data[key], transformMeta.options);\n });\n return data;\n },\n /**\n The `normalizeResponse` method is used to normalize a payload from the\n server to a JSON-API Document.\n http://jsonapi.org/format/#document-structure\n This method delegates to a more specific normalize method based on\n the `requestType`.\n To override this method with a custom one, make sure to call\n `return super.normalizeResponse(store, primaryModelClass, payload, id, requestType)` with your\n pre-processed data.\n Here's an example of using `normalizeResponse` manually:\n ```javascript\n socket.on('message', function(message) {\n let data = message.data;\n let modelClass = store.modelFor(data.modelName);\n let serializer = store.serializerFor(data.modelName);\n let normalized = serializer.normalizeSingleResponse(store, modelClass, data, data.id);\n store.push(normalized);\n });\n ```\n @since 1.13.0\n @method normalizeResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeResponse(store, primaryModelClass, payload, id, requestType) {\n switch (requestType) {\n case 'findRecord':\n return this.normalizeFindRecordResponse(...arguments);\n case 'queryRecord':\n return this.normalizeQueryRecordResponse(...arguments);\n case 'findAll':\n return this.normalizeFindAllResponse(...arguments);\n case 'findBelongsTo':\n return this.normalizeFindBelongsToResponse(...arguments);\n case 'findHasMany':\n return this.normalizeFindHasManyResponse(...arguments);\n case 'findMany':\n return this.normalizeFindManyResponse(...arguments);\n case 'query':\n return this.normalizeQueryResponse(...arguments);\n case 'createRecord':\n return this.normalizeCreateRecordResponse(...arguments);\n case 'deleteRecord':\n return this.normalizeDeleteRecordResponse(...arguments);\n case 'updateRecord':\n return this.normalizeUpdateRecordResponse(...arguments);\n }\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `findRecord`\n @since 1.13.0\n @method normalizeFindRecordResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeFindRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `queryRecord`\n @since 1.13.0\n @method normalizeQueryRecordResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeQueryRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `findAll`\n @since 1.13.0\n @method normalizeFindAllResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeFindAllResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `findBelongsTo`\n @since 1.13.0\n @method normalizeFindBelongsToResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeFindBelongsToResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `findHasMany`\n @since 1.13.0\n @method normalizeFindHasManyResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeFindHasManyResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `findMany`\n @since 1.13.0\n @method normalizeFindManyResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeFindManyResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `query`\n @since 1.13.0\n @method normalizeQueryResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeQueryResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `createRecord`\n @since 1.13.0\n @method normalizeCreateRecordResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `deleteRecord`\n @since 1.13.0\n @method normalizeDeleteRecordResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeDeleteRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse(...arguments);\n },\n /**\n Called by the default normalizeResponse implementation when the\n type of request is `updateRecord`\n @since 1.13.0\n @method normalizeUpdateRecordResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeUpdateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse(...arguments);\n },\n /**\n normalizeUpdateRecordResponse, normalizeCreateRecordResponse and\n normalizeDeleteRecordResponse delegate to this method by default.\n @since 1.13.0\n @method normalizeSaveResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeSaveResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse(...arguments);\n },\n /**\n normalizeQueryResponse and normalizeFindRecordResponse delegate to this\n method by default.\n @since 1.13.0\n @method normalizeSingleResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeSingleResponse(store, primaryModelClass, payload, id, requestType) {\n return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, true);\n },\n /**\n normalizeQueryResponse, normalizeFindManyResponse, and normalizeFindHasManyResponse delegate\n to this method by default.\n @since 1.13.0\n @method normalizeArrayResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {\n return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, false);\n },\n /**\n @method _normalizeResponse\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @param {Boolean} isSingle\n @return {Object} JSON-API Document\n @private\n */\n _normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {\n let documentHash = {\n data: null,\n included: []\n };\n let meta = this.extractMeta(store, primaryModelClass, payload);\n if (meta) {\n assert('The `meta` returned from `extractMeta` has to be an object, not \"' + typeOf(meta) + '\".', typeOf(meta) === 'object');\n documentHash.meta = meta;\n }\n if (isSingle) {\n let {\n data,\n included\n } = this.normalize(primaryModelClass, payload);\n documentHash.data = data;\n if (included) {\n documentHash.included = included;\n }\n } else {\n let ret = new Array(payload.length);\n for (let i = 0, l = payload.length; i < l; i++) {\n let item = payload[i];\n let {\n data,\n included\n } = this.normalize(primaryModelClass, item);\n if (included) {\n documentHash.included = documentHash.included.concat(included);\n }\n ret[i] = data;\n }\n documentHash.data = ret;\n }\n return documentHash;\n },\n /**\n Normalizes a part of the JSON payload returned by\n the server. You should override this method, munge the hash\n and call super if you have generic normalization to do.\n It takes the type of the record that is being normalized\n (as a Model class), the property where the hash was\n originally found, and the hash to normalize.\n You can use this method, for example, to normalize underscored keys to camelized\n or other general-purpose normalizations.\n Example\n ```app/serializers/application.js\n import JSONSerializer from '@ember-data/serializer/json';\n import { underscore } from '@ember/string';\n import { get } from '@ember/object';\n export default class ApplicationSerializer extends JSONSerializer {\n normalize(typeClass, hash) {\n let fields = get(typeClass, 'fields');\n fields.forEach(function(type, field) {\n let payloadField = underscore(field);\n if (field === payloadField) { return; }\n hash[field] = hash[payloadField];\n delete hash[payloadField];\n });\n return super.normalize(...arguments);\n }\n }\n ```\n @method normalize\n @public\n @param {Model} typeClass\n @param {Object} hash\n @return {Object}\n */\n normalize(modelClass, resourceHash) {\n let data = null;\n if (resourceHash) {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash);\n if (typeOf(resourceHash.links) === 'object') {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash.links);\n }\n data = {\n id: this.extractId(modelClass, resourceHash),\n type: modelClass.modelName,\n attributes: this.extractAttributes(modelClass, resourceHash),\n relationships: this.extractRelationships(modelClass, resourceHash)\n };\n this.applyTransforms(modelClass, data.attributes);\n }\n return {\n data\n };\n },\n /**\n Returns the resource's ID.\n @method extractId\n @public\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {String}\n */\n extractId(modelClass, resourceHash) {\n let primaryKey = get(this, 'primaryKey');\n let id = resourceHash[primaryKey];\n return coerceId(id);\n },\n /**\n Returns the resource's attributes formatted as a JSON-API \"attributes object\".\n http://jsonapi.org/format/#document-resource-object-attributes\n @method extractAttributes\n @public\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {Object}\n */\n extractAttributes(modelClass, resourceHash) {\n let attributeKey;\n let attributes = {};\n modelClass.eachAttribute(key => {\n attributeKey = this.keyForAttribute(key, 'deserialize');\n if (resourceHash[attributeKey] !== undefined) {\n attributes[key] = resourceHash[attributeKey];\n }\n });\n return attributes;\n },\n /**\n Returns a relationship formatted as a JSON-API \"relationship object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n @method extractRelationship\n @public\n @param {Object} relationshipModelName\n @param {Object} relationshipHash\n @return {Object}\n */\n extractRelationship(relationshipModelName, relationshipHash) {\n if (isNone(relationshipHash)) {\n return null;\n }\n /*\n When `relationshipHash` is an object it usually means that the relationship\n is polymorphic. It could however also be embedded resources that the\n EmbeddedRecordsMixin has be able to process.\n */\n if (typeOf(relationshipHash) === 'object') {\n if (relationshipHash.id) {\n relationshipHash.id = coerceId(relationshipHash.id);\n }\n let modelClass = this.store.modelFor(relationshipModelName);\n if (relationshipHash.type && !modelHasAttributeOrRelationshipNamedType(modelClass)) {\n relationshipHash.type = this.modelNameFromPayloadKey(relationshipHash.type);\n }\n return relationshipHash;\n }\n return {\n id: coerceId(relationshipHash),\n type: relationshipModelName\n };\n },\n /**\n Returns a polymorphic relationship formatted as a JSON-API \"relationship object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n `relationshipOptions` is a hash which contains more information about the\n polymorphic relationship which should be extracted:\n - `resourceHash` complete hash of the resource the relationship should be\n extracted from\n - `relationshipKey` key under which the value for the relationship is\n extracted from the resourceHash\n - `relationshipMeta` meta information about the relationship\n @method extractPolymorphicRelationship\n @public\n @param {Object} relationshipModelName\n @param {Object} relationshipHash\n @param {Object} relationshipOptions\n @return {Object}\n */\n extractPolymorphicRelationship(relationshipModelName, relationshipHash, relationshipOptions) {\n return this.extractRelationship(relationshipModelName, relationshipHash);\n },\n /**\n Returns the resource's relationships formatted as a JSON-API \"relationships object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n @method extractRelationships\n @public\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {Object}\n */\n extractRelationships(modelClass, resourceHash) {\n let relationships = {};\n modelClass.eachRelationship((key, relationshipMeta) => {\n let relationship = null;\n let relationshipKey = this.keyForRelationship(key, relationshipMeta.kind, 'deserialize');\n if (resourceHash[relationshipKey] !== undefined) {\n let data = null;\n let relationshipHash = resourceHash[relationshipKey];\n if (relationshipMeta.kind === 'belongsTo') {\n if (relationshipMeta.options.polymorphic) {\n // extracting a polymorphic belongsTo may need more information\n // than the type and the hash (which might only be an id) for the\n // relationship, hence we pass the key, resource and\n // relationshipMeta too\n data = this.extractPolymorphicRelationship(relationshipMeta.type, relationshipHash, {\n key,\n resourceHash,\n relationshipMeta\n });\n } else {\n data = this.extractRelationship(relationshipMeta.type, relationshipHash);\n }\n } else if (relationshipMeta.kind === 'hasMany') {\n if (!isNone(relationshipHash)) {\n data = new Array(relationshipHash.length);\n if (relationshipMeta.options.polymorphic) {\n for (let i = 0, l = relationshipHash.length; i < l; i++) {\n let item = relationshipHash[i];\n data[i] = this.extractPolymorphicRelationship(relationshipMeta.type, item, {\n key,\n resourceHash,\n relationshipMeta\n });\n }\n } else {\n for (let i = 0, l = relationshipHash.length; i < l; i++) {\n let item = relationshipHash[i];\n data[i] = this.extractRelationship(relationshipMeta.type, item);\n }\n }\n }\n }\n relationship = {\n data\n };\n }\n let linkKey = this.keyForLink(key, relationshipMeta.kind);\n if (resourceHash.links && resourceHash.links[linkKey] !== undefined) {\n let related = resourceHash.links[linkKey];\n relationship = relationship || {};\n relationship.links = {\n related\n };\n }\n if (relationship) {\n relationships[key] = relationship;\n }\n });\n return relationships;\n },\n /**\n Dasherizes the model name in the payload\n @method modelNameFromPayloadKey\n @public\n @param {String} key\n @return {String} the model's modelName\n */\n modelNameFromPayloadKey(key) {\n return normalizeModelName(key);\n },\n /**\n @method normalizeRelationships\n @private\n */\n normalizeRelationships(typeClass, hash) {\n let payloadKey;\n if (this.keyForRelationship) {\n typeClass.eachRelationship((key, relationship) => {\n payloadKey = this.keyForRelationship(key, relationship.kind, 'deserialize');\n if (key === payloadKey) {\n return;\n }\n if (hash[payloadKey] === undefined) {\n return;\n }\n hash[key] = hash[payloadKey];\n delete hash[payloadKey];\n });\n }\n },\n /**\n @method normalizeUsingDeclaredMapping\n @private\n */\n normalizeUsingDeclaredMapping(modelClass, hash) {\n let attrs = get(this, 'attrs');\n let normalizedKey;\n let payloadKey;\n if (attrs) {\n for (let key in attrs) {\n normalizedKey = payloadKey = this._getMappedKey(key, modelClass);\n if (hash[payloadKey] === undefined) {\n continue;\n }\n if (get(modelClass, 'attributes').has(key)) {\n normalizedKey = this.keyForAttribute(key, 'deserialize');\n }\n if (get(modelClass, 'relationshipsByName').has(key)) {\n normalizedKey = this.keyForRelationship(key, modelClass, 'deserialize');\n }\n if (payloadKey !== normalizedKey) {\n hash[normalizedKey] = hash[payloadKey];\n delete hash[payloadKey];\n }\n }\n }\n },\n /**\n Looks up the property key that was set by the custom `attr` mapping\n passed to the serializer.\n @method _getMappedKey\n @private\n @param {String} key\n @return {String} key\n */\n _getMappedKey(key, modelClass) {\n warn('There is no attribute or relationship with the name `' + key + '` on `' + modelClass.modelName + '`. Check your serializers attrs hash.', get(modelClass, 'attributes').has(key) || get(modelClass, 'relationshipsByName').has(key), {\n id: 'ds.serializer.no-mapped-attrs-key'\n });\n let attrs = get(this, 'attrs');\n let mappedKey;\n if (attrs && attrs[key]) {\n mappedKey = attrs[key];\n //We need to account for both the { title: 'post_title' } and\n //{ title: { key: 'post_title' }} forms\n if (mappedKey.key) {\n mappedKey = mappedKey.key;\n }\n if (typeof mappedKey === 'string') {\n key = mappedKey;\n }\n }\n return key;\n },\n /**\n Check attrs.key.serialize property to inform if the `key`\n can be serialized\n @method _canSerialize\n @private\n @param {String} key\n @return {boolean} true if the key can be serialized\n */\n _canSerialize(key) {\n let attrs = get(this, 'attrs');\n return !attrs || !attrs[key] || attrs[key].serialize !== false;\n },\n /**\n When attrs.key.serialize is set to true then\n it takes priority over the other checks and the related\n attribute/relationship will be serialized\n @method _mustSerialize\n @private\n @param {String} key\n @return {boolean} true if the key must be serialized\n */\n _mustSerialize(key) {\n let attrs = get(this, 'attrs');\n return attrs && attrs[key] && attrs[key].serialize === true;\n },\n /**\n Check if the given hasMany relationship should be serialized\n By default only many-to-many and many-to-none relationships are serialized.\n This could be configured per relationship by Serializer's `attrs` object.\n @method shouldSerializeHasMany\n @public\n @param {Snapshot} snapshot\n @param {String} key\n @param {String} relationshipType\n @return {boolean} true if the hasMany relationship should be serialized\n */\n shouldSerializeHasMany(snapshot, key, relationship) {\n const schema = this.store.modelFor(snapshot.modelName);\n let relationshipType = schema.determineRelationshipType(relationship, this.store);\n if (this._mustSerialize(key)) {\n return true;\n }\n return this._canSerialize(key) && (relationshipType === 'manyToNone' || relationshipType === 'manyToMany');\n },\n // SERIALIZE\n /**\n Called when a record is saved in order to convert the\n record into JSON.\n By default, it creates a JSON object with a key for\n each attribute and belongsTo relationship.\n For example, consider this model:\n ```app/models/comment.js\n import Model, { attr, belongsTo } from '@ember-data/model';\n export default class CommentModel extends Model {\n @attr title;\n @attr body;\n @belongsTo('user') author;\n }\n ```\n The default serialization would create a JSON object like:\n ```javascript\n {\n \"title\": \"Rails is unagi\",\n \"body\": \"Rails? Omakase? O_O\",\n \"author\": 12\n }\n ```\n By default, attributes are passed through as-is, unless\n you specified an attribute type (`attr('date')`). If\n you specify a transform, the JavaScript value will be\n serialized when inserted into the JSON hash.\n By default, belongs-to relationships are converted into\n IDs when inserted into the JSON hash.\n ## IDs\n `serialize` takes an options hash with a single option:\n `includeId`. If this option is `true`, `serialize` will,\n by default include the ID in the JSON object it builds.\n The adapter passes in `includeId: true` when serializing\n a record for `createRecord`, but not for `updateRecord`.\n ## Customization\n Your server may expect a different JSON format than the\n built-in serialization format.\n In that case, you can implement `serialize` yourself and\n return a JSON hash of your choosing.\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class PostSerializer extends JSONSerializer {\n serialize(snapshot, options) {\n let json = {\n POST_TTL: snapshot.attr('title'),\n POST_BDY: snapshot.attr('body'),\n POST_CMS: snapshot.hasMany('comments', { ids: true })\n };\n if (options.includeId) {\n json.POST_ID_ = snapshot.id;\n }\n return json;\n }\n }\n ```\n ## Customizing an App-Wide Serializer\n If you want to define a serializer for your entire\n application, you'll probably want to use `eachAttribute`\n and `eachRelationship` on the record.\n ```app/serializers/application.js\n import JSONSerializer from '@ember-data/serializer/json';\n import { singularize } from 'ember-inflector';\n export default class ApplicationSerializer extends JSONSerializer {\n serialize(snapshot, options) {\n let json = {};\n snapshot.eachAttribute((name) => {\n json[serverAttributeName(name)] = snapshot.attr(name);\n });\n snapshot.eachRelationship((name, relationship) => {\n if (relationship.kind === 'hasMany') {\n json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });\n }\n });\n if (options.includeId) {\n json.ID_ = snapshot.id;\n }\n return json;\n }\n }\n function serverAttributeName(attribute) {\n return attribute.underscore().toUpperCase();\n }\n function serverHasManyName(name) {\n return serverAttributeName(singularize(name)) + \"_IDS\";\n }\n ```\n This serializer will generate JSON that looks like this:\n ```javascript\n {\n \"TITLE\": \"Rails is omakase\",\n \"BODY\": \"Yep. Omakase.\",\n \"COMMENT_IDS\": [ \"1\", \"2\", \"3\" ]\n }\n ```\n ## Tweaking the Default JSON\n If you just want to do some small tweaks on the default JSON,\n you can call `super.serialize` first and make the tweaks on\n the returned JSON.\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class PostSerializer extends JSONSerializer {\n serialize(snapshot, options) {\n let json = super.serialize(...arguments);\n json.subject = json.title;\n delete json.title;\n return json;\n }\n }\n ```\n @method serialize\n @public\n @param {Snapshot} snapshot\n @param {Object} options\n @return {Object} json\n */\n serialize(snapshot, options) {\n let json = {};\n if (options && options.includeId) {\n const id = snapshot.id;\n if (id) {\n json[get(this, 'primaryKey')] = id;\n }\n }\n snapshot.eachAttribute((key, attribute) => {\n this.serializeAttribute(snapshot, json, key, attribute);\n });\n snapshot.eachRelationship((key, relationship) => {\n if (relationship.kind === 'belongsTo') {\n this.serializeBelongsTo(snapshot, json, relationship);\n } else if (relationship.kind === 'hasMany') {\n this.serializeHasMany(snapshot, json, relationship);\n }\n });\n return json;\n },\n /**\n You can use this method to customize how a serialized record is added to the complete\n JSON hash to be sent to the server. By default the JSON Serializer does not namespace\n the payload and just sends the raw serialized JSON object.\n If your server expects namespaced keys, you should consider using the RESTSerializer.\n Otherwise you can override this method to customize how the record is added to the hash.\n The hash property should be modified by reference.\n For example, your server may expect underscored root objects.\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n import { decamelize } from '@ember/string';\n export default class ApplicationSerializer extends RESTSerializer {\n serializeIntoHash(data, type, snapshot, options) {\n let root = decamelize(type.modelName);\n data[root] = this.serialize(snapshot, options);\n }\n }\n ```\n @method serializeIntoHash\n @public\n @param {Object} hash\n @param {Model} typeClass\n @param {Snapshot} snapshot\n @param {Object} options\n */\n serializeIntoHash(hash, typeClass, snapshot, options) {\n Object.assign(hash, this.serialize(snapshot, options));\n },\n /**\n `serializeAttribute` can be used to customize how `attr`\n properties are serialized\n For example if you wanted to ensure all your attributes were always\n serialized as properties on an `attributes` object you could\n write:\n ```app/serializers/application.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class ApplicationSerializer extends JSONSerializer {\n serializeAttribute(snapshot, json, key, attributes) {\n json.attributes = json.attributes || {};\n super.serializeAttribute(snapshot, json.attributes, key, attributes);\n }\n }\n ```\n @method serializeAttribute\n @public\n @param {Snapshot} snapshot\n @param {Object} json\n @param {String} key\n @param {Object} attribute\n */\n serializeAttribute(snapshot, json, key, attribute) {\n if (this._canSerialize(key)) {\n let type = attribute.type;\n let value = snapshot.attr(key);\n if (type) {\n let transform = this.transformFor(type);\n value = transform.serialize(value, attribute.options);\n }\n\n // if provided, use the mapping provided by `attrs` in\n // the serializer\n let schema = this.store.modelFor(snapshot.modelName);\n let payloadKey = this._getMappedKey(key, schema);\n if (payloadKey === key && this.keyForAttribute) {\n payloadKey = this.keyForAttribute(key, 'serialize');\n }\n json[payloadKey] = value;\n }\n },\n /**\n `serializeBelongsTo` can be used to customize how `belongsTo`\n properties are serialized.\n Example\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n import { isNone } from '@ember/utils';\n export default class PostSerializer extends JSONSerializer {\n serializeBelongsTo(snapshot, json, relationship) {\n let key = relationship.key;\n let belongsTo = snapshot.belongsTo(key);\n key = this.keyForRelationship ? this.keyForRelationship(key, \"belongsTo\", \"serialize\") : key;\n json[key] = isNone(belongsTo) ? belongsTo : belongsTo.record.toJSON();\n }\n }\n ```\n @method serializeBelongsTo\n @public\n @param {Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeBelongsTo(snapshot, json, relationship) {\n let key = relationship.key;\n if (this._canSerialize(key)) {\n let belongsToId = snapshot.belongsTo(key, {\n id: true\n });\n\n // if provided, use the mapping provided by `attrs` in\n // the serializer\n let schema = this.store.modelFor(snapshot.modelName);\n let payloadKey = this._getMappedKey(key, schema);\n if (payloadKey === key && this.keyForRelationship) {\n payloadKey = this.keyForRelationship(key, 'belongsTo', 'serialize');\n }\n\n //Need to check whether the id is there for new&async records\n if (isNone(belongsToId)) {\n json[payloadKey] = null;\n } else {\n json[payloadKey] = belongsToId;\n }\n if (relationship.options.polymorphic) {\n this.serializePolymorphicType(snapshot, json, relationship);\n }\n }\n },\n /**\n `serializeHasMany` can be used to customize how `hasMany`\n properties are serialized.\n Example\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class PostSerializer extends JSONSerializer {\n serializeHasMany(snapshot, json, relationship) {\n let key = relationship.key;\n if (key === 'comments') {\n return;\n } else {\n super.serializeHasMany(...arguments);\n }\n }\n }\n ```\n @method serializeHasMany\n @public\n @param {Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeHasMany(snapshot, json, relationship) {\n let key = relationship.key;\n if (this.shouldSerializeHasMany(snapshot, key, relationship)) {\n let hasMany = snapshot.hasMany(key, {\n ids: true\n });\n if (hasMany !== undefined) {\n // if provided, use the mapping provided by `attrs` in\n // the serializer\n let schema = this.store.modelFor(snapshot.modelName);\n let payloadKey = this._getMappedKey(key, schema);\n if (payloadKey === key && this.keyForRelationship) {\n payloadKey = this.keyForRelationship(key, 'hasMany', 'serialize');\n }\n json[payloadKey] = hasMany;\n // TODO support for polymorphic manyToNone and manyToMany relationships\n }\n }\n },\n /**\n You can use this method to customize how polymorphic objects are\n serialized. Objects are considered to be polymorphic if\n `{ polymorphic: true }` is pass as the second argument to the\n `belongsTo` function.\n Example\n ```app/serializers/comment.js\n import JSONSerializer from '@ember-data/serializer/json';\n import { isNone } from '@ember/utils';\n export default class CommentSerializer extends JSONSerializer {\n serializePolymorphicType(snapshot, json, relationship) {\n let key = relationship.key;\n let belongsTo = snapshot.belongsTo(key);\n key = this.keyForAttribute ? this.keyForAttribute(key, 'serialize') : key;\n if (isNone(belongsTo)) {\n json[key + '_type'] = null;\n } else {\n json[key + '_type'] = belongsTo.modelName;\n }\n }\n }\n ```\n @method serializePolymorphicType\n @public\n @param {Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializePolymorphicType() {},\n /**\n `extractMeta` is used to deserialize any meta information in the\n adapter payload. By default Ember Data expects meta information to\n be located on the `meta` property of the payload object.\n Example\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class PostSerializer extends JSONSerializer {\n extractMeta(store, typeClass, payload) {\n if (payload && payload.hasOwnProperty('_pagination')) {\n let meta = payload._pagination;\n delete payload._pagination;\n return meta;\n }\n }\n }\n ```\n @method extractMeta\n @public\n @param {Store} store\n @param {Model} modelClass\n @param {Object} payload\n */\n extractMeta(store, modelClass, payload) {\n if (payload && payload['meta'] !== undefined) {\n let meta = payload.meta;\n delete payload.meta;\n return meta;\n }\n },\n /**\n `extractErrors` is used to extract model errors when a call\n to `Model#save` fails with an `InvalidError`. By default\n Ember Data expects error information to be located on the `errors`\n property of the payload object.\n This serializer expects this `errors` object to be an Array similar\n to the following, compliant with the https://jsonapi.org/format/#errors specification:\n ```js\n {\n \"errors\": [\n {\n \"detail\": \"This username is already taken!\",\n \"source\": {\n \"pointer\": \"data/attributes/username\"\n }\n }, {\n \"detail\": \"Doesn't look like a valid email.\",\n \"source\": {\n \"pointer\": \"data/attributes/email\"\n }\n }\n ]\n }\n ```\n The key `detail` provides a textual description of the problem.\n Alternatively, the key `title` can be used for the same purpose.\n The nested keys `source.pointer` detail which specific element\n of the request data was invalid.\n Note that JSON-API also allows for object-level errors to be placed\n in an object with pointer `data`, signifying that the problem\n cannot be traced to a specific attribute:\n ```javascript\n {\n \"errors\": [\n {\n \"detail\": \"Some generic non property error message\",\n \"source\": {\n \"pointer\": \"data\"\n }\n }\n ]\n }\n ```\n When turn into a `Errors` object, you can read these errors\n through the property `base`:\n ```handlebars\n {{#each @model.errors.base as |error|}}\n
\n {{error.message}}\n
\n {{/each}}\n ```\n Example of alternative implementation, overriding the default\n behavior to deal with a different format of errors:\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default class PostSerializer extends JSONSerializer {\n extractErrors(store, typeClass, payload, id) {\n if (payload && typeof payload === 'object' && payload._problems) {\n payload = payload._problems;\n this.normalizeErrors(typeClass, payload);\n }\n return payload;\n }\n }\n ```\n @method extractErrors\n @public\n @param {Store} store\n @param {Model} typeClass\n @param {Object} payload\n @param {(String|Number)} id\n @return {Object} json The deserialized errors\n */\n extractErrors(store, typeClass, payload, id) {\n if (payload && typeof payload === 'object' && payload.errors) {\n payload = errorsArrayToHash(payload.errors);\n this.normalizeUsingDeclaredMapping(typeClass, payload);\n typeClass.eachAttribute(name => {\n let key = this.keyForAttribute(name, 'deserialize');\n if (key !== name && payload[key] !== undefined) {\n payload[name] = payload[key];\n delete payload[key];\n }\n });\n typeClass.eachRelationship(name => {\n let key = this.keyForRelationship(name, 'deserialize');\n if (key !== name && payload[key] !== undefined) {\n payload[name] = payload[key];\n delete payload[key];\n }\n });\n }\n return payload;\n },\n /**\n `keyForAttribute` can be used to define rules for how to convert an\n attribute name in your model to a key in your JSON.\n Example\n ```app/serializers/application.js\n import JSONSerializer from '@ember-data/serializer/json';\n import { underscore } from '@ember/string';\n export default class ApplicationSerializer extends JSONSerializer {\n keyForAttribute(attr, method) {\n return underscore(attr).toUpperCase();\n }\n }\n ```\n @method keyForAttribute\n @public\n @param {String} key\n @param {String} method\n @return {String} normalized key\n */\n keyForAttribute(key, method) {\n return key;\n },\n /**\n `keyForRelationship` can be used to define a custom key when\n serializing and deserializing relationship properties. By default\n `JSONSerializer` does not provide an implementation of this method.\n Example\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n import { underscore } from '@ember/string';\n export default class PostSerializer extends JSONSerializer {\n keyForRelationship(key, relationship, method) {\n return `rel_${underscore(key)}`;\n }\n }\n ```\n @method keyForRelationship\n @public\n @param {String} key\n @param {String} typeClass\n @param {String} method\n @return {String} normalized key\n */\n keyForRelationship(key, typeClass, method) {\n return key;\n },\n /**\n `keyForLink` can be used to define a custom key when deserializing link\n properties.\n @method keyForLink\n @public\n @param {String} key\n @param {String} kind `belongsTo` or `hasMany`\n @return {String} normalized key\n */\n keyForLink(key, kind) {\n return key;\n },\n // HELPERS\n\n /**\n @method transformFor\n @private\n @param {String} attributeType\n @param {Boolean} skipAssertion\n @return {Transform} transform\n */\n transformFor(attributeType, skipAssertion) {\n let transform = getOwner(this).lookup('transform:' + attributeType);\n assert(`Unable to find the transform for \\`attr('${attributeType}')\\``, skipAssertion || !!transform);\n return transform;\n }\n});\nexport default JSONSerializer;","/**\n * @module @ember-data/serializer/rest\n */\nimport { makeArray } from '@ember/array';\nimport { assert, warn } from '@ember/debug';\nimport { camelize } from '@ember/string';\nimport { isNone, typeOf } from '@ember/utils';\nimport { DEBUG } from '@glimmer/env';\nimport { singularize } from 'ember-inflector';\nimport JSONSerializer from '@ember-data/serializer/json';\nimport { normalizeModelName } from '@ember-data/store';\nimport { coerceId } from '@ember-data/store/-private';\nimport { modelHasAttributeOrRelationshipNamedType } from './-private';\n\n/**\n Normally, applications will use the `RESTSerializer` by implementing\n the `normalize` method.\n\n This allows you to do whatever kind of munging you need and is\n especially useful if your server is inconsistent and you need to\n do munging differently for many different kinds of responses.\n\n See the `normalize` documentation for more information.\n\n ## Across the Board Normalization\n\n There are also a number of hooks that you might find useful to define\n across-the-board rules for your payload. These rules will be useful\n if your server is consistent, or if you're building an adapter for\n an infrastructure service, like Firebase, and want to encode service\n conventions.\n\n For example, if all of your keys are underscored and all-caps, but\n otherwise consistent with the names you use in your models, you\n can implement across-the-board rules for how to convert an attribute\n name in your model to a key in your JSON.\n\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n import { underscore } from '@ember/string';\n\n export default class ApplicationSerializer extends RESTSerializer {\n keyForAttribute(attr, method) {\n return underscore(attr).toUpperCase();\n }\n }\n ```\n\n You can also implement `keyForRelationship`, which takes the name\n of the relationship as the first parameter, the kind of\n relationship (`hasMany` or `belongsTo`) as the second parameter, and\n the method (`serialize` or `deserialize`) as the third parameter.\n\n @class RESTSerializer\n @main @ember-data/serializer/rest\n @public\n @extends JSONSerializer\n*/\nconst RESTSerializer = JSONSerializer.extend({\n /**\n `keyForPolymorphicType` can be used to define a custom key when\n serializing and deserializing a polymorphic type. By default, the\n returned key is `${key}Type`.\n Example\n ```app/serializers/post.js\n import RESTSerializer from '@ember-data/serializer/rest';\n export default class ApplicationSerializer extends RESTSerializer {\n keyForPolymorphicType(key, relationship) {\n let relationshipKey = this.keyForRelationship(key);\n return 'type-' + relationshipKey;\n }\n }\n ```\n @method keyForPolymorphicType\n @public\n @param {String} key\n @param {String} typeClass\n @param {String} method\n @return {String} normalized key\n */\n keyForPolymorphicType(key, typeClass, method) {\n let relationshipKey = this.keyForRelationship(key);\n return `${relationshipKey}Type`;\n },\n /**\n Normalizes a part of the JSON payload returned by\n the server. You should override this method, munge the hash\n and call super if you have generic normalization to do.\n It takes the type of the record that is being normalized\n (as a Model class), the property where the hash was\n originally found, and the hash to normalize.\n For example, if you have a payload that looks like this:\n ```js\n {\n \"post\": {\n \"id\": 1,\n \"title\": \"Rails is omakase\",\n \"comments\": [ 1, 2 ]\n },\n \"comments\": [{\n \"id\": 1,\n \"body\": \"FIRST\"\n }, {\n \"id\": 2,\n \"body\": \"Rails is unagi\"\n }]\n }\n ```\n The `normalize` method will be called three times:\n * With `App.Post`, `\"posts\"` and `{ id: 1, title: \"Rails is omakase\", ... }`\n * With `App.Comment`, `\"comments\"` and `{ id: 1, body: \"FIRST\" }`\n * With `App.Comment`, `\"comments\"` and `{ id: 2, body: \"Rails is unagi\" }`\n You can use this method, for example, to normalize underscored keys to camelized\n or other general-purpose normalizations. You will only need to implement\n `normalize` and manipulate the payload as desired.\n For example, if the `IDs` under `\"comments\"` are provided as `_id` instead of\n `id`, you can specify how to normalize just the comments:\n ```app/serializers/post.js\n import RESTSerializer from '@ember-data/serializer/rest';\n export default class ApplicationSerializer extends RESTSerializer {\n normalize(model, hash, prop) {\n if (prop === 'comments') {\n hash.id = hash._id;\n delete hash._id;\n }\n return super.normalize(...arguments);\n }\n }\n ```\n On each call to the `normalize` method, the third parameter (`prop`) is always\n one of the keys that were in the original payload or in the result of another\n normalization as `normalizeResponse`.\n @method normalize\n @public\n @param {Model} modelClass\n @param {Object} resourceHash\n @param {String} prop\n @return {Object}\n */\n\n /**\n Normalizes an array of resource payloads and returns a JSON-API Document\n with primary data and, if any, included data as `{ data, included }`.\n @method _normalizeArray\n @param {Store} store\n @param {String} modelName\n @param {Object} arrayHash\n @param {String} prop\n @return {Object}\n @private\n */\n _normalizeArray(store, modelName, arrayHash, prop) {\n let documentHash = {\n data: [],\n included: []\n };\n let modelClass = store.modelFor(modelName);\n let serializer = store.serializerFor(modelName);\n makeArray(arrayHash).forEach(hash => {\n let {\n data,\n included\n } = this._normalizePolymorphicRecord(store, hash, prop, modelClass, serializer);\n documentHash.data.push(data);\n if (included) {\n documentHash.included = documentHash.included.concat(included);\n }\n });\n return documentHash;\n },\n _normalizePolymorphicRecord(store, hash, prop, primaryModelClass, primarySerializer) {\n let serializer = primarySerializer;\n let modelClass = primaryModelClass;\n let primaryHasTypeAttribute = modelHasAttributeOrRelationshipNamedType(primaryModelClass);\n if (!primaryHasTypeAttribute && hash.type) {\n // Support polymorphic records in async relationships\n let modelName = this.modelNameFromPayloadKey(hash.type);\n if (store.getSchemaDefinitionService().doesTypeExist(modelName)) {\n serializer = store.serializerFor(modelName);\n modelClass = store.modelFor(modelName);\n }\n }\n return serializer.normalize(modelClass, hash, prop);\n },\n /**\n @method _normalizeResponse\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @param {Boolean} isSingle\n @return {Object} JSON-API Document\n @private\n */\n _normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {\n let documentHash = {\n data: null,\n included: []\n };\n let meta = this.extractMeta(store, primaryModelClass, payload);\n if (meta) {\n assert('The `meta` returned from `extractMeta` has to be an object, not \"' + typeOf(meta) + '\".', typeOf(meta) === 'object');\n documentHash.meta = meta;\n }\n let keys = Object.keys(payload);\n for (var i = 0, length = keys.length; i < length; i++) {\n var prop = keys[i];\n var modelName = prop;\n var forcedSecondary = false;\n\n /*\n If you want to provide sideloaded records of the same type that the\n primary data you can do that by prefixing the key with `_`.\n Example\n ```\n {\n users: [\n { id: 1, title: 'Tom', manager: 3 },\n { id: 2, title: 'Yehuda', manager: 3 }\n ],\n _users: [\n { id: 3, title: 'Tomster' }\n ]\n }\n ```\n This forces `_users` to be added to `included` instead of `data`.\n */\n if (prop.charAt(0) === '_') {\n forcedSecondary = true;\n modelName = prop.substr(1);\n }\n var typeName = this.modelNameFromPayloadKey(modelName);\n if (!store.getSchemaDefinitionService().doesTypeExist(typeName)) {\n warn(this.warnMessageNoModelForKey(modelName, typeName), false, {\n id: 'ds.serializer.model-for-key-missing'\n });\n continue;\n }\n var isPrimary = !forcedSecondary && this.isPrimaryType(store, typeName, primaryModelClass);\n var value = payload[prop];\n if (value === null) {\n continue;\n }\n assert('The adapter returned an array for the primary data of a `queryRecord` response. `queryRecord` should return a single record.', !(requestType === 'queryRecord' && isPrimary && Array.isArray(value)));\n\n /*\n Support primary data as an object instead of an array.\n Example\n ```\n {\n user: { id: 1, title: 'Tom', manager: 3 }\n }\n ```\n */\n if (isPrimary && !Array.isArray(value)) {\n let {\n data,\n included\n } = this._normalizePolymorphicRecord(store, value, prop, primaryModelClass, this);\n documentHash.data = data;\n if (included) {\n documentHash.included = documentHash.included.concat(included);\n }\n continue;\n }\n let {\n data,\n included\n } = this._normalizeArray(store, typeName, value, prop);\n if (included) {\n documentHash.included = documentHash.included.concat(included);\n }\n if (isSingle) {\n data.forEach(resource => {\n /*\n Figures out if this is the primary record or not.\n It's either:\n 1. The record with the same ID as the original request\n 2. If it's a newly created record without an ID, the first record\n in the array\n */\n let isUpdatedRecord = isPrimary && coerceId(resource.id) === id;\n let isFirstCreatedRecord = isPrimary && !id && !documentHash.data;\n if (isFirstCreatedRecord || isUpdatedRecord) {\n documentHash.data = resource;\n } else {\n documentHash.included.push(resource);\n }\n });\n } else {\n if (isPrimary) {\n documentHash.data = data;\n } else {\n if (data) {\n documentHash.included = documentHash.included.concat(data);\n }\n }\n }\n }\n return documentHash;\n },\n isPrimaryType(store, modelName, primaryModelClass) {\n return normalizeModelName(modelName) === primaryModelClass.modelName;\n },\n /**\n This method allows you to push a payload containing top-level\n collections of records organized per type.\n ```js\n {\n \"posts\": [{\n \"id\": \"1\",\n \"title\": \"Rails is omakase\",\n \"author\", \"1\",\n \"comments\": [ \"1\" ]\n }],\n \"comments\": [{\n \"id\": \"1\",\n \"body\": \"FIRST\"\n }],\n \"users\": [{\n \"id\": \"1\",\n \"name\": \"@d2h\"\n }]\n }\n ```\n It will first normalize the payload, so you can use this to push\n in data streaming in from your server structured the same way\n that fetches and saves are structured.\n @method pushPayload\n @public\n @param {Store} store\n @param {Object} payload\n */\n pushPayload(store, payload) {\n let documentHash = {\n data: [],\n included: []\n };\n for (var prop in payload) {\n var modelName = this.modelNameFromPayloadKey(prop);\n if (!store.getSchemaDefinitionService().doesTypeExist(modelName)) {\n warn(this.warnMessageNoModelForKey(prop, modelName), false, {\n id: 'ds.serializer.model-for-key-missing'\n });\n continue;\n }\n var type = store.modelFor(modelName);\n var typeSerializer = store.serializerFor(type.modelName);\n makeArray(payload[prop]).forEach(hash => {\n let {\n data,\n included\n } = typeSerializer.normalize(type, hash, prop);\n documentHash.data.push(data);\n if (included) {\n documentHash.included = documentHash.included.concat(included);\n }\n });\n }\n store.push(documentHash);\n },\n /**\n This method is used to convert each JSON root key in the payload\n into a modelName that it can use to look up the appropriate model for\n that part of the payload.\n For example, your server may send a model name that does not correspond with\n the name of the model in your app. Let's take a look at an example model,\n and an example payload:\n ```app/models/post.js\n import Model from '@ember-data/model';\n export default class Post extends Model {}\n ```\n ```javascript\n {\n \"blog/post\": {\n \"id\": \"1\n }\n }\n ```\n Ember Data is going to normalize the payload's root key for the modelName. As a result,\n it will try to look up the \"blog/post\" model. Since we don't have a model called \"blog/post\"\n (or a file called app/models/blog/post.js in ember-cli), Ember Data will throw an error\n because it cannot find the \"blog/post\" model.\n Since we want to remove this namespace, we can define a serializer for the application that will\n remove \"blog/\" from the payload key whenver it's encountered by Ember Data:\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n export default class ApplicationSerializer extends RESTSerializer {\n modelNameFromPayloadKey(payloadKey) {\n if (payloadKey === 'blog/post') {\n return super.modelNameFromPayloadKey(payloadKey.replace('blog/', ''));\n } else {\n return super.modelNameFromPayloadKey(payloadKey);\n }\n }\n }\n ```\n After refreshing, Ember Data will appropriately look up the \"post\" model.\n By default the modelName for a model is its\n name in dasherized form. This means that a payload key like \"blogPost\" would be\n normalized to \"blog-post\" when Ember Data looks up the model. Usually, Ember Data\n can use the correct inflection to do this for you. Most of the time, you won't\n need to override `modelNameFromPayloadKey` for this purpose.\n @method modelNameFromPayloadKey\n @public\n @param {String} key\n @return {String} the model's modelName\n */\n modelNameFromPayloadKey(key) {\n return singularize(normalizeModelName(key));\n },\n // SERIALIZE\n\n /**\n Called when a record is saved in order to convert the\n record into JSON.\n By default, it creates a JSON object with a key for\n each attribute and belongsTo relationship.\n For example, consider this model:\n ```app/models/comment.js\n import Model, { attr, belongsTo } from '@ember-data/model';\n export default class Comment extends Model {\n @attr title\n @attr body\n @belongsTo('user') author\n }\n ```\n The default serialization would create a JSON object like:\n ```js\n {\n \"title\": \"Rails is unagi\",\n \"body\": \"Rails? Omakase? O_O\",\n \"author\": 12\n }\n ```\n By default, attributes are passed through as-is, unless\n you specified an attribute type (`attr('date')`). If\n you specify a transform, the JavaScript value will be\n serialized when inserted into the JSON hash.\n By default, belongs-to relationships are converted into\n IDs when inserted into the JSON hash.\n ## IDs\n `serialize` takes an options hash with a single option:\n `includeId`. If this option is `true`, `serialize` will,\n by default include the ID in the JSON object it builds.\n The adapter passes in `includeId: true` when serializing\n a record for `createRecord`, but not for `updateRecord`.\n ## Customization\n Your server may expect a different JSON format than the\n built-in serialization format.\n In that case, you can implement `serialize` yourself and\n return a JSON hash of your choosing.\n ```app/serializers/post.js\n import RESTSerializer from '@ember-data/serializer/rest';\n export default class ApplicationSerializer extends RESTSerializer {\n serialize(snapshot, options) {\n let json = {\n POST_TTL: snapshot.attr('title'),\n POST_BDY: snapshot.attr('body'),\n POST_CMS: snapshot.hasMany('comments', { ids: true })\n };\n if (options.includeId) {\n json.POST_ID_ = snapshot.id;\n }\n return json;\n }\n }\n ```\n ## Customizing an App-Wide Serializer\n If you want to define a serializer for your entire\n application, you'll probably want to use `eachAttribute`\n and `eachRelationship` on the record.\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n import { pluralize } from 'ember-inflector';\n export default class ApplicationSerializer extends RESTSerializer {\n serialize(snapshot, options) {\n let json = {};\n snapshot.eachAttribute(function(name) {\n json[serverAttributeName(name)] = snapshot.attr(name);\n });\n snapshot.eachRelationship(function(name, relationship) {\n if (relationship.kind === 'hasMany') {\n json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });\n }\n });\n if (options.includeId) {\n json.ID_ = snapshot.id;\n }\n return json;\n }\n }\n function serverAttributeName(attribute) {\n return attribute.underscore().toUpperCase();\n }\n function serverHasManyName(name) {\n return serverAttributeName(singularize(name)) + \"_IDS\";\n }\n ```\n This serializer will generate JSON that looks like this:\n ```js\n {\n \"TITLE\": \"Rails is omakase\",\n \"BODY\": \"Yep. Omakase.\",\n \"COMMENT_IDS\": [ 1, 2, 3 ]\n }\n ```\n ## Tweaking the Default JSON\n If you just want to do some small tweaks on the default JSON,\n you can call super first and make the tweaks on the returned\n JSON.\n ```app/serializers/post.js\n import RESTSerializer from '@ember-data/serializer/rest';\n export default class ApplicationSerializer extends RESTSerializer {\n serialize(snapshot, options) {\n let json = super.serialize(snapshot, options);\n json.subject = json.title;\n delete json.title;\n return json;\n }\n }\n ```\n @method serialize\n @public\n @param {Snapshot} snapshot\n @param {Object} options\n @return {Object} json\n */\n serialize(snapshot, options) {\n return this._super(...arguments);\n },\n /**\n You can use this method to customize the root keys serialized into the JSON.\n The hash property should be modified by reference (possibly using something like _.extend)\n By default the REST Serializer sends the modelName of a model, which is a camelized\n version of the name.\n For example, your server may expect underscored root objects.\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n import { decamelize } from '@ember/string';\n export default class ApplicationSerializer extends RESTSerializer {\n serializeIntoHash(data, type, record, options) {\n let root = decamelize(type.modelName);\n data[root] = this.serialize(record, options);\n }\n }\n ```\n @method serializeIntoHash\n @public\n @param {Object} hash\n @param {Model} typeClass\n @param {Snapshot} snapshot\n @param {Object} options\n */\n serializeIntoHash(hash, typeClass, snapshot, options) {\n let normalizedRootKey = this.payloadKeyFromModelName(typeClass.modelName);\n hash[normalizedRootKey] = this.serialize(snapshot, options);\n },\n /**\n You can use `payloadKeyFromModelName` to override the root key for an outgoing\n request. By default, the RESTSerializer returns a camelized version of the\n model's name.\n For a model called TacoParty, its `modelName` would be the string `taco-party`. The RESTSerializer\n will send it to the server with `tacoParty` as the root key in the JSON payload:\n ```js\n {\n \"tacoParty\": {\n \"id\": \"1\",\n \"location\": \"Matthew Beale's House\"\n }\n }\n ```\n For example, your server may expect dasherized root objects:\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n import { dasherize } from '@ember/string';\n export default class ApplicationSerializer extends RESTSerializer {\n payloadKeyFromModelName(modelName) {\n return dasherize(modelName);\n }\n }\n ```\n Given a `TacoParty` model, calling `save` on it would produce an outgoing\n request like:\n ```js\n {\n \"taco-party\": {\n \"id\": \"1\",\n \"location\": \"Matthew Beale's House\"\n }\n }\n ```\n @method payloadKeyFromModelName\n @public\n @param {String} modelName\n @return {String}\n */\n payloadKeyFromModelName(modelName) {\n return camelize(modelName);\n },\n /**\n You can use this method to customize how polymorphic objects are serialized.\n By default the REST Serializer creates the key by appending `Type` to\n the attribute and value from the model's camelcased model name.\n @method serializePolymorphicType\n @public\n @param {Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializePolymorphicType(snapshot, json, relationship) {\n let key = relationship.key;\n let typeKey = this.keyForPolymorphicType(key, relationship.type, 'serialize');\n let belongsTo = snapshot.belongsTo(key);\n if (isNone(belongsTo)) {\n json[typeKey] = null;\n } else {\n json[typeKey] = camelize(belongsTo.modelName);\n }\n },\n /**\n You can use this method to customize how a polymorphic relationship should\n be extracted.\n @method extractPolymorphicRelationship\n @public\n @param {Object} relationshipType\n @param {Object} relationshipHash\n @param {Object} relationshipOptions\n @return {Object}\n */\n extractPolymorphicRelationship(relationshipType, relationshipHash, relationshipOptions) {\n let {\n key,\n resourceHash,\n relationshipMeta\n } = relationshipOptions;\n\n // A polymorphic belongsTo relationship can be present in the payload\n // either in the form where the `id` and the `type` are given:\n //\n // {\n // message: { id: 1, type: 'post' }\n // }\n //\n // or by the `id` and a `Type` attribute:\n //\n // {\n // message: 1,\n // messageType: 'post'\n // }\n //\n // The next code checks if the latter case is present and returns the\n // corresponding JSON-API representation. The former case is handled within\n // the base class JSONSerializer.\n let isPolymorphic = relationshipMeta.options.polymorphic;\n let typeProperty = this.keyForPolymorphicType(key, relationshipType, 'deserialize');\n if (isPolymorphic && resourceHash[typeProperty] !== undefined && typeof relationshipHash !== 'object') {\n let type = this.modelNameFromPayloadKey(resourceHash[typeProperty]);\n return {\n id: relationshipHash,\n type: type\n };\n }\n return this._super(...arguments);\n }\n});\nif (DEBUG) {\n RESTSerializer.reopen({\n warnMessageNoModelForKey(prop, typeKey) {\n return 'Encountered \"' + prop + '\" in payload, but no model was found for model name \"' + typeKey + '\" (resolved model name using ' + this.constructor.toString() + '.modelNameFromPayloadKey(\"' + prop + '\"))';\n }\n });\n}\nexport { EmbeddedRecordsMixin } from './-private';\nexport default RESTSerializer;","/**\n @module @ember-data/serializer\n*/\nimport { Transform } from './-private';\nexport default Transform;","/**\n @module @ember-data/store\n*/\n\nimport { registerWaiter } from '@ember/test';\nimport { DEBUG } from '@glimmer/env';\nimport Ember from 'ember';\n\n// TODO: expose Ember._Backburner as `import { _Backburner } from '@ember/runloop'` in ember-rfc176-data + emberjs/ember.js\n/*\n syncRelationships is used by the UI to grab updates from the graph\n and update the ManyArrays.\n\n We may be able to remove this once the new relationship layer is\n complete.\n*/\nconst backburner = new Ember._Backburner(['coalesce', 'sync', 'notify']);\nif (DEBUG) {\n registerWaiter(() => {\n return !backburner.currentInstance && !backburner.hasTimers();\n });\n}\nexport default backburner;","/**\n @module @ember-data/store\n*/\n\n// Used by the store to normalize IDs entering the store. Despite the fact\n// that developers may provide IDs as numbers (e.g., `store.findRecord('person', 1)`),\n// it is important that internally we use strings, since IDs may be serialized\n// and lose type information. For example, Ember's router may put a record's\n// ID into the URL, and if we later try to deserialize that URL and find the\n// corresponding record, we will not know if it is a string or a number.\n\nfunction coerceId(id) {\n if (id === null || id === undefined || id === '') {\n return null;\n }\n if (typeof id === 'string') {\n return id;\n }\n if (typeof id === 'symbol') {\n return id.toString();\n }\n return '' + id;\n}\nexport function ensureStringId(id) {\n let normalized = null;\n if (typeof id === 'string') {\n normalized = id.length > 0 ? id : null;\n } else if (typeof id === 'number' && !isNaN(id)) {\n normalized = '' + id;\n }\n if (normalized === null) {\n throw new Error(`Expected id to be a string or number, received ${String(id)}`);\n }\n return normalized;\n}\nexport default coerceId;","import { deprecate } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { DEBUG } from '@glimmer/env';\nimport { resolve } from 'rsvp';\n/**\n @module @ember-data/store\n*/\n\nexport function _bind(fn, ...args) {\n return function () {\n return fn.apply(undefined, args);\n };\n}\nexport function _guard(promise, test) {\n let guarded = promise.finally(() => {\n if (!test()) {\n guarded._subscribers.length = 0;\n }\n });\n return guarded;\n}\nexport function _objectIsAlive(object) {\n return !(get(object, 'isDestroyed') || get(object, 'isDestroying'));\n}\nexport function guardDestroyedStore(promise, store, label) {\n let token;\n if (DEBUG) {\n token = store._trackAsyncRequestStart(label);\n }\n let wrapperPromise = resolve(promise, label).then(_v => {\n if (!_objectIsAlive(store)) {\n if (true /* DEPRECATE_RSVP_PROMISE */) {\n deprecate(`A Promise did not resolve by the time the store was destroyed. This will error in a future release.`, false, {\n id: 'ember-data:rsvp-unresolved-async',\n until: '5.0',\n for: '@ember-data/store',\n since: {\n available: '4.5',\n enabled: '4.5'\n }\n });\n }\n }\n return promise;\n });\n return _guard(wrapperPromise, () => {\n if (DEBUG) {\n store._trackAsyncRequestEnd(token);\n }\n return _objectIsAlive(store);\n });\n}","/**\n @module @ember-data/adapter/error\n*/\n\nconst SOURCE_POINTER_REGEXP = /^\\/?data\\/(attributes|relationships)\\/(.*)/;\nconst SOURCE_POINTER_PRIMARY_REGEXP = /^\\/?data/;\nconst PRIMARY_ATTRIBUTE_KEY = 'base';\nfunction makeArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n\n/**\n Convert an hash of errors into an array with errors in JSON-API format.\n ```javascript\n import DS from 'ember-data';\n\n const { errorsHashToArray } = DS;\n\n let errors = {\n base: 'Invalid attributes on saving this record',\n name: 'Must be present',\n age: ['Must be present', 'Must be a number']\n };\n let errorsArray = errorsHashToArray(errors);\n // [\n // {\n // title: \"Invalid Document\",\n // detail: \"Invalid attributes on saving this record\",\n // source: { pointer: \"/data\" }\n // },\n // {\n // title: \"Invalid Attribute\",\n // detail: \"Must be present\",\n // source: { pointer: \"/data/attributes/name\" }\n // },\n // {\n // title: \"Invalid Attribute\",\n // detail: \"Must be present\",\n // source: { pointer: \"/data/attributes/age\" }\n // },\n // {\n // title: \"Invalid Attribute\",\n // detail: \"Must be a number\",\n // source: { pointer: \"/data/attributes/age\" }\n // }\n // ]\n ```\n @method errorsHashToArray\n @for @ember-data/adapter/error\n @static\n @public\n @param {Object} errors hash with errors as properties\n @return {Array} array of errors in JSON-API format\n*/\nexport function errorsHashToArray(errors) {\n let out = [];\n if (errors) {\n Object.keys(errors).forEach(key => {\n let messages = makeArray(errors[key]);\n for (let i = 0; i < messages.length; i++) {\n let title = 'Invalid Attribute';\n let pointer = `/data/attributes/${key}`;\n if (key === PRIMARY_ATTRIBUTE_KEY) {\n title = 'Invalid Document';\n pointer = `/data`;\n }\n out.push({\n title: title,\n detail: messages[i],\n source: {\n pointer: pointer\n }\n });\n }\n });\n }\n return out;\n}\n\n/**\n Convert an array of errors in JSON-API format into an object.\n\n ```javascript\n import DS from 'ember-data';\n\n const { errorsArrayToHash } = DS;\n\n let errorsArray = [\n {\n title: 'Invalid Attribute',\n detail: 'Must be present',\n source: { pointer: '/data/attributes/name' }\n },\n {\n title: 'Invalid Attribute',\n detail: 'Must be present',\n source: { pointer: '/data/attributes/age' }\n },\n {\n title: 'Invalid Attribute',\n detail: 'Must be a number',\n source: { pointer: '/data/attributes/age' }\n }\n ];\n\n let errors = errorsArrayToHash(errorsArray);\n // {\n // \"name\": [\"Must be present\"],\n // \"age\": [\"Must be present\", \"must be a number\"]\n // }\n ```\n\n @method errorsArrayToHash\n @static\n @for @ember-data/adapter/error\n @public\n @param {Array} errors array of errors in JSON-API format\n @return {Object}\n*/\nexport function errorsArrayToHash(errors) {\n let out = {};\n if (errors) {\n errors.forEach(error => {\n if (error.source && error.source.pointer) {\n let key = error.source.pointer.match(SOURCE_POINTER_REGEXP);\n if (key) {\n key = key[2];\n } else if (error.source.pointer.search(SOURCE_POINTER_PRIMARY_REGEXP) !== -1) {\n key = PRIMARY_ATTRIBUTE_KEY;\n }\n if (key) {\n out[key] = out[key] || [];\n out[key].push(error.detail || error.title);\n }\n }\n });\n }\n return out;\n}","const Touching = Symbol('touching');\nexport const RequestPromise = Symbol('promise');\nfunction hasRecordIdentifier(op) {\n return 'recordIdentifier' in op;\n}\nexport default class RequestCache {\n constructor() {\n this._pending = Object.create(null);\n this._done = Object.create(null);\n this._subscriptions = Object.create(null);\n }\n enqueue(promise, queryRequest) {\n let query = queryRequest.data[0];\n if (hasRecordIdentifier(query)) {\n let lid = query.recordIdentifier.lid;\n let type = query.op === 'saveRecord' ? 'mutation' : 'query';\n if (!this._pending[lid]) {\n this._pending[lid] = [];\n }\n let request = {\n state: 'pending',\n request: queryRequest,\n type\n };\n request[Touching] = [query.recordIdentifier];\n request[RequestPromise] = promise;\n this._pending[lid].push(request);\n this._triggerSubscriptions(request);\n promise.then(result => {\n this._dequeue(lid, request);\n let finalizedRequest = {\n state: 'fulfilled',\n request: queryRequest,\n type,\n response: {\n data: result\n }\n };\n finalizedRequest[Touching] = request[Touching];\n this._addDone(finalizedRequest);\n this._triggerSubscriptions(finalizedRequest);\n }, error => {\n this._dequeue(lid, request);\n let finalizedRequest = {\n state: 'rejected',\n request: queryRequest,\n type,\n response: {\n data: error && error.error\n }\n };\n finalizedRequest[Touching] = request[Touching];\n this._addDone(finalizedRequest);\n this._triggerSubscriptions(finalizedRequest);\n });\n }\n }\n _triggerSubscriptions(req) {\n req[Touching].forEach(identifier => {\n if (this._subscriptions[identifier.lid]) {\n this._subscriptions[identifier.lid].forEach(callback => callback(req));\n }\n });\n }\n _dequeue(lid, request) {\n this._pending[lid] = this._pending[lid].filter(req => req !== request);\n }\n _addDone(request) {\n request[Touching].forEach(identifier => {\n if (!this._done[identifier.lid]) {\n this._done[identifier.lid] = [];\n }\n // TODO add support for multiple\n let requestDataOp = request.request.data[0].op;\n this._done[identifier.lid] = this._done[identifier.lid].filter(req => {\n // TODO add support for multiple\n let data;\n if (req.request.data instanceof Array) {\n data = req.request.data[0];\n } else {\n data = req.request.data;\n }\n return data.op !== requestDataOp;\n });\n this._done[identifier.lid].push(request);\n });\n }\n subscribeForRecord(identifier, callback) {\n if (!this._subscriptions[identifier.lid]) {\n this._subscriptions[identifier.lid] = [];\n }\n this._subscriptions[identifier.lid].push(callback);\n }\n getPendingRequestsForRecord(identifier) {\n if (this._pending[identifier.lid]) {\n return this._pending[identifier.lid];\n }\n return [];\n }\n getLastRequestForRecord(identifier) {\n let requests = this._done[identifier.lid];\n if (requests) {\n return requests[requests.length - 1];\n }\n return null;\n }\n}","import { assert } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\n/**\n This is a helper method that validates a JSON API top-level document\n\n The format of a document is described here:\n http://jsonapi.org/format/#document-top-level\n\n @internal\n*/\nfunction validateDocumentStructure(doc) {\n if (DEBUG) {\n let errors = [];\n if (!doc || typeof doc !== 'object') {\n errors.push('Top level of a JSON API document must be an object');\n } else {\n if (!('data' in doc) && !('errors' in doc) && !('meta' in doc)) {\n errors.push('One or more of the following keys must be present: \"data\", \"errors\", \"meta\".');\n } else {\n if ('data' in doc && 'errors' in doc) {\n errors.push('Top level keys \"errors\" and \"data\" cannot both be present in a JSON API document');\n }\n }\n if ('data' in doc) {\n if (!(doc.data === null || Array.isArray(doc.data) || typeof doc.data === 'object')) {\n errors.push('data must be null, an object, or an array');\n }\n }\n if ('meta' in doc) {\n if (typeof doc.meta !== 'object') {\n errors.push('meta must be an object');\n }\n }\n if ('errors' in doc) {\n if (!Array.isArray(doc.errors)) {\n errors.push('errors must be an array');\n }\n }\n if ('links' in doc) {\n if (typeof doc.links !== 'object') {\n errors.push('links must be an object');\n }\n }\n if ('jsonapi' in doc) {\n if (typeof doc.jsonapi !== 'object') {\n errors.push('jsonapi must be an object');\n }\n }\n if ('included' in doc) {\n if (typeof doc.included !== 'object') {\n errors.push('included must be an array');\n }\n }\n }\n assert(`Response must be normalized to a valid JSON API document:\\n\\t* ${errors.join('\\n\\t* ')}`, errors.length === 0);\n }\n}\nexport function normalizeResponseHelper(serializer, store, modelClass, payload, id, requestType) {\n let normalizedResponse = serializer ? serializer.normalizeResponse(store, modelClass, payload, id, requestType) : payload;\n validateDocumentStructure(normalizedResponse);\n return normalizedResponse;\n}","/**\n @module @ember-data/store\n*/\nimport { assert, deprecate } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { importSync } from '@embroider/macros';\nfunction schemaIsDSModel(schema) {\n return schema.isModel === true;\n}\n\n/**\n Snapshot is not directly instantiable.\n Instances are provided to a consuming application's\n adapters and serializers for certain requests.\n\n @class Snapshot\n @public\n*/\nexport default class Snapshot {\n /**\n * @method constructor\n * @constructor\n * @private\n * @param options\n * @param identifier\n * @param _store\n */\n constructor(options, identifier, _store) {\n this.__attributes = null;\n this._belongsToRelationships = Object.create(null);\n this._belongsToIds = Object.create(null);\n this._hasManyRelationships = Object.create(null);\n this._hasManyIds = Object.create(null);\n this._store = _store;\n let internalModel = this._internalModel = _store._instanceCache._internalModelForResource(identifier);\n this.modelName = identifier.type;\n\n /**\n The unique RecordIdentifier associated with this Snapshot.\n @property identifier\n @public\n @type {StableRecordIdentifier}\n */\n this.identifier = identifier;\n\n /*\n If the we do not yet have a record, then we are\n likely a snapshot being provided to a find request, so we\n populate __attributes lazily. Else, to preserve the \"moment\n in time\" in which a snapshot is created, we greedily grab\n the values.\n */\n if (internalModel.hasRecord) {\n this._attributes;\n }\n\n /**\n The id of the snapshot's underlying record\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.id; // => '1'\n ```\n @property id\n @type {String}\n @public\n */\n this.id = identifier.id;\n\n /**\n A hash of adapter options\n @property adapterOptions\n @type {Object}\n @public\n */\n this.adapterOptions = options.adapterOptions;\n\n /**\n If `include` was passed to the options hash for the request, the value\n would be available here.\n @property include\n @type {String|Array}\n @public\n */\n this.include = options.include;\n\n /**\n The name of the type of the underlying record for this snapshot, as a string.\n @property modelName\n @type {String}\n @public\n */\n this.modelName = identifier.type;\n if (internalModel.hasRecord) {\n this._changedAttributes = this._store._instanceCache.getRecordData(identifier).changedAttributes();\n }\n }\n\n /**\n The underlying record for this snapshot. Can be used to access methods and\n properties defined on the record.\n Example\n ```javascript\n let json = snapshot.record.toJSON();\n ```\n @property record\n @type {Model}\n @public\n */\n get record() {\n return this._store._instanceCache.getRecord(this.identifier);\n }\n get _attributes() {\n if (this.__attributes !== null) {\n return this.__attributes;\n }\n let record = this.record;\n let attributes = this.__attributes = Object.create(null);\n let attrs = Object.keys(this._store.getSchemaDefinitionService().attributesDefinitionFor(this.identifier));\n let recordData = this._store._instanceCache.getRecordData(this.identifier);\n attrs.forEach(keyName => {\n if (schemaIsDSModel(this._internalModel.modelClass)) {\n // if the schema is for a DSModel then the instance is too\n attributes[keyName] = get(record, keyName);\n } else {\n attributes[keyName] = recordData.getAttr(keyName);\n }\n });\n return attributes;\n }\n\n /**\n The type of the underlying record for this snapshot, as a Model.\n @property type\n @public\n @deprecated\n @type {Model}\n */\n\n get isNew() {\n return this._internalModel.isNew();\n }\n\n /**\n Returns the value of an attribute.\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.attr('author'); // => 'Tomster'\n postSnapshot.attr('title'); // => 'Ember.js rocks'\n ```\n Note: Values are loaded eagerly and cached when the snapshot is created.\n @method attr\n @param {String} keyName\n @return {Object} The attribute value or undefined\n @public\n */\n attr(keyName) {\n if (keyName in this._attributes) {\n return this._attributes[keyName];\n }\n assert(`Model '${this.identifier}' has no attribute named '${keyName}' defined.`, false);\n }\n\n /**\n Returns all attributes and their corresponding values.\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.attributes(); // => { author: 'Tomster', title: 'Ember.js rocks' }\n ```\n @method attributes\n @return {Object} All attributes of the current snapshot\n @public\n */\n attributes() {\n return {\n ...this._attributes\n };\n }\n\n /**\n Returns all changed attributes and their old and new values.\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postModel.set('title', 'Ember.js rocks!');\n postSnapshot.changedAttributes(); // => { title: ['Ember.js rocks', 'Ember.js rocks!'] }\n ```\n @method changedAttributes\n @return {Object} All changed attributes of the current snapshot\n @public\n */\n changedAttributes() {\n let changedAttributes = Object.create(null);\n if (!this._changedAttributes) {\n return changedAttributes;\n }\n let changedAttributeKeys = Object.keys(this._changedAttributes);\n for (let i = 0, length = changedAttributeKeys.length; i < length; i++) {\n let key = changedAttributeKeys[i];\n changedAttributes[key] = this._changedAttributes[key].slice();\n }\n return changedAttributes;\n }\n\n /**\n Returns the current value of a belongsTo relationship.\n `belongsTo` takes an optional hash of options as a second parameter,\n currently supported options are:\n - `id`: set to `true` if you only want the ID of the related record to be\n returned.\n Example\n ```javascript\n // store.push('post', { id: 1, title: 'Hello World' });\n // store.createRecord('comment', { body: 'Lorem ipsum', post: post });\n commentSnapshot.belongsTo('post'); // => Snapshot\n commentSnapshot.belongsTo('post', { id: true }); // => '1'\n // store.push('comment', { id: 1, body: 'Lorem ipsum' });\n commentSnapshot.belongsTo('post'); // => undefined\n ```\n Calling `belongsTo` will return a new Snapshot as long as there's any known\n data for the relationship available, such as an ID. If the relationship is\n known but unset, `belongsTo` will return `null`. If the contents of the\n relationship is unknown `belongsTo` will return `undefined`.\n Note: Relationships are loaded lazily and cached upon first access.\n @method belongsTo\n @param {String} keyName\n @param {Object} [options]\n @public\n @return {(Snapshot|String|null|undefined)} A snapshot or ID of a known\n relationship or null if the relationship is known but unset. undefined\n will be returned if the contents of the relationship is unknown.\n */\n belongsTo(keyName, options) {\n let returnModeIsId = !!(options && options.id);\n let inverseInternalModel;\n let result;\n let store = this._internalModel.store;\n if (returnModeIsId === true && keyName in this._belongsToIds) {\n return this._belongsToIds[keyName];\n }\n if (returnModeIsId === false && keyName in this._belongsToRelationships) {\n return this._belongsToRelationships[keyName];\n }\n let relationshipMeta = store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type: this.modelName\n })[keyName];\n assert(`Model '${this.identifier}' has no belongsTo relationship named '${keyName}' defined.`, relationshipMeta && relationshipMeta.kind === 'belongsTo');\n\n // TODO @runspired it seems this code branch would not work with CUSTOM_MODEL_CLASSes\n // this check is not a regression in behavior because relationships don't currently\n // function without access to intimate API contracts between RecordData and InternalModel.\n // This is a requirement we should fix as soon as the relationship layer does not require\n // this intimate API usage.\n if (!true /* HAS_RECORD_DATA_PACKAGE */) {\n assert(`snapshot.belongsTo only supported when using the package @ember-data/record-data`);\n }\n const graphFor = importSync('@ember-data/record-data/-private').graphFor;\n const {\n identifier\n } = this;\n const relationship = graphFor(this._store).get(identifier, keyName);\n assert(`You looked up the ${keyName} belongsTo relationship for { type: ${identifier.type}, id: ${identifier.id}, lid: ${identifier.lid} but no such relationship was found.`, relationship);\n assert(`You looked up the ${keyName} belongsTo relationship for { type: ${identifier.type}, id: ${identifier.id}, lid: ${identifier.lid} but that relationship is a hasMany.`, relationship.definition.kind === 'belongsTo');\n let value = relationship.getData();\n let data = value && value.data;\n inverseInternalModel = data ? store._instanceCache._internalModelForResource(data) : null;\n if (value && value.data !== undefined) {\n if (inverseInternalModel && !inverseInternalModel.isDeleted()) {\n if (returnModeIsId) {\n result = inverseInternalModel.id;\n } else {\n result = store._instanceCache.createSnapshot(inverseInternalModel.identifier);\n }\n } else {\n result = null;\n }\n }\n if (returnModeIsId) {\n this._belongsToIds[keyName] = result;\n } else {\n this._belongsToRelationships[keyName] = result;\n }\n return result;\n }\n\n /**\n Returns the current value of a hasMany relationship.\n `hasMany` takes an optional hash of options as a second parameter,\n currently supported options are:\n - `ids`: set to `true` if you only want the IDs of the related records to be\n returned.\n Example\n ```javascript\n // store.push('post', { id: 1, title: 'Hello World', comments: [2, 3] });\n postSnapshot.hasMany('comments'); // => [Snapshot, Snapshot]\n postSnapshot.hasMany('comments', { ids: true }); // => ['2', '3']\n // store.push('post', { id: 1, title: 'Hello World' });\n postSnapshot.hasMany('comments'); // => undefined\n ```\n Note: Relationships are loaded lazily and cached upon first access.\n @method hasMany\n @param {String} keyName\n @param {Object} [options]\n @public\n @return {(Array|undefined)} An array of snapshots or IDs of a known\n relationship or an empty array if the relationship is known but unset.\n undefined will be returned if the contents of the relationship is unknown.\n */\n hasMany(keyName, options) {\n let returnModeIsIds = !!(options && options.ids);\n let results;\n let cachedIds = this._hasManyIds[keyName];\n let cachedSnapshots = this._hasManyRelationships[keyName];\n if (returnModeIsIds === true && keyName in this._hasManyIds) {\n return cachedIds;\n }\n if (returnModeIsIds === false && keyName in this._hasManyRelationships) {\n return cachedSnapshots;\n }\n let store = this._internalModel.store;\n let relationshipMeta = store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type: this.modelName\n })[keyName];\n assert(`Model '${this.identifier}' has no hasMany relationship named '${keyName}' defined.`, relationshipMeta && relationshipMeta.kind === 'hasMany');\n\n // TODO @runspired it seems this code branch would not work with CUSTOM_MODEL_CLASSes\n // this check is not a regression in behavior because relationships don't currently\n // function without access to intimate API contracts between RecordData and InternalModel.\n // This is a requirement we should fix as soon as the relationship layer does not require\n // this intimate API usage.\n if (!true /* HAS_RECORD_DATA_PACKAGE */) {\n assert(`snapshot.hasMany only supported when using the package @ember-data/record-data`);\n }\n const graphFor = importSync('@ember-data/record-data/-private').graphFor;\n const {\n identifier\n } = this;\n const relationship = graphFor(this._store).get(identifier, keyName);\n assert(`You looked up the ${keyName} hasMany relationship for { type: ${identifier.type}, id: ${identifier.id}, lid: ${identifier.lid} but no such relationship was found.`, relationship);\n assert(`You looked up the ${keyName} hasMany relationship for { type: ${identifier.type}, id: ${identifier.id}, lid: ${identifier.lid} but that relationship is a belongsTo.`, relationship.definition.kind === 'hasMany');\n let value = relationship.getData();\n if (value.data) {\n results = [];\n value.data.forEach(member => {\n let internalModel = store._instanceCache._internalModelForResource(member);\n if (!internalModel.isDeleted()) {\n if (returnModeIsIds) {\n results.push(member.id || null);\n } else {\n results.push(store._instanceCache.createSnapshot(internalModel.identifier));\n }\n }\n });\n }\n\n // we assign even if `undefined` so that we don't reprocess the relationship\n // on next access. This works with the `keyName in` checks above.\n if (returnModeIsIds) {\n this._hasManyIds[keyName] = results;\n } else {\n this._hasManyRelationships[keyName] = results;\n }\n return results;\n }\n\n /**\n Iterates through all the attributes of the model, calling the passed\n function on each attribute.\n Example\n ```javascript\n snapshot.eachAttribute(function(name, meta) {\n // ...\n });\n ```\n @method eachAttribute\n @param {Function} callback the callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @public\n */\n eachAttribute(callback, binding) {\n let attrDefs = this._store.getSchemaDefinitionService().attributesDefinitionFor(this.identifier);\n Object.keys(attrDefs).forEach(key => {\n callback.call(binding, key, attrDefs[key]);\n });\n }\n\n /**\n Iterates through all the relationships of the model, calling the passed\n function on each relationship.\n Example\n ```javascript\n snapshot.eachRelationship(function(name, relationship) {\n // ...\n });\n ```\n @method eachRelationship\n @param {Function} callback the callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @public\n */\n eachRelationship(callback, binding) {\n let relationshipDefs = this._store.getSchemaDefinitionService().relationshipsDefinitionFor(this.identifier);\n Object.keys(relationshipDefs).forEach(key => {\n callback.call(binding, key, relationshipDefs[key]);\n });\n }\n\n /**\n Serializes the snapshot using the serializer for the model.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n export default Adapter.extend({\n createRecord(store, type, snapshot) {\n let data = snapshot.serialize({ includeId: true });\n let url = `/${type.modelName}`;\n return fetch(url, {\n method: 'POST',\n body: data,\n }).then((response) => response.json())\n }\n });\n ```\n @method serialize\n @param {Object} options\n @return {Object} an object whose values are primitive JSON values only\n @public\n */\n serialize(options) {\n const serializer = this._store.serializerFor(this.modelName);\n assert(`Cannot serialize record, no serializer found`, serializer);\n return serializer.serialize(this, options);\n }\n}\nif (true /* DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS */) {\n Object.defineProperty(Snapshot.prototype, 'type', {\n get() {\n deprecate(`Using Snapshot.type to access the ModelClass for a record is deprecated. Use store.modelFor() instead.`, false, {\n id: 'ember-data:deprecate-snapshot-model-class-access',\n until: '5.0',\n for: 'ember-data',\n since: {\n available: '4.5.0',\n enabled: '4.5.0'\n }\n });\n return this._internalModel.modelClass;\n }\n });\n}","// provided for additional debuggability\nexport const DEBUG_CLIENT_ORIGINATED = Symbol('record-originated-on-client');\nexport const DEBUG_IDENTIFIER_BUCKET = Symbol('identifier-bucket');","import { DEBUG } from '@glimmer/env';\nimport { DEBUG_IDENTIFIER_BUCKET } from './identifer-debug-consts';\n\n/*\n DEBUG only fields. Keeping this in a separate interface\n which Typescript then merges with the class definition allow us to\n have a DEBUG only property without paying the cost of that field being\n present and initialized (usually to void 0) in production.\n*/\n\n/**\n * @class WeakCache\n * @extends WeakMap\n * @internal\n */\nclass WeakCache extends WeakMap {\n constructor(_fieldName) {\n super();\n if (DEBUG) {\n this._fieldName = _fieldName;\n this._symbol = Symbol.for(_fieldName);\n }\n }\n\n /**\n * Retrieve the value for a key from the WeakCache with the expectation\n * that the key exists. Throws the error generated by _expectMsg in DEBUG if\n * that key does not exist.\n *\n * @method getWithError\n * @param obj\n * @internal\n */\n getWithError(obj) {\n let v = this.get(obj);\n if (DEBUG && v === undefined) {\n throw new Error(this._expectMsg(obj));\n }\n return v;\n }\n\n /**\n * Retrieve the value for a key from the WeakCache, or generate one\n * using the configured _generator method if no value is yet present.\n *\n * @method lookup\n * @param obj\n * @internal\n */\n lookup(obj) {\n let v = super.get(obj);\n if (v === undefined) {\n v = this._generator(obj);\n super.set(obj, v);\n if (DEBUG) {\n if (obj[DEBUG_IDENTIFIER_BUCKET] && this._fieldName !== 'identifier-proxy-target') {\n const target = obj[Symbol.for('identifier-proxy-target')];\n target[this._symbol] = v;\n } else {\n obj[this._symbol] = v;\n }\n }\n }\n return v;\n }\n}\nclass DebugWeakCache extends WeakCache {\n set(obj, value) {\n if (DEBUG && super.has(obj) && this.get(obj) !== value) {\n throw new Error(`${Object.prototype.toString.call(obj)} was already assigned a value for ${this._fieldName}`);\n }\n if (DEBUG) {\n if (obj[DEBUG_IDENTIFIER_BUCKET] && this._fieldName !== 'identifier-proxy-target') {\n const target = obj[Symbol.for('identifier-proxy-target')];\n target[this._symbol] = value;\n // TODO the Proxy check here is entirely for ember-m3\n // as it's attribute access tests fail since the symbol\n // is an unexpected key received by it's proxies.\n // we should address this upstream.\n } else if (obj.constructor?.toString?.() !== 'MegamorphicModel') {\n try {\n obj[this._symbol] = value;\n } catch {\n // some keys are proxies that can't accept symbol values\n // for instance records from ember-m3\n }\n }\n }\n return super.set(obj, value);\n }\n}\nexport default DEBUG ? DebugWeakCache : WeakCache;","/**\n * @module @ember-data/store\n */\nimport { assert, deprecate, warn } from '@ember/debug';\nimport { _backburner as emberBackburner } from '@ember/runloop';\nimport { DEBUG } from '@glimmer/env';\nimport { default as RSVP, resolve } from 'rsvp';\nimport coerceId from './coerce-id';\nimport { _bind, _guard, _objectIsAlive, guardDestroyedStore } from './common';\nimport { errorsArrayToHash } from './errors-utils';\nimport RequestCache from './request-cache';\nimport { normalizeResponseHelper } from './serializer-response';\nimport Snapshot from './snapshot';\nimport WeakCache from './weak-cache';\nfunction payloadIsNotBlank(adapterPayload) {\n if (Array.isArray(adapterPayload)) {\n return true;\n } else {\n return Object.keys(adapterPayload || {}).length !== 0;\n }\n}\nexport const SaveOp = Symbol('SaveOp');\n/**\n * Manages the state of network requests initiated by the store\n *\n * @class FetchManager\n * @private\n */\nexport default class FetchManager {\n // saves which are pending in the runloop\n\n // fetches pending in the runloop, waiting to be coalesced\n\n constructor(_store) {\n this._store = _store;\n // used to keep track of all the find requests that need to be coalesced\n this._pendingFetch = new Map();\n this._pendingSave = [];\n this.requestCache = new RequestCache();\n this.isDestroyed = false;\n }\n\n /**\n This method is called by `record.save`, and gets passed a\n resolver for the promise that `record.save` returns.\n It schedules saving to happen at the end of the run loop.\n @internal\n */\n scheduleSave(identifier, options) {\n let promiseLabel = 'DS: Model#save ' + this;\n let resolver = RSVP.defer(promiseLabel);\n let query = {\n op: 'saveRecord',\n recordIdentifier: identifier,\n options\n };\n let queryRequest = {\n data: [query]\n };\n let snapshot = new Snapshot(options, identifier, this._store);\n let pendingSaveItem = {\n snapshot: snapshot,\n resolver: resolver,\n identifier,\n options,\n queryRequest\n };\n this._pendingSave.push(pendingSaveItem);\n emberBackburner.scheduleOnce('actions', this, this._flushPendingSaves);\n this.requestCache.enqueue(resolver.promise, pendingSaveItem.queryRequest);\n return resolver.promise;\n }\n _flushPendingSave(pending) {\n let {\n snapshot,\n resolver,\n identifier,\n options\n } = pending;\n let adapter = this._store.adapterFor(identifier.type);\n let operation = options[SaveOp];\n let internalModel = snapshot._internalModel;\n let modelName = snapshot.modelName;\n let store = this._store;\n let modelClass = store.modelFor(modelName);\n assert(`You tried to update a record but you have no adapter (for ${modelName})`, adapter);\n assert(`You tried to update a record but your adapter (for ${modelName}) does not implement '${operation}'`, typeof adapter[operation] === 'function');\n let promise = resolve().then(() => adapter[operation](store, modelClass, snapshot));\n let serializer = store.serializerFor(modelName);\n let label = `DS: Extract and notify about ${operation} completion of ${internalModel}`;\n assert(`Your adapter's '${operation}' method must return a value, but it returned 'undefined'`, promise !== undefined);\n promise = _guard(guardDestroyedStore(promise, store, label), _bind(_objectIsAlive, internalModel)).then(adapterPayload => {\n if (!_objectIsAlive(internalModel)) {\n if (true /* DEPRECATE_RSVP_PROMISE */) {\n deprecate(`A Promise while saving ${modelName} did not resolve by the time your model was destroyed. This will error in a future release.`, false, {\n id: 'ember-data:rsvp-unresolved-async',\n until: '5.0',\n for: '@ember-data/store',\n since: {\n available: '4.5',\n enabled: '4.5'\n }\n });\n }\n }\n if (adapterPayload) {\n return normalizeResponseHelper(serializer, store, modelClass, adapterPayload, snapshot.id, operation);\n }\n }, function (error) {\n if (error && error.isAdapterError === true && error.code === 'InvalidError') {\n let parsedErrors = error.errors;\n\n // TODO deprecate extractErrors being called and/or make it part of the public interface\n if (serializer && typeof serializer.extractErrors === 'function') {\n parsedErrors = serializer.extractErrors(store, modelClass, error, snapshot.id);\n } else {\n parsedErrors = errorsArrayToHash(error.errors);\n }\n throw {\n error,\n parsedErrors\n };\n } else {\n throw {\n error\n };\n }\n }, label);\n resolver.resolve(promise);\n }\n\n /**\n This method is called at the end of the run loop, and\n flushes any records passed into `scheduleSave`\n @method flushPendingSave\n @internal\n */\n _flushPendingSaves() {\n let pending = this._pendingSave.slice();\n this._pendingSave = [];\n for (let i = 0, j = pending.length; i < j; i++) {\n let pendingItem = pending[i];\n this._flushPendingSave(pendingItem);\n }\n }\n scheduleFetch(identifier, options) {\n // TODO Probably the store should pass in the query object\n let shouldTrace = DEBUG && this._store.generateStackTracesForTrackedRequests;\n let query = {\n op: 'findRecord',\n recordIdentifier: identifier,\n options\n };\n let queryRequest = {\n data: [query]\n };\n let pendingFetch = this.getPendingFetch(identifier, options);\n if (pendingFetch) {\n return pendingFetch;\n }\n let id = identifier.id;\n let modelName = identifier.type;\n let resolver = RSVP.defer(`Fetching ${modelName}' with id: ${id}`);\n let pendingFetchItem = {\n identifier,\n resolver,\n options,\n queryRequest\n };\n if (DEBUG) {\n if (shouldTrace) {\n let trace;\n try {\n throw new Error(`Trace Origin for scheduled fetch for ${modelName}:${id}.`);\n } catch (e) {\n trace = e;\n }\n\n // enable folks to discover the origin of this findRecord call when\n // debugging. Ideally we would have a tracked queue for requests with\n // labels or local IDs that could be used to merge this trace with\n // the trace made available when we detect an async leak\n pendingFetchItem.trace = trace;\n }\n }\n let resolverPromise = resolver.promise;\n\n // TODO replace with some form of record state cache\n const store = this._store;\n const internalModel = store._instanceCache.getInternalModel(identifier);\n const isLoading = !internalModel.isLoaded; // we don't use isLoading directly because we are the request\n\n const promise = resolverPromise.then(payload => {\n // ensure that regardless of id returned we assign to the correct record\n if (payload.data && !Array.isArray(payload.data)) {\n payload.data.lid = identifier.lid;\n }\n\n // additional data received in the payload\n // may result in the merging of identifiers (and thus records)\n let potentiallyNewIm = store._push(payload);\n if (potentiallyNewIm && !Array.isArray(potentiallyNewIm)) {\n return potentiallyNewIm;\n }\n return identifier;\n }, error => {\n if (internalModel.isEmpty || isLoading) {\n internalModel.unloadRecord();\n }\n throw error;\n });\n if (this._pendingFetch.size === 0) {\n emberBackburner.schedule('actions', this, this.flushAllPendingFetches);\n }\n let fetches = this._pendingFetch;\n if (!fetches.has(modelName)) {\n fetches.set(modelName, []);\n }\n fetches.get(modelName).push(pendingFetchItem);\n pendingFetchItem.promise = promise;\n this.requestCache.enqueue(resolverPromise, pendingFetchItem.queryRequest);\n return promise;\n }\n _fetchRecord(fetchItem) {\n let identifier = fetchItem.identifier;\n let modelName = identifier.type;\n let adapter = this._store.adapterFor(modelName);\n assert(`You tried to find a record but you have no adapter (for ${modelName})`, adapter);\n assert(`You tried to find a record but your adapter (for ${modelName}) does not implement 'findRecord'`, typeof adapter.findRecord === 'function');\n let snapshot = new Snapshot(fetchItem.options, identifier, this._store);\n let klass = this._store.modelFor(identifier.type);\n let id = identifier.id;\n let label = `DS: Handle Adapter#findRecord of '${modelName}' with id: '${id}'`;\n let promise = guardDestroyedStore(resolve().then(() => {\n return adapter.findRecord(this._store, klass, identifier.id, snapshot);\n }), this._store, label).then(adapterPayload => {\n assert(`You made a 'findRecord' request for a '${modelName}' with id '${id}', but the adapter's response did not have any data`, !!payloadIsNotBlank(adapterPayload));\n let serializer = this._store.serializerFor(modelName);\n let payload = normalizeResponseHelper(serializer, this._store, klass, adapterPayload, id, 'findRecord');\n assert(`Ember Data expected the primary data returned from a 'findRecord' response to be an object but instead it found an array.`, !Array.isArray(payload.data));\n assert(`The 'findRecord' request for ${modelName}:${id} resolved indicating success but contained no primary data. To indicate a 404 not found you should either reject the promise returned by the adapter's findRecord method or throw a NotFoundError.`, 'data' in payload && payload.data !== null && typeof payload.data === 'object');\n warn(`You requested a record of type '${modelName}' with id '${id}' but the adapter returned a payload with primary data having an id of '${payload.data.id}'. Use 'store.findRecord()' when the requested id is the same as the one returned by the adapter. In other cases use 'store.queryRecord()' instead.`, coerceId(payload.data.id) === coerceId(id), {\n id: 'ds.store.findRecord.id-mismatch'\n });\n return payload;\n }, error => {\n throw error;\n }, `DS: Extract payload of '${modelName}'`);\n fetchItem.resolver.resolve(promise);\n }\n\n // TODO should probably refactor expectedSnapshots to be identifiers\n handleFoundRecords(seeking, coalescedPayload, expectedSnapshots) {\n // resolve found records\n let found = Object.create(null);\n let payloads = coalescedPayload.data;\n let coalescedIncluded = coalescedPayload.included || [];\n for (let i = 0, l = payloads.length; i < l; i++) {\n let payload = payloads[i];\n let pair = seeking[payload.id];\n found[payload.id] = payload;\n let included = coalescedIncluded.concat(payloads);\n\n // TODO remove original data from included\n if (pair) {\n let resolver = pair.resolver;\n resolver.resolve({\n data: payload,\n included\n });\n }\n }\n\n // reject missing records\n\n // TODO NOW clean this up to refer to payloads\n let missingSnapshots = [];\n for (let i = 0, l = expectedSnapshots.length; i < l; i++) {\n let snapshot = expectedSnapshots[i];\n assertIsString(snapshot.id);\n\n // We know id is a string because you can't fetch\n // without one.\n if (!found[snapshot.id]) {\n missingSnapshots.push(snapshot);\n }\n }\n if (missingSnapshots.length) {\n warn('Ember Data expected to find records with the following ids in the adapter response but they were missing: [ \"' + missingSnapshots.map(r => r.id).join('\", \"') + '\" ]', false, {\n id: 'ds.store.missing-records-from-adapter'\n });\n this.rejectFetchedItems(seeking, missingSnapshots);\n }\n }\n rejectFetchedItems(seeking, snapshots, error) {\n for (let i = 0, l = snapshots.length; i < l; i++) {\n let snapshot = snapshots[i];\n assertIsString(snapshot.id);\n // TODO refactor to identifier.lid to avoid this cast to string\n // we can do this case because you can only fetch an identifier\n // that has an ID\n let pair = seeking[snapshot.id];\n if (pair) {\n pair.resolver.reject(error || new Error(`Expected: '<${snapshot.modelName}:${snapshot.id}>' to be present in the adapter provided payload, but it was not found.`));\n }\n }\n }\n _findMany(adapter, store, modelName, snapshots, identifiers, optionsMap) {\n let modelClass = store.modelFor(modelName); // `adapter.findMany` gets the modelClass still\n let ids = snapshots.map(s => s.id);\n let promise = adapter.findMany(store, modelClass, ids, snapshots);\n let label = `DS: Handle Adapter#findMany of '${modelName}'`;\n if (promise === undefined) {\n throw new Error('adapter.findMany returned undefined, this was very likely a mistake');\n }\n promise = guardDestroyedStore(promise, store, label);\n return promise.then(adapterPayload => {\n assert(`You made a 'findMany' request for '${modelName}' records with ids '[${ids}]', but the adapter's response did not have any data`, !!payloadIsNotBlank(adapterPayload));\n let serializer = store.serializerFor(modelName);\n let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findMany');\n return payload;\n }, null, `DS: Extract payload of ${modelName}`);\n }\n _processCoalescedGroup(seeking, group, adapter, optionsMap, modelName) {\n //TODO check what happened with identifiers here\n let totalInGroup = group.length;\n let ids = new Array(totalInGroup);\n let groupedSnapshots = new Array(totalInGroup);\n for (let j = 0; j < totalInGroup; j++) {\n groupedSnapshots[j] = group[j];\n ids[j] = groupedSnapshots[j].id;\n }\n let store = this._store;\n if (totalInGroup > 1) {\n this._findMany(adapter, store, modelName, group, groupedSnapshots, optionsMap).then(payloads => {\n this.handleFoundRecords(seeking, payloads, groupedSnapshots);\n }).catch(error => {\n this.rejectFetchedItems(seeking, groupedSnapshots, error);\n });\n } else if (ids.length === 1) {\n let pair = seeking[groupedSnapshots[0].id];\n this._fetchRecord(pair);\n } else {\n assert(\"You cannot return an empty array from adapter's method groupRecordsForFindMany\", false);\n }\n }\n _flushPendingFetchForType(pendingFetchItems, modelName) {\n let adapter = this._store.adapterFor(modelName);\n let shouldCoalesce = !!adapter.findMany && adapter.coalesceFindRequests;\n let totalItems = pendingFetchItems.length;\n let identifiers = new Array(totalItems);\n let seeking = Object.create(null);\n let optionsMap = new WeakCache(DEBUG ? 'fetch-options' : '');\n for (let i = 0; i < totalItems; i++) {\n let pendingItem = pendingFetchItems[i];\n let identifier = pendingItem.identifier;\n identifiers[i] = identifier;\n optionsMap.set(identifier, pendingItem.options);\n seeking[identifier.id] = pendingItem;\n }\n if (shouldCoalesce) {\n // TODO: Improve records => snapshots => records => snapshots\n //\n // We want to provide records to all store methods and snapshots to all\n // adapter methods. To make sure we're doing that we're providing an array\n // of snapshots to adapter.groupRecordsForFindMany(), which in turn will\n // return grouped snapshots instead of grouped records.\n //\n // But since the _findMany() finder is a store method we need to get the\n // records from the grouped snapshots even though the _findMany() finder\n // will once again convert the records to snapshots for adapter.findMany()\n let snapshots = new Array(totalItems);\n for (let i = 0; i < totalItems; i++) {\n // we know options is in the map due to having just set it above\n // but TS doesn't know so we cast it\n let options = optionsMap.get(identifiers[i]);\n snapshots[i] = new Snapshot(options, identifiers[i], this._store);\n }\n let groups;\n if (adapter.groupRecordsForFindMany) {\n groups = adapter.groupRecordsForFindMany(this._store, snapshots);\n } else {\n groups = [snapshots];\n }\n for (let i = 0, l = groups.length; i < l; i++) {\n this._processCoalescedGroup(seeking, groups[i], adapter, optionsMap, modelName);\n }\n } else {\n for (let i = 0; i < totalItems; i++) {\n this._fetchRecord(pendingFetchItems[i]);\n }\n }\n }\n getPendingFetch(identifier, options) {\n let pendingFetches = this._pendingFetch.get(identifier.type);\n\n // We already have a pending fetch for this\n if (pendingFetches) {\n let matchingPendingFetch = pendingFetches.find(fetch => fetch.identifier === identifier);\n if (matchingPendingFetch && isSameRequest(options, matchingPendingFetch.options)) {\n return matchingPendingFetch.promise;\n }\n }\n }\n flushAllPendingFetches() {\n if (this.isDestroyed) {\n return;\n }\n this._pendingFetch.forEach(this._flushPendingFetchForType, this);\n this._pendingFetch.clear();\n }\n destroy() {\n this.isDestroyed = true;\n }\n}\nfunction assertIsString(id) {\n if (DEBUG) {\n if (typeof id !== 'string') {\n throw new Error(`Cannot fetch record without an id`);\n }\n }\n}\n\n// this function helps resolve whether we have a pending request that we should use instead\n// TODO @runspired @needsTest removing this did not cause any test failures\nfunction isSameRequest(options = {}, reqOptions = {}) {\n return options.include === reqOptions.include;\n}","import { assert } from '@ember/debug';\nimport { Promise } from 'rsvp';\nimport { guardDestroyedStore } from './common';\nimport { normalizeResponseHelper } from './serializer-response';\n\n/**\n @module @ember-data/store\n*/\n\nfunction payloadIsNotBlank(adapterPayload) {\n if (Array.isArray(adapterPayload)) {\n return true;\n } else {\n return Object.keys(adapterPayload || {}).length;\n }\n}\nexport function _findAll(adapter, store, modelName, options) {\n let modelClass = store.modelFor(modelName); // adapter.findAll depends on the class\n let recordArray = store.peekAll(modelName);\n let snapshotArray = recordArray._createSnapshot(options);\n let promise = Promise.resolve().then(() => adapter.findAll(store, modelClass, null, snapshotArray));\n let label = 'DS: Handle Adapter#findAll of ' + modelClass;\n promise = guardDestroyedStore(promise, store, label);\n return promise.then(adapterPayload => {\n assert(`You made a 'findAll' request for '${modelName}' records, but the adapter's response did not have any data`, payloadIsNotBlank(adapterPayload));\n let serializer = store.serializerFor(modelName);\n let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findAll');\n store._push(payload);\n store.recordArrayManager._didUpdateAll(modelName);\n return recordArray;\n }, null, 'DS: Extract payload of findAll ${modelName}');\n}\nexport function _query(adapter, store, modelName, query, recordArray, options) {\n let modelClass = store.modelFor(modelName); // adapter.query needs the class\n\n recordArray = recordArray || store.recordArrayManager.createAdapterPopulatedRecordArray(modelName, query);\n let promise = Promise.resolve().then(() => adapter.query(store, modelClass, query, recordArray, options));\n let label = `DS: Handle Adapter#query of ${modelName}`;\n promise = guardDestroyedStore(promise, store, label);\n return promise.then(adapterPayload => {\n let serializer = store.serializerFor(modelName);\n let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'query');\n let identifiers = store._push(payload);\n assert('The response to store.query is expected to be an array but it was a single record. Please wrap your response in an array or use `store.queryRecord` to query for a single record.', Array.isArray(identifiers));\n if (recordArray) {\n recordArray._setIdentifiers(identifiers, payload);\n } else {\n recordArray = store.recordArrayManager.createAdapterPopulatedRecordArray(modelName, query, identifiers, payload);\n }\n return recordArray;\n }, null, `DS: Extract payload of query ${modelName}`);\n}\nexport function _queryRecord(adapter, store, modelName, query, options) {\n let modelClass = store.modelFor(modelName); // adapter.queryRecord needs the class\n let promise = Promise.resolve().then(() => adapter.queryRecord(store, modelClass, query, options));\n let label = `DS: Handle Adapter#queryRecord of ${modelName}`;\n promise = guardDestroyedStore(promise, store, label);\n return promise.then(adapterPayload => {\n let serializer = store.serializerFor(modelName);\n let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'queryRecord');\n assert(`Expected the primary data returned by the serializer for a 'queryRecord' response to be a single object or null but instead it was an array.`, !Array.isArray(payload.data));\n return store._push(payload);\n }, null, `DS: Extract payload of queryRecord ${modelName}`);\n}","import { dasherize } from '@ember/string';\n\n/**\n @module @ember-data/store\n*/\n\n// All modelNames are dasherized internally. Changing this function may\n// require changes to other normalization hooks (such as typeForRoot).\n\n/**\n This method normalizes a modelName into the format Ember Data uses\n internally by dasherizing it.\n\n @method normalizeModelName\n @static\n @public\n @for @ember-data/store\n @param {String} modelName\n @return {String} normalizedModelName\n*/\nexport default function normalizeModelName(modelName) {\n return dasherize(modelName);\n}","export default function isNonEmptyString(str) {\n return typeof str === 'string' && str.length > 0;\n}","/**\n @module @ember-data/store\n*/\nimport { assert, warn } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport { getOwnConfig, macroCondition } from '@embroider/macros';\nimport coerceId from './coerce-id';\nimport { DEBUG_CLIENT_ORIGINATED, DEBUG_IDENTIFIER_BUCKET } from './identifer-debug-consts';\nimport normalizeModelName from './normalize-model-name';\nimport isNonEmptyString from './utils/is-non-empty-string';\nimport installPolyfill from './utils/uuid-polyfill';\nimport WeakCache from './weak-cache';\nconst IDENTIFIERS = new WeakSet();\nexport function isStableIdentifier(identifier) {\n return IDENTIFIERS.has(identifier);\n}\nconst isFastBoot = typeof FastBoot !== 'undefined';\nconst _crypto = isFastBoot ? FastBoot.require('crypto') : window.crypto;\nif (macroCondition(getOwnConfig().polyfillUUID)) {\n installPolyfill();\n}\nfunction uuidv4() {\n return _crypto.randomUUID();\n}\nfunction freeze(obj) {\n if (typeof Object.freeze === 'function') {\n return Object.freeze(obj);\n }\n return obj;\n}\nlet configuredForgetMethod;\nlet configuredGenerationMethod;\nlet configuredResetMethod;\nlet configuredUpdateMethod;\nexport function setIdentifierGenerationMethod(method) {\n configuredGenerationMethod = method;\n}\nexport function setIdentifierUpdateMethod(method) {\n configuredUpdateMethod = method;\n}\nexport function setIdentifierForgetMethod(method) {\n configuredForgetMethod = method;\n}\nexport function setIdentifierResetMethod(method) {\n configuredResetMethod = method;\n}\nfunction defaultGenerationMethod(data, bucket) {\n if ('lid' in data && isNonEmptyString(data.lid)) {\n return data.lid;\n }\n if ('id' in data) {\n let {\n type,\n id\n } = data;\n // TODO: add test for id not a string\n if (isNonEmptyString(coerceId(id))) {\n return `@lid:${normalizeModelName(type)}-${id}`;\n }\n }\n return uuidv4();\n}\nfunction defaultEmptyCallback(...args) {}\nlet DEBUG_MAP;\nif (DEBUG) {\n DEBUG_MAP = new WeakCache('identifier-proxy-target');\n}\n\n/**\n * Each instance of {Store} receives a unique instance of a IdentifierCache.\n *\n * This cache is responsible for assigning or retrieving the unique identify\n * for arbitrary resource data encountered by the store. Data representing\n * a unique resource or record should always be represented by the same\n * identifier.\n *\n * It can be configured by consuming applications.\n *\n * @class IdentifierCache\n @public\n */\nexport class IdentifierCache {\n constructor() {\n // Typescript still leaks private properties in the final\n // compiled class, so we may want to move these from _underscore\n // to a WeakMap to avoid leaking\n // currently we leak this for test purposes\n this._cache = {\n lids: Object.create(null),\n types: Object.create(null)\n };\n this._generate = void 0;\n this._update = void 0;\n this._forget = void 0;\n this._reset = void 0;\n this._merge = void 0;\n // we cache the user configuredGenerationMethod at init because it must\n // be configured prior and is not allowed to be changed\n this._generate = configuredGenerationMethod || defaultGenerationMethod;\n this._update = configuredUpdateMethod || defaultEmptyCallback;\n this._forget = configuredForgetMethod || defaultEmptyCallback;\n this._reset = configuredResetMethod || defaultEmptyCallback;\n this._merge = defaultEmptyCallback;\n }\n\n /**\n * Internal hook to allow management of merge conflicts with identifiers.\n *\n * we allow late binding of this private internal merge so that `internalModelFactory`\n * can insert itself here to handle elimination of duplicates\n *\n * @method __configureMerge\n * @private\n */\n __configureMerge(method) {\n this._merge = method || defaultEmptyCallback;\n }\n\n /**\n * @method _getRecordIdentifier\n * @private\n */\n\n _getRecordIdentifier(resource, shouldGenerate = false) {\n // short circuit if we're already the stable version\n if (isStableIdentifier(resource)) {\n if (DEBUG) {\n // TODO should we instead just treat this case as a new generation skipping the short circuit?\n if (!(resource.lid in this._cache.lids) || this._cache.lids[resource.lid] !== resource) {\n throw new Error(`The supplied identifier ${resource} does not belong to this store instance`);\n }\n }\n return resource;\n }\n let lid = coerceId(resource.lid);\n let identifier = lid !== null ? this._cache.lids[lid] : undefined;\n if (identifier !== undefined) {\n return identifier;\n }\n if (shouldGenerate === false) {\n if (!('type' in resource) || !('id' in resource) || !resource.type || !resource.id) {\n return;\n }\n }\n\n // `type` must always be present\n assert('resource.type needs to be a string', 'type' in resource && isNonEmptyString(resource.type));\n let type = resource.type && normalizeModelName(resource.type);\n let id = coerceId(resource.id);\n let keyOptions = getTypeIndex(this._cache.types, type);\n\n // go straight for the stable RecordIdentifier key'd to `lid`\n if (lid !== null) {\n identifier = keyOptions.lid[lid];\n }\n\n // we may have not seen this resource before\n // but just in case we check our own secondary lookup (`id`)\n if (identifier === undefined && id !== null) {\n identifier = keyOptions.id[id];\n }\n if (identifier === undefined) {\n // we have definitely not seen this resource before\n // so we allow the user configured `GenerationMethod` to tell us\n let newLid = this._generate(resource, 'record');\n\n // we do this _even_ when `lid` is present because secondary lookups\n // may need to be populated, but we enforce not giving us something\n // different than expected\n if (lid !== null && newLid !== lid) {\n throw new Error(`You should not change the of a RecordIdentifier`);\n } else if (lid === null) {\n // allow configuration to tell us that we have\n // seen this `lid` before. E.g. a secondary lookup\n // connects this resource to a previously seen\n // resource.\n identifier = keyOptions.lid[newLid];\n }\n if (shouldGenerate === true) {\n if (identifier === undefined) {\n // if we still don't have an identifier, time to generate one\n identifier = makeStableRecordIdentifier(id, type, newLid, 'record', false);\n\n // populate our unique table\n if (DEBUG) {\n // realistically if you hit this it means you changed `type` :/\n // TODO consider how to handle type change assertions more gracefully\n if (identifier.lid in this._cache.lids) {\n throw new Error(`You should not change the of a RecordIdentifier`);\n }\n }\n this._cache.lids[identifier.lid] = identifier;\n\n // populate our primary lookup table\n // TODO consider having the `lid` cache be\n // one level up\n keyOptions.lid[identifier.lid] = identifier;\n // TODO exists temporarily to support `peekAll`\n // but likely to move\n keyOptions._allIdentifiers.push(identifier);\n }\n\n // populate our own secondary lookup table\n // even for the \"successful\" secondary lookup\n // by `_generate()`, since we missed the cache\n // previously\n // we use identifier.id instead of id here\n // because they may not match and we prefer\n // what we've set via resource data\n if (identifier.id !== null) {\n keyOptions.id[identifier.id] = identifier;\n\n // TODO allow filling out of `id` here\n // for the `username` non-client created\n // case.\n }\n }\n }\n return identifier;\n }\n\n /**\n * allows us to peek without generating when needed\n * useful for the \"create\" case when we need to see if\n * we are accidentally overwritting something\n *\n * @method peekRecordIdentifier\n * @param resource\n * @returns {StableRecordIdentifier | undefined}\n * @private\n */\n peekRecordIdentifier(resource) {\n return this._getRecordIdentifier(resource, false);\n }\n\n /**\n Returns the Identifier for the given Resource, creates one if it does not yet exist.\n Specifically this means that we:\n - validate the `id` `type` and `lid` combo against known identifiers\n - return an object with an `lid` that is stable (repeated calls with the same\n `id` + `type` or `lid` will return the same `lid` value)\n - this referential stability of the object itself is guaranteed\n @method getOrCreateRecordIdentifier\n @param resource\n @returns {StableRecordIdentifier}\n @public\n */\n getOrCreateRecordIdentifier(resource) {\n return this._getRecordIdentifier(resource, true);\n }\n\n /**\n Returns a new Identifier for the supplied data. Call this method to generate\n an identifier when a new resource is being created local to the client and\n potentially does not have an `id`.\n Delegates generation to the user supplied `GenerateMethod` if one has been provided\n with the signature `generateMethod({ type }, 'record')`.\n @method createIdentifierForNewRecord\n @param data\n @returns {StableRecordIdentifier}\n @public\n */\n createIdentifierForNewRecord(data) {\n let newLid = this._generate(data, 'record');\n let identifier = makeStableRecordIdentifier(data.id || null, data.type, newLid, 'record', true);\n let keyOptions = getTypeIndex(this._cache.types, data.type);\n\n // populate our unique table\n if (DEBUG) {\n if (identifier.lid in this._cache.lids) {\n throw new Error(`The lid generated for the new record is not unique as it matches an existing identifier`);\n }\n }\n this._cache.lids[identifier.lid] = identifier;\n\n // populate the type+lid cache\n keyOptions.lid[newLid] = identifier;\n // ensure a peekAll sees our new identifier too\n // TODO move this outta here?\n keyOptions._allIdentifiers.push(identifier);\n return identifier;\n }\n\n /**\n Provides the opportunity to update secondary lookup tables for existing identifiers\n Called after an identifier created with `createIdentifierForNewRecord` has been\n committed.\n Assigned `id` to an `Identifier` if `id` has not previously existed; however,\n attempting to change the `id` or calling update without providing an `id` when\n one is missing will throw an error.\n - sets `id` (if `id` was previously `null`)\n - `lid` and `type` MUST NOT be altered post creation\n If a merge occurs, it is possible the returned identifier does not match the originally\n provided identifier. In this case the abandoned identifier will go through the usual\n `forgetRecordIdentifier` codepaths.\n @method updateRecordIdentifier\n @param identifierObject\n @param data\n @returns {StableRecordIdentifier}\n @public\n */\n updateRecordIdentifier(identifierObject, data) {\n let identifier = this.getOrCreateRecordIdentifier(identifierObject);\n let newId = 'id' in data ? coerceId(data.id) : null;\n let existingIdentifier = detectMerge(this._cache.types, identifier, data, newId, this._cache.lids);\n if (!existingIdentifier) {\n // If the incoming type does not match the identifier type, we need to create an identifier for the incoming\n // data so we can merge the incoming data with the existing identifier, see #7325 and #7363\n if ('type' in data && data.type && identifier.type !== normalizeModelName(data.type)) {\n let incomingDataResource = {\n ...data\n };\n // Need to strip the lid from the incomingData in order force a new identifier creation\n delete incomingDataResource.lid;\n existingIdentifier = this.getOrCreateRecordIdentifier(incomingDataResource);\n }\n }\n if (existingIdentifier) {\n let keyOptions = getTypeIndex(this._cache.types, identifier.type);\n identifier = this._mergeRecordIdentifiers(keyOptions, identifier, existingIdentifier, data, newId);\n }\n let id = identifier.id;\n performRecordIdentifierUpdate(identifier, data, this._update);\n newId = identifier.id;\n\n // add to our own secondary lookup table\n if (id !== newId && newId !== null) {\n let keyOptions = getTypeIndex(this._cache.types, identifier.type);\n keyOptions.id[newId] = identifier;\n if (id !== null) {\n delete keyOptions.id[id];\n }\n }\n return identifier;\n }\n\n /**\n * @method _mergeRecordIdentifiers\n * @private\n */\n _mergeRecordIdentifiers(keyOptions, identifier, existingIdentifier, data, newId) {\n // delegate determining which identifier to keep to the configured MergeMethod\n let kept = this._merge(identifier, existingIdentifier, data);\n let abandoned = kept === identifier ? existingIdentifier : identifier;\n\n // cleanup the identifier we no longer need\n this.forgetRecordIdentifier(abandoned);\n\n // ensure a secondary cache entry for this id for the identifier we do keep\n keyOptions.id[newId] = kept;\n // ensure a secondary cache entry for this id for the abandoned identifier's type we do keep\n let baseKeyOptions = getTypeIndex(this._cache.types, existingIdentifier.type);\n baseKeyOptions.id[newId] = kept;\n\n // make sure that the `lid` on the data we are processing matches the lid we kept\n data.lid = kept.lid;\n return kept;\n }\n\n /**\n Provides the opportunity to eliminate an identifier from secondary lookup tables\n as well as eliminates it from ember-data's own lookup tables and book keeping.\n Useful when a record has been deleted and the deletion has been persisted and\n we do not care about the record anymore. Especially useful when an `id` of a\n deleted record might be reused later for a new record.\n @method forgetRecordIdentifier\n @param identifierObject\n @public\n */\n forgetRecordIdentifier(identifierObject) {\n let identifier = this.getOrCreateRecordIdentifier(identifierObject);\n let keyOptions = getTypeIndex(this._cache.types, identifier.type);\n if (identifier.id !== null) {\n delete keyOptions.id[identifier.id];\n }\n delete this._cache.lids[identifier.lid];\n delete keyOptions.lid[identifier.lid];\n let index = keyOptions._allIdentifiers.indexOf(identifier);\n keyOptions._allIdentifiers.splice(index, 1);\n IDENTIFIERS.delete(identifierObject);\n this._forget(identifier, 'record');\n }\n destroy() {\n this._reset();\n }\n}\nfunction getTypeIndex(typeMap, type) {\n let typeIndex = typeMap[type];\n if (typeIndex === undefined) {\n typeIndex = {\n lid: Object.create(null),\n id: Object.create(null),\n _allIdentifiers: []\n };\n typeMap[type] = typeIndex;\n }\n return typeIndex;\n}\nfunction makeStableRecordIdentifier(id, type, lid, bucket, clientOriginated = false) {\n let recordIdentifier = {\n lid,\n id,\n type\n };\n IDENTIFIERS.add(recordIdentifier);\n if (DEBUG) {\n // we enforce immutability in dev\n // but preserve our ability to do controlled updates to the reference\n let wrapper = {\n get lid() {\n return recordIdentifier.lid;\n },\n get id() {\n return recordIdentifier.id;\n },\n get type() {\n return recordIdentifier.type;\n },\n toString() {\n let {\n type,\n id,\n lid\n } = recordIdentifier;\n return `${clientOriginated ? '[CLIENT_ORIGINATED] ' : ''}${type}:${id} (${lid})`;\n }\n };\n wrapper[DEBUG_CLIENT_ORIGINATED] = clientOriginated;\n wrapper[DEBUG_IDENTIFIER_BUCKET] = bucket;\n IDENTIFIERS.add(wrapper);\n DEBUG_MAP.set(wrapper, recordIdentifier);\n wrapper = freeze(wrapper);\n return wrapper;\n }\n return recordIdentifier;\n}\nfunction performRecordIdentifierUpdate(identifier, data, updateFn) {\n if (DEBUG) {\n let {\n lid\n } = data;\n let id = 'id' in data ? data.id : undefined;\n let type = 'type' in data && data.type && normalizeModelName(data.type);\n\n // get the mutable instance behind our proxy wrapper\n let wrapper = identifier;\n identifier = DEBUG_MAP.get(wrapper);\n if (lid !== undefined) {\n let newLid = coerceId(lid);\n if (newLid !== identifier.lid) {\n throw new Error(`The 'lid' for a RecordIdentifier cannot be updated once it has been created. Attempted to set lid for '${wrapper}' to '${lid}'.`);\n }\n }\n if (id !== undefined) {\n let newId = coerceId(id);\n if (identifier.id !== null && identifier.id !== newId) {\n // here we warn and ignore, as this may be a mistake, but we allow the user\n // to have multiple cache-keys pointing at a single lid so we cannot error\n warn(`The 'id' for a RecordIdentifier should not be updated once it has been set. Attempted to set id for '${wrapper}' to '${newId}'.`, false, {\n id: 'ember-data:multiple-ids-for-identifier'\n });\n }\n }\n\n // TODO consider just ignoring here to allow flexible polymorphic support\n if (type && type !== identifier.type) {\n throw new Error(`The 'type' for a RecordIdentifier cannot be updated once it has been set. Attempted to set type for '${wrapper}' to '${type}'.`);\n }\n updateFn(wrapper, data, 'record');\n } else {\n updateFn(identifier, data, 'record');\n }\n\n // upgrade the ID, this is a \"one time only\" ability\n // for the multiple-cache-key scenario we \"could\"\n // use a heuristic to guess the best id for display\n // (usually when `data.id` is available and `data.attributes` is not)\n if ('id' in data && data.id !== undefined) {\n identifier.id = coerceId(data.id);\n }\n}\nfunction detectMerge(typesCache, identifier, data, newId, lids) {\n const {\n id,\n type,\n lid\n } = identifier;\n if (id !== null && id !== newId && newId !== null) {\n let keyOptions = getTypeIndex(typesCache, identifier.type);\n let existingIdentifier = keyOptions.id[newId];\n return existingIdentifier !== undefined ? existingIdentifier : false;\n } else {\n let newType = 'type' in data && data.type && normalizeModelName(data.type);\n\n // If the ids and type are the same but lid is not the same, we should trigger a merge of the identifiers\n if (id !== null && id === newId && newType === type && data.lid && data.lid !== lid) {\n let existingIdentifier = lids[data.lid];\n return existingIdentifier !== undefined ? existingIdentifier : false;\n // If the lids are the same, and ids are the same, but types are different we should trigger a merge of the identifiers\n } else if (id !== null && id === newId && newType && newType !== type && data.lid && data.lid === lid) {\n let keyOptions = getTypeIndex(typesCache, newType);\n let existingIdentifier = keyOptions.id[id];\n return existingIdentifier !== undefined ? existingIdentifier : false;\n }\n }\n return false;\n}","import { assert } from '@ember/debug';\nimport { _backburner as emberBackburner, cancel, run } from '@ember/runloop';\nimport { DEBUG } from '@glimmer/env';\nimport { errorsHashToArray } from '../errors-utils';\nimport { internalModelFactoryFor } from '../internal-model-factory';\n\n/**\n @module @ember-data/store\n*/\n\nfunction isDSModel(record) {\n return true /* HAS_MODEL_PACKAGE */ && !!record && 'constructor' in record && 'isModel' in record.constructor && record.constructor.isModel === true;\n}\nexport default class InternalModel {\n // Not typed yet\n\n constructor(store, identifier) {\n this.store = store;\n this.identifier = identifier;\n this._id = identifier.id;\n this._isUpdatingId = false;\n this.modelName = identifier.type;\n this.clientId = identifier.lid;\n this.hasRecord = false;\n this.hasRecordData = false;\n this._isDestroyed = false;\n this._doNotDestroy = false;\n this.isError = false;\n this._pendingRecordArrayManagerFlush = false; // used by the recordArrayManager\n\n // During dematerialization we don't want to rematerialize the record. The\n // reason this might happen is that dematerialization removes records from\n // record arrays, and Ember arrays will always `objectAt(0)` and\n // `objectAt(len - 1)` to test whether or not `firstObject` or `lastObject`\n // have changed.\n this._isDematerializing = false;\n this._scheduledDestroy = null;\n this.error = null;\n\n // caches for lazy getters\n this._modelClass = null;\n this.__recordArrays = null;\n this.error = null;\n }\n get id() {\n return this.identifier.id;\n }\n set id(value) {\n if (value !== this._id) {\n let newIdentifier = {\n type: this.identifier.type,\n lid: this.identifier.lid,\n id: value\n };\n // TODO potentially this needs to handle merged result\n this.store.identifierCache.updateRecordIdentifier(this.identifier, newIdentifier);\n this.notifyPropertyChange('id');\n }\n }\n get modelClass() {\n if (this.store.modelFor) {\n return this._modelClass || (this._modelClass = this.store.modelFor(this.modelName));\n }\n }\n get _recordData() {\n return this.store._instanceCache.getRecordData(this.identifier);\n }\n isHiddenFromRecordArrays() {\n // During dematerialization we don't want to rematerialize the record.\n // recordWasDeleted can cause other records to rematerialize because it\n // removes the internal model from the array and Ember arrays will always\n // `objectAt(0)` and `objectAt(len -1)` to check whether `firstObject` or\n // `lastObject` have changed. When this happens we don't want those\n // models to rematerialize their records.\n\n // eager checks to avoid instantiating record data if we are empty or loading\n if (this.isEmpty) {\n return true;\n }\n if (this.isLoading) {\n return false;\n }\n let isRecordFullyDeleted = this._isRecordFullyDeleted();\n return this._isDematerializing || this.hasScheduledDestroy() || this.isDestroyed || isRecordFullyDeleted;\n }\n _isRecordFullyDeleted() {\n if (this._recordData.isDeletionCommitted && this._recordData.isDeletionCommitted()) {\n return true;\n } else if (this._recordData.isNew && this._recordData.isDeleted && this._recordData.isNew() && this._recordData.isDeleted()) {\n return true;\n } else {\n return false;\n }\n }\n isDeleted() {\n if (this._recordData.isDeleted) {\n return this._recordData.isDeleted();\n } else {\n return false;\n }\n }\n isNew() {\n if (this.hasRecordData && this._recordData.isNew) {\n return this._recordData.isNew();\n } else {\n return false;\n }\n }\n get isEmpty() {\n return !this.hasRecordData || (!this.isNew() || this.isDeleted()) && this._recordData.isEmpty?.() || false;\n }\n get isLoading() {\n const req = this.store.getRequestStateService();\n const {\n identifier\n } = this;\n // const fulfilled = req.getLastRequestForRecord(identifier);\n\n return !this.isLoaded &&\n // fulfilled === null &&\n req.getPendingRequestsForRecord(identifier).some(req => req.type === 'query');\n }\n get isLoaded() {\n // if we are new we must consider ourselves loaded\n if (this.isNew()) {\n return true;\n }\n // even if we have a past request, if we are now empty we are not loaded\n // typically this is true after an unloadRecord call\n\n // if we are not empty, not new && we have a fulfilled request then we are loaded\n // we should consider allowing for something to be loaded that is simply \"not empty\".\n // which is how RecordState currently handles this case; however, RecordState is buggy\n // in that it does not account for unloading.\n return !this.isEmpty;\n }\n dematerializeRecord() {\n this._isDematerializing = true;\n\n // TODO IGOR add a test that fails when this is missing, something that involves canceling a destroy\n // and the destroy not happening, and then later on trying to destroy\n this._doNotDestroy = false;\n // this has to occur before the internal model is removed\n // for legacy compat.\n const {\n identifier\n } = this;\n this.store._instanceCache.removeRecord(identifier);\n\n // move to an empty never-loaded state\n // ensure any record notifications happen prior to us\n // unseting the record but after we've triggered\n // destroy\n this.store._backburner.join(() => {\n this._recordData.unloadRecord();\n });\n this.hasRecord = false; // this must occur after relationship removal\n this.error = null;\n this.store.recordArrayManager.recordDidChange(this.identifier);\n }\n deleteRecord() {\n run(() => {\n const backburner = this.store._backburner;\n backburner.run(() => {\n if (this._recordData.setIsDeleted) {\n this._recordData.setIsDeleted(true);\n }\n if (this.isNew()) {\n // destroyRecord follows up deleteRecord with save(). This prevents an unecessary save for a new record\n this._deletedRecordWasNew = true;\n this.unloadRecord();\n }\n });\n });\n }\n\n /*\n Unload the record for this internal model. This will cause the record to be\n destroyed and freed up for garbage collection. It will also do a check\n for cleaning up internal models.\n This check is performed by first computing the set of related internal\n models. If all records in this set are unloaded, then the entire set is\n destroyed. Otherwise, nothing in the set is destroyed.\n This means that this internal model will be freed up for garbage collection\n once all models that refer to it via some relationship are also unloaded.\n */\n unloadRecord() {\n if (this.isDestroyed) {\n return;\n }\n if (DEBUG) {\n const requests = this.store.getRequestStateService().getPendingRequestsForRecord(this.identifier);\n if (requests.some(req => {\n return req.type === 'mutation';\n })) {\n assert('You can only unload a record which is not inFlight. `' + this + '`');\n }\n }\n this.dematerializeRecord();\n if (this._scheduledDestroy === null) {\n this._scheduledDestroy = emberBackburner.schedule('destroy', this, '_checkForOrphanedInternalModels');\n }\n }\n hasScheduledDestroy() {\n return !!this._scheduledDestroy;\n }\n cancelDestroy() {\n assert(`You cannot cancel the destruction of an InternalModel once it has already been destroyed`, !this.isDestroyed);\n this._doNotDestroy = true;\n this._isDematerializing = false;\n cancel(this._scheduledDestroy);\n this._scheduledDestroy = null;\n }\n\n // typically, we prefer to async destroy this lets us batch cleanup work.\n // Unfortunately, some scenarios where that is not possible. Such as:\n //\n // ```js\n // const record = store.findRecord(‘record’, 1);\n // record.unloadRecord();\n // store.createRecord(‘record’, 1);\n // ```\n //\n // In those scenarios, we make that model's cleanup work, sync.\n //\n destroySync() {\n if (this._isDematerializing) {\n this.cancelDestroy();\n }\n this._checkForOrphanedInternalModels();\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n // just in-case we are not one of the orphaned, we should still\n // still destroy ourselves\n this.destroy();\n }\n _checkForOrphanedInternalModels() {\n this._isDematerializing = false;\n this._scheduledDestroy = null;\n if (this.isDestroyed) {\n return;\n }\n }\n destroyFromRecordData() {\n if (this._doNotDestroy) {\n this._doNotDestroy = false;\n return;\n }\n this.destroy();\n }\n destroy() {\n let record = this.store._instanceCache.peek({\n identifier: this.identifier,\n bucket: 'record'\n });\n assert('Cannot destroy an internalModel while its record is materialized', !record || record.isDestroyed || record.isDestroying);\n this.isDestroying = true;\n internalModelFactoryFor(this.store).remove(this);\n this._isDestroyed = true;\n }\n setupData(data) {\n if (this.isNew()) {\n this.store._notificationManager.notify(this.identifier, 'identity');\n }\n this._recordData.pushData(data, this.hasRecord);\n }\n notifyAttributes(keys) {\n if (this.hasRecord) {\n let manager = this.store._notificationManager;\n let {\n identifier\n } = this;\n if (!keys || !keys.length) {\n manager.notify(identifier, 'attributes');\n } else {\n for (let i = 0; i < keys.length; i++) {\n manager.notify(identifier, 'attributes', keys[i]);\n }\n }\n }\n }\n get isDestroyed() {\n return this._isDestroyed;\n }\n hasChangedAttributes() {\n if (!this.hasRecordData) {\n // no need to calculate changed attributes when calling `findRecord`\n return false;\n }\n return this._recordData.hasChangedAttributes();\n }\n changedAttributes() {\n if (!this.hasRecordData) {\n // no need to calculate changed attributes when calling `findRecord`\n return {};\n }\n return this._recordData.changedAttributes();\n }\n adapterWillCommit() {\n this._recordData.willCommit();\n let record = this.store._instanceCache.peek({\n identifier: this.identifier,\n bucket: 'record'\n });\n if (record && isDSModel(record)) {\n record.errors.clear();\n }\n }\n notifyHasManyChange(key) {\n if (this.hasRecord) {\n this.store._notificationManager.notify(this.identifier, 'relationships', key);\n }\n }\n notifyBelongsToChange(key) {\n if (this.hasRecord) {\n this.store._notificationManager.notify(this.identifier, 'relationships', key);\n }\n }\n notifyPropertyChange(key) {\n if (this.hasRecord) {\n // TODO this should likely *mostly* be the `attributes` bucket\n // but it seems for local mutations we rely on computed updating\n // iteself when set. As we design our own thing we may need to change\n // that.\n this.store._notificationManager.notify(this.identifier, 'property', key);\n }\n }\n notifyStateChange(key) {\n if (this.hasRecord) {\n this.store._notificationManager.notify(this.identifier, 'state');\n }\n if (!key || key === 'isDeletionCommitted') {\n this.store.recordArrayManager.recordDidChange(this.identifier);\n }\n }\n rollbackAttributes() {\n this.store._backburner.join(() => {\n let dirtyKeys = this._recordData.rollbackAttributes();\n let record = this.store._instanceCache.peek({\n identifier: this.identifier,\n bucket: 'record'\n });\n if (record && isDSModel(record)) {\n record.errors.clear();\n }\n if (this.hasRecord && dirtyKeys && dirtyKeys.length > 0) {\n this.notifyAttributes(dirtyKeys);\n }\n });\n }\n removeFromInverseRelationships() {\n if (this.hasRecordData) {\n this.store._backburner.join(() => {\n this._recordData.removeFromInverseRelationships();\n });\n }\n }\n\n /*\n When a find request is triggered on the store, the user can optionally pass in\n attributes and relationships to be preloaded. These are meant to behave as if they\n came back from the server, except the user obtained them out of band and is informing\n the store of their existence. The most common use case is for supporting client side\n nested URLs, such as `/posts/1/comments/2` so the user can do\n `store.findRecord('comment', 2, { preload: { post: 1 } })` without having to fetch the post.\n Preloaded data can be attributes and relationships passed in either as IDs or as actual\n models.\n */\n preloadData(preload) {\n let jsonPayload = {};\n //TODO(Igor) consider the polymorphic case\n Object.keys(preload).forEach(key => {\n let preloadValue = preload[key];\n let relationshipMeta = this.modelClass.metaForProperty(key);\n if (relationshipMeta.isRelationship) {\n if (!jsonPayload.relationships) {\n jsonPayload.relationships = {};\n }\n jsonPayload.relationships[key] = this._preloadRelationship(key, preloadValue);\n } else {\n if (!jsonPayload.attributes) {\n jsonPayload.attributes = {};\n }\n jsonPayload.attributes[key] = preloadValue;\n }\n });\n this._recordData.pushData(jsonPayload);\n }\n _preloadRelationship(key, preloadValue) {\n let relationshipMeta = this.modelClass.metaForProperty(key);\n let modelClass = relationshipMeta.type;\n let data;\n if (relationshipMeta.kind === 'hasMany') {\n assert('You need to pass in an array to set a hasMany property on a record', Array.isArray(preloadValue));\n data = preloadValue.map(value => this._convertPreloadRelationshipToJSON(value, modelClass));\n } else {\n data = this._convertPreloadRelationshipToJSON(preloadValue, modelClass);\n }\n return {\n data\n };\n }\n _convertPreloadRelationshipToJSON(value, modelClass) {\n if (typeof value === 'string' || typeof value === 'number') {\n return {\n type: modelClass,\n id: value\n };\n }\n let internalModel;\n if (value._internalModel) {\n internalModel = value._internalModel;\n } else {\n internalModel = value;\n }\n // TODO IGOR DAVID assert if no id is present\n return {\n type: internalModel.modelName,\n id: internalModel.id\n };\n }\n\n /*\n * calling `InstanceCache.setRecordId` is necessary to update\n * the cache index for this record if we have changed.\n *\n * However, since the store is not aware of whether the update\n * is from us (via user set) or from a push of new data\n * it will also call us so that we can notify and update state.\n *\n * When it does so it calls with `fromCache` so that we can\n * short-circuit instead of cycling back.\n *\n * This differs from the short-circuit in the `_isUpdatingId`\n * case in that the the cache can originate the call to setId,\n * so on first entry we will still need to do our own update.\n */\n setId(id, fromCache = false) {\n if (this._isUpdatingId === true) {\n return;\n }\n this._isUpdatingId = true;\n let didChange = id !== this._id;\n this._id = id;\n if (didChange && id !== null) {\n if (!fromCache) {\n this.store._instanceCache.setRecordId(this.modelName, id, this.clientId);\n }\n // internal set of ID to get it to RecordData from DS.Model\n // if we are within create we may not have a recordData yet.\n if (this.hasRecordData && this._recordData.__setId) {\n this._recordData.__setId(id);\n }\n }\n if (didChange && this.hasRecord) {\n this.store._notificationManager.notify(this.identifier, 'identity');\n }\n this._isUpdatingId = false;\n }\n didError() {}\n\n /*\n If the adapter did not return a hash in response to a commit,\n merge the changed attributes and relationships into the existing\n saved data.\n */\n adapterDidCommit(data) {\n this._recordData.didCommit(data);\n this.store.recordArrayManager.recordDidChange(this.identifier);\n }\n hasErrors() {\n // TODO add assertion forcing consuming RecordData's to implement getErrors\n if (this._recordData.getErrors) {\n return this._recordData.getErrors(this.identifier).length > 0;\n } else {\n let record = this.store._instanceCache.peek({\n identifier: this.identifier,\n bucket: 'record'\n });\n // we can't have errors if we never tried loading\n if (!record) {\n return false;\n }\n let errors = record.errors;\n return errors.length > 0;\n }\n }\n\n // FOR USE DURING COMMIT PROCESS\n adapterDidInvalidate(parsedErrors, error) {\n // TODO @runspired this should be handled by RecordState\n // and errors should be dirtied but lazily fetch if at\n // all possible. We should only notify errors here.\n let attribute;\n if (error && parsedErrors) {\n // TODO add assertion forcing consuming RecordData's to implement getErrors\n if (!this._recordData.getErrors) {\n let record = this.store._instanceCache.getRecord(this.identifier);\n let errors = record.errors;\n for (attribute in parsedErrors) {\n if (Object.prototype.hasOwnProperty.call(parsedErrors, attribute)) {\n errors.add(attribute, parsedErrors[attribute]);\n }\n }\n }\n let jsonApiErrors = errorsHashToArray(parsedErrors);\n if (jsonApiErrors.length === 0) {\n jsonApiErrors = [{\n title: 'Invalid Error',\n detail: '',\n source: {\n pointer: '/data'\n }\n }];\n }\n this._recordData.commitWasRejected(this.identifier, jsonApiErrors);\n } else {\n this._recordData.commitWasRejected(this.identifier);\n }\n }\n notifyErrorsChange() {\n this.store._notificationManager.notify(this.identifier, 'errors');\n }\n adapterDidError() {\n this._recordData.commitWasRejected();\n }\n toString() {\n return `<${this.modelName}:${this.id}>`;\n }\n}","import { assert } from '@ember/debug';\nimport InternalModel from './model/internal-model';\n\n/**\n @module @ember-data/store\n*/\n\n/**\n `InternalModelMap` is a custom storage map for internalModels of a given modelName\n used by `IdentityMap`.\n\n It was extracted from an implicit pojo based \"internalModel map\" and preserves\n that interface while we work towards a more official API.\n\n @class InternalModelMap\n @internal\n */\nexport default class InternalModelMap {\n constructor(modelName) {\n this._idToModel = Object.create(null);\n this._models = [];\n this.modelName = void 0;\n this.modelName = modelName;\n }\n get(id) {\n return this._idToModel[id] || null;\n }\n has(id) {\n return !!this._idToModel[id];\n }\n get length() {\n return this._models.length;\n }\n get recordIdentifiers() {\n return this._models.map(m => m.identifier);\n }\n set(id, internalModel) {\n assert(`You cannot index an internalModel by an empty id'`, typeof id === 'string' && id.length > 0);\n assert(`You cannot set an index for an internalModel to something other than an internalModel`, internalModel instanceof InternalModel);\n assert(`You cannot set an index for an internalModel that is not in the InternalModelMap`, this.contains(internalModel));\n assert(`You cannot update the id index of an InternalModel once set. Attempted to update ${id}.`, !this.has(id) || this.get(id) === internalModel);\n this._idToModel[id] = internalModel;\n }\n add(internalModel, id) {\n assert(`You cannot re-add an already present InternalModel to the InternalModelMap.`, !this.contains(internalModel));\n if (id) {\n assert(`Duplicate InternalModel for ${this.modelName}:${id} detected.`, !this.has(id) || this.get(id) === internalModel);\n this._idToModel[id] = internalModel;\n }\n this._models.push(internalModel);\n }\n remove(internalModel, id) {\n delete this._idToModel[id];\n let loc = this._models.indexOf(internalModel);\n if (loc !== -1) {\n this._models.splice(loc, 1);\n }\n }\n contains(internalModel) {\n return this._models.indexOf(internalModel) !== -1;\n }\n\n /**\n An array of all models of this modelName\n @property models\n @internal\n @type Array\n */\n get models() {\n return this._models;\n }\n\n /**\n Destroy all models in the map\n @internal\n */\n clear() {\n let internalModels = this._models;\n this._models = [];\n for (let i = 0; i < internalModels.length; i++) {\n let internalModel = internalModels[i];\n internalModel.unloadRecord();\n }\n }\n}","import InternalModelMap from './internal-model-map';\n\n/**\n @module @ember-data/store\n*/\n\n/**\n `IdentityMap` is a custom storage map for records by modelName\n used by `Store`.\n\n @class IdentityMap\n @internal\n */\nexport default class IdentityMap {\n constructor() {\n this._map = Object.create(null);\n }\n /**\n Retrieves the `InternalModelMap` for a given modelName,\n creating one if one did not already exist. This is\n similar to `getWithDefault` or `get` on a `MapWithDefault`\n @method retrieve\n @internal\n @param modelName a previously normalized modelName\n @return {InternalModelMap} the InternalModelMap for the given modelName\n */\n retrieve(modelName) {\n let map = this._map[modelName];\n if (map === undefined) {\n map = this._map[modelName] = new InternalModelMap(modelName);\n }\n return map;\n }\n\n /**\n Clears the contents of all known `RecordMaps`, but does\n not remove the InternalModelMap instances.\n @internal\n */\n clear() {\n let map = this._map;\n let keys = Object.keys(map);\n for (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n map[key].clear();\n }\n }\n}","import { assert } from '@ember/debug';\nimport coerceId from '../coerce-id';\nimport { isStableIdentifier } from '../identifier-cache';\nimport isNonEmptyString from './is-non-empty-string';\nfunction constructResource(type, id, lid) {\n if (typeof type === 'object' && type !== null) {\n let resource = type;\n if (isStableIdentifier(resource)) {\n return resource;\n }\n if ('id' in resource) {\n resource.id = coerceId(resource.id);\n }\n assert('Expected either id or lid to be a valid string', 'id' in resource && isNonEmptyString(resource.id) || isNonEmptyString(resource.lid));\n assert('if id is present, the type must be a string', !('id' in resource) || typeof resource.type === 'string');\n return resource;\n } else {\n const trueId = coerceId(id);\n if (!isNonEmptyString(trueId)) {\n if (isNonEmptyString(lid)) {\n return {\n lid\n };\n }\n throw new Error('Expected either id or lid to be a valid string');\n }\n assert('type must be a string', typeof type === 'string');\n if (isNonEmptyString(lid)) {\n return {\n type,\n id: trueId,\n lid\n };\n }\n return {\n type,\n id: trueId\n };\n }\n}\nexport default constructResource;","import { assert, warn } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport IdentityMap from './identity-map';\nimport InternalModel from './model/internal-model';\nimport constructResource from './utils/construct-resource';\nimport WeakCache from './weak-cache';\n\n/**\n @module @ember-data/store\n*/\nconst FactoryCache = new WeakCache(DEBUG ? 'internal-model-factory' : '');\nFactoryCache._generator = store => {\n return new InternalModelFactory(store);\n};\nconst RecordCache = new WeakCache(DEBUG ? 'identifier' : '');\nif (DEBUG) {\n RecordCache._expectMsg = key => `${String(key)} is not a record instantiated by @ember-data/store`;\n}\nexport function peekRecordIdentifier(record) {\n return RecordCache.get(record);\n}\n\n/**\n Retrieves the unique referentially-stable [RecordIdentifier](/ember-data/release/classes/StableRecordIdentifier)\n assigned to the given record instance.\n\n ```js\n import { recordIdentifierFor } from \"@ember-data/store\";\n\n // ... gain access to a record, for instance with peekRecord or findRecord\n const record = store.peekRecord(\"user\", \"1\");\n\n // get the identifier for the record (see docs for StableRecordIdentifier)\n const identifier = recordIdentifierFor(record);\n\n // access the identifier's properties.\n const { id, type, lid } = identifier;\n ```\n\n @method recordIdentifierFor\n @public\n @static\n @for @ember-data/store\n @param {Object} record a record instance previously obstained from the store.\n @returns {StableRecordIdentifier}\n */\nexport function recordIdentifierFor(record) {\n return RecordCache.getWithError(record);\n}\nexport function setRecordIdentifier(record, identifier) {\n if (DEBUG && RecordCache.has(record) && RecordCache.get(record) !== identifier) {\n throw new Error(`${record} was already assigned an identifier`);\n }\n\n /*\n It would be nice to do a reverse check here that an identifier has not\n previously been assigned a record; however, unload + rematerialization\n prevents us from having a great way of doing so when CustomRecordClasses\n don't necessarily give us access to a `isDestroyed` for dematerialized\n instance.\n */\n\n RecordCache.set(record, identifier);\n}\nexport function internalModelFactoryFor(store) {\n return FactoryCache.lookup(store);\n}\n\n/**\n * The InternalModelFactory handles the lifecyle of\n * instantiating, caching, and destroying InternalModel\n * instances.\n *\n * @class InternalModelFactory\n * @internal\n */\nexport default class InternalModelFactory {\n constructor(store) {\n this.store = store;\n this.identifierCache = store.identifierCache;\n this.identifierCache.__configureMerge((identifier, matchedIdentifier, resourceData) => {\n let intendedIdentifier = identifier;\n if (identifier.id !== matchedIdentifier.id) {\n intendedIdentifier = 'id' in resourceData && identifier.id === resourceData.id ? identifier : matchedIdentifier;\n } else if (identifier.type !== matchedIdentifier.type) {\n intendedIdentifier = 'type' in resourceData && identifier.type === resourceData.type ? identifier : matchedIdentifier;\n }\n let altIdentifier = identifier === intendedIdentifier ? matchedIdentifier : identifier;\n\n // check for duplicate InternalModel's\n const map = this.modelMapFor(identifier.type);\n let im = map.get(intendedIdentifier.lid);\n let otherIm = map.get(altIdentifier.lid);\n\n // we cannot merge internalModels when both have records\n // (this may not be strictly true, we could probably swap the internalModel the record points at)\n if (im && otherIm && im.hasRecord && otherIm.hasRecord) {\n // TODO we probably don't need to throw these errors anymore\n // once InternalModel is fully removed, as we can just \"swap\"\n // what data source the abandoned record points at so long as\n // it itself is not retained by the store in any way.\n if ('id' in resourceData) {\n throw new Error(`Failed to update the 'id' for the RecordIdentifier '${identifier.type}:${identifier.id} (${identifier.lid})' to '${resourceData.id}', because that id is already in use by '${matchedIdentifier.type}:${matchedIdentifier.id} (${matchedIdentifier.lid})'`);\n }\n // TODO @runspired determine when this is even possible\n assert(`Failed to update the RecordIdentifier '${identifier.type}:${identifier.id} (${identifier.lid})' to merge with the detected duplicate identifier '${matchedIdentifier.type}:${matchedIdentifier.id} (${matchedIdentifier.lid})'`);\n }\n\n // remove otherIm from cache\n if (otherIm) {\n map.remove(otherIm, altIdentifier.lid);\n }\n if (im === null && otherIm === null) {\n // nothing more to do\n return intendedIdentifier;\n\n // only the other has an InternalModel\n // OR only the other has a Record\n } else if (im === null && otherIm !== null || im && !im.hasRecord && otherIm && otherIm.hasRecord) {\n if (im) {\n // TODO check if we are retained in any async relationships\n map.remove(im, intendedIdentifier.lid);\n // im.destroy();\n }\n im = otherIm;\n // TODO do we need to notify the id change?\n im._id = intendedIdentifier.id;\n im.identifier = intendedIdentifier;\n map.add(im, intendedIdentifier.lid);\n\n // just use im\n } else {\n // otherIm.destroy();\n }\n\n /*\n TODO @runspired consider adding this to make polymorphism even nicer\n if (HAS_RECORD_DATA_PACKAGE) {\n if (identifier.type !== matchedIdentifier.type) {\n const graphFor = importSync('@ember-data/record-data/-private').graphFor;\n graphFor(this).registerPolymorphicType(identifier.type, matchedIdentifier.type);\n }\n }\n */\n\n return intendedIdentifier;\n });\n this._identityMap = new IdentityMap();\n }\n\n /**\n * Retrieve the InternalModel for a given { type, id, lid }.\n *\n * If an InternalModel does not exist, it instantiates one.\n *\n * If an InternalModel does exist bus has a scheduled destroy,\n * the scheduled destroy will be cancelled.\n *\n * @method lookup\n * @private\n */\n lookup(resource, data) {\n if (data !== undefined) {\n // if we've been given data associated with this lookup\n // we must first give secondary-caches for LIDs the\n // opportunity to populate based on it\n this.identifierCache.getOrCreateRecordIdentifier(data);\n }\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n const internalModel = this.peek(identifier);\n if (internalModel) {\n // unloadRecord is async, if one attempts to unload + then sync push,\n // we must ensure the unload is canceled before continuing\n // The createRecord path will take _existingInternalModelForId()\n // which will call `destroySync` instead for this unload + then\n // sync createRecord scenario. Once we have true client-side\n // delete signaling, we should never call destroySync\n if (internalModel.hasScheduledDestroy()) {\n internalModel.cancelDestroy();\n }\n return internalModel;\n }\n return this._build(identifier, false);\n }\n\n /**\n * Peek the InternalModel for a given { type, id, lid }.\n *\n * If an InternalModel does not exist, return `null`.\n *\n * @method peek\n * @private\n */\n peek(identifier) {\n return this.modelMapFor(identifier.type).get(identifier.lid);\n }\n getByResource(resource) {\n const normalizedResource = constructResource(resource);\n return this.lookup(normalizedResource);\n }\n setRecordId(type, id, lid) {\n const resource = {\n type,\n id: null,\n lid\n };\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n const internalModel = this.peek(identifier);\n if (internalModel === null) {\n throw new Error(`Cannot set the id ${id} on the record ${type}:${lid} as there is no such record in the cache.`);\n }\n let oldId = internalModel.id;\n let modelName = internalModel.modelName;\n\n // ID absolutely can't be missing if the oldID is empty (missing Id in response for a new record)\n assert(`'${modelName}' was saved to the server, but the response does not have an id and your record does not either.`, !(id === null && oldId === null));\n\n // ID absolutely can't be different than oldID if oldID is not null\n // TODO this assertion and restriction may not strictly be needed in the identifiers world\n assert(`Cannot update the id for '${modelName}:${lid}' from '${oldId}' to '${id}'.`, !(oldId !== null && id !== oldId));\n\n // ID can be null if oldID is not null (altered ID in response for a record)\n // however, this is more than likely a developer error.\n if (oldId !== null && id === null) {\n warn(`Your ${modelName} record was saved to the server, but the response does not have an id.`, !(oldId !== null && id === null));\n return;\n }\n let existingInternalModel = this.peekById(modelName, id);\n assert(`'${modelName}' was saved to the server, but the response returned the new id '${id}', which has already been used with another record.'`, !existingInternalModel || existingInternalModel === internalModel);\n if (identifier.id === null) {\n // TODO potentially this needs to handle merged result\n this.identifierCache.updateRecordIdentifier(identifier, {\n type,\n id\n });\n }\n internalModel.setId(id, true);\n }\n peekById(type, id) {\n const identifier = this.identifierCache.peekRecordIdentifier({\n type,\n id\n });\n let internalModel = identifier ? this.modelMapFor(type).get(identifier.lid) : null;\n if (internalModel && internalModel.hasScheduledDestroy()) {\n // unloadRecord is async, if one attempts to unload + then sync create,\n // we must ensure the unload is complete before starting the create\n // The push path will take this.lookup()\n // which will call `cancelDestroy` instead for this unload + then\n // sync push scenario. Once we have true client-side\n // delete signaling, we should never call destroySync\n internalModel.destroySync();\n internalModel = null;\n }\n return internalModel;\n }\n build(newResourceInfo) {\n return this._build(newResourceInfo, true);\n }\n _build(resource, isCreate = false) {\n if (isCreate === true && resource.id) {\n let existingInternalModel = this.peekById(resource.type, resource.id);\n assert(`The id ${resource.id} has already been used with another '${resource.type}' record.`, !existingInternalModel);\n }\n const {\n identifierCache\n } = this;\n let identifier;\n if (isCreate === true) {\n identifier = identifierCache.createIdentifierForNewRecord(resource);\n } else {\n identifier = resource;\n }\n\n // lookupFactory should really return an object that creates\n // instances with the injections applied\n let internalModel = new InternalModel(this.store, identifier);\n this.modelMapFor(resource.type).add(internalModel, identifier.lid);\n return internalModel;\n }\n remove(internalModel) {\n let recordMap = this.modelMapFor(internalModel.modelName);\n let clientId = internalModel.identifier.lid;\n recordMap.remove(internalModel, clientId);\n const {\n identifier\n } = internalModel;\n this.identifierCache.forgetRecordIdentifier(identifier);\n }\n modelMapFor(type) {\n return this._identityMap.retrieve(type);\n }\n clear(type) {\n if (type === undefined) {\n this._identityMap.clear();\n } else {\n this.modelMapFor(type).clear();\n }\n }\n}","import { DEBUG } from '@glimmer/env';\nimport WeakCache from './weak-cache';\nconst Cache = new WeakCache(DEBUG ? 'subscribers' : '');\nCache._generator = () => new Map();\nconst Tokens = new WeakCache(DEBUG ? 'identifier' : '');\n\n// 'property' is an internal EmberData only transition period concept.\n\nexport function unsubscribe(token) {\n let identifier = Tokens.get(token);\n if (!identifier) {\n throw new Error('Passed unknown unsubscribe token to unsubscribe');\n }\n Tokens.delete(token);\n const map = Cache.get(identifier);\n map?.delete(token);\n}\n/*\n Currently only support a single callback per identifier\n*/\nexport default class NotificationManager {\n constructor(store) {\n this.store = store;\n }\n subscribe(identifier, callback) {\n let stableIdentifier = this.store.identifierCache.getOrCreateRecordIdentifier(identifier);\n let map = Cache.lookup(stableIdentifier);\n let unsubToken = {};\n map.set(unsubToken, callback);\n Tokens.set(unsubToken, stableIdentifier);\n return unsubToken;\n }\n unsubscribe(token) {\n unsubscribe(token);\n }\n notify(identifier, value, key) {\n let stableIdentifier = this.store.identifierCache.getOrCreateRecordIdentifier(identifier);\n let callbackMap = Cache.get(stableIdentifier);\n if (!callbackMap || !callbackMap.size) {\n return false;\n }\n callbackMap.forEach(cb => {\n cb(stableIdentifier, value, key);\n });\n return true;\n }\n}","var _class, _descriptor, _token, _identifier;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError(\"attempted to use private field on non-instance\"); return e; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(e) { return \"__private_\" + id++ + \"_\" + e; }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\n\n/**\n @module @ember-data/store\n*/\nimport { resolve } from 'rsvp';\nimport { unsubscribe } from '../record-notification-manager';\n\n/**\n @module @ember-data/store\n*/\n\n/**\n A `RecordReference` is a low-level API that allows users and\n addon authors to perform meta-operations on a record.\n\n @class RecordReference\n @public\n @extends Reference\n*/\nlet RecordReference = (_class = (_token = /*#__PURE__*/_classPrivateFieldLooseKey(\"token\"), _identifier = /*#__PURE__*/_classPrivateFieldLooseKey(\"identifier\"), class RecordReference {\n constructor(store, identifier) {\n // unsubscribe token given to us by the notification manager\n Object.defineProperty(this, _token, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _identifier, {\n writable: true,\n value: void 0\n });\n _initializerDefineProperty(this, \"_ref\", _descriptor, this);\n this.store = store;\n _classPrivateFieldLooseBase(this, _identifier)[_identifier] = identifier;\n _classPrivateFieldLooseBase(this, _token)[_token] = store._notificationManager.subscribe(identifier, (_, bucket, notifiedKey) => {\n if (bucket === 'identity' || (bucket === 'attributes' || bucket === 'property') && notifiedKey === 'id') {\n this._ref++;\n }\n });\n }\n destroy() {\n unsubscribe(_classPrivateFieldLooseBase(this, _token)[_token]);\n }\n get type() {\n return this.identifier().type;\n }\n\n /**\n The `id` of the record that this reference refers to.\n Together, the `type` and `id` properties form a composite key for\n the identity map.\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n userRef.id(); // '1'\n ```\n @method id\n @public\n @return {String} The id of the record.\n */\n id() {\n this._ref; // consume the tracked prop\n return _classPrivateFieldLooseBase(this, _identifier)[_identifier].id;\n }\n\n /**\n The `identifier` of the record that this reference refers to.\n Together, the `type` and `id` properties form a composite key for\n the identity map.\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n userRef.identifier(); // '1'\n ```\n @method identifier\n @public\n @return {String} The identifier of the record.\n */\n identifier() {\n return _classPrivateFieldLooseBase(this, _identifier)[_identifier];\n }\n\n /**\n How the reference will be looked up when it is loaded. Currently\n this always returns `identity` to signify that a record will be\n loaded by its `type` and `id`.\n Example\n ```javascript\n const userRef = store.getReference('user', 1);\n userRef.remoteType(); // 'identity'\n ```\n @method remoteType\n @public\n @return {String} 'identity'\n */\n remoteType() {\n return 'identity';\n }\n\n /**\n This API allows you to provide a reference with new data. The\n simplest usage of this API is similar to `store.push`: you provide a\n normalized hash of data and the object represented by the reference\n will update.\n If you pass a promise to `push`, Ember Data will not ask the adapter\n for the data if another attempt to fetch it is made in the\n interim. When the promise resolves, the underlying object is updated\n with the new data, and the promise returned by *this function* is resolved\n with that object.\n For example, `recordReference.push(promise)` will be resolved with a\n record.\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n // provide data for reference\n userRef.push({\n data: {\n id: \"1\",\n type: \"user\",\n attributes: {\n username: \"@user\"\n }\n }\n }).then(function(user) {\n userRef.value() === user;\n });\n ```\n @method push\n @public\n @param objectOrPromise a JSON:API ResourceDocument or a promise resolving to one\n @return a promise for the value (record or relationship)\n */\n push(objectOrPromise) {\n // TODO @deprecate pushing unresolved payloads\n return resolve(objectOrPromise).then(data => {\n return this.store.push(data);\n });\n }\n\n /**\n If the entity referred to by the reference is already loaded, it is\n present as `reference.value`. Otherwise the value returned by this function\n is `null`.\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n userRef.value(); // user\n ```\n @method value\n @public\n @return {Model} the record for this RecordReference\n */\n value() {\n return this.store.peekRecord(_classPrivateFieldLooseBase(this, _identifier)[_identifier]);\n }\n\n /**\n Triggers a fetch for the backing entity based on its `remoteType`\n (see `remoteType` definitions per reference type).\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n // load user (via store.find)\n userRef.load().then(...)\n ```\n @method load\n @public\n @return {Promise} the record for this RecordReference\n */\n load() {\n const id = this.id();\n if (id !== null) {\n return this.store.findRecord(this.type, id);\n }\n assert(`Unable to fetch record of type ${this.type} without an id`);\n }\n\n /**\n Reloads the record if it is already loaded. If the record is not\n loaded it will load the record via `store.findRecord`\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n // or trigger a reload\n userRef.reload().then(...)\n ```\n @method reload\n @public\n @return {Promise} the record for this RecordReference\n */\n reload() {\n const id = this.id();\n if (id !== null) {\n return this.store.findRecord(this.type, id, {\n reload: true\n });\n }\n assert(`Unable to fetch record of type ${this.type} without an id`);\n }\n}), _descriptor = _applyDecoratedDescriptor(_class.prototype, \"_ref\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return 0;\n }\n}), _class);\nexport { RecordReference as default };","import { assert } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport WeakCache from './weak-cache';\n\n/*\n * Returns the RecordData instance associated with a given\n * Model or Identifier\n */\n\nconst RecordDataForIdentifierCache = new WeakCache(DEBUG ? 'recordData' : '');\nexport function setRecordDataFor(identifier, recordData) {\n assert(`Illegal set of identifier`, !RecordDataForIdentifierCache.has(identifier) || RecordDataForIdentifierCache.get(identifier) === recordData);\n RecordDataForIdentifierCache.set(identifier, recordData);\n}\nexport function removeRecordDataFor(identifier) {\n RecordDataForIdentifierCache.delete(identifier);\n}\nexport default function recordDataFor(instance) {\n if (RecordDataForIdentifierCache.has(instance)) {\n return RecordDataForIdentifierCache.get(instance);\n }\n return null;\n}","import { importSync } from '@embroider/macros';\nimport { internalModelFactoryFor } from './internal-model-factory';\nimport constructResource from './utils/construct-resource';\n\n/**\n @module @ember-data/store\n*/\n\nfunction metaIsRelationshipDefinition(meta) {\n return typeof meta._inverseKey === 'function';\n}\nlet peekGraph;\nif (true /* HAS_RECORD_DATA_PACKAGE */) {\n let _peekGraph;\n peekGraph = wrapper => {\n _peekGraph = _peekGraph || importSync('@ember-data/record-data/-private').peekGraph;\n return _peekGraph(wrapper);\n };\n}\nexport default class RecordDataStoreWrapper {\n constructor(_store) {\n this._store = _store;\n this._willNotify = false;\n this._pendingNotifies = new Map();\n }\n get identifierCache() {\n return this._store.identifierCache;\n }\n _scheduleNotification(identifier, key, kind) {\n let pending = this._pendingNotifies.get(identifier);\n if (!pending) {\n pending = new Map();\n this._pendingNotifies.set(identifier, pending);\n }\n pending.set(key, kind);\n if (this._willNotify === true) {\n return;\n }\n this._willNotify = true;\n let backburner = this._store._backburner;\n backburner.schedule('notify', this, this._flushNotifications);\n }\n notifyErrorsChange(type, id, lid) {\n const resource = constructResource(type, id, lid);\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n let internalModel = internalModelFactoryFor(this._store).peek(identifier);\n if (internalModel) {\n internalModel.notifyErrorsChange();\n }\n }\n _flushNotifications() {\n if (this._willNotify === false) {\n return;\n }\n let pending = this._pendingNotifies;\n this._pendingNotifies = new Map();\n this._willNotify = false;\n const factory = internalModelFactoryFor(this._store);\n pending.forEach((map, identifier) => {\n const internalModel = factory.peek(identifier);\n if (internalModel) {\n map.forEach((kind, key) => {\n if (kind === 'belongsTo') {\n internalModel.notifyBelongsToChange(key);\n } else {\n internalModel.notifyHasManyChange(key);\n }\n });\n }\n });\n }\n attributesDefinitionFor(type) {\n return this._store.getSchemaDefinitionService().attributesDefinitionFor({\n type\n });\n }\n relationshipsDefinitionFor(type) {\n return this._store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type\n });\n }\n inverseForRelationship(type, key) {\n const modelClass = this._store.modelFor(type);\n const definition = this.relationshipsDefinitionFor(type)[key];\n if (!definition) {\n return null;\n }\n if (metaIsRelationshipDefinition(definition)) {\n return definition._inverseKey(this._store, modelClass);\n } else if (definition.options && definition.options.inverse !== undefined) {\n return definition.options.inverse;\n } else {\n return null;\n }\n }\n inverseIsAsyncForRelationship(type, key) {\n const modelClass = this._store.modelFor(type);\n const definition = this.relationshipsDefinitionFor(type)[key];\n if (!definition) {\n return false;\n }\n if (definition.options && definition.options.inverse === null) {\n return false;\n }\n if (definition.inverseIsAsync !== undefined) {\n // TODO do we need to amend the RFC for this prop?\n // else we should add it to the TS interface and document.\n return !!definition.inverseIsAsync;\n } else if (metaIsRelationshipDefinition(definition)) {\n return definition._inverseIsAsync(this._store, modelClass);\n } else {\n return false;\n }\n }\n notifyPropertyChange(type, id, lid, key) {\n const resource = constructResource(type, id, lid);\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n let internalModel = internalModelFactoryFor(this._store).peek(identifier);\n if (internalModel) {\n internalModel.notifyAttributes(key ? [key] : []);\n }\n }\n notifyHasManyChange(type, id, lid, key) {\n const resource = constructResource(type, id, lid);\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n this._scheduleNotification(identifier, key, 'hasMany');\n }\n notifyBelongsToChange(type, id, lid, key) {\n const resource = constructResource(type, id, lid);\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n this._scheduleNotification(identifier, key, 'belongsTo');\n }\n notifyStateChange(type, id, lid, key) {\n const resource = constructResource(type, id, lid);\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n let internalModel = internalModelFactoryFor(this._store).peek(identifier);\n if (internalModel) {\n internalModel.notifyStateChange(key);\n }\n }\n recordDataFor(type, id, lid) {\n let identifier;\n let isCreate = false;\n if (!id && !lid) {\n isCreate = true;\n identifier = {\n type\n };\n } else {\n const resource = constructResource(type, id, lid);\n identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n }\n return this._store._instanceCache.recordDataFor(identifier, isCreate);\n }\n setRecordId(type, id, lid) {\n this._store._instanceCache.setRecordId(type, id, lid);\n }\n isRecordInUse(type, id, lid) {\n const resource = constructResource(type, id, lid);\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n const record = this._store._instanceCache.peek({\n identifier,\n bucket: 'record'\n });\n return record ? !(record.isDestroyed || record.isDestroying) : false;\n }\n disconnectRecord(type, id, lid) {\n const resource = constructResource(type, id, lid);\n const identifier = this.identifierCache.getOrCreateRecordIdentifier(resource);\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n let graph = peekGraph(this);\n if (graph) {\n graph.remove(identifier);\n }\n }\n let internalModel = internalModelFactoryFor(this._store).peek(identifier);\n if (internalModel) {\n internalModel.destroyFromRecordData();\n }\n }\n}","function _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError(\"attempted to use private field on non-instance\"); return e; }\nvar id = 0;\nfunction _classPrivateFieldLooseKey(e) { return \"__private_\" + id++ + \"_\" + e; }\nimport { A, default as EmberArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\nimport { resolve } from 'rsvp';\nimport coerceId, { ensureStringId } from './coerce-id';\nimport { assertIdentifierHasId } from './core-store';\nimport { internalModelFactoryFor, setRecordIdentifier } from './internal-model-factory';\nimport RecordReference from './model/record-reference';\nimport normalizeModelName from './normalize-model-name';\nimport recordDataFor, { setRecordDataFor } from './record-data-for';\nimport RecordDataStoreWrapper from './record-data-store-wrapper';\nimport Snapshot from './snapshot';\nimport constructResource from './utils/construct-resource';\nimport WeakCache from './weak-cache';\nconst RECORD_REFERENCES = new WeakCache(DEBUG ? 'reference' : '');\nexport const StoreMap = new WeakCache(DEBUG ? 'store' : '');\nexport function storeFor(record) {\n const store = StoreMap.get(record);\n assert(`A record in a disconnected state cannot utilize the store. This typically means the record has been destroyed, most commonly by unloading it.`, store);\n return store;\n}\nvar _instances = /*#__PURE__*/_classPrivateFieldLooseKey(\"instances\");\nexport class InstanceCache {\n constructor(store) {\n Object.defineProperty(this, _instances, {\n writable: true,\n value: {\n record: new WeakMap(),\n recordData: new WeakMap()\n }\n });\n this.store = store;\n this._storeWrapper = new RecordDataStoreWrapper(this.store);\n this.__recordDataFor = this.__recordDataFor.bind(this);\n RECORD_REFERENCES._generator = identifier => {\n return new RecordReference(this.store, identifier);\n };\n }\n peek({\n identifier,\n bucket\n }) {\n return _classPrivateFieldLooseBase(this, _instances)[_instances][bucket]?.get(identifier);\n }\n set({\n identifier,\n bucket,\n value\n }) {\n _classPrivateFieldLooseBase(this, _instances)[_instances][bucket].set(identifier, value);\n }\n getRecord(identifier, properties) {\n let record = this.peek({\n identifier,\n bucket: 'record'\n });\n if (!record) {\n // TODO store this state somewhere better\n const internalModel = this.getInternalModel(identifier);\n if (internalModel._isDematerializing) {\n // TODO this should be an assertion, this likely means\n // we have a bug to find wherein our own store is calling this\n // with an identifier that should have already been disconnected.\n // the destroy + fetch again case is likely either preserving the\n // identifier for re-use or failing to unload it.\n return null;\n }\n\n // TODO store this state somewhere better\n internalModel.hasRecord = true;\n if (properties && 'id' in properties) {\n assert(`expected id to be a string or null`, properties.id !== undefined);\n internalModel.setId(properties.id);\n }\n record = this._instantiateRecord(this.getRecordData(identifier), identifier, properties);\n this.set({\n identifier,\n bucket: 'record',\n value: record\n });\n }\n return record;\n }\n getReference(identifier) {\n return RECORD_REFERENCES.lookup(identifier);\n }\n _fetchDataIfNeededForIdentifier(identifier, options = {}) {\n const internalModel = this.getInternalModel(identifier);\n\n // pre-loading will change the isEmpty value\n // TODO stpre this state somewhere other than InternalModel\n const {\n isEmpty,\n isLoading\n } = internalModel;\n if (options.preload) {\n this.store._backburner.join(() => {\n internalModel.preloadData(options.preload);\n });\n }\n let promise;\n if (isEmpty) {\n assertIdentifierHasId(identifier);\n promise = this.store._fetchManager.scheduleFetch(identifier, options);\n } else if (isLoading) {\n promise = this.store._fetchManager.getPendingFetch(identifier, options);\n assert(`Expected to find a pending request for a record in the loading state, but found none`, promise);\n } else {\n promise = resolve(identifier);\n }\n return promise;\n }\n _instantiateRecord(recordData, identifier, properties) {\n // assert here\n if (properties !== undefined) {\n assert(`You passed '${typeof properties}' as properties for record creation instead of an object.`, typeof properties === 'object' && properties !== null);\n const {\n type\n } = identifier;\n\n // convert relationship Records to RecordDatas before passing to RecordData\n let defs = this.store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type\n });\n if (defs !== null) {\n let keys = Object.keys(properties);\n let relationshipValue;\n for (let i = 0; i < keys.length; i++) {\n let prop = keys[i];\n let def = defs[prop];\n if (def !== undefined) {\n if (def.kind === 'hasMany') {\n if (DEBUG) {\n assertRecordsPassedToHasMany(properties[prop]);\n }\n relationshipValue = extractRecordDatasFromRecords(properties[prop]);\n } else {\n relationshipValue = extractRecordDataFromRecord(properties[prop]);\n }\n properties[prop] = relationshipValue;\n }\n }\n }\n }\n\n // TODO guard against initRecordOptions no being there\n let createOptions = recordData._initRecordCreateOptions(properties);\n //TODO Igor pass a wrapper instead of RD\n let record = this.store.instantiateRecord(identifier, createOptions,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.__recordDataFor, this.store._notificationManager);\n setRecordIdentifier(record, identifier);\n setRecordDataFor(record, recordData);\n StoreMap.set(record, this.store);\n return record;\n }\n _teardownRecord(record) {\n StoreMap.delete(record);\n // TODO remove identifier:record cache link\n this.store.teardownRecord(record);\n }\n removeRecord(identifier) {\n let record = this.peek({\n identifier,\n bucket: 'record'\n });\n if (record) {\n _classPrivateFieldLooseBase(this, _instances)[_instances].record.delete(identifier);\n this._teardownRecord(record);\n }\n return !!record;\n }\n\n // TODO move RecordData Cache into InstanceCache\n getRecordData(identifier) {\n let recordData = this.peek({\n identifier,\n bucket: 'recordData'\n });\n if (!recordData) {\n recordData = this._createRecordData(identifier);\n _classPrivateFieldLooseBase(this, _instances)[_instances].recordData.set(identifier, recordData);\n this.getInternalModel(identifier).hasRecordData = true;\n }\n return recordData;\n }\n\n // TODO move InternalModel cache into InstanceCache\n getInternalModel(identifier) {\n return this._internalModelForResource(identifier);\n }\n createSnapshot(identifier, options = {}) {\n return new Snapshot(options, identifier, this.store);\n }\n __recordDataFor(resource) {\n const identifier = this.store.identifierCache.getOrCreateRecordIdentifier(resource);\n return this.recordDataFor(identifier, false);\n }\n\n // TODO move this to InstanceCache\n _createRecordData(identifier) {\n const recordData = this.store.createRecordDataFor(identifier.type, identifier.id, identifier.lid, this._storeWrapper);\n setRecordDataFor(identifier, recordData);\n // TODO this is invalid for v2 recordData but required\n // for v1 recordData. Remember to remove this once the\n // RecordData manager handles converting recordData to identifier\n setRecordIdentifier(recordData, identifier);\n return recordData;\n }\n\n // TODO string candidate for early elimination\n _internalModelForResource(resource) {\n return internalModelFactoryFor(this.store).getByResource(resource);\n }\n setRecordId(modelName, newId, clientId) {\n internalModelFactoryFor(this.store).setRecordId(modelName, newId, clientId);\n }\n _load(data) {\n // TODO type should be pulled from the identifier for debug\n let modelName = data.type;\n assert(`You must include an 'id' for ${modelName} in an object passed to 'push'`, data.id !== null && data.id !== undefined && data.id !== '');\n assert(`You tried to push data with a type '${modelName}' but no model could be found with that name.`, this.store.getSchemaDefinitionService().doesTypeExist(modelName));\n\n // TODO this should determine identifier via the cache before making assumptions\n const resource = constructResource(normalizeModelName(data.type), ensureStringId(data.id), coerceId(data.lid));\n const maybeIdentifier = this.store.identifierCache.peekRecordIdentifier(resource);\n let internalModel = internalModelFactoryFor(this.store).lookup(resource, data);\n\n // store.push will be from empty\n // findRecord will be from root.loading\n // this cannot be loading state if we do not already have an identifier\n // all else will be updates\n const isLoading = internalModel.isLoading || !internalModel.isLoaded && maybeIdentifier;\n const isUpdate = internalModel.isEmpty === false && !isLoading;\n\n // exclude store.push (root.empty) case\n let identifier = internalModel.identifier;\n if (isUpdate || isLoading) {\n let updatedIdentifier = this.store.identifierCache.updateRecordIdentifier(identifier, data);\n if (updatedIdentifier !== identifier) {\n // we encountered a merge of identifiers in which\n // two identifiers (and likely two internalModels)\n // existed for the same resource. Now that we have\n // determined the correct identifier to use, make sure\n // that we also use the correct internalModel.\n identifier = updatedIdentifier;\n internalModel = internalModelFactoryFor(this.store).lookup(identifier);\n }\n }\n internalModel.setupData(data);\n if (!isUpdate) {\n this.store.recordArrayManager.recordDidChange(identifier);\n }\n return identifier;\n }\n recordDataFor(identifier, isCreate) {\n let recordData;\n if (isCreate === true) {\n // TODO remove once InternalModel is no longer essential to internal state\n // and just build a new identifier directly\n let internalModel = internalModelFactoryFor(this.store).build({\n type: identifier.type,\n id: null\n });\n let stableIdentifier = internalModel.identifier;\n recordData = this.getRecordData(stableIdentifier);\n recordData.clientDidCreate();\n this.store.recordArrayManager.recordDidChange(stableIdentifier);\n } else {\n // TODO remove once InternalModel is no longer essential to internal state\n internalModelFactoryFor(this.store).lookup(identifier);\n recordData = this.getRecordData(identifier);\n }\n return recordData;\n }\n}\nfunction assertRecordsPassedToHasMany(records) {\n assert(`You must pass an array of records to set a hasMany relationship`,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n Array.isArray(records) || EmberArray.detect(records));\n assert(`All elements of a hasMany relationship must be instances of Model, you passed ${records.map(r => `${typeof r}`).join(', ')}`, function () {\n return A(records).every(record => Object.prototype.hasOwnProperty.call(record, '_internalModel') === true);\n }());\n}\nfunction extractRecordDatasFromRecords(records) {\n return records.map(extractRecordDataFromRecord);\n}\nfunction extractRecordDataFromRecord(recordOrPromiseRecord) {\n if (!recordOrPromiseRecord) {\n return null;\n }\n if (isPromiseRecord(recordOrPromiseRecord)) {\n let content = recordOrPromiseRecord.get && recordOrPromiseRecord.get('content');\n assert('You passed in a promise that did not originate from an EmberData relationship. You can only pass promises that come from a belongsTo or hasMany relationship to the get call.', content !== undefined);\n return content ? recordDataFor(content) : null;\n }\n return recordDataFor(recordOrPromiseRecord);\n}\nfunction isPromiseRecord(record) {\n return !!record.then;\n}","import { DEBUG } from '@glimmer/env';\nimport WeakCache from '../weak-cache';\nconst AvailableShims = new WeakCache(DEBUG ? 'schema-shims' : '');\nAvailableShims._generator = () => {\n return Object.create(null);\n};\nexport function getShimClass(store, modelName) {\n let shims = AvailableShims.lookup(store);\n let shim = shims[modelName];\n if (shim === undefined) {\n shim = shims[modelName] = new ShimModelClass(store, modelName);\n }\n return shim;\n}\nfunction mapFromHash(hash) {\n let map = new Map();\n for (let i in hash) {\n if (Object.prototype.hasOwnProperty.call(hash, i)) {\n map.set(i, hash[i]);\n }\n }\n return map;\n}\n\n// Mimics the static apis of DSModel\nexport default class ShimModelClass {\n // TODO Maybe expose the class here?\n constructor(__store, modelName) {\n this.__store = __store;\n this.modelName = modelName;\n }\n get fields() {\n let attrs = this.__store.getSchemaDefinitionService().attributesDefinitionFor({\n type: this.modelName\n });\n let relationships = this.__store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type: this.modelName\n });\n let fields = new Map();\n Object.keys(attrs).forEach(key => fields.set(key, 'attribute'));\n Object.keys(relationships).forEach(key => fields.set(key, relationships[key].kind));\n return fields;\n }\n get attributes() {\n let attrs = this.__store.getSchemaDefinitionService().attributesDefinitionFor({\n type: this.modelName\n });\n return mapFromHash(attrs);\n }\n get relationshipsByName() {\n let relationships = this.__store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type: this.modelName\n });\n return mapFromHash(relationships);\n }\n eachAttribute(callback, binding) {\n let attrDefs = this.__store.getSchemaDefinitionService().attributesDefinitionFor({\n type: this.modelName\n });\n Object.keys(attrDefs).forEach(key => {\n callback.call(binding, key, attrDefs[key]);\n });\n }\n eachRelationship(callback, binding) {\n let relationshipDefs = this.__store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type: this.modelName\n });\n Object.keys(relationshipDefs).forEach(key => {\n callback.call(binding, key, relationshipDefs[key]);\n });\n }\n eachTransformedAttribute(callback, binding) {\n let relationshipDefs = this.__store.getSchemaDefinitionService().relationshipsDefinitionFor({\n type: this.modelName\n });\n Object.keys(relationshipDefs).forEach(key => {\n if (relationshipDefs[key].type) {\n callback.call(binding, key, relationshipDefs[key]);\n }\n });\n }\n}","import ArrayProxy from '@ember/array/proxy';\nimport PromiseProxyMixin from '@ember/object/promise-proxy-mixin';\nimport ObjectProxy from '@ember/object/proxy';\nexport const PromiseArrayProxy = ArrayProxy.extend(PromiseProxyMixin);\nexport const PromiseObjectProxy = ObjectProxy.extend(PromiseProxyMixin);","var _dec, _class, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { deprecate } from '@ember/debug';\nimport { reads } from '@ember/object/computed';\nimport { resolve } from 'rsvp';\nimport { PromiseArrayProxy, PromiseObjectProxy } from './promise-proxy-base';\n\n/**\n @module @ember-data/store\n*/\n\n/**\n A `PromiseArray` is an object that acts like both an `Ember.Array`\n and a promise. When the promise is resolved the resulting value\n will be set to the `PromiseArray`'s `content` property. This makes\n it easy to create data bindings with the `PromiseArray` that will be\n updated when the promise resolves.\n\n This class should not be imported and instantiated directly.\n\n For more information see the [Ember.PromiseProxyMixin\n documentation](/ember/release/classes/PromiseProxyMixin).\n\n Example\n\n ```javascript\n let promiseArray = PromiseArray.create({\n promise: $.getJSON('/some/remote/data.json')\n });\n\n promiseArray.get('length'); // 0\n\n promiseArray.then(function() {\n promiseArray.get('length'); // 100\n });\n ```\n\n @class PromiseArray\n @public\n @extends Ember.ArrayProxy\n @uses Ember.PromiseProxyMixin\n*/\n\nexport let PromiseArray = (_dec = reads('content.meta'), _class = class PromiseArray extends PromiseArrayProxy {\n constructor(...args) {\n super(...args);\n _initializerDefineProperty(this, \"meta\", _descriptor, this);\n }\n}, _descriptor = _applyDecoratedDescriptor(_class.prototype, \"meta\", [_dec], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class);\n\n/**\n A `PromiseObject` is an object that acts like both an `EmberObject`\n and a promise. When the promise is resolved, then the resulting value\n will be set to the `PromiseObject`'s `content` property. This makes\n it easy to create data bindings with the `PromiseObject` that will\n be updated when the promise resolves.\n\n This class should not be imported and instantiated directly.\n\n For more information see the [Ember.PromiseProxyMixin\n documentation](/ember/release/classes/PromiseProxyMixin.html).\n\n Example\n\n ```javascript\n let promiseObject = PromiseObject.create({\n promise: $.getJSON('/some/remote/data.json')\n });\n\n promiseObject.get('name'); // null\n\n promiseObject.then(function() {\n promiseObject.get('name'); // 'Tomster'\n });\n ```\n\n @class PromiseObject\n @public\n @extends Ember.ObjectProxy\n @uses Ember.PromiseProxyMixin\n*/\nexport { PromiseObjectProxy as PromiseObject };\nexport function promiseObject(promise, label) {\n return PromiseObjectProxy.create({\n promise: resolve(promise, label)\n });\n}\nexport function promiseArray(promise, label) {\n return PromiseArray.create({\n promise: resolve(promise, label)\n });\n}\n\n// constructor is accessed in some internals but not including it in the copyright for the deprecation\nconst ALLOWABLE_METHODS = ['constructor', 'then', 'catch', 'finally'];\nexport function deprecatedPromiseObject(promise) {\n const promiseObjectProxy = promiseObject(promise);\n const handler = {\n get(target, prop, receiver) {\n if (!ALLOWABLE_METHODS.includes(prop)) {\n deprecate(`Accessing ${prop} is deprecated. The return type is being changed fomr PromiseObjectProxy to a Promise. The only available methods to access on this promise are .then, .catch and .finally`, false, {\n id: 'ember-data:model-save-promise',\n until: '5.0',\n for: '@ember-data/store',\n since: {\n available: '4.4',\n enabled: '4.4'\n }\n });\n }\n const value = Reflect.get(target, prop, receiver);\n if (value && typeof value === 'function' && typeof value.bind === 'function') {\n return value.bind(target);\n }\n return value;\n }\n };\n return new Proxy(promiseObjectProxy, handler);\n}","/**\n @module @ember-data/store\n*/\n\nimport { deprecate } from '@ember/debug';\n/**\n SnapshotRecordArray is not directly instantiable.\n Instances are provided to consuming application's\n adapters for certain requests.\n\n @class SnapshotRecordArray\n @public\n*/\nexport default class SnapshotRecordArray {\n /**\n SnapshotRecordArray is not directly instantiable.\n Instances are provided to consuming application's\n adapters and serializers for certain requests.\n @method constructor\n @private\n @constructor\n @param {RecordArray} recordArray\n @param {Object} meta\n @param options\n */\n constructor(recordArray, meta, options = {}) {\n /**\n An array of snapshots\n @private\n @property _snapshots\n @type {Array}\n */\n this._snapshots = null;\n\n /**\n An array of records\n @private\n @property _recordArray\n @type {Array}\n */\n this._recordArray = recordArray;\n\n /**\n Number of records in the array\n Example\n ```app/adapters/post.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n export default class PostAdapter extends JSONAPIAdapter {\n shouldReloadAll(store, snapshotRecordArray) {\n return !snapshotRecordArray.length;\n }\n });\n ```\n @property length\n @public\n @type {Number}\n */\n this.length = recordArray.get('length');\n\n /**\n Meta objects for the record array.\n Example\n ```app/adapters/post.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n export default class PostAdapter extends JSONAPIAdapter {\n shouldReloadAll(store, snapshotRecordArray) {\n let lastRequestTime = snapshotRecordArray.meta.lastRequestTime;\n let twentyMinutes = 20 * 60 * 1000;\n return Date.now() > lastRequestTime + twentyMinutes;\n }\n });\n ```\n @property meta\n @public\n @type {Object}\n */\n this.meta = meta;\n\n /**\n A hash of adapter options passed into the store method for this request.\n Example\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default class PostAdapter extends MyCustomAdapter {\n findAll(store, type, sinceToken, snapshotRecordArray) {\n if (snapshotRecordArray.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n }\n ```\n @property adapterOptions\n @public\n @type {Object}\n */\n this.adapterOptions = options.adapterOptions;\n\n /**\n The relationships to include for this request.\n Example\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n export default class ApplicationAdapter extends Adapter {\n findAll(store, type, snapshotRecordArray) {\n let url = `/${type.modelName}?include=${encodeURIComponent(snapshotRecordArray.include)}`;\n return fetch(url).then((response) => response.json())\n }\n }\n ```\n @property include\n @public\n @type {String|Array}\n */\n this.include = options.include;\n }\n\n /**\n The type of the underlying records for the snapshots in the array, as a Model\n @property type\n @deprecated\n @public\n @type {Model}\n */\n\n /**\n The modelName of the underlying records for the snapshots in the array, as a Model\n @property modelName\n @public\n @type {Model}\n */\n get modelName() {\n return this._recordArray.modelName;\n }\n\n /**\n Get snapshots of the underlying record array\n Example\n ```app/adapters/post.js\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n export default class PostAdapter extends JSONAPIAdapter {\n shouldReloadAll(store, snapshotArray) {\n let snapshots = snapshotArray.snapshots();\n return snapshots.any(function(ticketSnapshot) {\n let timeDiff = moment().diff(ticketSnapshot.attr('lastAccessedAt'), 'minutes');\n if (timeDiff > 20) {\n return true;\n } else {\n return false;\n }\n });\n }\n }\n ```\n @method snapshots\n @public\n @return {Array} Array of snapshots\n */\n snapshots() {\n if (this._snapshots !== null) {\n return this._snapshots;\n }\n this._snapshots = this._recordArray._takeSnapshot();\n return this._snapshots;\n }\n}\nif (true /* DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS */) {\n Object.defineProperty(SnapshotRecordArray.prototype, 'type', {\n get() {\n deprecate(`Using SnapshotRecordArray.type to access the ModelClass for a record is deprecated. Use store.modelFor() instead.`, false, {\n id: 'ember-data:deprecate-snapshot-model-class-access',\n until: '5.0',\n for: 'ember-data',\n since: {\n available: '4.5.0',\n enabled: '4.5.0'\n }\n });\n return this._recordArray.get('type');\n }\n });\n}","var _class, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\n/**\n @module @ember-data/store\n*/\n\nimport ArrayProxy from '@ember/array/proxy';\nimport { assert, deprecate } from '@ember/debug';\nimport { get, set } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { Promise } from 'rsvp';\nimport { promiseArray } from '../promise-proxies';\nimport SnapshotRecordArray from '../snapshot-record-array';\nfunction recordForIdentifier(store, identifier) {\n return store._instanceCache.getRecord(identifier);\n}\n/**\n A record array is an array that contains records of a certain modelName. The record\n array materializes records as needed when they are retrieved for the first\n time. You should not create record arrays yourself. Instead, an instance of\n `RecordArray` or its subclasses will be returned by your application's store\n in response to queries.\n\n This class should not be imported and instantiated by consuming applications.\n\n @class RecordArray\n @public\n @extends Ember.ArrayProxy\n*/\nlet RecordArray = (_class = class RecordArray extends ArrayProxy {\n constructor(...args) {\n super(...args);\n /**\n The array of client ids backing the record array. When a\n record is requested from the record array, the record\n for the client id at the same index is materialized, if\n necessary, by the store.\n @property content\n @private\n @type Ember.Array\n */\n /**\n The flag to signal a `RecordArray` is finished loading data.\n Example\n ```javascript\n let people = store.peekAll('person');\n people.get('isLoaded'); // true\n ```\n @property isLoaded\n @public\n @type Boolean\n */\n /**\n The store that created this record array.\n @property store\n @private\n @type Store\n */\n /**\n The flag to signal a `RecordArray` is currently loading data.\n Example\n ```javascript\n let people = store.peekAll('person');\n people.get('isUpdating'); // false\n people.update();\n people.get('isUpdating'); // true\n ```\n @property isUpdating\n @public\n @type Boolean\n */\n _initializerDefineProperty(this, \"isUpdating\", _descriptor, this);\n }\n init(props) {\n assert(`Cannot initialize RecordArray with isUpdating`, !props || !('isUpdating' in props));\n assert(`Cannot initialize RecordArray with isUpdating`, !props || !('_updatingPromise' in props));\n super.init();\n\n // TODO can we get rid of this?\n this.set('content', this.content || null);\n this._updatingPromise = null;\n }\n replace() {\n throw new Error(`The result of a server query (for all ${this.modelName} types) is immutable. To modify contents, use toArray()`);\n }\n\n /**\n The modelClass represented by this record array.\n @property type\n @public\n @deprecated\n @type {subclass of Model}\n */\n\n /**\n Retrieves an object from the content by index.\n @method objectAtContent\n @private\n @param {Number} index\n @return {Model} record\n */\n objectAtContent(index) {\n let identifier = get(this, 'content').objectAt(index);\n return identifier ? recordForIdentifier(this.store, identifier) : undefined;\n }\n\n /**\n Used to get the latest version of all of the records in this array\n from the adapter.\n Example\n ```javascript\n let people = store.peekAll('person');\n people.get('isUpdating'); // false\n people.update().then(function() {\n people.get('isUpdating'); // false\n });\n people.get('isUpdating'); // true\n ```\n @method update\n @public\n */\n update() {\n if (this.isUpdating) {\n return this._updatingPromise;\n }\n this.isUpdating = true;\n let updatingPromise = this._update();\n updatingPromise.finally(() => {\n this._updatingPromise = null;\n if (this.isDestroying || this.isDestroyed) {\n return;\n }\n this.isUpdating = false;\n });\n this._updatingPromise = updatingPromise;\n return updatingPromise;\n }\n\n /*\n Update this RecordArray and return a promise which resolves once the update\n is finished.\n */\n _update() {\n return this.store.findAll(this.modelName, {\n reload: true\n });\n }\n\n /**\n Saves all of the records in the `RecordArray`.\n Example\n ```javascript\n let messages = store.peekAll('message');\n messages.forEach(function(message) {\n message.set('hasBeenSeen', true);\n });\n messages.save();\n ```\n @method save\n @public\n @return {PromiseArray} promise\n */\n save() {\n let promiseLabel = `DS: RecordArray#save ${this.modelName}`;\n let promise = Promise.all(this.invoke('save'), promiseLabel).then(() => this, null, 'DS: RecordArray#save return RecordArray');\n return promiseArray(promise);\n }\n\n /**\n @method _unregisterFromManager\n @internal\n */\n _unregisterFromManager() {\n this.manager.unregisterRecordArray(this);\n }\n willDestroy() {\n this._unregisterFromManager();\n this._dissociateFromOwnRecords();\n // TODO: we should not do work during destroy:\n // * when objects are destroyed, they should simply be left to do\n // * if logic errors do to this, that logic needs to be more careful during\n // teardown (ember provides isDestroying/isDestroyed) for this reason\n // * the exception being: if an dominator has a reference to this object,\n // and must be informed to release e.g. e.g. removing itself from th\n // recordArrayMananger\n set(this, 'content', null);\n set(this, 'length', 0);\n super.willDestroy();\n }\n\n /**\n @method _createSnapshot\n @private\n */\n _createSnapshot(options) {\n // this is private for users, but public for ember-data internals\n // meta will only be present for an AdapterPopulatedRecordArray\n return new SnapshotRecordArray(this, null, options);\n }\n\n /**\n @method _dissociateFromOwnRecords\n @internal\n */\n _dissociateFromOwnRecords() {\n this.content.forEach(identifier => {\n let recordArrays = this.manager.getRecordArraysForIdentifier(identifier);\n if (recordArrays) {\n recordArrays.delete(this);\n }\n });\n }\n\n /**\n Adds identifiers to the `RecordArray` without duplicates\n @method _pushIdentifiers\n @internal\n @param {StableRecordIdentifier[]} identifiers\n */\n _pushIdentifiers(identifiers) {\n this.content.pushObjects(identifiers);\n }\n\n /**\n Removes identifiers from the `RecordArray`.\n @method _removeIdentifiers\n @internal\n @param {StableRecordIdentifier[]} identifiers\n */\n _removeIdentifiers(identifiers) {\n this.content.removeObjects(identifiers);\n }\n\n /**\n @method _takeSnapshot\n @internal\n */\n _takeSnapshot() {\n return this.content.map(identifier => this.store._instanceCache.createSnapshot(identifier));\n }\n}, _descriptor = _applyDecoratedDescriptor(_class.prototype, \"isUpdating\", [tracked], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function () {\n return false;\n }\n}), _class);\nexport { RecordArray as default };\nif (true /* DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS */) {\n Object.defineProperty(RecordArray.prototype, 'type', {\n get() {\n deprecate(`Using RecordArray.type to access the ModelClass for a record is deprecated. Use store.modelFor() instead.`, false, {\n id: 'ember-data:deprecate-snapshot-model-class-access',\n until: '5.0',\n for: 'ember-data',\n since: {\n available: '4.5.0',\n enabled: '4.5.0'\n }\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!this.modelName) {\n return null;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n return this.store.modelFor(this.modelName);\n }\n });\n}","import { assert } from '@ember/debug';\nimport { promiseArray } from '../promise-proxies';\nimport SnapshotRecordArray from '../snapshot-record-array';\nimport RecordArray from './record-array';\n/**\n @module @ember-data/store\n*/\n\n/**\n Represents an ordered list of records whose order and membership is\n determined by the adapter. For example, a query sent to the adapter\n may trigger a search on the server, whose results would be loaded\n into an instance of the `AdapterPopulatedRecordArray`.\n\n This class should not be imported and instantiated by consuming applications.\n\n ---\n\n If you want to update the array and get the latest records from the\n adapter, you can invoke [`update()`](AdapterPopulatedRecordArray/methods/update?anchor=update):\n\n Example\n\n ```javascript\n // GET /users?isAdmin=true\n store.query('user', { isAdmin: true }).then(function(admins) {\n\n admins.then(function() {\n console.log(admins.get(\"length\")); // 42\n });\n\n // somewhere later in the app code, when new admins have been created\n // in the meantime\n //\n // GET /users?isAdmin=true\n admins.update().then(function() {\n admins.get('isUpdating'); // false\n console.log(admins.get(\"length\")); // 123\n });\n\n admins.get('isUpdating'); // true\n }\n ```\n\n @class AdapterPopulatedRecordArray\n @public\n @extends RecordArray\n*/\nexport default class AdapterPopulatedRecordArray extends RecordArray {\n init(props) {\n assert(`Cannot initialize AdapterPopulatedRecordArray with isUpdating`, !props || !('isUpdating' in props));\n super.init();\n this.query = this.query || null;\n this.links = this.links || null;\n this.meta = this.meta || null;\n }\n replace() {\n throw new Error(`The result of a server query (on ${this.modelName}) is immutable.`);\n }\n _update() {\n const {\n store,\n query\n } = this;\n\n // TODO save options from initial request?\n return promiseArray(store.query(this.modelName, query, {\n _recordArray: this\n }));\n }\n _setObjects(identifiers, payload) {\n // TODO: initial load should not cause change events at all, only\n // subsequent. This requires changing the public api of adapter.query, but\n // hopefully we can do that soon.\n this.content.setObjects(identifiers);\n this.setProperties({\n isLoaded: true,\n isUpdating: false,\n // TODO this assign kills the root reference but a deep-copy would be required\n // for both meta and links to actually not be by-ref. We whould likely change\n // this to a dev-only deep-freeze.\n meta: Object.assign({}, payload.meta),\n links: Object.assign({}, payload.links)\n });\n this.manager._associateWithRecordArray(identifiers, this);\n }\n _createSnapshot(options) {\n // this is private for users, but public for ember-data internals\n // meta will only be present for an AdapterPopulatedRecordArray\n return new SnapshotRecordArray(this, this.meta, options);\n }\n\n /**\n @method _setIdentifiers\n @param {StableRecordIdentifier[]} identifiers\n @param {Object} payload normalized payload\n @private\n */\n _setIdentifiers(identifiers, payload) {\n this._setObjects(identifiers, payload);\n }\n}","/**\n @module @ember-data/store\n*/\n\nimport { A } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { set } from '@ember/object';\nimport { _backburner as emberBackburner } from '@ember/runloop';\nimport { DEBUG } from '@glimmer/env';\n\n// import isStableIdentifier from '../identifiers/is-stable-identifier';\n\nimport { internalModelFactoryFor } from './internal-model-factory';\nimport AdapterPopulatedRecordArray from './record-arrays/adapter-populated-record-array';\nimport RecordArray from './record-arrays/record-array';\nimport WeakCache from './weak-cache';\nconst RecordArraysCache = new WeakCache(DEBUG ? 'record-arrays' : '');\nRecordArraysCache._generator = () => new Set();\nexport function recordArraysForIdentifier(identifier) {\n return RecordArraysCache.lookup(identifier);\n}\nconst pendingForIdentifier = new Set([]);\nfunction getIdentifier(identifier) {\n // during dematerialization we will get an identifier that\n // has already been removed from the identifiers cache\n // so it will not behave as if stable. This is a bug we should fix.\n // if (!isStableIdentifier(identifierOrInternalModel)) {\n // console.log({ unstable: i });\n // }\n\n return identifier;\n}\nfunction shouldIncludeInRecordArrays(store, identifier) {\n const cache = internalModelFactoryFor(store);\n const internalModel = cache.peek(identifier);\n if (internalModel === null) {\n return false;\n }\n return !internalModel.isHiddenFromRecordArrays();\n}\n\n/**\n @class RecordArrayManager\n @internal\n*/\nclass RecordArrayManager {\n constructor(options) {\n this.store = options.store;\n this.isDestroying = false;\n this.isDestroyed = false;\n this._liveRecordArrays = Object.create(null);\n this._pendingIdentifiers = Object.create(null);\n this._adapterPopulatedRecordArrays = [];\n }\n\n /**\n * @method getRecordArraysForIdentifier\n * @internal\n * @param {StableIdentifier} param\n * @return {RecordArray} array\n */\n getRecordArraysForIdentifier(identifier) {\n return recordArraysForIdentifier(identifier);\n }\n _flushPendingIdentifiersForModelName(modelName, identifiers) {\n if (this.isDestroying || this.isDestroyed) {\n return;\n }\n let identifiersToRemove = [];\n for (let j = 0; j < identifiers.length; j++) {\n let i = identifiers[j];\n // mark identifiers, so they can once again be processed by the\n // recordArrayManager\n pendingForIdentifier.delete(i);\n // build up a set of models to ensure we have purged correctly;\n let isIncluded = shouldIncludeInRecordArrays(this.store, i);\n if (!isIncluded) {\n identifiersToRemove.push(i);\n }\n }\n let array = this._liveRecordArrays[modelName];\n if (array) {\n // TODO: skip if it only changed\n // process liveRecordArrays\n updateLiveRecordArray(this.store, array, identifiers);\n }\n\n // process adapterPopulatedRecordArrays\n if (identifiersToRemove.length > 0) {\n removeFromAdapterPopulatedRecordArrays(this.store, identifiersToRemove);\n }\n }\n _flush() {\n let pending = this._pendingIdentifiers;\n this._pendingIdentifiers = Object.create(null);\n for (let modelName in pending) {\n this._flushPendingIdentifiersForModelName(modelName, pending[modelName]);\n }\n }\n _syncLiveRecordArray(array, modelName) {\n assert(`recordArrayManger.syncLiveRecordArray expects modelName not modelClass as the second param`, typeof modelName === 'string');\n let pending = this._pendingIdentifiers[modelName];\n if (!Array.isArray(pending)) {\n return;\n }\n let hasNoPotentialDeletions = pending.length === 0;\n let map = internalModelFactoryFor(this.store).modelMapFor(modelName);\n let hasNoInsertionsOrRemovals = map.length === array.length;\n\n /*\n Ideally the recordArrayManager has knowledge of the changes to be applied to\n liveRecordArrays, and is capable of strategically flushing those changes and applying\n small diffs if desired. However, until we've refactored recordArrayManager, this dirty\n check prevents us from unnecessarily wiping out live record arrays returned by peekAll.\n */\n if (hasNoPotentialDeletions && hasNoInsertionsOrRemovals) {\n return;\n }\n this._flushPendingIdentifiersForModelName(modelName, pending);\n delete this._pendingIdentifiers[modelName];\n let identifiers = this._visibleIdentifiersByType(modelName);\n let identifiersToAdd = [];\n for (let i = 0; i < identifiers.length; i++) {\n let identifier = identifiers[i];\n let recordArrays = recordArraysForIdentifier(identifier);\n if (recordArrays.has(array) === false) {\n recordArrays.add(array);\n identifiersToAdd.push(identifier);\n }\n }\n if (identifiersToAdd.length) {\n array._pushIdentifiers(identifiersToAdd);\n }\n }\n _didUpdateAll(modelName) {\n let recordArray = this._liveRecordArrays[modelName];\n if (recordArray) {\n set(recordArray, 'isUpdating', false);\n // TODO potentially we should sync here, currently\n // this occurs as a side-effect of individual records updating\n // this._syncLiveRecordArray(recordArray, modelName);\n }\n }\n\n /**\n Get the `RecordArray` for a modelName, which contains all loaded records of\n given modelName.\n @method liveRecordArrayFor\n @internal\n @param {String} modelName\n @return {RecordArray}\n */\n liveRecordArrayFor(modelName) {\n assert(`recordArrayManger.liveRecordArrayFor expects modelName not modelClass as the param`, typeof modelName === 'string');\n let array = this._liveRecordArrays[modelName];\n if (array) {\n // if the array already exists, synchronize\n this._syncLiveRecordArray(array, modelName);\n } else {\n // if the array is being newly created merely create it with its initial\n // content already set. This prevents unneeded change events.\n let identifiers = this._visibleIdentifiersByType(modelName);\n array = this.createRecordArray(modelName, identifiers);\n this._liveRecordArrays[modelName] = array;\n }\n return array;\n }\n _visibleIdentifiersByType(modelName) {\n let all = internalModelFactoryFor(this.store).modelMapFor(modelName).recordIdentifiers;\n let visible = [];\n for (let i = 0; i < all.length; i++) {\n let identifier = all[i];\n let shouldInclude = shouldIncludeInRecordArrays(this.store, identifier);\n if (shouldInclude) {\n visible.push(identifier);\n }\n }\n return visible;\n }\n\n /**\n Create a `RecordArray` for a modelName.\n @method createRecordArray\n @internal\n @param {String} modelName\n @param {Array} [identifiers]\n @return {RecordArray}\n */\n createRecordArray(modelName, identifiers = []) {\n assert(`recordArrayManger.createRecordArray expects modelName not modelClass as the param`, typeof modelName === 'string');\n let array = RecordArray.create({\n modelName,\n content: A(identifiers || []),\n store: this.store,\n isLoaded: true,\n manager: this\n });\n if (Array.isArray(identifiers)) {\n this._associateWithRecordArray(identifiers, array);\n }\n return array;\n }\n\n /**\n Create a `AdapterPopulatedRecordArray` for a modelName with given query.\n @method createAdapterPopulatedRecordArray\n @internal\n @param {String} modelName\n @param {Object} query\n @return {AdapterPopulatedRecordArray}\n */\n createAdapterPopulatedRecordArray(modelName, query, identifiers, payload) {\n assert(`recordArrayManger.createAdapterPopulatedRecordArray expects modelName not modelClass as the first param, received ${modelName}`, typeof modelName === 'string');\n let array;\n if (Array.isArray(identifiers)) {\n array = AdapterPopulatedRecordArray.create({\n modelName,\n query: query,\n content: A(identifiers),\n store: this.store,\n manager: this,\n isLoaded: true,\n isUpdating: false,\n // TODO this assign kills the root reference but a deep-copy would be required\n // for both meta and links to actually not be by-ref. We whould likely change\n // this to a dev-only deep-freeze.\n meta: Object.assign({}, payload?.meta),\n links: Object.assign({}, payload?.links)\n });\n this._associateWithRecordArray(identifiers, array);\n } else {\n array = AdapterPopulatedRecordArray.create({\n modelName,\n query: query,\n content: A(),\n isLoaded: false,\n store: this.store,\n manager: this\n });\n }\n this._adapterPopulatedRecordArrays.push(array);\n return array;\n }\n\n /**\n Unregister a RecordArray.\n So manager will not update this array.\n @method unregisterRecordArray\n @internal\n @param {RecordArray} array\n */\n unregisterRecordArray(array) {\n let modelName = array.modelName;\n\n // remove from adapter populated record array\n let removedFromAdapterPopulated = removeFromArray(this._adapterPopulatedRecordArrays, array);\n if (!removedFromAdapterPopulated) {\n let liveRecordArrayForType = this._liveRecordArrays[modelName];\n // unregister live record array\n if (liveRecordArrayForType) {\n if (array === liveRecordArrayForType) {\n delete this._liveRecordArrays[modelName];\n }\n }\n }\n }\n\n /**\n * @method _associateWithRecordArray\n * @internal\n * @param {StableIdentifier} identifiers\n * @param {RecordArray} array\n */\n _associateWithRecordArray(identifiers, array) {\n for (let i = 0, l = identifiers.length; i < l; i++) {\n let identifier = identifiers[i];\n identifier = getIdentifier(identifier);\n let recordArrays = this.getRecordArraysForIdentifier(identifier);\n recordArrays.add(array);\n }\n }\n\n /**\n @method recordDidChange\n @internal\n */\n recordDidChange(identifier) {\n if (this.isDestroying || this.isDestroyed) {\n return;\n }\n let modelName = identifier.type;\n identifier = getIdentifier(identifier);\n if (pendingForIdentifier.has(identifier)) {\n return;\n }\n pendingForIdentifier.add(identifier);\n let pending = this._pendingIdentifiers;\n let models = pending[modelName] = pending[modelName] || [];\n if (models.push(identifier) !== 1) {\n return;\n }\n\n // TODO do we still need this schedule?\n // eslint-disable-next-line @typescript-eslint/unbound-method\n emberBackburner.schedule('actions', this, this._flush);\n }\n willDestroy() {\n Object.keys(this._liveRecordArrays).forEach(modelName => this._liveRecordArrays[modelName].destroy());\n this._adapterPopulatedRecordArrays.forEach(entry => entry.destroy());\n this.isDestroyed = true;\n }\n destroy() {\n this.isDestroying = true;\n // TODO do we still need this schedule?\n // eslint-disable-next-line @typescript-eslint/unbound-method\n emberBackburner.schedule('actions', this, this.willDestroy);\n }\n}\nfunction removeFromArray(array, item) {\n let index = array.indexOf(item);\n if (index !== -1) {\n array.splice(index, 1);\n return true;\n }\n return false;\n}\nfunction updateLiveRecordArray(store, recordArray, identifiers) {\n let identifiersToAdd = [];\n let identifiersToRemove = [];\n for (let i = 0; i < identifiers.length; i++) {\n let identifier = identifiers[i];\n let shouldInclude = shouldIncludeInRecordArrays(store, identifier);\n let recordArrays = recordArraysForIdentifier(identifier);\n if (shouldInclude) {\n if (!recordArrays.has(recordArray)) {\n identifiersToAdd.push(identifier);\n recordArrays.add(recordArray);\n }\n }\n if (!shouldInclude) {\n identifiersToRemove.push(identifier);\n recordArrays.delete(recordArray);\n }\n }\n if (identifiersToAdd.length > 0) {\n recordArray._pushIdentifiers(identifiersToAdd);\n }\n if (identifiersToRemove.length > 0) {\n recordArray._removeIdentifiers(identifiersToRemove);\n }\n}\nfunction removeFromAdapterPopulatedRecordArrays(store, identifiers) {\n for (let i = 0; i < identifiers.length; i++) {\n removeFromAll(store, identifiers[i]);\n }\n}\nfunction removeFromAll(store, identifier) {\n identifier = getIdentifier(identifier);\n const recordArrays = recordArraysForIdentifier(identifier);\n recordArrays.forEach(function (recordArray) {\n recordArray._removeIdentifiers([identifier]);\n });\n recordArrays.clear();\n}\nexport default RecordArrayManager;","import { getOwner } from '@ember/application';\nimport { deprecate } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { importSync } from '@embroider/macros';\nimport normalizeModelName from './normalize-model-name';\nlet _modelForMixin;\nif (true /* HAS_MODEL_PACKAGE */) {\n let _found;\n _modelForMixin = function () {\n if (!_found) {\n _found = importSync('@ember-data/model/-private')._modelForMixin;\n }\n return _found(...arguments);\n };\n}\nexport class DSModelSchemaDefinitionService {\n constructor(store) {\n this._relationshipsDefCache = Object.create(null);\n this._attributesDefCache = Object.create(null);\n this.store = store;\n }\n\n // Following the existing RD implementation\n attributesDefinitionFor(identifier) {\n let modelName, attributes;\n if (true /* DEPRECATE_STRING_ARG_SCHEMAS */ && typeof identifier === 'string') {\n deprecate(`attributesDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`, false, {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: {\n enabled: '4.5',\n available: '4.5'\n }\n });\n modelName = identifier;\n } else {\n modelName = identifier.type;\n }\n attributes = this._attributesDefCache[modelName];\n if (attributes === undefined) {\n let modelClass = this.store.modelFor(modelName);\n let attributeMap = get(modelClass, 'attributes');\n attributes = Object.create(null);\n attributeMap.forEach((meta, name) => attributes[name] = meta);\n this._attributesDefCache[modelName] = attributes;\n }\n return attributes;\n }\n\n // Following the existing RD implementation\n relationshipsDefinitionFor(identifier) {\n let modelName, relationships;\n if (true /* DEPRECATE_STRING_ARG_SCHEMAS */ && typeof identifier === 'string') {\n deprecate(`relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`, false, {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: {\n enabled: '4.5',\n available: '4.5'\n }\n });\n modelName = identifier;\n } else {\n modelName = identifier.type;\n }\n relationships = this._relationshipsDefCache[modelName];\n if (relationships === undefined) {\n let modelClass = this.store.modelFor(modelName);\n relationships = get(modelClass, 'relationshipsObject') || null;\n this._relationshipsDefCache[modelName] = relationships;\n }\n return relationships;\n }\n doesTypeExist(modelName) {\n let normalizedModelName = normalizeModelName(modelName);\n let factory = getModelFactory(this.store, this.store._modelFactoryCache, normalizedModelName);\n return factory !== null;\n }\n}\nexport function getModelFactory(store, cache, normalizedModelName) {\n let factory = cache[normalizedModelName];\n if (!factory) {\n let owner = getOwner(store);\n factory = owner.factoryFor(`model:${normalizedModelName}`);\n if (!factory && true /* HAS_MODEL_PACKAGE */) {\n //Support looking up mixins as base types for polymorphic relationships\n factory = _modelForMixin(store, normalizedModelName);\n }\n if (!factory) {\n // we don't cache misses in case someone wants to register a missing model\n return null;\n }\n let klass = factory.class;\n if (klass.isModel) {\n let hasOwnModelNameSet = klass.modelName && Object.prototype.hasOwnProperty.call(klass, 'modelName');\n if (!hasOwnModelNameSet) {\n Object.defineProperty(klass, 'modelName', {\n value: normalizedModelName\n });\n }\n }\n cache[normalizedModelName] = factory;\n }\n return factory;\n}","/**\n @module @ember-data/store\n */\nimport { getOwner, setOwner } from '@ember/application';\nimport { assert, deprecate } from '@ember/debug';\nimport { _backburner as emberBackburner } from '@ember/runloop';\nimport Service from '@ember/service';\nimport { registerWaiter, unregisterWaiter } from '@ember/test';\nimport { DEBUG } from '@glimmer/env';\nimport { importSync } from '@embroider/macros';\nimport { reject, resolve } from 'rsvp';\nimport edBackburner from './backburner';\nimport coerceId, { ensureStringId } from './coerce-id';\nimport FetchManager, { SaveOp } from './fetch-manager';\nimport { _findAll, _query, _queryRecord } from './finders';\nimport { IdentifierCache } from './identifier-cache';\nimport { InstanceCache, storeFor, StoreMap } from './instance-cache';\nimport { internalModelFactoryFor, peekRecordIdentifier, recordIdentifierFor, setRecordIdentifier } from './internal-model-factory';\nimport { getShimClass } from './model/shim-model-class';\nimport normalizeModelName from './normalize-model-name';\nimport { promiseArray, promiseObject } from './promise-proxies';\nimport RecordArrayManager from './record-array-manager';\nimport { setRecordDataFor } from './record-data-for';\nimport NotificationManager from './record-notification-manager';\nimport { DSModelSchemaDefinitionService, getModelFactory } from './schema-definition-service';\nimport constructResource from './utils/construct-resource';\nimport promiseRecord from './utils/promise-record';\nexport { storeFor };\nlet _RecordData;\nfunction freeze(obj) {\n if (typeof Object.freeze === 'function') {\n return Object.freeze(obj);\n }\n return obj;\n}\n/**\n The store contains all of the data for records loaded from the server.\n It is also responsible for creating instances of `Model` that wrap\n the individual data for a record, so that they can be bound to in your\n Handlebars templates.\n\n Define your application's store like this:\n\n ```app/services/store.js\n import Store from '@ember-data/store';\n\n export default class MyStore extends Store {}\n ```\n\n Most Ember.js applications will only have a single `Store` that is\n automatically created by their `Ember.Application`.\n\n You can retrieve models from the store in several ways. To retrieve a record\n for a specific id, use `Store`'s `findRecord()` method:\n\n ```javascript\n store.findRecord('person', 123).then(function (person) {\n });\n ```\n\n By default, the store will talk to your backend using a standard\n REST mechanism. You can customize how the store talks to your\n backend by specifying a custom adapter:\n\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n\n export default class ApplicationAdapter extends Adapter {\n }\n ```\n\n You can learn more about writing a custom adapter by reading the `Adapter`\n documentation.\n\n ### Store createRecord() vs. push() vs. pushPayload()\n\n The store provides multiple ways to create new record objects. They have\n some subtle differences in their use which are detailed below:\n\n [createRecord](../methods/createRecord?anchor=createRecord) is used for creating new\n records on the client side. This will return a new record in the\n `created.uncommitted` state. In order to persist this record to the\n backend, you will need to call `record.save()`.\n\n [push](../methods/push?anchor=push) is used to notify Ember Data's store of new or\n updated records that exist in the backend. This will return a record\n in the `loaded.saved` state. The primary use-case for `store#push` is\n to notify Ember Data about record updates (full or partial) that happen\n outside of the normal adapter methods (for example\n [SSE](http://dev.w3.org/html5/eventsource/) or [Web\n Sockets](http://www.w3.org/TR/2009/WD-websockets-20091222/)).\n\n [pushPayload](../methods/pushPayload?anchor=pushPayload) is a convenience wrapper for\n `store#push` that will deserialize payloads if the\n Serializer implements a `pushPayload` method.\n\n Note: When creating a new record using any of the above methods\n Ember Data will update `RecordArray`s such as those returned by\n `store#peekAll()` or `store#findAll()`. This means any\n data bindings or computed properties that depend on the RecordArray\n will automatically be synced to include the new or updated record\n values.\n\n @main @ember-data/store\n @class Store\n @public\n @extends Ember.Service\n*/\n\nclass Store extends Service {\n /**\n * Ember Data uses several specialized micro-queues for organizing\n and coalescing similar async work.\n These queues are currently controlled by a flush scheduled into\n ember-data's custom backburner instance.\n *\n * EmberData specific backburner instance\n * @property _backburner\n * @private\n */\n\n // DEBUG-only properties\n\n /**\n @method init\n @private\n */\n constructor() {\n super(...arguments);\n\n /**\n * Provides access to the IdentifierCache instance\n * for this store.\n *\n * The IdentifierCache can be used to generate or\n * retrieve a stable unique identifier for any resource.\n *\n * @property {IdentifierCache} identifierCache\n * @public\n */\n this.identifierCache = new IdentifierCache();\n\n // private but maybe useful to be here, somewhat intimate\n this.recordArrayManager = new RecordArrayManager({\n store: this\n });\n\n // private, TODO consider taking public as the instance is public to instantiateRecord anyway\n this._notificationManager = new NotificationManager(this);\n\n // private\n this._fetchManager = new FetchManager(this);\n this._instanceCache = new InstanceCache(this);\n this._adapterCache = Object.create(null);\n this._serializerCache = Object.create(null);\n this._modelFactoryCache = Object.create(null);\n\n // private\n // TODO we should find a path to something simpler than backburner\n this._backburner = edBackburner;\n if (DEBUG) {\n if (this.generateStackTracesForTrackedRequests === undefined) {\n this.generateStackTracesForTrackedRequests = false;\n }\n this._trackedAsyncRequests = [];\n this._trackAsyncRequestStart = label => {\n let trace = 'set `store.generateStackTracesForTrackedRequests = true;` to get a detailed trace for where this request originated';\n if (this.generateStackTracesForTrackedRequests) {\n try {\n throw new Error(`EmberData TrackedRequest: ${label}`);\n } catch (e) {\n trace = e;\n }\n }\n let token = freeze({\n label,\n trace\n });\n this._trackedAsyncRequests.push(token);\n return token;\n };\n this._trackAsyncRequestEnd = token => {\n let index = this._trackedAsyncRequests.indexOf(token);\n if (index === -1) {\n throw new Error(`Attempted to end tracking for the following request but it was not being tracked:\\n${token}`);\n }\n this._trackedAsyncRequests.splice(index, 1);\n };\n this.__asyncWaiter = () => {\n let tracked = this._trackedAsyncRequests;\n return tracked.length === 0;\n };\n registerWaiter(this.__asyncWaiter);\n }\n }\n getRequestStateService() {\n return this._fetchManager.requestCache;\n }\n instantiateRecord(identifier, createRecordArgs, recordDataFor, notificationManager) {\n if (true /* HAS_MODEL_PACKAGE */) {\n let modelName = identifier.type;\n let store = this;\n let internalModel = this._instanceCache._internalModelForResource(identifier);\n let createOptions = {\n _internalModel: internalModel,\n // TODO deprecate allowing unknown args setting\n _createProps: createRecordArgs,\n // TODO @deprecate consider deprecating accessing record properties during init which the below is necessary for\n _secretInit: record => {\n setRecordIdentifier(record, identifier);\n StoreMap.set(record, store);\n setRecordDataFor(record, internalModel._recordData);\n },\n container: null // necessary hack for setOwner?\n };\n\n // ensure that `getOwner(this)` works inside a model instance\n setOwner(createOptions, getOwner(this));\n delete createOptions.container;\n // TODO this needs to not use the private property here to get modelFactoryCache so as to not break interop\n return getModelFactory(this, this._modelFactoryCache, modelName).create(createOptions);\n }\n assert(`You must implement the store's instantiateRecord hook for your custom model class.`);\n }\n teardownRecord(record) {\n if (true /* HAS_MODEL_PACKAGE */) {\n assert(`expected to receive an instance of DSModel. If using a custom model make sure you implement teardownRecord`, 'destroy' in record);\n record.destroy();\n } else {\n assert(`You must implement the store's teardownRecord hook for your custom models`);\n }\n }\n getSchemaDefinitionService() {\n if (true /* HAS_MODEL_PACKAGE */ && !this._schemaDefinitionService) {\n this._schemaDefinitionService = new DSModelSchemaDefinitionService(this);\n }\n assert(`You must registerSchemaDefinitionService with the store to use custom model classes`, this._schemaDefinitionService);\n return this._schemaDefinitionService;\n }\n registerSchemaDefinitionService(schema) {\n this._schemaDefinitionService = schema;\n }\n\n /**\n Returns the schema for a particular `modelName`.\n When used with Model from @ember-data/model the return is the model class,\n but this is not guaranteed.\n The class of a model might be useful if you want to get a list of all the\n relationship names of the model, see\n [`relationshipNames`](/ember-data/release/classes/Model?anchor=relationshipNames)\n for example.\n @method modelFor\n @public\n @param {String} modelName\n @return {subclass of Model | ShimModelClass}\n */\n // TODO @deprecate in favor of schema APIs, requires adapter/serializer overhaul or replacement\n modelFor(modelName) {\n if (DEBUG) {\n assertDestroyedStoreOnly(this, 'modelFor');\n }\n assert(`You need to pass a model name to the store's modelFor method`, modelName);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n if (true /* HAS_MODEL_PACKAGE */) {\n let normalizedModelName = normalizeModelName(modelName);\n // TODO this is safe only because\n // apps would be horribly broken if the schema service were using DS_MODEL but not using DS_MODEL's schema service.\n // it is potentially a mistake for the RFC to have not enabled chaining these services, though highlander rule is nice.\n // what ember-m3 did via private API to allow both worlds to interop would be much much harder using this.\n let maybeFactory = getModelFactory(this, this._modelFactoryCache, normalizedModelName);\n\n // for factorFor factory/class split\n let klass = maybeFactory && maybeFactory.class ? maybeFactory.class : maybeFactory;\n if (!klass || !klass.isModel) {\n assert(`No model was found for '${modelName}' and no schema handles the type`, this.getSchemaDefinitionService().doesTypeExist(modelName));\n return getShimClass(this, modelName);\n } else {\n // TODO @deprecate ever returning the klass, always return the shim\n return klass;\n }\n }\n assert(`No model was found for '${modelName}' and no schema handles the type`, this.getSchemaDefinitionService().doesTypeExist(modelName));\n return getShimClass(this, modelName);\n }\n\n /**\n Create a new record in the current store. The properties passed\n to this method are set on the newly created record.\n To create a new instance of a `Post`:\n ```js\n store.createRecord('post', {\n title: 'Ember is awesome!'\n });\n ```\n To create a new instance of a `Post` that has a relationship with a `User` record:\n ```js\n let user = this.store.peekRecord('user', 1);\n store.createRecord('post', {\n title: 'Ember is awesome!',\n user: user\n });\n ```\n @method createRecord\n @public\n @param {String} modelName\n @param {Object} inputProperties a hash of properties to set on the\n newly created record.\n @return {Model} record\n */\n createRecord(modelName, inputProperties) {\n if (DEBUG) {\n assertDestroyingStore(this, 'createRecord');\n }\n assert(`You need to pass a model name to the store's createRecord method`, modelName);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n\n // This is wrapped in a `run.join` so that in test environments users do not need to manually wrap\n // calls to `createRecord`. The run loop usage here is because we batch the joining and updating\n // of record-arrays via ember's run loop, not our own.\n //\n // to remove this, we would need to move to a new `async` API.\n return emberBackburner.join(() => {\n return this._backburner.join(() => {\n let normalizedModelName = normalizeModelName(modelName);\n let properties = {\n ...inputProperties\n };\n\n // If the passed properties do not include a primary key,\n // give the adapter an opportunity to generate one. Typically,\n // client-side ID generators will use something like uuid.js\n // to avoid conflicts.\n\n if (properties.id === null || properties.id === undefined) {\n let adapter = this.adapterFor(modelName);\n if (adapter && adapter.generateIdForRecord) {\n properties.id = adapter.generateIdForRecord(this, modelName, properties);\n } else {\n properties.id = null;\n }\n }\n\n // Coerce ID to a string\n properties.id = coerceId(properties.id);\n const factory = internalModelFactoryFor(this);\n const internalModel = factory.build({\n type: normalizedModelName,\n id: properties.id\n });\n const {\n identifier\n } = internalModel;\n this._instanceCache.getRecordData(identifier).clientDidCreate();\n this.recordArrayManager.recordDidChange(identifier);\n return this._instanceCache.getRecord(identifier, properties);\n });\n });\n }\n\n /**\n For symmetry, a record can be deleted via the store.\n Example\n ```javascript\n let post = store.createRecord('post', {\n title: 'Ember is awesome!'\n });\n store.deleteRecord(post);\n ```\n @method deleteRecord\n @public\n @param {Model} record\n */\n deleteRecord(record) {\n if (DEBUG) {\n assertDestroyingStore(this, 'deleteRecord');\n }\n this._backburner.join(() => {\n let identifier = peekRecordIdentifier(record);\n if (identifier) {\n let internalModel = internalModelFactoryFor(this).peek(identifier);\n if (internalModel) {\n internalModel.deleteRecord();\n }\n }\n });\n }\n\n /**\n For symmetry, a record can be unloaded via the store.\n This will cause the record to be destroyed and freed up for garbage collection.\n Example\n ```javascript\n store.findRecord('post', 1).then(function(post) {\n store.unloadRecord(post);\n });\n ```\n @method unloadRecord\n @public\n @param {Model} record\n */\n unloadRecord(record) {\n if (DEBUG) {\n assertDestroyingStore(this, 'unloadRecord');\n }\n let identifier = peekRecordIdentifier(record);\n if (identifier) {\n let internalModel = internalModelFactoryFor(this).peek(identifier);\n if (internalModel) {\n internalModel.unloadRecord();\n }\n }\n }\n\n /**\n @method find\n @param {String} modelName\n @param {String|Integer} id\n @param {Object} options\n @return {Promise} promise\n @deprecated\n @private\n */\n find(modelName, id, options) {\n if (DEBUG) {\n assertDestroyingStore(this, 'find');\n }\n // The default `model` hook in Route calls `find(modelName, id)`,\n // that's why we have to keep this method around even though `findRecord` is\n // the public way to get a record by modelName and id.\n assert(`Using store.find(type) has been removed. Use store.findAll(modelName) to retrieve all records for a given type.`, arguments.length !== 1);\n assert(`Calling store.find(modelName, id, { preload: preload }) is no longer supported. Use store.findRecord(modelName, id, { preload: preload }) instead.`, !options);\n assert(`You need to pass the model name and id to the store's find method`, arguments.length === 2);\n assert(`You cannot pass '${id}' as id to the store's find method`, typeof id === 'string' || typeof id === 'number');\n assert(`Calling store.find() with a query object is no longer supported. Use store.query() instead.`, typeof id !== 'object');\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n if (true /* DEPRECATE_STORE_FIND */) {\n deprecate(`Using store.find is deprecated, use store.findRecord instead. Likely this means you are relying on the implicit store fetching behavior of routes unknowingly.`, false, {\n id: 'ember-data:deprecate-store-find',\n since: {\n available: '4.5',\n enabled: '4.5'\n },\n for: 'ember-data',\n until: '5.0'\n });\n return this.findRecord(modelName, id);\n }\n assert(`store.find has been removed. Use store.findRecord instead.`);\n }\n\n /**\n This method returns a record for a given identifier or type and id combination.\n The `findRecord` method will always resolve its promise with the same\n object for a given identifier or type and `id`.\n The `findRecord` method will always return a **promise** that will be\n resolved with the record.\n **Example 1**\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default class PostRoute extends Route {\n model({ post_id }) {\n return this.store.findRecord('post', post_id);\n }\n }\n ```\n **Example 2**\n `findRecord` can be called with a single identifier argument instead of the combination\n of `type` (modelName) and `id` as separate arguments. You may recognize this combo as\n the typical pairing from [JSON:API](https://jsonapi.org/format/#document-resource-object-identification)\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default class PostRoute extends Route {\n model({ post_id: id }) {\n return this.store.findRecord({ type: 'post', id });\n }\n }\n ```\n **Example 3**\n If you have previously received an lid via an Identifier for this record, and the record\n has already been assigned an id, you can find the record again using just the lid.\n ```app/routes/post.js\n store.findRecord({ lid });\n ```\n If the record is not yet available, the store will ask the adapter's `findRecord`\n method to retrieve and supply the necessary data. If the record is already present\n in the store, it depends on the reload behavior _when_ the returned promise\n resolves.\n ### Preloading\n You can optionally `preload` specific attributes and relationships that you know of\n by passing them via the passed `options`.\n For example, if your Ember route looks like `/posts/1/comments/2` and your API route\n for the comment also looks like `/posts/1/comments/2` if you want to fetch the comment\n without also fetching the post you can pass in the post to the `findRecord` call:\n ```app/routes/post-comments.js\n import Route from '@ember/routing/route';\n export default class PostRoute extends Route {\n model({ post_id, comment_id: id }) {\n return this.store.findRecord({ type: 'comment', id, { preload: { post: post_id }} });\n }\n }\n ```\n In your adapter you can then access this id without triggering a network request via the\n snapshot:\n ```app/adapters/application.js\n import EmberObject from '@ember/object';\n export default class Adapter extends EmberObject {\n findRecord(store, schema, id, snapshot) {\n let type = schema.modelName;\n if (type === 'comment')\n let postId = snapshot.belongsTo('post', { id: true });\n return fetch(`./posts/${postId}/comments/${id}`)\n .then(response => response.json())\n }\n }\n }\n ```\n This could also be achieved by supplying the post id to the adapter via the adapterOptions\n property on the options hash.\n ```app/routes/post-comments.js\n import Route from '@ember/routing/route';\n export default class PostRoute extends Route {\n model({ post_id, comment_id: id }) {\n return this.store.findRecord({ type: 'comment', id, { adapterOptions: { post: post_id }} });\n }\n }\n ```\n ```app/adapters/application.js\n import EmberObject from '@ember/object';\n export default class Adapter extends EmberObject {\n findRecord(store, schema, id, snapshot) {\n let type = schema.modelName;\n if (type === 'comment')\n let postId = snapshot.adapterOptions.post;\n return fetch(`./posts/${postId}/comments/${id}`)\n .then(response => response.json())\n }\n }\n }\n ```\n If you have access to the post model you can also pass the model itself to preload:\n ```javascript\n let post = await store.findRecord('post', 1);\n let comment = await store.findRecord('comment', 2, { post: myPostModel });\n ```\n ### Reloading\n The reload behavior is configured either via the passed `options` hash or\n the result of the adapter's `shouldReloadRecord`.\n If `{ reload: true }` is passed or `adapter.shouldReloadRecord` evaluates\n to `true`, then the returned promise resolves once the adapter returns\n data, regardless if the requested record is already in the store:\n ```js\n store.push({\n data: {\n id: 1,\n type: 'post',\n revision: 1\n }\n });\n // adapter#findRecord resolves with\n // [\n // {\n // id: 1,\n // type: 'post',\n // revision: 2\n // }\n // ]\n store.findRecord('post', 1, { reload: true }).then(function(post) {\n post.get('revision'); // 2\n });\n ```\n If no reload is indicated via the above mentioned ways, then the promise\n immediately resolves with the cached version in the store.\n ### Background Reloading\n Optionally, if `adapter.shouldBackgroundReloadRecord` evaluates to `true`,\n then a background reload is started, which updates the records' data, once\n it is available:\n ```js\n // app/adapters/post.js\n import ApplicationAdapter from \"./application\";\n export default class PostAdapter extends ApplicationAdapter {\n shouldReloadRecord(store, snapshot) {\n return false;\n },\n shouldBackgroundReloadRecord(store, snapshot) {\n return true;\n }\n });\n // ...\n store.push({\n data: {\n id: 1,\n type: 'post',\n revision: 1\n }\n });\n let blogPost = store.findRecord('post', 1).then(function(post) {\n post.get('revision'); // 1\n });\n // later, once adapter#findRecord resolved with\n // [\n // {\n // id: 1,\n // type: 'post',\n // revision: 2\n // }\n // ]\n blogPost.get('revision'); // 2\n ```\n If you would like to force or prevent background reloading, you can set a\n boolean value for `backgroundReload` in the options object for\n `findRecord`.\n ```app/routes/post/edit.js\n import Route from '@ember/routing/route';\n export default class PostEditRoute extends Route {\n model(params) {\n return this.store.findRecord('post', params.post_id, { backgroundReload: false });\n }\n }\n ```\n If you pass an object on the `adapterOptions` property of the options\n argument it will be passed to your adapter via the snapshot\n ```app/routes/post/edit.js\n import Route from '@ember/routing/route';\n export default class PostEditRoute extends Route {\n model(params) {\n return this.store.findRecord('post', params.post_id, {\n adapterOptions: { subscribe: false }\n });\n }\n }\n ```\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default class PostAdapter extends MyCustomAdapter {\n findRecord(store, type, id, snapshot) {\n if (snapshot.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n }\n ```\n See [peekRecord](../methods/peekRecord?anchor=peekRecord) to get the cached version of a record.\n ### Retrieving Related Model Records\n If you use an adapter such as Ember's default\n [`JSONAPIAdapter`](/ember-data/release/classes/JSONAPIAdapter)\n that supports the [JSON API specification](http://jsonapi.org/) and if your server\n endpoint supports the use of an\n ['include' query parameter](http://jsonapi.org/format/#fetching-includes),\n you can use `findRecord()` or `findAll()` to automatically retrieve additional records related to\n the one you request by supplying an `include` parameter in the `options` object.\n For example, given a `post` model that has a `hasMany` relationship with a `comment`\n model, when we retrieve a specific post we can have the server also return that post's\n comments in the same request:\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default class PostRoute extends Route {\n model(params) {\n return this.store.findRecord('post', params.post_id, { include: 'comments' });\n }\n }\n ```\n ```app/adapters/application.js\n import EmberObject from '@ember/object';\n export default class Adapter extends EmberObject {\n findRecord(store, schema, id, snapshot) {\n let type = schema.modelName;\n if (type === 'post')\n let includes = snapshot.adapterOptions.include;\n return fetch(`./posts/${postId}?include=${includes}`)\n .then(response => response.json())\n }\n }\n }\n ```\n In this case, the post's comments would then be available in your template as\n `model.comments`.\n Multiple relationships can be requested using an `include` parameter consisting of a\n comma-separated list (without white-space) while nested relationships can be specified\n using a dot-separated sequence of relationship names. So to request both the post's\n comments and the authors of those comments the request would look like this:\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default class PostRoute extends Route {\n model(params) {\n return this.store.findRecord('post', params.post_id, { include: 'comments,comments.author' });\n }\n }\n ```\n ### Retrieving Specific Fields by Type\n If your server endpoint supports the use of a ['fields' query parameter](https://jsonapi.org/format/#fetching-sparse-fieldsets),\n you can use pass those fields through to your server. At this point in time, this requires a few manual steps on your part.\n 1. Implement `buildQuery` in your adapter.\n ```app/adapters/application.js\n buildQuery(snapshot) {\n let query = super.buildQuery(...arguments);\n let { fields } = snapshot.adapterOptions;\n if (fields) {\n query.fields = fields;\n }\n return query;\n }\n ```\n 2. Then pass through the applicable fields to your `findRecord` request.\n Given a `post` model with attributes body, title, publishDate and meta, you can retrieve a filtered list of attributes.\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findRecord('post', params.post_id, { adapterOptions: { fields: { post: 'body,title' } });\n }\n });\n ```\n Moreover, you can filter attributes on related models as well. If a `post` has a `belongsTo` relationship to a user,\n just include the relationship key and attributes.\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findRecord('post', params.post_id, { adapterOptions: { fields: { post: 'body,title', user: 'name,email' } });\n }\n });\n ```\n @since 1.13.0\n @method findRecord\n @public\n @param {String|object} modelName - either a string representing the modelName or a ResourceIdentifier object containing both the type (a string) and the id (a string) for the record or an lid (a string) of an existing record\n @param {(String|Integer|Object)} id - optional object with options for the request only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved\n @param {Object} [options] - if the first param is a string this will be the optional options for the request. See examples for available options.\n @return {Promise} promise\n */\n\n findRecord(resource, id, options) {\n if (DEBUG) {\n assertDestroyingStore(this, 'findRecord');\n }\n assert(`You need to pass a modelName or resource identifier as the first argument to the store's findRecord method`, resource);\n if (isMaybeIdentifier(resource)) {\n options = id;\n } else {\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${resource}`, typeof resource === 'string');\n const type = normalizeModelName(resource);\n const normalizedId = ensureStringId(id);\n resource = constructResource(type, normalizedId);\n }\n const internalModel = internalModelFactoryFor(this).lookup(resource);\n const {\n identifier\n } = internalModel;\n let promise;\n options = options || {};\n\n // if not loaded start loading\n if (!internalModel.isLoaded) {\n promise = this._instanceCache._fetchDataIfNeededForIdentifier(identifier, options);\n\n // Refetch if the reload option is passed\n } else if (options.reload) {\n assertIdentifierHasId(identifier);\n promise = this._fetchManager.scheduleFetch(identifier, options);\n } else {\n let snapshot = this._instanceCache.createSnapshot(identifier, options);\n let adapter = this.adapterFor(identifier.type);\n\n // Refetch the record if the adapter thinks the record is stale\n if (typeof options.reload === 'undefined' && adapter.shouldReloadRecord && adapter.shouldReloadRecord(this, snapshot)) {\n assertIdentifierHasId(identifier);\n promise = this._fetchManager.scheduleFetch(identifier, options);\n } else {\n // Trigger the background refetch if backgroundReload option is passed\n if (options.backgroundReload !== false && (options.backgroundReload || !adapter.shouldBackgroundReloadRecord || adapter.shouldBackgroundReloadRecord(this, snapshot))) {\n assertIdentifierHasId(identifier);\n this._fetchManager.scheduleFetch(identifier, options);\n }\n\n // Return the cached record\n promise = resolve(identifier);\n }\n }\n return promiseRecord(this, promise, `DS: Store#findRecord ${identifier}`);\n }\n\n /**\n Get the reference for the specified record.\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n // check if the user is loaded\n let isLoaded = userRef.value() !== null;\n // get the record of the reference (null if not yet available)\n let user = userRef.value();\n // get the identifier of the reference\n if (userRef.remoteType() === 'id') {\n let id = userRef.id();\n }\n // load user (via store.find)\n userRef.load().then(...)\n // or trigger a reload\n userRef.reload().then(...)\n // provide data for reference\n userRef.push({ id: 1, username: '@user' }).then(function(user) {\n userRef.value() === user;\n });\n ```\n @method getReference\n @public\n @param {String|object} resource - modelName (string) or Identifier (object)\n @param {String|Integer} id\n @since 2.5.0\n @return {RecordReference}\n */\n // TODO @deprecate getReference (and references generally)\n getReference(resource, id) {\n if (DEBUG) {\n assertDestroyingStore(this, 'getReference');\n }\n let resourceIdentifier;\n if (arguments.length === 1 && isMaybeIdentifier(resource)) {\n resourceIdentifier = resource;\n } else {\n const type = normalizeModelName(resource);\n const normalizedId = ensureStringId(id);\n resourceIdentifier = constructResource(type, normalizedId);\n }\n assert('getReference expected to receive either a resource identifier or type and id as arguments', isMaybeIdentifier(resourceIdentifier));\n let identifier = this.identifierCache.getOrCreateRecordIdentifier(resourceIdentifier);\n return this._instanceCache.getReference(identifier);\n }\n\n /**\n Get a record by a given type and ID without triggering a fetch.\n This method will synchronously return the record if it is available in the store,\n otherwise it will return `null`. A record is available if it has been fetched earlier, or\n pushed manually into the store.\n See [findRecord](../methods/findRecord?anchor=findRecord) if you would like to request this record from the backend.\n _Note: This is a synchronous method and does not return a promise._\n **Example 1**\n ```js\n let post = store.peekRecord('post', 1);\n post.id; // 1\n ```\n `peekRecord` can be called with a single identifier argument instead of the combination\n of `type` (modelName) and `id` as separate arguments. You may recognize this combo as\n the typical pairing from [JSON:API](https://jsonapi.org/format/#document-resource-object-identification)\n **Example 2**\n ```js\n let post = store.peekRecord({ type: 'post', id });\n post.id; // 1\n ```\n If you have previously received an lid from an Identifier for this record, you can lookup the record again using\n just the lid.\n **Example 3**\n ```js\n let post = store.peekRecord({ lid });\n post.id; // 1\n ```\n @since 1.13.0\n @method peekRecord\n @public\n @param {String|object} modelName - either a string representing the modelName or a ResourceIdentifier object containing both the type (a string) and the id (a string) for the record or an lid (a string) of an existing record\n @param {String|Integer} id - optional only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved.\n @return {Model|null} record\n */\n\n peekRecord(identifier, id) {\n if (arguments.length === 1 && isMaybeIdentifier(identifier)) {\n const stableIdentifier = this.identifierCache.peekRecordIdentifier(identifier);\n const internalModel = stableIdentifier && internalModelFactoryFor(this).peek(stableIdentifier);\n // TODO come up with a better mechanism for determining if we have data and could peek.\n // this is basically an \"are we not empty\" query.\n return internalModel && internalModel.isLoaded ? this._instanceCache.getRecord(stableIdentifier) : null;\n }\n if (DEBUG) {\n assertDestroyingStore(this, 'peekRecord');\n }\n assert(`You need to pass a model name to the store's peekRecord method`, identifier);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${identifier}`, typeof identifier === 'string');\n const type = normalizeModelName(identifier);\n const normalizedId = ensureStringId(id);\n const resource = {\n type,\n id: normalizedId\n };\n const stableIdentifier = this.identifierCache.peekRecordIdentifier(resource);\n const internalModel = stableIdentifier && internalModelFactoryFor(this).peek(stableIdentifier);\n return internalModel && internalModel.isLoaded ? this._instanceCache.getRecord(stableIdentifier) : null;\n }\n\n /**\n This method returns true if a record for a given modelName and id is already\n loaded in the store. Use this function to know beforehand if a findRecord()\n will result in a request or that it will be a cache hit.\n Example\n ```javascript\n store.hasRecordForId('post', 1); // false\n store.findRecord('post', 1).then(function() {\n store.hasRecordForId('post', 1); // true\n });\n ```\n @method hasRecordForId\n @public\n @param {String} modelName\n @param {(String|Integer)} id\n @return {Boolean}\n */\n hasRecordForId(modelName, id) {\n if (true /* DEPRECATE_HAS_RECORD */) {\n deprecate(`store.hasRecordForId has been deprecated in favor of store.peekRecord`, false, {\n id: 'ember-data:deprecate-has-record-for-id',\n since: {\n available: '4.5',\n enabled: '4.5'\n },\n until: '5.0',\n for: 'ember-data'\n });\n if (DEBUG) {\n assertDestroyingStore(this, 'hasRecordForId');\n }\n assert(`You need to pass a model name to the store's hasRecordForId method`, modelName);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n const type = normalizeModelName(modelName);\n const trueId = ensureStringId(id);\n const resource = {\n type,\n id: trueId\n };\n const identifier = this.identifierCache.peekRecordIdentifier(resource);\n const internalModel = identifier && internalModelFactoryFor(this).peek(identifier);\n return !!internalModel && internalModel.isLoaded;\n }\n assert(`store.hasRecordForId has been removed`);\n }\n\n /**\n This method delegates a query to the adapter. This is the one place where\n adapter-level semantics are exposed to the application.\n Each time this method is called a new request is made through the adapter.\n Exposing queries this way seems preferable to creating an abstract query\n language for all server-side queries, and then require all adapters to\n implement them.\n ---\n If you do something like this:\n ```javascript\n store.query('person', { page: 1 });\n ```\n The request made to the server will look something like this:\n ```\n GET \"/api/v1/person?page=1\"\n ```\n ---\n If you do something like this:\n ```javascript\n store.query('person', { ids: [1, 2, 3] });\n ```\n The request made to the server will look something like this:\n ```\n GET \"/api/v1/person?ids%5B%5D=1&ids%5B%5D=2&ids%5B%5D=3\"\n decoded: \"/api/v1/person?ids[]=1&ids[]=2&ids[]=3\"\n ```\n This method returns a promise, which is resolved with an\n [`AdapterPopulatedRecordArray`](/ember-data/release/classes/AdapterPopulatedRecordArray)\n once the server returns.\n @since 1.13.0\n @method query\n @public\n @param {String} modelName\n @param {any} query an opaque query to be used by the adapter\n @param {Object} options optional, may include `adapterOptions` hash which will be passed to adapter.query\n @return {Promise} promise\n */\n query(modelName, query, options) {\n if (DEBUG) {\n assertDestroyingStore(this, 'query');\n }\n assert(`You need to pass a model name to the store's query method`, modelName);\n assert(`You need to pass a query hash to the store's query method`, query);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n let adapterOptionsWrapper = {};\n if (options && options.adapterOptions) {\n adapterOptionsWrapper.adapterOptions = options.adapterOptions;\n }\n let recordArray = options?._recordArray || null;\n let normalizedModelName = normalizeModelName(modelName);\n let adapter = this.adapterFor(normalizedModelName);\n assert(`You tried to load a query but you have no adapter (for ${modelName})`, adapter);\n assert(`You tried to load a query but your adapter does not implement 'query'`, typeof adapter.query === 'function');\n let queryPromise = _query(adapter, this, normalizedModelName, query, recordArray, adapterOptionsWrapper);\n return promiseArray(queryPromise);\n }\n\n /**\n This method makes a request for one record, where the `id` is not known\n beforehand (if the `id` is known, use [`findRecord`](../methods/findRecord?anchor=findRecord)\n instead).\n This method can be used when it is certain that the server will return a\n single object for the primary data.\n Each time this method is called a new request is made through the adapter.\n Let's assume our API provides an endpoint for the currently logged in user\n via:\n ```\n // GET /api/current_user\n {\n user: {\n id: 1234,\n username: 'admin'\n }\n }\n ```\n Since the specific `id` of the `user` is not known beforehand, we can use\n `queryRecord` to get the user:\n ```javascript\n store.queryRecord('user', {}).then(function(user) {\n let username = user.get('username');\n console.log(`Currently logged in as ${username}`);\n });\n ```\n The request is made through the adapters' `queryRecord`:\n ```app/adapters/user.js\n import Adapter from '@ember-data/adapter';\n import $ from 'jquery';\n export default class UserAdapter extends Adapter {\n queryRecord(modelName, query) {\n return $.getJSON('/api/current_user');\n }\n }\n ```\n Note: the primary use case for `store.queryRecord` is when a single record\n is queried and the `id` is not known beforehand. In all other cases\n `store.query` and using the first item of the array is likely the preferred\n way:\n ```\n // GET /users?username=unique\n {\n data: [{\n id: 1234,\n type: 'user',\n attributes: {\n username: \"unique\"\n }\n }]\n }\n ```\n ```javascript\n store.query('user', { username: 'unique' }).then(function(users) {\n return users.get('firstObject');\n }).then(function(user) {\n let id = user.get('id');\n });\n ```\n This method returns a promise, which resolves with the found record.\n If the adapter returns no data for the primary data of the payload, then\n `queryRecord` resolves with `null`:\n ```\n // GET /users?username=unique\n {\n data: null\n }\n ```\n ```javascript\n store.queryRecord('user', { username: 'unique' }).then(function(user) {\n console.log(user); // null\n });\n ```\n @since 1.13.0\n @method queryRecord\n @public\n @param {String} modelName\n @param {any} query an opaque query to be used by the adapter\n @param {Object} options optional, may include `adapterOptions` hash which will be passed to adapter.queryRecord\n @return {Promise} promise which resolves with the found record or `null`\n */\n queryRecord(modelName, query, options) {\n if (DEBUG) {\n assertDestroyingStore(this, 'queryRecord');\n }\n assert(`You need to pass a model name to the store's queryRecord method`, modelName);\n assert(`You need to pass a query hash to the store's queryRecord method`, query);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n let normalizedModelName = normalizeModelName(modelName);\n let adapter = this.adapterFor(normalizedModelName);\n let adapterOptionsWrapper = {};\n if (options && options.adapterOptions) {\n adapterOptionsWrapper.adapterOptions = options.adapterOptions;\n }\n assert(`You tried to make a query but you have no adapter (for ${normalizedModelName})`, adapter);\n assert(`You tried to make a query but your adapter does not implement 'queryRecord'`, typeof adapter.queryRecord === 'function');\n const promise = _queryRecord(adapter, this, normalizedModelName, query, adapterOptionsWrapper);\n return promiseObject(promise.then(identifier => identifier && this.peekRecord(identifier)));\n }\n\n /**\n `findAll` asks the adapter's `findAll` method to find the records for the\n given type, and returns a promise which will resolve with all records of\n this type present in the store, even if the adapter only returns a subset\n of them.\n ```app/routes/authors.js\n import Route from '@ember/routing/route';\n export default class AuthorsRoute extends Route {\n model(params) {\n return this.store.findAll('author');\n }\n }\n ```\n _When_ the returned promise resolves depends on the reload behavior,\n configured via the passed `options` hash and the result of the adapter's\n `shouldReloadAll` method.\n ### Reloading\n If `{ reload: true }` is passed or `adapter.shouldReloadAll` evaluates to\n `true`, then the returned promise resolves once the adapter returns data,\n regardless if there are already records in the store:\n ```js\n store.push({\n data: {\n id: 'first',\n type: 'author'\n }\n });\n // adapter#findAll resolves with\n // [\n // {\n // id: 'second',\n // type: 'author'\n // }\n // ]\n store.findAll('author', { reload: true }).then(function(authors) {\n authors.getEach('id'); // ['first', 'second']\n });\n ```\n If no reload is indicated via the above mentioned ways, then the promise\n immediately resolves with all the records currently loaded in the store.\n ### Background Reloading\n Optionally, if `adapter.shouldBackgroundReloadAll` evaluates to `true`,\n then a background reload is started. Once this resolves, the array with\n which the promise resolves, is updated automatically so it contains all the\n records in the store:\n ```app/adapters/application.js\n import Adapter from '@ember-data/adapter';\n export default class ApplicationAdapter extends Adapter {\n shouldReloadAll(store, snapshotsArray) {\n return false;\n },\n shouldBackgroundReloadAll(store, snapshotsArray) {\n return true;\n }\n });\n // ...\n store.push({\n data: {\n id: 'first',\n type: 'author'\n }\n });\n let allAuthors;\n store.findAll('author').then(function(authors) {\n authors.getEach('id'); // ['first']\n allAuthors = authors;\n });\n // later, once adapter#findAll resolved with\n // [\n // {\n // id: 'second',\n // type: 'author'\n // }\n // ]\n allAuthors.getEach('id'); // ['first', 'second']\n ```\n If you would like to force or prevent background reloading, you can set a\n boolean value for `backgroundReload` in the options object for\n `findAll`.\n ```app/routes/post/edit.js\n import Route from '@ember/routing/route';\n export default class PostEditRoute extends Route {\n model() {\n return this.store.findAll('post', { backgroundReload: false });\n }\n }\n ```\n If you pass an object on the `adapterOptions` property of the options\n argument it will be passed to you adapter via the `snapshotRecordArray`\n ```app/routes/posts.js\n import Route from '@ember/routing/route';\n export default class PostsRoute extends Route {\n model(params) {\n return this.store.findAll('post', {\n adapterOptions: { subscribe: false }\n });\n }\n }\n ```\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default class UserAdapter extends MyCustomAdapter {\n findAll(store, type, sinceToken, snapshotRecordArray) {\n if (snapshotRecordArray.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n }\n ```\n See [peekAll](../methods/peekAll?anchor=peekAll) to get an array of current records in the\n store, without waiting until a reload is finished.\n ### Retrieving Related Model Records\n If you use an adapter such as Ember's default\n [`JSONAPIAdapter`](/ember-data/release/classes/JSONAPIAdapter)\n that supports the [JSON API specification](http://jsonapi.org/) and if your server\n endpoint supports the use of an\n ['include' query parameter](http://jsonapi.org/format/#fetching-includes),\n you can use `findAll()` to automatically retrieve additional records related to\n those requested by supplying an `include` parameter in the `options` object.\n For example, given a `post` model that has a `hasMany` relationship with a `comment`\n model, when we retrieve all of the post records we can have the server also return\n all of the posts' comments in the same request:\n ```app/routes/posts.js\n import Route from '@ember/routing/route';\n export default class PostsRoute extends Route {\n model() {\n return this.store.findAll('post', { include: 'comments' });\n }\n }\n ```\n Multiple relationships can be requested using an `include` parameter consisting of a\n comma-separated list (without white-space) while nested relationships can be specified\n using a dot-separated sequence of relationship names. So to request both the posts'\n comments and the authors of those comments the request would look like this:\n ```app/routes/posts.js\n import Route from '@ember/routing/route';\n export default class PostsRoute extends Route {\n model() {\n return this.store.findAll('post', { include: 'comments,comments.author' });\n }\n }\n ```\n See [query](../methods/query?anchor=query) to only get a subset of records from the server.\n @since 1.13.0\n @method findAll\n @public\n @param {String} modelName\n @param {Object} options\n @return {Promise} promise\n */\n findAll(modelName, options = {}) {\n if (DEBUG) {\n assertDestroyingStore(this, 'findAll');\n }\n assert(`You need to pass a model name to the store's findAll method`, modelName);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n let normalizedModelName = normalizeModelName(modelName);\n let array = this.peekAll(normalizedModelName);\n let fetch;\n let adapter = this.adapterFor(normalizedModelName);\n assert(`You tried to load all records but you have no adapter (for ${normalizedModelName})`, adapter);\n assert(`You tried to load all records but your adapter does not implement 'findAll'`, typeof adapter.findAll === 'function');\n if (options.reload) {\n array.isUpdating = true;\n fetch = _findAll(adapter, this, normalizedModelName, options);\n } else {\n let snapshotArray = array._createSnapshot(options);\n if (options.reload !== false) {\n if (adapter.shouldReloadAll && adapter.shouldReloadAll(this, snapshotArray) || !adapter.shouldReloadAll && snapshotArray.length === 0) {\n array.isUpdating = true;\n fetch = _findAll(adapter, this, modelName, options);\n }\n }\n if (!fetch) {\n if (options.backgroundReload === false) {\n fetch = resolve(array);\n } else if (options.backgroundReload || !adapter.shouldBackgroundReloadAll || adapter.shouldBackgroundReloadAll(this, snapshotArray)) {\n array.isUpdating = true;\n _findAll(adapter, this, modelName, options);\n }\n fetch = resolve(array);\n }\n }\n return promiseArray(fetch);\n }\n\n /**\n This method returns a filtered array that contains all of the\n known records for a given type in the store.\n Note that because it's just a filter, the result will contain any\n locally created records of the type, however, it will not make a\n request to the backend to retrieve additional records. If you\n would like to request all the records from the backend please use\n [store.findAll](../methods/findAll?anchor=findAll).\n Also note that multiple calls to `peekAll` for a given type will always\n return the same `RecordArray`.\n Example\n ```javascript\n let localPosts = store.peekAll('post');\n ```\n @since 1.13.0\n @method peekAll\n @public\n @param {String} modelName\n @return {RecordArray}\n */\n peekAll(modelName) {\n if (DEBUG) {\n assertDestroyingStore(this, 'peekAll');\n }\n assert(`You need to pass a model name to the store's peekAll method`, modelName);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n let normalizedModelName = normalizeModelName(modelName);\n return this.recordArrayManager.liveRecordArrayFor(normalizedModelName);\n }\n\n /**\n This method unloads all records in the store.\n It schedules unloading to happen during the next run loop.\n Optionally you can pass a type which unload all records for a given type.\n ```javascript\n store.unloadAll();\n store.unloadAll('post');\n ```\n @method unloadAll\n @public\n @param {String} modelName\n */\n unloadAll(modelName) {\n if (DEBUG) {\n assertDestroyedStoreOnly(this, 'unloadAll');\n }\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, !modelName || typeof modelName === 'string');\n const factory = internalModelFactoryFor(this);\n if (modelName === undefined) {\n factory.clear();\n } else {\n let normalizedModelName = normalizeModelName(modelName);\n factory.clear(normalizedModelName);\n }\n }\n\n /**\n This method is called once the promise returned by an\n adapter's `createRecord`, `updateRecord` or `deleteRecord`\n is rejected with a `InvalidError`.\n @method recordWasInvalid\n @private\n @deprecated\n @param {InternalModel} internalModel\n @param {Object} errors\n */\n recordWasInvalid(internalModel, parsedErrors, error) {\n if (true /* DEPRECATE_RECORD_WAS_INVALID */) {\n deprecate(`The private API recordWasInvalid will be removed in an upcoming release. Use record.errors add/remove instead if the intent was to move the record into an invalid state manually.`, false, {\n id: 'ember-data:deprecate-record-was-invalid',\n for: 'ember-data',\n until: '5.0',\n since: {\n enabled: '4.5',\n available: '4.5'\n }\n });\n if (DEBUG) {\n assertDestroyingStore(this, 'recordWasInvalid');\n }\n internalModel.adapterDidInvalidate(parsedErrors, error);\n }\n assert(`store.recordWasInvalid has been removed`);\n }\n\n /**\n Push some data for a given type into the store.\n This method expects normalized [JSON API](http://jsonapi.org/) document. This means you have to follow [JSON API specification](http://jsonapi.org/format/) with few minor adjustments:\n - record's `type` should always be in singular, dasherized form\n - members (properties) should be camelCased\n [Your primary data should be wrapped inside `data` property](http://jsonapi.org/format/#document-top-level):\n ```js\n store.push({\n data: {\n // primary data for single record of type `Person`\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Daniel',\n lastName: 'Kmak'\n }\n }\n });\n ```\n [Demo.](http://ember-twiddle.com/fb99f18cd3b4d3e2a4c7)\n `data` property can also hold an array (of records):\n ```js\n store.push({\n data: [\n // an array of records\n {\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Daniel',\n lastName: 'Kmak'\n }\n },\n {\n id: '2',\n type: 'person',\n attributes: {\n firstName: 'Tom',\n lastName: 'Dale'\n }\n }\n ]\n });\n ```\n [Demo.](http://ember-twiddle.com/69cdbeaa3702159dc355)\n There are some typical properties for `JSONAPI` payload:\n * `id` - mandatory, unique record's key\n * `type` - mandatory string which matches `model`'s dasherized name in singular form\n * `attributes` - object which holds data for record attributes - `attr`'s declared in model\n * `relationships` - object which must contain any of the following properties under each relationships' respective key (example path is `relationships.achievements.data`):\n - [`links`](http://jsonapi.org/format/#document-links)\n - [`data`](http://jsonapi.org/format/#document-resource-object-linkage) - place for primary data\n - [`meta`](http://jsonapi.org/format/#document-meta) - object which contains meta-information about relationship\n For this model:\n ```app/models/person.js\n import Model, { attr, hasMany } from '@ember-data/model';\n export default class PersonRoute extends Route {\n @attr('string') firstName;\n @attr('string') lastName;\n @hasMany('person') children;\n }\n ```\n To represent the children as IDs:\n ```js\n {\n data: {\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Tom',\n lastName: 'Dale'\n },\n relationships: {\n children: {\n data: [\n {\n id: '2',\n type: 'person'\n },\n {\n id: '3',\n type: 'person'\n },\n {\n id: '4',\n type: 'person'\n }\n ]\n }\n }\n }\n }\n ```\n [Demo.](http://ember-twiddle.com/343e1735e034091f5bde)\n To represent the children relationship as a URL:\n ```js\n {\n data: {\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Tom',\n lastName: 'Dale'\n },\n relationships: {\n children: {\n links: {\n related: '/people/1/children'\n }\n }\n }\n }\n }\n ```\n If you're streaming data or implementing an adapter, make sure\n that you have converted the incoming data into this form. The\n store's [normalize](../methods/normalize?anchor=normalize) method is a convenience\n helper for converting a json payload into the form Ember Data\n expects.\n ```js\n store.push(store.normalize('person', data));\n ```\n This method can be used both to push in brand new\n records, as well as to update existing records.\n @method push\n @public\n @param {Object} data\n @return the record(s) that was created or\n updated.\n */\n\n push(data) {\n if (DEBUG) {\n assertDestroyingStore(this, 'push');\n }\n let pushed = this._push(data);\n if (Array.isArray(pushed)) {\n let records = pushed.map(identifier => this._instanceCache.getRecord(identifier));\n return records;\n }\n if (pushed === null) {\n return null;\n }\n return this._instanceCache.getRecord(pushed);\n }\n\n /**\n Push some data in the form of a json-api document into the store,\n without creating materialized records.\n @method _push\n @private\n @param {Object} jsonApiDoc\n @return {InternalModel|Array} pushed InternalModel(s)\n */\n _push(jsonApiDoc) {\n if (DEBUG) {\n assertDestroyingStore(this, '_push');\n }\n let identifiers = this._backburner.join(() => {\n let included = jsonApiDoc.included;\n let i, length;\n if (included) {\n for (i = 0, length = included.length; i < length; i++) {\n this._instanceCache._load(included[i]);\n }\n }\n if (Array.isArray(jsonApiDoc.data)) {\n length = jsonApiDoc.data.length;\n let identifiers = new Array(length);\n for (i = 0; i < length; i++) {\n identifiers[i] = this._instanceCache._load(jsonApiDoc.data[i]);\n }\n return identifiers;\n }\n if (jsonApiDoc.data === null) {\n return null;\n }\n assert(`Expected an object in the 'data' property in a call to 'push' for ${jsonApiDoc.type}, but was ${typeof jsonApiDoc.data}`, typeof jsonApiDoc.data === 'object');\n return this._instanceCache._load(jsonApiDoc.data);\n });\n\n // this typecast is necessary because `backburner.join` is mistyped to return void\n return identifiers;\n }\n\n /**\n Push some raw data into the store.\n This method can be used both to push in brand new\n records, as well as to update existing records. You\n can push in more than one type of object at once.\n All objects should be in the format expected by the\n serializer.\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n export default class ApplicationSerializer extends RESTSerializer;\n ```\n ```js\n let pushData = {\n posts: [\n { id: 1, postTitle: \"Great post\", commentIds: [2] }\n ],\n comments: [\n { id: 2, commentBody: \"Insightful comment\" }\n ]\n }\n store.pushPayload(pushData);\n ```\n By default, the data will be deserialized using a default\n serializer (the application serializer if it exists).\n Alternatively, `pushPayload` will accept a model type which\n will determine which serializer will process the payload.\n ```app/serializers/application.js\n import RESTSerializer from '@ember-data/serializer/rest';\n export default class ApplicationSerializer extends RESTSerializer;\n ```\n ```app/serializers/post.js\n import JSONSerializer from '@ember-data/serializer/json';\n export default JSONSerializer;\n ```\n ```js\n store.pushPayload(pushData); // Will use the application serializer\n store.pushPayload('post', pushData); // Will use the post serializer\n ```\n @method pushPayload\n @public\n @param {String} modelName Optionally, a model type used to determine which serializer will be used\n @param {Object} inputPayload\n */\n // TODO @runspired @deprecate pushPayload in favor of looking up the serializer\n pushPayload(modelName, inputPayload) {\n if (DEBUG) {\n assertDestroyingStore(this, 'pushPayload');\n }\n let serializer;\n let payload;\n if (!inputPayload) {\n payload = modelName;\n serializer = this.serializerFor('application');\n assert(`You cannot use 'store#pushPayload' without a modelName unless your default serializer defines 'pushPayload'`, typeof serializer.pushPayload === 'function');\n } else {\n payload = inputPayload;\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n let normalizedModelName = normalizeModelName(modelName);\n serializer = this.serializerFor(normalizedModelName);\n }\n assert(`You must define a pushPayload method in your serializer in order to call store.pushPayload`, serializer.pushPayload);\n serializer.pushPayload(this, payload);\n }\n\n // TODO @runspired @deprecate records should implement their own serialization if desired\n serializeRecord(record, options) {\n // TODO we used to check if the record was destroyed here\n return this._instanceCache.createSnapshot(recordIdentifierFor(record)).serialize(options);\n }\n\n // todo @runspired this should likely be publicly @documented for custom records\n saveRecord(record, options = {}) {\n assert(`Unable to initate save for a record in a disconnected state`, storeFor(record));\n let identifier = recordIdentifierFor(record);\n let internalModel = identifier && internalModelFactoryFor(this).peek(identifier);\n if (!internalModel) {\n // this commonly means we're disconnected\n // but just in case we reject here to prevent bad things.\n return reject(`Record Is Disconnected`);\n }\n // TODO we used to check if the record was destroyed here\n // Casting can be removed once REQUEST_SERVICE ff is turned on\n // because a `Record` is provided there will always be a matching internalModel\n\n assert(`Cannot initiate a save request for an unloaded record: ${identifier}`, !internalModel.isEmpty && !internalModel.isDestroyed);\n if (internalModel._isRecordFullyDeleted()) {\n return resolve(record);\n }\n internalModel.adapterWillCommit();\n if (!options) {\n options = {};\n }\n let recordData = this._instanceCache.getRecordData(identifier);\n let operation = 'updateRecord';\n\n // TODO handle missing isNew\n if (recordData.isNew && recordData.isNew()) {\n operation = 'createRecord';\n } else if (recordData.isDeleted && recordData.isDeleted()) {\n operation = 'deleteRecord';\n }\n const saveOptions = Object.assign({\n [SaveOp]: operation\n }, options);\n let fetchManagerPromise = this._fetchManager.scheduleSave(identifier, saveOptions);\n return fetchManagerPromise.then(payload => {\n /*\n // TODO @runspired re-evaluate the below claim now that\n // the save request pipeline is more streamlined.\n Note to future spelunkers hoping to optimize.\n We rely on this `run` to create a run loop if needed\n that `store._push` and `store.saveRecord` will both share.\n We use `join` because it is often the case that we\n have an outer run loop available still from the first\n call to `store._push`;\n */\n this._backburner.join(() => {\n if (DEBUG) {\n assertDestroyingStore(this, 'saveRecord');\n }\n let data = payload && payload.data;\n if (!data) {\n assert(`Your ${internalModel.modelName} record was saved to the server, but the response does not have an id and no id has been set client side. Records must have ids. Please update the server response to provide an id in the response or generate the id on the client side either before saving the record or while normalizing the response.`, internalModel.id);\n }\n const cache = this.identifierCache;\n if (operation !== 'deleteRecord' && data) {\n cache.updateRecordIdentifier(identifier, data);\n }\n\n //We first make sure the primary data has been updated\n //TODO try to move notification to the user to the end of the runloop\n internalModel.adapterDidCommit(data);\n if (payload && payload.included) {\n this._push({\n data: null,\n included: payload.included\n });\n }\n });\n return record;\n }, e => {\n if (typeof e === 'string') {\n throw e;\n }\n const {\n error,\n parsedErrors\n } = e;\n internalModel.adapterDidInvalidate(parsedErrors, error);\n throw error;\n });\n }\n\n /**\n * Instantiation hook allowing applications or addons to configure the store\n * to utilize a custom RecordData implementation.\n *\n * @method createRecordDataFor\n * @public\n * @param modelName\n * @param id\n * @param clientId\n * @param storeWrapper\n */\n createRecordDataFor(modelName, id, clientId, storeWrapper) {\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n // we can't greedily use require as this causes\n // a cycle we can't easily fix (or clearly pin point) at present.\n //\n // it can be reproduced in partner tests by running\n // node ./scripts/packages-for-commit.js && yarn test-external:ember-observer\n if (_RecordData === undefined) {\n _RecordData = importSync('@ember-data/record-data/-private').RecordData;\n }\n let identifier = this.identifierCache.getOrCreateRecordIdentifier({\n type: modelName,\n id,\n lid: clientId\n });\n return new _RecordData(identifier, storeWrapper);\n }\n assert(`Expected store.createRecordDataFor to be implemented but it wasn't`);\n }\n\n /**\n `normalize` converts a json payload into the normalized form that\n [push](../methods/push?anchor=push) expects.\n Example\n ```js\n socket.on('message', function(message) {\n let modelName = message.model;\n let data = message.data;\n store.push(store.normalize(modelName, data));\n });\n ```\n @method normalize\n @public\n @param {String} modelName The name of the model type for this payload\n @param {Object} payload\n @return {Object} The normalized payload\n */\n // TODO @runspired @deprecate users should call normalize on the associated serializer directly\n normalize(modelName, payload) {\n if (DEBUG) {\n assertDestroyingStore(this, 'normalize');\n }\n assert(`You need to pass a model name to the store's normalize method`, modelName);\n assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${typeof modelName}`, typeof modelName === 'string');\n let normalizedModelName = normalizeModelName(modelName);\n let serializer = this.serializerFor(normalizedModelName);\n let model = this.modelFor(normalizedModelName);\n assert(`You must define a normalize method in your serializer in order to call store.normalize`, serializer?.normalize);\n return serializer.normalize(model, payload);\n }\n\n /**\n Returns an instance of the adapter for a given type. For\n example, `adapterFor('person')` will return an instance of\n the adapter located at `app/adapters/person.js`\n If no `person` adapter is found, this method will look\n for an `application` adapter (the default adapter for\n your entire application).\n @method adapterFor\n @public\n @param {String} modelName\n @return Adapter\n */\n adapterFor(modelName) {\n if (DEBUG) {\n assertDestroyingStore(this, 'adapterFor');\n }\n assert(`You need to pass a model name to the store's adapterFor method`, modelName);\n assert(`Passing classes to store.adapterFor has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n let normalizedModelName = normalizeModelName(modelName);\n let {\n _adapterCache\n } = this;\n let adapter = _adapterCache[normalizedModelName];\n if (adapter) {\n return adapter;\n }\n let owner = getOwner(this);\n\n // name specific adapter\n adapter = owner.lookup(`adapter:${normalizedModelName}`);\n if (adapter !== undefined) {\n _adapterCache[normalizedModelName] = adapter;\n return adapter;\n }\n\n // no adapter found for the specific name, fallback and check for application adapter\n adapter = _adapterCache.application || owner.lookup('adapter:application');\n if (adapter !== undefined) {\n _adapterCache[normalizedModelName] = adapter;\n _adapterCache.application = adapter;\n return adapter;\n }\n if (true /* DEPRECATE_JSON_API_FALLBACK */) {\n // final fallback, no model specific adapter, no application adapter, no\n // `adapter` property on store: use json-api adapter\n adapter = _adapterCache['-json-api'] || owner.lookup('adapter:-json-api');\n if (adapter !== undefined) {\n deprecate(`Your application is utilizing a deprecated hidden fallback adapter (-json-api). Please implement an application adapter to function as your fallback.`, false, {\n id: 'ember-data:deprecate-secret-adapter-fallback',\n for: 'ember-data',\n until: '5.0',\n since: {\n available: '4.5',\n enabled: '4.5'\n }\n });\n _adapterCache[normalizedModelName] = adapter;\n _adapterCache['-json-api'] = adapter;\n return adapter;\n }\n }\n assert(`No adapter was found for '${modelName}' and no 'application' adapter was found as a fallback.`);\n }\n\n /**\n Returns an instance of the serializer for a given type. For\n example, `serializerFor('person')` will return an instance of\n `App.PersonSerializer`.\n If no `App.PersonSerializer` is found, this method will look\n for an `App.ApplicationSerializer` (the default serializer for\n your entire application).\n If a serializer cannot be found on the adapter, it will fall back\n to an instance of `JSONSerializer`.\n @method serializerFor\n @public\n @param {String} modelName the record to serialize\n @return {Serializer}\n */\n serializerFor(modelName) {\n if (DEBUG) {\n assertDestroyingStore(this, 'serializerFor');\n }\n assert(`You need to pass a model name to the store's serializerFor method`, modelName);\n assert(`Passing classes to store.serializerFor has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');\n let normalizedModelName = normalizeModelName(modelName);\n let {\n _serializerCache\n } = this;\n let serializer = _serializerCache[normalizedModelName];\n if (serializer) {\n return serializer;\n }\n let owner = getOwner(this);\n\n // by name\n serializer = owner.lookup(`serializer:${normalizedModelName}`);\n if (serializer !== undefined) {\n _serializerCache[normalizedModelName] = serializer;\n return serializer;\n }\n\n // no serializer found for the specific model, fallback and check for application serializer\n serializer = _serializerCache.application || owner.lookup('serializer:application');\n if (serializer !== undefined) {\n _serializerCache[normalizedModelName] = serializer;\n _serializerCache.application = serializer;\n return serializer;\n }\n return null;\n }\n destroy() {\n // enqueue destruction of any adapters/serializers we have created\n for (let adapterName in this._adapterCache) {\n let adapter = this._adapterCache[adapterName];\n if (typeof adapter.destroy === 'function') {\n adapter.destroy();\n }\n }\n for (let serializerName in this._serializerCache) {\n let serializer = this._serializerCache[serializerName];\n if (typeof serializer.destroy === 'function') {\n serializer.destroy();\n }\n }\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n const peekGraph = importSync('@ember-data/record-data/-private').peekGraph;\n let graph = peekGraph(this);\n if (graph) {\n graph.destroy();\n }\n }\n return super.destroy();\n }\n willDestroy() {\n super.willDestroy();\n this.recordArrayManager.destroy();\n this.identifierCache.destroy();\n\n // destroy the graph before unloadAll\n // since then we avoid churning relationships\n // during unload\n if (true /* HAS_RECORD_DATA_PACKAGE */) {\n const peekGraph = importSync('@ember-data/record-data/-private').peekGraph;\n let graph = peekGraph(this);\n if (graph) {\n graph.willDestroy();\n }\n }\n this.unloadAll();\n if (DEBUG) {\n unregisterWaiter(this.__asyncWaiter);\n let tracked = this._trackedAsyncRequests;\n let isSettled = tracked.length === 0;\n if (!isSettled) {\n throw new Error('Async Request leaks detected. Add a breakpoint here and set `store.generateStackTracesForTrackedRequests = true;`to inspect traces for leak origins:\\n\\t - ' + tracked.map(o => o.label).join('\\n\\t - '));\n }\n }\n }\n}\nexport default Store;\nlet assertDestroyingStore;\nlet assertDestroyedStoreOnly;\nif (DEBUG) {\n assertDestroyingStore = function assertDestroyedStore(store, method) {\n assert(`Attempted to call store.${method}(), but the store instance has already been destroyed.`, !(store.isDestroying || store.isDestroyed));\n };\n assertDestroyedStoreOnly = function assertDestroyedStoreOnly(store, method) {\n assert(`Attempted to call store.${method}(), but the store instance has already been destroyed.`, !store.isDestroyed);\n };\n}\nfunction isMaybeIdentifier(maybeIdentifier) {\n return Boolean(maybeIdentifier !== null && typeof maybeIdentifier === 'object' && ('id' in maybeIdentifier && 'type' in maybeIdentifier && maybeIdentifier.id && maybeIdentifier.type || maybeIdentifier.lid));\n}\nexport function assertIdentifierHasId(identifier) {\n assert(`Attempted to schedule a fetch for a record without an id.`, identifier.id !== null);\n}","import { promiseObject } from '../promise-proxies';\nexport default function promiseRecord(store, promise, label) {\n let toReturn = promise.then(identifier => store.peekRecord(identifier));\n return promiseObject(toReturn, label);\n}","import { setModifierManager, capabilities } from '@ember/modifier';\nimport { macroCondition, dependencySatisfies } from '@embroider/macros';\n\n/**\n The `{{did-insert}}` element modifier is activated when an element is\n inserted into the DOM.\n\n In this example, the `fadeIn` function receives the `div` DOM element as its\n first argument and is executed after the element is inserted into the DOM.\n\n ```handlebars\n
\n {{yield}}\n
\n ```\n\n ```js\n export default Component.extend({\n fadeIn(element) {\n element.classList.add('fade-in');\n }\n });\n ```\n\n By default, the executed function will be unbound. If you would like to access\n the component context in your function, use the `action` decorator as follows:\n\n ```handlebars\n
first
\n
second
\n\n

{{this.count}} elements were rendered

\n ```\n\n ```js\n export default Component.extend({\n count: tracked({ value: 0 }),\n\n incrementCount: action(function() {\n this.count++;\n })\n });\n ```\n\n @method did-insert\n @public\n*/\nexport default setModifierManager(() => ({\n capabilities: capabilities(macroCondition(dependencySatisfies('ember-source', '>= 3.22.0-beta.1')) ? '3.22' : '3.13', {\n disableAutoTracking: true\n }),\n createModifier() {},\n installModifier(_state, element, {\n positional: [fn, ...args],\n named\n }) {\n fn(element, args, named);\n },\n updateModifier() {},\n destroyModifier() {}\n}), class DidInsertModifier {});","import { setModifierManager, capabilities } from '@ember/modifier';\nimport { macroCondition, dependencySatisfies, importSync } from '@embroider/macros';\nconst untrack = function () {\n if (macroCondition(dependencySatisfies('ember-source', '> 3.27.0-beta.1'))) {\n // ember-source@3.27 shipped \"real modules\" by default, so we can just use\n // importSync to get @glimmer/validator directly\n return importSync('@glimmer/validator').untrack;\n } else if (macroCondition(dependencySatisfies('ember-source', '>= 3.22.0-alpha.1'))) {\n // we can access `window.Ember` here because it wasn't deprecated until at least 3.27\n // eslint-disable-next-line no-undef\n return Ember.__loader.require('@glimmer/validator').untrack;\n } else {\n // nothing needed here, we do not call `untrack` in this case\n }\n}();\n\n/**\n The `{{did-update}}` element modifier is activated when any of its arguments\n are updated. It does not run on initial render.\n\n In this example, the `resize` function receives the `textarea` DOM element as its\n first argument and is executed anytime the `@text` argument changes.\n\n ```handlebars\n \n ```\n\n ```js\n export default Component.extend({\n resize(element) {\n element.style.height = `${element.scrollHeight}px`;\n }\n });\n ```\n\n In addition to the `element`, both named and positional arguments are passed to the\n executed function:\n\n ```handlebars\n
\n ```\n\n ```js\n export default Component.extend({\n logArguments(element, [first, second], { third }) {\n console.log('element', element);\n console.log('positional args', first, second);\n console.log('names args', third);\n }\n });\n ```\n\n By default, the executed function will be unbound. If you would like to access\n the component context in your function, use the `action` decorator as follows:\n\n ```handlebars\n
\n ```\n\n ```js\n export default Component.extend({\n someFunction: action(function(element, [someArg]) {\n // the `this` context will be the component instance\n })\n });\n ```\n\n @method did-update\n @public\n*/\nexport default setModifierManager(() => ({\n capabilities: macroCondition(dependencySatisfies('ember-source', '>= 3.22.0-alpha.1')) ? capabilities('3.22', {\n disableAutoTracking: false\n }) : capabilities('3.13', {\n disableAutoTracking: true\n }),\n createModifier() {\n return {\n element: null\n };\n },\n installModifier(state, element, args) {\n // save element into state bucket\n state.element = element;\n if (macroCondition(dependencySatisfies('ember-source', '>= 3.22.0-alpha.1'))) {\n // Consume individual properties to entangle tracking.\n // https://github.com/emberjs/ember.js/issues/19277\n // https://github.com/ember-modifier/ember-modifier/pull/63#issuecomment-815908201\n args.positional.forEach(() => {});\n args.named && Object.values(args.named);\n }\n },\n updateModifier({\n element\n }, args) {\n let [fn, ...positional] = args.positional;\n if (macroCondition(dependencySatisfies('ember-source', '>= 3.22.0-alpha.1'))) {\n // Consume individual properties to entangle tracking.\n // https://github.com/emberjs/ember.js/issues/19277\n // https://github.com/ember-modifier/ember-modifier/pull/63#issuecomment-815908201\n args.positional.forEach(() => {});\n args.named && Object.values(args.named);\n untrack(() => {\n fn(element, positional, args.named);\n });\n } else {\n fn(element, positional, args.named);\n }\n },\n destroyModifier() {}\n}), class DidUpdateModifier {});","import { setModifierManager, capabilities } from '@ember/modifier';\nimport { macroCondition, dependencySatisfies } from '@embroider/macros';\n\n/**\n The `{{will-destroy}}` element modifier is activated immediately before the element\n is removed from the DOM.\n\n ```handlebars\n
\n {{yield}}\n
\n ```\n\n ```js\n export default Component.extend({\n teardownPlugin(element) {\n // teardown logic here\n }\n });\n ```\n\n By default, the executed function will be unbound. If you would like to access\n the component context in your function, use the `action` decorator as follows:\n\n ```handlebars\n
\n {{yield}}\n
\n ```\n\n ```js\n export default Component.extend({\n teardownPlugin: action(function(element) {\n // the `this` context will be the component instance\n })\n });\n ```\n\n @method will-destroy\n @public\n*/\nexport default setModifierManager(() => ({\n capabilities: capabilities(macroCondition(dependencySatisfies('ember-source', '>= 3.22.0-beta.1')) ? '3.22' : '3.13', {\n disableAutoTracking: true\n }),\n createModifier() {\n return {\n element: null\n };\n },\n installModifier(state, element) {\n state.element = element;\n },\n updateModifier() {},\n destroyModifier({\n element\n }, args) {\n let [fn, ...positional] = args.positional;\n fn(element, positional, args.named);\n }\n}), class WillDestroyModifier {});","export default class Cache {\n size = 0;\n misses = 0;\n hits = 0;\n\n constructor(limit, func, store) {\n this.limit = limit;\n this.func = func;\n this.store = store;\n this.store = store || new Map();\n }\n\n get(key) {\n let value = this.store.get(key);\n\n if (this.store.has(key)) {\n this.hits++;\n return this.store.get(key);\n } else {\n this.misses++;\n value = this.set(key, this.func(key));\n }\n\n return value;\n }\n\n set(key, value) {\n if (this.limit > this.size) {\n this.size++;\n this.store.set(key, value);\n }\n\n return value;\n }\n\n purge() {\n this.store.clear();\n this.size = 0;\n this.hits = 0;\n this.misses = 0;\n }\n\n}","/* eslint-disable no-useless-escape */\n\n/**\n @module @ember/string\n */\nimport Cache from './cache';\n// STATE within a module is frowned upon, this exists\n// to support Ember.STRINGS but shield ember internals from this legacy global\n// API.\nlet STRINGS = {};\nexport function setStrings(strings) {\n STRINGS = strings;\n}\nexport function getStrings() {\n return STRINGS;\n}\nexport function getString(name) {\n return STRINGS[name];\n}\nconst STRING_DASHERIZE_REGEXP = /[ _]/g;\nconst STRING_DASHERIZE_CACHE = new Cache(1000, key => decamelize(key).replace(STRING_DASHERIZE_REGEXP, '-'));\nconst STRING_CAMELIZE_REGEXP_1 = /(\\-|\\_|\\.|\\s)+(.)?/g;\nconst STRING_CAMELIZE_REGEXP_2 = /(^|\\/)([A-Z])/g;\nconst CAMELIZE_CACHE = new Cache(1000, key => key.replace(STRING_CAMELIZE_REGEXP_1, (_match, _separator, chr) => chr ? chr.toUpperCase() : '').replace(STRING_CAMELIZE_REGEXP_2, (match\n/*, separator, chr */\n) => match.toLowerCase()));\nconst STRING_CLASSIFY_REGEXP_1 = /^(\\-|_)+(.)?/;\nconst STRING_CLASSIFY_REGEXP_2 = /(.)(\\-|\\_|\\.|\\s)+(.)?/g;\nconst STRING_CLASSIFY_REGEXP_3 = /(^|\\/|\\.)([a-z])/g;\nconst CLASSIFY_CACHE = new Cache(1000, str => {\n const replace1 = (_match, _separator, chr) => chr ? `_${chr.toUpperCase()}` : '';\n\n const replace2 = (_match, initialChar, _separator, chr) => initialChar + (chr ? chr.toUpperCase() : '');\n\n const parts = str.split('/');\n\n for (let i = 0; i < parts.length; i++) {\n parts[i] = parts[i].replace(STRING_CLASSIFY_REGEXP_1, replace1).replace(STRING_CLASSIFY_REGEXP_2, replace2);\n }\n\n return parts.join('/').replace(STRING_CLASSIFY_REGEXP_3, (match\n /*, separator, chr */\n ) => match.toUpperCase());\n});\nconst STRING_UNDERSCORE_REGEXP_1 = /([a-z\\d])([A-Z]+)/g;\nconst STRING_UNDERSCORE_REGEXP_2 = /\\-|\\s+/g;\nconst UNDERSCORE_CACHE = new Cache(1000, str => str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2').replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase());\nconst STRING_CAPITALIZE_REGEXP = /(^|\\/)([a-z\\u00C0-\\u024F])/g;\nconst CAPITALIZE_CACHE = new Cache(1000, str => str.replace(STRING_CAPITALIZE_REGEXP, (match\n/*, separator, chr */\n) => match.toUpperCase()));\nconst STRING_DECAMELIZE_REGEXP = /([a-z\\d])([A-Z])/g;\nconst DECAMELIZE_CACHE = new Cache(1000, str => str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase());\n/**\n Splits a string into separate units separated by spaces, eliminating any\n empty strings in the process. This is a convenience method for split that\n is mostly useful when applied to the `String.prototype`.\n\n ```javascript\n import { w } from '@ember/string';\n\n w(\"alpha beta gamma\").forEach(function(key) {\n console.log(key);\n });\n\n // > alpha\n // > beta\n // > gamma\n ```\n\n @method w\n @param {String} str The string to split\n @return {Array} array containing the split strings\n @public\n*/\n\nexport function w(str) {\n return str.split(/\\s+/);\n}\n/**\n Converts a camelized string into all lower case separated by underscores.\n\n ```javascript\n import { decamelize } from '@ember/string';\n\n decamelize('innerHTML'); // 'inner_html'\n decamelize('action_name'); // 'action_name'\n decamelize('css-class-name'); // 'css-class-name'\n decamelize('my favorite items'); // 'my favorite items'\n ```\n\n @method decamelize\n @param {String} str The string to decamelize.\n @return {String} the decamelized string.\n @public\n*/\n\nexport function decamelize(str) {\n return DECAMELIZE_CACHE.get(str);\n}\n/**\n Replaces underscores, spaces, or camelCase with dashes.\n\n ```javascript\n import { dasherize } from '@ember/string';\n\n dasherize('innerHTML'); // 'inner-html'\n dasherize('action_name'); // 'action-name'\n dasherize('css-class-name'); // 'css-class-name'\n dasherize('my favorite items'); // 'my-favorite-items'\n dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'\n ```\n\n @method dasherize\n @param {String} str The string to dasherize.\n @return {String} the dasherized string.\n @public\n*/\n\nexport function dasherize(str) {\n return STRING_DASHERIZE_CACHE.get(str);\n}\n/**\n Returns the lowerCamelCase form of a string.\n\n ```javascript\n import { camelize } from '@ember/string';\n\n camelize('innerHTML'); // 'innerHTML'\n camelize('action_name'); // 'actionName'\n camelize('css-class-name'); // 'cssClassName'\n camelize('my favorite items'); // 'myFavoriteItems'\n camelize('My Favorite Items'); // 'myFavoriteItems'\n camelize('private-docs/owner-invoice'); // 'privateDocs/ownerInvoice'\n ```\n\n @method camelize\n @param {String} str The string to camelize.\n @return {String} the camelized string.\n @public\n*/\n\nexport function camelize(str) {\n return CAMELIZE_CACHE.get(str);\n}\n/**\n Returns the UpperCamelCase form of a string.\n\n ```javascript\n import { classify } from '@ember/string';\n\n classify('innerHTML'); // 'InnerHTML'\n classify('action_name'); // 'ActionName'\n classify('css-class-name'); // 'CssClassName'\n classify('my favorite items'); // 'MyFavoriteItems'\n classify('private-docs/owner-invoice'); // 'PrivateDocs/OwnerInvoice'\n ```\n\n @method classify\n @param {String} str the string to classify\n @return {String} the classified string\n @public\n*/\n\nexport function classify(str) {\n return CLASSIFY_CACHE.get(str);\n}\n/**\n More general than decamelize. Returns the lower\\_case\\_and\\_underscored\n form of a string.\n\n ```javascript\n import { underscore } from '@ember/string';\n\n underscore('innerHTML'); // 'inner_html'\n underscore('action_name'); // 'action_name'\n underscore('css-class-name'); // 'css_class_name'\n underscore('my favorite items'); // 'my_favorite_items'\n underscore('privateDocs/ownerInvoice'); // 'private_docs/owner_invoice'\n ```\n\n @method underscore\n @param {String} str The string to underscore.\n @return {String} the underscored string.\n @public\n*/\n\nexport function underscore(str) {\n return UNDERSCORE_CACHE.get(str);\n}\n/**\n Returns the Capitalized form of a string\n\n ```javascript\n import { capitalize } from '@ember/string';\n\n capitalize('innerHTML') // 'InnerHTML'\n capitalize('action_name') // 'Action_name'\n capitalize('css-class-name') // 'Css-class-name'\n capitalize('my favorite items') // 'My favorite items'\n capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'\n ```\n\n @method capitalize\n @param {String} str The string to capitalize.\n @return {String} The capitalized string.\n @public\n*/\n\nexport function capitalize(str) {\n return CAPITALIZE_CACHE.get(str);\n}\n/*\n The following are implemented here to give users adding `@ember/string` to\n their projects a useful error message. The `ember-source` implementation of\n `@ember/string` is clobbered by adding this addon, and so the deprecation of\n the import path is not triggered. This error message is intended to help\n users discover what they need to change.\n*/\n\nexport function htmlSafe(str) {\n throw new Error('htmlSafe is not implemented in the `@ember/string` package. Please import from `@ember/template` instead.');\n}\nexport function isHTMLSafe(str) {\n throw new Error('isHTMLSafe is not implemented in the `@ember/string` package. Please import from `@ember/template` instead.');\n}","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport Service from '@ember/service';\nimport { getOwner } from '@ember/application';\nexport default class EnsureRegisteredService extends Service {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"classNonces\", new WeakMap());\n _defineProperty(this, \"nonceCounter\", 0);\n }\n register(klass, owner = getOwner(this)) {\n let nonce = this.classNonces.get(klass);\n if (nonce == null) {\n nonce = `-ensure${this.nonceCounter++}`;\n this.classNonces.set(klass, nonce);\n owner.register(`component:${nonce}`, klass);\n }\n return nonce;\n }\n}","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { DEBUG } from '@glimmer/env';\nimport { setOwner } from './owner';\nimport { isDestroying, isDestroyed } from './destroyables';\n\n// This provides a type-safe `WeakMap`: the getter and setter link the key to a\n// specific value. This is how `WeakMap`s actually behave, but the TS type\n// system does not (yet!) have a good way to capture that for types like\n// `WeakMap` where the type is generic over another generic type (here, `Args`).\n\n// SAFETY: this only holds because we *only* acces this when `DEBUG` is `true`.\n// There is not a great way to connect that data in TS at present.\nexport let ARGS_SET;\nif (DEBUG) {\n ARGS_SET = new WeakMap();\n}\n\n// --- Type utilities for component signatures --- //\n// Type-only \"symbol\" to use with `EmptyObject` below, so that it is *not*\n// equivalent to an empty interface.\n\n/**\n * This provides us a way to have a \"fallback\" which represents an empty object,\n * without the downsides of how TS treats `{}`. Specifically: this will\n * correctly leverage \"excess property checking\" so that, given a component\n * which has no named args, if someone invokes it with any named args, they will\n * get a type error.\n *\n * @internal This is exported so declaration emit works (if it were not emitted,\n * declarations which fall back to it would not work). It is *not* intended for\n * public usage, and the specific mechanics it uses may change at any time.\n * The location of this export *is* part of the public API, because moving it\n * will break existing declarations, but is not legal for end users to import\n * themselves, so ***DO NOT RELY ON IT***.\n */\n\n/** Given a signature `S`, get back the `Args` type. */\n\n/**\n * Given any allowed shorthand form of a signature, desugars it to its full\n * expanded type.\n *\n * @internal This is only exported so we can avoid duplicating it in\n * [Glint](https://github.com/typed-ember/glint) or other such tooling. It is\n * *not* intended for public usage, and the specific mechanics it uses may\n * change at any time. Although the signature produced by is part of Glimmer's\n * public API the existence and mechanics of this specific symbol are *not*,\n * so ***DO NOT RELY ON IT***.\n */\n// The conditional type here is because TS applies conditional types\n// distributively. This means that for union types, checks like `keyof T` get\n// all the keys from all elements of the union, instead of ending up as `never`\n// and then always falling into the `Signature` path instead of falling back to\n// the legacy args handling path.\n\n/**\n * @internal we use this type for convenience internally; inference means users\n * should not normally need to name it\n */\n\n/**\n * The `Component` class defines an encapsulated UI element that is rendered to\n * the DOM. A component is made up of a template and, optionally, this component\n * object.\n *\n * ## Defining a Component\n *\n * To define a component, subclass `Component` and add your own properties,\n * methods and lifecycle hooks:\n *\n * ```ts\n * import Component from '@glimmer/component';\n *\n * export default class extends Component {\n * }\n * ```\n *\n * ## Lifecycle Hooks\n *\n * Lifecycle hooks allow you to respond to changes to a component, such as when\n * it gets created, rendered, updated or destroyed. To add a lifecycle hook to a\n * component, implement the hook as a method on your component subclass.\n *\n * For example, to be notified when Glimmer has rendered your component so you\n * can attach a legacy jQuery plugin, implement the `didInsertElement()` method:\n *\n * ```ts\n * import Component from '@glimmer/component';\n *\n * export default class extends Component {\n * didInsertElement() {\n * $(this.element).pickadate();\n * }\n * }\n * ```\n *\n * ## Data for Templates\n *\n * `Component`s have two different kinds of data, or state, that can be\n * displayed in templates:\n *\n * 1. Arguments\n * 2. Properties\n *\n * Arguments are data that is passed in to a component from its parent\n * component. For example, if I have a `UserGreeting` component, I can pass it\n * a name and greeting to use:\n *\n * ```hbs\n * \n * ```\n *\n * Inside my `UserGreeting` template, I can access the `@name` and `@greeting`\n * arguments that I've been given:\n *\n * ```hbs\n * {{@greeting}}, {{@name}}!\n * ```\n *\n * Arguments are also available inside my component:\n *\n * ```ts\n * console.log(this.args.greeting); // prints \"Olá\"\n * ```\n *\n * Properties, on the other hand, are internal to the component and declared in\n * the class. You can use properties to store data that you want to show in the\n * template, or pass to another component as an argument.\n *\n * ```ts\n * import Component from '@glimmer/component';\n *\n * export default class extends Component {\n * user = {\n * name: 'Robbie'\n * }\n * }\n * ```\n *\n * In the above example, we've defined a component with a `user` property that\n * contains an object with its own `name` property.\n *\n * We can render that property in our template:\n *\n * ```hbs\n * Hello, {{user.name}}!\n * ```\n *\n * We can also take that property and pass it as an argument to the\n * `UserGreeting` component we defined above:\n *\n * ```hbs\n * \n * ```\n *\n * ## Arguments vs. Properties\n *\n * Remember, arguments are data that was given to your component by its parent\n * component, and properties are data your component has defined for itself.\n *\n * You can tell the difference between arguments and properties in templates\n * because arguments always start with an `@` sign (think \"A is for arguments\"):\n *\n * ```hbs\n * {{@firstName}}\n * ```\n *\n * We know that `@firstName` came from the parent component, not the current\n * component, because it starts with `@` and is therefore an argument.\n *\n * On the other hand, if we see:\n *\n * ```hbs\n * {{name}}\n * ```\n *\n * We know that `name` is a property on the component. If we want to know where\n * the data is coming from, we can go look at our component class to find out.\n *\n * Inside the component itself, arguments always show up inside the component's\n * `args` property. For example, if `{{@firstName}}` is `Tom` in the template,\n * inside the component `this.args.firstName` would also be `Tom`.\n */\nexport default class BaseComponent {\n /**\n * Constructs a new component and assigns itself the passed properties. You\n * should not construct new components yourself. Instead, Glimmer will\n * instantiate new components automatically as it renders.\n *\n * @param owner\n * @param args\n */\n constructor(owner, args) {\n /**\n * Named arguments passed to the component from its parent component.\n * They can be accessed in JavaScript via `this.args.argumentName` and in the template via `@argumentName`.\n *\n * Say you have the following component, which will have two `args`, `firstName` and `lastName`:\n *\n * ```hbs\n * \n * ```\n *\n * If you needed to calculate `fullName` by combining both of them, you would do:\n *\n * ```ts\n * didInsertElement() {\n * console.log(`Hi, my full name is ${this.args.firstName} ${this.args.lastName}`);\n * }\n * ```\n *\n * While in the template you could do:\n *\n * ```hbs\n *

Welcome, {{@firstName}} {{@lastName}}!

\n * ```\n */\n _defineProperty(this, \"args\", void 0);\n if (DEBUG && !(owner !== null && typeof owner === 'object' && ARGS_SET.has(args))) {\n throw new Error(`You must pass both the owner and args to super() in your component: ${this.constructor.name}. You can pass them directly, or use ...arguments to pass all arguments through.`);\n }\n this.args = args;\n setOwner(this, owner);\n }\n get isDestroying() {\n return isDestroying(this);\n }\n get isDestroyed() {\n return isDestroyed(this);\n }\n\n /**\n * Called before the component has been removed from the DOM.\n */\n willDestroy() {}\n}","import Ember from 'ember';\nexport const isDestroying = Ember._isDestroying;\nexport const isDestroyed = Ember._isDestroyed;","import { DEBUG } from '@glimmer/env';\nimport Ember from 'ember';\nimport { set } from '@ember/object';\nimport { getOwner, setOwner } from '@ember/application';\nimport { capabilities } from '@ember/component';\nimport { schedule } from '@ember/runloop';\nimport BaseComponentManager from './base-component-manager';\nimport * as destroyables from './destroyables';\nconst {\n setDestroyed,\n setDestroying\n} = destroyables;\nconst CAPABILITIES = true // @ts-ignore\n// @ts-ignore\n? capabilities('3.13', {\n destructor: true,\n asyncLifecycleCallbacks: false,\n updateHook: false\n}) : capabilities('3.4', {\n destructor: true,\n asyncLifecycleCallbacks: false\n});\nconst scheduledDestroyComponent = true ? undefined : (component, meta) => {\n if (component.isDestroyed) {\n return;\n }\n Ember.destroy(component);\n meta.setSourceDestroyed();\n setDestroyed(component);\n};\nconst destroy = true ? Ember.destroy : component => {\n if (component.isDestroying) {\n return;\n }\n let meta = Ember.meta(component);\n meta.setSourceDestroying();\n setDestroying(component);\n schedule('actions', component, component.willDestroy);\n schedule('destroy', this, scheduledDestroyComponent, component, meta);\n};\nconst registerDestructor = true ? Ember._registerDestructor : true ? Ember.__loader.require('@glimmer/runtime').registerDestructor : undefined;\n\n/**\n * This component manager runs in Ember.js environments and extends the base component manager to:\n *\n * 1. Properly destroy the component's associated `meta` data structure\n * 2. Schedule destruction using Ember's runloop\n */\nclass EmberGlimmerComponentManager extends BaseComponentManager(setOwner, getOwner, CAPABILITIES) {\n createComponent(ComponentClass, args) {\n const component = super.createComponent(ComponentClass, args);\n if (true) {\n registerDestructor(component, () => {\n component.willDestroy();\n });\n }\n return component;\n }\n destroyComponent(component) {\n destroy(component);\n }\n}\n// In Ember 3.12 and earlier, the updateComponent hook was mandatory.\n// As of Ember 3.13, the `args` object is stable and each property of the\n// object participates in the autotrack stack on its own. This means we do not\n// need to set the `args` property on the component instance to invalidate\n// tracked getters that rely on `args`, and therefore don't require the `updateComponent`\n// hook at all.\nif (!true) {\n EmberGlimmerComponentManager.prototype.updateComponent = function updateComponent(component, args) {\n let argSnapshot = args.named;\n if (DEBUG) {\n argSnapshot = Object.freeze(argSnapshot);\n }\n set(component, 'args', argSnapshot);\n };\n}\nexport default EmberGlimmerComponentManager;","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { DEBUG } from '@glimmer/env';\nimport { ARGS_SET } from './component';\n/**\n * This factory function returns a component manager class with common behavior\n * that can be extend to add Glimmer.js- or Ember.js-specific functionality. As\n * these environments converge, the need for two component manager\n * implementations (and thus this factory) should go away.\n */\nexport default function BaseComponentManager(setOwner, getOwner, capabilities) {\n return class {\n static create(attrs) {\n let owner = getOwner(attrs);\n return new this(owner);\n }\n constructor(owner) {\n _defineProperty(this, \"capabilities\", capabilities);\n setOwner(this, owner);\n }\n createComponent(ComponentClass, args) {\n if (DEBUG) {\n ARGS_SET.set(args.named, true);\n }\n return new ComponentClass(getOwner(this), args.named);\n }\n getContext(component) {\n return component;\n }\n };\n}","import { DEBUG } from '@glimmer/env';\nimport { setComponentManager } from '@ember/component';\n\n// Hax because the old version of `@types/ember__component` the `1.x` branch\n// uses does not provide any types for `setComponentManager` *and* because we\n// are using a very old version of `setComponentManager` for versions before\n// Ember 3.8.\n\nimport GlimmerComponentManager from './-private/ember-component-manager';\nimport GlimmerComponentBase from './-private/component';\nlet GlimmerComponent = GlimmerComponentBase;\nif (DEBUG) {\n // Add assertions against using Glimmer.js only APIs\n\n // TODO: Add GlimmerComponent API docs link to these messages once API docs are live\n function throwMethodUseError(methodName) {\n throw new Error(`You attempted to define the '${methodName}' method on a Glimmer Component, but that lifecycle hook does not exist in Ember.js applications, it only exists in Glimmer.js apps. You can rename this method, and you can trigger it using a modifier such as {{did-insert}} from '@ember/render-modifiers': https://github.com/emberjs/ember-render-modifiers.`);\n }\n function throwPropertyUseError(propertyName) {\n throw new Error(`You attempted to access the '${propertyName}' property on a Glimmer Component, but that property does not exist in Ember.js applications, it only exists in Glimmer.js apps. You define a class field with the same name on your component class and it will overwrite this error message, but it will not be used by the framework.`);\n }\n GlimmerComponent = class GlimmerDebugComponent extends GlimmerComponent {\n constructor(owner, args) {\n super(owner, args);\n if (typeof this['didInsertElement'] === 'function') {\n throwMethodUseError('didInsertElement');\n }\n if (typeof this['didUpdate'] === 'function') {\n throwMethodUseError('didUpdate');\n }\n }\n };\n let proto = GlimmerComponent.prototype;\n function defineErrorProp(proto, key, getterMethod) {\n Object.defineProperty(proto, key, {\n get: () => getterMethod(key),\n set(value) {\n Object.defineProperty(this, key, {\n value\n });\n }\n });\n }\n\n // Methods should still throw whenever they are accessed\n defineErrorProp(proto, 'bounds', throwPropertyUseError);\n defineErrorProp(proto, 'element', throwPropertyUseError);\n defineErrorProp(proto, 'debugName', throwPropertyUseError);\n}\nif (true) {\n setComponentManager(owner => {\n return new GlimmerComponentManager(owner);\n }, GlimmerComponent);\n} else {\n setComponentManager('glimmer', GlimmerComponent);\n}\nexport default GlimmerComponent;","import * as metal from \"@ember/-internals/metal\";\n const { cached, tracked } = metal;\n export { cached, tracked };","/* eslint-disable max-lines */\n\nimport { subscribe } from '@ember/instrumentation';\nimport { _backburner, run, scheduleOnce } from '@ember/runloop';\nimport { getOwnConfig, isTesting, macroCondition } from '@embroider/macros';\nimport * as Sentry from '@sentry/browser';\nimport { GLOBAL_OBJ, browserPerformanceTimeOrigin, timestampInSeconds } from '@sentry/utils';\nimport { getActiveSpan, startInactiveSpan } from '..';\nfunction getSentryConfig() {\n const _global = GLOBAL_OBJ;\n _global.__sentryEmberConfig = _global.__sentryEmberConfig ?? {};\n const environmentConfig = getOwnConfig().sentryConfig;\n if (!environmentConfig.sentry) {\n environmentConfig.sentry = {\n browserTracingOptions: {}\n };\n }\n Object.assign(environmentConfig.sentry, _global.__sentryEmberConfig);\n return environmentConfig;\n}\nexport function initialize(appInstance) {\n // Disable in fastboot - we only want to run Sentry client-side\n const fastboot = appInstance.lookup('service:fastboot');\n if (fastboot?.isFastBoot) {\n return;\n }\n const config = getSentryConfig();\n if (config['disablePerformance']) {\n return;\n }\n const performancePromise = instrumentForPerformance(appInstance);\n if (macroCondition(isTesting())) {\n window._sentryPerformanceLoad = performancePromise;\n }\n}\nfunction getBackburner() {\n if (_backburner) {\n return _backburner;\n }\n if (run.backburner) {\n return run.backburner;\n }\n return {\n on() {\n // noop\n },\n off() {\n // noop\n }\n };\n}\nfunction getTransitionInformation(transition, router) {\n const fromRoute = transition?.from?.name;\n const toRoute = transition?.to?.name || router.currentRouteName;\n return {\n fromRoute,\n toRoute\n };\n}\nfunction getLocationURL(location) {\n if (!location || !location.getURL || !location.formatURL) {\n return '';\n }\n const url = location.formatURL(location.getURL());\n if (location.implementation === 'hash') {\n return `${location.rootURL}${url}`;\n }\n return url;\n}\nexport function _instrumentEmberRouter(routerService, routerMain, config, startTransaction, startTransactionOnPageLoad) {\n const {\n disableRunloopPerformance\n } = config;\n const location = routerMain.location;\n let activeTransaction;\n let transitionSpan;\n const url = getLocationURL(location);\n if (macroCondition(isTesting())) {\n routerService._sentryInstrumented = true;\n routerService._startTransaction = startTransaction;\n }\n if (startTransactionOnPageLoad && url) {\n const routeInfo = routerService.recognize(url);\n activeTransaction = startTransaction({\n name: `route:${routeInfo.name}`,\n op: 'pageload',\n origin: 'auto.pageload.ember',\n tags: {\n url,\n toRoute: routeInfo.name,\n 'routing.instrumentation': '@sentry/ember'\n }\n });\n }\n const finishActiveTransaction = (_, nextInstance) => {\n if (nextInstance) {\n return;\n }\n activeTransaction?.end();\n getBackburner().off('end', finishActiveTransaction);\n };\n routerService.on('routeWillChange', transition => {\n const {\n fromRoute,\n toRoute\n } = getTransitionInformation(transition, routerService);\n activeTransaction?.end();\n activeTransaction = startTransaction({\n name: `route:${toRoute}`,\n op: 'navigation',\n origin: 'auto.navigation.ember',\n tags: {\n fromRoute,\n toRoute,\n 'routing.instrumentation': '@sentry/ember'\n }\n });\n transitionSpan = startInactiveSpan({\n op: 'ui.ember.transition',\n name: `route:${fromRoute} -> route:${toRoute}`,\n origin: 'auto.ui.ember'\n });\n });\n routerService.on('routeDidChange', () => {\n if (!transitionSpan || !activeTransaction) {\n return;\n }\n transitionSpan.end();\n if (disableRunloopPerformance) {\n activeTransaction.end();\n return;\n }\n getBackburner().on('end', finishActiveTransaction);\n });\n return {\n startTransaction\n };\n}\nfunction _instrumentEmberRunloop(config) {\n const {\n disableRunloopPerformance,\n minimumRunloopQueueDuration\n } = config;\n if (disableRunloopPerformance) {\n return;\n }\n let currentQueueStart;\n let currentQueueSpan;\n const instrumentedEmberQueues = ['actions', 'routerTransitions', 'render', 'afterRender', 'destroy'];\n getBackburner().on('begin', (_, previousInstance) => {\n if (previousInstance) {\n return;\n }\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n return;\n }\n if (currentQueueSpan) {\n currentQueueSpan.end();\n }\n currentQueueStart = timestampInSeconds();\n const processQueue = queue => {\n // Process this queue using the end of the previous queue.\n if (currentQueueStart) {\n const now = timestampInSeconds();\n const minQueueDuration = minimumRunloopQueueDuration ?? 5;\n if ((now - currentQueueStart) * 1000 >= minQueueDuration) {\n startInactiveSpan({\n name: 'runloop',\n op: `ui.ember.runloop.${queue}`,\n origin: 'auto.ui.ember',\n startTimestamp: currentQueueStart\n })?.end(now);\n }\n currentQueueStart = undefined;\n }\n\n // Setup for next queue\n\n const stillActiveSpan = getActiveSpan();\n if (!stillActiveSpan) {\n return;\n }\n currentQueueStart = timestampInSeconds();\n };\n instrumentedEmberQueues.forEach(queue => {\n scheduleOnce(queue, null, processQueue, queue);\n });\n });\n getBackburner().on('end', (_, nextInstance) => {\n if (nextInstance) {\n return;\n }\n if (currentQueueSpan) {\n currentQueueSpan.end();\n currentQueueSpan = undefined;\n }\n });\n}\nfunction processComponentRenderBefore(payload, beforeEntries) {\n const info = {\n payload,\n now: timestampInSeconds()\n };\n beforeEntries[payload.object] = info;\n}\nfunction processComponentRenderAfter(payload, beforeEntries, op, minComponentDuration) {\n const begin = beforeEntries[payload.object];\n if (!begin) {\n return;\n }\n const now = timestampInSeconds();\n const componentRenderDuration = now - begin.now;\n if (componentRenderDuration * 1000 >= minComponentDuration) {\n startInactiveSpan({\n name: payload.containerKey || payload.object,\n op,\n origin: 'auto.ui.ember',\n startTimestamp: begin.now\n })?.end(now);\n }\n}\nfunction _instrumentComponents(config) {\n const {\n disableInstrumentComponents,\n minimumComponentRenderDuration,\n enableComponentDefinitions\n } = config;\n if (disableInstrumentComponents) {\n return;\n }\n const minComponentDuration = minimumComponentRenderDuration ?? 2;\n const beforeEntries = {};\n const beforeComponentDefinitionEntries = {};\n function _subscribeToRenderEvents() {\n subscribe('render.component', {\n before(_name, _timestamp, payload) {\n processComponentRenderBefore(payload, beforeEntries);\n },\n after(_name, _timestamp, payload, _beganIndex) {\n processComponentRenderAfter(payload, beforeEntries, 'ui.ember.component.render', minComponentDuration);\n }\n });\n if (enableComponentDefinitions) {\n subscribe('render.getComponentDefinition', {\n before(_name, _timestamp, payload) {\n processComponentRenderBefore(payload, beforeComponentDefinitionEntries);\n },\n after(_name, _timestamp, payload, _beganIndex) {\n processComponentRenderAfter(payload, beforeComponentDefinitionEntries, 'ui.ember.component.definition', 0);\n }\n });\n }\n }\n _subscribeToRenderEvents();\n}\nfunction _instrumentInitialLoad(config) {\n const startName = '@sentry/ember:initial-load-start';\n const endName = '@sentry/ember:initial-load-end';\n const {\n HAS_PERFORMANCE,\n HAS_PERFORMANCE_TIMING\n } = _hasPerformanceSupport();\n if (!HAS_PERFORMANCE) {\n return;\n }\n const {\n performance\n } = window;\n if (config.disableInitialLoadInstrumentation) {\n performance.clearMarks(startName);\n performance.clearMarks(endName);\n return;\n }\n\n // Split performance check in two so clearMarks still happens even if timeOrigin isn't available.\n if (!HAS_PERFORMANCE_TIMING || browserPerformanceTimeOrigin === undefined) {\n return;\n }\n const measureName = '@sentry/ember:initial-load';\n const startMarkExists = performance.getEntriesByName(startName).length > 0;\n const endMarkExists = performance.getEntriesByName(endName).length > 0;\n if (!startMarkExists || !endMarkExists) {\n return;\n }\n performance.measure(measureName, startName, endName);\n const measures = performance.getEntriesByName(measureName);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const measure = measures[0];\n const startTimestamp = (measure.startTime + browserPerformanceTimeOrigin) / 1000;\n const endTimestamp = startTimestamp + measure.duration / 1000;\n startInactiveSpan({\n op: 'ui.ember.init',\n name: 'init',\n origin: 'auto.ui.ember',\n startTimestamp\n })?.end(endTimestamp);\n performance.clearMarks(startName);\n performance.clearMarks(endName);\n performance.clearMeasures(measureName);\n}\nfunction _hasPerformanceSupport() {\n // TS says that all of these methods are always available, but some of them may not be supported in older browsers\n // So we \"pretend\" they are all optional in order to be able to check this properly without TS complaining\n const _performance = window.performance;\n const HAS_PERFORMANCE = Boolean(_performance && _performance.clearMarks && _performance.clearMeasures);\n const HAS_PERFORMANCE_TIMING = Boolean(_performance.measure && _performance.getEntriesByName && browserPerformanceTimeOrigin !== undefined);\n return {\n HAS_PERFORMANCE,\n HAS_PERFORMANCE_TIMING\n };\n}\nexport async function instrumentForPerformance(appInstance) {\n const config = getSentryConfig();\n // Maintaining backwards compatibility with config.browserTracingOptions, but passing it with Sentry options is preferred.\n const browserTracingOptions = config.browserTracingOptions || config.sentry.browserTracingOptions || {};\n const {\n BrowserTracing\n } = await import('@sentry/browser');\n const idleTimeout = config.transitionTimeout || 5000;\n const browserTracing = new BrowserTracing({\n routingInstrumentation: (customStartTransaction, startTransactionOnPageLoad) => {\n // eslint-disable-next-line ember/no-private-routing-service\n const routerMain = appInstance.lookup('router:main');\n let routerService = appInstance.lookup('service:router');\n if (routerService.externalRouter) {\n // Using ember-engines-router-service in an engine.\n routerService = routerService.externalRouter;\n }\n if (routerService._hasMountedSentryPerformanceRouting) {\n // Routing listens to route changes on the main router, and should not be initialized multiple times per page.\n return;\n }\n if (!routerService.recognize) {\n // Router is missing critical functionality to limit cardinality of the transaction names.\n return;\n }\n routerService._hasMountedSentryPerformanceRouting = true;\n _instrumentEmberRouter(routerService, routerMain, config, customStartTransaction, startTransactionOnPageLoad);\n },\n idleTimeout,\n ...browserTracingOptions\n });\n if (macroCondition(isTesting())) {\n const client = Sentry.getCurrentHub().getClient();\n if (client && client.getIntegrationById && client.getIntegrationById('BrowserTracing')) {\n // Initializers are called more than once in tests, causing the integrations to not be setup correctly.\n return;\n }\n }\n const client = Sentry.getCurrentHub().getClient();\n if (client && client.addIntegration) {\n client.addIntegration(browserTracing);\n }\n _instrumentEmberRunloop(config);\n _instrumentComponents(config);\n _instrumentInitialLoad(config);\n}\nexport default {\n initialize\n};","import type { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { consoleSandbox, logger } from './logger';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n","import type {\n Attachment,\n AttachmentItem,\n BaseEnvelopeHeaders,\n BaseEnvelopeItemHeaders,\n DataCategory,\n DsnComponents,\n Envelope,\n EnvelopeItemType,\n Event,\n EventEnvelopeHeaders,\n SdkInfo,\n SdkMetadata,\n TextEncoderInternal,\n} from '@sentry/types';\n\nimport { dsnToString } from './dsn';\nimport { normalize } from './normalize';\nimport { dropUndefinedKeys } from './object';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope(headers: E[0], items: E[1] = []): E {\n return [headers, items] as E;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope(envelope: E, newItem: E[1][number]): E {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] as unknown as E;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nexport function forEachEnvelopeItem(\n envelope: Envelope,\n callback: (envelopeItem: E[1][number], envelopeItemType: E[1][number][0]['type']) => boolean | void,\n): boolean {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nexport function envelopeContainsItemType(envelope: Envelope, types: EnvelopeItemType[]): boolean {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input: string, textEncoder?: TextEncoderInternal): Uint8Array {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nexport function serializeEnvelope(envelope: Envelope, textEncoder?: TextEncoderInternal): string | Uint8Array {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts: string | Uint8Array[] = JSON.stringify(envHeaders);\n\n function append(next: string | Uint8Array): void {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload: string;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers: Uint8Array[]): Uint8Array {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\nexport interface TextDecoderInternal {\n decode(input?: Uint8Array): string;\n}\n\n/**\n * Parses an envelope\n */\nexport function parseEnvelope(\n env: string | Uint8Array,\n textEncoder: TextEncoderInternal,\n textDecoder: TextDecoderInternal,\n): Envelope {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length: number): Uint8Array {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson(): T {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) as T;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items: [any, any][] = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nexport function createAttachmentEnvelopeItem(\n attachment: Attachment,\n textEncoder?: TextEncoderInternal,\n): AttachmentItem {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP: Record = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n // TODO: This is a temporary workaround until we have a proper data category for metrics\n statsd: 'unknown',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nexport function envelopeItemTypeToDataCategory(type: EnvelopeItemType): DataCategory {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from from the metadata or an events */\nexport function getSdkMetadataForEnvelopeHeader(metadataOrEvent?: SdkMetadata | Event): SdkInfo | undefined {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nexport function createEventEnvelopeHeaders(\n event: Event,\n sdkInfo: SdkInfo | undefined,\n tunnel: string | undefined,\n dsn?: DsnComponents,\n): EventEnvelopeHeaders {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id as string,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n","import type { ConsoleLevel } from '@sentry/types';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public logLevel: ConsoleLevel;\n\n public constructor(public message: string, logLevel: ConsoleLevel = 'warn') {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n","import type { ClientOptions, DsnComponents, DsnLike, SdkInfo } from '@sentry/types';\nimport { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(\n dsn: DsnComponents,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions: string | ClientOptions = {} as ClientOptions,\n): string {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'onClose') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n","/* eslint-disable max-lines */\nimport type {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n ClientOptions,\n DataCategory,\n DsnComponents,\n DynamicSamplingContext,\n Envelope,\n ErrorEvent,\n Event,\n EventDropReason,\n EventHint,\n EventProcessor,\n FeedbackEvent,\n Integration,\n IntegrationClass,\n MetricBucketItem,\n MetricsAggregator,\n Outcome,\n ParameterizedString,\n PropagationContext,\n SdkMetadata,\n Session,\n SessionAggregates,\n Severity,\n SeverityLevel,\n Transaction,\n TransactionEvent,\n Transport,\n TransportMakeRequestResponse,\n} from '@sentry/types';\nimport {\n SentryError,\n SyncPromise,\n addItemToEnvelope,\n checkOrSetAlreadyCaught,\n createAttachmentEnvelopeItem,\n isParameterizedString,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n makeDsn,\n rejectedSyncPromise,\n resolvedSyncPromise,\n} from '@sentry/utils';\n\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api';\nimport { DEBUG_BUILD } from './debug-build';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope';\nimport { getClient } from './exports';\nimport { getIsolationScope } from './hub';\nimport type { IntegrationIndex } from './integration';\nimport { setupIntegration, setupIntegrations } from './integration';\nimport { createMetricEnvelope } from './metrics/envelope';\nimport type { Scope } from './scope';\nimport { updateSession } from './session';\nimport { getDynamicSamplingContextFromClient } from './tracing/dynamicSamplingContext';\nimport { prepareEvent } from './utils/prepareEvent';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * A reference to a metrics aggregator\n *\n * @experimental Note this is alpha API. It may experience breaking changes in the future.\n */\n public metricsAggregator?: MetricsAggregator;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n protected readonly _transport?: Transport;\n\n /** Array of set up integrations. */\n protected _integrations: IntegrationIndex;\n\n /** Indicates whether this client's integrations have been set up. */\n protected _integrationsInitialized: boolean;\n\n /** Number of calls being processed */\n protected _numProcessing: number;\n\n protected _eventProcessors: EventProcessor[];\n\n /** Holds flushable */\n private _outcomes: { [key: string]: number };\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n private _hooks: Record;\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n protected constructor(options: O) {\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: ParameterizedString,\n // eslint-disable-next-line deprecation/deprecation\n level?: Severity | SeverityLevel,\n hint?: EventHint,\n scope?: Scope,\n ): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const eventMessage = isParameterizedString(message) ? message : String(message);\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(eventMessage, level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!(typeof session.release === 'string')) {\n DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n public getSdkMetadata(): SdkMetadata | undefined {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport | undefined {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n const transport = this._transport;\n if (transport) {\n if (this.metricsAggregator) {\n this.metricsAggregator.flush();\n }\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n if (this.metricsAggregator) {\n this.metricsAggregator.close();\n }\n return result;\n });\n }\n\n /** Get all installed event processors. */\n public getEventProcessors(): EventProcessor[] {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n public addEventProcessor(eventProcessor: EventProcessor): void {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(forceInitialize?: boolean): void {\n if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) {\n this._integrations = setupIntegrations(this, this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n public getIntegrationById(integrationId: string): Integration | undefined {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n DEBUG_BUILD && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public addIntegration(integration: Integration): void {\n setupIntegration(this, integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event, hint: EventHint = {}): void {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n const promise = this._sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session | SessionAggregates): void {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n public recordDroppedEvent(reason: EventDropReason, category: DataCategory, _event?: Event): void {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n DEBUG_BUILD && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureAggregateMetrics(metricBucketItems: Array): void {\n DEBUG_BUILD && logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`);\n const metricsEnvelope = createMetricEnvelope(\n metricBucketItems,\n this._dsn,\n this._options._metadata,\n this._options.tunnel,\n );\n\n // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._sendEnvelope(metricsEnvelope);\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n public on(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint) => void): void;\n\n /** @inheritdoc */\n public on(\n hook: 'afterSendEvent',\n callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void,\n ): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: { drop: boolean }) => void): void;\n\n /** @inheritdoc */\n public on(\n hook: 'beforeSendFeedback',\n callback: (feedback: FeedbackEvent, options?: { includeReplay: boolean }) => void,\n ): void;\n\n /** @inheritdoc */\n public on(hook: string, callback: unknown): void {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n }\n\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n\n /** @inheritdoc */\n public emit(hook: 'startTransaction', transaction: Transaction): void;\n\n /** @inheritdoc */\n public emit(hook: 'finishTransaction', transaction: Transaction): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeEnvelope', envelope: Envelope): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;\n\n /** @inheritdoc */\n public emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: { drop: boolean }): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: { includeReplay: boolean }): void;\n\n /** @inheritdoc */\n public emit(hook: string, ...rest: unknown[]): void {\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(callback => callback(...rest));\n }\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(\n event: Event,\n hint: EventHint,\n scope?: Scope,\n isolationScope = getIsolationScope(),\n ): PromiseLike {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n return prepareEvent(options, event, hint, scope, this, isolationScope).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n // If a trace context is not set on the event, we use the propagationContext set on the event to\n // generate a trace context. If the propagationContext does not have a dynamic sampling context, we\n // also generate one for it.\n const { propagationContext } = evt.sdkProcessingMetadata || {};\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext as PropagationContext;\n evt.contexts = {\n trace: {\n trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId,\n },\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n }\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint: EventHint = {}, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (DEBUG_BUILD) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason as SentryError;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory: DataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): PromiseLike | void {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n } else {\n DEBUG_BUILD && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n protected _clearOutcomes(): Outcome[] {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') as [EventDropReason, DataCategory];\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike;\n\n /**\n * @inheritDoc\n */\n public abstract eventFromMessage(\n _message: ParameterizedString,\n // eslint-disable-next-line deprecation/deprecation\n _level?: Severity | SeverityLevel,\n _hint?: EventHint,\n ): PromiseLike;\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult: PromiseLike | Event | null,\n beforeSendLabel: string,\n): PromiseLike | Event | null {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n): PromiseLike | Event | null {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === 'transaction';\n}\n\n/**\n * Add an event processor to the current client.\n * This event processor will run for all events processed by this client.\n */\nexport function addEventProcessor(callback: EventProcessor): void {\n const client = getClient();\n\n if (!client || !client.addEventProcessor) {\n return;\n }\n\n client.addEventProcessor(callback);\n}\n","import type { DsnComponents, MetricBucketItem, SdkMetadata, StatsdEnvelope, StatsdItem } from '@sentry/types';\nimport { createEnvelope, dsnToString } from '@sentry/utils';\nimport { serializeMetricBuckets } from './utils';\n\n/**\n * Create envelope from a metric aggregate.\n */\nexport function createMetricEnvelope(\n metricBucketItems: Array,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): StatsdEnvelope {\n const headers: StatsdEnvelope[0] = {\n sent_at: new Date().toISOString(),\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n };\n }\n\n if (!!tunnel && dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n const item = createMetricEnvelopeItem(metricBucketItems);\n return createEnvelope(headers, [item]);\n}\n\nfunction createMetricEnvelopeItem(metricBucketItems: MetricBucketItem[]): StatsdItem {\n const payload = serializeMetricBuckets(metricBucketItems);\n const metricHeaders: StatsdItem[0] = {\n type: 'statsd',\n length: payload.length,\n };\n return [metricHeaders, payload];\n}\n","import type { MeasurementUnit, MetricBucketItem, Primitive } from '@sentry/types';\nimport { dropUndefinedKeys } from '@sentry/utils';\nimport { NAME_AND_TAG_KEY_NORMALIZATION_REGEX, TAG_VALUE_NORMALIZATION_REGEX } from './constants';\nimport type { MetricType } from './types';\n\n/**\n * Generate bucket key from metric properties.\n */\nexport function getBucketKey(\n metricType: MetricType,\n name: string,\n unit: MeasurementUnit,\n tags: Record,\n): string {\n const stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0]));\n return `${metricType}${name}${unit}${stringifiedTags}`;\n}\n\n/* eslint-disable no-bitwise */\n/**\n * Simple hash function for strings.\n */\nexport function simpleHash(s: string): number {\n let rv = 0;\n for (let i = 0; i < s.length; i++) {\n const c = s.charCodeAt(i);\n rv = (rv << 5) - rv + c;\n rv &= rv;\n }\n return rv >>> 0;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Serialize metrics buckets into a string based on statsd format.\n *\n * Example of format:\n * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677\n * Segments:\n * name: metric.name\n * unit: second\n * value: [1, 1.2]\n * type of metric: d (distribution)\n * tags: { a: value, b: anothervalue }\n * timestamp: 12345677\n */\nexport function serializeMetricBuckets(metricBucketItems: MetricBucketItem[]): string {\n let out = '';\n for (const item of metricBucketItems) {\n const tagEntries = Object.entries(item.tags);\n const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(',')}` : '';\n out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}\\n`;\n }\n return out;\n}\n\n/**\n * Sanitizes tags.\n */\nexport function sanitizeTags(unsanitizedTags: Record): Record {\n const tags: Record = {};\n for (const key in unsanitizedTags) {\n if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) {\n const sanitizedKey = key.replace(NAME_AND_TAG_KEY_NORMALIZATION_REGEX, '_');\n tags[sanitizedKey] = String(unsanitizedTags[key]).replace(TAG_VALUE_NORMALIZATION_REGEX, '_');\n }\n }\n return tags;\n}\n","import type { Scope } from '@sentry/core';\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport type {\n BrowserClientProfilingOptions,\n BrowserClientReplayOptions,\n ClientOptions,\n Event,\n EventHint,\n Options,\n ParameterizedString,\n Severity,\n SeverityLevel,\n UserFeedback,\n} from '@sentry/types';\nimport { createClientReportEnvelope, dsnToString, getSDKSource, logger } from '@sentry/utils';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { WINDOW } from './helpers';\nimport type { BrowserTransportOptions } from './transports/types';\nimport { createUserFeedbackEnvelope } from './userfeedback';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/types Options for more information.\n */\nexport type BrowserOptions = Options &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions;\n\n/**\n * Configuration options for the Sentry Browser SDK Client class\n * @see BrowserClient for more information.\n */\nexport type BrowserClientOptions = ClientOptions &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserClientOptions) {\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: `${sdkSource}:@sentry/browser`,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(options);\n\n if (options.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: ParameterizedString,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n if (!this._isEnabled()) {\n DEBUG_BUILD && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n\n // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Sends client reports as an envelope.\n */\n private _flushOutcomes(): void {\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n DEBUG_BUILD && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._sendEnvelope(envelope);\n }\n}\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n // @ts-expect-error __SENTRY_SDK_SOURCE__ is injected by rollup during build process\n return __SENTRY_SDK_SOURCE__;\n}\n","import type { DsnComponents, EventEnvelope, SdkMetadata, UserFeedback, UserFeedbackItem } from '@sentry/types';\nimport { createEnvelope, dsnToString } from '@sentry/utils';\n\n/**\n * Creates an envelope from a user feedback.\n */\nexport function createUserFeedbackEnvelope(\n feedback: UserFeedback,\n {\n metadata,\n tunnel,\n dsn,\n }: {\n metadata: SdkMetadata | undefined;\n tunnel: string | undefined;\n dsn: DsnComponents | undefined;\n },\n): EventEnvelope {\n const headers: EventEnvelope[0] = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback: UserFeedback): UserFeedbackItem {\n const feedbackHeaders: UserFeedbackItem[0] = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n","import type { ClientReport, ClientReportEnvelope, ClientReportItem } from '@sentry/types';\n\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n discarded_events: ClientReport['discarded_events'],\n dsn?: string,\n timestamp?: number,\n): ClientReportEnvelope {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n","// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n// Copyright (c) 2013 Onur Can Cakmak onur.cakmak@gmail.com and all TraceKit contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this\n// software and associated documentation files(the 'Software'), to deal in the Software\n// without restriction, including without limitation the rights to use, copy, modify,\n// merge, publish, distribute, sublicense, and / or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to the following\n// conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies\n// or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { StackFrame, StackLineParser, StackLineParserFn } from '@sentry/types';\nimport { createStackParser } from '@sentry/utils';\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {\n const frame: StackFrame = {\n filename,\n function: func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nconst chrome: StackLineParserFn = line => {\n const parts = chromeRegex.exec(line);\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nexport const chromeStackLineParser: StackLineParser = [CHROME_PRIORITY, chrome];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko: StackLineParserFn = line => {\n const parts = geckoREgex.exec(line);\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nexport const geckoStackLineParser: StackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs: StackLineParserFn = line => {\n const parts = winjsRegex.exec(line);\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nexport const winjsStackLineParser: StackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10: StackLineParserFn = line => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nexport const opera10StackLineParser: StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11: StackLineParserFn = line => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nexport const opera11StackLineParser: StackLineParser = [OPERA11_PRIORITY, opera11];\n\nexport const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];\n\nexport const defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, filename: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n","import type { TransportMakeRequestResponse } from '@sentry/types';\n\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\nexport type RateLimits = Record;\n\nexport const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header: string, now: number = Date.now()): number {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nexport function disabledUntil(limits: RateLimits, category: string): number {\n return limits[category] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits: RateLimits, category: string, now: number = Date.now()): boolean {\n return disabledUntil(limits, category) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nexport function updateRateLimits(\n limits: RateLimits,\n { statusCode, headers }: TransportMakeRequestResponse,\n now: number = Date.now(),\n): RateLimits {\n const updatedRateLimits: RateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories] = limit.split(':', 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n","import type {\n Envelope,\n EnvelopeItem,\n EnvelopeItemType,\n Event,\n EventDropReason,\n EventItem,\n InternalBaseTransportOptions,\n Transport,\n TransportMakeRequestResponse,\n TransportRequestExecutor,\n} from '@sentry/types';\nimport type { PromiseBuffer, RateLimits } from '@sentry/utils';\nimport {\n SentryError,\n createEnvelope,\n envelopeItemTypeToDataCategory,\n forEachEnvelopeItem,\n isRateLimited,\n logger,\n makePromiseBuffer,\n resolvedSyncPromise,\n serializeEnvelope,\n updateRateLimits,\n} from '@sentry/utils';\n\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport const DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(\n options: InternalBaseTransportOptions,\n makeRequest: TransportRequestExecutor,\n buffer: PromiseBuffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n): Transport {\n let rateLimits: RateLimits = {};\n const flush = (timeout?: number): PromiseLike => buffer.drain(timeout);\n\n function send(envelope: Envelope): PromiseLike {\n const filteredEnvelopeItems: EnvelopeItem[] = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const envelopeItemDataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, envelopeItemDataCategory)) {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope: Envelope = createEnvelope(envelope[0], filteredEnvelopeItems as any);\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason: EventDropReason): void => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = (): PromiseLike =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise();\n } else {\n throw error;\n }\n },\n );\n }\n\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item: Envelope[1][number], type: EnvelopeItemType): Event | undefined {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item as EventItem)[1] : undefined;\n}\n","import { SentryError } from './error';\nimport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array>;\n add(taskProducer: () => PromiseLike): PromiseLike;\n drain(timeout?: number): PromiseLike;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit?: number): PromiseBuffer {\n const buffer: Array> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task: PromiseLike): PromiseLike {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike): PromiseLike {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n","import { isNativeFetch, logger } from '@sentry/utils';\n\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\nlet cachedFetchImpl: FetchImpl | undefined = undefined;\n\nexport type FetchImpl = typeof fetch;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation(): FetchImpl {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(WINDOW.fetch)) {\n return (cachedFetchImpl = WINDOW.fetch.bind(WINDOW));\n }\n\n const document = WINDOW.document;\n let fetchImpl = WINDOW.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n DEBUG_BUILD && logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(WINDOW));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/** Clears cached fetch impl */\nexport function clearCachedFetchImplementation(): void {\n cachedFetchImpl = undefined;\n}\n","import { createTransport } from '@sentry/core';\nimport type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types';\nimport { rejectedSyncPromise } from '@sentry/utils';\n\nimport type { BrowserTransportOptions } from './types';\nimport type { FetchImpl } from './utils';\nimport { clearCachedFetchImplementation, getNativeFetchImplementation } from './utils';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeFetchTransport(\n options: BrowserTransportOptions,\n nativeFetch: FetchImpl = getNativeFetchImplementation(),\n): Transport {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request: TransportRequest): PromiseLike {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions: RequestInit = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60_000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedFetchImplementation();\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n","import { createTransport } from '@sentry/core';\nimport type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\nimport type { BrowserTransportOptions } from './types';\n\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nconst XHR_READYSTATE_DONE = 4;\n\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeXHRTransport(options: BrowserTransportOptions): Transport {\n function makeRequest(request: TransportRequest): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onerror = reject;\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n resolve({\n statusCode: xhr.status,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n });\n }\n };\n\n xhr.open('POST', options.url);\n\n for (const header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n\n xhr.send(request.body);\n });\n }\n\n return createTransport(options, makeRequest);\n}\n","import type { Hub } from '@sentry/core';\nimport {\n Integrations as CoreIntegrations,\n captureSession,\n getClient,\n getCurrentHub,\n getIntegrationsToSetup,\n getReportDialogEndpoint,\n initAndBind,\n startSession,\n} from '@sentry/core';\nimport type { UserFeedback } from '@sentry/types';\nimport {\n addHistoryInstrumentationHandler,\n logger,\n stackParserFromStackParserOptions,\n supportsFetch,\n} from '@sentry/utils';\n\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { ReportDialogOptions } from './helpers';\nimport { WINDOW, wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, HttpContext, LinkedErrors, TryCatch } from './integrations';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport, makeXHRTransport } from './transports';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new HttpContext(),\n];\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n if (typeof __SENTRY_RELEASE__ === 'string') {\n options.release = __SENTRY_RELEASE__;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id) {\n options.release = WINDOW.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n const clientOptions: BrowserClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || (supportsFetch() ? makeFetchTransport : makeXHRTransport),\n };\n\n initAndBind(BrowserClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\ntype NewReportDialogOptions = ReportDialogOptions & { eventId: string }; // eslint-disable-line\n\ninterface ShowReportDialogFunction {\n /**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\n (options: NewReportDialogOptions): void;\n\n /**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n *\n * @deprecated Please always pass an `options` argument with `eventId`. The `hub` argument will not be used in the next version of the SDK.\n */\n // eslint-disable-next-line deprecation/deprecation\n (options?: ReportDialogOptions, hub?: Hub): void;\n}\n\nexport const showReportDialog: ShowReportDialogFunction = (\n // eslint-disable-next-line deprecation/deprecation\n options: ReportDialogOptions = {},\n hub: Hub = getCurrentHub(),\n) => {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const { client, scope } = hub.getStackTop();\n const dsn = options.dsn || (client && client.getDsn());\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n // TODO(v8): Remove this entire if statement. `eventId` will be a required option.\n // eslint-disable-next-line deprecation/deprecation\n if (!options.eventId) {\n // eslint-disable-next-line deprecation/deprecation\n options.eventId = hub.lastEventId();\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const { onClose } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = (event: MessageEvent): void => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n};\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @deprecated This function will be removed in v8.\n * It is not part of Sentry's official API and it's easily replaceable by using a try/catch block\n * and calling Sentry.captureException.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn: (...args: any) => any): any {\n return internalWrap(fn)();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSession({ ignoreDuration: true });\n captureSession();\n\n // We want to create a session for every navigation as well\n addHistoryInstrumentationHandler(({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from !== undefined && from !== to) {\n startSession({ ignoreDuration: true });\n captureSession();\n }\n });\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n */\nexport function captureUserFeedback(feedback: UserFeedback): void {\n const client = getClient();\n if (client) {\n client.captureUserFeedback(feedback);\n }\n}\n","import { assert, warn } from '@ember/debug';\nimport { next } from '@ember/runloop';\nimport { getOwnConfig, isDevelopingApp, macroCondition } from '@embroider/macros';\nimport { startSpan } from '@sentry/browser';\nimport * as Sentry from '@sentry/browser';\nimport { SDK_VERSION } from '@sentry/browser';\nimport { GLOBAL_OBJ } from '@sentry/utils';\nimport Ember from 'ember';\nfunction _getSentryInitConfig() {\n const _global = GLOBAL_OBJ;\n _global.__sentryEmberConfig = _global.__sentryEmberConfig ?? {};\n return _global.__sentryEmberConfig;\n}\nexport function InitSentryForEmber(_runtimeConfig) {\n const environmentConfig = getOwnConfig().sentryConfig;\n assert('Missing configuration.', environmentConfig);\n assert('Missing configuration for Sentry.', environmentConfig.sentry || _runtimeConfig);\n if (!environmentConfig.sentry) {\n // If environment config is not specified but the above assertion passes, use runtime config.\n environmentConfig.sentry = {\n ..._runtimeConfig\n };\n }\n\n // Merge runtime config into environment config, preferring runtime.\n Object.assign(environmentConfig.sentry, _runtimeConfig || {});\n const initConfig = Object.assign({}, environmentConfig.sentry);\n initConfig._metadata = initConfig._metadata || {};\n initConfig._metadata.sdk = {\n name: 'sentry.javascript.ember',\n packages: [{\n name: 'npm:@sentry/ember',\n version: SDK_VERSION\n }],\n version: SDK_VERSION\n };\n\n // Persist Sentry init options so they are identical when performance initializers call init again.\n const sentryInitConfig = _getSentryInitConfig();\n Object.assign(sentryInitConfig, initConfig);\n Sentry.init(initConfig);\n if (macroCondition(isDevelopingApp())) {\n if (environmentConfig.ignoreEmberOnErrorWarning) {\n return;\n }\n next(null, function () {\n warn('Ember.onerror found. Using Ember.onerror can hide some errors (such as flushed runloop errors) from Sentry. Use Sentry.captureException to capture errors within Ember.onError or remove it to have errors caught by Sentry directly. This error can be silenced via addon configuration.', !Ember.onerror, {\n id: '@sentry/ember.ember-onerror-detected'\n });\n });\n }\n}\n\n/**\n * Grabs active transaction off scope.\n *\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\nexport const getActiveTransaction = () => {\n // eslint-disable-next-line deprecation/deprecation\n return Sentry.getCurrentHub().getScope().getTransaction();\n};\nexport const instrumentRoutePerformance = BaseRoute => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const instrumentFunction = async (op, description, fn, args) => {\n return startSpan({\n op,\n name: description,\n origin: 'auto.ui.ember'\n }, () => {\n return fn(...args);\n });\n };\n const routeName = BaseRoute.name;\n return {\n // @ts-expect-error TS2545 We do not need to redefine a constructor here\n [routeName]: class extends BaseRoute {\n beforeModel(...args) {\n return instrumentFunction('ui.ember.route.before_model', this.fullRouteName, super.beforeModel.bind(this), args);\n }\n async model(...args) {\n return instrumentFunction('ui.ember.route.model', this.fullRouteName, super.model.bind(this), args);\n }\n afterModel(...args) {\n return instrumentFunction('ui.ember.route.after_model', this.fullRouteName, super.afterModel.bind(this), args);\n }\n setupController(...args) {\n return instrumentFunction('ui.ember.route.setup_controller', this.fullRouteName, super.setupController.bind(this), args);\n }\n }\n }[routeName];\n};\nexport * from '@sentry/browser';\n\n// init is now the preferred way to call initialization for this addon.\nexport const init = InitSentryForEmber;","import type { Client, ClientOptions } from '@sentry/types';\nimport { consoleSandbox, logger } from '@sentry/utils';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { getCurrentHub } from './hub';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(\n clientClass: ClientClass,\n options: O,\n): void {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n","import Ember from 'ember';\n\nconst { libraries } = Ember;\n\nexport default function initializerFactory(name, version) {\n let registered = false;\n\n return function () {\n if (!registered && name && version) {\n libraries.register(name, version);\n registered = true;\n }\n };\n}\n","import initializerFactory from 'ember-cli-app-version/initializer-factory';\nimport config from '../config/environment';\n\nlet name, version;\nif (config.APP) {\n name = config.APP.name;\n version = config.APP.version;\n}\n\nexport default {\n name: 'App Version',\n initialize: initializerFactory(name, version),\n};\n","export function isFactory(\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n_factoryOrClass) {\n return !true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\n/**\n * Consume each positional and named argument to entangle it in autotracking and\n * enable updates.\n *\n * This is a temporary workaround for a change in the autotracking semantics of\n * the args proxy introduced in `v3.22`. What changed is that arguments are no\n * longer eagerly consumed. Didn’t use an argument? Then updates won’t be run\n * when its value changes. This workaround reproduces the previous behaviour to\n * avoid introducing a breaking change until a suitable transition path is made\n * available.\n */\nlet consumeArgs = noop;\nif (true) {\n consumeArgs = function ({\n positional,\n named\n }) {\n // SAFETY: TS before 4.6 does not correctly/fully resolve the type in a way\n // that allows the type checker to see that `positional` must *always* be\n // something which `extends unknown[]` here, because the underlying\n // machinery is fairly complicated and relies on a fair bit of type\n // recursion. It will stop mattering when we cut v4.0, because we won't be\n // doing this anyway.\n const pos = positional;\n for (let i = 0; i < pos.length; i++) {\n pos[i];\n }\n\n // SAFETY: TS 4.7 does not see that `named` will always be an object here.\n // However, it is guaranteed to be resolved as such by the types. This *may*\n // be a bug (https://github.com/microsoft/TypeScript/issues/48468), but it\n // *should* also stop being relevant once we ship 4.0.\n Object.values(named);\n };\n}\nexport { consumeArgs };","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { capabilities } from '@ember/modifier';\nimport { destroy, registerDestructor } from '@ember/destroyable';\nimport { Element, _implementsModify, Args } from './modifier';\nimport { consumeArgs, isFactory } from '../compat';\nfunction destroyModifier(modifier) {\n modifier.willRemove();\n modifier.willDestroy();\n}\n\n/**\n * The state bucket used throughout the life-cycle of the modifier. Basically a\n * state *machine*, where the framework calls us with the version we hand back\n * to it at each phase. The two states are the two `extends` versions of this\n * below.\n *\n * @internal\n */\n\n/**\n * The `State` after calling `createModifier`, and therefore the state available\n * at the start of `InstallModifier`.\n * @internal\n */\n\n/**\n * The `State` after calling `installModifier`, and therefore the state\n * available in all `updateModifier` calls and in `destroyModifier`.\n * @internal\n */\n\n// Wraps the unsafe (b/c it mutates, rather than creating new state) code that\n// TS does not yet understand.\nfunction installElement(state, element) {\n // SAFETY: this cast represents how we are actually handling the state machine\n // transition: from this point forward in the lifecycle of the modifier, it\n // always behaves as `InstalledState`. It is safe because, and *only*\n // because, we immediately initialize `element`. (We cannot create a new state\n // from the old one because the modifier manager API expects mutation of a\n // single state bucket rather than updating it at hook calls.)\n const installedState = state;\n installedState.element = element;\n return installedState;\n}\nfunction installElementOnInstance(instance, element) {\n // SAFETY: we use the internal API for all class-based modifiers to set this\n // in a way which lets us issue the deprecation warning for anyone accessing\n // `element` as a getter while allowing types to continue working for any\n // existing subclasses (see the discussion on the class definition).\n instance[Element] = element;\n}\nfunction updateArgsOnInstance(instance, args) {\n // SAFETY: we use the internal API for all class-based modifiers to set this\n // in a way which lets us issue the deprecation warning for anyone accessing\n // `args` as a getter while allowing types to continue working for any\n // existing subclasses (see the discussion on the class definition).\n instance[Args] = args;\n}\nexport default class ClassBasedModifierManager {\n constructor(owner) {\n _defineProperty(this, \"capabilities\", capabilities(true ? '3.22' : '3.13'));\n this.owner = owner;\n }\n createModifier(factoryOrClass, args) {\n const Modifier = isFactory(factoryOrClass) ? factoryOrClass.class : factoryOrClass;\n const modifier = new Modifier(this.owner, args);\n registerDestructor(modifier, destroyModifier);\n return {\n instance: modifier,\n implementsModify: _implementsModify(modifier),\n element: null\n };\n }\n installModifier(createdState, element, args) {\n const state = installElement(createdState, element);\n\n // TODO: this can be deleted entirely at v4.\n const {\n instance\n } = state;\n installElementOnInstance(instance, element);\n if (state.implementsModify) {\n instance.modify(element, args.positional, args.named);\n } else {\n // The `consumeArgs()` call provides backwards compatibility on v3 for the\n // deprecated legacy lifecycle hooks (`didInstall`, `didReceiveArguments`,\n // and `didUpdateArguments`), which accidentally had eager consumption\n // semantics prior to Ember 3.22. The new, recommended `modify` hook has\n // the updated lazy semantics associated with normal auto-tracking.\n if (true) {\n consumeArgs(args);\n }\n instance.didReceiveArguments();\n instance.didInstall();\n }\n }\n updateModifier(state, args) {\n const {\n instance\n } = state;\n\n // TODO: remove at 4.0\n updateArgsOnInstance(state.instance, args);\n if (state.implementsModify) {\n instance.modify(state.element, args.positional, args.named);\n } else {\n // The `consumeArgs()` call provides backwards compatibility on v3 for the\n // deprecated legacy lifecycle hooks (`didInstall`, `didReceiveArguments`,\n // and `didUpdateArguments`), which accidentally had eager consumption\n // semantics prior to Ember 3.22. The new, recommended `modify` hook has\n // the updated lazy semantics associated with normal auto-tracking.\n if (true) {\n consumeArgs(args);\n }\n instance.didUpdateArguments();\n instance.didReceiveArguments();\n }\n }\n destroyModifier(state) {\n destroy(state.instance);\n }\n}","import { setOwner } from '@ember/application';\nimport { setModifierManager } from '@ember/modifier';\nimport Manager from './modifier-manager';\nimport { isDestroying, isDestroyed } from '@ember/destroyable';\nimport { assert, deprecate } from '@ember/debug';\nimport { DEBUG } from '@glimmer/env';\n\n// SAFETY: these sets are dev-only code to avoid showing deprecations for the\n// same class more than once.\n\nlet SEEN_CLASSES_FOR_LIFECYCLE;\nif (DEBUG) {\n SEEN_CLASSES_FOR_LIFECYCLE = new Set();\n}\nlet SEEN_CLASSES_FOR_DESTROYABLES;\nif (DEBUG) {\n SEEN_CLASSES_FOR_DESTROYABLES = new Set();\n}\nlet SEEN_CLASSES_FOR_ARGS;\nif (DEBUG) {\n SEEN_CLASSES_FOR_ARGS = new Set();\n}\nlet SEEN_CLASSES_FOR_ELEMENTS;\nif (DEBUG) {\n SEEN_CLASSES_FOR_ELEMENTS = new Set();\n}\n\n/** @internal */\nexport const _implementsModify = instance => instance.modify !== ClassBasedModifier.prototype.modify;\n\n/** @internal */\nexport const _implementsLegacyHooks = instance => instance.didInstall !== ClassBasedModifier.prototype.didInstall || instance.didUpdateArguments !== ClassBasedModifier.prototype.didUpdateArguments || instance.didReceiveArguments !== ClassBasedModifier.prototype.didReceiveArguments;\n\n/** @internal */\nexport const Element = Symbol('Element');\n\n/** @internal */\nexport const Args = Symbol('Args');\n\n// Preserve the signature on a class-based modifier so it can be plucked off\n// later (by e.g. Glint), using interface merging with an opaque item to\n// preserve it in the type system. The fact that it's an empty interface is\n// actually the point: it *only* hooks the type parameter into the opaque\n// (nominal) type. Note that this is distinct from the function-based modifier\n// type intentionally, because it is actually the static class side of a\n// class-based modifier which corresponds to the result of calling `modifier()`\n// with a callback defining a function-based modifier.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\n\n/**\n * A base class for modifiers which need more capabilities than function-based\n * modifiers. Useful if, for example:\n *\n * 1. You need to inject services and access them\n * 2. You need fine-grained control of updates, either for performance or\n * convenience reasons, and don't want to teardown the state of your modifier\n * every time only to set it up again.\n * 3. You need to store some local state within your modifier.\n *\n * The lifecycle hooks of class modifiers are tracked. When they run, they any\n * values they access will be added to the modifier, and the modifier will\n * update if any of those values change.\n */\nexport default class ClassBasedModifier {\n // Done this way with the weird combination of `declare` and `defineProperty`\n // so that subclasses which are overriding this by writing their own `args`\n // field type declarations continue to type check correctly. (If we introduced\n // a getter here, existing classes defining their args via a `declare args:`\n // would stop type checking, because TS -- correctly! -- differentiates\n // between class fields and getters).\n /**\n * The arguments passed to the modifier. `args.positional` is an array of\n * positional arguments, and `args.named` is an object containing the named\n * arguments.\n *\n * @deprecated Until 4.0. Access positional and named arguments directly in\n * the `modify` hook instead.\n */\n\n // Done this way with the weird combination of `declare` and `defineProperty`\n // so that subclasses which are overriding this by writing their own `element`\n // field declarations continue to type check correctly.\n /**\n * The element the modifier is applied to.\n *\n * @warning `element` is ***not*** available during `constructor` or\n * `willDestroy`.\n * @deprecated Until 4.0. Access the `element` as an argument in the `modify`\n * hook instead.\n */\n\n constructor(owner, args) {\n setOwner(this, owner);\n\n // SAFETY: the point here is (for the period where we are providing `args`\n // and `element`) to provide an internal-only way of setting and update the\n // `args` for the modifier instance; we use the `InternalClassBasedModifier`\n // interface to represent the internal-only API in a way that end users do\n // *not* have access to when subclassing `ClassBasedModifier`.\n this[Args] = args;\n assert('ember-modifier: You cannot implement both `modify` and any of the deprecated legacy lifecycle hooks (`didInstall`, `didReceiveArguments`, and `didUpdateArguments`)', !(_implementsModify(this) && _implementsLegacyHooks(this)));\n deprecate(`ember-modifier (in ${this.constructor.name} at ${new Error().stack}): \\`willDestroy\\`, \\`isDestroyed\\`, and \\`isDestroyed\\` are deprecated. Use the corresponding API from '@ember/destroyable' instead.`, this.willDestroy === ClassBasedModifier.prototype.willDestroy || SEEN_CLASSES_FOR_DESTROYABLES.has(this.constructor), {\n id: 'ember-modifier.use-destroyables',\n until: '4.0.0',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n }\n });\n if (DEBUG && !SEEN_CLASSES_FOR_DESTROYABLES.has(this.constructor)) {\n SEEN_CLASSES_FOR_DESTROYABLES.add(this.constructor);\n }\n deprecate(`ember-modifier (in ${this.constructor.name} at ${new Error().stack}): The \\`didInstall\\`, \\`didReceiveArguments\\`, and \\`didUpdateArguments\\` hooks are deprecated. Use the new \\`modify\\` hook instead.`, _implementsModify(this) || SEEN_CLASSES_FOR_LIFECYCLE.has(this.constructor), {\n id: 'ember-modifier.use-modify',\n until: '4.0.0',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n }\n });\n if (DEBUG && !SEEN_CLASSES_FOR_LIFECYCLE.has(this.constructor)) {\n SEEN_CLASSES_FOR_LIFECYCLE.add(this.constructor);\n }\n }\n\n /**\n * Called when the modifier is installed and any time any tracked state used\n * in the modifier changes.\n *\n * If you need to do first-time-only setup, create a class field representing\n * the initialization state and check it when running the hook. That is also\n * where and when you should use `registerDestructor` for any teardown you\n * need to do. For example:\n *\n * ```js\n * function disconnect(instance) {\n * instance.observer?.disconnect();\n * }\n *\n * class IntersectionObserver extends Modifier {\n * observer;\n *\n * constructor(owner, args) {\n * super(owner, args);\n * registerDestructor(this, disconnect);\n * }\n *\n * modify(element, callback, options) {\n * disconnect(this);\n *\n * this.observer = new IntersectionObserver(callback, options);\n * this.observer.observe(element);\n * }\n * }\n * ```\n *\n * @param element The element to which the modifier is applied.\n * @param positional The positional arguments to the modifier.\n * @param named The named arguments to the modifier.\n */\n modify( /* eslint-disable @typescript-eslint/no-unused-vars */\n element, positional, named) {\n /* no op, for subclassing */\n }\n\n /**\n * Called when the modifier is installed **and** anytime the arguments are\n * updated.\n *\n * @deprecated Until 4.0. Use `modify()`.\n */\n didReceiveArguments() {\n /* no op, for subclassing */\n }\n\n /**\n * Called anytime the arguments are updated but **not** on the initial\n * install. Called before `didReceiveArguments`.\n *\n * @deprecated Until 4.0. Use `modify()`.\n */\n didUpdateArguments() {\n /* no op, for subclassing */\n }\n\n /**\n * Called when the modifier is installed on the DOM element. Called after\n * `didReceiveArguments`.\n *\n * @deprecated Until 4.0. Use `modify()`.\n */\n didInstall() {\n /* no op, for subclassing */\n }\n\n /**\n * Called when the DOM element is about to be destroyed; use for removing\n * event listeners on the element and other similar clean-up tasks.\n *\n * @deprecated since 2.0.0: prefer to use `willDestroy`, since both it and\n * `willRemove` can perform all the same operations, including on the\n * `element`.\n */\n willRemove() {\n /* no op, for subclassing */\n }\n\n /**\n * Called when the modifier itself is about to be destroyed; use for teardown\n * code. Called after `willRemove`.\n *\n * @deprecated Until 4.0. Use `registerDestructor` from `@ember/destroyables`.\n */\n willDestroy() {\n /* no op, for subclassing */\n }\n\n /**\n * @deprecated Until 4.0. Use `isDestroying` from `@ember/destroyables`.\n */\n get isDestroying() {\n deprecate('Modifier.isDestroying is deprecated', SEEN_CLASSES_FOR_DESTROYABLES.has(this.constructor), {\n id: 'ember-modifier.use-destroyables',\n until: '4.0.0',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n }\n });\n if (DEBUG && !SEEN_CLASSES_FOR_DESTROYABLES.has(this.constructor)) {\n SEEN_CLASSES_FOR_DESTROYABLES.add(this.constructor);\n }\n return isDestroying(this);\n }\n\n /**\n * @deprecated Until 4.0. Use `isDestroyed` from `@ember/destroyables`.\n */\n get isDestroyed() {\n deprecate('Modifier.isDestroyed is deprecated', SEEN_CLASSES_FOR_DESTROYABLES.has(this.constructor), {\n id: 'ember-modifier.use-destroyables',\n until: '4.0.0',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n }\n });\n if (DEBUG && !SEEN_CLASSES_FOR_DESTROYABLES.has(this.constructor)) {\n SEEN_CLASSES_FOR_DESTROYABLES.add(this.constructor);\n }\n return isDestroyed(this);\n }\n}\n\n// We apply these here, against the prototype, so that there is only one of\n// these, rather than one per instance. We also only issue the deprecation once\n// per class for each of `args` and `element`.\nObject.defineProperty(ClassBasedModifier.prototype, 'args', {\n enumerable: true,\n get() {\n deprecate(`ember-modifier (in ${this.constructor.name} at ${new Error().stack}): using \\`this.args\\` is deprecated. Access positional and named arguments directly in the \\`modify\\` hook instead.`, SEEN_CLASSES_FOR_ARGS.has(this.constructor), {\n id: 'ember-modifier.no-args-property',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n },\n until: '4.0.0'\n });\n if (DEBUG && !SEEN_CLASSES_FOR_ARGS.has(this.constructor)) {\n SEEN_CLASSES_FOR_ARGS.add(this.constructor);\n }\n return this[Args];\n }\n});\nObject.defineProperty(ClassBasedModifier.prototype, 'element', {\n enumerable: true,\n get() {\n deprecate(`ember-modifier (in ${this.constructor.name} at ${new Error().stack}): using \\`this.element\\` is deprecated. Access the \\`element\\` as an argument in the \\`modify\\` hook instead.`, SEEN_CLASSES_FOR_ELEMENTS.has(this.constructor), {\n id: 'ember-modifier.no-element-property',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n },\n until: '4.0.0'\n });\n if (DEBUG && !SEEN_CLASSES_FOR_ELEMENTS.has(this.constructor)) {\n SEEN_CLASSES_FOR_ELEMENTS.add(this.constructor);\n }\n return this[Element] ?? null;\n }\n});\n\n/**\n * @internal This provides an interface we can use to backwards-compatibly set\n * up the element in a way that external callers will not have access to or\n * even see.\n */\n\nsetModifierManager(owner => new Manager(owner), ClassBasedModifier);","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { capabilities } from '@ember/modifier';\nimport { consumeArgs, isFactory } from '../compat';\n// Wraps the unsafe (b/c it mutates, rather than creating new state) code that\n// TS does not yet understand.\nfunction installElement(state, element) {\n // SAFETY: this cast represents how we are actually handling the state machine\n // transition: from this point forward in the lifecycle of the modifier, it\n // always behaves as `InstalledState`. It is safe because, and *only*\n // because, we immediately initialize `element`. (We cannot create a new state\n // from the old one because the modifier manager API expects mutation of a\n // single state bucket rather than updating it at hook calls.)\n const installedState = state;\n installedState.element = element;\n return installedState;\n}\nexport default class FunctionBasedModifierManager {\n constructor(options) {\n _defineProperty(this, \"capabilities\", capabilities(true ? '3.22' : '3.13'));\n _defineProperty(this, \"options\", void 0);\n this.options = {\n eager: options?.eager ?? true\n };\n }\n createModifier(factoryOrClass) {\n const instance = isFactory(factoryOrClass) ? factoryOrClass.class : factoryOrClass;\n return {\n element: null,\n instance: instance\n };\n }\n installModifier(createdState, element, args) {\n const state = installElement(createdState, element);\n const {\n positional,\n named\n } = args;\n const teardown = createdState.instance(element, positional, named);\n if (typeof teardown === 'function') {\n state.teardown = teardown;\n }\n if (true && this.options.eager) {\n consumeArgs(args);\n }\n }\n updateModifier(state, args) {\n if (state.teardown) {\n state.teardown();\n }\n const teardown = state.instance(state.element, args.positional, args.named);\n if (typeof teardown === 'function') {\n state.teardown = teardown;\n }\n if (true && this.options.eager) {\n consumeArgs(args);\n }\n }\n destroyModifier(state) {\n if (typeof state.teardown === 'function') {\n state.teardown();\n }\n }\n}","import { deprecate } from '@ember/debug';\nimport { setModifierManager } from '@ember/modifier';\nimport Modifier from '../class/modifier';\nimport FunctionBasedModifierManager from './modifier-manager';\n\n// Provide a singleton manager for each of the options. (If we extend this to\n// many more options in the future, we can revisit, but for now this means we\n// only ever allocate two managers.)\nconst EAGER_MANAGER = new FunctionBasedModifierManager({\n eager: true\n});\nconst LAZY_MANAGER = new FunctionBasedModifierManager({\n eager: false\n});\n\n// This type exists to provide a non-user-constructible, non-subclassable\n// type representing the conceptual \"instance type\" of a function modifier.\n// The abstract field of type `never` prevents subclassing in userspace of\n// the value returned from `modifier()`. By extending `Modifier`, any\n// augmentations of the `Modifier` type performed by tools like Glint will\n// also apply to function-based modifiers as well.\n\n// This provides a type whose only purpose here is to represent the runtime\n// type of a function-based modifier: a virtually opaque item. The fact that it's\n// a bare constructor type allows `modifier()` to preserve type parameters from\n// a generic function it's passed, and by making it abstract and impossible to\n// subclass (see above) we prevent users from attempting to instantiate the return\n// value from a `modifier()` call.\n\n/**\n * The (optional) return type for a modifier which needs to perform some kind of\n * cleanup or teardown -- for example, removing an event listener from an\n * element besides the one passed into the modifier.\n */\n\n/**\n * An API for writing simple modifiers.\n *\n * This function runs the first time when the element the modifier was applied\n * to is inserted into the DOM, and it *autotracks* while running. Any values\n * that it accesses will be tracked, and if any of them changes, the function\n * will run again.\n *\n * **Note:** this will rerun if any of its arguments change, *whether or not you\n * access them*. This is legacy behavior and you should switch to using the\n * `{ eager: false }` variant, which has normal auto-tracking semantics.\n *\n * The modifier can also optionally return a *destructor*. The destructor\n * function will be run just before the next update, and when the element is\n * being removed entirely. It should generally clean up the changes that the\n * modifier made in the first place.\n *\n * @deprecated Until 4.0. Calling `modifier()` without an options argument is\n * deprecated. It is supported until 4.0 so that existing modifiers can be\n * migrated individually. Please update your function-based modifiers to pass\n * `{ eager: false }`.\n *\n * @param fn The function which defines the modifier.\n */\n// This overload allows users to write types directly on the callback passed to\n// the `modifier` function and infer the resulting type correctly.\n\n/**\n * An API for writing simple modifiers.\n *\n * This function runs the first time when the element the modifier was applied\n * to is inserted into the DOM, and it *autotracks* while running. Any values\n * that it accesses will be tracked, and if any of them changes, the function\n * will run again.\n *\n * **Note:** this will rerun if any of its arguments change, *whether or not you\n * access them*. This is legacy behavior and you should switch to using the\n * `{ eager: false }` variant, which has normal auto-tracking semantics.\n *\n * The modifier can also optionally return a *destructor*. The destructor\n * function will be run just before the next update, and when the element is\n * being removed entirely. It should generally clean up the changes that the\n * modifier made in the first place.\n *\n * @deprecated Until 4.0. Calling `modifier()` with `{ eager: true }` is\n * deprecated. It is supported until 4.0 so that existing modifiers can be\n * migrated individually. Please update your function-based modifiers to pass\n * `{ eager: false }`.\n *\n * @param fn The function which defines the modifier.\n * @param options Configuration for the modifier.\n */\n// This overload allows users to write types directly on the callback passed to\n// the `modifier` function and infer the resulting type correctly.\n\n/**\n * An API for writing simple modifiers.\n *\n * This function runs the first time when the element the modifier was applied\n * to is inserted into the DOM, and it *autotracks* while running. Any values\n * that it accesses will be tracked, including any of its arguments that it\n * accesses, and if any of them changes, the function will run again.\n *\n * **Note:** this will *not* automatically rerun because an argument changes. It\n * will only rerun if it is *using* that argument (the same as with auto-tracked\n * state in general).\n *\n * The modifier can also optionally return a *destructor*. The destructor\n * function will be run just before the next update, and when the element is\n * being removed entirely. It should generally clean up the changes that the\n * modifier made in the first place.\n *\n * @param fn The function which defines the modifier.\n * @param options Configuration for the modifier.\n */\n// This overload allows users to write types directly on the callback passed to\n// the `modifier` function and infer the resulting type correctly.\n\n/**\n * An API for writing simple modifiers.\n *\n * This function runs the first time when the element the modifier was applied\n * to is inserted into the DOM, and it *autotracks* while running. Any values\n * that it accesses will be tracked, including any of its arguments that it\n * accesses, and if any of them changes, the function will run again.\n *\n * **Note:** this will *not* automatically rerun because an argument changes. It\n * will only rerun if it is *using* that argument (the same as with auto-tracked\n * state in general).\n *\n * The modifier can also optionally return a *destructor*. The destructor\n * function will be run just before the next update, and when the element is\n * being removed entirely. It should generally clean up the changes that the\n * modifier made in the first place.\n *\n * @param fn The function which defines the modifier.\n * @param options Configuration for the modifier.\n */\n// This overload allows users to provide a `Signature` type explicitly at the\n// modifier definition site, e.g. `modifier((el, pos, named) => {...})`.\n// **Note:** this overload must appear second, since TS' inference engine will\n// not correctly infer the type of `S` here from the types on the supplied\n// callback.\n\n// This is the runtime signature; it performs no inference whatsover and just\n// uses the simplest version of the invocation possible since, for the case of\n// setting it on the modifier manager, we don't *need* any of that info, and\n// the two previous overloads capture all invocations from a type perspective.\nexport default function modifier(fn, options = {\n eager: true\n}) {\n deprecate(`ember-modifier (for ${fn.name ?? fn} at ${new Error().stack}): creating a function-based modifier without options is deprecated and will be removed at v4.0`, options !== undefined, {\n id: 'ember-modifier.function-based-options',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n },\n until: '4.0.0'\n });\n deprecate(`ember-modifier (for ${fn.name ?? fn} at ${new Error().stack}): creating a function-based modifier with \\`{ eager: true }\\` is deprecated and will be removed at v4.0`, options?.eager === false, {\n id: 'ember-modifier.function-based-options',\n for: 'ember-modifier',\n since: {\n available: '3.2.0',\n enabled: '3.2.0'\n },\n until: '4.0.0'\n });\n\n // SAFETY: the cast here is a *lie*, but it is a useful one. The actual return\n // type of `setModifierManager` today is `void`; we pretend it actually\n // returns an opaque `Modifier` type so that we can provide a result from this\n // type which is useful to TS-aware tooling (e.g. Glint).\n return setModifierManager(() => options.eager ? EAGER_MANAGER : LAZY_MANAGER, fn);\n}\n\n/**\n * @internal\n */\n\n/**\n * @deprecated Instead of defining a function to match this type, simply define\n * a function-based modifier either using a `Signature` or by defining the\n * types on the callback passed to the `modifier`.\n */","// https://github.com/zeppelin/ember-click-outside/issues/23\n\nconst proto = typeof Element !== 'undefined' ? Element.prototype : {};\nconst vendor = proto.matches || proto.matchesSelector || proto.webkitMatchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector;\nexport function matches(el, selector) {\n if (!el || el.nodeType !== 1) return false;\n if (vendor) return vendor.call(el, selector);\n var nodes = el.parentNode.querySelectorAll(selector);\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i] == el) return true;\n }\n return false;\n}","/* eslint no-console: \"off\" */\nimport { matches } from './-private/matches-selector';\nexport function closest(element, selector) {\n if (matches(element, selector)) {\n return element;\n }\n while (element.parentNode) {\n element = element.parentNode;\n if (matches(element, selector)) {\n return element;\n }\n }\n}\nexport const documentOrBodyContains = element => {\n // https://github.com/zeppelin/ember-click-outside/issues/30\n if (typeof document.contains === 'function') {\n return document.contains(element);\n } else {\n return document.body.contains(element);\n }\n};\nexport const ios = () => {\n return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n};\n\n// https://github.com/mike-north/ember-deprecated/blob/master/addon/utils.js\nexport function printConsoleMessage(msg) {\n if (console.trace) {\n if (console.groupCollapsed) {\n console.groupCollapsed(msg);\n console.trace();\n console.groupEnd();\n } else {\n console.warn(msg);\n console.trace();\n }\n } else {\n console.warn(msg);\n }\n}","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { next, cancel } from '@ember/runloop';\nimport { registerDestructor } from '@ember/destroyable';\nimport Modifier from 'ember-modifier';\nimport { closest, documentOrBodyContains, ios } from './utils';\nexport default class ClickOutsideModifier extends Modifier {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"didSetup\", false);\n _defineProperty(this, \"action\", null);\n _defineProperty(this, \"capture\", null);\n _defineProperty(this, \"eventHandler\", null);\n _defineProperty(this, \"eventType\", 'click');\n _defineProperty(this, \"exceptSelector\", null);\n _defineProperty(this, \"cancelOutsideListenerSetup\", null);\n _defineProperty(this, \"cleanup\", () => {\n this._destroy();\n if (ios()) {\n document.body.style.cursor = '';\n }\n });\n registerDestructor(this, this.cleanup);\n }\n modify(element, [action], {\n capture,\n eventType,\n exceptSelector\n }) {\n if (!this.didSetup) {\n if (ios()) {\n document.body.style.cursor = 'pointer';\n }\n this.didSetup = true;\n } else {\n this._destroy();\n }\n this._init({\n element,\n action,\n capture,\n eventType,\n exceptSelector\n });\n }\n _init({\n element,\n action,\n capture,\n eventType,\n exceptSelector\n }) {\n if (!action) {\n return;\n }\n this.action = action;\n this.exceptSelector = exceptSelector;\n this.capture = capture;\n if (eventType) {\n this.eventType = eventType;\n }\n this.eventHandler = this._createHandler(element, this.action, this.exceptSelector);\n this.cancelOutsideListenerSetup = next(this, this._addClickOutsideListener);\n }\n _destroy() {\n if (!this.action) {\n return;\n }\n cancel(this.cancelOutsideListenerSetup);\n this._removeClickOutsideListener();\n }\n _addClickOutsideListener() {\n let {\n capture,\n eventHandler,\n eventType\n } = this;\n document.addEventListener(eventType, eventHandler, {\n capture\n });\n }\n _removeClickOutsideListener() {\n let {\n capture,\n eventHandler,\n eventType\n } = this;\n document.removeEventListener(eventType, eventHandler, {\n capture\n });\n }\n _createHandler(element, action, exceptSelector) {\n return e => {\n if (exceptSelector && closest(e.target, exceptSelector)) {\n return;\n }\n let path = e.path || e.composedPath && e.composedPath();\n if (path) {\n path.includes(element) || action(e);\n } else {\n // Check if the click target still is in the DOM.\n // If not, there is no way to know if it was inside the element or not.\n let isRemoved = !e.target || !documentOrBodyContains(e.target);\n\n // Check the element is found as a parent of the click target.\n let isInside = element === e.target || element.contains(e.target);\n if (!isRemoved && !isInside) {\n action(e);\n }\n }\n };\n }\n}","import { typeOf, isEmpty } from '@ember/utils';\n\nexport const serializeCookie = (name, value, options = {}) => {\n let cookie = `${name}=${value}`;\n\n if (!isEmpty(options.domain)) {\n cookie = `${cookie}; domain=${options.domain}`;\n }\n if (typeOf(options.expires) === 'date') {\n cookie = `${cookie}; expires=${options.expires.toUTCString()}`;\n }\n if (!isEmpty(options.maxAge)) {\n cookie = `${cookie}; max-age=${options.maxAge}`;\n }\n if (options.secure) {\n cookie = `${cookie}; secure`;\n }\n if (options.httpOnly) {\n cookie = `${cookie}; httpOnly`;\n }\n if (!isEmpty(options.path)) {\n cookie = `${cookie}; path=${options.path}`;\n }\n if (!isEmpty(options.sameSite)) {\n cookie = `${cookie}; SameSite=${options.sameSite}`;\n }\n\n return cookie;\n};\n","import { isNone, isPresent, isEmpty } from '@ember/utils';\nimport { get } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { getOwner } from '@ember/application';\nimport Service from '@ember/service';\nimport { merge, assign as emberAssign } from '@ember/polyfills';\nimport { serializeCookie } from '../utils/serialize-cookie';\nconst { keys } = Object;\nconst assign = Object.assign || emberAssign || merge;\nconst DEFAULTS = { raw: false };\nconst MAX_COOKIE_BYTE_LENGTH = 4096;\n\nexport default Service.extend({\n init() {\n this._super(...arguments);\n\n this._document = this._document || window.document;\n if (typeof this._fastBoot === 'undefined') {\n let owner = getOwner(this);\n\n this._fastBoot = owner.lookup('service:fastboot');\n }\n },\n\n _getDocumentCookies() {\n let all = this._document.cookie.split(';');\n let filtered = this._filterDocumentCookies(all);\n\n return filtered.reduce((acc, cookie) => {\n if (!isEmpty(cookie)) {\n let [key, value] = cookie;\n acc[key.trim()] = (value || '').trim();\n }\n return acc;\n }, {});\n },\n\n _getFastBootCookies() {\n let fastBootCookies = get(this._fastBoot, 'request.cookies');\n fastBootCookies = keys(fastBootCookies).reduce((acc, name) => {\n let value = fastBootCookies[name];\n acc[name] = { value };\n return acc;\n }, {});\n\n let fastBootCookiesCache = this._fastBootCookiesCache || {};\n fastBootCookies = assign({}, fastBootCookies, fastBootCookiesCache);\n this._fastBootCookiesCache = fastBootCookies;\n\n return this._filterCachedFastBootCookies(fastBootCookies);\n },\n\n read(name, options = {}) {\n options = assign({}, DEFAULTS, options || {});\n assert('Domain, Expires, Max-Age, and Path options cannot be set when reading cookies', isEmpty(options.domain) && isEmpty(options.expires) && isEmpty(options.maxAge) && isEmpty(options.path));\n\n let all;\n if (this._isFastBoot()) {\n all = this._getFastBootCookies();\n } else {\n all = this._getDocumentCookies();\n }\n\n if (name) {\n return this._decodeValue(all[name], options.raw);\n } else {\n keys(all).forEach((name) => (all[name] = this._decodeValue(all[name], options.raw)));\n return all;\n }\n },\n\n write(name, value, options = {}) {\n options = assign({}, DEFAULTS, options || {});\n assert(\"Cookies cannot be set as signed as signed cookies would not be modifyable in the browser as it has no knowledge of the express server's signing key!\", !options.signed);\n assert('Cookies cannot be set with both maxAge and an explicit expiration time!', isEmpty(options.expires) || isEmpty(options.maxAge));\n\n value = this._encodeValue(value, options.raw);\n\n assert(`Cookies larger than ${MAX_COOKIE_BYTE_LENGTH} bytes are not supported by most browsers!`, this._isCookieSizeAcceptable(value));\n\n if (this._isFastBoot()) {\n this._writeFastBootCookie(name, value, options);\n } else {\n assert('Cookies cannot be set to be HTTP-only from a browser!', !options.httpOnly);\n\n options.path = options.path || this._normalizedDefaultPath();\n this._writeDocumentCookie(name, value, options);\n }\n },\n\n clear(name, options = {}) {\n options = assign({}, options || {});\n assert('Expires, Max-Age, and raw options cannot be set when clearing cookies', isEmpty(options.expires) && isEmpty(options.maxAge) && isEmpty(options.raw));\n\n options.expires = new Date('1970-01-01');\n options.path = options.path || this._normalizedDefaultPath();\n this.write(name, null, options);\n },\n\n exists(name) {\n let all;\n if (this._isFastBoot()) {\n all = this._getFastBootCookies();\n } else {\n all = this._getDocumentCookies();\n }\n\n return all.hasOwnProperty(name);\n },\n\n _writeDocumentCookie(name, value, options = {}) {\n let serializedCookie = this._serializeCookie(name, value, options);\n this._document.cookie = serializedCookie;\n },\n\n _writeFastBootCookie(name, value, options = {}) {\n let responseHeaders = get(this._fastBoot, 'response.headers');\n let serializedCookie = this._serializeCookie(...arguments);\n\n if (!isEmpty(options.maxAge)) {\n options.maxAge *= 1000;\n }\n\n this._cacheFastBootCookie(...arguments);\n\n let replaced = false;\n let existing = responseHeaders.getAll('set-cookie');\n\n for (let i = 0; i < existing.length; i++) {\n if (existing[i].startsWith(`${name}=`)) {\n existing[i] = serializedCookie;\n replaced = true;\n break;\n }\n }\n\n if (!replaced) {\n responseHeaders.append('set-cookie', serializedCookie);\n }\n },\n\n _cacheFastBootCookie(name, value, options = {}) {\n let fastBootCache = this._fastBootCookiesCache || {};\n let cachedOptions = assign({}, options);\n\n if (cachedOptions.maxAge) {\n let expires = new Date();\n expires.setSeconds(expires.getSeconds() + options.maxAge);\n cachedOptions.expires = expires;\n delete cachedOptions.maxAge;\n }\n\n fastBootCache[name] = { value, options: cachedOptions };\n this._fastBootCookiesCache = fastBootCache;\n },\n\n _filterCachedFastBootCookies(fastBootCookies) {\n let { path: requestPath, protocol } = get(this._fastBoot, 'request');\n\n // cannot use deconstruct here\n let host = get(this._fastBoot, 'request.host');\n\n return keys(fastBootCookies).reduce((acc, name) => {\n let { value, options } = fastBootCookies[name];\n options = options || {};\n\n let { path: optionsPath, domain, expires, secure } = options;\n\n if (optionsPath && requestPath.indexOf(optionsPath) !== 0) {\n return acc;\n }\n\n if (domain && host.indexOf(domain) + domain.length !== host.length) {\n return acc;\n }\n\n if (expires && expires < new Date()) {\n return acc;\n }\n\n if (secure && !(protocol || '').match(/^https/)) {\n return acc;\n }\n\n acc[name] = value;\n return acc;\n }, {});\n },\n\n _encodeValue(value, raw) {\n if (isNone(value)) {\n return '';\n } else if (raw) {\n return value;\n } else {\n return encodeURIComponent(value);\n }\n },\n\n _decodeValue(value, raw) {\n if (isNone(value) || raw) {\n return value;\n } else {\n return decodeURIComponent(value);\n }\n },\n\n _filterDocumentCookies(unfilteredCookies) {\n return unfilteredCookies.map((c) => {\n let separatorIndex = c.indexOf('=');\n return [c.substring(0, separatorIndex), c.substring(separatorIndex + 1)];\n })\n .filter((c) => c.length === 2 && isPresent(c[0]));\n },\n\n _serializeCookie(name, value, options = {}) {\n return serializeCookie(name, value, options);\n },\n\n _isCookieSizeAcceptable(value) {\n // Counting bytes varies Pre-ES6 and in ES6\n // This snippet counts the bytes in the value\n // about to be stored as the cookie:\n // See https://stackoverflow.com/a/25994411/6657064\n let _byteCount = 0;\n let i = 0;\n let c;\n while ((c = value.charCodeAt(i++))) {\n /* eslint-disable no-bitwise */\n _byteCount += c >> 11 ? 3 : c >> 7 ? 2 : 1;\n /* eslint-enable no-bitwise */\n }\n\n return _byteCount < MAX_COOKIE_BYTE_LENGTH;\n },\n\n _normalizedDefaultPath() {\n if (!this._isFastBoot()) {\n let pathname = window.location.pathname;\n return pathname.substring(0, pathname.lastIndexOf('/'));\n }\n },\n\n _isFastBoot() {\n return this._fastBoot && this._fastBoot.isFastBoot;\n }\n});\n","import CookiesService from 'ember-cookies/services/cookies';\n\nexport default CookiesService;\n","import 'ember-data';\n\nimport setupContainer from 'ember-data/setup-container';\n\n/*\n This code initializes EmberData in an Ember application.\n*/\nexport default {\n name: 'ember-data',\n initialize: setupContainer,\n};\n","/* exists only for things that historically used \"after\" or \"before\" */\nexport default {\n name: 'ember-data',\n initialize() {},\n};\n","export default \"4.6.5\";\n","import Namespace from '@ember/application/namespace';\nimport Ember from 'ember';\nimport VERSION from 'ember-data/version';\nconst DS = Namespace.create({\n VERSION: VERSION,\n name: 'DS'\n});\nif (Ember.libraries) {\n Ember.libraries.registerCoreLibrary('Ember Data', VERSION);\n}\nexport default DS;","import 'ember-inflector';\nimport { dependencySatisfies, importSync, macroCondition } from '@embroider/macros';\nimport Adapter, { BuildURLMixin } from '@ember-data/adapter';\nimport AdapterError, { AbortError, ConflictError, errorsArrayToHash, errorsHashToArray, ForbiddenError, InvalidError, NotFoundError, ServerError, TimeoutError, UnauthorizedError } from '@ember-data/adapter/error';\nimport JSONAPIAdapter from '@ember-data/adapter/json-api';\nimport RESTAdapter from '@ember-data/adapter/rest';\nimport Model, { attr, belongsTo, hasMany } from '@ember-data/model';\nimport Serializer from '@ember-data/serializer';\nimport { BooleanTransform, DateTransform, NumberTransform, StringTransform } from '@ember-data/serializer/-private';\nimport JSONSerializer from '@ember-data/serializer/json';\nimport JSONAPISerializer from '@ember-data/serializer/json-api';\nimport RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport Transform from '@ember-data/serializer/transform';\nimport Store, { normalizeModelName } from '@ember-data/store';\nimport { AdapterPopulatedRecordArray, DS, Errors, InternalModel, ManyArray, PromiseArray, PromiseManyArray, PromiseObject, RecordArray, RecordArrayManager, Relationship, Snapshot } from './-private';\nimport setupContainer from './setup-container';\nDS.Store = Store;\nDS.PromiseArray = PromiseArray;\nDS.PromiseObject = PromiseObject;\nDS.PromiseManyArray = PromiseManyArray;\nDS.Model = Model;\nDS.attr = attr;\nDS.Errors = Errors;\nDS.InternalModel = InternalModel;\nDS.Snapshot = Snapshot;\nDS.Adapter = Adapter;\nDS.AdapterError = AdapterError;\nDS.InvalidError = InvalidError;\nDS.TimeoutError = TimeoutError;\nDS.AbortError = AbortError;\nDS.UnauthorizedError = UnauthorizedError;\nDS.ForbiddenError = ForbiddenError;\nDS.NotFoundError = NotFoundError;\nDS.ConflictError = ConflictError;\nDS.ServerError = ServerError;\nDS.errorsHashToArray = errorsHashToArray;\nDS.errorsArrayToHash = errorsArrayToHash;\nDS.Serializer = Serializer;\nif (macroCondition(dependencySatisfies('@ember-data/debug', '*'))) {\n DS.DebugAdapter = importSync('@ember-data/debug').default;\n}\nDS.RecordArray = RecordArray;\nDS.AdapterPopulatedRecordArray = AdapterPopulatedRecordArray;\nDS.ManyArray = ManyArray;\nDS.RecordArrayManager = RecordArrayManager;\nDS.RESTAdapter = RESTAdapter;\nDS.BuildURLMixin = BuildURLMixin;\nDS.RESTSerializer = RESTSerializer;\nDS.JSONSerializer = JSONSerializer;\nDS.JSONAPIAdapter = JSONAPIAdapter;\nDS.JSONAPISerializer = JSONAPISerializer;\nDS.Transform = Transform;\nDS.DateTransform = DateTransform;\nDS.StringTransform = StringTransform;\nDS.NumberTransform = NumberTransform;\nDS.BooleanTransform = BooleanTransform;\nDS.EmbeddedRecordsMixin = EmbeddedRecordsMixin;\nDS.belongsTo = belongsTo;\nDS.hasMany = hasMany;\nDS.Relationship = Relationship;\nDS._setupContainer = setupContainer;\nObject.defineProperty(DS, 'normalizeModelName', {\n enumerable: true,\n writable: false,\n configurable: false,\n value: normalizeModelName\n});\nexport default DS;","import Store from '@ember-data/store';\nfunction initializeStore(application) {\n application.registerOptionsForType('serializer', {\n singleton: false\n });\n application.registerOptionsForType('adapter', {\n singleton: false\n });\n if (!application.hasRegistration('service:store')) {\n application.register('service:store', Store);\n }\n}\nexport default function setupContainer(application) {\n initializeStore(application);\n}","const candidateSelectors = [\n 'input',\n 'select',\n 'textarea',\n 'a[href]',\n 'button',\n '[tabindex]:not(slot)',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n 'details>summary:first-of-type',\n 'details',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n ? function () {}\n : Element.prototype.matches ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n !NoElement && Element.prototype.getRootNode\n ? (element) => element.getRootNode()\n : (element) => element.ownerDocument;\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n let candidates = Array.prototype.slice.apply(\n el.querySelectorAll(candidateSelector)\n );\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.}\n */\nconst getCandidatesIteratively = function (\n elements,\n includeContainer,\n options\n) {\n const candidates = [];\n const elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n const element = elementsToCheck.shift();\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n const assigned = element.assignedElements();\n const content = assigned.length ? assigned : element.children;\n const nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push(...nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: nestedCandidates,\n });\n }\n } else {\n // check candidate element\n const validCandidate = matches.call(element, candidateSelector);\n if (\n validCandidate &&\n options.filter(element) &&\n (includeContainer || !elements.includes(element))\n ) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n const shadowRoot =\n element.shadowRoot ||\n // check for an undisclosed shadow\n (typeof options.getShadowRoot === 'function' &&\n options.getShadowRoot(element));\n\n const validShadowRoot =\n !options.shadowRootFilter || options.shadowRootFilter(element);\n\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n const nestedCandidates = getCandidatesIteratively(\n shadowRoot === true ? element.children : shadowRoot.children,\n true,\n options\n );\n\n if (options.flatten) {\n candidates.push(...nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: nestedCandidates,\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift(...element.children);\n }\n }\n }\n return candidates;\n};\n\nconst getTabindex = function (node, isScope) {\n if (node.tabIndex < 0) {\n // in Chrome,
,