lint-to-the-future
Version:
A modern way to progressively update your code to the best practices
2,319 lines • 313 kB
JavaScript
"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[166],{9424:(e,t,n)=>{n.r(t),n.d(t,{graphFor:()=>Z,isBelongsTo:()=>u,peekGraph:()=>Y})
var i=n(1603),r=n(921),s=n(3175)
function o(e){return e._store}function a(e,t,n){return(e[t]=e[t]||Object.create(null))[n]}function l(e,t,n,i){(e[t]=e[t]||Object.create(null))[n]=i}function c(e){if(!e.id)return!0
const t=(0,r.oX)(e)
return Boolean(t?.isNew(e))}function u(e){return"belongsTo"===e.definition.kind}function d(e){return e.definition.isImplicit}function h(e){return"hasMany"===e.definition.kind}function f(e,t){if(u(e))e.remoteState&&t(e.remoteState),e.localState&&e.localState!==e.remoteState&&t(e.localState)
else if(h(e)){for(let n=0;n<e.remoteState.length;n++){const i=e.remoteState[n]
t(i)}e.additions?.forEach(t)}else e.localMembers.forEach(t),e.remoteMembers.forEach((n=>{e.localMembers.has(n)||t(n)}))}function p(e,t,n,i){if(u(t))t.remoteState===n&&(t.remoteState=null),t.localState===n&&(t.localState=null,m(e,t.identifier,t.definition.key))
else if(h(t)){t.remoteMembers.delete(n),t.additions?.delete(n)
const i=t.removals?.delete(n),r=t.remoteState.indexOf(n)
if(-1!==r&&t.remoteState.splice(r,1),!i){const i=t.localState?.indexOf(n);-1!==i&&void 0!==i&&(t.localState.splice(i,1),m(e,t.identifier,t.definition.key))}}else t.remoteMembers.delete(n),t.localMembers.delete(n)}function m(e,t,n){t!==e._removing&&e.store.notifyChange(t,"relationships",n)}function g(e){return"belongsTo"===e.kind||"hasMany"===e.kind}const y=null,v=Date.now()
function b(e,t){return`implicit-${e}:${t}${v}`}function _(e,t){e.inverseKind=t.kind,e.inverseKey=t.key,e.inverseType=t.type,e.inverseIsAsync=t.isAsync,e.inverseIsCollection=t.isCollection,e.inverseIsPolymorphic=t.isPolymorphic,e.inverseIsImplicit=t.isImplicit
const n=!1!==e.resetOnRemoteUpdate&&!1!==t.resetOnRemoteUpdate
e.resetOnRemoteUpdate=n,t.resetOnRemoteUpdate=n}function w(e){var t
g(e)||(e={kind:"resource"===(t=e).kind?"belongsTo":"hasMany",name:t.name,type:t.type,options:Object.assign({},{async:!1,inverse:null,resetOnRemoteUpdate:!1},t.options)})
const n={},i=e.options
return n.kind=e.kind,n.key=e.name,n.type=e.type,n.isAsync=i.async,n.isImplicit=!1,n.isCollection="hasMany"===e.kind,n.isPolymorphic=i&&!!i.polymorphic,n.inverseKey=i&&i.inverse||"",n.inverseType="",n.inverseIsAsync=y,n.inverseIsImplicit=i&&null===i.inverse||y,n.inverseIsCollection=y,n.resetOnRemoteUpdate=!!g(e)&&!1!==e.options?.resetOnRemoteUpdate,n}function k(e,t,n){n?function(e,t,n){const r=t.value,s=e.get(t.record,t.field)
n&&e._addToTransaction(s),s.state.hasReceivedData=!0
const{definition:o}=s,{type:a}=s.definition,l=M(r,s,(i=>{a!==i.type&&e.registerPolymorphicType(a,i.type),s.additions?.has(i)?s.additions.delete(i):s.isDirty=!0,T(e,i,o.inverseKey,t.record,n)}),(i=>{s.removals?.has(i)?s.removals.delete(i):s.isDirty=!0,D(e,i,o.inverseKey,t.record,n)}))
if(s.remoteMembers=l.finalSet,s.remoteState=l.finalState,l.changed&&(s.isDirty=!0),s._diff=l,"hasMany"===s.definition.kind&&!1!==s.definition.resetOnRemoteUpdate){const r={removals:[],additions:[],triggered:!1}
s.removals&&(s.isDirty=!0,s.removals.forEach((i=>{r.triggered=!0,r.removals.push(i),T(e,i,o.inverseKey,t.record,n)})),s.removals=null),s.additions&&(s.additions.forEach((i=>{c(i)||(r.triggered=!0,r.additions.push(i),s.isDirty=!0,s.additions.delete(i),D(e,i,o.inverseKey,t.record,n))})),0===s.additions.size&&(s.additions=null)),r.triggered&&(0,i.deprecate)(`EmberData is changing the default semantics of updates to the remote state of relationships.\n\nThe following local state was cleared from the <${s.identifier.type}>.${s.definition.key} hasMany relationship but will not be once this deprecation is resolved by opting into the new behavior:\n\n\tAdded: [${r.additions.map((e=>e.lid)).join(", ")}]\n\tRemoved: [${r.removals.map((e=>e.lid)).join(", ")}]`,!1,{id:"ember-data:deprecate-relationship-remote-update-clearing-local-state",for:"ember-data",since:{enabled:"5.3",available:"5.3"},until:"6.0",url:"https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state"})}s.isDirty&&S(e,s)}(e,t,n):function(e,t,n){const i=t.value,r=e.get(t.record,t.field),s=0===r.remoteState.length&&null===r.localState&&!1===r.state.hasReceivedData
r.state.hasReceivedData=!0
const{additions:o,removals:a}=r,{inverseKey:l,type:c}=r.definition,{record:u}=t,d=r.isDirty
r.isDirty=!1
const h=i=>{const s=a?.has(i)
!s&&o?.has(i)||(c!==i.type&&e.registerPolymorphicType(c,i.type),r.isDirty=!0,T(e,i,l,t.record,n),s&&a.delete(i))},f=t=>{const i=o?.has(t)
!i&&a?.has(t)||(r.isDirty=!0,D(e,t,l,u,n),i&&o.delete(t))},p=M(i,r,h,f)
r.isDirty||p.changed,o&&o.size>0&&o.forEach((e=>{p.add.has(e)||f(e)})),a&&a.size>0&&a.forEach((e=>{p.del.has(e)||h(e)})),r.additions=p.add,r.removals=p.del,r.localState=p.finalState,r.isDirty=d,(s||!d)&&m(e,t.record,t.field)}(e,t,n)}function T(e,t,n,i,r){const s=e.get(t,n),{type:o}=s.definition
o!==i.type&&e.registerPolymorphicType(o,i.type),u(s)?(s.state.hasReceivedData=!0,s.state.isEmpty=!1,r&&(e._addToTransaction(s),null!==s.remoteState&&D(e,s.remoteState,s.definition.inverseKey,t,r),s.remoteState=i),s.localState!==i&&(!r&&s.localState&&D(e,s.localState,s.definition.inverseKey,t,r),s.localState=i,m(e,t,n))):h(s)?r?s.remoteMembers.has(i)||(e._addToTransaction(s),s.remoteState.push(i),s.remoteMembers.add(i),s.additions?.has(i)?s.additions.delete(i):(s.isDirty=!0,s.state.hasReceivedData=!0,S(e,s))):A(e,0,s,i,null)&&m(e,t,n):r?s.remoteMembers.has(i)||(s.remoteMembers.add(i),s.localMembers.add(i)):s.localMembers.has(i)||s.localMembers.add(i)}function D(e,t,n,i,r){const s=e.get(t,n)
u(s)?(s.state.isEmpty=!0,r&&(e._addToTransaction(s),s.remoteState=null),s.localState===i&&(s.localState=null,m(e,t,n))):h(s)?r?(e._addToTransaction(s),function(e,t){const{remoteMembers:n,additions:i,removals:r,remoteState:s}=e
if(!n.has(t))return!1
n.delete(t)
let o=s.indexOf(t)
return s.splice(o,1),r?.has(t)?(r.delete(t),!1):(e.localState&&(o=e.localState.indexOf(t),e.localState.splice(o,1)),!0)}(s,i)&&m(e,t,n)):R(s,i)&&m(e,t,n):r?(s.remoteMembers.delete(i),s.localMembers.delete(i)):i&&s.localMembers.has(i)&&s.localMembers.delete(i)}function S(e,t){e._scheduleLocalSync(t)}function P(e,t,n=!1){const r=e.get(t.record,t.field)
n&&e._addToTransaction(r)
const{definition:s,state:o}=r,a=n?"remoteState":"localState",l=r[a]
if(t.value!==l)if(l&&D(e,l,s.inverseKey,t.record,n),r[a]=t.value,o.hasReceivedData=!0,o.isEmpty=null===t.value,o.isStale=!1,o.hasFailedLoadAttempt=!1,t.value&&(s.type!==t.value.type&&e.registerPolymorphicType(s.type,t.value.type),T(e,t.value,s.inverseKey,t.record,n)),n){const{localState:t,remoteState:n}=r
if(t&&c(t)&&!n)return
t!==n&&t===l?(r.localState=n,m(e,r.identifier,r.definition.key)):t!==n&&t!==l&&!1!==r.definition.resetOnRemoteUpdate&&(r.localState=n,(0,i.deprecate)(`EmberData is changing the default semantics of updates to the remote state of relationships.\n\nThe following local state was cleared from the <${r.identifier.type}>.${r.definition.key} belongsTo relationship but will not be once this deprecation is resolved:\n\n\t${t?"Added: "+t.lid+"\n\t":""}${l?"Removed: "+l.lid:""}`,!1,{id:"ember-data:deprecate-relationship-remote-update-clearing-local-state",for:"ember-data",since:{enabled:"5.3",available:"5.3"},until:"6.0",url:"https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state"}),m(e,r.identifier,r.definition.key))}else m(e,r.identifier,r.definition.key)
else if(o.hasReceivedData=!0,n){const{localState:o}=r
if(o&&c(o)&&!l)return
l&&o===l?function(e,t,n,i,r){const s=e.get(t,n)
h(s)&&r&&s.remoteMembers.has(i)&&m(e,t,n)}(e,l,s.inverseKey,t.record,n):o!==t.value&&!1!==r.definition.resetOnRemoteUpdate&&(r.localState=l,(0,i.deprecate)(`EmberData is changing the default semantics of updates to the remote state of relationships.\n\nThe following local state was cleared from the <${r.identifier.type}>.${r.definition.key} belongsTo relationship but will not be once this deprecation is resolved:\n\n\t${o?"Added: "+o.lid+"\n\t":""}${l?"Removed: "+l.lid:""}`,!1,{id:"ember-data:deprecate-relationship-remote-update-clearing-local-state",for:"ember-data",since:{enabled:"5.3",available:"5.3"},until:"6.0",url:"https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state"}),m(e,r.identifier,r.definition.key))}}function M(e,t,n,i){const r=new Set(e),{remoteState:s,remoteMembers:o}=t
if(e.length!==r.size){const{diff:t,duplicates:a}=function(e,t,n,i,r,s){const o=e.length,a=n.length,l=Math.max(o,a)
let c=t.size!==i.size
const u=new Set,d=new Set,h=new Map,f=new Set,p=[]
for(let m=0,g=0;m<l;m++){let l,y=!1
if(m<o)if(l=e[m],f.has(l)){let e=h.get(l)
void 0===e&&(e=[],h.set(l,e)),e.push(m)}else p[g]=l,f.add(l),y=!0,i.has(l)||(c=!0,u.add(l),r(l))
if(m<a){const e=n[m]
l!==n[g]&&(c=!0),t.has(e)||(c=!0,d.add(e),s(e))}else y&&g<a&&l!==n[g]&&(c=!0)
y&&g++}return{diff:{add:u,del:d,finalState:p,finalSet:f,changed:c},duplicates:h}}(e,r,s,o,n,i)
return t}return function(e,t,n,i,r,s){const o=e.length,a=n.length,l=Math.max(o,a),c=o===a
let u=t.size!==i.size
const d=new Set,h=new Set
for(let f=0;f<l;f++){let l
if(f<o&&(l=e[f],i.has(l)||(u=!0,d.add(l),r(l))),f<a){const e=n[f]
c&&l!==e&&(u=!0),t.has(e)||(u=!0,h.add(e),s(e))}}return{add:d,del:h,finalState:e,finalSet:t,changed:u}}(e,r,s,o,n,i)}function A(e,t,n,i,r){const{remoteMembers:s,removals:o}=n
let a=n.additions
if((s.has(i)||a?.has(i))&&!o?.has(i))return!1
if(o?.has(i))o.delete(i)
else{a||(a=n.additions=new Set),n.state.hasReceivedData=!0,a.add(i)
const{type:t}=n.definition
t!==i.type&&e.registerPolymorphicType(i.type,t)}return n.localState&&(null!==r?n.localState.splice(r,0,i):n.localState.push(i)),!0}function R(e,t){const{remoteMembers:n,additions:i}=e
let r=e.removals
if(!n.has(t)&&!i?.has(t)||r?.has(t))return!1
if(i?.has(t)?i.delete(t):(r||(r=e.removals=new Set),r.add(t)),e.localState){const n=e.localState.indexOf(t)
e.localState.splice(n,1)}return!0}function O(e,t,n,i){u(i)?P(e,{op:"replaceRelatedRecord",record:t,field:n,value:i.remoteState},!1):k(e,{op:"replaceRelatedRecords",record:t,field:n,value:i.remoteState.slice()},!1)}function C(e){const t={}
return e.state.hasReceivedData&&(t.data=function(e){if(!e.isDirty)return e.localState
const t=e.remoteState.slice()
return e.removals?.forEach((e=>{const n=t.indexOf(e)
t.splice(n,1)})),e.additions?.forEach((e=>{t.push(e)})),e.localState=t,e.isDirty=!1,t}(e)),e.links&&(t.links=e.links),e.meta&&(t.meta=e.meta),t}function E(e,t,n,i,r,s){A(e,0,t,i,r??null)&&T(e,i,t.definition.inverseKey,n,s)}function x(e,t,n,i,r){R(t,i)&&D(e,i,t.definition.inverseKey,n,r)}function I(e){switch(typeof e){case"object":return e
case"string":return{href:e}}}function F(e,t){for(let n=0;n<e.length;n++)e[n]=t.upgradeIdentifier(e[n])
return e}const N=(0,s.L1)("Graphs",new Map)
class j{constructor(e){this._definitionCache=Object.create(null),this._metaCache=Object.create(null),this._potentialPolymorphicTypes=Object.create(null),this.identifiers=new Map,this.store=e,this.isDestroyed=!1,this._willSyncRemote=!1,this._willSyncLocal=!1,this._pushedUpdates={belongsTo:void 0,hasMany:void 0,deletions:[]},this._updatedRelationships=new Set,this._transaction=null,this._removing=null,this.silenceNotifications=!1}has(e,t){const n=this.identifiers.get(e)
return!!n&&void 0!==n[t]}getDefinition(e,t){let n=this._metaCache[e.type],i=n?.[t]
if(!i){const r=function(e,t,n){const i=e._definitionCache,r=e.store,s=e._potentialPolymorphicTypes,{type:c}=t
let u=a(i,c,n)
if(void 0!==u)return u
const d=r.schema.fields(t).get(n)
if(!d){if(s[c]){const e=Object.keys(s[c])
for(let t=0;t<e.length;t++){const r=a(i,e[t],n)
if(r)return l(i,c,n,r),r.rhs_modelNames.push(c),r}}return i[c][n]=null,null}const h=w(d)
let f,p
const m=h.type
if(null===h.inverseKey?f=null:(p=function(e,t,n){const i=e.schema.fields(t).get(n)
return i?i.options.inverse:null}(o(r),t,n),f=!p&&h.isPolymorphic&&h.inverseKey?{kind:"belongsTo",key:h.inverseKey,type:c,isAsync:!1,isImplicit:!1,isCollection:!1,isPolymorphic:!1}:p?w(r.schema.fields({type:m}).get(p)):null),!f){p=b(c,n),f={kind:"implicit",key:p,type:c,isAsync:!1,isImplicit:!0,isCollection:!0,isPolymorphic:!1},_(h,f),_(f,h)
const e={lhs_key:`${c}:${n}`,lhs_modelNames:[c],lhs_baseModelName:c,lhs_relationshipName:n,lhs_definition:h,lhs_isPolymorphic:h.isPolymorphic,rhs_key:f.key,rhs_modelNames:[m],rhs_baseModelName:m,rhs_relationshipName:f.key,rhs_definition:f,rhs_isPolymorphic:!1,hasInverse:!1,isSelfReferential:c===m,isReflexive:!1}
return l(i,m,p,e),l(i,c,n,e),e}const g=f.type
if(u=a(i,g,n)||a(i,m,p),u)return(u.lhs_baseModelName===g?u.lhs_modelNames:u.rhs_modelNames).push(c),l(i,c,n,u),u
_(h,f),_(f,h)
const y=[c]
c!==g&&y.push(g)
const v=g===m,k={lhs_key:`${g}:${n}`,lhs_modelNames:y,lhs_baseModelName:g,lhs_relationshipName:n,lhs_definition:h,lhs_isPolymorphic:h.isPolymorphic,rhs_key:`${m}:${p}`,rhs_modelNames:[m],rhs_baseModelName:m,rhs_relationshipName:p,rhs_definition:f,rhs_isPolymorphic:f.isPolymorphic,hasInverse:!0,isSelfReferential:v,isReflexive:v&&n===p}
return l(i,g,n,k),l(i,c,n,k),l(i,m,p,k),k}(this,e,t)
i=function(e,t,n){const i=e.isSelfReferential
return 1==(n===e.lhs_relationshipName)&&(!0===i||t===e.lhs_baseModelName||e.rhs_isPolymorphic&&e.lhs_modelNames.includes(t))}(r,e.type,t)?r.lhs_definition:r.rhs_definition,n=this._metaCache[e.type]=n||{},n[t]=i}return i}get(e,t){let n=this.identifiers.get(e)
n||(n=Object.create(null),this.identifiers.set(e,n))
let i=n[t]
if(!i){const r=this.getDefinition(e,t)
i="belongsTo"===r.kind?n[t]=function(e,t){return{definition:e,identifier:t,state:{hasReceivedData:!1,isEmpty:!0,isStale:!1,hasFailedLoadAttempt:!1,shouldForceReload:!1,hasDematerializedInverse:!1},transactionRef:0,localState:null,remoteState:null,meta:null,links:null}}(r,e):"hasMany"===r.kind?n[t]=function(e,t){return{definition:e,identifier:t,state:{hasReceivedData:!1,isEmpty:!0,isStale:!1,hasFailedLoadAttempt:!1,shouldForceReload:!1,hasDematerializedInverse:!1},remoteMembers:new Set,remoteState:[],additions:null,removals:null,meta:null,links:null,localState:null,isDirty:!0,transactionRef:0,_diff:void 0}}(r,e):n[t]=function(e,t){return{definition:e,identifier:t,localMembers:new Set,remoteMembers:new Set}}(r,e)}return i}getData(e,t){const n=this.get(e,t)
return u(n)?function(e){let t
const n={}
return e.localState&&(t=e.localState),null===e.localState&&e.state.hasReceivedData&&(t=null),e.links&&(n.links=e.links),void 0!==t&&(n.data=t),e.meta&&(n.meta=e.meta),n}(n):C(n)}registerPolymorphicType(e,t){const n=this._potentialPolymorphicTypes
let i=n[e]
i||(i=n[e]=Object.create(null)),i[t]=!0
let r=n[t]
r||(r=n[t]=Object.create(null)),r[e]=!0}isReleasable(e){const t=this.identifiers.get(e)
if(!t)return!0
const n=Object.keys(t)
for(let i=0;i<n.length;i++){const r=t[n[i]]
if(void 0!==r&&r.definition.inverseIsAsync&&!c(e))return!1}return!0}unload(e,t){const n=this.identifiers.get(e)
n&&Object.keys(n).forEach((e=>{const i=n[e]
i&&(function(e,t,n){if(d(t))return void(e.isReleasable(t.identifier)&&$(e,t))
const{identifier:i}=t,{inverseKey:r}=t.definition
t.definition.inverseIsImplicit||f(t,(t=>function(e,t,n,i,r){if(!e.has(t,n))return
const s=e.get(t,n)
u(s)&&s.localState&&i!==s.localState||function(e,t,n,i){if(u(t)){const n=t.localState
!t.definition.isAsync||n&&c(n)?(t.localState===n&&null!==n&&(t.localState=null),t.remoteState===n&&null!==n&&(t.remoteState=null,t.state.hasReceivedData=!0,t.state.isEmpty=!0,t.localState&&!c(t.localState)&&(t.localState=null))):t.state.hasDematerializedInverse=!0,i||m(e,t.identifier,t.definition.key)}else!t.definition.isAsync||n&&c(n)?p(e,t,n):t.state.hasDematerializedInverse=!0,i||m(e,t.identifier,t.definition.key)}(e,s,i,r)}(e,t,r,i,n))),t.definition.inverseIsImplicit||t.definition.inverseIsAsync||(t.state.isStale=!0,L(t),t.definition.isAsync||n||m(e,t.identifier,t.definition.key))}(this,i,t),d(i)&&(n[e]=void 0))}))}_isDirty(e,t){const n=this.identifiers.get(e)
if(!n)return!1
const i=n[t]
if(!i)return!1
if(u(i))return i.localState!==i.remoteState
if(h(i)){const e=null!==i.additions&&i.additions.size>0,t=null!==i.removals&&i.removals.size>0
return e||t||z(i)}return!1}getChanged(e){const t=this.identifiers.get(e),n=new Map
if(!t)return n
const i=Object.keys(t)
for(let r=0;r<i.length;r++){const e=i[r],s=t[e]
if(s)if(u(s))s.localState!==s.remoteState&&n.set(e,{kind:"resource",remoteState:s.remoteState,localState:s.localState})
else if(h(s)){const t=null!==s.additions&&s.additions.size>0,i=null!==s.removals&&s.removals.size>0,r=z(s);(t||i||r)&&n.set(e,{kind:"collection",additions:new Set(s.additions)||new Set,removals:new Set(s.removals)||new Set,remoteState:s.remoteState,localState:C(s).data||[],reordered:r})}}return n}hasChanged(e){const t=this.identifiers.get(e)
if(!t)return!1
const n=Object.keys(t)
for(let i=0;i<n.length;i++)if(this._isDirty(e,n[i]))return!0
return!1}rollback(e){const t=this.identifiers.get(e),n=[]
if(!t)return n
const i=Object.keys(t)
for(let r=0;r<i.length;r++){const s=i[r],o=t[s]
o&&this._isDirty(e,s)&&(O(this,e,s,o),n.push(s))}return n}remove(e){this._removing=e,this.unload(e),this.identifiers.delete(e),this._removing=null}push(e){if("deleteRecord"===e.op)this._pushedUpdates.deletions.push(e)
else{const t=this.getDefinition(e.record,e.field)
!function(e,t,n){const i=e[t.kind]=e[t.kind]||new Map
let r=i.get(t.inverseType)
r||(r=new Map,i.set(t.inverseType,r))
let s=r.get(n.field)
s||(s=[],r.set(n.field,s)),s.push(n)}(this._pushedUpdates,t,e)}this._willSyncRemote||(this._willSyncRemote=!0,o(this.store)._schedule("coalesce",(()=>this._flushRemoteQueue())))}update(e,t=!1){switch(e.op){case"mergeIdentifiers":{const t=this.identifiers.get(e.record)
t&&function(e,t,n){Object.keys(n).forEach((i=>{const r=n[i]
r&&function(e,t,n){n.identifier=t.value,f(n,(i=>{const r=e.get(i,n.definition.inverseKey)
!function(e,t,n){u(t)?function(e,t,n){t.remoteState===n.record&&(t.remoteState=n.value),t.localState===n.record&&(t.localState=n.value,m(e,t.identifier,t.definition.key))}(e,t,n):h(t)?function(e,t,n){if(t.remoteMembers.has(n.record)){t.remoteMembers.delete(n.record),t.remoteMembers.add(n.value)
const e=t.remoteState.indexOf(n.record)
t.remoteState.splice(e,1,n.value),t.isDirty=!0}t.additions?.has(n.record)&&(t.additions.delete(n.record),t.additions.add(n.value),t.isDirty=!0),t.removals?.has(n.record)&&(t.removals.delete(n.record),t.removals.add(n.value),t.isDirty=!0),t.isDirty&&m(e,t.identifier,t.definition.key)}(e,t,n):function(e,t,n){t.remoteMembers.has(n.record)&&(t.remoteMembers.delete(n.record),t.remoteMembers.add(n.value)),t.localMembers.has(n.record)&&(t.localMembers.delete(n.record),t.localMembers.add(n.value))}(0,t,n)}(e,r,t)}))}(e,t,r)}))}(this,e,t)
break}case"updateRelationship":(function(e,t){const n=e.get(t.record,t.field),{definition:r,state:s,identifier:o}=n,{isCollection:a}=r,l=t.value
let c=!1,u=!1
if(l.meta&&(n.meta=l.meta),void 0!==l.data)if(c=!0,a){null===l.data&&(l.data=[])
const n=e.store.identifierCache
e.update({op:"replaceRelatedRecords",record:o,field:t.field,value:F(l.data,n)},!0)}else e.update({op:"replaceRelatedRecord",record:o,field:t.field,value:l.data?e.store.identifierCache.upgradeIdentifier(l.data):null},!0)
else!1!==r.isAsync||s.hasReceivedData||(c=!0,a?e.update({op:"replaceRelatedRecords",record:o,field:t.field,value:[]},!0):e.update({op:"replaceRelatedRecord",record:o,field:t.field,value:null},!0))
if(l.links){const e=n.links
if(n.links=l.links,l.links.related){const t=I(l.links.related),n=e&&e.related?I(e.related):null,a=n?n.href:null
t&&t.href&&t.href!==a&&((0,i.warn)(`You pushed a record of type '${o.type}' with a relationship '${r.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.`,r.isAsync||s.hasReceivedData,{id:"ds.store.push-link-for-sync-relationship"}),u=!0)}}if(n.state.hasFailedLoadAttempt=!1,c){const e=null===l.data||Array.isArray(l.data)&&0===l.data.length
n.state.hasReceivedData=!0,n.state.isStale=!1,n.state.hasDematerializedInverse=!1,n.state.isEmpty=e}else u&&(a||!n.state.hasReceivedData||(d=n.transactionRef,h=e._transaction,0===d||null===h||d<h)?(n.state.isStale=!0,m(e,n.identifier,n.definition.key)):n.state.isStale=!1)
var d,h})(this,e)
break
case"deleteRecord":{const t=e.record,n=this.identifiers.get(t)
n&&(Object.keys(n).forEach((e=>{const t=n[e]
t&&(n[e]=void 0,$(this,t))})),this.identifiers.delete(t))
break}case"replaceRelatedRecord":P(this,e,t)
break
case"addToRelatedRecords":(function(e,t,n){const{record:i,value:r,index:s}=t,o=e.get(i,t.field)
if(Array.isArray(r))for(let a=0;a<r.length;a++)E(e,o,i,r[a],void 0!==s?s+a:s,n)
else E(e,o,i,r,s,n)
m(e,o.identifier,o.definition.key)})(this,e,t)
break
case"removeFromRelatedRecords":(function(e,t,n){const{record:i,value:r}=t,s=e.get(i,t.field)
if(Array.isArray(r))for(let o=0;o<r.length;o++)x(e,s,i,r[o],n)
else x(e,s,i,r,n)
m(e,s.identifier,s.definition.key)})(this,e,t)
break
case"replaceRelatedRecords":k(this,e,t)}}_scheduleLocalSync(e){this._updatedRelationships.add(e),this._willSyncLocal||(this._willSyncLocal=!0,o(this.store)._schedule("sync",(()=>this._flushLocalQueue())))}_flushRemoteQueue(){if(!this._willSyncRemote)return
let e=(0,s.Yj)("transactionRef")??0
this._transaction=++e,(0,s.dV)("transactionRef",e),this._willSyncRemote=!1
const t=this._pushedUpdates,{deletions:n,hasMany:i,belongsTo:r}=t
t.deletions=[],t.hasMany=void 0,t.belongsTo=void 0
for(let s=0;s<n.length;s++)this.update(n[s],!0)
i&&q(this,i),r&&q(this,r),this._transaction=null}_addToTransaction(e){e.transactionRef=this._transaction}_flushLocalQueue(){if(!this._willSyncLocal)return
if(this.silenceNotifications)return this.silenceNotifications=!1,void(this._updatedRelationships=new Set)
this._willSyncLocal=!1
const e=this._updatedRelationships
this._updatedRelationships=new Set,e.forEach((e=>m(this,e.identifier,e.definition.key)))}destroy(){N.delete(this.store),this.identifiers.clear(),this.store=null,this.isDestroyed=!0}}function q(e,t){t.forEach((t=>{t.forEach((t=>{!function(e,t){for(let n=0;n<t.length;n++)e.update(t[n],!0)}(e,t)}))}))}function L(e){u(e)?(e.localState=null,e.remoteState=null,e.state.hasReceivedData=!1,e.state.isEmpty=!0):(e.remoteMembers.clear(),e.remoteState=[],e.additions=null,e.removals=null,e.localState=null)}function $(e,t){const{identifier:n}=t,{inverseKey:i}=t.definition
f(t,(t=>{e.has(t,i)&&p(e,e.get(t,i),n)})),u(t)?(t.definition.isAsync||L(t),t.localState=null):h(t)?t.definition.isAsync||(L(t),m(e,t.identifier,t.definition.key)):(t.remoteMembers.clear(),t.localMembers.clear())}function z(e){if(e.isDirty)return!1
const{remoteState:t,localState:n,additions:i,removals:r}=e
for(let s=0,o=0;s<t.length;s++){const e=t[s],a=n[o]
if(e!==a){if(r&&r.has(e))continue
if(i&&i.has(a)){o++,s--
continue}return!0}o++}return!1}function B(e){return void 0!==e._instanceCache?e._instanceCache._storeWrapper:e}function Y(e){return N.get(B(e))}function Z(e){const t=B(e)
let n=N.get(t)
return n||(n=new j(t),N.set(t,n),o(t)._graph=n),n}},6380:(e,t,n)=>{n.d(t,{F:()=>p,S:()=>f,a:()=>c,b:()=>l,c:()=>h,i:()=>u,n:()=>d,u:()=>v})
var i=n(921),r=n(1603),s=n(8217),o=n(3175),a=n(5903)
class l{constructor(e,t,n={}){this.__store=e,this._snapshots=null,this.modelName=t,this.adapterOptions=n.adapterOptions,this.include=n.include}get _recordArray(){return this.__store.peekAll(this.modelName)}get length(){return this._recordArray.length}snapshots(){if(null!==this._snapshots)return this._snapshots
this.__store
const{_fetchManager:e}=this.__store
return this._snapshots=this._recordArray[i.u2].map((t=>e.createSnapshot(t))),this._snapshots}}function c(e){}function u(e,t){return Array.isArray(e)?e.map(t):t(e,0)}function d(e,t,n,i,r,s){return e?e.normalizeResponse(t,n,i,r,s):i}class h{constructor(e,t,n){this._store=n,this.__attributes=null,this._belongsToRelationships=Object.create(null),this._belongsToIds=Object.create(null),this._hasManyRelationships=Object.create(null),this._hasManyIds=Object.create(null)
const i=!!n._instanceCache.peek(t)
if(this.modelName=t.type,this.identifier=t,i&&this._attributes,this.id=t.id,this.adapterOptions=e.adapterOptions,this.include=e.include,this.modelName=t.type,i){const e=this._store.cache
this._changedAttributes=e.changedAttrs(t)}}get record(){return this._store.peekRecord(this.identifier)}get _attributes(){if(null!==this.__attributes)return this.__attributes
const e=this.__attributes=Object.create(null),{identifier:t}=this,n=this._store.schema.fields(t),i=this._store.cache
return n.forEach(((n,r)=>{"attribute"===n.kind&&(e[r]=i.getAttr(t,r))})),e}get isNew(){const e=this._store.cache
return e?.isNew(this.identifier)||!1}attr(e){if(e in this._attributes)return this._attributes[e]}attributes(){return{...this._attributes}}changedAttributes(){const e=Object.create(null)
if(!this._changedAttributes)return e
const t=Object.keys(this._changedAttributes)
for(let n=0,i=t.length;n<i;n++){const i=t[n]
e[i]=this._changedAttributes[i].slice()}return e}belongsTo(e,t){const i=!(!t||!t.id)
let r
const s=this._store
if(!0===i&&e in this._belongsToIds)return this._belongsToIds[e]
if(!1===i&&e in this._belongsToRelationships)return this._belongsToRelationships[e]
s.schema.fields({type:this.modelName}).get(e)
const o=(0,a.A)(n(9424)).graphFor,{identifier:l}=this,c=o(this._store).getData(l,e),u=c&&c.data,d=u?s.identifierCache.getOrCreateRecordIdentifier(u):null
if(c&&void 0!==c.data){const e=s.cache
r=d&&!e.isDeleted(d)?i?d.id:s._fetchManager.createSnapshot(d):null}return i?this._belongsToIds[e]=r:this._belongsToRelationships[e]=r,r}hasMany(e,t){const i=!(!t||!t.ids)
let r
const s=this._hasManyIds[e],o=this._hasManyRelationships[e]
if(!0===i&&e in this._hasManyIds)return s
if(!1===i&&e in this._hasManyRelationships)return o
const l=this._store,c=(l.schema.fields({type:this.modelName}).get(e),(0,a.A)(n(9424)).graphFor),{identifier:u}=this,d=c(this._store).getData(u,e)
return d.data&&(r=[],d.data.forEach((e=>{const t=l.identifierCache.getOrCreateRecordIdentifier(e)
l.cache.isDeleted(t)||(i?r.push(t.id):r.push(l._fetchManager.createSnapshot(t)))}))),i?this._hasManyIds[e]=r:this._hasManyRelationships[e]=r,r}eachAttribute(e,t){this._store.schema.fields(this.identifier).forEach(((n,i)=>{"attribute"===n.kind&&e.call(t,i,n)}))}eachRelationship(e,t){this._store.schema.fields(this.identifier).forEach(((n,i)=>{"belongsTo"!==n.kind&&"hasMany"!==n.kind||e.call(t,i,n)}))}serialize(e){return this._store,this._store.serializerFor(this.modelName).serialize(this,e)}}const f=(0,o.L1)("SaveOp",Symbol("SaveOp"))
class p{constructor(e){this._store=e,this._pendingFetch=new Map,this.requestCache=e.getRequestStateService(),this.isDestroyed=!1}createSnapshot(e,t={}){return new h(t,e,this._store)}scheduleSave(e,t){const n=(0,s.ud)(),i={data:[{op:"saveRecord",recordIdentifier:e,options:t}]},r={snapshot:this.createSnapshot(e,t),resolver:n,identifier:e,options:t,queryRequest:i},o=this.requestCache._enqueue(n.promise,r.queryRequest)
return function(e,t){const{snapshot:n,resolver:i,identifier:r,options:s}=t,o=e.adapterFor(r.type),a=s[f],l=n.modelName,c=e.modelFor(l)
let u=Promise.resolve().then((()=>o[a](e,c,n)))
const h=e.serializerFor(l)
u=u.then((t=>{if(t)return d(h,e,c,t,n.id,a)})),i.resolve(u)}(this._store,r),o}scheduleFetch(e,t,i){const r={data:[{op:"findRecord",recordIdentifier:e,options:t}]},o=this.getPendingFetch(e,t)
if(o)return o
const l=e.type,c=(0,s.ud)(),u={identifier:e,resolver:c,options:t,queryRequest:r},d=c.promise,h=this._store,f=!h._instanceCache.recordIsLoaded(e)
let p=this.requestCache._enqueue(d,u.queryRequest).then((n=>{n.data&&!Array.isArray(n.data)&&(n.data.lid=e.lid)
const i=h._push(n,t.reload)
return i&&!Array.isArray(i)?i:e}),(t=>{const i=h.cache
if(!i||i.isEmpty(e)||f){let t=!0
if(!i){const i=(0,(0,a.A)(n(9424)).graphFor)(h)
t=i.isReleasable(e),t||i.unload(e,!0)}(i||t)&&(h._enableAsyncFlush=!0,h._instanceCache.unloadRecord(e),h._enableAsyncFlush=null)}throw t}))
0===this._pendingFetch.size&&new Promise((e=>setTimeout(e,0))).then((()=>{this.flushAllPendingFetches()}))
const m=this._pendingFetch
let g=m.get(l)
g||(g=new Map,m.set(l,g))
let y=g.get(e)
return y||(y=[],g.set(e,y)),y.push(u),u.promise=p,p}getPendingFetch(e,t){const n=this._pendingFetch.get(e.type)?.get(e)
if(n){const e=n.find((e=>function(e={},t={}){return n=e.adapterOptions,i=t.adapterOptions,(!n||n===i||0===Object.keys(n).length)&&function(e,t){if(!e?.length)return!0
if(!t?.length)return!1
const n=(Array.isArray(e)?e:e.split(",")).sort(),i=(Array.isArray(t)?t:t.split(",")).sort()
if(n.join(",")===i.join(","))return!0
for(let r=0;r<n.length;r++)if(!i.includes(n[r]))return!1
return!0}(e.include,t.include)
var n,i}(t,e.options)))
if(e)return e.promise}}flushAllPendingFetches(){if(this.isDestroyed)return
const e=this._store
this._pendingFetch.forEach(((t,n)=>function(e,t,n){const i=e.adapterFor(n)
if(i.findMany&&i.coalesceFindRequests){const r=[]
t.forEach(((e,n)=>{e.length>1||(t.delete(n),r.push(e[0]))}))
const s=r.length
if(s>1){const t=new Array(s),o=new Map
for(let n=0;n<s;n++){const i=r[n]
t[n]=e._fetchManager.createSnapshot(i.identifier,i.options),o.set(t[n],i)}let a
a=i.groupRecordsForFindMany?i.groupRecordsForFindMany(e,t):[t]
for(let r=0,s=a.length;r<s;r++)y(e,o,a[r],i,n)}else 1===s&&g(e,i,r[0])}t.forEach((t=>{t.forEach((t=>{g(e,i,t)}))}))}(e,t,n))),this._pendingFetch.clear()}fetchDataIfNeededForIdentifier(e,t={},n){const i=function(e,t){const n=e.cache
if(!n)return!0
const i=n.isNew(t),r=n.isDeleted(t),s=n.isEmpty(t)
return(!i||r)&&s}(this._store._instanceCache,e),r=function(e,t){const n=e.store.getRequestStateService()
return!e.recordIsLoaded(t)&&n.getPendingRequestsForRecord(t).some((e=>"query"===e.type))}(this._store._instanceCache,e)
let s
return i?(t.reload=!0,s=this.scheduleFetch(e,t,n)):s=r?this.getPendingFetch(e,t):Promise.resolve(e),s}destroy(){this.isDestroyed=!0}}function m(e,t,n){for(let i=0,r=t.length;i<r;i++){const r=t[i],s=e.get(r)
s&&s.resolver.reject(n||new Error(`Expected: '<${r.modelName}:${r.id}>' to be present in the adapter provided payload, but it was not found.`))}}function g(e,t,n){const s=n.identifier,o=s.type,a=e._fetchManager.createSnapshot(s,n.options),l=e.modelFor(s.type),c=s.id
let u=Promise.resolve().then((()=>t.findRecord(e,l,s.id,a)))
u=u.then((t=>{const n=d(e.serializerFor(o),e,l,t,c,"findRecord")
return(0,r.warn)(`You requested a record of type '${o}' with id '${c}' but the adapter returned a payload with primary data having an id of '${n.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.`,(0,i.pG)(n.data.id)===(0,i.pG)(c),{id:"ds.store.findRecord.id-mismatch"}),n})),n.resolver.resolve(u)}function y(e,t,n,i,s){n.length>1?function(e,t,n,i){const r=e.modelFor(n)
return Promise.resolve().then((()=>{const n=i.map((e=>e.id))
return t.findMany(e,r,n,i)})).then((t=>d(e.serializerFor(n),e,r,t,null,"findMany")))}(e,i,s,n).then((i=>{!function(e,t,n,i){const s=new Map
for(let r=0;r<n.length;r++){const e=n[r].id
let t=s.get(e)
t||(t=[],s.set(e,t)),t.push(n[r])}const o=Array.isArray(i.included)?i.included:[],a=i.data
for(let r=0,c=a.length;r<c;r++){const e=a[r],n=s.get(e.id)
s.delete(e.id),n?n.forEach((n=>{t.get(n).resolver.resolve({data:e})})):o.push(e)}if(o.length>0&&e._push({data:null,included:o},!0),0===s.size)return
const l=[]
s.forEach((e=>{l.push(...e)})),(0,r.warn)('Ember Data expected to find records with the following ids in the adapter response from findMany but they were missing: [ "'+[...s.values()].map((e=>e[0].id)).join('", "')+'" ]',{id:"ds.store.missing-records-from-adapter"}),m(t,l)}(e,t,n,i)})).catch((e=>{m(t,n,e)})):1===n.length&&g(e,i,t.get(n[0]))}function v(e){}},6604:(e,t,n)=>{n.r(t),n.d(t,{FetchManager:()=>i.F,SaveOp:()=>i.S,Snapshot:()=>i.c,SnapshotRecordArray:()=>i.b,upgradeStore:()=>i.u})
var i=n(6380)},8917:(e,t,n)=>{n.r(t)
var i=n(1603),r=n(8603)
{const e=(0,n(5903).A)(n(4040)).default,{inflector:t}=e,s=t.plural,o=t.singular,a=t.irregular,l=t.uncountable,c=new Set,u=new Set
r.m.plurals.forEach((([e])=>{c.add(e.toString())})),r.m.singular.forEach((([e])=>{u.add(e.toString())}))
const{defaultRules:d}=e,{rules:h}=t,f=new Map,p=new Set,m=new Set(d.uncountable)
d.irregularPairs.forEach((([e,t])=>{f.set(e.toLowerCase(),t),p.add(t.toLowerCase())}))
const g=new Map
Object.keys(h.irregular).forEach((e=>{const t=h.irregular[e]
g.set(e,t)})),h.plurals.forEach((([e,t])=>{c.has(e.toString())||((0,r.b)(e,t),(0,i.deprecate)("WarpDrive/EmberData no longer uses ember-inflector for pluralization.\nPlease `import { plural } from '@ember-data/request-utils/string';` instead to register a custom pluralization rule for use with EmberData.",!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"}))})),h.singular.forEach((([e,t])=>{u.has(e.toString())||((0,r.a)(e,t),(0,i.deprecate)("WarpDrive/EmberData no longer uses ember-inflector for singularization.\nPlease `import { singular } from '@ember-data/request-utils/string';` instead to register a custom singularization rule for use with EmberData.",!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"}))})),Object.keys(h.irregular).forEach((e=>{const t=h.irregular[e],n=f.get(e)
if(n&&n===t)return
if(p.has(e))return
const s=g.get(t.toLowerCase())||e
p.add(t.toLowerCase()),(0,r.i)(s,t),(0,i.deprecate)(`WarpDrive/EmberData no longer uses ember-inflector for irregular rules.\nPlease \`import { irregular } from '@ember-data/request-utils/string';\` instead to register a custom irregular rule for use with EmberData for '${s}' <=> '${t}'.`,!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"})})),Object.keys(h.uncountable).forEach((e=>{m.has(e)||!0!==h.uncountable[e]||((0,r.u)(e),(0,i.deprecate)(`WarpDrive/EmberData no longer uses ember-inflector for uncountable rules.\nPlease \`import { uncountable } from '@ember-data/request-utils/string';\` instead to register a custom uncountable rule for '${e}' for use with EmberData.`,!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"}))})),t.plural=function(...e){return(0,r.b)(...e),(0,i.deprecate)("WarpDrive/EmberData no longer uses ember-inflector for pluralization.\nPlease `import { plural } from '@ember-data/request-utils/string';` instead to register a custom pluralization rule for use with EmberData.",!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"}),s.apply(t,e)},t.singular=function(...e){return(0,r.a)(...e),(0,i.deprecate)("WarpDrive/EmberData no longer uses ember-inflector for singularization.\nPlease `import { singular } from '@ember-data/request-utils/string';` instead to register a custom singularization rule for use with EmberData.",!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"}),o.apply(t,e)},t.irregular=function(...e){return(0,r.i)(...e),(0,i.deprecate)("WarpDrive/EmberData no longer uses ember-inflector for irregular rules.\nPlease `import { irregular } from '@ember-data/request-utils/string';` instead to register a custom irregular rule for use with EmberData.",!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"}),a.apply(t,e)},t.uncountable=function(...e){return(0,r.u)(...e),(0,i.deprecate)("WarpDrive/EmberData no longer uses ember-inflector for uncountable rules.\nPlease `import { uncountable } from '@ember-data/request-utils/string';` instead to register a custom uncountable rule for use with EmberData.",!1,{id:"warp-drive.ember-inflector",until:"6.0.0",for:"warp-drive",since:{enabled:"5.3.4",available:"5.3.4"},url:"https://deprecations.emberjs.com/id/warp-drive.ember-inflector"}),l.apply(t,e)}}},8603:(e,t,n)=>{n.d(t,{a:()=>Y,b:()=>B,c:()=>x,d:()=>N,e:()=>q,f:()=>g,g:()=>y,h:()=>b,i:()=>I,j:()=>v,k:()=>_,l:()=>F,m:()=>i,p:()=>$,r:()=>j,s:()=>L,u:()=>E})
const i={plurals:[[/$/,"s"],[/s$/i,"s"],[/^(ax|test)is$/i,"$1es"],[/(octop|vir)us$/i,"$1i"],[/(octop|vir)i$/i,"$1i"],[/(alias|status|bonus)$/i,"$1es"],[/(bu)s$/i,"$1ses"],[/(buffal|tomat)o$/i,"$1oes"],[/([ti])um$/i,"$1a"],[/([ti])a$/i,"$1a"],[/sis$/i,"ses"],[/(?:([^f])fe|([lr])f)$/i,"$1$2ves"],[/(hive)$/i,"$1s"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/(x|ch|ss|sh)$/i,"$1es"],[/(matr|vert|ind)(?:ix|ex)$/i,"$1ices"],[/^(m|l)ouse$/i,"$1ice"],[/^(m|l)ice$/i,"$1ice"],[/^(ox)$/i,"$1en"],[/^(oxen)$/i,"$1"],[/(quiz)$/i,"$1zes"]],singular:[[/s$/i,""],[/(ss)$/i,"$1"],[/(n)ews$/i,"$1ews"],[/([ti])a$/i,"$1um"],[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i,"$1sis"],[/(^analy)(sis|ses)$/i,"$1sis"],[/([^f])ves$/i,"$1fe"],[/(hive)s$/i,"$1"],[/(tive)s$/i,"$1"],[/([lr])ves$/i,"$1f"],[/([^aeiouy]|qu)ies$/i,"$1y"],[/(s)eries$/i,"$1eries"],[/(m)ovies$/i,"$1ovie"],[/(x|ch|ss|sh)es$/i,"$1"],[/^(m|l)ice$/i,"$1ouse"],[/(bus)(es)?$/i,"$1"],[/(o)es$/i,"$1"],[/(shoe)s$/i,"$1"],[/(cris|test)(is|es)$/i,"$1is"],[/^(a)x[ie]s$/i,"$1xis"],[/(octop|vir)(us|i)$/i,"$1us"],[/(alias|status|bonus)(es)?$/i,"$1"],[/^(ox)en/i,"$1"],[/(vert|ind)ices$/i,"$1ex"],[/(matr)ices$/i,"$1ix"],[/(quiz)zes$/i,"$1"],[/(database)s$/i,"$1"]],irregularPairs:[["person","people"],["man","men"],["child","children"],["sex","sexes"],["move","moves"],["cow","kine"],["zombie","zombies"]],uncountable:["equipment","information","rice","money","species","series","fish","sheep","jeans","police"]}
class r{constructor(e,t){this.size=t||1e4,this.state=new Map,this.doWork=e}get(e){const t=this.state.get(e)
if(t)return this.state.delete(e),this.state.set(e,t),t
const n=this.doWork(e)
return this.set(e,n),n}set(e,t){if(this.state.size===this.size)for(const[n]of this.state){this.state.delete(n)
break}this.state.set(e,t)}clear(){this.state.clear()}}const s=/[ _]/g,o=/([a-z\d])([A-Z])/g,a=new r((e=>e.replace(o,"$1_$2").toLowerCase().replace(s,"-"))),l=/(\-|\_|\.|\s)+(.)?/g,c=/(^|\/)([A-Z])/g,u=new r((e=>e.replace(l,((e,t,n)=>n?n.toUpperCase():"")).replace(c,(e=>e.toLowerCase())))),d=/([a-z\d])([A-Z]+)/g,h=/\-|\s+/g,f=new r((e=>e.replace(d,"$1_$2").replace(h,"_").toLowerCase())),p=/(^|\/)([a-z\u00C0-\u024F])/g,m=new r((e=>e.replace(p,(e=>e.toUpperCase()))))
function g(e){return a.get(e)}function y(e){return u.get(e)}function v(e){return f.get(e)}function b(e){return m.get(e)}function _(e){u.size=e,f.size=e,m.size=e,a.size=e}const w=/^\s*$/,k=/([\w/-]+[_/\s-])([a-z\d]+$)/,T=/([\w/\s-]+)([A-Z][a-z\d]*$)/,D=/[A-Z][a-z\d]*$/,S=new r((e=>function(e){return Z(e,O,R)}(e))),P=new r((e=>function(e){return Z(e,C,A)}(e))),M=new Set(i.uncountable),A=new Map,R=new Map,O=new Map(i.singular.reverse()),C=new Map(i.plurals.reverse())
function E(e){M.add(e.toLowerCase())}function x(e){e.forEach((e=>{E(e)}))}function I(e,t){A.set(e.toLowerCase(),t),A.set(t.toLowerCase(),t),R.set(t.toLowerCase(),e),R.set(e.toLowerCase(),e)}function F(e){e.forEach((e=>{A.set(e[0].toLowerCase(),e[1]),A.set(e[1].toLowerCase(),e[1]),R.set(e[1].toLowerCase(),e[0]),R.set(e[0].toLowerCase(),e[0])}))}function N(){S.clear(),P.clear()}function j(){q(),i.uncountable.forEach((e=>M.add(e))),i.singular.forEach((e=>O.set(e[0],e[1]))),i.plurals.forEach((e=>C.set(e[0],e[1]))),F(i.irregularPairs)}function q(){S.clear(),P.clear(),M.clear(),A.clear(),R.clear(),O.clear(),C.clear()}function L(e){return e?S.get(e):""}function $(e){return e?P.get(e):""}function z(e,t){const n=[e,...t.entries()]
t.clear(),n.forEach((e=>{t.set(e[0],e[1])}))}function B(e,t){C.has(e)&&C.delete(e),z([e,t],C)}function Y(e,t){O.has(e)&&O.delete(e),z([e,t],O)}function Z(e,t,n){if(!e||w.test(e))return e
const i=e.toLowerCase()
if(M.has(i))return e
const r=k.exec(e)||T.exec(e),s=r?r[2].toLowerCase():null
if(s&&M.has(s))return e
const o=D.test(e)
for(let[a,l]of n)if(i.match(a+"$"))return o&&s&&n.has(s)&&(l=b(l),a=b(a)),e.replace(new RegExp(a,"i"),l)
for(const[a,l]of t)if(a.test(e))return e.replace(a,l)
return e}F(i.irregularPairs)},500:(e,t,n)=>{n.r(t),n.d(t,{camelize:()=>i.g,capitalize:()=>i.h,clear:()=>i.d,clearRules:()=>i.e,dasherize:()=>i.f,irregular:()=>i.i,loadIrregular:()=>i.l,loadUncountable:()=>i.c,plural:()=>i.b,pluralize:()=>i.p,resetToDefaults:()=>i.r,setMaxLRUCacheSize:()=>i.k,singular:()=>i.a,singularize:()=>i.s,uncountable:()=>i.u,underscore:()=>i.j})
var i=n(8603)},1121:(e,t,n)=>{n.d(t,{I:()=>p,b:()=>_,c:()=>d,e:()=>b,f:()=>T,g:()=>h,s:()=>f,u:()=>w})
var i=n(3175),r=n(6856)
function s(e,t){return e.get(o(e,t))}function o(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n
throw new TypeError("Private element is not present on this object")}function a(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e
var t=e[Symbol.toPrimitive]
if(void 0!==t){var n=t.call(e,"string")
if("object"!=typeof n)return n
throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=(0,i.vs)("PromiseCache",new WeakMap),c=(0,i.vs)("RequestMap",new Map)
function u(e,t){c.set(e,t)}function d(e){c.delete(e)}function h(e){return c.get(e)}function f(e,t){l.set(e,t)}const p=(0,i.L1)("IS_CACHE_HANDLER",Symbol("IS_CACHE_HANDLER"))
function m(e){return e&&!0===e[r.k0]}function g(e,t,n){return m(t)?t:n?{[r.k0]:!0,request:e.request,response:e.getResponse(),error:t}:{[r.k0]:!0,request:e.request,response:e.getResponse(),content:t}}function y(e){return new DOMException(e||"The user aborted a request.","AbortError")}function v(e,t){return 0===t&&Boolean(e[p])}function b(e,t,n,i){const s=new D(t,i,0===n),o=new P(s)
let a
try{a=e[n].request(o,(function(t){return s.nextCalled++,b(e,t,n+1,i)})),a&&v(e[n],n)&&(a instanceof Promise||(u(s.requestId,{isError:!1,result:g(s,a,!1)}),a=Promise.resolve(a)))}catch(t){v(e[n],n)&&u(s.requestId,{isError:!0,result:g(s,t,!0)}),a=Promise.reject(t)}const l=function(e){const t=_()
let n,{promise:i}=t
return i=i.finally((()=>{e.resolveStream(),n&&n.forEach((e=>e()))})),i.onFinalize=e=>{n=n||[],n.push(e)},i[r.J6]=!0,i.getStream=()=>e.getStream(),i.abort=t=>{e.abort(y(t))},t.promise=i,t}(s)
return c=a,Boolean(c&&c instanceof Promise&&!0===c[r.J6])?function(e,t,n){return e.setStream(t.getStream()),t.then((t=>{const i={[r.k0]:!0,request:e.request,response:t.response,content:t.content}
n.resolve(i)}),(t=>{if(m(t)&&e.setStream(e.god.stream),!(t&&t instanceof Error))try{throw new Error(t||"Request Rejected with an Unknown Error")}catch(e){t&&"object"==typeof t&&(Object.assign(e,t),e.message=t.message||"Request Rejected with an Unknown Error"),t=e}t[r.k0]=!0,t.request=e.request,t.response=e.getResponse(),t.error=t.error||t.message,n.reject(t)})),n.promise}(s,a,l):function(e,t,n){return t.then((t=>{if(e.controller.signal.aborted)return void n.reject(y(e.controller.signal.reason))
m(t)&&(e.setStream(e.god.stream),t=t.content)
const i={[r.k0]:!0,request:e.request,response:e.getResponse(),content:t}
n.resolve(i)}),(t=>{if(m(t)&&e.setStream(e.god.stream),!(t&&t instanceof Error))try{throw new Error(t||"Request Rejected with an Unknown Error")}catch(e){t&&"object"==typeof t&&(Object.assign(e,t),e.message=t.message||"Request Rejected with an Unknown Error"),t=e}t[r.k0]=!0,t.request=e.request,t.response=e.getResponse(),t.error=t.error||t.message,n.reject(t)})),n.promise}(s,a,l)
var c}function _(){let e,t
const n=new Promise(((n,i)=>{e=n,t=i}))
return{resolve:e,reject:t,promise:n}}function w(e,t){return e[r.J6]=!0,e.getStream=t.getStream,e.abort=t.abort,e.onFinalize=t.onFinalize,e}function k(e){return e.clone=()=>new Headers(e),e.toJSON=()=>Array.from(e),e}function T(e){const{headers:t,ok:n,redirected:i,status:r,statusText:s,type:o,url:a}=e
return k(t),{headers:t,ok:n,redirected:i,status:r,statusText:s,type:o,url:a}}class D{constructor(e,t,n=!1){a(this,"hasSetStream",!1),a(this,"hasSetResponse",!1),a(this,"hasSubscribers",!1),a(this,"stream",_()),a(this,"response",null),a(this,"nextCalled",0),this.isRoot=n,this.requestId=t.id,this.controller=e.controller||t.controller,this.stream.promise.sizeHint=0,e.controller&&(e.controller!==t.controller&&t.controller.signal.addEventListener("abort",(()=>{this.controller.abort(t.controller.signal.reason)})),delete e.controller)
let i=Object.assign({signal:this.controller.signal},e)
e.headers&&k(e.headers),this.enhancedRequest=i,this.request=e,this.god=t,this.stream.promise=this.stream.promise.then((e=>(this.god.stream===e&&this.hasSubscribers&&(this.god.stream=null),e)))}get hasRequestedStream(){return this.god.hasRequestedStream}getResponse(){return this.hasSetResponse?this.response:1===this.nextCalled?this.god.response:null}getStream(){if(this.isRoot&&(this.god.hasRequestedStream=!0),!this.hasSetResponse){const e=this.god.response?.headers?.get("content-length")
this.stream.promise.sizeHint=e?parseInt(e,10):0}return this.hasSubscribers=!0,this.stream.promise}abort(e){this.controller.abort(e)}setStream(e){this.hasSetStream||(this.hasSetStream=!0,e instanceof Promise||(this.god.stream=e),this.stream.resolve(e))}resolveStream(){this.setStream(1===this.nextCalled?this.god.stream:null)}setResponse(e){if(!this.hasSetResponse)if(this.hasSetResponse=!0,e instanceof Response){let t=T(e)
this.response=t,this.god.response=t
const n=e.headers?.get("content-length")
this.stream.promise.sizeHint=n?parseInt(n,10):0}else this.response=e,this.god.response=e}}var S=new WeakMap
class P{constructor(e){var t,n;(function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,void 0)})(this,S),this.id=e.requestId,n=e,(t=S).set(o(t,this),n),this.request=e.enhancedRequest}setStream(e){s(S,this).setStream(e)}setResponse(e){s(S,this).setResponse(e)}get hasRequestedStream(){return s(S,this).hasRequestedStream}}new Map([["records","array"],["data","json"],["body",{type:"string",klass:["Blob","ArrayBuffer","TypedArray","DataView","FormData","URLSearchParams","ReadableStream"]}],["disableTestWaiter","boolean"],["options","object"],["cacheOptions","object"],["op","string"],["store","object"],["url","string"],["cache",["default","force-cache","no-cache","no-store","only-if-cached","reload"]],["credentials",["include","omit","same-origin"]],["destination",["","object","audio","audioworklet","document","embed","font","frame","iframe","image","manifest","paintworklet","report","script","sharedworker","style","track","video","worker","xslt"]],["headers","headers"],["integrity","string"],["keepalive","boolean"],["method",["GET","PUT","PATCH","DELETE","POST","OPTIONS"]],["mode",["same-origin","cors","navigate","no-cors"]],["redirect",["error","follow","manual"]],["referrer","string"],["signal","AbortSignal"],["controller","AbortController"],["referrerPolicy",["","same-origin","no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"]]]),(0,i.L1)("IS_FROZEN",Symbol("FROZEN")),(0,i.L1)("IS_COLLECTION",Symbol.for("Collection")),new Set([])},8217:(e,t,n)=>{n.d(t,{Ay:()=>a,ud:()=>r.b})
var i=n(3175),r=n(1121)
function s(e,t){return e.get(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n
throw new TypeError("Private element is not present on this object")}(e,t))}var o=new WeakMap
class a{constructor(e){var t,n
n=[],function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(this,t=o),t.set(this,n),Object.assign(this,e),this._pending=new Map}useCache(e){e[r.I]=!0,s(o,this).unshift(e)}use(e){s(o,this).push(...e)}request(e){const t=s(o,this),n=e.controller||new AbortController
e.controller&&delete e.controller
const a=(0,i.dN)("REQ_ID")??0;(0,i.ml)("REQ_ID",a+1)
const l=(0,r.e)(t,e,0,{controller:n,response:null,stream:null,hasRequestedStream:!1,id:a}),c=(0,r.g)(a),u=(0,r.u)(l.then((e=>((0,r.s)(u,{isError:!1,result:e}),(0,r.c)(a),e)),(e=>{throw(0,r.s)(u,{isError:!0,result:e}),(0,r.c)(a),e})),l)
return c&&(0,r.s)(u,c),u}static create(e){return new this(e)}}},9060:(e,t,n)=>{n.r(t),n.d(t,{BooleanTransform:()=>l,DateTransform:()=>c,NumberTransform:()=>d,StringTransform:()=>h,default:()=>a})
var i=n(4471),r=n.n(i),s=n(9220)
function o(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e
var t=e[Symbol.toPrimitive]
if(void 0!==t){var n=t.call(e,"string")
if("object"!=typeof n)return n
throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=r()
class l{constructor(){o(this,s.k5,"boolean")}deserialize(e,t){return null==e&&!0===t?.allowNull?null:"boolean"==typeof e?e:"string"==typeof e?/^(true|t|1)$/i.test(e):"number"==typeof e&&1===e}serialize(e,t){return null==e&&!0===t?.allowNull?null:Boolean(e)}static create(){return new this}}class c{constructor(){o(this,s.k5,"date")}deserialize(e,t){if("string"==typeof e){let t=e.indexOf("+")
return-1!==t&&e.length-5===t?(t+=3,new Date(e.slice(0,t)+":"+e.slice(t))):new Date(e)}return"number"==typeof e?new Date(e):null==e?e:null}serialize(e,t){return e instanceof Date&&!isNaN(e)?e.toISOString():null}static create(){return new this}}function u(e){return e==e&&e!==1/0&&e!==-1/0}class d{constructor(){o(this,s.k5,"number")}deserialize(e,t){if(""===e||null==e)return null
{const t=Number(e)
return u(t)?t:null}}serialize(e,t){if(""===e||null==e)return null
{const t=Number(e)
return u(t)?t:null}}static create(){return new this}}class h{constructor(){o(this,s.k5,"string")}deserialize(e,t){return e||""===e?String(e):null}serialize(e,t){return e||""===e?String(e):null}static create(){return new this}}},921:(e,t,n)=>{n.d(t,{J4:()=>i.n,RX:()=>i.l,TP:()=>i.o,To:()=>i.A,Wz:()=>i.t,XK:()=>i.M,di:()=>i.u,fV:()=>i.s,i:()=>i.q,o:()=>i.r,oX:()=>i.p,oz:()=>i.I,pG:()=>i.g,u2:()=>i.k,xm:()=>i.i})
var i=n(2635)},2635:(e,t,n)=>{n.d(t,{A:()=>De,C:()=>at,I:()=>Ce,M:()=>Pe,S:()=>Ve,a:()=>P,b:()=>M,c:()=>A,d:()=>R,e:()=>O,g:()=>p,i:()=>T,k:()=>Se,l:()=>Ne,n:()=>Re,o:()=>K,p:()=>H,q:()=>X,r:()=>J,s:()=>Q,t:()=>U,u:()=>g})
var i=n(1603),r=n(6856),s=n(3175)
Symbol("record-originated-on-client"),Symbol("identifier-bucket"),Symbol("warpDriveStaleCache")
const o=Symbol("warpDriveCache")
var a=n(500),l=n(3284),c=n(1223),u=n(6684)
function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n
throw new TypeError("Private element is not present on this object")}function f(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e
var t=e[Symbol.toPrimitive]
if(void 0!==t){var n=t.call(e,"string")
if("object"!=typeof n)return n
throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){{let t
return t=null==e||""===e?null:String(e),(0,i.deprecate)(`The resource id '<${typeof e}> ${String(e)} ' is not normalized. Update your application code to use '${JSON.stringify(t)}' instead.`,t===e,{id:"ember-data:deprecate-non-strict-id",until:"6.0",for:"ember-data",since:{available:"5.3",enabled:"5.3"}}),t}}function m(e){let t=null
return"string"==typeof e?t=e.length>0?e:null:"number"!=typeof e||isNaN(e)||(t=String(e)),t}function g(e){{const t=(0,a.dasherize)(e)
return(0,i.deprecate)(`The resource type '${e}' is not normalized. Update your application code to use '${t}' instead of '${e}'.`,t===e,{id:"ember-data:deprecate-non-strict-types",until:"6.0",for:"ember-data",since:{available:"5.3",enabled:"5.3"}}),t}}function y(e){return Boolean(e&&"object"==typeof e)}function v(e,t){return Boolean(y(e)&&t in e&&"string"==typeof e[t]&&e[t].length)}function b(e){return v(e,"lid")}function _(e){return v(e,"id")||Boolean(y(e)&&"id"in e&&"number"==typeof e.id)}const w=(0,s.L1)("IDENTIFIERS",new Set),k=(0,s.L1)("DOCUMENTS",new Set)
function T(e){return void 0!==e[o]||w.has(e)}function D(e){return k.has(e)}const S="undefined"!=typeof FastBoot?FastBoot.require("crypto"):window.crypto
function P(e){(0,s.dV)("configuredGenerationMethod",e)}function M(e){(0,s.dV)("configuredUpdateMethod",e)}function A(e){(0,s.dV)("configuredForgetMethod",e)}function R(e){(0,s.dV)("configuredResetMethod",e)}function O(e){(0,s.dV)("configuredKeyInfoMethod",e)}const C=new Map
let E=0
function x(e,t,n){"record"===n&&!e.id&&_(t)&&function(e,t,n){let i=e.get(t.type)
i||(i=new Map,e.set(t.type,i)),i.set(n,t.lid)}(C,e,t.id)}function I(e,t){const n=_(e)?p(e.id):null
return{type:function(e){return v(e,"type")}(e)?g(e.type):t?t.type:null,id:n}}function F(e,t){if("record"===t){if(b(e))return e.lid
if(_(e)){const t=g(e.type),n=C.get(t)?.get(e.id)
return n||`@lid:${t}-${e.id}`}return S.randomUUID()}if("document"===t)return e.url?e.method&&"GET"!==e.method.toUpperCase()?null:e.url:null}function N(...e){}function j(e,t,n){return e}class q{constructor(){this._generate=(0,s.Yj)("configuredGenerationMethod")||F,this._update=(0,s.Yj)("configuredUpdateMethod")||x,this._forget=(0,s.Yj)("configuredForgetMethod")||N,this._reset=(0,s.Yj)("configuredResetMethod")||N,this._merge=j,this._keyInfoForResource=(0,s.Yj)("configuredKeyInfoMethod")||I,this._id=E++,this._cache={resources:new Map,resourcesByType:Object.create(null),documents:new Map,polymorphicLidBackMap:new Map}}__configureMerge(e){this._merge=e||j}upgradeIdentifier(e){return this._getRecordIdentifier(e,2)}_getRecordIdentifier(e,t){if(T(e))return e
const n=this._generate(e,"record")
let i=$(this._cache,n)
if(null!==i)return i
if(0!==t){if(2===t)e.lid=n,e[o]=this._id,i=L(e)
else{const t=this._keyInfoForResource(e,null)
t.lid=n,t[o]=this._id,i=L(t)}return z(this._cache,i),i}}peekRecordIdentifier(e){return this._getRecordIdentifier(e,0)}getOrCreateDocumentIdentifier(e){let t=e.cacheOptions?.key
if(t||(t=this._generate(e,"document")),!t)return null
let n=this._cache.documents.get(t)
return void 0===n&&(n={lid:t},k.add(n),this._cache.documents.set(t,n)),n}getOrCreateRecordIdentifier(e){return this._getRecordIdentifier(e,1)}createIdentifierForNewRecord(e){const t=this._generate(e,"record"),n=L({id:e.id||null,type:e.type,lid:t,[o]:this._id})
return z(this._cache,n),n}updateRecordIdentifier(e,t){let n=this.getOrCreateRecordIdentifier(e)
const i=this._keyInfoForResource(t,n)
let r=function(e,t,n,i){const r=t.id,{id:s,type:o,lid:a}=n,l=e.resourcesByType[n.type]
if(null!==s&&s!==r&&null!==r){const e=l&&l.id.get(r)
return void 0!==e&&e}{const n=t.type
if(null!==s&&s===r&&n===o&&b(i)&&i.lid!==a)return $(e,i.lid)||!1
if(null!==s&&s===r&&n&&n!==o&&b(i)&&i.lid===a){const t=e.resourcesByType[n],i=t&&t.id.get(r)
return void 0!==i&&i}}return!1}(this._cache,i,n,t)
const s=b(t)
if(r||n.type!==i.type&&(s&&delete t.lid,r=this.getOrCreateRecordIdentifier(t)),r){const e=n
n=this._mergeRecordIdentifiers(i,e,r,t),s&&(t.lid=n.lid)}const o=n.id;(function(e,t,n,i){i(e,n,"record"),void 0!==n.id&&(e.id=p(n.id))})(n,0,t,this._update)
const a=n.id
if(o!==a&&null!==a){const e=this._cache.resourcesByType[n.type]
e.id.set(a,n),null!==o&&e.id.delete(o)}return n}_mergeRecordIdentifiers(e,t,n,i){const r=this._merge(t,n,i),s=r===t?n:t,o=this._cache.polymorphicLidBackMap.get(s.lid)
o&&this._cache.polymorphicLidBackMap.delete(s.lid),this.forgetRecordIdentifier(s),this._cache.resources.set(s.lid,r)
const a=this._cache.polymorphicLidBackMap.get(r.lid)??[]
return a.push(s.lid),o&&o.forEach((e=>{a.push(e),this._cache.resources.set(e,r)})),this._cache.polymorphicLidBackMap.set(r.lid,a),r}forgetRecordIdentifier(e){const t=this.getOrCreateRecordIdentifier(e),n=this._cache.resourcesByType[t.type]
null!==t.id&&n.id.delete(t.id),this._cache.resources.delete(t.lid),n.lid.delete(t.lid)
const i=this._cache.polymorphicLidBackMap.get(t.lid)
i&&(i.forEach((e=>{this._cache.resources.delete(e)})),this._cache.polymorphicLidBackMap.delete(t.lid)),t[o]=void 0,w.delete(t),this._forget(t,"record")}destroy(){C.clear(),this._cache.documents.forEach((e=>{k.delete(e)})),this._reset()}}function L(e,t,n){return w.add(e),e}function $(e,t,n){return e.resources.get(t)||null}function z(e,t){e.resources.set(t.lid,t)
let n=e.resourcesByType[t.type]
n||(n={lid:new Map,id:new Map},e.resourcesByType[t.type]=n),n.lid.set(t.lid,t),t.id&&n.id.set(t.id,t)}class B{constructor(e,t){f(this,"___token",void 0),f(this,"___identifier",void 0),this.store=e,this.___identifier=t,this.___token=e.notifications.subscribe(t,((e,t,n)=>{("identity"===t||"attributes"===t&&"id"===n)&&this._ref++}))}destroy(){this.store.notifications.unsubscribe(this.___token)}get type(){return this.identifier().type}id(){return this._ref,this.___identifier.id}identifier(){return this.___identifier}remoteType(){return"identity"}push(e){return Promise.resolve(e).then((e=>this.store.push(e)))}value(){return this.store.peekRecord(this.___identifier)}load(){const e=this.id()
if(null!==e)return this.store.findRecord(this.type,e)}reload(){const e=this.id()
if(null!==e)return this.store.findRecord(this.type,e,{reload:!0})}}(0,l.sg)(B.prototype,"_ref")
class Y{constructor(e){this._store=e,this._willNotify=!1,this._pendingNotifies=new Map}get identifierCache(){return this._store.identifierCache}_scheduleNotification(e,t){let n=this._pendingNotifies.get(e)
n||(n=new Set,this._pendingNotifies.set(e,n)),n.add(t),!0!==this._willNotify&&(this._willNotify=!0,this._store._cbs?this._store._schedule("notify",(()=>this._flushNotifications())):this._flushNotifications())}_flushNotifications(){if(!1===this._willNotify)return
const e=this._pendingNotifies
this._pendingNotifies=new Map,this._willNotify=!1,e.forEach(((e,t)=>{e.forEach((e=>{this._store.notifications.notify(t,"relationships",e)}))}))}notifyChange(e,t,n){"relationships"===t&&n?this._scheduleNotification(e,n):this._store.notifications.notify(e,t,n)}get schema(){return this._store.schema}setRecordId(e,t){this._store._instanceCache.setRecordId(e,t)}hasRecord(e){return Boolean(this._store._instanceCache.peek(e))}disconnectRecord(e){this._store._instanceCache.disconnect(e),this._pendingNotifies.delete(e)}}Y.prototype.getSchemaDefinitionService=function(){return this._store.schema}
const Z=(0,s.L1)("CacheForIdentifierCache",new Map)
function U(e,t){Z.set(e,t)}function W(e){Z.delete(e)}function H(e){return Z.has(e)?Z.get(e):null}const V=(0,s.L1)("RecordCache",new Map)
function G(e){return V.get(e)}function J(e){return V.get(e)}function K(e,t){V.set(e,t)}const X=(0,s.L1)("StoreMap",new Map)
function Q(e){return X.get(e)}class ee{constructor(e){f(this,"__instances",{record:new Map,reference:new WeakMap}),this.store=e,this._storeWrapper=new Y(this.store),e.identifierCache.__configureMerge(((e,t,n)=>{let i=e
e.id!==t.id?i="id"in n&&e.id===n.id?e:t:e.type!==t.type&&(i="type"in n&&e.type===n.type?e:t)
const r=e===i?t:e,s=this.__instances.record.has(i),o=this.__instances.record.has(r)
if(s&&o&&"id"in n)throw new Error(`Failed to update the 'id' for the RecordIdentifier '${e.type}:${String(e.id)} (${e.lid})' to '${String(n.id)}', because that id is already in use by '${t.type}:${String(t.id)} (${t.lid})'`)
return this.store.cache.patch({op:"mergeIdentifiers",record:r,value:i}),this.unloadRecord(r),i}))}peek(e){return this.__instances.record.get(e)}getRecord(e,t){let n=this.__instances.record.get(e)
if(!n){const i=this.store.cache
U(e,i),n=this.store.instantiateRecord(e,t||{}),K(n,e),U(n,i),X.set(n,this.store),this.__instances.record.set(e,n)}return n}getReference(e){const t=this.__instances.reference
let n=t.get(e)
return n||(n=new B(this.store,e),t.set(e,n)),n}recordIsLoaded(e,t=!1){const n=this.cache
if(!n)return!1
const i=n.isNew(e),r=n.isEmpty(e)
return i?!n.isDeleted(e):!(t&&n.isDeletionCommitted(e)||r)}disconnect(e){this.__instances.record.get(e),this.store._graph?.remove(e),this.store.identifierCache.forgetRecordIdentifier(e),W(e),this.store._requestCache._clearEntries(e)}unloadRecord(e){this.store._join((()=>{const t=this.__instances.record.get(e),n=this.cache
t&&(this.store.teardownRecord(t),this.__instances.record.delete(e),X.delete(t),V.delete(t),W(t)),n?(n.unloadRecord(e),W(e)):this.disconnect(e),this.store._requestCache._clearEntries(e)}))}clear(e){const t=this.store.identifierCache._cache
if(void 0===e)t.resources.forEach((e=>{this.unloadRecord(e)}))
else{const n=t.resourcesByType,i=n[e]?.lid
i&&i.forEach((e=>{this.unloadRecord(e)}))}}setRecordId(e,t){const{type:n,lid:r}=e,s=e.id
null===s||null!==t?(this.store.identifierCache.peekRecordIdentifier({type:n,id:t}),null===e.id&&this.store.identifierCache.updateRecordIdentifier(e,{type:n,id:t}),this.store.notifications.notify(e,"identity")):(0,i.warn)(`Your ${n} record was saved to the server, but the response does not have an id.`,!(null!==s&&null===t))}}function te(e,t){return"string"==typeof e||"number"==typeof e?{type:t,id:m(e)}:J(e)}const ne=(0,s.L1)("AvailableShims",new WeakMap)
class ie{constructor(e,t){this.__store=e,this.modelName=t}get fields(){const e=new Map
return this.__store.schema.fields({type:this.modelName}).forEach(((t,n)=>{"attribute"!==t.kind&&"belongsTo"!==t.kind&&"hasMany"!==t.kind||e.set(n,t.kind)})),e}get attributes(){const e=new Map
return this.__store.schema.fields({type:this.modelName}).forEach(((t,n)=>{"attribute"===t.kind&&e.set(n,t)})),e}get relationshipsByName(){const e=new Map
return this.__store.schema.fields({type:this.modelName}).forEach(((t,n)=>{"belongsTo"!==t.kind&&"hasMany"!==t.kind||e.set(n,t)})),e}eachAttribute(e,t){this.__store.schema.fields({type:this.modelName}).forEach(((n,i)=>{"attribute"===n.kind&&e.call(t,i,n)}))}eachRelationship(e,t){this.__store.schema.fields({type:this.modelName}).forEach(((n,i)=>{"belongsTo"!==n.kind&&"hasMany"!==n.kind||e.call(t,i,n)}))}eachTransformedAttribute(e,t){this.__store.schema.fields({type:this.modelName}).forEach(((n,i)=>{if("attribute"===n.kind){const r=n.type
r&&e.call(t,i,r)}}))}}const re=new Set(["added","removed","state","updated"])
function se(e){return re.has(e)}function oe(){return!!c._backburner.currentInstance&&!0!==c._backburner._autorun}class ae{constructor(e){this.store=e,this.isDestroyed=!1,this._buffered=new Map,this._hasFlush=!1,this._cache=new Map,this._tokens=new Map}subscribe(e,t){let n=this._cache.get(e)
n||(n=new Map,this._cache.set(e,n))
const i={}
return n.set(i,t),this._tokens.set(i,e),i}unsubscribe(e){this.isDestroyed||function(e,t,n){const i=e.get(t)
if(i){e.delete(t)
const r=n.get(i)
r?.delete(t)}}(this._tokens,e,this._cache)}notify(e,t,n){if(!T(e)&&!D(e))return!1
const i=Boolean(this._cache.get(e)?.size)
if(se(t)||i){let i=this._buffered.get(e)
i||(i=[],this._buffered.set(e,i)),i.push([t,n]),this._scheduleNotify()}return i}_onNextFlush(e){this._onFlushCB=e}_scheduleNotify(){const e=this.store._enableAsyncFlush
this._hasFlush&&!1!==e&&!oe()||(!e||oe()?this._flush():this._hasFlush=!0)}_flush(){this._buffered.size&&(this._buffered.forEach(((e,t)=>{e.forEach((e=>{this._flushNotification(t,e[0],e[1])}))})),this._buffered=new Map),this._hasFlush=!1,this._onFlushCB?.(),this._onFlushCB=void 0}_flushNotification(e,t,n){if(se(t)){const n=this._cache.get(D(e)?"document":"resource")
n&&n.forEach((n=>{n(e,t)}))}const i=this._cache.get(e)
return!(!i||!i.size||(i.forEach((i=>{i(e,t,n)})),0))}destroy(){this.isDestroyed=!0,this._tokens.clear(),this._cache.clear()}}const le=Proxy
var ce=Object.defineProperty;((e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})})({},{c:()=>ge,f:()=>de,g:()=>he,i:()=>me,m:()=>fe,n:()=>pe,p:()=>ye})
var ue=new WeakMap
function de(e,t,n,i){return he(e.prototype,t,n,i)}function he(e,t,n,i){let r={configurable:!0,enumerable:!0,writable:!0,initializer:null}
i&&(r.initializer=i)
for(let s of n)r=s(e,t,r)||r
void 0===r.initializer?Object.defineProperty(e,t,r):function(e,t,n){let i=ue.get(e)
i||(i=new Map,ue.set(e,i)),i.set(t,n)}(e,t,r)}function fe({prototype:e},t,n){return pe(e,t,n)}function pe(e,t,n){let i={...Object.getOwnPropertyDescriptor(e,t)}
for(let r of n)i=r(e,t,i)||i
void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(e):void 0,i.initializer=void 0),Object.defineProperty(e,t,i)}function me(e,t){let n=function(e,t){let n=e.prototype
for(;n;){let e=ue.get(n)?.get(t)
if(e)return e
n=n.prototype}}(e.constructor,t)
n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(e):void 0})}function ge(e,t){return t.reduce(((e,t)=>t(e)||e),e)}function ye(e,t){for(let[n,i,r]of t)"field"===n?ve(e,i,r):pe(e,i,r)
return e}function ve(e,t,n){let i={configurable:!0,enumerable:!0,writable:!0,initializer:()=>Object.getOwnPropertyDescriptor(e,t)?.value}
for(let r of n)i=r(e,t,i)||i
i.initializer&&(i.value=i.initializer.call(e),delete i.initializer),Object.defineProperty(e,t,i)}const be=new Set([Symbol.iterator,"concat","entries","every","fill","filter","find","findIndex","flat","flatMap","forEach","includes","indexOf","join","keys","lastIndexOf","map","reduce","reduceRight","slice","some","values"]),_e=new Set(["push","pop","unshift","shift","splice","sort"]),we=new Set(["[]","length","links","meta"])
function ke(e){return be.has(e)}function Te(e,t){return t in e}const De=(0,s.L1)("#signal",Symbol("#signal")),Se=(0,s.L1)("#source",Symbol("#source")),Pe=(0,s.L1)("#update",Symbol("#update")),Me=(0,s.L1)("#notify",Symbol("#notify")),Ae=(0,s.L1)("IS_COLLECTION",Symbol.for("Collection"))
function Re(e){(0,l.RH)(e[De])}function Oe(e){if("symbol"==typeof e)return null
const t=Number(e)
return isNaN(t)?null:t%1==0?t:null}class Ce{[Me](){Re(this)}destroy(e){this.isDestroying=!e,this[Se].length=0,this[Me](),this.isDestroyed=!e}get length(){return this[Se].length}set length(e){this[Se].length=e}constructor(e){f(this,"isLoaded",!0),f(this,"isDestroying",!1),f(this,"isDestroyed",!1),f(this,"_updatingPromise",null),f(this,Ae,!0),f(this,Se,void 0)
const t=this
this.modelName=e.type,this.store=e.store,this._manager=e.manager,this[Se]=e.identifiers,this[De]=(0,l.n5)(this,"length")
const n=e.store,i=new Map,r=this[De],s={links:e.links||null,meta:e.meta||null}
let o=!1
const a=new le(this[Se],{get(a,c,u){const d=Oe(c)
if(r.shouldReset&&(null!==d||we.has(c)||ke(c))&&(e.manager._syncArray(u),r.t=!1,r.shouldReset=!1),null!==d){const e=a[d]
return o||(0,l.B1)(r),e&&n._instanceCache.getRecord(e)}if("meta"===c)return(0,l.B1)(r),s.meta
if("links"===c)return(0,l.B1)(r),s.links
if("[]"===c)return(0,l.B1)(r),u
if(ke(c)){let e=i.get(c)
return void 0===e&&(e="forEach"===c?function(){(0,l.B1)(r),o=!0
const e=function(e,t,n,i,r){void 0===r&&(r=null)
const s=(t=t.slice()).length
for(let o=0;o<s;o++)i.call(r,n._instanceCache.getRecord(t[o]),o,e)
return e}(u,a,n,arguments[0],arguments[1])
return o=!1,e}:function(){(0,l.B1)(r),o=!0
const e=Reflect.apply(a[c],u,arguments)
return o=!1,e},i.set(c,e)),e}if(function(e){return _e.has(e)}(c)){let n=i.get(c)
return void 0===n&&(n=function(){if(!e.allowMutation)return
const n=Array.prototype.slice.call(arguments)
o=!0
const i=t[Pe](a,u,c,n,r)
return o=!1,i},i.set(c,n)),n}if(Te(t,c)){if(c===Me||c===De||c===Se)return t[c]
let e=i.get(c)
if(e)return e
const n=t[c]
return"function"==typeof n?(e=function(){return(0,l.B1)(r),Reflect.apply(n,u,arguments)},i.set(c,e),e):((0,l.B1)(r),n)}return a[c]},set(n,i,a,l){if("length"===i){if(!o&&0===a)return o=!0,t[Pe](n,l,"length 0",[],r),o=!1,!0
if(o)return Reflect.set(n,i,a)}if("links"===i)return s.links=a||null,!0
if("meta"===i)return s.meta=a||null,!0
const c=Oe(i)
if(null===c||c>n.length){if(null!==c&&o){const e=J(a)
return n[c]=e,!0}return!!Te(t,i)&&(t[i]=a,!0)}if(!e.allowMutation)return!1
const u=n[c],d=(h=a)?J(h):null
var h
return n[c]=d,o?n[c]=d:t[Pe](n,l,"replace cell",[c,u,d],r),!0},deleteProperty:(e,t)=>!!o&&Reflect.deleteProperty(e,t),getPrototypeOf:()=>Ce.prototype})
return(0,l.zs)(a,r),this[Me]=this[Me].bind(a),a}update(){if(this.isUpdating)return this._updatingPromise
this.isUpdating=!0
const e=this._update()
return e.finally((()=>{this._updatingPromise=null,this.isDestroying||this.isDestroyed||(this.isUpdating=!1)})),this._updatingPromise=e,e}_update(){return this.store.findAll(this.modelName,{reload:!0})}save(){return Promise.all(this.map((e=>this.store.saveRecord(e)))).then((()=>this))}}pe(Ce.prototype,"length",[u.Vv])
const Ee={enumerable:!0,configurable:!1,get:function(){return this}};(0,u.Vv)(Ee),Object.defineProperty(Ce.prototype,"[]",Ee),(0,l.sg)(Ce.prototype,"isUpdating",!1)
class xe extends Ce{constructor(e){super(e),f(this,"query",null),this.query=e.query||null,this.isLoaded=e.isLoaded||!1}_update(){const{store:e,query:t}=this
return e.query(this.modelName,t,{_recordArray:this})}destroy(e){super.destroy(e),this._manager._managed.delete(this),this._manager._pending.delete(this)}}xe.prototype.query=null
const Ie=(0,s.L1)("FAKE_ARR",{}),Fe=1200
function Ne(e,t){let n=0
const i=t.length
for(;i-n>Fe;)e.push.apply(e,t.slice(n,n+Fe)),n+=Fe
e.push.apply(e,t.slice(n))}class je{constructor(e){this.store=e.store,this.isDestroying=!1,this.isDestroyed=!1,this._live=new Map,this._managed=new Set,this._pending=new Map,this._staged=new Map,this._keyedArrays=new Map,this._identifiers=new Map,this._set=new Map,this._visibilitySet=new Map,this._subscription=this.store.notifications.subscribe("resource",((e,t)=>{"added"===t?(this._visibilitySet.set(e,!0),this.identifierAdded(e)):"removed"===t?(this._visibilitySet.set(e,!1),this.identifierRemoved(e)):"state"===t&&this.identifierChanged(e)}))}_syncArray(e){const t=this._pending.get(e)
!t||this.isDestroying||this.isDestroyed||(function(e,t,n){const i=e[Se],r=[],s=[]
t.forEach(((e,t)=>{if("add"===e){if(n.has(t))return
r.push(t),n.add(t)}else n.has(t)&&(s.push(t),n.delete(t))})),s.length&&(s.length===i.length?i.length=0:s.forEach((e=>{const t=i.indexOf(e);-1!==t&&(i.splice(t,1),n.delete(e))}))),r.length&&Ne(i,r)}(e,t,this._set.get(e)),this._pending.delete(e))}liveArrayFor(e){let t=this._live.get(e)
const n=[],i=this._staged.get(e)
return i&&(i.forEach(((e,t)=>{"add"===e&&n.push(t)})),this._staged.delete(e)),t||(t=new Ce({type:e,identifiers:n,store:this.store,allowMutation:!1,manager:this}),this._live.set(e,t),this._set.set(t,new Set(n))),t}createArray(e){const t={type:e.type,links:e.doc?.links||null,meta:e.doc?.meta||null,query:e.query||null,identifiers:e.identifiers||[],isLoaded:!!e.identifiers?.length,allowMutation:!1,store:this.store,manager:this},n=new xe(t)
return this._managed.add(n),this._set.set(n,new Set(t.identifiers||[])),e.identifiers&&qe(this._identifiers,n,e.identifiers),n}dirtyArray(e,t){if(e===Ie)return
const n=e[De]
n.shouldReset?t>0&&!n.t&&(0,l.Fe)(e[Me]):(n.shouldReset=!0,(0,l.Fe)(e[Me]))}_getPendingFor(e,t,n){if(this.isDestroying||this.isDestroyed)return
const i=this._live.get(e.type),r=this._pending,s=new Map
if(t){const t=this._identifiers.get(e)
t&&t.forEach((e=>{let t=r.get(e)
t||(t=new Map,r.set(e,t)),s.set(e,t)}))}if(i&&0===i[Se].length&&n){const e=r.get(i)
if(!e||0===e.size)return s}if(i){let e=r.get(i)
e||(e=new Map,r.set(i,e)),s.set(i,e)}else{let t=this._staged.get(e.type)
t||(t=new Map,this._staged.set(e.type,t)),s.set(Ie,t)}return s}populateManagedArray(e,t,n){this._pending.delete(e)
const i=e[Se],r=i.slice()
i.length=0,Ne(i,t),this._set.set(e,new Set(t)),Re(e),e.meta=n.meta||null,e.links=n.links||null,e.isLoaded=!0,function(e,t,n){for(let i=0;i<n.length;i++)Le(e,t,n[i])}(this._identifiers,e,r),qe(this._identifiers,e,t)}identifierAdded(e){const t=this._getPendingFor(e,!1)
t&&t.forEach(((t,n)=>{"del"===t.get(e)?t.delete(e):(t.set(e,"add"),this.dirtyArray(n,t.size))}))}identifierRemoved(e){const t=this._getPendingFor(e,!0,!0)
t&&t.forEach(((t,n)=>{"add"===t.get(e)?t.delete(e):(t.set(e,"del"),this.dirtyArray(n,t.size))}))}identifierChanged(e){const t=this.store._instanceCache.recordIsLoaded(e,!0)
this._visibilitySet.get(e)!==t&&(t?this.identifierAdded(e):this.identifierRemoved(e))}clear(e=!0){this._live.forEach((t=>t.destroy(e))),this._managed.forEach((t=>t.destroy(e))),this._managed.clear(),this._identifiers.clear(),this._pending.clear(),this._set.forEach((e=>e.clear())),this._visibilitySet.clear()}destroy(){this.isDestroying=!0,this.clear(!1),this._live.clear(),this.isDestroyed=!0,this.store.notifications.unsubscribe(this._subscription)}}function qe(e,t,n){for(let i=0;i<n.length;i++){const r=n[i]
let s=e.get(r)
s||(s=new Set,e.set(r,s)),s.add(t)}}function Le(e,t,n){const i=e.get(n)
i&&i.delete(t)}const $e=(0,s.L1)("Touching",Symbol("touching")),ze=(0,s.L1)("RequestPromise",Symbol("promise")),Be=[]
class Ye{constructor(e){f(this,"_pending",new Map),f(this,"_done",new Map),f(this,"_subscriptions",new Map),f(this,"_toFlush",[]),f(this,"_store",void 0),this._store=e}_clearEntries(e){this._done.delete(e)}_enqueue(e,t){const n=t.data[0]
if("recordIdentifier"in n){const i=n.recordIdentifier,r="saveRecord"===n.op?"mutation":"query"
this._pending.has(i)||this._pending.set(i,[])
const s={state:"pending",request:t,type:r}
return s[$e]=[n.recordIdentifier],s[ze]=e,this._pending.get(i).push(s),this._triggerSubscriptions(s),e.then((e=>{this._dequeue(i,s)
const n={state:"fulfilled",request:t,type:r,response:{data:e}}
return n[$e]=s[$e],this._addDone(n),this._triggerSubscriptions(n),e}),(e=>{this._dequeue(i,s)
const n={state:"rejected",request:t,type:r,response:{data:e}}
throw n[$e]=s[$e],this._addDone(n),this._triggerSubscriptions(n),e}))}}_triggerSubscriptions(e){"pending"!==e.state?(this._toFlush.push(e),1===this._toFlush.length&&this._store.notifications._onNextFlush((()=>{this._flush()}))):this._flushRequest(e)}_flush(){this._toFlush.forEach((e=>{this._flushRequest(e)})),this._toFlush=[]}_flushRequest(e){e[$e].forEach((t=>{const n=this._subscriptions.get(t)
n&&n.forEach((t=>t(e)))}))}_dequeue(e,t){const n=this._pending.get(e)
this._pending.set(e,n.filter((e=>e!==t)))}_addDone(e){e[$e].forEach((t=>{const n=e.request.data[0].op
let i=this._done.get(t)
i&&(i=i.filter((e=>{let t
return t=Array.isArray(e.request.data)?e.request.data[0]:e.request.data,t.op!==n}))),i=i||[],i.push(e),this._done.set(t,i)}))}subscribeForRecord(e,t){let n=this._subscriptions.get(e)
n||(n=[],this._subscriptions.set(e,n)),n.push(t)}getPendingRequestsForRecord(e){return this._pending.get(e)||Be}getLastRequestForRecord(e){const t=this._done.get(e)
return t?t[t.length-1]:null}}function Ze(e){return Boolean(e&&"string"==typeof e)}function Ue(e,t,n){if("object"==typeof e&&null!==e){const t=e
return T(t)||"id"in t&&(t.id=p(t.id)),t}{const i=p(t)
if(!Ze(i)){if(Ze(n))return{lid:n}
throw new Error("Expected either id or lid to be a valid string")}return Ze(n)?{type:e,id:i,lid:n}:{type:e,id:i}}}const We=class{constructor(e){}},He=We
He!==We&&(0,i.deprecate)("The Store class extending from EmberObject is deprecated.\nPlease remove usage of EmberObject APIs and mark your class as not requiring it.\n\nTo mark the class as no longer extending from EmberObject, in ember-cli-build.js\nset the following config:\n\n```js\nconst app = new EmberApp(defaults, {\n emberData: {\n deprecations: {\n DEPRECATE_STORE_EXTENDS_EMBER_OBJECT: false\n }\n }\n});\n```\n",!1,{id:"ember-data:deprecate-store-extends-ember-object",until:"6.0",for:"ember-data",since:{available:"5.4",enabled:"5.4"}})
class Ve extends He{get schema(){return this._schema||(this._schema=this.createSchemaService()),this._schema}get isDestroying(){return this._isDestroying}set isDestroying(e){this._isDestroying=e}get isDestroyed(){return this._isDestroyed}set isDestroyed(e){this._isDestroyed=e}constructor(e){super(e),Object.assign(this,e),this.identifierCache=new q,this.notifications=new ae(this),this.recordArrayManager=new je({store:this}),this._requestCache=new Ye(this),this._instanceCache=new ee(this),this._documentCache=new Map,this.isDestroying=!1,this.isDestroyed=!1}_run(e){const t=this._cbs={}
e(),t.coalesce&&t.coalesce(),t.sync&&t.sync(),t.notify&&t.notify(),this._cbs=null}_join(e){this._cbs?e():this._run(e)}_schedule(e,t){this._cbs[e]=t}getRequestStateService(){return this._requestCache}_getAllPending(){}request(e){const t={store:this,[r._q]:!0}
if(e.records){const n=this.identifierCache
t.records=e.records.map((e=>n.getOrCreateRecordIdentifier(e)))}const n=Object.assign({},e,t),i=this.requestManager.request(n)
return i.onFinalize((()=>{("findBelongsTo"!==e.op||e.url)&&this.notifications._flush()})),i}modelFor(e){return function(e,t){let n=ne.get(e)
n||(n=Object.create(null),ne.set(e,n))
let i=n[t]
return void 0===i&&(i=n[t]=new ie(e,t)),i}(this,e)}createRecord(e,t){let n
return this._join((()=>{const i=g(e),r={...t}
let s=null
if(null===r.id||void 0===r.id){const e=this.adapterFor?.(i,!0)
s=e&&e.generateIdForRecord?r.id=p(e.generateIdForRecord(this,i,r)):r.id=null}else s=r.id=p(r.id)
const o={type:i,id:s}
o.id&&this.identifierCache.peekRecordIdentifier(o)
const a=this.identifierCache.createIdentifierForNewRecord(o),l=this.cache,c=function(e,t,n){if(void 0!==n){const{type:i}=t,r=e.schema.fields({type:i})
if(r.size){const e=Object.keys(n)
for(let t=0;t<e.length;t++){const i=e[t],s=r.get(i)
s&&("hasMany"===s.kind?n[i]=n[i].map((e=>Je(e))):"belongsTo"===s.kind&&(n[i]=Je(n[i])))}}}return n}(this,a,r),u=l.clientDidCreate(a,c)
n=this._instanceCache.getRecord(a,u)})),n}deleteRecord(e){const t=G(e),n=this.cache
this._join((()=>{n.setIsDeleted(t,!0),n.isNew(t)&&this._instanceCache.unloadRecord(t)}))}unloadRecord(e){const t=G(e)
t&&this._instanceCache.unloadRecord(t)}findRecord(e,t,n){Ge(e)?n=t:e=Ue(g(e),m(t))
const i=this.identifierCache.getOrCreateRecordIdentifier(e)
return(n=n||{}).preload&&(this._instanceCache.recordIsLoaded(i)||(n.reload=!0),this._join((()=>{!function(e,t,n){const i={},r=e.schema.fields(t)
Object.keys(n).forEach((e=>{const t=n[e],s=r.get(e)
!s||"hasMany"!==s.kind&&"belongsTo"!==s.kind?(i.attributes||(i.attributes={}),i.attributes[e]=t):(i.relationships||(i.relationships={}),i.relationships[e]=function(e,t){const n=e.type
return"hasMany"===e.kind?{data:t.map((e=>te(e,n)))}:{data:t?te(t,n):null}}(s,t))}))
const s=e.cache,o=Boolean(e._instanceCache.peek(t))
s.upsert(t,i,o)}(this,i,n.preload)}))),this.request({op:"findRecord",data:{record:i,options:n},cacheOptions:{[r.ER]:!0}}).then((e=>e.content))}getReference(e,t){let n
n=1===arguments.length&&Ge(e)?e:Ue(g(e),m(t))
const i=this.identifierCache.getOrCreateRecordIdentifier(n)
return this._instanceCache.getReference(i)}peekRecord(e,t){if(1===arguments.length&&Ge(e)){const t=this.identifierCache.peekRecordIdentifier(e)
return t&&this._instanceCache.recordIsLoaded(t)?this._instanceCache.getRecord(t):null}const n={type:g(e),id:m(t)},i=this.identifierCache.peekRecordIdentifier(n)
return i&&this._instanceCache.recordIsLoaded(i)?this._instanceCache.getRecord(i):null}query(e,t,n={}){return this.request({op:"query",data:{type:g(e),query:t,options:n},cacheOptions:{[r.ER]:!0}}).then((e=>e.content))}queryRecord(e,t,n){return this.request({op:"queryRecord",data:{type:g(e),query:t,options:n||{}},cacheOptions:{[r.ER]:!0}}).then((e=>e.content))}findAll(e,t={}){return this.request({op:"findAll",data:{type:g(e),options:t||{}},cacheOptions:{[r.ER]:!0}}).then((e=>e.content))}peekAll(e){return this.recordArrayManager.liveArrayFor(g(e))}unloadAll(e){this._join((()=>{void 0===e?(this._graph?.identifiers.clear(),this.recordArrayManager.clear(),this._instanceCache.clear()):this._instanceCache.clear(g(e))}))}push(e){const t=this._push(e,!1)
return Array.isArray(t)?t.map((e=>this._instanceCache.getRecord(e))):null===t?null:this._instanceCache.getRecord(t)}_push(e,t){let n
return t&&(this._enableAsyncFlush=!0),this._join((()=>{n=this.cache.put({content:e})})),this._enableAsyncFlush=null,"data"in n?n.data:null}saveRecord(e,t={}){const n=J(e),i=this.cache
if(!n)return Promise.reject(new Error("Record Is Disconnected"))
if(function(e,t){const n=e.cache
return!n||function(e,t){return t.isDeletionCommitted(e)||t.isNew(e)&&t.isDeleted(e)}(t,n)}(this._instanceCache,n))return Promise.resolve(e)
t||(t={})
let s="updateRecord"
i.isNew(n)?s="createRecord":i.isDeleted(n)&&(s="deleteRecord")
const o={op:s,data:{options:t,record:n},records:[n],cacheOptions:{[r.ER]:!0}}
return this.request(o).then((e=>e.content))}get cache(){let{cache:e}=this._instanceCache
return e||(e=this._instanceCache.cache=this.createCache(this._instanceCache._storeWrapper)),e}destroy(){this.isDestroyed||(this.isDestroying=!0,this._graph?.destroy(),this._graph=void 0,this.notifications.destroy(),this.recordArrayManager.destroy(),this.identifierCache.destroy(),this.unloadAll(),this.isDestroyed=!0)}static create(e){return new this(e)}}function Ge(e){return Boolean(null!==e&&"object"==typeof e&&("id"in e&&"type"in e&&e.id&&e.type||e.lid))}function Je(e){return e?J(e):null}function Ke(e){return"string"==typeof e?e:e.href}Ve.prototype.getSchemaDefinitionService=function(){return(0,i.deprecate)("Use `store.schema` instead of `store.getSchemaDefinitionService()`",!1,{id:"ember-data:schema-service-updates",until:"5.0",for:"ember-data",since:{available:"5.4",enabled:"5.4"}}),this._schema},Ve.prototype.registerSchemaDefinitionService=function(e){(0,i.deprecate)("Use `store.createSchemaService` instead of `store.registerSchemaDefinitionService()`",!1,{id:"ember-data:schema-service-updates",until:"5.0",for:"ember-data",since:{available:"5.4",enabled:"5.4"}}),this._schema=e},Ve.prototype.registerSchema=function(e){(0,i.deprecate)("Use `store.createSchemaService` instead of `store.registerSchema()`",!1,{id:"ember-data:schema-service-updates",until:"5.0",for:"ember-data",since:{available:"5.4",enabled:"5.4"}}),this._schema=e}
var Xe=new WeakMap,Qe=new WeakSet
class et{constructor(e,t){var n
d(this,n=Qe),n.add(this),function(e,t){d(e,t),t.set(e,void 0)}(this,Xe),function(e,t,n){e.set(h(e,t),n)}(Xe,this,e),this.identifier=t}fetch(e={}){return e.cacheOptions=e.cacheOptions||{},e.cacheOptions.key=this.identifier?.lid,h(Qe,this,tt).call(this,this.links.related?"related":"self",e)}next(e={}){return h(Qe,this,tt).call(this,"next",e)}prev(e={}){return h(Qe,this,tt).call(this,"prev",e)}first(e={}){return h(Qe,this,tt).call(this,"first",e)}last(e={}){return h(Qe,this,tt).call(this,"last",e)}toJSON(){const e={}
return e.identifier=this.identifier,void 0!==this.data&&(e.data=this.data),void 0!==this.links&&(e.links=this.links),void 0!==this.errors&&(e.errors=this.errors),void 0!==this.meta&&(e.meta=this.meta),e}}async function tt(e,t){const n=this.links?.[e]
return n?(t.method=t.method||"GET",Object.assign(t,{url:Ke(n)}),(await(i=Xe,i.get(h(i,this))).request(t)).content):null
var i}(0,l.sg)(et.prototype,"data"),(0,l.sg)(et.prototype,"links"),(0,l.sg)(et.prototype,"errors"),(0,l.sg)(et.prototype,"meta")
const nt=new Set(["createRecord","updateRecord","deleteRecord"])
function it(e,t,n,i,r){const{identifier:s}=n
if(!i)return i
if(function(e){return"errors"in e}(i)){if(!s&&!n.shouldHydrate)return i
let t
return s&&(t=e._documentCache.get(s)),t?r||(t.data=void 0,lt(t,i)):(t=new et(e,s),lt(t,i),s&&e._documentCache.set(s,t)),n.shouldHydrate?t:i}if(Array.isArray(i.data)){const{recordArrayManager:o}=e
if(!s){if(!n.shouldHydrate)return i
const r=o.createArray({type:t.url,identifiers:i.data,doc:i,query:t}),s=new et(e,null)
return s.data=r,s.meta=i.meta,s.links=i.links,s}let a=o._keyedArrays.get(s.lid)
if(a){const t=e._documentCache.get(s)
return r||(o.populateManagedArray(a,i.data,i),t.data=a,t.meta=i.meta,t.links=i.links),n.shouldHydrate?t:i}{a=o.createArray({type:s.lid,identifiers:i.data,doc:i}),o._keyedArrays.set(s.lid,a)
const t=new et(e,s)
return t.data=a,t.meta=i.meta,t.links=i.links,e._documentCache.set(s,t),n.shouldHydrate?t:i}}{if(!s&&!n.shouldHydrate)return i
const t=i.data?e.peekRecord(i.data):null
let o
return s&&(o=e._documentCache.get(s)),o?r||(o.data=t,lt(o,i)):(o=new et(e,s),o.data=t,lt(o,i),s&&e._documentCache.set(s,o)),n.shouldHydrate?o:i}}function rt(e){return Boolean(e.op&&nt.has(e.op))}function st(e,t,n,i,s){const{store:o}=t.request,a=t.request[r._q]||!1
let l=!1
if(rt(t.request)){l=!0
const e=t.request.data?.record||t.request.records?.[0]
e&&o.cache.willCommit(e,t)}o.lifetimes?.willRequest&&o.lifetimes.willRequest(t.request,n,o)
const c=e(t.request).then((e=>{let r
if(o.requestManager._pending.delete(t.id),o._enableAsyncFlush=!0,o._join((()=>{if(rt(t.request)){const n=t.request.data?.record||t.request.records?.[0]
n?r=o.cache.didCommit(n,e):function(e){return!rt(e.request)||("createRecord"===e.request.op&&201===e.response?.status?!!e.content&&Object.keys(e.content).length>0:204!==e.response?.status)}(e)&&(r=o.cache.put(e))}else r=o.cache.put(e)
r=it(o,t.request,{shouldHydrate:a,shouldFetch:i,shouldBackgroundFetch:s,identifier:n},r,!1)})),o._enableAsyncFlush=null,o.lifetimes?.didRequest&&o.lifetimes.didRequest(t.request,e.response,n,o),i)return r
s&&o.notifications._flush()}),(e=>{if(o.requestManager._pending.delete(t.id),t.request.signal?.aborted)throw e
let r
if(o.requestManager._pending.delete(t.id),o._enableAsyncFlush=!0,o._join((()=>{if(rt(t.request)){const n=e&&e.content&&"object"==typeof e.content&&"errors"in e.content&&Array.isArray(e.content.errors)?e.content.errors:void 0,i=t.request.data?.record||t.request.records?.[0]
throw o.cache.commitWasRejected(i,n),e}r=o.cache.put(e),r=it(o,t.request,{shouldHydrate:a,shouldFetch:i,shouldBackgroundFetch:s,identifier:n},r,!1)})),o._enableAsyncFlush=null,n&&o.lifetimes?.didRequest&&o.lifetimes.didRequest(t.request,e.response,n,o),!s){const t=ot(e)
throw t.content=r,t}o.notifications._flush()}))
if(!l)return c
const u=t.request.data?.record||t.request.records?.[0]
return o._requestCache._enqueue(c,{data:[{op:"saveRecord",recordIdentifier:u,options:void 0}]})}function ot(e){const t=function(e){return e instanceof AggregateError||"AggregateError"===e.name&&Array.isArray(e.errors)}(e),n=t?new AggregateError(structuredClone(e.errors),e.message):new Error(e.message)
return n.stack=e.stack,n.error=e.error,Object.assign(n,e),n}const at={request(e,t){if(!e.request.store||e.request.cacheOptions?.[r.ER])return t(e.request)
const{store:n}=e.request,i=n.identifierCache.getOrCreateDocumentIdentifier(e.request),s=i?n.cache.peekRequest(i):null
if(function(e,t,n,i){const{cacheOptions:r}=t
return t.op&&nt.has(t.op)||r?.reload||!n||!(!e.lifetimes||!i)&&e.lifetimes.isHardExpired(i,e)}(n,e.request,!!s,i))return st(t,e,i,!0,!1)
if(function(e,t,n,i){const{cacheOptions:r}=t
return r?.backgroundReload||!(!e.lifetimes||!i)&&e.lifetimes.isSoftExpired(i,e)}(n,e.request,0,i)){const r=st(t,e,i,!1,!0)
n.requestManager._pending.set(e.id,r)}const o=e.request[r._q]||!1
if(e.setResponse(s.response),"error"in s){const t=o?it(n,e.request,{shouldHydrate:o,identifier:i},s.content,!0):s.content,r=ot(s)
throw r.content=t,r}return o?it(n,e.request,{shouldHydrate:o,identifier:i},s.content,!0):s.content}}
function lt(e,t){"links"in t&&(e.links=t.links),"meta"in t&&(e.meta=t.meta),"errors"in t&&(e.errors=t.errors)}},5879:(e,t,n)=>{n.r(t),n.d(t,{CacheHandler:()=>i.C,default:()=>i.S,recordIdentifierFor:()=>i.r,setIdentifierForgetMethod:()=>i.c,setIdentifierGenerationMethod:()=>i.a,setIdentifierResetMethod:()=>i.d,setIdentifierUpdateMethod:()=>i.b,setKeyInfoForResource:()=>i.e,storeFor:()=>i.s})
var i=n(2635)
n(1603),n(500)},3284:(e,t,n)=>{n.d(t,{B1:()=>l,Fe:()=>u,RH:()=>c,V1:()=>m,i$:()=>g,n5:()=>p,sg:()=>h,zs:()=>f})
var i=n(4463),r=n(5606),s=n(3175)
function o(e){e&&(0,r.consumeTag)(e)}function a(e){e&&(0,r.dirtyTag)(e)}function l(e){const t=(0,s.Yj)("TRANSACTION")
t?t.sub.add(e):"tag"in e?(o(e["[]"]),o(e["@length"]),(0,r.consumeTag)(e.tag)):e.ref}function c(e){const t=(0,s.Yj)("TRANSACTION")
t?t.props.add(e):function(e){"tag"in e?(a(e["[]"]),a(e["@length"]),(0,r.dirtyTag)(e.tag)):e.ref=null}(e)}function u(e){const t=(0,s.Yj)("TRANSACTION")
t?t.cbs.add(e):e()}const d=(0,s.L1)("Signals",Symbol("Signals"))
function h(e,t,n){Object.defineProperty(e,t,{enumerable:!0,configurable:!1,get(){const e=this[d]=this[d]||new Map,i=e.has(t),r=function(e,t,n){let i=e.get(n)
return i||(i=p(t,n),e.set(n,i)),l(i),i}(e,this,t)
return i||void 0===n||(r.lastValue=n),r.lastValue},set(e){const n=this[d]=this[d]||new Map
let i=n.get(t)
i||(i=p(this,t),n.set(t,i)),i.lastValue!==e&&(i.lastValue=e,c(i))}})}function f(e,t){t["[]"]=(0,i.tagForProperty)(e,"[]"),t["@length"]=(0,i.tagForProperty)(e,"length")}function p(e,t){return{key:t,tag:(0,i.tagForProperty)(e,t),t:!1,shouldReset:!1,"[]":null,"@length":null,lastValue:void 0}}function m(e,t,n){let i=e[d]
i||(i=new Map,e[d]=i)
let r=i.get(t)
return r||(r=p(e,t),r.shouldReset=n,i.set(t,r)),r}function g(e,t){const n=e[d]
if(n)return n.get(t)}},6684:(e,t,n)=>{n.d(t,{PO:()=>s,Vv:()=>r.dependentKeyCompat})
var i=n(4217),r=(n(3284),n(394))
function s(e,t,n){const r=new WeakMap,s=n.get
n.get=function(){return r.has(this)||r.set(this,(0,i.createCache)(s.bind(this))),(0,i.getValue)(r.get(this))}}},5903:(e,t,n)=>{function i(e){return e?.__esModule?e:{default:e,...e}}n.d(t,{A:()=>i})},3175:(e,t,n)=>{n.d(t,{L1:()=>l,Yj:()=>c,dN:()=>h,dV:()=>u,ml:()=>f,vs:()=>d})
const i="@warp-drive/core-types",r=globalThis,s=r.__warpDrive_universalCache=r.__warpDrive_universalCache??{}
r[i]=r[i]??{__version:"0.0.0-beta.11"}
const o=r[i],a=o.__warpDrive_ModuleScopedCaches??{}
if(o.__warpDrive_hasOtherCopy)throw new Error("Multiple copies of EmberData detected, the application will malfunction.")
function l(e,t){return t}function c(e){return a[`(transient) ${e}`]??null}function u(e,t){return a[`(transient) ${e}`]=t}function d(e,t){return t}function h(e){return s[`(transient) ${e}`]??null}function f(e,t){return s[`(transient) ${e}`]=t}o.__warpDrive_hasOtherCopy=!0},6856:(e,t,n)=>{n.d(t,{ER:()=>r,J6:()=>o,_q:()=>s,k0:()=>a})
var i=n(3175)
const r=(0,i.vs)("SkipCache",Symbol.for("wd:skip-cache")),s=(0,i.vs)("EnableHydration",Symbol.for("wd:enable-hydration")),o=(0,i.L1)("IS_FUTURE",Symbol("IS_FUTURE")),a=(0,i.L1)("DOC",Symbol("DOC"))},9220:(e,t,n)=>{n.d(t,{k5:()=>s,pm:()=>r})
var i=n(3175)
const r=(0,i.L1)("Store",Symbol("Store")),s=(0,i.L1)("$type",Symbol("$type"));(0,i.L1)("RequestSignature",Symbol("RequestSignature"))},3083:(e,t,n)=>{n.r(t),n.d(t,{default:()=>yt})
var i=n(9424)
const r={iterator:()=>({next:()=>({done:!0,value:void 0})})}
class s{constructor(e){this.version="2",this._capabilities=e,this.__cache=new Map,this.__graph=(0,i.graphFor)(e),this.__destroyedCache=new Map,this.__documents=new Map}put(e){if(b(e))return this._putDocument(e,void 0,void 0)
if(function(e){return!(e instanceof Error)&&e.content&&!("data"in e.content)&&!("included"in e.content)&&"meta"in e.content}(e))return this._putDocument(e,void 0,void 0)
const t=e.content,n=t.included
let i,r
const{identifierCache:s}=this._capabilities
if(n)for(i=0,r=n.length;i<r;i++)n[i]=y(this,s,n[i])
if(Array.isArray(t.data)){r=t.data.length
const o=[]
for(i=0;i<r;i++)o.push(y(this,s,t.data[i]))
return this._putDocument(e,o,n)}if(null===t.data)return this._putDocument(e,null,n)
const o=y(this,s,t.data)
return this._putDocument(e,o,n)}_putDocument(e,t,n){const i=b(e)?function(e){const t={}
return e.content&&(_(t,e.content),"errors"in e.content?t.errors=e.content.errors:"object"==typeof e.error&&"errors"in e.error?t.errors=e.error.errors:t.errors=[{title:e.message}]),t}(e):function(e){const t={},n=e.content
return n&&_(t,n),t}(e)
void 0!==t&&(i.data=t),void 0!==n&&(i.included=n)
const r=e.request,s=r?this._capabilities.identifierCache.getOrCreateDocumentIdentifier(r):null
if(s){i.lid=s.lid,e.content=i
const t=this.__documents.has(s.lid)
this.__documents.set(s.lid,e),this._capabilities.notifyChange(s,t?"updated":"added")}return i}patch(e){if("mergeIdentifiers"===e.op){const t=this.__cache.get(e.record)
t&&(this.__cache.set(e.value,t),this.__cache.delete(e.record)),this.__graph.update(e,!0)}}mutate(e){this.__graph.update(e,!1)}peek(e){if("type"in e){const t=this.__safePeek(e,!1)
if(!t)return null
const{type:n,id:i,lid:r}=e,s=Object.assign({},t.remoteAttrs,t.inflightAttrs,t.localAttrs),o={},a=this.__graph.identifiers.get(e)
a&&Object.keys(a).forEach((t=>{a[t].definition.isImplicit||(o[t]=this.__graph.getData(e,t))})),this._capabilities
const c=this._capabilities._store
return this._capabilities.schema.fields(e).forEach(((t,n)=>{if(n in s&&void 0!==s[n])return
const i=l(t,e,c)
void 0!==i&&(s[n]=i)})),{type:n,id:i,lid:r,attributes:s,relationships:o}}const t=this.peekRequest(e)
return t&&"content"in t?t.content:null}peekRequest(e){return this.__documents.get(e.lid)||null}upsert(e,t,n){let i
const r=this.__safePeek(e,!1),s=!!r,o=r||this._createCache(e),a=function(e,t,n){const i=t._store.getRequestStateService()
return!h(e)&&i.getPendingRequestsForRecord(n).some((e=>"query"===e.type))}(r,this._capabilities,e)||!h(r),l=!function(e){if(!e)return!0
const t=e.isNew,n=e.isDeleted,i=d(e)
return(!t||n)&&i}(r)&&!a
return o.isNew&&(o.isNew=!1,this._capabilities.notifyChange(e,"identity"),this._capabilities.notifyChange(e,"state")),n&&(i=s?u(o,t.attributes):Object.keys(t.attributes||{})),o.remoteAttrs=Object.assign(o.remoteAttrs||Object.create(null),t.attributes),o.localAttrs&&g(o)&&this._capabilities.notifyChange(e,"state"),l||this._capabilities.notifyChange(e,"added"),t.id&&(o.id=t.id),t.relationships&&f(this.__graph,this._capabilities,e,t),i&&i.length&&c(this._capabilities,e,i),i}fork(){throw new Error("Not Implemented")}merge(e){throw new Error("Not Implemented")}diff(){throw new Error("Not Implemented")}dump(){throw new Error("Not Implemented")}hydrate(e){throw new Error("Not Implemented")}clientDidCreate(e,t){this._createCache(e).isNew=!0
const n={}
if(void 0!==t){const i=this._capabilities.schema.fields(e),r=this.__graph,s=Object.keys(t)
for(let o=0;o<s.length;o++){const a=s[o],l=t[a]
if("id"===a)continue
const c=i.get(a)
let u
switch(void 0!==c?"kind"in c?c.kind:"attribute":null){case"attribute":this.setAttr(e,a,l),n[a]=l
break
case"belongsTo":this.mutate({op:"replaceRelatedRecord",field:a,record:e,value:l}),u=r.get(e,a),u.state.hasReceivedData=!0,u.state.isEmpty=!1
break
case"hasMany":this.mutate({op:"replaceRelatedRecords",field:a,record:e,value:l}),u=r.get(e,a),u.state.hasReceivedData=!0,u.state.isEmpty=!1
break
default:n[a]=l}}}return this._capabilities.notifyChange(e,"added"),n}willCommit(e){const t=this.__peek(e,!1)
t.inflightAttrs?t.localAttrs&&Object.assign(t.inflightAttrs,t.localAttrs):t.inflightAttrs=t.localAttrs,t.localAttrs=null}didCommit(e,t){const n=t.content,i=t.request.op,r=n&&n.data,{identifierCache:s}=this._capabilities,o=e.id,a="deleteRecord"!==i&&r?s.updateRecordIdentifier(e,r):e,l=this.__peek(a,!1)
let d
l.isDeleted&&(this.__graph.push({op:"deleteRecord",record:a,isNew:!1}),l.isDeletionCommitted=!0,this._capabilities.notifyChange(a,"removed")),l.isNew=!1,r&&(r.id&&!l.id&&(l.id=r.id),a===e&&a.id!==o&&this._capabilities.notifyChange(a,"identity"),r.relationships&&f(this.__graph,this._capabilities,a,r),d=r.attributes)
const h=u(l,d)
l.remoteAttrs=Object.assign(l.remoteAttrs||Object.create(null),l.inflightAttrs,d),l.inflightAttrs=null,g(l),l.errors&&(l.errors=null,this._capabilities.notifyChange(a,"errors")),c(this._capabilities,a,h),this._capabilities.notifyChange(a,"state")
const p=n&&n.included
if(p)for(let c=0,u=p.length;c<u;c++)y(this,s,p[c])
return{data:a}}commitWasRejected(e,t){const n=this.__peek(e,!1)
if(n.inflightAttrs){const e=Object.keys(n.inflightAttrs)
if(e.length>0){const t=n.localAttrs=n.localAttrs||Object.create(null)
for(let i=0;i<e.length;i++)void 0===t[e[i]]&&(t[e[i]]=n.inflightAttrs[e[i]])}n.inflightAttrs=null}t&&(n.errors=t),this._capabilities.notifyChange(e,"errors")}unloadRecord(e){const t=this._capabilities
if(!this.__cache.has(e))return void(0,i.peekGraph)(t)?.unload(e)
const n=!this.isDeletionCommitted(e)
let r=!1
const s=this.__peek(e,!1)
s.isNew?(0,i.peekGraph)(t)?.push({op:"deleteRecord",record:e,isNew:!0}):(0,i.peekGraph)(t)?.unload(e),s.localAttrs=null,s.remoteAttrs=null,s.defaultAttrs=null,s.inflightAttrs=null
const o=function(e,t){const n=[],i=[],r=new Set
for(i.push(t);i.length>0;){const s=i.shift()
n.push(s),r.add(s)
const o=v(e,t).iterator()
for(let e=o.next();!e.done;e=o.next()){const t=e.value
t&&!r.has(t)&&(r.add(t),i.push(t))}}return n}(t,e)
if(function(e,t){for(let n=0;n<t.length;++n){const i=t[n]
if(e.hasRecord(i))return!1}return!0}(t,o))for(let i=0;i<o.length;++i){const e=o[i]
t.notifyChange(e,"removed"),r=!0,t.disconnectRecord(e)}this.__cache.delete(e),this.__destroyedCache.set(e,s),1===this.__destroyedCache.size&&setTimeout((()=>{this.__destroyedCache.clear()}),100),!r&&n&&t.notifyChange(e,"removed")}getAttr(e,t){const n=!Array.isArray(t)||1===t.length
if(Array.isArray(t)&&1===t.length&&(t=t[0]),n){const n=t,r=this.__peek(e,!0)
if(r.localAttrs&&n in r.localAttrs)return r.localAttrs[n]
if(r.inflightAttrs&&n in r.inflightAttrs)return r.inflightAttrs[n]
if(r.remoteAttrs&&n in r.remoteAttrs)return r.remoteAttrs[n]
if(r.defaultAttrs&&n in r.defaultAttrs)return r.defaultAttrs[n]
{const t=this._capabilities.schema.fields(e).get(n)
this._capabilities
const s=l(t,e,this._capabilities._store)
return(i=t)&&a(i.options)&&(r.defaultAttrs=r.defaultAttrs||Object.create(null),r.defaultAttrs[n]=s),s}}var i
const r=t,s=this.__peek(e,!0),o=r[0]
let c=s.localAttrs&&o in s.localAttrs?s.localAttrs[o]:void 0
if(void 0===c&&(c=s.inflightAttrs&&o in s.inflightAttrs?s.inflightAttrs[o]:void 0),void 0===c&&(c=s.remoteAttrs&&o in s.remoteAttrs?s.remoteAttrs[o]:void 0),void 0!==c){for(let e=1;e<r.length;e++)if(c=c[r[e]],void 0===c)return
return c}}setAttr(e,t,n){const i=!Array.isArray(t)||1===t.length
if(Array.isArray(t)&&1===t.length&&(t=t[0]),i){const i=this.__peek(e,!1),r=t,s=i.inflightAttrs&&r in i.inflightAttrs?i.inflightAttrs[r]:i.remoteAttrs&&r in i.remoteAttrs?i.remoteAttrs[r]:void 0
return s!==n?(i.localAttrs=i.localAttrs||Object.create(null),i.localAttrs[r]=n,i.changes=i.changes||Object.create(null),i.changes[r]=[s,n]):i.localAttrs&&(delete i.localAttrs[r],delete i.changes[r]),i.defaultAttrs&&r in i.defaultAttrs&&delete i.defaultAttrs[r],void this._capabilities.notifyChange(e,"attributes",r)}const r=t,s=this.__peek(e,!1),o=r[0],a=s.inflightAttrs&&o in s.inflightAttrs?s.inflightAttrs[o]:s.remoteAttrs&&o in s.remoteAttrs?s.remoteAttrs[o]:void 0
let l
if(a){l=a[r[1]]
for(let e=2;e<r.length;e++)l=l[r[e]]}if(l!==n){s.localAttrs=s.localAttrs||Object.create(null),s.localAttrs[o]=s.localAttrs[o]||structuredClone(a),s.changes=s.changes||Object.create(null)
let e=s.localAttrs[o],t=1
for(;t<r.length-1;)e=e[r[t++]]
e[r[t]]=n,s.changes[o]=[a,s.localAttrs[o]]}else if(s.localAttrs)try{if(!a)return
JSON.stringify(a)!==JSON.stringify(s.localAttrs[o])&&(delete s.localAttrs[o],delete s.changes[o])}catch(e){}this._capabilities.notifyChange(e,"attributes",o)}changedAttrs(e){return this.__peek(e,!1).changes||Object.create(null)}hasChangedAttrs(e){const t=this.__peek(e,!0)
return null!==t.inflightAttrs&&Object.keys(t.inflightAttrs).length>0||null!==t.localAttrs&&Object.keys(t.localAttrs).length>0}rollbackAttrs(e){const t=this.__peek(e,!1)
let n
return t.isDeleted=!1,null!==t.localAttrs&&(n=Object.keys(t.localAttrs),t.localAttrs=null,t.changes=null),t.isNew&&(t.isDeletionCommitted=!0,t.isDeleted=!0,t.isNew=!1),t.inflightAttrs=null,t.defaultAttrs=null,t.errors&&(t.errors=null,this._capabilities.notifyChange(e,"errors")),this._capabilities.notifyChange(e,"state"),n&&n.length&&c(this._capabilities,e,n),n||[]}changedRelationships(e){return this.__graph.getChanged(e)}hasChangedRelationships(e){return this.__graph.hasChanged(e)}rollbackRelationships(e){let t
return this._capabilities,this._capabilities._store._join((()=>{t=this.__graph.rollback(e)})),t}getRelationship(e,t){return this.__graph.getData(e,t)}setIsDeleted(e,t){this.__peek(e,!1).isDeleted=t,this._capabilities.notifyChange(e,"state")}getErrors(e){return this.__peek(e,!0).errors||[]}isEmpty(e){const t=this.__safePeek(e,!0)
return!t||null===t.remoteAttrs&&null===t.inflightAttrs&&null===t.localAttrs}isNew(e){return this.__safePeek(e,!0)?.isNew||!1}isDeleted(e){return this.__safePeek(e,!0)?.isDeleted||!1}isDeletionCommitted(e){return this.__safePeek(e,!0)?.isDeletionCommitted||!1}_createCache(e){const t={id:null,remoteAttrs:null,localAttrs:null,defaultAttrs:null,inflightAttrs:null,changes:null,errors:null,isNew:!1,isDeleted:!1,isDeletionCommitted:!1}
return this.__cache.set(e,t),t}__safePeek(e,t){let n=this.__cache.get(e)
return!n&&t&&(n=this.__destroyedCache.get(e)),n}__peek(e,t){return this.__safePeek(e,t)}}function o(e){return(0,i.isBelongsTo)(e)?e.remoteState?[e.remoteState]:[]:e.remoteState}function a(e){return!!e&&"function"==typeof e.defaultValue}function l(e,t,n){const i=e?.options
if(e&&(i||e.type)&&("attribute"===e.kind||"field"===e.kind)){if(a(i))return i.defaultValue()
if(i&&"defaultValue"in i)return i.defaultValue
if("attribute"!==e.kind&&e.type){const r=n.schema.transformation(e)
if(r?.defaultValue)return r.defaultValue(i||null,t)}}}function c(e,t,n){if(n)for(let i=0;i<n.length;i++)e.notifyChange(t,"attributes",n[i])
else e.notifyChange(t,"attributes")}function u(e,t){const n=[]
if(t){const i=Object.keys(t),r=i.length,s=e.localAttrs,o=Object.assign(Object.create(null),e.remoteAttrs,e.inflightAttrs)
for(let e=0;e<r;e++){const r=i[e],a=t[r]
s&&void 0!==s[r]||o[r]!==a&&n.push(r)}}return n}function d(e){return!e||null===e.remoteAttrs&&null===e.inflightAttrs&&null===e.localAttrs}function h(e,t=!1){if(!e)return!1
const n=e.isNew,i=d(e)
return n?!e.isDeleted:!(t&&e.isDeletionCommitted||i)}function f(e,t,n,i){const r=t.schema.fields(n)
for(const[s,o]of r){if(!m(o))continue
const t=i.relationships[s]
t&&e.push({op:"updateRelationship",record:n,field:s,value:t})}}const p=new Set(["hasMany","belongsTo","resource","collection"])
function m(e){return p.has(e.kind)}function g(e){const{localAttrs:t,remoteAttrs:n,inflightAttrs:i,defaultAttrs:r,changes:s}=e
if(!t)return e.changes=null,!1
let o=!1
const a=Object.keys(t)
for(let l=0,c=a.length;l<c;l++){const e=a[l];(i&&e in i?i[e]:n&&e in n?n[e]:void 0)===t[e]&&(o=!0,delete t[e],delete s[e]),r&&e in r&&delete r[e]}return o}function y(e,t,n){let i=t.peekRecordIdentifier(n)
return i=i?t.updateRecordIdentifier(i,n):t.getOrCreateRecordIdentifier(n),e.upsert(i,n,e._capabilities.hasRecord(i)),i}function v(e,t){const n=(0,i.peekGraph)(e),s=n?.identifiers.get(t)
if(!s)return r
const a=[]
Object.keys(s).forEach((e=>{const t=s[e]
t&&!t.definition.isImplicit&&a.push(t)}))
let l=0,c=0,u=0
return{iterator:()=>({next:()=>{const e=(()=>{for(;l<a.length;){for(;c<2;){const t=0===c?(e=a[l],(0,i.isBelongsTo)(e)?e.localState?[e.localState]:[]:e.additions?[...e.additions]:[]):o(a[l])
for(;u<t.length;){const e=t[u++]
if(null!==e)return e}u=0,c++}c=0,l++}var e})()
return{value:e,done:void 0===e}}})}}function b(e){return e instanceof Error}function _(e,t){"links"in t&&(e.links=t.links),"meta"in t&&(e.meta=t.meta)}var w=n(2294),k=n(5879),T=n(921),D=n(6380)
function S(e,t,n,i){const r=t.data?(0,D.i)(t.data,((t,r)=>{const{id:s,type:o}=t
return function(e,t,n,i){const{id:r,type:s}=e
e.relationships||(e.relationships={})
const{relationships:o}=e,a=function(e,t,n,i){const{name:r}=n,{type:s}=t,o=function(e,t,n){const i=e.schema.fields(t).get(n)
return i?i.options.inverse:null}(e,{type:s},r)
if(o)return{inverseKey:o,kind:e.schema.fields({type:i}).get(o).kind}}(n,t,i,s)
if(a){const{inverseKey:e,kind:n}=a,i=o[e]?.data
"hasMany"===n&&void 0===i||(o[e]=o[e]||{},o[e].data=function(e,t,{id:n,type:i}){const r={id:n,type:i}
let s=null
if("hasMany"===t){const t=e||[]
e&&e.find((e=>e.type===r.type&&e.id===r.id))||t.push(r),s=t}else{const t=e||{}
Object.assign(t,r),s=t}return s}(i??null,n,t))}}(t,n,e,i),{id:s,type:o}})):null,s={}
"meta"in t&&(s.meta=t.meta),"links"in t&&(s.links=t.links),"data"in t&&(s.data=r)
const o={id:n.id,type:n.type,relationships:{[i.name]:s}}
return Array.isArray(t.included)||(t.included=[]),t.included.push(o),t}const P=new Set(["findRecord","findAll","query","queryRecord","findBelongsTo","findHasMany","updateRecord","createRecord","deleteRecord"]),M={request(e,t){if(e.request.url||!e.request.op||!P.has(e.request.op))return t(e.request)
const{store:n}=e.request
switch(n._fetchManager||(n._fetchManager=new D.F(n)),e.request.op){case"findRecord":return function(e){const{store:t,data:n}=e.request,{record:i,options:r}=n
let s
if(t._instanceCache.recordIsLoaded(i))if(r.reload)(0,D.a)(i),s=t._fetchManager.scheduleFetch(i,r,e.request)
else{let n=null
const o=t.adapterFor(i.type)
void 0===r.reload&&o.shouldReloadRecord&&o.shouldReloadRecord(t,n=t._fetchManager.createSnapshot(i,r))?((0,D.a)(i),r.reload=!0,s=t._fetchManager.scheduleFetch(i,r,e.request)):(!1===r.backgroundReload||!r.backgroundReload&&o.shouldBackgroundReloadRecord&&!o.shouldBackgroundReloadRecord(t,n=n||t._fetchManager.createSnapshot(i,r))||((0,D.a)(i),r.backgroundReload=!0,t._fetchManager.scheduleFetch(i,r,e.request)),s=Promise.resolve(i))}else s=t._fetchManager.fetchDataIfNeededForIdentifier(i,r,e.request)
return s.then((e=>t.peekRecord(e)))}(e)
case"findAll":return function(e){const{store:t,data:n}=e.request,{type:i,options:r}=n,s=t.adapterFor(i),o=t.recordArrayManager._live.get(i),a=new D.b(t,i,r)
let l
return r.reload||!1!==r.reload&&(s.shouldReloadAll&&s.shouldReloadAll(t,a)||!s.shouldReloadAll&&0===a.length)?(o&&(o.isUpdating=!0),l=R(s,t,i,a,e.request,!0)):(l=Promise.resolve(t.peekAll(i)),(r.backgroundReload||!1!==r.backgroundReload&&(!s.shouldBackgroundReloadAll||s.shouldBackgroundReloadAll(t,a)))&&(o&&(o.isUpdating=!0),R(s,t,i,a,e.request,!1))),l}(e)
case"query":return function(e){const{store:t,data:n}=e.request
let{options:i}=n
const{type:r,query:s}=n,o=t.adapterFor(r),a=i._recordArray||t.recordArrayManager.createArray({type:r,query:s})
delete i._recordArray
const l=t.modelFor(r)
return Promise.resolve().then((()=>o.query(t,l,s,a,i))).then((e=>{const n=t.serializerFor(r),i=(0,D.n)(n,t,l,e,null,"query"),s=t._push(i,!0)
return t.recordArrayManager.populateManagedArray(a,s,i),a}))}(e)
case"queryRecord":return function(e){const{store:t,data:n}=e.request,{type:i,query:r,options:s}=n,o=t.adapterFor(i),a=t.modelFor(i)
return Promise.resolve().then((()=>o.queryRecord(t,a,r,s))).then((e=>{const n=t.serializerFor(i),r=(0,D.n)(n,t,a,e,null,"queryRecord"),s=t._push(r,!0)
return s?t.peekRecord(s):null}))}(e)
case"findBelongsTo":return function(e){const{store:t,data:n,records:i}=e.request,{options:r,record:s,links:o,useLink:a,field:l}=n,c=i?.[0],u=c&&t._fetchManager.getPendingFetch(c,r)
if(u)return u
if(a)return function(e,t,n,i,r){return Promise.resolve().then((()=>{const s=e.adapterFor(t.type),o=e._fetchManager.createSnapshot(t,r),a=n&&"string"!=typeof n?n.href:n
return s.findBelongsTo(e,o,a,i)})).then((n=>{const r=e.modelFor(i.type),s=e.serializerFor(i.type)
let o=(0,D.n)(s,e,r,n,null,"findBelongsTo")
return o.data||o.links||o.meta?(o=S(e,o,t,i),e._push(o,!0)):null}),null)}(t,s,o.related,l,r)
const d=t._fetchManager
return(0,D.a)(c),r.reload?d.scheduleFetch(c,r,e.request):d.fetchDataIfNeededForIdentifier(c,r,e.request)}(e)
case"findHasMany":return function(e){const{store:t,data:n,records:i}=e.request,{options:r,record:s,links:o,useLink:a,field:l}=n
if(a)return function(e,t,n,i,r,s){return Promise.resolve().then((()=>{const o=t._fetchManager.createSnapshot(n,s),a=i&&"string"!=typeof i?i.href:i
return e.findHasMany(t,o,a,r)})).then((e=>{const i=t.modelFor(r.type),s=t.serializerFor(r.type)
let o=(0,D.n)(s,t,i,e,null,"findHasMany")
return o=S(t,o,n,r),t._push(o,!0)}),null)}(t.adapterFor(s.type),t,s,o.related,l,r)
const c=new Array(i.length),u=t._fetchManager
for(let d=0;d<i.length;d++){const t=i[d];(0,D.a)(t),c[d]=r.reload?u.scheduleFetch(t,r,e.request):u.fetchDataIfNeededForIdentifier(t,r,e.request)}return Promise.all(c)}(e)
case"updateRecord":case"createRecord":case"deleteRecord":return function(e){const{store:t,data:n,op:i}=e.request,{options:r,record:s}=n
t.cache.willCommit(s,e)
const o=Object.assign({[D.S]:i},r)
return t._fetchManager.scheduleSave(s,o).then((n=>{let r
return t._join((()=>{r=t.cache.didCommit(s,{request:e.request,content:n})})),t.lifetimes?.didRequest&&"createRecord"===i&&t.lifetimes.didRequest(e.request,{status:201},null,t),t.peekRecord(r.data)})).catch((e=>{let n=e
throw e?"string"==typeof e&&(n=new Error(e)):n=new Error("Unknown Error Occurred During Request"),function(e,t,n){if(n&&!0===n.isAdapterError&&"InvalidError"===n.code){const i=e.serializerFor(t.type)
if(i&&"function"==typeof i.extractErrors){const r=i.extractErrors(e,e.modelFor(t.type),n,t.id)
n.errors=function(e){const t=[]
return e&&Object.keys(e).forEach((n=>{const i=(r=e[n],Array.isArray(r)?r:[r])
var r
for(let e=0;e<i.length;e++){let r="Invalid Attribute",s=`/data/attributes/${n}`
n===A&&(r="Invalid Document",s="/data"),t.push({title:r,detail:i[e],source:{pointer:s}})}})),t}(r)}}const i=e.cache
if(n.errors){let e=n.errors
0===e.length&&(e=[{title:"Invalid Error",detail:"",source:{pointer:"/data"}}]),i.commitWasRejected(t,e)}else i.commitWasRejected(t)}(t,s,n),n}))}(e)
default:return t(e.request)}}},A="base"
function R(e,t,n,i,r,s){const o=t.modelFor(n)
let a=Promise.resolve().then((()=>e.findAll(t,o,null,i)))
return a=a.then((e=>{const r=t.serializerFor(n),a=(0,D.n)(r,t,o,e,null,"findAll")
return t._push(a,s),i._recordArray.isUpdating=!1,i._recordArray})),a}function O(e,t){this._adapterCache=this._adapterCache||Object.create(null)
const n=(0,T.di)(e),{_adapterCache:i}=this
let r=i[n]
if(r)return r
const s=(0,w.getOwner)(this)
return r=s.lookup(`adapter:${n}`),void 0!==r?(i[n]=r,r):(r=i.application||s.lookup("adapter:application"),void 0!==r?(i[n]=r,i.application=r,r):void 0)}function C(e){this._serializerCache=this._serializerCache||Object.create(null)
const t=(0,T.di)(e),{_serializerCache:n}=this
let i=n[t]
if(i)return i
const r=(0,w.getOwner)(this)
return i=r.lookup(`serializer:${t}`),void 0!==i?(n[t]=i,i):(i=n.application||r.lookup("serializer:application"),void 0!==i?(n[t]=i,n.application=i,i):null)}function E(e,t){const n=(0,T.di)(e),i=this.serializerFor(n),r=this.modelFor(n)
return i.normalize(r,t)}function x(e,t){const n=t||e,i=t?(0,T.di)(e):"application"
this.serializerFor(i).pushPayload(this,n)}function I(e,t){return this._fetchManager||(this._fetchManager=new D.F(this)),this._fetchManager.createSnapshot((0,k.recordIdentifierFor)(e)).serialize(t)}function F(){for(const e in this._adapterCache){const t=this._adapterCache[e]
"function"==typeof t.destroy&&t.destroy()}for(const e in this._serializerCache){const t=this._serializerCache[e]
"function"==typeof t.destroy&&t.destroy()}}var N,j,q,L,$,z=n(1603),B=n(500),Y=n(4471),Z=n.n(Y),U=n(6684),W=n(3284),H=n(9220),V=n(1389),G=n(8410),J=n.n(G),K=n(3991),X=n(6604),Q=n(3175),ee=n(9280),te=n.n(ee),ne=n(7104),ie=n.n(ne),re=n(4666),se=n(5903)
function oe(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function ae(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e
var t=e[Symbol.toPrimitive]
if(void 0!==t){var n=t.call(e,"string")
if("object"!=typeof n)return n
throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e){{const t=(0,B.dasherize)(e)
return(0,z.deprecate)(`The resource type '${e}' is not normalized. Update your application code to use '${t}' instead of '${e}'.`,t===e,{id:"ember-data:deprecate-non-strict-types",until:"6.0",for:"ember-data",since:{available:"5.3",enabled:"5.3"}}),t}}class ce extends T.oz{constructor(e){super(e),this.isLoaded=e.isLoaded||!1,this.isAsync=e.isAsync||!1,this.isPolymorphic=e.isPolymorphic||!1,this.identifier=e.identifier,this.key=e.key}[T.XK](e,t,n,i,r){switch(n){case"length 0":return Reflect.set(e,"length",0),me(this,[],r),!0
case"replace cell":{const[t,n,s]=i
return e[t]=s,function(e,t,n){ge(e,{op:"replaceRelatedRecord",record:e.identifier,field:e.key,...t},n)}(this,{value:s,prior:n,index:t},r),!0}case"push":{const s=ue(i)
he(this,e,(e=>e.push(...s)),"Cannot push duplicates to a hasMany's state.")
{const s=new Set(e),o=new Set
i.forEach((e=>{const t=(0,T.o)(e)
s.has(t)||(s.add(t),o.add(e))}))
const a=Array.from(o),l=Reflect.apply(e[n],t,a)
return a.length&&fe(this,{value:ue(a)},r),l}}case"pop":{const s=Reflect.apply(e[n],t,i)
return s&&pe(this,{value:(0,T.o)(s)},r),s}case"unshift":{const s=ue(i)
he(this,e,(e=>e.unshift(...s)),"Cannot unshift duplicates to a hasMany's state.")
{const s=new Set(e),o=new Set
i.forEach((e=>{const t=(0,T.o)(e)
s.has(t)||(s.add(t),o.add(e))}))
const a=Array.from(o),l=Reflect.apply(e[n],t,a)
return a.length&&fe(this,{value:ue(a),index:0},r),l}}case"shift":{const s=Reflect.apply(e[n],t,i)
return s&&pe(this,{value:(0,T.o)(s),index:0},r),s}case"sort":{const s=Reflect.apply(e[n],t,i)
return function(e,t,n){ge(e,{op:"sortRelatedRecords",record:e.identifier,field:e.key,value:t},n)}(this,s.map(T.o),r),s}case"splice":{const[s,o,...a]=i
if(0===s&&o===this[T.u2].length){const i=ue(a)
he(this,e,(e=>e.splice(s,o,...i)),"Cannot replace a hasMany's state with a new state that contains duplicates.")
{const i=new Set(a),l=Array.from(i),c=[s,o].concat(l),u=Reflect.apply(e[n],t,c)
return me(this,ue(l),r),u}}const l=ue(a)
he(this,e,(e=>e.splice(s,o,...l)),"Cannot splice a hasMany's state with a new state that contains duplicates.")
{const i=e.slice()
i.splice(s,o)
const l=new Set(i),c=[]
a.forEach((e=>{const t=(0,T.o)(e)
l.has(t)||(l.add(t),c.push(e))}))
const u=[s,o,...c],d=Reflect.apply(e[n],t,u)
return o>0&&pe(this,{value:d.map(T.o),index:s},r),c.length>0&&fe(this,{value:ue(c),index:s},r),d}}}}notify(){this[T.To].shouldReset=!0,(0,T.J4)(this)}reload(e){return this._manager.reloadHasMany(this.key,e)}createRecord(e){const{store:t}=this,n=t.createRecord(this.modelName,e)
return this.push(n),n}destroy(){super.destroy(!1)}}function ue(e){return e.map(de)}function de(e){return(0,T.o)(e)}function he(e,t,n,i){const r=t.slice()
if(n(r),r.length!==new Set(r).size){const t=r.filter(((e,t)=>r.indexOf(e)!==t));(0,z.deprecate)(`${i} This behavior is deprecated. Found duplicates for the following records within the new state provided to \`<${e.identifier.type}:${e.identifier.id||e.identifier.lid}>.${e.key}\`\n\t- ${Array.from(new Set(t)).map((e=>(0,T.xm)(e)?e.lid:(0,T.o)(e).lid)).sort(((e,t)=>e.localeCompare(t))).join("\n\t- ")}`,!1,{id:"ember-data:deprecate-many-array-duplicates",for:"ember-data",until:"6.0",since:{enabled:"5.3",available:"5.3"}})}}function fe(e,t,n){ge(e,{op:"addToRelatedRecords",record:e.identifier,field:e.key,...t},n)}function pe(e,t,n){ge(e,{op:"removeFromRelatedRecords",record:e.identifier,field:e.key,...t},n)}function me(e,t,n){ge(e,{op:"replaceRelatedRecords",record:e.identifier,field:e.key,value:t},n)}function ge(e,t,n){e._manager.mutate(t),(0,W.RH)(n)}ce.prototype.isAsync=!1,ce.prototype.isPolymorphic=!1,ce.prototype.identifier=null,ce.prototype.cache=null,ce.prototype._inverseIsAsync=!1,ce.prototype.key="",ce.prototype.DEPRECATED_CLASS_NAME="ManyArray"
const ye=ie().extend(te())
var ve=Object.defineProperty;((e,t)=>{for(var n in t)ve(e,n,{get:t[n],enumerable:!0})})({},{c:()=>Se,f:()=>_e,g:()=>we,i:()=>De,m:()=>ke,n:()=>Te,p:()=>Pe})
var be=new WeakMap
function _e(e,t,n,i){return we(e.prototype,t,n,i)}function we(e,t,n,i){let r={configurable:!0,enumerable:!0,writable:!0,initializer:null}
i&&(r.initializer=i)
for(let s of n)r=s(e,t,r)||r
void 0===r.initializer?Object.defineProperty(e,t,r):function(e,t,n){let i=be.get(e)
i||(i=new Map,be.set(e,i)),i.set(t,n)}(e,t,r)}function ke({prototype:e},t,n){return Te(e,t,n)}function Te(e,t,n){let i={...Object.getOwnPropertyDescriptor(e,t)}
for(let r of n)i=r(e,t,i)||i
void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(e):void 0,i.initializer=void 0),Object.defineProperty(e,t,i)}function De(e,t){let n=function(e,t){let n=e.prototype
for(;n;){let e=be.get(n)?.get(t)
if(e)return e
n=n.prototype}}(e.constructor,t)
n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(e):void 0})}function Se(e,t){return t.reduce(((e,t)=>t(e)||e),e)}function Pe(e,t){for(let[n,i,r]of t)"field"===n?Me(e,i,r):Te(e,i,r)
return e}function Me(e,t,n){let i={configurable:!0,enumerable:!0,writable:!0,initializer:()=>Object.getOwnPropertyDescriptor(e,t)?.value}
for(let r of n)i=r(e,t,i)||i
i.initializer&&(i.value=i.initializer.call(e),delete i.initializer),Object.defineProperty(e,t,i)}const Ae=Symbol.for("LegacyPromiseProxy"),Re=ye
class Oe extends Re{constructor(...e){super(...e),ae(this,Ae,!0)}get id(){const{key:e,legacySupport:t}=this._belongsToState
return t.referenceFor("belongsTo",e).id()}get meta(){}async reload(e){const{key:t,legacySupport:n}=this._belongsToState
return await n.reloadBelongsTo(t,e),this}}Te((N=Oe).prototype,"id",[U.PO]),Te(N.prototype,"meta",[(0,Y.computed)()])
class Ce{constructor(e,t){ae(this,Ae,!0),this._update(e,t),this.isDestroyed=!1}get length(){return this["[]"],this.content?this.content.length:0}forEach(e){this.content&&this.length&&this.content.forEach(e)}reload(e){return this.content.reload(e),this}then(e,t){return this.promise.then(e,t)}catch(e){return this.promise.catch(e)}finally(e){return this.promise.finally(e)}destroy(){this.isDestroyed=!0,this.content=null,this.promise=null}get links(){return this.content?this.content.links:void 0}get meta(){return this.content?this.content.meta:void 0}_update(e,t){void 0!==t&&(this.content=t),this.promise=function(e,t){return e.isPending=!0,e.isSettled=!1,e.isFulfilled=!1,e.isRejected=!1,Promise.resolve(t).then((t=>(e.isPending=!1,e.isFulfilled=!0,e.isSettled=!0,e.content=t,t)),(t=>{throw e.isPending=!1,e.isFulfilled=!1,e.isRejected=!0,e.isSettled=!0,t}))}(this,e)}static create({promise:e,content:t}){return new this(e,t)}}Te((j=Ce).prototype,"length",[U.Vv]),Te(j.prototype,"links",[U.Vv]),Te(j.prototype,"meta",[U.Vv]),(0,W.sg)(Ce.prototype,"content",null),(0,W.sg)(Ce.prototype,"isPending",!1),(0,W.sg)(Ce.prototype,"isRejected",!1),(0,W.sg)(Ce.prototype,"isFulfilled",!1),(0,W.sg)(Ce.prototype,"isSettled",!1)
{const e={enumerable:!0,configurable:!1,get:function(){return this.content?.length&&this.content}};(0,U.Vv)(e),Object.defineProperty(Ce.prototype,"[]",e)}class Ee{constructor(e,t,n,i,r){ae(this,"___token",void 0),ae(this,"___identifier",void 0),ae(this,"___relatedTokenMap",void 0),this.graph=t,this.key=r,this.hasManyRelationship=i,this.type=i.definition.type,this.store=e,this.___identifier=n,this.___token=e.notifications.subscribe(n,((e,t,n)=>{"relationships"===t&&n===r&&this._ref++})),this.___relatedTokenMap=new Map}destroy(){this.store.notifications.unsubscribe(this.___token),this.___relatedTokenMap.forEach((e=>{this.store.notifications.unsubscribe(e)})),this.___relatedTokenMap.clear()}get identifiers(){this._ref
const e=this._resource(),t=this.___relatedTokenMap
return this.___relatedTokenMap=new Map,e&&e.data?e.data.map((e=>{const n=this.store.identifierCache.getOrCreateRecordIdentifier(e)
let i=t.get(n)
return i?t.delete(n):i=this.store.notifications.subscribe(n,((e,t,n)=>{("identity"===t||"attributes"===t&&"id"===n)&&this._ref++})),this.___relatedTokenMap.set(n,i),n})):(t.forEach((e=>{this.store.notifications.unsubscribe(e)})),t.clear(),[])}_resource(){return this.store.cache.getRelationship(this.___identifier,this.key)}remoteType(){const e=this._resource()
return e&&e.links&&e.links.related?"link":"ids"}ids(){return this.identifiers.map((e=>e.id))}link(){const e=this._resource()
if(t=e,Boolean(t&&t.links&&t.links.related)&&e.links){const t=e.links.related
return t&&"string"!=typeof t?t.href:t}var t
return null}links(){const e=this._resource()
return e&&e.links?e.links:null}meta(){let e=null
const t=this._resource()
return t&&t.meta&&"object"==typeof t.meta&&(e=t.meta),e}async push(e,t){const{store:n}=this,i=Array.isArray(e)?{data:e}:e,r=Array.isArray(i.data)&&i.data.length>0&&xe(i.data[0]),s=Array.isArray(i.data)?r?n._push(i,!0):i.data.map((e=>n.identifierCache.getOrCreateRecordIdentifier(e))):[],{identifier:o}=this.hasManyRelationship,a={}
if(Array.isArray(i.data)&&(a.data=s),"links"in i&&(a.links=i.links),"meta"in i&&(a.meta=i.meta),n._join((()=>{this.graph.push({op:"updateRelationship",record:o,field:this.key,value:a})})),!t)return this.load()}_isLoaded(){if(!this.hasManyRelationship.state.hasReceivedData)return!1
const e=this.graph.getData(this.hasManyRelationship.identifier,this.key)
return e.data?.every((e=>!0===this.store._instanceCache.recordIsLoaded(e,!0)))}value(){const e=Ne.get(this.___identifier)
return this._isLoaded()?e.getManyArray(this.key):(this._ref,null)}async load(e){const t=Ne.get(this.___identifier)
return this.hasManyRelationship.definition.isAsync||$e(this.store,this._resource())?t.getHasMany(this.key,e):t.reloadHasMany(this.key,e)}reload(e){return Ne.get(this.___identifier).reloadHasMany(this.key,e)}}function xe(e){return Object.keys(e).filter((e=>"id"!==e&&"type"!==e&&"lid"!==e)).length>0}function Ie(e){return Boolean(e&&e.links&&e.links.related)}Te(Ee.prototype,"identifiers",[U.Vv,U.PO]),(0,W.sg)(Ee.prototype,"_ref",0)
class Fe{constructor(e,t,n,i,r){this.graph=t,this.key=r,this.belongsToRelationship=i,this.type=i.definition.type,this.store=e,this.___identifier=n,this.___relatedToken=null,this.___token=e.notifications.subscribe(n,((e,t,n)=>{"relationships"===t&&n===r&&this._ref++}))}destroy(){this.store.notifications.unsubscribe(this.___token),this.___token=null,this.___relatedToken&&(this.store.notifications.unsubscribe(this.___relatedToken),this.___relatedToken=null)}get identifier(){this.___relatedToken&&(this.store.notifications.unsubscribe(this.___relatedToken),this.___relatedToken=null)
const e=this._resource()
if(e&&e.data){const t=this.store.identifierCache.getOrCreateRecordIdentifier(e.data)
return this.___relatedToken=this.store.notifications.subscribe(t,((e,t,n)=>{("identity"===t||"attributes"===t&&"id"===n)&&this._ref++})),t}return null}id(){return this.identifier?.id||null}link(){const e=this._resource()
if(Ie(e)&&e.links){const t=e.links.related
return t&&"string"!=typeof t?t.href:t}return null}links(){const e=this._resource()
return e&&e.links?e.links:null}meta(){let e=null
const t=this._resource()
return t&&t.meta&&"object"==typeof t.meta&&(e=t.meta),e}_resource(){return this._ref,this.store.cache.getRelationship(this.___identifier,this.key)}remoteType(){return Ie(this._resource())?"link":"id"}async push(e,t){const{store:n}=this,i=e.data&&xe(e.data)?n._push(e,!0):e.data?n.identifierCache.getOrCreateRecordIdentifier(e.data):null,{identifier:r}=this.belongsToRelationship,s={}
if((e.data||null===e.data)&&(s.data=i),"links"in e&&(s.links=e.links),"meta"in e&&(s.meta=e.meta),n._join((()=>{this.graph.push({op:"updateRelationship",record:r,field:this.key,value:s})})),!t)return this.load()}value(){const e=this._resource()
return e&&e.data?this.store.peekRecord(e.data):null}async load(e){const t=Ne.get(this.___identifier)
return this.belongsToRelationship.definition.isAsync||$e(this.store,this._resource())?t.getBelongsTo(this.key,e):t.reloadBelongsTo(this.key,e).then((()=>this.value()))}reload(e){return Ne.get(this.___identifier).reloadBelongsTo(this.key,e).then((()=>this.value()))}}Te(Fe.prototype,"identifier",[U.Vv,U.PO]),(0,W.sg)(Fe.prototype,"_ref",0)
const Ne=(0,Q.L1)("LEGACY_SUPPORT",new Map)
function je(e){const t=(0,T.o)(e)
let n=Ne.get(t)
return n||(n=new qe(e),Ne.set(t,n),Ne.set(e,n)),n}class qe{constructor(e){this.record=e,this.store=(0,T.fV)(e),this.identifier=(0,T.o)(e),this.cache=(0,T.oX)(e)
{const e=(0,se.A)(n(9424)).graphFor
this.graph=e(this.store)}this._manyArrayCache=Object.create(null),this._relationshipPromisesCache=Object.create(null),this._relationshipProxyCache=Object.create(null),this._pending=Object.create(null),this.references=Object.create(null)}_syncArray(e){if(this.isDestroyed||this.isDestroying)return
const t=e[T.u2],n=this.identifier,[i,r]=this._getCurrentState(n,e.key)
r.meta&&(e.meta=r.meta),r.links&&(e.links=r.links),t.length=0,(0,T.RX)(t,i)}mutate(e){this.cache.mutate(e)}_findBelongsTo(e,t,n,i){return this._findBelongsToByJsonApiResource(t,this.identifier,n,i).then((t=>Le(this,e,n,t)),(t=>Le(this,e,n,null,t)))}reloadBelongsTo(e,t){const n=this._relationshipPromisesCache[e]
if(n)return n
const i=this.graph.get(this.identifier,e),r=this.cache.getRelationship(this.identifier,e)
i.state.hasFailedLoadAttempt=!1,i.state.shouldForceReload=!0
const s=this._findBelongsTo(e,r,i,t)
return this._relationshipProxyCache[e]?this._updatePromiseProxyFor("belongsTo",e,{promise:s}):s}getBelongsTo(e,t){const{identifier:n,cache:i}=this,r=i.getRelationship(this.identifier,e),s=r&&r.data?r.data:null,o=this.store,a=this.graph.get(this.identifier,e),l=a.definition.isAsync,c={key:e,store:o,legacySupport:this,modelName:a.definition.type}
if(l){if(a.state.hasFailedLoadAttempt)return this._relationshipProxyCache[e]
const n=this._findBelongsTo(e,r,a,t),i=s&&o._instanceCache.recordIsLoaded(s)
return this._updatePromiseProxyFor("belongsTo",e,{promise:n,content:i?o._instanceCache.getRecord(s):null,_belongsToState:c})}return null===s?null:o._instanceCache.getRecord(s)}setDirtyBelongsTo(e,t){return this.cache.mutate({op:"replaceRelatedRecord",record:this.identifier,field:e,value:(n=t,n?(0,T.o)(n):null)},!0)
var n}_getCurrentState(e,t){const n=this.cache.getRelationship(e,t),i=this.store._instanceCache,r=[]
if(n.data)for(let s=0;s<n.data.length;s++){const e=n.data[s]
i.recordIsLoaded(e,!0)&&r.push(e)}return[r,n]}getManyArray(e,t){{let n=this._manyArrayCache[e]
if(t||(t=this.graph.get(this.identifier,e).definition),!n){const[i,r]=this._getCurrentState(this.identifier,e)
n=new ce({store:this.store,type:t.type,identifier:this.identifier,cache:this.cache,identifiers:i,key:e,meta:r.meta||null,links:r.links||null,isPolymorphic:t.isPolymorphic,isAsync:t.isAsync,_inverseIsAsync:t.inverseIsAsync,manager:this,isLoaded:!t.isAsync,allowMutation:!0}),this._manyArrayCache[e]=n}return n}}fetchAsyncHasMany(e,t,n,i){{let r=this._relationshipPromisesCache[e]
if(r)return r
const s=this.cache.getRelationship(this.identifier,e),o=this._findHasManyByJsonApiResource(s,this.identifier,t,i)
return o?(r=o.then((()=>Le(this,e,t,n)),(i=>Le(this,e,t,n,i))),this._relationshipPromisesCache[e]=r,r):(n.isLoaded=!0,Promise.resolve(n))}}reloadHasMany(e,t){{const n=this._relationshipPromisesCache[e]
if(n)return n
const i=this.graph.get(this.identifier,e),{definition:r,state:s}=i
s.hasFailedLoadAttempt=!1,s.shouldForceReload=!0
const o=this.getManyArray(e,r),a=this.fetchAsyncHasMany(e,i,o,t)
return this._relationshipProxyCache[e]?this._updatePromiseProxyFor("hasMany",e,{promise:a}):a}}getHasMany(e,t){{const n=this.graph.get(this.identifier,e),{definition:i,state:r}=n,s=this.getManyArray(e,i)
if(i.isAsync){if(r.hasFailedLoadAttempt)return this._relationshipProxyCache[e]
const i=this.fetchAsyncHasMany(e,n,s,t)
return this._updatePromiseProxyFor("hasMany",e,{promise:i,content:s})}return s}}_updatePromiseProxyFor(e,t,n){let i=this._relationshipProxyCache[t]
if("hasMany"===e){const{promise:e,content:r}=n
return i?i._update(e,r):i=this._relationshipProxyCache[t]=new Ce(e,r),i}if(i){const{promise:e,content:t}=n
void 0!==t&&i.set("content",t),i.set("promise",e)}else i=Oe.create(n),this._relationshipProxyCache[t]=i
return i}referenceFor(e,t){let n=this.references[t]
if(!n){const{graph:e,identifier:i}=this,r=e.get(i,t),s=r.definition.kind
"belongsTo"===s?n=new Fe(this.store,e,i,r,t):"hasMany"===s&&(n=new Ee(this.store,e,i,r,t)),this.references[t]=n}return n}_findHasManyByJsonApiResource(e,t,n,i={}){{if(!e)return
const{definition:r,state:s}=n;(0,X.upgradeStore)(this.store)
const o=this.store.adapterFor?.(r.type),{isStale:a,hasDematerializedInverse:l,hasReceivedData:c,isEmpty:u,shouldForceReload:d}=s,h=$e(this.store,e),f=e.data,p=e.links&&e.links.related&&("function"==typeof o?.findHasMany||void 0===f)&&(d||l||a||!h&&!u),m={useLink:p,field:this.store.schema.fields({type:r.inverseType}).get(r.key),links:e.links,meta:e.meta,options:i,record:t}
if(p)return this.store.request({op:"findHasMany",records:f||[],data:m,cacheOptions:{[Symbol.for("wd:skip-cache")]:!0}})
const g=c&&!u,y=l||u&&Array.isArray(f)&&f.length>0,v=!d&&!a&&(g||y)
if(v&&h)return
return v||c&&!u||y?(i.reload=i.reload||!v||void 0,this.store.request({op:"findHasMany",records:f,data:m,cacheOptions:{[Symbol.for("wd:skip-cache")]:!0}})):void 0}}_findBelongsToByJsonApiResource(e,t,n,i={}){if(!e)return Promise.resolve(null)
const r=n.definition.key
if(this._pending[r])return this._pending[r]
const s=e.data?e.data:null,{isStale:o,hasDematerializedInverse:a,hasReceivedData:l,isEmpty:c,shouldForceReload:u}=n.state,d=$e(this.store,e),h=e.links?.related&&(u||a||o||!d&&!c),f={useLink:h,field:this.store.schema.fields(this.identifier).get(n.definition.key),links:e.links,meta:e.meta,options:i,record:t}
if(h){const e=this.store.request({op:"findBelongsTo",records:s?[s]:[],data:f,cacheOptions:{[Symbol.for("wd:skip-cache")]:!0}})
return this._pending[r]=e.then((e=>e.content)).finally((()=>{this._pending[r]=void 0})),this._pending[r]}const p=l&&d&&!c,m=a||c&&e.data,g=!u&&!o&&(p||m)
return g&&!s?Promise.resolve(null):g&&d||null===s?.id?Promise.resolve(s):s?(i.reload=i.reload||!g||void 0,this._pending[r]=this.store.request({op:"findBelongsTo",records:[s],data:f,cacheOptions:{[Symbol.for("wd:skip-cache")]:!0}}).then((e=>e.content)).finally((()=>{this._pending[r]=void 0})),this._pending[r]):Promise.resolve(null)}destroy(){this.isDestroying=!0
let e=this._manyArrayCache
this._manyArrayCache=Object.create(null),Object.keys(e).forEach((t=>{e[t].destroy()})),e=this._relationshipProxyCache,this._relationshipProxyCache=Object.create(null),Object.keys(e).forEach((t=>{const n=e[t]
n.destroy&&n.destroy()})),e=this.references,this.references=Object.create(null),Object.keys(e).forEach((t=>{e[t].destroy()})),this.isDestroyed=!0}}function Le(e,t,n,i,r){delete e._relationshipPromisesCache[t],n.state.shouldForceReload=!1
const s="hasMany"===n.definition.kind
if(s&&i.notify(),r){n.state.hasFailedLoadAttempt=!0
const i=e._relationshipProxyCache[t]
throw i&&!s&&(i.content&&i.content.isDestroying&&i.set("content",null),e.store.notifications._flush()),r}return s?i.isLoaded=!0:e.store.notifications._flush(),n.state.hasFailedLoadAttempt=!1,n.state.isStale=!1,s||!i?i:e.store.peekRecord(i)}function $e(e,t){const n=e._instanceCache,i=t.data
return Array.isArray(i)?i.every((e=>n.recordIsLoaded(e))):!i||n.recordIsLoaded(i)}const ze=J()
var Be=new WeakMap,Ye=new WeakMap
class Ze extends ze{constructor(...e){super(...e),oe(this,Be,void De(this,"messages")),oe(this,Ye,void De(this,"isEmpty"))}get errorsByAttributeName(){return new Map}errorsFor(e){const t=this.errorsByAttributeName
let n=t.get(e)
return void 0===n&&(n=(0,V.A)(),t.set(e,n)),(0,Y.get)(n,"[]"),n}get content(){return(0,V.A)()}unknownProperty(e){const t=this.errorsFor(e)
if(0!==t.length)return t}add(e,t){const n=this._findOrCreateMessages(e,t)
this.addObjects(n),this.errorsFor(e).addObjects(n),this.__record.currentState.notify("isValid"),this.notifyPropertyChange(e)}_findOrCreateMessages(e,t){const n=this.errorsFor(e),i=Array.isArray(t)?t:[t],r=new Array(i.length)
for(let s=0;s<i.length;s++){const t=i[s],o=n.findBy("message",t)
r[s]=o||{attribute:e,message:t}}return r}remove(e){if(this.isEmpty)return
const t=this.rejectBy("attribute",e)
this.content.setObjects(t)
const n=this.errorsFor(e)
for(let i=0;i<n.length;i++)n[i].attribute===e&&n.replace(i,1)
this.errorsByAttributeName.delete(e),this.__record.currentState.notify("isValid"),this.notifyPropertyChange(e),this.notifyPropertyChange("length")}clear(){if(this.isEmpty)return
const e=this.errorsByAttributeName,t=[]
e.forEach((function(e,n){t.push(n)})),e.clear(),t.forEach((e=>{this.notifyPropertyChange(e)})),this.__record.currentState.notify("isValid"),super.clear()}has(e){return this.errorsFor(e).length>0}}function Ue(e,t,n,i){if("belongsTo"===i.kind)n.notifyPropertyChange(t)
else if("hasMany"===i.kind){const r=Ne.get(e),s=r&&r._manyArrayCache[t],o=r&&r._relationshipPromisesCache[t]
if(s&&o)return
s&&(s.notify(),i.options.async&&n.notifyPropertyChange(t))}}function We(e,t,n,i){(0,re.cacheFor)(i,n)!==e.cache.getAttr(t,n)&&i.notifyPropertyChange(n)}Te((q=Ze).prototype,"errorsByAttributeName",[(0,Y.computed)()]),we(q.prototype,"messages",[(0,K.mapBy)("content","message")]),Te(q.prototype,"content",[(0,Y.computed)()]),we(q.prototype,"isEmpty",[(0,K.not)("length")])
const He=/^\/?data\/(attributes|relationships)\/(.*)/,Ve=/^\/?data/
function Ge(e){return!!e&&e instanceof Error&&"isAdapterError"in e&&!0===e.isAdapterError&&"code"in e&&"InvalidError"===e.code}function Je(e,t,n){const i=n.get,r=n.set
return n.get=function(){const e=(0,W.V1)(this,t,!0)
return(0,W.B1)(e),e.shouldReset&&(e.shouldReset=!1,e.lastValue=i.call(this)),e.lastValue},n.set=function(e){(0,W.V1)(this,t,!0),r.call(this,e)},(0,U.Vv)(n),n}function Ke(e,t){const n=(0,W.i$)(e,t)
n&&(n.shouldReset=!0,(0,W.RH)(n))}class Xe{constructor(e){const t=(0,k.storeFor)(e),n=(0,T.o)(e)
this.identifier=n,this.record=e,this.cache=t.cache,this.pendingCount=0,this.fulfilledCount=0,this.rejectedCount=0,this._errorRequests=[],this._lastError=null
const i=t.getRequestStateService(),r=t.notifications,s=e=>{if("mutation"===e.type)switch(e.state){case"pending":this.isSaving=!0
break
case"rejected":this.isSaving=!1,this._lastError=e,e.response&&Ge(e.response.data)||this._errorRequests.push(e),Qe(this)
break
case"fulfilled":this._errorRequests=[],this._lastError=null,this.isSaving=!1,this.notify("isDirty"),Qe(this)}else switch(e.state){case"pending":this.pendingCount++,this.notify("isLoading")
break
case"rejected":this.pendingCount--,this._lastError=e,e.response&&Ge(e.response.data)||this._errorRequests.push(e),this.notify("isLoading"),Qe(this)
break
case"fulfilled":this.pendingCount--,this.fulfilledCount++,this.notify("isLoading"),this.notify("isDirty"),Qe(this),this._errorRequests=[],this._lastError=null}}
i.subscribeForRecord(n,s)
const o=i.getLastRequestForRecord(n)
o&&s(o),this.handler=r.subscribe(n,((e,t,n)=>{switch(t){case"state":this.notify("isSaved"),this.notify("isNew"),this.notify("isDeleted"),this.notify("isDirty")
break
case"attributes":this.notify("isEmpty"),this.notify("isDirty")
break
case"errors":this.updateInvalidErrors(this.record.errors),this.notify("isValid")}}))}destroy(){(0,k.storeFor)(this.record).notifications.unsubscribe(this.handler)}notify(e){Ke(this,e)}updateInvalidErrors(e){const t=this.cache.getErrors(this.identifier)
e.clear()
for(let n=0;n<t.length;n++){const i=t[n]
if(i.source&&i.source.pointer){const t=i.source.pointer.match(He)
let n
if(t?n=t[2]:-1!==i.source.pointer.search(Ve)&&(n="base"),n){const t=i.detail||i.title
e.add(n,t)}}}}cleanErrorRequests(){this.notify("isValid"),this.notify("isError"),this.notify("adapterError"),this._errorRequests=[],this._lastError=null}get isLoading(){return!this.isLoaded&&this.pendingCount>0&&0===this.fulfilledCount}get isLoaded(){return!!this.isNew||this.fulfilledCount>0||!this.isEmpty}get isSaved(){const e=this.cache
return this.isDeleted?e.isDeletionCommitted(this.identifier):!(this.isNew||this.isEmpty||!this.isValid||this.isDirty||this.isLoading)}get isEmpty(){const e=this.cache
return!this.isNew&&e.isEmpty(this.identifier)}get isNew(){return this.cache.isNew(this.identifier)}get isDeleted(){return this.cache.isDeleted(this.identifier)}get isValid(){return 0===this.record.errors.length}get isDirty(){const e=this.cache
return!(this.isEmpty||e.isDeletionCommitted(this.identifier)||this.isDeleted&&this.isNew)&&(this.isDeleted||this.isNew||e.hasChangedAttrs(this.identifier))}get isError(){return!!this._errorRequests[this._errorRequests.length-1]}get adapterError(){const e=this._lastError
return e?"rejected"===e.state&&e.response.data:null}get isPreloaded(){return!this.isEmpty&&this.isLoading}get stateName(){return this.isLoading?"root.loading":this.isEmpty?"root.empty":this.isDeleted?this.isSaving?"root.deleted.inFlight":this.isSaved?"root.deleted.saved":this.isValid?"root.deleted.uncommitted":"root.deleted.invalid":this.isNew?this.isSaving?"root.loaded.created.inFlight":this.isValid?"root.loaded.created.uncommitted":"root.loaded.created.invalid":this.isSaving?"root.loaded.updated.inFlight":this.isValid?this.isDirty?"root.loaded.updated.uncommitted":"root.loaded.saved":"root.loaded.updated.invalid"}get dirtyType(){return this.isLoading||this.isEmpty?"":this.isDirty&&this.isDeleted?"deleted":this.isNew?"created":this.isSaving||!this.isValid||this.isDirty?"updated":""}}function Qe(e){e.notify("isValid"),e.notify("isError"),e.notify("adapterError")}function et(e,t,n){const i=new WeakMap,r=n.get
return n.get=function(){let e=i.get(this)
return e||(e={hasComputed:!1,value:void 0},i.set(this,e)),e.hasComputed||(e.value=r.call(this),e.hasComputed=!0),e.value},n}Te((L=Xe).prototype,"isLoading",[Je]),Te(L.prototype,"isLoaded",[Je]),Te(L.prototype,"isSaved",[Je]),Te(L.prototype,"isEmpty",[Je]),Te(L.prototype,"isNew",[Je]),Te(L.prototype,"isDeleted",[Je]),Te(L.prototype,"isValid",[Je]),Te(L.prototype,"isDirty",[Je]),Te(L.prototype,"isError",[Je]),Te(L.prototype,"adapterError",[Je]),Te(L.prototype,"isPreloaded",[U.PO]),Te(L.prototype,"stateName",[U.PO]),Te(L.prototype,"dirtyType",[U.PO]),(0,W.sg)(Xe.prototype,"isSaving",!1)
class tt extends(Z()){init(e){const t=e._createProps,n=e._secretInit
e._createProps=null,e._secretInit=null
const i=this.store=n.store
super.init(e),this[H.pm]=i
const r=n.identifier
n.cb(this,n.cache,r,n.store),this.___recordState=null,this.setProperties(t)
const s=i.notifications
this.___private_notifications=s.subscribe(r,((e,t,n)=>{!function(e,t,n,i,r){if("attributes"===t)n?We(r,e,n,i):i.eachAttribute((t=>{We(r,e,t,i)}))
else if("relationships"===t)if(n){const t=i.constructor.relationshipsByName.get(n)
Ue(e,n,i,t)}else i.eachRelationship(((t,n)=>{Ue(e,t,i,n)}))
else"identity"===t&&i.notifyPropertyChange("id")}(e,t,n,this,i)}))}destroy(){const e=(0,k.recordIdentifierFor)(this)
this.___recordState?.destroy(),(0,k.storeFor)(this).notifications.unsubscribe(this.___private_notifications),this.eachRelationship(((e,t)=>{"belongsTo"===t.kind&&this.notifyPropertyChange(e)})),Ne.get(this)?.destroy(),Ne.delete(this),Ne.delete(e),super.destroy()}get isEmpty(){return this.currentState.isEmpty}get isLoading(){return this.currentState.isLoading}get isLoaded(){return this.currentState.isLoaded}get hasDirtyAttributes(){return this.currentState.isDirty}get isSaving(){return this.currentState.isSaving}get isDeleted(){return this.currentState.isDeleted}get isNew(){return this.currentState.isNew}get isValid(){return this.currentState.isValid}get dirtyType(){return this.currentState.dirtyType}get isError(){return this.currentState.isError}set isError(e){}get id(){return(0,k.recordIdentifierFor)(this).id}set id(e){const t=(0,T.pG)(e),n=(0,k.recordIdentifierFor)(this),i=t!==n.id
null!==t&&i&&(this.store._instanceCache.setRecordId(n,t),this.store.notifications.notify(n,"identity"))}toString(){return`<model::${this.constructor.modelName}:${this.id}>`}get currentState(){return this.___recordState||(this.___recordState=new Xe(this)),this.___recordState}set currentState(e){throw new Error("cannot set currentState")}get errors(){const e=Ze.create({__record:this})
return this.currentState.updateInvalidErrors(e),e}get adapterError(){return this.currentState.adapterError}set adapterError(e){throw new Error("adapterError is not directly settable")}notifyPropertyChange(e){Ke(this,e),super.notifyPropertyChange(e)}attr(){}eachRelationship(e,t){this.constructor.eachRelationship(e,t)}relationshipFor(e){return this.constructor.relationshipsByName.get(e)}inverseFor(e){return this.constructor.inverseFor(e,(0,k.storeFor)(this))}eachAttribute(e,t){this.constructor.eachAttribute(e,t)}static typeForRelationship(e,t){const n=this.relationshipsByName.get(e)
return n&&t.modelFor(n.type)}static get inverseMap(){return Object.create(null)}static inverseFor(e,t){const n=this.inverseMap
if(n[e])return n[e]
{const i=this._findInverseFor(e,t)
return n[e]=i,i}}static _findInverseFor(e,t){const n=this.relationshipsByName.get(e)
if(!n)return null
const{options:i}=n
return null===i.inverse?null:t.schema.hasResource(n)&&t.schema.fields(n).get(i.inverse)||null}static get relationships(){const e=new Map
return this.relationshipsByName.forEach((t=>{const{type:n}=t
e.has(n)||e.set(n,[]),e.get(n).push(t)})),e}static get relationshipNames(){const e={hasMany:[],belongsTo:[]}
return this.eachComputedProperty(((t,n)=>{nt(n)&&e[n.kind].push(t)})),e}static get relatedTypes(){const e=[],t=this.relationshipsObject,n=Object.keys(t)
for(let i=0;i<n.length;i++){const r=t[n[i]].type
e.includes(r)||e.push(r)}return e}static get relationshipsByName(){const e=new Map,t=this.relationshipsObject,n=Object.keys(t)
for(let i=0;i<n.length;i++){const r=t[n[i]]
e.set(r.name,r)}return e}static get relationshipsObject(){const e=Object.create(null)
return this.modelName,this.eachComputedProperty(((t,n)=>{nt(n)&&(n.key=t,n.name=t,e[t]=n)})),e}static get fields(){const e=new Map
return this.eachComputedProperty(((t,n)=>{nt(n)?e.set(t,n.kind):it(n)&&e.set(t,"attribute")})),e}static eachRelationship(e,t){this.relationshipsByName.forEach(((n,i)=>{e.call(t,i,n)}))}static eachRelatedType(e,t){const n=this.relatedTypes
for(let i=0;i<n.length;i++){const r=n[i]
e.call(t,r)}}static determineRelationshipType(e,t){const n=e.name,i=e.kind,r=this.inverseFor(n,t)
return r?"belongsTo"===r.kind?"belongsTo"===i?"oneToOne":"manyToOne":"belongsTo"===i?"oneToMany":"manyToMany":"belongsTo"===i?"oneToNone":"manyToNone"}static get attributes(){const e=new Map
return this.eachComputedProperty(((t,n)=>{it(n)&&(n.key=t,n.name=t,e.set(t,n))})),e}static get transformedAttributes(){const e=new Map
return this.eachAttribute(((t,n)=>{n.type&&e.set(t,n.type)})),e}static eachAttribute(e,t){this.attributes.forEach(((n,i)=>{e.call(t,i,n)}))}static eachTransformedAttribute(e,t){this.transformedAttributes.forEach(((n,i)=>{e.call(t,i,n)}))}static toString(){return`model:${this.modelName}`}}function nt(e){return"object"==typeof e&&null!==e&&"kind"in e&&"options"in e&&("hasMany"===e.kind||"belongsTo"===e.kind)}function it(e){return"object"==typeof e&&null!==e&&"kind"in e&&"attribute"===e.kind}Te(($=tt).prototype,"isEmpty",[U.Vv]),Te($.prototype,"isLoading",[U.Vv]),Te($.prototype,"isLoaded",[U.Vv]),Te($.prototype,"hasDirtyAttributes",[U.Vv]),Te($.prototype,"isSaving",[U.Vv]),Te($.prototype,"isDeleted",[U.Vv]),Te($.prototype,"isNew",[U.Vv]),Te($.prototype,"isValid",[U.Vv]),Te($.prototype,"dirtyType",[U.Vv]),Te($.prototype,"isError",[U.Vv]),Te($.prototype,"id",[Je]),Te($.prototype,"currentState",[Je]),Te($.prototype,"errors",[et]),Te($.prototype,"adapterError",[U.Vv]),ae(tt,"isModel",!0),ae(tt,"modelName",null),Te($,"inverseMap",[et]),Te($,"relationships",[et]),Te($,"relationshipNames",[et]),Te($,"relatedTypes",[et]),Te($,"relationshipsByName",[et]),Te($,"relationshipsObject",[et]),Te($,"fields",[et]),Te($,"attributes",[et]),Te($,"transformedAttributes",[et]),tt.prototype.save=function(e){let t
return this.currentState.isNew&&this.currentState.isDeleted?t=Promise.resolve(this):(this.errors.clear(),t=this[H.pm].saveRecord(this,e)),t},tt.prototype.destroyRecord=function(e){const{isNew:t}=this.currentState
return this.deleteRecord(),t?Promise.resolve(this):this.save(e).then((e=>(this.unloadRecord(),this)))},tt.prototype.unloadRecord=function(){this.currentState.isNew&&(this.isDestroyed||this.isDestroying)||this[H.pm].unloadRecord(this)},tt.prototype.hasMany=function(e){return je(this).referenceFor("hasMany",e)},tt.prototype.belongsTo=function(e){return je(this).referenceFor("belongsTo",e)},tt.prototype.serialize=function(e){return(0,X.upgradeStore)(this[H.pm]),this[H.pm].serializeRecord(this,e)},tt.prototype._createSnapshot=function(){const e=this[H.pm]
if((0,X.upgradeStore)(e),!e._fetchManager){const t=(0,se.A)(n(6604)).FetchManager
e._fetchManager=new t(e)}return e._fetchManager.createSnapshot((0,k.recordIdentifierFor)(this))},tt.prototype.deleteRecord=function(){this.currentState&&this[H.pm].deleteRecord(this)},tt.prototype.changedAttributes=function(){return(0,T.oX)(this).changedAttrs((0,k.recordIdentifierFor)(this))},tt.prototype.rollbackAttributes=function(){const{currentState:e}=this,{isNew:t}=e
this[H.pm]._join((()=>{(0,T.oX)(this).rollbackAttrs((0,k.recordIdentifierFor)(this)),this.errors.clear(),e.cleanErrorRequests(),t&&this.unloadRecord()}))},tt.prototype.reload=function(e={}){e.isReloading=!0,e.reload=!0
const t=(0,k.recordIdentifierFor)(this)
return this.isReloading=!0,this[H.pm].request({op:"findRecord",data:{options:e,record:t},cacheOptions:{[Symbol.for("wd:skip-cache")]:!0}}).then((()=>this)).finally((()=>{this.isReloading=!1}))},(0,W.sg)(tt.prototype,"isReloading",!1),tt.prototype._createProps=null,tt.prototype._secretInit=null
class rt{constructor(e){this.store=e,this._schemas=new Map,this._typeMisses=new Set}hasTrait(e){return!1}resourceHasTrait(e,t){return!1}transformation(e){}derivation(e){}hashFn(e){}resource(e){const t=le(e.type)
return this._schemas.has(t)||this._loadModelSchema(t),this._schemas.get(t).schema}registerResources(e){}registerResource(e){}registerTransformation(e){}registerDerivation(e){}registerHashFn(e){}_loadModelSchema(e){const t=this.store.modelFor(e),n=t.attributes,i=Object.create(null)
n.forEach(((e,t)=>i[t]=e))
const r=t.relationshipsObject||null,s=new Map
for(const a of Object.values(i))s.set(a.name,a)
for(const a of Object.values(r))s.set(a.name,a)
const o={schema:{legacy:!0,identity:{name:"id",kind:"@id"},type:e,fields:Array.from(s.values())},attributes:i,relationships:r,fields:s}
return this._schemas.set(e,o),o}fields(e){const t=le(e.type)
return this._schemas.has(t)||this._loadModelSchema(t),this._schemas.get(t).fields}hasResource(e){const t=le(e.type)
return!!this._schemas.has(t)||!this._typeMisses.has(t)&&!(null===st(this.store,t)&&(this._typeMisses.add(t),1))}}function st(e,t){e._modelFactoryCache||(e._modelFactoryCache=Object.create(null))
const n=e._modelFactoryCache
let i=n[t]
if(!i){if(i=(0,w.getOwner)(e).factoryFor(`model:${t}`),i||(i=function(e,t){const n=(0,w.getOwner)(e),i=n.factoryFor(`mixin:${t}`),r=i&&i.class
if(r){const e=tt.extend(r)
e.__isMixin=!0,e.__mixin=r,n.register(`model:${t}`,e)}return n.factoryFor(`model:${t}`)}(e,t)),!i)return null
const r=i.class
r.isModel&&(r.modelName&&Object.prototype.hasOwnProperty.call(r,"modelName")||Object.defineProperty(r,"modelName",{value:t})),n[t]=i}return i}function ot(e,t){const n=e.type,i={_createProps:t,_secretInit:{identifier:e,cache:this.cache,store:this,cb:ct}}
return(0,w.setOwner)(i,(0,w.getOwner)(this)),st(this,n).class.create(i)}function at(e){e.destroy()}function lt(e){const t=st(this,le(e)),n=t&&t.class?t.class:null
if(n&&n.isModel&&!this._forceShim)return n}function ct(e,t,n,i){(0,T.TP)(e,n),T.i.set(e,i),(0,T.Wz)(e,t)}rt.prototype.doesTypeExist=function(e){return(0,z.deprecate)("Use `schema.hasResource({ type })` instead of `schema.doesTypeExist(type)`",!1,{id:"ember-data:schema-service-updates",until:"5.0",for:"ember-data",since:{available:"5.4",enabled:"5.4"}}),this.hasResource({type:e})},rt.prototype.attributesDefinitionFor=function(e){(0,z.deprecate)("Use `schema.fields({ type })` instead of `schema.attributesDefinitionFor({ type })`",!1,{id:"ember-data:schema-service-updates",until:"5.0",for:"ember-data",since:{available:"5.4",enabled:"5.4"}})
const t=le(e.type)
return this._schemas.has(t)||this._loadModelSchema(t),this._schemas.get(t).attributes},rt.prototype.relationshipsDefinitionFor=function(e){(0,z.deprecate)("Use `schema.fields({ type })` instead of `schema.relationshipsDefinitionFor({ type })`",!1,{id:"ember-data:schema-service-updates",until:"5.0",for:"ember-data",since:{available:"5.4",enabled:"5.4"}})
const t=le(e.type)
return this._schemas.has(t)||this._loadModelSchema(t),this._schemas.get(t).relationships}
var ut=n(8217),dt=n(1121)
const ht="undefined"!=typeof fetch?(...e)=>fetch(...e):"undefined"!=typeof FastBoot?(...e)=>FastBoot.require("node-fetch")(...e):()=>{throw new Error("No Fetch Implementation Found")},ft=new Set(["updateRecord","createRecord","deleteRecord"]),pt=new Map([[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Timeout"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Payload Too Large"],[414,"URI Too Long"],[415,"Unsupported Media Type"],[416,"Range Not Satisfiable"],[417,"Expectation Failed"],[419,"Page Expired"],[420,"Enhance Your Calm"],[421,"Misdirected Request"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[430,"Request Header Fields Too Large"],[431,"Request Header Fields Too Large"],[450,"Blocked By Windows Parental Controls"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Timeout"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[508,"Loop Detected"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]]),mt={async request(e){let t
try{t=await ht(e.request.url,e.request)}catch(e){throw e instanceof DOMException&&"AbortError"===e.name?(e.statusText="Aborted",e.status=20,e.isRequestError=!0):(e.statusText="Unknown Network Error",e.status=0,e.isRequestError=!0),e}const n=!t.ok||t.status>=400,i=e.request.op,r=Boolean(i&&ft.has(i))
if(!n&&!r&&204!==t.status&&!t.headers.has("date")){const e=new Headers(t.headers)
e.set("date",(new Date).toUTCString()),t=function(e,t){const n=(0,dt.f)(e)
return new Response(e.body,Object.assign(n,t))}(t,{headers:e})}if(e.setResponse(t),204===t.status)return null
let s=""
{const n=t.body.getReader(),i=new TextDecoder
let r=e.hasRequestedStream,o=r?new TransformStream:null,a=o?.writable.getWriter()
for(r&&(e.request.signal?.addEventListener("abort",(()=>{r&&(o.writable.abort("Request Aborted"),o.readable.cancel("Request Aborted"))})),e.setStream(o.readable));;){const{done:t,value:l}=await n.read()
if(t){r&&(r=!1,await a.ready,await a.close())
break}if(s+=i.decode(l,{stream:!0}),r)await a.ready,await a.write(l)
else if(e.hasRequestedStream){const t=new TextEncoder
r=!0,o=new TransformStream,e.request.signal?.addEventListener("abort",(()=>{r&&(o.writable.abort("Request Aborted"),o.readable.cancel("Request Aborted"))})),e.setStream(o.readable),a=o.writable.getWriter(),await a.ready,await a.write(t.encode(s)),await a.ready,await a.write(l)}}r&&(r=!1,await a.ready,await a.close())}if(n){let n
try{n=JSON.parse(s)}catch{}const i=Array.isArray(n)?n:null!==(o=n)&&"object"==typeof o&&Array.isArray(n.errors)?n.errors:null,r=t.statusText||pt.get(t.status)||"Unknown Request Error",a=`[${t.status} ${r}] ${e.request.method??"GET"} (${t.type}) - ${t.url}`,l=i?new AggregateError(i,a):new Error(a)
throw l.status=t.status,l.statusText=r,l.isRequestError=!0,l.code=l.status,l.name=l.statusText.replaceAll(" ","")+"Error",l.content=n,l}return JSON.parse(s)
var o}}
function gt(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e
var t=e[Symbol.toPrimitive]
if(void 0!==t){var n=t.call(e,"string")
if("object"!=typeof n)return n
throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class yt extends k.default{constructor(e){super(e),gt(this,"adapterFor",O),gt(this,"serializerFor",C),gt(this,"pushPayload",x),gt(this,"normalize",E),gt(this,"serializeRecord",I),"requestManager"in this||(this.requestManager=new ut.Ay,this.requestManager.use([M,mt])),this.requestManager.useCache(k.CacheHandler)}createSchemaService(){return new rt(this)}createCache(e){return new s(e)}instantiateRecord(e,t){return ot.call(this,e,t)}teardownRecord(e){at.call(this,e)}modelFor(e){return lt.call(this,e)||super.modelFor(e)}destroy(){F.call(this),super.destroy()}}},9903:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r})
var i=n(4040),r=(0,n(3726).A)((function(e,t){let n=new Array(...e)
return 2===n.length&&n.push({withoutCount:t["without-count"]}),(0,i.pluralize)(...n)}))},3094:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r})
var i=n(4040),r=(0,n(3726).A)((function(e){return(0,i.singularize)(e[0])}))},4040:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h,pluralize:()=>p,singularize:()=>m})
var i={plurals:[[/$/,"s"],[/s$/i,"s"],[/^(ax|test)is$/i,"$1es"],[/(octop|vir)us$/i,"$1i"],[/(octop|vir)i$/i,"$1i"],[/(alias|status|bonus)$/i,"$1es"],[/(bu)s$/i,"$1ses"],[/(buffal|tomat)o$/i,"$1oes"],[/([ti])um$/i,"$1a"],[/([ti])a$/i,"$1a"],[/sis$/i,"ses"],[/(?:([^f])fe|([lr])f)$/i,"$1$2ves"],[/(hive)$/i,"$1s"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/(x|ch|ss|sh)$/i,"$1es"],[/(matr|vert|ind)(?:ix|ex)$/i,"$1ices"],[/^(m|l)ouse$/i,"$1ice"],[/^(m|l)ice$/i,"$1ice"],[/^(ox)$/i,"$1en"],[/^(oxen)$/i,"$1"],[/(quiz)$/i,"$1zes"]],singular:[[/s$/i,""],[/(ss)$/i,"$1"],[/(n)ews$/i,"$1ews"],[/([ti])a$/i,"$1um"],[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i,"$1sis"],[/(^analy)(sis|ses)$/i,"$1sis"],[/([^f])ves$/i,"$1fe"],[/(hive)s$/i,"$1"],[/(tive)s$/i,"$1"],[/([lr])ves$/i,"$1f"],[/([^aeiouy]|qu)ies$/i,"$1y"],[/(s)eries$/i,"$1eries"],[/(m)ovies$/i,"$1ovie"],[/(x|ch|ss|sh)es$/i,"$1"],[/^(m|l)ice$/i,"$1ouse"],[/(bus)(es)?$/i,"$1"],[/(o)es$/i,"$1"],[/(shoe)s$/i,"$1"],[/(cris|test)(is|es)$/i,"$1is"],[/^(a)x[ie]s$/i,"$1xis"],[/(octop|vir)(us|i)$/i,"$1us"],[/(alias|status|bonus)(es)?$/i,"$1"],[/^(ox)en/i,"$1"],[/(vert|ind)ices$/i,"$1ex"],[/(matr)ices$/i,"$1ix"],[/(quiz)zes$/i,"$1"],[/(database)s$/i,"$1"]],irregularPairs:[["person","people"],["man","men"],["child","children"],["sex","sexes"],["move","moves"],["cow","kine"],["zombie","zombies"]],uncountable:["equipment","information","rice","money","species","series","fish","sheep","jeans","police"]}
const r=/^\s*$/,s=/([\w/-]+[_/\s-])([a-z\d]+$)/,o=/([\w/\s-]+)([A-Z][a-z\d]*$)/,a=/[A-Z][a-z\d]*$/,l=/(^|\/)([a-z\u00C0-\u024F])/g
function c(e){return e.replace(l,(e=>e.toUpperCase()))}function u(e,t){for(let n=0,i=t.length;n<i;n++)e.uncountable[t[n].toLowerCase()]=!0}function d(e,t){let n
for(let i=0,r=t.length;i<r;i++)n=t[i],e.irregular[n[0].toLowerCase()]=n[1],e.irregular[n[1].toLowerCase()]=n[1],e.irregularInverse[n[1].toLowerCase()]=n[0],e.irregularInverse[n[0].toLowerCase()]=n[0]}function h(e){(e=e||{}).uncountable=e.uncountable||f(),e.irregularPairs=e.irregularPairs||f()
const t=this.rules={plurals:e.plurals||[],singular:e.singular||[],irregular:f(),irregularInverse:f(),uncountable:f()}
u(t,e.uncountable),d(t,e.irregularPairs),this.enableCache()}if(!Object.create&&!Object.create(null).hasOwnProperty)throw new Error("This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg")
function f(){var e=Object.create(null)
return e._dict=null,delete e._dict,e}function p(){return h.inflector.pluralize(...arguments)}function m(e){return h.inflector.singularize(e)}h.prototype={enableCache(){this.purgeCache(),this.singularize=function(e){return this._cacheUsed=!0,this._sCache[e]||(this._sCache[e]=this._singularize(e))},this.pluralize=function(e,t,n={}){this._cacheUsed=!0
var i=[e,t,n.withoutCount]
return this._pCache[i]||(this._pCache[i]=this._pluralize(e,t,n))}},purgeCache(){this._cacheUsed=!1,this._sCache=f(),this._pCache=f()},disableCache(){this._sCache=null,this._pCache=null,this.singularize=function(e){return this._singularize(e)},this.pluralize=function(){return this._pluralize(...arguments)}},plural(e,t){this._cacheUsed&&this.purgeCache(),this.rules.plurals.push([e,t.toLowerCase()])},singular(e,t){this._cacheUsed&&this.purgeCache(),this.rules.singular.push([e,t.toLowerCase()])},uncountable(e){this._cacheUsed&&this.purgeCache(),u(this.rules,[e.toLowerCase()])},irregular(e,t){this._cacheUsed&&this.purgeCache(),d(this.rules,[[e,t]])},pluralize(){return this._pluralize(...arguments)},_pluralize(e,t,n={}){return void 0===t?this.inflect(e,this.rules.plurals,this.rules.irregular):(1!==parseFloat(e)&&(t=this.inflect(t,this.rules.plurals,this.rules.irregular)),n.withoutCount?t:`${e} ${t}`)},singularize(e){return this._singularize(e)},_singularize(e){return this.inflect(e,this.rules.singular,this.rules.irregularInverse)},inflect(e,t,n){let i,l,u,d,h,f,p,m,g,y
if(p=!e||r.test(e),m=a.test(e),p)return e
if(d=e.toLowerCase(),h=s.exec(e)||o.exec(e),h&&(f=h[2].toLowerCase()),y=this.rules.uncountable[d]||this.rules.uncountable[f],y)return e
for(g in n)if(d.match(g+"$"))return l=n[g],m&&n[f]&&(l=c(l),g=c(g)),e.replace(new RegExp(g,"i"),l)
for(var v=t.length;v>0&&(i=t[v-1],g=i[0],!g.test(e));v--);return i=i||[],g=i[0],l=i[1],u=e.replace(g,l),u}},h.defaultRules=i,h.inflector=new h(i)},3726:(e,t,n)=>{n.d(t,{A:()=>a})
var i=n(3211),r=n.n(i),s=n(336),o=n.n(s)
function a(e){return o()?o().helper(e):r().HTMLBars?r().HTMLBars.makeBoundHelper(e):r().Handlebars.makeBoundHelper(e)}},9202:(e,t,n)=>{function i(e,t,n){return(t="symbol"==typeof(i=function(e){if("object"!=typeof e||!e)return e
var t=e[Symbol.toPrimitive]
if(void 0!==t){var n=t.call(e,"string")
if("object"!=typeof n)return n
throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e
var i}function r(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function s(e,t,n,i,r){var s={}
return Object.keys(i).forEach((function(e){s[e]=i[e]})),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce((function(n,i){return i(e,t,n)||n}),s),r&&void 0!==s.initializer&&(s.value=s.initializer?s.initializer.call(r):void 0,s.initializer=void 0),void 0===s.initializer&&(Object.defineProperty(e,t,s),s=null),s}n.d(t,{_:()=>s,a:()=>r,b:()=>i})},4417:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d})
var i,r,s,o=n(9202),a=n(2735),l=n(336),c=n.n(l),u=n(4666)
let d=(i=(0,a.inject)("page-title"),r=class extends(c()){constructor(e){super(e),(0,o.a)(this,"tokens",s,this),(0,o.b)(this,"tokenId",(0,u.guidFor)(this)),this.tokens.push({id:this.tokenId})}compute(e,t){const n={...t,id:this.tokenId,title:e.join("")}
return this.tokens.push(n),this.tokens.scheduleTitleUpdate(),""}willDestroy(){super.willDestroy(),this.tokens.remove(this.tokenId),this.tokens.scheduleTitleUpdate()}},s=(0,o._)(r.prototype,"tokens",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),r)},5754:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y})
var i,r,s,o,a,l=n(9202),c=n(1223),u=n(2735),d=n.n(u),h=n(9553),f=n(1603)
const p="undefined"!=typeof FastBoot,m="routeDidChange",g=["separator","prepend","replace"]
let y=(i=(0,u.inject)("router"),r=(0,u.inject)("-document"),s=class extends(d()){constructor(e){if(super(e),(0,l.a)(this,"router",o,this),(0,l.a)(this,"document",a,this),(0,l.b)(this,"tokens",[]),(0,l.b)(this,"_defaultConfig",{separator:" | ",prepend:!0,replace:null}),(0,l.b)(this,"scheduleTitleUpdate",(()=>{(0,c.scheduleOnce)("afterRender",this,this._updateTitle)})),this._validateExistingTitleElement(),function(e){return"resolveRegistration"in e}(e)){const n=e.resolveRegistration("config:environment")
"object"==typeof(t=n)&&null!==t&&"pageTitle"in t&&g.forEach((e=>{if(!(0,h.isEmpty)(n.pageTitle[e])){const t=n.pageTitle[e]
this._defaultConfig[e]=t}}))}var t
this.router.on(m,this.scheduleTitleUpdate)}applyTokenDefaults(e){const t=this._defaultConfig.separator,n=this._defaultConfig.prepend,i=this._defaultConfig.replace
e.previous??=null,e.next??=null,null==e.separator&&(e.separator=t),null==e.prepend&&null!=n&&(e.prepend=n),null==e.replace&&null!=i&&(e.replace=i)}inheritFromPrevious(e){const t=e.previous
t&&(null==e.separator&&(e.separator=t.separator),null==e.prepend&&(e.prepend=t.prepend))}push(e){const t=this._findTokenById(e.id)
if(t){const n=this.tokens.indexOf(t),i=[...this.tokens],r=t.previous
return e.previous=r,e.next=t.next,this.inheritFromPrevious(e),this.applyTokenDefaults(e),i.splice(n,1,e),void(this.tokens=i)}const n=this.tokens.slice(-1)[0]
n&&(e.previous=n??null,n.next=e,this.inheritFromPrevious(e)),this.applyTokenDefaults(e),this.tokens=[...this.tokens,e]}remove(e){const t=this._findTokenById(e)
if(!t)return
const{next:n,previous:i}=t
n&&(n.previous=i),i&&(i.next=n),t.previous=t.next=null
const r=[...this.tokens]
r.splice(r.indexOf(t),1),this.tokens=r}get visibleTokens(){const e=this.tokens
let t=e?e.length:0
const n=[]
for(;t--;){const i=e[t]
if(i){if(i.replace){n.unshift(i)
break}n.unshift(i)}}return n}get sortedTokens(){const e=this.visibleTokens
if(!e)return[]
let t=!0,n=[]
const i=[n],r=[]
return e.forEach((e=>{if(e.front)r.unshift(e)
else if(e.prepend){t&&(t=!1,n=[],i.push(n))
const r=n[0]
r&&((e={...e}).separator=r.separator),n.unshift(e)}else t||(t=!0,n=[],i.push(n)),n.push(e)})),r.concat(i.reduce(((e,t)=>e.concat(t)),[]))}toString(){const e=this.sortedTokens,t=[]
for(let n=0,i=e.length;n<i;n++){const r=e[n]
r&&r.title&&(t.push(r.title),n+1<i&&t.push(r.separator))}return t.join("")}willDestroy(){super.willDestroy(),this.router.off(m,this.scheduleTitleUpdate)}_updateTitle(){const e=this.toString()
p?this.updateFastbootTitle(e):this.document.title=e,this.titleDidUpdate(e)}_validateExistingTitleElement(){p||(0,f.assert)("[ember-page-title]: Multiple title elements found. Check for other addons like ember-cli-head updating <title> as well.",document.head.querySelectorAll("title").length<=1)}_findTokenById(e){return this.tokens.find((t=>t.id===e))}updateFastbootTitle(e){if(!p)return
const t=this.document.head,n=t.childNodes
for(let s=0;s<n.length;s++){const e=n[s]
e&&"title"===e.nodeName.toLowerCase()&&t.removeChild(e)}const i=this.document.createElement("title"),r=this.document.createTextNode(e)
i.appendChild(r),t.appendChild(i)}titleDidUpdate(e){}},o=(0,l._)(s.prototype,"router",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),a=(0,l._)(s.prototype,"document",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),s)},4244:(e,t,n)=>{function i(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function r(e){var t=e.getBoundingClientRect()
return{top:t.top+(document.documentElement.scrollTop||document.body.scrollTop),left:t.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}}function s(e){return e.titleHeight+e.margins.top+e.paddings.top}function o(e){return e.margins.left+e.paddings.left}function a(e){return e.margins.top+e.margins.bottom+e.paddings.top+e.paddings.bottom+e.titleHeight+e.legendHeight}function l(e){return e.margins.left+e.margins.right+e.paddings.left+e.paddings.right}function c(e){return parseFloat(e.toFixed(2))}function u(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3]
n||(n=i?e[0]:e[e.length-1])
var r=new Array(Math.abs(t)).fill(n)
return i?r.concat(e):e.concat(r)}function d(e,t){return(e+"").length*t}function h(e,t){return{x:Math.sin(e*re)*t,y:Math.cos(e*re)*t}}function f(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
return!(Number.isNaN(e)||void 0===e||!Number.isFinite(e)||t&&e<0)}function p(e){var t=void 0,n=void 0,i=void 0
if(e instanceof Date)return new Date(e.getTime())
if("object"!==(void 0===e?"undefined":ae(e))||null===e)return e
for(i in t=Array.isArray(e)?[]:{},e)n=e[i],t[i]=p(n)
return t}function m(e,t){var n=void 0,i=void 0
return e<=t?(n=t-e,i=e):(n=e-t,i=t),[n,i]}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length-e.length
return n>0?e=u(e,n):t=u(t,n),[e,t]}function y(e,t){if(e)return e.length>t?e.slice(0,t-3)+"...":e}function v(e,t){for(var n=[],i=0;i<e.length;i++)n.push([e[i],t[i]])
var r=function(e,t,n,i){var r=function(e,t){var n=t[0]-e[0],i=t[1]-e[1]
return{length:Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),angle:Math.atan2(i,n)}}(t||e,n||e),s=r.angle+(i?Math.PI:0),o=.2*r.length
return[e[0]+Math.cos(s)*o,e[1]+Math.sin(s)*o]}
return function(e){return e.reduce((function(e,t,n,i){return 0===n?t[0]+","+t[1]:e+" "+function(e,t,n){var i=r(n[t-1],n[t-2],e),s=r(e,n[t-1],n[t+1],!0)
return"C "+i[0]+","+i[1]+" "+s[0]+","+s[1]+" "+e[0]+","+e[1]}(t,n,i)}),"")}(n)}function b(e){return e>255?255:e<0?0:e}function _(e,t){var n=ce(e),i=!1
"#"==n[0]&&(n=n.slice(1),i=!0)
var r=parseInt(n,16),s=b((r>>16)+t),o=b((r>>8&255)+t)
return(i?"#":"")+(b((255&r)+t)|o<<8|s<<16).toString(16)}function w(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function k(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg",e)
for(var i in t){var r=t[i]
if("inside"===i)w(r).appendChild(n)
else if("around"===i){var s=w(r)
s.parentNode.insertBefore(n,s),n.appendChild(s)}else"styles"===i?"object"===(void 0===r?"undefined":ue(r))&&Object.keys(r).map((function(e){n.style[e]=r[e]})):("className"===i&&(i="class"),"innerHTML"===i?n.textContent=r:n.setAttribute(i,r))}return n}function T(e,t,n,i){return k("stop",{inside:e,style:"stop-color: "+n,offset:t,"stop-opacity":i})}function D(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n={className:e,transform:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""}
return t&&(n.inside=t),k("g",n)}function S(e){return k("path",{className:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d:e,styles:{stroke:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"none",fill:arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none","stroke-width":arguments.length>4&&void 0!==arguments[4]?arguments[4]:2}})}function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="path-fill-gradient-"+t+"-"+(n?"lighter":"default"),r=function(e,t){return k("linearGradient",{inside:e,id:t,x1:0,x2:0,y1:0,y2:1})}(e,i),s=[1,.6,.2]
return n&&(s=[.4,.2,0]),T(r,"0%",t,s[0]),T(r,"50%",t,s[1]),T(r,"100%",t,s[2]),i}function M(e,t,n,i,r){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},o={className:e,x:t,y:n,width:i,height:i,rx:r,fill:arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none"}
return Object.keys(s).map((function(e){o[e]=s[e]})),k("rect",o)}function A(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=r.fontSize||he
return k("text",{className:e,x:t,y:n,dy:(void 0!==r.dy?r.dy:s/2)+"px","font-size":s+"px",fill:r.fill||pe,"text-anchor":r.textAnchor||"start",innerHTML:i})}function R(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{}
r.stroke||(r.stroke=fe),r.lineType||(r.lineType=""),r.shortenNumbers&&(t=function(e){var t=void 0
if("number"==typeof e)t=e
else if("string"==typeof e&&(t=Number(e),Number.isNaN(t)))return e
var n=Math.floor(Math.log10(Math.abs(t)))
if(n<=2)return t
var i=Math.floor(n/3),r=Math.pow(10,n-3*i)*+(t/Math.pow(10,n)).toFixed(1)
return Math.round(100*r)/100+" "+["","K","M","B","T"][i]}(t))
var s=k("line",{className:"line-horizontal "+r.className+("dashed"===r.lineType?"dashed":""),x1:n,x2:i,y1:0,y2:0,styles:{stroke:r.stroke}}),o=k("text",{x:n<i?n-de:n+de,y:0,dy:he/2-2+"px","font-size":he+"px","text-anchor":n<i?"end":"start",innerHTML:t+""}),a=k("g",{transform:"translate(0, "+e+")","stroke-opacity":1})
return 0!==o&&"0"!==o||(a.style.stroke="rgba(27, 31, 35, 0.6)"),a.appendChild(s),a.appendChild(o),a}function O(e,t,n,i){var r="string"==typeof t?t:t.join(", ")
return[e,{transform:n.join(", ")},i,be,"translate",{transform:r}]}function C(e,t,n){return O(e,[0,n],[0,t],ve)}function E(e,t){return[e,{d:t},ye,be]}function x(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"linear",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=e.cloneNode(!0),a=e.cloneNode(!0)
for(var l in t){var c=void 0
c="transform"===l?document.createElementNS("http://www.w3.org/2000/svg","animateTransform"):document.createElementNS("http://www.w3.org/2000/svg","animate")
var u=s[l]||e.getAttribute(l),d=t[l],h={attributeName:l,from:u,to:d,begin:"0s",dur:n/1e3+"s",values:u+";"+d,keySplines:we[i],keyTimes:"0;1",calcMode:"spline",fill:"freeze"}
for(var f in r&&(h.type=r),h)c.setAttribute(f,h[f])
o.appendChild(c),r?a.setAttribute(l,"translate("+d+")"):a.setAttribute(l,d)}return[o,a]}function I(e,t){e.style.transform=t,e.style.webkitTransform=t,e.style.msTransform=t,e.style.mozTransform=t,e.style.oTransform=t}function F(e,t){var n=[],i=[]
t.map((function(e){var t,r,s=e[0],o=s.parentNode
e[0]=s
var a=x.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}(e)),l=_e(a,2)
t=l[0],r=l[1],n.push(r),i.push([t,o]),o&&o.replaceChild(t,s)}))
var r=e.cloneNode(!0)
return i.map((function(e,i){e[1]&&(e[1].replaceChild(n[i],e[0]),t[i][0]=n[i])})),r}function N(e){var t=new Date(e)
return t.setMinutes(t.getMinutes()-t.getTimezoneOffset()),t}function j(e){var t=e.getDate(),n=e.getMonth()+1
return[e.getFullYear(),(n>9?"":"0")+n,(t>9?"":"0")+t].join("-")}function q(e){return new Date(e.getTime())}function L(e,t){var n=Y(e)
return Math.ceil(function(e,t){var n=Re*Ae
return(N(t)-N(e))/n}(n,t)/Me)}function $(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function z(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Oe[e]
return t?n.slice(0,3):n}function B(e,t){return new Date(t,e+1,0)}function Y(e){var t=q(e),n=t.getDay()
return 0!==n&&Z(t,-1*n),t}function Z(e,t){e.setDate(e.getDate()+t)}function U(e,t,n){var i=Object.keys(Fe).filter((function(t){return e.includes(t)})),r=Fe[i[0]]
return Object.assign(r,{constants:t,getData:n}),new Ie(r)}function W(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}function H(e){if(0===e)return[0,0]
if(isNaN(e))return{mantissa:-6755399441055744,exponent:972}
var t=e>0?1:-1
if(!isFinite(e))return{mantissa:4503599627370496*t,exponent:972}
e=Math.abs(e)
var n=Math.floor(Math.log10(e))
return[t*(e/Math.pow(10,n)),n]}function V(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=H(e),i=Be(n,2),r=i[0],s=i[1],o=t?t/Math.pow(10,s):0,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Math.ceil(e),i=Math.floor(t),r=n-i,s=r,o=1
r>5&&(r%2!=0&&(r=++n-i),s=r/2,o=2),r<=2&&(o=r/(s=4)),0===r&&(s=5,o=1)
for(var a=[],l=0;l<=s;l++)a.push(i+o*l)
return a}(r=r.toFixed(6),o)
return a.map((function(e){return e*Math.pow(10,s)}))}function G(e){return e[1]-e[0]}function J(e,t){return c(t.zeroLine-e*t.scaleMultiplier)}function K(e,t){return t.filter((function(t){return t<e})).length}function X(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}n.r(t),n.d(t,{AxisChart:()=>He,Chart:()=>Xe,Heatmap:()=>Ze,PercentageChart:()=>qe,PieChart:()=>ze}),function(e,t){void 0===t&&(t={})
var n=t.insertAt
if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style")
r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('.chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ol,.graph-svg-tip ul{padding-left:0;display:-webkit-box;display:-ms-flexbox;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:" ";border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}')
var Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}
i.create=function(e,t){var n=document.createElement(e)
for(var r in t){var s=t[r]
if("inside"===r)i(s).appendChild(n)
else if("around"===r){var o=i(s)
o.parentNode.insertBefore(n,o),n.appendChild(o)}else"styles"===r?"object"===(void 0===s?"undefined":Q(s))&&Object.keys(s).map((function(e){n.style[e]=s[e]})):r in n?n[r]=s:n.setAttribute(r,s)}return n}
var ee={margins:{top:10,bottom:10,left:20,right:20},paddings:{top:20,bottom:40,left:30,right:10},baseHeight:240,titleHeight:20,legendHeight:30,titleFontSize:12},te=["line","bar"],ne=["light-blue","blue","violet","red","orange","yellow","green","light-green","purple","magenta","light-grey","dark-grey"],ie={bar:ne,line:ne,pie:ne,percentage:ne,heatmap:["#ebedf0","#c6e48b","#7bc96f","#239a3b","#196127"],donut:ne},re=Math.PI/180,se=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),oe=function(){function e(t){var n=t.parent,i=void 0===n?null:n,r=t.colors,s=void 0===r?[]:r;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.parent=i,this.colors=s,this.titleName="",this.titleValue="",this.listValues=[],this.titleValueFirst=0,this.x=0,this.y=0,this.top=0,this.left=0,this.setup()}return se(e,[{key:"setup",value:function(){this.makeTooltip()}},{key:"refresh",value:function(){this.fill(),this.calcPosition()}},{key:"makeTooltip",value:function(){var e=this
this.container=i.create("div",{inside:this.parent,className:"graph-svg-tip comparison",innerHTML:'<span class="title"></span>\n\t\t\t\t<ul class="data-point-list"></ul>\n\t\t\t\t<div class="svg-pointer"></div>'}),this.hideTip(),this.title=this.container.querySelector(".title"),this.dataPointList=this.container.querySelector(".data-point-list"),this.parent.addEventListener("mouseleave",(function(){e.hideTip()}))}},{key:"fill",value:function(){var e,t=this
this.index&&this.container.setAttribute("data-point-index",this.index),e=this.titleValueFirst?"<strong>"+this.titleValue+"</strong>"+this.titleName:this.titleName+"<strong>"+this.titleValue+"</strong>",this.title.innerHTML=e,this.dataPointList.innerHTML="",this.listValues.map((function(e,n){var r=t.colors[n]||"black",s=0===e.formatted||e.formatted?e.formatted:e.value,o=i.create("li",{styles:{"border-top":"3px solid "+r},innerHTML:'<strong style="display: block;">'+(0===s||s?s:"")+"</strong>\n\t\t\t\t\t"+(e.title?e.title:"")})
t.dataPointList.appendChild(o)}))}},{key:"calcPosition",value:function(){var e=this.container.offsetWidth
this.top=this.y-this.container.offsetHeight-5,this.left=this.x-e/2
var t=this.parent.offsetWidth-e,n=this.container.querySelector(".svg-pointer")
if(this.left<0)n.style.left="calc(50% - "+-1*this.left+"px)",this.left=0
else if(this.left>t){var i="calc(50% + "+(this.left-t)+"px)"
n.style.left=i,this.left=t}else n.style.left="50%"}},{key:"setValues",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1
this.titleName=n.name,this.titleValue=n.value,this.listValues=i,this.x=e,this.y=t,this.titleValueFirst=n.valueFirst||0,this.index=r,this.refresh()}},{key:"hideTip",value:function(){this.container.style.top="0px",this.container.style.left="0px",this.container.style.opacity="0"}},{key:"showTip",value:function(){this.container.style.top=this.top+"px",this.container.style.left=this.left+"px",this.container.style.opacity="1"}}]),e}(),ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le={"light-blue":"#7cd6fd",blue:"#5e64ff",violet:"#743ee2",red:"#ff5858",orange:"#ffa00a",yellow:"#feef72",green:"#28a745","light-green":"#98d85b",purple:"#b554ff",magenta:"#ffa3ef",black:"#36114C",grey:"#bdd3e6","light-grey":"#f0f4f7","dark-grey":"#b8c2cc"},ce=function(e){return/rgb[a]{0,1}\([\d, ]+\)/gim.test(e)?/\D+(\d*)\D+(\d*)\D+(\d*)/gim.exec(e).map((function(e,t){return 0!==t?Number(e).toString(16):"#"})).reduce((function(e,t){return""+e+t})):le[e]||e},ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de=4,he=10,fe="#dadada",pe="#555b51",me={bar:function(e){var t=void 0
"rect"!==e.nodeName&&(t=e.getAttribute("transform"),e=e.childNodes[0])
var n=e.cloneNode()
return n.style.fill="#000000",n.style.opacity="0.4",t&&n.setAttribute("transform",t),n},dot:function(e){var t=void 0
"circle"!==e.nodeName&&(t=e.getAttribute("transform"),e=e.childNodes[0])
var n=e.cloneNode(),i=e.getAttribute("r"),r=e.getAttribute("fill")
return n.setAttribute("r",parseInt(i)+4),n.setAttribute("fill",r),n.style.opacity="0.6",t&&n.setAttribute("transform",t),n},heat_square:function(e){var t=void 0
"circle"!==e.nodeName&&(t=e.getAttribute("transform"),e=e.childNodes[0])
var n=e.cloneNode(),i=e.getAttribute("r"),r=e.getAttribute("fill")
return n.setAttribute("r",parseInt(i)+4),n.setAttribute("fill",r),n.style.opacity="0.6",t&&n.setAttribute("transform",t),n}},ge={bar:function(e,t){var n=void 0
"rect"!==e.nodeName&&(n=e.getAttribute("transform"),e=e.childNodes[0])
var i=["x","y","width","height"]
Object.values(e.attributes).filter((function(e){return i.includes(e.name)&&e.specified})).map((function(e){t.setAttribute(e.name,e.nodeValue)})),n&&t.setAttribute("transform",n)},dot:function(e,t){var n=void 0
"circle"!==e.nodeName&&(n=e.getAttribute("transform"),e=e.childNodes[0])
var i=["cx","cy"]
Object.values(e.attributes).filter((function(e){return i.includes(e.name)&&e.specified})).map((function(e){t.setAttribute(e.name,e.nodeValue)})),n&&t.setAttribute("transform",n)},heat_square:function(e,t){var n=void 0
"circle"!==e.nodeName&&(n=e.getAttribute("transform"),e=e.childNodes[0])
var i=["cx","cy"]
Object.values(e.attributes).filter((function(e){return i.includes(e.name)&&e.specified})).map((function(e){t.setAttribute(e.name,e.nodeValue)})),n&&t.setAttribute("transform",n)}},ye=350,ve=ye,be="easein",_e=function(e,t){if(Array.isArray(e))return e
if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,s=void 0
try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}(e,t)
throw new TypeError("Invalid attempt to destructure non-iterable instance")},we={ease:"0.25 0.1 0.25 1",linear:"0 0 1 1",easein:"0.1 0.8 0.2 1",easeout:"0 0 0.58 1",easeinout:"0.42 0 0.58 1"},ke=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Te=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=p(n),this.parent="string"==typeof t?document.querySelector(t):t,!(this.parent instanceof HTMLElement))throw new Error("No `parent` element to render on was provided.")
this.rawChartArgs=n,this.title=n.title||"",this.type=n.type||"",this.realData=this.prepareData(n.data),this.data=this.prepareFirstData(this.realData),this.colors=this.validateColors(n.colors,this.type),this.config={showTooltip:1,showLegend:1,isNavigable:n.isNavigable||0,animate:void 0!==n.animate?n.animate:1,truncateLegends:n.truncateLegends||1},this.measures=JSON.parse(JSON.stringify(ee))
var i=this.measures
this.setMeasures(n),this.title.length||(i.titleHeight=0),this.config.showLegend||(i.legendHeight=0),this.argHeight=n.height||i.baseHeight,this.state={},this.options={},this.initTimeout=700,this.config.isNavigable&&(this.overlays=[]),this.configure(n)}return ke(e,[{key:"prepareData",value:function(e){return e}},{key:"prepareFirstData",value:function(e){return e}},{key:"validateColors",value:function(e,t){var n=[]
return(e=(e||[]).concat(ie[t])).forEach((function(e){var t=ce(e)
!function(e){return/(^\s*)(#)((?:[A-Fa-f0-9]{3}){1,2})$/i.test(e)||/(^\s*)(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/i.test(e)}(t)?console.warn('"'+e+'" is not a valid color.'):n.push(t)})),n}},{key:"setMeasures",value:function(){}},{key:"configure",value:function(){var e=this,t=this.argHeight
this.baseHeight=t,this.height=t-a(this.measures),this.boundDrawFn=function(){return e.draw(!0)},ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.boundDrawFn),this.resizeObserver.observe(this.parent)),window.addEventListener("resize",this.boundDrawFn),window.addEventListener("orientationchange",this.boundDrawFn)}},{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),window.removeEventListener("resize",this.boundDrawFn),window.removeEventListener("orientationchange",this.boundDrawFn)}},{key:"setup",value:function(){this.makeContainer(),this.updateWidth(),this.makeTooltip(),this.draw(!1,!0)}},{key:"makeContainer",value:function(){this.parent.innerHTML=""
var e={inside:this.parent,className:"chart-container"}
this.independentWidth&&(e.styles={width:this.independentWidth+"px"}),this.container=i.create("div",e)}},{key:"makeTooltip",value:function(){this.tip=new oe({parent:this.container,colors:this.colors}),this.bindTooltip()}},{key:"bindTooltip",value:function(){}},{key:"draw",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
t&&function(e){return null===e.offsetParent}(this.parent)||(this.updateWidth(),this.calc(t),this.makeChartArea(),this.setupComponents(),this.components.forEach((function(t){return t.setup(e.drawArea)})),this.render(this.components,!1),n&&(this.data=this.realData,setTimeout((function(){e.update(e.data)}),this.initTimeout)),this.renderLegend(),this.setupNavigation(n))}},{key:"calc",value:function(){}},{key:"updateWidth",value:function(){this.baseWidth=function(e){var t=window.getComputedStyle(e),n=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)
return e.clientWidth-n}(this.parent),this.width=this.baseWidth-l(this.measures)}},{key:"makeChartArea",value:function(){this.svg&&this.container.removeChild(this.svg)
var e=this.measures
this.svg=function(e,t,n,i){return k("svg",{className:"frappe-chart chart",inside:e,width:n,height:i})}(this.container,0,this.baseWidth,this.baseHeight),this.svgDefs=function(e){return k("defs",{inside:e})}(this.svg),this.title.length&&(this.titleEL=A("title",e.margins.left,e.margins.top,this.title,{fontSize:e.titleFontSize,fill:"#666666",dy:e.titleFontSize}))
var t=s(e)
this.drawArea=D(this.type+"-chart chart-draw-area","translate("+o(e)+", "+t+")"),this.config.showLegend&&(t+=this.height+e.paddings.bottom,this.legendArea=D("chart-legend","translate("+o(e)+", "+t+")")),this.title.length&&this.svg.appendChild(this.titleEL),this.svg.appendChild(this.drawArea),this.config.showLegend&&this.svg.appendChild(this.legendArea),this.updateTipOffset(o(e),s(e))}},{key:"updateTipOffset",value:function(e,t){this.tip.offset={x:e,y:t}}},{key:"setupComponents",value:function(){this.components=new Map}},{key:"update",value:function(e){e||console.error("No data to update."),this.data=this.prepareData(e),this.calc(),this.render(this.components,this.config.animate),this.renderLegend()}},{key:"render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.components,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]
this.config.isNavigable&&this.overlays.map((function(e){return e.parentNode.removeChild(e)}))
var i=[]
t.forEach((function(e){i=i.concat(e.update(n))})),i.length>0?(function(e,t,n){if(0!==n.length){var i=F(t,n)
t.parentNode==e&&(e.removeChild(t),e.appendChild(i)),setTimeout((function(){i.parentNode==e&&(e.removeChild(i),e.appendChild(t))}),250)}}(this.container,this.svg,i),setTimeout((function(){t.forEach((function(e){return e.make()})),e.updateNav()}),400)):(t.forEach((function(e){return e.make()})),this.updateNav())}},{key:"updateNav",value:function(){this.config.isNavigable&&(this.makeOverlay(),this.bindUnits())}},{key:"renderLegend",value:function(){}},{key:"setupNavigation",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
this.config.isNavigable&&t&&(this.bindOverlay(),this.keyActions={13:this.onEnterKey.bind(this),37:this.onLeftArrow.bind(this),38:this.onUpArrow.bind(this),39:this.onRightArrow.bind(this),40:this.onDownArrow.bind(this)},document.addEventListener("keydown",(function(t){(function(e){var t=e.getBoundingClientRect()
return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)})(e.container)&&(t=t||window.event,e.keyActions[t.keyCode]&&e.keyActions[t.keyCode]())})))}},{key:"makeOverlay",value:function(){}},{key:"updateOverlay",value:function(){}},{key:"bindOverlay",value:function(){}},{key:"bindUnits",value:function(){}},{key:"onLeftArrow",value:function(){}},{key:"onRightArrow",value:function(){}},{key:"onUpArrow",value:function(){}},{key:"onDownArrow",value:function(){}},{key:"onEnterKey",value:function(){}},{key:"addDataPoint",value:function(){}},{key:"removeDataPoint",value:function(){}},{key:"getDataPoint",value:function(){}},{key:"setCurrentDataPoint",value:function(){}},{key:"updateDataset",value:function(){}},{key:"export",value:function(){var e=function(e){var t=e.cloneNode(!0)
t.classList.add("chart-container"),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink")
var n=i.create("style",{innerHTML:".chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Cantarell','Fira Sans','Droid Sans','Helvetica Neue',sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ul{padding-left:0;display:flex}.graph-svg-tip ol{padding-left:0;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:' ';border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}"})
t.insertBefore(n,t.firstChild)
var r=i.create("div")
return r.appendChild(t),r.innerHTML}(this.svg)
!function(e,t){var n=document.createElement("a")
n.style="display: none"
var i=new Blob(t,{type:"image/svg+xml; charset=utf-8"}),r=window.URL.createObjectURL(i)
n.href=r,n.download=e,document.body.appendChild(n),n.click(),setTimeout((function(){document.body.removeChild(n),window.URL.revokeObjectURL(r)}),300)}(this.title||"Chart",[e])}}]),e}(),De=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Se=function e(t,n,i){null===t&&(t=Function.prototype)
var r=Object.getOwnPropertyDescriptor(t,n)
if(void 0===r){var s=Object.getPrototypeOf(t)
return null===s?void 0:e(s,n,i)}if("value"in r)return r.value
var o=r.get
return void 0!==o?o.call(i):void 0},Pe=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),De(t,[{key:"configure",value:function(e){Se(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"configure",this).call(this,e),this.config.formatTooltipY=(e.tooltipOptions||{}).formatTooltipY,this.config.maxSlices=e.maxSlices||20,this.config.maxLegendPoints=e.maxLegendPoints||20}},{key:"calc",value:function(){var e=this,t=this.state,n=this.config.maxSlices
t.sliceTotals=[]
var i=this.data.labels.map((function(t,n){var i=0
return e.data.datasets.map((function(e){i+=e.values[n]})),[i,t]})).filter((function(e){return e[0]>=0})),r=i
if(i.length>n){i.sort((function(e,t){return t[0]-e[0]})),r=i.slice(0,n-1)
var s=0
i.slice(n-1).map((function(e){s+=e[0]})),r.push([s,"Rest"]),this.colors[n-1]="grey"}t.labels=[],r.map((function(e){t.sliceTotals.push(function(e){return Number(Math.round(e+"e4")+"e-4")}(e[0])),t.labels.push(e[1])})),t.grandTotal=t.sliceTotals.reduce((function(e,t){return e+t}),0),this.center={x:this.width/2,y:this.height/2}}},{key:"renderLegend",value:function(){var e=this,t=this.state
this.legendArea.textContent="",this.legendTotals=t.sliceTotals.slice(0,this.config.maxLegendPoints)
var n=0,i=0
this.legendTotals.map((function(r,s){var o=150,a=Math.floor((e.width-l(e.measures))/o)
e.legendTotals.length<a&&(o=e.width/e.legendTotals.length),n>a&&(n=0,i+=20)
var c=o*n+5,u=e.config.truncateLegends?y(t.labels[s],o/10):t.labels[s],d=e.config.formatTooltipY?e.config.formatTooltipY(r):r,h=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=arguments[4]
r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?y(r,15):r
var s={className:"legend-dot",cx:0,cy:0,r:n,fill:i},o=k("text",{className:"legend-dataset-text",x:0,y:0,dx:he+"px",dy:he/3+"px","font-size":1.2*he+"px","text-anchor":"start",fill:pe,innerHTML:r}),a=k("g",{transform:"translate("+e+", "+t+")"})
return a.appendChild(k("circle",s)),a.appendChild(o),a}(c,i,5,e.colors[s],u+": "+d,!1)
e.legendArea.appendChild(h),n++}))}}]),t}(Te),Me=7,Ae=1e3,Re=86400,Oe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ce=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ee=function(e,t){if(Array.isArray(e))return e
if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,s=void 0
try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}(e,t)
throw new TypeError("Invalid attempt to destructure non-iterable instance")},xe=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Ie=function(){function e(t){var n=t.layerClass,i=void 0===n?"":n,r=t.layerTransform,s=void 0===r?"":r,o=t.constants,a=t.getData,l=t.makeElements,c=t.animateElements;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.layerTransform=s,this.constants=o,this.makeElements=l,this.getData=a,this.animateElements=c,this.store=[],this.labels=[],this.layerClass=i,this.layerClass="function"==typeof this.layerClass?this.layerClass():this.layerClass,this.refresh()}return xe(e,[{key:"refresh",value:function(e){this.data=e||this.getData()}},{key:"setup",value:function(e){this.layer=D(this.layerClass,this.layerTransform,e)}},{key:"make",value:function(){this.render(this.data),this.oldData=this.data}},{key:"render",value:function(e){var t=this
this.store=this.makeElements(e),this.layer.textContent="",this.store.forEach((function(e){t.layer.appendChild(e)})),this.labels.forEach((function(e){t.layer.appendChild(e)}))}},{key:"update",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]
this.refresh()
var t=[]
return e&&(t=this.animateElements(this.data)||[]),t}}]),e}(),Fe={donutSlices:{layerClass:"donut-slices",makeElements:function(e){return e.sliceStrings.map((function(t,n){var i=S(t,"donut-path",e.colors[n],"none",e.strokeWidth)
return i.style.transition="transform .3s;",i}))},animateElements:function(e){return this.store.map((function(t,n){return E(t,e.sliceStrings[n])}))}},pieSlices:{layerClass:"pie-slices",makeElements:function(e){return e.sliceStrings.map((function(t,n){var i=S(t,"pie-path","none",e.colors[n])
return i.style.transition="transform .3s;",i}))},animateElements:function(e){return this.store.map((function(t,n){return E(t,e.sliceStrings[n])}))}},percentageBars:{layerClass:"percentage-bars",makeElements:function(e){var t=this
return e.xPositions.map((function(n,i){return function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none"
return k("rect",{className:"percentage-bar",x:e,y:t,width:n,height:i,fill:s,styles:{stroke:_(s,-25),"stroke-dasharray":"0, "+(i+n)+", "+n+", "+i,"stroke-width":r}})}(n,0,e.widths[i],t.constants.barHeight,t.constants.barDepth,e.colors[i])}))},animateElements:function(e){if(e)return[]}},yAxis:{layerClass:"y axis",makeElements:function(e){var t=this
return e.positions.map((function(n,i){return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}
f(e)||(e=0),i.pos||(i.pos="left"),i.offset||(i.offset=0),i.mode||(i.mode="span"),i.stroke||(i.stroke=fe),i.className||(i.className="")
var r=-6,s="span"===i.mode?n+6:0
return"tick"===i.mode&&"right"===i.pos&&(r=n+6,s=n),R(e,t,r+=i.offset,s+=i.offset,{stroke:i.stroke,className:i.className,lineType:i.lineType,shortenNumbers:i.shortenNumbers})}(n,e.labels[i],t.constants.width,{mode:t.constants.mode,pos:t.constants.pos,shortenNumbers:t.constants.shortenNumbers})}))},animateElements:function(e){var t=e.positions,n=e.labels,i=this.oldData.positions,r=this.oldData.labels,s=g(i,t),o=Ee(s,2)
i=o[0],t=o[1]
var a=g(r,n),l=Ee(a,2)
return r=l[0],n=l[1],this.render({positions:i,labels:n}),this.store.map((function(e,n){return C(e,t[n],i[n])}))}},xAxis:{layerClass:"x axis",makeElements:function(e){var t=this
return e.positions.map((function(n,i){return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}
f(e)||(e=0),i.pos||(i.pos="bottom"),i.offset||(i.offset=0),i.mode||(i.mode="span"),i.stroke||(i.stroke=fe),i.className||(i.className="")
var r=n+6,s="span"===i.mode?-6:n
return"tick"===i.mode&&"top"===i.pos&&(r=-6,s=0),function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{}
r.stroke||(r.stroke=fe)
var s=k("line",{className:"line-vertical "+r.className,x1:0,x2:0,y1:n,y2:i,styles:{stroke:r.stroke}}),o=k("text",{x:0,y:n>i?n+de:n-de-he,dy:he+"px","font-size":he+"px","text-anchor":"middle",innerHTML:t+""}),a=k("g",{transform:"translate("+e+", 0)"})
return a.appendChild(s),a.appendChild(o),a}(e,t,r,s,{stroke:i.stroke,className:i.className,lineType:i.lineType})}(n,e.calcLabels[i],t.constants.height,{mode:t.constants.mode,pos:t.constants.pos})}))},animateElements:function(e){var t=e.positions,n=e.calcLabels,i=this.oldData.positions,r=this.oldData.calcLabels,s=g(i,t),o=Ee(s,2)
i=o[0],t=o[1]
var a=g(r,n),l=Ee(a,2)
return r=l[0],n=l[1],this.render({positions:i,calcLabels:n}),this.store.map((function(e,n){return function(e,t,n){return O(e,[n,0],[t,0],ve)}(e,t[n],i[n])}))}},yMarkers:{layerClass:"y-markers",makeElements:function(e){var t=this
return e.map((function(e){return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}
i.labelPos||(i.labelPos="right")
var r=k("text",{className:"chart-label",x:"left"===i.labelPos?de:n-d(t,5)-de,y:0,dy:he/-2+"px","font-size":he+"px","text-anchor":"start",innerHTML:t+""}),s=R(e,"",0,n,{stroke:i.stroke||fe,className:i.className||"",lineType:i.lineType})
return s.appendChild(r),s}(e.position,e.label,t.constants.width,{labelPos:e.options.labelPos,mode:"span",lineType:"dashed"})}))},animateElements:function(e){var t=g(this.oldData,e),n=Ee(t,2)
this.oldData=n[0]
var i=(e=n[1]).map((function(e){return e.position})),r=e.map((function(e){return e.label})),s=e.map((function(e){return e.options})),o=this.oldData.map((function(e){return e.position}))
return this.render(o.map((function(e,t){return{position:o[t],label:r[t],options:s[t]}}))),this.store.map((function(e,t){return C(e,i[t],o[t])}))}},yRegions:{layerClass:"y-regions",makeElements:function(e){var t=this
return e.map((function(e){return function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=e-t,o=k("rect",{className:"bar mini",styles:{fill:"rgba(228, 234, 239, 0.49)",stroke:fe,"stroke-dasharray":n+", "+s},x:0,y:0,width:n,height:s})
r.labelPos||(r.labelPos="right")
var a=k("text",{className:"chart-label",x:"left"===r.labelPos?de:n-d(i+"",4.5)-de,y:0,dy:he/-2+"px","font-size":he+"px","text-anchor":"start",innerHTML:i+""}),l=k("g",{transform:"translate(0, "+t+")"})
return l.appendChild(o),l.appendChild(a),l}(e.startPos,e.endPos,t.constants.width,e.label,{labelPos:e.options.labelPos})}))},animateElements:function(e){var t=g(this.oldData,e),n=Ee(t,2)
this.oldData=n[0]
var i=(e=n[1]).map((function(e){return e.endPos})),r=e.map((function(e){return e.label})),s=e.map((function(e){return e.startPos})),o=e.map((function(e){return e.options})),a=this.oldData.map((function(e){return e.endPos})),l=this.oldData.map((function(e){return e.startPos}))
this.render(a.map((function(e,t){return{startPos:l[t],endPos:a[t],label:r[t],options:o[t]}})))
var c=[]
return this.store.map((function(e,t){c=c.concat(function(e,t,n,i){var r=t-n,s=e.childNodes[0]
return[[s,{height:r,"stroke-dasharray":s.getAttribute("width")+", "+r},ve,be],O(e,[0,i],[0,n],ve)]}(e,s[t],i[t],a[t]))})),c}},heatDomain:{layerClass:function(){return"heat-domain domain-"+this.constants.index},makeElements:function(e){var t=this,n=this.constants,i=n.index,r=n.colWidth,s=n.rowHeight,o=n.squareSize,a=n.radius,l=n.xTranslate,c=0
return this.serializedSubDomains=[],e.cols.map((function(e,n){1===n&&t.labels.push(A("domain-name",l,-12,z(i,!0).toUpperCase(),{fontSize:9})),e.map((function(e,n){if(e.fill){var i={"data-date":e.yyyyMmDd,"data-value":e.dataValue,"data-day":n},r=M("day",l,c,o,a,e.fill,i)
t.serializedSubDomains.push(r)}c+=s})),c=0,l+=r})),this.serializedSubDomains},animateElements:function(e){if(e)return[]}},barGraph:{layerClass:function(){return"dataset-units dataset-bars dataset-"+this.constants.index},makeElements:function(e){var t=this.constants
return this.unitType="bar",this.units=e.yPositions.map((function(n,i){return function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=function(e){if(Array.isArray(e))return e
if(Symbol.iterator in Object(e))return function(e){var t=[],n=!0,i=!1,r=void 0
try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(t.push(s.value),2!==t.length);n=!0);}catch(e){i=!0,r=e}finally{try{!n&&o.return&&o.return()}finally{if(i)throw r}}return t}(e)
throw new TypeError("Invalid attempt to destructure non-iterable instance")}(m(t,a.zeroLine)),c=l[0],u=l[1]
u-=o,0===c&&(c=a.minHeight,u-=a.minHeight),f(e)||(e=0),f(u)||(u=0),f(c,!0)||(c=0),f(n,!0)||(n=0)
var d=k("rect",{className:"bar mini",style:"fill: "+i,"data-point-index":s,x:e,y:u,width:n,height:c})
if((r+="")||r.length){d.setAttribute("y",0),d.setAttribute("x",0)
var h=k("text",{className:"data-point-value",x:n/2,y:0,dy:he/2*-1+"px","font-size":he+"px","text-anchor":"middle",innerHTML:r}),p=k("g",{"data-point-index":s,transform:"translate("+e+", "+u+")"})
return p.appendChild(d),p.appendChild(h),p}return d}(e.xPositions[i],n,e.barWidth,t.color,e.labels[i],i,e.offsets[i],{zeroLine:e.zeroLine,barsWidth:e.barsWidth,minHeight:t.minHeight})})),this.units},animateElements:function(e){var t=e.xPositions,n=e.yPositions,i=e.offsets,r=e.labels,s=this.oldData.xPositions,o=this.oldData.yPositions,a=this.oldData.offsets,l=this.oldData.labels,c=g(s,t),u=Ee(c,2)
s=u[0],t=u[1]
var d=g(o,n),h=Ee(d,2)
o=h[0],n=h[1]
var f=g(a,i),p=Ee(f,2)
a=p[0],i=p[1]
var y=g(l,r),v=Ee(y,2)
l=v[0],r=v[1],this.render({xPositions:s,yPositions:o,offsets:a,labels:r,zeroLine:this.oldData.zeroLine,barsWidth:this.oldData.barsWidth,barWidth:this.oldData.barWidth})
var b=[]
return this.store.map((function(r,s){b=b.concat(function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=function(e){if(Array.isArray(e))return e
if(Symbol.iterator in Object(e))return function(e){var t=[],n=!0,i=!1,r=void 0
try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(t.push(s.value),2!==t.length);n=!0);}catch(e){i=!0,r=e}finally{try{!n&&o.return&&o.return()}finally{if(i)throw r}}return t}(e)
throw new TypeError("Invalid attempt to destructure non-iterable instance")}(m(n,(arguments.length>5&&void 0!==arguments[5]?arguments[5]:{}).zeroLine)),o=s[0],a=s[1]
return a-=r,"rect"!==e.nodeName?[[e.childNodes[0],{width:i,height:o},ye,be],O(e,e.getAttribute("transform").split("(")[1].slice(0,-1),[t,a],ve)]:[[e,{width:i,height:o,x:t,y:a},ye,be]]}(r,t[s],n[s],e.barWidth,i[s],{zeroLine:e.zeroLine}))})),b}},lineGraph:{layerClass:function(){return"dataset-units dataset-line dataset-"+this.constants.index},makeElements:function(e){var t=this.constants
return this.unitType="dot",this.paths={},t.hideLine||(this.paths=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=t.map((function(t,n){return e[n]+","+t})).join("L")
i.spline&&(s=v(e,t))
var o=S("M"+s,"line-graph-path",n)
if(i.heatline){var a=P(r.svgDefs,n)
o.style.stroke="url(#"+a+")"}var l={path:o}
if(i.regionFill){var c=P(r.svgDefs,n,!0),u="M"+e[0]+","+r.zeroLine+"L"+s+"L"+e.slice(-1)[0]+","+r.zeroLine
l.region=S(u,"region-fill","none","url(#"+c+")")}return l}(e.xPositions,e.yPositions,t.color,{heatline:t.heatline,regionFill:t.regionFill,spline:t.spline},{svgDefs:t.svgDefs,zeroLine:e.zeroLine})),this.units=[],t.hideDots||(this.units=e.yPositions.map((function(n,i){return function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=k("circle",{style:"fill: "+i,"data-point-index":s,cx:e,cy:t,r:n})
if((r+="")||r.length){o.setAttribute("cy",0),o.setAttribute("cx",0)
var a=k("text",{className:"data-point-value",x:0,y:0,dy:he/2*-1-n+"px","font-size":he+"px","text-anchor":"middle",innerHTML:r}),l=k("g",{"data-point-index":s,transform:"translate("+e+", "+t+")"})
return l.appendChild(o),l.appendChild(a),l}return o}(e.xPositions[i],n,e.radius,t.color,t.valuesOverPoints?e.values[i]:"",i)}))),Object.values(this.paths).concat(this.units)},animateElements:function(e){var t=e.xPositions,n=e.yPositions,i=e.values,r=this.oldData.xPositions,s=this.oldData.yPositions,o=this.oldData.values,a=g(r,t),l=Ee(a,2)
r=l[0],t=l[1]
var c=g(s,n),u=Ee(c,2)
s=u[0],n=u[1]
var d=g(o,i),h=Ee(d,2)
o=h[0],i=h[1],this.render({xPositions:r,yPositions:s,values:i,zeroLine:this.oldData.zeroLine,radius:this.oldData.radius})
var f=[]
return Object.keys(this.paths).length&&(f=f.concat(function(e,t,n,i,r){var s=[],o=n.map((function(e,n){return t[n]+","+e})).join("L")
r&&(o=v(t,n))
var a=[e.path,{d:"M"+o},350,be]
if(s.push(a),e.region){var l=t[0]+","+i+"L",c="L"+t.slice(-1)[0]+", "+i,u=[e.region,{d:"M"+l+o+c},350,be]
s.push(u)}return s}(this.paths,t,n,e.zeroLine,this.constants.spline))),this.units.length&&this.units.map((function(e,i){f=f.concat(function(e,t,n){return"circle"!==e.nodeName?[O(e,e.getAttribute("transform").split("(")[1].slice(0,-1),[t,n],ve)]:[[e,{cx:t,cy:n},ye,be]]}(e,t[i],n[i]))})),f}}},Ne=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),je=function e(t,n,i){null===t&&(t=Function.prototype)
var r=Object.getOwnPropertyDescriptor(t,n)
if(void 0===r){var s=Object.getPrototypeOf(t)
return null===s?void 0:e(s,n,i)}if("value"in r)return r.value
var o=r.get
return void 0!==o?o.call(i):void 0},qe=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)
var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))
return i.type="percentage",i.setup(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Ne(t,[{key:"setMeasures",value:function(e){var t=this.measures
this.barOptions=e.barOptions||{}
var n=this.barOptions
n.height=n.height||20,n.depth=n.depth||2,t.paddings.right=30,t.legendHeight=60,t.baseHeight=8*(n.height+.5*n.depth)}},{key:"setupComponents",value:function(){var e=this.state,t=[["percentageBars",{barHeight:this.barOptions.height,barDepth:this.barOptions.depth},function(){return{xPositions:e.xPositions,widths:e.widths,colors:this.colors}}.bind(this)]]
this.components=new Map(t.map((function(e){var t=U.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}(e))
return[e[0],t]})))}},{key:"calc",value:function(){var e=this
je(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"calc",this).call(this)
var n=this.state
n.xPositions=[],n.widths=[]
var i=0
n.sliceTotals.map((function(t){var r=e.width*t/n.grandTotal
n.widths.push(r),n.xPositions.push(i),i+=r}))}},{key:"makeDataByIndex",value:function(){}},{key:"bindTooltip",value:function(){var e=this,t=this.state
this.container.addEventListener("mousemove",(function(n){var i=e.components.get("percentageBars").store,s=n.target
if(i.includes(s)){var o=i.indexOf(s),a=r(e.container),l=r(s),c=l.left-a.left+parseInt(s.getAttribute("width"))/2,u=l.top-a.top,d=(e.formattedLabels&&e.formattedLabels.length>0?e.formattedLabels[o]:e.state.labels[o])+": ",h=t.sliceTotals[o]/t.grandTotal
e.tip.setValues(c,u,{name:d,value:(100*h).toFixed(1)+"%"}),e.tip.showTip()}}))}}]),t}(Pe),Le=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),$e=function e(t,n,i){null===t&&(t=Function.prototype)
var r=Object.getOwnPropertyDescriptor(t,n)
if(void 0===r){var s=Object.getPrototypeOf(t)
return null===s?void 0:e(s,n,i)}if("value"in r)return r.value
var o=r.get
return void 0!==o?o.call(i):void 0},ze=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)
var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))
return i.type="pie",i.initTimeout=0,i.init=1,i.setup(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Le(t,[{key:"configure",value:function(e){$e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"configure",this).call(this,e),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=e.hoverRadio||.1,this.config.startAngle=e.startAngle||0,this.clockWise=e.clockWise||!1}},{key:"calc",value:function(){var e=this
$e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"calc",this).call(this)
var n=this.state
this.radius=this.height>this.width?this.center.x:this.center.y
var i=this.radius,r=this.clockWise,s=n.slicesProperties||[]
n.sliceStrings=[],n.slicesProperties=[]
var o=180-this.config.startAngle
n.sliceTotals.map((function(t,a){var l=o,c=t/n.grandTotal*360,u=c>180?1:0,d=r?-c:c,f=o+=d,p=h(l,i),m=h(f,i),g=e.init&&s[a],y=void 0,v=void 0
e.init?(y=g?g.startPosition:p,v=g?g.endPosition:p):(y=p,v=m)
var b=360===c?function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=n.x+e.x,a=n.y+e.y,l=n.x+t.x,c=2*n.y,u=n.y+t.y
return"M"+n.x+" "+n.y+"\n\t\tL"+o+" "+a+"\n\t\tA "+i+" "+i+" 0 "+s+" "+(r?1:0)+"\n\t\t"+l+" "+c+" z\n\t\tL"+o+" "+c+"\n\t\tA "+i+" "+i+" 0 "+s+" "+(r?1:0)+"\n\t\t"+l+" "+u+" z"}(y,v,e.center,e.radius,r,u):function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=n.x+e.x,a=n.y+e.y,l=n.x+t.x,c=n.y+t.y
return"M"+n.x+" "+n.y+"\n\t\tL"+o+" "+a+"\n\t\tA "+i+" "+i+" 0 "+s+" "+(r?1:0)+"\n\t\t"+l+" "+c+" z"}(y,v,e.center,e.radius,r,u)
n.sliceStrings.push(b),n.slicesProperties.push({startPosition:p,endPosition:m,value:t,total:n.grandTotal,startAngle:l,endAngle:f,angle:d})})),this.init=0}},{key:"setupComponents",value:function(){var e=this.state,t=[["pieSlices",{},function(){return{sliceStrings:e.sliceStrings,colors:this.colors}}.bind(this)]]
this.components=new Map(t.map((function(e){var t=U.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}(e))
return[e[0],t]})))}},{key:"calTranslateByAngle",value:function(e){var t=this.radius,n=this.hoverRadio,i=h(e.startAngle+e.angle/2,t)
return"translate3d("+i.x*n+"px,"+i.y*n+"px,0)"}},{key:"hoverSlice",value:function(e,t,n,i){if(e){var s=this.colors[t]
if(n){I(e,this.calTranslateByAngle(this.state.slicesProperties[t])),e.style.fill=_(s,50)
var o=r(this.svg),a=i.pageX-o.left+10,l=i.pageY-o.top-10,c=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[t]:this.state.labels[t])+": ",u=(100*this.state.sliceTotals[t]/this.state.grandTotal).toFixed(1)
this.tip.setValues(a,l,{name:c,value:u+"%"}),this.tip.showTip()}else I(e,"translate3d(0,0,0)"),this.tip.hideTip(),e.style.fill=s}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(e){var t=e.target,n=this.components.get("pieSlices").store,i=this.curActiveSliceIndex,r=this.curActiveSlice
if(n.includes(t)){var s=n.indexOf(t)
this.hoverSlice(r,i,!1),this.curActiveSlice=t,this.curActiveSliceIndex=s,this.hoverSlice(t,s,!0,e)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),t}(Pe),Be=function(e,t){if(Array.isArray(e))return e
if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,s=void 0
try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}(e,t)
throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ye=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Ze=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)
var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))
i.type="heatmap",i.countLabel=n.countLabel||""
var r=["Sunday","Monday"],s=r.includes(n.startSubDomain)?n.startSubDomain:"Sunday"
return i.startSubDomainIndex=r.indexOf(s),i.setup(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Ye(t,[{key:"setMeasures",value:function(e){var t=this.measures
this.discreteDomains=0===e.discreteDomains?0:1,t.paddings.top=36,t.paddings.bottom=0,t.legendHeight=24,t.baseHeight=12*Me+a(t)
var n=this.data,i=this.discreteDomains?12:0
this.independentWidth=12*(L(n.start,n.end)+i)+l(t)}},{key:"updateWidth",value:function(){var e=this.discreteDomains?12:0,t=this.state.noOfWeeks?this.state.noOfWeeks:52
this.baseWidth=12*(t+e)+l(this.measures)}},{key:"prepareData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data
if(e.start&&e.end&&e.start>e.end)throw new Error("Start date cannot be greater than end date.")
if(e.start||(e.start=new Date,e.start.setFullYear(e.start.getFullYear()-1)),e.end||(e.end=new Date),e.dataPoints=e.dataPoints||{},parseInt(Object.keys(e.dataPoints)[0])>1e5){var t={}
Object.keys(e.dataPoints).forEach((function(n){var i=new Date(n*Ae)
t[j(i)]=e.dataPoints[n]})),e.dataPoints=t}return e}},{key:"calc",value:function(){var e=this.state
e.start=q(this.data.start),e.end=q(this.data.end),e.firstWeekStart=q(e.start),e.noOfWeeks=L(e.start,e.end),e.distribution=function(e){for(var t=Math.max.apply(Math,W(e)),n=[],i=0;i<5;i++){var r=t*(.25*i)
n.push(r)}return n}(Object.values(this.data.dataPoints)),e.domainConfigs=this.getDomains()}},{key:"setupComponents",value:function(){var e=this,t=this.state,n=this.discreteDomains?0:1,i=t.domainConfigs.map((function(i,r){return["heatDomain",{index:i.index,colWidth:12,rowHeight:12,squareSize:10,radius:e.rawChartArgs.radius||0,xTranslate:12*t.domainConfigs.filter((function(e,t){return t<r})).map((function(e){return e.cols.length-n})).reduce((function(e,t){return e+t}),0)},function(){return t.domainConfigs[r]}.bind(e)]}))
this.components=new Map(i.map((function(e,t){var n=U.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}(e))
return[e[0]+"-"+t,n]})))
var r=0
Ce.forEach((function(t,n){if([1,3,5].includes(n)){var i=A("subdomain-name",-6,r,t,{fontSize:10,dy:8,textAnchor:"end"})
e.drawArea.appendChild(i)}r+=12}))}},{key:"update",value:function(e){e||console.error("No data to update."),this.data=this.prepareData(e),this.draw(),this.bindTooltip()}},{key:"bindTooltip",value:function(){var e=this
this.container.addEventListener("mousemove",(function(t){e.components.forEach((function(n){var i=n.store,r=t.target
if(i.includes(r)){var s=r.getAttribute("data-value"),o=r.getAttribute("data-date").split("-"),a=z(parseInt(o[1])-1,!0),l=e.container.getBoundingClientRect(),c=r.getBoundingClientRect(),u=parseInt(t.target.getAttribute("width")),d=c.left-l.left+u/2,h=c.top-l.top,f=s+" "+e.countLabel,p=" on "+a+" "+o[0]+", "+o[2]
e.tip.setValues(d,h,{name:p,value:f,valueFirst:1},[]),e.tip.showTip()}}))}))}},{key:"renderLegend",value:function(){var e=this
this.legendArea.textContent=""
var t=0,n=this.rawChartArgs.radius||0,i=A("subdomain-name",t,12,"Less",{fontSize:11,dy:9})
t=30,this.legendArea.appendChild(i),this.colors.slice(0,5).map((function(i,r){var s=M("heatmap-legend-unit",t+15*r,12,10,n,i)
e.legendArea.appendChild(s)}))
var r=A("subdomain-name",t+75+3,12,"More",{fontSize:11,dy:9})
this.legendArea.appendChild(r)}},{key:"getDomains",value:function(){for(var e=this.state,t=[e.start.getMonth(),e.start.getFullYear()],n=t[0],i=t[1],r=[e.end.getMonth(),e.end.getFullYear()],s=r[0]-n+1+12*(r[1]-i),o=[],a=q(e.start),l=0;l<s;l++){var c=e.end
if(!$(a,e.end)){var u=[a.getMonth(),a.getFullYear()]
c=B(u[0],u[1])}o.push(this.getDomainConfig(a,c)),Z(c,1),a=c}return o}},{key:"getDomainConfig",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[e.getMonth(),e.getFullYear()],i=n[0],r=n[1],s=Y(e),o={index:i,cols:[]}
Z(t=q(t)||B(i,r),1)
for(var a=L(s,t),l=[],c=void 0,u=0;u<a;u++)c=this.getCol(s,i),l.push(c),Z(s=new Date(c[Me-1].yyyyMmDd),1)
return void 0!==c[Me-1].dataValue&&(Z(s,1),l.push(this.getCol(s,i,!0))),o.cols=l,o}},{key:"getCol",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.state,r=q(e),s=[],o=0;o<Me;o++,Z(r,1)){var a={},l=r>=i.start&&r<=i.end
n||r.getMonth()!==t||!l?a.yyyyMmDd=j(r):a=this.getSubDomainConfig(r),s.push(a)}return s}},{key:"getSubDomainConfig",value:function(e){var t=j(e),n=this.data.dataPoints[t]
return{yyyyMmDd:t,dataValue:n||0,fill:this.colors[K(n,this.state.distribution)]}}}]),t}(Te),Ue=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),We=function e(t,n,i){null===t&&(t=Function.prototype)
var r=Object.getOwnPropertyDescriptor(t,n)
if(void 0===r){var s=Object.getPrototypeOf(t)
return null===s?void 0:e(s,n,i)}if("value"in r)return r.value
var o=r.get
return void 0!==o?o.call(i):void 0},He=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)
var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))
return i.barOptions=n.barOptions||{},i.lineOptions=n.lineOptions||{},i.type=n.type||"line",i.init=1,i.setup(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Ue(t,[{key:"setMeasures",value:function(){this.data.datasets.length<=1&&(this.config.showLegend=0,this.measures.paddings.bottom=30)}},{key:"configure",value:function(e){We(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"configure",this).call(this,e),e.axisOptions=e.axisOptions||{},e.tooltipOptions=e.tooltipOptions||{},this.config.xAxisMode=e.axisOptions.xAxisMode||"span",this.config.yAxisMode=e.axisOptions.yAxisMode||"span",this.config.xIsSeries=e.axisOptions.xIsSeries||0,this.config.shortenYAxisNumbers=e.axisOptions.shortenYAxisNumbers||0,this.config.formatTooltipX=e.tooltipOptions.formatTooltipX,this.config.formatTooltipY=e.tooltipOptions.formatTooltipY,this.config.valuesOverPoints=e.valuesOverPoints}},{key:"prepareData",value:function(){return function(e,t){e.labels=e.labels||[]
var n=e.labels.length,i=e.datasets,r=new Array(n).fill(0)
return i||(i=[{values:r}]),i.map((function(e){if(e.values){var i=e.values
i=(i=i.map((function(e){return isNaN(e)?0:e}))).length>n?i.slice(0,n):u(i,n-i.length,0),e.values=i}else e.values=r
e.chartType||(te.includes(t),e.chartType=t)})),e.yRegions&&e.yRegions.map((function(e){if(e.end<e.start){var t=[e.end,e.start]
e.start=t[0],e.end=t[1]}})),e}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data,this.type)}},{key:"prepareFirstData",value:function(){return function(e){var t=e.labels.length,n=new Array(t).fill(0),i={labels:e.labels.slice(0,-1),datasets:e.datasets.map((function(e){return{name:"",values:n.slice(0,-1),chartType:e.chartType}}))}
return e.yMarkers&&(i.yMarkers=[{value:0,label:""}]),e.yRegions&&(i.yRegions=[{start:0,end:0,label:""}]),i}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data)}},{key:"calc",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
this.calcXPositions(),e||this.calcYAxisParameters(this.getAllYValues(),"line"===this.type),this.makeDataByIndex()}},{key:"calcXPositions",value:function(){var e=this.state,t=this.data.labels
e.datasetLength=t.length,e.unitWidth=this.width/e.datasetLength,e.xOffset=e.unitWidth/2,e.xAxis={labels:t,positions:t.map((function(t,n){return c(e.xOffset+n*e.unitWidth)}))}}},{key:"calcYAxisParameters",value:function(e){var t=function(e){function t(e,t){for(var n=V(e),i=n[1]-n[0],r=0,s=1;r<t;s++)r+=i,n.unshift(-1*r)
return n}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Math.max.apply(Math,W(e)),r=Math.min.apply(Math,W(e)),s=[]
if(i>=0&&r>=0)H(i)[1],s=n?V(i,r):V(i)
else if(i>0&&r<0){var o=Math.abs(r)
i>=o?(H(i)[1],s=t(i,o)):(H(o)[1],s=t(o,i).reverse().map((function(e){return-1*e})))}else if(i<=0&&r<=0){var a=Math.abs(r),l=Math.abs(i)
H(a)[1],s=(s=n?V(a,l):V(a)).reverse().map((function(e){return-1*e}))}return s}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"false"),n=this.height/function(e){return e[e.length-1]-e[0]}(t),i=G(t)*n,r=this.height-function(e){var t=G(e)
return e.indexOf(0)>=0?e.indexOf(0):e[0]>0?-1*e[0]/t:-1*e[e.length-1]/t+(e.length-1)}(t)*i
this.state.yAxis={labels:t,positions:t.map((function(e){return r-e*n})),scaleMultiplier:n,zeroLine:r},this.calcDatasetPoints(),this.calcYExtremes(),this.calcYRegions()}},{key:"calcDatasetPoints",value:function(){var e=this.state,t=function(t){return t.map((function(t){return J(t,e.yAxis)}))}
e.datasets=this.data.datasets.map((function(e,n){var i=e.values,r=e.cumulativeYs||[]
return{name:e.name&&e.name.replace(/<|>|&/g,(function(e){return"&"==e?"&":"<"==e?"<":">"})),index:n,chartType:e.chartType,values:i,yPositions:t(i),cumulativeYs:r,cumulativeYPos:t(r)}}))}},{key:"calcYExtremes",value:function(){var e=this.state
this.barOptions.stacked?e.yExtremes=e.datasets[e.datasets.length-1].cumulativeYPos:(e.yExtremes=new Array(e.datasetLength).fill(9999),e.datasets.map((function(t){t.yPositions.map((function(t,n){t<e.yExtremes[n]&&(e.yExtremes[n]=t)}))})))}},{key:"calcYRegions",value:function(){var e=this.state
this.data.yMarkers&&(this.state.yMarkers=this.data.yMarkers.map((function(t){return t.position=J(t.value,e.yAxis),t.options||(t.options={}),t}))),this.data.yRegions&&(this.state.yRegions=this.data.yRegions.map((function(t){return t.startPos=J(t.start,e.yAxis),t.endPos=J(t.end,e.yAxis),t.options||(t.options={}),t})))}},{key:"getAllYValues",value:function(){var e,t=this,n="values"
if(this.barOptions.stacked){n="cumulativeYs"
var i=new Array(this.state.datasetLength).fill(0)
this.data.datasets.map((function(e,r){var s=t.data.datasets[r].values
e[n]=i=i.map((function(e,t){return e+s[t]}))}))}var r=this.data.datasets.map((function(e){return e[n]}))
return this.data.yMarkers&&r.push(this.data.yMarkers.map((function(e){return e.value}))),this.data.yRegions&&this.data.yRegions.map((function(e){r.push([e.end,e.start])})),(e=[]).concat.apply(e,X(r))}},{key:"setupComponents",value:function(){var e=this,t=[["yAxis",{mode:this.config.yAxisMode,width:this.width,shortenNumbers:this.config.shortenYAxisNumbers},function(){return this.state.yAxis}.bind(this)],["xAxis",{mode:this.config.xAxisMode,height:this.height},function(){var e=this.state
return e.xAxis.calcLabels=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=e/t.length
i<=0&&(i=1)
var r=i/7,s=void 0
if(n){var o=Math.max.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}(t.map((function(e){return e.length}))))
s=Math.ceil(o/r)}return t.map((function(e,t){return(e+="").length>r&&(n?t%s!=0&&(e=""):e=r-3>0?e.slice(0,r-3)+" ...":e.slice(0,r)+".."),e}))}(this.width,e.xAxis.labels,this.config.xIsSeries),e.xAxis}.bind(this)],["yRegions",{width:this.width,pos:"right"},function(){return this.state.yRegions}.bind(this)]],n=this.state.datasets.filter((function(e){return"bar"===e.chartType})),i=this.state.datasets.filter((function(e){return"line"===e.chartType})),r=n.map((function(t){var i=t.index
return["barGraph-"+t.index,{index:i,color:e.colors[i],stacked:e.barOptions.stacked,valuesOverPoints:e.config.valuesOverPoints,minHeight:0*e.height},function(){var e=this.state,t=e.datasets[i],r=this.barOptions.stacked,s=this.barOptions.spaceRatio||.5,o=e.unitWidth*(1-s),a=o/(r?1:n.length),l=e.xAxis.positions.map((function(e){return e-o/2}))
r||(l=l.map((function(e){return e+a*i})))
var c=new Array(e.datasetLength).fill("")
this.config.valuesOverPoints&&(c=r&&t.index===e.datasets.length-1?t.cumulativeYs:t.values)
var u=new Array(e.datasetLength).fill(0)
return r&&(u=t.yPositions.map((function(e,n){return e-t.cumulativeYPos[n]}))),{xPositions:l,yPositions:t.yPositions,offsets:u,labels:c,zeroLine:e.yAxis.zeroLine,barsWidth:o,barWidth:a}}.bind(e)]})),s=i.map((function(t){var n=t.index
return["lineGraph-"+t.index,{index:n,color:e.colors[n],svgDefs:e.svgDefs,heatline:e.lineOptions.heatline,regionFill:e.lineOptions.regionFill,spline:e.lineOptions.spline,hideDots:e.lineOptions.hideDots,hideLine:e.lineOptions.hideLine,valuesOverPoints:e.config.valuesOverPoints},function(){var e=this.state,t=e.datasets[n],i=e.yAxis.positions[0]<e.yAxis.zeroLine?e.yAxis.positions[0]:e.yAxis.zeroLine
return{xPositions:e.xAxis.positions,yPositions:t.yPositions,values:t.values,zeroLine:i,radius:this.lineOptions.dotSize||4}}.bind(e)]})),o=[["yMarkers",{width:this.width,pos:"right"},function(){return this.state.yMarkers}.bind(this)]]
t=t.concat(r,s,o)
var a=["yMarkers","yRegions"]
this.dataUnitComponents=[],this.components=new Map(t.filter((function(t){return!a.includes(t[0])||e.state[t[0]]})).map((function(t){var n=U.apply(void 0,X(t))
return(t[0].includes("lineGraph")||t[0].includes("barGraph"))&&e.dataUnitComponents.push(n),[t[0],n]})))}},{key:"makeDataByIndex",value:function(){var e=this
this.dataByIndex={}
var t=this.state,n=this.config.formatTooltipX,i=this.config.formatTooltipY
t.xAxis.labels.map((function(r,s){var o=e.state.datasets.map((function(t,n){var r=t.values[s]
return{title:t.name,value:r,yPos:t.yPositions[s],color:e.colors[n],formatted:i?i(r):r}}))
e.dataByIndex[s]={label:r,formattedLabel:n?n(r):r,xPos:t.xAxis.positions[s],values:o,yExtreme:t.yExtremes[s]}}))}},{key:"bindTooltip",value:function(){var e=this
this.container.addEventListener("mousemove",(function(t){var n=e.measures,i=r(e.container),a=t.pageX-i.left-o(n),l=t.pageY-i.top
l<e.height+s(n)&&l>s(n)?e.mapTooltipXPosition(a):e.tip.hideTip()}))}},{key:"mapTooltipXPosition",value:function(e){var t=this.state
if(t.yExtremes){var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.reduce((function(t,n){return Math.abs(n-e)<Math.abs(t-e)?n:t}),[])
return n?t.indexOf(i):i}(e,t.xAxis.positions,!0)
if(n>=0){var i=this.dataByIndex[n]
this.tip.setValues(i.xPos+this.tip.offset.x,i.yExtreme+this.tip.offset.y,{name:i.formattedLabel,value:""},i.values,n),this.tip.showTip()}}}},{key:"renderLegend",value:function(){var e=this,t=this.data
t.datasets.length>1&&(this.legendArea.textContent="",t.datasets.map((function(t,n){var i=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=arguments[4]
r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?y(r,15):r
var s={className:"legend-bar",x:0,y:0,width:n,height:"2px",fill:i},o=k("text",{className:"legend-dataset-text",x:0,y:0,dy:2*he+"px","font-size":1.2*he+"px","text-anchor":"start",fill:pe,innerHTML:r}),a=k("g",{transform:"translate("+e+", "+t+")"})
return a.appendChild(k("rect",s)),a.appendChild(o),a}(100*n,"0",100,e.colors[n],t.name,e.config.truncateLegends)
e.legendArea.appendChild(i)})))}},{key:"makeOverlay",value:function(){var e=this
this.init?this.init=0:(this.overlayGuides&&this.overlayGuides.forEach((function(e){var t=e.overlay
t.parentNode.removeChild(t)})),this.overlayGuides=this.dataUnitComponents.map((function(e){return{type:e.unitType,overlay:void 0,units:e.units}})),void 0===this.state.currentIndex&&(this.state.currentIndex=this.state.datasetLength-1),this.overlayGuides.map((function(t){var n=t.units[e.state.currentIndex]
t.overlay=me[t.type](n),e.drawArea.appendChild(t.overlay)})))}},{key:"updateOverlayGuides",value:function(){this.overlayGuides&&this.overlayGuides.forEach((function(e){var t=e.overlay
t.parentNode.removeChild(t)}))}},{key:"bindOverlay",value:function(){var e=this
this.parent.addEventListener("data-select",(function(){e.updateOverlay()}))}},{key:"bindUnits",value:function(){var e=this
this.dataUnitComponents.map((function(t){t.units.map((function(t){t.addEventListener("click",(function(){var n=t.getAttribute("data-point-index")
e.setCurrentDataPoint(n)}))}))})),this.tip.container.addEventListener("click",(function(){var t=e.tip.container.getAttribute("data-point-index")
e.setCurrentDataPoint(t)}))}},{key:"updateOverlay",value:function(){var e=this
this.overlayGuides.map((function(t){var n=t.units[e.state.currentIndex]
ge[t.type](n,t.overlay)}))}},{key:"onLeftArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex-1)}},{key:"onRightArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex+1)}},{key:"getDataPoint",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentIndex,t=this.state
return{index:e,label:t.xAxis.labels[e],values:t.datasets.map((function(t){return t.values[e]}))}}},{key:"setCurrentDataPoint",value:function(e){var t=this.state;(e=parseInt(e))<0&&(e=0),e>=t.xAxis.labels.length&&(e=t.xAxis.labels.length-1),e!==t.currentIndex&&(t.currentIndex=e,function(e,t,n){var i=document.createEvent("HTMLEvents")
for(var r in i.initEvent("data-select",!0,!0),n)i[r]=n[r]
e.dispatchEvent(i)}(this.parent,0,this.getDataPoint()))}},{key:"addDataPoint",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.datasetLength
We(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addDataPoint",this).call(this,e,n,i),this.data.labels.splice(i,0,e),this.data.datasets.map((function(e,t){e.values.splice(i,0,n[t])})),this.update(this.data)}},{key:"removeDataPoint",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.datasetLength-1
this.data.labels.length<=1||(We(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeDataPoint",this).call(this,e),this.data.labels.splice(e,1),this.data.datasets.map((function(t){t.values.splice(e,1)})),this.update(this.data))}},{key:"updateDataset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0
this.data.datasets[t].values=e,this.update(this.data)}},{key:"updateDatasets",value:function(e){this.data.datasets.map((function(t,n){e[n]&&(t.values=e[n])})),this.update(this.data)}}]),t}(Te),Ve=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n]
i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Ge=function e(t,n,i){null===t&&(t=Function.prototype)
var r=Object.getOwnPropertyDescriptor(t,n)
if(void 0===r){var s=Object.getPrototypeOf(t)
return null===s?void 0:e(s,n,i)}if("value"in r)return r.value
var o=r.get
return void 0!==o?o.call(i):void 0},Je=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)
var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))
return i.type="donut",i.initTimeout=0,i.init=1,i.setup(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Ve(t,[{key:"configure",value:function(e){Ge(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"configure",this).call(this,e),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=e.hoverRadio||.1,this.config.startAngle=e.startAngle||0,this.clockWise=e.clockWise||!1,this.strokeWidth=e.strokeWidth||30}},{key:"calc",value:function(){var e=this
Ge(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"calc",this).call(this)
var n=this.state
this.radius=this.height>this.width?this.center.x-this.strokeWidth/2:this.center.y-this.strokeWidth/2
var i=this.radius,r=this.clockWise,s=n.slicesProperties||[]
n.sliceStrings=[],n.slicesProperties=[]
var o=180-this.config.startAngle
n.sliceTotals.map((function(t,a){var l=o,c=t/n.grandTotal*360,u=c>180?1:0,d=r?-c:c,f=o+=d,p=h(l,i),m=h(f,i),g=e.init&&s[a],y=void 0,v=void 0
e.init?(y=g?g.startPosition:p,v=g?g.endPosition:p):(y=p,v=m)
var b=360===c?function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=n.x+e.x,a=n.y+e.y,l=n.x+t.x,c=2*i+a
return"M"+o+" "+a+"\n\t\tA "+i+" "+i+" 0 "+s+" "+(r?1:0)+"\n\t\t"+l+" "+c+"\n\t\tM"+o+" "+c+"\n\t\tA "+i+" "+i+" 0 "+s+" "+(r?1:0)+"\n\t\t"+l+" "+(n.y+e.y)}(y,v,e.center,e.radius,e.clockWise,u):function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0
return"M"+(n.x+e.x)+" "+(n.y+e.y)+"\n\t\tA "+i+" "+i+" 0 "+s+" "+(r?1:0)+"\n\t\t"+(n.x+t.x)+" "+(n.y+t.y)}(y,v,e.center,e.radius,e.clockWise,u)
n.sliceStrings.push(b),n.slicesProperties.push({startPosition:p,endPosition:m,value:t,total:n.grandTotal,startAngle:l,endAngle:f,angle:d})})),this.init=0}},{key:"setupComponents",value:function(){var e=this.state,t=[["donutSlices",{},function(){return{sliceStrings:e.sliceStrings,colors:this.colors,strokeWidth:this.strokeWidth}}.bind(this)]]
this.components=new Map(t.map((function(e){var t=U.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t]
return n}return Array.from(e)}(e))
return[e[0],t]})))}},{key:"calTranslateByAngle",value:function(e){var t=this.radius,n=this.hoverRadio,i=h(e.startAngle+e.angle/2,t)
return"translate3d("+i.x*n+"px,"+i.y*n+"px,0)"}},{key:"hoverSlice",value:function(e,t,n,i){if(e){var s=this.colors[t]
if(n){I(e,this.calTranslateByAngle(this.state.slicesProperties[t])),e.style.stroke=_(s,50)
var o=r(this.svg),a=i.pageX-o.left+10,l=i.pageY-o.top-10,c=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[t]:this.state.labels[t])+": ",u=(100*this.state.sliceTotals[t]/this.state.grandTotal).toFixed(1)
this.tip.setValues(a,l,{name:c,value:u+"%"}),this.tip.showTip()}else I(e,"translate3d(0,0,0)"),this.tip.hideTip(),e.style.stroke=s}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(e){var t=e.target,n=this.components.get("donutSlices").store,i=this.curActiveSliceIndex,r=this.curActiveSlice
if(n.includes(t)){var s=n.indexOf(t)
this.hoverSlice(r,i,!1),this.curActiveSlice=t,this.curActiveSliceIndex=s,this.hoverSlice(t,s,!0,e)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),t}(Pe),Ke={bar:He,line:He,percentage:qe,heatmap:Ze,pie:ze,donut:Je},Xe=function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"line",t=arguments[1],n=arguments[2]
return"axis-mixed"===e?(n.type="line",new He(t,n)):Ke[e]?new Ke[e](t,n):void console.error("Undefined chart type: "+e)}(n.type,t,n)}},5947:(e,t,n)=>{function i(e,t,n,i,r){function s(...e){if(!(this instanceof s))throw new TypeError(N.invalidCallingContext)
X(this,t(...e))}function o(e,t){return Object.defineProperties((function(...t){return e.call(this,a(this),...t)}),N.createNameDescriptors(t))}function a(t){const n=K(t)
if(!n||n.branding!==e)throw new TypeError(N.invalidCallingContext)
return n}return Object.defineProperties(s.prototype,{...N.createGetterDescriptors(N.mapProps(o,n)),...N.createPropDescriptors(N.mapProps(o,i)),...N.createStringTagDescriptors("Temporal."+e)}),Object.defineProperties(s,{...N.createPropDescriptors(r),...N.createNameDescriptors(e)}),[s,e=>{const t=Object.create(s.prototype)
return X(t,e),t},a]}function r(e){return e=e.concat("id").sort(),t=>{if(!N.hasAllPropsByName(t,e))throw new TypeError(N.invalidProtocol)
return t}}function s(e){if(K(e)||void 0!==e.calendar||void 0!==e.timeZone)throw new TypeError(N.invalidBag)
return e}function o(e,t){const n={}
for(const i in e)n[i]=({native:e},n)=>{const r=K(n)||{},{branding:s}=r,o=s===N.PlainDateBranding||t.includes(s)?r:k(n)
return e[i](o)}
return n}function a(e){const t={}
for(const n in e)t[n]=e=>{const{calendar:t}=e
return(i=t,"string"==typeof i?N.createNativeStandardOps(i):(r=i,Object.assign(Object.create(re),{calendarProtocol:r})))[n](e)
var i,r}
return t}function l(){throw new TypeError(N.forbiddenValueOf)}function c({calendar:e}){return"string"==typeof e?new nt(e):e}function u(e,t){if(t=N.copyOptions(t),N.isObjectLike(e)){const n=K(e)
if(n&&n.branding===N.PlainMonthDayBranding)return N.refineOverflowOptions(t),n
const i=A(e),r=i||N.isoCalendarId
return N.refinePlainMonthDayBag(Ze(r),!i,e,t)}const n=N.parsePlainMonthDay(N.createNativeStandardOps,e)
return N.refineOverflowOptions(t),n}function d(e,t,n){return i=t.call(e,me(N.createInstantSlots(n))),N.validateTimeZoneOffset(N.requireInteger(i))
var i}function h(e,t=he){const n=Object.keys(t).sort(),i={}
for(const r of n)i[r]=N.bindArgs(t[r],e,N.requireFunction(e[r]))
return i}function f(e,t){return"string"==typeof e?N.queryNativeTimeZone(e):h(e,t)}function p(e){return f(e,fe)}function m(e){if(N.isObjectLike(e)){const t=K(e)
if(t)switch(t.branding){case N.InstantBranding:return t
case N.ZonedDateTimeBranding:return N.createInstantSlots(t.epochNanoseconds)}}return N.parseInstant(e)}function g(e,t,n){const i=t.getTransition(m(n).epochNanoseconds,e)
return i?me(N.createInstantSlots(i)):null}function y(e){return N.isObjectLike(e)?(K(e)||{}).timeZone||be(e):(e=>N.resolveTimeZoneId(N.parseTimeZoneId(N.requireString(e))))(e)}function v(e,t){if(N.isObjectLike(e)){const n=K(e)||{}
switch(n.branding){case N.PlainTimeBranding:return N.refineOverflowOptions(t),n
case N.PlainDateTimeBranding:return N.refineOverflowOptions(t),N.createPlainTimeSlots(n)
case N.ZonedDateTimeBranding:return N.refineOverflowOptions(t),N.zonedDateTimeToPlainTime(p,n)}return N.refinePlainTimeBag(e,t)}return N.refineOverflowOptions(t),N.parsePlainTime(e)}function b(e){return void 0===e?void 0:v(e)}function _(e,t){if(t=N.copyOptions(t),N.isObjectLike(e)){const n=K(e)
return n&&n.branding===N.PlainYearMonthBranding?(N.refineOverflowOptions(t),n):N.refinePlainYearMonthBag(Be(M(e)),e,t)}const n=N.parsePlainYearMonth(N.createNativeStandardOps,e)
return N.refineOverflowOptions(t),n}function w(e,t){if(t=N.copyOptions(t),N.isObjectLike(e)){const n=K(e)||{}
switch(n.branding){case N.PlainDateTimeBranding:return N.refineOverflowOptions(t),n
case N.PlainDateBranding:return N.refineOverflowOptions(t),N.createPlainDateTimeSlots({...n,...N.isoTimeFieldDefaults})
case N.ZonedDateTimeBranding:return N.refineOverflowOptions(t),N.zonedDateTimeToPlainDateTime(p,n)}return N.refinePlainDateTimeBag(Ye(M(e)),e,t)}const n=N.parsePlainDateTime(e)
return N.refineOverflowOptions(t),n}function k(e,t){if(t=N.copyOptions(t),N.isObjectLike(e)){const n=K(e)||{}
switch(n.branding){case N.PlainDateBranding:return N.refineOverflowOptions(t),n
case N.PlainDateTimeBranding:return N.refineOverflowOptions(t),N.createPlainDateSlots(n)
case N.ZonedDateTimeBranding:return N.refineOverflowOptions(t),N.zonedDateTimeToPlainDate(p,n)}return N.refinePlainDateBag(Ye(M(e)),e,t)}const n=N.parsePlainDate(e)
return N.refineOverflowOptions(t),n}function T(e,t,n){return N.requirePositiveInteger(t.call(e,Ae(N.createPlainDateSlots(n,e))))}function D(e){return t=>"string"==typeof t?N.createNativeStandardOps(t):((e,t)=>{const n=Object.keys(t).sort(),i={}
for(const r of n)i[r]=N.bindArgs(t[r],e,e[r])
return i})(t,e)}function S(e){if(N.isObjectLike(e)){const t=K(e)
return t&&t.branding===N.DurationBranding?t:N.refineDurationBag(e)}return N.parseDuration(e)}function P(e){if(void 0!==e){if(N.isObjectLike(e)){const t=K(e)||{}
switch(t.branding){case N.ZonedDateTimeBranding:case N.PlainDateBranding:return t
case N.PlainDateTimeBranding:return N.createPlainDateSlots(t)}const n=M(e)
return{...N.refineMaybeZonedDateTimeBag(y,f,Ye(n),e),calendar:n}}return N.parseRelativeToSlots(e)}}function M(e){return A(e)||N.isoCalendarId}function A(e){const{calendar:t}=e
if(void 0!==t)return R(t)}function R(e){return N.isObjectLike(e)?(K(e)||{}).calendar||it(e):(e=>N.resolveCalendarId(N.parseCalendarId(N.requireString(e))))(e)}function O(e,t){if(t=N.copyOptions(t),N.isObjectLike(e)){const n=K(e)
if(n&&n.branding===N.ZonedDateTimeBranding)return N.refineZonedFieldOptions(t),n
const i=M(e)
return N.refineZonedDateTimeBag(y,f,Ye(i),i,e,t)}return N.parseZonedDateTime(e,t)}function C(e){return N.mapProps((e=>t=>e(E(t))),e)}function E(e){return N.zonedEpochSlotsToIso(e,p)}function x(e){return function(...t){const n=ct.get(this),[i,...r]=n(...t)
return i[e](...r)}}function I(e){return function(...t){return ct.get(this).rawFormat[e](...t)}}function F(e){const t=j[e]
if(!t)throw new TypeError(N.invalidFormatType(e))
return N.createFormatPrepper(t,N.memoize(N.createFormatForPrep))}var N=n(9212)
const j={Instant:N.instantConfig,PlainDateTime:N.dateTimeConfig,PlainDate:N.dateConfig,PlainTime:N.timeConfig,PlainYearMonth:N.yearMonthConfig,PlainMonthDay:N.monthDayConfig},q=N.createFormatPrepper(N.instantConfig),L=N.createFormatPrepper(N.zonedConfig),$=N.createFormatPrepper(N.dateTimeConfig),z=N.createFormatPrepper(N.dateConfig),B=N.createFormatPrepper(N.timeConfig),Y=N.createFormatPrepper(N.yearMonthConfig),Z=N.createFormatPrepper(N.monthDayConfig),U={era:N.requireStringOrUndefined,eraYear:N.requireIntegerOrUndefined,year:N.requireInteger,month:N.requirePositiveInteger,daysInMonth:N.requirePositiveInteger,daysInYear:N.requirePositiveInteger,inLeapYear:N.requireBoolean,monthsInYear:N.requirePositiveInteger},W={monthCode:N.requireString},H={day:N.requirePositiveInteger},V={dayOfWeek:N.requirePositiveInteger,dayOfYear:N.requirePositiveInteger,weekOfYear:N.requirePositiveIntegerOrUndefined,yearOfWeek:N.requireIntegerOrUndefined,daysInWeek:N.requirePositiveInteger},G={...U,...W,...H,...V},J=new WeakMap,K=J.get.bind(J),X=J.set.bind(J),Q={...o(U,[N.PlainYearMonthBranding]),...o(V,[]),...o(W,[N.PlainYearMonthBranding,N.PlainMonthDayBranding]),...o(H,[N.PlainMonthDayBranding])},ee=a(G),te=a({...U,...W}),ne=a({...W,...H}),ie={calendarId:e=>N.getId(e.calendar)},re=N.mapProps(((e,t)=>function(n){const{calendarProtocol:i}=this
return e(i[t](Ae(N.createPlainDateSlots(n,i))))}),G),se=N.mapPropNames((e=>t=>t[e]),N.durationFieldNamesAsc.concat("sign")),oe=N.mapPropNames(((e,t)=>e=>e[N.isoTimeFieldNamesAsc[t]]),N.timeFieldNamesAsc),ae={epochSeconds:N.getEpochSec,epochMilliseconds:N.getEpochMilli,epochMicroseconds:N.getEpochMicro,epochNanoseconds:N.getEpochNano},le=N.bindArgs(N.excludePropsByName,new Set(["branding"])),[ce,ue,de]=i(N.PlainMonthDayBranding,N.bindArgs(N.constructPlainMonthDaySlots,R),{...ie,...ne},{getISOFields:le,getCalendar:c,with(e,t,n){return ue(N.plainMonthDayWithFields(He,e,this,s(t),n))},equals:(e,t)=>N.plainMonthDaysEqual(e,u(t)),toPlainDate(e,t){return Ae(N.plainMonthDayToPlainDate(We,e,this,t))},toLocaleString(e,t,n){const[i,r]=Z(t,n,e)
return i.format(r)},toString:N.formatPlainMonthDayIso,toJSON:e=>N.formatPlainMonthDayIso(e),valueOf:l},{from:(e,t)=>ue(u(e,t))}),he={getOffsetNanosecondsFor:d,getPossibleInstantsFor(e,t,n){const i=[...t.call(e,Pe(N.createPlainDateTimeSlots(n,N.isoCalendarId)))].map((e=>ge(e).epochNanoseconds)),r=i.length
return r>1&&(i.sort(N.compareBigNanos),N.validateTimeZoneGap(N.bigNanoToNumber(N.diffBigNanos(i[0],i[r-1])))),i}},fe={getOffsetNanosecondsFor:d},[pe,me,ge]=i(N.InstantBranding,N.constructInstantSlots,ae,{add:(e,t)=>me(N.moveInstant(0,e,S(t))),subtract:(e,t)=>me(N.moveInstant(1,e,S(t))),until:(e,t,n)=>Qe(N.diffInstants(0,e,m(t),n)),since:(e,t,n)=>Qe(N.diffInstants(1,e,m(t),n)),round:(e,t)=>me(N.roundInstant(e,t)),equals:(e,t)=>N.instantsEqual(e,m(t)),toZonedDateTime(e,t){const n=N.requireObjectLike(t)
return st(N.instantToZonedDateTime(e,y(n.timeZone),R(n.calendar)))},toZonedDateTimeISO:(e,t)=>st(N.instantToZonedDateTime(e,y(t))),toLocaleString(e,t,n){const[i,r]=q(t,n,e)
return i.format(r)},toString:(e,t)=>N.formatInstantIso(y,p,e,t),toJSON:e=>N.formatInstantIso(y,p,e),valueOf:l},{from:e=>me(m(e)),fromEpochSeconds:e=>me(N.epochSecToInstant(e)),fromEpochMilliseconds:e=>me(N.epochMilliToInstant(e)),fromEpochMicroseconds:e=>me(N.epochMicroToInstant(e)),fromEpochNanoseconds:e=>me(N.epochNanoToInstant(e)),compare:(e,t)=>N.compareInstants(m(e),m(t))}),[ye,ve]=i("TimeZone",(e=>{const t=N.refineTimeZoneId(e)
return{branding:"TimeZone",id:t,native:N.queryNativeTimeZone(t)}}),{id:e=>e.id},{getPossibleInstantsFor:({native:e},t)=>e.getPossibleInstantsFor(w(t)).map((e=>me(N.createInstantSlots(e)))),getOffsetNanosecondsFor:({native:e},t)=>e.getOffsetNanosecondsFor(m(t).epochNanoseconds),getOffsetStringFor(e,t){const n=m(t).epochNanoseconds,i=h(this,fe).getOffsetNanosecondsFor(n)
return N.formatOffsetNano(i)},getPlainDateTimeFor(e,t,n=N.isoCalendarId){const i=m(t).epochNanoseconds,r=h(this,fe).getOffsetNanosecondsFor(i)
return Pe(N.createPlainDateTimeSlots(N.epochNanoToIso(i,r),R(n)))},getInstantFor(e,t,n){const i=w(t),r=N.refineEpochDisambigOptions(n),s=h(this)
return me(N.createInstantSlots(N.getSingleInstantFor(s,i,r)))},getNextTransition:({native:e},t)=>g(1,e,t),getPreviousTransition:({native:e},t)=>g(-1,e,t),equals(e,t){return!!N.isTimeZoneSlotsEqual(this,y(t))},toString:e=>e.id,toJSON:e=>e.id},{from(e){const t=y(e)
return"string"==typeof t?new ye(t):t}}),be=r(Object.keys(he)),[_e,we]=i(N.PlainTimeBranding,N.constructPlainTimeSlots,oe,{getISOFields:le,with(e,t,n){return we(N.plainTimeWithFields(this,s(t),n))},add:(e,t)=>we(N.movePlainTime(0,e,S(t))),subtract:(e,t)=>we(N.movePlainTime(1,e,S(t))),until:(e,t,n)=>Qe(N.diffPlainTimes(0,e,v(t),n)),since:(e,t,n)=>Qe(N.diffPlainTimes(1,e,v(t),n)),round:(e,t)=>we(N.roundPlainTime(e,t)),equals:(e,t)=>N.plainTimesEqual(e,v(t)),toZonedDateTime:(e,t)=>st(N.plainTimeToZonedDateTime(y,k,f,e,t)),toPlainDateTime:(e,t)=>Pe(N.plainTimeToPlainDateTime(e,k(t))),toLocaleString(e,t,n){const[i,r]=B(t,n,e)
return i.format(r)},toString:N.formatPlainTimeIso,toJSON:e=>N.formatPlainTimeIso(e),valueOf:l},{from:(e,t)=>we(v(e,t)),compare:(e,t)=>N.compareIsoTimeFields(v(e),v(t))}),[ke,Te,De]=i(N.PlainYearMonthBranding,N.bindArgs(N.constructPlainYearMonthSlots,R),{...ie,...te},{getISOFields:le,getCalendar:c,with(e,t,n){return Te(N.plainYearMonthWithFields(Ue,e,this,s(t),n))},add:(e,t,n)=>Te(N.movePlainYearMonth(Je,0,e,S(t),n)),subtract:(e,t,n)=>Te(N.movePlainYearMonth(Je,1,e,S(t),n)),until:(e,t,n)=>Qe(N.diffPlainYearMonth(Ke,0,e,_(t),n)),since:(e,t,n)=>Qe(N.diffPlainYearMonth(Ke,1,e,_(t),n)),equals:(e,t)=>N.plainYearMonthsEqual(e,_(t)),toPlainDate(e,t){return Ae(N.plainYearMonthToPlainDate(We,e,this,t))},toLocaleString(e,t,n){const[i,r]=Y(t,n,e)
return i.format(r)},toString:N.formatPlainYearMonthIso,toJSON:e=>N.formatPlainYearMonthIso(e),valueOf:l},{from:(e,t)=>Te(_(e,t)),compare:(e,t)=>N.compareIsoDateFields(_(e),_(t))}),[Se,Pe]=i(N.PlainDateTimeBranding,N.bindArgs(N.constructPlainDateTimeSlots,R),{...ie,...ee,...oe},{getISOFields:le,getCalendar:c,with(e,t,n){return Pe(N.plainDateTimeWithFields(We,e,this,s(t),n))},withCalendar:(e,t)=>Pe(N.slotsWithCalendar(e,R(t))),withPlainDate:(e,t)=>Pe(N.plainDateTimeWithPlainDate(e,k(t))),withPlainTime:(e,t)=>Pe(N.plainDateTimeWithPlainTime(e,b(t))),add:(e,t,n)=>Pe(N.movePlainDateTime(Ve,0,e,S(t),n)),subtract:(e,t,n)=>Pe(N.movePlainDateTime(Ve,1,e,S(t),n)),until:(e,t,n)=>Qe(N.diffPlainDateTimes(Ge,0,e,w(t),n)),since:(e,t,n)=>Qe(N.diffPlainDateTimes(Ge,1,e,w(t),n)),round:(e,t)=>Pe(N.roundPlainDateTime(e,t)),equals:(e,t)=>N.plainDateTimesEqual(e,w(t)),toZonedDateTime:(e,t,n)=>st(N.plainDateTimeToZonedDateTime(f,e,y(t),n)),toPlainDate:e=>Ae(N.createPlainDateSlots(e)),toPlainTime:e=>we(N.createPlainTimeSlots(e)),toPlainYearMonth(e){return Te(N.plainDateTimeToPlainYearMonth(Be,e,this))},toPlainMonthDay(e){return ue(N.plainDateTimeToPlainMonthDay(Ze,e,this))},toLocaleString(e,t,n){const[i,r]=$(t,n,e)
return i.format(r)},toString:N.formatPlainDateTimeIso,toJSON:e=>N.formatPlainDateTimeIso(e),valueOf:l},{from:(e,t)=>Pe(w(e,t)),compare:(e,t)=>N.compareIsoDateTimeFields(w(e),w(t))}),[Me,Ae,Re]=i(N.PlainDateBranding,N.bindArgs(N.constructPlainDateSlots,R),{...ie,...ee},{getISOFields:le,getCalendar:c,with(e,t,n){return Ae(N.plainDateWithFields(We,e,this,s(t),n))},withCalendar:(e,t)=>Ae(N.slotsWithCalendar(e,R(t))),add:(e,t,n)=>Ae(N.movePlainDate(Ve,0,e,S(t),n)),subtract:(e,t,n)=>Ae(N.movePlainDate(Ve,1,e,S(t),n)),until:(e,t,n)=>Qe(N.diffPlainDates(Ge,0,e,k(t),n)),since:(e,t,n)=>Qe(N.diffPlainDates(Ge,1,e,k(t),n)),equals:(e,t)=>N.plainDatesEqual(e,k(t)),toZonedDateTime(e,t){const n=!N.isObjectLike(t)||t instanceof ye?{timeZone:t}:t
return st(N.plainDateToZonedDateTime(y,v,f,e,n))},toPlainDateTime:(e,t)=>Pe(N.plainDateToPlainDateTime(e,b(t))),toPlainYearMonth(e){return Te(N.plainDateToPlainYearMonth(Be,e,this))},toPlainMonthDay(e){return ue(N.plainDateToPlainMonthDay(Ze,e,this))},toLocaleString(e,t,n){const[i,r]=z(t,n,e)
return i.format(r)},toString:N.formatPlainDateIso,toJSON:e=>N.formatPlainDateIso(e),valueOf:l},{from:(e,t)=>Ae(k(e,t)),compare:(e,t)=>N.compareIsoDateFields(k(e),k(t))}),Oe={fields:(e,t,n)=>[...t.call(e,n)]},Ce={dateFromFields:(e,t,n,i)=>Re(t.call(e,Object.assign(Object.create(null),n),i)),...Oe},Ee={yearMonthFromFields:(e,t,n,i)=>De(t.call(e,Object.assign(Object.create(null),n),i)),...Oe},xe={monthDayFromFields:(e,t,n,i)=>de(t.call(e,Object.assign(Object.create(null),n),i)),...Oe},Ie={mergeFields:(e,t,n,i)=>N.requireObjectLike(t.call(e,Object.assign(Object.create(null),n),Object.assign(Object.create(null),i)))},Fe={...Ce,...Ie},Ne={...Ee,...Ie},je={...xe,...Ie},qe={dateAdd:(e,t,n,i,r)=>Re(t.call(e,Ae(N.createPlainDateSlots(n,e)),Qe(N.createDurationSlots(i)),r))},Le={...qe,dateUntil:(e,t,n,i,r,s)=>et(t.call(e,Ae(N.createPlainDateSlots(n,e)),Ae(N.createPlainDateSlots(i,e)),Object.assign(Object.create(null),s,{largestUnit:N.unitNamesAsc[r]})))},$e={...qe,day:T},ze={...Le,day:T},Be=D(Ee),Ye=D(Ce),Ze=D(xe),Ue=D(Ne),We=D(Fe),He=D(je),Ve=D(qe),Ge=D(Le),Je=D($e),Ke=D(ze),[Xe,Qe,et]=i(N.DurationBranding,N.constructDurationSlots,{...se,blank:N.getDurationBlank},{with:(e,t)=>Qe(N.durationWithFields(e,t)),negated:e=>Qe(N.negateDuration(e)),abs:e=>Qe(N.absDuration(e)),add:(e,t,n)=>Qe(N.addDurations(P,Ge,f,0,e,S(t),n)),subtract:(e,t,n)=>Qe(N.addDurations(P,Ge,f,1,e,S(t),n)),round:(e,t)=>Qe(N.roundDuration(P,Ge,f,e,t)),total:(e,t)=>N.totalDuration(P,Ge,f,e,t),toLocaleString(e,t,n){return Intl.DurationFormat?new Intl.DurationFormat(t,n).format(this):N.formatDurationIso(e)},toString:N.formatDurationIso,toJSON:e=>N.formatDurationIso(e),valueOf:l},{from:e=>Qe(S(e)),compare:(e,t,n)=>N.compareDurations(P,Ve,f,S(e),S(t),n)}),tt={toString:e=>e.id,toJSON:e=>e.id,...Q,dateAdd:({id:e,native:t},n,i,r)=>Ae(N.createPlainDateSlots(t.dateAdd(k(n),S(i),r),e)),dateUntil:({native:e},t,n,i)=>Qe(N.createDurationSlots(e.dateUntil(k(t),k(n),N.refineDateDiffOptions(i)))),dateFromFields:({id:e,native:t},n,i)=>Ae(N.refinePlainDateBag(t,n,i,N.getRequiredDateFields(e))),yearMonthFromFields:({id:e,native:t},n,i)=>Te(N.refinePlainYearMonthBag(t,n,i,N.getRequiredYearMonthFields(e))),monthDayFromFields:({id:e,native:t},n,i)=>ue(N.refinePlainMonthDayBag(t,0,n,i,N.getRequiredMonthDayFields(e))),fields({native:e},t){const n=new Set(N.dateFieldNamesAlpha),i=[]
for(const r of t){if(N.requireString(r),!n.has(r))throw new RangeError(N.forbiddenField(r))
n.delete(r),i.push(r)}return e.fields(i)},mergeFields:({native:e},t,n)=>e.mergeFields(N.excludeUndefinedProps(N.requireNonNullish(t)),N.excludeUndefinedProps(N.requireNonNullish(n)))},[nt]=i("Calendar",(e=>{const t=N.refineCalendarId(e)
return{branding:"Calendar",id:t,native:N.createNativeStandardOps(t)}}),{id:e=>e.id},tt,{from(e){const t=R(e)
return"string"==typeof t?new nt(t):t}}),it=r(Object.keys(tt).slice(4)),[rt,st]=i(N.ZonedDateTimeBranding,N.bindArgs(N.constructZonedDateTimeSlots,R,y),{...ae,...ie,...C(ee),...C(oe),offset:e=>N.formatOffsetNano(E(e).offsetNanoseconds),offsetNanoseconds:e=>E(e).offsetNanoseconds,timeZoneId:e=>N.getId(e.timeZone),hoursInDay:e=>N.computeZonedHoursInDay(f,e)},{getISOFields:e=>N.buildZonedIsoFields(p,e),getCalendar:c,getTimeZone:({timeZone:e})=>"string"==typeof e?new ye(e):e,with(e,t,n){return st(N.zonedDateTimeWithFields(We,f,e,this,s(t),n))},withCalendar:(e,t)=>st(N.slotsWithCalendar(e,R(t))),withTimeZone:(e,t)=>st(N.slotsWithTimeZone(e,y(t))),withPlainDate:(e,t)=>st(N.zonedDateTimeWithPlainDate(f,e,k(t))),withPlainTime:(e,t)=>st(N.zonedDateTimeWithPlainTime(f,e,b(t))),add:(e,t,n)=>st(N.moveZonedDateTime(Ve,f,0,e,S(t),n)),subtract:(e,t,n)=>st(N.moveZonedDateTime(Ve,f,1,e,S(t),n)),until:(e,t,n)=>Qe(N.createDurationSlots(N.diffZonedDateTimes(Ge,f,0,e,O(t),n))),since:(e,t,n)=>Qe(N.createDurationSlots(N.diffZonedDateTimes(Ge,f,1,e,O(t),n))),round:(e,t)=>st(N.roundZonedDateTime(f,e,t)),startOfDay:e=>st(N.computeZonedStartOfDay(f,e)),equals:(e,t)=>N.zonedDateTimesEqual(e,O(t)),toInstant:e=>me(N.zonedDateTimeToInstant(e)),toPlainDateTime:e=>Pe(N.zonedDateTimeToPlainDateTime(p,e)),toPlainDate:e=>Ae(N.zonedDateTimeToPlainDate(p,e)),toPlainTime:e=>we(N.zonedDateTimeToPlainTime(p,e)),toPlainYearMonth(e){return Te(N.zonedDateTimeToPlainYearMonth(Be,e,this))},toPlainMonthDay(e){return ue(N.zonedDateTimeToPlainMonthDay(Ze,e,this))},toLocaleString(e,t,n={}){const[i,r]=L(t,n,e)
return i.format(r)},toString:(e,t)=>N.formatZonedDateTimeIso(p,e,t),toJSON:e=>N.formatZonedDateTimeIso(p,e),valueOf:l},{from:(e,t)=>st(O(e,t)),compare:(e,t)=>N.compareZonedDateTimes(O(e),O(t))}),ot=Object.defineProperties({},{...N.createStringTagDescriptors("Temporal.Now"),...N.createPropDescriptors({timeZoneId:()=>N.getCurrentTimeZoneId(),instant:()=>me(N.createInstantSlots(N.getCurrentEpochNano())),zonedDateTime:(e,t=N.getCurrentTimeZoneId())=>st(N.createZonedDateTimeSlots(N.getCurrentEpochNano(),y(t),R(e))),zonedDateTimeISO:(e=N.getCurrentTimeZoneId())=>st(N.createZonedDateTimeSlots(N.getCurrentEpochNano(),y(e),N.isoCalendarId)),plainDateTime:(e,t=N.getCurrentTimeZoneId())=>Pe(N.createPlainDateTimeSlots(N.getCurrentIsoDateTime(p(y(t))),R(e))),plainDateTimeISO:(e=N.getCurrentTimeZoneId())=>Pe(N.createPlainDateTimeSlots(N.getCurrentIsoDateTime(p(y(e))),N.isoCalendarId)),plainDate:(e,t=N.getCurrentTimeZoneId())=>Ae(N.createPlainDateSlots(N.getCurrentIsoDateTime(p(y(t))),R(e))),plainDateISO:(e=N.getCurrentTimeZoneId())=>Ae(N.createPlainDateSlots(N.getCurrentIsoDateTime(p(y(e))),N.isoCalendarId)),plainTimeISO:(e=N.getCurrentTimeZoneId())=>we(N.createPlainTimeSlots(N.getCurrentIsoDateTime(p(y(e)))))})}),at=Object.defineProperties({},{...N.createStringTagDescriptors("Temporal"),...N.createPropDescriptors({PlainYearMonth:ke,PlainMonthDay:ce,PlainDate:Me,PlainTime:_e,PlainDateTime:Se,ZonedDateTime:rt,Instant:pe,Calendar:nt,TimeZone:ye,Duration:Xe,Now:ot})}),lt=function(){const e=N.RawDateTimeFormat.prototype,t=Object.getOwnPropertyDescriptors(e),n=Object.getOwnPropertyDescriptors(N.RawDateTimeFormat),i=function(e,t={}){if(!(this instanceof i))return new i(e,t)
ct.set(this,((e,t={})=>{const n=new N.RawDateTimeFormat(e,t),i=n.resolvedOptions(),r=i.locale,s=N.pluckProps(Object.keys(t),i),o=N.memoize(F),a=(...e)=>{let t
const i=e.map(((e,n)=>{const i=K(e),r=(i||{}).branding
if(n&&t&&t!==r)throw new TypeError(N.mismatchingFormatTypes)
return t=r,i}))
return t?o(t)(r,s,...i):[n,...e]}
return a.rawFormat=n,a})(e,t))}
for(const r in t){const e=t[r],n=r.startsWith("format")&&x(r)
"function"==typeof e.value?e.value="constructor"===r?i:n||I(r):n&&(e.get=function(){return n.bind(this)})}return n.prototype.value=Object.create(e,t),Object.defineProperties(i,n),i}(),ct=new WeakMap,ut=Object.defineProperties(Object.create(Intl),N.createPropDescriptors({DateTimeFormat:lt}))
t.DateTimeFormat=lt,t.IntlExtended=ut,t.Temporal=at,t.toTemporalInstant=function(){return me(N.createInstantSlots(N.numberToBigNano(this.valueOf(),N.nanoInMilli)))}},9212:(e,t)=>{function n(e,t,n,s,o){return i(t,r(e,t),n,s,o)}function i(e,t,n,i,r,s){const o=_(t,n,i)
if(r&&t!==o)throw new RangeError(Yi(e,t,n,i,s))
return o}function r(e,t){const n=e[t]
if(void 0===n)throw new TypeError(Ui(t))
return n}function s(e){return null!==e&&/object|function/.test(typeof e)}function o(e,t=Map){const n=new t
return(t,...i)=>{if(n.has(t))return n.get(t)
const r=e(t,...i)
return n.set(t,r),r}}function a(e,t){return c((e=>({value:e,configurable:1,writable:!t})),e)}function l(e,t){const n={}
let i=e.length
for(const r of t)n[e[--i]]=r
return n}function c(e,t,n){const i={}
for(const r in t)i[r]=e(t[r],r,n)
return i}function u(e,t,n){const i={}
for(let r=0;r<t.length;r++){const s=t[r]
i[s]=e(s,r,n)}return i}function d(e,t){const n={}
for(const i of e)n[i]=t[i]
return n}function h(e,t){const n={}
for(const i in t)e.has(i)||(n[i]=t[i])
return n}function f(e,t,n){for(const i of e)if(t[i]!==n[i])return 0
return 1}function p(e,t,n){const i={...n}
for(let r=0;r<t;r++)i[e[r]]=0
return i}function m(e,...t){return(...n)=>e(...t,...n)}function g(e){return e[0].toUpperCase()+e.substring(1)}function y(e){return e.slice().sort()}function v(e,t){return String(t).padStart(e,"0")}function b(e,t){return Math.sign(e-t)}function _(e,t,n){return Math.min(Math.max(e,t),n)}function w(e,t){return[Math.floor(e/t),k(e,t)]}function k(e,t){return(e%t+t)%t}function T(e,t){return[D(e,t),S(e,t)]}function D(e,t){return Math.trunc(e/t)||0}function S(e,t){return e%t||0}function P(e){return.5===Math.abs(e%1)}function M(e,t,n){let i=0,r=0
for(let a=0;a<=t;a++){const t=e[n[a]],s=xr[a],o=Er/s,[l,c]=T(t,o)
i+=c*s,r+=l}const[s,o]=T(i,Er)
return[r+s,o]}function A(e,t,n){const i={}
for(let r=t;r>=0;r--){const t=xr[r]
i[n[r]]=D(e,t),e=S(e,t)}return i}function R(e){return F(O(e))}function O(e){return I(rs(e))}function C(e,t){if(null==t)throw new RangeError(Ui(e))
return t}function E(e){if(!s(e))throw new TypeError(Bi)
return e}function x(e,t,n=e){if(typeof t!==e)throw new TypeError(Zi(n,t))
return t}function I(e,t="number"){if(!Number.isInteger(e))throw new RangeError(Ni(t,e))
return e||0}function F(e,t="number"){if(e<=0)throw new RangeError(ji(t,e))
return e}function N(e){if("symbol"==typeof e)throw new TypeError(zi)
return String(e)}function j(e,t){return s(e)?String(e):ns(e,t)}function q(e){if("string"==typeof e)return BigInt(e)
if("bigint"!=typeof e)throw new TypeError($i(e))
return e}function L(e,t="number"){if("bigint"==typeof e)throw new TypeError(Li(t))
if(e=Number(e),!Number.isFinite(e))throw new RangeError(qi(t,e))
return e}function $(e,t){return Math.trunc(L(e,t))||0}function z(e,t){return I(L(e,t),t)}function B(e,t){return F($(e,t),t)}function Y(e,t){let[n,i]=T(t,Er),r=e+n
const s=Math.sign(r)
return s&&s===-Math.sign(i)&&(r-=s,i+=s*Er),[r,i]}function Z(e,t,n=1){return Y(e[0]+t[0]*n,e[1]+t[1]*n)}function U(e,t){return Y(e[0],e[1]+t)}function W(e,t){return Z(t,e,-1)}function H(e,t){return b(e[0],t[0])||b(e[1],t[1])}function V(e,t,n){return-1===H(e,t)||1===H(e,n)}function G(e,t=1){const n=BigInt(Er/t)
return[Number(e/n),Number(e%n)*t]}function J(e,t=1){const n=Er/t,[i,r]=T(e,n)
return[i,r*t]}function K(e,t=1){const[n,i]=e,r=Math.floor(i/t),s=Er/t
return BigInt(n)*BigInt(s)+BigInt(r)}function X(e,t=1,n){const[i,r]=e,[s,o]=T(r,t)
return i*(Er/t)+(s+(n?o/t:0))}function Q(e,t,n=w){const[i,r]=e,[s,o]=n(r,t)
return[i*(Er/t)+s,o]}function ee(e,t){const n=e.formatToParts(t),i={}
for(const r of n)i[r.type]=r.value
return i}function te(e){return n(e,"isoYear",As,Ms,1),e.isoYear===As?n(e,"isoMonth",4,12,1):e.isoYear===Ms&&n(e,"isoMonth",1,9,1),e}function ne(e){return ie({...e,...ws,isoHour:12}),e}function ie(e){const t=n(e,"isoYear",As,Ms,1),i=t===As?1:t===Ms?-1:0
return i&&re(ue({...e,isoDay:e.isoDay+i,isoNanosecond:e.isoNanosecond-i})),e}function re(e){if(!e||V(e,Ps,Ss))throw new RangeError(fr)
return e}function se(e){return M(e,5,ms)[1]}function oe(e){const[t,n]=w(e,Er)
return[A(n,5,ms),t]}function ae(e){return le(e)[0]}function le(e){return Q(e,Rr)}function ce(e){return fe(e.isoYear,e.isoMonth,e.isoDay,e.isoHour,e.isoMinute,e.isoSecond,e.isoMillisecond)}function ue(e){const t=ce(e)
if(void 0!==t){const[n,i]=T(t,Sr)
return[n,i*Ar+(e.isoMicrosecond||0)*Mr+(e.isoNanosecond||0)]}}function de(e,t){const[n,i]=oe(se(e)-t)
return re(ue({...e,isoDay:e.isoDay+i,...n}))}function he(...e){return fe(...e)/Pr}function fe(...e){const[t,n]=pe(...e),i=t.valueOf()
if(!isNaN(i))return i-n*Sr}function pe(e,t=1,n=1,i=0,r=0,s=0,o=0){const a=e===As?1:e===Ms?-1:0,l=new Date
return l.setUTCHours(i,r,s,o),l.setUTCFullYear(e,t-1,n+a),[l,a]}function me(e,t){let[n,i]=U(e,t)
i<0&&(i+=Er,n-=1)
const[r,s]=w(i,Ar),[o,a]=w(s,Mr)
return ge(n*Sr+r,o,a)}function ge(e,t=0,n=0){const i=Math.ceil(Math.max(0,Math.abs(e)-Ds)/Sr)*Math.sign(e),r=new Date(e-i*Sr)
return l(ys,[r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate()+i,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds(),t,n])}function ye(e){return[e.isoYear,e.isoMonth,e.isoDay]}function ve(){return Cs}function be(e,t){switch(t){case 2:return we(e)?29:28
case 4:case 6:case 9:case 11:return 30}return 31}function _e(e){return we(e)?366:365}function we(e){return e%4==0&&(e%100!=0||e%400==0)}function ke(e){const[t,n]=pe(e.isoYear,e.isoMonth,e.isoDay)
return k(t.getUTCDay()-n,7)||7}function Te({isoYear:e}){return e<1?["bce",1-e]:["ce",e]}function De(e){return Se(e),Ae(e,1),e}function Se(e){return Me(e,1),e}function Pe(e){return f(gs,e,Me(e))}function Me(e,t){const{isoYear:i}=e,r=n(e,"isoMonth",1,ve(),t)
return{isoYear:i,isoMonth:r,isoDay:n(e,"isoDay",1,be(i,r),t)}}function Ae(e,t){return l(ms,[n(e,"isoHour",0,23,t),n(e,"isoMinute",0,59,t),n(e,"isoSecond",0,59,t),n(e,"isoMillisecond",0,999,t),n(e,"isoMicrosecond",0,999,t),n(e,"isoNanosecond",0,999,t)])}function Re(e){return void 0===e?0:Bs(E(e))}function Oe(e,t=0){e=ze(e)
const n=Ys(e),i=Zs(e,t)
return[Bs(e),i,n]}function Ce(e){return Ys(ze(e))}function Ee(e,t,n,i=9,r=0,s=4){t=ze(t)
let o=$s(t,i,r),a=qe(t),l=Vs(t,s)
const c=Ls(t,i,r,1)
return null==o?o=Math.max(n,c):He(o,c),a=Le(a,c,1),e&&(l=(e=>e<4?(e+2)%4:e)(l)),[o,c,a,l]}function xe(e,t=6,n){let i=qe(e=Be(e,Is))
const r=Vs(e,7)
let s=Ls(e,t)
return s=C(Is,s),i=Le(i,s,void 0,n),[s,i,r]}function Ie(e){return Us(ze(e))}function Fe(e,t){return Ne(ze(e),t)}function Ne(e,t=4){const n=$e(e)
return[Vs(e,4),...je(Ls(e,t),n)]}function je(e,t){return null!=e?[xr[e],e<4?9-3*e:-1]:[void 0===t?1:10**(9-t),t]}function qe(e){const t=e[Fs]
return void 0===t?1:$(t,Fs)}function Le(e,t,n,r){const s=r?Er:xr[t+1]
if(s){const n=xr[t]
if(s%((e=i(Fs,e,1,s/n-(r?0:1),1))*n))throw new RangeError(Zi(Fs,e))}else e=i(Fs,e,1,n?10**9:1,1)
return e}function $e(e){let t=e[Ns]
if(void 0!==t){if("number"!=typeof t){if("auto"===N(t))return
throw new RangeError(Zi(Ns,t))}t=i(Ns,Math.floor(t),0,9,1)}return t}function ze(e){return void 0===e?{}:E(e)}function Be(e,t){return"string"==typeof e?{[t]:e}:E(e)}function Ye(e){if(void 0!==e){if(s(e))return Object.assign(Object.create(null),e)
throw new TypeError(Bi)}}function Ze(e,t){return e&&Object.assign(Object.create(null),e,{overflow:qs[t]})}function Ue(e,t,n=9,r=0,s){let o=t[e]
if(void 0===o)return s?r:void 0
if(o=N(o),"auto"===o)return s?r:null
let a=Tr[o]
if(void 0===a&&(a=ds[o]),void 0===a)throw new RangeError(Gi(e,o,Tr))
return i(e,a,r,n,1,Dr),a}function We(e,t,n,i=0){const r=n[e]
if(void 0===r)return i
const s=N(r),o=t[s]
if(void 0===o)throw new RangeError(Gi(e,s,t))
return o}function He(e,t){if(t>e)throw new RangeError(gr)}function Ve(e){return{branding:to,epochNanoseconds:e}}function Ge(e,t,n){return{branding:eo,calendar:n,timeZone:t,epochNanoseconds:e}}function Je(e,t=e.calendar){return{branding:Xs,calendar:t,...d(_s,e)}}function Ke(e,t=e.calendar){return{branding:Ks,calendar:t,...d(vs,e)}}function Xe(e,t=e.calendar){return{branding:Gs,calendar:t,...d(vs,e)}}function Qe(e,t=e.calendar){return{branding:Js,calendar:t,...d(vs,e)}}function et(e){return{branding:Qs,...d(bs,e)}}function tt(e){return{branding:no,sign:nn(e),...d(as,e)}}function nt(e){return Q(e.epochNanoseconds,Ar)[0]}function it(e){return e.epochNanoseconds}function rt(e){return"string"==typeof e?e:ns(e.id)}function st(e,t){return e===t||rt(e)===rt(t)}function ot(e,t){return X(on(e),xr[t],1)}function at(e,t,n,i,r,s,o){const a=os[n],l={...t,[a]:t[a]+i},c=o(e,r,t),u=o(e,r,l)
return[s(c),s(u)]}function lt(e,t,n){const i=X(W(t,n))
if(!i)throw new RangeError(sr)
return X(W(t,e))/i}function ct(e,t,n,i){return ut(e,ft(t,n),i)}function ut(e,t,n){const[i,r]=dt(e,t,n)
return ie({...Ht(e,r),...i})}function dt(e,t,n){return oe(_t(se(e),t,n))}function ht(e){return _t(e,Or,7)}function ft(e,t){return xr[e]*t}function pt(e){const t=mt(e)
return[t,Ht(t,1)]}function mt(e){return ks(6,e)}function gt(e,t,n){const i=Math.min(un(e),6)
return an(bt(on(e,i),t,n),i)}function yt(e,t,n,i,r,s,o,a,l,c){if(0===i&&1===r)return e
const u=Qt(i,a)?Xt(a)&&i<6&&n>=6?Tt:kt:Dt
let[d,h,f]=u(e,t,n,i,r,s,o,a,l,c)
return f&&7!==i&&(d=((e,t,n,i,r,s,o,a)=>{const l=nn(e)
for(let c=i+1;c<=n;c++){if(7===c&&7!==n)continue
const i=ps(c,e)
i[os[c]]+=l
const u=X(W(o(a(r,s,i)),t))
if(u&&Math.sign(u)!==l)break
e=i}return e})(d,h,n,Math.max(6,i),o,a,l,c)),d}function vt(e,t,n,i,r){if(6===t){const t=(e=>e[0]+e[1]/Er)(e)
return[_t(t,n,i),0]}return bt(e,ft(t,n),i,r)}function bt(e,t,n,i){let[r,s]=e
i&&s<0&&(s+=Er,r-=1)
const[o,a]=w(_t(s,t,n),Er)
return Y(r+o,a)}function _t(e,t,n){return wt(e/t,n)*t}function wt(e,t){return io[t](e)}function kt(e,t,n,i,r,s){const o=nn(e),a=on(e),l=vt(a,i,r,s),c=W(a,l),u=Math.sign(l[0]-a[0])===o,d=an(l,Math.min(n,6))
return[{...e,...d},Z(t,c),u]}function Tt(e,t,n,i,r,s,o,a,l,c){const u=nn(e),d=X(on(e,5)),h=ft(i,r)
let f=_t(d,h,s)
const[p,m]=at(o,{...e,...fs},6,u,a,l,c),g=f-X(W(p,m))
let y=0
g&&Math.sign(g)!==u?t=U(p,f):(y+=u,f=_t(g,h,s),t=U(m,f))
const v=ln(f)
return[{...e,...v,days:e.days+y},t,Boolean(y)]}function Dt(e,t,n,i,r,s,o,a,l,c){const u=nn(e),d=os[i],h=ps(i,e)
7===i&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)})
const f=D(e[d],r)*r
h[d]=f
const[p,m]=at(o,h,i,r*u,a,l,c),g=f+lt(t,p,m)*u*r,y=_t(g,r,s),v=Math.sign(y-g)===u
return h[d]=y,[h,v?m:p,v]}function St(e,t,n,i){const r=rt(e),s=i>1||0===i&&r!==Xr
return 1===i?r===Xr?t(n):At(n):s?At(n)+It(r,2===i):t(n)}function Pt(e){const t=[]
for(const n in e){const i=e[n]
i&&t.push(i,n)}return t.join("")}function Mt(e,t){return At(e)+"T"+Ct(e,t)}function At(e){return Rt(e)+"-"+kr(e.isoDay)}function Rt(e){const{isoYear:t}=e
return(t<0||t>9999?Nt(t)+v(6,Math.abs(t)):v(4,t))+"-"+kr(e.isoMonth)}function Ot(e){return kr(e.isoMonth)+"-"+kr(e.isoDay)}function Ct(e,t){const n=[kr(e.isoHour),kr(e.isoMinute)]
return-1!==t&&n.push(kr(e.isoSecond)+((e,t,n,i)=>Ft(e*Ar+t*Mr+n,i))(e.isoMillisecond,e.isoMicrosecond,e.isoNanosecond,t)),n.join(":")}function Et(e,t=0){if(1===t)return""
const[n,i]=w(Math.abs(e),Cr),[r,s]=w(i,Or),[o,a]=w(s,Rr)
return Nt(e)+kr(n)+":"+kr(r)+(o||a?":"+kr(o)+Ft(a):"")}function xt(e,t){if(1!==t){const n=rt(e)
if(t>1||0===t&&n!==Xr)return It(n,2===t)}return""}function It(e,t){return"["+(t?"!":"")+"u-ca="+e+"]"}function Ft(e,t){let n=v(9,e)
return n=void 0===t?n.replace(lo,""):n.slice(0,t),n?"."+n:""}function Nt(e){return e<0?"-":"+"}function jt(e,t){return e||t?e.toLocaleString("fullwide",{useGrouping:0}):""}function qt(e,t,n,i=0,r=0,s,o){if(void 0!==n&&1===i&&(1===i||o))return de(t,n)
const a=e.getPossibleInstantsFor(t)
if(void 0!==n&&3!==i){const e=((e,t,n,i)=>{const r=ue(t)
i&&(n=ht(n))
for(const s of e){let e=X(W(s,r))
if(i&&(e=ht(e)),e===n)return s}})(a,t,n,s)
if(void 0!==e)return e
if(0===i)throw new RangeError(dr)}return o?ue(t):Lt(e,t,r,a)}function Lt(e,t,n=0,i=e.getPossibleInstantsFor(t)){if(1===i.length)return i[0]
if(1===n)throw new RangeError(hr)
if(i.length)return i[3===n?1:0]
const r=ue(t),s=((e,t)=>{const n=e.getOffsetNanosecondsFor(U(t,-Er))
return zt(e.getOffsetNanosecondsFor(U(t,Er))-n)})(e,r),o=s*(2===n?-1:1)
return(i=e.getPossibleInstantsFor(me(r,o)))[2===n?0:i.length-1]}function $t(e){if(Math.abs(e)>=Er)throw new RangeError(cr)
return e}function zt(e){if(e>Er)throw new RangeError(ur)
return e}function Bt(e,t,n,i,r){const s=on(i,5)
let o=n.epochNanoseconds
if(cn(i)){const a=co(n,e)
o=Z(Lt(e,{...Zt(t,a,{...i,...fs},r),...d(ms,a)}),s)}else o=Z(o,s),Re(r)
return{epochNanoseconds:re(o)}}function Yt(e,t,n,i){const[r,s]=Wt(t,n)
return ie({...Zt(e,t,{...n,...fs,days:n.days+s},i),...r})}function Zt(e,t,n,i){if(n.years||n.months||n.weeks)return e.dateAdd(t,n,i)
Re(i)
const r=n.days+on(n,5)[0]
return r?ne(Ht(t,r)):t}function Ut(e,t,n=1){return Ht(t,n-e.day(t))}function Wt(e,t){const[n,i]=on(t,5),[r,s]=oe(se(e)+i)
return[r,n+s]}function Ht(e,t){return t?{...e,...ge(ce(e)+t*Sr)}:e}function Vt(e,t,n){const i=e(n.calendar)
return Xt(n)?[n,i,t(n.timeZone)]:[{...n,...ws},i]}function Gt(e){return e?it:ue}function Jt(e){return e?m(Bt,e):Yt}function Kt(e){return e?m(zn,e):Bn}function Xt(e){return e&&e.epochNanoseconds}function Qt(e,t){return e<=6-(Xt(t)?1:0)}function en(e){return tt(tn(e))}function tn(e){const t={}
for(const n of os)t[n]=-1*e[n]||0
return t}function nn(e,t=os){let n=0
for(const i of t){const t=Math.sign(e[i])
if(t){if(n&&n!==t)throw new RangeError(mr)
n=t}}return n}function rn(e){for(const t of us)i(t,e[t],-uo,uo,1)
return sn(X(on(e),Rr)),e}function sn(e){if(!Number.isSafeInteger(e))throw new RangeError(pr)}function on(e,t=6){return M(e,t,os)}function an(e,t=6){const[n,i]=e,r=A(i,t,os)
if(r[os[t]]+=n*(Er/xr[t]),!Number.isFinite(r[os[t]]))throw new RangeError(fr)
return r}function ln(e,t=5){return A(e,t,os)}function cn(e){return Boolean(nn(e,cs))}function un(e){let t=9
for(;t>0&&!e[os[t]];t--);return t}function dn(e,t){return[e,t]}function hn(e){const t=Math.floor(e/so)*so
return[t,t+so]}function fn(e){const t=Tn(e)
if(void 0===t)throw new RangeError(yr(e))
return t}function pn(e){const t=_n(ns(e))
if(!t||t.hasZ)throw new RangeError(yr(e))
return Ke(t.hasTime?yn(t):vn(t))}function mn(e){if(e.calendar!==Xr)throw new RangeError(vr(e.calendar))}function gn(e,t,n=0,i=0){const r=Cn(e.timeZone),s=ho(r)
return Ge(qt(s,De(e),t,n,i,!s.offsetNano,e.hasZ),r,li(e.calendar))}function yn(e){return bn(ie(De(e)))}function vn(e){return bn(ne(Se(e)))}function bn(e){return{...e,calendar:li(e.calendar)}}function _n(e){const t=_o.exec(e)
return t?(e=>{const t=e[10],n="Z"===(t||"").toUpperCase()
return{isoYear:Dn(e),isoMonth:parseInt(e[4]),isoDay:parseInt(e[5]),...Sn(e.slice(5)),...Pn(e[16]),hasTime:Boolean(e[6]),hasZ:n,offset:n?void 0:t}})(t):void 0}function wn(e){const t=vo.exec(e)
return t?(e=>({isoYear:Dn(e),isoMonth:parseInt(e[4]),isoDay:1,...Pn(e[5])}))(t):void 0}function kn(e){const t=bo.exec(e)
return t?(e=>({isoYear:Os,isoMonth:parseInt(e[1]),isoDay:parseInt(e[2]),...Pn(e[3])}))(t):void 0}function Tn(e,t){const n=ko.exec(e)
return n?((e,t)=>{const n=e[4]||e[5]
if(t&&n)throw new RangeError(vr(n))
return $t((On(e[2])*Cr+On(e[3])*Or+On(e[4])*Rr+Mn(e[5]||""))*Rn(e[1]))})(n,t):void 0}function Dn(e){const t=Rn(e[1]),n=parseInt(e[2]||e[3])
if(t<0&&!n)throw new RangeError(vr(-0))
return t*n}function Sn(e){const t=On(e[3])
return{...oe(Mn(e[4]||""))[0],isoHour:On(e[1]),isoMinute:On(e[2]),isoSecond:60===t?59:t}}function Pn(e){let t,n
const i=[]
if(e.replace(To,((e,r,s)=>{const o=Boolean(r),[a,l]=s.split("=").reverse()
if(l){if("u-ca"===l)i.push(a),t||(t=o)
else if(o||/[A-Z]/.test(l))throw new RangeError(vr(e))}else{if(n)throw new RangeError(vr(e))
n=a}return""})),i.length>1&&t)throw new RangeError(vr(e))
return{timeZone:n,calendar:i[0]||Xr}}function Mn(e){return parseInt(e.padEnd(9,"0"))}function An(e){return new RegExp(`^${e}$`,"i")}function Rn(e){return e&&"+"!==e?-1:1}function On(e){return void 0===e?0:parseInt(e)}function Cn(e){const t=xn(e)
return"number"==typeof t?Et(t):t?(e=>{if(Po.test(e))throw new RangeError(lr)
return e.toLowerCase().split("/").map(((e,t)=>(e.length<=3||/\d/.test(e))&&!/etc|yap/.test(e)?e.toUpperCase():e.replace(/baja|dumont|[a-z]+/g,((e,n)=>e.length<=2&&!t||"in"===e||"chat"===e?e.toUpperCase():e.length>2||!n?g(e).replace(/island|noronha|murdo|rivadavia|urville/,g):e)))).join("/")})(e):ro}function En(e){const t=xn(e)
return"number"==typeof t?t:t?t.resolvedOptions().timeZone:ro}function xn(e){const t=Tn(e=e.toUpperCase(),1)
return void 0!==t?t:e!==ro?So(e):void 0}function In(e,t){return H(e.epochNanoseconds,t.epochNanoseconds)}function Fn(e,t){return H(e.epochNanoseconds,t.epochNanoseconds)}function Nn(e,t){return jn(e,t)||qn(e,t)}function jn(e,t){return b(ce(e),ce(t))}function qn(e,t){return b(se(e),se(t))}function Ln(e,t){if(e===t)return 1
const n=rt(e),i=rt(t)
if(n===i)return 1
try{return En(n)===En(i)}catch(e){}}function $n(e,t,n,i,r,s,o,a,l){const c=ue(n),u=ue(i)
let d
if(H(u,c))if(6===r)d=Un(c,u,r,s,o,a)
else{const e=t()
d=e.dateUntil(n,i,r,l),6===s&&1===o||(d=yt(d,u,r,s,o,a,e,n,ue,Zt))}else d=hs
return tt(e?tn(d):d)}function zn(e,t,n,i,r,s){const o=H(i.epochNanoseconds,n.epochNanoseconds)
return o?r<6?Wn(n.epochNanoseconds,i.epochNanoseconds,r):Yn(t,e,n,i,o,r,s):hs}function Bn(e,t,n,i,r){const s=ue(t),o=ue(n),a=H(o,s)
return a?i<=6?Wn(s,o,i):Zn(e,t,n,a,i,r):hs}function Yn(e,t,n,i,r,s,o){const[a,l,c]=((e,t,n,i)=>{function r(){return h={...Ht(a,c++*-i),...o},f=Lt(e,h),H(l,f)===-i}const s=co(t,e),o=d(ms,s),a=co(n,e),l=n.epochNanoseconds
let c=0
const u=Gn(s,a)
let h,f
if(Math.sign(u)===-i&&c++,r()&&(-1===i||r()))throw new RangeError(sr)
const p=X(W(f,l))
return[s,h,p]})(t,n,i,r)
var u,h
return{...6===s?(u=a,h=l,{...hs,days:Hn(u,h)}):e.dateUntil(a,l,s,o),...ln(c)}}function Zn(e,t,n,i,r,s){const[o,a,l]=((e,t,n)=>{let i=t,r=Gn(e,t)
return Math.sign(r)===-n&&(i=Ht(t,-n),r+=Er*n),[e,i,r]})(t,n,i)
return{...e.dateUntil(o,a,r,s),...ln(l)}}function Un(e,t,n,i,r,s){return{...hs,...an(vt(W(e,t),i,r,s),n)}}function Wn(e,t,n){return{...hs,...an(W(e,t),n)}}function Hn(e,t){return Vn(ce(e),ce(t))}function Vn(e,t){return Math.trunc((t-e)/Sr)}function Gn(e,t){return se(t)-se(e)}function Jn(e,t){if(!st(e,t))throw new RangeError(or)
return e}function Kn(e){return o((t=>{const n=ce(t)
return e(n)}),WeakMap)}function Xn(e){const t=e(0).year-Rs
return o((n=>{let i,r=fe(n-t)
const s=[],o=[]
do{r+=400*Sr}while((i=e(r)).year<=n)
do{r+=(1-i.day)*Sr,i.year===n&&(s.push(r),o.push(i.monthString)),r-=Sr}while((i=e(r)).year>=n)
return{monthEpochMillis:s.reverse(),monthStringToIndex:_r(o.reverse())}}))}function Qn(e,t){let n,i,r=ei(e)
if(e.era){const s=es[t]
void 0!==s&&(n="islamic"===t?"ah":e.era.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,""),"bc"===n||"b"===n?n="bce":"ad"!==n&&"a"!==n||(n="ce"),i=r,r=gi(i,s[n]||0))}return{era:n,eraYear:i,year:r}}function ei(e){return parseInt(e.relatedYear||e.year)}function ti(e){const{year:t,monthString:n,day:i}=this.queryFields(e),{monthStringToIndex:r}=this.queryYearData(t)
return[t,r[n]+1,i]}function ni(e,t=1,n=1){return this.queryYearData(e).monthEpochMillis[t-1]+(n-1)*Sr}function ii(e){const t=ai(this,e),n=ai(this,e-1),i=t.length
if(i>n.length){const e=vi(this)
if(e<0)return-e
for(let r=0;r<i;r++)if(t[r]!==n[r])return r+1}}function ri(e){return Vn(ni.call(this,e),ni.call(this,e+1))}function si(e,t){const{monthEpochMillis:n}=this.queryYearData(e)
let i=t+1,r=n
return i>n.length&&(i=1,r=this.queryYearData(e+1).monthEpochMillis),Vn(n[t-1],r[i-1])}function oi(e){return this.queryYearData(e).monthEpochMillis.length}function ai(e,t){return Object.keys(e.queryYearData(t).monthStringToIndex)}function li(e){if((e=e.toLowerCase())!==Xr&&e!==Qr&&ci(e)!==ci(Ao(e).resolvedOptions().calendar))throw new RangeError(ar(e))
return e}function ci(e){return"islamicc"===e&&(e="islamic"),e.split("-")[0]}function ui(e){return this.weekParts(e)[0]}function di(e){return this.weekParts(e)[1]}function hi(e){const[t]=this.dateParts(e)
return Vn(this.epochMilli(t),ce(e))+1}function fi(e){const t=Ro.exec(e)
if(!t)throw new RangeError(tr(e))
return[parseInt(t[1]),Boolean(t[2])]}function pi(e,t,n){return e+(t||n&&e>=n?1:0)}function mi(e,t){return e-(t&&e>=t?1:0)}function gi(e,t){return(t+e)*(Math.sign(t)||1)||0}function yi(e){return es[bi(e)]}function vi(e){return ts[bi(e)]}function bi(e){return ci(e.id||Xr)}function _i(e,t,n,i=[],r=[]){return wi(t,[...e.fields(n),...r].sort(),i)}function wi(e,t,n,i=!n){const r={}
let s,o=0
for(const a of t){if(a===s)throw new RangeError(Hi(a))
if("constructor"===a||"__proto__"===a)throw new RangeError(Wi(a))
let t=e[a]
if(void 0!==t)o=1,Oo[a]&&(t=Oo[a](t,a)),r[a]=t
else if(n){if(n.includes(a))throw new TypeError(Ui(a))
r[a]=Kr[a]}s=a}if(i&&!o)throw new TypeError(Vi(t))
return r}function ki(e,t){return Ae(Co({...Kr,...e}),t)}function Ti(e,t,n,i,r=[],s=[]){const o=[...e.fields(i),...r].sort()
let a=wi(t,o,s)
const l=wi(n,o)
return a=e.mergeFields(a,l),wi(a,o,[])}function Di(e,t){const n=_i(e,t,Jr)
return e.monthDayFromFields(n)}function Si(e,t,n){const i=_i(e,t,Hr)
return e.yearMonthFromFields(i,n)}function Pi(e,t,n,i,r){t=d(n=e.fields(n),t),i=wi(i,r=e.fields(r),[])
let s=e.mergeFields(t,i)
return s=wi(s,[...n,...r].sort(),[]),e.dateFromFields(s)}function Mi(e,t){let{era:n,eraYear:i,year:r}=t
const s=yi(e)
if(void 0!==n||void 0!==i){if(void 0===n||void 0===i)throw new TypeError(Ki)
if(!s)throw new RangeError(Ji)
const e=s[n]
if(void 0===e)throw new RangeError(Qi(n))
const t=gi(i,e)
if(void 0!==r&&r!==t)throw new RangeError(Xi)
r=t}else if(void 0===r)throw new TypeError(er(s))
return r}function Ai(e,t,n,r){let{month:s,monthCode:o}=t
if(void 0!==o){const t=((e,t,n,i)=>{const r=e.leapMonth(n),[s,o]=fi(t)
let a=pi(s,o,r)
if(o){const t=vi(e)
if(void 0===t)throw new RangeError(rr)
if(t>0){if(a>t)throw new RangeError(rr)
if(void 0===r){if(1===i)throw new RangeError(rr)
a--}}else{if(a!==-t)throw new RangeError(rr)
if(void 0===r&&1===i)throw new RangeError(rr)}}return a})(e,o,n,r)
if(void 0!==s&&s!==t)throw new RangeError(nr)
s=t,r=1}else if(void 0===s)throw new TypeError(ir)
return i("month",s,1,e.monthsInYearPart(n),r)}function Ri(e,t,i,r,s){return n(t,"day",1,e.daysInMonthParts(r,i),s)}function Oi(e,t,n,i){let r=0
const s=[]
for(const o of n)void 0!==t[o]?r=1:s.push(o)
if(Object.assign(e,t),r)for(const o of i||s)delete e[o]}function Ci(e,t){if(e===t)return e
const n=rt(e),i=rt(t)
if(n===i||n===Xr)return t
if(i===Xr)return e
throw new RangeError(or)}function Ei(e,t,n){const i=new Set(n)
return r=>(((e,t)=>{for(const n of t)if(n in e)return 1
return 0})(r=h(i,r),e)||Object.assign(r,t),n&&(r.timeZone=ro,["full","long"].includes(r.timeStyle)&&(r.timeStyle="medium")),r)}function xi(e,t,n,i){if(n=i(n),e){if(void 0!==n.timeZone)throw new TypeError(br)
n.timeZone=e}return new Ts(t,n)}function Ii(e,t,n){const[,i,r]=e
return n.map((e=>(e.calendar&&((e,t,n)=>{if((n||e!==Xr)&&e!==t)throw new RangeError(or)})(rt(e.calendar),t.calendar,r),i(e,t))))}function Fi(){return J(Date.now(),Ar)}const Ni=(e,t)=>`Non-integer ${e}: ${t}`,ji=(e,t)=>`Non-positive ${e}: ${t}`,qi=(e,t)=>`Non-finite ${e}: ${t}`,Li=e=>`Cannot convert bigint to ${e}`,$i=e=>`Invalid bigint: ${e}`,zi="Cannot convert Symbol to string",Bi="Invalid object",Yi=(e,t,n,i,r)=>r?Yi(e,r[t],r[n],r[i]):Zi(e,t)+`; must be between ${n}-${i}`,Zi=(e,t)=>`Invalid ${e}: ${t}`,Ui=e=>`Missing ${e}`,Wi=e=>`Invalid field ${e}`,Hi=e=>`Duplicate field ${e}`,Vi=e=>"No valid fields: "+e.join(),Gi=(e,t,n)=>Zi(e,t)+"; must be "+Object.keys(n).join(),Ji="Forbidden era/eraYear",Ki="Mismatching era/eraYear",Xi="Mismatching year/eraYear",Qi=e=>`Invalid era: ${e}`,er=e=>"Missing year"+(e?"/era/eraYear":""),tr=e=>`Invalid monthCode: ${e}`,nr="Mismatching month/monthCode",ir="Missing month/monthCode",rr="Invalid leap month",sr="Invalid protocol results",or="Mismatching Calendars",ar=e=>`Invalid Calendar: ${e}`,lr="Forbidden ICU TimeZone",cr="Out-of-bounds offset",ur="Out-of-bounds TimeZone gap",dr="Invalid TimeZone offset",hr="Ambiguous offset",fr="Out-of-bounds date",pr="Out-of-bounds duration",mr="Cannot mix duration signs",gr="smallestUnit > largestUnit",yr=e=>`Cannot parse: ${e}`,vr=e=>`Invalid substring: ${e}`,br="Cannot specify TimeZone",_r=m(u,((e,t)=>t)),wr=m(u,((e,t,n)=>n)),kr=m(v,2),Tr={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Dr=Object.keys(Tr),Sr=864e5,Pr=1e3,Mr=1e3,Ar=1e6,Rr=1e9,Or=6e10,Cr=36e11,Er=864e11,xr=[1,Mr,Ar,Rr,Or,Cr,Er],Ir=Dr.slice(0,6),Fr=y(Ir),Nr=["offset"],jr=["timeZone"],qr=[...Ir,...Nr],Lr=[...qr,...jr],$r=["era","eraYear"],zr=[...$r,"year"],Br=["year"],Yr=["monthCode"],Zr=["month",...Yr],Ur=["day"],Wr=[...Zr,...Br],Hr=[...Yr,...Br],Vr=[...Ur,...Wr],Gr=[...Ur,...Zr],Jr=[...Ur,...Yr],Kr=wr(Ir,0),Xr="iso8601",Qr="gregory",es={[Qr]:{bce:-1,ce:0},japanese:{bce:-1,ce:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018},ethioaa:{era0:0},ethiopic:{era0:0,era1:5500},coptic:{era0:-1,era1:0},roc:{beforeroc:-1,minguo:0},buddhist:{be:0},islamic:{ah:0},indian:{saka:0},persian:{ap:0}},ts={chinese:13,dangi:13,hebrew:-6},ns=m(x,"string"),is=m(x,"boolean"),rs=m(x,"number"),ss=m(x,"function"),os=Dr.map((e=>e+"s")),as=y(os),ls=os.slice(0,6),cs=os.slice(6),us=cs.slice(1),ds=_r(os),hs=wr(os,0),fs=wr(ls,0),ps=m(p,os),ms=["isoNanosecond","isoMicrosecond","isoMillisecond","isoSecond","isoMinute","isoHour"],gs=["isoDay","isoMonth","isoYear"],ys=[...ms,...gs],vs=y(gs),bs=y(ms),_s=y(ys),ws=wr(bs,0),ks=m(p,ys),Ts=Intl.DateTimeFormat,Ds=1e8*Sr,Ss=[1e8,0],Ps=[-1e8,0],Ms=275760,As=-271821,Rs=1970,Os=1972,Cs=12,Es=fe(1868,9,8),xs=o((e=>{const t=ce(e)
if(t<Es)return Te(e)
const n=ee(Ao("japanese"),t),{era:i,eraYear:r}=Qn(n,"japanese")
return[i,r]}),WeakMap),Is="smallestUnit",Fs="roundingIncrement",Ns="fractionalSecondDigits",js={constrain:0,reject:1},qs=Object.keys(js),Ls=m(Ue,Is),$s=m(Ue,"largestUnit"),zs=m(Ue,"unit"),Bs=m(We,"overflow",js),Ys=m(We,"disambiguation",{compatible:0,reject:1,earlier:2,later:3}),Zs=m(We,"offset",{reject:0,use:1,prefer:2,ignore:3}),Us=m(We,"calendarName",{auto:0,never:1,critical:2,always:3}),Ws=m(We,"timeZoneName",{auto:0,never:1,critical:2}),Hs=m(We,"offset",{auto:0,never:1}),Vs=m(We,"roundingMode",{floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8}),Gs="PlainYearMonth",Js="PlainMonthDay",Ks="PlainDate",Xs="PlainDateTime",Qs="PlainTime",eo="ZonedDateTime",to="Instant",no="Duration",io=[Math.floor,e=>P(e)?Math.floor(e):Math.round(e),Math.ceil,e=>P(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>P(e)?Math.trunc(e)||0:Math.round(e),e=>e<0?Math.floor(e):Math.ceil(e),e=>Math.sign(e)*Math.round(Math.abs(e))||0,e=>P(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],ro="UTC",so=5184e3,oo=he(1847),ao=he((new Date).getUTCFullYear()+10),lo=/0+$/,co=o(((e,t)=>{const{epochNanoseconds:n}=e,i=(t.getOffsetNanosecondsFor?t:t(e.timeZone)).getOffsetNanosecondsFor(n),r=me(n,i)
return{calendar:e.calendar,...r,offsetNanoseconds:i}}),WeakMap),uo=2**32-1,ho=o((e=>{const t=xn(e)
return"object"==typeof t?new po(t):new fo(t||0)}))
class fo{constructor(e){this.offsetNano=e}getOffsetNanosecondsFor(){return this.offsetNano}getPossibleInstantsFor(e){return[de(e,this.offsetNano)]}getTransition(){}}class po{constructor(e){this.tzStore=(e=>{function t(e){const t=_(e,s,a),[o,l]=hn(t),c=i(o),u=i(l)
return c===u?c:n(r(o,l),c,u,e)}function n(t,n,i,r){let s,o
for(;(void 0===r||void 0===(s=r<t[0]?n:r>=t[1]?i:void 0))&&(o=t[1]-t[0]);){const n=t[0]+Math.floor(o/2)
e(n)===i?t[1]=n:t[0]=n+1}return s}const i=o(e),r=o(dn)
let s=oo,a=ao
return{getPossibleEpochSec(e){const n=t(e-86400),i=t(e+86400),r=e-n,s=e-i
if(n===i)return[r]
const o=t(r)
return o===t(s)?[e-o]:n>i?[r,s]:[]},getOffsetSec:t,getTransition(e,t){const o=_(e,s,a)
let[l,c]=hn(o)
const u=so*t,d=t<0?()=>c>s||(s=o,0):()=>l<a||(a=o,0)
for(;d();){const s=i(l),o=i(c)
if(s!==o){const i=r(l,c)
n(i,s,o)
const a=i[0]
if((b(a,e)||1)===t)return a}l+=u,c+=u}}}})((e=>t=>{const n=ee(e,t*Pr)
return he(ei(n),parseInt(n.month),parseInt(n.day),parseInt(n.hour),parseInt(n.minute),parseInt(n.second))-t})(e))}getOffsetNanosecondsFor(e){return this.tzStore.getOffsetSec(ae(e))*Rr}getPossibleInstantsFor(e){const[t,n]=[he((i=e).isoYear,i.isoMonth,i.isoDay,i.isoHour,i.isoMinute,i.isoSecond),i.isoMillisecond*Ar+i.isoMicrosecond*Mr+i.isoNanosecond]
var i
return this.tzStore.getPossibleEpochSec(t).map((e=>re(U(J(e,Rr),n))))}getTransition(e,t){const[n,i]=le(e),r=this.tzStore.getTransition(n+(t>0||i?1:0),t)
if(void 0!==r)return J(r,Rr)}}const mo="(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?",go="([+−-])"+mo,yo="(?:(?:([+−-])(\\d{6}))|(\\d{4}))-?(\\d{2})-?(\\d{2})(?:[T ]"+mo+"(Z|"+go+")?)?",vo=An("(?:(?:([+−-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),bo=An("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),_o=An(yo+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),wo=An("T?"+mo+"(?:"+go+")?((?:\\[(!?)([^\\]]*)\\]){0,9})"),ko=An(go),To=new RegExp("\\[(!?)([^\\]]*)\\]","g"),Do=An("([+−-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?"),So=o((e=>new Ts("en-GB",{timeZone:e,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}))),Po=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,Mo=o((e=>{function t(e){return((e,t)=>({...Qn(e,t),monthString:e.month,day:parseInt(e.day)}))(ee(n,e),i)}const n=Ao(e),i=ci(e)
return{id:e,queryFields:Kn(t),queryYearData:Xn(t)}})),Ao=o((e=>new Ts("en-GB",{calendar:e,timeZone:ro,era:"short",year:"numeric",month:"short",day:"numeric"}))),Ro=/^M(\d{2})(L?)$/,Oo={era:j,eraYear:$,year:$,month:B,monthCode:j,day:B,...wr(Ir,$),...wr(os,z),offset:j},Co=m(((e,t,n)=>{const i={}
for(let r=0;r<e.length;r++)i[t[r]]=n[e[r]]
return i}),Ir,ms),Eo={dateAdd(e,t,n){const r=Re(n)
let s,{years:o,months:a,weeks:l,days:c}=t
if(c+=on(t,5)[0],o||a)s=((e,t,n,r,s)=>{let[o,a,l]=e.dateParts(t)
if(n){const[t,r]=e.monthCodeParts(o,a)
o+=n,a=pi(t,r,e.leapMonth(o)),a=i("month",a,1,e.monthsInYearPart(o),s)}return r&&([o,a]=e.monthAdd(o,a,r)),l=i("day",l,1,e.daysInMonthParts(o,a),s),e.epochMilli(o,a,l)})(this,e,o,a,r)
else{if(!l&&!c)return e
s=ce(e)}return s+=(7*l+c)*Sr,ne(ge(s))},dateUntil(e,t,n){if(n<=7){let i=0,r=Hn({...e,...ws},{...t,...ws})
return 7===n&&([i,r]=T(r,7)),{...hs,weeks:i,days:r}}const i=this.dateParts(e),r=this.dateParts(t)
let[s,o,a]=((e,t,n,i,r,s,o)=>{let a=r-t,l=s-n,c=o-i
if(a||l){const u=Math.sign(a||l)
let d=e.daysInMonthParts(r,s),h=0
if(Math.sign(c)===-u){const i=d;[r,s]=e.monthAdd(r,s,-u),a=r-t,l=s-n,d=e.daysInMonthParts(r,s),h=u<0?-i:d}if(c=o-Math.min(i,d)+h,a){const[i,o]=e.monthCodeParts(t,n),[c,d]=e.monthCodeParts(r,s)
if(l=c-i||Number(d)-Number(o),Math.sign(l)===-u){const n=u<0&&-e.monthsInYearPart(r)
a=(r-=u)-t,l=s-pi(i,o,e.leapMonth(r))+(n||e.monthsInYearPart(r))}}}return[a,l,c]})(this,...i,...r)
return 8===n&&(o+=this.monthsInYearSpan(s,i[0]),s=0),{...hs,years:s,months:o,days:a}},dateFromFields(e,t){const n=Re(t),i=Mi(this,e),r=Ai(this,e,i,n),s=Ri(this,e,r,i,n)
return Ke(ne(this.isoFields(i,r,s)),this.id||Xr)},yearMonthFromFields(e,t){const n=Re(t),i=Mi(this,e),r=Ai(this,e,i,n)
return Xe(te(this.isoFields(i,r,1)),this.id||Xr)},monthDayFromFields(e,t){const n=Re(t),s=!this.id,{monthCode:o,year:a,month:l}=e
let c,u,d,h,f
if(void 0!==o){[c,u]=fi(o),f=r(e,"day")
const t=this.yearMonthForMonthDay(c,u,f)
if(!t)throw new RangeError("Cannot guess year")
if([d,h]=t,void 0!==l&&l!==h)throw new RangeError(nr)
s&&(h=i("month",h,1,Cs,1),f=i("day",f,1,be(void 0!==a?a:d,h),n))}else{d=void 0===a&&s?Os:Mi(this,e),h=Ai(this,e,d,n),f=Ri(this,e,h,d,n)
const t=this.leapMonth(d)
u=h===t,c=mi(h,t)
const i=this.yearMonthForMonthDay(c,u,f)
if(!i)throw new RangeError("Cannot guess year");[d,h]=i}return Qe(ne(this.isoFields(d,h,f)),this.id||Xr)},fields(e){return yi(this)&&e.includes("year")?[...e,...$r]:e},mergeFields(e,t){const n=Object.assign(Object.create(null),e)
return Oi(n,t,Zr),yi(this)&&(Oi(n,t,zr),"japanese"===this.id&&Oi(n,t,Gr,$r)),n},inLeapYear(e){const[t]=this.dateParts(e)
return this.inLeapYearPart(t)},monthsInYear(e){const[t]=this.dateParts(e)
return this.monthsInYearPart(t)},daysInMonth(e){const[t,n]=this.dateParts(e)
return this.daysInMonthParts(t,n)},daysInYear(e){const[t]=this.dateParts(e)
return this.daysInYearPart(t)},dayOfYear:hi,era(e){return this.eraParts(e)[0]},eraYear(e){return this.eraParts(e)[1]},monthCode(e){const[t,n]=this.dateParts(e),[i,r]=this.monthCodeParts(t,n)
return((e,t)=>"M"+kr(e)+(t?"L":""))(i,r)},dayOfWeek:ke,daysInWeek:()=>7},xo={dayOfYear:hi,dateParts:ye,epochMilli:fe,weekOfYear:ui,yearOfWeek:di,weekParts(e){function t(e){return(7-e<i?7:0)-e}function n(e){const n=_e(h+e),i=e||1,r=t(k(l+n*i,7))
return u=(n+(r-c)*i)/7}const i=this.id?1:4,r=ke(e),s=this.dayOfYear(e),o=k(r-1,7),a=s-1,l=k(o-a,7),c=t(l)
let u,d=Math.floor((a-c)/7)+1,h=e.isoYear
return d?d>n(0)&&(d=1,h++):(d=n(-1),h--),[d,h,u]}},Io={...Eo,...xo,dateParts:ye,eraParts(e){return this.id===Qr?Te(e):"japanese"===this.id?xs(e):[]},monthCodeParts:(e,t)=>[t,0],yearMonthForMonthDay(e,t){if(!t)return[Os,e]},inLeapYearPart:we,leapMonth(){},monthsInYearPart:ve,monthsInYearSpan:e=>e*Cs,daysInMonthParts:be,daysInYearPart:_e,isoFields:(e,t,n)=>({isoYear:e,isoMonth:t,isoDay:n}),epochMilli:fe,monthAdd:(e,t,n)=>(e+=D(n,Cs),(t+=S(n,Cs))<1?(e--,t+=Cs):t>Cs&&(e++,t-=Cs),[e,t]),year:e=>e.isoYear,month:e=>e.isoMonth,day:e=>e.isoDay},Fo={dayOfYear:hi,dateParts:ti,epochMilli:ni,weekOfYear:ui,yearOfWeek:di,weekParts:()=>[]},No={...Eo,...Fo,dateParts:ti,eraParts(e){const t=this.queryFields(e)
return[t.era,t.eraYear]},monthCodeParts(e,t){const n=ii.call(this,e)
return[mi(t,n),n===t]},yearMonthForMonthDay(e,t,n){let[i,r,s]=ti.call(this,{isoYear:Os,isoMonth:Cs,isoDay:31})
const o=ii.call(this,i),a=r===o
1===(b(e,mi(r,o))||b(Number(t),Number(a))||b(n,s))&&i--
for(let l=0;l<100;l++){const r=i-l,s=ii.call(this,r),o=pi(e,t,s)
if(t===(o===s)&&n<=si.call(this,r,o))return[r,o]}},inLeapYearPart(e){const t=ri.call(this,e)
return t>ri.call(this,e-1)&&t>ri.call(this,e+1)},leapMonth:ii,monthsInYearPart:oi,monthsInYearSpan(e,t){const n=t+e,i=Math.sign(e),r=i<0?-1:0
let s=0
for(let o=t;o!==n;o+=i)s+=oi.call(this,o+r)
return s},daysInMonthParts:si,daysInYearPart:ri,isoFields(e,t,n){return ge(ni.call(this,e,t,n))},epochMilli:ni,monthAdd(e,t,n){if(n){if(t+=n,!Number.isSafeInteger(t))throw new RangeError(fr)
if(n<0)for(;t<1;)t+=oi.call(this,--e)
else{let n
for(;t>(n=oi.call(this,e));)t-=n,e++}}return[e,t]},year(e){return this.queryFields(e).year},month(e){const{year:t,monthString:n}=this.queryFields(e),{monthStringToIndex:i}=this.queryYearData(t)
return i[n]+1},day(e){return this.queryFields(e).day}},jo=(qo=Io,Lo=No,e=>e===Xr?qo:e===Qr||"japanese"===e?Object.assign(Object.create(qo),{id:e}):Object.assign(Object.create(Lo),Mo(e)))
var qo,Lo
const $o=["timeZoneName"],zo={month:"numeric",day:"numeric"},Bo={year:"numeric",month:"numeric"},Yo={...Bo,day:"numeric"},Zo={hour:"numeric",minute:"numeric",second:"numeric"},Uo={...Yo,...Zo},Wo={...Uo,timeZoneName:"short"},Ho=Object.keys(Bo),Vo=Object.keys(zo),Go=Object.keys(Yo),Jo=Object.keys(Zo),Ko=["dateStyle"],Xo=[...Ho,...Ko],Qo=[...Vo,...Ko],ea=[...Go,...Ko,"weekday"],ta=[...Jo,"dayPeriod","timeStyle"],na=[...ea,...ta],ia=[...na,...$o],ra=[...$o,...ta],sa=[...$o,...ea],oa=[...$o,"day","weekday",...ta],aa=[...$o,"year","weekday",...ta],la=Ei(na,Uo),ca=Ei(ia,Wo),ua=Ei(na,Uo,$o),da=Ei(ea,Yo,ra),ha=Ei(ta,Zo,sa),fa=Ei(Xo,Bo,oa),pa=Ei(Qo,zo,aa),ma={},ga=[la,nt],ya=[ca,nt,0,(e,t)=>{const n=rt(e.timeZone)
if(t&&rt(t.timeZone)!==n)throw new RangeError("Mismatching TimeZones")
return n}],va=[ua,ce],ba=[da,ce],_a=[ha,e=>se(e)/Ar],wa=[fa,ce,1],ka=[pa,ce,1]
let Ta
t.DurationBranding=no,t.InstantBranding=to,t.PlainDateBranding=Ks,t.PlainDateTimeBranding=Xs,t.PlainMonthDayBranding=Js,t.PlainTimeBranding=Qs,t.PlainYearMonthBranding=Gs,t.RawDateTimeFormat=Ts,t.ZonedDateTimeBranding=eo,t.absDuration=e=>-1===e.sign?en(e):e,t.addDurations=(e,t,n,i,r,s,o)=>{const a=e(ze(o).relativeTo),l=Math.max(un(r),un(s))
if(Qt(l,a))return tt(rn(((e,t,n,i)=>{const r=Z(on(e),on(t),i?-1:1)
if(!Number.isFinite(r[0]))throw new RangeError(fr)
return{...hs,...an(r,n)}})(r,s,l,i)))
if(!a)throw new RangeError("Missing relativeTo")
i&&(s=tn(s))
const[c,u,d]=Vt(t,n,a),h=Jt(d),f=Kt(d),p=h(u,c,r)
return tt(f(u,c,h(u,p,s),l))},t.bigNanoToNumber=X,t.bindArgs=m,t.buildZonedIsoFields=(e,t)=>{const n=co(t,e)
return{calendar:t.calendar,...d(_s,n),offset:Et(n.offsetNanoseconds),timeZone:t.timeZone}},t.compareBigNanos=H,t.compareDurations=(e,t,n,i,r,s)=>{const o=e(ze(s).relativeTo),a=Math.max(un(i),un(r))
if(f(os,i,r))return 0
if(Qt(a,o))return H(on(i),on(r))
if(!o)throw new RangeError("Missing relativeTo")
const[l,c,u]=Vt(t,n,o),d=Gt(u),h=Jt(u)
return H(d(h(c,l,i)),d(h(c,l,r)))},t.compareInstants=In,t.compareIsoDateFields=jn,t.compareIsoDateTimeFields=Nn,t.compareIsoTimeFields=qn,t.compareZonedDateTimes=Fn,t.computeZonedHoursInDay=(e,t)=>{const n=e(t.timeZone),i=co(t,n),[r,s]=pt(i),o=X(W(Lt(n,r),Lt(n,s)),Cr,1)
if(o<=0)throw new RangeError(sr)
return o},t.computeZonedStartOfDay=(e,t)=>{const{timeZone:n,calendar:i}=t
return Ge(((e,t,n)=>Lt(t,e(co(n,t))))(mt,e(n),t),n,i)},t.constructDurationSlots=(e=0,t=0,n=0,i=0,r=0,s=0,o=0,a=0,u=0,d=0)=>tt(rn(c(z,l(os,[e,t,n,i,r,s,o,a,u,d])))),t.constructInstantSlots=e=>Ve(re(G(q(e)))),t.constructPlainDateSlots=(e,t,n,i,r=Xr)=>Ke(ne(Se(c($,{isoYear:t,isoMonth:n,isoDay:i}))),e(r)),t.constructPlainDateTimeSlots=(e,t,n,i,r=0,s=0,o=0,a=0,u=0,d=0,h=Xr)=>Je(ie(De(c($,l(ys,[t,n,i,r,s,o,a,u,d])))),e(h)),t.constructPlainMonthDaySlots=(e,t,n,i=Xr,r=Os)=>{const s=$(t),o=$(n),a=e(i)
return Qe(ne(Se({isoYear:$(r),isoMonth:s,isoDay:o})),a)},t.constructPlainTimeSlots=(e=0,t=0,n=0,i=0,r=0,s=0)=>et(Ae(c($,l(ms,[e,t,n,i,r,s])),1)),t.constructPlainYearMonthSlots=(e,t,n,i=Xr,r=1)=>{const s=$(t),o=$(n),a=e(i)
return Xe(te(Se({isoYear:s,isoMonth:o,isoDay:$(r)})),a)},t.constructZonedDateTimeSlots=(e,t,n,i,r=Xr)=>Ge(re(G(q(n))),t(i),e(r)),t.copyOptions=Ye,t.createDurationSlots=tt,t.createFormatForPrep=xi,t.createFormatPrepper=(e,t=xi)=>{const[n,,,i]=e
return(r,s=ma,...o)=>{const a=t(i&&i(...o),r,s,n),l=a.resolvedOptions()
return[a,...Ii(e,l,o)]}},t.createGetterDescriptors=e=>c((e=>({get:e,configurable:1})),e),t.createInstantSlots=Ve,t.createNameDescriptors=e=>a({name:e},1),t.createNativeStandardOps=jo,t.createPlainDateSlots=Ke,t.createPlainDateTimeSlots=Je,t.createPlainTimeSlots=et,t.createPropDescriptors=a,t.createStringTagDescriptors=e=>({[Symbol.toStringTag]:{value:e,configurable:1}}),t.createZonedDateTimeSlots=Ge,t.dateConfig=ba,t.dateFieldNamesAlpha=Vr,t.dateTimeConfig=va,t.diffBigNanos=W,t.diffInstants=(e,t,n,i)=>{const r=Ee(e,Ye(i),3,5),s=Un(t.epochNanoseconds,n.epochNanoseconds,...r)
return tt(e?tn(s):s)},t.diffPlainDateTimes=(e,t,n,i,r)=>{const s=Jn(n.calendar,i.calendar),o=Ye(r),[a,l,c,u]=Ee(t,o,6),d=ue(n),h=ue(i),f=H(h,d)
let p
if(f)if(a<=6)p=Un(d,h,a,l,c,u)
else{const t=e(s)
p=Zn(t,n,i,f,a,o),p=yt(p,h,a,l,c,u,t,n,ue,Yt)}else p=hs
return tt(t?tn(p):p)},t.diffPlainDates=(e,t,n,i,r)=>{const s=Jn(n.calendar,i.calendar),o=Ye(r)
return $n(t,(()=>e(s)),n,i,...Ee(t,o,6,9,6),o)},t.diffPlainTimes=(e,t,n,i)=>{const r=Ye(i),[s,o,a,l]=Ee(e,r,5,5),c=_t(Gn(t,n),ft(o,a),l),u={...hs,...ln(c,s)}
return tt(e?tn(u):u)},t.diffPlainYearMonth=(e,t,n,i,r)=>{const s=Jn(n.calendar,i.calendar),o=Ye(r),a=Ee(t,o,9,9,8),l=e(s)
return $n(t,(()=>l),Ut(l,n),Ut(l,i),...a,o)},t.diffZonedDateTimes=(e,t,n,i,r,s)=>{const o=Jn(i.calendar,r.calendar),a=Ye(s),[l,c,u,d]=Ee(n,a,5),h=i.epochNanoseconds,f=r.epochNanoseconds,p=H(f,h)
let g
if(p)if(l<6)g=Un(h,f,l,c,u,d)
else{const n=t(((e,t)=>{if(!Ln(e,t))throw new RangeError("Mismatching TimeZones")
return e})(i.timeZone,r.timeZone)),s=e(o)
g=Yn(s,n,i,r,p,l,a),g=yt(g,f,l,c,u,d,s,i,it,m(Bt,n))}else g=hs
return tt(n?tn(g):g)},t.durationFieldNamesAsc=os,t.durationWithFields=(e,t)=>{return tt((n=e,i=t,rn({...n,...wi(i,as)})))
var n,i},t.epochMicroToInstant=e=>Ve(re(G(q(e),Mr))),t.epochMilliToInstant=e=>Ve(re(J(e,Ar))),t.epochNanoToInstant=e=>Ve(re(G(q(e)))),t.epochNanoToIso=me,t.epochSecToInstant=e=>Ve(re(J(e,Rr))),t.excludePropsByName=h,t.excludeUndefinedProps=e=>{e={...e}
const t=Object.keys(e)
for(const n of t)void 0===e[n]&&delete e[n]
return e},t.forbiddenField=Wi,t.forbiddenValueOf="Cannot use valueOf",t.formatDurationIso=(e,t)=>{const[n,i,r]=Fe(t,3)
return i>1&&(e={...e,...gt(e,i,n)}),((e,t)=>{const{sign:n}=e,i=-1===n?tn(e):e,{hours:r,minutes:s}=i,[o,a]=Q(on(i,3),Rr,T)
sn(o)
const l=Ft(a,t),c=t>=0||!n||l
return(n<0?"-":"")+"P"+Pt({Y:jt(i.years),M:jt(i.months),W:jt(i.weeks),D:jt(i.days)})+(r||s||o||c?"T"+Pt({H:jt(r),M:jt(s),S:jt(o,c)+l}):"")})(e,r)},t.formatInstantIso=(e,t,n,i)=>{const[r,s,o,a]=(e=>{const t=Ne(e=ze(e))
return[e.timeZone,...t]})(i),l=void 0!==r
return((e,t,n,i,r,s)=>{n=bt(n,r,i,1)
const o=t.getOffsetNanosecondsFor(n)
return Mt(me(n,o),s)+(e?Et(ht(o)):"Z")})(l,t(l?e(r):ro),n.epochNanoseconds,s,o,a)},t.formatOffsetNano=Et,t.formatPlainDateIso=(e,t)=>{return n=e.calendar,i=e,r=Ie(t),At(i)+xt(n,r)
var n,i,r},t.formatPlainDateTimeIso=(e,t)=>{const[n,i,r,s]=(e=>(e=ze(e),[Us(e),...Ne(e)]))(t)
return o=e.calendar,a=n,l=s,Mt(ut(e,r,i),l)+xt(o,a)
var o,a,l},t.formatPlainMonthDayIso=(e,t)=>St(e.calendar,Ot,e,Ie(t)),t.formatPlainTimeIso=(e,t)=>{const[n,i,r]=Fe(t)
return s=r,Ct(dt(e,i,n)[0],s)
var s},t.formatPlainYearMonthIso=(e,t)=>St(e.calendar,Rt,e,Ie(t)),t.formatZonedDateTimeIso=(e,t,n)=>{const[i,r,s,o,a,l]=(e=>{e=ze(e)
const t=Us(e),n=$e(e),i=Hs(e),r=Vs(e,4),s=Ls(e,4)
return[t,Ws(e),i,r,...je(s,n)]})(n)
return((e,t,n,i,r,s,o,a,l,c)=>{i=bt(i,l,a,1)
const u=e(n).getOffsetNanosecondsFor(i)
return Mt(me(i,u),c)+Et(ht(u),o)+((e,t)=>1!==t?"["+(2===t?"!":"")+rt(e)+"]":"")(n,s)+xt(t,r)})(e,t.calendar,t.timeZone,t.epochNanoseconds,i,r,s,o,a,l)},t.getCurrentEpochNano=Fi,t.getCurrentIsoDateTime=e=>{const t=Fi()
return me(t,e.getOffsetNanosecondsFor(t))},t.getCurrentTimeZoneId=()=>Ta||(Ta=(new Ts).resolvedOptions().timeZone),t.getDurationBlank=e=>!e.sign,t.getEpochMicro=e=>K(e.epochNanoseconds,Mr),t.getEpochMilli=nt,t.getEpochNano=e=>K(e.epochNanoseconds),t.getEpochSec=e=>ae(e.epochNanoseconds),t.getId=rt,t.getRequiredDateFields=e=>e===Xr?["year","day"]:[],t.getRequiredMonthDayFields=e=>e===Xr?Ur:[],t.getRequiredYearMonthFields=e=>e===Xr?Br:[],t.getSingleInstantFor=Lt,t.hasAllPropsByName=(e,t)=>{for(const n of t)if(!(n in e))return 0
return 1},t.instantConfig=ga,t.instantToZonedDateTime=(e,t,n=Xr)=>Ge(e.epochNanoseconds,t,n),t.instantsEqual=(e,t)=>!In(e,t),t.invalidBag="Invalid bag",t.invalidCallingContext="Invalid calling context",t.invalidFormatType=e=>`Cannot format ${e}`,t.invalidProtocol="Invalid protocol",t.isObjectLike=s,t.isTimeZoneSlotsEqual=Ln,t.isoCalendarId=Xr,t.isoTimeFieldDefaults=ws,t.isoTimeFieldNamesAsc=ms,t.mapPropNames=u,t.mapProps=c,t.memoize=o,t.mismatchingFormatTypes="Mismatching types for formatting",t.monthDayConfig=ka,t.moveInstant=(e,t,n)=>Ve(re(Z(t.epochNanoseconds,(e=>{if(cn(e))throw new RangeError("Cannot use large units")
return on(e,5)})(e?tn(n):n)))),t.movePlainDate=(e,t,n,i,r)=>{const{calendar:s}=n
return Ke(Zt(e(s),n,t?tn(i):i,r),s)},t.movePlainDateTime=(e,t,n,i,r=Object.create(null))=>{const{calendar:s}=n
return Je(Yt(e(s),n,t?tn(i):i,r),s)},t.movePlainTime=(e,t,n)=>et(Wt(t,e?tn(n):n)[0]),t.movePlainYearMonth=(e,t,n,i,r=Object.create(null))=>{const s=n.calendar,o=e(s)
let a=Ut(o,n)
t&&(i=en(i)),i.sign<0&&(a=o.dateAdd(a,{...hs,months:1}),a=Ht(a,-1))
const l=o.dateAdd(a,i,r)
return Xe(Ut(o,l),s)},t.moveZonedDateTime=(e,t,n,i,r,s=Object.create(null))=>{const o=t(i.timeZone),a=e(i.calendar)
return{...i,...Bt(o,a,i,n?tn(r):r,s)}},t.nanoInMilli=Ar,t.negateDuration=en,t.numberToBigNano=J,t.parseCalendarId=e=>{const t=_n(e)||wn(e)||kn(e)
return t?t.calendar:e},t.parseDuration=e=>{const t=(e=>{const t=Do.exec(e)
return t?(e=>{function t(e,t,s){let o=0,a=0
if(s&&([o,r]=w(r,xr[s])),void 0!==e){if(i)throw new RangeError(vr(e))
a=(e=>{const t=parseInt(e)
if(!Number.isFinite(t))throw new RangeError(vr(e))
return t})(e),n=1,t&&(r=Mn(t)*(xr[s]/Rr),i=1)}return o+a}let n=0,i=0,r=0,s={...l(os,[t(e[2]),t(e[3]),t(e[4]),t(e[5]),t(e[6],e[7],5),t(e[8],e[9],4),t(e[10],e[11],3)]),...A(r,2,os)}
if(!n)throw new RangeError(Vi(os))
return Rn(e[1])<0&&(s=tn(s)),s})(t):void 0})(ns(e))
if(!t)throw new RangeError(yr(e))
return tt(rn(t))},t.parseInstant=e=>{const t=_n(e=j(e))
if(!t)throw new RangeError(yr(e))
let n
if(t.hasZ)n=0
else{if(!t.offset)throw new RangeError(yr(e))
n=fn(t.offset)}return t.timeZone&&Tn(t.timeZone,1),Ve(de(De(t),n))},t.parsePlainDate=pn,t.parsePlainDateTime=e=>{const t=_n(ns(e))
if(!t||t.hasZ)throw new RangeError(yr(e))
return Je(yn(t))},t.parsePlainMonthDay=(e,t)=>{const n=kn(ns(t))
if(n)return mn(n),Qe(Se(n))
const i=pn(t),{calendar:r}=i,s=e(r),[o,a,l]=s.dateParts(i),[c,u]=s.monthCodeParts(o,a),[d,h]=s.yearMonthForMonthDay(c,u,l)
return Qe(ne(s.isoFields(d,h,l)),r)},t.parsePlainTime=e=>{let t,n=(e=>{const t=wo.exec(e)
return t?(Pn(t[10]),Sn(t)):void 0})(ns(e))
if(!n){if(n=_n(e),!n)throw new RangeError(yr(e))
if(!n.hasTime)throw new RangeError(yr(e))
if(n.hasZ)throw new RangeError(vr("Z"))
mn(n)}if((t=wn(e))&&Pe(t))throw new RangeError(yr(e))
if((t=kn(e))&&Pe(t))throw new RangeError(yr(e))
return et(Ae(n,1))},t.parsePlainYearMonth=(e,t)=>{const n=wn(ns(t))
if(n)return mn(n),Xe(te(Se(n)))
const i=pn(t)
return Xe(Ut(e(i.calendar),i))},t.parseRelativeToSlots=e=>{const t=_n(ns(e))
if(!t)throw new RangeError(yr(e))
if(t.timeZone)return gn(t,t.offset?fn(t.offset):void 0)
if(t.hasZ)throw new RangeError(yr(e))
return vn(t)},t.parseTimeZoneId=e=>{const t=_n(e)
return t&&(t.timeZone||t.hasZ&&ro||t.offset)||e},t.parseZonedDateTime=(e,t)=>{const n=_n(ns(e))
if(!n||!n.timeZone)throw new RangeError(yr(e))
const{offset:i}=n,r=i?fn(i):void 0,[,s,o]=Oe(t)
return gn(n,r,s,o)},t.plainDateTimeToPlainMonthDay=(e,t,n)=>Di(e(t.calendar),n),t.plainDateTimeToPlainYearMonth=(e,t,n)=>{const i=e(t.calendar)
return Xe({...t,...Si(i,n)})},t.plainDateTimeToZonedDateTime=(e,t,n,i)=>Ge(re(((e,t,n,i)=>{const r=Ce(i)
return Lt(e(t),n,r)})(e,n,t,i)),n,t.calendar),t.plainDateTimeWithFields=(e,t,n,i,r)=>{const s=Ye(r)
return Je(((e,t,n,i)=>{const r=Ti(e,t,n,Vr,Ir),s=Re(i)
return ie({...e.dateFromFields(r,Ze(i,s)),...ki(r,s)})})(e(t.calendar),n,i,s))},t.plainDateTimeWithPlainDate=(e,t)=>Je({...e,...t},Ci(e.calendar,t.calendar)),t.plainDateTimeWithPlainTime=(e,t=ws)=>Je({...e,...t}),t.plainDateTimesEqual=(e,t)=>!Nn(e,t)&&st(e.calendar,t.calendar),t.plainDateToPlainDateTime=(e,t=ws)=>Je(ie({...e,...t})),t.plainDateToPlainMonthDay=(e,t,n)=>Di(e(t.calendar),n),t.plainDateToPlainYearMonth=(e,t,n)=>Si(e(t.calendar),n),t.plainDateToZonedDateTime=(e,t,n,i,r)=>{const s=e(r.timeZone),o=r.plainTime,a=void 0!==o?t(o):ws
return Ge(Lt(n(s),{...i,...a}),s,i.calendar)},t.plainDateWithFields=(e,t,n,i,r)=>{const s=Ye(r)
return((e,t,n,i)=>{const r=Ti(e,t,n,Vr)
return e.dateFromFields(r,i)})(e(t.calendar),n,i,s)},t.plainDatesEqual=(e,t)=>!jn(e,t)&&st(e.calendar,t.calendar),t.plainMonthDayToPlainDate=(e,t,n,i)=>((e,t,n)=>Pi(e,t,Jr,E(n),Br))(e(t.calendar),n,i),t.plainMonthDayWithFields=(e,t,n,i,r)=>{const s=Ye(r)
return((e,t,n,i)=>{const r=Ti(e,t,n,Vr)
return e.monthDayFromFields(r,i)})(e(t.calendar),n,i,s)},t.plainMonthDaysEqual=(e,t)=>!jn(e,t)&&st(e.calendar,t.calendar),t.plainTimeToPlainDateTime=(e,t)=>Je(ie({...e,...t})),t.plainTimeToZonedDateTime=(e,t,n,i,r)=>{const s=E(r),o=t(s.plainDate),a=e(s.timeZone)
return Ge(Lt(n(a),{...o,...i}),a,o.calendar)},t.plainTimeWithFields=(e,t,n)=>et(((e,t,n)=>{const i=Re(n)
return ki({...d(Fr,e),...wi(t,Fr)},i)})(e,t,n)),t.plainTimesEqual=(e,t)=>!qn(e,t),t.plainYearMonthToPlainDate=(e,t,n,i)=>((e,t,n)=>Pi(e,t,Hr,E(n),Ur))(e(t.calendar),n,i),t.plainYearMonthWithFields=(e,t,n,i,r)=>{const s=Ye(r)
return Xe(((e,t,n,i)=>{const r=Ti(e,t,n,Wr)
return e.yearMonthFromFields(r,i)})(e(t.calendar),n,i,s))},t.plainYearMonthsEqual=(e,t)=>!jn(e,t)&&st(e.calendar,t.calendar),t.pluckProps=d,t.queryNativeTimeZone=ho,t.refineCalendarId=e=>li(ns(e)),t.refineDateDiffOptions=e=>(e=ze(e),$s(e,9,6,1)),t.refineDurationBag=e=>{const t=wi(e,as)
return tt(rn({...hs,...t}))},t.refineEpochDisambigOptions=Ce,t.refineMaybeZonedDateTimeBag=(e,t,n,i)=>{const r=_i(n,i,Vr,[],Lr)
if(void 0!==r.timeZone){const i=n.dateFromFields(r),s=ki(r),o=e(r.timeZone)
return{epochNanoseconds:qt(t(o),{...i,...s},void 0!==r.offset?fn(r.offset):void 0),timeZone:o}}return{...n.dateFromFields(r),...ws}},t.refineOverflowOptions=Re,t.refinePlainDateBag=(e,t,n,i=[])=>{const r=_i(e,t,Vr,i)
return e.dateFromFields(r,n)},t.refinePlainDateTimeBag=(e,t,n)=>{const i=_i(e,t,Vr,[],Ir),r=Re(n)
return Je(ie({...e.dateFromFields(i,Ze(n,r)),...ki(i,r)}))},t.refinePlainMonthDayBag=(e,t,n,i,r=[])=>{const s=_i(e,n,Vr,r)
return t&&void 0!==s.month&&void 0===s.monthCode&&void 0===s.year&&(s.year=Os),e.monthDayFromFields(s,i)},t.refinePlainTimeBag=(e,t)=>{const n=Re(t)
return et(ki(wi(e,Fr,[],1),n))},t.refinePlainYearMonthBag=(e,t,n,i)=>{const r=_i(e,t,Wr,i)
return e.yearMonthFromFields(r,n)},t.refineTimeZoneId=e=>Cn(ns(e)),t.refineZonedDateTimeBag=(e,t,n,i,r,s)=>{const o=_i(n,r,Vr,jr,Lr),a=e(o.timeZone),[l,c,u]=Oe(s),d=n.dateFromFields(o,Ze(s,l)),h=ki(o,l)
return Ge(qt(t(a),{...d,...h},void 0!==o.offset?fn(o.offset):void 0,c,u),a,i)},t.refineZonedFieldOptions=Oe,t.requireBoolean=is,t.requireFunction=ss,t.requireInteger=O,t.requireIntegerOrUndefined=e=>{if(void 0!==e)return O(e)},t.requireNonNullish=e=>{if(null==e)throw new TypeError("Cannot be null or undefined")
return e},t.requireObjectLike=E,t.requirePositiveInteger=R,t.requirePositiveIntegerOrUndefined=e=>{if(void 0!==e)return R(e)},t.requireString=ns,t.requireStringOrUndefined=e=>{if(void 0!==e)return ns(e)},t.resolveCalendarId=li,t.resolveTimeZoneId=Cn,t.roundDuration=(e,t,n,i,r)=>{const s=un(i),[o,a,l,c,u]=((e,t,n)=>{e=Be(e,Is)
let i=$s(e)
const r=n(e.relativeTo)
let s=qe(e)
const o=Vs(e,7)
let a=Ls(e)
if(void 0===i&&void 0===a)throw new RangeError("Required smallestUnit or largestUnit")
return null==a&&(a=0),null==i&&(i=Math.max(a,t)),He(i,a),s=Le(s,a,1),[i,a,s,o,r]})(r,s,e),d=Math.max(s,o)
if(!Xt(u)&&d<=6)return tt(rn(((e,t,n,i,r)=>{const s=vt(on(e),n,i,r)
return{...hs,...an(s,t)}})(i,o,a,l,c)))
if(!u)throw new RangeError("Missing relativeTo")
const[h,f,p]=Vt(t,n,u),m=Gt(p),g=Jt(p),y=Kt(p),v=g(f,h,i)
let b=y(f,h,v,o)
const _=i.sign,w=nn(b)
if(_&&w&&_!==w)throw new RangeError(sr)
return w&&(b=yt(b,m(v),o,a,l,c,f,h,m,g)),tt(b)},t.roundInstant=(e,t)=>{const[n,i,r]=xe(t,5,1)
return Ve(vt(e.epochNanoseconds,n,i,r,1))},t.roundPlainDateTime=(e,t)=>Je(ct(e,...xe(t)),e.calendar),t.roundPlainTime=(e,t)=>{const[n,i,r]=xe(t,5)
var s
return et((s=r,dt(e,ft(n,i),s)[0]))},t.roundZonedDateTime=(e,t,n)=>{let{epochNanoseconds:i,timeZone:r,calendar:s}=t
const[o,a,l]=xe(n)
if(0===o&&1===a)return t
const c=e(r)
if(6===o)i=((e,t,n,i)=>{const r=co(n,t),[s,o]=e(r),a=n.epochNanoseconds,l=Lt(t,s),c=Lt(t,o)
if(V(a,l,c))throw new RangeError(sr)
return wt(lt(a,l,c),i)?c:l})(pt,c,t,l)
else{const e=c.getOffsetNanosecondsFor(i)
i=qt(c,ct(me(i,e),o,a,l),e,2,0,1)}return Ge(i,r,s)},t.slotsWithCalendar=(e,t)=>({...e,calendar:t}),t.slotsWithTimeZone=(e,t)=>({...e,timeZone:t}),t.timeConfig=_a,t.timeFieldNamesAsc=Ir,t.totalDuration=(e,t,n,i,r)=>{const s=un(i),[o,a]=((e,t)=>{const n=t((e=Be(e,"unit")).relativeTo)
let i=zs(e)
return i=C("unit",i),[i,n]})(r,e)
if(Qt(Math.max(o,s),a))return ot(i,o)
if(!a)throw new RangeError("Missing relativeTo")
const[l,c,u]=Vt(t,n,a),d=Gt(u),h=Jt(u),f=Kt(u),p=h(c,l,i),m=f(c,l,p,o)
return Qt(o,a)?ot(m,o):((e,t,n,i,r,s,o)=>{const a=nn(e),[l,c]=at(i,ps(n,e),n,a,r,s,o),u=lt(t,l,c)
return e[os[n]]+u*a})(m,d(p),o,c,l,d,h)},t.unitNamesAsc=Dr,t.validateTimeZoneGap=zt,t.validateTimeZoneOffset=$t,t.yearMonthConfig=wa,t.zonedConfig=ya,t.zonedDateTimeToInstant=e=>Ve(e.epochNanoseconds),t.zonedDateTimeToPlainDate=(e,t)=>Ke(co(t,e)),t.zonedDateTimeToPlainDateTime=(e,t)=>Je(co(t,e)),t.zonedDateTimeToPlainMonthDay=(e,t,n)=>Di(e(t.calendar),n),t.zonedDateTimeToPlainTime=(e,t)=>et(co(t,e)),t.zonedDateTimeToPlainYearMonth=(e,t,n)=>Si(e(t.calendar),n),t.zonedDateTimeWithFields=(e,t,n,i,r,s)=>{const o=Ye(s),{calendar:a,timeZone:l}=n
return Ge(((e,t,n,i,r)=>{const s=Ti(e,n,i,Vr,qr,Nr),[o,a,l]=Oe(r,2)
return qt(t,{...e.dateFromFields(s,Ze(r,o)),...ki(s,o)},fn(s.offset),a,l)})(e(a),t(l),i,r,o),l,a)},t.zonedDateTimeWithPlainDate=(e,t,n)=>{const i=t.timeZone,r=e(i),s={...co(t,r),...n},o=Ci(t.calendar,n.calendar)
return Ge(qt(r,s,s.offsetNanoseconds,2),i,o)},t.zonedDateTimeWithPlainTime=(e,t,n=ws)=>{const i=t.timeZone,r=e(i),s={...co(t,r),...n}
return Ge(qt(r,s,s.offsetNanoseconds,2),i,t.calendar)},t.zonedDateTimesEqual=(e,t)=>!Fn(e,t)&&!!Ln(e.timeZone,t.timeZone)&&st(e.calendar,t.calendar),t.zonedEpochSlotsToIso=co},1602:(e,t,n)=>{var i=n(5947)
t.Intl=i.IntlExtended,t.Temporal=i.Temporal,t.toTemporalInstant=i.toTemporalInstant}}])